patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3
@ 2020-05-19 12:53 luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'test: " luca.boccassi
                   ` (79 more replies)
  0 siblings, 80 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Timothy Redaelli; +Cc: Anoob Joseph, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 295ba7d0c39bdf783ef7590d3668e773a61b3349 Mon Sep 17 00:00:00 2001
From: Timothy Redaelli <tredaelli@redhat.com>
Date: Wed, 5 Feb 2020 13:50:41 +0100
Subject: [PATCH] crypto/octeontx2: fix build with gcc 10

[ upstream commit 983ab2b5d05c40a7b1a4da2200fd028e99796ee7 ]

GCC 10 defaults to -fno-common, this means a linker error will now be
reported if the same global variable is defined in more than one
compilation unit.

Fixes: 2f8a1b963eb7 ("crypto/octeontx2: add PMD skeleton")

Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
---
 drivers/crypto/octeontx2/otx2_cryptodev.c     | 2 ++
 drivers/crypto/octeontx2/otx2_cryptodev.h     | 2 +-
 drivers/crypto/octeontx2/otx2_cryptodev_ops.h | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/octeontx2/otx2_cryptodev.c b/drivers/crypto/octeontx2/otx2_cryptodev.c
index 7b8add1bfc..417eda6de6 100644
--- a/drivers/crypto/octeontx2/otx2_cryptodev.c
+++ b/drivers/crypto/octeontx2/otx2_cryptodev.c
@@ -24,6 +24,8 @@
 
 int otx2_cpt_logtype;
 
+uint8_t otx2_cryptodev_driver_id;
+
 static struct rte_pci_id pci_id_cpt_table[] = {
 	{
 		RTE_PCI_DEVICE(PCI_VENDOR_ID_CAVIUM,
diff --git a/drivers/crypto/octeontx2/otx2_cryptodev.h b/drivers/crypto/octeontx2/otx2_cryptodev.h
index 8e0ebc292a..c0aa661b3b 100644
--- a/drivers/crypto/octeontx2/otx2_cryptodev.h
+++ b/drivers/crypto/octeontx2/otx2_cryptodev.h
@@ -38,6 +38,6 @@ extern int otx2_cpt_logtype;
 /*
  * Crypto device driver ID
  */
-uint8_t otx2_cryptodev_driver_id;
+extern uint8_t otx2_cryptodev_driver_id;
 
 #endif /* _OTX2_CRYPTODEV_H_ */
diff --git a/drivers/crypto/octeontx2/otx2_cryptodev_ops.h b/drivers/crypto/octeontx2/otx2_cryptodev_ops.h
index a2724f7227..f83e36b486 100644
--- a/drivers/crypto/octeontx2/otx2_cryptodev_ops.h
+++ b/drivers/crypto/octeontx2/otx2_cryptodev_ops.h
@@ -16,6 +16,6 @@ enum otx2_cpt_egrp {
 	OTX2_CPT_EGRP_AE = 2
 };
 
-struct rte_cryptodev_ops otx2_cpt_ops;
+extern struct rte_cryptodev_ops otx2_cpt_ops;
 
 #endif /* _OTX2_CRYPTODEV_OPS_H_ */
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:18.919553903 +0100
+++ 0001-crypto-octeontx2-fix-build-with-gcc-10.patch	2020-05-19 13:56:18.167500883 +0100
@@ -1,14 +1,15 @@
-From 983ab2b5d05c40a7b1a4da2200fd028e99796ee7 Mon Sep 17 00:00:00 2001
+From 295ba7d0c39bdf783ef7590d3668e773a61b3349 Mon Sep 17 00:00:00 2001
 From: Timothy Redaelli <tredaelli@redhat.com>
 Date: Wed, 5 Feb 2020 13:50:41 +0100
 Subject: [PATCH] crypto/octeontx2: fix build with gcc 10
 
+[ upstream commit 983ab2b5d05c40a7b1a4da2200fd028e99796ee7 ]
+
 GCC 10 defaults to -fno-common, this means a linker error will now be
 reported if the same global variable is defined in more than one
 compilation unit.
 
 Fixes: 2f8a1b963eb7 ("crypto/octeontx2: add PMD skeleton")
-Cc: stable@dpdk.org
 
 Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
 Acked-by: Anoob Joseph <anoobj@marvell.com>

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

* [dpdk-stable] patch 'test: fix build with gcc 10' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'app/pipeline: " luca.boccassi
                   ` (78 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Timothy Redaelli; +Cc: Vladimir Medvedkin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From ef348e22a0cb1437b297e0f1ffdd7338ca340aae Mon Sep 17 00:00:00 2001
From: Timothy Redaelli <tredaelli@redhat.com>
Date: Wed, 5 Feb 2020 13:50:42 +0100
Subject: [PATCH] test: fix build with gcc 10

[ upstream commit 53ba646a0a63c053974548cf03a7537538042b85 ]

GCC 10 defaults to -fno-common, this means a linker error will now be
reported if the same global variable is defined in more than one
compilation unit.

Fixes: 08e0c7581468 ("test/fib: add performance autotests")

Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
 app/test/test_fib_perf.c | 2 +-
 app/test/test_lpm_perf.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/test/test_fib_perf.c b/app/test/test_fib_perf.c
index 573087c3c0..dd2e54db8b 100644
--- a/app/test/test_fib_perf.c
+++ b/app/test/test_fib_perf.c
@@ -35,7 +35,7 @@ struct route_rule {
 	uint8_t depth;
 };
 
-struct route_rule large_route_table[MAX_RULE_NUM];
+static struct route_rule large_route_table[MAX_RULE_NUM];
 
 static uint32_t num_route_entries;
 #define NUM_ROUTE_ENTRIES num_route_entries
diff --git a/app/test/test_lpm_perf.c b/app/test/test_lpm_perf.c
index a2578fe90e..489719c40b 100644
--- a/app/test/test_lpm_perf.c
+++ b/app/test/test_lpm_perf.c
@@ -34,7 +34,7 @@ struct route_rule {
 	uint8_t depth;
 };
 
-struct route_rule large_route_table[MAX_RULE_NUM];
+static struct route_rule large_route_table[MAX_RULE_NUM];
 
 static uint32_t num_route_entries;
 #define NUM_ROUTE_ENTRIES num_route_entries
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:18.953662192 +0100
+++ 0002-test-fix-build-with-gcc-10.patch	2020-05-19 13:56:18.167500883 +0100
@@ -1,14 +1,15 @@
-From 53ba646a0a63c053974548cf03a7537538042b85 Mon Sep 17 00:00:00 2001
+From ef348e22a0cb1437b297e0f1ffdd7338ca340aae Mon Sep 17 00:00:00 2001
 From: Timothy Redaelli <tredaelli@redhat.com>
 Date: Wed, 5 Feb 2020 13:50:42 +0100
 Subject: [PATCH] test: fix build with gcc 10
 
+[ upstream commit 53ba646a0a63c053974548cf03a7537538042b85 ]
+
 GCC 10 defaults to -fno-common, this means a linker error will now be
 reported if the same global variable is defined in more than one
 compilation unit.
 
 Fixes: 08e0c7581468 ("test/fib: add performance autotests")
-Cc: stable@dpdk.org
 
 Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
 Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>

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

* [dpdk-stable] patch 'app/pipeline: fix build with gcc 10' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'test: " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'examples/vhost_blk: " luca.boccassi
                   ` (77 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Timothy Redaelli; +Cc: Cristian Dumitrescu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 5fb297ba3d1a87bf33005621e1932aa06b4d788c Mon Sep 17 00:00:00 2001
From: Timothy Redaelli <tredaelli@redhat.com>
Date: Wed, 5 Feb 2020 15:12:20 +0100
Subject: [PATCH] app/pipeline: fix build with gcc 10

[ upstream commit 20c1854f079e0a09f9c0383ccd896aafe6f41b0a ]

GCC 10 defaults to -fno-common, this means a linker error will now be
reported if the same global variable is defined in more than one
compilation unit.

Fixes: 48f31ca50cc4 ("app/pipeline: packet framework benchmark")

Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
 app/test-pipeline/config.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/app/test-pipeline/config.c b/app/test-pipeline/config.c
index 28ac9fcc0e..33f3f1c827 100644
--- a/app/test-pipeline/config.c
+++ b/app/test-pipeline/config.c
@@ -42,8 +42,6 @@
 
 #include "main.h"
 
-struct app_params app;
-
 static const char usage[] = "\n";
 
 void
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:18.989556262 +0100
+++ 0003-app-pipeline-fix-build-with-gcc-10.patch	2020-05-19 13:56:18.171500955 +0100
@@ -1,14 +1,15 @@
-From 20c1854f079e0a09f9c0383ccd896aafe6f41b0a Mon Sep 17 00:00:00 2001
+From 5fb297ba3d1a87bf33005621e1932aa06b4d788c Mon Sep 17 00:00:00 2001
 From: Timothy Redaelli <tredaelli@redhat.com>
 Date: Wed, 5 Feb 2020 15:12:20 +0100
 Subject: [PATCH] app/pipeline: fix build with gcc 10
 
+[ upstream commit 20c1854f079e0a09f9c0383ccd896aafe6f41b0a ]
+
 GCC 10 defaults to -fno-common, this means a linker error will now be
 reported if the same global variable is defined in more than one
 compilation unit.
 
 Fixes: 48f31ca50cc4 ("app/pipeline: packet framework benchmark")
-Cc: stable@dpdk.org
 
 Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
 Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>

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

* [dpdk-stable] patch 'examples/vhost_blk: fix build with gcc 10' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'test: " luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'app/pipeline: " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'examples/eventdev: " luca.boccassi
                   ` (76 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Timothy Redaelli; +Cc: Maxime Coquelin, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 84119ecce20a58c4fb23a79dee9bffb9d3ecf298 Mon Sep 17 00:00:00 2001
From: Timothy Redaelli <tredaelli@redhat.com>
Date: Wed, 5 Feb 2020 14:47:03 +0100
Subject: [PATCH] examples/vhost_blk: fix build with gcc 10

[ upstream commit be848992298b7a64a161487600a4070e52b9d26d ]

GCC 10 defaults to -fno-common, this means a linker error will now be
reported if the same global variable is defined in more than one
compilation unit.

Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample")

Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 examples/vhost_blk/vhost_blk.c | 2 ++
 examples/vhost_blk/vhost_blk.h | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/examples/vhost_blk/vhost_blk.c b/examples/vhost_blk/vhost_blk.c
index 74c82a900b..b757c9228b 100644
--- a/examples/vhost_blk/vhost_blk.c
+++ b/examples/vhost_blk/vhost_blk.c
@@ -31,6 +31,8 @@
 			    (1ULL << VIRTIO_F_NOTIFY_ON_EMPTY) | \
 			    (1ULL << VHOST_USER_F_PROTOCOL_FEATURES))
 
+struct vhost_blk_ctrlr *g_vhost_ctrlr;
+
 /* Path to folder where character device will be created. Can be set by user. */
 static char dev_pathname[PATH_MAX] = "";
 static sem_t exit_sem;
diff --git a/examples/vhost_blk/vhost_blk.h b/examples/vhost_blk/vhost_blk.h
index 933e2b7c57..17258d284b 100644
--- a/examples/vhost_blk/vhost_blk.h
+++ b/examples/vhost_blk/vhost_blk.h
@@ -112,8 +112,8 @@ struct inflight_blk_task {
 	struct rte_vhost_inflight_info_packed *inflight_packed;
 };
 
-struct vhost_blk_ctrlr *g_vhost_ctrlr;
-struct vhost_device_ops vhost_blk_device_ops;
+extern struct vhost_blk_ctrlr *g_vhost_ctrlr;
+extern struct vhost_device_ops vhost_blk_device_ops;
 
 int vhost_bdev_process_blk_commands(struct vhost_block_dev *bdev,
 				     struct vhost_blk_task *task);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:19.022980419 +0100
+++ 0004-examples-vhost_blk-fix-build-with-gcc-10.patch	2020-05-19 13:56:18.171500955 +0100
@@ -1,14 +1,15 @@
-From be848992298b7a64a161487600a4070e52b9d26d Mon Sep 17 00:00:00 2001
+From 84119ecce20a58c4fb23a79dee9bffb9d3ecf298 Mon Sep 17 00:00:00 2001
 From: Timothy Redaelli <tredaelli@redhat.com>
 Date: Wed, 5 Feb 2020 14:47:03 +0100
 Subject: [PATCH] examples/vhost_blk: fix build with gcc 10
 
+[ upstream commit be848992298b7a64a161487600a4070e52b9d26d ]
+
 GCC 10 defaults to -fno-common, this means a linker error will now be
 reported if the same global variable is defined in more than one
 compilation unit.
 
 Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample")
-Cc: stable@dpdk.org
 
 Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
 Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

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

* [dpdk-stable] patch 'examples/eventdev: fix build with gcc 10' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (2 preceding siblings ...)
  2020-05-19 12:53 ` [dpdk-stable] patch 'examples/vhost_blk: " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'examples/qos_sched: " luca.boccassi
                   ` (75 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Timothy Redaelli; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 4de659fdc0488e13b463134592fd48ef5ab45992 Mon Sep 17 00:00:00 2001
From: Timothy Redaelli <tredaelli@redhat.com>
Date: Wed, 5 Feb 2020 18:05:45 +0100
Subject: [PATCH] examples/eventdev: fix build with gcc 10

[ upstream commit 78de15bb586ac3d8938512db1977d83815c494f8 ]

GCC 10 defaults to -fno-common, this means a linker error will now be
reported if the same global variable is defined in more than one
compilation unit.

Fixes: 3d1b33e44ae2 ("examples/eventdev: move common data into pipeline common")

Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 examples/eventdev_pipeline/main.c            | 2 ++
 examples/eventdev_pipeline/pipeline_common.h | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/examples/eventdev_pipeline/main.c b/examples/eventdev_pipeline/main.c
index d3ff1bbe4f..d0da51b1c9 100644
--- a/examples/eventdev_pipeline/main.c
+++ b/examples/eventdev_pipeline/main.c
@@ -10,6 +10,8 @@
 
 #include "pipeline_common.h"
 
+struct fastpath_data *fdata;
+
 struct config_data cdata = {
 	.num_packets = (1L << 25), /* do ~32M packets */
 	.num_fids = 512,
diff --git a/examples/eventdev_pipeline/pipeline_common.h b/examples/eventdev_pipeline/pipeline_common.h
index 8e30393d09..c7245f7f0f 100644
--- a/examples/eventdev_pipeline/pipeline_common.h
+++ b/examples/eventdev_pipeline/pipeline_common.h
@@ -93,8 +93,8 @@ struct port_link {
 	uint8_t priority;
 };
 
-struct fastpath_data *fdata;
-struct config_data cdata;
+extern struct fastpath_data *fdata;
+extern struct config_data cdata;
 
 static __rte_always_inline void
 exchange_mac(struct rte_mbuf *m)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:19.058517299 +0100
+++ 0005-examples-eventdev-fix-build-with-gcc-10.patch	2020-05-19 13:56:18.171500955 +0100
@@ -1,14 +1,15 @@
-From 78de15bb586ac3d8938512db1977d83815c494f8 Mon Sep 17 00:00:00 2001
+From 4de659fdc0488e13b463134592fd48ef5ab45992 Mon Sep 17 00:00:00 2001
 From: Timothy Redaelli <tredaelli@redhat.com>
 Date: Wed, 5 Feb 2020 18:05:45 +0100
 Subject: [PATCH] examples/eventdev: fix build with gcc 10
 
+[ upstream commit 78de15bb586ac3d8938512db1977d83815c494f8 ]
+
 GCC 10 defaults to -fno-common, this means a linker error will now be
 reported if the same global variable is defined in more than one
 compilation unit.
 
 Fixes: 3d1b33e44ae2 ("examples/eventdev: move common data into pipeline common")
-Cc: stable@dpdk.org
 
 Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
 Acked-by: David Marchand <david.marchand@redhat.com>

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

* [dpdk-stable] patch 'examples/qos_sched: fix build with gcc 10' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (3 preceding siblings ...)
  2020-05-19 12:53 ` [dpdk-stable] patch 'examples/eventdev: " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'drivers: add crypto as dependency for event drivers' " luca.boccassi
                   ` (74 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Timothy Redaelli; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 25fe1c8b05f2dca60f95bda58ea988177964fe27 Mon Sep 17 00:00:00 2001
From: Timothy Redaelli <tredaelli@redhat.com>
Date: Wed, 5 Feb 2020 18:05:46 +0100
Subject: [PATCH] examples/qos_sched: fix build with gcc 10

[ upstream commit 345187bda58f2685e34a00c7bca917637395aad4 ]

GCC 10 defaults to -fno-common, this means a linker error will now be
reported if the same global variable is defined in more than one
compilation unit.

Fixes: be1e533238c0 ("examples/qos_sched: add TC and queue config flexibility")

Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 examples/qos_sched/cfg_file.c | 3 +++
 examples/qos_sched/main.h     | 4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/examples/qos_sched/cfg_file.c b/examples/qos_sched/cfg_file.c
index 5714c3f36d..f078e4f7de 100644
--- a/examples/qos_sched/cfg_file.c
+++ b/examples/qos_sched/cfg_file.c
@@ -20,6 +20,9 @@
  * for new entries do we add in */
 #define CFG_ALLOC_ENTRY_BATCH 16
 
+uint32_t active_queues[RTE_SCHED_QUEUES_PER_PIPE];
+uint32_t n_active_queues;
+
 int
 cfg_load_port(struct rte_cfgfile *cfg, struct rte_sched_port_params *port_params)
 {
diff --git a/examples/qos_sched/main.h b/examples/qos_sched/main.h
index baa2b3eadc..23bc418d97 100644
--- a/examples/qos_sched/main.h
+++ b/examples/qos_sched/main.h
@@ -148,8 +148,8 @@ extern struct burst_conf burst_conf;
 extern struct ring_thresh rx_thresh;
 extern struct ring_thresh tx_thresh;
 
-uint32_t active_queues[RTE_SCHED_QUEUES_PER_PIPE];
-uint32_t n_active_queues;
+extern uint32_t active_queues[RTE_SCHED_QUEUES_PER_PIPE];
+extern uint32_t n_active_queues;
 
 extern struct rte_sched_port_params port_params;
 extern struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS];
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:19.093198953 +0100
+++ 0006-examples-qos_sched-fix-build-with-gcc-10.patch	2020-05-19 13:56:18.171500955 +0100
@@ -1,14 +1,15 @@
-From 345187bda58f2685e34a00c7bca917637395aad4 Mon Sep 17 00:00:00 2001
+From 25fe1c8b05f2dca60f95bda58ea988177964fe27 Mon Sep 17 00:00:00 2001
 From: Timothy Redaelli <tredaelli@redhat.com>
 Date: Wed, 5 Feb 2020 18:05:46 +0100
 Subject: [PATCH] examples/qos_sched: fix build with gcc 10
 
+[ upstream commit 345187bda58f2685e34a00c7bca917637395aad4 ]
+
 GCC 10 defaults to -fno-common, this means a linker error will now be
 reported if the same global variable is defined in more than one
 compilation unit.
 
 Fixes: be1e533238c0 ("examples/qos_sched: add TC and queue config flexibility")
-Cc: stable@dpdk.org
 
 Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
 Acked-by: David Marchand <david.marchand@redhat.com>

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

* [dpdk-stable] patch 'drivers: add crypto as dependency for event drivers' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (4 preceding siblings ...)
  2020-05-19 12:53 ` [dpdk-stable] patch 'examples/qos_sched: " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'drivers/crypto: fix build with make 4.3' " luca.boccassi
                   ` (73 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: David Marchand, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 3425ff8896c067b8ac26f63829792356a5e4ad13 Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Thu, 5 Mar 2020 17:34:12 +0530
Subject: [PATCH] drivers: add crypto as dependency for event drivers

[ upstream commit f3dd46b8603fcd2ed43be38fec8add255c06b026 ]

Since the introduction of crypto event adapters, event drivers
have dependencies on crypto drivers.

/usr/bin/ld: cannot find -lrte_pmd_dpaa_sec
collect2: error: ld returned 1 exit status
make[9]: *** [.../mk/rte.lib.mk:100:
	librte_pmd_dpaa_event.so.20.0.2] Error 1

Fixes: b0f66a68ca74 ("event/dpaa: support crypto adapter")
Fixes: 3721c39f405a ("event/dpaa2: support crypto adapter")

Reported-by: David Marchand <david.marchand@redhat.com>
Suggested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 drivers/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/Makefile b/drivers/Makefile
index 7d5da5d9f5..cfc24b2d0b 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -19,7 +19,7 @@ DEPDIRS-common/qat := bus mempool
 DIRS-$(CONFIG_RTE_LIBRTE_COMPRESSDEV) += compress
 DEPDIRS-compress := bus mempool
 DIRS-$(CONFIG_RTE_LIBRTE_EVENTDEV) += event
-DEPDIRS-event := common bus mempool net
+DEPDIRS-event := common bus mempool net crypto
 DIRS-$(CONFIG_RTE_LIBRTE_RAWDEV) += raw
 DEPDIRS-raw := common bus mempool net event
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:19.127634790 +0100
+++ 0007-drivers-add-crypto-as-dependency-for-event-drivers.patch	2020-05-19 13:56:18.171500955 +0100
@@ -1,8 +1,10 @@
-From f3dd46b8603fcd2ed43be38fec8add255c06b026 Mon Sep 17 00:00:00 2001
+From 3425ff8896c067b8ac26f63829792356a5e4ad13 Mon Sep 17 00:00:00 2001
 From: Hemant Agrawal <hemant.agrawal@nxp.com>
 Date: Thu, 5 Mar 2020 17:34:12 +0530
 Subject: [PATCH] drivers: add crypto as dependency for event drivers
 
+[ upstream commit f3dd46b8603fcd2ed43be38fec8add255c06b026 ]
+
 Since the introduction of crypto event adapters, event drivers
 have dependencies on crypto drivers.
 
@@ -13,7 +15,6 @@
 
 Fixes: b0f66a68ca74 ("event/dpaa: support crypto adapter")
 Fixes: 3721c39f405a ("event/dpaa2: support crypto adapter")
-Cc: stable@dpdk.org
 
 Reported-by: David Marchand <david.marchand@redhat.com>
 Suggested-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -24,12 +25,12 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/Makefile b/drivers/Makefile
-index 46374ca699..c70bdf9ccf 100644
+index 7d5da5d9f5..cfc24b2d0b 100644
 --- a/drivers/Makefile
 +++ b/drivers/Makefile
-@@ -21,7 +21,7 @@ DEPDIRS-compress := bus mempool
- DIRS-$(CONFIG_RTE_LIBRTE_VHOST) += vdpa
- DEPDIRS-vdpa := common bus mempool
+@@ -19,7 +19,7 @@ DEPDIRS-common/qat := bus mempool
+ DIRS-$(CONFIG_RTE_LIBRTE_COMPRESSDEV) += compress
+ DEPDIRS-compress := bus mempool
  DIRS-$(CONFIG_RTE_LIBRTE_EVENTDEV) += event
 -DEPDIRS-event := common bus mempool net
 +DEPDIRS-event := common bus mempool net crypto

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

* [dpdk-stable] patch 'drivers/crypto: fix build with make 4.3' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (5 preceding siblings ...)
  2020-05-19 12:53 ` [dpdk-stable] patch 'drivers: add crypto as dependency for event drivers' " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'eal: fix log message print for regex' " luca.boccassi
                   ` (72 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 2a46dc595163dc3f12de1bea60b88432eeb006fe Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Thu, 27 Feb 2020 23:20:28 +0100
Subject: [PATCH] drivers/crypto: fix build with make 4.3

[ upstream commit 2a860943b847fbd44e08ef4f1ca66de759875c9e ]

In the check for the version of intel-ipsec-mb library,
there is a backslash in front of the #include.
This backslash is for escaping the hash sign parsed as
a number sign in make.

Since make-4.3, escaping is not required for the number sign.
As a consequence, it resolves now to '\#':

syntax error near unexpected token `|'
`grep -e "IMB_VERSION_STR" \#include <intel-ipsec-mb.h> | cut -d'"' -f2'
syntax error near unexpected token `|'
`grep -e "IMB_VERSION_NUM" \#include <intel-ipsec-mb.h> | cut -d' ' -f3'

The makefiles are fixed by using a variable for the hash sign,
as recommended in make-4.3 changelog:
	https://lists.gnu.org/archive/html/info-gnu/2020-01/msg00004.html

Fixes: 3067c8ce77ac ("crypto/aesni_mb: fix build with custom dependency path")
Fixes: 457b8e372975 ("crypto/aesni_gcm: check dependency version with make")
Fixes: bf6eb2c22fd1 ("crypto/kasumi: use IPsec library")
Fixes: 7c87e2d7b359 ("crypto/snow3g: use IPsec library")
Fixes: 61f7c988e39e ("crypto/zuc: use IPsec library")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 drivers/crypto/aesni_gcm/Makefile | 3 ++-
 drivers/crypto/aesni_mb/Makefile  | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/aesni_gcm/Makefile b/drivers/crypto/aesni_gcm/Makefile
index d8190a2ff4..b443167d51 100644
--- a/drivers/crypto/aesni_gcm/Makefile
+++ b/drivers/crypto/aesni_gcm/Makefile
@@ -20,7 +20,8 @@ LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
 LDLIBS += -lrte_cryptodev
 LDLIBS += -lrte_bus_vdev
 
-IMB_HDR = $(shell echo '\#include <intel-ipsec-mb.h>' | \
+H := \#
+IMB_HDR = $(shell echo '$Hinclude <intel-ipsec-mb.h>' | \
 	$(CC) -E $(EXTRA_CFLAGS) - | grep 'intel-ipsec-mb.h' | \
 	head -n1 | cut -d'"' -f2)
 
diff --git a/drivers/crypto/aesni_mb/Makefile b/drivers/crypto/aesni_mb/Makefile
index f1530e74c4..aa2e428106 100644
--- a/drivers/crypto/aesni_mb/Makefile
+++ b/drivers/crypto/aesni_mb/Makefile
@@ -20,7 +20,8 @@ LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
 LDLIBS += -lrte_cryptodev
 LDLIBS += -lrte_bus_vdev
 
-IMB_HDR = $(shell echo '\#include <intel-ipsec-mb.h>' | \
+H := \#
+IMB_HDR = $(shell echo '$Hinclude <intel-ipsec-mb.h>' | \
 	$(CC) -E $(EXTRA_CFLAGS) - | grep 'intel-ipsec-mb.h' | \
 	head -n1 | cut -d'"' -f2)
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:19.163682163 +0100
+++ 0008-drivers-crypto-fix-build-with-make-4.3.patch	2020-05-19 13:56:18.171500955 +0100
@@ -1,8 +1,10 @@
-From 2a860943b847fbd44e08ef4f1ca66de759875c9e Mon Sep 17 00:00:00 2001
+From 2a46dc595163dc3f12de1bea60b88432eeb006fe Mon Sep 17 00:00:00 2001
 From: Thomas Monjalon <thomas@monjalon.net>
 Date: Thu, 27 Feb 2020 23:20:28 +0100
 Subject: [PATCH] drivers/crypto: fix build with make 4.3
 
+[ upstream commit 2a860943b847fbd44e08ef4f1ca66de759875c9e ]
+
 In the check for the version of intel-ipsec-mb library,
 there is a backslash in front of the #include.
 This backslash is for escaping the hash sign parsed as
@@ -25,16 +27,12 @@
 Fixes: bf6eb2c22fd1 ("crypto/kasumi: use IPsec library")
 Fixes: 7c87e2d7b359 ("crypto/snow3g: use IPsec library")
 Fixes: 61f7c988e39e ("crypto/zuc: use IPsec library")
-Cc: stable@dpdk.org
 
 Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
 ---
  drivers/crypto/aesni_gcm/Makefile | 3 ++-
  drivers/crypto/aesni_mb/Makefile  | 3 ++-
- drivers/crypto/kasumi/Makefile    | 3 ++-
- drivers/crypto/snow3g/Makefile    | 3 ++-
- drivers/crypto/zuc/Makefile       | 3 ++-
- 5 files changed, 10 insertions(+), 5 deletions(-)
+ 2 files changed, 4 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/crypto/aesni_gcm/Makefile b/drivers/crypto/aesni_gcm/Makefile
 index d8190a2ff4..b443167d51 100644
@@ -57,48 +55,6 @@
 @@ -20,7 +20,8 @@ LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
  LDLIBS += -lrte_cryptodev
  LDLIBS += -lrte_bus_vdev
- 
--IMB_HDR = $(shell echo '\#include <intel-ipsec-mb.h>' | \
-+H := \#
-+IMB_HDR = $(shell echo '$Hinclude <intel-ipsec-mb.h>' | \
- 	$(CC) -E $(EXTRA_CFLAGS) - | grep 'intel-ipsec-mb.h' | \
- 	head -n1 | cut -d'"' -f2)
- 
-diff --git a/drivers/crypto/kasumi/Makefile b/drivers/crypto/kasumi/Makefile
-index c94d6bdcf9..ad19aad11c 100644
---- a/drivers/crypto/kasumi/Makefile
-+++ b/drivers/crypto/kasumi/Makefile
-@@ -20,7 +20,8 @@ LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
- LDLIBS += -lrte_cryptodev
- LDLIBS += -lrte_bus_vdev
- 
--IMB_HDR = $(shell echo '\#include <intel-ipsec-mb.h>' | \
-+H := \#
-+IMB_HDR = $(shell echo '$Hinclude <intel-ipsec-mb.h>' | \
- 	$(CC) -E $(EXTRA_CFLAGS) - | grep 'intel-ipsec-mb.h' | \
- 	head -n1 | cut -d'"' -f2)
- 
-diff --git a/drivers/crypto/snow3g/Makefile b/drivers/crypto/snow3g/Makefile
-index 438119c3d5..cbf1a77904 100644
---- a/drivers/crypto/snow3g/Makefile
-+++ b/drivers/crypto/snow3g/Makefile
-@@ -20,7 +20,8 @@ LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
- LDLIBS += -lrte_cryptodev
- LDLIBS += -lrte_bus_vdev
- 
--IMB_HDR = $(shell echo '\#include <intel-ipsec-mb.h>' | \
-+H := \#
-+IMB_HDR = $(shell echo '$Hinclude <intel-ipsec-mb.h>' | \
- 	$(CC) -E $(EXTRA_CFLAGS) - | grep 'intel-ipsec-mb.h' | \
- 	head -n1 | cut -d'"' -f2)
- 
-diff --git a/drivers/crypto/zuc/Makefile b/drivers/crypto/zuc/Makefile
-index b50883b2a7..1875344472 100644
---- a/drivers/crypto/zuc/Makefile
-+++ b/drivers/crypto/zuc/Makefile
-@@ -20,7 +20,8 @@ LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
- LDLIBS += -lrte_cryptodev
- LDLIBS += -lrte_bus_vdev
  
 -IMB_HDR = $(shell echo '\#include <intel-ipsec-mb.h>' | \
 +H := \#

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

* [dpdk-stable] patch 'eal: fix log message print for regex' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (6 preceding siblings ...)
  2020-05-19 12:53 ` [dpdk-stable] patch 'drivers/crypto: fix build with make 4.3' " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'eal/arm64: fix precise TSC' " luca.boccassi
                   ` (71 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Sunil Kumar Kori; +Cc: David Marchand, Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 40a7c85881a9710d3402102974bb0810e647f73f Mon Sep 17 00:00:00 2001
From: Sunil Kumar Kori <skori@marvell.com>
Date: Mon, 9 Mar 2020 11:47:23 +0530
Subject: [PATCH] eal: fix log message print for regex
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 2299c8d8e7319035819904e4ba99ca6e279018a6 ]

If user passes log-level eal parameter to enable log level based on regex
then in case of error message is being printed for pattern match instead of
regex. Following is the warning message thrown:

Compiling C object 'lib/76b5a35@@rte_eal@sta/librte_eal_common_eal_common_options.c.o'.
In function ‘eal_parse_log_level’,
   inlined from ‘eal_parse_common_option’ at ../lib/librte_eal/common/eal_common_options.c:1418:7:
../lib/librte_eal/common/eal_common_options.c:1053:4: warning: ‘%s’ directive argument is null [-Wformat-overflow=]
 1053 |    fprintf(stderr, "cannot set log level %s,%d\n",
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1054 |     pattern, priority);
      |     ~~~~~~~~~~~~~~~~~~

Fixes: 7f0bb634a140 ("log: add ability to match log type with globbing")

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
---
 lib/librte_eal/common/eal_common_options.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
index a7f9c5f9bd..f791e9671d 100644
--- a/lib/librte_eal/common/eal_common_options.c
+++ b/lib/librte_eal/common/eal_common_options.c
@@ -1039,7 +1039,7 @@ eal_parse_log_level(const char *arg)
 	if (regex) {
 		if (rte_log_set_level_regexp(regex, priority) < 0) {
 			fprintf(stderr, "cannot set log level %s,%d\n",
-				pattern, priority);
+				regex, priority);
 			goto fail;
 		}
 		if (rte_log_save_regexp(regex, priority) < 0)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:19.199442978 +0100
+++ 0009-eal-fix-log-message-print-for-regex.patch	2020-05-19 13:56:18.175501026 +0100
@@ -1,4 +1,4 @@
-From 2299c8d8e7319035819904e4ba99ca6e279018a6 Mon Sep 17 00:00:00 2001
+From 40a7c85881a9710d3402102974bb0810e647f73f Mon Sep 17 00:00:00 2001
 From: Sunil Kumar Kori <skori@marvell.com>
 Date: Mon, 9 Mar 2020 11:47:23 +0530
 Subject: [PATCH] eal: fix log message print for regex
@@ -6,6 +6,8 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit 2299c8d8e7319035819904e4ba99ca6e279018a6 ]
+
 If user passes log-level eal parameter to enable log level based on regex
 then in case of error message is being printed for pattern match instead of
 regex. Following is the warning message thrown:
@@ -20,7 +22,6 @@
       |     ~~~~~~~~~~~~~~~~~~
 
 Fixes: 7f0bb634a140 ("log: add ability to match log type with globbing")
-Cc: stable@dpdk.org
 
 Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
 Acked-by: David Marchand <david.marchand@redhat.com>
@@ -30,10 +31,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
-index 75974dd5ba..525e51e7de 100644
+index a7f9c5f9bd..f791e9671d 100644
 --- a/lib/librte_eal/common/eal_common_options.c
 +++ b/lib/librte_eal/common/eal_common_options.c
-@@ -1046,7 +1046,7 @@ eal_parse_log_level(const char *arg)
+@@ -1039,7 +1039,7 @@ eal_parse_log_level(const char *arg)
  	if (regex) {
  		if (rte_log_set_level_regexp(regex, priority) < 0) {
  			fprintf(stderr, "cannot set log level %s,%d\n",

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

* [dpdk-stable] patch 'eal/arm64: fix precise TSC' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (7 preceding siblings ...)
  2020-05-19 12:53 ` [dpdk-stable] patch 'eal: fix log message print for regex' " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'mem: mark pages as not accessed when reserving VA' " luca.boccassi
                   ` (70 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Haifeng Lin; +Cc: Gavin Hu, Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From bcf4069ff25cae1c135ed08af5db5bb4c2d4db4e Mon Sep 17 00:00:00 2001
From: Haifeng Lin <haifeng.lin@huawei.com>
Date: Thu, 12 Mar 2020 01:08:33 +0000
Subject: [PATCH] eal/arm64: fix precise TSC

[ upstream commit 754b6166f522f3fab2c6dd7949c9d1180aa1c7a9 ]

In order to get more accurate the cntvct_el0 reading,
SW must invoke isb.

Fixes: ccad39ea0712 ("eal/arm: add cpu cycle operations for ARMv8")

Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Haifeng Lin <haifeng.lin@huawei.com>
---
 lib/librte_eal/common/include/arch/arm/rte_cycles_64.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/common/include/arch/arm/rte_cycles_64.h b/lib/librte_eal/common/include/arch/arm/rte_cycles_64.h
index 68e7c73384..da557b6a10 100644
--- a/lib/librte_eal/common/include/arch/arm/rte_cycles_64.h
+++ b/lib/librte_eal/common/include/arch/arm/rte_cycles_64.h
@@ -62,7 +62,7 @@ rte_rdtsc(void)
 static inline uint64_t
 rte_rdtsc_precise(void)
 {
-	rte_mb();
+	asm volatile("isb" : : : "memory");
 	return rte_rdtsc();
 }
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:19.239156381 +0100
+++ 0010-eal-arm64-fix-precise-TSC.patch	2020-05-19 13:56:18.175501026 +0100
@@ -1,13 +1,14 @@
-From 754b6166f522f3fab2c6dd7949c9d1180aa1c7a9 Mon Sep 17 00:00:00 2001
+From bcf4069ff25cae1c135ed08af5db5bb4c2d4db4e Mon Sep 17 00:00:00 2001
 From: Haifeng Lin <haifeng.lin@huawei.com>
 Date: Thu, 12 Mar 2020 01:08:33 +0000
 Subject: [PATCH] eal/arm64: fix precise TSC
 
+[ upstream commit 754b6166f522f3fab2c6dd7949c9d1180aa1c7a9 ]
+
 In order to get more accurate the cntvct_el0 reading,
 SW must invoke isb.
 
 Fixes: ccad39ea0712 ("eal/arm: add cpu cycle operations for ARMv8")
-Cc: stable@dpdk.org
 
 Reviewed-by: Gavin Hu <gavin.hu@arm.com>
 Acked-by: Jerin Jacob <jerinj@marvell.com>

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

* [dpdk-stable] patch 'mem: mark pages as not accessed when reserving VA' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (8 preceding siblings ...)
  2020-05-19 12:53 ` [dpdk-stable] patch 'eal/arm64: fix precise TSC' " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-06-09 13:45   ` Kevin Traynor
  2020-05-19 12:53 ` [dpdk-stable] patch 'service: fix crash on exit' " luca.boccassi
                   ` (69 subsequent siblings)
  79 siblings, 1 reply; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: David Marchand
  Cc: Andrea Arcangeli, Maxime Coquelin, Aaron Conole, Anatoly Burakov,
	dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From d0e456e9b1af8594ed22382e33bc6e1d5acec994 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Mon, 9 Mar 2020 15:54:42 +0100
Subject: [PATCH] mem: mark pages as not accessed when reserving VA

[ upstream commit 8a4baf06c17a806696fb10aba36fce7471983028 ]

When the memory allocator reserves virtual addresses, it still does not
know what they will be used for.
Besides, huge areas are reserved for memory hotplug in multiprocess
setups. But most of the pages are unused in the whole life of the
processes.

Change protection mode to PROT_NONE when only reserving VA.
The memory allocator already switches to the right mode when making use
of it.

It also has the nice effect of getting those pages skipped by the kernel
when calling mlockall() or when a coredump gets generated.

Suggested-by: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/common/eal_common_memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/common/eal_common_memory.c b/lib/librte_eal/common/eal_common_memory.c
index 4a9cc1f19a..cc7d54e0c7 100644
--- a/lib/librte_eal/common/eal_common_memory.c
+++ b/lib/librte_eal/common/eal_common_memory.c
@@ -97,7 +97,7 @@ eal_get_virtual_area(void *requested_addr, size_t *size,
 			return NULL;
 		}
 
-		mapped_addr = mmap(requested_addr, (size_t)map_sz, PROT_READ,
+		mapped_addr = mmap(requested_addr, (size_t)map_sz, PROT_NONE,
 				mmap_flags, -1, 0);
 		if (mapped_addr == MAP_FAILED && allow_shrink)
 			*size -= page_sz;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:19.274078176 +0100
+++ 0011-mem-mark-pages-as-not-accessed-when-reserving-VA.patch	2020-05-19 13:56:18.175501026 +0100
@@ -1,8 +1,10 @@
-From 8a4baf06c17a806696fb10aba36fce7471983028 Mon Sep 17 00:00:00 2001
+From d0e456e9b1af8594ed22382e33bc6e1d5acec994 Mon Sep 17 00:00:00 2001
 From: David Marchand <david.marchand@redhat.com>
 Date: Mon, 9 Mar 2020 15:54:42 +0100
 Subject: [PATCH] mem: mark pages as not accessed when reserving VA
 
+[ upstream commit 8a4baf06c17a806696fb10aba36fce7471983028 ]
+
 When the memory allocator reserves virtual addresses, it still does not
 know what they will be used for.
 Besides, huge areas are reserved for memory hotplug in multiprocess
@@ -16,8 +18,6 @@
 It also has the nice effect of getting those pages skipped by the kernel
 when calling mlockall() or when a coredump gets generated.
 
-Cc: stable@dpdk.org
-
 Suggested-by: Andrea Arcangeli <aarcange@redhat.com>
 Signed-off-by: David Marchand <david.marchand@redhat.com>
 Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

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

* [dpdk-stable] patch 'service: fix crash on exit' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (9 preceding siblings ...)
  2020-05-19 12:53 ` [dpdk-stable] patch 'mem: mark pages as not accessed when reserving VA' " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'telemetry: fix port stats retrieval' " luca.boccassi
                   ` (68 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Harry van Haaren; +Cc: David Marchand, Aaron Conole, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From c20055f4716d024b388c5914272192c271747e31 Mon Sep 17 00:00:00 2001
From: Harry van Haaren <harry.van.haaren@intel.com>
Date: Wed, 11 Mar 2020 14:39:27 +0000
Subject: [PATCH] service: fix crash on exit

[ upstream commit 33666b448f15687ceaf61eac405d945391fe7066 ]

This commit releases all service cores from their role,
returning them to ROLE_RTE on rte_service_finalize().

This fixes an issue relating to the service cores causing
a race-condition on rte_eal_cleanup(), where the service core
could still be executing while the main thread has already
free-d the service memory, leading to a segfault.

Fixes: da23f0aa87d8 ("service: fix memory leak with new function")

Reported-by: David Marchand <david.marchand@redhat.com>
Reported-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Aaron Conole <aconole@redhat.com>
---
 lib/librte_eal/common/rte_service.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c
index 7e537b8cd2..b0b78baabd 100644
--- a/lib/librte_eal/common/rte_service.c
+++ b/lib/librte_eal/common/rte_service.c
@@ -122,6 +122,9 @@ rte_service_finalize(void)
 	if (!rte_service_library_initialized)
 		return;
 
+	rte_service_lcore_reset_all();
+	rte_eal_mp_wait_lcore();
+
 	rte_free(rte_services);
 	rte_free(lcore_states);
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:19.311858395 +0100
+++ 0012-service-fix-crash-on-exit.patch	2020-05-19 13:56:18.175501026 +0100
@@ -1,8 +1,10 @@
-From 33666b448f15687ceaf61eac405d945391fe7066 Mon Sep 17 00:00:00 2001
+From c20055f4716d024b388c5914272192c271747e31 Mon Sep 17 00:00:00 2001
 From: Harry van Haaren <harry.van.haaren@intel.com>
 Date: Wed, 11 Mar 2020 14:39:27 +0000
 Subject: [PATCH] service: fix crash on exit
 
+[ upstream commit 33666b448f15687ceaf61eac405d945391fe7066 ]
+
 This commit releases all service cores from their role,
 returning them to ROLE_RTE on rte_service_finalize().
 
@@ -12,7 +14,6 @@
 free-d the service memory, leading to a segfault.
 
 Fixes: da23f0aa87d8 ("service: fix memory leak with new function")
-Cc: stable@dpdk.org
 
 Reported-by: David Marchand <david.marchand@redhat.com>
 Reported-by: Aaron Conole <aconole@redhat.com>

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

* [dpdk-stable] patch 'telemetry: fix port stats retrieval' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (10 preceding siblings ...)
  2020-05-19 12:53 ` [dpdk-stable] patch 'service: fix crash on exit' " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'pci: remove unneeded includes in public header file' " luca.boccassi
                   ` (67 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Ciara Power; +Cc: Kevin Laatz, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 9ca664d8be044c085a3aacd34aa177818ba5a400 Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Thu, 27 Feb 2020 17:04:56 +0000
Subject: [PATCH] telemetry: fix port stats retrieval

[ upstream commit 341a793eb193a104c571172e724a98b2552c55cf ]

The ep struct is used to track what type of stats are required by the
client. For PORT_STATS type, it contains the lists of port and metric
ids to query, and the number of ids in each list.

The ep struct has values set (num of port and metric ids) when a request
for port stats values by name is received. However, after this value
assignment, the struct is reset to all 0 values, meaning the number of
port and metric ids required now both show as 0, and the client will not
receive the requested data in response. To fix this issue, the memset
call is now moved above the ep struct value assignment.

Fixes: 4080e46c8078 ("telemetry: support global metrics")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Reviewed-by: Kevin Laatz <kevin.laatz@intel.com>
---
 lib/librte_telemetry/rte_telemetry_parser.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_telemetry/rte_telemetry_parser.c b/lib/librte_telemetry/rte_telemetry_parser.c
index 9601323970..e8c269e85e 100644
--- a/lib/librte_telemetry/rte_telemetry_parser.c
+++ b/lib/librte_telemetry/rte_telemetry_parser.c
@@ -456,9 +456,9 @@ rte_telemetry_command_ports_stats_values_by_name(struct telemetry_impl
 	size_t index;
 	json_t *value;
 
+	memset(&ep, 0, sizeof(ep));
 	ep.pp.num_port_ids = json_array_size(port_ids_json);
 	ep.pp.num_metric_ids = num_stat_names;
-	memset(&ep, 0, sizeof(ep));
 	if (telemetry == NULL) {
 		TELEMETRY_LOG_ERR("Invalid telemetry argument");
 		return -1;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:19.347688482 +0100
+++ 0013-telemetry-fix-port-stats-retrieval.patch	2020-05-19 13:56:18.175501026 +0100
@@ -1,8 +1,10 @@
-From 341a793eb193a104c571172e724a98b2552c55cf Mon Sep 17 00:00:00 2001
+From 9ca664d8be044c085a3aacd34aa177818ba5a400 Mon Sep 17 00:00:00 2001
 From: Ciara Power <ciara.power@intel.com>
 Date: Thu, 27 Feb 2020 17:04:56 +0000
 Subject: [PATCH] telemetry: fix port stats retrieval
 
+[ upstream commit 341a793eb193a104c571172e724a98b2552c55cf ]
+
 The ep struct is used to track what type of stats are required by the
 client. For PORT_STATS type, it contains the lists of port and metric
 ids to query, and the number of ids in each list.
@@ -15,7 +17,6 @@
 call is now moved above the ep struct value assignment.
 
 Fixes: 4080e46c8078 ("telemetry: support global metrics")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ciara Power <ciara.power@intel.com>
 Reviewed-by: Kevin Laatz <kevin.laatz@intel.com>

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

* [dpdk-stable] patch 'pci: remove unneeded includes in public header file' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (11 preceding siblings ...)
  2020-05-19 12:53 ` [dpdk-stable] patch 'telemetry: fix port stats retrieval' " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'pci: fix build on FreeBSD' " luca.boccassi
                   ` (66 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Thomas Monjalon, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 027e022a183783ac6d37df4dab9a82f32fc4744b Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Mon, 16 Mar 2020 11:29:51 +0000
Subject: [PATCH] pci: remove unneeded includes in public header file

[ upstream commit 0dcba52562873f5efa437b61821be7c1bd459a34 ]

The rte_pci.h file includes more header files than are actually needed,
which means that all users of it also include those headers. This patch
removes the unneeded headers - adding them elsewhere where other components
were requiring them but not including them directly.

Fixes: c752998b5e2e ("pci: introduce library and driver")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
---
 drivers/bus/ifpga/rte_bus_ifpga.h | 1 +
 lib/librte_pci/rte_pci.h          | 6 ------
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/bus/ifpga/rte_bus_ifpga.h b/drivers/bus/ifpga/rte_bus_ifpga.h
index 88a6289642..a6eeaaf568 100644
--- a/drivers/bus/ifpga/rte_bus_ifpga.h
+++ b/drivers/bus/ifpga/rte_bus_ifpga.h
@@ -17,6 +17,7 @@ extern "C" {
 
 #include <rte_bus.h>
 #include <rte_pci.h>
+#include <rte_interrupts.h>
 #include <rte_spinlock.h>
 
 /** Name of Intel FPGA Bus */
diff --git a/lib/librte_pci/rte_pci.h b/lib/librte_pci/rte_pci.h
index c87891405c..c591af010d 100644
--- a/lib/librte_pci/rte_pci.h
+++ b/lib/librte_pci/rte_pci.h
@@ -16,17 +16,11 @@
 extern "C" {
 #endif
 
-#include <stdio.h>
 #include <stdlib.h>
 #include <limits.h>
-#include <errno.h>
 #include <sys/queue.h>
-#include <stdint.h>
 #include <inttypes.h>
 
-#include <rte_debug.h>
-#include <rte_interrupts.h>
-
 /** Formatting string for PCI device identifier: Ex: 0000:00:01.0 */
 #define PCI_PRI_FMT "%.4" PRIx16 ":%.2" PRIx8 ":%.2" PRIx8 ".%" PRIx8
 #define PCI_PRI_STR_SIZE sizeof("XXXXXXXX:XX:XX.X")
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:19.384063851 +0100
+++ 0014-pci-remove-unneeded-includes-in-public-header-file.patch	2020-05-19 13:56:18.179501099 +0100
@@ -1,23 +1,23 @@
-From 0dcba52562873f5efa437b61821be7c1bd459a34 Mon Sep 17 00:00:00 2001
+From 027e022a183783ac6d37df4dab9a82f32fc4744b Mon Sep 17 00:00:00 2001
 From: Bruce Richardson <bruce.richardson@intel.com>
 Date: Mon, 16 Mar 2020 11:29:51 +0000
 Subject: [PATCH] pci: remove unneeded includes in public header file
 
+[ upstream commit 0dcba52562873f5efa437b61821be7c1bd459a34 ]
+
 The rte_pci.h file includes more header files than are actually needed,
 which means that all users of it also include those headers. This patch
 removes the unneeded headers - adding them elsewhere where other components
 were requiring them but not including them directly.
 
 Fixes: c752998b5e2e ("pci: introduce library and driver")
-Cc: stable@dpdk.org
 
 Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
 Acked-by: Thomas Monjalon <thomas@monjalon.net>
 ---
  drivers/bus/ifpga/rte_bus_ifpga.h | 1 +
- drivers/common/mlx5/mlx5_common.h | 1 +
  lib/librte_pci/rte_pci.h          | 6 ------
- 3 files changed, 2 insertions(+), 6 deletions(-)
+ 2 files changed, 1 insertion(+), 6 deletions(-)
 
 diff --git a/drivers/bus/ifpga/rte_bus_ifpga.h b/drivers/bus/ifpga/rte_bus_ifpga.h
 index 88a6289642..a6eeaaf568 100644
@@ -31,18 +31,6 @@
  #include <rte_spinlock.h>
  
  /** Name of Intel FPGA Bus */
-diff --git a/drivers/common/mlx5/mlx5_common.h b/drivers/common/mlx5/mlx5_common.h
-index 961c606340..16de1b3973 100644
---- a/drivers/common/mlx5/mlx5_common.h
-+++ b/drivers/common/mlx5/mlx5_common.h
-@@ -8,6 +8,7 @@
- #include <stdio.h>
- 
- #include <rte_pci.h>
-+#include <rte_debug.h>
- #include <rte_atomic.h>
- #include <rte_log.h>
- #include <rte_kvargs.h>
 diff --git a/lib/librte_pci/rte_pci.h b/lib/librte_pci/rte_pci.h
 index c87891405c..c591af010d 100644
 --- a/lib/librte_pci/rte_pci.h

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

* [dpdk-stable] patch 'pci: fix build on FreeBSD' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (12 preceding siblings ...)
  2020-05-19 12:53 ` [dpdk-stable] patch 'pci: remove unneeded includes in public header file' " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'pci: fix build on ppc' " luca.boccassi
                   ` (65 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 5a99c0d9949a4c8488f872dbba27e777aa83d82c Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Mon, 16 Mar 2020 16:37:05 +0000
Subject: [PATCH] pci: fix build on FreeBSD

[ upstream commit 034e7d87baab01631aeb260bb33682aa9c9ce674 ]

When removing the extra headers from rte_pci.h stdlib should have been
removed instead of stdio, since off_t is missing for BSD builds when just
including stdlib.h

Fixes: 0dcba5256287 ("pci: remove unneeded includes in public header file")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_pci/rte_pci.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_pci/rte_pci.h b/lib/librte_pci/rte_pci.h
index c591af010d..4087771c1e 100644
--- a/lib/librte_pci/rte_pci.h
+++ b/lib/librte_pci/rte_pci.h
@@ -16,7 +16,7 @@
 extern "C" {
 #endif
 
-#include <stdlib.h>
+#include <stdio.h>
 #include <limits.h>
 #include <sys/queue.h>
 #include <inttypes.h>
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:19.418988176 +0100
+++ 0015-pci-fix-build-on-FreeBSD.patch	2020-05-19 13:56:18.179501099 +0100
@@ -1,14 +1,15 @@
-From 034e7d87baab01631aeb260bb33682aa9c9ce674 Mon Sep 17 00:00:00 2001
+From 5a99c0d9949a4c8488f872dbba27e777aa83d82c Mon Sep 17 00:00:00 2001
 From: Bruce Richardson <bruce.richardson@intel.com>
 Date: Mon, 16 Mar 2020 16:37:05 +0000
 Subject: [PATCH] pci: fix build on FreeBSD
 
+[ upstream commit 034e7d87baab01631aeb260bb33682aa9c9ce674 ]
+
 When removing the extra headers from rte_pci.h stdlib should have been
 removed instead of stdio, since off_t is missing for BSD builds when just
 including stdlib.h
 
 Fixes: 0dcba5256287 ("pci: remove unneeded includes in public header file")
-Cc: stable@dpdk.org
 
 Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
 ---

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

* [dpdk-stable] patch 'pci: fix build on ppc' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (13 preceding siblings ...)
  2020-05-19 12:53 ` [dpdk-stable] patch 'pci: fix build on FreeBSD' " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'build: fix linker warnings with clang on Windows' " luca.boccassi
                   ` (64 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: David Christensen; +Cc: David Wilder, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 3262e4181cff59157e370231b9d25fe9e5689592 Mon Sep 17 00:00:00 2001
From: David Christensen <drc@linux.vnet.ibm.com>
Date: Mon, 16 Mar 2020 13:47:49 -0700
Subject: [PATCH] pci: fix build on ppc

[ upstream commit 61669ecb921fff821db11d81557fa0449a7eb79c ]

The include file rte_debug.h is pulled into x86 builds through the
following callchain:

lib/librte_eal/common/include/generic/rte_cycles.h:17,
lib/librte_eal/common/include/arch/x86/rte_cycles.h:13,
lib/librte_eal/common/include/arch/x86/rte_spinlock.h:18,
lib/librte_eal/common/include/arch/x86/rte_rwlock.h:13,

The PPC specific version of the same callchain does not include
rte_debug.h.  Add rte_debug.h back into the C files that require it.

Fixes: 0dcba5256287 ("pci: remove unneeded includes in public header file")

Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
Tested-by: David Wilder <dwilder@us.ibm.com>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 drivers/bus/ifpga/ifpga_bus.c | 1 +
 lib/librte_pci/rte_pci.c      | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/bus/ifpga/ifpga_bus.c b/drivers/bus/ifpga/ifpga_bus.c
index dfd6b1fba9..addbc3e86b 100644
--- a/drivers/bus/ifpga/ifpga_bus.c
+++ b/drivers/bus/ifpga/ifpga_bus.c
@@ -24,6 +24,7 @@
 #include <rte_kvargs.h>
 #include <rte_alarm.h>
 #include <rte_string_fns.h>
+#include <rte_debug.h>
 
 #include "rte_rawdev.h"
 #include "rte_rawdev_pmd.h"
diff --git a/lib/librte_pci/rte_pci.c b/lib/librte_pci/rte_pci.c
index a753cf3eca..d1ab6b414d 100644
--- a/lib/librte_pci/rte_pci.c
+++ b/lib/librte_pci/rte_pci.c
@@ -20,6 +20,7 @@
 #include <rte_eal.h>
 #include <rte_string_fns.h>
 #include <rte_common.h>
+#include <rte_debug.h>
 
 #include "rte_pci.h"
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:19.455379016 +0100
+++ 0016-pci-fix-build-on-ppc.patch	2020-05-19 13:56:18.179501099 +0100
@@ -1,8 +1,10 @@
-From 61669ecb921fff821db11d81557fa0449a7eb79c Mon Sep 17 00:00:00 2001
+From 3262e4181cff59157e370231b9d25fe9e5689592 Mon Sep 17 00:00:00 2001
 From: David Christensen <drc@linux.vnet.ibm.com>
 Date: Mon, 16 Mar 2020 13:47:49 -0700
 Subject: [PATCH] pci: fix build on ppc
 
+[ upstream commit 61669ecb921fff821db11d81557fa0449a7eb79c ]
+
 The include file rte_debug.h is pulled into x86 builds through the
 following callchain:
 
@@ -15,7 +17,6 @@
 rte_debug.h.  Add rte_debug.h back into the C files that require it.
 
 Fixes: 0dcba5256287 ("pci: remove unneeded includes in public header file")
-Cc: stable@dpdk.org
 
 Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
 Tested-by: David Wilder <dwilder@us.ibm.com>

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

* [dpdk-stable] patch 'build: fix linker warnings with clang on Windows' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (14 preceding siblings ...)
  2020-05-19 12:53 ` [dpdk-stable] patch 'pci: fix build on ppc' " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/octeontx2: fix link information for loopback port' " luca.boccassi
                   ` (63 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Dmitry Kozlyuk; +Cc: William Tu, Pallavi Kadam, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From c2e90f337dc9bdefdc15b76b32c070ce068c25c1 Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Date: Thu, 27 Feb 2020 07:25:37 +0300
Subject: [PATCH] build: fix linker warnings with clang on Windows

[ upstream commit 716f9bb42ecb6df640d4dffebe1ec55aaab29ba0 ]

Clang on Windows doesn't use pthread for now, while MinGW does. Removing
`-pthread` option with MS linker fixes the following warning:

    clang: warning: argument unused during compilation: '-pthread'
        [-Wunused-command-line-argument]

Option `--no-as-needed` is meaningless for PE output. Disabling it on
Windows fixes the following warning:

    LINK : warning LNK4044: unrecognized option '/-no-as-needed'; ignored

Fixes: 98edcbb5a ("eal/windows: introduce Windows support")

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Tested-by: William Tu <u9012063@gmail.com>
Tested-by: Pallavi Kadam <pallavi.kadam@intel.com>
Acked-by: Pallavi Kadam <pallavi.kadam@intel.com>
---
 config/meson.build | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/config/meson.build b/config/meson.build
index 41747012df..cdbe724754 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -98,11 +98,15 @@ dpdk_conf.set('RTE_TOOLCHAIN_' + toolchain.to_upper(), 1)
 
 dpdk_conf.set('RTE_ARCH_64', cc.sizeof('void *') == 8)
 
-add_project_link_arguments('-Wl,--no-as-needed', language: 'c')
+if not is_windows
+	add_project_link_arguments('-Wl,--no-as-needed', language: 'c')
+endif
 
-# use pthreads
-add_project_link_arguments('-pthread', language: 'c')
-dpdk_extra_ldflags += '-pthread'
+# use pthreads if available for the platform
+if not is_ms_linker
+	add_project_link_arguments('-pthread', language: 'c')
+	dpdk_extra_ldflags += '-pthread'
+endif
 
 # on some OS, maths functions are in a separate library
 if cc.find_library('m', required : false).found()
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:19.492440217 +0100
+++ 0017-build-fix-linker-warnings-with-clang-on-Windows.patch	2020-05-19 13:56:18.179501099 +0100
@@ -1,8 +1,10 @@
-From 716f9bb42ecb6df640d4dffebe1ec55aaab29ba0 Mon Sep 17 00:00:00 2001
+From c2e90f337dc9bdefdc15b76b32c070ce068c25c1 Mon Sep 17 00:00:00 2001
 From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
 Date: Thu, 27 Feb 2020 07:25:37 +0300
 Subject: [PATCH] build: fix linker warnings with clang on Windows
 
+[ upstream commit 716f9bb42ecb6df640d4dffebe1ec55aaab29ba0 ]
+
 Clang on Windows doesn't use pthread for now, while MinGW does. Removing
 `-pthread` option with MS linker fixes the following warning:
 
@@ -25,10 +27,10 @@
  1 file changed, 8 insertions(+), 4 deletions(-)
 
 diff --git a/config/meson.build b/config/meson.build
-index 68aeb84703..abedd76f23 100644
+index 41747012df..cdbe724754 100644
 --- a/config/meson.build
 +++ b/config/meson.build
-@@ -112,11 +112,15 @@ dpdk_conf.set('RTE_TOOLCHAIN_' + toolchain.to_upper(), 1)
+@@ -98,11 +98,15 @@ dpdk_conf.set('RTE_TOOLCHAIN_' + toolchain.to_upper(), 1)
  
  dpdk_conf.set('RTE_ARCH_64', cc.sizeof('void *') == 8)
  

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

* [dpdk-stable] patch 'net/octeontx2: fix link information for loopback port' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (15 preceding siblings ...)
  2020-05-19 12:53 ` [dpdk-stable] patch 'build: fix linker warnings with clang on Windows' " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/i40e: relax barrier in Tx' " luca.boccassi
                   ` (62 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Ashish Gupta; +Cc: Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 255066602833e35bc6552011385389d24990a82f Mon Sep 17 00:00:00 2001
From: Ashish Gupta <ashishg@marvell.com>
Date: Thu, 6 Feb 2020 18:00:58 +0530
Subject: [PATCH] net/octeontx2: fix link information for loopback port

[ upstream commit 7b1b04079174e8a6843fcb53d1de792bf09fdf03 ]

Loopback devices are exposed as ethdev device in octeontx2.
This patch fixes the link information for loopback ports.

Fixes: 38f566280abb ("net/octeontx2: add link stats operations")

Signed-off-by: Ashish Gupta <ashishg@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 drivers/net/octeontx2/otx2_link.c | 53 +++++++++++++++++++++++--------
 1 file changed, 39 insertions(+), 14 deletions(-)

diff --git a/drivers/net/octeontx2/otx2_link.c b/drivers/net/octeontx2/otx2_link.c
index f5679b06e7..4128f56d90 100644
--- a/drivers/net/octeontx2/otx2_link.c
+++ b/drivers/net/octeontx2/otx2_link.c
@@ -82,31 +82,56 @@ otx2_eth_dev_link_status_update(struct otx2_dev *dev,
 	_rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 }
 
-int
-otx2_nix_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete)
+static int
+lbk_link_update(struct rte_eth_link *link)
+{
+	link->link_status = ETH_LINK_UP;
+	link->link_speed = ETH_SPEED_NUM_100G;
+	link->link_autoneg = ETH_LINK_FIXED;
+	link->link_duplex = ETH_LINK_FULL_DUPLEX;
+	return 0;
+}
+
+static int
+cgx_link_update(struct otx2_eth_dev *dev, struct rte_eth_link *link)
 {
-	struct otx2_eth_dev *dev = otx2_eth_pmd_priv(eth_dev);
 	struct otx2_mbox *mbox = dev->mbox;
 	struct cgx_link_info_msg *rsp;
-	struct rte_eth_link link;
 	int rc;
-
-	RTE_SET_USED(wait_to_complete);
-
-	if (otx2_dev_is_lbk(dev) || otx2_dev_is_sdp(dev))
-		return 0;
-
 	otx2_mbox_alloc_msg_cgx_get_linkinfo(mbox);
 	rc = otx2_mbox_process_msg(mbox, (void *)&rsp);
 	if (rc)
 		return rc;
 
-	link.link_status = rsp->link_info.link_up;
-	link.link_speed = rsp->link_info.speed;
-	link.link_autoneg = ETH_LINK_AUTONEG;
+	link->link_status = rsp->link_info.link_up;
+	link->link_speed = rsp->link_info.speed;
+	link->link_autoneg = ETH_LINK_AUTONEG;
 
 	if (rsp->link_info.full_duplex)
-		link.link_duplex = rsp->link_info.full_duplex;
+		link->link_duplex = rsp->link_info.full_duplex;
+	return 0;
+}
+
+int
+otx2_nix_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete)
+{
+	struct otx2_eth_dev *dev = otx2_eth_pmd_priv(eth_dev);
+	struct rte_eth_link link;
+	int rc;
+
+	RTE_SET_USED(wait_to_complete);
+	memset(&link, 0, sizeof(struct rte_eth_link));
+
+	if (otx2_dev_is_sdp(dev))
+		return 0;
+
+	if (otx2_dev_is_lbk(dev))
+		rc = lbk_link_update(&link);
+	else
+		rc = cgx_link_update(dev, &link);
+
+	if (rc)
+		return rc;
 
 	return rte_eth_linkstatus_set(eth_dev, &link);
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:19.527896801 +0100
+++ 0018-net-octeontx2-fix-link-information-for-loopback-port.patch	2020-05-19 13:56:18.179501099 +0100
@@ -1,13 +1,14 @@
-From 7b1b04079174e8a6843fcb53d1de792bf09fdf03 Mon Sep 17 00:00:00 2001
+From 255066602833e35bc6552011385389d24990a82f Mon Sep 17 00:00:00 2001
 From: Ashish Gupta <ashishg@marvell.com>
 Date: Thu, 6 Feb 2020 18:00:58 +0530
 Subject: [PATCH] net/octeontx2: fix link information for loopback port
 
+[ upstream commit 7b1b04079174e8a6843fcb53d1de792bf09fdf03 ]
+
 Loopback devices are exposed as ethdev device in octeontx2.
 This patch fixes the link information for loopback ports.
 
 Fixes: 38f566280abb ("net/octeontx2: add link stats operations")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ashish Gupta <ashishg@marvell.com>
 Acked-by: Jerin Jacob <jerinj@marvell.com>

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

* [dpdk-stable] patch 'net/i40e: relax barrier in Tx' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (16 preceding siblings ...)
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/octeontx2: fix link information for loopback port' " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/mlx5: fix VLAN PCP item calculation' " luca.boccassi
                   ` (61 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Gavin Hu; +Cc: Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 3e387d591e7b421397349d772ff55cf52ebe9c0b Mon Sep 17 00:00:00 2001
From: Gavin Hu <gavin.hu@arm.com>
Date: Wed, 12 Feb 2020 13:56:21 +0800
Subject: [PATCH] net/i40e: relax barrier in Tx

[ upstream commit bade47a7570b99cf77e71343cf43efed66ab8307 ]

To keep ordering of mixed accesses, rte_cio is sufficient.
The rte_io barrier inside the I40E_PCI_REG_WRITE is overkill.[1]

[1] http://inbox.dpdk.org/dev/CALBAE1M-ezVWCjqCZDBw+MMDEC4O9
qf0Kpn89EMdGDajepKoZQ@mail.gmail.com

Fixes: 4861cde46116 ("i40e: new poll mode driver")

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
---
 drivers/net/i40e/i40e_rxtx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 0ae47b807b..9a1eab4653 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -1248,7 +1248,8 @@ end_of_tx:
 		   (unsigned) txq->port_id, (unsigned) txq->queue_id,
 		   (unsigned) tx_id, (unsigned) nb_tx);
 
-	I40E_PCI_REG_WRITE(txq->qtx_tail, tx_id);
+	rte_cio_wmb();
+	I40E_PCI_REG_WRITE_RELAXED(txq->qtx_tail, tx_id);
 	txq->tx_tail = tx_id;
 
 	return nb_tx;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:19.563316099 +0100
+++ 0019-net-i40e-relax-barrier-in-Tx.patch	2020-05-19 13:56:18.183501171 +0100
@@ -1,8 +1,10 @@
-From bade47a7570b99cf77e71343cf43efed66ab8307 Mon Sep 17 00:00:00 2001
+From 3e387d591e7b421397349d772ff55cf52ebe9c0b Mon Sep 17 00:00:00 2001
 From: Gavin Hu <gavin.hu@arm.com>
 Date: Wed, 12 Feb 2020 13:56:21 +0800
 Subject: [PATCH] net/i40e: relax barrier in Tx
 
+[ upstream commit bade47a7570b99cf77e71343cf43efed66ab8307 ]
+
 To keep ordering of mixed accesses, rte_cio is sufficient.
 The rte_io barrier inside the I40E_PCI_REG_WRITE is overkill.[1]
 
@@ -10,7 +12,6 @@
 qf0Kpn89EMdGDajepKoZQ@mail.gmail.com
 
 Fixes: 4861cde46116 ("i40e: new poll mode driver")
-Cc: stable@dpdk.org
 
 Signed-off-by: Gavin Hu <gavin.hu@arm.com>
 Reviewed-by: Jerin Jacob <jerinj@marvell.com>
@@ -19,7 +20,7 @@
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
-index f6d23c9fb6..fdc1e00355 100644
+index 0ae47b807b..9a1eab4653 100644
 --- a/drivers/net/i40e/i40e_rxtx.c
 +++ b/drivers/net/i40e/i40e_rxtx.c
 @@ -1248,7 +1248,8 @@ end_of_tx:

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

* [dpdk-stable] patch 'net/mlx5: fix VLAN PCP item calculation' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (17 preceding siblings ...)
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/i40e: relax barrier in Tx' " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/i40e: fix X722 performance' " luca.boccassi
                   ` (60 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Ophir Munk; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 64a38788d1c3c7c7e30ef2b4cce7c32ed8d4af6f Mon Sep 17 00:00:00 2001
From: Ophir Munk <ophirmu@mellanox.com>
Date: Wed, 26 Feb 2020 08:27:48 +0000
Subject: [PATCH] net/mlx5: fix VLAN PCP item calculation

[ upstream commit 3c3f27e905792670933fabe577f9653336780688 ]

The VLAN 16 bits tci field contains both values of PCP and VID. When
extracting any one of them - it is required not to affect the other one.
Previous to this commit in routine flow_dev_get_vlan_info_from_items()
we calculated the PCP as follows:
    (1) vlan->vlan_tci &= MLX5DV_FLOW_VLAN_PCP_MASK;
    (2) vlan->vlan_tci |= <3 bits value of PCP>
In line (1) we should have used the negated mask ('~' operator) such
that only the PCP bits will be nullified before ORing them with the
updated PCP value.

Fixes: 9aee7a8418d4 ("net/mlx5: support push flow action on VLAN header")

Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 3694d6dd94..69b17f104e 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1640,7 +1640,7 @@ flow_dev_get_vlan_info_from_items(const struct rte_flow_item *items,
 		/* Only full match values are accepted */
 		if ((vlan_m->tci & MLX5DV_FLOW_VLAN_PCP_MASK_BE) ==
 		     MLX5DV_FLOW_VLAN_PCP_MASK_BE) {
-			vlan->vlan_tci &= MLX5DV_FLOW_VLAN_PCP_MASK;
+			vlan->vlan_tci &= ~MLX5DV_FLOW_VLAN_PCP_MASK;
 			vlan->vlan_tci |=
 				rte_be_to_cpu_16(vlan_v->tci &
 						 MLX5DV_FLOW_VLAN_PCP_MASK_BE);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:19.602724239 +0100
+++ 0020-net-mlx5-fix-VLAN-PCP-item-calculation.patch	2020-05-19 13:56:18.191501315 +0100
@@ -1,8 +1,10 @@
-From 3c3f27e905792670933fabe577f9653336780688 Mon Sep 17 00:00:00 2001
+From 64a38788d1c3c7c7e30ef2b4cce7c32ed8d4af6f Mon Sep 17 00:00:00 2001
 From: Ophir Munk <ophirmu@mellanox.com>
 Date: Wed, 26 Feb 2020 08:27:48 +0000
 Subject: [PATCH] net/mlx5: fix VLAN PCP item calculation
 
+[ upstream commit 3c3f27e905792670933fabe577f9653336780688 ]
+
 The VLAN 16 bits tci field contains both values of PCP and VID. When
 extracting any one of them - it is required not to affect the other one.
 Previous to this commit in routine flow_dev_get_vlan_info_from_items()
@@ -14,7 +16,6 @@
 updated PCP value.
 
 Fixes: 9aee7a8418d4 ("net/mlx5: support push flow action on VLAN header")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
 Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
@@ -23,10 +24,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index 06592b5340..2414a97716 100644
+index 3694d6dd94..69b17f104e 100644
 --- a/drivers/net/mlx5/mlx5_flow_dv.c
 +++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -1771,7 +1771,7 @@ flow_dev_get_vlan_info_from_items(const struct rte_flow_item *items,
+@@ -1640,7 +1640,7 @@ flow_dev_get_vlan_info_from_items(const struct rte_flow_item *items,
  		/* Only full match values are accepted */
  		if ((vlan_m->tci & MLX5DV_FLOW_VLAN_PCP_MASK_BE) ==
  		     MLX5DV_FLOW_VLAN_PCP_MASK_BE) {

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

* [dpdk-stable] patch 'net/i40e: fix X722 performance' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (18 preceding siblings ...)
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/mlx5: fix VLAN PCP item calculation' " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/ice: fix hash flow crash' " luca.boccassi
                   ` (59 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Qiming Yang; +Cc: Xiaolong Ye, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 2ce209609212398be82eb193c94264e85e766e6f Mon Sep 17 00:00:00 2001
From: Qiming Yang <qiming.yang@intel.com>
Date: Tue, 3 Mar 2020 13:45:00 +0800
Subject: [PATCH] net/i40e: fix X722 performance

[ upstream commit b4668579286c56fded2816602e104abbcf0b5adb ]

Lack of GL_SWR_PM_UP_THR value for mac type 4x10G X722 caused it can't
reach line rate in one queue one core forwarding case. It's about 1%
performance drop.  This patch adds value as:

 Device-ID  Value        Comments
 0x37D0    0x03030303   4x10G FPK

This value is hardware specific.

Fixes: 3320d4a240da ("net/i40e: workaround performance degradation")

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 86fc4f4076..55ba606f85 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -10408,6 +10408,7 @@ i40e_get_swr_pm_cfg(struct i40e_hw *hw, uint32_t *value)
 		{ I40E_GL_SWR_PM_EF_DEVICE(I40E_DEV_ID_KX_C) },
 		{ I40E_GL_SWR_PM_EF_DEVICE(I40E_DEV_ID_10G_BASE_T) },
 		{ I40E_GL_SWR_PM_EF_DEVICE(I40E_DEV_ID_10G_BASE_T4) },
+		{ I40E_GL_SWR_PM_EF_DEVICE(I40E_DEV_ID_SFP_X722) },
 
 		{ I40E_GL_SWR_PM_SF_DEVICE(I40E_DEV_ID_KX_B) },
 		{ I40E_GL_SWR_PM_SF_DEVICE(I40E_DEV_ID_QSFP_A) },
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:19.661758188 +0100
+++ 0021-net-i40e-fix-X722-performance.patch	2020-05-19 13:56:18.203501531 +0100
@@ -1,8 +1,10 @@
-From b4668579286c56fded2816602e104abbcf0b5adb Mon Sep 17 00:00:00 2001
+From 2ce209609212398be82eb193c94264e85e766e6f Mon Sep 17 00:00:00 2001
 From: Qiming Yang <qiming.yang@intel.com>
 Date: Tue, 3 Mar 2020 13:45:00 +0800
 Subject: [PATCH] net/i40e: fix X722 performance
 
+[ upstream commit b4668579286c56fded2816602e104abbcf0b5adb ]
+
 Lack of GL_SWR_PM_UP_THR value for mac type 4x10G X722 caused it can't
 reach line rate in one queue one core forwarding case. It's about 1%
 performance drop.  This patch adds value as:
@@ -13,7 +15,6 @@
 This value is hardware specific.
 
 Fixes: 3320d4a240da ("net/i40e: workaround performance degradation")
-Cc: stable@dpdk.org
 
 Signed-off-by: Qiming Yang <qiming.yang@intel.com>
 Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
@@ -22,10 +23,10 @@
  1 file changed, 1 insertion(+)
 
 diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
-index 9fbda1c34c..c09b9b990c 100644
+index 86fc4f4076..55ba606f85 100644
 --- a/drivers/net/i40e/i40e_ethdev.c
 +++ b/drivers/net/i40e/i40e_ethdev.c
-@@ -10504,6 +10504,7 @@ i40e_get_swr_pm_cfg(struct i40e_hw *hw, uint32_t *value)
+@@ -10408,6 +10408,7 @@ i40e_get_swr_pm_cfg(struct i40e_hw *hw, uint32_t *value)
  		{ I40E_GL_SWR_PM_EF_DEVICE(I40E_DEV_ID_KX_C) },
  		{ I40E_GL_SWR_PM_EF_DEVICE(I40E_DEV_ID_10G_BASE_T) },
  		{ I40E_GL_SWR_PM_EF_DEVICE(I40E_DEV_ID_10G_BASE_T4) },

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

* [dpdk-stable] patch 'net/ice: fix hash flow crash' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (19 preceding siblings ...)
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/i40e: fix X722 performance' " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/enetc: fix Rx lock-up' " luca.boccassi
                   ` (58 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Tao Zhu; +Cc: Xiaolong Ye, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From aec781c6b1cb149b54ba4ca62420d0dbe1d9c68c Mon Sep 17 00:00:00 2001
From: Tao Zhu <taox.zhu@intel.com>
Date: Tue, 3 Mar 2020 13:38:46 +0800
Subject: [PATCH] net/ice: fix hash flow crash

[ upstream commit f761def5125cf7dc23a15eb2bf57206f5930801e ]

Commit 'dc36bd5dfdeb' mistakenly initializes ret as -rte_errno, then
return ret if ice_search_pattern_match_item fails, if rte_errno happens
to be 0 in this case, it would cause an unrecognized flow rule to be
marked as recognition success. Later, when the code tries to parse the
flow rule, a segmentation fault will occur due to null pointer
reference.

Fixes: dc36bd5dfdeb ("net/ice: fix flow FDIR/switch memory leak")

Signed-off-by: Tao Zhu <taox.zhu@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
 drivers/net/ice/ice_hash.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
index d891538bd4..0e9c3c4e50 100644
--- a/drivers/net/ice/ice_hash.c
+++ b/drivers/net/ice/ice_hash.c
@@ -409,7 +409,7 @@ ice_hash_parse_pattern_action(__rte_unused struct ice_adapter *ad,
 			void **meta,
 			struct rte_flow_error *error)
 {
-	int ret = -rte_errno;
+	int ret = 0;
 	struct ice_pattern_match_item *pattern_match_item;
 	struct rss_meta *rss_meta_ptr;
 
@@ -424,8 +424,10 @@ ice_hash_parse_pattern_action(__rte_unused struct ice_adapter *ad,
 	/* Check rss supported pattern and find matched pattern. */
 	pattern_match_item = ice_search_pattern_match_item(pattern,
 					array, array_len, error);
-	if (!pattern_match_item)
+	if (!pattern_match_item) {
+		ret = -rte_errno;
 		goto error;
+	}
 
 	ret = ice_hash_check_inset(pattern, error);
 	if (ret)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:19.717537222 +0100
+++ 0022-net-ice-fix-hash-flow-crash.patch	2020-05-19 13:56:18.203501531 +0100
@@ -1,8 +1,10 @@
-From f761def5125cf7dc23a15eb2bf57206f5930801e Mon Sep 17 00:00:00 2001
+From aec781c6b1cb149b54ba4ca62420d0dbe1d9c68c Mon Sep 17 00:00:00 2001
 From: Tao Zhu <taox.zhu@intel.com>
 Date: Tue, 3 Mar 2020 13:38:46 +0800
 Subject: [PATCH] net/ice: fix hash flow crash
 
+[ upstream commit f761def5125cf7dc23a15eb2bf57206f5930801e ]
+
 Commit 'dc36bd5dfdeb' mistakenly initializes ret as -rte_errno, then
 return ret if ice_search_pattern_match_item fails, if rte_errno happens
 to be 0 in this case, it would cause an unrecognized flow rule to be
@@ -11,7 +13,6 @@
 reference.
 
 Fixes: dc36bd5dfdeb ("net/ice: fix flow FDIR/switch memory leak")
-Cc: stable@dpdk.org
 
 Signed-off-by: Tao Zhu <taox.zhu@intel.com>
 Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>

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

* [dpdk-stable] patch 'net/enetc: fix Rx lock-up' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (20 preceding siblings ...)
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/ice: fix hash flow crash' " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/ice: remove unnecessary variable' " luca.boccassi
                   ` (57 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Alex Marginean; +Cc: Gagandeep Singh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 2847184082104fa408a97d599f92b9e686970b8d Mon Sep 17 00:00:00 2001
From: Alex Marginean <alexandru.marginean@nxp.com>
Date: Mon, 2 Mar 2020 20:02:03 +0530
Subject: [PATCH] net/enetc: fix Rx lock-up

[ upstream commit 880728f8d449304a7fd0085a950509b5b21746da ]

The default value in hardware for the Rx MAC FIFO (@) is higher than it
should be and can lead to Rx lock-up under traffic.
Set it to the value recommended by hardware team, 1.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
---
 drivers/net/enetc/base/enetc_hw.h | 3 ++-
 drivers/net/enetc/enetc_ethdev.c  | 5 ++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/enetc/base/enetc_hw.h b/drivers/net/enetc/base/enetc_hw.h
index 2fe7ccb5bb..00813284ee 100644
--- a/drivers/net/enetc/base/enetc_hw.h
+++ b/drivers/net/enetc/base/enetc_hw.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright 2018-2019 NXP
+ * Copyright 2018-2020 NXP
  */
 
 #ifndef _ENETC_HW_H_
@@ -86,6 +86,7 @@ enum enetc_bdr_type {TX, RX};
 #define ENETC_PSIPMAR1(n)		(0x00104 + (n) * 0x20)
 #define ENETC_PCAPR0			0x00900
 #define ENETC_PCAPR1			0x00904
+#define ENETC_PM0_RX_FIFO		0x801C
 #define ENETC_PM0_IF_MODE		0x8300
 #define ENETC_PM1_IF_MODE		0x9300
 #define ENETC_PMO_IFM_RG		BIT(2)
diff --git a/drivers/net/enetc/enetc_ethdev.c b/drivers/net/enetc/enetc_ethdev.c
index 20b77c006c..eb637d0306 100644
--- a/drivers/net/enetc/enetc_ethdev.c
+++ b/drivers/net/enetc/enetc_ethdev.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright 2018-2019 NXP
+ * Copyright 2018-2020 NXP
  */
 
 #include <stdbool.h>
@@ -147,6 +147,9 @@ enetc_hardware_init(struct enetc_eth_hw *hw)
 	hw->hw.port = (void *)((size_t)hw->hw.reg + ENETC_PORT_BASE);
 	hw->hw.global = (void *)((size_t)hw->hw.reg + ENETC_GLOBAL_BASE);
 
+	/* WA for Rx lock-up HW erratum */
+	enetc_port_wr(enetc_hw, ENETC_PM0_RX_FIFO, 1);
+
 	/* Enabling Station Interface */
 	enetc_wr(enetc_hw, ENETC_SIMR, ENETC_SIMR_EN);
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:19.756387333 +0100
+++ 0023-net-enetc-fix-Rx-lock-up.patch	2020-05-19 13:56:18.203501531 +0100
@@ -1,8 +1,10 @@
-From 880728f8d449304a7fd0085a950509b5b21746da Mon Sep 17 00:00:00 2001
+From 2847184082104fa408a97d599f92b9e686970b8d Mon Sep 17 00:00:00 2001
 From: Alex Marginean <alexandru.marginean@nxp.com>
 Date: Mon, 2 Mar 2020 20:02:03 +0530
 Subject: [PATCH] net/enetc: fix Rx lock-up
 
+[ upstream commit 880728f8d449304a7fd0085a950509b5b21746da ]
+
 The default value in hardware for the Rx MAC FIFO (@) is higher than it
 should be and can lead to Rx lock-up under traffic.
 Set it to the value recommended by hardware team, 1.

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

* [dpdk-stable] patch 'net/ice: remove unnecessary variable' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (21 preceding siblings ...)
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/enetc: fix Rx lock-up' " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'doc: fix number of failsafe sub-devices' " luca.boccassi
                   ` (56 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Xiaolong Ye, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From adf15e37f25ec94a1fb3dfbbc269181f79562018 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Wed, 4 Mar 2020 10:05:49 +0800
Subject: [PATCH] net/ice: remove unnecessary variable

[ upstream commit 31108c69ba5d55a7f35da1b650998be9a19e13dc ]

Remove unnecessary variable "meta" in ice_flow_create and
ice_flow_validate, it should be defined when really needed:
its ice_parse_engine_create and ice_parse_engine_validate.

A meta data created by parser->parse_pattern_action should be
freed inside parser->engine->create.

During a validate operation, since parser->engine_>create will not
be invoked, it is unnecessary to create a meta during parser, so
NULL will passed to engine->parse_pattern_action and all parser's
parse_pattern_action need to be modified to handle meta = NULL
properly.

With above implementation, the patch also fixes a potential memory
leak in ice_parse_engine_validate, since meta may not be freed.

BTW, an engine without a create op should be regarded as a bug. So
use RTE_ASSERT to replace runtime engine->create == NULL check in
ice_parse_engine_create.

Fixes: 4e27d3ed02bd ("net/ice: fix flow API framework")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
 drivers/net/ice/ice_fdir_filter.c   |  3 ++-
 drivers/net/ice/ice_generic_flow.c  | 31 ++++++++++-------------------
 drivers/net/ice/ice_hash.c          | 11 ++++++----
 drivers/net/ice/ice_switch_filter.c | 15 ++++++++++----
 4 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index 5a791610f8..6342b560c9 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -1966,7 +1966,8 @@ ice_fdir_parse(struct ice_adapter *ad,
 	if (ret)
 		goto error;
 
-	*meta = filter;
+	if (meta)
+		*meta = filter;
 error:
 	rte_free(item);
 	return ret;
diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_generic_flow.c
index 38ac799d85..a1648eeb58 100644
--- a/drivers/net/ice/ice_generic_flow.c
+++ b/drivers/net/ice/ice_generic_flow.c
@@ -1375,7 +1375,6 @@ typedef struct ice_flow_engine * (*parse_engine_t)(struct ice_adapter *ad,
 		struct ice_parser_list *parser_list,
 		const struct rte_flow_item pattern[],
 		const struct rte_flow_action actions[],
-		void **meta,
 		struct rte_flow_error *error);
 
 void
@@ -1713,11 +1712,11 @@ ice_parse_engine_create(struct ice_adapter *ad,
 		struct ice_parser_list *parser_list,
 		const struct rte_flow_item pattern[],
 		const struct rte_flow_action actions[],
-		void **meta,
 		struct rte_flow_error *error)
 {
 	struct ice_flow_engine *engine = NULL;
 	struct ice_flow_parser_node *parser_node;
+	void *meta = NULL;
 	void *temp;
 
 	TAILQ_FOREACH_SAFE(parser_node, parser_list, node, temp) {
@@ -1726,18 +1725,12 @@ ice_parse_engine_create(struct ice_adapter *ad,
 		if (parser_node->parser->parse_pattern_action(ad,
 				parser_node->parser->array,
 				parser_node->parser->array_len,
-				pattern, actions, meta, error) < 0)
+				pattern, actions, &meta, error) < 0)
 			continue;
 
 		engine = parser_node->parser->engine;
-		if (engine->create == NULL) {
-			rte_flow_error_set(error, EINVAL,
-					RTE_FLOW_ERROR_TYPE_HANDLE,
-					NULL, "Invalid engine");
-			continue;
-		}
-
-		ret = engine->create(ad, flow, *meta, error);
+		RTE_ASSERT(engine->create != NULL);
+		ret = engine->create(ad, flow, meta, error);
 		if (ret == 0)
 			return engine;
 		else if (ret == -EEXIST)
@@ -1752,7 +1745,6 @@ ice_parse_engine_validate(struct ice_adapter *ad,
 		struct ice_parser_list *parser_list,
 		const struct rte_flow_item pattern[],
 		const struct rte_flow_action actions[],
-		void **meta,
 		struct rte_flow_error *error)
 {
 	struct ice_flow_engine *engine = NULL;
@@ -1763,7 +1755,7 @@ ice_parse_engine_validate(struct ice_adapter *ad,
 		if (parser_node->parser->parse_pattern_action(ad,
 				parser_node->parser->array,
 				parser_node->parser->array_len,
-				pattern, actions, meta, error) < 0)
+				pattern, actions, NULL, error) < 0)
 			continue;
 
 		engine = parser_node->parser->engine;
@@ -1779,7 +1771,6 @@ ice_flow_process_filter(struct rte_eth_dev *dev,
 		const struct rte_flow_item pattern[],
 		const struct rte_flow_action actions[],
 		struct ice_flow_engine **engine,
-		void **meta,
 		parse_engine_t ice_parse_engine,
 		struct rte_flow_error *error)
 {
@@ -1814,7 +1805,7 @@ ice_flow_process_filter(struct rte_eth_dev *dev,
 		return ret;
 
 	*engine = ice_parse_engine(ad, flow, &pf->rss_parser_list,
-			pattern, actions, meta, error);
+			pattern, actions, error);
 	if (*engine != NULL)
 		return 0;
 
@@ -1822,11 +1813,11 @@ ice_flow_process_filter(struct rte_eth_dev *dev,
 	case ICE_FLOW_CLASSIFY_STAGE_DISTRIBUTOR_ONLY:
 	case ICE_FLOW_CLASSIFY_STAGE_DISTRIBUTOR:
 		*engine = ice_parse_engine(ad, flow, &pf->dist_parser_list,
-				pattern, actions, meta, error);
+				pattern, actions, error);
 		break;
 	case ICE_FLOW_CLASSIFY_STAGE_PERMISSION:
 		*engine = ice_parse_engine(ad, flow, &pf->perm_parser_list,
-				pattern, actions, meta, error);
+				pattern, actions, error);
 		break;
 	default:
 		return -EINVAL;
@@ -1845,11 +1836,10 @@ ice_flow_validate(struct rte_eth_dev *dev,
 		const struct rte_flow_action actions[],
 		struct rte_flow_error *error)
 {
-	void *meta;
 	struct ice_flow_engine *engine;
 
 	return ice_flow_process_filter(dev, NULL, attr, pattern, actions,
-			&engine, &meta, ice_parse_engine_validate, error);
+			&engine, ice_parse_engine_validate, error);
 }
 
 static struct rte_flow *
@@ -1863,7 +1853,6 @@ ice_flow_create(struct rte_eth_dev *dev,
 	struct rte_flow *flow = NULL;
 	int ret;
 	struct ice_flow_engine *engine = NULL;
-	void *meta;
 
 	flow = rte_zmalloc("ice_flow", sizeof(struct rte_flow), 0);
 	if (!flow) {
@@ -1874,7 +1863,7 @@ ice_flow_create(struct rte_eth_dev *dev,
 	}
 
 	ret = ice_flow_process_filter(dev, flow, attr, pattern, actions,
-			&engine, &meta, ice_parse_engine_create, error);
+			&engine, ice_parse_engine_create, error);
 	if (ret < 0)
 		goto free_flow;
 	flow->engine = engine;
diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
index 0e9c3c4e50..0fdd4d68d4 100644
--- a/drivers/net/ice/ice_hash.c
+++ b/drivers/net/ice/ice_hash.c
@@ -434,14 +434,17 @@ ice_hash_parse_pattern_action(__rte_unused struct ice_adapter *ad,
 		goto error;
 
 	/* Save protocol header to rss_meta. */
-	*meta = rss_meta_ptr;
-	((struct rss_meta *)*meta)->pkt_hdr = ((struct rss_type_match_hdr *)
+	rss_meta_ptr->pkt_hdr = ((struct rss_type_match_hdr *)
 		(pattern_match_item->meta))->hdr_mask;
 
 	/* Check rss action. */
-	ret = ice_hash_parse_action(pattern_match_item, actions, meta, error);
+	ret = ice_hash_parse_action(pattern_match_item, actions,
+				    (void **)&rss_meta_ptr, error);
+
 error:
-	if (ret)
+	if (!ret && meta)
+		*meta = rss_meta_ptr;
+	else
 		rte_free(rss_meta_ptr);
 	rte_free(pattern_match_item);
 
diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c
index 4a9356b317..66dc158efc 100644
--- a/drivers/net/ice/ice_switch_filter.c
+++ b/drivers/net/ice/ice_switch_filter.c
@@ -1088,10 +1088,17 @@ ice_switch_parse_pattern_action(struct ice_adapter *ad,
 				   "Invalid input action");
 		goto error;
 	}
-	*meta = sw_meta_ptr;
-	((struct sw_meta *)*meta)->list = list;
-	((struct sw_meta *)*meta)->lkups_num = lkups_num;
-	((struct sw_meta *)*meta)->rule_info = rule_info;
+
+	if (meta) {
+		*meta = sw_meta_ptr;
+		((struct sw_meta *)*meta)->list = list;
+		((struct sw_meta *)*meta)->lkups_num = lkups_num;
+		((struct sw_meta *)*meta)->rule_info = rule_info;
+	} else {
+		rte_free(list);
+		rte_free(sw_meta_ptr);
+	}
+
 	rte_free(pattern_match_item);
 
 	return 0;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:19.794951365 +0100
+++ 0024-net-ice-remove-unnecessary-variable.patch	2020-05-19 13:56:18.207501603 +0100
@@ -1,8 +1,10 @@
-From 31108c69ba5d55a7f35da1b650998be9a19e13dc Mon Sep 17 00:00:00 2001
+From adf15e37f25ec94a1fb3dfbbc269181f79562018 Mon Sep 17 00:00:00 2001
 From: Qi Zhang <qi.z.zhang@intel.com>
 Date: Wed, 4 Mar 2020 10:05:49 +0800
 Subject: [PATCH] net/ice: remove unnecessary variable
 
+[ upstream commit 31108c69ba5d55a7f35da1b650998be9a19e13dc ]
+
 Remove unnecessary variable "meta" in ice_flow_create and
 ice_flow_validate, it should be defined when really needed:
 its ice_parse_engine_create and ice_parse_engine_validate.
@@ -24,7 +26,6 @@
 ice_parse_engine_create.
 
 Fixes: 4e27d3ed02bd ("net/ice: fix flow API framework")
-Cc: stable@dpdk.org
 
 Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
 Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>

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

* [dpdk-stable] patch 'doc: fix number of failsafe sub-devices' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (22 preceding siblings ...)
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/ice: remove unnecessary variable' " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/sfc: fix reported promiscuous/multicast mode' " luca.boccassi
                   ` (55 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Gaetan Rivet; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 194ca60cde179bae1f88b4eb87fddac20c60cfae Mon Sep 17 00:00:00 2001
From: Gaetan Rivet <grive@u256.net>
Date: Sat, 22 Feb 2020 01:14:40 +0100
Subject: [PATCH] doc: fix number of failsafe sub-devices

[ upstream commit c4169faf9dab18d164557e2b52f7ba1e9d6b768f ]

Supporting more than 2 sub-device is a remnant from earlier fail-safe
design, that was never actually published.

Fixes: a46f8d584eb8 ("net/failsafe: add fail-safe PMD")

Signed-off-by: Gaetan Rivet <grive@u256.net>
---
 doc/guides/nics/fail_safe.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/guides/nics/fail_safe.rst b/doc/guides/nics/fail_safe.rst
index 6c02d7ef6d..60bbf40f7f 100644
--- a/doc/guides/nics/fail_safe.rst
+++ b/doc/guides/nics/fail_safe.rst
@@ -49,7 +49,7 @@ The Fail-safe PMD can be used like most other DPDK virtual devices, by passing a
 ``--vdev`` parameter to the EAL when starting the application. The device name
 must start with the *net_failsafe* prefix, followed by numbers or letters. This
 name must be unique for each device. Each fail-safe instance must have at least one
-sub-device, up to ``RTE_MAX_ETHPORTS-1``.
+sub-device, and at most two.
 
 A sub-device can be any legal DPDK device, including possibly another fail-safe
 instance.
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:19.838172744 +0100
+++ 0025-doc-fix-number-of-failsafe-sub-devices.patch	2020-05-19 13:56:18.207501603 +0100
@@ -1,13 +1,14 @@
-From c4169faf9dab18d164557e2b52f7ba1e9d6b768f Mon Sep 17 00:00:00 2001
+From 194ca60cde179bae1f88b4eb87fddac20c60cfae Mon Sep 17 00:00:00 2001
 From: Gaetan Rivet <grive@u256.net>
 Date: Sat, 22 Feb 2020 01:14:40 +0100
 Subject: [PATCH] doc: fix number of failsafe sub-devices
 
+[ upstream commit c4169faf9dab18d164557e2b52f7ba1e9d6b768f ]
+
 Supporting more than 2 sub-device is a remnant from earlier fail-safe
 design, that was never actually published.
 
 Fixes: a46f8d584eb8 ("net/failsafe: add fail-safe PMD")
-Cc: stable@dpdk.org
 
 Signed-off-by: Gaetan Rivet <grive@u256.net>
 ---
@@ -15,7 +16,7 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/doc/guides/nics/fail_safe.rst b/doc/guides/nics/fail_safe.rst
-index 3ce2f8bee3..b4a92f663b 100644
+index 6c02d7ef6d..60bbf40f7f 100644
 --- a/doc/guides/nics/fail_safe.rst
 +++ b/doc/guides/nics/fail_safe.rst
 @@ -49,7 +49,7 @@ The Fail-safe PMD can be used like most other DPDK virtual devices, by passing a
@@ -25,8 +26,8 @@
 -sub-device, up to ``RTE_MAX_ETHPORTS-1``.
 +sub-device, and at most two.
  
- A sub-device can be any DPDK device, including possibly another fail-safe device.
- 
+ A sub-device can be any legal DPDK device, including possibly another fail-safe
+ instance.
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'net/sfc: fix reported promiscuous/multicast mode' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (23 preceding siblings ...)
  2020-05-19 12:53 ` [dpdk-stable] patch 'doc: fix number of failsafe sub-devices' " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/vmxnet3: fix RSS setting on v4' " luca.boccassi
                   ` (54 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 556cdccab20203c0f49086a9ec287b1508bdacf1 Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <arybchenko@solarflare.com>
Date: Wed, 4 Mar 2020 15:01:04 +0000
Subject: [PATCH] net/sfc: fix reported promiscuous/multicast mode

[ upstream commit 9d28d6b0b0bf4e7d9386c2ab56893d5cc95e78e5 ]

Requested promiscuous or all-multicast mode may be dropped on port
start if FW denies to enable it (e.g. because of no permission
in the case of VF). Return applied value on get.

Fixes: f5258439ee5d ("net/sfc: avoid failure on port start if Rx mode is rejected")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/sfc_rx.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c
index 7afd2c8b33..f589ece757 100644
--- a/drivers/net/sfc/sfc_rx.c
+++ b/drivers/net/sfc/sfc_rx.c
@@ -719,6 +719,7 @@ retry:
 		sfc_warn(sa, "promiscuous mode will be disabled");
 
 		port->promisc = B_FALSE;
+		sa->eth_dev->data->promiscuous = 0;
 		rc = sfc_set_rx_mode(sa);
 		if (rc != 0)
 			return rc;
@@ -732,6 +733,7 @@ retry:
 		sfc_warn(sa, "all-multicast mode will be disabled");
 
 		port->allmulti = B_FALSE;
+		sa->eth_dev->data->all_multicast = 0;
 		rc = sfc_set_rx_mode(sa);
 		if (rc != 0)
 			return rc;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:19.877104693 +0100
+++ 0026-net-sfc-fix-reported-promiscuous-multicast-mode.patch	2020-05-19 13:56:18.211501675 +0100
@@ -1,14 +1,15 @@
-From 9d28d6b0b0bf4e7d9386c2ab56893d5cc95e78e5 Mon Sep 17 00:00:00 2001
+From 556cdccab20203c0f49086a9ec287b1508bdacf1 Mon Sep 17 00:00:00 2001
 From: Andrew Rybchenko <arybchenko@solarflare.com>
 Date: Wed, 4 Mar 2020 15:01:04 +0000
 Subject: [PATCH] net/sfc: fix reported promiscuous/multicast mode
 
+[ upstream commit 9d28d6b0b0bf4e7d9386c2ab56893d5cc95e78e5 ]
+
 Requested promiscuous or all-multicast mode may be dropped on port
 start if FW denies to enable it (e.g. because of no permission
 in the case of VF). Return applied value on get.
 
 Fixes: f5258439ee5d ("net/sfc: avoid failure on port start if Rx mode is rejected")
-Cc: stable@dpdk.org
 
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
 ---

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

* [dpdk-stable] patch 'net/vmxnet3: fix RSS setting on v4' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (24 preceding siblings ...)
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/sfc: fix reported promiscuous/multicast mode' " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/sfc: fix initialization error path' " luca.boccassi
                   ` (53 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Eduard Serra; +Cc: Yong Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 5f0378bb2ef876a30bc481762df91e1ea44375dd Mon Sep 17 00:00:00 2001
From: Eduard Serra <eserra@vmware.com>
Date: Wed, 4 Mar 2020 02:35:56 +0000
Subject: [PATCH] net/vmxnet3: fix RSS setting on v4

[ upstream commit 52ec00fd1474e8f99f3da705b7efe95ba994b352 ]

When calling to setup RSS on v4 API, ESX will expect
IPv4/6 TCP RSS to be set/requested mandatory.

This patch will:
- Set IPv4/6 TCP RSS when these have not been set. A warning
message is thrown to make sure we warn the application we are
setting IPv4/6 TCP RSS when not set.
- An additional check has been added to dodge RSS configuration
altogether unless MQ_RSS has been requested, similar to v3.

The alternative (returning error) was considered, the intent
is to ease the task of setting up and running vmxnet3 in situations
where it's supposed to be most straightforward (testpmd, pktgen).

Bugzilla ID: 400
Fixes: 643fba770705 ("net/vmxnet3: add v4 boot and guest UDP RSS config")

Signed-off-by: Eduard Serra <eserra@vmware.com>
Acked-by: Yong Wang <yongwang@vmware.com>
---
 drivers/net/vmxnet3/vmxnet3_ethdev.c | 3 ++-
 drivers/net/vmxnet3/vmxnet3_ethdev.h | 4 ++++
 drivers/net/vmxnet3/vmxnet3_rxtx.c   | 8 ++++++++
 3 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index 6e6efa9603..705e9760f4 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -771,7 +771,8 @@ vmxnet3_dev_start(struct rte_eth_dev *dev)
 		PMD_INIT_LOG(DEBUG, "Failed to setup memory region\n");
 	}
 
-	if (VMXNET3_VERSION_GE_4(hw)) {
+	if (VMXNET3_VERSION_GE_4(hw) &&
+	    dev->data->dev_conf.rxmode.mq_mode == ETH_MQ_RX_RSS) {
 		/* Check for additional RSS  */
 		ret = vmxnet3_v4_rss_configure(dev);
 		if (ret != VMXNET3_SUCCESS) {
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.h b/drivers/net/vmxnet3/vmxnet3_ethdev.h
index 8c2b6f8771..dd685b02b7 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.h
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.h
@@ -38,6 +38,10 @@
 	ETH_RSS_NONFRAG_IPV4_UDP | \
 	ETH_RSS_NONFRAG_IPV6_UDP)
 
+#define VMXNET3_MANDATORY_V4_RSS ( \
+	ETH_RSS_NONFRAG_IPV4_TCP | \
+	ETH_RSS_NONFRAG_IPV6_TCP)
+
 /* RSS configuration structure - shared with device through GPA */
 typedef struct VMXNET3_RSSConf {
 	uint16_t   hashType;
diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c
index 7794d74214..dd99684bee 100644
--- a/drivers/net/vmxnet3/vmxnet3_rxtx.c
+++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c
@@ -1311,6 +1311,14 @@ vmxnet3_v4_rss_configure(struct rte_eth_dev *dev)
 
 	cmdInfo->setRSSFields = 0;
 	port_rss_conf = &dev->data->dev_conf.rx_adv_conf.rss_conf;
+
+	if ((port_rss_conf->rss_hf & VMXNET3_MANDATORY_V4_RSS) !=
+	    VMXNET3_MANDATORY_V4_RSS) {
+		PMD_INIT_LOG(WARNING, "RSS: IPv4/6 TCP is required for vmxnet3 v4 RSS,"
+			     "automatically setting it");
+		port_rss_conf->rss_hf |= VMXNET3_MANDATORY_V4_RSS;
+	}
+
 	rss_hf = port_rss_conf->rss_hf &
 		(VMXNET3_V4_RSS_MASK | VMXNET3_RSS_OFFLOAD_ALL);
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:19.916151896 +0100
+++ 0027-net-vmxnet3-fix-RSS-setting-on-v4.patch	2020-05-19 13:56:18.211501675 +0100
@@ -1,8 +1,10 @@
-From 52ec00fd1474e8f99f3da705b7efe95ba994b352 Mon Sep 17 00:00:00 2001
+From 5f0378bb2ef876a30bc481762df91e1ea44375dd Mon Sep 17 00:00:00 2001
 From: Eduard Serra <eserra@vmware.com>
 Date: Wed, 4 Mar 2020 02:35:56 +0000
 Subject: [PATCH] net/vmxnet3: fix RSS setting on v4
 
+[ upstream commit 52ec00fd1474e8f99f3da705b7efe95ba994b352 ]
+
 When calling to setup RSS on v4 API, ESX will expect
 IPv4/6 TCP RSS to be set/requested mandatory.
 
@@ -19,7 +21,6 @@
 
 Bugzilla ID: 400
 Fixes: 643fba770705 ("net/vmxnet3: add v4 boot and guest UDP RSS config")
-Cc: stable@dpdk.org
 
 Signed-off-by: Eduard Serra <eserra@vmware.com>
 Acked-by: Yong Wang <yongwang@vmware.com>

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

* [dpdk-stable] patch 'net/sfc: fix initialization error path' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (25 preceding siblings ...)
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/vmxnet3: fix RSS setting on v4' " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/sfc: fix Rx queue start failure " luca.boccassi
                   ` (52 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Igor Romanov; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 251cb7e7223defd17d3c2b715f6ead96cdcc967d Mon Sep 17 00:00:00 2001
From: Igor Romanov <igor.romanov@oktetlabs.ru>
Date: Thu, 5 Mar 2020 10:38:36 +0000
Subject: [PATCH] net/sfc: fix initialization error path

[ upstream commit ba77f3e171733b49d7c991f03b97f0df6c85c4d1 ]

NIC deinitialization should not happen after a failed NIC
initialization.

Fixes: 91831d4068c8 ("net/sfc: estimate available resources")

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/sfc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/sfc/sfc.c b/drivers/net/sfc/sfc.c
index c6b514ac2f..3f5cd7758b 100644
--- a/drivers/net/sfc/sfc.c
+++ b/drivers/net/sfc/sfc.c
@@ -241,8 +241,8 @@ sfc_estimate_resource_limits(struct sfc_adapter *sa)
 	return 0;
 
 fail_get_vi_pool:
-fail_nic_init:
 	efx_nic_fini(sa->nic);
+fail_nic_init:
 	return rc;
 }
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:19.956704230 +0100
+++ 0028-net-sfc-fix-initialization-error-path.patch	2020-05-19 13:56:18.215501747 +0100
@@ -1,13 +1,14 @@
-From ba77f3e171733b49d7c991f03b97f0df6c85c4d1 Mon Sep 17 00:00:00 2001
+From 251cb7e7223defd17d3c2b715f6ead96cdcc967d Mon Sep 17 00:00:00 2001
 From: Igor Romanov <igor.romanov@oktetlabs.ru>
 Date: Thu, 5 Mar 2020 10:38:36 +0000
 Subject: [PATCH] net/sfc: fix initialization error path
 
+[ upstream commit ba77f3e171733b49d7c991f03b97f0df6c85c4d1 ]
+
 NIC deinitialization should not happen after a failed NIC
 initialization.
 
 Fixes: 91831d4068c8 ("net/sfc: estimate available resources")
-Cc: stable@dpdk.org
 
 Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>

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

* [dpdk-stable] patch 'net/sfc: fix Rx queue start failure path' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (26 preceding siblings ...)
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/sfc: fix initialization error path' " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/ice: remove bulk alloc option' " luca.boccassi
                   ` (51 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Igor Romanov; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From a42ef6f777cf507e8ce502a6e971ef906a1bdf2e Mon Sep 17 00:00:00 2001
From: Igor Romanov <igor.romanov@oktetlabs.ru>
Date: Thu, 5 Mar 2020 15:48:55 +0000
Subject: [PATCH] net/sfc: fix Rx queue start failure path

[ upstream commit a8bcd99de4a2cf5d52ea24506dbca20a26d5ba0b ]

Call correct cleanup operations on failure in Rx queue start function.

Fixes: df1bfde4ff0d ("net/sfc: factor out libefx-based Rx datapath")
Fixes: 28944ac098aa ("net/sfc: implement Rx queue start and stop operations")

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/sfc_rx.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c
index f589ece757..891709fd04 100644
--- a/drivers/net/sfc/sfc_rx.c
+++ b/drivers/net/sfc/sfc_rx.c
@@ -822,10 +822,12 @@ sfc_rx_qstart(struct sfc_adapter *sa, unsigned int sw_index)
 	return 0;
 
 fail_mac_filter_default_rxq_set:
+	sfc_rx_qflush(sa, sw_index);
 	sa->priv.dp_rx->qstop(rxq_info->dp, &rxq->evq->read_ptr);
+	rxq_info->state = SFC_RXQ_INITIALIZED;
 
 fail_dp_qstart:
-	sfc_rx_qflush(sa, sw_index);
+	efx_rx_qdestroy(rxq->common);
 
 fail_rx_qcreate:
 fail_bad_contig_block_size:
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:19.994701028 +0100
+++ 0029-net-sfc-fix-Rx-queue-start-failure-path.patch	2020-05-19 13:56:18.215501747 +0100
@@ -1,13 +1,14 @@
-From a8bcd99de4a2cf5d52ea24506dbca20a26d5ba0b Mon Sep 17 00:00:00 2001
+From a42ef6f777cf507e8ce502a6e971ef906a1bdf2e Mon Sep 17 00:00:00 2001
 From: Igor Romanov <igor.romanov@oktetlabs.ru>
 Date: Thu, 5 Mar 2020 15:48:55 +0000
 Subject: [PATCH] net/sfc: fix Rx queue start failure path
 
+[ upstream commit a8bcd99de4a2cf5d52ea24506dbca20a26d5ba0b ]
+
 Call correct cleanup operations on failure in Rx queue start function.
 
 Fixes: df1bfde4ff0d ("net/sfc: factor out libefx-based Rx datapath")
 Fixes: 28944ac098aa ("net/sfc: implement Rx queue start and stop operations")
-Cc: stable@dpdk.org
 
 Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>

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

* [dpdk-stable] patch 'net/ice: remove bulk alloc option' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (27 preceding siblings ...)
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/sfc: fix Rx queue start failure " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/mlx5: fix mask used for IPv6 item validation' " luca.boccassi
                   ` (50 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Xiaolong Ye, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 7ce629f7f203343d19ba88fec8baa84c50394748 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Wed, 4 Mar 2020 19:40:38 +0800
Subject: [PATCH] net/ice: remove bulk alloc option

[ upstream commit af3f83032b457771e3268a3d310f4890672ab442 ]

Remove CONFIG_RTE_LIBRTE_ICE_RX_ALLOW_BULK_ALLOC with below
consideration:

1. A default Rx path can always be selected by setting a proper
   rx_free_thresh value at runtime, see
   ice_check_rx_burst_bulk_alloc_preconditions.

2. Its not a big deal to always reserve more space for desc ring.
   "ring_size = (uint16_t)(rxq->nb_rx_desc + ICE_RX_MAX_BURST);"

3. Fixes a potential invalid memory access in ice_reset_rx_queue.
   If CONFIG_RTE_LIBRTE_ICE_RX_ALLOW_BULK_ALLOC is turned on while
   ice_check_rx_burst_bulk_alloc_preconditions return fail.
   Below code will have problem.

   for (i = 0; i < ICE_RX_MAX_BURST; ++i)
   	rxq->sw_ring[rxq->nb_rx_desc + i].mbuf = &rxq->fake_mbuf;

Fixes: 50370662b727 ("net/ice: support device and queue ops")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
 config/common_base         |  1 -
 doc/guides/nics/ice.rst    |  4 ---
 drivers/net/ice/ice_rxtx.c | 59 ++++++--------------------------------
 3 files changed, 9 insertions(+), 55 deletions(-)

diff --git a/config/common_base b/config/common_base
index 2e0c725988..861f7d1a0b 100644
--- a/config/common_base
+++ b/config/common_base
@@ -328,7 +328,6 @@ CONFIG_RTE_LIBRTE_ICE_PMD=y
 CONFIG_RTE_LIBRTE_ICE_DEBUG_RX=n
 CONFIG_RTE_LIBRTE_ICE_DEBUG_TX=n
 CONFIG_RTE_LIBRTE_ICE_DEBUG_TX_FREE=n
-CONFIG_RTE_LIBRTE_ICE_RX_ALLOW_BULK_ALLOC=y
 CONFIG_RTE_LIBRTE_ICE_16BYTE_RX_DESC=n
 
 # Compile burst-oriented IAVF PMD driver
diff --git a/doc/guides/nics/ice.rst b/doc/guides/nics/ice.rst
index 9b90b389ec..58eb023983 100644
--- a/doc/guides/nics/ice.rst
+++ b/doc/guides/nics/ice.rst
@@ -54,10 +54,6 @@ Please note that enabling debugging options may affect system performance.
 
   Toggle display of generic debugging messages.
 
-- ``CONFIG_RTE_LIBRTE_ICE_RX_ALLOW_BULK_ALLOC`` (default ``y``)
-
-  Toggle bulk allocation for RX.
-
 - ``CONFIG_RTE_LIBRTE_ICE_16BYTE_RX_DESC`` (default ``n``)
 
   Toggle to use a 16-byte RX descriptor, by default the RX descriptor is 32 byte.
diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index 37e792b05b..110b38646d 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -236,17 +236,12 @@ _ice_rx_queue_release_mbufs(struct ice_rx_queue *rxq)
 			rxq->sw_ring[i].mbuf = NULL;
 		}
 	}
-#ifdef RTE_LIBRTE_ICE_RX_ALLOW_BULK_ALLOC
-		if (rxq->rx_nb_avail == 0)
-			return;
-		for (i = 0; i < rxq->rx_nb_avail; i++) {
-			struct rte_mbuf *mbuf;
+	if (rxq->rx_nb_avail == 0)
+		return;
+	for (i = 0; i < rxq->rx_nb_avail; i++)
+		rte_pktmbuf_free_seg(rxq->rx_stage[rxq->rx_next_avail + i]);
 
-			mbuf = rxq->rx_stage[rxq->rx_next_avail + i];
-			rte_pktmbuf_free_seg(mbuf);
-		}
-		rxq->rx_nb_avail = 0;
-#endif /* RTE_LIBRTE_ICE_RX_ALLOW_BULK_ALLOC */
+	rxq->rx_nb_avail = 0;
 }
 
 static void
@@ -309,16 +304,10 @@ ice_switch_rx_queue(struct ice_hw *hw, uint16_t q_idx, bool on)
 }
 
 static inline int
-#ifdef RTE_LIBRTE_ICE_RX_ALLOW_BULK_ALLOC
 ice_check_rx_burst_bulk_alloc_preconditions(struct ice_rx_queue *rxq)
-#else
-ice_check_rx_burst_bulk_alloc_preconditions
-	(__rte_unused struct ice_rx_queue *rxq)
-#endif
 {
 	int ret = 0;
 
-#ifdef RTE_LIBRTE_ICE_RX_ALLOW_BULK_ALLOC
 	if (!(rxq->rx_free_thresh >= ICE_RX_MAX_BURST)) {
 		PMD_INIT_LOG(DEBUG, "Rx Burst Bulk Alloc Preconditions: "
 			     "rxq->rx_free_thresh=%d, "
@@ -338,9 +327,6 @@ ice_check_rx_burst_bulk_alloc_preconditions
 			     rxq->nb_rx_desc, rxq->rx_free_thresh);
 		ret = -EINVAL;
 	}
-#else
-	ret = -EINVAL;
-#endif
 
 	return ret;
 }
@@ -357,17 +343,11 @@ ice_reset_rx_queue(struct ice_rx_queue *rxq)
 		return;
 	}
 
-#ifdef RTE_LIBRTE_ICE_RX_ALLOW_BULK_ALLOC
-	if (ice_check_rx_burst_bulk_alloc_preconditions(rxq) == 0)
-		len = (uint16_t)(rxq->nb_rx_desc + ICE_RX_MAX_BURST);
-	else
-#endif /* RTE_LIBRTE_ICE_RX_ALLOW_BULK_ALLOC */
-		len = rxq->nb_rx_desc;
+	len = (uint16_t)(rxq->nb_rx_desc + ICE_RX_MAX_BURST);
 
 	for (i = 0; i < len * sizeof(union ice_rx_flex_desc); i++)
 		((volatile char *)rxq->rx_ring)[i] = 0;
 
-#ifdef RTE_LIBRTE_ICE_RX_ALLOW_BULK_ALLOC
 	memset(&rxq->fake_mbuf, 0x0, sizeof(rxq->fake_mbuf));
 	for (i = 0; i < ICE_RX_MAX_BURST; ++i)
 		rxq->sw_ring[rxq->nb_rx_desc + i].mbuf = &rxq->fake_mbuf;
@@ -375,7 +355,6 @@ ice_reset_rx_queue(struct ice_rx_queue *rxq)
 	rxq->rx_nb_avail = 0;
 	rxq->rx_next_avail = 0;
 	rxq->rx_free_trigger = (uint16_t)(rxq->rx_free_thresh - 1);
-#endif /* RTE_LIBRTE_ICE_RX_ALLOW_BULK_ALLOC */
 
 	rxq->rx_tail = 0;
 	rxq->nb_rx_hold = 0;
@@ -926,13 +905,11 @@ ice_rx_queue_setup(struct rte_eth_dev *dev,
 	/* Allocate the maximun number of RX ring hardware descriptor. */
 	len = ICE_MAX_RING_DESC;
 
-#ifdef RTE_LIBRTE_ICE_RX_ALLOW_BULK_ALLOC
 	/**
 	 * Allocating a little more memory because vectorized/bulk_alloc Rx
 	 * functions doesn't check boundaries each time.
 	 */
 	len += ICE_RX_MAX_BURST;
-#endif
 
 	/* Allocate the maximum number of RX ring hardware descriptor. */
 	ring_size = sizeof(union ice_rx_flex_desc) * len;
@@ -952,11 +929,8 @@ ice_rx_queue_setup(struct rte_eth_dev *dev,
 	rxq->rx_ring_dma = rz->iova;
 	rxq->rx_ring = rz->addr;
 
-#ifdef RTE_LIBRTE_ICE_RX_ALLOW_BULK_ALLOC
+	/* always reserve more for bulk alloc */
 	len = (uint16_t)(nb_desc + ICE_RX_MAX_BURST);
-#else
-	len = nb_desc;
-#endif
 
 	/* Allocate the software ring. */
 	rxq->sw_ring = rte_zmalloc_socket(NULL,
@@ -977,17 +951,14 @@ ice_rx_queue_setup(struct rte_eth_dev *dev,
 	use_def_burst_func = ice_check_rx_burst_bulk_alloc_preconditions(rxq);
 
 	if (!use_def_burst_func) {
-#ifdef RTE_LIBRTE_ICE_RX_ALLOW_BULK_ALLOC
 		PMD_INIT_LOG(DEBUG, "Rx Burst Bulk Alloc Preconditions are "
 			     "satisfied. Rx Burst Bulk Alloc function will be "
 			     "used on port=%d, queue=%d.",
 			     rxq->port_id, rxq->queue_id);
-#endif /* RTE_LIBRTE_ICE_RX_ALLOW_BULK_ALLOC */
 	} else {
 		PMD_INIT_LOG(DEBUG, "Rx Burst Bulk Alloc Preconditions are "
-			     "not satisfied, Scattered Rx is requested, "
-			     "or RTE_LIBRTE_ICE_RX_ALLOW_BULK_ALLOC is "
-			     "not enabled on port=%d, queue=%d.",
+			     "not satisfied, Scattered Rx is requested. "
+			     "on port=%d, queue=%d.",
 			     rxq->port_id, rxq->queue_id);
 		ad->rx_bulk_alloc_allowed = false;
 	}
@@ -1399,7 +1370,6 @@ ice_rxd_to_pkt_fields(struct rte_mbuf *mb,
 #endif
 }
 
-#ifdef RTE_LIBRTE_ICE_RX_ALLOW_BULK_ALLOC
 #define ICE_LOOK_AHEAD 8
 #if (ICE_LOOK_AHEAD != 8)
 #error "PMD ICE: ICE_LOOK_AHEAD must be 8\n"
@@ -1620,15 +1590,6 @@ ice_recv_pkts_bulk_alloc(void *rx_queue,
 
 	return nb_rx;
 }
-#else
-static uint16_t
-ice_recv_pkts_bulk_alloc(void __rte_unused *rx_queue,
-			 struct rte_mbuf __rte_unused **rx_pkts,
-			 uint16_t __rte_unused nb_pkts)
-{
-	return 0;
-}
-#endif /* RTE_LIBRTE_ICE_RX_ALLOW_BULK_ALLOC */
 
 static uint16_t
 ice_recv_scattered_pkts(void *rx_queue,
@@ -1872,9 +1833,7 @@ ice_dev_supported_ptypes_get(struct rte_eth_dev *dev)
 		ptypes = ptypes_os;
 
 	if (dev->rx_pkt_burst == ice_recv_pkts ||
-#ifdef RTE_LIBRTE_ICE_RX_ALLOW_BULK_ALLOC
 	    dev->rx_pkt_burst == ice_recv_pkts_bulk_alloc ||
-#endif
 	    dev->rx_pkt_burst == ice_recv_scattered_pkts)
 		return ptypes;
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:20.038529750 +0100
+++ 0030-net-ice-remove-bulk-alloc-option.patch	2020-05-19 13:56:18.219501819 +0100
@@ -1,8 +1,10 @@
-From af3f83032b457771e3268a3d310f4890672ab442 Mon Sep 17 00:00:00 2001
+From 7ce629f7f203343d19ba88fec8baa84c50394748 Mon Sep 17 00:00:00 2001
 From: Qi Zhang <qi.z.zhang@intel.com>
 Date: Wed, 4 Mar 2020 19:40:38 +0800
 Subject: [PATCH] net/ice: remove bulk alloc option
 
+[ upstream commit af3f83032b457771e3268a3d310f4890672ab442 ]
+
 Remove CONFIG_RTE_LIBRTE_ICE_RX_ALLOW_BULK_ALLOC with below
 consideration:
 
@@ -22,7 +24,6 @@
    	rxq->sw_ring[rxq->nb_rx_desc + i].mbuf = &rxq->fake_mbuf;
 
 Fixes: 50370662b727 ("net/ice: support device and queue ops")
-Cc: stable@dpdk.org
 
 Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
 Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
@@ -33,10 +34,10 @@
  3 files changed, 9 insertions(+), 55 deletions(-)
 
 diff --git a/config/common_base b/config/common_base
-index 7ca2f28b19..c31175f9d6 100644
+index 2e0c725988..861f7d1a0b 100644
 --- a/config/common_base
 +++ b/config/common_base
-@@ -337,7 +337,6 @@ CONFIG_RTE_LIBRTE_ICE_PMD=y
+@@ -328,7 +328,6 @@ CONFIG_RTE_LIBRTE_ICE_PMD=y
  CONFIG_RTE_LIBRTE_ICE_DEBUG_RX=n
  CONFIG_RTE_LIBRTE_ICE_DEBUG_TX=n
  CONFIG_RTE_LIBRTE_ICE_DEBUG_TX_FREE=n
@@ -45,7 +46,7 @@
  
  # Compile burst-oriented IAVF PMD driver
 diff --git a/doc/guides/nics/ice.rst b/doc/guides/nics/ice.rst
-index cde3fd620a..8af32dabf6 100644
+index 9b90b389ec..58eb023983 100644
 --- a/doc/guides/nics/ice.rst
 +++ b/doc/guides/nics/ice.rst
 @@ -54,10 +54,6 @@ Please note that enabling debugging options may affect system performance.
@@ -60,7 +61,7 @@
  
    Toggle to use a 16-byte RX descriptor, by default the RX descriptor is 32 byte.
 diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
-index 60c411bfad..3c3f61eb94 100644
+index 37e792b05b..110b38646d 100644
 --- a/drivers/net/ice/ice_rxtx.c
 +++ b/drivers/net/ice/ice_rxtx.c
 @@ -236,17 +236,12 @@ _ice_rx_queue_release_mbufs(struct ice_rx_queue *rxq)

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

* [dpdk-stable] patch 'net/mlx5: fix mask used for IPv6 item validation' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (28 preceding siblings ...)
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/ice: remove bulk alloc option' " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'build: support MinGW-w64 with Meson' " luca.boccassi
                   ` (49 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Dekel Peled; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 5cdff304196a09783a6aa7e7d8edb27999924f50 Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Tue, 3 Mar 2020 14:37:30 +0200
Subject: [PATCH] net/mlx5: fix mask used for IPv6 item validation

[ upstream commit 6bd5efb23db9e419dec51fbea7f71c2fd3703d75 ]

The nic_mask struct in function mlx5_flow_validate_item_ipv6()
includes hop_limits field.
This is redundant since matching on this item is not supported using
Verbs flow engine (dv_flow_en=0).

(Separate patch will be sent to handle this issue for DV flow engine.)

Setting a rule including match on this field will fail:
testpmd> flow create 0 ingress pattern eth / ipv6 hop is 1 / end actions
drop / end
port_flow_complain(): Caught PMD error type 1 (cause unspecified):
hardware refuses to create flow: Operation not supported

This patch removes the redundant field from nic_mask, to ensure that
such flow rules will be rejected by PMD validation:
testpmd> flow create 0 ingress pattern eth / ipv6 hop is 1 / end actions
drop / end
port_flow_complain(): Caught PMD error type 13 (specific pattern item):
cause: 0x7fffffffa2c8, mask enables non supported bits: Operation not
supported

The related lines in function flow_verbs_translate_item_ipv6() are
removed as well, since they are redundant.

Fixes: 23c1d42c7138 ("net/mlx5: split flow validation to dedicated function")
Fixes: 84c406e74524 ("net/mlx5: add flow translate function")

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow.c       | 1 -
 drivers/net/mlx5/mlx5_flow_verbs.c | 3 ---
 2 files changed, 4 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 1070b87709..4e957d9862 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -1621,7 +1621,6 @@ mlx5_flow_validate_item_ipv6(const struct rte_flow_item *item,
 				"\xff\xff\xff\xff\xff\xff\xff\xff",
 			.vtc_flow = RTE_BE32(0xffffffff),
 			.proto = 0xff,
-			.hop_limits = 0xff,
 		},
 	};
 	const int tunnel = !!(item_flags & MLX5_FLOW_LAYER_TUNNEL);
diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c b/drivers/net/mlx5/mlx5_flow_verbs.c
index 72fb1e4669..c162527a5e 100644
--- a/drivers/net/mlx5/mlx5_flow_verbs.c
+++ b/drivers/net/mlx5/mlx5_flow_verbs.c
@@ -493,14 +493,12 @@ flow_verbs_translate_item_ipv6(struct mlx5_flow *dev_flow,
 		ipv6.val.traffic_class = (vtc_flow_val & RTE_IPV6_HDR_TC_MASK) >>
 					 RTE_IPV6_HDR_TC_SHIFT;
 		ipv6.val.next_hdr = spec->hdr.proto;
-		ipv6.val.hop_limit = spec->hdr.hop_limits;
 		ipv6.mask.flow_label =
 			rte_cpu_to_be_32((vtc_flow_mask & RTE_IPV6_HDR_FL_MASK) >>
 					 RTE_IPV6_HDR_FL_SHIFT);
 		ipv6.mask.traffic_class = (vtc_flow_mask & RTE_IPV6_HDR_TC_MASK) >>
 					  RTE_IPV6_HDR_TC_SHIFT;
 		ipv6.mask.next_hdr = mask->hdr.proto;
-		ipv6.mask.hop_limit = mask->hdr.hop_limits;
 		/* Remove unwanted bits from values. */
 		for (i = 0; i < RTE_DIM(ipv6.val.src_ip); ++i) {
 			ipv6.val.src_ip[i] &= ipv6.mask.src_ip[i];
@@ -509,7 +507,6 @@ flow_verbs_translate_item_ipv6(struct mlx5_flow *dev_flow,
 		ipv6.val.flow_label &= ipv6.mask.flow_label;
 		ipv6.val.traffic_class &= ipv6.mask.traffic_class;
 		ipv6.val.next_hdr &= ipv6.mask.next_hdr;
-		ipv6.val.hop_limit &= ipv6.mask.hop_limit;
 	}
 	flow_verbs_spec_add(&dev_flow->verbs, &ipv6, size);
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:20.092466130 +0100
+++ 0031-net-mlx5-fix-mask-used-for-IPv6-item-validation.patch	2020-05-19 13:56:18.223501891 +0100
@@ -1,8 +1,10 @@
-From 6bd5efb23db9e419dec51fbea7f71c2fd3703d75 Mon Sep 17 00:00:00 2001
+From 5cdff304196a09783a6aa7e7d8edb27999924f50 Mon Sep 17 00:00:00 2001
 From: Dekel Peled <dekelp@mellanox.com>
 Date: Tue, 3 Mar 2020 14:37:30 +0200
 Subject: [PATCH] net/mlx5: fix mask used for IPv6 item validation
 
+[ upstream commit 6bd5efb23db9e419dec51fbea7f71c2fd3703d75 ]
+
 The nic_mask struct in function mlx5_flow_validate_item_ipv6()
 includes hop_limits field.
 This is redundant since matching on this item is not supported using
@@ -29,7 +31,6 @@
 
 Fixes: 23c1d42c7138 ("net/mlx5: split flow validation to dedicated function")
 Fixes: 84c406e74524 ("net/mlx5: add flow translate function")
-Cc: stable@dpdk.org
 
 Signed-off-by: Dekel Peled <dekelp@mellanox.com>
 Acked-by: Matan Azrad <matan@mellanox.com>
@@ -39,10 +40,10 @@
  2 files changed, 4 deletions(-)
 
 diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
-index 16c1ef3532..41072da6df 100644
+index 1070b87709..4e957d9862 100644
 --- a/drivers/net/mlx5/mlx5_flow.c
 +++ b/drivers/net/mlx5/mlx5_flow.c
-@@ -1640,7 +1640,6 @@ mlx5_flow_validate_item_ipv6(const struct rte_flow_item *item,
+@@ -1621,7 +1621,6 @@ mlx5_flow_validate_item_ipv6(const struct rte_flow_item *item,
  				"\xff\xff\xff\xff\xff\xff\xff\xff",
  			.vtc_flow = RTE_BE32(0xffffffff),
  			.proto = 0xff,
@@ -51,10 +52,10 @@
  	};
  	const int tunnel = !!(item_flags & MLX5_FLOW_LAYER_TUNNEL);
 diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c b/drivers/net/mlx5/mlx5_flow_verbs.c
-index 04845f8f4c..459e7b6483 100644
+index 72fb1e4669..c162527a5e 100644
 --- a/drivers/net/mlx5/mlx5_flow_verbs.c
 +++ b/drivers/net/mlx5/mlx5_flow_verbs.c
-@@ -494,14 +494,12 @@ flow_verbs_translate_item_ipv6(struct mlx5_flow *dev_flow,
+@@ -493,14 +493,12 @@ flow_verbs_translate_item_ipv6(struct mlx5_flow *dev_flow,
  		ipv6.val.traffic_class = (vtc_flow_val & RTE_IPV6_HDR_TC_MASK) >>
  					 RTE_IPV6_HDR_TC_SHIFT;
  		ipv6.val.next_hdr = spec->hdr.proto;
@@ -69,7 +70,7 @@
  		/* Remove unwanted bits from values. */
  		for (i = 0; i < RTE_DIM(ipv6.val.src_ip); ++i) {
  			ipv6.val.src_ip[i] &= ipv6.mask.src_ip[i];
-@@ -510,7 +508,6 @@ flow_verbs_translate_item_ipv6(struct mlx5_flow *dev_flow,
+@@ -509,7 +507,6 @@ flow_verbs_translate_item_ipv6(struct mlx5_flow *dev_flow,
  		ipv6.val.flow_label &= ipv6.mask.flow_label;
  		ipv6.val.traffic_class &= ipv6.mask.traffic_class;
  		ipv6.val.next_hdr &= ipv6.mask.next_hdr;

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

* [dpdk-stable] patch 'build: support MinGW-w64 with Meson' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (29 preceding siblings ...)
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/mlx5: fix mask used for IPv6 item validation' " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/memif: fix init when already connected' " luca.boccassi
                   ` (48 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Dmitry Kozlyuk; +Cc: William Tu, Pallavi Kadam, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From ba2322fb9af1b148b640dfdcb2e3a2569a3bb1b1 Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Date: Thu, 27 Feb 2020 07:25:34 +0300
Subject: [PATCH] build: support MinGW-w64 with Meson

[ upstream commit 4816484bab8eeb05e83bcf4787772eb3b75fa6ee ]

MinGW-w64 linker does not mimic MS linker options, so the build system
must differentiate between linkers on Windows. Use GNU linker options
with GCC and MS linker options with Clang.

MinGW-w64 by default uses MSVCRT stdio, which does not comply to ANSI,
most notably its formatting and string handling functions. MinGW-w64
support for the Universal CRT (UCRT) is ongoing, but the toolchain
provides its own standard-complying implementation of stdio. The latter
is used in the patch to support formatting in DPDK.

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Tested-by: William Tu <u9012063@gmail.com>
Tested-by: Pallavi Kadam <pallavi.kadam@intel.com>
---
 config/meson.build                    | 14 ++++++++
 doc/guides/windows_gsg/build_dpdk.rst | 51 ++++++++++++++++++++++-----
 lib/meson.build                       |  8 +++--
 3 files changed, 62 insertions(+), 11 deletions(-)

diff --git a/config/meson.build b/config/meson.build
index cdbe724754..35ef12e30c 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -14,6 +14,10 @@ foreach env:supported_exec_envs
 	set_variable('is_' + env, exec_env == env)
 endforeach
 
+# MS linker requires special treatment.
+# TODO: use cc.get_linker_id() with Meson >= 0.54
+is_ms_linker = is_windows and (cc.get_id() == 'clang')
+
 # set the major version, which might be used by drivers and libraries
 # depending on the configuration options
 pver = meson.project_version().split('.')
@@ -235,6 +239,16 @@ if is_freebsd
 	add_project_arguments('-D__BSD_VISIBLE', language: 'c')
 endif
 
+if is_windows
+	# Minimum supported API is Windows 7.
+	add_project_arguments('-D_WIN32_WINNT=0x0601', language: 'c')
+
+	# Use MinGW-w64 stdio, because DPDK assumes ANSI-compliant formatting.
+	if cc.get_id() == 'gcc'
+		add_project_arguments('-D__USE_MINGW_ANSI_STDIO', language: 'c')
+	endif
+endif
+
 if get_option('b_lto')
 	if cc.has_argument('-ffat-lto-objects')
 		add_project_arguments('-ffat-lto-objects', language: 'c')
diff --git a/doc/guides/windows_gsg/build_dpdk.rst b/doc/guides/windows_gsg/build_dpdk.rst
index 6711e07e21..a0e51dfcb3 100644
--- a/doc/guides/windows_gsg/build_dpdk.rst
+++ b/doc/guides/windows_gsg/build_dpdk.rst
@@ -7,15 +7,22 @@ Compiling the DPDK Target from Source
 System Requirements
 -------------------
 
-The DPDK and its applications require the Clang-LLVM C compiler
-and Microsoft MSVC linker.
+Building the DPDK and its applications requires one of the following
+environments:
+
+* The Clang-LLVM C compiler and Microsoft MSVC linker.
+* The MinGW-w64 toolchain (either native or cross).
+
 The Meson Build system is used to prepare the sources for compilation
 with the Ninja backend.
 The installation of these tools is covered in this section.
 
 
+Option 1. Clang-LLVM C Compiler and Microsoft MSVC Linker
+---------------------------------------------------------
+
 Install the Compiler
---------------------
+~~~~~~~~~~~~~~~~~~~~
 
 Download and install the clang compiler from
 `LLVM website <http://releases.llvm.org/download.html>`_.
@@ -25,7 +32,7 @@ For example, Clang-LLVM direct download link::
 
 
 Install the Linker
-------------------
+~~~~~~~~~~~~~~~~~~
 
 Download and install the Build Tools for Visual Studio to link and build the
 files on windows,
@@ -34,6 +41,18 @@ When installing build tools, select the "Visual C++ build tools" option
 and ensure the Windows SDK is selected.
 
 
+Option 2. MinGW-w64 Toolchain
+-----------------------------
+
+Obtain the latest version from
+`MinGW-w64 website <http://mingw-w64.org/doku.php/download>`_.
+On Windows, install to a folder without spaces in its name, like ``C:\MinGW``.
+This path is assumed for the rest of this guide.
+
+Version 4.0.4 for Ubuntu 16.04 cannot be used due to a
+`MinGW-w64 bug <https://sourceforge.net/p/mingw-w64/bugs/562/>`_.
+
+
 Install the Build System
 ------------------------
 
@@ -43,6 +62,8 @@ A good option to choose is the MSI installer for both meson and ninja together::
 
 	http://mesonbuild.com/Getting-meson.html#installing-meson-and-ninja-with-the-msi-installer%22
 
+Recommended version is either Meson 0.47.1 (baseline) or the latest release.
+
 Install the Backend
 -------------------
 
@@ -56,23 +77,30 @@ Build the code
 The build environment is setup to build the EAL and the helloworld example by
 default.
 
-Using the ninja backend
-~~~~~~~~~~~~~~~~~~~~~~~~
+Option 1. Native Build on Windows
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-Specifying the compiler might be required to complete the meson command.
+When using Clang-LLVM, specifying the compiler might be required to complete
+the meson command:
 
 .. code-block:: console
 
     set CC=clang
 
+When using MinGW-w64, it is sufficient to have toolchain executables in PATH:
+
+.. code-block:: console
+
+    set PATH=C:\MinGW\mingw64\bin;%PATH%
+
 To compile the examples, the flag ``-Dexamples`` is required.
 
 .. code-block:: console
 
     cd C:\Users\me\dpdk
     meson -Dexamples=helloworld build
-    cd build
-    ninja
+    ninja -C build
+
 
 Run the helloworld example
 ==========================
@@ -87,3 +115,8 @@ Navigate to the examples in the build directory and run `dpdk-helloworld.exe`.
     hello from core 3
     hello from core 0
     hello from core 2
+
+Note for MinGW-w64: applications are linked to ``libwinpthread-1.dll``
+by default. To run the example, either add toolchain executables directory
+to the PATH or copy the library to the working directory.
+Alternatively, static linking may be used (mind the LGPLv2.1 license).
diff --git a/lib/meson.build b/lib/meson.build
index 6ceb5e756e..d5a507fb43 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -148,12 +148,16 @@ foreach l:libraries
 				command: [map_to_def_cmd, '@INPUT@', '@OUTPUT@'],
 				input: version_map,
 				output: 'rte_@0@_exports.def'.format(name))
-			lk_deps = [version_map, def_file]
-			if is_windows
+
+			if is_ms_linker
 				lk_args = ['-Wl,/def:' + def_file.full_path(),
 					'-Wl,/implib:lib\\' + implib]
 			else
 				lk_args = ['-Wl,--version-script=' + version_map]
+			endif
+
+			lk_deps = [version_map, def_file]
+			if not is_windows
 				# on unix systems check the output of the
 				# experimental syms script, using it as a
 				# dependency of the .so build
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:20.146919919 +0100
+++ 0032-build-support-MinGW-w64-with-Meson.patch	2020-05-19 13:56:18.223501891 +0100
@@ -1,8 +1,10 @@
-From 4816484bab8eeb05e83bcf4787772eb3b75fa6ee Mon Sep 17 00:00:00 2001
+From ba2322fb9af1b148b640dfdcb2e3a2569a3bb1b1 Mon Sep 17 00:00:00 2001
 From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
 Date: Thu, 27 Feb 2020 07:25:34 +0300
 Subject: [PATCH] build: support MinGW-w64 with Meson
 
+[ upstream commit 4816484bab8eeb05e83bcf4787772eb3b75fa6ee ]
+
 MinGW-w64 linker does not mimic MS linker options, so the build system
 must differentiate between linkers on Windows. Use GNU linker options
 with GCC and MS linker options with Clang.
@@ -23,7 +25,7 @@
  3 files changed, 62 insertions(+), 11 deletions(-)
 
 diff --git a/config/meson.build b/config/meson.build
-index d3d2370ce4..68aeb84703 100644
+index cdbe724754..35ef12e30c 100644
 --- a/config/meson.build
 +++ b/config/meson.build
 @@ -14,6 +14,10 @@ foreach env:supported_exec_envs
@@ -37,7 +39,7 @@
  # set the major version, which might be used by drivers and libraries
  # depending on the configuration options
  pver = meson.project_version().split('.')
-@@ -247,6 +251,16 @@ if is_freebsd
+@@ -235,6 +239,16 @@ if is_freebsd
  	add_project_arguments('-D__BSD_VISIBLE', language: 'c')
  endif
  
@@ -167,7 +169,7 @@
 +to the PATH or copy the library to the working directory.
 +Alternatively, static linking may be used (mind the LGPLv2.1 license).
 diff --git a/lib/meson.build b/lib/meson.build
-index 0af3efab29..9c3cc55d5e 100644
+index 6ceb5e756e..d5a507fb43 100644
 --- a/lib/meson.build
 +++ b/lib/meson.build
 @@ -148,12 +148,16 @@ foreach l:libraries

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

* [dpdk-stable] patch 'net/memif: fix init when already connected' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (30 preceding siblings ...)
  2020-05-19 12:53 ` [dpdk-stable] patch 'build: support MinGW-w64 with Meson' " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/hinic: fix snprintf length of cable info' " luca.boccassi
                   ` (47 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Július Milan; +Cc: Jakub Grajciar, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From d40bcdfb5953ddaa03f5a75b730addab36738ec7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=BAlius=20Milan?= <jmilan.dev@gmail.com>
Date: Wed, 19 Feb 2020 09:19:16 +0100
Subject: [PATCH] net/memif: fix init when already connected
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 06123fdd6063e411ea78ed353f0d6114e500b1b3 ]

This patch fixes the situation when there is already connected pair of
memif interfaces and another slave tries to initiate the connection with
(already occupied) master. Expected behavior is that the second slave
is refused and gets disconnect message with reason: "Already connected",
while old connection remains functional.

Fixes: 09c7e63a71f9 ("net/memif: introduce memory interface PMD")

Signed-off-by: Július Milan <jmilan.dev@gmail.com>
Reviewed-by: Jakub Grajciar <jgrajcia@cisco.com>
---
 drivers/net/memif/memif_socket.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/net/memif/memif_socket.c b/drivers/net/memif/memif_socket.c
index ad5e30b96e..c1967c67bf 100644
--- a/drivers/net/memif/memif_socket.c
+++ b/drivers/net/memif/memif_socket.c
@@ -204,6 +204,13 @@ memif_msg_receive_init(struct memif_control_channel *cc, memif_msg_t *msg)
 		pmd = dev->data->dev_private;
 		if (((pmd->flags & ETH_MEMIF_FLAG_DISABLED) == 0) &&
 		    pmd->id == i->id) {
+			if (pmd->flags & (ETH_MEMIF_FLAG_CONNECTING |
+					   ETH_MEMIF_FLAG_CONNECTED)) {
+				memif_msg_enq_disconnect(cc,
+							 "Already connected", 0);
+				return -1;
+			}
+
 			/* assign control channel to device */
 			cc->dev = dev;
 			pmd->cc = cc;
@@ -215,12 +222,6 @@ memif_msg_receive_init(struct memif_control_channel *cc, memif_msg_t *msg)
 				return -1;
 			}
 
-			if (pmd->flags & (ETH_MEMIF_FLAG_CONNECTING |
-					   ETH_MEMIF_FLAG_CONNECTED)) {
-				memif_msg_enq_disconnect(pmd->cc,
-							 "Already connected", 0);
-				return -1;
-			}
 			strlcpy(pmd->remote_name, (char *)i->name,
 				sizeof(pmd->remote_name));
 
@@ -765,6 +766,7 @@ memif_intr_handler(void *arg)
 	ret = memif_msg_receive(cc);
 	/* if driver failed to assign device */
 	if (cc->dev == NULL) {
+		memif_msg_send_from_queue(cc);
 		ret = rte_intr_callback_unregister_pending(&cc->intr_handle,
 							   memif_intr_handler,
 							   cc,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:20.185689821 +0100
+++ 0033-net-memif-fix-init-when-already-connected.patch	2020-05-19 13:56:18.227501963 +0100
@@ -1,4 +1,4 @@
-From 06123fdd6063e411ea78ed353f0d6114e500b1b3 Mon Sep 17 00:00:00 2001
+From d40bcdfb5953ddaa03f5a75b730addab36738ec7 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?J=C3=BAlius=20Milan?= <jmilan.dev@gmail.com>
 Date: Wed, 19 Feb 2020 09:19:16 +0100
 Subject: [PATCH] net/memif: fix init when already connected
@@ -6,6 +6,8 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit 06123fdd6063e411ea78ed353f0d6114e500b1b3 ]
+
 This patch fixes the situation when there is already connected pair of
 memif interfaces and another slave tries to initiate the connection with
 (already occupied) master. Expected behavior is that the second slave
@@ -13,7 +15,6 @@
 while old connection remains functional.
 
 Fixes: 09c7e63a71f9 ("net/memif: introduce memory interface PMD")
-Cc: stable@dpdk.org
 
 Signed-off-by: Július Milan <jmilan.dev@gmail.com>
 Reviewed-by: Jakub Grajciar <jgrajcia@cisco.com>
@@ -22,13 +23,13 @@
  1 file changed, 8 insertions(+), 6 deletions(-)
 
 diff --git a/drivers/net/memif/memif_socket.c b/drivers/net/memif/memif_socket.c
-index 8ce2cc9faf..67794cb6fa 100644
+index ad5e30b96e..c1967c67bf 100644
 --- a/drivers/net/memif/memif_socket.c
 +++ b/drivers/net/memif/memif_socket.c
 @@ -204,6 +204,13 @@ memif_msg_receive_init(struct memif_control_channel *cc, memif_msg_t *msg)
  		pmd = dev->data->dev_private;
  		if (((pmd->flags & ETH_MEMIF_FLAG_DISABLED) == 0) &&
- 		    (pmd->id == i->id) && (pmd->role == MEMIF_ROLE_MASTER)) {
+ 		    pmd->id == i->id) {
 +			if (pmd->flags & (ETH_MEMIF_FLAG_CONNECTING |
 +					   ETH_MEMIF_FLAG_CONNECTED)) {
 +				memif_msg_enq_disconnect(cc,
@@ -52,7 +53,7 @@
  			strlcpy(pmd->remote_name, (char *)i->name,
  				sizeof(pmd->remote_name));
  
-@@ -772,6 +773,7 @@ memif_intr_handler(void *arg)
+@@ -765,6 +766,7 @@ memif_intr_handler(void *arg)
  	ret = memif_msg_receive(cc);
  	/* if driver failed to assign device */
  	if (cc->dev == NULL) {

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

* [dpdk-stable] patch 'net/hinic: fix snprintf length of cable info' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (31 preceding siblings ...)
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/memif: fix init when already connected' " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/hinic: fix repeating cable log and length check' " luca.boccassi
                   ` (46 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Kevin Traynor; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From d16cceef30f72e805eee7b4191b4900020740503 Mon Sep 17 00:00:00 2001
From: Kevin Traynor <ktraynor@redhat.com>
Date: Fri, 6 Mar 2020 12:06:51 +0000
Subject: [PATCH] net/hinic: fix snprintf length of cable info

[ upstream commit 9c84acab47e8eee2736b70edc54f36bb1bc17c57 ]

Correct length and remove unnecessary brackets.

Fixes: d9ce1917941c ("net/hinic/base: add hardware operation")

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/hinic/base/hinic_pmd_hwdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/hinic/base/hinic_pmd_hwdev.c b/drivers/net/hinic/base/hinic_pmd_hwdev.c
index 8b16897ade..b6c821a2ad 100644
--- a/drivers/net/hinic/base/hinic_pmd_hwdev.c
+++ b/drivers/net/hinic/base/hinic_pmd_hwdev.c
@@ -1390,7 +1390,7 @@ static void print_cable_info(struct hinic_link_info *info)
 	}
 
 	memcpy(tmp_vendor, info->vendor_name, sizeof(info->vendor_name));
-	snprintf(tmp_str, (sizeof(tmp_str) - 1),
+	snprintf(tmp_str, sizeof(tmp_str),
 		 "Vendor: %s, %s, %s, length: %um, max_speed: %uGbps",
 		 tmp_vendor, info->sfp_type ? "SFP" : "QSFP", port_type,
 		 info->cable_length, info->cable_max_speed);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:20.225173105 +0100
+++ 0034-net-hinic-fix-snprintf-length-of-cable-info.patch	2020-05-19 13:56:18.227501963 +0100
@@ -1,12 +1,13 @@
-From 9c84acab47e8eee2736b70edc54f36bb1bc17c57 Mon Sep 17 00:00:00 2001
+From d16cceef30f72e805eee7b4191b4900020740503 Mon Sep 17 00:00:00 2001
 From: Kevin Traynor <ktraynor@redhat.com>
 Date: Fri, 6 Mar 2020 12:06:51 +0000
 Subject: [PATCH] net/hinic: fix snprintf length of cable info
 
+[ upstream commit 9c84acab47e8eee2736b70edc54f36bb1bc17c57 ]
+
 Correct length and remove unnecessary brackets.
 
 Fixes: d9ce1917941c ("net/hinic/base: add hardware operation")
-Cc: stable@dpdk.org
 
 Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

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

* [dpdk-stable] patch 'net/hinic: fix repeating cable log and length check' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (32 preceding siblings ...)
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/hinic: fix snprintf length of cable info' " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/hns3: fix promiscuous mode for PF' " luca.boccassi
                   ` (45 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Kevin Traynor; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 32f349234b5ed4e818081c38d90eb88a2750e08f Mon Sep 17 00:00:00 2001
From: Kevin Traynor <ktraynor@redhat.com>
Date: Fri, 6 Mar 2020 12:06:52 +0000
Subject: [PATCH] net/hinic: fix repeating cable log and length check
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit ece8e4c262f8091361e9b261c4e4c6257d2b8bda ]

gcc 10.0.1 reports:

../drivers/net/hinic/base/hinic_pmd_hwdev.c: In function ‘print_cable_info’:
../drivers/net/hinic/base/hinic_pmd_hwdev.c:1398:3:
warning:
‘snprintf’ argument 4 may overlap destination object ‘tmp_str’
[-Wrestrict]
 1398 |   snprintf(tmp_str + strlen(tmp_str), (sizeof(tmp_str) - 1),
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1399 |     "%s, Temperature: %u", tmp_str,
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1400 |     info->cable_temp);
      |     ~~~~~~~~~~~~~~~~~

The warning is that tmp_str is in both src and dest.

Anyway, the current code is incorrect and because of the +strlen
the existing string will be repeated twice and max length
does not limit to the end of the string.

Fix by removing tmp_str from the src of snprintf and adding the
correct max length.

Fixes: d9ce1917941c ("net/hinic/base: add hardware operation")

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/hinic/base/hinic_pmd_hwdev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/hinic/base/hinic_pmd_hwdev.c b/drivers/net/hinic/base/hinic_pmd_hwdev.c
index b6c821a2ad..fd0292f84c 100644
--- a/drivers/net/hinic/base/hinic_pmd_hwdev.c
+++ b/drivers/net/hinic/base/hinic_pmd_hwdev.c
@@ -1395,9 +1395,9 @@ static void print_cable_info(struct hinic_link_info *info)
 		 tmp_vendor, info->sfp_type ? "SFP" : "QSFP", port_type,
 		 info->cable_length, info->cable_max_speed);
 	if (info->port_type != LINK_PORT_COPPER)
-		snprintf(tmp_str + strlen(tmp_str), (sizeof(tmp_str) - 1),
-			 "%s, Temperature: %u", tmp_str,
-			 info->cable_temp);
+		snprintf(tmp_str + strlen(tmp_str),
+			 sizeof(tmp_str) - strlen(tmp_str),
+			 ", Temperature: %u", info->cable_temp);
 
 	PMD_DRV_LOG(INFO, "Cable information: %s", tmp_str);
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:20.265836942 +0100
+++ 0035-net-hinic-fix-repeating-cable-log-and-length-check.patch	2020-05-19 13:56:18.227501963 +0100
@@ -1,4 +1,4 @@
-From ece8e4c262f8091361e9b261c4e4c6257d2b8bda Mon Sep 17 00:00:00 2001
+From 32f349234b5ed4e818081c38d90eb88a2750e08f Mon Sep 17 00:00:00 2001
 From: Kevin Traynor <ktraynor@redhat.com>
 Date: Fri, 6 Mar 2020 12:06:52 +0000
 Subject: [PATCH] net/hinic: fix repeating cable log and length check
@@ -6,6 +6,8 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit ece8e4c262f8091361e9b261c4e4c6257d2b8bda ]
+
 gcc 10.0.1 reports:
 
 ../drivers/net/hinic/base/hinic_pmd_hwdev.c: In function ‘print_cable_info’:
@@ -30,7 +32,6 @@
 correct max length.
 
 Fixes: d9ce1917941c ("net/hinic/base: add hardware operation")
-Cc: stable@dpdk.org
 
 Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

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

* [dpdk-stable] patch 'net/hns3: fix promiscuous mode for PF' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (33 preceding siblings ...)
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/hinic: fix repeating cable log and length check' " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'ethdev: fix spelling' " luca.boccassi
                   ` (44 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Chengchang Tang; +Cc: Wei Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 7aa0060a2a52ef63e01070d599e4ef5601aa85bf Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Mon, 9 Mar 2020 17:32:43 +0800
Subject: [PATCH] net/hns3: fix promiscuous mode for PF

[ upstream commit eb4f9b6a55002a4abc1a4e9eca2a89174fd6ce2b ]

Currently, when promiscuous mode is enabled, it is just allowed to
accept all the unicast and broadcast packets in hns3 PF PMD driver. It
should also be able to receive multicast packets.

Fixes: 19a3ca4c99cf ("net/hns3: add start/stop and configure operations")

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 41 ++++++++++++++++++----------------
 1 file changed, 22 insertions(+), 19 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 7e601b8bf8..9dc96fff5a 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -3524,7 +3524,7 @@ hns3_cmd_set_promisc_mode(struct hns3_hw *hw, struct hns3_promisc_param *param)
 
 	ret = hns3_cmd_send(hw, &desc, 1);
 	if (ret)
-		PMD_INIT_LOG(ERR, "Set promisc mode fail, status is %d", ret);
+		PMD_INIT_LOG(ERR, "Set promisc mode fail, ret = %d", ret);
 
 	return ret;
 }
@@ -3577,14 +3577,14 @@ hns3_dev_promiscuous_enable(struct rte_eth_dev *dev)
 {
 	struct hns3_adapter *hns = dev->data->dev_private;
 	struct hns3_hw *hw = &hns->hw;
-	bool en_mc_pmc = (dev->data->all_multicast == 1) ? true : false;
 	int ret = 0;
 
 	rte_spinlock_lock(&hw->lock);
-	ret = hns3_set_promisc_mode(hw, true, en_mc_pmc);
+	ret = hns3_set_promisc_mode(hw, true, true);
 	rte_spinlock_unlock(&hw->lock);
 	if (ret)
-		hns3_err(hw, "Failed to enable promiscuous mode: %d", ret);
+		hns3_err(hw, "Failed to enable promiscuous mode, ret = %d",
+			 ret);
 
 	return ret;
 }
@@ -3592,17 +3592,18 @@ hns3_dev_promiscuous_enable(struct rte_eth_dev *dev)
 static int
 hns3_dev_promiscuous_disable(struct rte_eth_dev *dev)
 {
+	bool allmulti = dev->data->all_multicast ? true : false;
 	struct hns3_adapter *hns = dev->data->dev_private;
 	struct hns3_hw *hw = &hns->hw;
-	bool en_mc_pmc = (dev->data->all_multicast == 1) ? true : false;
 	int ret = 0;
 
 	/* If now in all_multicast mode, must remain in all_multicast mode. */
 	rte_spinlock_lock(&hw->lock);
-	ret = hns3_set_promisc_mode(hw, false, en_mc_pmc);
+	ret = hns3_set_promisc_mode(hw, false, allmulti);
 	rte_spinlock_unlock(&hw->lock);
 	if (ret)
-		hns3_err(hw, "Failed to disable promiscuous mode: %d", ret);
+		hns3_err(hw, "Failed to disable promiscuous mode, ret = %d",
+			 ret);
 
 	return ret;
 }
@@ -3612,14 +3613,17 @@ hns3_dev_allmulticast_enable(struct rte_eth_dev *dev)
 {
 	struct hns3_adapter *hns = dev->data->dev_private;
 	struct hns3_hw *hw = &hns->hw;
-	bool en_uc_pmc = (dev->data->promiscuous == 1) ? true : false;
 	int ret = 0;
 
+	if (dev->data->promiscuous)
+		return 0;
+
 	rte_spinlock_lock(&hw->lock);
-	ret = hns3_set_promisc_mode(hw, en_uc_pmc, true);
+	ret = hns3_set_promisc_mode(hw, false, true);
 	rte_spinlock_unlock(&hw->lock);
 	if (ret)
-		hns3_err(hw, "Failed to enable allmulticast mode: %d", ret);
+		hns3_err(hw, "Failed to enable allmulticast mode, ret = %d",
+			 ret);
 
 	return ret;
 }
@@ -3629,18 +3633,18 @@ hns3_dev_allmulticast_disable(struct rte_eth_dev *dev)
 {
 	struct hns3_adapter *hns = dev->data->dev_private;
 	struct hns3_hw *hw = &hns->hw;
-	bool en_uc_pmc = (dev->data->promiscuous == 1) ? true : false;
 	int ret = 0;
 
 	/* If now in promiscuous mode, must remain in all_multicast mode. */
-	if (dev->data->promiscuous == 1)
+	if (dev->data->promiscuous)
 		return 0;
 
 	rte_spinlock_lock(&hw->lock);
-	ret = hns3_set_promisc_mode(hw, en_uc_pmc, false);
+	ret = hns3_set_promisc_mode(hw, false, false);
 	rte_spinlock_unlock(&hw->lock);
 	if (ret)
-		hns3_err(hw, "Failed to disable allmulticast mode: %d", ret);
+		hns3_err(hw, "Failed to disable allmulticast mode, ret =  %d",
+			 ret);
 
 	return ret;
 }
@@ -3649,13 +3653,12 @@ static int
 hns3_dev_promisc_restore(struct hns3_adapter *hns)
 {
 	struct hns3_hw *hw = &hns->hw;
-	bool en_mc_pmc;
-	bool en_uc_pmc;
+	bool allmulti = hw->data->all_multicast ? true : false;
 
-	en_uc_pmc = (hw->data->promiscuous == 1) ? true : false;
-	en_mc_pmc = (hw->data->all_multicast == 1) ? true : false;
+	if (hw->data->promiscuous)
+		return hns3_set_promisc_mode(hw, true, true);
 
-	return hns3_set_promisc_mode(hw, en_uc_pmc, en_mc_pmc);
+	return hns3_set_promisc_mode(hw, false, allmulti);
 }
 
 static int
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:20.305768957 +0100
+++ 0036-net-hns3-fix-promiscuous-mode-for-PF.patch	2020-05-19 13:56:18.231502035 +0100
@@ -1,14 +1,15 @@
-From eb4f9b6a55002a4abc1a4e9eca2a89174fd6ce2b Mon Sep 17 00:00:00 2001
+From 7aa0060a2a52ef63e01070d599e4ef5601aa85bf Mon Sep 17 00:00:00 2001
 From: Chengchang Tang <tangchengchang@huawei.com>
 Date: Mon, 9 Mar 2020 17:32:43 +0800
 Subject: [PATCH] net/hns3: fix promiscuous mode for PF
 
+[ upstream commit eb4f9b6a55002a4abc1a4e9eca2a89174fd6ce2b ]
+
 Currently, when promiscuous mode is enabled, it is just allowed to
 accept all the unicast and broadcast packets in hns3 PF PMD driver. It
 should also be able to receive multicast packets.
 
 Fixes: 19a3ca4c99cf ("net/hns3: add start/stop and configure operations")
-Cc: stable@dpdk.org
 
 Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -17,10 +18,10 @@
  1 file changed, 22 insertions(+), 19 deletions(-)
 
 diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
-index 909f4b0c50..26366013fb 100644
+index 7e601b8bf8..9dc96fff5a 100644
 --- a/drivers/net/hns3/hns3_ethdev.c
 +++ b/drivers/net/hns3/hns3_ethdev.c
-@@ -3649,7 +3649,7 @@ hns3_cmd_set_promisc_mode(struct hns3_hw *hw, struct hns3_promisc_param *param)
+@@ -3524,7 +3524,7 @@ hns3_cmd_set_promisc_mode(struct hns3_hw *hw, struct hns3_promisc_param *param)
  
  	ret = hns3_cmd_send(hw, &desc, 1);
  	if (ret)
@@ -29,12 +30,12 @@
  
  	return ret;
  }
-@@ -3702,14 +3702,14 @@ hns3_dev_promiscuous_enable(struct rte_eth_dev *dev)
+@@ -3577,14 +3577,14 @@ hns3_dev_promiscuous_enable(struct rte_eth_dev *dev)
  {
  	struct hns3_adapter *hns = dev->data->dev_private;
  	struct hns3_hw *hw = &hns->hw;
 -	bool en_mc_pmc = (dev->data->all_multicast == 1) ? true : false;
- 	int ret;
+ 	int ret = 0;
  
  	rte_spinlock_lock(&hw->lock);
 -	ret = hns3_set_promisc_mode(hw, true, en_mc_pmc);
@@ -47,7 +48,7 @@
  
  	return ret;
  }
-@@ -3717,17 +3717,18 @@ hns3_dev_promiscuous_enable(struct rte_eth_dev *dev)
+@@ -3592,17 +3592,18 @@ hns3_dev_promiscuous_enable(struct rte_eth_dev *dev)
  static int
  hns3_dev_promiscuous_disable(struct rte_eth_dev *dev)
  {
@@ -55,7 +56,7 @@
  	struct hns3_adapter *hns = dev->data->dev_private;
  	struct hns3_hw *hw = &hns->hw;
 -	bool en_mc_pmc = (dev->data->all_multicast == 1) ? true : false;
- 	int ret;
+ 	int ret = 0;
  
  	/* If now in all_multicast mode, must remain in all_multicast mode. */
  	rte_spinlock_lock(&hw->lock);
@@ -69,12 +70,12 @@
  
  	return ret;
  }
-@@ -3737,14 +3738,17 @@ hns3_dev_allmulticast_enable(struct rte_eth_dev *dev)
+@@ -3612,14 +3613,17 @@ hns3_dev_allmulticast_enable(struct rte_eth_dev *dev)
  {
  	struct hns3_adapter *hns = dev->data->dev_private;
  	struct hns3_hw *hw = &hns->hw;
 -	bool en_uc_pmc = (dev->data->promiscuous == 1) ? true : false;
- 	int ret;
+ 	int ret = 0;
  
 +	if (dev->data->promiscuous)
 +		return 0;
@@ -90,12 +91,12 @@
  
  	return ret;
  }
-@@ -3754,18 +3758,18 @@ hns3_dev_allmulticast_disable(struct rte_eth_dev *dev)
+@@ -3629,18 +3633,18 @@ hns3_dev_allmulticast_disable(struct rte_eth_dev *dev)
  {
  	struct hns3_adapter *hns = dev->data->dev_private;
  	struct hns3_hw *hw = &hns->hw;
 -	bool en_uc_pmc = (dev->data->promiscuous == 1) ? true : false;
- 	int ret;
+ 	int ret = 0;
  
  	/* If now in promiscuous mode, must remain in all_multicast mode. */
 -	if (dev->data->promiscuous == 1)
@@ -113,7 +114,7 @@
  
  	return ret;
  }
-@@ -3774,13 +3778,12 @@ static int
+@@ -3649,13 +3653,12 @@ static int
  hns3_dev_promisc_restore(struct hns3_adapter *hns)
  {
  	struct hns3_hw *hw = &hns->hw;

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

* [dpdk-stable] patch 'ethdev: fix spelling' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (34 preceding siblings ...)
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/hns3: fix promiscuous mode for PF' " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/sfc: fix promiscuous and allmulticast toggles errors' " luca.boccassi
                   ` (43 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 6c1634ec93039559ff759969916e6ed52e02810b Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 10 Mar 2020 09:24:05 -0700
Subject: [PATCH] ethdev: fix spelling

[ upstream commit 897358cc1e61e950b8e6a1755c6b998f697b0ab9 ]

Minor spelling errors found by aspell and codespell

Fixes: 1daa33805824 ("ethdev: validate offloads set by PMD")
Fixes: 81f9db8ecc2c ("ethdev: add vlan offload support")
Fixes: c8231c63ddcb ("ethdev: insert Rx callback as head of list")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_ethdev/rte_ethdev.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 9d62dc4360..c3657509c5 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -1166,14 +1166,14 @@ check_lro_pkt_size(uint16_t port_id, uint32_t config_size,
 
 /*
  * Validate offloads that are requested through rte_eth_dev_configure against
- * the offloads successfuly set by the ethernet device.
+ * the offloads successfully set by the ethernet device.
  *
  * @param port_id
  *   The port identifier of the Ethernet device.
  * @param req_offloads
  *   The offloads that have been requested through `rte_eth_dev_configure`.
  * @param set_offloads
- *   The offloads successfuly set by the ethernet device.
+ *   The offloads successfully set by the ethernet device.
  * @param offload_type
  *   The offload type i.e. Rx/Tx string.
  * @param offload_name
@@ -1202,7 +1202,7 @@ validate_offloads(uint16_t port_id, uint64_t req_offloads,
 			ret = -EINVAL;
 		}
 
-		/* Chech if offload couldn't be disabled. */
+		/* Check if offload couldn't be disabled. */
 		if (offload & set_offloads) {
 			RTE_ETHDEV_LOG(DEBUG,
 				"Port %u %s offload %s is not requested but enabled\n",
@@ -3263,7 +3263,7 @@ rte_eth_dev_set_vlan_offload(uint16_t port_id, int offload_mask)
 	orig_offloads = dev->data->dev_conf.rxmode.offloads;
 	dev_offloads = orig_offloads;
 
-	/*check which option changed by application*/
+	/* check which option changed by application */
 	cur = !!(offload_mask & ETH_VLAN_STRIP_OFFLOAD);
 	org = !!(dev_offloads & DEV_RX_OFFLOAD_VLAN_STRIP);
 	if (cur != org) {
@@ -4454,7 +4454,7 @@ rte_eth_add_first_rx_callback(uint16_t port_id, uint16_t queue_id,
 	cb->param = user_param;
 
 	rte_spinlock_lock(&rte_eth_rx_cb_lock);
-	/* Add the callbacks at fisrt position*/
+	/* Add the callbacks at first position */
 	cb->next = rte_eth_devices[port_id].post_rx_burst_cbs[queue_id];
 	rte_smp_wmb();
 	rte_eth_devices[port_id].post_rx_burst_cbs[queue_id] = cb;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:20.347120620 +0100
+++ 0037-ethdev-fix-spelling.patch	2020-05-19 13:56:18.235502107 +0100
@@ -1,14 +1,15 @@
-From 897358cc1e61e950b8e6a1755c6b998f697b0ab9 Mon Sep 17 00:00:00 2001
+From 6c1634ec93039559ff759969916e6ed52e02810b Mon Sep 17 00:00:00 2001
 From: Stephen Hemminger <stephen@networkplumber.org>
 Date: Tue, 10 Mar 2020 09:24:05 -0700
 Subject: [PATCH] ethdev: fix spelling
 
+[ upstream commit 897358cc1e61e950b8e6a1755c6b998f697b0ab9 ]
+
 Minor spelling errors found by aspell and codespell
 
 Fixes: 1daa33805824 ("ethdev: validate offloads set by PMD")
 Fixes: 81f9db8ecc2c ("ethdev: add vlan offload support")
 Fixes: c8231c63ddcb ("ethdev: insert Rx callback as head of list")
-Cc: stable@dpdk.org
 
 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -17,10 +18,10 @@
  1 file changed, 5 insertions(+), 5 deletions(-)
 
 diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
-index 774c721b34..0854ef8832 100644
+index 9d62dc4360..c3657509c5 100644
 --- a/lib/librte_ethdev/rte_ethdev.c
 +++ b/lib/librte_ethdev/rte_ethdev.c
-@@ -1164,14 +1164,14 @@ check_lro_pkt_size(uint16_t port_id, uint32_t config_size,
+@@ -1166,14 +1166,14 @@ check_lro_pkt_size(uint16_t port_id, uint32_t config_size,
  
  /*
   * Validate offloads that are requested through rte_eth_dev_configure against
@@ -37,7 +38,7 @@
   * @param offload_type
   *   The offload type i.e. Rx/Tx string.
   * @param offload_name
-@@ -1200,7 +1200,7 @@ validate_offloads(uint16_t port_id, uint64_t req_offloads,
+@@ -1202,7 +1202,7 @@ validate_offloads(uint16_t port_id, uint64_t req_offloads,
  			ret = -EINVAL;
  		}
  
@@ -46,7 +47,7 @@
  		if (offload & set_offloads) {
  			RTE_ETHDEV_LOG(DEBUG,
  				"Port %u %s offload %s is not requested but enabled\n",
-@@ -3261,7 +3261,7 @@ rte_eth_dev_set_vlan_offload(uint16_t port_id, int offload_mask)
+@@ -3263,7 +3263,7 @@ rte_eth_dev_set_vlan_offload(uint16_t port_id, int offload_mask)
  	orig_offloads = dev->data->dev_conf.rxmode.offloads;
  	dev_offloads = orig_offloads;
  
@@ -55,7 +56,7 @@
  	cur = !!(offload_mask & ETH_VLAN_STRIP_OFFLOAD);
  	org = !!(dev_offloads & DEV_RX_OFFLOAD_VLAN_STRIP);
  	if (cur != org) {
-@@ -4452,7 +4452,7 @@ rte_eth_add_first_rx_callback(uint16_t port_id, uint16_t queue_id,
+@@ -4454,7 +4454,7 @@ rte_eth_add_first_rx_callback(uint16_t port_id, uint16_t queue_id,
  	cb->param = user_param;
  
  	rte_spinlock_lock(&rte_eth_rx_cb_lock);

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

* [dpdk-stable] patch 'net/sfc: fix promiscuous and allmulticast toggles errors' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (35 preceding siblings ...)
  2020-05-19 12:53 ` [dpdk-stable] patch 'ethdev: fix spelling' " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/sfc: set priority of created filters to manual' " luca.boccassi
                   ` (42 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Igor Romanov; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 8771074d951a6030d11633b963da6adec9ddcef9 Mon Sep 17 00:00:00 2001
From: Igor Romanov <igor.romanov@oktetlabs.ru>
Date: Tue, 10 Mar 2020 09:42:09 +0000
Subject: [PATCH] net/sfc: fix promiscuous and allmulticast toggles errors

[ upstream commit 7329b56f116881e745bd792f435bb4467d1d0abe ]

Returned errors of ethdev callbacks are negative. Internal
sfc functions return positive errors, so convert them to
negative value.

Fixes: 9039c8125730 ("ethdev: change promiscuous callbacks to return status")

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/sfc_ethdev.c | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index 098038fbc0..f8867b0ec0 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -405,25 +405,37 @@ sfc_dev_filter_set(struct rte_eth_dev *dev, enum sfc_dev_filter_mode mode,
 static int
 sfc_dev_promisc_enable(struct rte_eth_dev *dev)
 {
-	return sfc_dev_filter_set(dev, SFC_DEV_FILTER_MODE_PROMISC, B_TRUE);
+	int rc = sfc_dev_filter_set(dev, SFC_DEV_FILTER_MODE_PROMISC, B_TRUE);
+
+	SFC_ASSERT(rc >= 0);
+	return -rc;
 }
 
 static int
 sfc_dev_promisc_disable(struct rte_eth_dev *dev)
 {
-	return sfc_dev_filter_set(dev, SFC_DEV_FILTER_MODE_PROMISC, B_FALSE);
+	int rc = sfc_dev_filter_set(dev, SFC_DEV_FILTER_MODE_PROMISC, B_FALSE);
+
+	SFC_ASSERT(rc >= 0);
+	return -rc;
 }
 
 static int
 sfc_dev_allmulti_enable(struct rte_eth_dev *dev)
 {
-	return sfc_dev_filter_set(dev, SFC_DEV_FILTER_MODE_ALLMULTI, B_TRUE);
+	int rc = sfc_dev_filter_set(dev, SFC_DEV_FILTER_MODE_ALLMULTI, B_TRUE);
+
+	SFC_ASSERT(rc >= 0);
+	return -rc;
 }
 
 static int
 sfc_dev_allmulti_disable(struct rte_eth_dev *dev)
 {
-	return sfc_dev_filter_set(dev, SFC_DEV_FILTER_MODE_ALLMULTI, B_FALSE);
+	int rc = sfc_dev_filter_set(dev, SFC_DEV_FILTER_MODE_ALLMULTI, B_FALSE);
+
+	SFC_ASSERT(rc >= 0);
+	return -rc;
 }
 
 static int
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:20.389939262 +0100
+++ 0038-net-sfc-fix-promiscuous-and-allmulticast-toggles-err.patch	2020-05-19 13:56:18.239502179 +0100
@@ -1,14 +1,15 @@
-From 7329b56f116881e745bd792f435bb4467d1d0abe Mon Sep 17 00:00:00 2001
+From 8771074d951a6030d11633b963da6adec9ddcef9 Mon Sep 17 00:00:00 2001
 From: Igor Romanov <igor.romanov@oktetlabs.ru>
 Date: Tue, 10 Mar 2020 09:42:09 +0000
 Subject: [PATCH] net/sfc: fix promiscuous and allmulticast toggles errors
 
+[ upstream commit 7329b56f116881e745bd792f435bb4467d1d0abe ]
+
 Returned errors of ethdev callbacks are negative. Internal
 sfc functions return positive errors, so convert them to
 negative value.
 
 Fixes: 9039c8125730 ("ethdev: change promiscuous callbacks to return status")
-Cc: stable@dpdk.org
 
 Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>

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

* [dpdk-stable] patch 'net/sfc: set priority of created filters to manual' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (36 preceding siblings ...)
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/sfc: fix promiscuous and allmulticast toggles errors' " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/sfc/base: reduce filter priorities to implemented only' " luca.boccassi
                   ` (41 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Igor Romanov; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From c239286b98554bce9e4d1ab2d25b215451a451e8 Mon Sep 17 00:00:00 2001
From: Igor Romanov <igor.romanov@oktetlabs.ru>
Date: Tue, 10 Mar 2020 09:48:35 +0000
Subject: [PATCH] net/sfc: set priority of created filters to manual

[ upstream commit f6752f660fef18c843f45b9ff12b1dc98073c5a1 ]

The priority should be explicitly set to manual for correct
usage of libefx filters.

Fixes: a9825ccf5bb8 ("net/sfc: support flow API filters")

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/sfc_flow.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/sfc/sfc_flow.c b/drivers/net/sfc/sfc_flow.c
index 8d636f6923..023e55d951 100644
--- a/drivers/net/sfc/sfc_flow.c
+++ b/drivers/net/sfc/sfc_flow.c
@@ -1132,6 +1132,7 @@ sfc_flow_parse_attr(const struct rte_flow_attr *attr,
 
 	flow->spec.template.efs_flags |= EFX_FILTER_FLAG_RX;
 	flow->spec.template.efs_rss_context = EFX_RSS_CONTEXT_DEFAULT;
+	flow->spec.template.efs_priority = EFX_FILTER_PRI_MANUAL;
 
 	return 0;
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:20.429194417 +0100
+++ 0039-net-sfc-set-priority-of-created-filters-to-manual.patch	2020-05-19 13:56:18.239502179 +0100
@@ -1,13 +1,14 @@
-From f6752f660fef18c843f45b9ff12b1dc98073c5a1 Mon Sep 17 00:00:00 2001
+From c239286b98554bce9e4d1ab2d25b215451a451e8 Mon Sep 17 00:00:00 2001
 From: Igor Romanov <igor.romanov@oktetlabs.ru>
 Date: Tue, 10 Mar 2020 09:48:35 +0000
 Subject: [PATCH] net/sfc: set priority of created filters to manual
 
+[ upstream commit f6752f660fef18c843f45b9ff12b1dc98073c5a1 ]
+
 The priority should be explicitly set to manual for correct
 usage of libefx filters.
 
 Fixes: a9825ccf5bb8 ("net/sfc: support flow API filters")
-Cc: stable@dpdk.org
 
 Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
@@ -16,17 +17,17 @@
  1 file changed, 1 insertion(+)
 
 diff --git a/drivers/net/sfc/sfc_flow.c b/drivers/net/sfc/sfc_flow.c
-index ec0ca3cd6b..83414b1bd2 100644
+index 8d636f6923..023e55d951 100644
 --- a/drivers/net/sfc/sfc_flow.c
 +++ b/drivers/net/sfc/sfc_flow.c
-@@ -1164,6 +1164,7 @@ sfc_flow_parse_attr(const struct rte_flow_attr *attr,
- 		spec->type = SFC_FLOW_SPEC_FILTER;
- 		spec_filter->template.efs_flags |= EFX_FILTER_FLAG_RX;
- 		spec_filter->template.efs_rss_context = EFX_RSS_CONTEXT_DEFAULT;
-+		spec_filter->template.efs_priority = EFX_FILTER_PRI_MANUAL;
- 	} else {
- 		rte_flow_error_set(error, ENOTSUP,
- 				   RTE_FLOW_ERROR_TYPE_ATTR_TRANSFER, attr,
+@@ -1132,6 +1132,7 @@ sfc_flow_parse_attr(const struct rte_flow_attr *attr,
+ 
+ 	flow->spec.template.efs_flags |= EFX_FILTER_FLAG_RX;
+ 	flow->spec.template.efs_rss_context = EFX_RSS_CONTEXT_DEFAULT;
++	flow->spec.template.efs_priority = EFX_FILTER_PRI_MANUAL;
+ 
+ 	return 0;
+ }
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'net/sfc/base: reduce filter priorities to implemented only' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (37 preceding siblings ...)
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/sfc: set priority of created filters to manual' " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/sfc/base: reject automatic filter creation by users' " luca.boccassi
                   ` (40 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Igor Romanov; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 0e4497208aee109be9a50699d1595520ce6e2ddf Mon Sep 17 00:00:00 2001
From: Igor Romanov <igor.romanov@oktetlabs.ru>
Date: Tue, 10 Mar 2020 09:48:36 +0000
Subject: [PATCH] net/sfc/base: reduce filter priorities to implemented only

[ upstream commit 5b1dd95e270bfc4a824aad8fd560ce97f06679d1 ]

Only implemented filter priorities are manual and auto. Remove
unused priorities since exposing unimplemented functionality
is of no benefit.

Tx filter specification default priority is changed to manual,
since required priority does not differ from it in the implementation.

Fixes: f9565517ff4f ("net/sfc/base: import filters support")

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/base/efx.h        | 6 +-----
 drivers/net/sfc/base/efx_filter.c | 2 +-
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/net/sfc/base/efx.h b/drivers/net/sfc/base/efx.h
index 53ddaa987c..c609c700fa 100644
--- a/drivers/net/sfc/base/efx.h
+++ b/drivers/net/sfc/base/efx.h
@@ -2950,16 +2950,12 @@ typedef uint8_t efx_filter_flags_t;
 typedef uint32_t efx_filter_match_flags_t;
 
 typedef enum efx_filter_priority_s {
-	EFX_FILTER_PRI_HINT = 0,	/* Performance hint */
-	EFX_FILTER_PRI_AUTO,		/* Automatic filter based on device
+	EFX_FILTER_PRI_AUTO = 0,	/* Automatic filter based on device
 					 * address list or hardware
 					 * requirements. This may only be used
 					 * by the filter implementation for
 					 * each NIC type. */
 	EFX_FILTER_PRI_MANUAL,		/* Manually configured filter */
-	EFX_FILTER_PRI_REQUIRED,	/* Required for correct behaviour of the
-					 * client (e.g. SR-IOV, HyperV VMQ etc.)
-					 */
 } efx_filter_priority_t;
 
 /*
diff --git a/drivers/net/sfc/base/efx_filter.c b/drivers/net/sfc/base/efx_filter.c
index 7efb380641..575f6228be 100644
--- a/drivers/net/sfc/base/efx_filter.c
+++ b/drivers/net/sfc/base/efx_filter.c
@@ -314,7 +314,7 @@ efx_filter_spec_init_tx(
 	EFSYS_ASSERT3P(etp, !=, NULL);
 
 	memset(spec, 0, sizeof (*spec));
-	spec->efs_priority = EFX_FILTER_PRI_REQUIRED;
+	spec->efs_priority = EFX_FILTER_PRI_MANUAL;
 	spec->efs_flags = EFX_FILTER_FLAG_TX;
 	spec->efs_dmaq_id = (uint16_t)etp->et_index;
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:20.468700212 +0100
+++ 0040-net-sfc-base-reduce-filter-priorities-to-implemented.patch	2020-05-19 13:56:18.243502251 +0100
@@ -1,8 +1,10 @@
-From 5b1dd95e270bfc4a824aad8fd560ce97f06679d1 Mon Sep 17 00:00:00 2001
+From 0e4497208aee109be9a50699d1595520ce6e2ddf Mon Sep 17 00:00:00 2001
 From: Igor Romanov <igor.romanov@oktetlabs.ru>
 Date: Tue, 10 Mar 2020 09:48:36 +0000
 Subject: [PATCH] net/sfc/base: reduce filter priorities to implemented only
 
+[ upstream commit 5b1dd95e270bfc4a824aad8fd560ce97f06679d1 ]
+
 Only implemented filter priorities are manual and auto. Remove
 unused priorities since exposing unimplemented functionality
 is of no benefit.
@@ -11,7 +13,6 @@
 since required priority does not differ from it in the implementation.
 
 Fixes: f9565517ff4f ("net/sfc/base: import filters support")
-Cc: stable@dpdk.org
 
 Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>

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

* [dpdk-stable] patch 'net/sfc/base: reject automatic filter creation by users' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (38 preceding siblings ...)
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/sfc/base: reduce filter priorities to implemented only' " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/sfc/base: refactor filter lookup loop in EF10' " luca.boccassi
                   ` (39 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Igor Romanov; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 9e496b76abe42d8acb49fd15c6b6960f775207aa Mon Sep 17 00:00:00 2001
From: Igor Romanov <igor.romanov@oktetlabs.ru>
Date: Tue, 10 Mar 2020 09:48:37 +0000
Subject: [PATCH] net/sfc/base: reject automatic filter creation by users

[ upstream commit fbf423bbf2d298e4fc0e3f3a0d498ddb8bada94b ]

The automatic filter priority may only be used by filter implementation,
so reject the attempts to create such filters by client drivers.

Fixes: f9565517ff4f ("net/sfc/base: import filters support")

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/base/efx_filter.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/sfc/base/efx_filter.c b/drivers/net/sfc/base/efx_filter.c
index 575f6228be..36332a2801 100644
--- a/drivers/net/sfc/base/efx_filter.c
+++ b/drivers/net/sfc/base/efx_filter.c
@@ -93,8 +93,15 @@ efx_filter_insert(
 		goto fail2;
 	}
 
+	if (spec->efs_priority == EFX_FILTER_PRI_AUTO) {
+		rc = EINVAL;
+		goto fail3;
+	}
+
 	return (efop->efo_add(enp, spec, B_FALSE));
 
+fail3:
+	EFSYS_PROBE(fail3);
 fail2:
 	EFSYS_PROBE(fail2);
 fail1:
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:20.510475961 +0100
+++ 0041-net-sfc-base-reject-automatic-filter-creation-by-use.patch	2020-05-19 13:56:18.243502251 +0100
@@ -1,13 +1,14 @@
-From fbf423bbf2d298e4fc0e3f3a0d498ddb8bada94b Mon Sep 17 00:00:00 2001
+From 9e496b76abe42d8acb49fd15c6b6960f775207aa Mon Sep 17 00:00:00 2001
 From: Igor Romanov <igor.romanov@oktetlabs.ru>
 Date: Tue, 10 Mar 2020 09:48:37 +0000
 Subject: [PATCH] net/sfc/base: reject automatic filter creation by users
 
+[ upstream commit fbf423bbf2d298e4fc0e3f3a0d498ddb8bada94b ]
+
 The automatic filter priority may only be used by filter implementation,
 so reject the attempts to create such filters by client drivers.
 
 Fixes: f9565517ff4f ("net/sfc/base: import filters support")
-Cc: stable@dpdk.org
 
 Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>

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

* [dpdk-stable] patch 'net/sfc/base: refactor filter lookup loop in EF10' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (39 preceding siblings ...)
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/sfc/base: reject automatic filter creation by users' " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/sfc/base: handle manual and auto filter clashes " luca.boccassi
                   ` (38 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Igor Romanov; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From c6ae74f068cb41064c408678a5841f31e68305d0 Mon Sep 17 00:00:00 2001
From: Igor Romanov <igor.romanov@oktetlabs.ru>
Date: Tue, 10 Mar 2020 09:48:38 +0000
Subject: [PATCH] net/sfc/base: refactor filter lookup loop in EF10

[ upstream commit ad3727f71f2aa75c8a102ad0e0a1c9e99840f45b ]

The code is refactored to make it more clear and allow for
more convenient further changes.

Fixes: e7cd430c864f ("net/sfc/base: import SFN7xxx family support")

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/base/ef10_filter.c | 80 ++++++++++++++----------------
 1 file changed, 38 insertions(+), 42 deletions(-)

diff --git a/drivers/net/sfc/base/ef10_filter.c b/drivers/net/sfc/base/ef10_filter.c
index e4f8de51c0..5578765ab3 100644
--- a/drivers/net/sfc/base/ef10_filter.c
+++ b/drivers/net/sfc/base/ef10_filter.c
@@ -628,56 +628,52 @@ ef10_filter_add_internal(
 	 * else a free slot to insert at.  If any of them are busy,
 	 * we have to wait and retry.
 	 */
-	for (;;) {
-		ins_index = -1;
-		depth = 1;
-		EFSYS_LOCK(enp->en_eslp, state);
-		locked = B_TRUE;
+retry:
+	EFSYS_LOCK(enp->en_eslp, state);
+	locked = B_TRUE;
 
-		for (;;) {
-			i = (hash + depth) & (EFX_EF10_FILTER_TBL_ROWS - 1);
-			saved_spec = ef10_filter_entry_spec(eftp, i);
+	ins_index = -1;
 
-			if (!saved_spec) {
-				if (ins_index < 0) {
-					ins_index = i;
-				}
-			} else if (ef10_filter_equal(spec, saved_spec)) {
-				if (ef10_filter_entry_is_busy(eftp, i))
-					break;
-				if (saved_spec->efs_priority
-					    == EFX_FILTER_PRI_AUTO) {
-					ins_index = i;
-					goto found;
-				} else if (ef10_filter_is_exclusive(spec)) {
-					if (may_replace) {
-						ins_index = i;
-						goto found;
-					} else {
-						rc = EEXIST;
-						goto fail1;
-					}
-				}
+	for (depth = 1; depth <= EF10_FILTER_SEARCH_LIMIT; depth++) {
+		i = (hash + depth) & (EFX_EF10_FILTER_TBL_ROWS - 1);
+		saved_spec = ef10_filter_entry_spec(eftp, i);
 
-				/* Leave existing */
+		if (saved_spec == NULL) {
+			if (ins_index < 0)
+				ins_index = i;
+		} else if (ef10_filter_equal(spec, saved_spec)) {
+			if (ef10_filter_entry_is_busy(eftp, i)) {
+				EFSYS_UNLOCK(enp->en_eslp, state);
+				locked = B_FALSE;
+				goto retry;
 			}
 
-			/*
-			 * Once we reach the maximum search depth, use
-			 * the first suitable slot or return EBUSY if
-			 * there was none.
-			 */
-			if (depth == EF10_FILTER_SEARCH_LIMIT) {
-				if (ins_index < 0) {
-					rc = EBUSY;
-					goto fail2;
-				}
+			if (saved_spec->efs_priority == EFX_FILTER_PRI_AUTO) {
+				ins_index = i;
 				goto found;
 			}
-			depth++;
+
+			if (ef10_filter_is_exclusive(spec)) {
+				if (may_replace) {
+					ins_index = i;
+					goto found;
+				} else {
+					rc = EEXIST;
+					goto fail1;
+				}
+			}
+
+			/* Leave existing */
 		}
-		EFSYS_UNLOCK(enp->en_eslp, state);
-		locked = B_FALSE;
+	}
+
+	/*
+	 * Once we reach the maximum search depth, use the first suitable slot
+	 * or return EBUSY if there was none.
+	 */
+	if (ins_index < 0) {
+		rc = EBUSY;
+		goto fail2;
 	}
 
 found:
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:20.547584364 +0100
+++ 0042-net-sfc-base-refactor-filter-lookup-loop-in-EF10.patch	2020-05-19 13:56:18.243502251 +0100
@@ -1,13 +1,14 @@
-From ad3727f71f2aa75c8a102ad0e0a1c9e99840f45b Mon Sep 17 00:00:00 2001
+From c6ae74f068cb41064c408678a5841f31e68305d0 Mon Sep 17 00:00:00 2001
 From: Igor Romanov <igor.romanov@oktetlabs.ru>
 Date: Tue, 10 Mar 2020 09:48:38 +0000
 Subject: [PATCH] net/sfc/base: refactor filter lookup loop in EF10
 
+[ upstream commit ad3727f71f2aa75c8a102ad0e0a1c9e99840f45b ]
+
 The code is refactored to make it more clear and allow for
 more convenient further changes.
 
 Fixes: e7cd430c864f ("net/sfc/base: import SFN7xxx family support")
-Cc: stable@dpdk.org
 
 Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>

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

* [dpdk-stable] patch 'net/sfc/base: handle manual and auto filter clashes in EF10' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (40 preceding siblings ...)
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/sfc/base: refactor filter lookup loop in EF10' " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-20  9:53   ` Igor Romanov
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/mlx5: fix zero metadata action' " luca.boccassi
                   ` (37 subsequent siblings)
  79 siblings, 1 reply; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Igor Romanov; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 8ea2ea8fe40c8a13bca536bcb4683d9225cd0ea2 Mon Sep 17 00:00:00 2001
From: Igor Romanov <igor.romanov@oktetlabs.ru>
Date: Tue, 10 Mar 2020 09:48:39 +0000
Subject: [PATCH] net/sfc/base: handle manual and auto filter clashes in EF10

[ upstream commit 585c22edb29cc3cfdb3628c41effd8ff3b75f224 ]

Make user filters a priority in EF10 datapath. When a manual
filter with a specification that is equal to an existing auto
filter is inserted, the manual filter:
- replaces auto filter if the specification is exclusive;
- is inserted along existing auto filter otherwise;

In the first case the auto filter that was replaced is saved.
This saved filter can be updated on filter reconfiguration and
is restored on the manual filter removal.

Fixes: e7cd430c864f ("net/sfc/base: import SFN7xxx family support")

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/base/ef10_filter.c | 519 ++++++++++++++++++++++-------
 drivers/net/sfc/base/ef10_impl.h   |   4 +-
 drivers/net/sfc/base/efx.h         |   7 +
 drivers/net/sfc/base/efx_filter.c  |  17 +-
 drivers/net/sfc/base/efx_impl.h    |  21 +-
 5 files changed, 437 insertions(+), 131 deletions(-)

diff --git a/drivers/net/sfc/base/ef10_filter.c b/drivers/net/sfc/base/ef10_filter.c
index 5578765ab3..12802a3d13 100644
--- a/drivers/net/sfc/base/ef10_filter.c
+++ b/drivers/net/sfc/base/ef10_filter.c
@@ -590,6 +590,231 @@ fail1:
 	return (rc);
 }
 
+enum ef10_filter_add_action_e {
+	/* Insert a new filter */
+	EF10_FILTER_ADD_NEW,
+	/*
+	 * Replace old filter with a new, overriding the old one
+	 * if it has lower priority.
+	 */
+	EF10_FILTER_ADD_REPLACE,
+	/* Store new, lower priority filter as overridden by old filter */
+	EF10_FILTER_ADD_STORE,
+	/* Special case for AUTO filters, remove AUTO_OLD flag */
+	EF10_FILTER_ADD_REFRESH,
+};
+
+static	__checkReturn	efx_rc_t
+ef10_filter_add_lookup_equal_spec(
+	__in		efx_filter_spec_t *spec,
+	__in		efx_filter_spec_t *probe_spec,
+	__in		efx_filter_replacement_policy_t policy,
+	__out		boolean_t *found)
+{
+	efx_rc_t rc;
+
+	/* Refreshing AUTO filter */
+	if (spec->efs_priority == EFX_FILTER_PRI_AUTO &&
+	    probe_spec->efs_priority == EFX_FILTER_PRI_AUTO) {
+		*found = B_TRUE;
+		return (0);
+	}
+
+	/*
+	 * With exclusive filters, higher priority ones
+	 * override lower priority ones, and lower priority
+	 * ones are stored in case the higher priority one
+	 * is removed.
+	 */
+	if (ef10_filter_is_exclusive(spec)) {
+		switch (policy) {
+		case EFX_FILTER_REPLACEMENT_HIGHER_OR_EQUAL_PRIORITY:
+			if (spec->efs_priority == probe_spec->efs_priority) {
+				*found = B_TRUE;
+				break;
+			}
+			/* Fall-through */
+		case EFX_FILTER_REPLACEMENT_HIGHER_PRIORITY:
+			if (spec->efs_priority > probe_spec->efs_priority) {
+				*found = B_TRUE;
+				break;
+			}
+			/* Fall-through */
+		case EFX_FILTER_REPLACEMENT_NEVER:
+			/*
+			 * Lower priority filter needs to be
+			 * stored. It does *not* replace the
+			 * old one. That is why EEXIST is not
+			 * returned in that case.
+			 */
+			if (spec->efs_priority < probe_spec->efs_priority) {
+				*found = B_TRUE;
+				break;
+			} else {
+				rc = EEXIST;
+				goto fail1;
+			}
+		default:
+			EFSYS_ASSERT(0);
+			rc = EEXIST;
+			goto fail2;
+		}
+	} else {
+		*found = B_FALSE;
+	}
+
+	return (0);
+
+fail2:
+	EFSYS_PROBE(fail2);
+
+fail1:
+	EFSYS_PROBE1(fail1, efx_rc_t, rc);
+
+	return (rc);
+}
+
+
+static			void
+ef10_filter_add_select_action(
+	__in		efx_filter_spec_t *saved_spec,
+	__in		efx_filter_spec_t *spec,
+	__out		enum ef10_filter_add_action_e *action,
+	__out		efx_filter_spec_t **overridden_spec)
+{
+	efx_filter_spec_t *overridden = NULL;
+
+	if (saved_spec == NULL) {
+		*action = EF10_FILTER_ADD_NEW;
+	} else if (ef10_filter_is_exclusive(spec) == B_FALSE) {
+		/*
+		 * Non-exclusive filters are always stored in separate entries
+		 * in the table. The only case involving a saved spec is
+		 * refreshing an AUTO filter.
+		 */
+		EFSYS_ASSERT(saved_spec->efs_overridden_spec == NULL);
+		EFSYS_ASSERT(spec->efs_priority == EFX_FILTER_PRI_AUTO);
+		EFSYS_ASSERT(saved_spec->efs_priority == EFX_FILTER_PRI_AUTO);
+		*action = EF10_FILTER_ADD_REFRESH;
+	} else {
+		/* Exclusive filters stored in the same entry */
+		if (spec->efs_priority > saved_spec->efs_priority) {
+			/*
+			 * Insert a high priority filter over a lower priority
+			 * one. Only two priority levels are implemented, so
+			 * there must not already be an overridden filter.
+			 */
+			EFX_STATIC_ASSERT(EFX_FILTER_NPRI == 2);
+			EFSYS_ASSERT(saved_spec->efs_overridden_spec == NULL);
+			overridden = saved_spec;
+			*action = EF10_FILTER_ADD_REPLACE;
+		} else if (spec->efs_priority == saved_spec->efs_priority) {
+			/* Replace in-place or refresh an existing filter */
+			if (spec->efs_priority == EFX_FILTER_PRI_AUTO)
+				*action = EF10_FILTER_ADD_REFRESH;
+			else
+				*action = EF10_FILTER_ADD_REPLACE;
+		} else {
+			/*
+			 * Insert a lower priority filter, storing it in case
+			 * the higher priority filter is removed.
+			 *
+			 * Currently there are only two priority levels, so this
+			 * must be an AUTO filter.
+			 */
+			EFX_STATIC_ASSERT(EFX_FILTER_NPRI == 2);
+			EFSYS_ASSERT(spec->efs_priority == EFX_FILTER_PRI_AUTO);
+			if (saved_spec->efs_overridden_spec != NULL) {
+				*action = EF10_FILTER_ADD_REFRESH;
+			} else {
+				overridden = spec;
+				*action = EF10_FILTER_ADD_STORE;
+			}
+		}
+	}
+
+	*overridden_spec = overridden;
+}
+
+static	__checkReturn	efx_rc_t
+ef10_filter_add_execute_action(
+	__in		efx_nic_t *enp,
+	__in		efx_filter_spec_t *saved_spec,
+	__in		efx_filter_spec_t *spec,
+	__in		efx_filter_spec_t *overridden_spec,
+	__in		enum ef10_filter_add_action_e action,
+	__in		int ins_index)
+{
+	ef10_filter_table_t *eftp = enp->en_filter.ef_ef10_filter_table;
+	efsys_lock_state_t state;
+	efx_rc_t rc;
+
+	EFSYS_LOCK(enp->en_eslp, state);
+
+	if (action == EF10_FILTER_ADD_REFRESH) {
+		ef10_filter_set_entry_not_auto_old(eftp, ins_index);
+		goto out_unlock;
+	} else if (action == EF10_FILTER_ADD_STORE) {
+		EFSYS_ASSERT(overridden_spec != NULL);
+		saved_spec->efs_overridden_spec = overridden_spec;
+		goto out_unlock;
+	}
+
+	EFSYS_UNLOCK(enp->en_eslp, state);
+
+	switch (action) {
+	case EF10_FILTER_ADD_REPLACE:
+		/*
+		 * On replacing the filter handle may change after a
+		 * successful replace operation.
+		 */
+		rc = efx_mcdi_filter_op_add(enp, spec,
+		    MC_CMD_FILTER_OP_IN_OP_REPLACE,
+		    &eftp->eft_entry[ins_index].efe_handle);
+		break;
+	case EF10_FILTER_ADD_NEW:
+		if (ef10_filter_is_exclusive(spec)) {
+			rc = efx_mcdi_filter_op_add(enp, spec,
+			    MC_CMD_FILTER_OP_IN_OP_INSERT,
+			    &eftp->eft_entry[ins_index].efe_handle);
+		} else {
+			rc = efx_mcdi_filter_op_add(enp, spec,
+			    MC_CMD_FILTER_OP_IN_OP_SUBSCRIBE,
+			    &eftp->eft_entry[ins_index].efe_handle);
+		}
+		break;
+	default:
+		rc = EINVAL;
+		EFSYS_ASSERT(0);
+		break;
+	}
+	if (rc != 0)
+		goto fail1;
+
+	EFSYS_LOCK(enp->en_eslp, state);
+
+	if (action == EF10_FILTER_ADD_REPLACE) {
+		/* Update the fields that may differ */
+		saved_spec->efs_priority = spec->efs_priority;
+		saved_spec->efs_flags = spec->efs_flags;
+		saved_spec->efs_rss_context = spec->efs_rss_context;
+		saved_spec->efs_dmaq_id = spec->efs_dmaq_id;
+
+		if (overridden_spec != NULL)
+			saved_spec->efs_overridden_spec = overridden_spec;
+	}
+
+out_unlock:
+	EFSYS_UNLOCK(enp->en_eslp, state);
+
+	return (0);
+
+fail1:
+	EFSYS_PROBE1(fail1, efx_rc_t, rc);
+
+	return (rc);
+}
+
 /*
  * An arbitrary search limit for the software hash table. As per the linux net
  * driver.
@@ -600,22 +825,24 @@ static	__checkReturn	efx_rc_t
 ef10_filter_add_internal(
 	__in		efx_nic_t *enp,
 	__inout		efx_filter_spec_t *spec,
-	__in		boolean_t may_replace,
+	__in		efx_filter_replacement_policy_t policy,
 	__out_opt	uint32_t *filter_id)
 {
 	efx_rc_t rc;
 	ef10_filter_table_t *eftp = enp->en_filter.ef_ef10_filter_table;
+	enum ef10_filter_add_action_e action;
+	efx_filter_spec_t *overridden_spec = NULL;
 	efx_filter_spec_t *saved_spec;
 	uint32_t hash;
 	unsigned int depth;
 	int ins_index;
-	boolean_t replacing = B_FALSE;
-	unsigned int i;
 	efsys_lock_state_t state;
 	boolean_t locked = B_FALSE;
 
 	EFSYS_ASSERT(EFX_FAMILY_IS_EF10(enp));
 
+	EFSYS_ASSERT(spec->efs_overridden_spec == NULL);
+
 	hash = ef10_filter_hash(spec);
 
 	/*
@@ -635,35 +862,33 @@ retry:
 	ins_index = -1;
 
 	for (depth = 1; depth <= EF10_FILTER_SEARCH_LIMIT; depth++) {
-		i = (hash + depth) & (EFX_EF10_FILTER_TBL_ROWS - 1);
-		saved_spec = ef10_filter_entry_spec(eftp, i);
+		unsigned int probe_index;
+		efx_filter_spec_t *probe_spec;
 
-		if (saved_spec == NULL) {
+		probe_index = (hash + depth) & (EFX_EF10_FILTER_TBL_ROWS - 1);
+		probe_spec = ef10_filter_entry_spec(eftp, probe_index);
+
+		if (probe_spec == NULL) {
 			if (ins_index < 0)
-				ins_index = i;
-		} else if (ef10_filter_equal(spec, saved_spec)) {
-			if (ef10_filter_entry_is_busy(eftp, i)) {
+				ins_index = probe_index;
+		} else if (ef10_filter_equal(spec, probe_spec)) {
+			boolean_t found;
+
+			if (ef10_filter_entry_is_busy(eftp, probe_index)) {
 				EFSYS_UNLOCK(enp->en_eslp, state);
 				locked = B_FALSE;
 				goto retry;
 			}
 
-			if (saved_spec->efs_priority == EFX_FILTER_PRI_AUTO) {
-				ins_index = i;
-				goto found;
-			}
+			rc = ef10_filter_add_lookup_equal_spec(spec,
+			    probe_spec, policy, &found);
+			if (rc != 0)
+				goto fail1;
 
-			if (ef10_filter_is_exclusive(spec)) {
-				if (may_replace) {
-					ins_index = i;
-					goto found;
-				} else {
-					rc = EEXIST;
-					goto fail1;
-				}
+			if (found != B_FALSE) {
+				ins_index = probe_index;
+				break;
 			}
-
-			/* Leave existing */
 		}
 	}
 
@@ -676,93 +901,90 @@ retry:
 		goto fail2;
 	}
 
-found:
 	/*
-	 * Create a software table entry if necessary, and mark it
-	 * busy.  We might yet fail to insert, but any attempt to
-	 * insert a conflicting filter while we're waiting for the
-	 * firmware must find the busy entry.
+	 * Mark software table entry busy. We might yet fail to insert,
+	 * but any attempt to insert a conflicting filter while we're
+	 * waiting for the firmware must find the busy entry.
 	 */
+	ef10_filter_set_entry_busy(eftp, ins_index);
+
 	saved_spec = ef10_filter_entry_spec(eftp, ins_index);
-	if (saved_spec) {
-		if (saved_spec->efs_priority == EFX_FILTER_PRI_AUTO) {
-			/* This is a filter we are refreshing */
-			ef10_filter_set_entry_not_auto_old(eftp, ins_index);
-			goto out_unlock;
+	ef10_filter_add_select_action(saved_spec, spec, &action,
+	    &overridden_spec);
 
-		}
-		replacing = B_TRUE;
-	} else {
-		EFSYS_KMEM_ALLOC(enp->en_esip, sizeof (*spec), saved_spec);
-		if (!saved_spec) {
+	/*
+	 * Allocate a new filter if found entry is empty or
+	 * a filter should be overridden.
+	 */
+	if (overridden_spec != NULL || saved_spec == NULL) {
+		efx_filter_spec_t *new_spec;
+
+		EFSYS_UNLOCK(enp->en_eslp, state);
+		locked = B_FALSE;
+
+		EFSYS_KMEM_ALLOC(enp->en_esip, sizeof (*new_spec), new_spec);
+		if (new_spec == NULL) {
 			rc = ENOMEM;
+			overridden_spec = NULL;
 			goto fail3;
 		}
-		*saved_spec = *spec;
-		ef10_filter_set_entry(eftp, ins_index, saved_spec);
+
+		EFSYS_LOCK(enp->en_eslp, state);
+		locked = B_TRUE;
+
+		if (saved_spec == NULL) {
+			*new_spec = *spec;
+			ef10_filter_set_entry(eftp, ins_index, new_spec);
+		} else {
+			*new_spec = *overridden_spec;
+			overridden_spec = new_spec;
+		}
 	}
-	ef10_filter_set_entry_busy(eftp, ins_index);
 
 	EFSYS_UNLOCK(enp->en_eslp, state);
 	locked = B_FALSE;
 
-	/*
-	 * On replacing the filter handle may change after after a successful
-	 * replace operation.
-	 */
-	if (replacing) {
-		rc = efx_mcdi_filter_op_add(enp, spec,
-		    MC_CMD_FILTER_OP_IN_OP_REPLACE,
-		    &eftp->eft_entry[ins_index].efe_handle);
-	} else if (ef10_filter_is_exclusive(spec)) {
-		rc = efx_mcdi_filter_op_add(enp, spec,
-		    MC_CMD_FILTER_OP_IN_OP_INSERT,
-		    &eftp->eft_entry[ins_index].efe_handle);
-	} else {
-		rc = efx_mcdi_filter_op_add(enp, spec,
-		    MC_CMD_FILTER_OP_IN_OP_SUBSCRIBE,
-		    &eftp->eft_entry[ins_index].efe_handle);
-	}
-
+	rc = ef10_filter_add_execute_action(enp, saved_spec, spec,
+	    overridden_spec, action, ins_index);
 	if (rc != 0)
 		goto fail4;
 
-	EFSYS_LOCK(enp->en_eslp, state);
-	locked = B_TRUE;
-
-	if (replacing) {
-		/* Update the fields that may differ */
-		saved_spec->efs_priority = spec->efs_priority;
-		saved_spec->efs_flags = spec->efs_flags;
-		saved_spec->efs_rss_context = spec->efs_rss_context;
-		saved_spec->efs_dmaq_id = spec->efs_dmaq_id;
-	}
-
-	ef10_filter_set_entry_not_busy(eftp, ins_index);
-
-out_unlock:
-
-	EFSYS_UNLOCK(enp->en_eslp, state);
-	locked = B_FALSE;
-
 	if (filter_id)
 		*filter_id = ins_index;
 
+	EFSYS_LOCK(enp->en_eslp, state);
+	ef10_filter_set_entry_not_busy(eftp, ins_index);
+	EFSYS_UNLOCK(enp->en_eslp, state);
+
 	return (0);
 
 fail4:
 	EFSYS_PROBE(fail4);
 
-	if (!replacing) {
-		EFSYS_KMEM_FREE(enp->en_esip, sizeof (*spec), saved_spec);
-		saved_spec = NULL;
+	EFSYS_ASSERT(locked == B_FALSE);
+	EFSYS_LOCK(enp->en_eslp, state);
+
+	if (action == EF10_FILTER_ADD_NEW) {
+		EFSYS_KMEM_FREE(enp->en_esip, sizeof (*spec),
+		    ef10_filter_entry_spec(eftp, ins_index));
+		ef10_filter_set_entry(eftp, ins_index, NULL);
 	}
-	ef10_filter_set_entry_not_busy(eftp, ins_index);
-	ef10_filter_set_entry(eftp, ins_index, NULL);
+
+	EFSYS_UNLOCK(enp->en_eslp, state);
+
+	if (overridden_spec != NULL)
+		EFSYS_KMEM_FREE(enp->en_esip, sizeof (*spec), overridden_spec);
 
 fail3:
 	EFSYS_PROBE(fail3);
 
+	EFSYS_ASSERT(locked == B_FALSE);
+	EFSYS_LOCK(enp->en_eslp, state);
+
+	ef10_filter_set_entry_not_busy(eftp, ins_index);
+
+	EFSYS_UNLOCK(enp->en_eslp, state);
+
 fail2:
 	EFSYS_PROBE(fail2);
 
@@ -779,11 +1001,11 @@ fail1:
 ef10_filter_add(
 	__in		efx_nic_t *enp,
 	__inout		efx_filter_spec_t *spec,
-	__in		boolean_t may_replace)
+	__in		enum efx_filter_replacement_policy_e policy)
 {
 	efx_rc_t rc;
 
-	rc = ef10_filter_add_internal(enp, spec, may_replace, NULL);
+	rc = ef10_filter_add_internal(enp, spec, policy, NULL);
 	if (rc != 0)
 		goto fail1;
 
@@ -795,11 +1017,15 @@ fail1:
 	return (rc);
 }
 
-
+/*
+ * Delete a filter by index from the filter table with priority
+ * that is not higher than specified.
+ */
 static	__checkReturn	efx_rc_t
 ef10_filter_delete_internal(
 	__in		efx_nic_t *enp,
-	__in		uint32_t filter_id)
+	__in		uint32_t filter_id,
+	__in		efx_filter_priority_t priority)
 {
 	efx_rc_t rc;
 	ef10_filter_table_t *table = enp->en_filter.ef_ef10_filter_table;
@@ -821,7 +1047,8 @@ ef10_filter_delete_internal(
 		EFSYS_LOCK(enp->en_eslp, state);
 	}
 	if ((spec = ef10_filter_entry_spec(table, filter_idx)) != NULL) {
-		ef10_filter_set_entry_busy(table, filter_idx);
+		if (spec->efs_priority <= priority)
+			ef10_filter_set_entry_busy(table, filter_idx);
 	}
 	EFSYS_UNLOCK(enp->en_eslp, state);
 
@@ -830,32 +1057,54 @@ ef10_filter_delete_internal(
 		goto fail1;
 	}
 
-	/*
-	 * Try to remove the hardware filter. This may fail if the MC has
-	 * rebooted (which frees all hardware filter resources).
-	 */
-	if (ef10_filter_is_exclusive(spec)) {
-		rc = efx_mcdi_filter_op_delete(enp,
-		    MC_CMD_FILTER_OP_IN_OP_REMOVE,
-		    &table->eft_entry[filter_idx].efe_handle);
+	if (spec->efs_priority > priority) {
+		/*
+		 * Applied filter stays, but overridden filter is removed since
+		 * next user request to delete the applied filter should not
+		 * restore outdated filter.
+		 */
+		if (spec->efs_overridden_spec != NULL) {
+			EFSYS_ASSERT(spec->efs_overridden_spec->efs_overridden_spec ==
+			    NULL);
+			EFSYS_KMEM_FREE(enp->en_esip, sizeof (*spec),
+			    spec->efs_overridden_spec);
+			spec->efs_overridden_spec = NULL;
+		}
 	} else {
-		rc = efx_mcdi_filter_op_delete(enp,
-		    MC_CMD_FILTER_OP_IN_OP_UNSUBSCRIBE,
-		    &table->eft_entry[filter_idx].efe_handle);
+		/*
+		 * Try to remove the hardware filter or replace it with the
+		 * saved automatic filter. This may fail if the MC has
+		 * rebooted (which frees all hardware filter resources).
+		 */
+		if (spec->efs_overridden_spec != NULL) {
+			rc = efx_mcdi_filter_op_add(enp,
+			    spec->efs_overridden_spec,
+			    MC_CMD_FILTER_OP_IN_OP_REPLACE,
+			    &table->eft_entry[filter_idx].efe_handle);
+		} else if (ef10_filter_is_exclusive(spec)) {
+			rc = efx_mcdi_filter_op_delete(enp,
+			    MC_CMD_FILTER_OP_IN_OP_REMOVE,
+			    &table->eft_entry[filter_idx].efe_handle);
+		} else {
+			rc = efx_mcdi_filter_op_delete(enp,
+			    MC_CMD_FILTER_OP_IN_OP_UNSUBSCRIBE,
+			    &table->eft_entry[filter_idx].efe_handle);
+		}
+
+		/* Free the software table entry */
+		EFSYS_LOCK(enp->en_eslp, state);
+		ef10_filter_set_entry_not_busy(table, filter_idx);
+		ef10_filter_set_entry(table, filter_idx,
+		    spec->efs_overridden_spec);
+		EFSYS_UNLOCK(enp->en_eslp, state);
+
+		EFSYS_KMEM_FREE(enp->en_esip, sizeof (*spec), spec);
+
+		/* Check result of hardware filter removal */
+		if (rc != 0)
+			goto fail2;
 	}
 
-	/* Free the software table entry */
-	EFSYS_LOCK(enp->en_eslp, state);
-	ef10_filter_set_entry_not_busy(table, filter_idx);
-	ef10_filter_set_entry(table, filter_idx, NULL);
-	EFSYS_UNLOCK(enp->en_eslp, state);
-
-	EFSYS_KMEM_FREE(enp->en_esip, sizeof (*spec), spec);
-
-	/* Check result of hardware filter removal */
-	if (rc != 0)
-		goto fail2;
-
 	return (0);
 
 fail2:
@@ -867,6 +1116,25 @@ fail1:
 	return (rc);
 }
 
+static			void
+ef10_filter_delete_auto(
+	__in		efx_nic_t *enp,
+	__in		uint32_t filter_id)
+{
+	ef10_filter_table_t *table = enp->en_filter.ef_ef10_filter_table;
+	uint32_t filter_idx = filter_id % EFX_EF10_FILTER_TBL_ROWS;
+
+	/*
+	 * AUTO_OLD flag is cleared since the auto filter that is to be removed
+	 * may not be the filter at the specified index itself, but the filter
+	 * that is overridden by it.
+	 */
+	ef10_filter_set_entry_not_auto_old(table, filter_idx);
+
+	(void) ef10_filter_delete_internal(enp, filter_idx,
+	    EFX_FILTER_PRI_AUTO);
+}
+
 	__checkReturn	efx_rc_t
 ef10_filter_delete(
 	__in		efx_nic_t *enp,
@@ -906,7 +1174,7 @@ ef10_filter_delete(
 	EFSYS_UNLOCK(enp->en_eslp, state);
 	locked = B_FALSE;
 
-	rc = ef10_filter_delete_internal(enp, i);
+	rc = ef10_filter_delete_internal(enp, i, EFX_FILTER_PRI_MANUAL);
 	if (rc != 0)
 		goto fail2;
 
@@ -1131,7 +1399,7 @@ ef10_filter_insert_unicast(
 	if (rc != 0)
 		goto fail1;
 
-	rc = ef10_filter_add_internal(enp, &spec, B_TRUE,
+	rc = ef10_filter_add_internal(enp, &spec, EFX_FILTER_REPLACEMENT_NEVER,
 	    &eftp->eft_unicst_filter_indexes[eftp->eft_unicst_filter_count]);
 	if (rc != 0)
 		goto fail2;
@@ -1165,7 +1433,7 @@ ef10_filter_insert_all_unicast(
 	rc = efx_filter_spec_set_uc_def(&spec);
 	if (rc != 0)
 		goto fail1;
-	rc = ef10_filter_add_internal(enp, &spec, B_TRUE,
+	rc = ef10_filter_add_internal(enp, &spec, EFX_FILTER_REPLACEMENT_NEVER,
 	    &eftp->eft_unicst_filter_indexes[eftp->eft_unicst_filter_count]);
 	if (rc != 0)
 		goto fail2;
@@ -1235,8 +1503,8 @@ ef10_filter_insert_multicast_list(
 			}
 		}
 
-		rc = ef10_filter_add_internal(enp, &spec, B_TRUE,
-					    &filter_index);
+		rc = ef10_filter_add_internal(enp, &spec,
+		    EFX_FILTER_REPLACEMENT_NEVER, &filter_index);
 
 		if (rc == 0) {
 			eftp->eft_mulcst_filter_indexes[filter_count] =
@@ -1263,8 +1531,8 @@ ef10_filter_insert_multicast_list(
 			goto rollback;
 		}
 
-		rc = ef10_filter_add_internal(enp, &spec, B_TRUE,
-					    &filter_index);
+		rc = ef10_filter_add_internal(enp, &spec,
+		    EFX_FILTER_REPLACEMENT_NEVER, &filter_index);
 
 		if (rc == 0) {
 			eftp->eft_mulcst_filter_indexes[filter_count] =
@@ -1285,7 +1553,7 @@ rollback:
 	/* Remove any filters we have inserted */
 	i = filter_count;
 	while (i--) {
-		(void) ef10_filter_delete_internal(enp,
+		ef10_filter_delete_auto(enp,
 		    eftp->eft_mulcst_filter_indexes[i]);
 	}
 	eftp->eft_mulcst_filter_count = 0;
@@ -1313,7 +1581,7 @@ ef10_filter_insert_all_multicast(
 	if (rc != 0)
 		goto fail1;
 
-	rc = ef10_filter_add_internal(enp, &spec, B_TRUE,
+	rc = ef10_filter_add_internal(enp, &spec, EFX_FILTER_REPLACEMENT_NEVER,
 	    &eftp->eft_mulcst_filter_indexes[0]);
 	if (rc != 0)
 		goto fail2;
@@ -1416,8 +1684,9 @@ ef10_filter_insert_encap_filters(
 		if (rc != 0)
 			goto fail1;
 
-		rc = ef10_filter_add_internal(enp, &spec, B_TRUE,
-			    &table->eft_encap_filter_indexes[
+		rc = ef10_filter_add_internal(enp, &spec,
+		    EFX_FILTER_REPLACEMENT_NEVER,
+		    &table->eft_encap_filter_indexes[
 				    table->eft_encap_filter_count]);
 		if (rc != 0) {
 			if (rc != EACCES)
@@ -1446,7 +1715,7 @@ ef10_filter_remove_old(
 
 	for (i = 0; i < EFX_ARRAY_SIZE(table->eft_entry); i++) {
 		if (ef10_filter_entry_is_auto_old(table, i)) {
-			(void) ef10_filter_delete_internal(enp, i);
+			ef10_filter_delete_auto(enp, i);
 		}
 	}
 }
@@ -1521,19 +1790,19 @@ ef10_filter_reconfigure(
 		 * has rebooted, which removes hardware filters).
 		 */
 		for (i = 0; i < table->eft_unicst_filter_count; i++) {
-			(void) ef10_filter_delete_internal(enp,
+			ef10_filter_delete_auto(enp,
 					table->eft_unicst_filter_indexes[i]);
 		}
 		table->eft_unicst_filter_count = 0;
 
 		for (i = 0; i < table->eft_mulcst_filter_count; i++) {
-			(void) ef10_filter_delete_internal(enp,
+			ef10_filter_delete_auto(enp,
 					table->eft_mulcst_filter_indexes[i]);
 		}
 		table->eft_mulcst_filter_count = 0;
 
 		for (i = 0; i < table->eft_encap_filter_count; i++) {
-			(void) ef10_filter_delete_internal(enp,
+			ef10_filter_delete_auto(enp,
 					table->eft_encap_filter_indexes[i]);
 		}
 		table->eft_encap_filter_count = 0;
diff --git a/drivers/net/sfc/base/ef10_impl.h b/drivers/net/sfc/base/ef10_impl.h
index 7a00047829..67abf3b853 100644
--- a/drivers/net/sfc/base/ef10_impl.h
+++ b/drivers/net/sfc/base/ef10_impl.h
@@ -1079,6 +1079,8 @@ ef10_rx_fini(
 
 #if EFSYS_OPT_FILTER
 
+enum efx_filter_replacement_policy_e;
+
 typedef struct ef10_filter_handle_s {
 	uint32_t	efh_lo;
 	uint32_t	efh_hi;
@@ -1148,7 +1150,7 @@ ef10_filter_restore(
 ef10_filter_add(
 	__in		efx_nic_t *enp,
 	__inout		efx_filter_spec_t *spec,
-	__in		boolean_t may_replace);
+	__in		enum efx_filter_replacement_policy_e policy);
 
 	__checkReturn	efx_rc_t
 ef10_filter_delete(
diff --git a/drivers/net/sfc/base/efx.h b/drivers/net/sfc/base/efx.h
index c609c700fa..d94d3c02f7 100644
--- a/drivers/net/sfc/base/efx.h
+++ b/drivers/net/sfc/base/efx.h
@@ -2949,6 +2949,7 @@ typedef uint8_t efx_filter_flags_t;
 
 typedef uint32_t efx_filter_match_flags_t;
 
+/* Filter priority from lowest to highest */
 typedef enum efx_filter_priority_s {
 	EFX_FILTER_PRI_AUTO = 0,	/* Automatic filter based on device
 					 * address list or hardware
@@ -2956,6 +2957,7 @@ typedef enum efx_filter_priority_s {
 					 * by the filter implementation for
 					 * each NIC type. */
 	EFX_FILTER_PRI_MANUAL,		/* Manually configured filter */
+	EFX_FILTER_NPRI,
 } efx_filter_priority_t;
 
 /*
@@ -2970,6 +2972,11 @@ typedef struct efx_filter_spec_s {
 	uint16_t			efs_dmaq_id;
 	uint32_t			efs_rss_context;
 	uint32_t			efs_mark;
+	/*
+	 * Saved lower-priority filter. If it is set, it is restored on
+	 * filter delete operation.
+	 */
+	struct efx_filter_spec_s	*efs_overridden_spec;
 	/* Fields below here are hashed for software filter lookup */
 	uint16_t			efs_outer_vid;
 	uint16_t			efs_inner_vid;
diff --git a/drivers/net/sfc/base/efx_filter.c b/drivers/net/sfc/base/efx_filter.c
index 36332a2801..9949d05bb3 100644
--- a/drivers/net/sfc/base/efx_filter.c
+++ b/drivers/net/sfc/base/efx_filter.c
@@ -28,7 +28,7 @@ static	__checkReturn	efx_rc_t
 siena_filter_add(
 	__in		efx_nic_t *enp,
 	__inout		efx_filter_spec_t *spec,
-	__in		boolean_t may_replace);
+	__in		efx_filter_replacement_policy_t policy);
 
 static	__checkReturn	efx_rc_t
 siena_filter_delete(
@@ -98,7 +98,8 @@ efx_filter_insert(
 		goto fail3;
 	}
 
-	return (efop->efo_add(enp, spec, B_FALSE));
+	return (efop->efo_add(enp, spec,
+	    EFX_FILTER_REPLACEMENT_HIGHER_PRIORITY));
 
 fail3:
 	EFSYS_PROBE(fail3);
@@ -1444,7 +1445,7 @@ static	 __checkReturn	efx_rc_t
 siena_filter_add(
 	__in		efx_nic_t *enp,
 	__inout		efx_filter_spec_t *spec,
-	__in		boolean_t may_replace)
+	__in		efx_filter_replacement_policy_t policy)
 {
 	efx_rc_t rc;
 	siena_filter_spec_t sf_spec;
@@ -1485,9 +1486,17 @@ siena_filter_add(
 	saved_sf_spec = &sftp->sft_spec[filter_idx];
 
 	if (siena_filter_test_used(sftp, filter_idx)) {
-		if (may_replace == B_FALSE) {
+		/* All Siena filter are considered the same priority */
+		switch (policy) {
+		case EFX_FILTER_REPLACEMENT_NEVER:
+		case EFX_FILTER_REPLACEMENT_HIGHER_PRIORITY:
 			rc = EEXIST;
 			goto fail4;
+		case EFX_FILTER_REPLACEMENT_HIGHER_OR_EQUAL_PRIORITY:
+			break;
+		default:
+			EFSYS_ASSERT(0);
+			break;
 		}
 	}
 	siena_filter_set_used(sftp, filter_idx);
diff --git a/drivers/net/sfc/base/efx_impl.h b/drivers/net/sfc/base/efx_impl.h
index 85d984f651..9755f4dfd2 100644
--- a/drivers/net/sfc/base/efx_impl.h
+++ b/drivers/net/sfc/base/efx_impl.h
@@ -246,12 +246,31 @@ typedef struct efx_phy_ops_s {
 } efx_phy_ops_t;
 
 #if EFSYS_OPT_FILTER
+
+/*
+ * Policy for replacing existing filter when inserting a new one.
+ * Note that all policies allow for storing the new lower priority
+ * filters as overridden by existing higher priority ones. It is needed
+ * to restore the lower priority filters on higher priority ones removal.
+ */
+typedef enum efx_filter_replacement_policy_e {
+	/* Cannot replace existing filter */
+	EFX_FILTER_REPLACEMENT_NEVER,
+	/* Higher priority filters can replace lower priotiry ones */
+	EFX_FILTER_REPLACEMENT_HIGHER_PRIORITY,
+	/*
+	 * Higher priority filters can replace lower priority ones and
+	 * equal priority filters can replace each other.
+	 */
+	EFX_FILTER_REPLACEMENT_HIGHER_OR_EQUAL_PRIORITY,
+} efx_filter_replacement_policy_t;
+
 typedef struct efx_filter_ops_s {
 	efx_rc_t	(*efo_init)(efx_nic_t *);
 	void		(*efo_fini)(efx_nic_t *);
 	efx_rc_t	(*efo_restore)(efx_nic_t *);
 	efx_rc_t	(*efo_add)(efx_nic_t *, efx_filter_spec_t *,
-				   boolean_t may_replace);
+				   efx_filter_replacement_policy_t policy);
 	efx_rc_t	(*efo_delete)(efx_nic_t *, efx_filter_spec_t *);
 	efx_rc_t	(*efo_supported_filters)(efx_nic_t *, uint32_t *,
 				   size_t, size_t *);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:20.587041104 +0100
+++ 0043-net-sfc-base-handle-manual-and-auto-filter-clashes-i.patch	2020-05-19 13:56:18.251502395 +0100
@@ -1,8 +1,10 @@
-From 585c22edb29cc3cfdb3628c41effd8ff3b75f224 Mon Sep 17 00:00:00 2001
+From 8ea2ea8fe40c8a13bca536bcb4683d9225cd0ea2 Mon Sep 17 00:00:00 2001
 From: Igor Romanov <igor.romanov@oktetlabs.ru>
 Date: Tue, 10 Mar 2020 09:48:39 +0000
 Subject: [PATCH] net/sfc/base: handle manual and auto filter clashes in EF10
 
+[ upstream commit 585c22edb29cc3cfdb3628c41effd8ff3b75f224 ]
+
 Make user filters a priority in EF10 datapath. When a manual
 filter with a specification that is equal to an existing auto
 filter is inserted, the manual filter:
@@ -14,7 +16,6 @@
 is restored on the manual filter removal.
 
 Fixes: e7cd430c864f ("net/sfc/base: import SFN7xxx family support")
-Cc: stable@dpdk.org
 
 Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>

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

* [dpdk-stable] patch 'net/mlx5: fix zero metadata action' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (41 preceding siblings ...)
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/sfc/base: handle manual and auto filter clashes " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/hinic: allocate IO memory with socket id' " luca.boccassi
                   ` (36 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Wisam Jaddo; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 75457cff3fc1dd00e29f44c37ef3d24a8fc149b3 Mon Sep 17 00:00:00 2001
From: Wisam Jaddo <wisamm@mellanox.com>
Date: Thu, 12 Mar 2020 11:24:40 +0200
Subject: [PATCH] net/mlx5: fix zero metadata action

[ upstream commit 85e26044cb8da437428dcf3a0755ceb1cdd38426 ]

There is no reason to prevent the user from using zero metadata,
it indeed means no metadata, but sometimes the user may need to
report to datapath that there is no metadata anymore, which is
valid case.

Fixes: fcc8d2f716fd ("net/mlx5: extend flow metadata support")

Signed-off-by: Wisam Jaddo <wisamm@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 69b17f104e..868d01438d 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1978,10 +1978,6 @@ flow_dv_validate_action_set_meta(struct rte_eth_dev *dev,
 		return rte_flow_error_set(error, EINVAL,
 					  RTE_FLOW_ERROR_TYPE_ACTION, action,
 					  "meta data must be within reg C0");
-	if (!(conf->data & conf->mask))
-		return rte_flow_error_set(error, EINVAL,
-					  RTE_FLOW_ERROR_TYPE_ACTION, action,
-					  "zero value has no effect");
 	return 0;
 }
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:20.631901907 +0100
+++ 0044-net-mlx5-fix-zero-metadata-action.patch	2020-05-19 13:56:18.259502539 +0100
@@ -1,15 +1,16 @@
-From 85e26044cb8da437428dcf3a0755ceb1cdd38426 Mon Sep 17 00:00:00 2001
+From 75457cff3fc1dd00e29f44c37ef3d24a8fc149b3 Mon Sep 17 00:00:00 2001
 From: Wisam Jaddo <wisamm@mellanox.com>
 Date: Thu, 12 Mar 2020 11:24:40 +0200
 Subject: [PATCH] net/mlx5: fix zero metadata action
 
+[ upstream commit 85e26044cb8da437428dcf3a0755ceb1cdd38426 ]
+
 There is no reason to prevent the user from using zero metadata,
 it indeed means no metadata, but sometimes the user may need to
 report to datapath that there is no metadata anymore, which is
 valid case.
 
 Fixes: fcc8d2f716fd ("net/mlx5: extend flow metadata support")
-Cc: stable@dpdk.org
 
 Signed-off-by: Wisam Jaddo <wisamm@mellanox.com>
 Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
@@ -18,10 +19,10 @@
  1 file changed, 4 deletions(-)
 
 diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index e7278f0b3f..e2d6690fa8 100644
+index 69b17f104e..868d01438d 100644
 --- a/drivers/net/mlx5/mlx5_flow_dv.c
 +++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -2109,10 +2109,6 @@ flow_dv_validate_action_set_meta(struct rte_eth_dev *dev,
+@@ -1978,10 +1978,6 @@ flow_dv_validate_action_set_meta(struct rte_eth_dev *dev,
  		return rte_flow_error_set(error, EINVAL,
  					  RTE_FLOW_ERROR_TYPE_ACTION, action,
  					  "meta data must be within reg C0");

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

* [dpdk-stable] patch 'net/hinic: allocate IO memory with socket id' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (42 preceding siblings ...)
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/mlx5: fix zero metadata action' " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/mlx5: fix CVLAN tag set in IP item translation' " luca.boccassi
                   ` (35 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Xiaoyun Wang; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 7ad364893c33d8ec2f9ef2ed7fa8c076852cc854 Mon Sep 17 00:00:00 2001
From: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
Date: Sat, 14 Mar 2020 18:02:06 +0800
Subject: [PATCH] net/hinic: allocate IO memory with socket id

[ upstream commit 1b7b9f170fcebbbd0708fab554dcb5a7badef8cf ]

This patch makes IO memory allocation with socketid,
the txq or rxq descriptor and IO resource can be allocated with
socketid that passed by queue setup ops, which can improve
performance for cross-numa scene.

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
---
 drivers/net/hinic/base/hinic_compat.h      | 17 ++++++----
 drivers/net/hinic/base/hinic_pmd_api_cmd.c |  7 ++--
 drivers/net/hinic/base/hinic_pmd_cmdq.c    |  3 +-
 drivers/net/hinic/base/hinic_pmd_eqs.c     |  2 +-
 drivers/net/hinic/base/hinic_pmd_hwdev.c   | 37 +++++++++++-----------
 drivers/net/hinic/base/hinic_pmd_hwdev.h   |  1 -
 drivers/net/hinic/base/hinic_pmd_mbox.c    |  6 ++--
 drivers/net/hinic/base/hinic_pmd_nicio.c   | 11 ++++---
 drivers/net/hinic/base/hinic_pmd_wq.c      | 11 ++++---
 drivers/net/hinic/base/hinic_pmd_wq.h      |  2 +-
 drivers/net/hinic/hinic_pmd_ethdev.c       |  7 ++--
 drivers/net/hinic/hinic_pmd_rx.c           | 28 ++++++++--------
 drivers/net/hinic/hinic_pmd_rx.h           |  5 ++-
 drivers/net/hinic/hinic_pmd_tx.c           | 11 ++++---
 drivers/net/hinic/hinic_pmd_tx.h           |  4 ++-
 15 files changed, 81 insertions(+), 71 deletions(-)

diff --git a/drivers/net/hinic/base/hinic_compat.h b/drivers/net/hinic/base/hinic_compat.h
index e4a7f12d15..7bec03b9cb 100644
--- a/drivers/net/hinic/base/hinic_compat.h
+++ b/drivers/net/hinic/base/hinic_compat.h
@@ -150,22 +150,25 @@ static inline int hinic_test_and_set_bit(int nr, volatile unsigned long *addr)
 }
 
 void *dma_zalloc_coherent(void *dev, size_t size, dma_addr_t *dma_handle,
-			  gfp_t flag);
-void *dma_zalloc_coherent_aligned(void *dev, size_t size,
-				dma_addr_t *dma_handle, gfp_t flag);
-void *dma_zalloc_coherent_aligned256k(void *dev, size_t size,
-				dma_addr_t *dma_handle, gfp_t flag);
+			  unsigned int socket_id);
+
+void *dma_zalloc_coherent_aligned(void *hwdev, size_t size,
+		dma_addr_t *dma_handle, unsigned int socket_id);
+
+void *dma_zalloc_coherent_aligned256k(void *hwdev, size_t size,
+			      dma_addr_t *dma_handle, unsigned int socket_id);
+
 void dma_free_coherent(void *dev, size_t size, void *virt, dma_addr_t phys);
 
 /* dma pool alloc and free */
 #define	pci_pool dma_pool
-#define	pci_pool_alloc(pool, flags, handle) dma_pool_alloc(pool, flags, handle)
+#define	pci_pool_alloc(pool, handle) dma_pool_alloc(pool, handle)
 #define	pci_pool_free(pool, vaddr, addr) dma_pool_free(pool, vaddr, addr)
 
 struct dma_pool *dma_pool_create(const char *name, void *dev, size_t size,
 				size_t align, size_t boundary);
 void dma_pool_destroy(struct dma_pool *pool);
-void *dma_pool_alloc(struct pci_pool *pool, int flags, dma_addr_t *dma_addr);
+void *dma_pool_alloc(struct pci_pool *pool, dma_addr_t *dma_addr);
 void dma_pool_free(struct pci_pool *pool, void *vaddr, dma_addr_t dma);
 
 #define kzalloc(size, flag) rte_zmalloc(NULL, size, HINIC_MEM_ALLOC_ALIGN_MIN)
diff --git a/drivers/net/hinic/base/hinic_pmd_api_cmd.c b/drivers/net/hinic/base/hinic_pmd_api_cmd.c
index dbffc2e3b0..b72edc0652 100644
--- a/drivers/net/hinic/base/hinic_pmd_api_cmd.c
+++ b/drivers/net/hinic/base/hinic_pmd_api_cmd.c
@@ -658,7 +658,7 @@ static int alloc_cmd_buf(struct hinic_api_cmd_chain *chain,
 
 	cmd_vaddr_alloc = dma_zalloc_coherent(dev, (API_CMD_BUF_SIZE +
 					      API_PAYLOAD_ALIGN_SIZE),
-					      &cmd_paddr, GFP_KERNEL);
+					      &cmd_paddr, SOCKET_ID_ANY);
 	if (!cmd_vaddr_alloc) {
 		PMD_DRV_LOG(ERR, "Allocate API CMD dma memory failed");
 		return -ENOMEM;
@@ -712,7 +712,7 @@ static int api_cmd_create_cell(struct hinic_api_cmd_chain *chain,
 
 	node_vaddr_alloc = dma_zalloc_coherent(dev, (chain->cell_size +
 					       API_CMD_NODE_ALIGN_SIZE),
-					       &node_paddr, GFP_KERNEL);
+					       &node_paddr, SOCKET_ID_ANY);
 	if (!node_vaddr_alloc) {
 		PMD_DRV_LOG(ERR, "Allocate dma API CMD cell failed");
 		return -ENOMEM;
@@ -889,8 +889,7 @@ static int api_chain_init(struct hinic_api_cmd_chain *chain,
 
 	chain->wb_status = (struct hinic_api_cmd_status *)
 			   dma_zalloc_coherent(dev, sizeof(*chain->wb_status),
-					       &chain->wb_status_paddr,
-					       GFP_KERNEL);
+				&chain->wb_status_paddr, SOCKET_ID_ANY);
 	if (!chain->wb_status) {
 		PMD_DRV_LOG(ERR, "Allocate DMA wb status failed");
 		err = -ENOMEM;
diff --git a/drivers/net/hinic/base/hinic_pmd_cmdq.c b/drivers/net/hinic/base/hinic_pmd_cmdq.c
index eb8de24d6e..d73e2bf592 100644
--- a/drivers/net/hinic/base/hinic_pmd_cmdq.c
+++ b/drivers/net/hinic/base/hinic_pmd_cmdq.c
@@ -171,8 +171,7 @@ struct hinic_cmd_buf *hinic_alloc_cmd_buf(void *hwdev)
 		return NULL;
 	}
 
-	cmd_buf->buf = pci_pool_alloc(cmdqs->cmd_buf_pool, GFP_KERNEL,
-				      &cmd_buf->dma_addr);
+	cmd_buf->buf = pci_pool_alloc(cmdqs->cmd_buf_pool, &cmd_buf->dma_addr);
 	if (!cmd_buf->buf) {
 		PMD_DRV_LOG(ERR, "Allocate cmd from the pool failed");
 		goto alloc_pci_buf_err;
diff --git a/drivers/net/hinic/base/hinic_pmd_eqs.c b/drivers/net/hinic/base/hinic_pmd_eqs.c
index abe0daee6c..79e1b20bca 100644
--- a/drivers/net/hinic/base/hinic_pmd_eqs.c
+++ b/drivers/net/hinic/base/hinic_pmd_eqs.c
@@ -240,7 +240,7 @@ static int alloc_eq_pages(struct hinic_eq *eq)
 		eq->virt_addr[pg_num] =
 			(u8 *)dma_zalloc_coherent_aligned(eq->hwdev,
 					eq->page_size, &eq->dma_addr[pg_num],
-					GFP_KERNEL);
+					SOCKET_ID_ANY);
 		if (!eq->virt_addr[pg_num]) {
 			err = -ENOMEM;
 			goto dma_alloc_err;
diff --git a/drivers/net/hinic/base/hinic_pmd_hwdev.c b/drivers/net/hinic/base/hinic_pmd_hwdev.c
index fd0292f84c..cf2a9701f2 100644
--- a/drivers/net/hinic/base/hinic_pmd_hwdev.c
+++ b/drivers/net/hinic/base/hinic_pmd_hwdev.c
@@ -112,9 +112,9 @@ void hinic_be32_to_cpu(void *data, u32 len)
 	}
 }
 
-static void *
-hinic_dma_mem_zalloc(struct hinic_hwdev *hwdev, size_t size,
-		dma_addr_t *dma_handle, unsigned int flag, unsigned int align)
+static void *hinic_dma_mem_zalloc(struct hinic_hwdev *hwdev, size_t size,
+			   dma_addr_t *dma_handle, unsigned int align,
+			   unsigned int socket_id)
 {
 	int rc, alloc_cnt;
 	const struct rte_memzone *mz;
@@ -129,8 +129,8 @@ hinic_dma_mem_zalloc(struct hinic_hwdev *hwdev, size_t size,
 	snprintf(z_name, sizeof(z_name), "%s_%d",
 		 hwdev->pcidev_hdl->name, alloc_cnt);
 
-	mz = rte_memzone_reserve_aligned(z_name, size, SOCKET_ID_ANY,
-					 flag, align);
+	mz = rte_memzone_reserve_aligned(z_name, size, socket_id,
+					 RTE_MEMZONE_IOVA_CONTIG, align);
 	if (!mz) {
 		PMD_DRV_LOG(ERR, "Alloc dma able memory failed, errno: %d, ma_name: %s, size: 0x%zx",
 			    rte_errno, z_name, size);
@@ -209,25 +209,26 @@ hinic_dma_mem_free(struct hinic_hwdev *hwdev, size_t size,
 	(void)rte_memzone_free(mz);
 }
 
-void *dma_zalloc_coherent(void *hwdev, size_t size,
-			  dma_addr_t *dma_handle, gfp_t flag)
+void *dma_zalloc_coherent(void *hwdev, size_t size, dma_addr_t *dma_handle,
+			  unsigned int socket_id)
 {
-	return hinic_dma_mem_zalloc(hwdev, size, dma_handle, flag,
-				    RTE_CACHE_LINE_SIZE);
+	return hinic_dma_mem_zalloc(hwdev, size, dma_handle,
+				    RTE_CACHE_LINE_SIZE, socket_id);
 }
 
 void *dma_zalloc_coherent_aligned(void *hwdev, size_t size,
-				  dma_addr_t *dma_handle, gfp_t flag)
+				dma_addr_t *dma_handle, unsigned int socket_id)
 {
-	return hinic_dma_mem_zalloc(hwdev, size, dma_handle, flag,
-				    HINIC_PAGE_SIZE);
+	return hinic_dma_mem_zalloc(hwdev, size, dma_handle, HINIC_PAGE_SIZE,
+				    socket_id);
 }
 
 void *dma_zalloc_coherent_aligned256k(void *hwdev, size_t size,
-				      dma_addr_t *dma_handle, gfp_t flag)
+				      dma_addr_t *dma_handle,
+				      unsigned int socket_id)
 {
-	return hinic_dma_mem_zalloc(hwdev, size, dma_handle, flag,
-				    HINIC_PAGE_SIZE * 64);
+	return hinic_dma_mem_zalloc(hwdev, size, dma_handle,
+				    HINIC_PAGE_SIZE * 64, socket_id);
 }
 
 void dma_free_coherent(void *hwdev, size_t size, void *virt, dma_addr_t phys)
@@ -304,12 +305,12 @@ void dma_pool_destroy(struct dma_pool *pool)
 	rte_free(pool);
 }
 
-void *dma_pool_alloc(struct pci_pool *pool, int flags, dma_addr_t *dma_addr)
+void *dma_pool_alloc(struct pci_pool *pool, dma_addr_t *dma_addr)
 {
 	void *buf;
 
-	buf = hinic_dma_mem_zalloc(pool->hwdev, pool->elem_size,
-				   dma_addr, flags, (u32)pool->align);
+	buf = hinic_dma_mem_zalloc(pool->hwdev, pool->elem_size, dma_addr,
+				(u32)pool->align, SOCKET_ID_ANY);
 	if (buf)
 		rte_atomic32_inc(&pool->inuse);
 
diff --git a/drivers/net/hinic/base/hinic_pmd_hwdev.h b/drivers/net/hinic/base/hinic_pmd_hwdev.h
index ac21947dc2..d6896b3f13 100644
--- a/drivers/net/hinic/base/hinic_pmd_hwdev.h
+++ b/drivers/net/hinic/base/hinic_pmd_hwdev.h
@@ -442,7 +442,6 @@ struct hinic_hwdev {
 	struct hinic_msg_pf_to_mgmt *pf_to_mgmt;
 	struct hinic_cmdqs *cmdqs;
 	struct hinic_nic_io *nic_io;
-
 };
 
 int hinic_osdep_init(struct hinic_hwdev *hwdev);
diff --git a/drivers/net/hinic/base/hinic_pmd_mbox.c b/drivers/net/hinic/base/hinic_pmd_mbox.c
index 3d3c1bc4ab..935d60bc81 100644
--- a/drivers/net/hinic/base/hinic_pmd_mbox.c
+++ b/drivers/net/hinic/base/hinic_pmd_mbox.c
@@ -404,10 +404,8 @@ static int alloc_mbox_wb_status(struct hinic_mbox_func_to_func *func_to_func)
 	struct hinic_hwif *hwif = hwdev->hwif;
 	u32 addr_h, addr_l;
 
-	send_mbox->wb_vaddr = dma_zalloc_coherent(hwdev,
-				  MBOX_WB_STATUS_LEN,
-				  &send_mbox->wb_paddr,
-				  GFP_KERNEL);
+	send_mbox->wb_vaddr = dma_zalloc_coherent(hwdev, MBOX_WB_STATUS_LEN,
+					&send_mbox->wb_paddr, SOCKET_ID_ANY);
 	if (!send_mbox->wb_vaddr) {
 		PMD_DRV_LOG(ERR, "Allocating memory for mailbox wb status failed");
 		return -ENOMEM;
diff --git a/drivers/net/hinic/base/hinic_pmd_nicio.c b/drivers/net/hinic/base/hinic_pmd_nicio.c
index f6cc03341b..59e39ed984 100644
--- a/drivers/net/hinic/base/hinic_pmd_nicio.c
+++ b/drivers/net/hinic/base/hinic_pmd_nicio.c
@@ -728,9 +728,10 @@ void hinic_update_rq_local_ci(struct hinic_hwdev *hwdev, u16 q_id, int wqe_cnt)
 
 static int hinic_alloc_nicio(struct hinic_hwdev *hwdev)
 {
-	int err;
+	struct hinic_nic_io *nic_io = hwdev->nic_io;
+	struct rte_pci_device *pdev = hwdev->pcidev_hdl;
 	u16 max_qps, num_qp;
-	struct hinic_nic_io *nic_io = hwdev->nic_io;
+	int err;
 
 	max_qps = hinic_func_max_qnum(hwdev);
 	if ((max_qps & (max_qps - 1))) {
@@ -751,10 +752,10 @@ static int hinic_alloc_nicio(struct hinic_hwdev *hwdev)
 		goto alloc_qps_err;
 	}
 
-	nic_io->ci_vaddr_base =
-		dma_zalloc_coherent(hwdev,
+	nic_io->ci_vaddr_base = dma_zalloc_coherent(hwdev,
 				    CI_TABLE_SIZE(num_qp, HINIC_PAGE_SIZE),
-				    &nic_io->ci_dma_base, GFP_KERNEL);
+				    &nic_io->ci_dma_base,
+				    pdev->device.numa_node);
 	if (!nic_io->ci_vaddr_base) {
 		PMD_DRV_LOG(ERR, "Failed to allocate ci area");
 		err = -ENOMEM;
diff --git a/drivers/net/hinic/base/hinic_pmd_wq.c b/drivers/net/hinic/base/hinic_pmd_wq.c
index 04c81f9bc8..345248c3ea 100644
--- a/drivers/net/hinic/base/hinic_pmd_wq.c
+++ b/drivers/net/hinic/base/hinic_pmd_wq.c
@@ -15,13 +15,14 @@ static void free_wq_pages(struct hinic_hwdev *hwdev, struct hinic_wq *wq)
 	wq->queue_buf_vaddr = 0;
 }
 
-static int alloc_wq_pages(struct hinic_hwdev *hwdev, struct hinic_wq *wq)
+static int alloc_wq_pages(struct hinic_hwdev *hwdev, struct hinic_wq *wq,
+			unsigned int socket_id)
 {
 	dma_addr_t dma_addr = 0;
 
 	wq->queue_buf_vaddr = (u64)(u64 *)
 		dma_zalloc_coherent_aligned256k(hwdev, wq->wq_buf_size,
-						&dma_addr, GFP_KERNEL);
+						&dma_addr, socket_id);
 	if (!wq->queue_buf_vaddr) {
 		PMD_DRV_LOG(ERR, "Failed to allocate wq page");
 		return -ENOMEM;
@@ -40,7 +41,7 @@ static int alloc_wq_pages(struct hinic_hwdev *hwdev, struct hinic_wq *wq)
 }
 
 int hinic_wq_allocate(struct hinic_hwdev *hwdev, struct hinic_wq *wq,
-		      u32 wqebb_shift, u16 q_depth)
+		      u32 wqebb_shift, u16 q_depth, unsigned int socket_id)
 {
 	int err;
 
@@ -60,7 +61,7 @@ int hinic_wq_allocate(struct hinic_hwdev *hwdev, struct hinic_wq *wq,
 		return -EINVAL;
 	}
 
-	err = alloc_wq_pages(hwdev, wq);
+	err = alloc_wq_pages(hwdev, wq, socket_id);
 	if (err) {
 		PMD_DRV_LOG(ERR, "Failed to allocate wq pages");
 		return err;
@@ -114,7 +115,7 @@ int hinic_cmdq_alloc(struct hinic_wq *wq, struct hinic_hwdev *hwdev,
 		wq[i].wq_buf_size = wq_buf_size;
 		wq[i].q_depth = q_depth;
 
-		err = alloc_wq_pages(hwdev, &wq[i]);
+		err = alloc_wq_pages(hwdev, &wq[i], SOCKET_ID_ANY);
 		if (err) {
 			PMD_DRV_LOG(ERR, "Failed to alloc CMDQ blocks");
 			goto cmdq_block_err;
diff --git a/drivers/net/hinic/base/hinic_pmd_wq.h b/drivers/net/hinic/base/hinic_pmd_wq.h
index 53ecc225c8..354d0338de 100644
--- a/drivers/net/hinic/base/hinic_pmd_wq.h
+++ b/drivers/net/hinic/base/hinic_pmd_wq.h
@@ -122,7 +122,7 @@ void hinic_cmdq_free(struct hinic_hwdev *hwdev, struct hinic_wq *wq,
 		     int cmdq_blocks);
 
 int hinic_wq_allocate(struct hinic_hwdev *hwdev, struct hinic_wq *wq,
-		      u32 wqebb_shift, u16 q_depth);
+		      u32 wqebb_shift, u16 q_depth, unsigned int socket_id);
 
 void hinic_wq_free(struct hinic_hwdev *hwdev, struct hinic_wq *wq);
 
diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c b/drivers/net/hinic/hinic_pmd_ethdev.c
index 803a39e2da..8493f6e42c 100644
--- a/drivers/net/hinic/hinic_pmd_ethdev.c
+++ b/drivers/net/hinic/hinic_pmd_ethdev.c
@@ -57,6 +57,7 @@
 #define HINIC_DEFAULT_BURST_SIZE	32
 #define HINIC_DEFAULT_NB_QUEUES		1
 #define HINIC_DEFAULT_RING_SIZE		1024
+#define HINIC_MAX_LRO_SIZE		65536
 
 /*
  * vlan_id is a 12 bit number.
@@ -439,7 +440,7 @@ static int hinic_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 	nic_dev->rxqs[queue_idx] = rxq;
 
 	/* alloc rx sq hw wqepage*/
-	rc = hinic_create_rq(hwdev, queue_idx, rq_depth);
+	rc = hinic_create_rq(hwdev, queue_idx, rq_depth, socket_id);
 	if (rc) {
 		PMD_DRV_LOG(ERR, "Create rxq[%d] failed, dev_name: %s, rq_depth: %d",
 			    queue_idx, dev->data->name, rq_depth);
@@ -466,6 +467,7 @@ static int hinic_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 	rxq->q_depth = rq_depth;
 	rxq->buf_len = (u16)buf_size;
 	rxq->rx_free_thresh = rx_free_thresh;
+	rxq->socket_id = socket_id;
 
 	/* the last point cant do mbuf rearm in bulk */
 	rxq->rxinfo_align_end = rxq->q_depth - rxq->rx_free_thresh;
@@ -593,7 +595,7 @@ static int hinic_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 	nic_dev->txqs[queue_idx] = txq;
 
 	/* alloc tx sq hw wqepage */
-	rc = hinic_create_sq(hwdev, queue_idx, sq_depth);
+	rc = hinic_create_sq(hwdev, queue_idx, sq_depth, socket_id);
 	if (rc) {
 		PMD_DRV_LOG(ERR, "Create txq[%d] failed, dev_name: %s, sq_depth: %d",
 			    queue_idx, dev->data->name, sq_depth);
@@ -612,6 +614,7 @@ static int hinic_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 	txq->sq_bot_sge_addr = HINIC_GET_WQ_TAIL(txq) -
 					sizeof(struct hinic_sq_bufdesc);
 	txq->cos = nic_dev->default_cos;
+	txq->socket_id = socket_id;
 
 	/* alloc software txinfo */
 	rc = hinic_setup_tx_resources(txq);
diff --git a/drivers/net/hinic/hinic_pmd_rx.c b/drivers/net/hinic/hinic_pmd_rx.c
index f865f2f470..f1b873afb7 100644
--- a/drivers/net/hinic/hinic_pmd_rx.c
+++ b/drivers/net/hinic/hinic_pmd_rx.c
@@ -209,7 +209,8 @@ void hinic_get_func_rx_buf_size(struct hinic_nic_dev *nic_dev)
 	nic_dev->hwdev->nic_io->rq_buf_size = buf_size;
 }
 
-int hinic_create_rq(struct hinic_hwdev *hwdev, u16 q_id, u16 rq_depth)
+int hinic_create_rq(struct hinic_hwdev *hwdev, u16 q_id,
+			u16 rq_depth, unsigned int socket_id)
 {
 	int err;
 	struct hinic_nic_io *nic_io = hwdev->nic_io;
@@ -223,17 +224,15 @@ int hinic_create_rq(struct hinic_hwdev *hwdev, u16 q_id, u16 rq_depth)
 	nic_io->rq_depth = rq_depth;
 
 	err = hinic_wq_allocate(hwdev, &nic_io->rq_wq[q_id],
-				HINIC_RQ_WQEBB_SHIFT, nic_io->rq_depth);
+			HINIC_RQ_WQEBB_SHIFT, nic_io->rq_depth, socket_id);
 	if (err) {
 		PMD_DRV_LOG(ERR, "Failed to allocate WQ for RQ");
 		return err;
 	}
 	rq->wq = &nic_io->rq_wq[q_id];
 
-	rq->pi_virt_addr =
-		(volatile u16 *)dma_zalloc_coherent(hwdev, HINIC_PAGE_SIZE,
-						    &rq->pi_dma_addr,
-						    GFP_KERNEL);
+	rq->pi_virt_addr = (volatile u16 *)dma_zalloc_coherent(hwdev,
+			HINIC_PAGE_SIZE, &rq->pi_dma_addr, socket_id);
 	if (!rq->pi_virt_addr) {
 		PMD_DRV_LOG(ERR, "Failed to allocate rq pi virt addr");
 		err = -ENOMEM;
@@ -305,15 +304,13 @@ void hinic_rxq_stats_reset(struct hinic_rxq *rxq)
 	memset(rxq_stats, 0, sizeof(*rxq_stats));
 }
 
-static int hinic_rx_alloc_cqe(struct hinic_rxq *rxq)
+static int hinic_rx_alloc_cqe(struct hinic_rxq *rxq, unsigned int socket_id)
 {
 	size_t cqe_mem_size;
 
 	cqe_mem_size = sizeof(struct hinic_rq_cqe) * rxq->q_depth;
-	rxq->cqe_start_vaddr =
-		dma_zalloc_coherent(rxq->nic_dev->hwdev,
-				    cqe_mem_size, &rxq->cqe_start_paddr,
-				    GFP_KERNEL);
+	rxq->cqe_start_vaddr = dma_zalloc_coherent(rxq->nic_dev->hwdev,
+				cqe_mem_size, &rxq->cqe_start_paddr, socket_id);
 	if (!rxq->cqe_start_vaddr) {
 		PMD_DRV_LOG(ERR, "Allocate cqe dma memory failed");
 		return -ENOMEM;
@@ -369,11 +366,12 @@ int hinic_setup_rx_resources(struct hinic_rxq *rxq)
 	int err, pkts;
 
 	rx_info_sz = rxq->q_depth * sizeof(*rxq->rx_info);
-	rxq->rx_info = kzalloc_aligned(rx_info_sz, GFP_KERNEL);
+	rxq->rx_info = rte_zmalloc_socket("rx_info", rx_info_sz,
+				RTE_CACHE_LINE_SIZE, rxq->socket_id);
 	if (!rxq->rx_info)
 		return -ENOMEM;
 
-	err = hinic_rx_alloc_cqe(rxq);
+	err = hinic_rx_alloc_cqe(rxq, rxq->socket_id);
 	if (err) {
 		PMD_DRV_LOG(ERR, "Allocate rx cqe failed");
 		goto rx_cqe_err;
@@ -392,7 +390,7 @@ rx_fill_err:
 	hinic_rx_free_cqe(rxq);
 
 rx_cqe_err:
-	kfree(rxq->rx_info);
+	rte_free(rxq->rx_info);
 	rxq->rx_info = NULL;
 
 	return err;
@@ -404,7 +402,7 @@ void hinic_free_rx_resources(struct hinic_rxq *rxq)
 		return;
 
 	hinic_rx_free_cqe(rxq);
-	kfree(rxq->rx_info);
+	rte_free(rxq->rx_info);
 	rxq->rx_info = NULL;
 }
 
diff --git a/drivers/net/hinic/hinic_pmd_rx.h b/drivers/net/hinic/hinic_pmd_rx.h
index 1a80f95af4..49fa565173 100644
--- a/drivers/net/hinic/hinic_pmd_rx.h
+++ b/drivers/net/hinic/hinic_pmd_rx.h
@@ -82,6 +82,8 @@ struct hinic_rxq {
 	u16 rx_free_thresh;
 	u16 rxinfo_align_end;
 
+	u32 socket_id;
+
 	unsigned long status;
 	struct hinic_rxq_stats rxq_stats;
 
@@ -121,7 +123,8 @@ void hinic_rx_remove_configure(struct rte_eth_dev *dev);
 
 void hinic_get_func_rx_buf_size(struct hinic_nic_dev *nic_dev);
 
-int hinic_create_rq(struct hinic_hwdev *hwdev, u16 q_id, u16 rq_depth);
+int hinic_create_rq(struct hinic_hwdev *hwdev, u16 q_id,
+			u16 rq_depth, unsigned int socket_id);
 
 void hinic_destroy_rq(struct hinic_hwdev *hwdev, u16 q_id);
 
diff --git a/drivers/net/hinic/hinic_pmd_tx.c b/drivers/net/hinic/hinic_pmd_tx.c
index 985540a935..64ec2c1198 100644
--- a/drivers/net/hinic/hinic_pmd_tx.c
+++ b/drivers/net/hinic/hinic_pmd_tx.c
@@ -1216,7 +1216,8 @@ int hinic_setup_tx_resources(struct hinic_txq *txq)
 	u64 tx_info_sz;
 
 	tx_info_sz = txq->q_depth * sizeof(*txq->tx_info);
-	txq->tx_info = kzalloc_aligned(tx_info_sz, GFP_KERNEL);
+	txq->tx_info = rte_zmalloc_socket("tx_info", tx_info_sz,
+			RTE_CACHE_LINE_SIZE, txq->socket_id);
 	if (!txq->tx_info)
 		return -ENOMEM;
 
@@ -1228,11 +1229,12 @@ void hinic_free_tx_resources(struct hinic_txq *txq)
 	if (txq->tx_info == NULL)
 		return;
 
-	kfree(txq->tx_info);
+	rte_free(txq->tx_info);
 	txq->tx_info = NULL;
 }
 
-int hinic_create_sq(struct hinic_hwdev *hwdev, u16 q_id, u16 sq_depth)
+int hinic_create_sq(struct hinic_hwdev *hwdev, u16 q_id,
+			u16 sq_depth, unsigned int socket_id)
 {
 	int err;
 	struct hinic_nic_io *nic_io = hwdev->nic_io;
@@ -1246,7 +1248,8 @@ int hinic_create_sq(struct hinic_hwdev *hwdev, u16 q_id, u16 sq_depth)
 
 	/* alloc wq */
 	err = hinic_wq_allocate(nic_io->hwdev, &nic_io->sq_wq[q_id],
-				HINIC_SQ_WQEBB_SHIFT, nic_io->sq_depth);
+				HINIC_SQ_WQEBB_SHIFT, nic_io->sq_depth,
+				socket_id);
 	if (err) {
 		PMD_DRV_LOG(ERR, "Failed to allocate WQ for SQ");
 		return err;
diff --git a/drivers/net/hinic/hinic_pmd_tx.h b/drivers/net/hinic/hinic_pmd_tx.h
index a1ca580b1b..dabbc6c1d8 100644
--- a/drivers/net/hinic/hinic_pmd_tx.h
+++ b/drivers/net/hinic/hinic_pmd_tx.h
@@ -114,6 +114,7 @@ struct hinic_txq {
 	u16 q_id;
 	u16 q_depth;
 	u32 cos;
+	u32 socket_id;
 
 	/* cacheline1 */
 	struct hinic_txq_stats txq_stats;
@@ -137,7 +138,8 @@ void hinic_txq_get_stats(struct hinic_txq *txq, struct hinic_txq_stats *stats);
 
 void hinic_txq_stats_reset(struct hinic_txq *txq);
 
-int hinic_create_sq(struct hinic_hwdev *hwdev, u16 q_id, u16 sq_depth);
+int hinic_create_sq(struct hinic_hwdev *hwdev, u16 q_id,
+			u16 sq_depth, unsigned int socket_id);
 
 void hinic_destroy_sq(struct hinic_hwdev *hwdev, u16 q_id);
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:20.679295052 +0100
+++ 0045-net-hinic-allocate-IO-memory-with-socket-id.patch	2020-05-19 13:56:18.267502683 +0100
@@ -1,15 +1,15 @@
-From 1b7b9f170fcebbbd0708fab554dcb5a7badef8cf Mon Sep 17 00:00:00 2001
+From 7ad364893c33d8ec2f9ef2ed7fa8c076852cc854 Mon Sep 17 00:00:00 2001
 From: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
 Date: Sat, 14 Mar 2020 18:02:06 +0800
 Subject: [PATCH] net/hinic: allocate IO memory with socket id
 
+[ upstream commit 1b7b9f170fcebbbd0708fab554dcb5a7badef8cf ]
+
 This patch makes IO memory allocation with socketid,
 the txq or rxq descriptor and IO resource can be allocated with
 socketid that passed by queue setup ops, which can improve
 performance for cross-numa scene.
 
-Cc: stable@dpdk.org
-
 Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
 ---
  drivers/net/hinic/base/hinic_compat.h      | 17 ++++++----
@@ -30,10 +30,10 @@
  15 files changed, 81 insertions(+), 71 deletions(-)
 
 diff --git a/drivers/net/hinic/base/hinic_compat.h b/drivers/net/hinic/base/hinic_compat.h
-index b72e8cfe26..921b83012e 100644
+index e4a7f12d15..7bec03b9cb 100644
 --- a/drivers/net/hinic/base/hinic_compat.h
 +++ b/drivers/net/hinic/base/hinic_compat.h
-@@ -149,22 +149,25 @@ static inline int hinic_test_and_set_bit(int nr, volatile unsigned long *addr)
+@@ -150,22 +150,25 @@ static inline int hinic_test_and_set_bit(int nr, volatile unsigned long *addr)
  }
  
  void *dma_zalloc_coherent(void *dev, size_t size, dma_addr_t *dma_handle,

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

* [dpdk-stable] patch 'net/mlx5: fix CVLAN tag set in IP item translation' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (43 preceding siblings ...)
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/hinic: allocate IO memory with socket id' " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/mlx5: reduce Tx completion index memory loads' " luca.boccassi
                   ` (34 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Dekel Peled; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 307876a7478b0ba135e2b577e01838c3130693ba Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Mon, 16 Mar 2020 10:57:39 +0200
Subject: [PATCH] net/mlx5: fix CVLAN tag set in IP item translation

[ upstream commit 1908cab425e4206321fb3f62688f9e1f92b36f6a ]

Previous fix added, at the end of functions
flow_dv_translate_item_ipv4() and flow_dv_translate_item_ipv6(), the
setting of cvlan_tag mask.
In the case of unspecified item (item->spec == null) these functions
return, and the new code section is not reached.

This patch moves the setting of cvlan_tag mask to be done before the
check of item->spec, to make sure it is always executed.

Fixes: 797329d6c4a1 ("net/mlx5: fix match on ethertype and CVLAN tag")

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 26 ++++++++++++++------------
 1 file changed, 14 insertions(+), 12 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 868d01438d..b2e0365c1f 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -5203,6 +5203,13 @@ flow_dv_translate_item_ipv4(void *matcher, void *key,
 	else
 		MLX5_SET(fte_match_set_lyr_2_4, headers_m, ip_version, 0x4);
 	MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_version, 4);
+	/*
+	 * On outer header (which must contains L2), or inner header with L2,
+	 * set cvlan_tag mask bit to mark this packet as untagged.
+	 * This should be done even if item->spec is empty.
+	 */
+	if (!inner || item_flags & MLX5_FLOW_LAYER_INNER_L2)
+		MLX5_SET(fte_match_set_lyr_2_4, headers_m, cvlan_tag, 1);
 	if (!ipv4_v)
 		return;
 	if (!ipv4_m)
@@ -5230,12 +5237,6 @@ flow_dv_translate_item_ipv4(void *matcher, void *key,
 		 ipv4_m->hdr.next_proto_id);
 	MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_protocol,
 		 ipv4_v->hdr.next_proto_id & ipv4_m->hdr.next_proto_id);
-	/*
-	 * On outer header (which must contains L2), or inner header with L2,
-	 * set cvlan_tag mask bit to mark this packet as untagged.
-	 */
-	if (!inner || item_flags & MLX5_FLOW_LAYER_INNER_L2)
-		MLX5_SET(fte_match_set_lyr_2_4, headers_m, cvlan_tag, 1);
 }
 
 /**
@@ -5300,6 +5301,13 @@ flow_dv_translate_item_ipv6(void *matcher, void *key,
 	else
 		MLX5_SET(fte_match_set_lyr_2_4, headers_m, ip_version, 0x6);
 	MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_version, 6);
+	/*
+	 * On outer header (which must contains L2), or inner header with L2,
+	 * set cvlan_tag mask bit to mark this packet as untagged.
+	 * This should be done even if item->spec is empty.
+	 */
+	if (!inner || item_flags & MLX5_FLOW_LAYER_INNER_L2)
+		MLX5_SET(fte_match_set_lyr_2_4, headers_m, cvlan_tag, 1);
 	if (!ipv6_v)
 		return;
 	if (!ipv6_m)
@@ -5343,12 +5351,6 @@ flow_dv_translate_item_ipv6(void *matcher, void *key,
 		 ipv6_m->hdr.proto);
 	MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_protocol,
 		 ipv6_v->hdr.proto & ipv6_m->hdr.proto);
-	/*
-	 * On outer header (which must contains L2), or inner header with L2,
-	 * set cvlan_tag mask bit to mark this packet as untagged.
-	 */
-	if (!inner || item_flags & MLX5_FLOW_LAYER_INNER_L2)
-		MLX5_SET(fte_match_set_lyr_2_4, headers_m, cvlan_tag, 1);
 }
 
 /**
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:20.730394169 +0100
+++ 0046-net-mlx5-fix-CVLAN-tag-set-in-IP-item-translation.patch	2020-05-19 13:56:18.271502755 +0100
@@ -1,8 +1,10 @@
-From 1908cab425e4206321fb3f62688f9e1f92b36f6a Mon Sep 17 00:00:00 2001
+From 307876a7478b0ba135e2b577e01838c3130693ba Mon Sep 17 00:00:00 2001
 From: Dekel Peled <dekelp@mellanox.com>
 Date: Mon, 16 Mar 2020 10:57:39 +0200
 Subject: [PATCH] net/mlx5: fix CVLAN tag set in IP item translation
 
+[ upstream commit 1908cab425e4206321fb3f62688f9e1f92b36f6a ]
+
 Previous fix added, at the end of functions
 flow_dv_translate_item_ipv4() and flow_dv_translate_item_ipv6(), the
 setting of cvlan_tag mask.
@@ -13,7 +15,6 @@
 check of item->spec, to make sure it is always executed.
 
 Fixes: 797329d6c4a1 ("net/mlx5: fix match on ethertype and CVLAN tag")
-Cc: stable@dpdk.org
 
 Signed-off-by: Dekel Peled <dekelp@mellanox.com>
 Acked-by: Matan Azrad <matan@mellanox.com>
@@ -22,10 +23,10 @@
  1 file changed, 14 insertions(+), 12 deletions(-)
 
 diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index e2d6690fa8..20906318ee 100644
+index 868d01438d..b2e0365c1f 100644
 --- a/drivers/net/mlx5/mlx5_flow_dv.c
 +++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -5464,6 +5464,13 @@ flow_dv_translate_item_ipv4(void *matcher, void *key,
+@@ -5203,6 +5203,13 @@ flow_dv_translate_item_ipv4(void *matcher, void *key,
  	else
  		MLX5_SET(fte_match_set_lyr_2_4, headers_m, ip_version, 0x4);
  	MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_version, 4);
@@ -39,10 +40,10 @@
  	if (!ipv4_v)
  		return;
  	if (!ipv4_m)
-@@ -5495,12 +5502,6 @@ flow_dv_translate_item_ipv4(void *matcher, void *key,
- 		 ipv4_m->hdr.time_to_live);
- 	MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_ttl_hoplimit,
- 		 ipv4_v->hdr.time_to_live & ipv4_m->hdr.time_to_live);
+@@ -5230,12 +5237,6 @@ flow_dv_translate_item_ipv4(void *matcher, void *key,
+ 		 ipv4_m->hdr.next_proto_id);
+ 	MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_protocol,
+ 		 ipv4_v->hdr.next_proto_id & ipv4_m->hdr.next_proto_id);
 -	/*
 -	 * On outer header (which must contains L2), or inner header with L2,
 -	 * set cvlan_tag mask bit to mark this packet as untagged.
@@ -52,7 +53,7 @@
  }
  
  /**
-@@ -5565,6 +5566,13 @@ flow_dv_translate_item_ipv6(void *matcher, void *key,
+@@ -5300,6 +5301,13 @@ flow_dv_translate_item_ipv6(void *matcher, void *key,
  	else
  		MLX5_SET(fte_match_set_lyr_2_4, headers_m, ip_version, 0x6);
  	MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_version, 6);
@@ -66,10 +67,10 @@
  	if (!ipv6_v)
  		return;
  	if (!ipv6_m)
-@@ -5613,12 +5621,6 @@ flow_dv_translate_item_ipv6(void *matcher, void *key,
- 		 ipv6_m->hdr.hop_limits);
- 	MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_ttl_hoplimit,
- 		 ipv6_v->hdr.hop_limits & ipv6_m->hdr.hop_limits);
+@@ -5343,12 +5351,6 @@ flow_dv_translate_item_ipv6(void *matcher, void *key,
+ 		 ipv6_m->hdr.proto);
+ 	MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_protocol,
+ 		 ipv6_v->hdr.proto & ipv6_m->hdr.proto);
 -	/*
 -	 * On outer header (which must contains L2), or inner header with L2,
 -	 * set cvlan_tag mask bit to mark this packet as untagged.

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

* [dpdk-stable] patch 'net/mlx5: reduce Tx completion index memory loads' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (44 preceding siblings ...)
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/mlx5: fix CVLAN tag set in IP item translation' " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'contigmem: cleanup properly when load fails' " luca.boccassi
                   ` (33 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Alexander Kozyrev; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 6e0c764098edb83a98edfabff16ada2886db66a4 Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev@mellanox.com>
Date: Mon, 16 Mar 2020 15:34:59 +0000
Subject: [PATCH] net/mlx5: reduce Tx completion index memory loads

[ upstream commit 8d4659e70fc081ab220e44552af194900d720d2e ]

There is a non-optimal check if doorbell is needed present in the
mlx5_tx_handle_completion() function. Advancing a copy of the txq
consumer index and checking this copy with initial value causes
unnecessary memory loads and hurts the performance. It is better to
have a simple small boolean variable for this purpose. That allows
to eliminate all the excessive memory operations with the txq consumer
index and restore the performance of the tx completions.

Fixes: 1fd9af05e44e ("net/mlx5: update Tx error handling routine")

Signed-off-by: Alexander Kozyrev <akozyrev@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
 drivers/net/mlx5/mlx5_rxtx.c | 30 ++++++++++++++----------------
 1 file changed, 14 insertions(+), 16 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index ea1050f9cd..905a84d4dc 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -2071,7 +2071,7 @@ mlx5_tx_handle_completion(struct mlx5_txq_data *restrict txq,
 {
 	unsigned int count = MLX5_TX_COMP_MAX_CQE;
 	volatile struct mlx5_cqe *last_cqe = NULL;
-	uint16_t ci = txq->cq_ci;
+	bool ring_doorbell = false;
 	int ret;
 
 	static_assert(MLX5_CQE_STATUS_HW_OWN < 0, "Must be negative value");
@@ -2079,8 +2079,8 @@ mlx5_tx_handle_completion(struct mlx5_txq_data *restrict txq,
 	do {
 		volatile struct mlx5_cqe *cqe;
 
-		cqe = &txq->cqes[ci & txq->cqe_m];
-		ret = check_cqe(cqe, txq->cqe_s, ci);
+		cqe = &txq->cqes[txq->cq_ci & txq->cqe_m];
+		ret = check_cqe(cqe, txq->cqe_s, txq->cq_ci);
 		if (unlikely(ret != MLX5_CQE_STATUS_SW_OWN)) {
 			if (likely(ret != MLX5_CQE_STATUS_ERR)) {
 				/* No new CQEs in completion queue. */
@@ -2094,7 +2094,6 @@ mlx5_tx_handle_completion(struct mlx5_txq_data *restrict txq,
 			 * here, before we might perform SQ reset.
 			 */
 			rte_wmb();
-			txq->cq_ci = ci;
 			ret = mlx5_tx_error_cqe_handle
 				(txq, (volatile struct mlx5_err_cqe *)cqe);
 			if (unlikely(ret < 0)) {
@@ -2110,15 +2109,18 @@ mlx5_tx_handle_completion(struct mlx5_txq_data *restrict txq,
 			 * MLX5_CQE_SYNDROME_WR_FLUSH_ERR status.
 			 * The send queue is supposed to be empty.
 			 */
-			++ci;
-			txq->cq_pi = ci;
+			ring_doorbell = true;
+			++txq->cq_ci;
+			txq->cq_pi = txq->cq_ci;
 			last_cqe = NULL;
 			continue;
 		}
 		/* Normal transmit completion. */
-		assert(ci != txq->cq_pi);
-		assert((txq->fcqs[ci & txq->cqe_m] >> 16) == cqe->wqe_counter);
-		++ci;
+		assert(txq->cq_ci != txq->cq_pi);
+		assert((txq->fcqs[txq->cq_ci & txq->cqe_m] >> 16) ==
+			    cqe->wqe_counter);
+		ring_doorbell = true;
+		++txq->cq_ci;
 		last_cqe = cqe;
 		/*
 		 * We have to restrict the amount of processed CQEs
@@ -2131,14 +2133,10 @@ mlx5_tx_handle_completion(struct mlx5_txq_data *restrict txq,
 		if (likely(--count == 0))
 			break;
 	} while (true);
-	if (likely(ci != txq->cq_ci)) {
-		/*
-		 * Update completion queue consuming index
-		 * and ring doorbell to notify hardware.
-		 */
+	if (likely(ring_doorbell)) {
+		/* Ring doorbell to notify hardware. */
 		rte_compiler_barrier();
-		txq->cq_ci = ci;
-		*txq->cq_db = rte_cpu_to_be_32(ci);
+		*txq->cq_db = rte_cpu_to_be_32(txq->cq_ci);
 		mlx5_tx_comp_flush(txq, last_cqe, olx);
 	}
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:20.777894123 +0100
+++ 0047-net-mlx5-reduce-Tx-completion-index-memory-loads.patch	2020-05-19 13:56:18.279502899 +0100
@@ -1,8 +1,10 @@
-From 8d4659e70fc081ab220e44552af194900d720d2e Mon Sep 17 00:00:00 2001
+From 6e0c764098edb83a98edfabff16ada2886db66a4 Mon Sep 17 00:00:00 2001
 From: Alexander Kozyrev <akozyrev@mellanox.com>
 Date: Mon, 16 Mar 2020 15:34:59 +0000
 Subject: [PATCH] net/mlx5: reduce Tx completion index memory loads
 
+[ upstream commit 8d4659e70fc081ab220e44552af194900d720d2e ]
+
 There is a non-optimal check if doorbell is needed present in the
 mlx5_tx_handle_completion() function. Advancing a copy of the txq
 consumer index and checking this copy with initial value causes
@@ -12,19 +14,18 @@
 index and restore the performance of the tx completions.
 
 Fixes: 1fd9af05e44e ("net/mlx5: update Tx error handling routine")
-Cc: stable@dpdk.org
 
 Signed-off-by: Alexander Kozyrev <akozyrev@mellanox.com>
 Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
 ---
- drivers/net/mlx5/mlx5_rxtx.c | 29 +++++++++++++----------------
- 1 file changed, 13 insertions(+), 16 deletions(-)
+ drivers/net/mlx5/mlx5_rxtx.c | 30 ++++++++++++++----------------
+ 1 file changed, 14 insertions(+), 16 deletions(-)
 
 diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
-index 5ac63da803..f3bf763769 100644
+index ea1050f9cd..905a84d4dc 100644
 --- a/drivers/net/mlx5/mlx5_rxtx.c
 +++ b/drivers/net/mlx5/mlx5_rxtx.c
-@@ -2160,7 +2160,7 @@ mlx5_tx_handle_completion(struct mlx5_txq_data *restrict txq,
+@@ -2071,7 +2071,7 @@ mlx5_tx_handle_completion(struct mlx5_txq_data *restrict txq,
  {
  	unsigned int count = MLX5_TX_COMP_MAX_CQE;
  	volatile struct mlx5_cqe *last_cqe = NULL;
@@ -33,7 +34,7 @@
  	int ret;
  
  	static_assert(MLX5_CQE_STATUS_HW_OWN < 0, "Must be negative value");
-@@ -2168,8 +2168,8 @@ mlx5_tx_handle_completion(struct mlx5_txq_data *restrict txq,
+@@ -2079,8 +2079,8 @@ mlx5_tx_handle_completion(struct mlx5_txq_data *restrict txq,
  	do {
  		volatile struct mlx5_cqe *cqe;
  
@@ -44,7 +45,7 @@
  		if (unlikely(ret != MLX5_CQE_STATUS_SW_OWN)) {
  			if (likely(ret != MLX5_CQE_STATUS_ERR)) {
  				/* No new CQEs in completion queue. */
-@@ -2183,7 +2183,6 @@ mlx5_tx_handle_completion(struct mlx5_txq_data *restrict txq,
+@@ -2094,7 +2094,6 @@ mlx5_tx_handle_completion(struct mlx5_txq_data *restrict txq,
  			 * here, before we might perform SQ reset.
  			 */
  			rte_wmb();
@@ -52,7 +53,7 @@
  			ret = mlx5_tx_error_cqe_handle
  				(txq, (volatile struct mlx5_err_cqe *)cqe);
  			if (unlikely(ret < 0)) {
-@@ -2199,16 +2198,18 @@ mlx5_tx_handle_completion(struct mlx5_txq_data *restrict txq,
+@@ -2110,15 +2109,18 @@ mlx5_tx_handle_completion(struct mlx5_txq_data *restrict txq,
  			 * MLX5_CQE_SYNDROME_WR_FLUSH_ERR status.
  			 * The send queue is supposed to be empty.
  			 */
@@ -65,18 +66,18 @@
  			continue;
  		}
  		/* Normal transmit completion. */
--		MLX5_ASSERT(ci != txq->cq_pi);
--		MLX5_ASSERT((txq->fcqs[ci & txq->cqe_m] >> 16) ==
-+		MLX5_ASSERT(txq->cq_ci != txq->cq_pi);
-+		MLX5_ASSERT((txq->fcqs[txq->cq_ci & txq->cqe_m] >> 16) ==
- 			    cqe->wqe_counter);
+-		assert(ci != txq->cq_pi);
+-		assert((txq->fcqs[ci & txq->cqe_m] >> 16) == cqe->wqe_counter);
 -		++ci;
++		assert(txq->cq_ci != txq->cq_pi);
++		assert((txq->fcqs[txq->cq_ci & txq->cqe_m] >> 16) ==
++			    cqe->wqe_counter);
 +		ring_doorbell = true;
 +		++txq->cq_ci;
  		last_cqe = cqe;
  		/*
  		 * We have to restrict the amount of processed CQEs
-@@ -2221,14 +2222,10 @@ mlx5_tx_handle_completion(struct mlx5_txq_data *restrict txq,
+@@ -2131,14 +2133,10 @@ mlx5_tx_handle_completion(struct mlx5_txq_data *restrict txq,
  		if (likely(--count == 0))
  			break;
  	} while (true);

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

* [dpdk-stable] patch 'contigmem: cleanup properly when load fails' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (45 preceding siblings ...)
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/mlx5: reduce Tx completion index memory loads' " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-19 12:53 ` [dpdk-stable] patch 'devtools: fix symbol map change check' " luca.boccassi
                   ` (32 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Jim Harris; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 47109048612843c94cb18cb51c221dcf559b33df Mon Sep 17 00:00:00 2001
From: Jim Harris <james.r.harris@intel.com>
Date: Mon, 9 Mar 2020 03:00:25 -0700
Subject: [PATCH] contigmem: cleanup properly when load fails

[ upstream commit 3df951337441cc6b7bb99996e0acf185d4aa52c5 ]

If contigmem is not able to allocate all of the
requested buffers, it frees whatever buffers were
able to be allocated up until that point.

But the pointers are not set to NULL in that case.
After the load fails, the FreeBSD kernel will
immediately call the contigmem unload handler, which
tries to free the buffers again since the pointers
were not set to NULL.

It's not clear that we should just rely on the unload
handler getting called after load failure. So let's
keep the existing cleanup code in the load handler,
but explicitly set the pointers to NULL after freeing
them.

Fixes: 5f51eca22489 ("contigmem: free allocated memory on error")

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 kernel/freebsd/contigmem/contigmem.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/kernel/freebsd/contigmem/contigmem.c b/kernel/freebsd/contigmem/contigmem.c
index 64e0a7fecd..abb76f241e 100644
--- a/kernel/freebsd/contigmem/contigmem.c
+++ b/kernel/freebsd/contigmem/contigmem.c
@@ -165,9 +165,11 @@ contigmem_load()
 
 error:
 	for (i = 0; i < contigmem_num_buffers; i++) {
-		if (contigmem_buffers[i].addr != NULL)
+		if (contigmem_buffers[i].addr != NULL) {
 			contigfree(contigmem_buffers[i].addr,
 				contigmem_buffer_size, M_CONTIGMEM);
+			contigmem_buffers[i].addr = NULL;
+		}
 		if (mtx_initialized(&contigmem_buffers[i].mtx))
 			mtx_destroy(&contigmem_buffers[i].mtx);
 	}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:20.821496642 +0100
+++ 0048-contigmem-cleanup-properly-when-load-fails.patch	2020-05-19 13:56:18.279502899 +0100
@@ -1,8 +1,10 @@
-From 3df951337441cc6b7bb99996e0acf185d4aa52c5 Mon Sep 17 00:00:00 2001
+From 47109048612843c94cb18cb51c221dcf559b33df Mon Sep 17 00:00:00 2001
 From: Jim Harris <james.r.harris@intel.com>
 Date: Mon, 9 Mar 2020 03:00:25 -0700
 Subject: [PATCH] contigmem: cleanup properly when load fails
 
+[ upstream commit 3df951337441cc6b7bb99996e0acf185d4aa52c5 ]
+
 If contigmem is not able to allocate all of the
 requested buffers, it frees whatever buffers were
 able to be allocated up until that point.
@@ -20,7 +22,6 @@
 them.
 
 Fixes: 5f51eca22489 ("contigmem: free allocated memory on error")
-Cc: stable@dpdk.org
 
 Signed-off-by: Jim Harris <james.r.harris@intel.com>
 Acked-by: Bruce Richardson <bruce.richardson@intel.com>
@@ -29,7 +30,7 @@
  1 file changed, 3 insertions(+), 1 deletion(-)
 
 diff --git a/kernel/freebsd/contigmem/contigmem.c b/kernel/freebsd/contigmem/contigmem.c
-index 7ea0bc6177..bd72f4d620 100644
+index 64e0a7fecd..abb76f241e 100644
 --- a/kernel/freebsd/contigmem/contigmem.c
 +++ b/kernel/freebsd/contigmem/contigmem.c
 @@ -165,9 +165,11 @@ contigmem_load()

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

* [dpdk-stable] patch 'devtools: fix symbol map change check' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (46 preceding siblings ...)
  2020-05-19 12:53 ` [dpdk-stable] patch 'contigmem: cleanup properly when load fails' " luca.boccassi
@ 2020-05-19 12:53 ` luca.boccassi
  2020-05-19 12:54 ` [dpdk-stable] patch 'test: load drivers when required' " luca.boccassi
                   ` (31 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:53 UTC (permalink / raw)
  To: Nithin Dabilpuram; +Cc: David Marchand, Neil Horman, Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 7c8ab0ae700771d372625fcc5e9dbc01c797399c Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <ndabilpuram@marvell.com>
Date: Mon, 23 Mar 2020 17:26:13 +0530
Subject: [PATCH] devtools: fix symbol map change check

[ upstream commit f08885494f241b115ad66763b585fbfb486d5160 ]

Fix check symbol change script to detect new diff file when
it is in between  "--- /dev/null" to "b/lib/...".
Current awk line expects line to start with "a/..."
which is not always true for all diffs.
As a result if in_map was '1' earlier, it will not be changed
to '0' and we get check patch errors which are not true.

Fixes: 4bec48184e33 ("devtools: add checks for ABI symbol addition")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Tested-by: Jerin Jacob <jerinj@marvell.com>
---
 devtools/check-symbol-change.sh | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/devtools/check-symbol-change.sh b/devtools/check-symbol-change.sh
index c5434f3bb0..ed2178e36e 100755
--- a/devtools/check-symbol-change.sh
+++ b/devtools/check-symbol-change.sh
@@ -17,13 +17,11 @@ build_map_changes()
 		# map files are altered, and all section/symbol names
 		# appearing between a triggering of this rule and the
 		# next trigger of this rule are associated with this file
-		/[-+] a\/.*\.map/ {map=$2; in_map=1}
+		/[-+] [ab]\/.*\.map/ {map=$2; in_map=1; next}
 
-		# Same pattern as above, only it matches on anything that
-		# does not end in 'map', indicating we have left the map chunk.
-		# When we hit this, turn off the in_map variable, which
-		# supresses the subordonate rules below
-		/[-+] a\/.*\.[^map]/ {in_map=0}
+		# The previous rule catches all .map files, anything else
+		# indicates we left the map chunk.
+		/[-+] [ab]\// {in_map=0}
 
 		# Triggering this rule, which starts a line and ends it
 		# with a { identifies a versioned section.  The section name is
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:20.858343785 +0100
+++ 0049-devtools-fix-symbol-map-change-check.patch	2020-05-19 13:56:18.279502899 +0100
@@ -1,8 +1,10 @@
-From f08885494f241b115ad66763b585fbfb486d5160 Mon Sep 17 00:00:00 2001
+From 7c8ab0ae700771d372625fcc5e9dbc01c797399c Mon Sep 17 00:00:00 2001
 From: Nithin Dabilpuram <ndabilpuram@marvell.com>
 Date: Mon, 23 Mar 2020 17:26:13 +0530
 Subject: [PATCH] devtools: fix symbol map change check
 
+[ upstream commit f08885494f241b115ad66763b585fbfb486d5160 ]
+
 Fix check symbol change script to detect new diff file when
 it is in between  "--- /dev/null" to "b/lib/...".
 Current awk line expects line to start with "a/..."
@@ -11,7 +13,6 @@
 to '0' and we get check patch errors which are not true.
 
 Fixes: 4bec48184e33 ("devtools: add checks for ABI symbol addition")
-Cc: stable@dpdk.org
 
 Signed-off-by: David Marchand <david.marchand@redhat.com>
 Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>

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

* [dpdk-stable] patch 'test: load drivers when required' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (47 preceding siblings ...)
  2020-05-19 12:53 ` [dpdk-stable] patch 'devtools: fix symbol map change check' " luca.boccassi
@ 2020-05-19 12:54 ` luca.boccassi
  2020-05-19 12:54 ` [dpdk-stable] patch 'test: skip some subtests in no-huge mode' " luca.boccassi
                   ` (30 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:54 UTC (permalink / raw)
  To: David Marchand; +Cc: Ruifeng Wang, Aaron Conole, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 796af72c2d1256dca48669c593151f1f914b8343 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Mon, 23 Mar 2020 20:59:22 +0100
Subject: [PATCH] test: load drivers when required

[ upstream commit 7d0c2354a5953dd1e40dd2b97c106214822c06a4 ]

Concatenating to test_args if event_eth_tx_adapter_autotest is executed
makes all subsequent tests inherit from the drivers loading while this
is unneeded.

Fixes: 207b1c813f39 ("test: fix build without ring PMD")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Aaron Conole <aconole@redhat.com>
---
 app/test/meson.build | 34 +++++++++++++++-------------------
 1 file changed, 15 insertions(+), 19 deletions(-)

diff --git a/app/test/meson.build b/app/test/meson.build
index 8cb90c4993..8524a986a1 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -402,37 +402,33 @@ timeout_seconds_fast = 10
 get_coremask = find_program('get-coremask.sh')
 num_cores_arg = '-l ' + run_command(get_coremask).stdout().strip()
 
-test_args = [num_cores_arg]
+default_test_args = [num_cores_arg]
 
 foreach arg : fast_test_names
+	test_args = default_test_args
+
 	if (get_option('default_library') == 'shared' and
 		arg == 'event_eth_tx_adapter_autotest')
 		foreach drv:dpdk_drivers
 			test_args += ['-d', drv.full_path().split('.a')[0] + '.so']
 		endforeach
 	endif
-	if host_machine.system() == 'linux'
-		test(arg, dpdk_test,
-			  env : ['DPDK_TEST=' + arg],
-			  args : test_args +
-				 ['--file-prefix=@0@'.format(arg)],
-		timeout : timeout_seconds_fast,
-		is_parallel : false,
-		suite : 'fast-tests')
-	else
-		test(arg, dpdk_test,
-			env : ['DPDK_TEST=' + arg],
-			args : test_args,
-		timeout : timeout_seconds_fast,
-		is_parallel : false,
-		suite : 'fast-tests')
+	if is_linux
+		test_args += ['--file-prefix=@0@'.format(arg)]
 	endif
+
+	test(arg, dpdk_test,
+		env : ['DPDK_TEST=' + arg],
+		args : test_args,
+		timeout : timeout_seconds_fast,
+		is_parallel : false,
+		suite : 'fast-tests')
 endforeach
 
 foreach arg : perf_test_names
 	test(arg, dpdk_test,
 	env : ['DPDK_TEST=' + arg],
-	args : test_args,
+	args : default_test_args,
 	timeout : timeout_seconds,
 	is_parallel : false,
 	suite : 'perf-tests')
@@ -441,7 +437,7 @@ endforeach
 foreach arg : driver_test_names
 	test(arg, dpdk_test,
 		env : ['DPDK_TEST=' + arg],
-		args : test_args,
+		args : default_test_args,
 		timeout : timeout_seconds,
 		is_parallel : false,
 		suite : 'driver-tests')
@@ -450,7 +446,7 @@ endforeach
 foreach arg : dump_test_names
 	test(arg, dpdk_test,
 		env : ['DPDK_TEST=' + arg],
-		args : test_args,
+		args : default_test_args,
 		timeout : timeout_seconds,
 		is_parallel : false,
 		suite : 'debug-tests')
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:20.895430270 +0100
+++ 0050-test-load-drivers-when-required.patch	2020-05-19 13:56:18.279502899 +0100
@@ -1,14 +1,15 @@
-From 7d0c2354a5953dd1e40dd2b97c106214822c06a4 Mon Sep 17 00:00:00 2001
+From 796af72c2d1256dca48669c593151f1f914b8343 Mon Sep 17 00:00:00 2001
 From: David Marchand <david.marchand@redhat.com>
 Date: Mon, 23 Mar 2020 20:59:22 +0100
 Subject: [PATCH] test: load drivers when required
 
+[ upstream commit 7d0c2354a5953dd1e40dd2b97c106214822c06a4 ]
+
 Concatenating to test_args if event_eth_tx_adapter_autotest is executed
 makes all subsequent tests inherit from the drivers loading while this
 is unneeded.
 
 Fixes: 207b1c813f39 ("test: fix build without ring PMD")
-Cc: stable@dpdk.org
 
 Signed-off-by: David Marchand <david.marchand@redhat.com>
 Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
@@ -18,10 +19,10 @@
  1 file changed, 15 insertions(+), 19 deletions(-)
 
 diff --git a/app/test/meson.build b/app/test/meson.build
-index 0a2ce710f0..7ab2b586e1 100644
+index 8cb90c4993..8524a986a1 100644
 --- a/app/test/meson.build
 +++ b/app/test/meson.build
-@@ -403,37 +403,33 @@ timeout_seconds_fast = 10
+@@ -402,37 +402,33 @@ timeout_seconds_fast = 10
  get_coremask = find_program('get-coremask.sh')
  num_cores_arg = '-l ' + run_command(get_coremask).stdout().strip()
  
@@ -72,7 +73,7 @@
  	timeout : timeout_seconds,
  	is_parallel : false,
  	suite : 'perf-tests')
-@@ -442,7 +438,7 @@ endforeach
+@@ -441,7 +437,7 @@ endforeach
  foreach arg : driver_test_names
  	test(arg, dpdk_test,
  		env : ['DPDK_TEST=' + arg],
@@ -81,7 +82,7 @@
  		timeout : timeout_seconds,
  		is_parallel : false,
  		suite : 'driver-tests')
-@@ -451,7 +447,7 @@ endforeach
+@@ -450,7 +446,7 @@ endforeach
  foreach arg : dump_test_names
  	test(arg, dpdk_test,
  		env : ['DPDK_TEST=' + arg],

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

* [dpdk-stable] patch 'test: skip some subtests in no-huge mode' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (48 preceding siblings ...)
  2020-05-19 12:54 ` [dpdk-stable] patch 'test: load drivers when required' " luca.boccassi
@ 2020-05-19 12:54 ` luca.boccassi
  2020-05-19 12:54 ` [dpdk-stable] patch 'eal/freebsd: fix queuing duplicate alarm callbacks' " luca.boccassi
                   ` (29 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:54 UTC (permalink / raw)
  To: Ruifeng Wang; +Cc: Gavin Hu, Aaron Conole, Yipeng Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 7ad8cd364e69ed6a59a204c4875fc254a7f4fe19 Mon Sep 17 00:00:00 2001
From: Ruifeng Wang <ruifeng.wang@arm.com>
Date: Mon, 23 Mar 2020 20:59:23 +0100
Subject: [PATCH] test: skip some subtests in no-huge mode

[ upstream commit 27fb5dd2850c60b46660b93c2fe14da6841b142c ]

When running with '--no-huge' flag, tests failed with messages as:
    ACL context creation with invalid NUMA should have failed!
    fbk hash creation should have failed
    test_table_pipeline: Check pipeline invalid params failed.

These cases test against invalid socket ID as input parameter, and
expect error return. But function calls return success because
invalid sock ID is overwritten to SOCKET_ID_ANY when in no-huge mode.

The tests against invalid socket ID are skipped in no-huge mode.

Fixes: 5640171c528a ("malloc: fix external heap allocation in no-huge mode")

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
---
 app/test/test_acl.c            | 20 +++++++++++---------
 app/test/test_hash.c           |  7 +++++--
 app/test/test_table_pipeline.c | 12 +++++++-----
 3 files changed, 23 insertions(+), 16 deletions(-)

diff --git a/app/test/test_acl.c b/app/test/test_acl.c
index 9cd9e37dbe..b78b67193a 100644
--- a/app/test/test_acl.c
+++ b/app/test/test_acl.c
@@ -1394,16 +1394,18 @@ test_invalid_parameters(void)
 	} else
 		rte_acl_free(acx);
 
-	/* invalid NUMA node */
-	memcpy(&param, &acl_param, sizeof(param));
-	param.socket_id = RTE_MAX_NUMA_NODES + 1;
+	if (rte_eal_has_hugepages()) {
+		/* invalid NUMA node */
+		memcpy(&param, &acl_param, sizeof(param));
+		param.socket_id = RTE_MAX_NUMA_NODES + 1;
 
-	acx = rte_acl_create(&param);
-	if (acx != NULL) {
-		printf("Line %i: ACL context creation with invalid NUMA "
-				"should have failed!\n", __LINE__);
-		rte_acl_free(acx);
-		return -1;
+		acx = rte_acl_create(&param);
+		if (acx != NULL) {
+			printf("Line %i: ACL context creation with invalid "
+					"NUMA should have failed!\n", __LINE__);
+			rte_acl_free(acx);
+			return -1;
+		}
 	}
 
 	/* NULL name */
diff --git a/app/test/test_hash.c b/app/test/test_hash.c
index 0052dce2de..2ac298e21e 100644
--- a/app/test/test_hash.c
+++ b/app/test/test_hash.c
@@ -1142,8 +1142,11 @@ fbk_hash_unit_test(void)
 	handle = rte_fbk_hash_create(&invalid_params_7);
 	RETURN_IF_ERROR_FBK(handle != NULL, "fbk hash creation should have failed");
 
-	handle = rte_fbk_hash_create(&invalid_params_8);
-	RETURN_IF_ERROR_FBK(handle != NULL, "fbk hash creation should have failed");
+	if (rte_eal_has_hugepages()) {
+		handle = rte_fbk_hash_create(&invalid_params_8);
+		RETURN_IF_ERROR_FBK(handle != NULL,
+					"fbk hash creation should have failed");
+	}
 
 	handle = rte_fbk_hash_create(&invalid_params_same_name_1);
 	RETURN_IF_ERROR_FBK(handle == NULL, "fbk hash creation should have succeeded");
diff --git a/app/test/test_table_pipeline.c b/app/test/test_table_pipeline.c
index 441338ac01..bc412c3081 100644
--- a/app/test/test_table_pipeline.c
+++ b/app/test/test_table_pipeline.c
@@ -190,11 +190,13 @@ check_pipeline_invalid_params(void)
 		goto fail;
 	}
 
-	p = rte_pipeline_create(&pipeline_params_3);
-	if (p != NULL) {
-		RTE_LOG(INFO, PIPELINE, "%s: Configure pipeline with invalid "
-			"socket\n", __func__);
-		goto fail;
+	if (rte_eal_has_hugepages()) {
+		p = rte_pipeline_create(&pipeline_params_3);
+		if (p != NULL) {
+			RTE_LOG(INFO, PIPELINE, "%s: Configure pipeline with "
+				"invalid socket\n", __func__);
+			goto fail;
+		}
 	}
 
 	/* Check pipeline consistency */
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:20.932443483 +0100
+++ 0051-test-skip-some-subtests-in-no-huge-mode.patch	2020-05-19 13:56:18.283502971 +0100
@@ -1,8 +1,10 @@
-From 27fb5dd2850c60b46660b93c2fe14da6841b142c Mon Sep 17 00:00:00 2001
+From 7ad8cd364e69ed6a59a204c4875fc254a7f4fe19 Mon Sep 17 00:00:00 2001
 From: Ruifeng Wang <ruifeng.wang@arm.com>
 Date: Mon, 23 Mar 2020 20:59:23 +0100
 Subject: [PATCH] test: skip some subtests in no-huge mode
 
+[ upstream commit 27fb5dd2850c60b46660b93c2fe14da6841b142c ]
+
 When running with '--no-huge' flag, tests failed with messages as:
     ACL context creation with invalid NUMA should have failed!
     fbk hash creation should have failed
@@ -15,7 +17,6 @@
 The tests against invalid socket ID are skipped in no-huge mode.
 
 Fixes: 5640171c528a ("malloc: fix external heap allocation in no-huge mode")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
 Reviewed-by: Gavin Hu <gavin.hu@arm.com>
@@ -28,10 +29,10 @@
  3 files changed, 23 insertions(+), 16 deletions(-)
 
 diff --git a/app/test/test_acl.c b/app/test/test_acl.c
-index 501de35da1..316bf4d065 100644
+index 9cd9e37dbe..b78b67193a 100644
 --- a/app/test/test_acl.c
 +++ b/app/test/test_acl.c
-@@ -1397,16 +1397,18 @@ test_invalid_parameters(void)
+@@ -1394,16 +1394,18 @@ test_invalid_parameters(void)
  	} else
  		rte_acl_free(acx);
  
@@ -60,10 +61,10 @@
  
  	/* NULL name */
 diff --git a/app/test/test_hash.c b/app/test/test_hash.c
-index fbd5725c68..ab978ea689 100644
+index 0052dce2de..2ac298e21e 100644
 --- a/app/test/test_hash.c
 +++ b/app/test/test_hash.c
-@@ -1136,8 +1136,11 @@ fbk_hash_unit_test(void)
+@@ -1142,8 +1142,11 @@ fbk_hash_unit_test(void)
  	handle = rte_fbk_hash_create(&invalid_params_7);
  	RETURN_IF_ERROR_FBK(handle != NULL, "fbk hash creation should have failed");
  

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

* [dpdk-stable] patch 'eal/freebsd: fix queuing duplicate alarm callbacks' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (49 preceding siblings ...)
  2020-05-19 12:54 ` [dpdk-stable] patch 'test: skip some subtests in no-huge mode' " luca.boccassi
@ 2020-05-19 12:54 ` luca.boccassi
  2020-05-19 12:54 ` [dpdk-stable] patch 'mem: preallocate VA space in no-huge mode' " luca.boccassi
                   ` (28 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:54 UTC (permalink / raw)
  To: Mit Matelske; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 46cd0c98bbb46a3548f291d800b7f80e1ac4965e Mon Sep 17 00:00:00 2001
From: Mit Matelske <mit@pt.net>
Date: Wed, 20 Nov 2019 14:10:56 -0600
Subject: [PATCH] eal/freebsd: fix queuing duplicate alarm callbacks

[ upstream commit bcf789da7335b80e792ba926b5a95a12fa2e1e9a ]

The source callback list grows infinitely when more than alarm
is queued.

This fix recognizes that an alarm interrupt in FreeBSD should never
have more than one callback on its list, so if
rte_intr_callback_register() is called with an interrupt handle type
of RTE_INTR_HANDLE_ALARM, so if such an interrupt type already has a
non-empty list, then a new callback is not created, but the kevent
timer is restarted properly.

Fixes: 23150bd8d8a8 ("eal/bsd: add interrupt thread")

Signed-off-by: Mit Matelske <mit@pt.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_eal/freebsd/eal/eal_interrupts.c | 79 +++++++++++----------
 1 file changed, 43 insertions(+), 36 deletions(-)

diff --git a/lib/librte_eal/freebsd/eal/eal_interrupts.c b/lib/librte_eal/freebsd/eal/eal_interrupts.c
index f6831b7902..3fee762be9 100644
--- a/lib/librte_eal/freebsd/eal/eal_interrupts.c
+++ b/lib/librte_eal/freebsd/eal/eal_interrupts.c
@@ -83,9 +83,9 @@ int
 rte_intr_callback_register(const struct rte_intr_handle *intr_handle,
 		rte_intr_callback_fn cb, void *cb_arg)
 {
-	struct rte_intr_callback *callback = NULL;
-	struct rte_intr_source *src = NULL;
-	int ret, add_event;
+	struct rte_intr_callback *callback;
+	struct rte_intr_source *src;
+	int ret, add_event = 0;
 
 	/* first do parameter checking */
 	if (intr_handle == NULL || intr_handle->fd < 0 || cb == NULL) {
@@ -98,47 +98,53 @@ rte_intr_callback_register(const struct rte_intr_handle *intr_handle,
 		return -ENODEV;
 	}
 
-	/* allocate a new interrupt callback entity */
-	callback = calloc(1, sizeof(*callback));
-	if (callback == NULL) {
-		RTE_LOG(ERR, EAL, "Can not allocate memory\n");
-		return -ENOMEM;
-	}
-	callback->cb_fn = cb;
-	callback->cb_arg = cb_arg;
-	callback->pending_delete = 0;
-	callback->ucb_fn = NULL;
-
 	rte_spinlock_lock(&intr_lock);
 
-	/* check if there is at least one callback registered for the fd */
+	/* find the source for this intr_handle */
 	TAILQ_FOREACH(src, &intr_sources, next) {
-		if (src->intr_handle.fd == intr_handle->fd) {
-			/* we had no interrupts for this */
-			if (TAILQ_EMPTY(&src->callbacks))
-				add_event = 1;
-
-			TAILQ_INSERT_TAIL(&(src->callbacks), callback, next);
-			ret = 0;
+		if (src->intr_handle.fd == intr_handle->fd)
 			break;
-		}
 	}
 
-	/* no existing callbacks for this - add new source */
-	if (src == NULL) {
-		src = calloc(1, sizeof(*src));
-		if (src == NULL) {
+	/* if this is an alarm interrupt and it already has a callback,
+	 * then we don't want to create a new callback because the only
+	 * thing on the list should be eal_alarm_callback() and we may
+	 * be called just to reset the timer.
+	 */
+	if (src != NULL && src->intr_handle.type == RTE_INTR_HANDLE_ALARM &&
+		 !TAILQ_EMPTY(&src->callbacks)) {
+		callback = NULL;
+	} else {
+		/* allocate a new interrupt callback entity */
+		callback = calloc(1, sizeof(*callback));
+		if (callback == NULL) {
 			RTE_LOG(ERR, EAL, "Can not allocate memory\n");
 			ret = -ENOMEM;
 			goto fail;
-		} else {
-			src->intr_handle = *intr_handle;
-			TAILQ_INIT(&src->callbacks);
-			TAILQ_INSERT_TAIL(&(src->callbacks), callback, next);
-			TAILQ_INSERT_TAIL(&intr_sources, src, next);
+		}
+		callback->cb_fn = cb;
+		callback->cb_arg = cb_arg;
+		callback->pending_delete = 0;
+		callback->ucb_fn = NULL;
+
+		if (src == NULL) {
+			src = calloc(1, sizeof(*src));
+			if (src == NULL) {
+				RTE_LOG(ERR, EAL, "Can not allocate memory\n");
+				ret = -ENOMEM;
+				goto fail;
+			} else {
+				src->intr_handle = *intr_handle;
+				TAILQ_INIT(&src->callbacks);
+				TAILQ_INSERT_TAIL(&intr_sources, src, next);
+			}
+		}
+
+		/* we had no interrupts for this */
+		if (TAILQ_EMPTY(&src->callbacks))
 			add_event = 1;
-			ret = 0;
-		}
+
+		TAILQ_INSERT_TAIL(&(src->callbacks), callback, next);
 	}
 
 	/* add events to the queue. timer events are special as we need to
@@ -178,11 +184,12 @@ rte_intr_callback_register(const struct rte_intr_handle *intr_handle,
 	}
 	rte_spinlock_unlock(&intr_lock);
 
-	return ret;
+	return 0;
 fail:
 	/* clean up */
 	if (src != NULL) {
-		TAILQ_REMOVE(&(src->callbacks), callback, next);
+		if (callback != NULL)
+			TAILQ_REMOVE(&(src->callbacks), callback, next);
 		if (TAILQ_EMPTY(&(src->callbacks))) {
 			TAILQ_REMOVE(&intr_sources, src, next);
 			free(src);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:20.973900822 +0100
+++ 0052-eal-freebsd-fix-queuing-duplicate-alarm-callbacks.patch	2020-05-19 13:56:18.283502971 +0100
@@ -1,8 +1,10 @@
-From bcf789da7335b80e792ba926b5a95a12fa2e1e9a Mon Sep 17 00:00:00 2001
+From 46cd0c98bbb46a3548f291d800b7f80e1ac4965e Mon Sep 17 00:00:00 2001
 From: Mit Matelske <mit@pt.net>
 Date: Wed, 20 Nov 2019 14:10:56 -0600
 Subject: [PATCH] eal/freebsd: fix queuing duplicate alarm callbacks
 
+[ upstream commit bcf789da7335b80e792ba926b5a95a12fa2e1e9a ]
+
 The source callback list grows infinitely when more than alarm
 is queued.
 
@@ -14,7 +16,6 @@
 timer is restarted properly.
 
 Fixes: 23150bd8d8a8 ("eal/bsd: add interrupt thread")
-Cc: stable@dpdk.org
 
 Signed-off-by: Mit Matelske <mit@pt.net>
 Acked-by: Bruce Richardson <bruce.richardson@intel.com>
@@ -23,7 +24,7 @@
  1 file changed, 43 insertions(+), 36 deletions(-)
 
 diff --git a/lib/librte_eal/freebsd/eal/eal_interrupts.c b/lib/librte_eal/freebsd/eal/eal_interrupts.c
-index ce2a27b4a5..00991f26a9 100644
+index f6831b7902..3fee762be9 100644
 --- a/lib/librte_eal/freebsd/eal/eal_interrupts.c
 +++ b/lib/librte_eal/freebsd/eal/eal_interrupts.c
 @@ -83,9 +83,9 @@ int

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

* [dpdk-stable] patch 'mem: preallocate VA space in no-huge mode' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (50 preceding siblings ...)
  2020-05-19 12:54 ` [dpdk-stable] patch 'eal/freebsd: fix queuing duplicate alarm callbacks' " luca.boccassi
@ 2020-05-19 12:54 ` luca.boccassi
  2020-05-19 12:54 ` [dpdk-stable] patch 'test/kvargs: fix to consider empty elements as valid' " luca.boccassi
                   ` (27 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:54 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: David Marchand, Jun W Zhou, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 9aebba7e3d54df3cb42215cb3547b3a4c77e53ca Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Fri, 7 Feb 2020 11:11:14 +0000
Subject: [PATCH] mem: preallocate VA space in no-huge mode

[ upstream commit 4236694f0ae466b174a73a29df4cfa94753793f0 ]

When --no-huge mode is used, the memory is currently allocated with
mmap(NULL, ...). This is fine in most cases, but can fail in cases
where DPDK is run on a machine with an IOMMU that is of more limited
address width than that of a VA, because we're not specifying the
address hint for mmap() call.

Fix it by preallocating VA space before mapping it.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Tested-by: David Marchand <david.marchand@redhat.com>
Tested-by: Jun W Zhou <junx.w.zhou@intel.com>
---
 lib/librte_eal/linux/eal/eal_memory.c | 24 ++++++++++++++++++++----
 1 file changed, 20 insertions(+), 4 deletions(-)

diff --git a/lib/librte_eal/linux/eal/eal_memory.c b/lib/librte_eal/linux/eal/eal_memory.c
index 5604c2a7c0..7a9c97ff88 100644
--- a/lib/librte_eal/linux/eal/eal_memory.c
+++ b/lib/librte_eal/linux/eal/eal_memory.c
@@ -1340,6 +1340,8 @@ eal_legacy_hugepage_init(void)
 
 	/* hugetlbfs can be disabled */
 	if (internal_config.no_hugetlbfs) {
+		void *prealloc_addr;
+		size_t mem_sz;
 		struct rte_memseg_list *msl;
 		int n_segs, cur_seg, fd, flags;
 #ifdef MEMFD_SUPPORTED
@@ -1395,17 +1397,31 @@ eal_legacy_hugepage_init(void)
 			}
 		}
 #endif
-		addr = mmap(NULL, internal_config.memory, PROT_READ | PROT_WRITE,
-				flags, fd, 0);
-		if (addr == MAP_FAILED) {
+		/* preallocate address space for the memory, so that it can be
+		 * fit into the DMA mask.
+		 */
+		mem_sz = internal_config.memory;
+		prealloc_addr = eal_get_virtual_area(
+				NULL, &mem_sz, page_sz, 0, 0);
+		if (prealloc_addr == NULL) {
+			RTE_LOG(ERR, EAL,
+					"%s: reserving memory area failed: "
+					"%s\n",
+					__func__, strerror(errno));
+			return -1;
+		}
+		addr = mmap(prealloc_addr, mem_sz, PROT_READ | PROT_WRITE,
+				flags | MAP_FIXED, fd, 0);
+		if (addr == MAP_FAILED || addr != prealloc_addr) {
 			RTE_LOG(ERR, EAL, "%s: mmap() failed: %s\n", __func__,
 					strerror(errno));
+			munmap(prealloc_addr, mem_sz);
 			return -1;
 		}
 		msl->base_va = addr;
 		msl->page_sz = page_sz;
 		msl->socket_id = 0;
-		msl->len = internal_config.memory;
+		msl->len = mem_sz;
 		msl->heap = 1;
 
 		/* we're in single-file segments mode, so only the segment list
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:21.011646168 +0100
+++ 0053-mem-preallocate-VA-space-in-no-huge-mode.patch	2020-05-19 13:56:18.283502971 +0100
@@ -1,8 +1,10 @@
-From 4236694f0ae466b174a73a29df4cfa94753793f0 Mon Sep 17 00:00:00 2001
+From 9aebba7e3d54df3cb42215cb3547b3a4c77e53ca Mon Sep 17 00:00:00 2001
 From: Anatoly Burakov <anatoly.burakov@intel.com>
 Date: Fri, 7 Feb 2020 11:11:14 +0000
 Subject: [PATCH] mem: preallocate VA space in no-huge mode
 
+[ upstream commit 4236694f0ae466b174a73a29df4cfa94753793f0 ]
+
 When --no-huge mode is used, the memory is currently allocated with
 mmap(NULL, ...). This is fine in most cases, but can fail in cases
 where DPDK is run on a machine with an IOMMU that is of more limited
@@ -11,8 +13,6 @@
 
 Fix it by preallocating VA space before mapping it.
 
-Cc: stable@dpdk.org
-
 Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
 Tested-by: David Marchand <david.marchand@redhat.com>
 Tested-by: Jun W Zhou <junx.w.zhou@intel.com>

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

* [dpdk-stable] patch 'test/kvargs: fix to consider empty elements as valid' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (51 preceding siblings ...)
  2020-05-19 12:54 ` [dpdk-stable] patch 'mem: preallocate VA space in no-huge mode' " luca.boccassi
@ 2020-05-19 12:54 ` luca.boccassi
  2020-05-19 12:54 ` [dpdk-stable] patch 'test/kvargs: fix invalid cases check' " luca.boccassi
                   ` (26 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:54 UTC (permalink / raw)
  To: Olivier Matz; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From bcdd4476cd9993262c14686653e75ea54be16e2c Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Fri, 27 Mar 2020 09:09:53 +0100
Subject: [PATCH] test/kvargs: fix to consider empty elements as valid

[ upstream commit 55fa01f7edfc9d2fa5af57ffb8991750fbdb1528 ]

Empty elements passed to the kvargs parser are silently
ignored. Examples of valid strings:
  ""
  ","
  ",,,,,,key=val,,,,"

Fix the unit tests to conform to this behavior.

Note: the test_invalid_kvargs() function is currently broken, which
explain why the tests were not failing. It is fixed in the next commit.

Fixes: e495f5435524 ("kvargs: add test case in app/test")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 app/test/test_kvargs.c | 37 +++++++++++++++++++++++++++++++++++--
 1 file changed, 35 insertions(+), 2 deletions(-)

diff --git a/app/test/test_kvargs.c b/app/test/test_kvargs.c
index a42056f361..d3db88a57a 100644
--- a/app/test/test_kvargs.c
+++ b/app/test/test_kvargs.c
@@ -142,7 +142,7 @@ static int test_valid_kvargs(void)
 	valid_keys = valid_keys_list;
 	kvlist = rte_kvargs_parse(args, valid_keys);
 	if (kvlist == NULL) {
-		printf("rte_kvargs_parse() error");
+		printf("rte_kvargs_parse() error\n");
 		goto fail;
 	}
 	if (strcmp(kvlist->pairs[0].value, "[0,1]") != 0) {
@@ -157,6 +157,40 @@ static int test_valid_kvargs(void)
 	}
 	rte_kvargs_free(kvlist);
 
+	/* test using empty string (it is valid) */
+	args = "";
+	kvlist = rte_kvargs_parse(args, NULL);
+	if (kvlist == NULL) {
+		printf("rte_kvargs_parse() error\n");
+		goto fail;
+	}
+	if (rte_kvargs_count(kvlist, NULL) != 0) {
+		printf("invalid count value\n");
+		goto fail;
+	}
+	rte_kvargs_free(kvlist);
+
+	/* test using empty elements (it is valid) */
+	args = "foo=1,,check=value2,,";
+	kvlist = rte_kvargs_parse(args, NULL);
+	if (kvlist == NULL) {
+		printf("rte_kvargs_parse() error\n");
+		goto fail;
+	}
+	if (rte_kvargs_count(kvlist, NULL) != 2) {
+		printf("invalid count value\n");
+		goto fail;
+	}
+	if (rte_kvargs_count(kvlist, "foo") != 1) {
+		printf("invalid count value for 'foo'\n");
+		goto fail;
+	}
+	if (rte_kvargs_count(kvlist, "check") != 1) {
+		printf("invalid count value for 'check'\n");
+		goto fail;
+	}
+	rte_kvargs_free(kvlist);
+
 	return 0;
 
  fail:
@@ -179,7 +213,6 @@ static int test_invalid_kvargs(void)
 	const char *args_list[] = {
 		"wrong-key=x",     /* key not in valid_keys_list */
 		"foo=1,foo=",      /* empty value */
-		"foo=1,,foo=2",    /* empty key/value */
 		"foo=1,foo",       /* no value */
 		"foo=1,=2",        /* no key */
 		"foo=[1,2",        /* no closing bracket in value */
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:21.051207701 +0100
+++ 0054-test-kvargs-fix-to-consider-empty-elements-as-valid.patch	2020-05-19 13:56:18.287503043 +0100
@@ -1,8 +1,10 @@
-From 55fa01f7edfc9d2fa5af57ffb8991750fbdb1528 Mon Sep 17 00:00:00 2001
+From bcdd4476cd9993262c14686653e75ea54be16e2c Mon Sep 17 00:00:00 2001
 From: Olivier Matz <olivier.matz@6wind.com>
 Date: Fri, 27 Mar 2020 09:09:53 +0100
 Subject: [PATCH] test/kvargs: fix to consider empty elements as valid
 
+[ upstream commit 55fa01f7edfc9d2fa5af57ffb8991750fbdb1528 ]
+
 Empty elements passed to the kvargs parser are silently
 ignored. Examples of valid strings:
   ""
@@ -15,7 +17,6 @@
 explain why the tests were not failing. It is fixed in the next commit.
 
 Fixes: e495f5435524 ("kvargs: add test case in app/test")
-Cc: stable@dpdk.org
 
 Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
 Reviewed-by: David Marchand <david.marchand@redhat.com>

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

* [dpdk-stable] patch 'test/kvargs: fix invalid cases check' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (52 preceding siblings ...)
  2020-05-19 12:54 ` [dpdk-stable] patch 'test/kvargs: fix to consider empty elements as valid' " luca.boccassi
@ 2020-05-19 12:54 ` luca.boccassi
  2020-05-19 12:54 ` [dpdk-stable] patch 'kvargs: fix buffer overflow when parsing list' " luca.boccassi
                   ` (25 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:54 UTC (permalink / raw)
  To: Olivier Matz; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From bbf0c2d9831f38cc65200875253f4c0df7e20281 Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Fri, 27 Mar 2020 09:09:54 +0100
Subject: [PATCH] test/kvargs: fix invalid cases check

[ upstream commit 4bf2b36fd14da74f5dd5c111501698a5b7cb0f6d ]

The return was not properly placed, and only the first test case
was validated.

Fixes: e495f5435524 ("kvargs: add test case in app/test")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 app/test/test_kvargs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test/test_kvargs.c b/app/test/test_kvargs.c
index d3db88a57a..f823b771fb 100644
--- a/app/test/test_kvargs.c
+++ b/app/test/test_kvargs.c
@@ -230,8 +230,8 @@ static int test_invalid_kvargs(void)
 			rte_kvargs_free(kvlist);
 			goto fail;
 		}
-		return 0;
 	}
+	return 0;
 
  fail:
 	printf("while processing <%s>", *args);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:21.087536544 +0100
+++ 0055-test-kvargs-fix-invalid-cases-check.patch	2020-05-19 13:56:18.287503043 +0100
@@ -1,13 +1,14 @@
-From 4bf2b36fd14da74f5dd5c111501698a5b7cb0f6d Mon Sep 17 00:00:00 2001
+From bbf0c2d9831f38cc65200875253f4c0df7e20281 Mon Sep 17 00:00:00 2001
 From: Olivier Matz <olivier.matz@6wind.com>
 Date: Fri, 27 Mar 2020 09:09:54 +0100
 Subject: [PATCH] test/kvargs: fix invalid cases check
 
+[ upstream commit 4bf2b36fd14da74f5dd5c111501698a5b7cb0f6d ]
+
 The return was not properly placed, and only the first test case
 was validated.
 
 Fixes: e495f5435524 ("kvargs: add test case in app/test")
-Cc: stable@dpdk.org
 
 Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
 Reviewed-by: David Marchand <david.marchand@redhat.com>

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

* [dpdk-stable] patch 'kvargs: fix buffer overflow when parsing list' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (53 preceding siblings ...)
  2020-05-19 12:54 ` [dpdk-stable] patch 'test/kvargs: fix invalid cases check' " luca.boccassi
@ 2020-05-19 12:54 ` luca.boccassi
  2020-05-19 12:54 ` [dpdk-stable] patch 'bus/pci: fix devargs on probing again' " luca.boccassi
                   ` (24 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:54 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Olivier Matz, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From c285902e7baf8149b8d028601222ff68ddca768b Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Fri, 27 Mar 2020 09:09:55 +0100
Subject: [PATCH] kvargs: fix buffer overflow when parsing list

[ upstream commit ffcf831454a93c1da54299d4066dd03de6712a9b ]

When the input string is "key=[", the ending '\0' is replaced
by a ',', leading to a heap buffer overflow.

Check the content of ctx1 to avoid this problem.

Fixes: cc0579f2339a ("kvargs: support list value")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 app/test/test_kvargs.c         | 1 +
 lib/librte_kvargs/rte_kvargs.c | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/app/test/test_kvargs.c b/app/test/test_kvargs.c
index f823b771fb..2a2dae43a0 100644
--- a/app/test/test_kvargs.c
+++ b/app/test/test_kvargs.c
@@ -217,6 +217,7 @@ static int test_invalid_kvargs(void)
 		"foo=1,=2",        /* no key */
 		"foo=[1,2",        /* no closing bracket in value */
 		",=",              /* also test with a smiley */
+		"foo=[",           /* no value in list and no closing bracket */
 		NULL };
 	const char **args;
 	const char *valid_keys_list[] = { "foo", "check", NULL };
diff --git a/lib/librte_kvargs/rte_kvargs.c b/lib/librte_kvargs/rte_kvargs.c
index d39332999e..1d815dcd96 100644
--- a/lib/librte_kvargs/rte_kvargs.c
+++ b/lib/librte_kvargs/rte_kvargs.c
@@ -50,6 +50,8 @@ rte_kvargs_tokenize(struct rte_kvargs *kvlist, const char *params)
 			/* Find the end of the list. */
 			while (str[strlen(str) - 1] != ']') {
 				/* Restore the comma erased by strtok_r(). */
+				if (ctx1[0] == '\0')
+					return -1; /* no closing bracket */
 				str[strlen(str)] = ',';
 				/* Parse until next comma. */
 				str = strtok_r(NULL, RTE_KVARGS_PAIRS_DELIM, &ctx1);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:21.124617732 +0100
+++ 0056-kvargs-fix-buffer-overflow-when-parsing-list.patch	2020-05-19 13:56:18.287503043 +0100
@@ -1,15 +1,16 @@
-From ffcf831454a93c1da54299d4066dd03de6712a9b Mon Sep 17 00:00:00 2001
+From c285902e7baf8149b8d028601222ff68ddca768b Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Fri, 27 Mar 2020 09:09:55 +0100
 Subject: [PATCH] kvargs: fix buffer overflow when parsing list
 
+[ upstream commit ffcf831454a93c1da54299d4066dd03de6712a9b ]
+
 When the input string is "key=[", the ending '\0' is replaced
 by a ',', leading to a heap buffer overflow.
 
 Check the content of ctx1 to avoid this problem.
 
 Fixes: cc0579f2339a ("kvargs: support list value")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Signed-off-by: Olivier Matz <olivier.matz@6wind.com>

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

* [dpdk-stable] patch 'bus/pci: fix devargs on probing again' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (54 preceding siblings ...)
  2020-05-19 12:54 ` [dpdk-stable] patch 'kvargs: fix buffer overflow when parsing list' " luca.boccassi
@ 2020-05-19 12:54 ` luca.boccassi
  2020-05-19 12:54 ` [dpdk-stable] patch 'ci: fix telemetry dependency in Travis' " luca.boccassi
                   ` (23 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:54 UTC (permalink / raw)
  To: Somnath Kotur; +Cc: Gaetan Rivet, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 39adba3b5526554d843ea5935d63fdc7913d459a Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Fri, 14 Feb 2020 12:13:53 +0530
Subject: [PATCH] bus/pci: fix devargs on probing again

[ upstream commit fc67ae91ebae7c48fc27a1d24e0843c50c192459 ]

As per the comments in this code section, since there is a matching device,
it is now its responsibility to manage the devargs we've just inserted.
But the matching device ptr's devargs is still uninitialized or not pointing
to the newest dev_args that were passed as a parameter to local_dev_probe().
This is needed particularly in the case when *probe is called again* on an
already probed device as part of adding a representor port to OVS-DPDK.

Fixes: 7e8b26650146 ("eal: fix hotplug add / remove")

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Acked-by: Gaetan Rivet <grive@u256.net>
---
 drivers/bus/pci/linux/pci.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c
index 740a2cdad4..71b0a3053d 100644
--- a/drivers/bus/pci/linux/pci.c
+++ b/drivers/bus/pci/linux/pci.c
@@ -377,6 +377,11 @@ pci_scan_one(const char *dirname, const struct rte_pci_addr *addr)
 						 */
 						RTE_LOG(ERR, EAL, "Unexpected device scan at %s!\n",
 							filename);
+					else if (dev2->device.devargs !=
+						 dev->device.devargs) {
+						rte_devargs_remove(dev2->device.devargs);
+						pci_name_set(dev2);
+					}
 				}
 				free(dev);
 			}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:21.164088256 +0100
+++ 0057-bus-pci-fix-devargs-on-probing-again.patch	2020-05-19 13:56:18.287503043 +0100
@@ -1,8 +1,10 @@
-From fc67ae91ebae7c48fc27a1d24e0843c50c192459 Mon Sep 17 00:00:00 2001
+From 39adba3b5526554d843ea5935d63fdc7913d459a Mon Sep 17 00:00:00 2001
 From: Somnath Kotur <somnath.kotur@broadcom.com>
 Date: Fri, 14 Feb 2020 12:13:53 +0530
 Subject: [PATCH] bus/pci: fix devargs on probing again
 
+[ upstream commit fc67ae91ebae7c48fc27a1d24e0843c50c192459 ]
+
 As per the comments in this code section, since there is a matching device,
 it is now its responsibility to manage the devargs we've just inserted.
 But the matching device ptr's devargs is still uninitialized or not pointing
@@ -11,7 +13,6 @@
 already probed device as part of adding a representor port to OVS-DPDK.
 
 Fixes: 7e8b26650146 ("eal: fix hotplug add / remove")
-Cc: stable@dpdk.org
 
 Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
 Acked-by: Gaetan Rivet <grive@u256.net>

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

* [dpdk-stable] patch 'ci: fix telemetry dependency in Travis' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (55 preceding siblings ...)
  2020-05-19 12:54 ` [dpdk-stable] patch 'bus/pci: fix devargs on probing again' " luca.boccassi
@ 2020-05-19 12:54 ` luca.boccassi
  2020-05-19 12:54 ` [dpdk-stable] patch 'fib: fix headers for C++ support' " luca.boccassi
                   ` (22 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:54 UTC (permalink / raw)
  To: Juraj Linkeš; +Cc: Aaron Conole, Ruifeng Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 1c51807a3550406f134f79c1f2a4b6d2c72e69b8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Juraj=20Linke=C5=A1?= <juraj.linkes@pantheon.tech>
Date: Fri, 3 Apr 2020 14:45:49 +0200
Subject: [PATCH] ci: fix telemetry dependency in Travis
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 254e11c66a53d13d0ffd78af54091a1a9b748f6b ]

libjansson4 is not enough to build telemetry. Replace it with
libjansson-dev.

Fixes: 99889bd85228 ("ci: introduce Travis builds for GitHub repositories")

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Acked-by: Aaron Conole <aconole@redhat.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 .travis.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index 0bb47c191e..77ac26dd85 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -21,7 +21,7 @@ _aarch64_packages: &aarch64_packages
 
 _extra_packages: &extra_packages
   - *required_packages
-  - [libbsd-dev, libpcap-dev, libcrypto++-dev, libjansson4]
+  - [libbsd-dev, libpcap-dev, libcrypto++-dev, libjansson-dev]
 
 _build_32b_packages: &build_32b_packages
   - *required_packages
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:21.201697438 +0100
+++ 0058-ci-fix-telemetry-dependency-in-Travis.patch	2020-05-19 13:56:18.287503043 +0100
@@ -1,4 +1,4 @@
-From 254e11c66a53d13d0ffd78af54091a1a9b748f6b Mon Sep 17 00:00:00 2001
+From 1c51807a3550406f134f79c1f2a4b6d2c72e69b8 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Juraj=20Linke=C5=A1?= <juraj.linkes@pantheon.tech>
 Date: Fri, 3 Apr 2020 14:45:49 +0200
 Subject: [PATCH] ci: fix telemetry dependency in Travis
@@ -6,11 +6,12 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit 254e11c66a53d13d0ffd78af54091a1a9b748f6b ]
+
 libjansson4 is not enough to build telemetry. Replace it with
 libjansson-dev.
 
 Fixes: 99889bd85228 ("ci: introduce Travis builds for GitHub repositories")
-Cc: stable@dpdk.org
 
 Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
 Acked-by: Aaron Conole <aconole@redhat.com>
@@ -20,17 +21,17 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/.travis.yml b/.travis.yml
-index fd4f79cfc6..2d2292ff64 100644
+index 0bb47c191e..77ac26dd85 100644
 --- a/.travis.yml
 +++ b/.travis.yml
-@@ -15,7 +15,7 @@ addons:
-     update: true
-     packages: &required_packages
-       - [libnuma-dev, python3-setuptools, python3-wheel, python3-pip, ninja-build]
--      - [libbsd-dev, libpcap-dev, libibverbs-dev, libcrypto++-dev, libfdt-dev, libjansson4]
-+      - [libbsd-dev, libpcap-dev, libibverbs-dev, libcrypto++-dev, libfdt-dev, libjansson-dev]
+@@ -21,7 +21,7 @@ _aarch64_packages: &aarch64_packages
+ 
+ _extra_packages: &extra_packages
+   - *required_packages
+-  - [libbsd-dev, libpcap-dev, libcrypto++-dev, libjansson4]
++  - [libbsd-dev, libpcap-dev, libcrypto++-dev, libjansson-dev]
  
- _aarch64_packages: &aarch64_packages
+ _build_32b_packages: &build_32b_packages
    - *required_packages
 -- 
 2.20.1

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

* [dpdk-stable] patch 'fib: fix headers for C++ support' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (56 preceding siblings ...)
  2020-05-19 12:54 ` [dpdk-stable] patch 'ci: fix telemetry dependency in Travis' " luca.boccassi
@ 2020-05-19 12:54 ` luca.boccassi
  2020-05-19 12:54 ` [dpdk-stable] patch 'cryptodev: fix missing device id range checking' " luca.boccassi
                   ` (21 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:54 UTC (permalink / raw)
  To: Asim Jamshed
  Cc: Saikrishna Edupuganti, David Marchand, Vladimir Medvedkin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From ca31f0aee2c7c43985b9c242852f50a6b9728e0d Mon Sep 17 00:00:00 2001
From: Asim Jamshed <asim.jamshed@gmail.com>
Date: Mon, 16 Mar 2020 18:42:36 +0000
Subject: [PATCH] fib: fix headers for C++ support

[ upstream commit 44415a62e6c64af014d935f13e099b17b4ad4893 ]

This patch allows C++ programs to use librte_fib library routines.
Previously C++ programs were not able to link this library and programs
would fail to get linked. With this patch compilation and linking
will be successful.

Fixes: 39e927248416 ("fib: add FIB library")
Fixes: 40d41a8a7b34 ("fib: support IPv6")

Signed-off-by: Asim Jamshed <asim.jamshed@gmail.com>
Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
 lib/librte_fib/rte_fib.h  | 8 ++++++++
 lib/librte_fib/rte_fib6.h | 8 ++++++++
 2 files changed, 16 insertions(+)

diff --git a/lib/librte_fib/rte_fib.h b/lib/librte_fib/rte_fib.h
index d06c5ef55a..af3bbf07ee 100644
--- a/lib/librte_fib/rte_fib.h
+++ b/lib/librte_fib/rte_fib.h
@@ -14,6 +14,10 @@
 
 #include <rte_compat.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct rte_fib;
 struct rte_rib;
 
@@ -185,4 +189,8 @@ __rte_experimental
 struct rte_rib *
 rte_fib_get_rib(struct rte_fib *fib);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _RTE_FIB_H_ */
diff --git a/lib/librte_fib/rte_fib6.h b/lib/librte_fib/rte_fib6.h
index 4268704038..66c71c84c9 100644
--- a/lib/librte_fib/rte_fib6.h
+++ b/lib/librte_fib/rte_fib6.h
@@ -14,6 +14,10 @@
 
 #include <rte_compat.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define RTE_FIB6_IPV6_ADDR_SIZE		16
 /** Maximum depth value possible for IPv6 FIB. */
 #define RTE_FIB6_MAXDEPTH       128
@@ -190,4 +194,8 @@ __rte_experimental
 struct rte_rib6 *
 rte_fib6_get_rib(struct rte_fib6 *fib);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _RTE_FIB6_H_ */
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:21.236608241 +0100
+++ 0059-fib-fix-headers-for-C-support.patch	2020-05-19 13:56:18.287503043 +0100
@@ -1,8 +1,10 @@
-From 44415a62e6c64af014d935f13e099b17b4ad4893 Mon Sep 17 00:00:00 2001
+From ca31f0aee2c7c43985b9c242852f50a6b9728e0d Mon Sep 17 00:00:00 2001
 From: Asim Jamshed <asim.jamshed@gmail.com>
 Date: Mon, 16 Mar 2020 18:42:36 +0000
 Subject: [PATCH] fib: fix headers for C++ support
 
+[ upstream commit 44415a62e6c64af014d935f13e099b17b4ad4893 ]
+
 This patch allows C++ programs to use librte_fib library routines.
 Previously C++ programs were not able to link this library and programs
 would fail to get linked. With this patch compilation and linking
@@ -10,7 +12,6 @@
 
 Fixes: 39e927248416 ("fib: add FIB library")
 Fixes: 40d41a8a7b34 ("fib: support IPv6")
-Cc: stable@dpdk.org
 
 Signed-off-by: Asim Jamshed <asim.jamshed@gmail.com>
 Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>

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

* [dpdk-stable] patch 'cryptodev: fix missing device id range checking' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (57 preceding siblings ...)
  2020-05-19 12:54 ` [dpdk-stable] patch 'fib: fix headers for C++ support' " luca.boccassi
@ 2020-05-19 12:54 ` luca.boccassi
  2020-05-19 12:54 ` [dpdk-stable] patch 'common/qat: fix GEN3 marketing name' " luca.boccassi
                   ` (20 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:54 UTC (permalink / raw)
  To: Adam Dybkowski; +Cc: Fiona Trahe, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 196993b70538dcc21fc21e04142982c1961d639c Mon Sep 17 00:00:00 2001
From: Adam Dybkowski <adamx.dybkowski@intel.com>
Date: Thu, 20 Feb 2020 16:04:15 +0100
Subject: [PATCH] cryptodev: fix missing device id range checking

[ upstream commit 285b5d1b1fd3c5240c691e3ba33eeb7c1e2c67c3 ]

This patch adds range-checking of the device id passed from
the user app code. It prevents out-of-range array accesses
which in some situations resulted in an
application crash (segfault).

Fixes: 3dd4435cf473 ("cryptodev: fix checks related to device id")

Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 lib/librte_cryptodev/rte_cryptodev.c | 41 +++++++++++++++++++++++++---
 1 file changed, 37 insertions(+), 4 deletions(-)

diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 89aa2ed3e2..f1ab622268 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -525,7 +525,8 @@ rte_cryptodev_pmd_get_named_dev(const char *name)
 static inline uint8_t
 rte_cryptodev_is_valid_device_data(uint8_t dev_id)
 {
-	if (rte_crypto_devices[dev_id].data == NULL)
+	if (dev_id >= RTE_CRYPTO_MAX_DEVS ||
+			rte_crypto_devices[dev_id].data == NULL)
 		return 0;
 
 	return 1;
@@ -617,8 +618,9 @@ rte_cryptodev_devices_get(const char *driver_name, uint8_t *devices,
 void *
 rte_cryptodev_get_sec_ctx(uint8_t dev_id)
 {
-	if (rte_crypto_devices[dev_id].feature_flags &
-			RTE_CRYPTODEV_FF_SECURITY)
+	if (dev_id < RTE_CRYPTO_MAX_DEVS &&
+			(rte_crypto_devices[dev_id].feature_flags &
+			RTE_CRYPTODEV_FF_SECURITY))
 		return rte_crypto_devices[dev_id].security_ctx;
 
 	return NULL;
@@ -789,6 +791,11 @@ rte_cryptodev_queue_pair_count(uint8_t dev_id)
 {
 	struct rte_cryptodev *dev;
 
+	if (!rte_cryptodev_is_valid_device_data(dev_id)) {
+		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
+		return 0;
+	}
+
 	dev = &rte_crypto_devices[dev_id];
 	return dev->data->nb_queue_pairs;
 }
@@ -1254,6 +1261,11 @@ rte_cryptodev_sym_session_init(uint8_t dev_id,
 	uint8_t index;
 	int ret;
 
+	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
+		return -EINVAL;
+	}
+
 	dev = rte_cryptodev_pmd_get_dev(dev_id);
 
 	if (sess == NULL || xforms == NULL || dev == NULL)
@@ -1293,6 +1305,11 @@ rte_cryptodev_asym_session_init(uint8_t dev_id,
 	uint8_t index;
 	int ret;
 
+	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
+		return -EINVAL;
+	}
+
 	dev = rte_cryptodev_pmd_get_dev(dev_id);
 
 	if (sess == NULL || xforms == NULL || dev == NULL)
@@ -1428,6 +1445,11 @@ rte_cryptodev_sym_session_clear(uint8_t dev_id,
 	struct rte_cryptodev *dev;
 	uint8_t driver_id;
 
+	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
+		return -EINVAL;
+	}
+
 	dev = rte_cryptodev_pmd_get_dev(dev_id);
 
 	if (dev == NULL || sess == NULL)
@@ -1452,6 +1474,11 @@ rte_cryptodev_asym_session_clear(uint8_t dev_id,
 {
 	struct rte_cryptodev *dev;
 
+	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
+		return -EINVAL;
+	}
+
 	dev = rte_cryptodev_pmd_get_dev(dev_id);
 
 	if (dev == NULL || sess == NULL)
@@ -1754,8 +1781,14 @@ rte_cryptodev_driver_id_get(const char *name)
 const char *
 rte_cryptodev_name_get(uint8_t dev_id)
 {
-	struct rte_cryptodev *dev = rte_cryptodev_pmd_get_dev(dev_id);
+	struct rte_cryptodev *dev;
 
+	if (!rte_cryptodev_is_valid_device_data(dev_id)) {
+		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
+		return NULL;
+	}
+
+	dev = rte_cryptodev_pmd_get_dev(dev_id);
 	if (dev == NULL)
 		return NULL;
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:21.275472484 +0100
+++ 0060-cryptodev-fix-missing-device-id-range-checking.patch	2020-05-19 13:56:18.287503043 +0100
@@ -1,15 +1,16 @@
-From 285b5d1b1fd3c5240c691e3ba33eeb7c1e2c67c3 Mon Sep 17 00:00:00 2001
+From 196993b70538dcc21fc21e04142982c1961d639c Mon Sep 17 00:00:00 2001
 From: Adam Dybkowski <adamx.dybkowski@intel.com>
 Date: Thu, 20 Feb 2020 16:04:15 +0100
 Subject: [PATCH] cryptodev: fix missing device id range checking
 
+[ upstream commit 285b5d1b1fd3c5240c691e3ba33eeb7c1e2c67c3 ]
+
 This patch adds range-checking of the device id passed from
 the user app code. It prevents out-of-range array accesses
 which in some situations resulted in an
 application crash (segfault).
 
 Fixes: 3dd4435cf473 ("cryptodev: fix checks related to device id")
-Cc: stable@dpdk.org
 
 Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
 Acked-by: Fiona Trahe <fiona.trahe@intel.com>
@@ -19,10 +20,10 @@
  1 file changed, 37 insertions(+), 4 deletions(-)
 
 diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
-index 6d1d0e9d36..65d61a3ef5 100644
+index 89aa2ed3e2..f1ab622268 100644
 --- a/lib/librte_cryptodev/rte_cryptodev.c
 +++ b/lib/librte_cryptodev/rte_cryptodev.c
-@@ -529,7 +529,8 @@ rte_cryptodev_pmd_get_named_dev(const char *name)
+@@ -525,7 +525,8 @@ rte_cryptodev_pmd_get_named_dev(const char *name)
  static inline uint8_t
  rte_cryptodev_is_valid_device_data(uint8_t dev_id)
  {
@@ -32,7 +33,7 @@
  		return 0;
  
  	return 1;
-@@ -621,8 +622,9 @@ rte_cryptodev_devices_get(const char *driver_name, uint8_t *devices,
+@@ -617,8 +618,9 @@ rte_cryptodev_devices_get(const char *driver_name, uint8_t *devices,
  void *
  rte_cryptodev_get_sec_ctx(uint8_t dev_id)
  {
@@ -44,7 +45,7 @@
  		return rte_crypto_devices[dev_id].security_ctx;
  
  	return NULL;
-@@ -793,6 +795,11 @@ rte_cryptodev_queue_pair_count(uint8_t dev_id)
+@@ -789,6 +791,11 @@ rte_cryptodev_queue_pair_count(uint8_t dev_id)
  {
  	struct rte_cryptodev *dev;
  
@@ -56,7 +57,7 @@
  	dev = &rte_crypto_devices[dev_id];
  	return dev->data->nb_queue_pairs;
  }
-@@ -1258,6 +1265,11 @@ rte_cryptodev_sym_session_init(uint8_t dev_id,
+@@ -1254,6 +1261,11 @@ rte_cryptodev_sym_session_init(uint8_t dev_id,
  	uint8_t index;
  	int ret;
  
@@ -68,7 +69,7 @@
  	dev = rte_cryptodev_pmd_get_dev(dev_id);
  
  	if (sess == NULL || xforms == NULL || dev == NULL)
-@@ -1297,6 +1309,11 @@ rte_cryptodev_asym_session_init(uint8_t dev_id,
+@@ -1293,6 +1305,11 @@ rte_cryptodev_asym_session_init(uint8_t dev_id,
  	uint8_t index;
  	int ret;
  
@@ -80,7 +81,7 @@
  	dev = rte_cryptodev_pmd_get_dev(dev_id);
  
  	if (sess == NULL || xforms == NULL || dev == NULL)
-@@ -1432,6 +1449,11 @@ rte_cryptodev_sym_session_clear(uint8_t dev_id,
+@@ -1428,6 +1445,11 @@ rte_cryptodev_sym_session_clear(uint8_t dev_id,
  	struct rte_cryptodev *dev;
  	uint8_t driver_id;
  
@@ -92,7 +93,7 @@
  	dev = rte_cryptodev_pmd_get_dev(dev_id);
  
  	if (dev == NULL || sess == NULL)
-@@ -1456,6 +1478,11 @@ rte_cryptodev_asym_session_clear(uint8_t dev_id,
+@@ -1452,6 +1474,11 @@ rte_cryptodev_asym_session_clear(uint8_t dev_id,
  {
  	struct rte_cryptodev *dev;
  
@@ -104,7 +105,7 @@
  	dev = rte_cryptodev_pmd_get_dev(dev_id);
  
  	if (dev == NULL || sess == NULL)
-@@ -1789,8 +1816,14 @@ rte_cryptodev_driver_id_get(const char *name)
+@@ -1754,8 +1781,14 @@ rte_cryptodev_driver_id_get(const char *name)
  const char *
  rte_cryptodev_name_get(uint8_t dev_id)
  {

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

* [dpdk-stable] patch 'common/qat: fix GEN3 marketing name' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (58 preceding siblings ...)
  2020-05-19 12:54 ` [dpdk-stable] patch 'cryptodev: fix missing device id range checking' " luca.boccassi
@ 2020-05-19 12:54 ` luca.boccassi
  2020-06-04 17:13   ` Trahe, Fiona
  2020-05-19 12:54 ` [dpdk-stable] patch 'test/ipsec: fix crash in session destroy' " luca.boccassi
                   ` (19 subsequent siblings)
  79 siblings, 1 reply; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:54 UTC (permalink / raw)
  To: Adam Dybkowski; +Cc: Fiona Trahe, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 152fadd540a9f72046a0411522c95997636d1d55 Mon Sep 17 00:00:00 2001
From: Adam Dybkowski <adamx.dybkowski@intel.com>
Date: Wed, 4 Mar 2020 14:18:35 +0100
Subject: [PATCH] common/qat: fix GEN3 marketing name

[ upstream commit 9cd9d3e702fba4700539c1a2eddac13dd14ecf70 ]

This patch fixes the marketing name of the QAT GEN3 to P5xxx.
Updates this name mentioned in the compression PMD as well as
in the documentation.

Fixes: aa983f03ad2e ("crypto/qat: handle Single Pass Crypto Requests on GEN3")
Fixes: a124830a6f00 ("compress/qat: enable dynamic huffman encoding")
Fixes: 1f5e4053f9b4 ("common/qat: support GEN3 devices")

Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
---
 doc/guides/cryptodevs/qat.rst          | 6 +++---
 doc/guides/rel_notes/release_19_11.rst | 2 +-
 drivers/compress/qat/qat_comp_pmd.c    | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/doc/guides/cryptodevs/qat.rst b/doc/guides/cryptodevs/qat.rst
index 6197875fe3..5ab80b1c0f 100644
--- a/doc/guides/cryptodevs/qat.rst
+++ b/doc/guides/cryptodevs/qat.rst
@@ -23,7 +23,7 @@ poll mode crypto driver support for the following hardware accelerator devices:
 * ``Intel QuickAssist Technology C62x``
 * ``Intel QuickAssist Technology C3xxx``
 * ``Intel QuickAssist Technology D15xx``
-* ``Intel QuickAssist Technology C4xxx``
+* ``Intel QuickAssist Technology P5xxx``
 
 
 Features
@@ -122,7 +122,7 @@ poll mode crypto driver support for the following hardware accelerator devices:
 * ``Intel QuickAssist Technology C62x``
 * ``Intel QuickAssist Technology C3xxx``
 * ``Intel QuickAssist Technology D15xx``
-* ``Intel QuickAssist Technology C4xxx``
+* ``Intel QuickAssist Technology P5xxx``
 
 The QAT ASYM PMD has support for:
 
@@ -323,7 +323,7 @@ to see the full table)
    +-----+-----+-----+-----+----------+---------------+---------------+------------+--------+------+--------+--------+
    | Yes | No  | No  | 2   | D15xx    | p             | qat_d15xx     | d15xx      | 6f54   | 1    | 6f55   | 16     |
    +-----+-----+-----+-----+----------+---------------+---------------+------------+--------+------+--------+--------+
-   | Yes | No  | No  | 3   | C4xxx    | p             | qat_c4xxx     | c4xxx      | 18a0   | 1    | 18a1   | 128    |
+   | Yes | No  | No  | 3   | P5xxx    | p             | qat_p5xxx     | p5xxx      | 18a0   | 1    | 18a1   | 128    |
    +-----+-----+-----+-----+----------+---------------+---------------+------------+--------+------+--------+--------+
 
 The first 3 columns indicate the service:
diff --git a/doc/guides/rel_notes/release_19_11.rst b/doc/guides/rel_notes/release_19_11.rst
index 56f169f7f2..edf103b5f6 100644
--- a/doc/guides/rel_notes/release_19_11.rst
+++ b/doc/guides/rel_notes/release_19_11.rst
@@ -260,7 +260,7 @@ New Features
 * **Enabled Single Pass GCM acceleration on QAT GEN3.**
 
   Added support for Single Pass GCM, available on QAT GEN3 only (Intel
-  QuickAssist Technology C4xxx). It is automatically chosen instead of the
+  QuickAssist Technology P5xxx). It is automatically chosen instead of the
   classic 2-pass mode when running on QAT GEN3, significantly improving
   the performance of AES GCM operations.
 
diff --git a/drivers/compress/qat/qat_comp_pmd.c b/drivers/compress/qat/qat_comp_pmd.c
index 05b7dfe774..eb3e422b27 100644
--- a/drivers/compress/qat/qat_comp_pmd.c
+++ b/drivers/compress/qat/qat_comp_pmd.c
@@ -663,7 +663,7 @@ int
 qat_comp_dev_create(struct qat_pci_device *qat_pci_dev)
 {
 	if (qat_pci_dev->qat_dev_gen == QAT_GEN3) {
-		QAT_LOG(ERR, "Compression PMD not supported on QAT c4xxx");
+		QAT_LOG(ERR, "Compression PMD not supported on QAT P5xxx");
 		return 0;
 	}
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:21.315333455 +0100
+++ 0061-common-qat-fix-GEN3-marketing-name.patch	2020-05-19 13:56:18.291503115 +0100
@@ -1,8 +1,10 @@
-From 9cd9d3e702fba4700539c1a2eddac13dd14ecf70 Mon Sep 17 00:00:00 2001
+From 152fadd540a9f72046a0411522c95997636d1d55 Mon Sep 17 00:00:00 2001
 From: Adam Dybkowski <adamx.dybkowski@intel.com>
 Date: Wed, 4 Mar 2020 14:18:35 +0100
 Subject: [PATCH] common/qat: fix GEN3 marketing name
 
+[ upstream commit 9cd9d3e702fba4700539c1a2eddac13dd14ecf70 ]
+
 This patch fixes the marketing name of the QAT GEN3 to P5xxx.
 Updates this name mentioned in the compression PMD as well as
 in the documentation.
@@ -10,7 +12,6 @@
 Fixes: aa983f03ad2e ("crypto/qat: handle Single Pass Crypto Requests on GEN3")
 Fixes: a124830a6f00 ("compress/qat: enable dynamic huffman encoding")
 Fixes: 1f5e4053f9b4 ("common/qat: support GEN3 devices")
-Cc: stable@dpdk.org
 
 Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
 Acked-by: Fiona Trahe <fiona.trahe@intel.com>
@@ -21,7 +22,7 @@
  3 files changed, 5 insertions(+), 5 deletions(-)
 
 diff --git a/doc/guides/cryptodevs/qat.rst b/doc/guides/cryptodevs/qat.rst
-index 06985e3193..1e83ed6267 100644
+index 6197875fe3..5ab80b1c0f 100644
 --- a/doc/guides/cryptodevs/qat.rst
 +++ b/doc/guides/cryptodevs/qat.rst
 @@ -23,7 +23,7 @@ poll mode crypto driver support for the following hardware accelerator devices:
@@ -33,7 +34,7 @@
  
  
  Features
-@@ -149,7 +149,7 @@ poll mode crypto driver support for the following hardware accelerator devices:
+@@ -122,7 +122,7 @@ poll mode crypto driver support for the following hardware accelerator devices:
  * ``Intel QuickAssist Technology C62x``
  * ``Intel QuickAssist Technology C3xxx``
  * ``Intel QuickAssist Technology D15xx``
@@ -42,7 +43,7 @@
  
  The QAT ASYM PMD has support for:
  
-@@ -376,7 +376,7 @@ to see the full table)
+@@ -323,7 +323,7 @@ to see the full table)
     +-----+-----+-----+-----+----------+---------------+---------------+------------+--------+------+--------+--------+
     | Yes | No  | No  | 2   | D15xx    | p             | qat_d15xx     | d15xx      | 6f54   | 1    | 6f55   | 16     |
     +-----+-----+-----+-----+----------+---------------+---------------+------------+--------+------+--------+--------+
@@ -52,7 +53,7 @@
  
  The first 3 columns indicate the service:
 diff --git a/doc/guides/rel_notes/release_19_11.rst b/doc/guides/rel_notes/release_19_11.rst
-index eb05149f8f..0261d28431 100644
+index 56f169f7f2..edf103b5f6 100644
 --- a/doc/guides/rel_notes/release_19_11.rst
 +++ b/doc/guides/rel_notes/release_19_11.rst
 @@ -260,7 +260,7 @@ New Features
@@ -65,12 +66,12 @@
    the performance of AES GCM operations.
  
 diff --git a/drivers/compress/qat/qat_comp_pmd.c b/drivers/compress/qat/qat_comp_pmd.c
-index 7d4fdf10c2..9a7ed19d76 100644
+index 05b7dfe774..eb3e422b27 100644
 --- a/drivers/compress/qat/qat_comp_pmd.c
 +++ b/drivers/compress/qat/qat_comp_pmd.c
-@@ -666,7 +666,7 @@ qat_comp_dev_create(struct qat_pci_device *qat_pci_dev,
+@@ -663,7 +663,7 @@ int
+ qat_comp_dev_create(struct qat_pci_device *qat_pci_dev)
  {
- 	int i = 0;
  	if (qat_pci_dev->qat_dev_gen == QAT_GEN3) {
 -		QAT_LOG(ERR, "Compression PMD not supported on QAT c4xxx");
 +		QAT_LOG(ERR, "Compression PMD not supported on QAT P5xxx");

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

* [dpdk-stable] patch 'test/ipsec: fix crash in session destroy' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (59 preceding siblings ...)
  2020-05-19 12:54 ` [dpdk-stable] patch 'common/qat: fix GEN3 marketing name' " luca.boccassi
@ 2020-05-19 12:54 ` luca.boccassi
  2020-05-19 12:54 ` [dpdk-stable] patch 'baseband/turbo_sw: fix exposed LLR decimals assumption' " luca.boccassi
                   ` (18 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:54 UTC (permalink / raw)
  To: Ruifeng Wang; +Cc: Phil Yang, Gavin Hu, Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 2193048d873333899100af6436725928ea9db909 Mon Sep 17 00:00:00 2001
From: Ruifeng Wang <ruifeng.wang@arm.com>
Date: Fri, 20 Mar 2020 16:05:20 +0800
Subject: [PATCH] test/ipsec: fix crash in session destroy

[ upstream commit 40a49a89d7dc7c64e58260e0097dd0ae5f98e9c4 ]

Segfault was observed when running ipsec unit test:

 + TestCase [10] : test_ipsec_replay_inb_repeat_null_null_wrapper
                   succeeded
 + TestCase [11] : test_ipsec_replay_inb_inside_burst_null_null_wrapper
                   succeeded
 + TestCase [12] : test_ipsec_crypto_inb_burst_2sa_null_null_wrapper
                   succeeded
 + TestCase [13] : test_ipsec_crypto_inb_burst_2sa_4grp_null_null_wrapper
                   succeeded
Segmentation fault

Data corruption happens due to incorrect destroy of session. Security
session needs process different from crypto session.

Destroy corresponding sessions according to different security actions.

Fixes: 05fe65eb66b2 ("test/ipsec: introduce functional test")

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Tested-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 app/test/test_ipsec.c | 33 ++++++++++++++++++++++++++++++---
 1 file changed, 30 insertions(+), 3 deletions(-)

diff --git a/app/test/test_ipsec.c b/app/test/test_ipsec.c
index 9e14472938..79d00d7e02 100644
--- a/app/test/test_ipsec.c
+++ b/app/test/test_ipsec.c
@@ -1167,6 +1167,34 @@ test_ipsec_dump_buffers(struct ipsec_unitest_params *ut_params, int i)
 	}
 }
 
+static void
+destroy_dummy_sec_session(struct ipsec_unitest_params *ut,
+	uint32_t j)
+{
+	rte_security_session_destroy(&dummy_sec_ctx,
+					ut->ss[j].security.ses);
+	ut->ss[j].security.ctx = NULL;
+}
+
+static void
+destroy_crypto_session(struct ipsec_unitest_params *ut,
+	uint8_t crypto_dev, uint32_t j)
+{
+	rte_cryptodev_sym_session_clear(crypto_dev, ut->ss[j].crypto.ses);
+	rte_cryptodev_sym_session_free(ut->ss[j].crypto.ses);
+	memset(&ut->ss[j], 0, sizeof(ut->ss[j]));
+}
+
+static void
+destroy_session(struct ipsec_unitest_params *ut,
+	uint8_t crypto_dev, uint32_t j)
+{
+	if (ut->ss[j].type == RTE_SECURITY_ACTION_TYPE_NONE)
+		return destroy_crypto_session(ut, crypto_dev, j);
+	else
+		return destroy_dummy_sec_session(ut, j);
+}
+
 static void
 destroy_sa(uint32_t j)
 {
@@ -1175,9 +1203,8 @@ destroy_sa(uint32_t j)
 
 	rte_ipsec_sa_fini(ut->ss[j].sa);
 	rte_free(ut->ss[j].sa);
-	rte_cryptodev_sym_session_clear(ts->valid_dev, ut->ss[j].crypto.ses);
-	rte_cryptodev_sym_session_free(ut->ss[j].crypto.ses);
-	memset(&ut->ss[j], 0, sizeof(ut->ss[j]));
+
+	destroy_session(ut, ts->valid_dev, j);
 }
 
 static int
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:21.356042820 +0100
+++ 0062-test-ipsec-fix-crash-in-session-destroy.patch	2020-05-19 13:56:18.291503115 +0100
@@ -1,8 +1,10 @@
-From 40a49a89d7dc7c64e58260e0097dd0ae5f98e9c4 Mon Sep 17 00:00:00 2001
+From 2193048d873333899100af6436725928ea9db909 Mon Sep 17 00:00:00 2001
 From: Ruifeng Wang <ruifeng.wang@arm.com>
 Date: Fri, 20 Mar 2020 16:05:20 +0800
 Subject: [PATCH] test/ipsec: fix crash in session destroy
 
+[ upstream commit 40a49a89d7dc7c64e58260e0097dd0ae5f98e9c4 ]
+
 Segfault was observed when running ipsec unit test:
 
  + TestCase [10] : test_ipsec_replay_inb_repeat_null_null_wrapper
@@ -21,7 +23,6 @@
 Destroy corresponding sessions according to different security actions.
 
 Fixes: 05fe65eb66b2 ("test/ipsec: introduce functional test")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
 Reviewed-by: Phil Yang <phil.yang@arm.com>

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

* [dpdk-stable] patch 'baseband/turbo_sw: fix exposed LLR decimals assumption' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (60 preceding siblings ...)
  2020-05-19 12:54 ` [dpdk-stable] patch 'test/ipsec: fix crash in session destroy' " luca.boccassi
@ 2020-05-19 12:54 ` luca.boccassi
  2020-05-19 12:54 ` [dpdk-stable] patch 'crypto/nitrox: fix CSR register address generation' " luca.boccassi
                   ` (17 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:54 UTC (permalink / raw)
  To: Nicolas Chautru; +Cc: Dave Burley, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 3b841d16dcb751bc594405740ffb42e18b5a8e23 Mon Sep 17 00:00:00 2001
From: Nicolas Chautru <nicolas.chautru@intel.com>
Date: Wed, 25 Mar 2020 20:27:41 -0700
Subject: [PATCH] baseband/turbo_sw: fix exposed LLR decimals assumption

[ upstream commit e9381a822a0b0eb3ea4566dc21f8073a9a4d1e2f ]

The actual LLR representation was incorrectly assumed to be 2
instead of 4. This would impact wireless performance but is not
critical to be back ported on LTS branches.

Fixes: c769c711757a ("baseband/turbo_sw: extend for 5G")

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Dave Burley <dave.burley@accelercomm.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 drivers/baseband/turbo_sw/bbdev_turbo_software.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/baseband/turbo_sw/bbdev_turbo_software.c b/drivers/baseband/turbo_sw/bbdev_turbo_software.c
index f2fe7a2194..e6d9501240 100644
--- a/drivers/baseband/turbo_sw/bbdev_turbo_software.c
+++ b/drivers/baseband/turbo_sw/bbdev_turbo_software.c
@@ -218,7 +218,7 @@ info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info)
 					RTE_BBDEV_LDPC_HQ_COMBINE_OUT_ENABLE |
 					RTE_BBDEV_LDPC_ITERATION_STOP_ENABLE,
 			.llr_size = 8,
-			.llr_decimals = 2,
+			.llr_decimals = 4,
 			.harq_memory_size = 0,
 			.num_buffers_src =
 					RTE_BBDEV_LDPC_MAX_CODE_BLOCKS,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:21.393629288 +0100
+++ 0063-baseband-turbo_sw-fix-exposed-LLR-decimals-assumptio.patch	2020-05-19 13:56:18.295503187 +0100
@@ -1,14 +1,15 @@
-From e9381a822a0b0eb3ea4566dc21f8073a9a4d1e2f Mon Sep 17 00:00:00 2001
+From 3b841d16dcb751bc594405740ffb42e18b5a8e23 Mon Sep 17 00:00:00 2001
 From: Nicolas Chautru <nicolas.chautru@intel.com>
 Date: Wed, 25 Mar 2020 20:27:41 -0700
 Subject: [PATCH] baseband/turbo_sw: fix exposed LLR decimals assumption
 
+[ upstream commit e9381a822a0b0eb3ea4566dc21f8073a9a4d1e2f ]
+
 The actual LLR representation was incorrectly assumed to be 2
 instead of 4. This would impact wireless performance but is not
 critical to be back ported on LTS branches.
 
 Fixes: c769c711757a ("baseband/turbo_sw: extend for 5G")
-Cc: stable@dpdk.org
 
 Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
 Acked-by: Dave Burley <dave.burley@accelercomm.com>
@@ -18,7 +19,7 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/baseband/turbo_sw/bbdev_turbo_software.c b/drivers/baseband/turbo_sw/bbdev_turbo_software.c
-index 6d5e08095a..5ca8ca1c20 100644
+index f2fe7a2194..e6d9501240 100644
 --- a/drivers/baseband/turbo_sw/bbdev_turbo_software.c
 +++ b/drivers/baseband/turbo_sw/bbdev_turbo_software.c
 @@ -218,7 +218,7 @@ info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info)
@@ -27,9 +28,9 @@
  			.llr_size = 8,
 -			.llr_decimals = 2,
 +			.llr_decimals = 4,
+ 			.harq_memory_size = 0,
  			.num_buffers_src =
  					RTE_BBDEV_LDPC_MAX_CODE_BLOCKS,
- 			.num_buffers_hard_out =
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'crypto/nitrox: fix CSR register address generation' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (61 preceding siblings ...)
  2020-05-19 12:54 ` [dpdk-stable] patch 'baseband/turbo_sw: fix exposed LLR decimals assumption' " luca.boccassi
@ 2020-05-19 12:54 ` luca.boccassi
  2020-05-19 12:54 ` [dpdk-stable] patch 'crypto/nitrox: fix oversized device name' " luca.boccassi
                   ` (16 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:54 UTC (permalink / raw)
  To: Nagadheeraj Rottela; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From b878b432b77ca835ffedc90b850ee61afa4ad6fb Mon Sep 17 00:00:00 2001
From: Nagadheeraj Rottela <rnagadheeraj@marvell.com>
Date: Fri, 27 Mar 2020 19:12:38 +0530
Subject: [PATCH] crypto/nitrox: fix CSR register address generation

[ upstream commit 76522b25b15316400aab26cc8187e19397998f53 ]

If the NPS_PKT ring/port is greater than 8191 the NPS_PKT*() macros will
evaluate to incorrect values due to unintended sign extension from int
to unsigned long. To fix this, add UL suffix to the constants in these
macros. The same problem is with AQMQ_QSZX() macro also.

Coverity issue: 349899, 349905, 349911, 349921, 349923
Fixes: 32e4930d5a3b ("crypto/nitrox: add hardware queue management")
Fixes: 0a8fc2423bff ("crypto/nitrox: introduce Nitrox driver")

Signed-off-by: Nagadheeraj Rottela <rnagadheeraj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 drivers/crypto/nitrox/nitrox_csr.h | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/crypto/nitrox/nitrox_csr.h b/drivers/crypto/nitrox/nitrox_csr.h
index 8cd92e38be..de7a3c6713 100644
--- a/drivers/crypto/nitrox/nitrox_csr.h
+++ b/drivers/crypto/nitrox/nitrox_csr.h
@@ -12,18 +12,18 @@
 #define NITROX_CSR_ADDR(bar_addr, offset) (bar_addr + (offset))
 
 /* NPS packet registers */
-#define NPS_PKT_IN_INSTR_CTLX(_i)	(0x10060 + ((_i) * 0x40000))
-#define NPS_PKT_IN_INSTR_BADDRX(_i)	(0x10068 + ((_i) * 0x40000))
-#define NPS_PKT_IN_INSTR_RSIZEX(_i)	(0x10070 + ((_i) * 0x40000))
-#define NPS_PKT_IN_DONE_CNTSX(_i)	(0x10080 + ((_i) * 0x40000))
-#define NPS_PKT_IN_INSTR_BAOFF_DBELLX(_i)	(0x10078 + ((_i) * 0x40000))
-#define NPS_PKT_IN_INT_LEVELSX(_i)		(0x10088 + ((_i) * 0x40000))
-#define NPS_PKT_SLC_CTLX(_i)		(0x10000 + ((_i) * 0x40000))
-#define NPS_PKT_SLC_CNTSX(_i)		(0x10008 + ((_i) * 0x40000))
-#define NPS_PKT_SLC_INT_LEVELSX(_i)	(0x10010 + ((_i) * 0x40000))
+#define NPS_PKT_IN_INSTR_CTLX(_i)	(0x10060UL + ((_i) * 0x40000UL))
+#define NPS_PKT_IN_INSTR_BADDRX(_i)	(0x10068UL + ((_i) * 0x40000UL))
+#define NPS_PKT_IN_INSTR_RSIZEX(_i)	(0x10070UL + ((_i) * 0x40000UL))
+#define NPS_PKT_IN_DONE_CNTSX(_i)	(0x10080UL + ((_i) * 0x40000UL))
+#define NPS_PKT_IN_INSTR_BAOFF_DBELLX(_i)	(0x10078UL + ((_i) * 0x40000UL))
+#define NPS_PKT_IN_INT_LEVELSX(_i)		(0x10088UL + ((_i) * 0x40000UL))
+#define NPS_PKT_SLC_CTLX(_i)		(0x10000UL + ((_i) * 0x40000UL))
+#define NPS_PKT_SLC_CNTSX(_i)		(0x10008UL + ((_i) * 0x40000UL))
+#define NPS_PKT_SLC_INT_LEVELSX(_i)	(0x10010UL + ((_i) * 0x40000UL))
 
 /* AQM Virtual Function Registers */
-#define AQMQ_QSZX(_i)			(0x20008 + ((_i)*0x40000))
+#define AQMQ_QSZX(_i)			(0x20008UL + ((_i) * 0x40000UL))
 
 static inline uint64_t
 nitrox_read_csr(uint8_t *bar_addr, uint64_t offset)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:21.431637024 +0100
+++ 0064-crypto-nitrox-fix-CSR-register-address-generation.patch	2020-05-19 13:56:18.295503187 +0100
@@ -1,8 +1,10 @@
-From 76522b25b15316400aab26cc8187e19397998f53 Mon Sep 17 00:00:00 2001
+From b878b432b77ca835ffedc90b850ee61afa4ad6fb Mon Sep 17 00:00:00 2001
 From: Nagadheeraj Rottela <rnagadheeraj@marvell.com>
 Date: Fri, 27 Mar 2020 19:12:38 +0530
 Subject: [PATCH] crypto/nitrox: fix CSR register address generation
 
+[ upstream commit 76522b25b15316400aab26cc8187e19397998f53 ]
+
 If the NPS_PKT ring/port is greater than 8191 the NPS_PKT*() macros will
 evaluate to incorrect values due to unintended sign extension from int
 to unsigned long. To fix this, add UL suffix to the constants in these
@@ -11,7 +13,6 @@
 Coverity issue: 349899, 349905, 349911, 349921, 349923
 Fixes: 32e4930d5a3b ("crypto/nitrox: add hardware queue management")
 Fixes: 0a8fc2423bff ("crypto/nitrox: introduce Nitrox driver")
-Cc: stable@dpdk.org
 
 Signed-off-by: Nagadheeraj Rottela <rnagadheeraj@marvell.com>
 Acked-by: Akhil Goyal <akhil.goyal@nxp.com>

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

* [dpdk-stable] patch 'crypto/nitrox: fix oversized device name' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (62 preceding siblings ...)
  2020-05-19 12:54 ` [dpdk-stable] patch 'crypto/nitrox: fix CSR register address generation' " luca.boccassi
@ 2020-05-19 12:54 ` luca.boccassi
  2020-05-19 12:54 ` [dpdk-stable] patch 'event/dsw: remove redundant control ring poll' " luca.boccassi
                   ` (15 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:54 UTC (permalink / raw)
  To: Nagadheeraj Rottela; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From b9b72b8815d6b90fee1d516c80edc1e61917ae59 Mon Sep 17 00:00:00 2001
From: Nagadheeraj Rottela <rnagadheeraj@marvell.com>
Date: Fri, 27 Mar 2020 19:12:39 +0530
Subject: [PATCH] crypto/nitrox: fix oversized device name

[ upstream commit 9614b472a3af771f68ba4f99a034de3b4da99ef7 ]

In nitrox_sym_pmd_create() the name array will overflow if the pci
device name is greater than 57 bytes. To fix this issue subtract pci
device name length from array length while appending substring to the
name.

Coverity issue: 349926
Fixes: 9fdef0cc2385 ("crypto/nitrox: create symmetric cryptodev")

Signed-off-by: Nagadheeraj Rottela <rnagadheeraj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 drivers/crypto/nitrox/nitrox_sym.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/crypto/nitrox/nitrox_sym.c b/drivers/crypto/nitrox/nitrox_sym.c
index 56410c44d7..d1b32fec92 100644
--- a/drivers/crypto/nitrox/nitrox_sym.c
+++ b/drivers/crypto/nitrox/nitrox_sym.c
@@ -683,7 +683,8 @@ nitrox_sym_pmd_create(struct nitrox_device *ndev)
 	struct rte_cryptodev *cdev;
 
 	rte_pci_device_name(&ndev->pdev->addr, name, sizeof(name));
-	snprintf(name + strlen(name), RTE_CRYPTODEV_NAME_MAX_LEN, "_n5sym");
+	snprintf(name + strlen(name), RTE_CRYPTODEV_NAME_MAX_LEN - strlen(name),
+		 "_n5sym");
 	ndev->rte_sym_dev.driver = &nitrox_rte_sym_drv;
 	ndev->rte_sym_dev.numa_node = ndev->pdev->device.numa_node;
 	ndev->rte_sym_dev.devargs = NULL;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:21.468783355 +0100
+++ 0065-crypto-nitrox-fix-oversized-device-name.patch	2020-05-19 13:56:18.295503187 +0100
@@ -1,8 +1,10 @@
-From 9614b472a3af771f68ba4f99a034de3b4da99ef7 Mon Sep 17 00:00:00 2001
+From b9b72b8815d6b90fee1d516c80edc1e61917ae59 Mon Sep 17 00:00:00 2001
 From: Nagadheeraj Rottela <rnagadheeraj@marvell.com>
 Date: Fri, 27 Mar 2020 19:12:39 +0530
 Subject: [PATCH] crypto/nitrox: fix oversized device name
 
+[ upstream commit 9614b472a3af771f68ba4f99a034de3b4da99ef7 ]
+
 In nitrox_sym_pmd_create() the name array will overflow if the pci
 device name is greater than 57 bytes. To fix this issue subtract pci
 device name length from array length while appending substring to the
@@ -10,7 +12,6 @@
 
 Coverity issue: 349926
 Fixes: 9fdef0cc2385 ("crypto/nitrox: create symmetric cryptodev")
-Cc: stable@dpdk.org
 
 Signed-off-by: Nagadheeraj Rottela <rnagadheeraj@marvell.com>
 Acked-by: Akhil Goyal <akhil.goyal@nxp.com>

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

* [dpdk-stable] patch 'event/dsw: remove redundant control ring poll' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (63 preceding siblings ...)
  2020-05-19 12:54 ` [dpdk-stable] patch 'crypto/nitrox: fix oversized device name' " luca.boccassi
@ 2020-05-19 12:54 ` luca.boccassi
  2020-05-19 12:54 ` [dpdk-stable] patch 'event/dsw: remove unnecessary read barrier' " luca.boccassi
                   ` (14 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:54 UTC (permalink / raw)
  To: Mattias Rönnblom; +Cc: Ola Liljedahl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 09a714399a2a771e7dea1c5d67092f4438ec889b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= <mattias.ronnblom@ericsson.com>
Date: Mon, 9 Mar 2020 07:51:04 +0100
Subject: [PATCH] event/dsw: remove redundant control ring poll
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 65388325f123c9e9a6ef2211804b7d259dc2dfab ]

On dequeue, polling the control ring once is enough.

Fixes: f6257b22e767 ("event/dsw: add load balancing")

Suggested-by: Ola Liljedahl <ola.liljedahl@arm.com>
Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
---
 drivers/event/dsw/dsw_event.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/event/dsw/dsw_event.c b/drivers/event/dsw/dsw_event.c
index eae53b2404..8ea68cd966 100644
--- a/drivers/event/dsw/dsw_event.c
+++ b/drivers/event/dsw/dsw_event.c
@@ -1194,11 +1194,6 @@ static uint16_t
 dsw_port_dequeue_burst(struct dsw_port *port, struct rte_event *events,
 		       uint16_t num)
 {
-	struct dsw_port *source_port = port;
-	struct dsw_evdev *dsw = source_port->dsw;
-
-	dsw_port_ctl_process(dsw, source_port);
-
 	if (unlikely(port->in_buffer_len > 0)) {
 		uint16_t dequeued = RTE_MIN(num, port->in_buffer_len);
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:21.507227136 +0100
+++ 0066-event-dsw-remove-redundant-control-ring-poll.patch	2020-05-19 13:56:18.295503187 +0100
@@ -1,4 +1,4 @@
-From 65388325f123c9e9a6ef2211804b7d259dc2dfab Mon Sep 17 00:00:00 2001
+From 09a714399a2a771e7dea1c5d67092f4438ec889b Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= <mattias.ronnblom@ericsson.com>
 Date: Mon, 9 Mar 2020 07:51:04 +0100
 Subject: [PATCH] event/dsw: remove redundant control ring poll
@@ -6,10 +6,11 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit 65388325f123c9e9a6ef2211804b7d259dc2dfab ]
+
 On dequeue, polling the control ring once is enough.
 
 Fixes: f6257b22e767 ("event/dsw: add load balancing")
-Cc: stable@dpdk.org
 
 Suggested-by: Ola Liljedahl <ola.liljedahl@arm.com>
 Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
@@ -18,10 +19,10 @@
  1 file changed, 5 deletions(-)
 
 diff --git a/drivers/event/dsw/dsw_event.c b/drivers/event/dsw/dsw_event.c
-index 04f0e9cab6..c31a4c492f 100644
+index eae53b2404..8ea68cd966 100644
 --- a/drivers/event/dsw/dsw_event.c
 +++ b/drivers/event/dsw/dsw_event.c
-@@ -1328,11 +1328,6 @@ static uint16_t
+@@ -1194,11 +1194,6 @@ static uint16_t
  dsw_port_dequeue_burst(struct dsw_port *port, struct rte_event *events,
  		       uint16_t num)
  {

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

* [dpdk-stable] patch 'event/dsw: remove unnecessary read barrier' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (64 preceding siblings ...)
  2020-05-19 12:54 ` [dpdk-stable] patch 'event/dsw: remove redundant control ring poll' " luca.boccassi
@ 2020-05-19 12:54 ` luca.boccassi
  2020-05-19 12:54 ` [dpdk-stable] patch 'doc: fix sphinx compatibility' " luca.boccassi
                   ` (13 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:54 UTC (permalink / raw)
  To: Mattias Rönnblom; +Cc: Ola Liljedahl, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From b0843e567101508860040091b5c58e9b147b6975 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= <mattias.ronnblom@ericsson.com>
Date: Mon, 9 Mar 2020 07:51:05 +0100
Subject: [PATCH] event/dsw: remove unnecessary read barrier
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit cea7bc671311e8cf5fbc21dceb15f5f8af8ee36b ]

Remove unnecessary read barrier (and misleading comment) on control
message dequeue.

Fixes: f6257b22e767 ("event/dsw: add load balancing")

Suggested-by: Ola Liljedahl <ola.liljedahl@arm.com>
Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
---
 drivers/event/dsw/dsw_event.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/event/dsw/dsw_event.c b/drivers/event/dsw/dsw_event.c
index 8ea68cd966..10e44fd497 100644
--- a/drivers/event/dsw/dsw_event.c
+++ b/drivers/event/dsw/dsw_event.c
@@ -930,11 +930,6 @@ dsw_port_ctl_process(struct dsw_evdev *dsw, struct dsw_port *port)
 {
 	struct dsw_ctl_msg msg;
 
-	/* So any table loads happens before the ring dequeue, in the
-	 * case of a 'paus' message.
-	 */
-	rte_smp_rmb();
-
 	if (dsw_port_ctl_dequeue(port, &msg) == 0) {
 		switch (msg.type) {
 		case DSW_CTL_PAUS_REQ:
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:21.543998949 +0100
+++ 0067-event-dsw-remove-unnecessary-read-barrier.patch	2020-05-19 13:56:18.295503187 +0100
@@ -1,4 +1,4 @@
-From cea7bc671311e8cf5fbc21dceb15f5f8af8ee36b Mon Sep 17 00:00:00 2001
+From b0843e567101508860040091b5c58e9b147b6975 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= <mattias.ronnblom@ericsson.com>
 Date: Mon, 9 Mar 2020 07:51:05 +0100
 Subject: [PATCH] event/dsw: remove unnecessary read barrier
@@ -6,11 +6,12 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit cea7bc671311e8cf5fbc21dceb15f5f8af8ee36b ]
+
 Remove unnecessary read barrier (and misleading comment) on control
 message dequeue.
 
 Fixes: f6257b22e767 ("event/dsw: add load balancing")
-Cc: stable@dpdk.org
 
 Suggested-by: Ola Liljedahl <ola.liljedahl@arm.com>
 Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
@@ -19,10 +20,10 @@
  1 file changed, 5 deletions(-)
 
 diff --git a/drivers/event/dsw/dsw_event.c b/drivers/event/dsw/dsw_event.c
-index c31a4c492f..94c8efdbcf 100644
+index 8ea68cd966..10e44fd497 100644
 --- a/drivers/event/dsw/dsw_event.c
 +++ b/drivers/event/dsw/dsw_event.c
-@@ -1065,11 +1065,6 @@ dsw_port_ctl_process(struct dsw_evdev *dsw, struct dsw_port *port)
+@@ -930,11 +930,6 @@ dsw_port_ctl_process(struct dsw_evdev *dsw, struct dsw_port *port)
  {
  	struct dsw_ctl_msg msg;
  

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

* [dpdk-stable] patch 'doc: fix sphinx compatibility' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (65 preceding siblings ...)
  2020-05-19 12:54 ` [dpdk-stable] patch 'event/dsw: remove unnecessary read barrier' " luca.boccassi
@ 2020-05-19 12:54 ` luca.boccassi
  2020-05-19 12:54 ` [dpdk-stable] patch 'ipsec: fix build dependency on hash lib' " luca.boccassi
                   ` (12 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:54 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From c4d52beff82ecca2211c99f9043e0a38f30b1ce0 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Wed, 8 Apr 2020 10:09:23 +0200
Subject: [PATCH] doc: fix sphinx compatibility

[ upstream commit 10d34aa3dee8daf0a07ae152de8377942f63503b ]

The function add_stylesheet() is deprecated since sphinx 1.8.
It will be removed in sphinx 4.0.
It is replaced by add_css_file().

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 doc/guides/conf.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/doc/guides/conf.py b/doc/guides/conf.py
index 0892c06dec..797ad1ef4b 100644
--- a/doc/guides/conf.py
+++ b/doc/guides/conf.py
@@ -410,4 +410,8 @@ def setup(app):
         # Process the numref references once the doctree has been created.
         app.connect('doctree-resolved', process_numref)
 
-    app.add_stylesheet('css/custom.css')
+    try:
+        # New function in sphinx 1.8
+        app.add_css_file('css/custom.css')
+    except:
+        app.add_stylesheet('css/custom.css')
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:21.582247157 +0100
+++ 0068-doc-fix-sphinx-compatibility.patch	2020-05-19 13:56:18.299503260 +0100
@@ -1,24 +1,24 @@
-From 10d34aa3dee8daf0a07ae152de8377942f63503b Mon Sep 17 00:00:00 2001
+From c4d52beff82ecca2211c99f9043e0a38f30b1ce0 Mon Sep 17 00:00:00 2001
 From: Thomas Monjalon <thomas@monjalon.net>
 Date: Wed, 8 Apr 2020 10:09:23 +0200
 Subject: [PATCH] doc: fix sphinx compatibility
 
+[ upstream commit 10d34aa3dee8daf0a07ae152de8377942f63503b ]
+
 The function add_stylesheet() is deprecated since sphinx 1.8.
 It will be removed in sphinx 4.0.
 It is replaced by add_css_file().
 
-Cc: stable@dpdk.org
-
 Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
 ---
  doc/guides/conf.py | 6 +++++-
  1 file changed, 5 insertions(+), 1 deletion(-)
 
 diff --git a/doc/guides/conf.py b/doc/guides/conf.py
-index c368fa51d4..08dcfcff54 100644
+index 0892c06dec..797ad1ef4b 100644
 --- a/doc/guides/conf.py
 +++ b/doc/guides/conf.py
-@@ -415,4 +415,8 @@ def setup(app):
+@@ -410,4 +410,8 @@ def setup(app):
          # Process the numref references once the doctree has been created.
          app.connect('doctree-resolved', process_numref)
  

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

* [dpdk-stable] patch 'ipsec: fix build dependency on hash lib' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (66 preceding siblings ...)
  2020-05-19 12:54 ` [dpdk-stable] patch 'doc: fix sphinx compatibility' " luca.boccassi
@ 2020-05-19 12:54 ` luca.boccassi
  2020-05-19 12:54 ` [dpdk-stable] patch 'log: fix level picked with globbing on type register' " luca.boccassi
                   ` (11 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:54 UTC (permalink / raw)
  To: Akhil Goyal; +Cc: Raslan Darawsheh, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From bd5e2ef80afa52aea5b27cb3cdbdaba0ed03c1ea Mon Sep 17 00:00:00 2001
From: Akhil Goyal <akhil.goyal@nxp.com>
Date: Thu, 16 Apr 2020 16:55:17 +0530
Subject: [PATCH] ipsec: fix build dependency on hash lib

[ upstream commit 53c83e42cd89ac41f5d5870838b034b53887a3cb ]

rte_ipsec has a dependency on rte_hash
So we need the librte_hash to be compiled before librte_ipsec.
Add the DEPDIRs to make sure this.

Fixes: 3feb23609cae ("ipsec: add SAD create/destroy implementation")

Reported-by: Raslan Darawsheh <rasland@mellanox.com>
Suggested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 lib/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/Makefile b/lib/Makefile
index 46b91ae1a4..2cbb096f12 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -113,7 +113,7 @@ DIRS-$(CONFIG_RTE_LIBRTE_BPF) += librte_bpf
 DEPDIRS-librte_bpf := librte_eal librte_mempool librte_mbuf librte_ethdev
 DIRS-$(CONFIG_RTE_LIBRTE_IPSEC) += librte_ipsec
 DEPDIRS-librte_ipsec := librte_eal librte_mbuf librte_cryptodev librte_security \
-			librte_net
+			librte_net librte_hash
 DIRS-$(CONFIG_RTE_LIBRTE_TELEMETRY) += librte_telemetry
 DEPDIRS-librte_telemetry := librte_eal librte_metrics librte_ethdev
 DIRS-$(CONFIG_RTE_LIBRTE_RCU) += librte_rcu
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:21.621359261 +0100
+++ 0069-ipsec-fix-build-dependency-on-hash-lib.patch	2020-05-19 13:56:18.299503260 +0100
@@ -1,14 +1,15 @@
-From 53c83e42cd89ac41f5d5870838b034b53887a3cb Mon Sep 17 00:00:00 2001
+From bd5e2ef80afa52aea5b27cb3cdbdaba0ed03c1ea Mon Sep 17 00:00:00 2001
 From: Akhil Goyal <akhil.goyal@nxp.com>
 Date: Thu, 16 Apr 2020 16:55:17 +0530
 Subject: [PATCH] ipsec: fix build dependency on hash lib
 
+[ upstream commit 53c83e42cd89ac41f5d5870838b034b53887a3cb ]
+
 rte_ipsec has a dependency on rte_hash
 So we need the librte_hash to be compiled before librte_ipsec.
 Add the DEPDIRs to make sure this.
 
 Fixes: 3feb23609cae ("ipsec: add SAD create/destroy implementation")
-Cc: stable@dpdk.org
 
 Reported-by: Raslan Darawsheh <rasland@mellanox.com>
 Suggested-by: Ferruh Yigit <ferruh.yigit@intel.com>

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

* [dpdk-stable] patch 'log: fix level picked with globbing on type register' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (67 preceding siblings ...)
  2020-05-19 12:54 ` [dpdk-stable] patch 'ipsec: fix build dependency on hash lib' " luca.boccassi
@ 2020-05-19 12:54 ` luca.boccassi
  2020-05-19 12:54 ` [dpdk-stable] patch 'doc: fix matrix CSS for recent sphinx' " luca.boccassi
                   ` (10 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:54 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From da57576513a010ee80923a6cad70addc197422ea Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Wed, 8 Apr 2020 00:47:58 +0200
Subject: [PATCH] log: fix level picked with globbing on type register

[ upstream commit b2a6d7e0484b8460374b2f058ac78bd4536b3e83 ]

When a log type is registered, the level can be picked
by matching saved options.
The check of fnmatch globbing result was reversed.

The same bug was already fixed in a similar function.
This one is acting in log type register function.

Note: this function rte_log_register_type_and_pick_level()
is not used a lot and could be merged with rte_log_register().

Fixes: 6ff0f81d0ef7 ("log: fix pattern matching")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 lib/librte_eal/common/eal_common_log.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/common/eal_common_log.c b/lib/librte_eal/common/eal_common_log.c
index c0efd5214f..975aea90db 100644
--- a/lib/librte_eal/common/eal_common_log.c
+++ b/lib/librte_eal/common/eal_common_log.c
@@ -302,7 +302,7 @@ rte_log_register_type_and_pick_level(const char *name, uint32_t level_def)
 			continue;
 
 		if (opt_ll->pattern) {
-			if (fnmatch(opt_ll->pattern, name, 0))
+			if (fnmatch(opt_ll->pattern, name, 0) == 0)
 				level = opt_ll->level;
 		} else {
 			if (regexec(&opt_ll->re_match, name, 0, NULL, 0) == 0)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:21.659162208 +0100
+++ 0070-log-fix-level-picked-with-globbing-on-type-register.patch	2020-05-19 13:56:18.299503260 +0100
@@ -1,8 +1,10 @@
-From b2a6d7e0484b8460374b2f058ac78bd4536b3e83 Mon Sep 17 00:00:00 2001
+From da57576513a010ee80923a6cad70addc197422ea Mon Sep 17 00:00:00 2001
 From: Thomas Monjalon <thomas@monjalon.net>
 Date: Wed, 8 Apr 2020 00:47:58 +0200
 Subject: [PATCH] log: fix level picked with globbing on type register
 
+[ upstream commit b2a6d7e0484b8460374b2f058ac78bd4536b3e83 ]
+
 When a log type is registered, the level can be picked
 by matching saved options.
 The check of fnmatch globbing result was reversed.
@@ -14,7 +16,6 @@
 is not used a lot and could be merged with rte_log_register().
 
 Fixes: 6ff0f81d0ef7 ("log: fix pattern matching")
-Cc: stable@dpdk.org
 
 Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
 ---
@@ -22,10 +23,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/lib/librte_eal/common/eal_common_log.c b/lib/librte_eal/common/eal_common_log.c
-index 7647a916ef..d7a5f9b641 100644
+index c0efd5214f..975aea90db 100644
 --- a/lib/librte_eal/common/eal_common_log.c
 +++ b/lib/librte_eal/common/eal_common_log.c
-@@ -320,7 +320,7 @@ rte_log_register_type_and_pick_level(const char *name, uint32_t level_def)
+@@ -302,7 +302,7 @@ rte_log_register_type_and_pick_level(const char *name, uint32_t level_def)
  			continue;
  
  		if (opt_ll->pattern) {

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

* [dpdk-stable] patch 'doc: fix matrix CSS for recent sphinx' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (68 preceding siblings ...)
  2020-05-19 12:54 ` [dpdk-stable] patch 'log: fix level picked with globbing on type register' " luca.boccassi
@ 2020-05-19 12:54 ` luca.boccassi
  2020-05-19 12:54 ` [dpdk-stable] patch 'eal: fix PRNG init with HPET enabled' " luca.boccassi
                   ` (9 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:54 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 8eefb8787a155174920b16919a53cafc0654c631 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Thu, 12 Mar 2020 00:01:34 +0100
Subject: [PATCH] doc: fix matrix CSS for recent sphinx

[ upstream commit cc64c593a7785fc810e2f762e12c8b29b418ac5d ]

It seems sphinx >= 2.0 is inserting a <p> tag in each table cell.
The feature table (matrix) style needs to be updated to avoid
cells being too big.

The margin, padding and line height are overridden.
The font size in percentage is replaced with an equivalent pixel size.
The border is explicit because it disappeared for th.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 doc/guides/conf.py | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/doc/guides/conf.py b/doc/guides/conf.py
index 797ad1ef4b..c1a82be95b 100644
--- a/doc/guides/conf.py
+++ b/doc/guides/conf.py
@@ -314,16 +314,22 @@ def print_table_css(outfile, table_id):
          cursor: default;
          overflow: hidden;
       }
+      table#idx p {
+         margin: 0;
+         line-height: inherit;
+      }
       table#idx th, table#idx td {
          text-align: center;
+         border: solid 1px #ddd;
       }
       table#idx th {
-         font-size: 72%;
+         padding: 0.5em 0;
+      }
+      table#idx th, table#idx th p {
+         font-size: 11px;
          white-space: pre-wrap;
          vertical-align: top;
-         padding: 0.5em 0;
          min-width: 0.9em;
-         width: 2em;
       }
       table#idx col:first-child {
          width: 0;
@@ -332,9 +338,11 @@ def print_table_css(outfile, table_id):
          vertical-align: bottom;
       }
       table#idx td {
-         font-size: 70%;
          padding: 1px;
       }
+      table#idx td, table#idx td p {
+         font-size: 11px;
+      }
       table#idx td:first-child {
          padding-left: 1em;
          text-align: left;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:21.695434064 +0100
+++ 0071-doc-fix-matrix-CSS-for-recent-sphinx.patch	2020-05-19 13:56:18.299503260 +0100
@@ -1,8 +1,10 @@
-From cc64c593a7785fc810e2f762e12c8b29b418ac5d Mon Sep 17 00:00:00 2001
+From 8eefb8787a155174920b16919a53cafc0654c631 Mon Sep 17 00:00:00 2001
 From: Thomas Monjalon <thomas@monjalon.net>
 Date: Thu, 12 Mar 2020 00:01:34 +0100
 Subject: [PATCH] doc: fix matrix CSS for recent sphinx
 
+[ upstream commit cc64c593a7785fc810e2f762e12c8b29b418ac5d ]
+
 It seems sphinx >= 2.0 is inserting a <p> tag in each table cell.
 The feature table (matrix) style needs to be updated to avoid
 cells being too big.
@@ -17,7 +19,7 @@
  1 file changed, 12 insertions(+), 4 deletions(-)
 
 diff --git a/doc/guides/conf.py b/doc/guides/conf.py
-index 08dcfcff54..9093ad31a0 100644
+index 797ad1ef4b..c1a82be95b 100644
 --- a/doc/guides/conf.py
 +++ b/doc/guides/conf.py
 @@ -314,16 +314,22 @@ def print_table_css(outfile, table_id):

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

* [dpdk-stable] patch 'eal: fix PRNG init with HPET enabled' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (69 preceding siblings ...)
  2020-05-19 12:54 ` [dpdk-stable] patch 'doc: fix matrix CSS for recent sphinx' " luca.boccassi
@ 2020-05-19 12:54 ` luca.boccassi
  2020-05-19 12:54 ` [dpdk-stable] patch 'vfio: fix race condition with sysfs' " luca.boccassi
                   ` (8 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:54 UTC (permalink / raw)
  To: Tonghao Zhang; +Cc: Mattias Rönnblom, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 952892aa67011669872daf1f07c864444220f7ae Mon Sep 17 00:00:00 2001
From: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Date: Thu, 16 Apr 2020 01:41:06 +0800
Subject: [PATCH] eal: fix PRNG init with HPET enabled
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 9b41c276fd35fe3c0ed3fb0d9cf98a83a58b31b2 ]

When rte_rand_init is invoked, and the kernel running dpdk does not
support *getentropy, at the same time, the cpu does not support rdseed,
then rte_rand_init invoked rte_get_timer_cycles.

If HPET was enabled in the DPDK build (CONFIG_RTE_LIBEAL_USE_HPET=y) and
the system, rte_get_timer_cycles will invoke rte_get_hpet_cycles while
*eal_hpet is not available.

To fix that, use rte_get_tsc_cycles instead of rte_get_timer_cycles.

Fixes: 3f002f069612 ("eal: replace libc-based random generation with LFSR")

Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Acked-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
---
 lib/librte_eal/common/rte_random.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/common/rte_random.c b/lib/librte_eal/common/rte_random.c
index 57ec8fb2b3..b7a089ac4f 100644
--- a/lib/librte_eal/common/rte_random.c
+++ b/lib/librte_eal/common/rte_random.c
@@ -198,7 +198,7 @@ __rte_random_initial_seed(void)
 		return (uint64_t)rdseed_low | ((uint64_t)rdseed_high << 32);
 #endif
 	/* second fallback: seed using rdtsc */
-	return rte_get_timer_cycles();
+	return rte_get_tsc_cycles();
 }
 
 RTE_INIT(rte_rand_init)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:21.732295905 +0100
+++ 0072-eal-fix-PRNG-init-with-HPET-enabled.patch	2020-05-19 13:56:18.299503260 +0100
@@ -1,4 +1,4 @@
-From 9b41c276fd35fe3c0ed3fb0d9cf98a83a58b31b2 Mon Sep 17 00:00:00 2001
+From 952892aa67011669872daf1f07c864444220f7ae Mon Sep 17 00:00:00 2001
 From: Tonghao Zhang <xiangxia.m.yue@gmail.com>
 Date: Thu, 16 Apr 2020 01:41:06 +0800
 Subject: [PATCH] eal: fix PRNG init with HPET enabled
@@ -6,6 +6,8 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit 9b41c276fd35fe3c0ed3fb0d9cf98a83a58b31b2 ]
+
 When rte_rand_init is invoked, and the kernel running dpdk does not
 support *getentropy, at the same time, the cpu does not support rdseed,
 then rte_rand_init invoked rte_get_timer_cycles.
@@ -17,7 +19,6 @@
 To fix that, use rte_get_tsc_cycles instead of rte_get_timer_cycles.
 
 Fixes: 3f002f069612 ("eal: replace libc-based random generation with LFSR")
-Cc: stable@dpdk.org
 
 Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
 Acked-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>

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

* [dpdk-stable] patch 'vfio: fix race condition with sysfs' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (70 preceding siblings ...)
  2020-05-19 12:54 ` [dpdk-stable] patch 'eal: fix PRNG init with HPET enabled' " luca.boccassi
@ 2020-05-19 12:54 ` luca.boccassi
  2020-05-19 12:54 ` [dpdk-stable] patch 'vfio: fix use after free with multiprocess' " luca.boccassi
                   ` (7 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:54 UTC (permalink / raw)
  To: Michael Haeuptle; +Cc: Darek Stojaczyk, Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 5732151922c287abf7c21b92291d041ef1cc0cdb Mon Sep 17 00:00:00 2001
From: Michael Haeuptle <michael.haeuptle@hpe.com>
Date: Mon, 6 Apr 2020 22:23:23 +0000
Subject: [PATCH] vfio: fix race condition with sysfs

[ upstream commit b758423bc4fe412941a289f3181849669c02b904 ]

This fix treats a 0 return value from vfio_open_group_fd
in vfio_get_group_fd as the intended error condition instead
of putting an incorrect 0 file descriptor in the vfio_group table.

Sometimes, the creation of device files in sysfs is not
instantaneously causing vfio_open_groupfd to return 0.
This has been observed when hot removing/adding multiple
NVMe devices (>=4).

Fixes: 340b7bb8d583 ("vfio: extend data structure for multi container")

Signed-off-by: Michael Haeuptle <michael.haeuptle@hpe.com>
Acked-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/linux/eal/eal_vfio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/linux/eal/eal_vfio.c b/lib/librte_eal/linux/eal/eal_vfio.c
index 01b5ef3f42..b82a5018bf 100644
--- a/lib/librte_eal/linux/eal/eal_vfio.c
+++ b/lib/librte_eal/linux/eal/eal_vfio.c
@@ -379,7 +379,7 @@ vfio_get_group_fd(struct vfio_config *vfio_cfg,
 	}
 
 	vfio_group_fd = vfio_open_group_fd(iommu_group_num);
-	if (vfio_group_fd < 0) {
+	if (vfio_group_fd <= 0) {
 		RTE_LOG(ERR, EAL, "Failed to open group %d\n", iommu_group_num);
 		return -1;
 	}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:21.770577448 +0100
+++ 0073-vfio-fix-race-condition-with-sysfs.patch	2020-05-19 13:56:18.299503260 +0100
@@ -1,8 +1,10 @@
-From b758423bc4fe412941a289f3181849669c02b904 Mon Sep 17 00:00:00 2001
+From 5732151922c287abf7c21b92291d041ef1cc0cdb Mon Sep 17 00:00:00 2001
 From: Michael Haeuptle <michael.haeuptle@hpe.com>
 Date: Mon, 6 Apr 2020 22:23:23 +0000
 Subject: [PATCH] vfio: fix race condition with sysfs
 
+[ upstream commit b758423bc4fe412941a289f3181849669c02b904 ]
+
 This fix treats a 0 return value from vfio_open_group_fd
 in vfio_get_group_fd as the intended error condition instead
 of putting an incorrect 0 file descriptor in the vfio_group table.
@@ -13,19 +15,18 @@
 NVMe devices (>=4).
 
 Fixes: 340b7bb8d583 ("vfio: extend data structure for multi container")
-Cc: stable@dpdk.org
 
 Signed-off-by: Michael Haeuptle <michael.haeuptle@hpe.com>
 Acked-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
 Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
 ---
- lib/librte_eal/linux/eal_vfio.c | 2 +-
+ lib/librte_eal/linux/eal/eal_vfio.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/lib/librte_eal/linux/eal_vfio.c b/lib/librte_eal/linux/eal_vfio.c
-index 4502aefed3..1979f6fdd8 100644
---- a/lib/librte_eal/linux/eal_vfio.c
-+++ b/lib/librte_eal/linux/eal_vfio.c
+diff --git a/lib/librte_eal/linux/eal/eal_vfio.c b/lib/librte_eal/linux/eal/eal_vfio.c
+index 01b5ef3f42..b82a5018bf 100644
+--- a/lib/librte_eal/linux/eal/eal_vfio.c
++++ b/lib/librte_eal/linux/eal/eal_vfio.c
 @@ -379,7 +379,7 @@ vfio_get_group_fd(struct vfio_config *vfio_cfg,
  	}
  

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

* [dpdk-stable] patch 'vfio: fix use after free with multiprocess' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (71 preceding siblings ...)
  2020-05-19 12:54 ` [dpdk-stable] patch 'vfio: fix race condition with sysfs' " luca.boccassi
@ 2020-05-19 12:54 ` luca.boccassi
  2020-05-19 12:54 ` [dpdk-stable] patch 'drivers: fix log type variables for -fno-common' " luca.boccassi
                   ` (6 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:54 UTC (permalink / raw)
  To: Wei Hu (Xavier); +Cc: Chengwen Feng, Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 2ef98701189ff669783c9b5f0417ac8811b6fa56 Mon Sep 17 00:00:00 2001
From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
Date: Tue, 21 Apr 2020 11:29:57 +0800
Subject: [PATCH] vfio: fix use after free with multiprocess

[ upstream commit d6298844da7e3e83034f1af196bdfddf388f979e ]

This patch fixes the heap-use-after-free bug which was found by ASAN
(Address-Sanitizer) in the vfio_get_default_container_fd function.

Fixes: 6bcb7c95fe14 ("vfio: share default container in multi-process")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/linux/eal/eal_vfio.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/librte_eal/linux/eal/eal_vfio.c b/lib/librte_eal/linux/eal/eal_vfio.c
index b82a5018bf..62ffe13e0e 100644
--- a/lib/librte_eal/linux/eal/eal_vfio.c
+++ b/lib/librte_eal/linux/eal/eal_vfio.c
@@ -1049,6 +1049,7 @@ vfio_get_default_container_fd(void)
 	struct rte_mp_reply mp_reply = {0};
 	struct timespec ts = {.tv_sec = 5, .tv_nsec = 0};
 	struct vfio_mp_param *p = (struct vfio_mp_param *)mp_req.param;
+	int container_fd;
 
 	if (default_vfio_cfg->vfio_enabled)
 		return default_vfio_cfg->vfio_container_fd;
@@ -1071,8 +1072,9 @@ vfio_get_default_container_fd(void)
 		mp_rep = &mp_reply.msgs[0];
 		p = (struct vfio_mp_param *)mp_rep->param;
 		if (p->result == SOCKET_OK && mp_rep->num_fds == 1) {
+			container_fd = mp_rep->fds[0];
 			free(mp_reply.msgs);
-			return mp_rep->fds[0];
+			return container_fd;
 		}
 	}
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:21.811397667 +0100
+++ 0074-vfio-fix-use-after-free-with-multiprocess.patch	2020-05-19 13:56:18.303503332 +0100
@@ -1,26 +1,27 @@
-From d6298844da7e3e83034f1af196bdfddf388f979e Mon Sep 17 00:00:00 2001
+From 2ef98701189ff669783c9b5f0417ac8811b6fa56 Mon Sep 17 00:00:00 2001
 From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
 Date: Tue, 21 Apr 2020 11:29:57 +0800
 Subject: [PATCH] vfio: fix use after free with multiprocess
 
+[ upstream commit d6298844da7e3e83034f1af196bdfddf388f979e ]
+
 This patch fixes the heap-use-after-free bug which was found by ASAN
 (Address-Sanitizer) in the vfio_get_default_container_fd function.
 
 Fixes: 6bcb7c95fe14 ("vfio: share default container in multi-process")
-Cc: stable@dpdk.org
 
 Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
 Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
 ---
- lib/librte_eal/linux/eal_vfio.c | 4 +++-
+ lib/librte_eal/linux/eal/eal_vfio.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
 
-diff --git a/lib/librte_eal/linux/eal_vfio.c b/lib/librte_eal/linux/eal_vfio.c
-index 1979f6fdd8..d26e1649a5 100644
---- a/lib/librte_eal/linux/eal_vfio.c
-+++ b/lib/librte_eal/linux/eal_vfio.c
-@@ -1092,6 +1092,7 @@ vfio_get_default_container_fd(void)
+diff --git a/lib/librte_eal/linux/eal/eal_vfio.c b/lib/librte_eal/linux/eal/eal_vfio.c
+index b82a5018bf..62ffe13e0e 100644
+--- a/lib/librte_eal/linux/eal/eal_vfio.c
++++ b/lib/librte_eal/linux/eal/eal_vfio.c
+@@ -1049,6 +1049,7 @@ vfio_get_default_container_fd(void)
  	struct rte_mp_reply mp_reply = {0};
  	struct timespec ts = {.tv_sec = 5, .tv_nsec = 0};
  	struct vfio_mp_param *p = (struct vfio_mp_param *)mp_req.param;
@@ -28,7 +29,7 @@
  
  	if (default_vfio_cfg->vfio_enabled)
  		return default_vfio_cfg->vfio_container_fd;
-@@ -1114,8 +1115,9 @@ vfio_get_default_container_fd(void)
+@@ -1071,8 +1072,9 @@ vfio_get_default_container_fd(void)
  		mp_rep = &mp_reply.msgs[0];
  		p = (struct vfio_mp_param *)mp_rep->param;
  		if (p->result == SOCKET_OK && mp_rep->num_fds == 1) {

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

* [dpdk-stable] patch 'drivers: fix log type variables for -fno-common' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (72 preceding siblings ...)
  2020-05-19 12:54 ` [dpdk-stable] patch 'vfio: fix use after free with multiprocess' " luca.boccassi
@ 2020-05-19 12:54 ` luca.boccassi
  2020-05-19 12:54 ` [dpdk-stable] patch 'cryptodev: add asymmetric session-less feature name' " luca.boccassi
                   ` (5 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:54 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Lukasz Wojciechowski, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From efd0dea9c869db269a5f44910598fe286c5814d5 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 10 Apr 2020 18:27:56 +0100
Subject: [PATCH] drivers: fix log type variables for -fno-common

[ upstream commit 3071d471525443978a2ae7e0d068bc3ffcede80c ]

The zlib compression driver, as well as the aesni-gcm, aesni-mb and openssl
crypto drivers all defined the logtype variable in the header file
directly. This gives errors with gcc 10, due to -fno-common being the
default, so we need to apply the same fix in all cases:
* move the variable definition to a suitable .c file
* mark the forward declaration of the variable in the header as "extern"

Fixes: 0c4e4c16b004 ("compress/zlib: introduce zlib PMD")
Fixes: 90c8a2d02a31 ("crypto/aesni_gcm: add dynamic logging")
Fixes: 276624ae2ef6 ("crypto/aesni_mb: add dynamic logging")
Fixes: 094b2386f461 ("crypto/openssl: add dynamic logging")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
---
 drivers/compress/zlib/zlib_pmd.c                 | 2 ++
 drivers/compress/zlib/zlib_pmd_private.h         | 2 +-
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c         | 2 ++
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h | 2 +-
 drivers/crypto/aesni_mb/aesni_mb_pmd_private.h   | 2 +-
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c       | 2 ++
 drivers/crypto/openssl/openssl_pmd_private.h     | 2 +-
 drivers/crypto/openssl/rte_openssl_pmd.c         | 1 +
 8 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/drivers/compress/zlib/zlib_pmd.c b/drivers/compress/zlib/zlib_pmd.c
index 19f9200c22..e39be2ed86 100644
--- a/drivers/compress/zlib/zlib_pmd.c
+++ b/drivers/compress/zlib/zlib_pmd.c
@@ -7,6 +7,8 @@
 
 #include "zlib_pmd_private.h"
 
+int zlib_logtype_driver;
+
 /** Compute next mbuf in the list, assign data buffer and length,
  *  returns 0 if mbuf is NULL
  */
diff --git a/drivers/compress/zlib/zlib_pmd_private.h b/drivers/compress/zlib/zlib_pmd_private.h
index bda49759dc..e36c5dc615 100644
--- a/drivers/compress/zlib/zlib_pmd_private.h
+++ b/drivers/compress/zlib/zlib_pmd_private.h
@@ -14,7 +14,7 @@
 
 #define DEF_MEM_LEVEL			8
 
-int zlib_logtype_driver;
+extern int zlib_logtype_driver;
 #define ZLIB_PMD_LOG(level, fmt, args...) \
 	rte_log(RTE_LOG_ ## level, zlib_logtype_driver, "%s(): "fmt "\n", \
 			__func__, ##args)
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
index 1a03be31dc..c9c9eb8ca9 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
@@ -13,6 +13,8 @@
 
 #include "aesni_gcm_pmd_private.h"
 
+int aesni_gcm_logtype_driver;
+
 static uint8_t cryptodev_driver_id;
 
 /** Parse crypto xform chain and set private session parameters */
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
index 2039adb533..7347c4769f 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
@@ -20,7 +20,7 @@
 /**< AES-NI GCM PMD device name */
 
 /** AES-NI GCM PMD  LOGTYPE DRIVER */
-int aesni_gcm_logtype_driver;
+extern int aesni_gcm_logtype_driver;
 #define AESNI_GCM_LOG(level, fmt, ...) \
 	rte_log(RTE_LOG_ ## level, aesni_gcm_logtype_driver,	\
 			"%s() line %u: "fmt "\n", __func__, __LINE__,	\
diff --git a/drivers/crypto/aesni_mb/aesni_mb_pmd_private.h b/drivers/crypto/aesni_mb/aesni_mb_pmd_private.h
index 3456693c25..b3cb2f1cf9 100644
--- a/drivers/crypto/aesni_mb/aesni_mb_pmd_private.h
+++ b/drivers/crypto/aesni_mb/aesni_mb_pmd_private.h
@@ -19,7 +19,7 @@ enum aesni_mb_vector_mode {
 /**< AES-NI Multi buffer PMD device name */
 
 /** AESNI_MB PMD LOGTYPE DRIVER */
-int aesni_mb_logtype_driver;
+extern int aesni_mb_logtype_driver;
 
 #define AESNI_MB_LOG(level, fmt, ...)  \
 	rte_log(RTE_LOG_ ## level, aesni_mb_logtype_driver,  \
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index 33f4167452..40feae3c62 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -14,6 +14,8 @@
 
 #include "aesni_mb_pmd_private.h"
 
+int aesni_mb_logtype_driver;
+
 #define AES_CCM_DIGEST_MIN_LEN 4
 #define AES_CCM_DIGEST_MAX_LEN 16
 #define HMAC_MAX_BLOCK_SIZE 128
diff --git a/drivers/crypto/openssl/openssl_pmd_private.h b/drivers/crypto/openssl/openssl_pmd_private.h
index 43ac3813df..b2054b3754 100644
--- a/drivers/crypto/openssl/openssl_pmd_private.h
+++ b/drivers/crypto/openssl/openssl_pmd_private.h
@@ -16,7 +16,7 @@
 /**< Open SSL Crypto PMD device name */
 
 /** OPENSSL PMD LOGTYPE DRIVER */
-int openssl_logtype_driver;
+extern int openssl_logtype_driver;
 #define OPENSSL_LOG(level, fmt, ...)  \
 	rte_log(RTE_LOG_ ## level, openssl_logtype_driver,  \
 			"%s() line %u: " fmt "\n", __func__, __LINE__,  \
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 199097bf8c..b820f6171d 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -18,6 +18,7 @@
 
 #define DES_BLOCK_SIZE 8
 
+int openssl_logtype_driver;
 static uint8_t cryptodev_driver_id;
 
 #if (OPENSSL_VERSION_NUMBER < 0x10100000L)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:21.848933454 +0100
+++ 0075-drivers-fix-log-type-variables-for-fno-common.patch	2020-05-19 13:56:18.307503404 +0100
@@ -1,8 +1,10 @@
-From 3071d471525443978a2ae7e0d068bc3ffcede80c Mon Sep 17 00:00:00 2001
+From efd0dea9c869db269a5f44910598fe286c5814d5 Mon Sep 17 00:00:00 2001
 From: Bruce Richardson <bruce.richardson@intel.com>
 Date: Fri, 10 Apr 2020 18:27:56 +0100
 Subject: [PATCH] drivers: fix log type variables for -fno-common
 
+[ upstream commit 3071d471525443978a2ae7e0d068bc3ffcede80c ]
+
 The zlib compression driver, as well as the aesni-gcm, aesni-mb and openssl
 crypto drivers all defined the logtype variable in the header file
 directly. This gives errors with gcc 10, due to -fno-common being the
@@ -14,7 +16,6 @@
 Fixes: 90c8a2d02a31 ("crypto/aesni_gcm: add dynamic logging")
 Fixes: 276624ae2ef6 ("crypto/aesni_mb: add dynamic logging")
 Fixes: 094b2386f461 ("crypto/openssl: add dynamic logging")
-Cc: stable@dpdk.org
 
 Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
 Acked-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
@@ -56,7 +57,7 @@
  	rte_log(RTE_LOG_ ## level, zlib_logtype_driver, "%s(): "fmt "\n", \
  			__func__, ##args)
 diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
-index a1caab9939..475d523ae1 100644
+index 1a03be31dc..c9c9eb8ca9 100644
 --- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
 +++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
 @@ -13,6 +13,8 @@
@@ -67,9 +68,9 @@
 +
  static uint8_t cryptodev_driver_id;
  
- /* setup session handlers */
+ /** Parse crypto xform chain and set private session parameters */
 diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
-index 080d4f7e49..2763d1c492 100644
+index 2039adb533..7347c4769f 100644
 --- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
 +++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
 @@ -20,7 +20,7 @@

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

* [dpdk-stable] patch 'cryptodev: add asymmetric session-less feature name' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (73 preceding siblings ...)
  2020-05-19 12:54 ` [dpdk-stable] patch 'drivers: fix log type variables for -fno-common' " luca.boccassi
@ 2020-05-19 12:54 ` luca.boccassi
  2020-05-19 12:54 ` [dpdk-stable] patch 'drivers/crypto: fix log type variables for -fno-common' " luca.boccassi
                   ` (4 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:54 UTC (permalink / raw)
  To: Pablo de Lara
  Cc: Fiona Trahe, Lukasz Wojciechowski, Anoob Joseph, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 46a37b23ba27ec39701a980f1480119910ace1fa Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Tue, 14 Apr 2020 18:29:49 +0100
Subject: [PATCH] cryptodev: add asymmetric session-less feature name

[ upstream commit 6f161e2f34dc10450626a2f09833e629d8c696d0 ]

String for asymmetric session-less support was missing.

Fixes: f2b2a4497100 ("cryptodev: add asymmetric session-less")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
---
 lib/librte_cryptodev/rte_cryptodev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index f1ab622268..ed9de3eb92 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -491,6 +491,8 @@ rte_cryptodev_get_feature_name(uint64_t flag)
 		return "RSA_PRIV_OP_KEY_QT";
 	case RTE_CRYPTODEV_FF_DIGEST_ENCRYPTED:
 		return "DIGEST_ENCRYPTED";
+	case RTE_CRYPTODEV_FF_ASYM_SESSIONLESS:
+		return "ASYM_SESSIONLESS";
 	default:
 		return NULL;
 	}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:21.893830854 +0100
+++ 0076-cryptodev-add-asymmetric-session-less-feature-name.patch	2020-05-19 13:56:18.307503404 +0100
@@ -1,12 +1,13 @@
-From 6f161e2f34dc10450626a2f09833e629d8c696d0 Mon Sep 17 00:00:00 2001
+From 46a37b23ba27ec39701a980f1480119910ace1fa Mon Sep 17 00:00:00 2001
 From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
 Date: Tue, 14 Apr 2020 18:29:49 +0100
 Subject: [PATCH] cryptodev: add asymmetric session-less feature name
 
+[ upstream commit 6f161e2f34dc10450626a2f09833e629d8c696d0 ]
+
 String for asymmetric session-less support was missing.
 
 Fixes: f2b2a4497100 ("cryptodev: add asymmetric session-less")
-Cc: stable@dpdk.org
 
 Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
 Acked-by: Fiona Trahe <fiona.trahe@intel.com>
@@ -17,13 +18,13 @@
  1 file changed, 2 insertions(+)
 
 diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
-index 65d61a3ef5..f2ade83d3c 100644
+index f1ab622268..ed9de3eb92 100644
 --- a/lib/librte_cryptodev/rte_cryptodev.c
 +++ b/lib/librte_cryptodev/rte_cryptodev.c
-@@ -495,6 +495,8 @@ rte_cryptodev_get_feature_name(uint64_t flag)
+@@ -491,6 +491,8 @@ rte_cryptodev_get_feature_name(uint64_t flag)
+ 		return "RSA_PRIV_OP_KEY_QT";
+ 	case RTE_CRYPTODEV_FF_DIGEST_ENCRYPTED:
  		return "DIGEST_ENCRYPTED";
- 	case RTE_CRYPTODEV_FF_SYM_CPU_CRYPTO:
- 		return "SYM_CPU_CRYPTO";
 +	case RTE_CRYPTODEV_FF_ASYM_SESSIONLESS:
 +		return "ASYM_SESSIONLESS";
  	default:

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

* [dpdk-stable] patch 'drivers/crypto: fix log type variables for -fno-common' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (74 preceding siblings ...)
  2020-05-19 12:54 ` [dpdk-stable] patch 'cryptodev: add asymmetric session-less feature name' " luca.boccassi
@ 2020-05-19 12:54 ` luca.boccassi
  2020-05-19 12:54 ` [dpdk-stable] patch 'test/crypto: fix flag check' " luca.boccassi
                   ` (3 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:54 UTC (permalink / raw)
  To: Lukasz Wojciechowski; +Cc: Pablo de Lara, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 9aa6caeb5af05c1c440213ee9ff5c40d001b9614 Mon Sep 17 00:00:00 2001
From: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Date: Wed, 15 Apr 2020 08:22:16 +0200
Subject: [PATCH] drivers/crypto: fix log type variables for -fno-common

[ upstream commit 6da6baf7631b53dd53d3a4c4c7d62d39da4921b6 ]

The four crypto drivers: kasumi, mvsam, snow3g and zuc define logtype
variables in their header file. As the header files are included
in more than one compilation unit, it might cause appearance
of multiple instances of the variable and a linker error.
Such situation can occur, when no common section is allowed
by the compiler settings and tentative definitions are placed
in BSS section.

Fixes: 2cba3814932e ("crypto/kasumi: add dynamic logging")
Fixes: a05a450f42fd ("crypto/mvsam: add dynamic logging")
Fixes: f3af5f9d1325 ("crypto/zuc: add dynamic logging")
Fixes: a3277ad47feb ("cryptodev: remove crypto device driver name")

Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 drivers/crypto/kasumi/kasumi_pmd_private.h | 2 +-
 drivers/crypto/kasumi/rte_kasumi_pmd.c     | 1 +
 drivers/crypto/mvsam/mrvl_pmd_private.h    | 2 +-
 drivers/crypto/mvsam/rte_mrvl_pmd.c        | 1 +
 drivers/crypto/snow3g/rte_snow3g_pmd.c     | 1 +
 drivers/crypto/snow3g/snow3g_pmd_private.h | 2 +-
 drivers/crypto/zuc/rte_zuc_pmd.c           | 1 +
 drivers/crypto/zuc/zuc_pmd_private.h       | 4 ++--
 8 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/crypto/kasumi/kasumi_pmd_private.h b/drivers/crypto/kasumi/kasumi_pmd_private.h
index 7ac19c5735..fda696804e 100644
--- a/drivers/crypto/kasumi/kasumi_pmd_private.h
+++ b/drivers/crypto/kasumi/kasumi_pmd_private.h
@@ -11,7 +11,7 @@
 /**< KASUMI PMD device name */
 
 /** KASUMI PMD LOGTYPE DRIVER */
-int kasumi_logtype_driver;
+extern int kasumi_logtype_driver;
 
 #define KASUMI_LOG(level, fmt, ...)  \
 	rte_log(RTE_LOG_ ## level, kasumi_logtype_driver,  \
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c b/drivers/crypto/kasumi/rte_kasumi_pmd.c
index d0583ef073..c87dca5f48 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd.c
@@ -17,6 +17,7 @@
 #define KASUMI_MAX_BURST 4
 #define BYTE_LEN 8
 
+int kasumi_logtype_driver;
 static uint8_t cryptodev_driver_id;
 
 /** Get xform chain order. */
diff --git a/drivers/crypto/mvsam/mrvl_pmd_private.h b/drivers/crypto/mvsam/mrvl_pmd_private.h
index 09702b9e3e..e575330ef5 100644
--- a/drivers/crypto/mvsam/mrvl_pmd_private.h
+++ b/drivers/crypto/mvsam/mrvl_pmd_private.h
@@ -13,7 +13,7 @@
 /**< Marvell PMD device name */
 
 /** MRVL PMD LOGTYPE DRIVER */
-int mrvl_logtype_driver;
+extern int mrvl_logtype_driver;
 
 #define MRVL_LOG(level, fmt, ...) \
 	rte_log(RTE_LOG_ ## level, mrvl_logtype_driver, \
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd.c b/drivers/crypto/mvsam/rte_mrvl_pmd.c
index 3c0fe216f0..63782ce974 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd.c
@@ -19,6 +19,7 @@
 #define MRVL_PMD_MAX_NB_SESS_ARG		("max_nb_sessions")
 #define MRVL_PMD_DEFAULT_MAX_NB_SESSIONS	2048
 
+int mrvl_logtype_driver;
 static uint8_t cryptodev_driver_id;
 
 struct mrvl_pmd_init_params {
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c
index 9d07e1ab2c..2b1b90b011 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c
@@ -16,6 +16,7 @@
 #define SNOW3G_MAX_BURST 8
 #define BYTE_LEN 8
 
+int snow3g_logtype_driver;
 static uint8_t cryptodev_driver_id;
 
 /** Get xform chain order. */
diff --git a/drivers/crypto/snow3g/snow3g_pmd_private.h b/drivers/crypto/snow3g/snow3g_pmd_private.h
index 1fe05eb567..1070800960 100644
--- a/drivers/crypto/snow3g/snow3g_pmd_private.h
+++ b/drivers/crypto/snow3g/snow3g_pmd_private.h
@@ -11,7 +11,7 @@
 /**< SNOW 3G PMD device name */
 
 /** SNOW 3G PMD LOGTYPE DRIVER */
-int snow3g_logtype_driver;
+extern int snow3g_logtype_driver;
 
 #define SNOW3G_LOG(level, fmt, ...)  \
 	rte_log(RTE_LOG_ ## level, snow3g_logtype_driver,  \
diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c
index 8e214cd50e..265aabaebf 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd.c
@@ -14,6 +14,7 @@
 #define ZUC_MAX_BURST 4
 #define BYTE_LEN 8
 
+int zuc_logtype_driver;
 static uint8_t cryptodev_driver_id;
 
 /** Get xform chain order. */
diff --git a/drivers/crypto/zuc/zuc_pmd_private.h b/drivers/crypto/zuc/zuc_pmd_private.h
index 428efd4bb5..dc492b1710 100644
--- a/drivers/crypto/zuc/zuc_pmd_private.h
+++ b/drivers/crypto/zuc/zuc_pmd_private.h
@@ -8,10 +8,10 @@
 #include <sso_zuc.h>
 
 #define CRYPTODEV_NAME_ZUC_PMD		crypto_zuc
-/**< KASUMI PMD device name */
+/**< ZUC PMD device name */
 
 /** ZUC PMD LOGTYPE DRIVER */
-int zuc_logtype_driver;
+extern int zuc_logtype_driver;
 #define ZUC_LOG(level, fmt, ...)  \
 	rte_log(RTE_LOG_ ## level, zuc_logtype_driver,  \
 			"%s()... line %u: " fmt "\n", __func__, __LINE__,  \
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:21.933619634 +0100
+++ 0077-drivers-crypto-fix-log-type-variables-for-fno-common.patch	2020-05-19 13:56:18.311503476 +0100
@@ -1,8 +1,10 @@
-From 6da6baf7631b53dd53d3a4c4c7d62d39da4921b6 Mon Sep 17 00:00:00 2001
+From 9aa6caeb5af05c1c440213ee9ff5c40d001b9614 Mon Sep 17 00:00:00 2001
 From: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
 Date: Wed, 15 Apr 2020 08:22:16 +0200
 Subject: [PATCH] drivers/crypto: fix log type variables for -fno-common
 
+[ upstream commit 6da6baf7631b53dd53d3a4c4c7d62d39da4921b6 ]
+
 The four crypto drivers: kasumi, mvsam, snow3g and zuc define logtype
 variables in their header file. As the header files are included
 in more than one compilation unit, it might cause appearance
@@ -15,7 +17,6 @@
 Fixes: a05a450f42fd ("crypto/mvsam: add dynamic logging")
 Fixes: f3af5f9d1325 ("crypto/zuc: add dynamic logging")
 Fixes: a3277ad47feb ("cryptodev: remove crypto device driver name")
-Cc: stable@dpdk.org
 
 Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
 Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
@@ -31,7 +32,7 @@
  8 files changed, 9 insertions(+), 5 deletions(-)
 
 diff --git a/drivers/crypto/kasumi/kasumi_pmd_private.h b/drivers/crypto/kasumi/kasumi_pmd_private.h
-index 3b3a6958fd..b7f1c428b4 100644
+index 7ac19c5735..fda696804e 100644
 --- a/drivers/crypto/kasumi/kasumi_pmd_private.h
 +++ b/drivers/crypto/kasumi/kasumi_pmd_private.h
 @@ -11,7 +11,7 @@
@@ -44,7 +45,7 @@
  #define KASUMI_LOG(level, fmt, ...)  \
  	rte_log(RTE_LOG_ ## level, kasumi_logtype_driver,  \
 diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c b/drivers/crypto/kasumi/rte_kasumi_pmd.c
-index baad5b4e77..d672648420 100644
+index d0583ef073..c87dca5f48 100644
 --- a/drivers/crypto/kasumi/rte_kasumi_pmd.c
 +++ b/drivers/crypto/kasumi/rte_kasumi_pmd.c
 @@ -17,6 +17,7 @@
@@ -81,7 +82,7 @@
  
  struct mrvl_pmd_init_params {
 diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c
-index d72112b5f4..8101eaaada 100644
+index 9d07e1ab2c..2b1b90b011 100644
 --- a/drivers/crypto/snow3g/rte_snow3g_pmd.c
 +++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c
 @@ -16,6 +16,7 @@
@@ -93,7 +94,7 @@
  
  /** Get xform chain order. */
 diff --git a/drivers/crypto/snow3g/snow3g_pmd_private.h b/drivers/crypto/snow3g/snow3g_pmd_private.h
-index 2074f3d172..23cf078a9c 100644
+index 1fe05eb567..1070800960 100644
 --- a/drivers/crypto/snow3g/snow3g_pmd_private.h
 +++ b/drivers/crypto/snow3g/snow3g_pmd_private.h
 @@ -11,7 +11,7 @@
@@ -106,11 +107,11 @@
  #define SNOW3G_LOG(level, fmt, ...)  \
  	rte_log(RTE_LOG_ ## level, snow3g_logtype_driver,  \
 diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c
-index 9e06ab7c95..f47a7880de 100644
+index 8e214cd50e..265aabaebf 100644
 --- a/drivers/crypto/zuc/rte_zuc_pmd.c
 +++ b/drivers/crypto/zuc/rte_zuc_pmd.c
 @@ -14,6 +14,7 @@
- #define ZUC_MAX_BURST 16
+ #define ZUC_MAX_BURST 4
  #define BYTE_LEN 8
  
 +int zuc_logtype_driver;
@@ -118,11 +119,11 @@
  
  /** Get xform chain order. */
 diff --git a/drivers/crypto/zuc/zuc_pmd_private.h b/drivers/crypto/zuc/zuc_pmd_private.h
-index 47a8b08dd7..d8684891ee 100644
+index 428efd4bb5..dc492b1710 100644
 --- a/drivers/crypto/zuc/zuc_pmd_private.h
 +++ b/drivers/crypto/zuc/zuc_pmd_private.h
 @@ -8,10 +8,10 @@
- #include <intel-ipsec-mb.h>
+ #include <sso_zuc.h>
  
  #define CRYPTODEV_NAME_ZUC_PMD		crypto_zuc
 -/**< KASUMI PMD device name */

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

* [dpdk-stable] patch 'test/crypto: fix flag check' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (75 preceding siblings ...)
  2020-05-19 12:54 ` [dpdk-stable] patch 'drivers/crypto: fix log type variables for -fno-common' " luca.boccassi
@ 2020-05-19 12:54 ` luca.boccassi
  2020-05-19 12:54 ` [dpdk-stable] patch 'crypto/openssl: fix out-of-place encryption' " luca.boccassi
                   ` (2 subsequent siblings)
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:54 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: Fiona Trahe, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 8d5349e781421047b8dac4966acd3a443d97a053 Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Thu, 16 Apr 2020 18:12:46 +0100
Subject: [PATCH] test/crypto: fix flag check

[ upstream commit 042bb5654404643afcebef194d23f559606665ef ]

An incorrect flag check was done, using "&&" instead of "&".

Fixes: 2717246ecd7d ("cryptodev: replace mbuf scatter gather flag")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
---
 app/test/test_cryptodev_blockcipher.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test/test_cryptodev_blockcipher.c b/app/test/test_cryptodev_blockcipher.c
index 5bfe2d009f..2f91d000a2 100644
--- a/app/test/test_cryptodev_blockcipher.c
+++ b/app/test/test_cryptodev_blockcipher.c
@@ -93,7 +93,7 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t,
 		uint64_t feat_flags = dev_info.feature_flags;
 		uint64_t oop_flag = RTE_CRYPTODEV_FF_OOP_SGL_IN_LB_OUT;
 
-		if (t->feature_mask && BLOCKCIPHER_TEST_FEATURE_OOP) {
+		if (t->feature_mask & BLOCKCIPHER_TEST_FEATURE_OOP) {
 			if (!(feat_flags & oop_flag)) {
 				printf("Device doesn't support out-of-place "
 					"scatter-gather in input mbuf. "
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:21.974938861 +0100
+++ 0078-test-crypto-fix-flag-check.patch	2020-05-19 13:56:18.311503476 +0100
@@ -1,12 +1,13 @@
-From 042bb5654404643afcebef194d23f559606665ef Mon Sep 17 00:00:00 2001
+From 8d5349e781421047b8dac4966acd3a443d97a053 Mon Sep 17 00:00:00 2001
 From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
 Date: Thu, 16 Apr 2020 18:12:46 +0100
 Subject: [PATCH] test/crypto: fix flag check
 
+[ upstream commit 042bb5654404643afcebef194d23f559606665ef ]
+
 An incorrect flag check was done, using "&&" instead of "&".
 
 Fixes: 2717246ecd7d ("cryptodev: replace mbuf scatter gather flag")
-Cc: stable@dpdk.org
 
 Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
 Acked-by: Fiona Trahe <fiona.trahe@intel.com>
@@ -15,7 +16,7 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/app/test/test_cryptodev_blockcipher.c b/app/test/test_cryptodev_blockcipher.c
-index 2ff7fc91ba..4973c74a92 100644
+index 5bfe2d009f..2f91d000a2 100644
 --- a/app/test/test_cryptodev_blockcipher.c
 +++ b/app/test/test_cryptodev_blockcipher.c
 @@ -93,7 +93,7 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t,

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

* [dpdk-stable] patch 'crypto/openssl: fix out-of-place encryption' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (76 preceding siblings ...)
  2020-05-19 12:54 ` [dpdk-stable] patch 'test/crypto: fix flag check' " luca.boccassi
@ 2020-05-19 12:54 ` luca.boccassi
  2020-05-19 12:54 ` [dpdk-stable] patch 'security: fix verification of parameters' " luca.boccassi
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:54 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 48bb740ce1a4c3d0adf26241e3156295775428cb Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Tue, 14 Apr 2020 18:25:55 +0100
Subject: [PATCH] crypto/openssl: fix out-of-place encryption

[ upstream commit 1fa538faeb962ec7f54a1cdf8cba5271de15e17d ]

When authenticating after encrypting, if the operation
is out-of-place, the destination buffer is the one
that will get authenticated.
If the cipher offset is higher than the authentication
offset, it means that part of the text to authenticate
will be plaintext, so this needs to get copied to the
destination buffer, or the result will be incorrect.

Fixes: d61f70b4c918 ("crypto/libcrypto: add driver for OpenSSL library")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 drivers/crypto/openssl/rte_openssl_pmd.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index b820f6171d..c294f60b7d 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -2038,6 +2038,26 @@ process_asym_op(struct openssl_qp *qp, struct rte_crypto_op *op,
 	return retval;
 }
 
+static void
+copy_plaintext(struct rte_mbuf *m_src, struct rte_mbuf *m_dst,
+		struct rte_crypto_op *op)
+{
+	uint8_t *p_src, *p_dst;
+
+	p_src = rte_pktmbuf_mtod(m_src, uint8_t *);
+	p_dst = rte_pktmbuf_mtod(m_dst, uint8_t *);
+
+	/**
+	 * Copy the content between cipher offset and auth offset
+	 * for generating correct digest.
+	 */
+	if (op->sym->cipher.data.offset > op->sym->auth.data.offset)
+		memcpy(p_dst + op->sym->auth.data.offset,
+				p_src + op->sym->auth.data.offset,
+				op->sym->cipher.data.offset -
+				op->sym->auth.data.offset);
+}
+
 /** Process crypto operation for mbuf */
 static int
 process_op(struct openssl_qp *qp, struct rte_crypto_op *op,
@@ -2060,6 +2080,9 @@ process_op(struct openssl_qp *qp, struct rte_crypto_op *op,
 		break;
 	case OPENSSL_CHAIN_CIPHER_AUTH:
 		process_openssl_cipher_op(op, sess, msrc, mdst);
+		/* OOP */
+		if (msrc != mdst)
+			copy_plaintext(msrc, mdst, op);
 		process_openssl_auth_op(qp, op, sess, mdst, mdst);
 		break;
 	case OPENSSL_CHAIN_AUTH_CIPHER:
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:22.022519621 +0100
+++ 0079-crypto-openssl-fix-out-of-place-encryption.patch	2020-05-19 13:56:18.311503476 +0100
@@ -1,8 +1,10 @@
-From 1fa538faeb962ec7f54a1cdf8cba5271de15e17d Mon Sep 17 00:00:00 2001
+From 48bb740ce1a4c3d0adf26241e3156295775428cb Mon Sep 17 00:00:00 2001
 From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
 Date: Tue, 14 Apr 2020 18:25:55 +0100
 Subject: [PATCH] crypto/openssl: fix out-of-place encryption
 
+[ upstream commit 1fa538faeb962ec7f54a1cdf8cba5271de15e17d ]
+
 When authenticating after encrypting, if the operation
 is out-of-place, the destination buffer is the one
 that will get authenticated.
@@ -12,7 +14,6 @@
 destination buffer, or the result will be incorrect.
 
 Fixes: d61f70b4c918 ("crypto/libcrypto: add driver for OpenSSL library")
-Cc: stable@dpdk.org
 
 Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
 Acked-by: Akhil Goyal <akhil.goyal@nxp.com>

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

* [dpdk-stable] patch 'security: fix verification of parameters' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (77 preceding siblings ...)
  2020-05-19 12:54 ` [dpdk-stable] patch 'crypto/openssl: fix out-of-place encryption' " luca.boccassi
@ 2020-05-19 12:54 ` luca.boccassi
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
  79 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 12:54 UTC (permalink / raw)
  To: Lukasz Wojciechowski; +Cc: Anoob Joseph, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 4fa404e2805c14f1cb151f159ba68b7c2c25890f Mon Sep 17 00:00:00 2001
From: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Date: Thu, 9 Apr 2020 19:24:50 +0200
Subject: [PATCH] security: fix verification of parameters

[ upstream commit b6ee98547847e64b527484ab453a9f81ff3ce067 ]

This patch adds verification of the parameters to the ret_security API
functions. All required parameters are checked if they are not NULL.

Checks verify full chain of pointers, e.g. in case of verification of
"instance->ops->session_XXX", they check also "instance"
and "instance->ops".

Fixes: c261d1431bd8 ("security: introduce security API and framework")
Fixes: 1a08c379b9b5 ("security: support user data retrieval")

Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 lib/librte_security/rte_security.c | 59 +++++++++++++++++++++++-------
 1 file changed, 46 insertions(+), 13 deletions(-)

diff --git a/lib/librte_security/rte_security.c b/lib/librte_security/rte_security.c
index bc81ce15d1..38ccc2ea9c 100644
--- a/lib/librte_security/rte_security.c
+++ b/lib/librte_security/rte_security.c
@@ -1,6 +1,7 @@
 /* SPDX-License-Identifier: BSD-3-Clause
  * Copyright 2017 NXP.
  * Copyright(c) 2017 Intel Corporation.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
  */
 
 #include <rte_malloc.h>
@@ -9,6 +10,19 @@
 #include "rte_security.h"
 #include "rte_security_driver.h"
 
+/* Macro to check for invalid pointers */
+#define RTE_PTR_OR_ERR_RET(ptr, retval) do {	\
+	if ((ptr) == NULL)			\
+		return retval;			\
+} while (0)
+
+/* Macro to check for invalid pointers chains */
+#define RTE_PTR_CHAIN3_OR_ERR_RET(p1, p2, p3, retval, last_retval) do {	\
+	RTE_PTR_OR_ERR_RET(p1, retval);					\
+	RTE_PTR_OR_ERR_RET(p1->p2, retval);				\
+	RTE_PTR_OR_ERR_RET(p1->p2->p3, last_retval);			\
+} while (0)
+
 struct rte_security_session *
 rte_security_session_create(struct rte_security_ctx *instance,
 			    struct rte_security_session_conf *conf,
@@ -16,10 +30,9 @@ rte_security_session_create(struct rte_security_ctx *instance,
 {
 	struct rte_security_session *sess = NULL;
 
-	if (conf == NULL)
-		return NULL;
-
-	RTE_FUNC_PTR_OR_ERR_RET(*instance->ops->session_create, NULL);
+	RTE_PTR_CHAIN3_OR_ERR_RET(instance, ops, session_create, NULL, NULL);
+	RTE_PTR_OR_ERR_RET(conf, NULL);
+	RTE_PTR_OR_ERR_RET(mp, NULL);
 
 	if (rte_mempool_get(mp, (void **)&sess))
 		return NULL;
@@ -38,14 +51,19 @@ rte_security_session_update(struct rte_security_ctx *instance,
 			    struct rte_security_session *sess,
 			    struct rte_security_session_conf *conf)
 {
-	RTE_FUNC_PTR_OR_ERR_RET(*instance->ops->session_update, -ENOTSUP);
+	RTE_PTR_CHAIN3_OR_ERR_RET(instance, ops, session_update, -EINVAL,
+			-ENOTSUP);
+	RTE_PTR_OR_ERR_RET(sess, -EINVAL);
+	RTE_PTR_OR_ERR_RET(conf, -EINVAL);
+
 	return instance->ops->session_update(instance->device, sess, conf);
 }
 
 unsigned int
 rte_security_session_get_size(struct rte_security_ctx *instance)
 {
-	RTE_FUNC_PTR_OR_ERR_RET(*instance->ops->session_get_size, 0);
+	RTE_PTR_CHAIN3_OR_ERR_RET(instance, ops, session_get_size, 0, 0);
+
 	return instance->ops->session_get_size(instance->device);
 }
 
@@ -54,7 +72,11 @@ rte_security_session_stats_get(struct rte_security_ctx *instance,
 			       struct rte_security_session *sess,
 			       struct rte_security_stats *stats)
 {
-	RTE_FUNC_PTR_OR_ERR_RET(*instance->ops->session_stats_get, -ENOTSUP);
+	RTE_PTR_CHAIN3_OR_ERR_RET(instance, ops, session_stats_get, -EINVAL,
+			-ENOTSUP);
+	/* Parameter sess can be NULL in case of getting global statistics. */
+	RTE_PTR_OR_ERR_RET(stats, -EINVAL);
+
 	return instance->ops->session_stats_get(instance->device, sess, stats);
 }
 
@@ -64,7 +86,9 @@ rte_security_session_destroy(struct rte_security_ctx *instance,
 {
 	int ret;
 
-	RTE_FUNC_PTR_OR_ERR_RET(*instance->ops->session_destroy, -ENOTSUP);
+	RTE_PTR_CHAIN3_OR_ERR_RET(instance, ops, session_destroy, -EINVAL,
+			-ENOTSUP);
+	RTE_PTR_OR_ERR_RET(sess, -EINVAL);
 
 	if (instance->sess_cnt)
 		instance->sess_cnt--;
@@ -81,7 +105,11 @@ rte_security_set_pkt_metadata(struct rte_security_ctx *instance,
 			      struct rte_security_session *sess,
 			      struct rte_mbuf *m, void *params)
 {
-	RTE_FUNC_PTR_OR_ERR_RET(*instance->ops->set_pkt_metadata, -ENOTSUP);
+#ifdef RTE_DEBUG
+	RTE_PTR_CHAIN3_OR_ERR_RET(instance, ops, set_pkt_metadata, -EINVAL,
+			-ENOTSUP);
+	RTE_PTR_OR_ERR_RET(sess, -EINVAL);
+#endif
 	return instance->ops->set_pkt_metadata(instance->device,
 					       sess, m, params);
 }
@@ -91,7 +119,9 @@ rte_security_get_userdata(struct rte_security_ctx *instance, uint64_t md)
 {
 	void *userdata = NULL;
 
-	RTE_FUNC_PTR_OR_ERR_RET(*instance->ops->get_userdata, NULL);
+#ifdef RTE_DEBUG
+	RTE_PTR_CHAIN3_OR_ERR_RET(instance, ops, get_userdata, NULL, NULL);
+#endif
 	if (instance->ops->get_userdata(instance->device, md, &userdata))
 		return NULL;
 
@@ -101,7 +131,8 @@ rte_security_get_userdata(struct rte_security_ctx *instance, uint64_t md)
 const struct rte_security_capability *
 rte_security_capabilities_get(struct rte_security_ctx *instance)
 {
-	RTE_FUNC_PTR_OR_ERR_RET(*instance->ops->capabilities_get, NULL);
+	RTE_PTR_CHAIN3_OR_ERR_RET(instance, ops, capabilities_get, NULL, NULL);
+
 	return instance->ops->capabilities_get(instance->device);
 }
 
@@ -113,7 +144,9 @@ rte_security_capability_get(struct rte_security_ctx *instance,
 	const struct rte_security_capability *capability;
 	uint16_t i = 0;
 
-	RTE_FUNC_PTR_OR_ERR_RET(*instance->ops->capabilities_get, NULL);
+	RTE_PTR_CHAIN3_OR_ERR_RET(instance, ops, capabilities_get, NULL, NULL);
+	RTE_PTR_OR_ERR_RET(idx, NULL);
+
 	capabilities = instance->ops->capabilities_get(instance->device);
 
 	if (capabilities == NULL)
@@ -121,7 +154,7 @@ rte_security_capability_get(struct rte_security_ctx *instance,
 
 	while ((capability = &capabilities[i++])->action
 			!= RTE_SECURITY_ACTION_TYPE_NONE) {
-		if (capability->action  == idx->action &&
+		if (capability->action == idx->action &&
 				capability->protocol == idx->protocol) {
 			if (idx->protocol == RTE_SECURITY_PROTOCOL_IPSEC) {
 				if (capability->ipsec.proto ==
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:22.062379226 +0100
+++ 0080-security-fix-verification-of-parameters.patch	2020-05-19 13:56:18.311503476 +0100
@@ -1,8 +1,10 @@
-From b6ee98547847e64b527484ab453a9f81ff3ce067 Mon Sep 17 00:00:00 2001
+From 4fa404e2805c14f1cb151f159ba68b7c2c25890f Mon Sep 17 00:00:00 2001
 From: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
 Date: Thu, 9 Apr 2020 19:24:50 +0200
 Subject: [PATCH] security: fix verification of parameters
 
+[ upstream commit b6ee98547847e64b527484ab453a9f81ff3ce067 ]
+
 This patch adds verification of the parameters to the ret_security API
 functions. All required parameters are checked if they are not NULL.
 
@@ -12,7 +14,6 @@
 
 Fixes: c261d1431bd8 ("security: introduce security API and framework")
 Fixes: 1a08c379b9b5 ("security: support user data retrieval")
-Cc: stable@dpdk.org
 
 Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
 Acked-by: Anoob Joseph <anoobj@marvell.com>

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

* [dpdk-stable] patch 'security: fix return types in documentation' has been queued to stable release 19.11.3
  2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
                   ` (78 preceding siblings ...)
  2020-05-19 12:54 ` [dpdk-stable] patch 'security: fix verification of parameters' " luca.boccassi
@ 2020-05-19 13:02 ` luca.boccassi
  2020-05-19 13:02   ` [dpdk-stable] patch 'security: fix session counter' " luca.boccassi
                     ` (212 more replies)
  79 siblings, 213 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:02 UTC (permalink / raw)
  To: Lukasz Wojciechowski; +Cc: Anoob Joseph, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 477f8e08d34ca2c7e113e86c1463c0eeb5bf55f7 Mon Sep 17 00:00:00 2001
From: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Date: Thu, 9 Apr 2020 19:24:51 +0200
Subject: [PATCH] security: fix return types in documentation

[ upstream commit 3139b9568bf0889c76da7b7d728f17502d6ff5a9 ]

Enhance returned values description for rte_security_session_destroy
and some other minor description changes.

Fixes: c261d1431bd8 ("security: introduce security API and framework")

Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 lib/librte_security/rte_security.h | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/lib/librte_security/rte_security.h b/lib/librte_security/rte_security.h
index 546779df2b..b4b4eb2d85 100644
--- a/lib/librte_security/rte_security.h
+++ b/lib/librte_security/rte_security.h
@@ -374,7 +374,7 @@ rte_security_session_create(struct rte_security_ctx *instance,
  * @param   conf	update configuration parameters
  * @return
  *  - On success returns 0
- *  - On failure return errno
+ *  - On failure returns a negative errno value.
  */
 __rte_experimental
 int
@@ -399,12 +399,14 @@ rte_security_session_get_size(struct rte_security_ctx *instance);
  * return it to its original mempool.
  *
  * @param   instance	security instance
- * @param   sess	security session to freed
+ * @param   sess	security session to be freed
  *
  * @return
  *  - 0 if successful.
- *  - -EINVAL if session is NULL.
+ *  - -EINVAL if session or context instance is NULL.
  *  - -EBUSY if not all device private data has been freed.
+ *  - -ENOTSUP if destroying private data is not supported.
+ *  - other negative values in case of freeing private data errors.
  */
 int
 rte_security_session_destroy(struct rte_security_ctx *instance,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:44.671321028 +0100
+++ 0001-security-fix-return-types-in-documentation.patch	2020-05-19 14:04:44.048645327 +0100
@@ -1,13 +1,14 @@
-From 3139b9568bf0889c76da7b7d728f17502d6ff5a9 Mon Sep 17 00:00:00 2001
+From 477f8e08d34ca2c7e113e86c1463c0eeb5bf55f7 Mon Sep 17 00:00:00 2001
 From: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
 Date: Thu, 9 Apr 2020 19:24:51 +0200
 Subject: [PATCH] security: fix return types in documentation
 
+[ upstream commit 3139b9568bf0889c76da7b7d728f17502d6ff5a9 ]
+
 Enhance returned values description for rte_security_session_destroy
 and some other minor description changes.
 
 Fixes: c261d1431bd8 ("security: introduce security API and framework")
-Cc: stable@dpdk.org
 
 Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
 Acked-by: Anoob Joseph <anoobj@marvell.com>
@@ -17,10 +18,10 @@
  1 file changed, 5 insertions(+), 3 deletions(-)
 
 diff --git a/lib/librte_security/rte_security.h b/lib/librte_security/rte_security.h
-index ef47118fa7..747830d679 100644
+index 546779df2b..b4b4eb2d85 100644
 --- a/lib/librte_security/rte_security.h
 +++ b/lib/librte_security/rte_security.h
-@@ -378,7 +378,7 @@ rte_security_session_create(struct rte_security_ctx *instance,
+@@ -374,7 +374,7 @@ rte_security_session_create(struct rte_security_ctx *instance,
   * @param   conf	update configuration parameters
   * @return
   *  - On success returns 0
@@ -29,7 +30,7 @@
   */
  __rte_experimental
  int
-@@ -403,12 +403,14 @@ rte_security_session_get_size(struct rte_security_ctx *instance);
+@@ -399,12 +399,14 @@ rte_security_session_get_size(struct rte_security_ctx *instance);
   * return it to its original mempool.
   *
   * @param   instance	security instance

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

* [dpdk-stable] patch 'security: fix session counter' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
@ 2020-05-19 13:02   ` luca.boccassi
  2020-05-19 13:02   ` [dpdk-stable] patch 'test: remove redundant macro' " luca.boccassi
                     ` (211 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:02 UTC (permalink / raw)
  To: Lukasz Wojciechowski; +Cc: Anoob Joseph, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From b54822ff2fd386be55dd03ecd32a4609a22ec2d8 Mon Sep 17 00:00:00 2001
From: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Date: Thu, 9 Apr 2020 19:24:52 +0200
Subject: [PATCH] security: fix session counter

[ upstream commit e36b5a87d6d0e1e209d85dc22419924cbe02056c ]

Fix session counter to be decreased in rte_security_session_destroy
only when session was successfully destroyed.

Formerly session counter was decreased prior session destroying
and returning session object to mempool. It remained decreased even
if session was not destroyed and mempool object released making counter
invalid.

Fixes: c261d1431bd8 ("security: introduce security API and framework")

Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 lib/librte_security/rte_security.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/lib/librte_security/rte_security.c b/lib/librte_security/rte_security.c
index 38ccc2ea9c..d475b09771 100644
--- a/lib/librte_security/rte_security.c
+++ b/lib/librte_security/rte_security.c
@@ -90,14 +90,16 @@ rte_security_session_destroy(struct rte_security_ctx *instance,
 			-ENOTSUP);
 	RTE_PTR_OR_ERR_RET(sess, -EINVAL);
 
+	ret = instance->ops->session_destroy(instance->device, sess);
+	if (ret != 0)
+		return ret;
+
+	rte_mempool_put(rte_mempool_from_obj(sess), (void *)sess);
+
 	if (instance->sess_cnt)
 		instance->sess_cnt--;
 
-	ret = instance->ops->session_destroy(instance->device, sess);
-	if (!ret)
-		rte_mempool_put(rte_mempool_from_obj(sess), (void *)sess);
-
-	return ret;
+	return 0;
 }
 
 int
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:44.705199725 +0100
+++ 0002-security-fix-session-counter.patch	2020-05-19 14:04:44.048645327 +0100
@@ -1,8 +1,10 @@
-From e36b5a87d6d0e1e209d85dc22419924cbe02056c Mon Sep 17 00:00:00 2001
+From b54822ff2fd386be55dd03ecd32a4609a22ec2d8 Mon Sep 17 00:00:00 2001
 From: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
 Date: Thu, 9 Apr 2020 19:24:52 +0200
 Subject: [PATCH] security: fix session counter
 
+[ upstream commit e36b5a87d6d0e1e209d85dc22419924cbe02056c ]
+
 Fix session counter to be decreased in rte_security_session_destroy
 only when session was successfully destroyed.
 
@@ -12,7 +14,6 @@
 invalid.
 
 Fixes: c261d1431bd8 ("security: introduce security API and framework")
-Cc: stable@dpdk.org
 
 Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
 Acked-by: Anoob Joseph <anoobj@marvell.com>

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

* [dpdk-stable] patch 'test: remove redundant macro' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
  2020-05-19 13:02   ` [dpdk-stable] patch 'security: fix session counter' " luca.boccassi
@ 2020-05-19 13:02   ` luca.boccassi
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/hns3: fix packets offload features flags in Rx' " luca.boccassi
                     ` (210 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:02 UTC (permalink / raw)
  To: Lukasz Wojciechowski; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From ebad6ac59a05fc0e36da4b2fb94f76562961e803 Mon Sep 17 00:00:00 2001
From: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Date: Thu, 9 Apr 2020 19:24:53 +0200
Subject: [PATCH] test: remove redundant macro

[ upstream commit 27ea35b743aa3c735d04848b5c795ae0b8cd311b ]

Remove RTE_TEST_TRACE_FAILURE macro definition from app/test/test.h
as it might be already defined and cause build problems.

Also it is good to leave the decision of additional logs to the final
user of test.h and rte_test.h

Fixes: 5afc521eac6a ("eal: add test assert macros")

Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 app/test/test.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/app/test/test.h b/app/test/test.h
index ac0c50616c..b07f6c1ef0 100644
--- a/app/test/test.h
+++ b/app/test/test.h
@@ -22,8 +22,6 @@
 # define TEST_TRACE_FAILURE(_file, _line, _func)
 #endif
 
-#define RTE_TEST_TRACE_FAILURE TEST_TRACE_FAILURE
-
 #include <rte_test.h>
 
 #define TEST_ASSERT RTE_TEST_ASSERT
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:44.737045794 +0100
+++ 0003-test-remove-redundant-macro.patch	2020-05-19 14:04:44.048645327 +0100
@@ -1,8 +1,10 @@
-From 27ea35b743aa3c735d04848b5c795ae0b8cd311b Mon Sep 17 00:00:00 2001
+From ebad6ac59a05fc0e36da4b2fb94f76562961e803 Mon Sep 17 00:00:00 2001
 From: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
 Date: Thu, 9 Apr 2020 19:24:53 +0200
 Subject: [PATCH] test: remove redundant macro
 
+[ upstream commit 27ea35b743aa3c735d04848b5c795ae0b8cd311b ]
+
 Remove RTE_TEST_TRACE_FAILURE macro definition from app/test/test.h
 as it might be already defined and cause build problems.
 
@@ -10,7 +12,6 @@
 user of test.h and rte_test.h
 
 Fixes: 5afc521eac6a ("eal: add test assert macros")
-Cc: stable@dpdk.org
 
 Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
 Acked-by: Akhil Goyal <akhil.goyal@nxp.com>

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

* [dpdk-stable] patch 'net/hns3: fix packets offload features flags in Rx' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
  2020-05-19 13:02   ` [dpdk-stable] patch 'security: fix session counter' " luca.boccassi
  2020-05-19 13:02   ` [dpdk-stable] patch 'test: remove redundant macro' " luca.boccassi
@ 2020-05-19 13:02   ` luca.boccassi
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/hns3: fix default error code of command interface' " luca.boccassi
                     ` (209 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:02 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Wei Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From e9248b23b39115946d3e7082ba1e81c7211a6b77 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Tue, 17 Mar 2020 17:12:02 +0800
Subject: [PATCH] net/hns3: fix packets offload features flags in Rx

[ upstream commit af531efa4b4e14a87f6fe45dfec732ea7434e4e9 ]

Currently there is a certain probability of the unexpected ol_flag of
the Rx packets's rte_mbuf when receiving packets.

The root cause as below:
1. The member variable named ol_flag of the structure named rte_mbuf is
   not properly initialized to zero in the '.rx_pkt_burst' ops
   implementation function named hns3_recv_pkts.
2. When multi-segment rte_mbufs are needed for long packet in Rx
   operation, the driver should assign value to the ol_flag of the first
   segment, not to the ol_flag of the last segment.

This patch fixes it with the following modification in the
'.rx_pkt_burst' ops implementation function named hns3_recv_pkts.
1. Where the first write operation in the '.rx_pkt_burst' ops
   implementation function, assign PKT_RX_RSS_HASH to ol_flags directly
   using '=' operation instead of '|=' operation.
2. In the static function named hns3_rx_set_cksum_flag, the last
   rte_mbuf's ol_flags should be assigned when processing multi-segment.
   We fix it by passing first_seg variable to the function instead of
   rxm(the last segment's address).

Fixes: bba636698316 ("net/hns3: support Rx/Tx and related operations")
Fixes: ad7cf94823e8 ("net/hns3: fix offload flag for RSS hash")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 drivers/net/hns3/hns3_rxtx.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index 8166447131..e0f64f0d0b 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -977,7 +977,7 @@ hns3_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 		first_seg->pkt_len = pkt_len;
 		first_seg->port = rxq->port_id;
 		first_seg->hash.rss = rte_le_to_cpu_32(rxdp->rx.rss_hash);
-		first_seg->ol_flags |= PKT_RX_RSS_HASH;
+		first_seg->ol_flags = PKT_RX_RSS_HASH;
 		if (unlikely(hns3_get_bit(bd_base_info, HNS3_RXD_LUM_B))) {
 			first_seg->hash.fdir.hi =
 				rte_le_to_cpu_32(rxdp->rx.fd_id);
@@ -994,7 +994,8 @@ hns3_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 								  ol_info);
 
 		if (bd_base_info & BIT(HNS3_RXD_L3L4P_B))
-			hns3_rx_set_cksum_flag(rxm, first_seg->packet_type,
+			hns3_rx_set_cksum_flag(first_seg,
+					       first_seg->packet_type,
 					       cksum_err);
 
 		first_seg->vlan_tci = rte_le_to_cpu_16(rxdp->rx.vlan_tag);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:44.769070698 +0100
+++ 0004-net-hns3-fix-packets-offload-features-flags-in-Rx.patch	2020-05-19 14:04:44.048645327 +0100
@@ -1,8 +1,10 @@
-From af531efa4b4e14a87f6fe45dfec732ea7434e4e9 Mon Sep 17 00:00:00 2001
+From e9248b23b39115946d3e7082ba1e81c7211a6b77 Mon Sep 17 00:00:00 2001
 From: Chengwen Feng <fengchengwen@huawei.com>
 Date: Tue, 17 Mar 2020 17:12:02 +0800
 Subject: [PATCH] net/hns3: fix packets offload features flags in Rx
 
+[ upstream commit af531efa4b4e14a87f6fe45dfec732ea7434e4e9 ]
+
 Currently there is a certain probability of the unexpected ol_flag of
 the Rx packets's rte_mbuf when receiving packets.
 
@@ -26,7 +28,6 @@
 
 Fixes: bba636698316 ("net/hns3: support Rx/Tx and related operations")
 Fixes: ad7cf94823e8 ("net/hns3: fix offload flag for RSS hash")
-Cc: stable@dpdk.org
 
 Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -35,19 +36,19 @@
  1 file changed, 3 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
-index ec6d19f58f..0c965b1b83 100644
+index 8166447131..e0f64f0d0b 100644
 --- a/drivers/net/hns3/hns3_rxtx.c
 +++ b/drivers/net/hns3/hns3_rxtx.c
-@@ -1582,7 +1582,7 @@ hns3_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
+@@ -977,7 +977,7 @@ hns3_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
  		first_seg->pkt_len = pkt_len;
  		first_seg->port = rxq->port_id;
- 		first_seg->hash.rss = rte_le_to_cpu_32(rxd.rx.rss_hash);
+ 		first_seg->hash.rss = rte_le_to_cpu_32(rxdp->rx.rss_hash);
 -		first_seg->ol_flags |= PKT_RX_RSS_HASH;
 +		first_seg->ol_flags = PKT_RX_RSS_HASH;
  		if (unlikely(hns3_get_bit(bd_base_info, HNS3_RXD_LUM_B))) {
  			first_seg->hash.fdir.hi =
- 				rte_le_to_cpu_32(rxd.rx.fd_id);
-@@ -1599,7 +1599,8 @@ hns3_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
+ 				rte_le_to_cpu_32(rxdp->rx.fd_id);
+@@ -994,7 +994,8 @@ hns3_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
  								  ol_info);
  
  		if (bd_base_info & BIT(HNS3_RXD_L3L4P_B))
@@ -56,7 +57,7 @@
 +					       first_seg->packet_type,
  					       cksum_err);
  
- 		first_seg->vlan_tci = rte_le_to_cpu_16(rxd.rx.vlan_tag);
+ 		first_seg->vlan_tci = rte_le_to_cpu_16(rxdp->rx.vlan_tag);
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'net/hns3: fix default error code of command interface' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (2 preceding siblings ...)
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/hns3: fix packets offload features flags in Rx' " luca.boccassi
@ 2020-05-19 13:02   ` luca.boccassi
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/hns3: fix crash when flushing RSS flow rules with FLR' " luca.boccassi
                     ` (208 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:02 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Wei Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 1cd4ab6cf4887dd09f2ccfadc9429bec320e453d Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Tue, 17 Mar 2020 17:12:03 +0800
Subject: [PATCH] net/hns3: fix default error code of command interface

[ upstream commit 4f4ee5b79b85797b92ed3a3b9304d871124f0650 ]

Currently, the hns3 PMD driver can interact with firmware through
command to complete hardware configuration. The driver calls internal
interface function named hns3_cmd_send to issues command to the
firmware, and check the execution result of the command through desc_ret
returned by firmware to driver.

As the design of error code, when device is resetting hns3_cmd_send will
only return -EBUSY or -EIO. But we found that if desc_ret is in
[12,65535], for example the item doesn't exist when issuing the command
to query some table item, hns3_cmd_send also return -EIO. This
phenomenon will affect the processing logic for the return value.

The root cause as below:
When desc_ret is in [12,65535], in the static function named
hns3_cmd_convert_err_code called by hns3_cmd_send, matches the default
case and return -EIO. And then hns3_cmd_send return -EIO.

This patch fixes it with the following modification.
1. Change the return value of the default case in the static function
   named hns3_cmd_convert_err_code from -EIO to -EREMOTEIO.
2. Modify the comment add errcode description of the internal interface
   function named hns3_cmd_send.

Fixes: 737f30e1c3ab ("net/hns3: support command interface with firmware")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 drivers/net/hns3/hns3_cmd.c | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/drivers/net/hns3/hns3_cmd.c b/drivers/net/hns3/hns3_cmd.c
index 5ec3dfe016..c85168b319 100644
--- a/drivers/net/hns3/hns3_cmd.c
+++ b/drivers/net/hns3/hns3_cmd.c
@@ -289,7 +289,7 @@ hns3_cmd_convert_err_code(uint16_t desc_ret)
 	case HNS3_CMD_INVALID:
 		return -EBADR;
 	default:
-		return -EIO;
+		return -EREMOTEIO;
 	}
 }
 
@@ -349,11 +349,23 @@ static int hns3_cmd_poll_reply(struct hns3_hw *hw)
 
 /*
  * hns3_cmd_send - send command to command queue
- * @hw: pointer to the hw struct
- * @desc: prefilled descriptor for describing the command
- * @num : the number of descriptors to be sent
  *
- * This is the main send command for command queue, it
+ * @param hw
+ *   pointer to the hw struct
+ * @param desc
+ *   prefilled descriptor for describing the command
+ * @param num
+ *   the number of descriptors to be sent
+ * @return
+ *   - -EBUSY if detect device is in resetting
+ *   - -EIO   if detect cmd csq corrupted (due to reset) or
+ *            there is reset pending
+ *   - -ENOMEM/-ETIME/...(Non-Zero) if other error case
+ *   - Zero   if operation completed successfully
+ *
+ * Note -BUSY/-EIO only used in reset case
+ *
+ * Note this is the main send command for command queue, it
  * sends the queue, cleans the queue, etc
  */
 int
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:44.806152210 +0100
+++ 0005-net-hns3-fix-default-error-code-of-command-interface.patch	2020-05-19 14:04:44.052645400 +0100
@@ -1,8 +1,10 @@
-From 4f4ee5b79b85797b92ed3a3b9304d871124f0650 Mon Sep 17 00:00:00 2001
+From 1cd4ab6cf4887dd09f2ccfadc9429bec320e453d Mon Sep 17 00:00:00 2001
 From: Chengwen Feng <fengchengwen@huawei.com>
 Date: Tue, 17 Mar 2020 17:12:03 +0800
 Subject: [PATCH] net/hns3: fix default error code of command interface
 
+[ upstream commit 4f4ee5b79b85797b92ed3a3b9304d871124f0650 ]
+
 Currently, the hns3 PMD driver can interact with firmware through
 command to complete hardware configuration. The driver calls internal
 interface function named hns3_cmd_send to issues command to the
@@ -27,7 +29,6 @@
    function named hns3_cmd_send.
 
 Fixes: 737f30e1c3ab ("net/hns3: support command interface with firmware")
-Cc: stable@dpdk.org
 
 Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>

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

* [dpdk-stable] patch 'net/hns3: fix crash when flushing RSS flow rules with FLR' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (3 preceding siblings ...)
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/hns3: fix default error code of command interface' " luca.boccassi
@ 2020-05-19 13:02   ` luca.boccassi
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/hns3: fix configuring illegal VLAN PVID' " luca.boccassi
                     ` (207 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:02 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Wei Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From b6c05b0781b81f5a905f3b1c6e9b0e73d1a32983 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Tue, 17 Mar 2020 17:12:04 +0800
Subject: [PATCH] net/hns3: fix crash when flushing RSS flow rules with FLR
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit c064f6918c7a7efac119ea0556e6c71d8d27a3fa ]

Currently, we encounter segmentation fault when performing the following
test case:
1. Run testpmd application, config the flow filter rules then flush them
   repeatedly.
2. Inject FLR concurrently every 5 second.
The calltrace info:

This GDB was configured as "aarch64-linux-gnu".
Reading symbols from ./testpmd...(no debugging symbols found)...done.
[New LWP 322]
[New LWP 325]
[New LWP 324]
[New LWP 326]
[New LWP 323]
[New LWP 327]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/aarch64-linux-gnu/
libthread_db.so.1".
Core was generated by `/home/root/app/testpmd -w 0000:00:01.0 -w
0000:00:02.0 -w 0000:00:03.0 -l 0-3 -'.
Program terminated with signal SIGSEGV, Segmentation fault.
libc.so.6
[Current thread is 1 (Thread 0xffff8bb35110 (LWP 322))]
(gdb) bt
 #0  0x0000ffff8b936a90 in strlen () from /lib/aarch64-linux-gnu/
 libc.so.6
 #1  0x0000ffff8b905ccc in vfprintf () from /lib/aarch64-linux-gnu/
 libc.so.6
 #2  0x0000ffff8b993d04 in __printf_chk () from /lib/aarch64-linux-gnu/
 libc.so.6
 #3  0x0000000000754828 in port_flow_flush ()
 #4  0x0000000000870f3c in cmdline_parse ()

The root cause as follows:
In the '.flush' ops implementation function named hns3_flow_flush, By
the way the '.flush' ops is defined in the struct rte_flow_ops, if
failed to call hns3_clear_rss_filter, the out parameter error is not
set, and then the member variable name message in the struct error is
invalid(filled with 0x44444444 in port_flow_flush function of the
testpmd application), it leads to segmentation fault when format the
message.

We fixes it by filling error parameter when failure in calling static
function named hns3_clear_rss_filter in the the '.flush' ops
implementation function named hns3_flow_flush.

Fixes: c37ca66f2b27 ("net/hns3: support RSS")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 drivers/net/hns3/hns3_flow.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index bcd121f48b..207dd578a0 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1822,8 +1822,11 @@ hns3_flow_flush(struct rte_eth_dev *dev, struct rte_flow_error *error)
 	}
 
 	ret = hns3_clear_rss_filter(dev);
-	if (ret)
+	if (ret) {
+		rte_flow_error_set(error, ret, RTE_FLOW_ERROR_TYPE_HANDLE,
+				   NULL, "Failed to flush rss filter");
 		return ret;
+	}
 
 	hns3_filterlist_flush(dev);
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:44.840777144 +0100
+++ 0006-net-hns3-fix-crash-when-flushing-RSS-flow-rules-with.patch	2020-05-19 14:04:44.052645400 +0100
@@ -1,4 +1,4 @@
-From c064f6918c7a7efac119ea0556e6c71d8d27a3fa Mon Sep 17 00:00:00 2001
+From b6c05b0781b81f5a905f3b1c6e9b0e73d1a32983 Mon Sep 17 00:00:00 2001
 From: Chengwen Feng <fengchengwen@huawei.com>
 Date: Tue, 17 Mar 2020 17:12:04 +0800
 Subject: [PATCH] net/hns3: fix crash when flushing RSS flow rules with FLR
@@ -6,6 +6,8 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit c064f6918c7a7efac119ea0556e6c71d8d27a3fa ]
+
 Currently, we encounter segmentation fault when performing the following
 test case:
 1. Run testpmd application, config the flow filter rules then flush them
@@ -53,7 +55,6 @@
 implementation function named hns3_flow_flush.
 
 Fixes: c37ca66f2b27 ("net/hns3: support RSS")
-Cc: stable@dpdk.org
 
 Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -62,10 +63,10 @@
  1 file changed, 4 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
-index 98affa5679..559b9d02b1 100644
+index bcd121f48b..207dd578a0 100644
 --- a/drivers/net/hns3/hns3_flow.c
 +++ b/drivers/net/hns3/hns3_flow.c
-@@ -1827,8 +1827,11 @@ hns3_flow_flush(struct rte_eth_dev *dev, struct rte_flow_error *error)
+@@ -1822,8 +1822,11 @@ hns3_flow_flush(struct rte_eth_dev *dev, struct rte_flow_error *error)
  	}
  
  	ret = hns3_clear_rss_filter(dev);

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

* [dpdk-stable] patch 'net/hns3: fix configuring illegal VLAN PVID' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (4 preceding siblings ...)
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/hns3: fix crash when flushing RSS flow rules with FLR' " luca.boccassi
@ 2020-05-19 13:02   ` luca.boccassi
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/hns3: fix status after repeated resets' " luca.boccassi
                     ` (206 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:02 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: Wei Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 3f9c9bdcb51baa5bc253195bb71582d6b5a169ee Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Tue, 17 Mar 2020 17:12:05 +0800
Subject: [PATCH] net/hns3: fix configuring illegal VLAN PVID

[ upstream commit d33fb7f939e6fb9c7882b57e9c3c0fab68c16874 ]

The VLAN pvid ranges from 0 to 4095. The hns3 PMD driver does not
support this situation that the VLAN pvid is larger than Maximum VLAN
ID(4095).

Fixes: 411d23b9eafb ("net/hns3: support VLAN")

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 9dc96fff5a..688227e0eb 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -868,6 +868,12 @@ hns3_vlan_pvid_set(struct rte_eth_dev *dev, uint16_t pvid, int on)
 	struct hns3_hw *hw = &hns->hw;
 	int ret;
 
+	if (pvid > RTE_ETHER_MAX_VLAN_ID) {
+		hns3_err(hw, "Invalid vlan_id = %u > %d", pvid,
+			 RTE_ETHER_MAX_VLAN_ID);
+		return -EINVAL;
+	}
+
 	rte_spinlock_lock(&hw->lock);
 	ret = hns3_vlan_pvid_configure(hns, pvid, on);
 	rte_spinlock_unlock(&hw->lock);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:44.875820818 +0100
+++ 0007-net-hns3-fix-configuring-illegal-VLAN-PVID.patch	2020-05-19 14:04:44.056645472 +0100
@@ -1,14 +1,15 @@
-From d33fb7f939e6fb9c7882b57e9c3c0fab68c16874 Mon Sep 17 00:00:00 2001
+From 3f9c9bdcb51baa5bc253195bb71582d6b5a169ee Mon Sep 17 00:00:00 2001
 From: "Min Hu (Connor)" <humin29@huawei.com>
 Date: Tue, 17 Mar 2020 17:12:05 +0800
 Subject: [PATCH] net/hns3: fix configuring illegal VLAN PVID
 
+[ upstream commit d33fb7f939e6fb9c7882b57e9c3c0fab68c16874 ]
+
 The VLAN pvid ranges from 0 to 4095. The hns3 PMD driver does not
 support this situation that the VLAN pvid is larger than Maximum VLAN
 ID(4095).
 
 Fixes: 411d23b9eafb ("net/hns3: support VLAN")
-Cc: stable@dpdk.org
 
 Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -17,10 +18,10 @@
  1 file changed, 6 insertions(+)
 
 diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
-index fe6b21fd12..a715354573 100644
+index 9dc96fff5a..688227e0eb 100644
 --- a/drivers/net/hns3/hns3_ethdev.c
 +++ b/drivers/net/hns3/hns3_ethdev.c
-@@ -873,6 +873,12 @@ hns3_vlan_pvid_set(struct rte_eth_dev *dev, uint16_t pvid, int on)
+@@ -868,6 +868,12 @@ hns3_vlan_pvid_set(struct rte_eth_dev *dev, uint16_t pvid, int on)
  	struct hns3_hw *hw = &hns->hw;
  	int ret;
  

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

* [dpdk-stable] patch 'net/hns3: fix status after repeated resets' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (5 preceding siblings ...)
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/hns3: fix configuring illegal VLAN PVID' " luca.boccassi
@ 2020-05-19 13:02   ` luca.boccassi
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/hinic: fix LRO' " luca.boccassi
                     ` (205 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:02 UTC (permalink / raw)
  To: Wei Hu (Xavier); +Cc: Hongbo Zheng, Chunsong Feng, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 7caa43cc2266a8110cb1a5ac876ad30f6d4990e6 Mon Sep 17 00:00:00 2001
From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
Date: Tue, 17 Mar 2020 17:12:06 +0800
Subject: [PATCH] net/hns3: fix status after repeated resets

[ upstream commit 25d257facdbc79ef0f99ee3505f3a233e1bbfeac ]

Currently, when performing the following test case:
1. Run testpmd application based on hns3 PF device.
2. Inject reset(global/IMP reset) repeatedly.
After the reset, the network port can't link up.

In the RESET_STAGE_DEV_INIT stage of the reset process, the driver will
reinitialize the hardware. If global/IMP reset occurs at this time
again, the operation of reinitialize the hardware will fail because that
firmware don't respond to the configuration commands issued by driver.
In current driver, when failed to reinitialize the hardware, rollback
operation is done, such as clearing the relevant configuration of the
command queue registers.

If firmware detects that the function's command queue register is not
configured correctly, it will not complete the reset related hardware
configuration for this function, resulting in that driver can't detect
that the hardware reset has been completed. And then the reset process
of the driver exit abnormally, the hardware can not work normally after
reset.

This patch fixes it by avoid clearing the command queue related
registers when failed to reinitialize the hardware in the
RESET_STAGE_DEV_INIT stage of the reset process.

Fixes: 2790c6464725 ("net/hns3: support device reset")

Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Chunsong Feng <fengchunsong@huawei.com>
---
 drivers/net/hns3/hns3_cmd.c       |  2 +-
 drivers/net/hns3/hns3_ethdev.c    | 18 ++++--------------
 drivers/net/hns3/hns3_ethdev_vf.c | 16 ++++------------
 3 files changed, 9 insertions(+), 27 deletions(-)

diff --git a/drivers/net/hns3/hns3_cmd.c b/drivers/net/hns3/hns3_cmd.c
index c85168b319..c7993634e3 100644
--- a/drivers/net/hns3/hns3_cmd.c
+++ b/drivers/net/hns3/hns3_cmd.c
@@ -529,7 +529,7 @@ hns3_cmd_init(struct hns3_hw *hw)
 	return 0;
 
 err_cmd_init:
-	hns3_cmd_uninit(hw);
+	rte_atomic16_set(&hw->reset.disable_cmd, 1);
 	return ret;
 }
 
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 688227e0eb..7c4c2e42c0 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -3992,13 +3992,10 @@ err_get_config:
 	rte_intr_disable(&pci_dev->intr_handle);
 	hns3_intr_unregister(&pci_dev->intr_handle, hns3_interrupt_handler,
 			     eth_dev);
-
 err_intr_callback_register:
-	hns3_cmd_uninit(hw);
-
 err_cmd_init:
+	hns3_cmd_uninit(hw);
 	hns3_cmd_destroy_queue(hw);
-
 err_cmd_init_queue:
 	hw->io_base = NULL;
 
@@ -4367,31 +4364,24 @@ hns3_reinit_dev(struct hns3_adapter *hns)
 	ret = hns3_reset_all_queues(hns);
 	if (ret) {
 		hns3_err(hw, "Failed to reset all queues: %d", ret);
-		goto err_init;
+		return ret;
 	}
 
 	ret = hns3_init_hardware(hns);
 	if (ret) {
 		hns3_err(hw, "Failed to init hardware: %d", ret);
-		goto err_init;
+		return ret;
 	}
 
 	ret = hns3_enable_hw_error_intr(hns, true);
 	if (ret) {
 		hns3_err(hw, "fail to enable hw error interrupts: %d",
 			     ret);
-		goto err_mac_init;
+		return ret;
 	}
 	hns3_info(hw, "Reset done, driver initialization finished.");
 
 	return 0;
-
-err_mac_init:
-	hns3_uninit_umv_space(hw);
-err_init:
-	hns3_cmd_uninit(hw);
-
-	return ret;
 }
 
 static bool
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 2c792b1761..2096ad6fcd 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -1176,11 +1176,9 @@ err_get_config:
 	hns3_intr_unregister(&pci_dev->intr_handle, hns3vf_interrupt_handler,
 			     eth_dev);
 err_intr_callback_register:
-	hns3_cmd_uninit(hw);
-
 err_cmd_init:
+	hns3_cmd_uninit(hw);
 	hns3_cmd_destroy_queue(hw);
-
 err_cmd_init_queue:
 	hw->io_base = NULL;
 
@@ -1633,7 +1631,7 @@ hns3vf_reinit_dev(struct hns3_adapter *hns)
 	ret = hns3_cmd_init(hw);
 	if (ret) {
 		hns3_err(hw, "Failed to init cmd: %d", ret);
-		goto err_cmd_init;
+		return ret;
 	}
 
 	if (hw->reset.level == HNS3_VF_FULL_RESET) {
@@ -1653,22 +1651,16 @@ hns3vf_reinit_dev(struct hns3_adapter *hns)
 	ret = hns3_reset_all_queues(hns);
 	if (ret) {
 		hns3_err(hw, "Failed to reset all queues: %d", ret);
-		goto err_init;
+		return ret;
 	}
 
 	ret = hns3vf_init_hardware(hns);
 	if (ret) {
 		hns3_err(hw, "Failed to init hardware: %d", ret);
-		goto err_init;
+		return ret;
 	}
 
 	return 0;
-
-err_cmd_init:
-	hns3vf_set_bus_master(pci_dev, false);
-err_init:
-	hns3_cmd_uninit(hw);
-	return ret;
 }
 
 static const struct eth_dev_ops hns3vf_eth_dev_ops = {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:44.919193988 +0100
+++ 0008-net-hns3-fix-status-after-repeated-resets.patch	2020-05-19 14:04:44.060645545 +0100
@@ -1,8 +1,10 @@
-From 25d257facdbc79ef0f99ee3505f3a233e1bbfeac Mon Sep 17 00:00:00 2001
+From 7caa43cc2266a8110cb1a5ac876ad30f6d4990e6 Mon Sep 17 00:00:00 2001
 From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
 Date: Tue, 17 Mar 2020 17:12:06 +0800
 Subject: [PATCH] net/hns3: fix status after repeated resets
 
+[ upstream commit 25d257facdbc79ef0f99ee3505f3a233e1bbfeac ]
+
 Currently, when performing the following test case:
 1. Run testpmd application based on hns3 PF device.
 2. Inject reset(global/IMP reset) repeatedly.
@@ -28,7 +30,6 @@
 RESET_STAGE_DEV_INIT stage of the reset process.
 
 Fixes: 2790c6464725 ("net/hns3: support device reset")
-Cc: stable@dpdk.org
 
 Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -53,10 +54,10 @@
  }
  
 diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
-index a715354573..94e8b8ab98 100644
+index 688227e0eb..7c4c2e42c0 100644
 --- a/drivers/net/hns3/hns3_ethdev.c
 +++ b/drivers/net/hns3/hns3_ethdev.c
-@@ -4126,13 +4126,10 @@ err_get_config:
+@@ -3992,13 +3992,10 @@ err_get_config:
  	rte_intr_disable(&pci_dev->intr_handle);
  	hns3_intr_unregister(&pci_dev->intr_handle, hns3_interrupt_handler,
  			     eth_dev);
@@ -71,7 +72,7 @@
  err_cmd_init_queue:
  	hw->io_base = NULL;
  
-@@ -4610,31 +4607,24 @@ hns3_reinit_dev(struct hns3_adapter *hns)
+@@ -4367,31 +4364,24 @@ hns3_reinit_dev(struct hns3_adapter *hns)
  	ret = hns3_reset_all_queues(hns);
  	if (ret) {
  		hns3_err(hw, "Failed to reset all queues: %d", ret);
@@ -107,10 +108,10 @@
  
  static bool
 diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
-index febce865bd..e7e2cba824 100644
+index 2c792b1761..2096ad6fcd 100644
 --- a/drivers/net/hns3/hns3_ethdev_vf.c
 +++ b/drivers/net/hns3/hns3_ethdev_vf.c
-@@ -1486,11 +1486,9 @@ err_get_config:
+@@ -1176,11 +1176,9 @@ err_get_config:
  	hns3_intr_unregister(&pci_dev->intr_handle, hns3vf_interrupt_handler,
  			     eth_dev);
  err_intr_callback_register:
@@ -123,7 +124,7 @@
  err_cmd_init_queue:
  	hw->io_base = NULL;
  
-@@ -2104,7 +2102,7 @@ hns3vf_reinit_dev(struct hns3_adapter *hns)
+@@ -1633,7 +1631,7 @@ hns3vf_reinit_dev(struct hns3_adapter *hns)
  	ret = hns3_cmd_init(hw);
  	if (ret) {
  		hns3_err(hw, "Failed to init cmd: %d", ret);
@@ -132,7 +133,7 @@
  	}
  
  	if (hw->reset.level == HNS3_VF_FULL_RESET) {
-@@ -2124,22 +2122,16 @@ hns3vf_reinit_dev(struct hns3_adapter *hns)
+@@ -1653,22 +1651,16 @@ hns3vf_reinit_dev(struct hns3_adapter *hns)
  	ret = hns3_reset_all_queues(hns);
  	if (ret) {
  		hns3_err(hw, "Failed to reset all queues: %d", ret);

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

* [dpdk-stable] patch 'net/hinic: fix LRO' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (6 preceding siblings ...)
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/hns3: fix status after repeated resets' " luca.boccassi
@ 2020-05-19 13:02   ` luca.boccassi
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/hinic/base: fix port start during FW hot update' " luca.boccassi
                     ` (204 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:02 UTC (permalink / raw)
  To: Xiaoyun Wang; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 4710da6ef5e7c38428f6d80bc81537136fd935db Mon Sep 17 00:00:00 2001
From: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
Date: Tue, 17 Mar 2020 23:01:11 +0800
Subject: [PATCH] net/hinic: fix LRO

[ upstream commit 9d02f40d650305935f8c407795fec02d8e9f01ec ]

PMD driver should change the max_lro_pkt_size parameter into lro_wqe_num
that used for hardware, and when packets are coalesced by hardware,
PKT_RX_LRO flag should be set in the RX mbuf.

Fixes: 9d4878ef0897 ("net/hinic: support LRO offload")

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
---
 drivers/net/hinic/hinic_pmd_ethdev.c | 17 ++---------
 drivers/net/hinic/hinic_pmd_rx.c     | 42 +++++++++++++++++++++++++++-
 2 files changed, 43 insertions(+), 16 deletions(-)

diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c b/drivers/net/hinic/hinic_pmd_ethdev.c
index 8493f6e42c..b81ecd0b8f 100644
--- a/drivers/net/hinic/hinic_pmd_ethdev.c
+++ b/drivers/net/hinic/hinic_pmd_ethdev.c
@@ -736,6 +736,7 @@ hinic_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
 	info->max_mac_addrs  = HINIC_MAX_UC_MAC_ADDRS;
 	info->min_mtu = HINIC_MIN_MTU_SIZE;
 	info->max_mtu = HINIC_MAX_MTU_SIZE;
+	info->max_lro_pkt_size = HINIC_MAX_LRO_SIZE;
 
 	hinic_get_speed_capa(dev, &info->speed_capa);
 	info->rx_queue_offload_capa = 0;
@@ -811,12 +812,10 @@ static int hinic_config_rx_mode(struct hinic_nic_dev *nic_dev, u32 rx_mode_ctrl)
 	return 0;
 }
 
-
 static int hinic_rxtx_configure(struct rte_eth_dev *dev)
 {
-	int err;
 	struct hinic_nic_dev *nic_dev = HINIC_ETH_DEV_TO_PRIVATE_NIC_DEV(dev);
-	bool lro_en;
+	int err;
 
 	/* rx configure, if rss enable, need to init default configuration */
 	err = hinic_rx_configure(dev);
@@ -833,18 +832,6 @@ static int hinic_rxtx_configure(struct rte_eth_dev *dev)
 		goto set_rx_mode_fail;
 	}
 
-	/* config lro */
-	lro_en = dev->data->dev_conf.rxmode.offloads & DEV_RX_OFFLOAD_TCP_LRO ?
-			true : false;
-
-	err = hinic_set_rx_lro(nic_dev->hwdev, lro_en, lro_en,
-				HINIC_LRO_WQE_NUM_DEFAULT);
-	if (err) {
-		PMD_DRV_LOG(ERR, "%s lro failed, err: %d",
-			lro_en ? "Enable" : "Disable", err);
-		goto set_rx_mode_fail;
-	}
-
 	return HINIC_OK;
 
 set_rx_mode_fail:
diff --git a/drivers/net/hinic/hinic_pmd_rx.c b/drivers/net/hinic/hinic_pmd_rx.c
index f1b873afb7..224337ddd9 100644
--- a/drivers/net/hinic/hinic_pmd_rx.c
+++ b/drivers/net/hinic/hinic_pmd_rx.c
@@ -656,6 +656,10 @@ int hinic_rx_configure(struct rte_eth_dev *dev)
 	struct rte_eth_rss_conf rss_conf =
 		dev->data->dev_conf.rx_adv_conf.rss_conf;
 	int err;
+	bool lro_en;
+	int max_lro_size;
+	int lro_wqe_num;
+	int buf_size;
 
 	if (nic_dev->flags & ETH_MQ_RX_RSS_FLAG) {
 		if (rss_conf.rss_hf == 0) {
@@ -681,15 +685,42 @@ int hinic_rx_configure(struct rte_eth_dev *dev)
 	if (err)
 		goto rx_csum_ofl_err;
 
+	/* config lro */
+	lro_en = dev->data->dev_conf.rxmode.offloads & DEV_RX_OFFLOAD_TCP_LRO ?
+			true : false;
+	max_lro_size = dev->data->dev_conf.rxmode.max_lro_pkt_size;
+	buf_size = nic_dev->hwdev->nic_io->rq_buf_size;
+	lro_wqe_num = max_lro_size / buf_size ? (max_lro_size / buf_size) : 1;
+
+	err = hinic_set_rx_lro(nic_dev->hwdev, lro_en, lro_en, lro_wqe_num);
+	if (err) {
+		PMD_DRV_LOG(ERR, "%s %s lro failed, err: %d, max_lro_size: %d",
+				dev->data->name, lro_en ? "Enable" : "Disable",
+				err, max_lro_size);
+		goto set_rx_lro_err;
+	}
+
 	return 0;
 
+set_rx_lro_err:
 rx_csum_ofl_err:
 rss_config_err:
+
 	hinic_destroy_num_qps(nic_dev);
 
 	return HINIC_ERROR;
 }
 
+static void hinic_rx_remove_lro(struct hinic_nic_dev *nic_dev)
+{
+	int err;
+
+	err = hinic_set_rx_lro(nic_dev->hwdev, false, false, 0);
+	if (err)
+		PMD_DRV_LOG(ERR, "%s disable LRO failed",
+			    nic_dev->proc_dev_name);
+}
+
 void hinic_rx_remove_configure(struct rte_eth_dev *dev)
 {
 	struct hinic_nic_dev *nic_dev = HINIC_ETH_DEV_TO_PRIVATE_NIC_DEV(dev);
@@ -698,6 +729,8 @@ void hinic_rx_remove_configure(struct rte_eth_dev *dev)
 		hinic_rss_deinit(nic_dev);
 		hinic_destroy_num_qps(nic_dev);
 	}
+
+	hinic_rx_remove_lro(nic_dev);
 }
 
 void hinic_free_all_rx_mbufs(struct hinic_rxq *rxq)
@@ -956,7 +989,7 @@ u16 hinic_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, u16 nb_pkts)
 	volatile struct hinic_rq_cqe *rx_cqe;
 	u16 rx_buf_len, pkts = 0;
 	u16 sw_ci, ci_mask, wqebb_cnt = 0;
-	u32 pkt_len, status, vlan_len;
+	u32 pkt_len, status, vlan_len, lro_num;
 	u64 rx_bytes = 0;
 	struct hinic_rq_cqe cqe;
 	u32 offload_type, rss_hash;
@@ -1024,6 +1057,13 @@ u16 hinic_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, u16 nb_pkts)
 		rxm->ol_flags |= hinic_rx_rss_hash(offload_type, rss_hash,
 						   &rxm->hash.rss);
 
+		/* lro offload */
+		lro_num = HINIC_GET_RX_NUM_LRO(cqe.status);
+		if (unlikely(lro_num != 0)) {
+			rxm->ol_flags |= PKT_RX_LRO;
+			rxm->tso_segsz = pkt_len / lro_num;
+		}
+
 		/* 6. clear done bit */
 		rx_cqe->status = 0;
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:44.960218254 +0100
+++ 0009-net-hinic-fix-LRO.patch	2020-05-19 14:04:44.064645617 +0100
@@ -1,14 +1,15 @@
-From 9d02f40d650305935f8c407795fec02d8e9f01ec Mon Sep 17 00:00:00 2001
+From 4710da6ef5e7c38428f6d80bc81537136fd935db Mon Sep 17 00:00:00 2001
 From: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
 Date: Tue, 17 Mar 2020 23:01:11 +0800
 Subject: [PATCH] net/hinic: fix LRO
 
+[ upstream commit 9d02f40d650305935f8c407795fec02d8e9f01ec ]
+
 PMD driver should change the max_lro_pkt_size parameter into lro_wqe_num
 that used for hardware, and when packets are coalesced by hardware,
 PKT_RX_LRO flag should be set in the RX mbuf.
 
 Fixes: 9d4878ef0897 ("net/hinic: support LRO offload")
-Cc: stable@dpdk.org
 
 Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
 ---
@@ -62,7 +63,7 @@
  
  set_rx_mode_fail:
 diff --git a/drivers/net/hinic/hinic_pmd_rx.c b/drivers/net/hinic/hinic_pmd_rx.c
-index 3894ace4b8..4ca74f0fb2 100644
+index f1b873afb7..224337ddd9 100644
 --- a/drivers/net/hinic/hinic_pmd_rx.c
 +++ b/drivers/net/hinic/hinic_pmd_rx.c
 @@ -656,6 +656,10 @@ int hinic_rx_configure(struct rte_eth_dev *dev)

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

* [dpdk-stable] patch 'net/hinic/base: fix port start during FW hot update' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (7 preceding siblings ...)
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/hinic: fix LRO' " luca.boccassi
@ 2020-05-19 13:02   ` luca.boccassi
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/ipn3ke: use control thread to check link status' " luca.boccassi
                     ` (203 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:02 UTC (permalink / raw)
  To: Xiaoyun Wang; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From d57282791c7b346e138cb451935834b7b4d84d50 Mon Sep 17 00:00:00 2001
From: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
Date: Tue, 17 Mar 2020 23:01:12 +0800
Subject: [PATCH] net/hinic/base: fix port start during FW hot update

[ upstream commit 0194313b2df66d9308c79f501d1018a99b32098b ]

When repeatedly hotupdate firmware and start/stop port at the same time,
port start may be failed when cmdq reinit failed at the FW active phase,
so if cmdq fails, then reinit the cmdq when port start.

Fixes: d9ce1917941c ("net/hinic/base: add hardware operation")

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
---
 drivers/net/hinic/base/hinic_pmd_cmdq.c  | 4 ++++
 drivers/net/hinic/base/hinic_pmd_cmdq.h  | 1 +
 drivers/net/hinic/base/hinic_pmd_nicio.c | 9 +++++++++
 3 files changed, 14 insertions(+)

diff --git a/drivers/net/hinic/base/hinic_pmd_cmdq.c b/drivers/net/hinic/base/hinic_pmd_cmdq.c
index d73e2bf592..685498ec2f 100644
--- a/drivers/net/hinic/base/hinic_pmd_cmdq.c
+++ b/drivers/net/hinic/base/hinic_pmd_cmdq.c
@@ -7,6 +7,7 @@
 #include "hinic_pmd_hwif.h"
 #include "hinic_pmd_wq.h"
 #include "hinic_pmd_mgmt.h"
+#include "hinic_pmd_mbox.h"
 #include "hinic_pmd_cmdq.h"
 
 #define CMDQ_CMD_TIMEOUT				5000 /* millisecond */
@@ -439,11 +440,14 @@ static int hinic_set_cmdq_ctxts(struct hinic_hwdev *hwdev)
 					     cmdq_ctxt, in_size, NULL,
 					     NULL, 0);
 		if (err) {
+			if (err == HINIC_MBOX_PF_BUSY_ACTIVE_FW)
+				cmdqs->status |= HINIC_CMDQ_SET_FAIL;
 			PMD_DRV_LOG(ERR, "Set cmdq ctxt failed");
 			return -EFAULT;
 		}
 	}
 
+	cmdqs->status &= ~HINIC_CMDQ_SET_FAIL;
 	cmdqs->status |= HINIC_CMDQ_ENABLE;
 
 	return 0;
diff --git a/drivers/net/hinic/base/hinic_pmd_cmdq.h b/drivers/net/hinic/base/hinic_pmd_cmdq.h
index da939e16fa..4ce0a4c5b8 100644
--- a/drivers/net/hinic/base/hinic_pmd_cmdq.h
+++ b/drivers/net/hinic/base/hinic_pmd_cmdq.h
@@ -170,6 +170,7 @@ struct hinic_cmdq_ctxt {
 
 enum hinic_cmdq_status {
 	HINIC_CMDQ_ENABLE = BIT(0),
+	HINIC_CMDQ_SET_FAIL = BIT(1)
 };
 
 enum hinic_cmdq_cmd_type {
diff --git a/drivers/net/hinic/base/hinic_pmd_nicio.c b/drivers/net/hinic/base/hinic_pmd_nicio.c
index 59e39ed984..31a13fbdcf 100644
--- a/drivers/net/hinic/base/hinic_pmd_nicio.c
+++ b/drivers/net/hinic/base/hinic_pmd_nicio.c
@@ -533,6 +533,15 @@ int hinic_init_qp_ctxts(struct hinic_hwdev *hwdev)
 		return err;
 	}
 
+	if (hwdev->cmdqs->status & HINIC_CMDQ_SET_FAIL) {
+		err = hinic_reinit_cmdq_ctxts(hwdev);
+		if (err) {
+			PMD_DRV_LOG(ERR, "Reinit cmdq context failed, rc: %d\n",
+				err);
+			return err;
+		}
+	}
+
 	err = init_qp_ctxts(nic_io);
 	if (err) {
 		PMD_DRV_LOG(ERR, "Init QP ctxts failed, rc: %d", err);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:44.999169703 +0100
+++ 0010-net-hinic-base-fix-port-start-during-FW-hot-update.patch	2020-05-19 14:04:44.068645689 +0100
@@ -1,14 +1,15 @@
-From 0194313b2df66d9308c79f501d1018a99b32098b Mon Sep 17 00:00:00 2001
+From d57282791c7b346e138cb451935834b7b4d84d50 Mon Sep 17 00:00:00 2001
 From: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
 Date: Tue, 17 Mar 2020 23:01:12 +0800
 Subject: [PATCH] net/hinic/base: fix port start during FW hot update
 
+[ upstream commit 0194313b2df66d9308c79f501d1018a99b32098b ]
+
 When repeatedly hotupdate firmware and start/stop port at the same time,
 port start may be failed when cmdq reinit failed at the FW active phase,
 so if cmdq fails, then reinit the cmdq when port start.
 
 Fixes: d9ce1917941c ("net/hinic/base: add hardware operation")
-Cc: stable@dpdk.org
 
 Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
 ---

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

* [dpdk-stable] patch 'net/ipn3ke: use control thread to check link status' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (8 preceding siblings ...)
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/hinic/base: fix port start during FW hot update' " luca.boccassi
@ 2020-05-19 13:02   ` luca.boccassi
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/hns3: fix configuring RSS hash when rules are flushed' " luca.boccassi
                     ` (202 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:02 UTC (permalink / raw)
  To: Andy Pei; +Cc: Rosen Xu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 7953227c1937e42300cc308ce8b3ff8f547ee8e0 Mon Sep 17 00:00:00 2001
From: Andy Pei <andy.pei@intel.com>
Date: Mon, 16 Mar 2020 14:07:17 +0800
Subject: [PATCH] net/ipn3ke: use control thread to check link status

[ upstream commit e5791726338ea4b83e329fd59e9d1af7066b7c0b ]

ipn3ke driver creates a thread to check link status.

Before this patch, pthread_create() is used to create
thread, leaving the new thread unrestrained wrt cpu
affinity.

After this patch, rte_ctrl_thread_create() is used to
create thread. The affinity of the new thread is based
on the CPU affinity retrieved at the time rte_eal_init()
was called, the dataplane and service lcores are then
excluded.

Fixes: 70d6b7f550f4 ("net/ipn3ke: add representor")

Signed-off-by: Andy Pei <andy.pei@intel.com>
Reviewed-by: Rosen Xu <rosen.xu@intel.com>
---
 drivers/net/ipn3ke/ipn3ke_representor.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ipn3ke/ipn3ke_representor.c b/drivers/net/ipn3ke/ipn3ke_representor.c
index 80122e3fc5..b673c49149 100644
--- a/drivers/net/ipn3ke/ipn3ke_representor.c
+++ b/drivers/net/ipn3ke/ipn3ke_representor.c
@@ -2598,7 +2598,8 @@ ipn3ke_rpst_scan_check(void)
 	int ret;
 
 	if (ipn3ke_rpst_scan_num == 1) {
-		ret = pthread_create(&ipn3ke_rpst_scan_thread,
+		ret = rte_ctrl_thread_create(&ipn3ke_rpst_scan_thread,
+			"ipn3ke scanner",
 			NULL,
 			ipn3ke_rpst_scan_handle_request, NULL);
 		if (ret) {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:45.033794767 +0100
+++ 0011-net-ipn3ke-use-control-thread-to-check-link-status.patch	2020-05-19 14:04:44.072645761 +0100
@@ -1,8 +1,10 @@
-From e5791726338ea4b83e329fd59e9d1af7066b7c0b Mon Sep 17 00:00:00 2001
+From 7953227c1937e42300cc308ce8b3ff8f547ee8e0 Mon Sep 17 00:00:00 2001
 From: Andy Pei <andy.pei@intel.com>
 Date: Mon, 16 Mar 2020 14:07:17 +0800
 Subject: [PATCH] net/ipn3ke: use control thread to check link status
 
+[ upstream commit e5791726338ea4b83e329fd59e9d1af7066b7c0b ]
+
 ipn3ke driver creates a thread to check link status.
 
 Before this patch, pthread_create() is used to create
@@ -16,7 +18,6 @@
 excluded.
 
 Fixes: 70d6b7f550f4 ("net/ipn3ke: add representor")
-Cc: stable@dpdk.org
 
 Signed-off-by: Andy Pei <andy.pei@intel.com>
 Reviewed-by: Rosen Xu <rosen.xu@intel.com>

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

* [dpdk-stable] patch 'net/hns3: fix configuring RSS hash when rules are flushed' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (9 preceding siblings ...)
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/ipn3ke: use control thread to check link status' " luca.boccassi
@ 2020-05-19 13:02   ` luca.boccassi
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/hns3: fix mailbox opcode data type' " luca.boccassi
                     ` (201 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:02 UTC (permalink / raw)
  To: Lijun Ou; +Cc: Wei Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 70b22c9ed2b55a3a523ec68734cd5435d1395a9a Mon Sep 17 00:00:00 2001
From: Lijun Ou <oulijun@huawei.com>
Date: Thu, 26 Mar 2020 15:14:31 +0800
Subject: [PATCH] net/hns3: fix configuring RSS hash when rules are flushed

[ upstream commit 5e782bc2570c5746b8190d1b5c717de8ee77d0bd ]

Currently, when performing test case as follow:
1. Run testpmd application based on hns3 network engine with multiple
   receive queues(--rxq=N --txq=N, N>1).
2. Create the special RSS rules by "create flow ..." command in the
   command prompt of the testpmd application.
3. Flush the RSS rules created in step 2 by "flow flush ..." command.
4. Enable RSS by "port config all rss all" command.
In step 4, the command exeuctes successfully. This phenomenon is
inconsistent with the expectation. The API function named
rte_eth_dev_rss_hash_update called in the command should return error
and the command should fail.

This patch fixes it by adding a flag for disabling RSS in the driver.
When RSS rules is flushed, we set the the flag with true, and the
'.rss_hash_update' ops implementation function named
hns3_dev_rss_hash_update return -EINVAL.

Fixes: c37ca66f2b27 ("net/hns3: support RSS")

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c    | 1 +
 drivers/net/hns3/hns3_ethdev.h    | 1 +
 drivers/net/hns3/hns3_ethdev_vf.c | 1 +
 drivers/net/hns3/hns3_flow.c      | 1 +
 drivers/net/hns3/hns3_rss.c       | 3 +++
 5 files changed, 7 insertions(+)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 7c4c2e42c0..42ef33f4b9 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2541,6 +2541,7 @@ hns3_get_board_configuration(struct hns3_hw *hw)
 
 	hw->mac.media_type = cfg.media_type;
 	hw->rss_size_max = cfg.rss_size_max;
+	hw->rss_dis_flag = false;
 	hw->rx_buf_len = cfg.rx_buf_len;
 	memcpy(hw->mac.mac_addr, cfg.mac_addr, RTE_ETHER_ADDR_LEN);
 	hw->mac.phy_addr = cfg.phy_addr;
diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
index 975680ea21..03bbd24dac 100644
--- a/drivers/net/hns3/hns3_ethdev.h
+++ b/drivers/net/hns3/hns3_ethdev.h
@@ -358,6 +358,7 @@ struct hns3_hw {
 
 	/* The configuration info of RSS */
 	struct hns3_rss_conf rss_info;
+	bool rss_dis_flag; /* disable rss flag. true: disable, false: enable */
 
 	uint8_t num_tc;             /* Total number of enabled TCs */
 	uint8_t hw_tc_map;
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 2096ad6fcd..879851630d 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -784,6 +784,7 @@ hns3vf_get_configuration(struct hns3_hw *hw)
 	int ret;
 
 	hw->mac.media_type = HNS3_MEDIA_TYPE_NONE;
+	hw->rss_dis_flag = false;
 
 	/* Get queue configuration from PF */
 	ret = hns3vf_get_queue_info(hw);
diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 207dd578a0..c7027a779a 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1328,6 +1328,7 @@ hns3_disable_rss(struct hns3_hw *hw)
 
 	/* Disable RSS */
 	hw->rss_info.conf.types = 0;
+	hw->rss_dis_flag = true;
 
 	return 0;
 }
diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c
index b8c20e6d9d..9b6b72908f 100644
--- a/drivers/net/hns3/hns3_rss.c
+++ b/drivers/net/hns3/hns3_rss.c
@@ -257,6 +257,9 @@ hns3_dev_rss_hash_update(struct rte_eth_dev *dev,
 	uint8_t *key = rss_conf->rss_key;
 	int ret;
 
+	if (hw->rss_dis_flag)
+		return -EINVAL;
+
 	rte_spinlock_lock(&hw->lock);
 	ret = hns3_set_rss_tuple_by_rss_hf(hw, tuple, rss_hf);
 	if (ret)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:45.078194896 +0100
+++ 0012-net-hns3-fix-configuring-RSS-hash-when-rules-are-flu.patch	2020-05-19 14:04:44.076645835 +0100
@@ -1,8 +1,10 @@
-From 5e782bc2570c5746b8190d1b5c717de8ee77d0bd Mon Sep 17 00:00:00 2001
+From 70b22c9ed2b55a3a523ec68734cd5435d1395a9a Mon Sep 17 00:00:00 2001
 From: Lijun Ou <oulijun@huawei.com>
 Date: Thu, 26 Mar 2020 15:14:31 +0800
 Subject: [PATCH] net/hns3: fix configuring RSS hash when rules are flushed
 
+[ upstream commit 5e782bc2570c5746b8190d1b5c717de8ee77d0bd ]
+
 Currently, when performing test case as follow:
 1. Run testpmd application based on hns3 network engine with multiple
    receive queues(--rxq=N --txq=N, N>1).
@@ -21,7 +23,6 @@
 hns3_dev_rss_hash_update return -EINVAL.
 
 Fixes: c37ca66f2b27 ("net/hns3: support RSS")
-Cc: stable@dpdk.org
 
 Signed-off-by: Lijun Ou <oulijun@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -34,10 +35,10 @@
  5 files changed, 7 insertions(+)
 
 diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
-index 1d19de0e67..86676390fe 100644
+index 7c4c2e42c0..42ef33f4b9 100644
 --- a/drivers/net/hns3/hns3_ethdev.c
 +++ b/drivers/net/hns3/hns3_ethdev.c
-@@ -2663,6 +2663,7 @@ hns3_get_board_configuration(struct hns3_hw *hw)
+@@ -2541,6 +2541,7 @@ hns3_get_board_configuration(struct hns3_hw *hw)
  
  	hw->mac.media_type = cfg.media_type;
  	hw->rss_size_max = cfg.rss_size_max;
@@ -46,10 +47,10 @@
  	memcpy(hw->mac.mac_addr, cfg.mac_addr, RTE_ETHER_ADDR_LEN);
  	hw->mac.phy_addr = cfg.phy_addr;
 diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
-index 28484188a6..0423e64ea0 100644
+index 975680ea21..03bbd24dac 100644
 --- a/drivers/net/hns3/hns3_ethdev.h
 +++ b/drivers/net/hns3/hns3_ethdev.h
-@@ -368,6 +368,7 @@ struct hns3_hw {
+@@ -358,6 +358,7 @@ struct hns3_hw {
  
  	/* The configuration info of RSS */
  	struct hns3_rss_conf rss_info;
@@ -58,10 +59,10 @@
  	uint8_t num_tc;             /* Total number of enabled TCs */
  	uint8_t hw_tc_map;
 diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
-index 3c72976f3d..08ae58a794 100644
+index 2096ad6fcd..879851630d 100644
 --- a/drivers/net/hns3/hns3_ethdev_vf.c
 +++ b/drivers/net/hns3/hns3_ethdev_vf.c
-@@ -1022,6 +1022,7 @@ hns3vf_get_configuration(struct hns3_hw *hw)
+@@ -784,6 +784,7 @@ hns3vf_get_configuration(struct hns3_hw *hw)
  	int ret;
  
  	hw->mac.media_type = HNS3_MEDIA_TYPE_NONE;
@@ -70,10 +71,10 @@
  	/* Get queue configuration from PF */
  	ret = hns3vf_get_queue_info(hw);
 diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
-index 53708d2054..aef301a8a7 100644
+index 207dd578a0..c7027a779a 100644
 --- a/drivers/net/hns3/hns3_flow.c
 +++ b/drivers/net/hns3/hns3_flow.c
-@@ -1333,6 +1333,7 @@ hns3_disable_rss(struct hns3_hw *hw)
+@@ -1328,6 +1328,7 @@ hns3_disable_rss(struct hns3_hw *hw)
  
  	/* Disable RSS */
  	hw->rss_info.conf.types = 0;
@@ -82,10 +83,10 @@
  	return 0;
  }
 diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c
-index 737d5f1093..95a637ddc2 100644
+index b8c20e6d9d..9b6b72908f 100644
 --- a/drivers/net/hns3/hns3_rss.c
 +++ b/drivers/net/hns3/hns3_rss.c
-@@ -261,6 +261,9 @@ hns3_dev_rss_hash_update(struct rte_eth_dev *dev,
+@@ -257,6 +257,9 @@ hns3_dev_rss_hash_update(struct rte_eth_dev *dev,
  	uint8_t *key = rss_conf->rss_key;
  	int ret;
  

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

* [dpdk-stable] patch 'net/hns3: fix mailbox opcode data type' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (10 preceding siblings ...)
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/hns3: fix configuring RSS hash when rules are flushed' " luca.boccassi
@ 2020-05-19 13:02   ` luca.boccassi
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/hns3: fix return value of setting VLAN offload' " luca.boccassi
                     ` (200 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:02 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: Wei Hu, Chengwen Feng, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 2717e6ab2543ad9c53b9eb2e8f5020510eea2d27 Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Thu, 26 Mar 2020 15:14:32 +0800
Subject: [PATCH] net/hns3: fix mailbox opcode data type

[ upstream commit 7c9f68872d5ca23ba7951f424c646c30211dbb52 ]

The mailbox opcode is defined as one byte in datasheet which is not
compatible with that in the current hns3 PMD driver.

This patch fixes the data type of the local variable for mailbox opcode
in driver, changing from uint16_t to uint8_t.

Fixes: 463e748964f5 ("net/hns3: support mailbox")

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
 drivers/net/hns3/hns3_mbx.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/hns3/hns3_mbx.c b/drivers/net/hns3/hns3_mbx.c
index 7087b91c4d..7b5ef9476d 100644
--- a/drivers/net/hns3/hns3_mbx.c
+++ b/drivers/net/hns3/hns3_mbx.c
@@ -219,6 +219,7 @@ hns3_mbx_handler(struct hns3_hw *hw)
 	struct hns3_mac *mac = &hw->mac;
 	enum hns3_reset_level reset_level;
 	uint16_t *msg_q;
+	uint8_t opcode;
 	uint32_t tail;
 
 	tail = hw->arq.tail;
@@ -227,7 +228,8 @@ hns3_mbx_handler(struct hns3_hw *hw)
 	while (tail != hw->arq.head) {
 		msg_q = hw->arq.msg_q[hw->arq.head];
 
-		switch (msg_q[0]) {
+		opcode = msg_q[0] & 0xff;
+		switch (opcode) {
 		case HNS3_MBX_LINK_STAT_CHANGE:
 			memcpy(&mac->link_speed, &msg_q[2],
 				   sizeof(mac->link_speed));
@@ -249,7 +251,7 @@ hns3_mbx_handler(struct hns3_hw *hw)
 			break;
 		default:
 			hns3_err(hw, "Fetched unsupported(%d) message from arq",
-				 msg_q[0]);
+				 opcode);
 			break;
 		}
 
@@ -299,6 +301,7 @@ hns3_dev_handle_mbx_msg(struct hns3_hw *hw)
 	struct hns3_cmd_desc *desc;
 	uint32_t msg_data;
 	uint16_t *msg_q;
+	uint8_t opcode;
 	uint16_t flag;
 	uint8_t *temp;
 	int i;
@@ -309,12 +312,13 @@ hns3_dev_handle_mbx_msg(struct hns3_hw *hw)
 
 		desc = &crq->desc[crq->next_to_use];
 		req = (struct hns3_mbx_pf_to_vf_cmd *)desc->data;
+		opcode = req->msg[0] & 0xff;
 
 		flag = rte_le_to_cpu_16(crq->desc[crq->next_to_use].flag);
 		if (unlikely(!hns3_get_bit(flag, HNS3_CMDQ_RX_OUTVLD_B))) {
 			hns3_warn(hw,
 				  "dropped invalid mailbox message, code = %d",
-				  req->msg[0]);
+				  opcode);
 
 			/* dropping/not processing this invalid message */
 			crq->desc[crq->next_to_use].flag = 0;
@@ -322,7 +326,7 @@ hns3_dev_handle_mbx_msg(struct hns3_hw *hw)
 			continue;
 		}
 
-		switch (req->msg[0]) {
+		switch (opcode) {
 		case HNS3_MBX_PF_VF_RESP:
 			resp->resp_status = hns3_resp_to_errno(req->msg[3]);
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:45.121027475 +0100
+++ 0013-net-hns3-fix-mailbox-opcode-data-type.patch	2020-05-19 14:04:44.076645835 +0100
@@ -1,8 +1,10 @@
-From 7c9f68872d5ca23ba7951f424c646c30211dbb52 Mon Sep 17 00:00:00 2001
+From 2717e6ab2543ad9c53b9eb2e8f5020510eea2d27 Mon Sep 17 00:00:00 2001
 From: "Min Hu (Connor)" <humin29@huawei.com>
 Date: Thu, 26 Mar 2020 15:14:32 +0800
 Subject: [PATCH] net/hns3: fix mailbox opcode data type
 
+[ upstream commit 7c9f68872d5ca23ba7951f424c646c30211dbb52 ]
+
 The mailbox opcode is defined as one byte in datasheet which is not
 compatible with that in the current hns3 PMD driver.
 
@@ -10,7 +12,6 @@
 in driver, changing from uint16_t to uint8_t.
 
 Fixes: 463e748964f5 ("net/hns3: support mailbox")
-Cc: stable@dpdk.org
 
 Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -20,7 +21,7 @@
  1 file changed, 8 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/net/hns3/hns3_mbx.c b/drivers/net/hns3/hns3_mbx.c
-index b03a3d6a17..34c8c688fc 100644
+index 7087b91c4d..7b5ef9476d 100644
 --- a/drivers/net/hns3/hns3_mbx.c
 +++ b/drivers/net/hns3/hns3_mbx.c
 @@ -219,6 +219,7 @@ hns3_mbx_handler(struct hns3_hw *hw)
@@ -50,7 +51,7 @@
  			break;
  		}
  
-@@ -348,6 +350,7 @@ hns3_dev_handle_mbx_msg(struct hns3_hw *hw)
+@@ -299,6 +301,7 @@ hns3_dev_handle_mbx_msg(struct hns3_hw *hw)
  	struct hns3_cmd_desc *desc;
  	uint32_t msg_data;
  	uint16_t *msg_q;
@@ -58,7 +59,7 @@
  	uint16_t flag;
  	uint8_t *temp;
  	int i;
-@@ -358,12 +361,13 @@ hns3_dev_handle_mbx_msg(struct hns3_hw *hw)
+@@ -309,12 +312,13 @@ hns3_dev_handle_mbx_msg(struct hns3_hw *hw)
  
  		desc = &crq->desc[crq->next_to_use];
  		req = (struct hns3_mbx_pf_to_vf_cmd *)desc->data;
@@ -73,7 +74,7 @@
  
  			/* dropping/not processing this invalid message */
  			crq->desc[crq->next_to_use].flag = 0;
-@@ -371,7 +375,7 @@ hns3_dev_handle_mbx_msg(struct hns3_hw *hw)
+@@ -322,7 +326,7 @@ hns3_dev_handle_mbx_msg(struct hns3_hw *hw)
  			continue;
  		}
  

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

* [dpdk-stable] patch 'net/hns3: fix return value of setting VLAN offload' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (11 preceding siblings ...)
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/hns3: fix mailbox opcode data type' " luca.boccassi
@ 2020-05-19 13:02   ` luca.boccassi
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/ice/base: fix uninitialized stack variables' " luca.boccassi
                     ` (199 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:02 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Wei Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 8081044a6f8bfc1dc46a2d9866b7550f446adbf5 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Thu, 26 Mar 2020 15:14:33 +0800
Subject: [PATCH] net/hns3: fix return value of setting VLAN offload

[ upstream commit e7f4213c304bd8d71fc3ca7702c85c434eff0805 ]

Currently, the '.vlan_offload_set' ops implementation function named
hns3vf_vlan_offload_set always return 0 in hns3 VF PMD driver.

This patch fixes it with the following modification in the function
named hns3vf_vlan_offload_set.
1. Avoid setting hardware configuration and return -EIO during resetting.
2. Add the return value detection process for calling internal static
   function named hns3vf_en_hw_strip_rxvtag.

Fixes: a5475d61fa34 ("net/hns3: support VF")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 drivers/net/hns3/hns3_ethdev_vf.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 879851630d..6f8e909f62 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -896,6 +896,13 @@ hns3vf_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 	struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	struct rte_eth_conf *dev_conf = &dev->data->dev_conf;
 	unsigned int tmp_mask;
+	int ret = 0;
+
+	if (rte_atomic16_read(&hw->reset.resetting)) {
+		hns3_err(hw, "vf set vlan offload failed during resetting, "
+			     "mask = 0x%x", mask);
+		return -EIO;
+	}
 
 	tmp_mask = (unsigned int)mask;
 	/* Vlan stripping setting */
@@ -903,13 +910,13 @@ hns3vf_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 		rte_spinlock_lock(&hw->lock);
 		/* Enable or disable VLAN stripping */
 		if (dev_conf->rxmode.offloads & DEV_RX_OFFLOAD_VLAN_STRIP)
-			hns3vf_en_hw_strip_rxvtag(hw, true);
+			ret = hns3vf_en_hw_strip_rxvtag(hw, true);
 		else
-			hns3vf_en_hw_strip_rxvtag(hw, false);
+			ret = hns3vf_en_hw_strip_rxvtag(hw, false);
 		rte_spinlock_unlock(&hw->lock);
 	}
 
-	return 0;
+	return ret;
 }
 
 static int
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:45.154745176 +0100
+++ 0014-net-hns3-fix-return-value-of-setting-VLAN-offload.patch	2020-05-19 14:04:44.080645907 +0100
@@ -1,8 +1,10 @@
-From e7f4213c304bd8d71fc3ca7702c85c434eff0805 Mon Sep 17 00:00:00 2001
+From 8081044a6f8bfc1dc46a2d9866b7550f446adbf5 Mon Sep 17 00:00:00 2001
 From: Chengwen Feng <fengchengwen@huawei.com>
 Date: Thu, 26 Mar 2020 15:14:33 +0800
 Subject: [PATCH] net/hns3: fix return value of setting VLAN offload
 
+[ upstream commit e7f4213c304bd8d71fc3ca7702c85c434eff0805 ]
+
 Currently, the '.vlan_offload_set' ops implementation function named
 hns3vf_vlan_offload_set always return 0 in hns3 VF PMD driver.
 
@@ -13,7 +15,6 @@
    function named hns3vf_en_hw_strip_rxvtag.
 
 Fixes: a5475d61fa34 ("net/hns3: support VF")
-Cc: stable@dpdk.org
 
 Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -22,10 +23,10 @@
  1 file changed, 10 insertions(+), 3 deletions(-)
 
 diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
-index 08ae58a794..07f5ab6379 100644
+index 879851630d..6f8e909f62 100644
 --- a/drivers/net/hns3/hns3_ethdev_vf.c
 +++ b/drivers/net/hns3/hns3_ethdev_vf.c
-@@ -1150,6 +1150,13 @@ hns3vf_vlan_offload_set(struct rte_eth_dev *dev, int mask)
+@@ -896,6 +896,13 @@ hns3vf_vlan_offload_set(struct rte_eth_dev *dev, int mask)
  	struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
  	struct rte_eth_conf *dev_conf = &dev->data->dev_conf;
  	unsigned int tmp_mask;
@@ -39,7 +40,7 @@
  
  	tmp_mask = (unsigned int)mask;
  	/* Vlan stripping setting */
-@@ -1157,13 +1164,13 @@ hns3vf_vlan_offload_set(struct rte_eth_dev *dev, int mask)
+@@ -903,13 +910,13 @@ hns3vf_vlan_offload_set(struct rte_eth_dev *dev, int mask)
  		rte_spinlock_lock(&hw->lock);
  		/* Enable or disable VLAN stripping */
  		if (dev_conf->rxmode.offloads & DEV_RX_OFFLOAD_VLAN_STRIP)

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

* [dpdk-stable] patch 'net/ice/base: fix uninitialized stack variables' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (12 preceding siblings ...)
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/hns3: fix return value of setting VLAN offload' " luca.boccassi
@ 2020-05-19 13:02   ` luca.boccassi
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/ice/base: read PSM clock frequency from register' " luca.boccassi
                     ` (198 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:02 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Jesse Brandeburg, Paul M Stillwell Jr, Qiming Yang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From d1cd22be97f279095c80e26ad059c806d79b7b1e Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Mon, 23 Mar 2020 15:17:24 +0800
Subject: [PATCH] net/ice/base: fix uninitialized stack variables

[ upstream commit cdfa0dc1702bcfe6c403d3cfe4046b29c8e6c5b9 ]

Via code inspection, I found that some partially initialized
stack variables were being passed along to called functions,
which could eventually result in those uninitialized members
being used.  To fix this, make sure the local variables are
zeroed out before partially initializing them.  This should
prevent any unintended consequences from using stack memory that
might have junk in it.

In addition to the memsets, this patch also initializes one
member in one function, that needed to be initialized to non-zero.

Fixes: fed0c5ca5f19 ("net/ice/base: support programming a new switch recipe")

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
---
 drivers/net/ice/base/ice_switch.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index 621fcfb370..7fe71b20b9 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -5995,9 +5995,12 @@ ice_adv_add_update_vsi_list(struct ice_hw *hw,
 		if (status)
 			return status;
 
+		ice_memset(&tmp_fltr, 0, sizeof(tmp_fltr), ICE_NONDMA_MEM);
 		tmp_fltr.fltr_rule_id = cur_fltr->fltr_rule_id;
 		tmp_fltr.fltr_act = ICE_FWD_TO_VSI_LIST;
 		tmp_fltr.fwd_id.vsi_list_id = vsi_list_id;
+		tmp_fltr.lkup_type = ICE_SW_LKUP_LAST;
+
 		/* Update the previous switch rule of "forward to VSI" to
 		 * "fwd to VSI list"
 		 */
@@ -6241,6 +6244,7 @@ ice_add_adv_rule(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,
 	if (rinfo->sw_act.fltr_act == ICE_FWD_TO_VSI) {
 		struct ice_fltr_info tmp_fltr;
 
+		ice_memset(&tmp_fltr, 0, sizeof(tmp_fltr), ICE_NONDMA_MEM);
 		tmp_fltr.fltr_rule_id =
 			LE16_TO_CPU(s_rule->pdata.lkup_tx_rx.index);
 		tmp_fltr.fltr_act = ICE_FWD_TO_VSI;
@@ -6325,6 +6329,8 @@ ice_adv_rem_update_vsi_list(struct ice_hw *hw, u16 vsi_handle,
 						  lkup_type);
 		if (status)
 			return status;
+
+		ice_memset(&tmp_fltr, 0, sizeof(tmp_fltr), ICE_NONDMA_MEM);
 		tmp_fltr.fltr_rule_id = fm_list->rule_info.fltr_rule_id;
 		fm_list->rule_info.sw_act.fltr_act = ICE_FWD_TO_VSI;
 		tmp_fltr.fltr_act = ICE_FWD_TO_VSI;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:45.189513794 +0100
+++ 0015-net-ice-base-fix-uninitialized-stack-variables.patch	2020-05-19 14:04:44.084645980 +0100
@@ -1,8 +1,10 @@
-From cdfa0dc1702bcfe6c403d3cfe4046b29c8e6c5b9 Mon Sep 17 00:00:00 2001
+From d1cd22be97f279095c80e26ad059c806d79b7b1e Mon Sep 17 00:00:00 2001
 From: Qi Zhang <qi.z.zhang@intel.com>
 Date: Mon, 23 Mar 2020 15:17:24 +0800
 Subject: [PATCH] net/ice/base: fix uninitialized stack variables
 
+[ upstream commit cdfa0dc1702bcfe6c403d3cfe4046b29c8e6c5b9 ]
+
 Via code inspection, I found that some partially initialized
 stack variables were being passed along to called functions,
 which could eventually result in those uninitialized members
@@ -15,7 +17,6 @@
 member in one function, that needed to be initialized to non-zero.
 
 Fixes: fed0c5ca5f19 ("net/ice/base: support programming a new switch recipe")
-Cc: stable@dpdk.org
 
 Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
 Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
@@ -26,10 +27,10 @@
  1 file changed, 6 insertions(+)
 
 diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
-index 085f344064..e88d0f7fe7 100644
+index 621fcfb370..7fe71b20b9 100644
 --- a/drivers/net/ice/base/ice_switch.c
 +++ b/drivers/net/ice/base/ice_switch.c
-@@ -6227,9 +6227,12 @@ ice_adv_add_update_vsi_list(struct ice_hw *hw,
+@@ -5995,9 +5995,12 @@ ice_adv_add_update_vsi_list(struct ice_hw *hw,
  		if (status)
  			return status;
  
@@ -42,7 +43,7 @@
  		/* Update the previous switch rule of "forward to VSI" to
  		 * "fwd to VSI list"
  		 */
-@@ -6473,6 +6476,7 @@ ice_add_adv_rule(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,
+@@ -6241,6 +6244,7 @@ ice_add_adv_rule(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,
  	if (rinfo->sw_act.fltr_act == ICE_FWD_TO_VSI) {
  		struct ice_fltr_info tmp_fltr;
  
@@ -50,7 +51,7 @@
  		tmp_fltr.fltr_rule_id =
  			LE16_TO_CPU(s_rule->pdata.lkup_tx_rx.index);
  		tmp_fltr.fltr_act = ICE_FWD_TO_VSI;
-@@ -6557,6 +6561,8 @@ ice_adv_rem_update_vsi_list(struct ice_hw *hw, u16 vsi_handle,
+@@ -6325,6 +6329,8 @@ ice_adv_rem_update_vsi_list(struct ice_hw *hw, u16 vsi_handle,
  						  lkup_type);
  		if (status)
  			return status;

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

* [dpdk-stable] patch 'net/ice/base: read PSM clock frequency from register' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (13 preceding siblings ...)
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/ice/base: fix uninitialized stack variables' " luca.boccassi
@ 2020-05-19 13:02   ` luca.boccassi
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/ice/base: minor fixes' " luca.boccassi
                     ` (197 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:02 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Ben Shelton, Paul M Stillwell Jr, Qiming Yang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From b97902938a3096713bf73564ec723bc58ac62daf Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Mon, 23 Mar 2020 15:17:27 +0800
Subject: [PATCH] net/ice/base: read PSM clock frequency from register

[ upstream commit 76ac9d771c97cdba45339558e124c9244f211d04 ]

Read the GLGEN_CLKSTAT_SRC register to determine which PSM clock
frequency is selected.  This ensures that the rate limiter profile
calculations will be correct.

Fixes: 453d087ccaff ("net/ice/base: add common functions")

Signed-off-by: Ben Shelton <benjamin.h.shelton@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
---
 drivers/net/ice/base/ice_common.c |  1 +
 drivers/net/ice/base/ice_sched.c  | 57 +++++++++++++++++++++++++++----
 drivers/net/ice/base/ice_sched.h  |  7 +++-
 drivers/net/ice/base/ice_type.h   |  4 ++-
 4 files changed, 60 insertions(+), 9 deletions(-)

diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c
index 2646a96321..8006c5d689 100644
--- a/drivers/net/ice/base/ice_common.c
+++ b/drivers/net/ice/base/ice_common.c
@@ -674,6 +674,7 @@ enum ice_status ice_init_hw(struct ice_hw *hw)
 			  "Failed to get scheduler allocated resources\n");
 		goto err_unroll_alloc;
 	}
+	ice_sched_get_psm_clk_freq(hw);
 
 	/* Initialize port_info struct with scheduler data */
 	status = ice_sched_init_port(hw->port_info);
diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c
index 553fc28ff3..740f7c3ffa 100644
--- a/drivers/net/ice/base/ice_sched.c
+++ b/drivers/net/ice/base/ice_sched.c
@@ -1368,6 +1368,46 @@ sched_query_out:
 	return status;
 }
 
+/**
+ * ice_sched_get_psm_clk_freq - determine the PSM clock frequency
+ * @hw: pointer to the HW struct
+ *
+ * Determine the PSM clock frequency and store in HW struct
+ */
+void ice_sched_get_psm_clk_freq(struct ice_hw *hw)
+{
+	u32 val, clk_src;
+
+	val = rd32(hw, GLGEN_CLKSTAT_SRC);
+	clk_src = (val & GLGEN_CLKSTAT_SRC_PSM_CLK_SRC_M) >>
+		GLGEN_CLKSTAT_SRC_PSM_CLK_SRC_S;
+
+#define PSM_CLK_SRC_367_MHZ 0x0
+#define PSM_CLK_SRC_416_MHZ 0x1
+#define PSM_CLK_SRC_446_MHZ 0x2
+#define PSM_CLK_SRC_390_MHZ 0x3
+
+	switch (clk_src) {
+	case PSM_CLK_SRC_367_MHZ:
+		hw->psm_clk_freq = ICE_PSM_CLK_367MHZ_IN_HZ;
+		break;
+	case PSM_CLK_SRC_416_MHZ:
+		hw->psm_clk_freq = ICE_PSM_CLK_416MHZ_IN_HZ;
+		break;
+	case PSM_CLK_SRC_446_MHZ:
+		hw->psm_clk_freq = ICE_PSM_CLK_446MHZ_IN_HZ;
+		break;
+	case PSM_CLK_SRC_390_MHZ:
+		hw->psm_clk_freq = ICE_PSM_CLK_390MHZ_IN_HZ;
+		break;
+	default:
+		ice_debug(hw, ICE_DBG_SCHED, "PSM clk_src unexpected %u\n",
+			  clk_src);
+		/* fall back to a safe default */
+		hw->psm_clk_freq = ICE_PSM_CLK_446MHZ_IN_HZ;
+	}
+}
+
 /**
  * ice_sched_find_node_in_subtree - Find node in part of base node subtree
  * @hw: pointer to the HW struct
@@ -3671,11 +3711,12 @@ exit_cfg_agg_bw_alloc:
 
 /**
  * ice_sched_calc_wakeup - calculate RL profile wakeup parameter
+ * @hw: pointer to the HW struct
  * @bw: bandwidth in Kbps
  *
  * This function calculates the wakeup parameter of RL profile.
  */
-static u16 ice_sched_calc_wakeup(s32 bw)
+static u16 ice_sched_calc_wakeup(struct ice_hw *hw, s32 bw)
 {
 	s64 bytes_per_sec, wakeup_int, wakeup_a, wakeup_b, wakeup_f;
 	s32 wakeup_f_int;
@@ -3683,7 +3724,7 @@ static u16 ice_sched_calc_wakeup(s32 bw)
 
 	/* Get the wakeup integer value */
 	bytes_per_sec = DIV_64BIT(((s64)bw * 1000), BITS_PER_BYTE);
-	wakeup_int = DIV_64BIT(ICE_RL_PROF_FREQUENCY, bytes_per_sec);
+	wakeup_int = DIV_64BIT(hw->psm_clk_freq, bytes_per_sec);
 	if (wakeup_int > 63) {
 		wakeup = (u16)((1 << 15) | wakeup_int);
 	} else {
@@ -3692,7 +3733,7 @@ static u16 ice_sched_calc_wakeup(s32 bw)
 		 */
 		wakeup_b = (s64)ICE_RL_PROF_MULTIPLIER * wakeup_int;
 		wakeup_a = DIV_64BIT((s64)ICE_RL_PROF_MULTIPLIER *
-				     ICE_RL_PROF_FREQUENCY, bytes_per_sec);
+				     hw->psm_clk_freq, bytes_per_sec);
 
 		/* Get Fraction value */
 		wakeup_f = wakeup_a - wakeup_b;
@@ -3712,13 +3753,15 @@ static u16 ice_sched_calc_wakeup(s32 bw)
 
 /**
  * ice_sched_bw_to_rl_profile - convert BW to profile parameters
+ * @hw: pointer to the HW struct
  * @bw: bandwidth in Kbps
  * @profile: profile parameters to return
  *
  * This function converts the BW to profile structure format.
  */
 static enum ice_status
-ice_sched_bw_to_rl_profile(u32 bw, struct ice_aqc_rl_profile_elem *profile)
+ice_sched_bw_to_rl_profile(struct ice_hw *hw, u32 bw,
+			   struct ice_aqc_rl_profile_elem *profile)
 {
 	enum ice_status status = ICE_ERR_PARAM;
 	s64 bytes_per_sec, ts_rate, mv_tmp;
@@ -3738,7 +3781,7 @@ ice_sched_bw_to_rl_profile(u32 bw, struct ice_aqc_rl_profile_elem *profile)
 	for (i = 0; i < 64; i++) {
 		u64 pow_result = BIT_ULL(i);
 
-		ts_rate = DIV_64BIT((s64)ICE_RL_PROF_FREQUENCY,
+		ts_rate = DIV_64BIT((s64)hw->psm_clk_freq,
 				    pow_result * ICE_RL_PROF_TS_MULTIPLIER);
 		if (ts_rate <= 0)
 			continue;
@@ -3762,7 +3805,7 @@ ice_sched_bw_to_rl_profile(u32 bw, struct ice_aqc_rl_profile_elem *profile)
 	if (found) {
 		u16 wm;
 
-		wm = ice_sched_calc_wakeup(bw);
+		wm = ice_sched_calc_wakeup(hw, bw);
 		profile->rl_multiply = CPU_TO_LE16(mv);
 		profile->wake_up_calc = CPU_TO_LE16(wm);
 		profile->rl_encode = CPU_TO_LE16(encode);
@@ -3831,7 +3874,7 @@ ice_sched_add_rl_profile(struct ice_port_info *pi,
 	if (!rl_prof_elem)
 		return NULL;
 
-	status = ice_sched_bw_to_rl_profile(bw, &rl_prof_elem->profile);
+	status = ice_sched_bw_to_rl_profile(hw, bw, &rl_prof_elem->profile);
 	if (status != ICE_SUCCESS)
 		goto exit_add_rl_prof;
 
diff --git a/drivers/net/ice/base/ice_sched.h b/drivers/net/ice/base/ice_sched.h
index d6b467477c..1a8549931f 100644
--- a/drivers/net/ice/base/ice_sched.h
+++ b/drivers/net/ice/base/ice_sched.h
@@ -25,12 +25,16 @@
 	((BIT(11) - 1) * 64) /* In Bytes */
 #define ICE_MAX_BURST_SIZE_KBYTE_GRANULARITY	ICE_MAX_BURST_SIZE_ALLOWED
 
-#define ICE_RL_PROF_FREQUENCY 446000000
 #define ICE_RL_PROF_ACCURACY_BYTES 128
 #define ICE_RL_PROF_MULTIPLIER 10000
 #define ICE_RL_PROF_TS_MULTIPLIER 32
 #define ICE_RL_PROF_FRACTION 512
 
+#define ICE_PSM_CLK_367MHZ_IN_HZ 367647059
+#define ICE_PSM_CLK_416MHZ_IN_HZ 416666667
+#define ICE_PSM_CLK_446MHZ_IN_HZ 446428571
+#define ICE_PSM_CLK_390MHZ_IN_HZ 390625000
+
 struct rl_profile_params {
 	u32 bw;			/* in Kbps */
 	u16 rl_multiplier;
@@ -83,6 +87,7 @@ ice_aq_query_sched_elems(struct ice_hw *hw, u16 elems_req,
 			 u16 *elems_ret, struct ice_sq_cd *cd);
 enum ice_status ice_sched_init_port(struct ice_port_info *pi);
 enum ice_status ice_sched_query_res_alloc(struct ice_hw *hw);
+void ice_sched_get_psm_clk_freq(struct ice_hw *hw);
 
 /* Functions to cleanup scheduler SW DB */
 void ice_sched_clear_port(struct ice_port_info *pi);
diff --git a/drivers/net/ice/base/ice_type.h b/drivers/net/ice/base/ice_type.h
index a8e4229a19..8b29e519d8 100644
--- a/drivers/net/ice/base/ice_type.h
+++ b/drivers/net/ice/base/ice_type.h
@@ -528,7 +528,7 @@ struct ice_sched_node {
 #define ICE_TXSCHED_GET_EIR_BWALLOC(x)	\
 	LE16_TO_CPU((x)->info.eir_bw.bw_alloc)
 
-struct ice_sched_rl_profle {
+struct ice_sched_rl_profile {
 	u32 rate; /* In Kbps */
 	struct ice_aqc_rl_profile_elem info;
 };
@@ -745,6 +745,8 @@ struct ice_hw {
 	struct ice_sched_rl_profile **cir_profiles;
 	struct ice_sched_rl_profile **eir_profiles;
 	struct ice_sched_rl_profile **srl_profiles;
+	/* PSM clock frequency for calculating RL profile params */
+	u32 psm_clk_freq;
 	u64 debug_mask;		/* BITMAP for debug mask */
 	enum ice_mac_type mac_type;
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:45.232311966 +0100
+++ 0016-net-ice-base-read-PSM-clock-frequency-from-register.patch	2020-05-19 14:04:44.096646197 +0100
@@ -1,14 +1,15 @@
-From 76ac9d771c97cdba45339558e124c9244f211d04 Mon Sep 17 00:00:00 2001
+From b97902938a3096713bf73564ec723bc58ac62daf Mon Sep 17 00:00:00 2001
 From: Qi Zhang <qi.z.zhang@intel.com>
 Date: Mon, 23 Mar 2020 15:17:27 +0800
 Subject: [PATCH] net/ice/base: read PSM clock frequency from register
 
+[ upstream commit 76ac9d771c97cdba45339558e124c9244f211d04 ]
+
 Read the GLGEN_CLKSTAT_SRC register to determine which PSM clock
 frequency is selected.  This ensures that the rate limiter profile
 calculations will be correct.
 
 Fixes: 453d087ccaff ("net/ice/base: add common functions")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ben Shelton <benjamin.h.shelton@intel.com>
 Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
@@ -22,10 +23,10 @@
  4 files changed, 60 insertions(+), 9 deletions(-)
 
 diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c
-index 786e99d210..9ef1aeef2c 100644
+index 2646a96321..8006c5d689 100644
 --- a/drivers/net/ice/base/ice_common.c
 +++ b/drivers/net/ice/base/ice_common.c
-@@ -672,6 +672,7 @@ enum ice_status ice_init_hw(struct ice_hw *hw)
+@@ -674,6 +674,7 @@ enum ice_status ice_init_hw(struct ice_hw *hw)
  			  "Failed to get scheduler allocated resources\n");
  		goto err_unroll_alloc;
  	}
@@ -191,10 +192,10 @@
  /* Functions to cleanup scheduler SW DB */
  void ice_sched_clear_port(struct ice_port_info *pi);
 diff --git a/drivers/net/ice/base/ice_type.h b/drivers/net/ice/base/ice_type.h
-index 9773a549f2..237220ee8c 100644
+index a8e4229a19..8b29e519d8 100644
 --- a/drivers/net/ice/base/ice_type.h
 +++ b/drivers/net/ice/base/ice_type.h
-@@ -524,7 +524,7 @@ struct ice_sched_node {
+@@ -528,7 +528,7 @@ struct ice_sched_node {
  #define ICE_TXSCHED_GET_EIR_BWALLOC(x)	\
  	LE16_TO_CPU((x)->info.eir_bw.bw_alloc)
  
@@ -203,7 +204,7 @@
  	u32 rate; /* In Kbps */
  	struct ice_aqc_rl_profile_elem info;
  };
-@@ -741,6 +741,8 @@ struct ice_hw {
+@@ -745,6 +745,8 @@ struct ice_hw {
  	struct ice_sched_rl_profile **cir_profiles;
  	struct ice_sched_rl_profile **eir_profiles;
  	struct ice_sched_rl_profile **srl_profiles;

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

* [dpdk-stable] patch 'net/ice/base: minor fixes' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (14 preceding siblings ...)
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/ice/base: read PSM clock frequency from register' " luca.boccassi
@ 2020-05-19 13:02   ` luca.boccassi
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/ice/base: fix MAC write command' " luca.boccassi
                     ` (196 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:02 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Tony Nguyen, Paul M Stillwell Jr, Qiming Yang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From d57cbe48b29f0d7ed08e37d560c8410c9ea4ab99 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Mon, 23 Mar 2020 15:17:34 +0800
Subject: [PATCH] net/ice/base: minor fixes

[ upstream commit ceb2f4c3872cd6eb68e9ecbca2b32322e6581110 ]

This is a collection of minor fixes that were found during code review.
Changes are:
- Call ice_hweight8() instead of calculating it ourselves in
  ice_bits_max_set().
- Call ice_test_and_clear_bit() over calling ice_is_bit_set() then
  ice_clear_bit() in ice_rem_vsi_rss_list().
- Remove 'chrs' variable in ice_add_prof_id_flow() as it's not being
  used for anything.
- Return result directly instead of assigning to variable then
  returning the variable in ice_rem_vsig().
- Reduce scope, and don't initialize, 'or_vsig' in
  ice_add_prof_id_flow().
- Return error immediately in ice_add_prof_id_vsig(). Since the memory
  wasn't allocated, there is no need to goto and attempt to free memory.
- Show that values 37-38 are reserved in ice_flow_avf_hdr_field as the
  other reserved values are shown.
- Fix RCT ordering
- Remove initialization of values that aren't needed
- Fix function headers to match function names
- Use offsetof instead of calculating ourselves in ice_pkg_buf_alloc()
- In ice_rem_prof(), do not set status to ICE_SUCCESS as, due to code
  flow, this will always be ICE_SUCCESS.
- Remove unnecessary semicolon in ice_prof_gen_key()
- Remove unnecessary initializations
- correct bw_alloc type in ice_sched_add_root_node

Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
---
 drivers/net/ice/base/ice_flex_pipe.c | 52 +++++++++++-----------------
 drivers/net/ice/base/ice_flex_pipe.h |  2 +-
 drivers/net/ice/base/ice_flow.c      |  7 ++--
 drivers/net/ice/base/ice_flow.h      |  1 +
 drivers/net/ice/base/ice_sched.c     |  2 +-
 drivers/net/ice/base/ice_switch.c    |  2 +-
 6 files changed, 27 insertions(+), 39 deletions(-)

diff --git a/drivers/net/ice/base/ice_flex_pipe.c b/drivers/net/ice/base/ice_flex_pipe.c
index e8d4bbee40..0de1e1b239 100644
--- a/drivers/net/ice/base/ice_flex_pipe.c
+++ b/drivers/net/ice/base/ice_flex_pipe.c
@@ -610,7 +610,7 @@ ice_gen_key_word(u8 val, u8 valid, u8 dont_care, u8 nvr_mtch, u8 *key,
 static bool ice_bits_max_set(const u8 *mask, u16 size, u16 max)
 {
 	u16 count = 0;
-	u16 i, j;
+	u16 i;
 
 	/* check each byte */
 	for (i = 0; i < size; i++) {
@@ -626,11 +626,9 @@ static bool ice_bits_max_set(const u8 *mask, u16 size, u16 max)
 			return false;
 
 		/* count the bits in this byte, checking threshold */
-		for (j = 0; j < BITS_PER_BYTE; j++) {
-			count += (mask[i] & (0x1 << j)) ? 1 : 0;
-			if (count > max)
-				return false;
-		}
+		count += ice_hweight8(mask[i]);
+		if (count > max)
+			return false;
 	}
 
 	return true;
@@ -914,9 +912,8 @@ ice_update_pkg(struct ice_hw *hw, struct ice_buf *bufs, u32 count)
 		return status;
 
 	for (i = 0; i < count; i++) {
-		bool last = ((i + 1) == count);
-
 		struct ice_buf_hdr *bh = (struct ice_buf_hdr *)(bufs + i);
+		bool last = ((i + 1) == count);
 
 		status = ice_aq_update_pkg(hw, bh, LE16_TO_CPU(bh->data_end),
 					   last, &offset, &info, NULL);
@@ -1566,7 +1563,7 @@ ice_get_sw_fv_bitmap(struct ice_hw *hw, enum ice_prof_type type,
  * allocated for every list entry.
  */
 enum ice_status
-ice_get_sw_fv_list(struct ice_hw *hw, u16 *prot_ids, u8 ids_cnt,
+ice_get_sw_fv_list(struct ice_hw *hw, u16 *prot_ids, u16 ids_cnt,
 		   ice_bitmap_t *bm, struct LIST_HEAD_TYPE *fv_list)
 {
 	struct ice_sw_fv_list_entry *fvl;
@@ -1583,7 +1580,7 @@ ice_get_sw_fv_list(struct ice_hw *hw, u16 *prot_ids, u8 ids_cnt,
 
 	ice_seg = hw->seg;
 	do {
-		u8 i;
+		u16 i;
 
 		fv = (struct ice_fv *)
 			ice_pkg_enum_entry(ice_seg, &state, ICE_SID_FLD_VEC_SW,
@@ -1807,7 +1804,7 @@ static u16 ice_pkg_buf_get_active_sections(struct ice_buf_build *bld)
 }
 
 /**
- * ice_pkg_buf_header
+ * ice_pkg_buf
  * @bld: pointer to pkg build (allocated by ice_pkg_buf_alloc())
  *
  * Return a pointer to the buffer's header
@@ -1916,9 +1913,11 @@ ice_get_open_tunnel_port(struct ice_hw *hw, enum ice_tunnel_type type,
  * ice_create_tunnel
  * @hw: pointer to the HW structure
  * @type: type of tunnel
- * @port: port to use for vxlan tunnel
+ * @port: port of tunnel to create
  *
- * Creates a tunnel
+ * Create a tunnel by updating the parse graph in the parser. We do that by
+ * creating a package buffer with the tunnel info and issuing an update package
+ * command.
  */
 enum ice_status
 ice_create_tunnel(struct ice_hw *hw, enum ice_tunnel_type type, u16 port)
@@ -3832,6 +3831,7 @@ ice_vsig_get_ref(struct ice_hw *hw, enum ice_block blk, u16 vsig, u16 *refs)
 {
 	u16 idx = vsig & ICE_VSIG_IDX_M;
 	struct ice_vsig_vsi *ptr;
+
 	*refs = 0;
 
 	if (!hw->blk[blk].xlt2.vsig_tbl[idx].in_use)
@@ -4038,12 +4038,12 @@ ice_upd_prof_hw(struct ice_hw *hw, enum ice_block blk,
 	struct ice_buf_build *b;
 	struct ice_chs_chg *tmp;
 	enum ice_status status;
-	u16 pkg_sects = 0;
-	u16 sects = 0;
+	u16 pkg_sects;
 	u16 xlt1 = 0;
 	u16 xlt2 = 0;
 	u16 tcam = 0;
 	u16 es = 0;
+	u16 sects;
 
 	/* count number of sections we need */
 	LIST_FOR_EACH_ENTRY(tmp, chgs, ice_chs_chg, list_entry) {
@@ -4142,8 +4142,6 @@ static void ice_update_fd_mask(struct ice_hw *hw, u16 prof_id, u32 mask_sel)
 		  GLQF_FDMASK_SEL(prof_id), mask_sel);
 }
 
-#define ICE_SRC_DST_MAX_COUNT	8
-
 struct ice_fd_src_dst_pair {
 	u8 prot_id;
 	u8 count;
@@ -4702,9 +4700,7 @@ ice_rem_vsig(struct ice_hw *hw, enum ice_block blk, u16 vsig,
 		} while (vsi_cur);
 	}
 
-	status = ice_vsig_free(hw, blk, vsig);
-
-	return status;
+	return ice_vsig_free(hw, blk, vsig);
 }
 
 /**
@@ -4922,8 +4918,8 @@ static enum ice_status
 ice_add_prof_to_lst(struct ice_hw *hw, enum ice_block blk,
 		    struct LIST_HEAD_TYPE *lst, u64 hdl)
 {
-	struct ice_vsig_prof *p;
 	struct ice_prof_map *map;
+	struct ice_vsig_prof *p;
 	u16 i;
 
 	map = ice_search_prof_id(hw, blk, hdl);
@@ -5200,7 +5196,7 @@ ice_add_prof_id_vsig(struct ice_hw *hw, enum ice_block blk, u16 vsig, u64 hdl,
 	/* new VSIG profile structure */
 	t = (struct ice_vsig_prof *)ice_malloc(hw, sizeof(*t));
 	if (!t)
-		goto err_ice_add_prof_id_vsig;
+		return ICE_ERR_NO_MEMORY;
 
 	t->profile_cookie = map->profile_cookie;
 	t->prof_id = map->prof_id;
@@ -5319,7 +5315,7 @@ err_ice_create_prof_id_vsig:
 }
 
 /**
- * ice_create_vsig_from_list - create a new VSIG with a list of profiles
+ * ice_create_vsig_from_lst - create a new VSIG with a list of profiles
  * @hw: pointer to the HW struct
  * @blk: hardware block
  * @vsi: the initial VSI that will be in VSIG
@@ -5445,13 +5441,11 @@ ice_add_prof_id_flow(struct ice_hw *hw, enum ice_block blk, u16 vsi, u64 hdl)
 	struct ice_vsig_prof *tmp1, *del1;
 	struct LIST_HEAD_TYPE union_lst;
 	struct ice_chs_chg *tmp, *del;
-	struct LIST_HEAD_TYPE chrs;
 	struct LIST_HEAD_TYPE chg;
 	enum ice_status status;
-	u16 vsig, or_vsig = 0;
+	u16 vsig;
 
 	INIT_LIST_HEAD(&union_lst);
-	INIT_LIST_HEAD(&chrs);
 	INIT_LIST_HEAD(&chg);
 
 	/* Get profile */
@@ -5463,6 +5457,7 @@ ice_add_prof_id_flow(struct ice_hw *hw, enum ice_block blk, u16 vsi, u64 hdl)
 	status = ice_vsig_find_vsi(hw, blk, vsi, &vsig);
 	if (!status && vsig) {
 		bool only_vsi;
+		u16 or_vsig;
 		u16 ref;
 
 		/* found in vsig */
@@ -5572,11 +5567,6 @@ err_ice_add_prof_id_flow:
 		ice_free(hw, del1);
 	}
 
-	LIST_FOR_EACH_ENTRY_SAFE(del1, tmp1, &chrs, ice_vsig_prof, list) {
-		LIST_DEL(&del1->list);
-		ice_free(hw, del1);
-	}
-
 	return status;
 }
 
diff --git a/drivers/net/ice/base/ice_flex_pipe.h b/drivers/net/ice/base/ice_flex_pipe.h
index ee606af15a..80793b1ccd 100644
--- a/drivers/net/ice/base/ice_flex_pipe.h
+++ b/drivers/net/ice/base/ice_flex_pipe.h
@@ -36,7 +36,7 @@ ice_get_sw_fv_bitmap(struct ice_hw *hw, enum ice_prof_type type,
 void
 ice_init_prof_result_bm(struct ice_hw *hw);
 enum ice_status
-ice_get_sw_fv_list(struct ice_hw *hw, u16 *prot_ids, u8 ids_cnt,
+ice_get_sw_fv_list(struct ice_hw *hw, u16 *prot_ids, u16 ids_cnt,
 		   ice_bitmap_t *bm, struct LIST_HEAD_TYPE *fv_list);
 bool
 ice_get_open_tunnel_port(struct ice_hw *hw, enum ice_tunnel_type type,
diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c
index f1a46e67f5..1fbb8ee1a7 100644
--- a/drivers/net/ice/base/ice_flow.c
+++ b/drivers/net/ice/base/ice_flow.c
@@ -1162,7 +1162,7 @@ ice_flow_add_prof_sync(struct ice_hw *hw, enum ice_block blk,
 		       struct ice_flow_prof **prof)
 {
 	struct ice_flow_prof_params params;
-	enum ice_status status = ICE_SUCCESS;
+	enum ice_status status;
 	u8 i;
 
 	if (!prof || (acts_cnt && !acts))
@@ -1835,14 +1835,11 @@ void ice_rem_vsi_rss_list(struct ice_hw *hw, u16 vsi_handle)
 	ice_acquire_lock(&hw->rss_locks);
 	LIST_FOR_EACH_ENTRY_SAFE(r, tmp, &hw->rss_list_head,
 				 ice_rss_cfg, l_entry) {
-		if (ice_is_bit_set(r->vsis, vsi_handle)) {
-			ice_clear_bit(vsi_handle, r->vsis);
-
+		if (ice_test_and_clear_bit(vsi_handle, r->vsis))
 			if (!ice_is_any_bit_set(r->vsis, ICE_MAX_VSI)) {
 				LIST_DEL(&r->l_entry);
 				ice_free(hw, r);
 			}
-		}
 	}
 	ice_release_lock(&hw->rss_locks);
 }
diff --git a/drivers/net/ice/base/ice_flow.h b/drivers/net/ice/base/ice_flow.h
index 4686274af8..19f3ee7642 100644
--- a/drivers/net/ice/base/ice_flow.h
+++ b/drivers/net/ice/base/ice_flow.h
@@ -187,6 +187,7 @@ enum ice_flow_avf_hdr_field {
 	ICE_AVF_FLOW_FIELD_IPV4_SCTP,
 	ICE_AVF_FLOW_FIELD_IPV4_OTHER,
 	ICE_AVF_FLOW_FIELD_FRAG_IPV4,
+	/* Values 37-38 are reserved */
 	ICE_AVF_FLOW_FIELD_UNICAST_IPV6_UDP	= 39,
 	ICE_AVF_FLOW_FIELD_MULTICAST_IPV6_UDP,
 	ICE_AVF_FLOW_FIELD_IPV6_UDP,
diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c
index 740f7c3ffa..26c4ba36f1 100644
--- a/drivers/net/ice/base/ice_sched.c
+++ b/drivers/net/ice/base/ice_sched.c
@@ -2907,7 +2907,7 @@ ice_sched_update_elem(struct ice_hw *hw, struct ice_sched_node *node,
  */
 static enum ice_status
 ice_sched_cfg_node_bw_alloc(struct ice_hw *hw, struct ice_sched_node *node,
-			    enum ice_rl_type rl_type, u8 bw_alloc)
+			    enum ice_rl_type rl_type, u16 bw_alloc)
 {
 	struct ice_aqc_txsched_elem_data buf;
 	struct ice_aqc_txsched_elem *data;
diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index 7fe71b20b9..9c8f20eb0a 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -611,7 +611,7 @@ ice_get_recp_frm_fw(struct ice_hw *hw, struct ice_sw_recipe *recps, u8 rid,
 	/* Complete initialization of the root recipe entry */
 	lkup_exts->n_val_words = fv_word_idx;
 	recps[rid].big_recp = (num_recps > 1);
-	recps[rid].n_grp_count = num_recps;
+	recps[rid].n_grp_count = (u8)num_recps;
 	recps[rid].root_buf = (struct ice_aqc_recipe_data_elem *)
 		ice_memdup(hw, tmp, recps[rid].n_grp_count *
 			   sizeof(*recps[rid].root_buf), ICE_NONDMA_TO_NONDMA);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:45.279014892 +0100
+++ 0017-net-ice-base-minor-fixes.patch	2020-05-19 14:04:44.116646560 +0100
@@ -1,8 +1,10 @@
-From ceb2f4c3872cd6eb68e9ecbca2b32322e6581110 Mon Sep 17 00:00:00 2001
+From d57cbe48b29f0d7ed08e37d560c8410c9ea4ab99 Mon Sep 17 00:00:00 2001
 From: Qi Zhang <qi.z.zhang@intel.com>
 Date: Mon, 23 Mar 2020 15:17:34 +0800
 Subject: [PATCH] net/ice/base: minor fixes
 
+[ upstream commit ceb2f4c3872cd6eb68e9ecbca2b32322e6581110 ]
+
 This is a collection of minor fixes that were found during code review.
 Changes are:
 - Call ice_hweight8() instead of calculating it ourselves in
@@ -43,7 +45,7 @@
  6 files changed, 27 insertions(+), 39 deletions(-)
 
 diff --git a/drivers/net/ice/base/ice_flex_pipe.c b/drivers/net/ice/base/ice_flex_pipe.c
-index 5dd7a0d38d..0cbd15f92a 100644
+index e8d4bbee40..0de1e1b239 100644
 --- a/drivers/net/ice/base/ice_flex_pipe.c
 +++ b/drivers/net/ice/base/ice_flex_pipe.c
 @@ -610,7 +610,7 @@ ice_gen_key_word(u8 val, u8 valid, u8 dont_care, u8 nvr_mtch, u8 *key,
@@ -81,7 +83,7 @@
  
  		status = ice_aq_update_pkg(hw, bh, LE16_TO_CPU(bh->data_end),
  					   last, &offset, &info, NULL);
-@@ -1565,7 +1562,7 @@ ice_get_sw_fv_bitmap(struct ice_hw *hw, enum ice_prof_type req_profs,
+@@ -1566,7 +1563,7 @@ ice_get_sw_fv_bitmap(struct ice_hw *hw, enum ice_prof_type type,
   * allocated for every list entry.
   */
  enum ice_status
@@ -90,7 +92,7 @@
  		   ice_bitmap_t *bm, struct LIST_HEAD_TYPE *fv_list)
  {
  	struct ice_sw_fv_list_entry *fvl;
-@@ -1582,7 +1579,7 @@ ice_get_sw_fv_list(struct ice_hw *hw, u16 *prot_ids, u8 ids_cnt,
+@@ -1583,7 +1580,7 @@ ice_get_sw_fv_list(struct ice_hw *hw, u16 *prot_ids, u8 ids_cnt,
  
  	ice_seg = hw->seg;
  	do {
@@ -99,7 +101,7 @@
  
  		fv = (struct ice_fv *)
  			ice_pkg_enum_entry(ice_seg, &state, ICE_SID_FLD_VEC_SW,
-@@ -1806,7 +1803,7 @@ static u16 ice_pkg_buf_get_active_sections(struct ice_buf_build *bld)
+@@ -1807,7 +1804,7 @@ static u16 ice_pkg_buf_get_active_sections(struct ice_buf_build *bld)
  }
  
  /**
@@ -108,7 +110,7 @@
   * @bld: pointer to pkg build (allocated by ice_pkg_buf_alloc())
   *
   * Return a pointer to the buffer's header
-@@ -1915,9 +1912,11 @@ ice_get_open_tunnel_port(struct ice_hw *hw, enum ice_tunnel_type type,
+@@ -1916,9 +1913,11 @@ ice_get_open_tunnel_port(struct ice_hw *hw, enum ice_tunnel_type type,
   * ice_create_tunnel
   * @hw: pointer to the HW structure
   * @type: type of tunnel
@@ -122,7 +124,7 @@
   */
  enum ice_status
  ice_create_tunnel(struct ice_hw *hw, enum ice_tunnel_type type, u16 port)
-@@ -3887,6 +3886,7 @@ ice_vsig_get_ref(struct ice_hw *hw, enum ice_block blk, u16 vsig, u16 *refs)
+@@ -3832,6 +3831,7 @@ ice_vsig_get_ref(struct ice_hw *hw, enum ice_block blk, u16 vsig, u16 *refs)
  {
  	u16 idx = vsig & ICE_VSIG_IDX_M;
  	struct ice_vsig_vsi *ptr;
@@ -130,7 +132,7 @@
  	*refs = 0;
  
  	if (!hw->blk[blk].xlt2.vsig_tbl[idx].in_use)
-@@ -4090,12 +4090,12 @@ ice_upd_prof_hw(struct ice_hw *hw, enum ice_block blk,
+@@ -4038,12 +4038,12 @@ ice_upd_prof_hw(struct ice_hw *hw, enum ice_block blk,
  	struct ice_buf_build *b;
  	struct ice_chs_chg *tmp;
  	enum ice_status status;
@@ -145,7 +147,7 @@
  
  	/* count number of sections we need */
  	LIST_FOR_EACH_ENTRY(tmp, chgs, ice_chs_chg, list_entry) {
-@@ -4194,8 +4194,6 @@ static void ice_update_fd_mask(struct ice_hw *hw, u16 prof_id, u32 mask_sel)
+@@ -4142,8 +4142,6 @@ static void ice_update_fd_mask(struct ice_hw *hw, u16 prof_id, u32 mask_sel)
  		  GLQF_FDMASK_SEL(prof_id), mask_sel);
  }
  
@@ -154,7 +156,7 @@
  struct ice_fd_src_dst_pair {
  	u8 prot_id;
  	u8 count;
-@@ -4754,9 +4752,7 @@ ice_rem_vsig(struct ice_hw *hw, enum ice_block blk, u16 vsig,
+@@ -4702,9 +4700,7 @@ ice_rem_vsig(struct ice_hw *hw, enum ice_block blk, u16 vsig,
  		} while (vsi_cur);
  	}
  
@@ -165,7 +167,7 @@
  }
  
  /**
-@@ -4974,8 +4970,8 @@ static enum ice_status
+@@ -4922,8 +4918,8 @@ static enum ice_status
  ice_add_prof_to_lst(struct ice_hw *hw, enum ice_block blk,
  		    struct LIST_HEAD_TYPE *lst, u64 hdl)
  {
@@ -175,7 +177,7 @@
  	u16 i;
  
  	map = ice_search_prof_id(hw, blk, hdl);
-@@ -5252,7 +5248,7 @@ ice_add_prof_id_vsig(struct ice_hw *hw, enum ice_block blk, u16 vsig, u64 hdl,
+@@ -5200,7 +5196,7 @@ ice_add_prof_id_vsig(struct ice_hw *hw, enum ice_block blk, u16 vsig, u64 hdl,
  	/* new VSIG profile structure */
  	t = (struct ice_vsig_prof *)ice_malloc(hw, sizeof(*t));
  	if (!t)
@@ -184,7 +186,7 @@
  
  	t->profile_cookie = map->profile_cookie;
  	t->prof_id = map->prof_id;
-@@ -5371,7 +5367,7 @@ err_ice_create_prof_id_vsig:
+@@ -5319,7 +5315,7 @@ err_ice_create_prof_id_vsig:
  }
  
  /**
@@ -193,7 +195,7 @@
   * @hw: pointer to the HW struct
   * @blk: hardware block
   * @vsi: the initial VSI that will be in VSIG
-@@ -5498,13 +5494,11 @@ ice_add_prof_id_flow(struct ice_hw *hw, enum ice_block blk, u16 vsi, u64 hdl)
+@@ -5445,13 +5441,11 @@ ice_add_prof_id_flow(struct ice_hw *hw, enum ice_block blk, u16 vsi, u64 hdl)
  	struct ice_vsig_prof *tmp1, *del1;
  	struct LIST_HEAD_TYPE union_lst;
  	struct ice_chs_chg *tmp, *del;
@@ -208,7 +210,7 @@
  	INIT_LIST_HEAD(&chg);
  
  	/* Get profile */
-@@ -5516,6 +5510,7 @@ ice_add_prof_id_flow(struct ice_hw *hw, enum ice_block blk, u16 vsi, u64 hdl)
+@@ -5463,6 +5457,7 @@ ice_add_prof_id_flow(struct ice_hw *hw, enum ice_block blk, u16 vsi, u64 hdl)
  	status = ice_vsig_find_vsi(hw, blk, vsi, &vsig);
  	if (!status && vsig) {
  		bool only_vsi;
@@ -216,7 +218,7 @@
  		u16 ref;
  
  		/* found in vsig */
-@@ -5625,11 +5620,6 @@ err_ice_add_prof_id_flow:
+@@ -5572,11 +5567,6 @@ err_ice_add_prof_id_flow:
  		ice_free(hw, del1);
  	}
  
@@ -229,7 +231,7 @@
  }
  
 diff --git a/drivers/net/ice/base/ice_flex_pipe.h b/drivers/net/ice/base/ice_flex_pipe.h
-index fa72e386d2..e3ee882daa 100644
+index ee606af15a..80793b1ccd 100644
 --- a/drivers/net/ice/base/ice_flex_pipe.h
 +++ b/drivers/net/ice/base/ice_flex_pipe.h
 @@ -36,7 +36,7 @@ ice_get_sw_fv_bitmap(struct ice_hw *hw, enum ice_prof_type type,
@@ -242,10 +244,10 @@
  bool
  ice_get_open_tunnel_port(struct ice_hw *hw, enum ice_tunnel_type type,
 diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c
-index d52bce1ced..0838b3bd2f 100644
+index f1a46e67f5..1fbb8ee1a7 100644
 --- a/drivers/net/ice/base/ice_flow.c
 +++ b/drivers/net/ice/base/ice_flow.c
-@@ -1152,7 +1152,7 @@ ice_flow_add_prof_sync(struct ice_hw *hw, enum ice_block blk,
+@@ -1162,7 +1162,7 @@ ice_flow_add_prof_sync(struct ice_hw *hw, enum ice_block blk,
  		       struct ice_flow_prof **prof)
  {
  	struct ice_flow_prof_params params;
@@ -254,7 +256,7 @@
  	u8 i;
  
  	if (!prof || (acts_cnt && !acts))
-@@ -1825,14 +1825,11 @@ void ice_rem_vsi_rss_list(struct ice_hw *hw, u16 vsi_handle)
+@@ -1835,14 +1835,11 @@ void ice_rem_vsi_rss_list(struct ice_hw *hw, u16 vsi_handle)
  	ice_acquire_lock(&hw->rss_locks);
  	LIST_FOR_EACH_ENTRY_SAFE(r, tmp, &hw->rss_list_head,
  				 ice_rss_cfg, l_entry) {
@@ -271,7 +273,7 @@
  	ice_release_lock(&hw->rss_locks);
  }
 diff --git a/drivers/net/ice/base/ice_flow.h b/drivers/net/ice/base/ice_flow.h
-index d7b10ccc34..4c2067f0cf 100644
+index 4686274af8..19f3ee7642 100644
 --- a/drivers/net/ice/base/ice_flow.h
 +++ b/drivers/net/ice/base/ice_flow.h
 @@ -187,6 +187,7 @@ enum ice_flow_avf_hdr_field {
@@ -283,7 +285,7 @@
  	ICE_AVF_FLOW_FIELD_MULTICAST_IPV6_UDP,
  	ICE_AVF_FLOW_FIELD_IPV6_UDP,
 diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c
-index 03885d0277..575c2ab588 100644
+index 740f7c3ffa..26c4ba36f1 100644
 --- a/drivers/net/ice/base/ice_sched.c
 +++ b/drivers/net/ice/base/ice_sched.c
 @@ -2907,7 +2907,7 @@ ice_sched_update_elem(struct ice_hw *hw, struct ice_sched_node *node,
@@ -296,10 +298,10 @@
  	struct ice_aqc_txsched_elem_data buf;
  	struct ice_aqc_txsched_elem *data;
 diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
-index adcda96454..796390e93d 100644
+index 7fe71b20b9..9c8f20eb0a 100644
 --- a/drivers/net/ice/base/ice_switch.c
 +++ b/drivers/net/ice/base/ice_switch.c
-@@ -743,7 +743,7 @@ ice_get_recp_frm_fw(struct ice_hw *hw, struct ice_sw_recipe *recps, u8 rid,
+@@ -611,7 +611,7 @@ ice_get_recp_frm_fw(struct ice_hw *hw, struct ice_sw_recipe *recps, u8 rid,
  	/* Complete initialization of the root recipe entry */
  	lkup_exts->n_val_words = fv_word_idx;
  	recps[rid].big_recp = (num_recps > 1);

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

* [dpdk-stable] patch 'net/ice/base: fix MAC write command' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (15 preceding siblings ...)
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/ice/base: minor fixes' " luca.boccassi
@ 2020-05-19 13:02   ` luca.boccassi
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/ixgbe: fix link status inconsistencies' " luca.boccassi
                     ` (195 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:02 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Jesse Brandeburg, Paul M Stillwell Jr, Qiming Yang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 117ecae9206c67a12f5cfa7e01b6e01d12587c28 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Mon, 23 Mar 2020 15:17:55 +0800
Subject: [PATCH] net/ice/base: fix MAC write command

[ upstream commit 97ac817f430c40ed9cc03200c23aad1d3da84bca ]

The manage MAC write command was implemented in an overly complex way
that actually didn't work, as it wasn't symmetric to the manage MAC
read command, and was feeding bytes out of order to the firmware. Fix
the implementation by just using a simple array to represent the MAC
address when it is being written via firmware command.

Fixes: a90fae1d0755 ("net/ice/base: add admin queue structures and commands")

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
---
 drivers/net/ice/base/ice_adminq_cmd.h | 10 ++++------
 drivers/net/ice/base/ice_common.c     |  5 +----
 2 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/drivers/net/ice/base/ice_adminq_cmd.h b/drivers/net/ice/base/ice_adminq_cmd.h
index e6a1350baa..cb521ca178 100644
--- a/drivers/net/ice/base/ice_adminq_cmd.h
+++ b/drivers/net/ice/base/ice_adminq_cmd.h
@@ -158,13 +158,11 @@ struct ice_aqc_manage_mac_write {
 #define ICE_AQC_MAN_MAC_WR_MC_MAG_EN		BIT(0)
 #define ICE_AQC_MAN_MAC_WR_WOL_LAA_PFR_KEEP	BIT(1)
 #define ICE_AQC_MAN_MAC_WR_S		6
-#define ICE_AQC_MAN_MAC_WR_M		(3 << ICE_AQC_MAN_MAC_WR_S)
+#define ICE_AQC_MAN_MAC_WR_M		MAKEMASK(3, ICE_AQC_MAN_MAC_WR_S)
 #define ICE_AQC_MAN_MAC_UPDATE_LAA	0
-#define ICE_AQC_MAN_MAC_UPDATE_LAA_WOL	(BIT(0) << ICE_AQC_MAN_MAC_WR_S)
-	/* High 16 bits of MAC address in big endian order */
-	__be16 sah;
-	/* Low 32 bits of MAC address in big endian order */
-	__be32 sal;
+#define ICE_AQC_MAN_MAC_UPDATE_LAA_WOL	BIT(ICE_AQC_MAN_MAC_WR_S)
+	/* byte stream in network order */
+	u8 mac_addr[ETH_ALEN];
 	__le32 addr_high;
 	__le32 addr_low;
 };
diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c
index 8006c5d689..0dec997d87 100644
--- a/drivers/net/ice/base/ice_common.c
+++ b/drivers/net/ice/base/ice_common.c
@@ -2121,10 +2121,7 @@ ice_aq_manage_mac_write(struct ice_hw *hw, const u8 *mac_addr, u8 flags,
 	ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_manage_mac_write);
 
 	cmd->flags = flags;
-
-	/* Prep values for flags, sah, sal */
-	cmd->sah = HTONS(*((const u16 *)mac_addr));
-	cmd->sal = HTONL(*((const u32 *)(mac_addr + 2)));
+	ice_memcpy(cmd->mac_addr, mac_addr, ETH_ALEN, ICE_NONDMA_TO_DMA);
 
 	return ice_aq_send_cmd(hw, &desc, NULL, 0, cd);
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:45.336069530 +0100
+++ 0018-net-ice-base-fix-MAC-write-command.patch	2020-05-19 14:04:44.120646632 +0100
@@ -1,8 +1,10 @@
-From 97ac817f430c40ed9cc03200c23aad1d3da84bca Mon Sep 17 00:00:00 2001
+From 117ecae9206c67a12f5cfa7e01b6e01d12587c28 Mon Sep 17 00:00:00 2001
 From: Qi Zhang <qi.z.zhang@intel.com>
 Date: Mon, 23 Mar 2020 15:17:55 +0800
 Subject: [PATCH] net/ice/base: fix MAC write command
 
+[ upstream commit 97ac817f430c40ed9cc03200c23aad1d3da84bca ]
+
 The manage MAC write command was implemented in an overly complex way
 that actually didn't work, as it wasn't symmetric to the manage MAC
 read command, and was feeding bytes out of order to the firmware. Fix
@@ -10,7 +12,6 @@
 address when it is being written via firmware command.
 
 Fixes: a90fae1d0755 ("net/ice/base: add admin queue structures and commands")
-Cc: stable@dpdk.org
 
 Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
 Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
@@ -22,7 +23,7 @@
  2 files changed, 5 insertions(+), 10 deletions(-)
 
 diff --git a/drivers/net/ice/base/ice_adminq_cmd.h b/drivers/net/ice/base/ice_adminq_cmd.h
-index d4c899dea3..3344481d65 100644
+index e6a1350baa..cb521ca178 100644
 --- a/drivers/net/ice/base/ice_adminq_cmd.h
 +++ b/drivers/net/ice/base/ice_adminq_cmd.h
 @@ -158,13 +158,11 @@ struct ice_aqc_manage_mac_write {
@@ -44,10 +45,10 @@
  	__le32 addr_low;
  };
 diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c
-index ed4dfb3e3b..3fdc93ce98 100644
+index 8006c5d689..0dec997d87 100644
 --- a/drivers/net/ice/base/ice_common.c
 +++ b/drivers/net/ice/base/ice_common.c
-@@ -2077,10 +2077,7 @@ ice_aq_manage_mac_write(struct ice_hw *hw, const u8 *mac_addr, u8 flags,
+@@ -2121,10 +2121,7 @@ ice_aq_manage_mac_write(struct ice_hw *hw, const u8 *mac_addr, u8 flags,
  	ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_manage_mac_write);
  
  	cmd->flags = flags;

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

* [dpdk-stable] patch 'net/ixgbe: fix link status inconsistencies' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (16 preceding siblings ...)
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/ice/base: fix MAC write command' " luca.boccassi
@ 2020-05-19 13:02   ` luca.boccassi
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/mlx5: fix validation of VXLAN/VXLAN-GPE specs' " luca.boccassi
                     ` (194 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:02 UTC (permalink / raw)
  To: Tao Zhu; +Cc: Xiaolong Ye, Yu Jiang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 4493efb719981e4053f526dcbbc2324e9054f01e Mon Sep 17 00:00:00 2001
From: Tao Zhu <taox.zhu@intel.com>
Date: Wed, 26 Feb 2020 20:06:37 +0800
Subject: [PATCH] net/ixgbe: fix link status inconsistencies

[ upstream commit efa8c72f1ecf7b02239a0627c482b7ba9af66f40 ]

Setting LINK UP or LINK DOWN is divided into two parts, with
the main task done in a separate thread, which can take up
to 9 seconds. If cancel the thread in execution, may cause state
inconsistencies. Therefore, must wait for the previous setting
to exit normally before setting the new state.

Note: before using threads, use alarm to handle main tasks.
When canceling alarm, the execution of alarm will not be interrupted.

Fixes: 819d0d1d57f1 ("net/ixgbe: fix blocking system events")

Signed-off-by: Tao Zhu <taox.zhu@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
Tested-by: Yu Jiang <yux.jiang@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 24 ++++++++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 3f66b490ed..2cedd1a273 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -4140,16 +4140,35 @@ out:
 	return ret_val;
 }
 
+/* return 1: setup complete, return 0: setup not complete, and wait timeout*/
+static int
+ixgbe_dev_wait_setup_link_complete(struct rte_eth_dev *dev)
+{
+#define DELAY_INTERVAL 100 /* 100ms */
+#define MAX_TIMEOUT    90 /* 9s (90 * 100ms) in total */
+	struct ixgbe_adapter *ad = dev->data->dev_private;
+	int timeout = MAX_TIMEOUT;
+
+	while (rte_atomic32_read(&ad->link_thread_running) && timeout) {
+		msec_delay(DELAY_INTERVAL);
+		timeout--;
+	}
+
+
+	return !!timeout;
+}
+
 static void
 ixgbe_dev_cancel_link_thread(struct rte_eth_dev *dev)
 {
 	struct ixgbe_adapter *ad = dev->data->dev_private;
 	void *retval;
 
-	if (rte_atomic32_read(&ad->link_thread_running)) {
+	if (!ixgbe_dev_wait_setup_link_complete(dev)) {
 		pthread_cancel(ad->link_thread_tid);
 		pthread_join(ad->link_thread_tid, &retval);
 		rte_atomic32_clear(&ad->link_thread_running);
+		PMD_DRV_LOG(ERR, "Link thread not complete, cancel it!");
 	}
 }
 
@@ -4259,7 +4278,8 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
 	if (link_up == 0) {
 		if (ixgbe_get_media_type(hw) == ixgbe_media_type_fiber) {
 			intr->flags |= IXGBE_FLAG_NEED_LINK_CONFIG;
-			if (rte_atomic32_test_and_set(&ad->link_thread_running)) {
+			if (ixgbe_dev_wait_setup_link_complete(dev) &&
+			    rte_atomic32_test_and_set(&ad->link_thread_running)) {
 				if (rte_ctrl_thread_create(&ad->link_thread_tid,
 					"ixgbe-link-handler",
 					NULL,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:45.379117229 +0100
+++ 0019-net-ixgbe-fix-link-status-inconsistencies.patch	2020-05-19 14:04:44.128646777 +0100
@@ -1,8 +1,10 @@
-From efa8c72f1ecf7b02239a0627c482b7ba9af66f40 Mon Sep 17 00:00:00 2001
+From 4493efb719981e4053f526dcbbc2324e9054f01e Mon Sep 17 00:00:00 2001
 From: Tao Zhu <taox.zhu@intel.com>
 Date: Wed, 26 Feb 2020 20:06:37 +0800
 Subject: [PATCH] net/ixgbe: fix link status inconsistencies
 
+[ upstream commit efa8c72f1ecf7b02239a0627c482b7ba9af66f40 ]
+
 Setting LINK UP or LINK DOWN is divided into two parts, with
 the main task done in a separate thread, which can take up
 to 9 seconds. If cancel the thread in execution, may cause state
@@ -13,7 +15,6 @@
 When canceling alarm, the execution of alarm will not be interrupted.
 
 Fixes: 819d0d1d57f1 ("net/ixgbe: fix blocking system events")
-Cc: stable@dpdk.org
 
 Signed-off-by: Tao Zhu <taox.zhu@intel.com>
 Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
@@ -23,10 +24,10 @@
  1 file changed, 22 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
-index 13f5ac2357..2a8543fd73 100644
+index 3f66b490ed..2cedd1a273 100644
 --- a/drivers/net/ixgbe/ixgbe_ethdev.c
 +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
-@@ -4143,16 +4143,35 @@ out:
+@@ -4140,16 +4140,35 @@ out:
  	return ret_val;
  }
  
@@ -63,7 +64,7 @@
  	}
  }
  
-@@ -4263,7 +4282,8 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
+@@ -4259,7 +4278,8 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
  	if (link_up == 0) {
  		if (ixgbe_get_media_type(hw) == ixgbe_media_type_fiber) {
  			intr->flags |= IXGBE_FLAG_NEED_LINK_CONFIG;

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

* [dpdk-stable] patch 'net/mlx5: fix validation of VXLAN/VXLAN-GPE specs' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (17 preceding siblings ...)
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/ixgbe: fix link status inconsistencies' " luca.boccassi
@ 2020-05-19 13:02   ` luca.boccassi
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/mlx5: fix metadata for compressed Rx CQEs' " luca.boccassi
                     ` (193 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:02 UTC (permalink / raw)
  To: Raslan Darawsheh; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From c469619b7a66c2ae5a0052d56833d5d74fe01307 Mon Sep 17 00:00:00 2001
From: Raslan Darawsheh <rasland@mellanox.com>
Date: Mon, 23 Mar 2020 16:21:33 +0200
Subject: [PATCH] net/mlx5: fix validation of VXLAN/VXLAN-GPE specs

[ upstream commit c79ab350a8976718d477d616f06678872a29b1b2 ]

Trying to create zero spec for vni wasn't allowed, to
avoid matching all packets from previous layer (udp).
This behavior is incorrect, since VXLAN is being identified
through the outer UDP destination port.

Currently, if the user didn't specify outer UDP destination
port the PMD will automatically match only on  outer
UDP port of 4798, and if the user want to match on some none
standard port he need to specify it explicitly in the rule.

This removes the limitation of vni spec to be able to match any
vni.

Fixes: 23c1d42c7138 ("net/mlx5: split flow validation to dedicated function")

Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow.c | 31 -------------------------------
 1 file changed, 31 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 4e957d9862..55f514af30 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -1817,7 +1817,6 @@ mlx5_flow_validate_item_vxlan(const struct rte_flow_item *item,
 		uint32_t vlan_id;
 		uint8_t vni[4];
 	} id = { .vlan_id = 0, };
-	uint32_t vlan_id = 0;
 
 
 	if (item_flags & MLX5_FLOW_LAYER_TUNNEL)
@@ -1844,23 +1843,8 @@ mlx5_flow_validate_item_vxlan(const struct rte_flow_item *item,
 		return ret;
 	if (spec) {
 		memcpy(&id.vni[1], spec->vni, 3);
-		vlan_id = id.vlan_id;
 		memcpy(&id.vni[1], mask->vni, 3);
-		vlan_id &= id.vlan_id;
 	}
-	/*
-	 * Tunnel id 0 is equivalent as not adding a VXLAN layer, if
-	 * only this layer is defined in the Verbs specification it is
-	 * interpreted as wildcard and all packets will match this
-	 * rule, if it follows a full stack layer (ex: eth / ipv4 /
-	 * udp), all packets matching the layers before will also
-	 * match this rule.  To avoid such situation, VNI 0 is
-	 * currently refused.
-	 */
-	if (!vlan_id)
-		return rte_flow_error_set(error, ENOTSUP,
-					  RTE_FLOW_ERROR_TYPE_ITEM, item,
-					  "VXLAN vni cannot be 0");
 	if (!(item_flags & MLX5_FLOW_LAYER_OUTER))
 		return rte_flow_error_set(error, ENOTSUP,
 					  RTE_FLOW_ERROR_TYPE_ITEM, item,
@@ -1899,7 +1883,6 @@ mlx5_flow_validate_item_vxlan_gpe(const struct rte_flow_item *item,
 		uint32_t vlan_id;
 		uint8_t vni[4];
 	} id = { .vlan_id = 0, };
-	uint32_t vlan_id = 0;
 
 	if (!priv->config.l3_vxlan_en)
 		return rte_flow_error_set(error, ENOTSUP,
@@ -1937,22 +1920,8 @@ mlx5_flow_validate_item_vxlan_gpe(const struct rte_flow_item *item,
 						  "VxLAN-GPE protocol"
 						  " not supported");
 		memcpy(&id.vni[1], spec->vni, 3);
-		vlan_id = id.vlan_id;
 		memcpy(&id.vni[1], mask->vni, 3);
-		vlan_id &= id.vlan_id;
 	}
-	/*
-	 * Tunnel id 0 is equivalent as not adding a VXLAN layer, if only this
-	 * layer is defined in the Verbs specification it is interpreted as
-	 * wildcard and all packets will match this rule, if it follows a full
-	 * stack layer (ex: eth / ipv4 / udp), all packets matching the layers
-	 * before will also match this rule.  To avoid such situation, VNI 0
-	 * is currently refused.
-	 */
-	if (!vlan_id)
-		return rte_flow_error_set(error, ENOTSUP,
-					  RTE_FLOW_ERROR_TYPE_ITEM, item,
-					  "VXLAN-GPE vni cannot be 0");
 	if (!(item_flags & MLX5_FLOW_LAYER_OUTER))
 		return rte_flow_error_set(error, ENOTSUP,
 					  RTE_FLOW_ERROR_TYPE_ITEM, item,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:45.425256106 +0100
+++ 0020-net-mlx5-fix-validation-of-VXLAN-VXLAN-GPE-specs.patch	2020-05-19 14:04:44.132646850 +0100
@@ -1,8 +1,10 @@
-From c79ab350a8976718d477d616f06678872a29b1b2 Mon Sep 17 00:00:00 2001
+From c469619b7a66c2ae5a0052d56833d5d74fe01307 Mon Sep 17 00:00:00 2001
 From: Raslan Darawsheh <rasland@mellanox.com>
 Date: Mon, 23 Mar 2020 16:21:33 +0200
 Subject: [PATCH] net/mlx5: fix validation of VXLAN/VXLAN-GPE specs
 
+[ upstream commit c79ab350a8976718d477d616f06678872a29b1b2 ]
+
 Trying to create zero spec for vni wasn't allowed, to
 avoid matching all packets from previous layer (udp).
 This behavior is incorrect, since VXLAN is being identified
@@ -17,7 +19,6 @@
 vni.
 
 Fixes: 23c1d42c7138 ("net/mlx5: split flow validation to dedicated function")
-Cc: stable@dpdk.org
 
 Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
 Acked-by: Matan Azrad <matan@mellanox.com>
@@ -26,10 +27,10 @@
  1 file changed, 31 deletions(-)
 
 diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
-index 41072da6df..2ef6558495 100644
+index 4e957d9862..55f514af30 100644
 --- a/drivers/net/mlx5/mlx5_flow.c
 +++ b/drivers/net/mlx5/mlx5_flow.c
-@@ -1836,7 +1836,6 @@ mlx5_flow_validate_item_vxlan(const struct rte_flow_item *item,
+@@ -1817,7 +1817,6 @@ mlx5_flow_validate_item_vxlan(const struct rte_flow_item *item,
  		uint32_t vlan_id;
  		uint8_t vni[4];
  	} id = { .vlan_id = 0, };
@@ -37,7 +38,7 @@
  
  
  	if (item_flags & MLX5_FLOW_LAYER_TUNNEL)
-@@ -1863,23 +1862,8 @@ mlx5_flow_validate_item_vxlan(const struct rte_flow_item *item,
+@@ -1844,23 +1843,8 @@ mlx5_flow_validate_item_vxlan(const struct rte_flow_item *item,
  		return ret;
  	if (spec) {
  		memcpy(&id.vni[1], spec->vni, 3);
@@ -61,7 +62,7 @@
  	if (!(item_flags & MLX5_FLOW_LAYER_OUTER))
  		return rte_flow_error_set(error, ENOTSUP,
  					  RTE_FLOW_ERROR_TYPE_ITEM, item,
-@@ -1918,7 +1902,6 @@ mlx5_flow_validate_item_vxlan_gpe(const struct rte_flow_item *item,
+@@ -1899,7 +1883,6 @@ mlx5_flow_validate_item_vxlan_gpe(const struct rte_flow_item *item,
  		uint32_t vlan_id;
  		uint8_t vni[4];
  	} id = { .vlan_id = 0, };
@@ -69,7 +70,7 @@
  
  	if (!priv->config.l3_vxlan_en)
  		return rte_flow_error_set(error, ENOTSUP,
-@@ -1956,22 +1939,8 @@ mlx5_flow_validate_item_vxlan_gpe(const struct rte_flow_item *item,
+@@ -1937,22 +1920,8 @@ mlx5_flow_validate_item_vxlan_gpe(const struct rte_flow_item *item,
  						  "VxLAN-GPE protocol"
  						  " not supported");
  		memcpy(&id.vni[1], spec->vni, 3);

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

* [dpdk-stable] patch 'net/mlx5: fix metadata for compressed Rx CQEs' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (18 preceding siblings ...)
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/mlx5: fix validation of VXLAN/VXLAN-GPE specs' " luca.boccassi
@ 2020-05-19 13:02   ` luca.boccassi
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/mlx5: update VLAN and encap actions validation' " luca.boccassi
                     ` (192 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:02 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 2491443dce6ed77dca06fb173f5c90f791cc2839 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Tue, 24 Mar 2020 12:15:18 +0000
Subject: [PATCH] net/mlx5: fix metadata for compressed Rx CQEs

[ upstream commit 70fa0b4ed083ea2444848716f5d396aba499b560 ]

If packets with the same metadata are received with compressed CQE
the metadata value is not copied from the title packet in vectorized
rx_burst routines, it causes wrong metadata values seeing by
applications.

Fixes: a18ac6113331 ("net/mlx5: add metadata support to Rx datapath")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx5/mlx5_rxtx_vec_altivec.h | 13 +++++++++++++
 drivers/net/mlx5/mlx5_rxtx_vec_neon.h    | 13 +++++++++++++
 drivers/net/mlx5/mlx5_rxtx_vec_sse.h     | 14 +++++++++++++-
 3 files changed, 39 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h b/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h
index 8e79883dfe..4df13b6d80 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h
@@ -263,6 +263,19 @@ rxq_cq_decompress_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
 			elts[pos + 2]->hash.fdir.hi = flow_tag;
 			elts[pos + 3]->hash.fdir.hi = flow_tag;
 		}
+		if (rte_flow_dynf_metadata_avail()) {
+			const uint32_t meta = *RTE_FLOW_DYNF_METADATA(t_pkt);
+
+			/* Check if title packet has valid metadata. */
+			if (meta) {
+				assert(t_pkt->ol_flags &
+					    PKT_RX_DYNF_METADATA);
+				*RTE_FLOW_DYNF_METADATA(elts[pos]) = meta;
+				*RTE_FLOW_DYNF_METADATA(elts[pos + 1]) = meta;
+				*RTE_FLOW_DYNF_METADATA(elts[pos + 2]) = meta;
+				*RTE_FLOW_DYNF_METADATA(elts[pos + 3]) = meta;
+			}
+		}
 
 		pos += MLX5_VPMD_DESCS_PER_LOOP;
 		/* Move to next CQE and invalidate consumed CQEs. */
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
index 86785c7496..b3a3e028ee 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
@@ -205,6 +205,19 @@ rxq_cq_decompress_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
 			elts[pos + 2]->hash.fdir.hi = flow_tag;
 			elts[pos + 3]->hash.fdir.hi = flow_tag;
 		}
+		if (rte_flow_dynf_metadata_avail()) {
+			const uint32_t meta = *RTE_FLOW_DYNF_METADATA(t_pkt);
+
+			/* Check if title packet has valid metadata. */
+			if (meta) {
+				assert(t_pkt->ol_flags &
+					    PKT_RX_DYNF_METADATA);
+				*RTE_FLOW_DYNF_METADATA(elts[pos]) = meta;
+				*RTE_FLOW_DYNF_METADATA(elts[pos + 1]) = meta;
+				*RTE_FLOW_DYNF_METADATA(elts[pos + 2]) = meta;
+				*RTE_FLOW_DYNF_METADATA(elts[pos + 3]) = meta;
+			}
+		}
 		pos += MLX5_VPMD_DESCS_PER_LOOP;
 		/* Move to next CQE and invalidate consumed CQEs. */
 		if (!(pos & 0x7) && pos < mcqe_n) {
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
index 35b7761007..8aa3f0489c 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
@@ -118,7 +118,6 @@ rxq_cq_decompress_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
 			     14, 15,  6,  7,
 			     10, 11,  2,  3);
 #endif
-
 	/*
 	 * A. load mCQEs into a 128bit register.
 	 * B. store rearm data to mbuf.
@@ -191,6 +190,19 @@ rxq_cq_decompress_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
 			elts[pos + 2]->hash.fdir.hi = flow_tag;
 			elts[pos + 3]->hash.fdir.hi = flow_tag;
 		}
+		if (rte_flow_dynf_metadata_avail()) {
+			const uint32_t meta = *RTE_FLOW_DYNF_METADATA(t_pkt);
+
+			/* Check if title packet has valid metadata. */
+			if (meta) {
+				assert(t_pkt->ol_flags &
+					    PKT_RX_DYNF_METADATA);
+				*RTE_FLOW_DYNF_METADATA(elts[pos]) = meta;
+				*RTE_FLOW_DYNF_METADATA(elts[pos + 1]) = meta;
+				*RTE_FLOW_DYNF_METADATA(elts[pos + 2]) = meta;
+				*RTE_FLOW_DYNF_METADATA(elts[pos + 3]) = meta;
+			}
+		}
 		pos += MLX5_VPMD_DESCS_PER_LOOP;
 		/* Move to next CQE and invalidate consumed CQEs. */
 		if (!(pos & 0x7) && pos < mcqe_n) {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:45.467678005 +0100
+++ 0021-net-mlx5-fix-metadata-for-compressed-Rx-CQEs.patch	2020-05-19 14:04:44.136646922 +0100
@@ -1,15 +1,16 @@
-From 70fa0b4ed083ea2444848716f5d396aba499b560 Mon Sep 17 00:00:00 2001
+From 2491443dce6ed77dca06fb173f5c90f791cc2839 Mon Sep 17 00:00:00 2001
 From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
 Date: Tue, 24 Mar 2020 12:15:18 +0000
 Subject: [PATCH] net/mlx5: fix metadata for compressed Rx CQEs
 
+[ upstream commit 70fa0b4ed083ea2444848716f5d396aba499b560 ]
+
 If packets with the same metadata are received with compressed CQE
 the metadata value is not copied from the title packet in vectorized
 rx_burst routines, it causes wrong metadata values seeing by
 applications.
 
 Fixes: a18ac6113331 ("net/mlx5: add metadata support to Rx datapath")
-Cc: stable@dpdk.org
 
 Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
 Acked-by: Matan Azrad <matan@mellanox.com>
@@ -20,7 +21,7 @@
  3 files changed, 39 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h b/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h
-index 8e8d59ae83..d55642e57a 100644
+index 8e79883dfe..4df13b6d80 100644
 --- a/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h
 +++ b/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h
 @@ -263,6 +263,19 @@ rxq_cq_decompress_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
@@ -32,7 +33,7 @@
 +
 +			/* Check if title packet has valid metadata. */
 +			if (meta) {
-+				MLX5_ASSERT(t_pkt->ol_flags &
++				assert(t_pkt->ol_flags &
 +					    PKT_RX_DYNF_METADATA);
 +				*RTE_FLOW_DYNF_METADATA(elts[pos]) = meta;
 +				*RTE_FLOW_DYNF_METADATA(elts[pos + 1]) = meta;
@@ -44,7 +45,7 @@
  		pos += MLX5_VPMD_DESCS_PER_LOOP;
  		/* Move to next CQE and invalidate consumed CQEs. */
 diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
-index 6d952df787..701e5e0cd5 100644
+index 86785c7496..b3a3e028ee 100644
 --- a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
 +++ b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
 @@ -205,6 +205,19 @@ rxq_cq_decompress_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
@@ -56,7 +57,7 @@
 +
 +			/* Check if title packet has valid metadata. */
 +			if (meta) {
-+				MLX5_ASSERT(t_pkt->ol_flags &
++				assert(t_pkt->ol_flags &
 +					    PKT_RX_DYNF_METADATA);
 +				*RTE_FLOW_DYNF_METADATA(elts[pos]) = meta;
 +				*RTE_FLOW_DYNF_METADATA(elts[pos + 1]) = meta;
@@ -68,7 +69,7 @@
  		/* Move to next CQE and invalidate consumed CQEs. */
  		if (!(pos & 0x7) && pos < mcqe_n) {
 diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
-index 406f23f595..a4086df2e9 100644
+index 35b7761007..8aa3f0489c 100644
 --- a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
 +++ b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
 @@ -118,7 +118,6 @@ rxq_cq_decompress_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
@@ -88,7 +89,7 @@
 +
 +			/* Check if title packet has valid metadata. */
 +			if (meta) {
-+				MLX5_ASSERT(t_pkt->ol_flags &
++				assert(t_pkt->ol_flags &
 +					    PKT_RX_DYNF_METADATA);
 +				*RTE_FLOW_DYNF_METADATA(elts[pos]) = meta;
 +				*RTE_FLOW_DYNF_METADATA(elts[pos + 1]) = meta;

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

* [dpdk-stable] patch 'net/mlx5: update VLAN and encap actions validation' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (19 preceding siblings ...)
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/mlx5: fix metadata for compressed Rx CQEs' " luca.boccassi
@ 2020-05-19 13:02   ` luca.boccassi
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/mlx5: fix call to modify action without init item' " luca.boccassi
                     ` (191 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:02 UTC (permalink / raw)
  To: Dekel Peled; +Cc: Jack Min, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 24f6ab6d31de3da65bc97dc7079b1a57c2257c4d Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Tue, 24 Mar 2020 14:58:11 +0200
Subject: [PATCH] net/mlx5: update VLAN and encap actions validation

[ upstream commit 9c4971e5231d1fb169ca6f74c9af795953500e88 ]

Flow rule in NIC table on VF representor should not contain VLAN pop
or push actions, and encap or decap actions. Using these actions in
NIC table on VF representor is not a valid use case.
This patch updates the various validation functions to reject such
rules.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Jack Min <jackmin@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 82 +++++++++++++++++++++++++++------
 1 file changed, 67 insertions(+), 15 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index b2e0365c1f..48d3031c90 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1567,7 +1567,7 @@ flow_dv_validate_action_pop_vlan(struct rte_eth_dev *dev,
 				 const struct rte_flow_attr *attr,
 				 struct rte_flow_error *error)
 {
-	struct mlx5_priv *priv = dev->data->dev_private;
+	const struct mlx5_priv *priv = dev->data->dev_private;
 
 	(void)action;
 	(void)attr;
@@ -1598,6 +1598,11 @@ flow_dv_validate_action_pop_vlan(struct rte_eth_dev *dev,
 					  RTE_FLOW_ERROR_TYPE_ACTION, action,
 					  "wrong action order, port_id should "
 					  "be after pop VLAN action");
+	if (!attr->transfer && priv->representor)
+		return rte_flow_error_set(error, ENOTSUP,
+					  RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
+					  "pop vlan action for VF representor "
+					  "not supported on NIC table");
 	return 0;
 }
 
@@ -1661,6 +1666,8 @@ flow_dev_get_vlan_info_from_items(const struct rte_flow_item *items,
 /**
  * Validate the push VLAN action.
  *
+ * @param[in] dev
+ *   Pointer to the rte_eth_dev structure.
  * @param[in] action_flags
  *   Holds the actions detected until now.
  * @param[in] item_flags
@@ -1676,13 +1683,15 @@ flow_dev_get_vlan_info_from_items(const struct rte_flow_item *items,
  *   0 on success, a negative errno value otherwise and rte_errno is set.
  */
 static int
-flow_dv_validate_action_push_vlan(uint64_t action_flags,
+flow_dv_validate_action_push_vlan(struct rte_eth_dev *dev,
+				  uint64_t action_flags,
 				  uint64_t item_flags __rte_unused,
 				  const struct rte_flow_action *action,
 				  const struct rte_flow_attr *attr,
 				  struct rte_flow_error *error)
 {
 	const struct rte_flow_action_of_push_vlan *push_vlan = action->conf;
+	const struct mlx5_priv *priv = dev->data->dev_private;
 
 	if (!attr->transfer && attr->ingress)
 		return rte_flow_error_set(error, ENOTSUP,
@@ -1705,6 +1714,11 @@ flow_dv_validate_action_push_vlan(uint64_t action_flags,
 					  RTE_FLOW_ERROR_TYPE_ACTION, action,
 					  "wrong action order, port_id should "
 					  "be after push VLAN");
+	if (!attr->transfer && priv->representor)
+		return rte_flow_error_set(error, ENOTSUP,
+					  RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
+					  "push vlan action for VF representor "
+					  "not supported on NIC table");
 	(void)attr;
 	return 0;
 }
@@ -2070,10 +2084,14 @@ notsup_err:
 /**
  * Validate the L2 encap action.
  *
+ * @param[in] dev
+ *   Pointer to the rte_eth_dev structure.
  * @param[in] action_flags
  *   Holds the actions detected until now.
  * @param[in] action
  *   Pointer to the action structure.
+ * @param[in] attr
+ *   Pointer to flow attributes.
  * @param[out] error
  *   Pointer to error structure.
  *
@@ -2081,10 +2099,14 @@ notsup_err:
  *   0 on success, a negative errno value otherwise and rte_errno is set.
  */
 static int
-flow_dv_validate_action_l2_encap(uint64_t action_flags,
+flow_dv_validate_action_l2_encap(struct rte_eth_dev *dev,
+				 uint64_t action_flags,
 				 const struct rte_flow_action *action,
+				 const struct rte_flow_attr *attr,
 				 struct rte_flow_error *error)
 {
+	const struct mlx5_priv *priv = dev->data->dev_private;
+
 	if (!(action->conf))
 		return rte_flow_error_set(error, EINVAL,
 					  RTE_FLOW_ERROR_TYPE_ACTION, action,
@@ -2094,12 +2116,19 @@ flow_dv_validate_action_l2_encap(uint64_t action_flags,
 					  RTE_FLOW_ERROR_TYPE_ACTION, NULL,
 					  "can only have a single encap action "
 					  "in a flow");
+	if (!attr->transfer && priv->representor)
+		return rte_flow_error_set(error, ENOTSUP,
+					  RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
+					  "encap action for VF representor "
+					  "not supported on NIC table");
 	return 0;
 }
 
 /**
  * Validate a decap action.
  *
+ * @param[in] dev
+ *   Pointer to the rte_eth_dev structure.
  * @param[in] action_flags
  *   Holds the actions detected until now.
  * @param[in] attr
@@ -2111,10 +2140,13 @@ flow_dv_validate_action_l2_encap(uint64_t action_flags,
  *   0 on success, a negative errno value otherwise and rte_errno is set.
  */
 static int
-flow_dv_validate_action_decap(uint64_t action_flags,
-				 const struct rte_flow_attr *attr,
-				 struct rte_flow_error *error)
+flow_dv_validate_action_decap(struct rte_eth_dev *dev,
+			      uint64_t action_flags,
+			      const struct rte_flow_attr *attr,
+			      struct rte_flow_error *error)
 {
+	const struct mlx5_priv *priv = dev->data->dev_private;
+
 	if (action_flags & MLX5_FLOW_XCAP_ACTIONS)
 		return rte_flow_error_set(error, ENOTSUP,
 					  RTE_FLOW_ERROR_TYPE_ACTION, NULL,
@@ -2133,6 +2165,11 @@ flow_dv_validate_action_decap(uint64_t action_flags,
 					  NULL,
 					  "decap action not supported for "
 					  "egress");
+	if (!attr->transfer && priv->representor)
+		return rte_flow_error_set(error, ENOTSUP,
+					  RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
+					  "decap action for VF representor "
+					  "not supported on NIC table");
 	return 0;
 }
 
@@ -2141,6 +2178,8 @@ const struct rte_flow_action_raw_decap empty_decap = {.data = NULL, .size = 0,};
 /**
  * Validate the raw encap and decap actions.
  *
+ * @param[in] dev
+ *   Pointer to the rte_eth_dev structure.
  * @param[in] decap
  *   Pointer to the decap action.
  * @param[in] encap
@@ -2159,11 +2198,13 @@ const struct rte_flow_action_raw_decap empty_decap = {.data = NULL, .size = 0,};
  */
 static int
 flow_dv_validate_action_raw_encap_decap
-	(const struct rte_flow_action_raw_decap *decap,
+	(struct rte_eth_dev *dev,
+	 const struct rte_flow_action_raw_decap *decap,
 	 const struct rte_flow_action_raw_encap *encap,
 	 const struct rte_flow_attr *attr, uint64_t *action_flags,
 	 int *actions_n, struct rte_flow_error *error)
 {
+	const struct mlx5_priv *priv = dev->data->dev_private;
 	int ret;
 
 	if (encap && (!encap->size || !encap->data))
@@ -2196,7 +2237,8 @@ flow_dv_validate_action_raw_encap_decap
 				"encap combination");
 	}
 	if (decap) {
-		ret = flow_dv_validate_action_decap(*action_flags, attr, error);
+		ret = flow_dv_validate_action_decap(dev, *action_flags, attr,
+						    error);
 		if (ret < 0)
 			return ret;
 		*action_flags |= MLX5_FLOW_ACTION_DECAP;
@@ -2213,6 +2255,12 @@ flow_dv_validate_action_raw_encap_decap
 						  RTE_FLOW_ERROR_TYPE_ACTION,
 						  NULL,
 						  "more than one encap action");
+		if (!attr->transfer && priv->representor)
+			return rte_flow_error_set
+					(error, ENOTSUP,
+					 RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
+					 "encap action for VF representor "
+					 "not supported on NIC table");
 		*action_flags |= MLX5_FLOW_ACTION_ENCAP;
 		++(*actions_n);
 	}
@@ -4654,7 +4702,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 			++actions_n;
 			break;
 		case RTE_FLOW_ACTION_TYPE_OF_PUSH_VLAN:
-			ret = flow_dv_validate_action_push_vlan(action_flags,
+			ret = flow_dv_validate_action_push_vlan(dev,
+								action_flags,
 								item_flags,
 								actions, attr,
 								error);
@@ -4682,8 +4731,10 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 			break;
 		case RTE_FLOW_ACTION_TYPE_VXLAN_ENCAP:
 		case RTE_FLOW_ACTION_TYPE_NVGRE_ENCAP:
-			ret = flow_dv_validate_action_l2_encap(action_flags,
-							       actions, error);
+			ret = flow_dv_validate_action_l2_encap(dev,
+							       action_flags,
+							       actions, attr,
+							       error);
 			if (ret < 0)
 				return ret;
 			action_flags |= MLX5_FLOW_ACTION_ENCAP;
@@ -4691,8 +4742,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 			break;
 		case RTE_FLOW_ACTION_TYPE_VXLAN_DECAP:
 		case RTE_FLOW_ACTION_TYPE_NVGRE_DECAP:
-			ret = flow_dv_validate_action_decap(action_flags, attr,
-							    error);
+			ret = flow_dv_validate_action_decap(dev, action_flags,
+							    attr, error);
 			if (ret < 0)
 				return ret;
 			action_flags |= MLX5_FLOW_ACTION_DECAP;
@@ -4700,7 +4751,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 			break;
 		case RTE_FLOW_ACTION_TYPE_RAW_ENCAP:
 			ret = flow_dv_validate_action_raw_encap_decap
-				(NULL, actions->conf, attr, &action_flags,
+				(dev, NULL, actions->conf, attr, &action_flags,
 				 &actions_n, error);
 			if (ret < 0)
 				return ret;
@@ -4716,7 +4767,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 				encap = actions->conf;
 			}
 			ret = flow_dv_validate_action_raw_encap_decap
-					   (decap ? decap : &empty_decap, encap,
+					   (dev,
+					    decap ? decap : &empty_decap, encap,
 					    attr, &action_flags, &actions_n,
 					    error);
 			if (ret < 0)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:45.506264192 +0100
+++ 0022-net-mlx5-update-VLAN-and-encap-actions-validation.patch	2020-05-19 14:04:44.144647067 +0100
@@ -1,16 +1,16 @@
-From 9c4971e5231d1fb169ca6f74c9af795953500e88 Mon Sep 17 00:00:00 2001
+From 24f6ab6d31de3da65bc97dc7079b1a57c2257c4d Mon Sep 17 00:00:00 2001
 From: Dekel Peled <dekelp@mellanox.com>
 Date: Tue, 24 Mar 2020 14:58:11 +0200
 Subject: [PATCH] net/mlx5: update VLAN and encap actions validation
 
+[ upstream commit 9c4971e5231d1fb169ca6f74c9af795953500e88 ]
+
 Flow rule in NIC table on VF representor should not contain VLAN pop
 or push actions, and encap or decap actions. Using these actions in
 NIC table on VF representor is not a valid use case.
 This patch updates the various validation functions to reject such
 rules.
 
-Cc: stable@dpdk.org
-
 Signed-off-by: Dekel Peled <dekelp@mellanox.com>
 Acked-by: Jack Min <jackmin@mellanox.com>
 ---
@@ -18,10 +18,10 @@
  1 file changed, 67 insertions(+), 15 deletions(-)
 
 diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index 809833b7ee..f90cab2961 100644
+index b2e0365c1f..48d3031c90 100644
 --- a/drivers/net/mlx5/mlx5_flow_dv.c
 +++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -1698,7 +1698,7 @@ flow_dv_validate_action_pop_vlan(struct rte_eth_dev *dev,
+@@ -1567,7 +1567,7 @@ flow_dv_validate_action_pop_vlan(struct rte_eth_dev *dev,
  				 const struct rte_flow_attr *attr,
  				 struct rte_flow_error *error)
  {
@@ -30,7 +30,7 @@
  
  	(void)action;
  	(void)attr;
-@@ -1729,6 +1729,11 @@ flow_dv_validate_action_pop_vlan(struct rte_eth_dev *dev,
+@@ -1598,6 +1598,11 @@ flow_dv_validate_action_pop_vlan(struct rte_eth_dev *dev,
  					  RTE_FLOW_ERROR_TYPE_ACTION, action,
  					  "wrong action order, port_id should "
  					  "be after pop VLAN action");
@@ -42,7 +42,7 @@
  	return 0;
  }
  
-@@ -1792,6 +1797,8 @@ flow_dev_get_vlan_info_from_items(const struct rte_flow_item *items,
+@@ -1661,6 +1666,8 @@ flow_dev_get_vlan_info_from_items(const struct rte_flow_item *items,
  /**
   * Validate the push VLAN action.
   *
@@ -51,7 +51,7 @@
   * @param[in] action_flags
   *   Holds the actions detected until now.
   * @param[in] item_flags
-@@ -1807,13 +1814,15 @@ flow_dev_get_vlan_info_from_items(const struct rte_flow_item *items,
+@@ -1676,13 +1683,15 @@ flow_dev_get_vlan_info_from_items(const struct rte_flow_item *items,
   *   0 on success, a negative errno value otherwise and rte_errno is set.
   */
  static int
@@ -68,7 +68,7 @@
  
  	if (!attr->transfer && attr->ingress)
  		return rte_flow_error_set(error, ENOTSUP,
-@@ -1836,6 +1845,11 @@ flow_dv_validate_action_push_vlan(uint64_t action_flags,
+@@ -1705,6 +1714,11 @@ flow_dv_validate_action_push_vlan(uint64_t action_flags,
  					  RTE_FLOW_ERROR_TYPE_ACTION, action,
  					  "wrong action order, port_id should "
  					  "be after push VLAN");
@@ -80,7 +80,7 @@
  	(void)attr;
  	return 0;
  }
-@@ -2201,10 +2215,14 @@ notsup_err:
+@@ -2070,10 +2084,14 @@ notsup_err:
  /**
   * Validate the L2 encap action.
   *
@@ -95,7 +95,7 @@
   * @param[out] error
   *   Pointer to error structure.
   *
-@@ -2212,10 +2230,14 @@ notsup_err:
+@@ -2081,10 +2099,14 @@ notsup_err:
   *   0 on success, a negative errno value otherwise and rte_errno is set.
   */
  static int
@@ -111,7 +111,7 @@
  	if (!(action->conf))
  		return rte_flow_error_set(error, EINVAL,
  					  RTE_FLOW_ERROR_TYPE_ACTION, action,
-@@ -2225,12 +2247,19 @@ flow_dv_validate_action_l2_encap(uint64_t action_flags,
+@@ -2094,12 +2116,19 @@ flow_dv_validate_action_l2_encap(uint64_t action_flags,
  					  RTE_FLOW_ERROR_TYPE_ACTION, NULL,
  					  "can only have a single encap action "
  					  "in a flow");
@@ -131,7 +131,7 @@
   * @param[in] action_flags
   *   Holds the actions detected until now.
   * @param[in] attr
-@@ -2242,10 +2271,13 @@ flow_dv_validate_action_l2_encap(uint64_t action_flags,
+@@ -2111,10 +2140,13 @@ flow_dv_validate_action_l2_encap(uint64_t action_flags,
   *   0 on success, a negative errno value otherwise and rte_errno is set.
   */
  static int
@@ -148,7 +148,7 @@
  	if (action_flags & MLX5_FLOW_XCAP_ACTIONS)
  		return rte_flow_error_set(error, ENOTSUP,
  					  RTE_FLOW_ERROR_TYPE_ACTION, NULL,
-@@ -2264,6 +2296,11 @@ flow_dv_validate_action_decap(uint64_t action_flags,
+@@ -2133,6 +2165,11 @@ flow_dv_validate_action_decap(uint64_t action_flags,
  					  NULL,
  					  "decap action not supported for "
  					  "egress");
@@ -160,7 +160,7 @@
  	return 0;
  }
  
-@@ -2272,6 +2309,8 @@ const struct rte_flow_action_raw_decap empty_decap = {.data = NULL, .size = 0,};
+@@ -2141,6 +2178,8 @@ const struct rte_flow_action_raw_decap empty_decap = {.data = NULL, .size = 0,};
  /**
   * Validate the raw encap and decap actions.
   *
@@ -169,7 +169,7 @@
   * @param[in] decap
   *   Pointer to the decap action.
   * @param[in] encap
-@@ -2290,11 +2329,13 @@ const struct rte_flow_action_raw_decap empty_decap = {.data = NULL, .size = 0,};
+@@ -2159,11 +2198,13 @@ const struct rte_flow_action_raw_decap empty_decap = {.data = NULL, .size = 0,};
   */
  static int
  flow_dv_validate_action_raw_encap_decap
@@ -184,7 +184,7 @@
  	int ret;
  
  	if (encap && (!encap->size || !encap->data))
-@@ -2327,7 +2368,8 @@ flow_dv_validate_action_raw_encap_decap
+@@ -2196,7 +2237,8 @@ flow_dv_validate_action_raw_encap_decap
  				"encap combination");
  	}
  	if (decap) {
@@ -194,7 +194,7 @@
  		if (ret < 0)
  			return ret;
  		*action_flags |= MLX5_FLOW_ACTION_DECAP;
-@@ -2344,6 +2386,12 @@ flow_dv_validate_action_raw_encap_decap
+@@ -2213,6 +2255,12 @@ flow_dv_validate_action_raw_encap_decap
  						  RTE_FLOW_ERROR_TYPE_ACTION,
  						  NULL,
  						  "more than one encap action");
@@ -207,7 +207,7 @@
  		*action_flags |= MLX5_FLOW_ACTION_ENCAP;
  		++(*actions_n);
  	}
-@@ -4889,7 +4937,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -4654,7 +4702,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
  			++actions_n;
  			break;
  		case RTE_FLOW_ACTION_TYPE_OF_PUSH_VLAN:
@@ -217,7 +217,7 @@
  								item_flags,
  								actions, attr,
  								error);
-@@ -4917,8 +4966,10 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -4682,8 +4731,10 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
  			break;
  		case RTE_FLOW_ACTION_TYPE_VXLAN_ENCAP:
  		case RTE_FLOW_ACTION_TYPE_NVGRE_ENCAP:
@@ -230,7 +230,7 @@
  			if (ret < 0)
  				return ret;
  			action_flags |= MLX5_FLOW_ACTION_ENCAP;
-@@ -4926,8 +4977,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -4691,8 +4742,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
  			break;
  		case RTE_FLOW_ACTION_TYPE_VXLAN_DECAP:
  		case RTE_FLOW_ACTION_TYPE_NVGRE_DECAP:
@@ -241,7 +241,7 @@
  			if (ret < 0)
  				return ret;
  			action_flags |= MLX5_FLOW_ACTION_DECAP;
-@@ -4935,7 +4986,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -4700,7 +4751,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
  			break;
  		case RTE_FLOW_ACTION_TYPE_RAW_ENCAP:
  			ret = flow_dv_validate_action_raw_encap_decap
@@ -250,7 +250,7 @@
  				 &actions_n, error);
  			if (ret < 0)
  				return ret;
-@@ -4951,7 +5002,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -4716,7 +4767,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
  				encap = actions->conf;
  			}
  			ret = flow_dv_validate_action_raw_encap_decap

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

* [dpdk-stable] patch 'net/mlx5: fix call to modify action without init item' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (20 preceding siblings ...)
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/mlx5: update VLAN and encap actions validation' " luca.boccassi
@ 2020-05-19 13:02   ` luca.boccassi
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/mlx5: fix zero value validation for metadata' " luca.boccassi
                     ` (190 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:02 UTC (permalink / raw)
  To: Asaf Penso; +Cc: Dekel Peled, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 5e3859176e72c3adac5bda7123a05c26a4a126b0 Mon Sep 17 00:00:00 2001
From: Asaf Penso <asafp@mellanox.com>
Date: Wed, 25 Mar 2020 19:53:18 +0000
Subject: [PATCH] net/mlx5: fix call to modify action without init item

[ upstream commit 7c2062c45193f46b81617a207b0dcd3940ce11ab ]

The item is being set according to the attribute value, whether it is
udp/tcp or ipv4/6.
Also, there are two condition calls.

If the attribute is neither udp/tcp or ipv4/6 the item is not
initialized at all, but the call to the flow_dv_convert_modify_action is
still being done.
Also, even if the attribute is tcp/udp or ipv4/6, we still have two
conditions.

This patch changes the conditions, so the item will always be set.
By doing this, there is also a save in the number of condition calls.

Fixes: 4bb14c83df95 ("net/mlx5: support modify header using Direct Verbs")

Signed-off-by: Asaf Penso <asafp@mellanox.com>
Reviewed-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 48d3031c90..076a30544f 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -697,8 +697,8 @@ flow_dv_convert_action_modify_tp
 		item.spec = &udp;
 		item.mask = &udp_mask;
 		field = modify_udp;
-	}
-	if (attr->tcp) {
+	} else {
+		assert(attr->tcp);
 		memset(&tcp, 0, sizeof(tcp));
 		memset(&tcp_mask, 0, sizeof(tcp_mask));
 		if (action->type == RTE_FLOW_ACTION_TYPE_SET_TP_SRC) {
@@ -768,8 +768,8 @@ flow_dv_convert_action_modify_ttl
 		item.spec = &ipv4;
 		item.mask = &ipv4_mask;
 		field = modify_ipv4;
-	}
-	if (attr->ipv6) {
+	} else {
+		assert(attr->ipv6);
 		memset(&ipv6, 0, sizeof(ipv6));
 		memset(&ipv6_mask, 0, sizeof(ipv6_mask));
 		ipv6.hdr.hop_limits = conf->ttl_value;
@@ -829,8 +829,8 @@ flow_dv_convert_action_modify_dec_ttl
 		item.spec = &ipv4;
 		item.mask = &ipv4_mask;
 		field = modify_ipv4;
-	}
-	if (attr->ipv6) {
+	} else {
+		assert(attr->ipv6);
 		memset(&ipv6, 0, sizeof(ipv6));
 		memset(&ipv6_mask, 0, sizeof(ipv6_mask));
 		ipv6.hdr.hop_limits = 0xFF;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:45.549535918 +0100
+++ 0023-net-mlx5-fix-call-to-modify-action-without-init-item.patch	2020-05-19 14:04:44.148647140 +0100
@@ -1,8 +1,10 @@
-From 7c2062c45193f46b81617a207b0dcd3940ce11ab Mon Sep 17 00:00:00 2001
+From 5e3859176e72c3adac5bda7123a05c26a4a126b0 Mon Sep 17 00:00:00 2001
 From: Asaf Penso <asafp@mellanox.com>
 Date: Wed, 25 Mar 2020 19:53:18 +0000
 Subject: [PATCH] net/mlx5: fix call to modify action without init item
 
+[ upstream commit 7c2062c45193f46b81617a207b0dcd3940ce11ab ]
+
 The item is being set according to the attribute value, whether it is
 udp/tcp or ipv4/6.
 Also, there are two condition calls.
@@ -17,7 +19,6 @@
 By doing this, there is also a save in the number of condition calls.
 
 Fixes: 4bb14c83df95 ("net/mlx5: support modify header using Direct Verbs")
-Cc: stable@dpdk.org
 
 Signed-off-by: Asaf Penso <asafp@mellanox.com>
 Reviewed-by: Dekel Peled <dekelp@mellanox.com>
@@ -27,39 +28,39 @@
  1 file changed, 6 insertions(+), 6 deletions(-)
 
 diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index f90cab2961..b9bf83a4b7 100644
+index 48d3031c90..076a30544f 100644
 --- a/drivers/net/mlx5/mlx5_flow_dv.c
 +++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -702,8 +702,8 @@ flow_dv_convert_action_modify_tp
+@@ -697,8 +697,8 @@ flow_dv_convert_action_modify_tp
  		item.spec = &udp;
  		item.mask = &udp_mask;
  		field = modify_udp;
 -	}
 -	if (attr->tcp) {
 +	} else {
-+		MLX5_ASSERT(attr->tcp);
++		assert(attr->tcp);
  		memset(&tcp, 0, sizeof(tcp));
  		memset(&tcp_mask, 0, sizeof(tcp_mask));
  		if (action->type == RTE_FLOW_ACTION_TYPE_SET_TP_SRC) {
-@@ -773,8 +773,8 @@ flow_dv_convert_action_modify_ttl
+@@ -768,8 +768,8 @@ flow_dv_convert_action_modify_ttl
  		item.spec = &ipv4;
  		item.mask = &ipv4_mask;
  		field = modify_ipv4;
 -	}
 -	if (attr->ipv6) {
 +	} else {
-+		MLX5_ASSERT(attr->ipv6);
++		assert(attr->ipv6);
  		memset(&ipv6, 0, sizeof(ipv6));
  		memset(&ipv6_mask, 0, sizeof(ipv6_mask));
  		ipv6.hdr.hop_limits = conf->ttl_value;
-@@ -834,8 +834,8 @@ flow_dv_convert_action_modify_dec_ttl
+@@ -829,8 +829,8 @@ flow_dv_convert_action_modify_dec_ttl
  		item.spec = &ipv4;
  		item.mask = &ipv4_mask;
  		field = modify_ipv4;
 -	}
 -	if (attr->ipv6) {
 +	} else {
-+		MLX5_ASSERT(attr->ipv6);
++		assert(attr->ipv6);
  		memset(&ipv6, 0, sizeof(ipv6));
  		memset(&ipv6_mask, 0, sizeof(ipv6_mask));
  		ipv6.hdr.hop_limits = 0xFF;

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

* [dpdk-stable] patch 'net/mlx5: fix zero value validation for metadata' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (21 preceding siblings ...)
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/mlx5: fix call to modify action without init item' " luca.boccassi
@ 2020-05-19 13:02   ` luca.boccassi
  2020-05-19 13:02   ` [dpdk-stable] patch 'examples/vmdq: fix output of pools/queues' " luca.boccassi
                     ` (189 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:02 UTC (permalink / raw)
  To: Wisam Jaddo; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From d9a7bf74e175f3712637342639e2acf108be99ea Mon Sep 17 00:00:00 2001
From: Wisam Jaddo <wisamm@mellanox.com>
Date: Thu, 26 Mar 2020 10:22:00 +0000
Subject: [PATCH] net/mlx5: fix zero value validation for metadata

[ upstream commit dac98e878043bbdc11a9bc3eaff3c46321730ea7 ]

MARK and META items are interrelated with datapath -
they might move from/to the applications in mbuf.

zero value for these items has the special meaning -
it means "no metadata are provided", not zero values
are treated by applications and PMD as valid ones.

Moreover in the flow engine domain the value zero is
acceptable to match and set, and we should allow to
specify zero values as rte_flow parameters for the
META and MARK items and actions. In the same time
zero mask has no meaning and should be rejected
on validation stage.

Fixes: fcc8d2f716fd ("net/mlx5: extend flow metadata support")
Fixes: e554b672aa05 ("net/mlx5: support flow tag")
Fixes: 55deee1715f0 ("net/mlx5: extend flow mark support")

Signed-off-by: Wisam Jaddo <wisamm@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
 doc/guides/nics/mlx5.rst        | 13 +++++++++++++
 drivers/net/mlx5/mlx5_flow_dv.c | 19 +++++++++++++++----
 2 files changed, 28 insertions(+), 4 deletions(-)

diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
index 86ad404513..830a02dc90 100644
--- a/doc/guides/nics/mlx5.rst
+++ b/doc/guides/nics/mlx5.rst
@@ -1214,6 +1214,19 @@ Supported hardware offloads
    |                       | |  ConnectX-5   | | ConnectX-5    |
    +-----------------------+-----------------+-----------------+
 
+Notes for metadata
+------------------
+
+MARK and META items are interrelated with datapath - they might move from/to
+the applications in mbuf fields. Hence, zero value for these items has the
+special meaning - it means "no metadata are provided", not zero values are
+treated by applications and PMD as valid ones.
+
+Moreover in the flow engine domain the value zero is acceptable to match and
+set, and we should allow to specify zero values as rte_flow parameters for the
+META and MARK items and actions. In the same time zero mask has no meaning and
+should be rejected on validation stage.
+
 Notes for testpmd
 -----------------
 
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 076a30544f..f0edb98c02 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1325,6 +1325,11 @@ flow_dv_validate_item_mark(struct rte_eth_dev *dev,
 					  "mark id exceeds the limit");
 	if (!mask)
 		mask = &nic_mask;
+	if (!mask->id)
+		return rte_flow_error_set(error, EINVAL,
+					RTE_FLOW_ERROR_TYPE_ITEM_SPEC, NULL,
+					"mask cannot be zero");
+
 	ret = mlx5_flow_item_acceptable(item, (const uint8_t *)mask,
 					(const uint8_t *)&nic_mask,
 					sizeof(struct rte_flow_item_mark),
@@ -1370,10 +1375,6 @@ flow_dv_validate_item_meta(struct rte_eth_dev *dev __rte_unused,
 					  RTE_FLOW_ERROR_TYPE_ITEM_SPEC,
 					  item->spec,
 					  "data cannot be empty");
-	if (!spec->data)
-		return rte_flow_error_set(error, EINVAL,
-					  RTE_FLOW_ERROR_TYPE_ITEM_SPEC, NULL,
-					  "data cannot be zero");
 	if (config->dv_xmeta_en != MLX5_XMETA_MODE_LEGACY) {
 		if (!mlx5_flow_ext_mreg_supported(dev))
 			return rte_flow_error_set(error, ENOTSUP,
@@ -1393,6 +1394,11 @@ flow_dv_validate_item_meta(struct rte_eth_dev *dev __rte_unused,
 	}
 	if (!mask)
 		mask = &rte_flow_item_meta_mask;
+	if (!mask->data)
+		return rte_flow_error_set(error, EINVAL,
+					RTE_FLOW_ERROR_TYPE_ITEM_SPEC, NULL,
+					"mask cannot be zero");
+
 	ret = mlx5_flow_item_acceptable(item, (const uint8_t *)mask,
 					(const uint8_t *)&nic_mask,
 					sizeof(struct rte_flow_item_meta),
@@ -1441,6 +1447,11 @@ flow_dv_validate_item_tag(struct rte_eth_dev *dev,
 					  "data cannot be empty");
 	if (!mask)
 		mask = &rte_flow_item_tag_mask;
+	if (!mask->data)
+		return rte_flow_error_set(error, EINVAL,
+					RTE_FLOW_ERROR_TYPE_ITEM_SPEC, NULL,
+					"mask cannot be zero");
+
 	ret = mlx5_flow_item_acceptable(item, (const uint8_t *)mask,
 					(const uint8_t *)&nic_mask,
 					sizeof(struct rte_flow_item_tag),
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:45.596467218 +0100
+++ 0024-net-mlx5-fix-zero-value-validation-for-metadata.patch	2020-05-19 14:04:44.156647285 +0100
@@ -1,8 +1,10 @@
-From dac98e878043bbdc11a9bc3eaff3c46321730ea7 Mon Sep 17 00:00:00 2001
+From d9a7bf74e175f3712637342639e2acf108be99ea Mon Sep 17 00:00:00 2001
 From: Wisam Jaddo <wisamm@mellanox.com>
 Date: Thu, 26 Mar 2020 10:22:00 +0000
 Subject: [PATCH] net/mlx5: fix zero value validation for metadata
 
+[ upstream commit dac98e878043bbdc11a9bc3eaff3c46321730ea7 ]
+
 MARK and META items are interrelated with datapath -
 they might move from/to the applications in mbuf.
 
@@ -20,7 +22,6 @@
 Fixes: fcc8d2f716fd ("net/mlx5: extend flow metadata support")
 Fixes: e554b672aa05 ("net/mlx5: support flow tag")
 Fixes: 55deee1715f0 ("net/mlx5: extend flow mark support")
-Cc: stable@dpdk.org
 
 Signed-off-by: Wisam Jaddo <wisamm@mellanox.com>
 Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
@@ -30,10 +31,10 @@
  2 files changed, 28 insertions(+), 4 deletions(-)
 
 diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
-index e8f9984df0..ca4ded2f22 100644
+index 86ad404513..830a02dc90 100644
 --- a/doc/guides/nics/mlx5.rst
 +++ b/doc/guides/nics/mlx5.rst
-@@ -1275,6 +1275,19 @@ Supported hardware offloads
+@@ -1214,6 +1214,19 @@ Supported hardware offloads
     |                       | |  ConnectX-5   | | ConnectX-5    |
     +-----------------------+-----------------+-----------------+
  
@@ -54,10 +55,10 @@
  -----------------
  
 diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index b9bf83a4b7..7b3d419bf8 100644
+index 076a30544f..f0edb98c02 100644
 --- a/drivers/net/mlx5/mlx5_flow_dv.c
 +++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -1406,6 +1406,11 @@ flow_dv_validate_item_mark(struct rte_eth_dev *dev,
+@@ -1325,6 +1325,11 @@ flow_dv_validate_item_mark(struct rte_eth_dev *dev,
  					  "mark id exceeds the limit");
  	if (!mask)
  		mask = &nic_mask;
@@ -69,7 +70,7 @@
  	ret = mlx5_flow_item_acceptable(item, (const uint8_t *)mask,
  					(const uint8_t *)&nic_mask,
  					sizeof(struct rte_flow_item_mark),
-@@ -1451,10 +1456,6 @@ flow_dv_validate_item_meta(struct rte_eth_dev *dev __rte_unused,
+@@ -1370,10 +1375,6 @@ flow_dv_validate_item_meta(struct rte_eth_dev *dev __rte_unused,
  					  RTE_FLOW_ERROR_TYPE_ITEM_SPEC,
  					  item->spec,
  					  "data cannot be empty");
@@ -80,7 +81,7 @@
  	if (config->dv_xmeta_en != MLX5_XMETA_MODE_LEGACY) {
  		if (!mlx5_flow_ext_mreg_supported(dev))
  			return rte_flow_error_set(error, ENOTSUP,
-@@ -1474,6 +1475,11 @@ flow_dv_validate_item_meta(struct rte_eth_dev *dev __rte_unused,
+@@ -1393,6 +1394,11 @@ flow_dv_validate_item_meta(struct rte_eth_dev *dev __rte_unused,
  	}
  	if (!mask)
  		mask = &rte_flow_item_meta_mask;
@@ -92,7 +93,7 @@
  	ret = mlx5_flow_item_acceptable(item, (const uint8_t *)mask,
  					(const uint8_t *)&nic_mask,
  					sizeof(struct rte_flow_item_meta),
-@@ -1522,6 +1528,11 @@ flow_dv_validate_item_tag(struct rte_eth_dev *dev,
+@@ -1441,6 +1447,11 @@ flow_dv_validate_item_tag(struct rte_eth_dev *dev,
  					  "data cannot be empty");
  	if (!mask)
  		mask = &rte_flow_item_tag_mask;

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

* [dpdk-stable] patch 'examples/vmdq: fix output of pools/queues' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (22 preceding siblings ...)
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/mlx5: fix zero value validation for metadata' " luca.boccassi
@ 2020-05-19 13:02   ` luca.boccassi
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/mvneta: do not use PMD log type' " luca.boccassi
                     ` (188 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:02 UTC (permalink / raw)
  To: Junyu Jiang; +Cc: Xiaoyun Li, Yingya Han, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 1b70d8acd01e494549765f8968ce348bb376583c Mon Sep 17 00:00:00 2001
From: Junyu Jiang <junyux.jiang@intel.com>
Date: Mon, 2 Mar 2020 06:41:21 +0000
Subject: [PATCH] examples/vmdq: fix output of pools/queues

[ upstream commit 70c37e32083468e0496e5b12dbdd99d7a95d8b15 ]

To match the pools/queues configuration, the pools/queues output
should start from VMDQ base queue. This patch fixed the issue.

Fixes: 6bb97df521aa ("examples/vmdq: new app")

Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
Tested-by: Yingya Han <yingyax.han@intel.com>
---
 examples/vmdq/main.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/examples/vmdq/main.c b/examples/vmdq/main.c
index 6e6fc91ec0..74fe9a16ee 100644
--- a/examples/vmdq/main.c
+++ b/examples/vmdq/main.c
@@ -441,10 +441,11 @@ update_mac_address(struct rte_mbuf *m, unsigned dst_port)
 static void
 sighup_handler(int signum)
 {
-	unsigned q;
-	for (q = 0; q < num_queues; q++) {
-		if (q % (num_queues/num_pools) == 0)
-			printf("\nPool %u: ", q/(num_queues/num_pools));
+	unsigned int q = vmdq_queue_base;
+	for (; q < num_queues; q++) {
+		if ((q - vmdq_queue_base) % (num_vmdq_queues / num_pools) == 0)
+			printf("\nPool %u: ", (q - vmdq_queue_base) /
+			       (num_vmdq_queues / num_pools));
 		printf("%lu ", rxPackets[q]);
 	}
 	printf("\nFinished handling signal %d\n", signum);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:45.642698221 +0100
+++ 0025-examples-vmdq-fix-output-of-pools-queues.patch	2020-05-19 14:04:44.160647358 +0100
@@ -1,13 +1,14 @@
-From 70c37e32083468e0496e5b12dbdd99d7a95d8b15 Mon Sep 17 00:00:00 2001
+From 1b70d8acd01e494549765f8968ce348bb376583c Mon Sep 17 00:00:00 2001
 From: Junyu Jiang <junyux.jiang@intel.com>
 Date: Mon, 2 Mar 2020 06:41:21 +0000
 Subject: [PATCH] examples/vmdq: fix output of pools/queues
 
+[ upstream commit 70c37e32083468e0496e5b12dbdd99d7a95d8b15 ]
+
 To match the pools/queues configuration, the pools/queues output
 should start from VMDQ base queue. This patch fixed the issue.
 
 Fixes: 6bb97df521aa ("examples/vmdq: new app")
-Cc: stable@dpdk.org
 
 Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
 Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
@@ -17,7 +18,7 @@
  1 file changed, 5 insertions(+), 4 deletions(-)
 
 diff --git a/examples/vmdq/main.c b/examples/vmdq/main.c
-index 67aa558887..a66dd533c8 100644
+index 6e6fc91ec0..74fe9a16ee 100644
 --- a/examples/vmdq/main.c
 +++ b/examples/vmdq/main.c
 @@ -441,10 +441,11 @@ update_mac_address(struct rte_mbuf *m, unsigned dst_port)

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

* [dpdk-stable] patch 'net/mvneta: do not use PMD log type' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (23 preceding siblings ...)
  2020-05-19 13:02   ` [dpdk-stable] patch 'examples/vmdq: fix output of pools/queues' " luca.boccassi
@ 2020-05-19 13:02   ` luca.boccassi
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/virtio: " luca.boccassi
                     ` (187 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:02 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 80e04ea6aecee1571272f983d4ff3c96bf23331f Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Mon, 30 Mar 2020 21:41:50 -0700
Subject: [PATCH] net/mvneta: do not use PMD log type

[ upstream commit cb0205ce0a5440d68f5e320aa52cb737193857ac ]

The PMD logtype is legacy and should not be used.

Fixes: 3378383dceab ("net/mvneta: support statistics reset")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/mvneta/mvneta_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mvneta/mvneta_ethdev.c b/drivers/net/mvneta/mvneta_ethdev.c
index 865ad61aed..4aea876488 100644
--- a/drivers/net/mvneta/mvneta_ethdev.c
+++ b/drivers/net/mvneta/mvneta_ethdev.c
@@ -751,7 +751,7 @@ mvneta_stats_reset(struct rte_eth_dev *dev)
 
 	ret = mvneta_stats_get(dev, &priv->prev_stats);
 	if (unlikely(ret))
-		RTE_LOG(ERR, PMD, "Failed to reset port statistics");
+		MVNETA_LOG(ERR, "Failed to reset port statistics");
 
 	return ret;
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:45.677960498 +0100
+++ 0026-net-mvneta-do-not-use-PMD-log-type.patch	2020-05-19 14:04:44.160647358 +0100
@@ -1,12 +1,13 @@
-From cb0205ce0a5440d68f5e320aa52cb737193857ac Mon Sep 17 00:00:00 2001
+From 80e04ea6aecee1571272f983d4ff3c96bf23331f Mon Sep 17 00:00:00 2001
 From: Stephen Hemminger <stephen@networkplumber.org>
 Date: Mon, 30 Mar 2020 21:41:50 -0700
 Subject: [PATCH] net/mvneta: do not use PMD log type
 
+[ upstream commit cb0205ce0a5440d68f5e320aa52cb737193857ac ]
+
 The PMD logtype is legacy and should not be used.
 
 Fixes: 3378383dceab ("net/mvneta: support statistics reset")
-Cc: stable@dpdk.org
 
 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

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

* [dpdk-stable] patch 'net/virtio: do not use PMD log type' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (24 preceding siblings ...)
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/mvneta: do not use PMD log type' " luca.boccassi
@ 2020-05-19 13:02   ` luca.boccassi
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/tap: " luca.boccassi
                     ` (186 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:02 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 0bf29e36c3015e8a5bf315194caeaabc77363a0f Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Mon, 30 Mar 2020 21:41:51 -0700
Subject: [PATCH] net/virtio: do not use PMD log type

[ upstream commit 88fa5bb6b9807d55a3fbd34e5537fcf1ee7efb80 ]

Virtio driver has its own logtype and should not use legacy
PMD logtype.

Fixes: 32c118fd0059 ("virtio: free mbuf's with threshold")
Fixes: e5f456a98d3c ("net/virtio: support in-order Rx and Tx")
Fixes: 1c8489da561b ("net/virtio-user: fix multi-process support")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/virtio/virtio_rxtx.c        | 6 +++---
 drivers/net/virtio/virtio_user_ethdev.c | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
index 752faa0f6e..060410577a 100644
--- a/drivers/net/virtio/virtio_rxtx.c
+++ b/drivers/net/virtio/virtio_rxtx.c
@@ -1085,7 +1085,7 @@ virtio_dev_tx_queue_setup(struct rte_eth_dev *dev,
 			RTE_MIN(vq->vq_nentries / 4, DEFAULT_TX_FREE_THRESH);
 
 	if (tx_free_thresh >= (vq->vq_nentries - 3)) {
-		RTE_LOG(ERR, PMD, "tx_free_thresh must be less than the "
+		PMD_DRV_LOG(ERR, "tx_free_thresh must be less than the "
 			"number of TX entries minus 3 (%u)."
 			" (tx_free_thresh=%u port=%u queue=%u)\n",
 			vq->vq_nentries - 3,
@@ -1133,7 +1133,7 @@ virtio_discard_rxbuf(struct virtqueue *vq, struct rte_mbuf *m)
 		error = virtqueue_enqueue_recv_refill(vq, &m, 1);
 
 	if (unlikely(error)) {
-		RTE_LOG(ERR, PMD, "cannot requeue discarded mbuf");
+		PMD_DRV_LOG(ERR, "cannot requeue discarded mbuf");
 		rte_pktmbuf_free(m);
 	}
 }
@@ -1145,7 +1145,7 @@ virtio_discard_rxbuf_inorder(struct virtqueue *vq, struct rte_mbuf *m)
 
 	error = virtqueue_enqueue_refill_inorder(vq, &m, 1);
 	if (unlikely(error)) {
-		RTE_LOG(ERR, PMD, "cannot requeue discarded mbuf");
+		PMD_DRV_LOG(ERR, "cannot requeue discarded mbuf");
 		rte_pktmbuf_free(m);
 	}
 }
diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c
index e61af40683..5637001dfc 100644
--- a/drivers/net/virtio/virtio_user_ethdev.c
+++ b/drivers/net/virtio/virtio_user_ethdev.c
@@ -561,7 +561,7 @@ virtio_user_pmd_probe(struct rte_vdev_device *dev)
 		const char *name = rte_vdev_device_name(dev);
 		eth_dev = rte_eth_dev_attach_secondary(name);
 		if (!eth_dev) {
-			RTE_LOG(ERR, PMD, "Failed to probe %s\n", name);
+			PMD_INIT_LOG(ERR, "Failed to probe %s", name);
 			return -1;
 		}
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:45.715171277 +0100
+++ 0027-net-virtio-do-not-use-PMD-log-type.patch	2020-05-19 14:04:44.160647358 +0100
@@ -1,15 +1,16 @@
-From 88fa5bb6b9807d55a3fbd34e5537fcf1ee7efb80 Mon Sep 17 00:00:00 2001
+From 0bf29e36c3015e8a5bf315194caeaabc77363a0f Mon Sep 17 00:00:00 2001
 From: Stephen Hemminger <stephen@networkplumber.org>
 Date: Mon, 30 Mar 2020 21:41:51 -0700
 Subject: [PATCH] net/virtio: do not use PMD log type
 
+[ upstream commit 88fa5bb6b9807d55a3fbd34e5537fcf1ee7efb80 ]
+
 Virtio driver has its own logtype and should not use legacy
 PMD logtype.
 
 Fixes: 32c118fd0059 ("virtio: free mbuf's with threshold")
 Fixes: e5f456a98d3c ("net/virtio: support in-order Rx and Tx")
 Fixes: 1c8489da561b ("net/virtio-user: fix multi-process support")
-Cc: stable@dpdk.org
 
 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

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

* [dpdk-stable] patch 'net/tap: do not use PMD log type' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (25 preceding siblings ...)
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/virtio: " luca.boccassi
@ 2020-05-19 13:02   ` luca.boccassi
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/pfe: " luca.boccassi
                     ` (185 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:02 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 64ca12ff65049c28e5130ef4705fee83f9f697ea Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Mon, 30 Mar 2020 21:41:52 -0700
Subject: [PATCH] net/tap: do not use PMD log type

[ upstream commit bd3b90d53a62c2147f747dfaf863117f39099a32 ]

The PMD logtype is legacy and drivers should use their own logtype.

Fixes: 050316a88313 ("net/tap: support TSO (TCP Segment Offload)")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/tap/rte_eth_tap.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 05470a2115..2c9fb76b63 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -778,7 +778,7 @@ apply:
 	case SIOCSIFMTU:
 		break;
 	default:
-		RTE_LOG(WARNING, PMD, "%s: ioctl() called with wrong arg\n",
+		TAP_LOG(WARNING, "%s: ioctl() called with wrong arg",
 			pmd->name);
 		return -EINVAL;
 	}
@@ -1301,7 +1301,9 @@ tap_gso_ctx_setup(struct rte_gso_ctx *gso_ctx, struct rte_eth_dev *dev)
 			SOCKET_ID_ANY);
 		if (!mp) {
 			struct pmd_internals *pmd = dev->data->dev_private;
-			RTE_LOG(DEBUG, PMD, "%s: failed to create mbuf pool for device %s\n",
+
+			TAP_LOG(ERR,
+				"%s: failed to create mbuf pool for device %s\n",
 				pmd->name, dev->device->name);
 			return -1;
 		}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:45.753242798 +0100
+++ 0028-net-tap-do-not-use-PMD-log-type.patch	2020-05-19 14:04:44.164647430 +0100
@@ -1,12 +1,13 @@
-From bd3b90d53a62c2147f747dfaf863117f39099a32 Mon Sep 17 00:00:00 2001
+From 64ca12ff65049c28e5130ef4705fee83f9f697ea Mon Sep 17 00:00:00 2001
 From: Stephen Hemminger <stephen@networkplumber.org>
 Date: Mon, 30 Mar 2020 21:41:52 -0700
 Subject: [PATCH] net/tap: do not use PMD log type
 
+[ upstream commit bd3b90d53a62c2147f747dfaf863117f39099a32 ]
+
 The PMD logtype is legacy and drivers should use their own logtype.
 
 Fixes: 050316a88313 ("net/tap: support TSO (TCP Segment Offload)")
-Cc: stable@dpdk.org
 
 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

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

* [dpdk-stable] patch 'net/pfe: do not use PMD log type' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (26 preceding siblings ...)
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/tap: " luca.boccassi
@ 2020-05-19 13:02   ` luca.boccassi
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/bnxt: " luca.boccassi
                     ` (184 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:02 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 45284045c58780ae09331d624908109627842d46 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Mon, 30 Mar 2020 21:41:53 -0700
Subject: [PATCH] net/pfe: do not use PMD log type

[ upstream commit b8907ccf16d00be8f8fb979c2aa44f867143661a ]

The PMD logtype is a legacy from original DPDK logging.
All drivers must use their own dynamic log type.

Fixes: b1bc1afa4a0e ("net/pfe: support dynamic logging")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/pfe/pfe_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/pfe/pfe_ethdev.c b/drivers/net/pfe/pfe_ethdev.c
index 9403478198..59b5b8387b 100644
--- a/drivers/net/pfe/pfe_ethdev.c
+++ b/drivers/net/pfe/pfe_ethdev.c
@@ -990,7 +990,7 @@ pmd_pfe_probe(struct rte_vdev_device *vdev)
 	if (rc < 0)
 		return -EINVAL;
 
-	RTE_LOG(INFO, PMD, "Initializing pmd_pfe for %s Given gem-id %d\n",
+	PFE_PMD_LOG(INFO, "Initializing pmd_pfe for %s Given gem-id %d",
 		name, init_params.gem_id);
 
 	if (g_pfe) {
@@ -1118,7 +1118,7 @@ eth_init:
 	else
 		gem_id = init_params.gem_id;
 
-	RTE_LOG(INFO, PMD, "Init pmd_pfe for %s gem-id %d(given =%d)\n",
+	PFE_PMD_LOG(INFO, "Init pmd_pfe for %s gem-id %d(given =%d)",
 		name, gem_id, init_params.gem_id);
 
 	rc = pfe_eth_init(vdev, g_pfe, gem_id);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:45.792065814 +0100
+++ 0029-net-pfe-do-not-use-PMD-log-type.patch	2020-05-19 14:04:44.164647430 +0100
@@ -1,13 +1,14 @@
-From b8907ccf16d00be8f8fb979c2aa44f867143661a Mon Sep 17 00:00:00 2001
+From 45284045c58780ae09331d624908109627842d46 Mon Sep 17 00:00:00 2001
 From: Stephen Hemminger <stephen@networkplumber.org>
 Date: Mon, 30 Mar 2020 21:41:53 -0700
 Subject: [PATCH] net/pfe: do not use PMD log type
 
+[ upstream commit b8907ccf16d00be8f8fb979c2aa44f867143661a ]
+
 The PMD logtype is a legacy from original DPDK logging.
 All drivers must use their own dynamic log type.
 
 Fixes: b1bc1afa4a0e ("net/pfe: support dynamic logging")
-Cc: stable@dpdk.org
 
 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

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

* [dpdk-stable] patch 'net/bnxt: do not use PMD log type' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (27 preceding siblings ...)
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/pfe: " luca.boccassi
@ 2020-05-19 13:02   ` luca.boccassi
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/dpaa: use dynamic " luca.boccassi
                     ` (183 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:02 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 516f5f913682bac65168aef1c079f484e5305336 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Mon, 30 Mar 2020 21:41:54 -0700
Subject: [PATCH] net/bnxt: do not use PMD log type

[ upstream commit 9122478fe88d272223d1eb8f612b96ca05bf9c81 ]

Accidental use of PMD logtype rather than per-driver logtype.

Fixes: 14255b351537 ("net/bnxt: fix queue start/stop operations")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt_ring.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_ring.c b/drivers/net/bnxt/bnxt_ring.c
index d6e4e8a281..1999cd7861 100644
--- a/drivers/net/bnxt/bnxt_ring.c
+++ b/drivers/net/bnxt/bnxt_ring.c
@@ -598,7 +598,7 @@ int bnxt_alloc_hwrm_rx_ring(struct bnxt *bp, int queue_index)
 
 	if (rxq->rx_started) {
 		if (bnxt_init_one_rx_ring(rxq)) {
-			RTE_LOG(ERR, PMD,
+			PMD_DRV_LOG(ERR,
 				"bnxt_init_one_rx_ring failed!\n");
 			bnxt_rx_queue_release_op(rxq);
 			rc = -ENOMEM;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:45.829121571 +0100
+++ 0030-net-bnxt-do-not-use-PMD-log-type.patch	2020-05-19 14:04:44.164647430 +0100
@@ -1,12 +1,13 @@
-From 9122478fe88d272223d1eb8f612b96ca05bf9c81 Mon Sep 17 00:00:00 2001
+From 516f5f913682bac65168aef1c079f484e5305336 Mon Sep 17 00:00:00 2001
 From: Stephen Hemminger <stephen@networkplumber.org>
 Date: Mon, 30 Mar 2020 21:41:54 -0700
 Subject: [PATCH] net/bnxt: do not use PMD log type
 
+[ upstream commit 9122478fe88d272223d1eb8f612b96ca05bf9c81 ]
+
 Accidental use of PMD logtype rather than per-driver logtype.
 
 Fixes: 14255b351537 ("net/bnxt: fix queue start/stop operations")
-Cc: stable@dpdk.org
 
 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
 Acked-by: Somnath Kotur <somnath.kotur@broadcom.com>

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

* [dpdk-stable] patch 'net/dpaa: use dynamic log type' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (28 preceding siblings ...)
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/bnxt: " luca.boccassi
@ 2020-05-19 13:02   ` luca.boccassi
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/thunderx: " luca.boccassi
                     ` (182 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:02 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 3e0d3b1204c39870f13a74db6c19e6778a74b6a4 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Mon, 30 Mar 2020 21:41:55 -0700
Subject: [PATCH] net/dpaa: use dynamic log type

[ upstream commit b7c7ff6e3b34ac088237f85cf4ac5cc30c859a18 ]

The static PMD logtype should not be used by drivers.
Instead, use existing log macros in this driver.

Also use standard rte_ether routine to format ether address.

Fixes: 37f9b54bd3cf ("net/dpaa: support Tx and Rx queue setup")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/dpaa/dpaa_ethdev.c | 23 ++++++++---------------
 1 file changed, 8 insertions(+), 15 deletions(-)

diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index fce9ce2feb..5f81968d80 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -881,8 +881,8 @@ dpaa_dev_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 	PMD_INIT_FUNC_TRACE();
 
 	if (qman_query_fq_frm_cnt(rxq, &frm_cnt) == 0) {
-		RTE_LOG(DEBUG, PMD, "RX frame count for q(%d) is %u\n",
-			rx_queue_id, frm_cnt);
+		DPAA_PMD_DEBUG("RX frame count for q(%d) is %u",
+			       rx_queue_id, frm_cnt);
 	}
 	return frm_cnt;
 }
@@ -996,8 +996,7 @@ dpaa_dev_add_mac_addr(struct rte_eth_dev *dev,
 	ret = fman_if_add_mac_addr(dpaa_intf->fif, addr->addr_bytes, index);
 
 	if (ret)
-		RTE_LOG(ERR, PMD, "error: Adding the MAC ADDR failed:"
-			" err = %d", ret);
+		DPAA_PMD_ERR("Adding the MAC ADDR failed: err = %d", ret);
 	return 0;
 }
 
@@ -1023,7 +1022,7 @@ dpaa_dev_set_mac_addr(struct rte_eth_dev *dev,
 
 	ret = fman_if_add_mac_addr(dpaa_intf->fif, addr->addr_bytes, 0);
 	if (ret)
-		RTE_LOG(ERR, PMD, "error: Setting the MAC ADDR failed %d", ret);
+		DPAA_PMD_ERR("Setting the MAC ADDR failed %d", ret);
 
 	return ret;
 }
@@ -1306,6 +1305,7 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev)
 	struct fman_if *fman_intf;
 	struct fman_if_bpool *bp, *tmp_bp;
 	uint32_t cgrid[DPAA_MAX_NUM_PCD_QUEUES];
+	char eth_buf[RTE_ETHER_ADDR_FMT_SIZE];
 
 	PMD_INIT_FUNC_TRACE();
 
@@ -1457,15 +1457,9 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev)
 
 	/* copy the primary mac address */
 	rte_ether_addr_copy(&fman_intf->mac_addr, &eth_dev->data->mac_addrs[0]);
+	rte_ether_format_addr(eth_buf, sizeof(eth_buf), &fman_intf->mac_addr);
 
-	RTE_LOG(INFO, PMD, "net: dpaa: %s: %02x:%02x:%02x:%02x:%02x:%02x\n",
-		dpaa_device->name,
-		fman_intf->mac_addr.addr_bytes[0],
-		fman_intf->mac_addr.addr_bytes[1],
-		fman_intf->mac_addr.addr_bytes[2],
-		fman_intf->mac_addr.addr_bytes[3],
-		fman_intf->mac_addr.addr_bytes[4],
-		fman_intf->mac_addr.addr_bytes[5]);
+	DPAA_PMD_INFO("net: dpaa: %s: %s", dpaa_device->name, eth_buf);
 
 	/* Disable RX mode */
 	fman_if_discard_rx_errors(fman_intf);
@@ -1578,8 +1572,7 @@ rte_dpaa_probe(struct rte_dpaa_driver *dpaa_drv __rte_unused,
 
 	if (!is_global_init && (rte_eal_process_type() == RTE_PROC_PRIMARY)) {
 		if (access("/tmp/fmc.bin", F_OK) == -1) {
-			RTE_LOG(INFO, PMD,
-				"* FMC not configured.Enabling default mode\n");
+			DPAA_PMD_INFO("* FMC not configured.Enabling default mode");
 			default_q = 1;
 		}
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:45.864418507 +0100
+++ 0031-net-dpaa-use-dynamic-log-type.patch	2020-05-19 14:04:44.168647502 +0100
@@ -1,15 +1,16 @@
-From b7c7ff6e3b34ac088237f85cf4ac5cc30c859a18 Mon Sep 17 00:00:00 2001
+From 3e0d3b1204c39870f13a74db6c19e6778a74b6a4 Mon Sep 17 00:00:00 2001
 From: Stephen Hemminger <stephen@networkplumber.org>
 Date: Mon, 30 Mar 2020 21:41:55 -0700
 Subject: [PATCH] net/dpaa: use dynamic log type
 
+[ upstream commit b7c7ff6e3b34ac088237f85cf4ac5cc30c859a18 ]
+
 The static PMD logtype should not be used by drivers.
 Instead, use existing log macros in this driver.
 
 Also use standard rte_ether routine to format ether address.
 
 Fixes: 37f9b54bd3cf ("net/dpaa: support Tx and Rx queue setup")
-Cc: stable@dpdk.org
 
 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

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

* [dpdk-stable] patch 'net/thunderx: use dynamic log type' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (29 preceding siblings ...)
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/dpaa: use dynamic " luca.boccassi
@ 2020-05-19 13:02   ` luca.boccassi
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/mlx5: fix imissed counter overflow' " luca.boccassi
                     ` (181 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:02 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From e7c5383a090899fda00b8d5b7fd09da519a5b680 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Mon, 30 Mar 2020 21:41:56 -0700
Subject: [PATCH] net/thunderx: use dynamic log type

[ upstream commit d801c39559b346f26e3d3a8e16a92bb19e0165b9 ]

The PMD static logtype is original DPDK legacy and should not be used.

Fixes: 43362c6a7647 ("net/thunderx: support RSS and RETA query and update")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/thunderx/nicvf_ethdev.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
index 2cf0ffe13b..26191586f7 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -496,9 +496,10 @@ nicvf_dev_reta_query(struct rte_eth_dev *dev,
 	int ret, i, j;
 
 	if (reta_size != NIC_MAX_RSS_IDR_TBL_SIZE) {
-		RTE_LOG(ERR, PMD, "The size of hash lookup table configured "
-			"(%d) doesn't match the number hardware can supported "
-			"(%d)", reta_size, NIC_MAX_RSS_IDR_TBL_SIZE);
+		PMD_DRV_LOG(ERR,
+			    "The size of hash lookup table configured "
+			    "(%u) doesn't match the number hardware can supported "
+			    "(%u)", reta_size, NIC_MAX_RSS_IDR_TBL_SIZE);
 		return -EINVAL;
 	}
 
@@ -526,9 +527,9 @@ nicvf_dev_reta_update(struct rte_eth_dev *dev,
 	int ret, i, j;
 
 	if (reta_size != NIC_MAX_RSS_IDR_TBL_SIZE) {
-		RTE_LOG(ERR, PMD, "The size of hash lookup table configured "
-			"(%d) doesn't match the number hardware can supported "
-			"(%d)", reta_size, NIC_MAX_RSS_IDR_TBL_SIZE);
+		PMD_DRV_LOG(ERR, "The size of hash lookup table configured "
+			"(%u) doesn't match the number hardware can supported "
+			"(%u)", reta_size, NIC_MAX_RSS_IDR_TBL_SIZE);
 		return -EINVAL;
 	}
 
@@ -569,8 +570,8 @@ nicvf_dev_rss_hash_update(struct rte_eth_dev *dev,
 
 	if (rss_conf->rss_key &&
 		rss_conf->rss_key_len != RSS_HASH_KEY_BYTE_SIZE) {
-		RTE_LOG(ERR, PMD, "Hash key size mismatch %d",
-				rss_conf->rss_key_len);
+		PMD_DRV_LOG(ERR, "Hash key size mismatch %u",
+			    rss_conf->rss_key_len);
 		return -EINVAL;
 	}
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:45.902354689 +0100
+++ 0032-net-thunderx-use-dynamic-log-type.patch	2020-05-19 14:04:44.168647502 +0100
@@ -1,12 +1,13 @@
-From d801c39559b346f26e3d3a8e16a92bb19e0165b9 Mon Sep 17 00:00:00 2001
+From e7c5383a090899fda00b8d5b7fd09da519a5b680 Mon Sep 17 00:00:00 2001
 From: Stephen Hemminger <stephen@networkplumber.org>
 Date: Mon, 30 Mar 2020 21:41:56 -0700
 Subject: [PATCH] net/thunderx: use dynamic log type
 
+[ upstream commit d801c39559b346f26e3d3a8e16a92bb19e0165b9 ]
+
 The PMD static logtype is original DPDK legacy and should not be used.
 
 Fixes: 43362c6a7647 ("net/thunderx: support RSS and RETA query and update")
-Cc: stable@dpdk.org
 
 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -15,7 +16,7 @@
  1 file changed, 9 insertions(+), 8 deletions(-)
 
 diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
-index 6f43541a5d..bfda0ab0ed 100644
+index 2cf0ffe13b..26191586f7 100644
 --- a/drivers/net/thunderx/nicvf_ethdev.c
 +++ b/drivers/net/thunderx/nicvf_ethdev.c
 @@ -496,9 +496,10 @@ nicvf_dev_reta_query(struct rte_eth_dev *dev,

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

* [dpdk-stable] patch 'net/mlx5: fix imissed counter overflow' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (30 preceding siblings ...)
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/thunderx: " luca.boccassi
@ 2020-05-19 13:02   ` luca.boccassi
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/ice/base: fix binary order for GTPU filter' " luca.boccassi
                     ` (180 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:02 UTC (permalink / raw)
  To: Jiawei Wang; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 7ba59c1fd4dbd5e8758d5c7d532fd4f698f39cdd Mon Sep 17 00:00:00 2001
From: Jiawei Wang <jiaweiw@mellanox.com>
Date: Mon, 30 Mar 2020 06:02:10 +0300
Subject: [PATCH] net/mlx5: fix imissed counter overflow

[ upstream commit c5193a0bbef8bb7aef23c8ee25d9f89167ac58fb ]

The Hw counters is defined as 32bit unsigned value and read from
the sysfs. Firstly read the base value while application start,
then fetch the new value while do query and minus the base value.
If the new value is less than base value, will result in a
negative value and convert to the big value as unsigned 64bit.

PMD add xstats field to store the last successfully read counter,
use it if failed to read hw counter from sysfs.
PMD also record the last output value to handle the wrap around case,
if overflow happened, increase the wrap count by 1 and save into the
higher 32bit, and update the new value into lower 32bit, finally
return the 64bit counter value.

Fixes: ce9494d76c47 ("net/mlx5: report imissed statistics")

Signed-off-by: Jiawei Wang <jiaweiw@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
 drivers/net/mlx5/mlx5.h       |  3 ++
 drivers/net/mlx5/mlx5_stats.c | 57 ++++++++++++++++++++++++++++++-----
 2 files changed, 52 insertions(+), 8 deletions(-)

diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index de80f62cc0..048bc66052 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -148,12 +148,15 @@ struct mlx5_xstats_ctrl {
 	/* Index in the device counters table. */
 	uint16_t dev_table_idx[MLX5_MAX_XSTATS];
 	uint64_t base[MLX5_MAX_XSTATS];
+	uint64_t xstats[MLX5_MAX_XSTATS];
+	uint64_t hw_stats[MLX5_MAX_XSTATS];
 	struct mlx5_counter_ctrl info[MLX5_MAX_XSTATS];
 };
 
 struct mlx5_stats_ctrl {
 	/* Base for imissed counter. */
 	uint64_t imissed_base;
+	uint64_t imissed;
 };
 
 /* devX creation object */
diff --git a/drivers/net/mlx5/mlx5_stats.c b/drivers/net/mlx5/mlx5_stats.c
index 205e4fec78..d60a633e15 100644
--- a/drivers/net/mlx5/mlx5_stats.c
+++ b/drivers/net/mlx5/mlx5_stats.c
@@ -136,7 +136,7 @@ static const struct mlx5_counter_ctrl mlx5_counters_init[] = {
 
 static const unsigned int xstats_n = RTE_DIM(mlx5_counters_init);
 
-static inline void
+static inline int
 mlx5_read_ib_stat(struct mlx5_priv *priv, const char *ctr_name, uint64_t *stat)
 {
 	FILE *file;
@@ -152,10 +152,11 @@ mlx5_read_ib_stat(struct mlx5_priv *priv, const char *ctr_name, uint64_t *stat)
 
 			fclose(file);
 			if (n == 1)
-				return;
+				return 0;
 		}
 	}
 	*stat = 0;
+	return 1;
 }
 
 /**
@@ -194,8 +195,14 @@ mlx5_read_dev_counters(struct rte_eth_dev *dev, uint64_t *stats)
 	}
 	for (i = 0; i != xstats_ctrl->mlx5_stats_n; ++i) {
 		if (xstats_ctrl->info[i].ib) {
-			mlx5_read_ib_stat(priv, xstats_ctrl->info[i].ctr_name,
-					  &stats[i]);
+			ret = mlx5_read_ib_stat(priv,
+						xstats_ctrl->info[i].ctr_name,
+						&stats[i]);
+			/* return last xstats counter if fail to read. */
+			if (ret == 0)
+				xstats_ctrl->xstats[i] = stats[i];
+			else
+				stats[i] = xstats_ctrl->xstats[i];
 		} else {
 			stats[i] = (uint64_t)
 				et_stats->data[xstats_ctrl->dev_table_idx[i]];
@@ -301,6 +308,7 @@ mlx5_stats_init(struct rte_eth_dev *dev)
 			unsigned int idx = xstats_ctrl->mlx5_stats_n++;
 
 			xstats_ctrl->info[idx] = mlx5_counters_init[i];
+			xstats_ctrl->hw_stats[idx] = 0;
 		}
 	}
 	assert(xstats_ctrl->mlx5_stats_n <= MLX5_MAX_XSTATS);
@@ -311,6 +319,7 @@ mlx5_stats_init(struct rte_eth_dev *dev)
 		DRV_LOG(ERR, "port %u cannot read device counters: %s",
 			dev->data->port_id, strerror(rte_errno));
 	mlx5_read_ib_stat(priv, "out_of_buffer", &stats_ctrl->imissed_base);
+	stats_ctrl->imissed = 0;
 free:
 	rte_free(strings);
 }
@@ -353,7 +362,23 @@ mlx5_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *stats,
 			return ret;
 		for (i = 0; i != mlx5_stats_n; ++i) {
 			stats[i].id = i;
-			stats[i].value = (counters[i] - xstats_ctrl->base[i]);
+			if (xstats_ctrl->info[i].ib) {
+				uint64_t wrap_n;
+				uint64_t hw_stat = xstats_ctrl->hw_stats[i];
+
+				stats[i].value = (counters[i] -
+						  xstats_ctrl->base[i]) &
+						  (uint64_t)UINT32_MAX;
+				wrap_n = hw_stat >> 32;
+				if (stats[i].value <
+					    (hw_stat & (uint64_t)UINT32_MAX))
+					wrap_n++;
+				stats[i].value |= (wrap_n) << 32;
+				xstats_ctrl->hw_stats[i] = stats[i].value;
+			} else {
+				stats[i].value =
+					(counters[i] - xstats_ctrl->base[i]);
+			}
 		}
 	}
 	return mlx5_stats_n;
@@ -375,9 +400,12 @@ int
 mlx5_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 {
 	struct mlx5_priv *priv = dev->data->dev_private;
+	struct mlx5_stats_ctrl *stats_ctrl = &priv->stats_ctrl;
 	struct rte_eth_stats tmp;
 	unsigned int i;
 	unsigned int idx;
+	uint64_t wrap_n;
+	int ret;
 
 	memset(&tmp, 0, sizeof(tmp));
 	/* Add software counters. */
@@ -420,8 +448,18 @@ mlx5_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 #endif
 		tmp.oerrors += txq->stats.oerrors;
 	}
-	mlx5_read_ib_stat(priv, "out_of_buffer", &tmp.imissed);
-	tmp.imissed -= priv->stats_ctrl.imissed_base;
+	ret = mlx5_read_ib_stat(priv, "out_of_buffer", &tmp.imissed);
+	if (ret == 0) {
+		tmp.imissed = (tmp.imissed - stats_ctrl->imissed_base) &
+				 (uint64_t)UINT32_MAX;
+		wrap_n = stats_ctrl->imissed >> 32;
+		if (tmp.imissed < (stats_ctrl->imissed & (uint64_t)UINT32_MAX))
+			wrap_n++;
+		tmp.imissed |= (wrap_n) << 32;
+		stats_ctrl->imissed = tmp.imissed;
+	} else {
+		tmp.imissed = stats_ctrl->imissed;
+	}
 #ifndef MLX5_PMD_SOFT_COUNTERS
 	/* FIXME: retrieve and add hardware counters. */
 #endif
@@ -458,6 +496,7 @@ mlx5_stats_reset(struct rte_eth_dev *dev)
 		       sizeof(struct mlx5_txq_stats));
 	}
 	mlx5_read_ib_stat(priv, "out_of_buffer", &stats_ctrl->imissed_base);
+	stats_ctrl->imissed = 0;
 #ifndef MLX5_PMD_SOFT_COUNTERS
 	/* FIXME: reset hardware counters. */
 #endif
@@ -500,8 +539,10 @@ mlx5_xstats_reset(struct rte_eth_dev *dev)
 			dev->data->port_id, strerror(rte_errno));
 		return ret;
 	}
-	for (i = 0; i != n; ++i)
+	for (i = 0; i != n; ++i) {
 		xstats_ctrl->base[i] = counters[i];
+		xstats_ctrl->hw_stats[i] = 0;
+	}
 
 	return 0;
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:45.940398665 +0100
+++ 0033-net-mlx5-fix-imissed-counter-overflow.patch	2020-05-19 14:04:44.168647502 +0100
@@ -1,8 +1,10 @@
-From c5193a0bbef8bb7aef23c8ee25d9f89167ac58fb Mon Sep 17 00:00:00 2001
+From 7ba59c1fd4dbd5e8758d5c7d532fd4f698f39cdd Mon Sep 17 00:00:00 2001
 From: Jiawei Wang <jiaweiw@mellanox.com>
 Date: Mon, 30 Mar 2020 06:02:10 +0300
 Subject: [PATCH] net/mlx5: fix imissed counter overflow
 
+[ upstream commit c5193a0bbef8bb7aef23c8ee25d9f89167ac58fb ]
+
 The Hw counters is defined as 32bit unsigned value and read from
 the sysfs. Firstly read the base value while application start,
 then fetch the new value while do query and minus the base value.
@@ -17,7 +19,6 @@
 return the 64bit counter value.
 
 Fixes: ce9494d76c47 ("net/mlx5: report imissed statistics")
-Cc: stable@dpdk.org
 
 Signed-off-by: Jiawei Wang <jiaweiw@mellanox.com>
 Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
@@ -27,10 +28,10 @@
  2 files changed, 52 insertions(+), 8 deletions(-)
 
 diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
-index ca6a802211..563d6ab3c0 100644
+index de80f62cc0..048bc66052 100644
 --- a/drivers/net/mlx5/mlx5.h
 +++ b/drivers/net/mlx5/mlx5.h
-@@ -112,12 +112,15 @@ struct mlx5_xstats_ctrl {
+@@ -148,12 +148,15 @@ struct mlx5_xstats_ctrl {
  	/* Index in the device counters table. */
  	uint16_t dev_table_idx[MLX5_MAX_XSTATS];
  	uint64_t base[MLX5_MAX_XSTATS];
@@ -45,12 +46,12 @@
 +	uint64_t imissed;
  };
  
- /* Flow list . */
+ /* devX creation object */
 diff --git a/drivers/net/mlx5/mlx5_stats.c b/drivers/net/mlx5/mlx5_stats.c
-index 7603502967..5bc6fa6aa1 100644
+index 205e4fec78..d60a633e15 100644
 --- a/drivers/net/mlx5/mlx5_stats.c
 +++ b/drivers/net/mlx5/mlx5_stats.c
-@@ -139,7 +139,7 @@ static const struct mlx5_counter_ctrl mlx5_counters_init[] = {
+@@ -136,7 +136,7 @@ static const struct mlx5_counter_ctrl mlx5_counters_init[] = {
  
  static const unsigned int xstats_n = RTE_DIM(mlx5_counters_init);
  
@@ -59,7 +60,7 @@
  mlx5_read_ib_stat(struct mlx5_priv *priv, const char *ctr_name, uint64_t *stat)
  {
  	FILE *file;
-@@ -155,10 +155,11 @@ mlx5_read_ib_stat(struct mlx5_priv *priv, const char *ctr_name, uint64_t *stat)
+@@ -152,10 +152,11 @@ mlx5_read_ib_stat(struct mlx5_priv *priv, const char *ctr_name, uint64_t *stat)
  
  			fclose(file);
  			if (n == 1)
@@ -72,7 +73,7 @@
  }
  
  /**
-@@ -197,8 +198,14 @@ mlx5_read_dev_counters(struct rte_eth_dev *dev, uint64_t *stats)
+@@ -194,8 +195,14 @@ mlx5_read_dev_counters(struct rte_eth_dev *dev, uint64_t *stats)
  	}
  	for (i = 0; i != xstats_ctrl->mlx5_stats_n; ++i) {
  		if (xstats_ctrl->info[i].ib) {
@@ -89,15 +90,15 @@
  		} else {
  			stats[i] = (uint64_t)
  				et_stats->data[xstats_ctrl->dev_table_idx[i]];
-@@ -304,6 +311,7 @@ mlx5_stats_init(struct rte_eth_dev *dev)
+@@ -301,6 +308,7 @@ mlx5_stats_init(struct rte_eth_dev *dev)
  			unsigned int idx = xstats_ctrl->mlx5_stats_n++;
  
  			xstats_ctrl->info[idx] = mlx5_counters_init[i];
 +			xstats_ctrl->hw_stats[idx] = 0;
  		}
  	}
- 	MLX5_ASSERT(xstats_ctrl->mlx5_stats_n <= MLX5_MAX_XSTATS);
-@@ -314,6 +322,7 @@ mlx5_stats_init(struct rte_eth_dev *dev)
+ 	assert(xstats_ctrl->mlx5_stats_n <= MLX5_MAX_XSTATS);
+@@ -311,6 +319,7 @@ mlx5_stats_init(struct rte_eth_dev *dev)
  		DRV_LOG(ERR, "port %u cannot read device counters: %s",
  			dev->data->port_id, strerror(rte_errno));
  	mlx5_read_ib_stat(priv, "out_of_buffer", &stats_ctrl->imissed_base);
@@ -105,7 +106,7 @@
  free:
  	rte_free(strings);
  }
-@@ -356,7 +365,23 @@ mlx5_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *stats,
+@@ -353,7 +362,23 @@ mlx5_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *stats,
  			return ret;
  		for (i = 0; i != mlx5_stats_n; ++i) {
  			stats[i].id = i;
@@ -130,7 +131,7 @@
  		}
  	}
  	return mlx5_stats_n;
-@@ -378,9 +403,12 @@ int
+@@ -375,9 +400,12 @@ int
  mlx5_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
  {
  	struct mlx5_priv *priv = dev->data->dev_private;
@@ -143,7 +144,7 @@
  
  	memset(&tmp, 0, sizeof(tmp));
  	/* Add software counters. */
-@@ -423,8 +451,18 @@ mlx5_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
+@@ -420,8 +448,18 @@ mlx5_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
  #endif
  		tmp.oerrors += txq->stats.oerrors;
  	}
@@ -164,7 +165,7 @@
  #ifndef MLX5_PMD_SOFT_COUNTERS
  	/* FIXME: retrieve and add hardware counters. */
  #endif
-@@ -461,6 +499,7 @@ mlx5_stats_reset(struct rte_eth_dev *dev)
+@@ -458,6 +496,7 @@ mlx5_stats_reset(struct rte_eth_dev *dev)
  		       sizeof(struct mlx5_txq_stats));
  	}
  	mlx5_read_ib_stat(priv, "out_of_buffer", &stats_ctrl->imissed_base);
@@ -172,7 +173,7 @@
  #ifndef MLX5_PMD_SOFT_COUNTERS
  	/* FIXME: reset hardware counters. */
  #endif
-@@ -503,8 +542,10 @@ mlx5_xstats_reset(struct rte_eth_dev *dev)
+@@ -500,8 +539,10 @@ mlx5_xstats_reset(struct rte_eth_dev *dev)
  			dev->data->port_id, strerror(rte_errno));
  		return ret;
  	}

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

* [dpdk-stable] patch 'net/ice/base: fix binary order for GTPU filter' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (31 preceding siblings ...)
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/mlx5: fix imissed counter overflow' " luca.boccassi
@ 2020-05-19 13:02   ` luca.boccassi
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/ice/base: check memory pointer before copying' " luca.boccassi
                     ` (179 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:02 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Ting Xu, Paul M Stillwell Jr, Qiming Yang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 3e51abed667ad99e305f3665114fd1a653fe1e7a Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Mon, 30 Mar 2020 19:45:37 +0800
Subject: [PATCH] net/ice/base: fix binary order for GTPU filter

[ upstream commit b965ec9e99d7726d24fdcf41defbbac02f21f4e2 ]

Take network order for gtpu fdir filter.

Fixes: b5c274f4e2ad ("net/ice/base: support FDIR for GTPU QFI field")

Signed-off-by: Ting Xu <ting.xu@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
---
 drivers/net/ice/base/ice_fdir.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ice/base/ice_fdir.h b/drivers/net/ice/base/ice_fdir.h
index c811f7606d..5b37705844 100644
--- a/drivers/net/ice/base/ice_fdir.h
+++ b/drivers/net/ice/base/ice_fdir.h
@@ -151,9 +151,9 @@ struct ice_fdir_v6 {
 struct ice_fdir_udp_gtp {
 	u8 flags;
 	u8 msg_type;
-	u16 rsrvd_len;
-	u32 teid;
-	u16 rsrvd_seq_nbr;
+	__be16 rsrvd_len;
+	__be32 teid;
+	__be16 rsrvd_seq_nbr;
 	u8 rsrvd_n_pdu_nbr;
 	u8 rsrvd_next_ext_type;
 	u8 rsvrd_ext_len;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:45.976711080 +0100
+++ 0034-net-ice-base-fix-binary-order-for-GTPU-filter.patch	2020-05-19 14:04:44.172647575 +0100
@@ -1,12 +1,13 @@
-From b965ec9e99d7726d24fdcf41defbbac02f21f4e2 Mon Sep 17 00:00:00 2001
+From 3e51abed667ad99e305f3665114fd1a653fe1e7a Mon Sep 17 00:00:00 2001
 From: Qi Zhang <qi.z.zhang@intel.com>
 Date: Mon, 30 Mar 2020 19:45:37 +0800
 Subject: [PATCH] net/ice/base: fix binary order for GTPU filter
 
+[ upstream commit b965ec9e99d7726d24fdcf41defbbac02f21f4e2 ]
+
 Take network order for gtpu fdir filter.
 
 Fixes: b5c274f4e2ad ("net/ice/base: support FDIR for GTPU QFI field")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ting Xu <ting.xu@intel.com>
 Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
@@ -17,10 +18,10 @@
  1 file changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/drivers/net/ice/base/ice_fdir.h b/drivers/net/ice/base/ice_fdir.h
-index 21a83fd6c4..e52104e9a0 100644
+index c811f7606d..5b37705844 100644
 --- a/drivers/net/ice/base/ice_fdir.h
 +++ b/drivers/net/ice/base/ice_fdir.h
-@@ -148,9 +148,9 @@ struct ice_fdir_v6 {
+@@ -151,9 +151,9 @@ struct ice_fdir_v6 {
  struct ice_fdir_udp_gtp {
  	u8 flags;
  	u8 msg_type;

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

* [dpdk-stable] patch 'net/ice/base: check memory pointer before copying' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (32 preceding siblings ...)
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/ice/base: fix binary order for GTPU filter' " luca.boccassi
@ 2020-05-19 13:02   ` luca.boccassi
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/tap: remove unused assert' " luca.boccassi
                     ` (178 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:02 UTC (permalink / raw)
  To: Haiyue Wang; +Cc: Xiaolong Ye, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From f50974db04c6890ea52c51395af5252f690bce71 Mon Sep 17 00:00:00 2001
From: Haiyue Wang <haiyue.wang@intel.com>
Date: Tue, 31 Mar 2020 14:50:34 +0800
Subject: [PATCH] net/ice/base: check memory pointer before copying

[ upstream commit 2adbccec40663c457a47391b8d704bceb579c2f0 ]

The ice_memdup doesn't check the new allocated memory pointer, it calls
the rte_memcpy directly. It should check it.

Fixes: 5f0978e96220 ("net/ice/base: add OS specific implementation")

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
 drivers/net/ice/base/ice_osdep.h | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ice/base/ice_osdep.h b/drivers/net/ice/base/ice_osdep.h
index 629acef227..7310cd0a27 100644
--- a/drivers/net/ice/base/ice_osdep.h
+++ b/drivers/net/ice/base/ice_osdep.h
@@ -24,6 +24,8 @@
 #include <rte_random.h>
 #include <rte_io.h>
 
+#include "ice_alloc.h"
+
 #include "../ice_logs.h"
 
 #define INLINE inline
@@ -176,7 +178,6 @@ struct ice_virt_mem {
 
 #define ice_memset(a, b, c, d) memset((a), (b), (c))
 #define ice_memcpy(a, b, c, d) rte_memcpy((a), (b), (c))
-#define ice_memdup(a, b, c, d) rte_memcpy(ice_malloc(a, c), b, c)
 
 #define CPU_TO_BE16(o) rte_cpu_to_be_16(o)
 #define CPU_TO_BE32(o) rte_cpu_to_be_32(o)
@@ -223,6 +224,19 @@ ice_destroy_lock(__attribute__((unused)) struct ice_lock *sp)
 
 struct ice_hw;
 
+static __rte_always_inline void *
+ice_memdup(__rte_unused struct ice_hw *hw, const void *src, size_t size,
+	   __rte_unused enum ice_memcpy_type dir)
+{
+	void *p;
+
+	p = ice_malloc(hw, size);
+	if (p)
+		rte_memcpy(p, src, size);
+
+	return p;
+}
+
 static inline void *
 ice_alloc_dma_mem(__attribute__((unused)) struct ice_hw *hw,
 		  struct ice_dma_mem *mem, u64 size)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:46.013261651 +0100
+++ 0035-net-ice-base-check-memory-pointer-before-copying.patch	2020-05-19 14:04:44.172647575 +0100
@@ -1,13 +1,14 @@
-From 2adbccec40663c457a47391b8d704bceb579c2f0 Mon Sep 17 00:00:00 2001
+From f50974db04c6890ea52c51395af5252f690bce71 Mon Sep 17 00:00:00 2001
 From: Haiyue Wang <haiyue.wang@intel.com>
 Date: Tue, 31 Mar 2020 14:50:34 +0800
 Subject: [PATCH] net/ice/base: check memory pointer before copying
 
+[ upstream commit 2adbccec40663c457a47391b8d704bceb579c2f0 ]
+
 The ice_memdup doesn't check the new allocated memory pointer, it calls
 the rte_memcpy directly. It should check it.
 
 Fixes: 5f0978e96220 ("net/ice/base: add OS specific implementation")
-Cc: stable@dpdk.org
 
 Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
 Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
@@ -16,7 +17,7 @@
  1 file changed, 15 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/ice/base/ice_osdep.h b/drivers/net/ice/base/ice_osdep.h
-index 0955f565af..c70f5f8a7e 100644
+index 629acef227..7310cd0a27 100644
 --- a/drivers/net/ice/base/ice_osdep.h
 +++ b/drivers/net/ice/base/ice_osdep.h
 @@ -24,6 +24,8 @@
@@ -27,16 +28,16 @@
 +
  #include "../ice_logs.h"
  
- #ifndef __INTEL_NET_BASE_OSDEP__
-@@ -193,7 +195,6 @@ struct ice_virt_mem {
+ #define INLINE inline
+@@ -176,7 +178,6 @@ struct ice_virt_mem {
  
  #define ice_memset(a, b, c, d) memset((a), (b), (c))
  #define ice_memcpy(a, b, c, d) rte_memcpy((a), (b), (c))
 -#define ice_memdup(a, b, c, d) rte_memcpy(ice_malloc(a, c), b, c)
  
- /* SW spinlock */
- struct ice_lock {
-@@ -225,6 +226,19 @@ ice_destroy_lock(__rte_unused struct ice_lock *sp)
+ #define CPU_TO_BE16(o) rte_cpu_to_be_16(o)
+ #define CPU_TO_BE32(o) rte_cpu_to_be_32(o)
+@@ -223,6 +224,19 @@ ice_destroy_lock(__attribute__((unused)) struct ice_lock *sp)
  
  struct ice_hw;
  
@@ -54,7 +55,7 @@
 +}
 +
  static inline void *
- ice_alloc_dma_mem(__rte_unused struct ice_hw *hw,
+ ice_alloc_dma_mem(__attribute__((unused)) struct ice_hw *hw,
  		  struct ice_dma_mem *mem, u64 size)
 -- 
 2.20.1

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

* [dpdk-stable] patch 'net/tap: remove unused assert' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (33 preceding siblings ...)
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/ice/base: check memory pointer before copying' " luca.boccassi
@ 2020-05-19 13:02   ` luca.boccassi
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/octeontx: fix meson build for disabled drivers' " luca.boccassi
                     ` (177 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:02 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From d50174f38a68d63553455d863f9e43aaa12dff25 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Wed, 25 Mar 2020 11:04:56 +0800
Subject: [PATCH] net/tap: remove unused assert

[ upstream commit 252566dab58820ccdae67865646160c07af18e76 ]

The assert checks is not necessary, the gso_ctx is always non-NULL.

Fixes: 050316a88313 ("net/tap: support TSO (TCP Segment Offload)")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/tap/rte_eth_tap.c | 3 ---
 drivers/net/tap/tap_intr.c    | 1 -
 2 files changed, 4 deletions(-)

diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 2c9fb76b63..4b2168e440 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -19,7 +19,6 @@
 #include <rte_ethdev.h>
 #include <rte_errno.h>
 
-#include <assert.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/socket.h>
@@ -671,8 +670,6 @@ pmd_tx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 		if (tso) {
 			struct rte_gso_ctx *gso_ctx = &txq->gso_ctx;
 
-			assert(gso_ctx != NULL);
-
 			/* TCP segmentation implies TCP checksum offload */
 			mbuf_in->ol_flags |= PKT_TX_TCP_CKSUM;
 
diff --git a/drivers/net/tap/tap_intr.c b/drivers/net/tap/tap_intr.c
index 7af0010e37..58f36d3ccb 100644
--- a/drivers/net/tap/tap_intr.c
+++ b/drivers/net/tap/tap_intr.c
@@ -7,7 +7,6 @@
  * Interrupts handling for tap driver.
  */
 
-#include <assert.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <signal.h>
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:46.049921587 +0100
+++ 0036-net-tap-remove-unused-assert.patch	2020-05-19 14:04:44.172647575 +0100
@@ -1,12 +1,13 @@
-From 252566dab58820ccdae67865646160c07af18e76 Mon Sep 17 00:00:00 2001
+From d50174f38a68d63553455d863f9e43aaa12dff25 Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Wed, 25 Mar 2020 11:04:56 +0800
 Subject: [PATCH] net/tap: remove unused assert
 
+[ upstream commit 252566dab58820ccdae67865646160c07af18e76 ]
+
 The assert checks is not necessary, the gso_ctx is always non-NULL.
 
 Fixes: 050316a88313 ("net/tap: support TSO (TCP Segment Offload)")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

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

* [dpdk-stable] patch 'net/octeontx: fix meson build for disabled drivers' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (34 preceding siblings ...)
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/tap: remove unused assert' " luca.boccassi
@ 2020-05-19 13:02   ` luca.boccassi
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/octeontx2: fix device configuration sequence' " luca.boccassi
                     ` (176 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:02 UTC (permalink / raw)
  To: Amit Gupta; +Cc: Bruce Richardson, Harman Kalra, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 272fcab0633393e8f7fa608c3046aa98ad73c9a4 Mon Sep 17 00:00:00 2001
From: Amit Gupta <agupta3@marvell.com>
Date: Wed, 4 Mar 2020 11:17:04 +0530
Subject: [PATCH] net/octeontx: fix meson build for disabled drivers

[ upstream commit be284df0829254f5b84bb965acbecef0aa2ae043 ]

Add a condition to check if octeontx drivers are disabled.
octeontx drivers are built only if dependent drivers i.e.
ethdev, mempool and common/octeontx are enabled.

Bugzilla ID: 387
Fixes: 7f615033d64f ("drivers/net: build Cavium NIC PMDs with meson")

Signed-off-by: Amit Gupta <agupta3@marvell.com>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Harman Kalra <hkalra@marvell.com>
---
 drivers/net/octeontx/base/meson.build | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/octeontx/base/meson.build b/drivers/net/octeontx/base/meson.build
index a06a2c89c9..e1060fc4ec 100644
--- a/drivers/net/octeontx/base/meson.build
+++ b/drivers/net/octeontx/base/meson.build
@@ -10,7 +10,10 @@ sources = [
 depends = ['ethdev', 'mempool_octeontx']
 static_objs = []
 foreach d: depends
-	static_objs += [get_variable('static_rte_' + d)]
+	if not is_variable('shared_rte_' + d)
+		subdir_done()
+	endif
+	static_objs += get_variable('static_rte_' + d)
 endforeach
 
 c_args = cflags
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:46.086685211 +0100
+++ 0037-net-octeontx-fix-meson-build-for-disabled-drivers.patch	2020-05-19 14:04:44.172647575 +0100
@@ -1,15 +1,16 @@
-From be284df0829254f5b84bb965acbecef0aa2ae043 Mon Sep 17 00:00:00 2001
+From 272fcab0633393e8f7fa608c3046aa98ad73c9a4 Mon Sep 17 00:00:00 2001
 From: Amit Gupta <agupta3@marvell.com>
 Date: Wed, 4 Mar 2020 11:17:04 +0530
 Subject: [PATCH] net/octeontx: fix meson build for disabled drivers
 
+[ upstream commit be284df0829254f5b84bb965acbecef0aa2ae043 ]
+
 Add a condition to check if octeontx drivers are disabled.
 octeontx drivers are built only if dependent drivers i.e.
 ethdev, mempool and common/octeontx are enabled.
 
 Bugzilla ID: 387
 Fixes: 7f615033d64f ("drivers/net: build Cavium NIC PMDs with meson")
-Cc: stable@dpdk.org
 
 Signed-off-by: Amit Gupta <agupta3@marvell.com>
 Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
@@ -19,7 +20,7 @@
  1 file changed, 4 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/octeontx/base/meson.build b/drivers/net/octeontx/base/meson.build
-index b72104170e..b8fe4b3013 100644
+index a06a2c89c9..e1060fc4ec 100644
 --- a/drivers/net/octeontx/base/meson.build
 +++ b/drivers/net/octeontx/base/meson.build
 @@ -10,7 +10,10 @@ sources = [

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

* [dpdk-stable] patch 'net/octeontx2: fix device configuration sequence' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (35 preceding siblings ...)
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/octeontx: fix meson build for disabled drivers' " luca.boccassi
@ 2020-05-19 13:02   ` luca.boccassi
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/ice: change default tunnel type' " luca.boccassi
                     ` (175 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:02 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 8e8fdd68f75c227e51551ad9d1398b5e18e206c3 Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Sat, 4 Apr 2020 20:49:50 +0530
Subject: [PATCH] net/octeontx2: fix device configuration sequence

[ upstream commit b372fff7d490ba6f127de310bf52b3eb838267c8 ]

When an application invokes rte_eth_dev_configure consecutively without
setting up Rx/Tx queues, it will incorrectly return error while trying
to restore Rx/Tx queue configuration.

Fix configuration sequence by checking if any Rx/Tx queues are
previously configured before trying to restore them.

Fixes: 548b5839a32b ("net/octeontx2: add device configure operation")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 drivers/net/octeontx2/otx2_ethdev.c | 16 ++++++++++++----
 drivers/net/octeontx2/otx2_ethdev.h |  1 +
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c
index c86165b5ec..e450a5ae01 100644
--- a/drivers/net/octeontx2/otx2_ethdev.c
+++ b/drivers/net/octeontx2/otx2_ethdev.c
@@ -1115,10 +1115,12 @@ nix_store_queue_cfg_and_then_release(struct rte_eth_dev *eth_dev)
 	txq = (struct otx2_eth_txq **)eth_dev->data->tx_queues;
 	for (i = 0; i < nb_txq; i++) {
 		if (txq[i] == NULL) {
-			otx2_err("txq[%d] is already released", i);
-			goto fail;
+			tx_qconf[i].valid = false;
+			otx2_info("txq[%d] is already released", i);
+			continue;
 		}
 		memcpy(&tx_qconf[i], &txq[i]->qconf, sizeof(*tx_qconf));
+		tx_qconf[i].valid = true;
 		otx2_nix_tx_queue_release(txq[i]);
 		eth_dev->data->tx_queues[i] = NULL;
 	}
@@ -1126,10 +1128,12 @@ nix_store_queue_cfg_and_then_release(struct rte_eth_dev *eth_dev)
 	rxq = (struct otx2_eth_rxq **)eth_dev->data->rx_queues;
 	for (i = 0; i < nb_rxq; i++) {
 		if (rxq[i] == NULL) {
-			otx2_err("rxq[%d] is already released", i);
-			goto fail;
+			rx_qconf[i].valid = false;
+			otx2_info("rxq[%d] is already released", i);
+			continue;
 		}
 		memcpy(&rx_qconf[i], &rxq[i]->qconf, sizeof(*rx_qconf));
+		rx_qconf[i].valid = true;
 		otx2_nix_rx_queue_release(rxq[i]);
 		eth_dev->data->rx_queues[i] = NULL;
 	}
@@ -1184,6 +1188,8 @@ nix_restore_queue_cfg(struct rte_eth_dev *eth_dev)
 	 * queues are already setup in port_configure().
 	 */
 	for (i = 0; i < nb_txq; i++) {
+		if (!tx_qconf[i].valid)
+			continue;
 		rc = otx2_nix_tx_queue_setup(eth_dev, i, tx_qconf[i].nb_desc,
 					     tx_qconf[i].socket_id,
 					     &tx_qconf[i].conf.tx);
@@ -1199,6 +1205,8 @@ nix_restore_queue_cfg(struct rte_eth_dev *eth_dev)
 	free(tx_qconf); tx_qconf = NULL;
 
 	for (i = 0; i < nb_rxq; i++) {
+		if (!rx_qconf[i].valid)
+			continue;
 		rc = otx2_nix_rx_queue_setup(eth_dev, i, rx_qconf[i].nb_desc,
 					     rx_qconf[i].socket_id,
 					     &rx_qconf[i].conf.rx,
diff --git a/drivers/net/octeontx2/otx2_ethdev.h b/drivers/net/octeontx2/otx2_ethdev.h
index 483535ab12..fdc79633e4 100644
--- a/drivers/net/octeontx2/otx2_ethdev.h
+++ b/drivers/net/octeontx2/otx2_ethdev.h
@@ -192,6 +192,7 @@ struct otx2_eth_qconf {
 	void *mempool;
 	uint32_t socket_id;
 	uint16_t nb_desc;
+	uint8_t valid;
 };
 
 struct otx2_fc_info {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:46.123128754 +0100
+++ 0038-net-octeontx2-fix-device-configuration-sequence.patch	2020-05-19 14:04:44.176647647 +0100
@@ -1,8 +1,10 @@
-From b372fff7d490ba6f127de310bf52b3eb838267c8 Mon Sep 17 00:00:00 2001
+From 8e8fdd68f75c227e51551ad9d1398b5e18e206c3 Mon Sep 17 00:00:00 2001
 From: Pavan Nikhilesh <pbhagavatula@marvell.com>
 Date: Sat, 4 Apr 2020 20:49:50 +0530
 Subject: [PATCH] net/octeontx2: fix device configuration sequence
 
+[ upstream commit b372fff7d490ba6f127de310bf52b3eb838267c8 ]
+
 When an application invokes rte_eth_dev_configure consecutively without
 setting up Rx/Tx queues, it will incorrectly return error while trying
 to restore Rx/Tx queue configuration.
@@ -11,7 +13,6 @@
 previously configured before trying to restore them.
 
 Fixes: 548b5839a32b ("net/octeontx2: add device configure operation")
-Cc: stable@dpdk.org
 
 Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
 Acked-by: Jerin Jacob <jerinj@marvell.com>
@@ -21,10 +22,10 @@
  2 files changed, 13 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c
-index 19d32ba502..e10033ec57 100644
+index c86165b5ec..e450a5ae01 100644
 --- a/drivers/net/octeontx2/otx2_ethdev.c
 +++ b/drivers/net/octeontx2/otx2_ethdev.c
-@@ -1139,10 +1139,12 @@ nix_store_queue_cfg_and_then_release(struct rte_eth_dev *eth_dev)
+@@ -1115,10 +1115,12 @@ nix_store_queue_cfg_and_then_release(struct rte_eth_dev *eth_dev)
  	txq = (struct otx2_eth_txq **)eth_dev->data->tx_queues;
  	for (i = 0; i < nb_txq; i++) {
  		if (txq[i] == NULL) {
@@ -39,7 +40,7 @@
  		otx2_nix_tx_queue_release(txq[i]);
  		eth_dev->data->tx_queues[i] = NULL;
  	}
-@@ -1150,10 +1152,12 @@ nix_store_queue_cfg_and_then_release(struct rte_eth_dev *eth_dev)
+@@ -1126,10 +1128,12 @@ nix_store_queue_cfg_and_then_release(struct rte_eth_dev *eth_dev)
  	rxq = (struct otx2_eth_rxq **)eth_dev->data->rx_queues;
  	for (i = 0; i < nb_rxq; i++) {
  		if (rxq[i] == NULL) {
@@ -54,7 +55,7 @@
  		otx2_nix_rx_queue_release(rxq[i]);
  		eth_dev->data->rx_queues[i] = NULL;
  	}
-@@ -1208,6 +1212,8 @@ nix_restore_queue_cfg(struct rte_eth_dev *eth_dev)
+@@ -1184,6 +1188,8 @@ nix_restore_queue_cfg(struct rte_eth_dev *eth_dev)
  	 * queues are already setup in port_configure().
  	 */
  	for (i = 0; i < nb_txq; i++) {
@@ -63,7 +64,7 @@
  		rc = otx2_nix_tx_queue_setup(eth_dev, i, tx_qconf[i].nb_desc,
  					     tx_qconf[i].socket_id,
  					     &tx_qconf[i].conf.tx);
-@@ -1223,6 +1229,8 @@ nix_restore_queue_cfg(struct rte_eth_dev *eth_dev)
+@@ -1199,6 +1205,8 @@ nix_restore_queue_cfg(struct rte_eth_dev *eth_dev)
  	free(tx_qconf); tx_qconf = NULL;
  
  	for (i = 0; i < nb_rxq; i++) {
@@ -73,10 +74,10 @@
  					     rx_qconf[i].socket_id,
  					     &rx_qconf[i].conf.rx,
 diff --git a/drivers/net/octeontx2/otx2_ethdev.h b/drivers/net/octeontx2/otx2_ethdev.h
-index 1bfcda2fca..0fbf68b8e0 100644
+index 483535ab12..fdc79633e4 100644
 --- a/drivers/net/octeontx2/otx2_ethdev.h
 +++ b/drivers/net/octeontx2/otx2_ethdev.h
-@@ -196,6 +196,7 @@ struct otx2_eth_qconf {
+@@ -192,6 +192,7 @@ struct otx2_eth_qconf {
  	void *mempool;
  	uint32_t socket_id;
  	uint16_t nb_desc;

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

* [dpdk-stable] patch 'net/ice: change default tunnel type' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (36 preceding siblings ...)
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/octeontx2: fix device configuration sequence' " luca.boccassi
@ 2020-05-19 13:02   ` luca.boccassi
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/ice: add action number check for switch' " luca.boccassi
                     ` (174 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:02 UTC (permalink / raw)
  To: Wei Zhao; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 1b23b24565c49869d9a750633a0dd96bb95f33ff Mon Sep 17 00:00:00 2001
From: Wei Zhao <wei.zhao1@intel.com>
Date: Fri, 3 Apr 2020 12:46:01 +0800
Subject: [PATCH] net/ice: change default tunnel type

[ upstream commit 6bc7628c5e0b9c15dd2784bdf45546e8284d6f68 ]

The default tunnel type for switch filter change to new
definition of ICE_SW_TUN_AND_NON_TUN in order that the rule
will be apply to more packet type.

Fixes: 47d460d63233 ("net/ice: rework switch filter")

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_switch_filter.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c
index 66dc158efc..1db3db43c2 100644
--- a/drivers/net/ice/ice_switch_filter.c
+++ b/drivers/net/ice/ice_switch_filter.c
@@ -1015,7 +1015,8 @@ ice_switch_parse_pattern_action(struct ice_adapter *ad,
 	uint16_t lkups_num = 0;
 	const struct rte_flow_item *item = pattern;
 	uint16_t item_num = 0;
-	enum ice_sw_tunnel_type tun_type = ICE_NON_TUN;
+	enum ice_sw_tunnel_type tun_type =
+		ICE_SW_TUN_AND_NON_TUN;
 	struct ice_pattern_match_item *pattern_match_item = NULL;
 
 	for (; item->type != RTE_FLOW_ITEM_TYPE_END; item++) {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:46.160608286 +0100
+++ 0039-net-ice-change-default-tunnel-type.patch	2020-05-19 14:04:44.176647647 +0100
@@ -1,14 +1,15 @@
-From 6bc7628c5e0b9c15dd2784bdf45546e8284d6f68 Mon Sep 17 00:00:00 2001
+From 1b23b24565c49869d9a750633a0dd96bb95f33ff Mon Sep 17 00:00:00 2001
 From: Wei Zhao <wei.zhao1@intel.com>
 Date: Fri, 3 Apr 2020 12:46:01 +0800
 Subject: [PATCH] net/ice: change default tunnel type
 
+[ upstream commit 6bc7628c5e0b9c15dd2784bdf45546e8284d6f68 ]
+
 The default tunnel type for switch filter change to new
 definition of ICE_SW_TUN_AND_NON_TUN in order that the rule
 will be apply to more packet type.
 
 Fixes: 47d460d63233 ("net/ice: rework switch filter")
-Cc: stable@dpdk.org
 
 Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
 Acked-by: Qi Zhang <qi.z.zhang@intel.com>
@@ -17,10 +18,10 @@
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c
-index ed02d9805c..d9bdf9637e 100644
+index 66dc158efc..1db3db43c2 100644
 --- a/drivers/net/ice/ice_switch_filter.c
 +++ b/drivers/net/ice/ice_switch_filter.c
-@@ -1091,7 +1091,8 @@ ice_switch_parse_pattern_action(struct ice_adapter *ad,
+@@ -1015,7 +1015,8 @@ ice_switch_parse_pattern_action(struct ice_adapter *ad,
  	uint16_t lkups_num = 0;
  	const struct rte_flow_item *item = pattern;
  	uint16_t item_num = 0;

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

* [dpdk-stable] patch 'net/ice: add action number check for switch' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (37 preceding siblings ...)
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/ice: change default tunnel type' " luca.boccassi
@ 2020-05-19 13:02   ` luca.boccassi
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/ice: fix input set of VLAN item' " luca.boccassi
                     ` (173 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:02 UTC (permalink / raw)
  To: Wei Zhao; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 175dc210ad7793de6ce5d1d1522642bb58f61e9a Mon Sep 17 00:00:00 2001
From: Wei Zhao <wei.zhao1@intel.com>
Date: Fri, 3 Apr 2020 12:46:02 +0800
Subject: [PATCH] net/ice: add action number check for switch

[ upstream commit 3428c6b6ec1f0882e7b167c44c1fb11d0ef1d83b ]

The action number can only be one for DCF or PF
switch filter, not support multiple actions.

Fixes: 47d460d63233 ("net/ice: rework switch filter")

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_switch_filter.c | 48 +++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c
index 1db3db43c2..0d88e0bd7e 100644
--- a/drivers/net/ice/ice_switch_filter.c
+++ b/drivers/net/ice/ice_switch_filter.c
@@ -997,6 +997,46 @@ error:
 	return -rte_errno;
 }
 
+static int
+ice_switch_check_action(const struct rte_flow_action *actions,
+			    struct rte_flow_error *error)
+{
+	const struct rte_flow_action *action;
+	enum rte_flow_action_type action_type;
+	uint16_t actions_num = 0;
+
+	for (action = actions; action->type !=
+				RTE_FLOW_ACTION_TYPE_END; action++) {
+		action_type = action->type;
+		switch (action_type) {
+		case RTE_FLOW_ACTION_TYPE_VF:
+		case RTE_FLOW_ACTION_TYPE_RSS:
+		case RTE_FLOW_ACTION_TYPE_QUEUE:
+		case RTE_FLOW_ACTION_TYPE_DROP:
+			actions_num++;
+			break;
+		case RTE_FLOW_ACTION_TYPE_VOID:
+			continue;
+		default:
+			rte_flow_error_set(error,
+					   EINVAL, RTE_FLOW_ERROR_TYPE_ACTION,
+					   actions,
+					   "Invalid action type");
+			return -rte_errno;
+		}
+	}
+
+	if (actions_num > 1) {
+		rte_flow_error_set(error,
+				   EINVAL, RTE_FLOW_ERROR_TYPE_ACTION,
+				   actions,
+				   "Invalid action number");
+		return -rte_errno;
+	}
+
+	return 0;
+}
+
 static int
 ice_switch_parse_pattern_action(struct ice_adapter *ad,
 		struct ice_pattern_match_item *array,
@@ -1082,6 +1122,14 @@ ice_switch_parse_pattern_action(struct ice_adapter *ad,
 		goto error;
 	}
 
+	ret = ice_switch_check_action(actions, error);
+	if (ret) {
+		rte_flow_error_set(error, EINVAL,
+				   RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
+				   "Invalid input action number");
+		goto error;
+	}
+
 	ret = ice_switch_parse_action(pf, actions, error, &rule_info);
 	if (ret) {
 		rte_flow_error_set(error, EINVAL,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:46.196659181 +0100
+++ 0040-net-ice-add-action-number-check-for-switch.patch	2020-05-19 14:04:44.176647647 +0100
@@ -1,13 +1,14 @@
-From 3428c6b6ec1f0882e7b167c44c1fb11d0ef1d83b Mon Sep 17 00:00:00 2001
+From 175dc210ad7793de6ce5d1d1522642bb58f61e9a Mon Sep 17 00:00:00 2001
 From: Wei Zhao <wei.zhao1@intel.com>
 Date: Fri, 3 Apr 2020 12:46:02 +0800
 Subject: [PATCH] net/ice: add action number check for switch
 
+[ upstream commit 3428c6b6ec1f0882e7b167c44c1fb11d0ef1d83b ]
+
 The action number can only be one for DCF or PF
 switch filter, not support multiple actions.
 
 Fixes: 47d460d63233 ("net/ice: rework switch filter")
-Cc: stable@dpdk.org
 
 Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
 Acked-by: Qi Zhang <qi.z.zhang@intel.com>
@@ -16,10 +17,10 @@
  1 file changed, 48 insertions(+)
 
 diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c
-index d9bdf9637e..cc48f22dde 100644
+index 1db3db43c2..0d88e0bd7e 100644
 --- a/drivers/net/ice/ice_switch_filter.c
 +++ b/drivers/net/ice/ice_switch_filter.c
-@@ -1073,6 +1073,46 @@ error:
+@@ -997,6 +997,46 @@ error:
  	return -rte_errno;
  }
  
@@ -66,7 +67,7 @@
  static int
  ice_switch_parse_pattern_action(struct ice_adapter *ad,
  		struct ice_pattern_match_item *array,
-@@ -1158,6 +1198,14 @@ ice_switch_parse_pattern_action(struct ice_adapter *ad,
+@@ -1082,6 +1122,14 @@ ice_switch_parse_pattern_action(struct ice_adapter *ad,
  		goto error;
  	}
  
@@ -78,9 +79,9 @@
 +		goto error;
 +	}
 +
- 	if (ad->hw.dcf_enabled)
- 		ret = ice_switch_parse_dcf_action(actions, error, &rule_info);
- 	else
+ 	ret = ice_switch_parse_action(pf, actions, error, &rule_info);
+ 	if (ret) {
+ 		rte_flow_error_set(error, EINVAL,
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'net/ice: fix input set of VLAN item' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (38 preceding siblings ...)
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/ice: add action number check for switch' " luca.boccassi
@ 2020-05-19 13:02   ` luca.boccassi
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/netvsc: propagate descriptor limits from VF' " luca.boccassi
                     ` (172 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:02 UTC (permalink / raw)
  To: Wei Zhao; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 39e690ab3b1a2b823b39d7868cbbad8cf41cc110 Mon Sep 17 00:00:00 2001
From: Wei Zhao <wei.zhao1@intel.com>
Date: Fri, 3 Apr 2020 12:46:07 +0800
Subject: [PATCH] net/ice: fix input set of VLAN item

[ upstream commit 5d834926034f311caf3eabc685691cb9cb803f32 ]

The input set for inner type of vlan item should
be ICE_INSET_ETHERTYPE, not ICE_INSET_VLAN_OUTER.
This mac vlan filter is also part of DCF switch filter.

Fixes: 47d460d63233 ("net/ice: rework switch filter")

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_switch_filter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c
index 0d88e0bd7e..1d91d773ec 100644
--- a/drivers/net/ice/ice_switch_filter.c
+++ b/drivers/net/ice/ice_switch_filter.c
@@ -871,7 +871,7 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
 						vlan_spec->inner_type;
 					list[t].m_u.vlan_hdr.type =
 						UINT16_MAX;
-					input_set |= ICE_INSET_VLAN_OUTER;
+					input_set |= ICE_INSET_ETHERTYPE;
 				}
 				t++;
 			} else if (!vlan_spec && !vlan_mask) {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:46.233846675 +0100
+++ 0041-net-ice-fix-input-set-of-VLAN-item.patch	2020-05-19 14:04:44.176647647 +0100
@@ -1,14 +1,15 @@
-From 5d834926034f311caf3eabc685691cb9cb803f32 Mon Sep 17 00:00:00 2001
+From 39e690ab3b1a2b823b39d7868cbbad8cf41cc110 Mon Sep 17 00:00:00 2001
 From: Wei Zhao <wei.zhao1@intel.com>
 Date: Fri, 3 Apr 2020 12:46:07 +0800
 Subject: [PATCH] net/ice: fix input set of VLAN item
 
+[ upstream commit 5d834926034f311caf3eabc685691cb9cb803f32 ]
+
 The input set for inner type of vlan item should
 be ICE_INSET_ETHERTYPE, not ICE_INSET_VLAN_OUTER.
 This mac vlan filter is also part of DCF switch filter.
 
 Fixes: 47d460d63233 ("net/ice: rework switch filter")
-Cc: stable@dpdk.org
 
 Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
 Acked-by: Qi Zhang <qi.z.zhang@intel.com>
@@ -17,18 +18,18 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c
-index 81d069e995..686f9c3e3d 100644
+index 0d88e0bd7e..1d91d773ec 100644
 --- a/drivers/net/ice/ice_switch_filter.c
 +++ b/drivers/net/ice/ice_switch_filter.c
-@@ -911,7 +911,7 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
+@@ -871,7 +871,7 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
  						vlan_spec->inner_type;
  					list[t].m_u.vlan_hdr.type =
- 						vlan_mask->inner_type;
+ 						UINT16_MAX;
 -					input_set |= ICE_INSET_VLAN_OUTER;
 +					input_set |= ICE_INSET_ETHERTYPE;
  				}
  				t++;
- 			}
+ 			} else if (!vlan_spec && !vlan_mask) {
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'net/netvsc: propagate descriptor limits from VF' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (39 preceding siblings ...)
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/ice: fix input set of VLAN item' " luca.boccassi
@ 2020-05-19 13:02   ` luca.boccassi
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/netvsc: handle Rx packets during multi-channel setup' " luca.boccassi
                     ` (171 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:02 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From cc1f0062537705bf1f619f989ff5fb4fae9a77fe Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 31 Mar 2020 10:13:57 -0700
Subject: [PATCH] net/netvsc: propagate descriptor limits from VF

[ upstream commit 4bc7dc1110ac9284b07150a13436e2b0ca5a62d0 ]

If application cares about descriptor limits, the netvsc device
values should reflect those of the VF as well.

Fixes: dc7680e8597c ("net/netvsc: support integrated VF")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/netvsc/hn_vf.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/net/netvsc/hn_vf.c b/drivers/net/netvsc/hn_vf.c
index 7a3734cadf..1261b2e2ef 100644
--- a/drivers/net/netvsc/hn_vf.c
+++ b/drivers/net/netvsc/hn_vf.c
@@ -167,6 +167,17 @@ hn_nvs_handle_vfassoc(struct rte_eth_dev *dev,
 		hn_vf_remove(hv);
 }
 
+static void
+hn_vf_merge_desc_lim(struct rte_eth_desc_lim *lim,
+		     const struct rte_eth_desc_lim *vf_lim)
+{
+	lim->nb_max = RTE_MIN(vf_lim->nb_max, lim->nb_max);
+	lim->nb_min = RTE_MAX(vf_lim->nb_min, lim->nb_min);
+	lim->nb_align = RTE_MAX(vf_lim->nb_align, lim->nb_align);
+	lim->nb_seg_max = RTE_MIN(vf_lim->nb_seg_max, lim->nb_seg_max);
+	lim->nb_mtu_seg_max = RTE_MIN(vf_lim->nb_seg_max, lim->nb_seg_max);
+}
+
 /*
  * Merge the info from the VF and synthetic path.
  * use the default config of the VF
@@ -196,11 +207,13 @@ static int hn_vf_info_merge(struct rte_eth_dev *vf_dev,
 				      info->max_tx_queues);
 	info->tx_offload_capa &= vf_info.tx_offload_capa;
 	info->tx_queue_offload_capa &= vf_info.tx_queue_offload_capa;
+	hn_vf_merge_desc_lim(&info->tx_desc_lim, &vf_info.tx_desc_lim);
 
 	info->min_rx_bufsize = RTE_MAX(vf_info.min_rx_bufsize,
 				       info->min_rx_bufsize);
 	info->max_rx_pktlen  = RTE_MAX(vf_info.max_rx_pktlen,
 				       info->max_rx_pktlen);
+	hn_vf_merge_desc_lim(&info->rx_desc_lim, &vf_info.rx_desc_lim);
 
 	return 0;
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:46.269222883 +0100
+++ 0042-net-netvsc-propagate-descriptor-limits-from-VF.patch	2020-05-19 14:04:44.180647720 +0100
@@ -1,13 +1,14 @@
-From 4bc7dc1110ac9284b07150a13436e2b0ca5a62d0 Mon Sep 17 00:00:00 2001
+From cc1f0062537705bf1f619f989ff5fb4fae9a77fe Mon Sep 17 00:00:00 2001
 From: Stephen Hemminger <stephen@networkplumber.org>
 Date: Tue, 31 Mar 2020 10:13:57 -0700
 Subject: [PATCH] net/netvsc: propagate descriptor limits from VF
 
+[ upstream commit 4bc7dc1110ac9284b07150a13436e2b0ca5a62d0 ]
+
 If application cares about descriptor limits, the netvsc device
 values should reflect those of the VF as well.
 
 Fixes: dc7680e8597c ("net/netvsc: support integrated VF")
-Cc: stable@dpdk.org
 
 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
 ---

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

* [dpdk-stable] patch 'net/netvsc: handle Rx packets during multi-channel setup' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (40 preceding siblings ...)
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/netvsc: propagate descriptor limits from VF' " luca.boccassi
@ 2020-05-19 13:02   ` luca.boccassi
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/netvsc: split send buffers from Tx descriptors' " luca.boccassi
                     ` (170 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:02 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 244193073d217876eb9c40b9acb48e9a42cd5eaf Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 31 Mar 2020 10:13:58 -0700
Subject: [PATCH] net/netvsc: handle Rx packets during multi-channel setup

[ upstream commit 107f3cf31047e09a146e8ebc3d232f3de9d55466 ]

It is possible for a packet to arrive during the configuration
process when setting up multiple queue mode. This would cause
configure to fail; fix by just ignoring receive packets while
waiting for control commands.

Use the receive ring lock to avoid possible races between
oddly behaved applications doing rx_burst and control operations
concurrently.

Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/netvsc/hn_nvs.c | 41 +++++++++++++++++++++++++++++++++++--
 1 file changed, 39 insertions(+), 2 deletions(-)

diff --git a/drivers/net/netvsc/hn_nvs.c b/drivers/net/netvsc/hn_nvs.c
index 6b518685ab..477202b2a0 100644
--- a/drivers/net/netvsc/hn_nvs.c
+++ b/drivers/net/netvsc/hn_nvs.c
@@ -54,7 +54,7 @@ static int hn_nvs_req_send(struct hn_data *hv,
 }
 
 static int
-hn_nvs_execute(struct hn_data *hv,
+__hn_nvs_execute(struct hn_data *hv,
 	       void *req, uint32_t reqlen,
 	       void *resp, uint32_t resplen,
 	       uint32_t type)
@@ -62,6 +62,7 @@ hn_nvs_execute(struct hn_data *hv,
 	struct vmbus_channel *chan = hn_primary_chan(hv);
 	char buffer[NVS_RESPSIZE_MAX];
 	const struct hn_nvs_hdr *hdr;
+	uint64_t xactid;
 	uint32_t len;
 	int ret;
 
@@ -77,7 +78,7 @@ hn_nvs_execute(struct hn_data *hv,
 
  retry:
 	len = sizeof(buffer);
-	ret = rte_vmbus_chan_recv(chan, buffer, &len, NULL);
+	ret = rte_vmbus_chan_recv(chan, buffer, &len, &xactid);
 	if (ret == -EAGAIN) {
 		rte_delay_us(HN_CHAN_INTERVAL_US);
 		goto retry;
@@ -88,7 +89,20 @@ hn_nvs_execute(struct hn_data *hv,
 		return ret;
 	}
 
+	if (len < sizeof(*hdr)) {
+		PMD_DRV_LOG(ERR, "response missing NVS header");
+		return -EINVAL;
+	}
+
 	hdr = (struct hn_nvs_hdr *)buffer;
+
+	/* Silently drop received packets while waiting for response */
+	if (hdr->type == NVS_TYPE_RNDIS) {
+		hn_nvs_ack_rxbuf(chan, xactid);
+		--hv->rxbuf_outstanding;
+		goto retry;
+	}
+
 	if (hdr->type != type) {
 		PMD_DRV_LOG(ERR, "unexpected NVS resp %#x, expect %#x",
 			    hdr->type, type);
@@ -108,6 +122,29 @@ hn_nvs_execute(struct hn_data *hv,
 	return 0;
 }
 
+
+/*
+ * Execute one control command and get the response.
+ * Only one command can be active on a channel at once
+ * Unlike BSD, DPDK does not have an interrupt context
+ * so the polling is required to wait for response.
+ */
+static int
+hn_nvs_execute(struct hn_data *hv,
+	       void *req, uint32_t reqlen,
+	       void *resp, uint32_t resplen,
+	       uint32_t type)
+{
+	struct hn_rx_queue *rxq = hv->primary;
+	int ret;
+
+	rte_spinlock_lock(&rxq->ring_lock);
+	ret = __hn_nvs_execute(hv, req, reqlen, resp, resplen, type);
+	rte_spinlock_unlock(&rxq->ring_lock);
+
+	return ret;
+}
+
 static int
 hn_nvs_doinit(struct hn_data *hv, uint32_t nvs_ver)
 {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:46.305196628 +0100
+++ 0043-net-netvsc-handle-Rx-packets-during-multi-channel-se.patch	2020-05-19 14:04:44.180647720 +0100
@@ -1,8 +1,10 @@
-From 107f3cf31047e09a146e8ebc3d232f3de9d55466 Mon Sep 17 00:00:00 2001
+From 244193073d217876eb9c40b9acb48e9a42cd5eaf Mon Sep 17 00:00:00 2001
 From: Stephen Hemminger <stephen@networkplumber.org>
 Date: Tue, 31 Mar 2020 10:13:58 -0700
 Subject: [PATCH] net/netvsc: handle Rx packets during multi-channel setup
 
+[ upstream commit 107f3cf31047e09a146e8ebc3d232f3de9d55466 ]
+
 It is possible for a packet to arrive during the configuration
 process when setting up multiple queue mode. This would cause
 configure to fail; fix by just ignoring receive packets while
@@ -13,7 +15,6 @@
 concurrently.
 
 Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device")
-Cc: stable@dpdk.org
 
 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
 ---

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

* [dpdk-stable] patch 'net/netvsc: split send buffers from Tx descriptors' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (41 preceding siblings ...)
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/netvsc: handle Rx packets during multi-channel setup' " luca.boccassi
@ 2020-05-19 13:02   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/netvsc: fix memory free on device close' " luca.boccassi
                     ` (169 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:02 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 42916635b395dfc3216b7185ee43192aa785ff43 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 31 Mar 2020 10:13:59 -0700
Subject: [PATCH] net/netvsc: split send buffers from Tx descriptors

[ upstream commit cc0251813277fcf43b930b43ab4a423ed7536120 ]

The VMBus has reserved transmit area (per device) and transmit
descriptors (per queue). The previous code was always having a 1:1
mapping between send buffers and descriptors.
This can lead to one queue starving another and also buffer bloat.

Change to working more like FreeBSD where there is a pool of transmit
descriptors per queue. If send buffer is not available then no
aggregation happens but the queue can still drain.

Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/netvsc/hn_ethdev.c |   9 +-
 drivers/net/netvsc/hn_rxtx.c   | 269 ++++++++++++++++++++-------------
 drivers/net/netvsc/hn_var.h    |  10 +-
 3 files changed, 179 insertions(+), 109 deletions(-)

diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index 564620748d..ac66108380 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -257,6 +257,9 @@ static int hn_dev_info_get(struct rte_eth_dev *dev,
 	dev_info->max_rx_queues = hv->max_queues;
 	dev_info->max_tx_queues = hv->max_queues;
 
+	dev_info->tx_desc_lim.nb_min = 1;
+	dev_info->tx_desc_lim.nb_max = 4096;
+
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
 		return 0;
 
@@ -982,7 +985,7 @@ eth_hn_dev_init(struct rte_eth_dev *eth_dev)
 	if  (err)
 		goto failed;
 
-	err = hn_tx_pool_init(eth_dev);
+	err = hn_chim_init(eth_dev);
 	if (err)
 		goto failed;
 
@@ -1018,7 +1021,7 @@ eth_hn_dev_init(struct rte_eth_dev *eth_dev)
 failed:
 	PMD_INIT_LOG(NOTICE, "device init failed");
 
-	hn_tx_pool_uninit(eth_dev);
+	hn_chim_uninit(eth_dev);
 	hn_detach(hv);
 	return err;
 }
@@ -1042,7 +1045,7 @@ eth_hn_dev_uninit(struct rte_eth_dev *eth_dev)
 	eth_dev->rx_pkt_burst = NULL;
 
 	hn_detach(hv);
-	hn_tx_pool_uninit(eth_dev);
+	hn_chim_uninit(eth_dev);
 	rte_vmbus_chan_close(hv->primary->chan);
 	rte_free(hv->primary);
 	ret = rte_eth_dev_owner_delete(hv->owner.id);
diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
index 7212780c15..32c03e3da0 100644
--- a/drivers/net/netvsc/hn_rxtx.c
+++ b/drivers/net/netvsc/hn_rxtx.c
@@ -18,6 +18,7 @@
 #include <rte_memzone.h>
 #include <rte_malloc.h>
 #include <rte_atomic.h>
+#include <rte_bitmap.h>
 #include <rte_branch_prediction.h>
 #include <rte_ether.h>
 #include <rte_common.h>
@@ -83,7 +84,7 @@ struct hn_txdesc {
 	struct rte_mbuf *m;
 
 	uint16_t	queue_id;
-	uint16_t	chim_index;
+	uint32_t	chim_index;
 	uint32_t	chim_size;
 	uint32_t	data_size;
 	uint32_t	packets;
@@ -98,11 +99,13 @@ struct hn_txdesc {
 	 RNDIS_PKTINFO_SIZE(NDIS_LSO2_INFO_SIZE) +	\
 	 RNDIS_PKTINFO_SIZE(NDIS_TXCSUM_INFO_SIZE))
 
+#define HN_RNDIS_PKT_ALIGNED	RTE_ALIGN(HN_RNDIS_PKT_LEN, RTE_CACHE_LINE_SIZE)
+
 /* Minimum space required for a packet */
 #define HN_PKTSIZE_MIN(align) \
 	RTE_ALIGN(RTE_ETHER_MIN_LEN + HN_RNDIS_PKT_LEN, align)
 
-#define DEFAULT_TX_FREE_THRESH 32U
+#define DEFAULT_TX_FREE_THRESH 32
 
 static void
 hn_update_packet_stats(struct hn_stats *stats, const struct rte_mbuf *m)
@@ -150,63 +153,77 @@ hn_rndis_pktmsg_offset(uint32_t ofs)
 static void hn_txd_init(struct rte_mempool *mp __rte_unused,
 			void *opaque, void *obj, unsigned int idx)
 {
+	struct hn_tx_queue *txq = opaque;
 	struct hn_txdesc *txd = obj;
-	struct rte_eth_dev *dev = opaque;
-	struct rndis_packet_msg *pkt;
 
 	memset(txd, 0, sizeof(*txd));
-	txd->chim_index = idx;
 
-	pkt = rte_malloc_socket("RNDIS_TX", HN_RNDIS_PKT_LEN,
-				rte_align32pow2(HN_RNDIS_PKT_LEN),
-				dev->device->numa_node);
-	if (!pkt)
-		rte_exit(EXIT_FAILURE, "can not allocate RNDIS header");
-
-	txd->rndis_pkt = pkt;
+	txd->queue_id = txq->queue_id;
+	txd->chim_index = NVS_CHIM_IDX_INVALID;
+	txd->rndis_pkt = (struct rndis_packet_msg *)(char *)txq->tx_rndis
+		+ idx * HN_RNDIS_PKT_ALIGNED;
 }
 
-/*
- * Unlike Linux and FreeBSD, this driver uses a mempool
- * to limit outstanding transmits and reserve buffers
- */
 int
-hn_tx_pool_init(struct rte_eth_dev *dev)
+hn_chim_init(struct rte_eth_dev *dev)
 {
 	struct hn_data *hv = dev->data->dev_private;
-	char name[RTE_MEMPOOL_NAMESIZE];
-	struct rte_mempool *mp;
+	uint32_t i, chim_bmp_size;
 
-	snprintf(name, sizeof(name),
-		 "hn_txd_%u", dev->data->port_id);
-
-	PMD_INIT_LOG(DEBUG, "create a TX send pool %s n=%u size=%zu socket=%d",
-		     name, hv->chim_cnt, sizeof(struct hn_txdesc),
-		     dev->device->numa_node);
+	rte_spinlock_init(&hv->chim_lock);
+	chim_bmp_size = rte_bitmap_get_memory_footprint(hv->chim_cnt);
+	hv->chim_bmem = rte_zmalloc("hn_chim_bitmap", chim_bmp_size,
+				    RTE_CACHE_LINE_SIZE);
+	if (hv->chim_bmem == NULL) {
+		PMD_INIT_LOG(ERR, "failed to allocate bitmap size %u",
+			     chim_bmp_size);
+		return -1;
+	}
 
-	mp = rte_mempool_create(name, hv->chim_cnt, sizeof(struct hn_txdesc),
-				HN_TXD_CACHE_SIZE, 0,
-				NULL, NULL,
-				hn_txd_init, dev,
-				dev->device->numa_node, 0);
-	if (!mp) {
-		PMD_DRV_LOG(ERR,
-			    "mempool %s create failed: %d", name, rte_errno);
-		return -rte_errno;
+	hv->chim_bmap = rte_bitmap_init(hv->chim_cnt,
+					hv->chim_bmem, chim_bmp_size);
+	if (hv->chim_bmap == NULL) {
+		PMD_INIT_LOG(ERR, "failed to init chim bitmap");
+		return -1;
 	}
 
-	hv->tx_pool = mp;
+	for (i = 0; i < hv->chim_cnt; i++)
+		rte_bitmap_set(hv->chim_bmap, i);
+
 	return 0;
 }
 
 void
-hn_tx_pool_uninit(struct rte_eth_dev *dev)
+hn_chim_uninit(struct rte_eth_dev *dev)
 {
 	struct hn_data *hv = dev->data->dev_private;
 
-	if (hv->tx_pool) {
-		rte_mempool_free(hv->tx_pool);
-		hv->tx_pool = NULL;
+	rte_bitmap_free(hv->chim_bmap);
+	rte_free(hv->chim_bmem);
+	hv->chim_bmem = NULL;
+}
+
+static uint32_t hn_chim_alloc(struct hn_data *hv)
+{
+	uint32_t index = NVS_CHIM_IDX_INVALID;
+	uint64_t slab;
+
+	rte_spinlock_lock(&hv->chim_lock);
+	if (rte_bitmap_scan(hv->chim_bmap, &index, &slab))
+		rte_bitmap_clear(hv->chim_bmap, index);
+	rte_spinlock_unlock(&hv->chim_lock);
+
+	return index;
+}
+
+static void hn_chim_free(struct hn_data *hv, uint32_t chim_idx)
+{
+	if (chim_idx >= hv->chim_cnt) {
+		PMD_DRV_LOG(ERR, "Invalid chimney index %u", chim_idx);
+	} else {
+		rte_spinlock_lock(&hv->chim_lock);
+		rte_bitmap_set(hv->chim_bmap, chim_idx);
+		rte_spinlock_unlock(&hv->chim_lock);
 	}
 }
 
@@ -220,15 +237,16 @@ static void hn_reset_txagg(struct hn_tx_queue *txq)
 
 int
 hn_dev_tx_queue_setup(struct rte_eth_dev *dev,
-		      uint16_t queue_idx, uint16_t nb_desc __rte_unused,
+		      uint16_t queue_idx, uint16_t nb_desc,
 		      unsigned int socket_id,
 		      const struct rte_eth_txconf *tx_conf)
 
 {
 	struct hn_data *hv = dev->data->dev_private;
 	struct hn_tx_queue *txq;
+	char name[RTE_MEMPOOL_NAMESIZE];
 	uint32_t tx_free_thresh;
-	int err;
+	int err = -ENOMEM;
 
 	PMD_INIT_FUNC_TRACE();
 
@@ -244,14 +262,42 @@ hn_dev_tx_queue_setup(struct rte_eth_dev *dev,
 
 	tx_free_thresh = tx_conf->tx_free_thresh;
 	if (tx_free_thresh == 0)
-		tx_free_thresh = RTE_MIN(hv->chim_cnt / 4,
+		tx_free_thresh = RTE_MIN(nb_desc / 4,
 					 DEFAULT_TX_FREE_THRESH);
 
-	if (tx_free_thresh >= hv->chim_cnt - 3)
-		tx_free_thresh = hv->chim_cnt - 3;
+	if (tx_free_thresh + 3 >= nb_desc) {
+		PMD_INIT_LOG(ERR,
+			     "tx_free_thresh must be less than the number of TX entries minus 3(%u)."
+			     " (tx_free_thresh=%u port=%u queue=%u)\n",
+			     nb_desc - 3,
+			     tx_free_thresh, dev->data->port_id, queue_idx);
+		return -EINVAL;
+	}
 
 	txq->free_thresh = tx_free_thresh;
 
+	snprintf(name, sizeof(name),
+		 "hn_txd_%u_%u", dev->data->port_id, queue_idx);
+
+	PMD_INIT_LOG(DEBUG, "TX descriptor pool %s n=%u size=%zu",
+		     name, nb_desc, sizeof(struct hn_txdesc));
+
+	txq->tx_rndis = rte_calloc("hn_txq_rndis", nb_desc,
+				   HN_RNDIS_PKT_ALIGNED, RTE_CACHE_LINE_SIZE);
+	if (txq->tx_rndis == NULL)
+		goto error;
+
+	txq->txdesc_pool = rte_mempool_create(name, nb_desc,
+					      sizeof(struct hn_txdesc),
+					      0, 0, NULL, NULL,
+					      hn_txd_init, txq,
+					      dev->device->numa_node, 0);
+	if (txq->txdesc_pool == NULL) {
+		PMD_DRV_LOG(ERR,
+			    "mempool %s create failed: %d", name, rte_errno);
+		goto error;
+	}
+
 	txq->agg_szmax  = RTE_MIN(hv->chim_szmax, hv->rndis_agg_size);
 	txq->agg_pktmax = hv->rndis_agg_pkts;
 	txq->agg_align  = hv->rndis_agg_align;
@@ -260,31 +306,57 @@ hn_dev_tx_queue_setup(struct rte_eth_dev *dev,
 
 	err = hn_vf_tx_queue_setup(dev, queue_idx, nb_desc,
 				     socket_id, tx_conf);
-	if (err) {
-		rte_free(txq);
-		return err;
+	if (err == 0) {
+		dev->data->tx_queues[queue_idx] = txq;
+		return 0;
 	}
 
-	dev->data->tx_queues[queue_idx] = txq;
-	return 0;
+error:
+	if (txq->txdesc_pool)
+		rte_mempool_free(txq->txdesc_pool);
+	rte_free(txq->tx_rndis);
+	rte_free(txq);
+	return err;
+}
+
+
+static struct hn_txdesc *hn_txd_get(struct hn_tx_queue *txq)
+{
+	struct hn_txdesc *txd;
+
+	if (rte_mempool_get(txq->txdesc_pool, (void **)&txd)) {
+		++txq->stats.ring_full;
+		PMD_TX_LOG(DEBUG, "tx pool exhausted!");
+		return NULL;
+	}
+
+	txd->m = NULL;
+	txd->packets = 0;
+	txd->data_size = 0;
+	txd->chim_size = 0;
+
+	return txd;
+}
+
+static void hn_txd_put(struct hn_tx_queue *txq, struct hn_txdesc *txd)
+{
+	rte_mempool_put(txq->txdesc_pool, txd);
 }
 
 void
 hn_dev_tx_queue_release(void *arg)
 {
 	struct hn_tx_queue *txq = arg;
-	struct hn_txdesc *txd;
 
 	PMD_INIT_FUNC_TRACE();
 
 	if (!txq)
 		return;
 
-	/* If any pending data is still present just drop it */
-	txd = txq->agg_txd;
-	if (txd)
-		rte_mempool_put(txq->hv->tx_pool, txd);
+	if (txq->txdesc_pool)
+		rte_mempool_free(txq->txdesc_pool);
 
+	rte_free(txq->tx_rndis);
 	rte_free(txq);
 }
 
@@ -292,6 +364,7 @@ static void
 hn_nvs_send_completed(struct rte_eth_dev *dev, uint16_t queue_id,
 		      unsigned long xactid, const struct hn_nvs_rndis_ack *ack)
 {
+	struct hn_data *hv = dev->data->dev_private;
 	struct hn_txdesc *txd = (struct hn_txdesc *)xactid;
 	struct hn_tx_queue *txq;
 
@@ -312,9 +385,11 @@ hn_nvs_send_completed(struct rte_eth_dev *dev, uint16_t queue_id,
 		++txq->stats.errors;
 	}
 
+	if (txd->chim_index != NVS_CHIM_IDX_INVALID)
+		hn_chim_free(hv, txd->chim_index);
+
 	rte_pktmbuf_free(txd->m);
-
-	rte_mempool_put(txq->hv->tx_pool, txd);
+	hn_txd_put(txq, txd);
 }
 
 /* Handle transmit completion events */
@@ -1036,28 +1111,15 @@ static int hn_flush_txagg(struct hn_tx_queue *txq, bool *need_sig)
 	return ret;
 }
 
-static struct hn_txdesc *hn_new_txd(struct hn_data *hv,
-				    struct hn_tx_queue *txq)
-{
-	struct hn_txdesc *txd;
-
-	if (rte_mempool_get(hv->tx_pool, (void **)&txd)) {
-		++txq->stats.ring_full;
-		PMD_TX_LOG(DEBUG, "tx pool exhausted!");
-		return NULL;
-	}
-
-	txd->m = NULL;
-	txd->queue_id = txq->queue_id;
-	txd->packets = 0;
-	txd->data_size = 0;
-	txd->chim_size = 0;
-
-	return txd;
-}
-
+/*
+ * Try and find a place in a send chimney buffer to put
+ * the small packet. If space is available, this routine
+ * returns a pointer of where to place the data.
+ * If no space, caller should try direct transmit.
+ */
 static void *
-hn_try_txagg(struct hn_data *hv, struct hn_tx_queue *txq, uint32_t pktsize)
+hn_try_txagg(struct hn_data *hv, struct hn_tx_queue *txq,
+	     struct hn_txdesc *txd, uint32_t pktsize)
 {
 	struct hn_txdesc *agg_txd = txq->agg_txd;
 	struct rndis_packet_msg *pkt;
@@ -1085,7 +1147,7 @@ hn_try_txagg(struct hn_data *hv, struct hn_tx_queue *txq, uint32_t pktsize)
 		}
 
 		chim = (uint8_t *)pkt + pkt->len;
-
+		txq->agg_prevpkt = chim;
 		txq->agg_pktleft--;
 		txq->agg_szleft -= pktsize;
 		if (txq->agg_szleft < HN_PKTSIZE_MIN(txq->agg_align)) {
@@ -1095,18 +1157,21 @@ hn_try_txagg(struct hn_data *hv, struct hn_tx_queue *txq, uint32_t pktsize)
 			 */
 			txq->agg_pktleft = 0;
 		}
-	} else {
-		agg_txd = hn_new_txd(hv, txq);
-		if (!agg_txd)
-			return NULL;
 
-		chim = (uint8_t *)hv->chim_res->addr
-			+ agg_txd->chim_index * hv->chim_szmax;
-
-		txq->agg_txd = agg_txd;
-		txq->agg_pktleft = txq->agg_pktmax - 1;
-		txq->agg_szleft = txq->agg_szmax - pktsize;
+		hn_txd_put(txq, txd);
+		return chim;
 	}
+
+	txd->chim_index = hn_chim_alloc(hv);
+	if (txd->chim_index == NVS_CHIM_IDX_INVALID)
+		return NULL;
+
+	chim = (uint8_t *)hv->chim_res->addr
+			+ txd->chim_index * hv->chim_szmax;
+
+	txq->agg_txd = txd;
+	txq->agg_pktleft = txq->agg_pktmax - 1;
+	txq->agg_szleft = txq->agg_szmax - pktsize;
 	txq->agg_prevpkt = chim;
 
 	return chim;
@@ -1329,13 +1394,18 @@ hn_xmit_pkts(void *ptxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 		return (*vf_dev->tx_pkt_burst)(sub_q, tx_pkts, nb_pkts);
 	}
 
-	if (rte_mempool_avail_count(hv->tx_pool) <= txq->free_thresh)
+	if (rte_mempool_avail_count(txq->txdesc_pool) <= txq->free_thresh)
 		hn_process_events(hv, txq->queue_id, 0);
 
 	for (nb_tx = 0; nb_tx < nb_pkts; nb_tx++) {
 		struct rte_mbuf *m = tx_pkts[nb_tx];
 		uint32_t pkt_size = m->pkt_len + HN_RNDIS_PKT_LEN;
 		struct rndis_packet_msg *pkt;
+		struct hn_txdesc *txd;
+
+		txd = hn_txd_get(txq);
+		if (txd == NULL)
+			break;
 
 		/* For small packets aggregate them in chimney buffer */
 		if (m->pkt_len < HN_TXCOPY_THRESHOLD && pkt_size <= txq->agg_szmax) {
@@ -1346,7 +1416,8 @@ hn_xmit_pkts(void *ptxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 					goto fail;
 			}
 
-			pkt = hn_try_txagg(hv, txq, pkt_size);
+
+			pkt = hn_try_txagg(hv, txq, txd, pkt_size);
 			if (unlikely(!pkt))
 				break;
 
@@ -1360,21 +1431,13 @@ hn_xmit_pkts(void *ptxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 			    hn_flush_txagg(txq, &need_sig))
 				goto fail;
 		} else {
-			struct hn_txdesc *txd;
-
-			/* can send chimney data and large packet at once */
-			txd = txq->agg_txd;
-			if (txd) {
-				hn_reset_txagg(txq);
-			} else {
-				txd = hn_new_txd(hv, txq);
-				if (unlikely(!txd))
-					break;
-			}
+			/* Send any outstanding packets in buffer */
+			if (txq->agg_txd && hn_flush_txagg(txq, &need_sig))
+				goto fail;
 
 			pkt = txd->rndis_pkt;
 			txd->m = m;
-			txd->data_size += m->pkt_len;
+			txd->data_size = m->pkt_len;
 			++txd->packets;
 
 			hn_encap(pkt, queue_id, m);
@@ -1383,7 +1446,7 @@ hn_xmit_pkts(void *ptxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 			if (unlikely(ret != 0)) {
 				PMD_TX_LOG(NOTICE, "sg send failed: %d", ret);
 				++txq->stats.errors;
-				rte_mempool_put(hv->tx_pool, txd);
+				hn_txd_put(txq, txd);
 				goto fail;
 			}
 		}
diff --git a/drivers/net/netvsc/hn_var.h b/drivers/net/netvsc/hn_var.h
index 05bc492511..822d737bd3 100644
--- a/drivers/net/netvsc/hn_var.h
+++ b/drivers/net/netvsc/hn_var.h
@@ -52,6 +52,8 @@ struct hn_tx_queue {
 	uint16_t	port_id;
 	uint16_t	queue_id;
 	uint32_t	free_thresh;
+	struct rte_mempool *txdesc_pool;
+	void		*tx_rndis;
 
 	/* Applied packet transmission aggregation limits. */
 	uint32_t	agg_szmax;
@@ -115,8 +117,10 @@ struct hn_data {
 	uint16_t	num_queues;
 	uint64_t	rss_offloads;
 
+	rte_spinlock_t	chim_lock;
 	struct rte_mem_resource *chim_res;	/* UIO resource for Tx */
-	struct rte_mempool *tx_pool;		/* Tx descriptors */
+	struct rte_bitmap *chim_bmap;		/* Send buffer map */
+	void		*chim_bmem;
 	uint32_t	chim_szmax;		/* Max size per buffer */
 	uint32_t	chim_cnt;		/* Max packets per buffer */
 
@@ -157,8 +161,8 @@ uint16_t hn_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 uint16_t hn_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 		      uint16_t nb_pkts);
 
-int	hn_tx_pool_init(struct rte_eth_dev *dev);
-void	hn_tx_pool_uninit(struct rte_eth_dev *dev);
+int	hn_chim_init(struct rte_eth_dev *dev);
+void	hn_chim_uninit(struct rte_eth_dev *dev);
 int	hn_dev_link_update(struct rte_eth_dev *dev, int wait);
 int	hn_dev_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 			      uint16_t nb_desc, unsigned int socket_id,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:46.340796081 +0100
+++ 0044-net-netvsc-split-send-buffers-from-Tx-descriptors.patch	2020-05-19 14:04:44.180647720 +0100
@@ -1,8 +1,10 @@
-From cc0251813277fcf43b930b43ab4a423ed7536120 Mon Sep 17 00:00:00 2001
+From 42916635b395dfc3216b7185ee43192aa785ff43 Mon Sep 17 00:00:00 2001
 From: Stephen Hemminger <stephen@networkplumber.org>
 Date: Tue, 31 Mar 2020 10:13:59 -0700
 Subject: [PATCH] net/netvsc: split send buffers from Tx descriptors
 
+[ upstream commit cc0251813277fcf43b930b43ab4a423ed7536120 ]
+
 The VMBus has reserved transmit area (per device) and transmit
 descriptors (per queue). The previous code was always having a 1:1
 mapping between send buffers and descriptors.
@@ -13,7 +15,6 @@
 aggregation happens but the queue can still drain.
 
 Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device")
-Cc: stable@dpdk.org
 
 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
 ---

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

* [dpdk-stable] patch 'net/netvsc: fix memory free on device close' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (42 preceding siblings ...)
  2020-05-19 13:02   ` [dpdk-stable] patch 'net/netvsc: split send buffers from Tx descriptors' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/netvsc: remove process event optimization' " luca.boccassi
                     ` (168 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 81441b4e4f4e65b722bd4cdb0d967e47244632f1 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 31 Mar 2020 10:14:00 -0700
Subject: [PATCH] net/netvsc: fix memory free on device close

[ upstream commit 30408aab2d4e0fd9a5d2b4e2ef2a3a7b9e6c95bf ]

The netvsc PMD was putting the mac address in private data but the
core rte_ethdev doesn't allow that it. It has to be in rte_malloc'd
memory or a message will be printed on shutdown/close.
 EAL: Invalid memory

Fixes: f8279f47dd89 ("net/netvsc: fix crash in secondary process")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/netvsc/hn_ethdev.c | 16 ++++++++++------
 drivers/net/netvsc/hn_var.h    |  2 --
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index ac66108380..05f1a25a1a 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -134,8 +134,6 @@ eth_dev_vmbus_allocate(struct rte_vmbus_device *dev, size_t private_data_size)
 static void
 eth_dev_vmbus_release(struct rte_eth_dev *eth_dev)
 {
-	/* mac_addrs must not be freed alone because part of dev_private */
-	eth_dev->data->mac_addrs = NULL;
 	/* free ether device */
 	rte_eth_dev_release_port(eth_dev);
 
@@ -937,9 +935,6 @@ eth_hn_dev_init(struct rte_eth_dev *eth_dev)
 	eth_dev->tx_pkt_burst = &hn_xmit_pkts;
 	eth_dev->rx_pkt_burst = &hn_recv_pkts;
 
-	/* 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.
@@ -947,6 +942,15 @@ eth_hn_dev_init(struct rte_eth_dev *eth_dev)
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
 		return 0;
 
+	/* Since Hyper-V only supports one MAC address */
+	eth_dev->data->mac_addrs = rte_calloc("hv_mac", HN_MAX_MAC_ADDRS,
+					      sizeof(struct rte_ether_addr), 0);
+	if (eth_dev->data->mac_addrs == NULL) {
+		PMD_INIT_LOG(ERR,
+			     "Failed to allocate memory store MAC addresses");
+		return -ENOMEM;
+	}
+
 	hv->vmbus = vmbus;
 	hv->rxbuf_res = &vmbus->resource[HV_RECV_BUF_MAP];
 	hv->chim_res  = &vmbus->resource[HV_SEND_BUF_MAP];
@@ -989,7 +993,7 @@ eth_hn_dev_init(struct rte_eth_dev *eth_dev)
 	if (err)
 		goto failed;
 
-	err = hn_rndis_get_eaddr(hv, hv->mac_addr.addr_bytes);
+	err = hn_rndis_get_eaddr(hv, eth_dev->data->mac_addrs->addr_bytes);
 	if (err)
 		goto failed;
 
diff --git a/drivers/net/netvsc/hn_var.h b/drivers/net/netvsc/hn_var.h
index 822d737bd3..b4c6171737 100644
--- a/drivers/net/netvsc/hn_var.h
+++ b/drivers/net/netvsc/hn_var.h
@@ -139,8 +139,6 @@ struct hn_data {
 	uint8_t		rss_key[40];
 	uint16_t	rss_ind[128];
 
-	struct rte_ether_addr mac_addr;
-
 	struct rte_eth_dev_owner owner;
 	struct rte_intr_handle vf_intr;
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:46.378461418 +0100
+++ 0045-net-netvsc-fix-memory-free-on-device-close.patch	2020-05-19 14:04:44.184647792 +0100
@@ -1,15 +1,16 @@
-From 30408aab2d4e0fd9a5d2b4e2ef2a3a7b9e6c95bf Mon Sep 17 00:00:00 2001
+From 81441b4e4f4e65b722bd4cdb0d967e47244632f1 Mon Sep 17 00:00:00 2001
 From: Stephen Hemminger <stephen@networkplumber.org>
 Date: Tue, 31 Mar 2020 10:14:00 -0700
 Subject: [PATCH] net/netvsc: fix memory free on device close
 
+[ upstream commit 30408aab2d4e0fd9a5d2b4e2ef2a3a7b9e6c95bf ]
+
 The netvsc PMD was putting the mac address in private data but the
 core rte_ethdev doesn't allow that it. It has to be in rte_malloc'd
 memory or a message will be printed on shutdown/close.
  EAL: Invalid memory
 
 Fixes: f8279f47dd89 ("net/netvsc: fix crash in secondary process")
-Cc: stable@dpdk.org
 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
 ---
  drivers/net/netvsc/hn_ethdev.c | 16 ++++++++++------

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

* [dpdk-stable] patch 'net/netvsc: remove process event optimization' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (43 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/netvsc: fix memory free on device close' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/netvsc: handle Tx completions based on burst size' " luca.boccassi
                     ` (167 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 62ec946eec4fefabcb4bf2314f78579edf29fe8c Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 31 Mar 2020 10:14:01 -0700
Subject: [PATCH] net/netvsc: remove process event optimization

[ upstream commit dfd3f0fce8bd64182b984b4a9226f2d23c44b2d5 ]

Remove unlocked check for data in receive ring.
This check is not safe because of missing barriers etc.

Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/netvsc/hn_rxtx.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
index 32c03e3da0..e8df846042 100644
--- a/drivers/net/netvsc/hn_rxtx.c
+++ b/drivers/net/netvsc/hn_rxtx.c
@@ -969,10 +969,6 @@ uint32_t hn_process_events(struct hn_data *hv, uint16_t queue_id,
 
 	rxq = queue_id == 0 ? hv->primary : dev->data->rx_queues[queue_id];
 
-	/* If no pending data then nothing to do */
-	if (rte_vmbus_chan_rx_empty(rxq->chan))
-		return 0;
-
 	/*
 	 * Since channel is shared between Rx and TX queue need to have a lock
 	 * since DPDK does not force same CPU to be used for Rx/Tx.
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:46.415451914 +0100
+++ 0046-net-netvsc-remove-process-event-optimization.patch	2020-05-19 14:04:44.184647792 +0100
@@ -1,13 +1,14 @@
-From dfd3f0fce8bd64182b984b4a9226f2d23c44b2d5 Mon Sep 17 00:00:00 2001
+From 62ec946eec4fefabcb4bf2314f78579edf29fe8c Mon Sep 17 00:00:00 2001
 From: Stephen Hemminger <stephen@networkplumber.org>
 Date: Tue, 31 Mar 2020 10:14:01 -0700
 Subject: [PATCH] net/netvsc: remove process event optimization
 
+[ upstream commit dfd3f0fce8bd64182b984b4a9226f2d23c44b2d5 ]
+
 Remove unlocked check for data in receive ring.
 This check is not safe because of missing barriers etc.
 
 Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device")
-Cc: stable@dpdk.org
 
 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
 ---

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

* [dpdk-stable] patch 'net/netvsc: handle Tx completions based on burst size' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (44 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/netvsc: remove process event optimization' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/netvsc: avoid possible live lock' " luca.boccassi
                     ` (166 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 9f54fa3e2b37e2ba173f18c0f1e4cca6b4e74596 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 31 Mar 2020 10:14:02 -0700
Subject: [PATCH] net/netvsc: handle Tx completions based on burst size

[ upstream commit 56edef9906558c69a1440173a5a3aac8f8f8710f ]

If tx_free_thresh is quite low, it is possible that we need to
cleanup based on burst size.

Fixes: fc30efe3a22e ("net/netvsc: change Rx descriptor setup and sizing")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/netvsc/hn_rxtx.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
index e8df846042..cbdfcc628b 100644
--- a/drivers/net/netvsc/hn_rxtx.c
+++ b/drivers/net/netvsc/hn_rxtx.c
@@ -1375,7 +1375,7 @@ hn_xmit_pkts(void *ptxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 	struct hn_data *hv = txq->hv;
 	struct rte_eth_dev *vf_dev;
 	bool need_sig = false;
-	uint16_t nb_tx;
+	uint16_t nb_tx, avail;
 	int ret;
 
 	if (unlikely(hv->closed))
@@ -1390,7 +1390,8 @@ hn_xmit_pkts(void *ptxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 		return (*vf_dev->tx_pkt_burst)(sub_q, tx_pkts, nb_pkts);
 	}
 
-	if (rte_mempool_avail_count(txq->txdesc_pool) <= txq->free_thresh)
+	avail = rte_mempool_avail_count(txq->txdesc_pool);
+	if (nb_pkts > avail || avail <= txq->free_thresh)
 		hn_process_events(hv, txq->queue_id, 0);
 
 	for (nb_tx = 0; nb_tx < nb_pkts; nb_tx++) {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:46.453207797 +0100
+++ 0047-net-netvsc-handle-Tx-completions-based-on-burst-size.patch	2020-05-19 14:04:44.184647792 +0100
@@ -1,13 +1,14 @@
-From 56edef9906558c69a1440173a5a3aac8f8f8710f Mon Sep 17 00:00:00 2001
+From 9f54fa3e2b37e2ba173f18c0f1e4cca6b4e74596 Mon Sep 17 00:00:00 2001
 From: Stephen Hemminger <stephen@networkplumber.org>
 Date: Tue, 31 Mar 2020 10:14:02 -0700
 Subject: [PATCH] net/netvsc: handle Tx completions based on burst size
 
+[ upstream commit 56edef9906558c69a1440173a5a3aac8f8f8710f ]
+
 If tx_free_thresh is quite low, it is possible that we need to
 cleanup based on burst size.
 
 Fixes: fc30efe3a22e ("net/netvsc: change Rx descriptor setup and sizing")
-Cc: stable@dpdk.org
 
 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
 ---

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

* [dpdk-stable] patch 'net/netvsc: avoid possible live lock' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (45 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/netvsc: handle Tx completions based on burst size' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/memif: fix resource leak' " luca.boccassi
                     ` (165 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 4f880a2089d25f58ba93699b252334d6ef03b2f8 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 31 Mar 2020 10:14:04 -0700
Subject: [PATCH] net/netvsc: avoid possible live lock

[ upstream commit 36274f287103d2f4a372a99dff2c4f47eeb75633 ]

Since the ring buffer with host is shared for both transmit
completions and receive packets, it is possible that transmitter
could get starved if receive ring gets full.

Better to process all outstanding events which frees up transmit
buffer slots, even if means dropping some packets.

Fixes: 7e6c82430702 ("net/netvsc: avoid over filling Rx descriptor ring")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/netvsc/hn_rxtx.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
index cbdfcc628b..19f00a0528 100644
--- a/drivers/net/netvsc/hn_rxtx.c
+++ b/drivers/net/netvsc/hn_rxtx.c
@@ -1032,9 +1032,6 @@ retry:
 
 		if (tx_limit && tx_done >= tx_limit)
 			break;
-
-		if (rxq->rx_ring && rte_ring_full(rxq->rx_ring))
-			break;
 	}
 
 	if (bytes_read > 0)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:46.488519011 +0100
+++ 0048-net-netvsc-avoid-possible-live-lock.patch	2020-05-19 14:04:44.184647792 +0100
@@ -1,8 +1,10 @@
-From 36274f287103d2f4a372a99dff2c4f47eeb75633 Mon Sep 17 00:00:00 2001
+From 4f880a2089d25f58ba93699b252334d6ef03b2f8 Mon Sep 17 00:00:00 2001
 From: Stephen Hemminger <stephen@networkplumber.org>
 Date: Tue, 31 Mar 2020 10:14:04 -0700
 Subject: [PATCH] net/netvsc: avoid possible live lock
 
+[ upstream commit 36274f287103d2f4a372a99dff2c4f47eeb75633 ]
+
 Since the ring buffer with host is shared for both transmit
 completions and receive packets, it is possible that transmitter
 could get starved if receive ring gets full.
@@ -11,7 +13,6 @@
 buffer slots, even if means dropping some packets.
 
 Fixes: 7e6c82430702 ("net/netvsc: avoid over filling Rx descriptor ring")
-Cc: stable@dpdk.org
 
 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
 ---

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

* [dpdk-stable] patch 'net/memif: fix resource leak' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (46 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/netvsc: avoid possible live lock' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'ethdev: fix build when vtune profiling is on' " luca.boccassi
                     ` (164 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Vadim Podovinnikov; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From c6f822199aaa3f626848555e0204b424e9f7ebd6 Mon Sep 17 00:00:00 2001
From: Vadim Podovinnikov <podovinnikov@protei.ru>
Date: Sat, 4 Apr 2020 13:15:57 +0300
Subject: [PATCH] net/memif: fix resource leak

[ upstream commit 321908b6e3fe8347970edf06ff38f82e70cd6ef2 ]

Fixes: c41a04958b09 ("net/memif: support multi-process")

Signed-off-by: Vadim Podovinnikov <podovinnikov@protei.ru>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/memif/rte_eth_memif.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
index 8dd1d0d63d..aa83df3652 100644
--- a/drivers/net/memif/rte_eth_memif.c
+++ b/drivers/net/memif/rte_eth_memif.c
@@ -1501,7 +1501,7 @@ memif_create(struct rte_vdev_device *vdev, enum memif_role_t role,
 	}
 
 
-	eth_dev->data->dev_flags &= RTE_ETH_DEV_CLOSE_REMOVE;
+	eth_dev->data->dev_flags |= RTE_ETH_DEV_CLOSE_REMOVE;
 
 	rte_eth_dev_probing_finish(eth_dev);
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:46.524581001 +0100
+++ 0049-net-memif-fix-resource-leak.patch	2020-05-19 14:04:44.188647865 +0100
@@ -1,10 +1,11 @@
-From 321908b6e3fe8347970edf06ff38f82e70cd6ef2 Mon Sep 17 00:00:00 2001
+From c6f822199aaa3f626848555e0204b424e9f7ebd6 Mon Sep 17 00:00:00 2001
 From: Vadim Podovinnikov <podovinnikov@protei.ru>
 Date: Sat, 4 Apr 2020 13:15:57 +0300
 Subject: [PATCH] net/memif: fix resource leak
 
+[ upstream commit 321908b6e3fe8347970edf06ff38f82e70cd6ef2 ]
+
 Fixes: c41a04958b09 ("net/memif: support multi-process")
-Cc: stable@dpdk.org
 
 Signed-off-by: Vadim Podovinnikov <podovinnikov@protei.ru>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -13,10 +14,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
-index 81d71c53a7..653ffa9b8c 100644
+index 8dd1d0d63d..aa83df3652 100644
 --- a/drivers/net/memif/rte_eth_memif.c
 +++ b/drivers/net/memif/rte_eth_memif.c
-@@ -1510,7 +1510,7 @@ memif_create(struct rte_vdev_device *vdev, enum memif_role_t role,
+@@ -1501,7 +1501,7 @@ memif_create(struct rte_vdev_device *vdev, enum memif_role_t role,
  	}
  
  

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

* [dpdk-stable] patch 'ethdev: fix build when vtune profiling is on' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (47 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/memif: fix resource leak' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'examples/vmdq: fix RSS configuration' " luca.boccassi
                     ` (163 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Eugeny Parshutin; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 267e255ef47bf53f7fb84ed5d563c9cf0561d5b3 Mon Sep 17 00:00:00 2001
From: Eugeny Parshutin <eugeny.parshutin@linux.intel.com>
Date: Mon, 6 Apr 2020 21:27:05 +0300
Subject: [PATCH] ethdev: fix build when vtune profiling is on

[ upstream commit 5dd45467b4ba915e8009dc2cf10bf75d8dab39ea ]

Add the previous prototype for the 'profile_hook_rx_burst_cb' function
to fix the compiler warning when the DPDK is built with
'RTE_ETHDEV_PROFILE_WITH_VTUNE' config option enabled:
/home/dpdk/lib/librte_ethdev/ethdev_profile.c:17:1: warning:
no previous prototype for profile_hook_rx_burst_cb [-Wmissing-prototypes]

Fixes: 2c1bbab7f09d ("ethdev: change vtune profiling approach")

Signed-off-by: Eugeny Parshutin <eugeny.parshutin@linux.intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_ethdev/ethdev_profile.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lib/librte_ethdev/ethdev_profile.h b/lib/librte_ethdev/ethdev_profile.h
index 65031e6f3f..e5ee4df824 100644
--- a/lib/librte_ethdev/ethdev_profile.h
+++ b/lib/librte_ethdev/ethdev_profile.h
@@ -24,4 +24,13 @@
 int
 __rte_eth_dev_profile_init(uint16_t port_id, struct rte_eth_dev *dev);
 
+#ifdef RTE_ETHDEV_PROFILE_WITH_VTUNE
+
+uint16_t
+profile_hook_rx_burst_cb(uint16_t port_id, uint16_t queue_id,
+	struct rte_mbuf *pkts[], uint16_t nb_pkts,
+	uint16_t max_pkts, void *user_param);
+
+#endif /* RTE_ETHDEV_PROFILE_WITH_VTUNE */
+
 #endif
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:46.561418931 +0100
+++ 0050-ethdev-fix-build-when-vtune-profiling-is-on.patch	2020-05-19 14:04:44.188647865 +0100
@@ -1,8 +1,10 @@
-From 5dd45467b4ba915e8009dc2cf10bf75d8dab39ea Mon Sep 17 00:00:00 2001
+From 267e255ef47bf53f7fb84ed5d563c9cf0561d5b3 Mon Sep 17 00:00:00 2001
 From: Eugeny Parshutin <eugeny.parshutin@linux.intel.com>
 Date: Mon, 6 Apr 2020 21:27:05 +0300
 Subject: [PATCH] ethdev: fix build when vtune profiling is on
 
+[ upstream commit 5dd45467b4ba915e8009dc2cf10bf75d8dab39ea ]
+
 Add the previous prototype for the 'profile_hook_rx_burst_cb' function
 to fix the compiler warning when the DPDK is built with
 'RTE_ETHDEV_PROFILE_WITH_VTUNE' config option enabled:
@@ -10,7 +12,6 @@
 no previous prototype for profile_hook_rx_burst_cb [-Wmissing-prototypes]
 
 Fixes: 2c1bbab7f09d ("ethdev: change vtune profiling approach")
-Cc: stable@dpdk.org
 
 Signed-off-by: Eugeny Parshutin <eugeny.parshutin@linux.intel.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

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

* [dpdk-stable] patch 'examples/vmdq: fix RSS configuration' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (48 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'ethdev: fix build when vtune profiling is on' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/nfp: fix log format specifiers' " luca.boccassi
                     ` (162 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Junyu Jiang; +Cc: Xiaoyun Li, Yingya Han, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 61347b53bb00e8b98c952d287ddfb3a00a0e87fd Mon Sep 17 00:00:00 2001
From: Junyu Jiang <junyux.jiang@intel.com>
Date: Wed, 25 Mar 2020 06:32:48 +0000
Subject: [PATCH] examples/vmdq: fix RSS configuration

[ upstream commit 8f5b4af736a9ffb2e2a2d3b4c2a75055a23c2a95 ]

In order that all queues of pools can receive packets,
add enable-rss argument to change RSS configuration.

Fixes: 6bb97df521aa ("examples/vmdq: new app")

Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
Tested-by: Yingya Han <yingyax.han@intel.com>
---
 examples/vmdq/main.c | 39 ++++++++++++++++++++++++++++++++++-----
 1 file changed, 34 insertions(+), 5 deletions(-)

diff --git a/examples/vmdq/main.c b/examples/vmdq/main.c
index 74fe9a16ee..b082bc8c1c 100644
--- a/examples/vmdq/main.c
+++ b/examples/vmdq/main.c
@@ -59,6 +59,7 @@ static uint32_t enabled_port_mask;
 /* number of pools (if user does not specify any, 8 by default */
 static uint32_t num_queues = 8;
 static uint32_t num_pools = 8;
+static uint8_t rss_enable;
 
 /* empty vmdq configuration structure. Filled in programatically */
 static const struct rte_eth_conf vmdq_conf_default = {
@@ -143,6 +144,13 @@ get_eth_conf(struct rte_eth_conf *eth_conf, uint32_t num_pools)
 	(void)(rte_memcpy(eth_conf, &vmdq_conf_default, sizeof(*eth_conf)));
 	(void)(rte_memcpy(&eth_conf->rx_adv_conf.vmdq_rx_conf, &conf,
 		   sizeof(eth_conf->rx_adv_conf.vmdq_rx_conf)));
+	if (rss_enable) {
+		eth_conf->rxmode.mq_mode = ETH_MQ_RX_VMDQ_RSS;
+		eth_conf->rx_adv_conf.rss_conf.rss_hf = ETH_RSS_IP |
+							ETH_RSS_UDP |
+							ETH_RSS_TCP |
+							ETH_RSS_SCTP;
+	}
 	return 0;
 }
 
@@ -164,6 +172,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 	uint16_t q;
 	uint16_t queues_per_pool;
 	uint32_t max_nb_pools;
+	uint64_t rss_hf_tmp;
 
 	/*
 	 * The max pool number from dev_info will be used to validate the pool
@@ -209,6 +218,17 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 	if (!rte_eth_dev_is_valid_port(port))
 		return -1;
 
+	rss_hf_tmp = port_conf.rx_adv_conf.rss_conf.rss_hf;
+	port_conf.rx_adv_conf.rss_conf.rss_hf &=
+		dev_info.flow_type_rss_offloads;
+	if (port_conf.rx_adv_conf.rss_conf.rss_hf != rss_hf_tmp) {
+		printf("Port %u modified RSS hash function based on hardware support,"
+			"requested:%#"PRIx64" configured:%#"PRIx64"\n",
+			port,
+			rss_hf_tmp,
+			port_conf.rx_adv_conf.rss_conf.rss_hf);
+	}
+
 	/*
 	 * Though in this example, we only receive packets from the first queue
 	 * of each pool and send packets through first rte_lcore_count() tx
@@ -363,7 +383,8 @@ static void
 vmdq_usage(const char *prgname)
 {
 	printf("%s [EAL options] -- -p PORTMASK]\n"
-	"  --nb-pools NP: number of pools\n",
+	"  --nb-pools NP: number of pools\n"
+	"  --enable-rss: enable RSS (disabled by default)\n",
 	       prgname);
 }
 
@@ -377,6 +398,7 @@ vmdq_parse_args(int argc, char **argv)
 	const char *prgname = argv[0];
 	static struct option long_option[] = {
 		{"nb-pools", required_argument, NULL, 0},
+		{"enable-rss", 0, NULL, 0},
 		{NULL, 0, 0, 0}
 	};
 
@@ -394,11 +416,18 @@ vmdq_parse_args(int argc, char **argv)
 			}
 			break;
 		case 0:
-			if (vmdq_parse_num_pools(optarg) == -1) {
-				printf("invalid number of pools\n");
-				vmdq_usage(prgname);
-				return -1;
+			if (!strcmp(long_option[option_index].name,
+			    "nb-pools")) {
+				if (vmdq_parse_num_pools(optarg) == -1) {
+					printf("invalid number of pools\n");
+					vmdq_usage(prgname);
+					return -1;
+				}
 			}
+
+			if (!strcmp(long_option[option_index].name,
+			    "enable-rss"))
+				rss_enable = 1;
 			break;
 
 		default:
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:46.596074769 +0100
+++ 0051-examples-vmdq-fix-RSS-configuration.patch	2020-05-19 14:04:44.188647865 +0100
@@ -1,45 +1,24 @@
-From 8f5b4af736a9ffb2e2a2d3b4c2a75055a23c2a95 Mon Sep 17 00:00:00 2001
+From 61347b53bb00e8b98c952d287ddfb3a00a0e87fd Mon Sep 17 00:00:00 2001
 From: Junyu Jiang <junyux.jiang@intel.com>
 Date: Wed, 25 Mar 2020 06:32:48 +0000
 Subject: [PATCH] examples/vmdq: fix RSS configuration
 
+[ upstream commit 8f5b4af736a9ffb2e2a2d3b4c2a75055a23c2a95 ]
+
 In order that all queues of pools can receive packets,
 add enable-rss argument to change RSS configuration.
 
 Fixes: 6bb97df521aa ("examples/vmdq: new app")
-Cc: stable@dpdk.org
 
 Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
 Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
 Tested-by: Yingya Han <yingyax.han@intel.com>
 ---
- doc/guides/sample_app_ug/vmdq_forwarding.rst |  6 +--
- examples/vmdq/main.c                         | 39 +++++++++++++++++---
- 2 files changed, 37 insertions(+), 8 deletions(-)
+ examples/vmdq/main.c | 39 ++++++++++++++++++++++++++++++++++-----
+ 1 file changed, 34 insertions(+), 5 deletions(-)
 
-diff --git a/doc/guides/sample_app_ug/vmdq_forwarding.rst b/doc/guides/sample_app_ug/vmdq_forwarding.rst
-index d2585687bb..c3a3439e51 100644
---- a/doc/guides/sample_app_ug/vmdq_forwarding.rst
-+++ b/doc/guides/sample_app_ug/vmdq_forwarding.rst
-@@ -26,13 +26,13 @@ The Intel® 82599 10 Gigabit Ethernet Controller NIC also supports the splitting
- While the Intel® X710 or XL710 Ethernet Controller NICs support many configurations of VMDq pools of 4 or 8 queues each.
- And queues numbers for each VMDq pool can be changed by setting CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM
- in config/common_* file.
--The nb-pools parameter can be passed on the command line, after the EAL parameters:
-+The nb-pools and enable-rss parameters can be passed on the command line, after the EAL parameters:
- 
- .. code-block:: console
- 
--    ./build/vmdq_app [EAL options] -- -p PORTMASK --nb-pools NP
-+    ./build/vmdq_app [EAL options] -- -p PORTMASK --nb-pools NP --enable-rss
- 
--where, NP can be 8, 16 or 32.
-+where, NP can be 8, 16 or 32, rss is disabled by default.
- 
- In Linux* user space, the application can display statistics with the number of packets received on each queue.
- To have the application display the statistics, send a SIGHUP signal to the running application process.
 diff --git a/examples/vmdq/main.c b/examples/vmdq/main.c
-index a66dd533c8..d08826c868 100644
+index 74fe9a16ee..b082bc8c1c 100644
 --- a/examples/vmdq/main.c
 +++ b/examples/vmdq/main.c
 @@ -59,6 +59,7 @@ static uint32_t enabled_port_mask;

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

* [dpdk-stable] patch 'net/nfp: fix log format specifiers' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (49 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'examples/vmdq: fix RSS configuration' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/nfp: fix dangling pointer on probe failure' " luca.boccassi
                     ` (161 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Heinrich Kuhn, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From d027444df507853a6548484dd04cddc2340155e3 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Tue, 3 Mar 2020 13:36:46 +0000
Subject: [PATCH] net/nfp: fix log format specifiers

[ upstream commit 735d826e6c19c4ab8025876ee4bfb60a96cdbc34 ]

Changing format specifier for the 'size_t' as '%z' and for 'off_t' as
'%jd'.

Also this fix enables compiling PMD for 32bit architecture.

Fixes: 29a62d1476b6 ("net/nfp: add CPP bridge as service")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Heinrich Kuhn <heinrich.kuhn@netronome.com>
---
 drivers/net/nfp/nfp_net.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 3aafa7f80f..afcf072339 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -3014,7 +3014,7 @@ nfp_cpp_bridge_serve_write(int sockfd, struct nfp_cpp *cpp)
 	size_t count, curlen, totlen = 0;
 	int err = 0;
 
-	PMD_CPP_LOG(DEBUG, "%s: offset size %lu, count_size: %lu\n", __func__,
+	PMD_CPP_LOG(DEBUG, "%s: offset size %zu, count_size: %zu\n", __func__,
 		sizeof(off_t), sizeof(size_t));
 
 	/* Reading the count param */
@@ -3033,9 +3033,9 @@ nfp_cpp_bridge_serve_write(int sockfd, struct nfp_cpp *cpp)
 	cpp_id = (offset >> 40) << 8;
 	nfp_offset = offset & ((1ull << 40) - 1);
 
-	PMD_CPP_LOG(DEBUG, "%s: count %lu and offset %ld\n", __func__, count,
+	PMD_CPP_LOG(DEBUG, "%s: count %zu and offset %jd\n", __func__, count,
 		offset);
-	PMD_CPP_LOG(DEBUG, "%s: cpp_id %08x and nfp_offset %ld\n", __func__,
+	PMD_CPP_LOG(DEBUG, "%s: cpp_id %08x and nfp_offset %jd\n", __func__,
 		cpp_id, nfp_offset);
 
 	/* Adjust length if not aligned */
@@ -3067,12 +3067,12 @@ nfp_cpp_bridge_serve_write(int sockfd, struct nfp_cpp *cpp)
 			if (len > sizeof(tmpbuf))
 				len = sizeof(tmpbuf);
 
-			PMD_CPP_LOG(DEBUG, "%s: Receive %u of %lu\n", __func__,
+			PMD_CPP_LOG(DEBUG, "%s: Receive %u of %zu\n", __func__,
 					   len, count);
 			err = recv(sockfd, tmpbuf, len, MSG_WAITALL);
 			if (err != (int)len) {
 				RTE_LOG(ERR, PMD,
-					"%s: error when receiving, %d of %lu\n",
+					"%s: error when receiving, %d of %zu\n",
 					__func__, err, count);
 				nfp_cpp_area_release(area);
 				nfp_cpp_area_free(area);
@@ -3116,7 +3116,7 @@ nfp_cpp_bridge_serve_read(int sockfd, struct nfp_cpp *cpp)
 	size_t count, curlen, totlen = 0;
 	int err = 0;
 
-	PMD_CPP_LOG(DEBUG, "%s: offset size %lu, count_size: %lu\n", __func__,
+	PMD_CPP_LOG(DEBUG, "%s: offset size %zu, count_size: %zu\n", __func__,
 		sizeof(off_t), sizeof(size_t));
 
 	/* Reading the count param */
@@ -3135,9 +3135,9 @@ nfp_cpp_bridge_serve_read(int sockfd, struct nfp_cpp *cpp)
 	cpp_id = (offset >> 40) << 8;
 	nfp_offset = offset & ((1ull << 40) - 1);
 
-	PMD_CPP_LOG(DEBUG, "%s: count %lu and offset %ld\n", __func__, count,
+	PMD_CPP_LOG(DEBUG, "%s: count %zu and offset %jd\n", __func__, count,
 			   offset);
-	PMD_CPP_LOG(DEBUG, "%s: cpp_id %08x and nfp_offset %ld\n", __func__,
+	PMD_CPP_LOG(DEBUG, "%s: cpp_id %08x and nfp_offset %jd\n", __func__,
 			   cpp_id, nfp_offset);
 
 	/* Adjust length if not aligned */
@@ -3174,13 +3174,13 @@ nfp_cpp_bridge_serve_read(int sockfd, struct nfp_cpp *cpp)
 				nfp_cpp_area_free(area);
 				return -EIO;
 			}
-			PMD_CPP_LOG(DEBUG, "%s: sending %u of %lu\n", __func__,
+			PMD_CPP_LOG(DEBUG, "%s: sending %u of %zu\n", __func__,
 					   len, count);
 
 			err = send(sockfd, tmpbuf, len, 0);
 			if (err != (int)len) {
 				RTE_LOG(ERR, PMD,
-					"%s: error when sending: %d of %lu\n",
+					"%s: error when sending: %d of %zu\n",
 					__func__, err, count);
 				nfp_cpp_area_release(area);
 				nfp_cpp_area_free(area);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:46.631885138 +0100
+++ 0052-net-nfp-fix-log-format-specifiers.patch	2020-05-19 14:04:44.188647865 +0100
@@ -1,15 +1,16 @@
-From 735d826e6c19c4ab8025876ee4bfb60a96cdbc34 Mon Sep 17 00:00:00 2001
+From d027444df507853a6548484dd04cddc2340155e3 Mon Sep 17 00:00:00 2001
 From: Ferruh Yigit <ferruh.yigit@intel.com>
 Date: Tue, 3 Mar 2020 13:36:46 +0000
 Subject: [PATCH] net/nfp: fix log format specifiers
 
+[ upstream commit 735d826e6c19c4ab8025876ee4bfb60a96cdbc34 ]
+
 Changing format specifier for the 'size_t' as '%z' and for 'off_t' as
 '%jd'.
 
 Also this fix enables compiling PMD for 32bit architecture.
 
 Fixes: 29a62d1476b6 ("net/nfp: add CPP bridge as service")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
 Acked-by: Heinrich Kuhn <heinrich.kuhn@netronome.com>
@@ -18,7 +19,7 @@
  1 file changed, 10 insertions(+), 10 deletions(-)
 
 diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
-index 64d9d218d6..bce4d96468 100644
+index 3aafa7f80f..afcf072339 100644
 --- a/drivers/net/nfp/nfp_net.c
 +++ b/drivers/net/nfp/nfp_net.c
 @@ -3014,7 +3014,7 @@ nfp_cpp_bridge_serve_write(int sockfd, struct nfp_cpp *cpp)

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

* [dpdk-stable] patch 'net/nfp: fix dangling pointer on probe failure' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (50 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/nfp: fix log format specifiers' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/ice: fix RSS advanced rule' " luca.boccassi
                     ` (160 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Heinrich Kuhn, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 46825a9e5926f2034af399a71a7260a1b496b9b0 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Tue, 7 Apr 2020 19:37:27 +0800
Subject: [PATCH] net/nfp: fix dangling pointer on probe failure

[ upstream commit 9d5996c01de06fd0c03bc74d58c44f8c29fe7a97 ]

When nfp_pf_create_dev() is cleaning up, it does not correctly set
the dev_private variable to NULL, which will lead to a double free.

Fixes: ef28aa96e53b ("net/nfp: support multiprocess")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Heinrich Kuhn <heinrich.kuhn@netronome.com>
---
 drivers/net/nfp/nfp_net.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index afcf072339..b6ff5ecd7d 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -3451,9 +3451,10 @@ nfp_pf_create_dev(struct rte_pci_device *dev, int port, int ports,
 probe_failed:
 	rte_free(port_name);
 	/* free ports private data if primary process */
-	if (rte_eal_process_type() == RTE_PROC_PRIMARY)
+	if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
 		rte_free(eth_dev->data->dev_private);
-
+		eth_dev->data->dev_private = NULL;
+	}
 	rte_eth_dev_release_port(eth_dev);
 
 	return retval;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:46.671499911 +0100
+++ 0053-net-nfp-fix-dangling-pointer-on-probe-failure.patch	2020-05-19 14:04:44.192647937 +0100
@@ -1,13 +1,14 @@
-From 9d5996c01de06fd0c03bc74d58c44f8c29fe7a97 Mon Sep 17 00:00:00 2001
+From 46825a9e5926f2034af399a71a7260a1b496b9b0 Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Tue, 7 Apr 2020 19:37:27 +0800
 Subject: [PATCH] net/nfp: fix dangling pointer on probe failure
 
+[ upstream commit 9d5996c01de06fd0c03bc74d58c44f8c29fe7a97 ]
+
 When nfp_pf_create_dev() is cleaning up, it does not correctly set
 the dev_private variable to NULL, which will lead to a double free.
 
 Fixes: ef28aa96e53b ("net/nfp: support multiprocess")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Acked-by: Heinrich Kuhn <heinrich.kuhn@netronome.com>
@@ -16,7 +17,7 @@
  1 file changed, 3 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
-index bce4d96468..2460ee1992 100644
+index afcf072339..b6ff5ecd7d 100644
 --- a/drivers/net/nfp/nfp_net.c
 +++ b/drivers/net/nfp/nfp_net.c
 @@ -3451,9 +3451,10 @@ nfp_pf_create_dev(struct rte_pci_device *dev, int port, int ports,

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

* [dpdk-stable] patch 'net/ice: fix RSS advanced rule' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (51 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/nfp: fix dangling pointer on probe failure' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/ice/base: remove unused code in switch " luca.boccassi
                     ` (159 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Junyu Jiang; +Cc: Zhiwei He, Qiming Yang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 5cfef294de7edb551232ef4fac533c6802d5acbe Mon Sep 17 00:00:00 2001
From: Junyu Jiang <junyux.jiang@intel.com>
Date: Tue, 7 Apr 2020 01:48:17 +0000
Subject: [PATCH] net/ice: fix RSS advanced rule

[ upstream commit 2aa55b41359c64aecadf670d8c0fc15c7cc23df5 ]

This patch moved the RSS initialization from dev start to dev configure
to fix RSS advanced rule invalid issue after running port stop and port
start.

Fixes: 5ad3db8d4bdd ("net/ice: enable advanced RSS")

Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
Tested-by: Zhiwei He <zhiwei.he@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
---
 drivers/net/ice/ice_ethdev.c | 50 +++++++++++++++++++-----------------
 1 file changed, 26 insertions(+), 24 deletions(-)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 52cd20ed9e..ca4371ae3b 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -2440,24 +2440,6 @@ ice_dev_uninit(struct rte_eth_dev *dev)
 	return 0;
 }
 
-static int
-ice_dev_configure(struct rte_eth_dev *dev)
-{
-	struct ice_adapter *ad =
-		ICE_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
-
-	/* Initialize to TRUE. If any of Rx queues doesn't meet the
-	 * bulk allocation or vector Rx preconditions we will reset it.
-	 */
-	ad->rx_bulk_alloc_allowed = true;
-	ad->tx_simple_allowed = true;
-
-	if (dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG)
-		dev->data->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;
-
-	return 0;
-}
-
 static int ice_init_rss(struct ice_pf *pf)
 {
 	struct ice_hw *hw = ICE_PF_TO_HW(pf);
@@ -2588,6 +2570,32 @@ static int ice_init_rss(struct ice_pf *pf)
 	return 0;
 }
 
+static int
+ice_dev_configure(struct rte_eth_dev *dev)
+{
+	struct ice_adapter *ad =
+		ICE_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
+	struct ice_pf *pf = ICE_DEV_PRIVATE_TO_PF(dev->data->dev_private);
+	int ret;
+
+	/* Initialize to TRUE. If any of Rx queues doesn't meet the
+	 * bulk allocation or vector Rx preconditions we will reset it.
+	 */
+	ad->rx_bulk_alloc_allowed = true;
+	ad->tx_simple_allowed = true;
+
+	if (dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG)
+		dev->data->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;
+
+	ret = ice_init_rss(pf);
+	if (ret) {
+		PMD_DRV_LOG(ERR, "Failed to enable rss for PF");
+		return ret;
+	}
+
+	return 0;
+}
+
 static void
 __vsi_queues_bind_intr(struct ice_vsi *vsi, uint16_t msix_vect,
 		       int base_queue, int nb_queue)
@@ -2791,12 +2799,6 @@ ice_dev_start(struct rte_eth_dev *dev)
 		}
 	}
 
-	ret = ice_init_rss(pf);
-	if (ret) {
-		PMD_DRV_LOG(ERR, "Failed to enable rss for PF");
-		goto rx_err;
-	}
-
 	ice_set_rx_function(dev);
 	ice_set_tx_function(dev);
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:46.710821877 +0100
+++ 0054-net-ice-fix-RSS-advanced-rule.patch	2020-05-19 14:04:44.196648010 +0100
@@ -1,14 +1,15 @@
-From 2aa55b41359c64aecadf670d8c0fc15c7cc23df5 Mon Sep 17 00:00:00 2001
+From 5cfef294de7edb551232ef4fac533c6802d5acbe Mon Sep 17 00:00:00 2001
 From: Junyu Jiang <junyux.jiang@intel.com>
 Date: Tue, 7 Apr 2020 01:48:17 +0000
 Subject: [PATCH] net/ice: fix RSS advanced rule
 
+[ upstream commit 2aa55b41359c64aecadf670d8c0fc15c7cc23df5 ]
+
 This patch moved the RSS initialization from dev start to dev configure
 to fix RSS advanced rule invalid issue after running port stop and port
 start.
 
 Fixes: 5ad3db8d4bdd ("net/ice: enable advanced RSS")
-Cc: stable@dpdk.org
 
 Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
 Tested-by: Zhiwei He <zhiwei.he@intel.com>
@@ -18,10 +19,10 @@
  1 file changed, 26 insertions(+), 24 deletions(-)
 
 diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
-index 3c38472dec..d5110c4392 100644
+index 52cd20ed9e..ca4371ae3b 100644
 --- a/drivers/net/ice/ice_ethdev.c
 +++ b/drivers/net/ice/ice_ethdev.c
-@@ -2436,24 +2436,6 @@ ice_dev_uninit(struct rte_eth_dev *dev)
+@@ -2440,24 +2440,6 @@ ice_dev_uninit(struct rte_eth_dev *dev)
  	return 0;
  }
  
@@ -46,7 +47,7 @@
  static int ice_init_rss(struct ice_pf *pf)
  {
  	struct ice_hw *hw = ICE_PF_TO_HW(pf);
-@@ -2584,6 +2566,32 @@ static int ice_init_rss(struct ice_pf *pf)
+@@ -2588,6 +2570,32 @@ static int ice_init_rss(struct ice_pf *pf)
  	return 0;
  }
  
@@ -79,7 +80,7 @@
  static void
  __vsi_queues_bind_intr(struct ice_vsi *vsi, uint16_t msix_vect,
  		       int base_queue, int nb_queue)
-@@ -2787,12 +2795,6 @@ ice_dev_start(struct rte_eth_dev *dev)
+@@ -2791,12 +2799,6 @@ ice_dev_start(struct rte_eth_dev *dev)
  		}
  	}
  

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

* [dpdk-stable] patch 'net/ice/base: remove unused code in switch rule' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (52 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/ice: fix RSS advanced rule' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/ena/base: make allocation macros thread-safe' " luca.boccassi
                     ` (158 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Xiaolong Ye, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From af84a4f27830d3355ca2ab25414a398f337e9610 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Tue, 7 Apr 2020 08:25:23 +0800
Subject: [PATCH] net/ice/base: remove unused code in switch rule

[ upstream commit 3e1374f201910220bc60e1160994104d1bfc3125 ]

Update a switch rule' action from "to VSI" to "to VSI List"
should only happen when the same rule has been programmed with
a different fwd destination. This is already handled by below
code block:

m_entry = ice_find_adv_rule_entry(...)
if (m_entry) {
	...
	ice_adv_add_update_vsi_list(...)
}

The following ice_update_pkt_fwd_rule is unnecessary and should be
removed due to:
1) If a switch rule's action is still to VSI, which means, it is
   the first time be issued,  we don't need to update it "to VSI
   List."
2) Actually the implementation does not match the comment, it still
   update the rule with "to VSI" action.

Fixes: fed0c5ca5f19 ("net/ice/base: support programming a new switch recipe")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
 drivers/net/ice/base/ice_switch.c | 18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)

diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index 9c8f20eb0a..944d98522b 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -6241,24 +6241,8 @@ ice_add_adv_rule(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,
 	sw->recp_list[rid].adv_rule = true;
 	rule_head = &sw->recp_list[rid].filt_rules;
 
-	if (rinfo->sw_act.fltr_act == ICE_FWD_TO_VSI) {
-		struct ice_fltr_info tmp_fltr;
-
-		ice_memset(&tmp_fltr, 0, sizeof(tmp_fltr), ICE_NONDMA_MEM);
-		tmp_fltr.fltr_rule_id =
-			LE16_TO_CPU(s_rule->pdata.lkup_tx_rx.index);
-		tmp_fltr.fltr_act = ICE_FWD_TO_VSI;
-		tmp_fltr.fwd_id.hw_vsi_id =
-			ice_get_hw_vsi_num(hw, vsi_handle);
-		tmp_fltr.vsi_handle = vsi_handle;
-		/* Update the previous switch rule of "forward to VSI" to
-		 * "fwd to VSI list"
-		 */
-		status = ice_update_pkt_fwd_rule(hw, &tmp_fltr);
-		if (status)
-			goto err_ice_add_adv_rule;
+	if (rinfo->sw_act.fltr_act == ICE_FWD_TO_VSI)
 		adv_fltr->vsi_count = 1;
-	}
 
 	/* Add rule entry to book keeping list */
 	LIST_ADD(&adv_fltr->list_entry, rule_head);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:46.750947550 +0100
+++ 0055-net-ice-base-remove-unused-code-in-switch-rule.patch	2020-05-19 14:04:44.200648083 +0100
@@ -1,8 +1,10 @@
-From 3e1374f201910220bc60e1160994104d1bfc3125 Mon Sep 17 00:00:00 2001
+From af84a4f27830d3355ca2ab25414a398f337e9610 Mon Sep 17 00:00:00 2001
 From: Qi Zhang <qi.z.zhang@intel.com>
 Date: Tue, 7 Apr 2020 08:25:23 +0800
 Subject: [PATCH] net/ice/base: remove unused code in switch rule
 
+[ upstream commit 3e1374f201910220bc60e1160994104d1bfc3125 ]
+
 Update a switch rule' action from "to VSI" to "to VSI List"
 should only happen when the same rule has been programmed with
 a different fwd destination. This is already handled by below
@@ -23,7 +25,6 @@
    update the rule with "to VSI" action.
 
 Fixes: fed0c5ca5f19 ("net/ice/base: support programming a new switch recipe")
-Cc: stable@dpdk.org
 
 Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
 Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
@@ -32,10 +33,10 @@
  1 file changed, 1 insertion(+), 17 deletions(-)
 
 diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
-index b5aa5abd9f..07f8efd651 100644
+index 9c8f20eb0a..944d98522b 100644
 --- a/drivers/net/ice/base/ice_switch.c
 +++ b/drivers/net/ice/base/ice_switch.c
-@@ -6695,24 +6695,8 @@ ice_add_adv_rule(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,
+@@ -6241,24 +6241,8 @@ ice_add_adv_rule(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,
  	sw->recp_list[rid].adv_rule = true;
  	rule_head = &sw->recp_list[rid].filt_rules;
  

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

* [dpdk-stable] patch 'net/ena/base: make allocation macros thread-safe' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (53 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/ice/base: remove unused code in switch " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/ena/base: prevent allocation of zero sized memory' " luca.boccassi
                     ` (157 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Igor Chauskin; +Cc: Michal Krawczyk, Guy Tzalik, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From d5cfa58c057548ddee9aac3e1993905df10e4c88 Mon Sep 17 00:00:00 2001
From: Igor Chauskin <igorch@amazon.com>
Date: Wed, 8 Apr 2020 10:28:53 +0200
Subject: [PATCH] net/ena/base: make allocation macros thread-safe

[ upstream commit b14fcac035fd8514851c9140a4e26d765b61c532 ]

Memory allocation region id could possibly be non-unique
due to non-atomic increment, causing allocation failure.

Fixes: 9ba7981ec992 ("ena: add communication layer for DPDK")

Signed-off-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
---
 drivers/net/ena/base/ena_plat_dpdk.h | 10 ++++++----
 drivers/net/ena/ena_ethdev.c         |  2 +-
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ena/base/ena_plat_dpdk.h b/drivers/net/ena/base/ena_plat_dpdk.h
index 9e1492cac4..db9d1bb36b 100644
--- a/drivers/net/ena/base/ena_plat_dpdk.h
+++ b/drivers/net/ena/base/ena_plat_dpdk.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright (c) 2015-2019 Amazon.com, Inc. or its affiliates.
+ * Copyright (c) 2015-2020 Amazon.com, Inc. or its affiliates.
  * All rights reserved.
  */
 
@@ -178,7 +178,7 @@ do {                                                                   \
  * Each rte_memzone should have unique name.
  * To satisfy it, count number of allocations and add it to name.
  */
-extern uint32_t ena_alloc_cnt;
+extern rte_atomic32_t ena_alloc_cnt;
 
 #define ENA_MEM_ALLOC_COHERENT(dmadev, size, virt, phys, handle)	\
 	do {								\
@@ -186,7 +186,8 @@ extern uint32_t ena_alloc_cnt;
 		char z_name[RTE_MEMZONE_NAMESIZE];			\
 		ENA_TOUCH(dmadev); ENA_TOUCH(handle);			\
 		snprintf(z_name, sizeof(z_name),			\
-				"ena_alloc_%d", ena_alloc_cnt++);	\
+			 "ena_alloc_%d",				\
+			 rte_atomic32_add_return(&ena_alloc_cnt, 1));	\
 		mz = rte_memzone_reserve(z_name, size, SOCKET_ID_ANY,	\
 				RTE_MEMZONE_IOVA_CONTIG);		\
 		handle = mz;						\
@@ -211,7 +212,8 @@ extern uint32_t ena_alloc_cnt;
 		char z_name[RTE_MEMZONE_NAMESIZE];			\
 		ENA_TOUCH(dmadev); ENA_TOUCH(dev_node);			\
 		snprintf(z_name, sizeof(z_name),			\
-				"ena_alloc_%d", ena_alloc_cnt++);	\
+			 "ena_alloc_%d",				\
+			 rte_atomic32_add_return(&ena_alloc_cnt, 1));	\
 		mz = rte_memzone_reserve(z_name, size, node,		\
 				RTE_MEMZONE_IOVA_CONTIG);		\
 		mem_handle = mz;					\
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 8bbd80dfb3..758d68d10b 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -89,7 +89,7 @@ struct ena_stats {
  * Each rte_memzone should have unique name.
  * To satisfy it, count number of allocation and add it to name.
  */
-uint32_t ena_alloc_cnt;
+rte_atomic32_t ena_alloc_cnt;
 
 static const struct ena_stats ena_stats_global_strings[] = {
 	ENA_STAT_GLOBAL_ENTRY(wd_expired),
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:46.794713641 +0100
+++ 0056-net-ena-base-make-allocation-macros-thread-safe.patch	2020-05-19 14:04:44.204648155 +0100
@@ -1,13 +1,14 @@
-From b14fcac035fd8514851c9140a4e26d765b61c532 Mon Sep 17 00:00:00 2001
+From d5cfa58c057548ddee9aac3e1993905df10e4c88 Mon Sep 17 00:00:00 2001
 From: Igor Chauskin <igorch@amazon.com>
 Date: Wed, 8 Apr 2020 10:28:53 +0200
 Subject: [PATCH] net/ena/base: make allocation macros thread-safe
 
+[ upstream commit b14fcac035fd8514851c9140a4e26d765b61c532 ]
+
 Memory allocation region id could possibly be non-unique
 due to non-atomic increment, causing allocation failure.
 
 Fixes: 9ba7981ec992 ("ena: add communication layer for DPDK")
-Cc: stable@dpdk.org
 
 Signed-off-by: Igor Chauskin <igorch@amazon.com>
 Reviewed-by: Michal Krawczyk <mk@semihalf.com>
@@ -18,7 +19,7 @@
  2 files changed, 7 insertions(+), 5 deletions(-)
 
 diff --git a/drivers/net/ena/base/ena_plat_dpdk.h b/drivers/net/ena/base/ena_plat_dpdk.h
-index b611fb204b..70261bdbc6 100644
+index 9e1492cac4..db9d1bb36b 100644
 --- a/drivers/net/ena/base/ena_plat_dpdk.h
 +++ b/drivers/net/ena/base/ena_plat_dpdk.h
 @@ -1,5 +1,5 @@
@@ -28,7 +29,7 @@
   * All rights reserved.
   */
  
-@@ -180,7 +180,7 @@ do {                                                                   \
+@@ -178,7 +178,7 @@ do {                                                                   \
   * Each rte_memzone should have unique name.
   * To satisfy it, count number of allocations and add it to name.
   */
@@ -37,7 +38,7 @@
  
  #define ENA_MEM_ALLOC_COHERENT(dmadev, size, virt, phys, handle)	\
  	do {								\
-@@ -188,7 +188,8 @@ extern uint32_t ena_alloc_cnt;
+@@ -186,7 +186,8 @@ extern uint32_t ena_alloc_cnt;
  		char z_name[RTE_MEMZONE_NAMESIZE];			\
  		ENA_TOUCH(dmadev); ENA_TOUCH(handle);			\
  		snprintf(z_name, sizeof(z_name),			\
@@ -47,7 +48,7 @@
  		mz = rte_memzone_reserve(z_name, size, SOCKET_ID_ANY,	\
  				RTE_MEMZONE_IOVA_CONTIG);		\
  		handle = mz;						\
-@@ -213,7 +214,8 @@ extern uint32_t ena_alloc_cnt;
+@@ -211,7 +212,8 @@ extern uint32_t ena_alloc_cnt;
  		char z_name[RTE_MEMZONE_NAMESIZE];			\
  		ENA_TOUCH(dmadev); ENA_TOUCH(dev_node);			\
  		snprintf(z_name, sizeof(z_name),			\
@@ -58,7 +59,7 @@
  				RTE_MEMZONE_IOVA_CONTIG);		\
  		mem_handle = mz;					\
 diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
-index 64aabbbb19..e0ed28419c 100644
+index 8bbd80dfb3..758d68d10b 100644
 --- a/drivers/net/ena/ena_ethdev.c
 +++ b/drivers/net/ena/ena_ethdev.c
 @@ -89,7 +89,7 @@ struct ena_stats {

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

* [dpdk-stable] patch 'net/ena/base: prevent allocation of zero sized memory' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (54 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/ena/base: make allocation macros thread-safe' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/ena/base: fix documentation of functions' " luca.boccassi
                     ` (156 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Igor Chauskin; +Cc: Michal Krawczyk, Guy Tzalik, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From c6730185e02a872b689027cb3faede52b48ab4d1 Mon Sep 17 00:00:00 2001
From: Igor Chauskin <igorch@amazon.com>
Date: Wed, 8 Apr 2020 10:28:54 +0200
Subject: [PATCH] net/ena/base: prevent allocation of zero sized memory

[ upstream commit 29dc10d9424ccf26a346387b0a707185e2432400 ]

rte_memzone_reserve() will reserve the biggest contiguous memzone
available if received 0 as size param.

Fixes: 9ba7981ec992 ("ena: add communication layer for DPDK")

Signed-off-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
---
 drivers/net/ena/base/ena_plat_dpdk.h | 29 ++++++++++++++++------------
 1 file changed, 17 insertions(+), 12 deletions(-)

diff --git a/drivers/net/ena/base/ena_plat_dpdk.h b/drivers/net/ena/base/ena_plat_dpdk.h
index db9d1bb36b..dddfe65403 100644
--- a/drivers/net/ena/base/ena_plat_dpdk.h
+++ b/drivers/net/ena/base/ena_plat_dpdk.h
@@ -182,15 +182,18 @@ extern rte_atomic32_t ena_alloc_cnt;
 
 #define ENA_MEM_ALLOC_COHERENT(dmadev, size, virt, phys, handle)	\
 	do {								\
-		const struct rte_memzone *mz;				\
-		char z_name[RTE_MEMZONE_NAMESIZE];			\
+		const struct rte_memzone *mz = NULL;			\
 		ENA_TOUCH(dmadev); ENA_TOUCH(handle);			\
-		snprintf(z_name, sizeof(z_name),			\
+		if (size > 0) {						\
+			char z_name[RTE_MEMZONE_NAMESIZE];		\
+			snprintf(z_name, sizeof(z_name),		\
 			 "ena_alloc_%d",				\
 			 rte_atomic32_add_return(&ena_alloc_cnt, 1));	\
-		mz = rte_memzone_reserve(z_name, size, SOCKET_ID_ANY,	\
-				RTE_MEMZONE_IOVA_CONTIG);		\
-		handle = mz;						\
+			mz = rte_memzone_reserve(z_name, size,		\
+					SOCKET_ID_ANY,			\
+					RTE_MEMZONE_IOVA_CONTIG);	\
+			handle = mz;					\
+		}							\
 		if (mz == NULL) {					\
 			virt = NULL;					\
 			phys = 0;					\
@@ -208,15 +211,17 @@ extern rte_atomic32_t ena_alloc_cnt;
 #define ENA_MEM_ALLOC_COHERENT_NODE(					\
 	dmadev, size, virt, phys, mem_handle, node, dev_node)		\
 	do {								\
-		const struct rte_memzone *mz;				\
-		char z_name[RTE_MEMZONE_NAMESIZE];			\
+		const struct rte_memzone *mz = NULL;			\
 		ENA_TOUCH(dmadev); ENA_TOUCH(dev_node);			\
-		snprintf(z_name, sizeof(z_name),			\
+		if (size > 0) {						\
+			char z_name[RTE_MEMZONE_NAMESIZE];		\
+			snprintf(z_name, sizeof(z_name),		\
 			 "ena_alloc_%d",				\
-			 rte_atomic32_add_return(&ena_alloc_cnt, 1));	\
-		mz = rte_memzone_reserve(z_name, size, node,		\
+			 rte_atomic32_add_return(&ena_alloc_cnt, 1));   \
+			mz = rte_memzone_reserve(z_name, size, node,	\
 				RTE_MEMZONE_IOVA_CONTIG);		\
-		mem_handle = mz;					\
+			mem_handle = mz;				\
+		}							\
 		if (mz == NULL) {					\
 			virt = NULL;					\
 			phys = 0;					\
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:46.835489272 +0100
+++ 0057-net-ena-base-prevent-allocation-of-zero-sized-memory.patch	2020-05-19 14:04:44.204648155 +0100
@@ -1,13 +1,14 @@
-From 29dc10d9424ccf26a346387b0a707185e2432400 Mon Sep 17 00:00:00 2001
+From c6730185e02a872b689027cb3faede52b48ab4d1 Mon Sep 17 00:00:00 2001
 From: Igor Chauskin <igorch@amazon.com>
 Date: Wed, 8 Apr 2020 10:28:54 +0200
 Subject: [PATCH] net/ena/base: prevent allocation of zero sized memory
 
+[ upstream commit 29dc10d9424ccf26a346387b0a707185e2432400 ]
+
 rte_memzone_reserve() will reserve the biggest contiguous memzone
 available if received 0 as size param.
 
 Fixes: 9ba7981ec992 ("ena: add communication layer for DPDK")
-Cc: stable@dpdk.org
 
 Signed-off-by: Igor Chauskin <igorch@amazon.com>
 Reviewed-by: Michal Krawczyk <mk@semihalf.com>
@@ -17,10 +18,10 @@
  1 file changed, 17 insertions(+), 12 deletions(-)
 
 diff --git a/drivers/net/ena/base/ena_plat_dpdk.h b/drivers/net/ena/base/ena_plat_dpdk.h
-index 70261bdbc6..4b8fe017dd 100644
+index db9d1bb36b..dddfe65403 100644
 --- a/drivers/net/ena/base/ena_plat_dpdk.h
 +++ b/drivers/net/ena/base/ena_plat_dpdk.h
-@@ -184,15 +184,18 @@ extern rte_atomic32_t ena_alloc_cnt;
+@@ -182,15 +182,18 @@ extern rte_atomic32_t ena_alloc_cnt;
  
  #define ENA_MEM_ALLOC_COHERENT(dmadev, size, virt, phys, handle)	\
  	do {								\
@@ -45,7 +46,7 @@
  		if (mz == NULL) {					\
  			virt = NULL;					\
  			phys = 0;					\
-@@ -210,15 +213,17 @@ extern rte_atomic32_t ena_alloc_cnt;
+@@ -208,15 +211,17 @@ extern rte_atomic32_t ena_alloc_cnt;
  #define ENA_MEM_ALLOC_COHERENT_NODE(					\
  	dmadev, size, virt, phys, mem_handle, node, dev_node)		\
  	do {								\

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

* [dpdk-stable] patch 'net/ena/base: fix documentation of functions' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (55 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/ena/base: prevent allocation of zero sized memory' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/ena/base: fix indentation in CQ polling' " luca.boccassi
                     ` (155 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Michal Krawczyk; +Cc: Igor Chauskin, Guy Tzalik, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 3c6ec30057b48bae36856499e312b1d4ea0fdb45 Mon Sep 17 00:00:00 2001
From: Michal Krawczyk <mk@semihalf.com>
Date: Wed, 8 Apr 2020 10:29:01 +0200
Subject: [PATCH] net/ena/base: fix documentation of functions

[ upstream commit b118993abd4cae7af3f8a66e0ad4fda1bee84c09 ]

The documentation format was aligned and few typos were fixed.

Fixes: 99ecfbf845b3 ("ena: import communication layer")

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
---
 drivers/net/ena/base/ena_com.h | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/net/ena/base/ena_com.h b/drivers/net/ena/base/ena_com.h
index ef42bd4f56..2162eb42b8 100644
--- a/drivers/net/ena/base/ena_com.h
+++ b/drivers/net/ena/base/ena_com.h
@@ -404,7 +404,7 @@ extern "C" {
  */
 int ena_com_mmio_reg_read_request_init(struct ena_com_dev *ena_dev);
 
-/* ena_com_set_mmio_read_mode - Enable/disable the mmio reg read mechanism
+/* ena_com_set_mmio_read_mode - Enable/disable the indirect mmio reg read mechanism
  * @ena_dev: ENA communication layer struct
  * @readless_supported: readless mode (enable/disable)
  */
@@ -527,7 +527,7 @@ bool ena_com_get_ena_admin_polling_mode(struct ena_com_dev *ena_dev);
 /* ena_com_admin_q_comp_intr_handler - admin queue interrupt handler
  * @ena_dev: ENA communication layer struct
  *
- * This method go over the admin completion queue and wake up all the pending
+ * This method goes over the admin completion queue and wakes up all the pending
  * threads that wait on the commands wait event.
  *
  * @note: Should be called after MSI-X interrupt.
@@ -537,7 +537,7 @@ void ena_com_admin_q_comp_intr_handler(struct ena_com_dev *ena_dev);
 /* ena_com_aenq_intr_handler - AENQ interrupt handler
  * @ena_dev: ENA communication layer struct
  *
- * This method go over the async event notification queue and call the proper
+ * This method goes over the async event notification queue and calls the proper
  * aenq handler.
  */
 void ena_com_aenq_intr_handler(struct ena_com_dev *dev, void *data);
@@ -554,14 +554,14 @@ void ena_com_abort_admin_commands(struct ena_com_dev *ena_dev);
 /* ena_com_wait_for_abort_completion - Wait for admin commands abort.
  * @ena_dev: ENA communication layer struct
  *
- * This method wait until all the outstanding admin commands will be completed.
+ * This method waits until all the outstanding admin commands are completed.
  */
 void ena_com_wait_for_abort_completion(struct ena_com_dev *ena_dev);
 
 /* ena_com_validate_version - Validate the device parameters
  * @ena_dev: ENA communication layer struct
  *
- * This method validate the device parameters are the same as the saved
+ * This method verifies the device parameters are the same as the saved
  * parameters in ena_dev.
  * This method is useful after device reset, to validate the device mac address
  * and the device offloads are the same as before the reset.
@@ -763,7 +763,7 @@ int ena_com_set_hash_ctrl(struct ena_com_dev *ena_dev);
  *
  * Retrieve the hash control from the device.
  *
- * @note, If the caller called ena_com_fill_hash_ctrl but didn't flash
+ * @note: If the caller called ena_com_fill_hash_ctrl but didn't flash
  * it to the device, the new configuration will be lost.
  *
  * @return: 0 on Success and negative value otherwise.
@@ -815,7 +815,7 @@ int ena_com_indirect_table_set(struct ena_com_dev *ena_dev);
  *
  * Retrieve the RSS indirection table from the device.
  *
- * @note: If the caller called ena_com_indirect_table_fill_entry but didn't flash
+ * @note: If the caller called ena_com_indirect_table_fill_entry but didn't flush
  * it to the device, the new configuration will be lost.
  *
  * @return: 0 on Success and negative value otherwise.
@@ -841,14 +841,14 @@ int ena_com_allocate_debug_area(struct ena_com_dev *ena_dev,
 /* ena_com_delete_debug_area - Free the debug area resources.
  * @ena_dev: ENA communication layer struct
  *
- * Free the allocate debug area.
+ * Free the allocated debug area.
  */
 void ena_com_delete_debug_area(struct ena_com_dev *ena_dev);
 
 /* ena_com_delete_host_info - Free the host info resources.
  * @ena_dev: ENA communication layer struct
  *
- * Free the allocate host info.
+ * Free the allocated host info.
  */
 void ena_com_delete_host_info(struct ena_com_dev *ena_dev);
 
@@ -889,9 +889,9 @@ int ena_com_destroy_io_cq(struct ena_com_dev *ena_dev,
  * @cmd_completion: command completion return value.
  * @cmd_comp_size: command completion size.
 
- * Submit an admin command and then wait until the device will return a
+ * Submit an admin command and then wait until the device returns a
  * completion.
- * The completion will be copyed into cmd_comp.
+ * The completion will be copied into cmd_comp.
  *
  * @return - 0 on success, negative value on failure.
  */
@@ -1083,7 +1083,7 @@ static inline void ena_com_calculate_interrupt_delay(struct ena_com_dev *ena_dev
  * @intr_reg: interrupt register to update.
  * @rx_delay_interval: Rx interval in usecs
  * @tx_delay_interval: Tx interval in usecs
- * @unmask: unask enable/disable
+ * @unmask: unmask enable/disable
  *
  * Prepare interrupt update register with the supplied parameters.
  */
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:46.870492161 +0100
+++ 0058-net-ena-base-fix-documentation-of-functions.patch	2020-05-19 14:04:44.204648155 +0100
@@ -1,8 +1,10 @@
-From b118993abd4cae7af3f8a66e0ad4fda1bee84c09 Mon Sep 17 00:00:00 2001
+From 3c6ec30057b48bae36856499e312b1d4ea0fdb45 Mon Sep 17 00:00:00 2001
 From: Michal Krawczyk <mk@semihalf.com>
 Date: Wed, 8 Apr 2020 10:29:01 +0200
 Subject: [PATCH] net/ena/base: fix documentation of functions
 
+[ upstream commit b118993abd4cae7af3f8a66e0ad4fda1bee84c09 ]
+
 The documentation format was aligned and few typos were fixed.
 
 Fixes: 99ecfbf845b3 ("ena: import communication layer")
@@ -15,10 +17,10 @@
  1 file changed, 12 insertions(+), 12 deletions(-)
 
 diff --git a/drivers/net/ena/base/ena_com.h b/drivers/net/ena/base/ena_com.h
-index 07f63f44af..6c9943df79 100644
+index ef42bd4f56..2162eb42b8 100644
 --- a/drivers/net/ena/base/ena_com.h
 +++ b/drivers/net/ena/base/ena_com.h
-@@ -370,7 +370,7 @@ extern "C" {
+@@ -404,7 +404,7 @@ extern "C" {
   */
  int ena_com_mmio_reg_read_request_init(struct ena_com_dev *ena_dev);
  
@@ -27,7 +29,7 @@
   * @ena_dev: ENA communication layer struct
   * @readless_supported: readless mode (enable/disable)
   */
-@@ -504,7 +504,7 @@ void ena_com_set_admin_auto_polling_mode(struct ena_com_dev *ena_dev,
+@@ -527,7 +527,7 @@ bool ena_com_get_ena_admin_polling_mode(struct ena_com_dev *ena_dev);
  /* ena_com_admin_q_comp_intr_handler - admin queue interrupt handler
   * @ena_dev: ENA communication layer struct
   *
@@ -36,7 +38,7 @@
   * threads that wait on the commands wait event.
   *
   * @note: Should be called after MSI-X interrupt.
-@@ -514,7 +514,7 @@ void ena_com_admin_q_comp_intr_handler(struct ena_com_dev *ena_dev);
+@@ -537,7 +537,7 @@ void ena_com_admin_q_comp_intr_handler(struct ena_com_dev *ena_dev);
  /* ena_com_aenq_intr_handler - AENQ interrupt handler
   * @ena_dev: ENA communication layer struct
   *
@@ -45,7 +47,7 @@
   * aenq handler.
   */
  void ena_com_aenq_intr_handler(struct ena_com_dev *dev, void *data);
-@@ -531,14 +531,14 @@ void ena_com_abort_admin_commands(struct ena_com_dev *ena_dev);
+@@ -554,14 +554,14 @@ void ena_com_abort_admin_commands(struct ena_com_dev *ena_dev);
  /* ena_com_wait_for_abort_completion - Wait for admin commands abort.
   * @ena_dev: ENA communication layer struct
   *
@@ -62,7 +64,7 @@
   * parameters in ena_dev.
   * This method is useful after device reset, to validate the device mac address
   * and the device offloads are the same as before the reset.
-@@ -715,7 +715,7 @@ int ena_com_set_hash_ctrl(struct ena_com_dev *ena_dev);
+@@ -763,7 +763,7 @@ int ena_com_set_hash_ctrl(struct ena_com_dev *ena_dev);
   *
   * Retrieve the hash control from the device.
   *
@@ -71,7 +73,7 @@
   * it to the device, the new configuration will be lost.
   *
   * @return: 0 on Success and negative value otherwise.
-@@ -767,7 +767,7 @@ int ena_com_indirect_table_set(struct ena_com_dev *ena_dev);
+@@ -815,7 +815,7 @@ int ena_com_indirect_table_set(struct ena_com_dev *ena_dev);
   *
   * Retrieve the RSS indirection table from the device.
   *
@@ -80,7 +82,7 @@
   * it to the device, the new configuration will be lost.
   *
   * @return: 0 on Success and negative value otherwise.
-@@ -793,14 +793,14 @@ int ena_com_allocate_debug_area(struct ena_com_dev *ena_dev,
+@@ -841,14 +841,14 @@ int ena_com_allocate_debug_area(struct ena_com_dev *ena_dev,
  /* ena_com_delete_debug_area - Free the debug area resources.
   * @ena_dev: ENA communication layer struct
   *
@@ -97,7 +99,7 @@
   */
  void ena_com_delete_host_info(struct ena_com_dev *ena_dev);
  
-@@ -841,9 +841,9 @@ int ena_com_destroy_io_cq(struct ena_com_dev *ena_dev,
+@@ -889,9 +889,9 @@ int ena_com_destroy_io_cq(struct ena_com_dev *ena_dev,
   * @cmd_completion: command completion return value.
   * @cmd_comp_size: command completion size.
  
@@ -109,7 +111,7 @@
   *
   * @return - 0 on success, negative value on failure.
   */
-@@ -932,7 +932,7 @@ static inline void ena_com_disable_adaptive_moderation(struct ena_com_dev *ena_d
+@@ -1083,7 +1083,7 @@ static inline void ena_com_calculate_interrupt_delay(struct ena_com_dev *ena_dev
   * @intr_reg: interrupt register to update.
   * @rx_delay_interval: Rx interval in usecs
   * @tx_delay_interval: Tx interval in usecs

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

* [dpdk-stable] patch 'net/ena/base: fix indentation in CQ polling' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (56 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/ena/base: fix documentation of functions' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/ena/base: fix indentation of multiple defines' " luca.boccassi
                     ` (154 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Michal Krawczyk; +Cc: Igor Chauskin, Guy Tzalik, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 3c4bf7946066a84dd2f22b28765997b7463ec5c5 Mon Sep 17 00:00:00 2001
From: Michal Krawczyk <mk@semihalf.com>
Date: Wed, 8 Apr 2020 10:29:02 +0200
Subject: [PATCH] net/ena/base: fix indentation in CQ polling

[ upstream commit 6a5283bbad7a17fa5556c55e00e4fe1828039285 ]

The spaces instead of tabs were used for the indent.

Fixes: 3adcba9a8987 ("net/ena: update HAL to the newer version")

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
---
 drivers/net/ena/base/ena_com.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ena/base/ena_com.c b/drivers/net/ena/base/ena_com.c
index 8b51660a45..b3cdf712e1 100644
--- a/drivers/net/ena/base/ena_com.c
+++ b/drivers/net/ena/base/ena_com.c
@@ -525,11 +525,11 @@ static int ena_com_wait_and_process_admin_cq_polling(struct ena_comp_ctx *comp_c
 	timeout = ENA_GET_SYSTEM_TIMEOUT(admin_queue->completion_timeout);
 
 	while (1) {
-                ENA_SPINLOCK_LOCK(admin_queue->q_lock, flags);
-                ena_com_handle_admin_completion(admin_queue);
-                ENA_SPINLOCK_UNLOCK(admin_queue->q_lock, flags);
+		ENA_SPINLOCK_LOCK(admin_queue->q_lock, flags);
+		ena_com_handle_admin_completion(admin_queue);
+		ENA_SPINLOCK_UNLOCK(admin_queue->q_lock, flags);
 
-                if (comp_ctx->status != ENA_CMD_SUBMITTED)
+		if (comp_ctx->status != ENA_CMD_SUBMITTED)
 			break;
 
 		if (ENA_TIME_EXPIRE(timeout)) {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:46.908385447 +0100
+++ 0059-net-ena-base-fix-indentation-in-CQ-polling.patch	2020-05-19 14:04:44.208648228 +0100
@@ -1,8 +1,10 @@
-From 6a5283bbad7a17fa5556c55e00e4fe1828039285 Mon Sep 17 00:00:00 2001
+From 3c4bf7946066a84dd2f22b28765997b7463ec5c5 Mon Sep 17 00:00:00 2001
 From: Michal Krawczyk <mk@semihalf.com>
 Date: Wed, 8 Apr 2020 10:29:02 +0200
 Subject: [PATCH] net/ena/base: fix indentation in CQ polling
 
+[ upstream commit 6a5283bbad7a17fa5556c55e00e4fe1828039285 ]
+
 The spaces instead of tabs were used for the indent.
 
 Fixes: 3adcba9a8987 ("net/ena: update HAL to the newer version")
@@ -15,10 +17,10 @@
  1 file changed, 4 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/net/ena/base/ena_com.c b/drivers/net/ena/base/ena_com.c
-index 962baf6024..f128d3c4f3 100644
+index 8b51660a45..b3cdf712e1 100644
 --- a/drivers/net/ena/base/ena_com.c
 +++ b/drivers/net/ena/base/ena_com.c
-@@ -532,11 +532,11 @@ static int ena_com_wait_and_process_admin_cq_polling(struct ena_comp_ctx *comp_c
+@@ -525,11 +525,11 @@ static int ena_com_wait_and_process_admin_cq_polling(struct ena_comp_ctx *comp_c
  	timeout = ENA_GET_SYSTEM_TIMEOUT(admin_queue->completion_timeout);
  
  	while (1) {

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

* [dpdk-stable] patch 'net/ena/base: fix indentation of multiple defines' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (57 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/ena/base: fix indentation in CQ polling' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/ena: set IO ring size to valid value' " luca.boccassi
                     ` (153 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Michal Krawczyk; +Cc: Igor Chauskin, Guy Tzalik, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 59acd7de4ca7894d6f9ab6fbdd541e66c8649111 Mon Sep 17 00:00:00 2001
From: Michal Krawczyk <mk@semihalf.com>
Date: Wed, 8 Apr 2020 10:29:06 +0200
Subject: [PATCH] net/ena/base: fix indentation of multiple defines

[ upstream commit 5dcdfbfaaf5c4223cdcbb2d08995236bfdb7e3c8 ]

As the alignment of the defines wasn't valid, it was removed at all, so
instead of using multiple spaces or tabs, the single space after define
name is being used.

Fixes: 99ecfbf845b3 ("ena: import communication layer")

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
---
 drivers/net/ena/base/ena_com.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ena/base/ena_com.h b/drivers/net/ena/base/ena_com.h
index 2162eb42b8..f1593345e8 100644
--- a/drivers/net/ena/base/ena_com.h
+++ b/drivers/net/ena/base/ena_com.h
@@ -9,9 +9,9 @@
 #include "ena_plat.h"
 #include "ena_includes.h"
 
-#define ENA_MAX_NUM_IO_QUEUES		128U
+#define ENA_MAX_NUM_IO_QUEUES 128U
 /* We need to queues for each IO (on for Tx and one for Rx) */
-#define ENA_TOTAL_NUM_QUEUES		(2 * (ENA_MAX_NUM_IO_QUEUES))
+#define ENA_TOTAL_NUM_QUEUES (2 * (ENA_MAX_NUM_IO_QUEUES))
 
 #define ENA_MAX_HANDLERS 256
 
@@ -55,9 +55,9 @@
 #define ENA_INTR_MODER_LEVEL_STRIDE			1
 #define ENA_INTR_BYTE_COUNT_NOT_SUPPORTED		0xFFFFFF
 
-#define ENA_HW_HINTS_NO_TIMEOUT				0xFFFF
+#define ENA_HW_HINTS_NO_TIMEOUT 0xFFFF
 
-#define ENA_FEATURE_MAX_QUEUE_EXT_VER	1
+#define ENA_FEATURE_MAX_QUEUE_EXT_VER 1
 
 enum ena_intr_moder_level {
 	ENA_INTR_MODER_LOWEST = 0,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:46.944639997 +0100
+++ 0060-net-ena-base-fix-indentation-of-multiple-defines.patch	2020-05-19 14:04:44.208648228 +0100
@@ -1,8 +1,10 @@
-From 5dcdfbfaaf5c4223cdcbb2d08995236bfdb7e3c8 Mon Sep 17 00:00:00 2001
+From 59acd7de4ca7894d6f9ab6fbdd541e66c8649111 Mon Sep 17 00:00:00 2001
 From: Michal Krawczyk <mk@semihalf.com>
 Date: Wed, 8 Apr 2020 10:29:06 +0200
 Subject: [PATCH] net/ena/base: fix indentation of multiple defines
 
+[ upstream commit 5dcdfbfaaf5c4223cdcbb2d08995236bfdb7e3c8 ]
+
 As the alignment of the defines wasn't valid, it was removed at all, so
 instead of using multiple spaces or tabs, the single space after define
 name is being used.
@@ -17,12 +19,12 @@
  1 file changed, 4 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/net/ena/base/ena_com.h b/drivers/net/ena/base/ena_com.h
-index 6c9943df79..61074eaf63 100644
+index 2162eb42b8..f1593345e8 100644
 --- a/drivers/net/ena/base/ena_com.h
 +++ b/drivers/net/ena/base/ena_com.h
-@@ -8,9 +8,9 @@
- 
+@@ -9,9 +9,9 @@
  #include "ena_plat.h"
+ #include "ena_includes.h"
  
 -#define ENA_MAX_NUM_IO_QUEUES		128U
 +#define ENA_MAX_NUM_IO_QUEUES 128U
@@ -32,9 +34,9 @@
  
  #define ENA_MAX_HANDLERS 256
  
-@@ -33,9 +33,9 @@
- 
- #define ENA_HASH_KEY_SIZE				40
+@@ -55,9 +55,9 @@
+ #define ENA_INTR_MODER_LEVEL_STRIDE			1
+ #define ENA_INTR_BYTE_COUNT_NOT_SUPPORTED		0xFFFFFF
  
 -#define ENA_HW_HINTS_NO_TIMEOUT				0xFFFF
 +#define ENA_HW_HINTS_NO_TIMEOUT 0xFFFF
@@ -42,8 +44,8 @@
 -#define ENA_FEATURE_MAX_QUEUE_EXT_VER	1
 +#define ENA_FEATURE_MAX_QUEUE_EXT_VER 1
  
- struct ena_llq_configurations {
- 	enum ena_admin_llq_header_location llq_header_location;
+ enum ena_intr_moder_level {
+ 	ENA_INTR_MODER_LOWEST = 0,
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'net/ena: set IO ring size to valid value' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (58 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/ena/base: fix indentation of multiple defines' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/mlx5: fix counter container usage' " luca.boccassi
                     ` (152 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Michal Krawczyk; +Cc: Igor Chauskin, Guy Tzalik, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 2c0c0e482038746ef7994021ba805dd2061823d2 Mon Sep 17 00:00:00 2001
From: Michal Krawczyk <mk@semihalf.com>
Date: Wed, 8 Apr 2020 10:29:08 +0200
Subject: [PATCH] net/ena: set IO ring size to valid value

[ upstream commit badc3a6aa133a886a61b9e3ad666e5675f7ec3d3 ]

IO rings were configured with the maximum allowed size for the Tx/Rx
rings. However, the application could decide to create smaller rings.

This patch is using value stored in the ring instead of the value from
the adapter which is indicating the maximum allowed value.

Fixes: df238f84c0a2 ("net/ena: recreate HW IO rings on start and stop")

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
---
 drivers/net/ena/ena_ethdev.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 758d68d10b..36e9b4ad9e 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -1079,16 +1079,15 @@ static int ena_create_io_queue(struct ena_ring *ring)
 		ena_qid = ENA_IO_TXQ_IDX(ring->id);
 		ctx.direction = ENA_COM_IO_QUEUE_DIRECTION_TX;
 		ctx.mem_queue_type = ena_dev->tx_mem_queue_type;
-		ctx.queue_size = adapter->tx_ring_size;
 		for (i = 0; i < ring->ring_size; i++)
 			ring->empty_tx_reqs[i] = i;
 	} else {
 		ena_qid = ENA_IO_RXQ_IDX(ring->id);
 		ctx.direction = ENA_COM_IO_QUEUE_DIRECTION_RX;
-		ctx.queue_size = adapter->rx_ring_size;
 		for (i = 0; i < ring->ring_size; i++)
 			ring->empty_rx_reqs[i] = i;
 	}
+	ctx.queue_size = ring->ring_size;
 	ctx.qid = ena_qid;
 	ctx.msix_vector = -1; /* interrupts not used */
 	ctx.numa_node = ring->numa_socket_id;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:46.979293429 +0100
+++ 0061-net-ena-set-IO-ring-size-to-valid-value.patch	2020-05-19 14:04:44.208648228 +0100
@@ -1,8 +1,10 @@
-From badc3a6aa133a886a61b9e3ad666e5675f7ec3d3 Mon Sep 17 00:00:00 2001
+From 2c0c0e482038746ef7994021ba805dd2061823d2 Mon Sep 17 00:00:00 2001
 From: Michal Krawczyk <mk@semihalf.com>
 Date: Wed, 8 Apr 2020 10:29:08 +0200
 Subject: [PATCH] net/ena: set IO ring size to valid value
 
+[ upstream commit badc3a6aa133a886a61b9e3ad666e5675f7ec3d3 ]
+
 IO rings were configured with the maximum allowed size for the Tx/Rx
 rings. However, the application could decide to create smaller rings.
 
@@ -10,7 +12,6 @@
 the adapter which is indicating the maximum allowed value.
 
 Fixes: df238f84c0a2 ("net/ena: recreate HW IO rings on start and stop")
-Cc: stable@dpdk.org
 
 Signed-off-by: Michal Krawczyk <mk@semihalf.com>
 Reviewed-by: Igor Chauskin <igorch@amazon.com>
@@ -20,10 +21,10 @@
  1 file changed, 1 insertion(+), 2 deletions(-)
 
 diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
-index f1202d99f2..62e26a2a16 100644
+index 758d68d10b..36e9b4ad9e 100644
 --- a/drivers/net/ena/ena_ethdev.c
 +++ b/drivers/net/ena/ena_ethdev.c
-@@ -1099,16 +1099,15 @@ static int ena_create_io_queue(struct ena_ring *ring)
+@@ -1079,16 +1079,15 @@ static int ena_create_io_queue(struct ena_ring *ring)
  		ena_qid = ENA_IO_TXQ_IDX(ring->id);
  		ctx.direction = ENA_COM_IO_QUEUE_DIRECTION_TX;
  		ctx.mem_queue_type = ena_dev->tx_mem_queue_type;

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

* [dpdk-stable] patch 'net/mlx5: fix counter container usage' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (59 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/ena: set IO ring size to valid value' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'app/testpmd: fix PPPoE flow command' " luca.boccassi
                     ` (151 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Suanming Mou; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 03527bd3937cbd3b00250749918d82774d39e9c9 Mon Sep 17 00:00:00 2001
From: Suanming Mou <suanmingm@mellanox.com>
Date: Tue, 7 Apr 2020 11:59:40 +0800
Subject: [PATCH] net/mlx5: fix counter container usage

[ upstream commit 92a0a3a13876789b1f5e3217b4a07e52b96dd7d0 ]

As none-batch counter pool allocates only one counter every time, after
the new allocated counter pop out, the pool will be empty and moved to
the end of the container list in the container.

Currently, the new non-batch counter allocation maybe happened with new
counter pool allocated, it means the new counter comes from a new pool.
While new pool is allocated, the container resize and switch happens.
In this case, after the pool becomes empty, it should be added to the
new container pool list as the pool belongs.

Update the container pointer accordingly with pool allocation to avoid
add the pool to the incorrect container.

Fixes: 5382d28c2110 ("net/mlx5: accelerate DV flow counter transactions")

Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 38 +++++++++++++++++++--------------
 1 file changed, 22 insertions(+), 16 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index f0edb98c02..88793eb7a7 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -3947,11 +3947,13 @@ _flow_dv_query_count(struct rte_eth_dev *dev,
  *   The devX counter handle.
  * @param[in] batch
  *   Whether the pool is for counter that was allocated by batch command.
+ * @param[in/out] cont_cur
+ *   Pointer to the container pointer, it will be update in pool resize.
  *
  * @return
- *   A new pool pointer on success, NULL otherwise and rte_errno is set.
+ *   The pool container pointer on success, NULL otherwise and rte_errno is set.
  */
-static struct mlx5_flow_counter_pool *
+static struct mlx5_pools_container *
 flow_dv_pool_create(struct rte_eth_dev *dev, struct mlx5_devx_obj *dcs,
 		    uint32_t batch)
 {
@@ -3985,12 +3987,12 @@ flow_dv_pool_create(struct rte_eth_dev *dev, struct mlx5_devx_obj *dcs,
 	 */
 	rte_atomic64_set(&pool->query_gen, 0x2);
 	TAILQ_INIT(&pool->counters);
-	TAILQ_INSERT_TAIL(&cont->pool_list, pool, next);
+	TAILQ_INSERT_HEAD(&cont->pool_list, pool, next);
 	cont->pools[n_valid] = pool;
 	/* Pool initialization must be updated before host thread access. */
 	rte_cio_wmb();
 	rte_atomic16_add(&cont->n_valid, 1);
-	return pool;
+	return cont;
 }
 
 /**
@@ -4004,33 +4006,35 @@ flow_dv_pool_create(struct rte_eth_dev *dev, struct mlx5_devx_obj *dcs,
  *   Whether the pool is for counter that was allocated by batch command.
  *
  * @return
- *   The free counter pool pointer and @p cnt_free is set on success,
+ *   The counter container pointer and @p cnt_free is set on success,
  *   NULL otherwise and rte_errno is set.
  */
-static struct mlx5_flow_counter_pool *
+static struct mlx5_pools_container *
 flow_dv_counter_pool_prepare(struct rte_eth_dev *dev,
 			     struct mlx5_flow_counter **cnt_free,
 			     uint32_t batch)
 {
 	struct mlx5_priv *priv = dev->data->dev_private;
+	struct mlx5_pools_container *cont;
 	struct mlx5_flow_counter_pool *pool;
 	struct mlx5_devx_obj *dcs = NULL;
 	struct mlx5_flow_counter *cnt;
 	uint32_t i;
 
+	cont = MLX5_CNT_CONTAINER(priv->sh, batch, 0);
 	if (!batch) {
 		/* bulk_bitmap must be 0 for single counter allocation. */
 		dcs = mlx5_devx_cmd_flow_counter_alloc(priv->sh->ctx, 0);
 		if (!dcs)
 			return NULL;
-		pool = flow_dv_find_pool_by_id
-			(MLX5_CNT_CONTAINER(priv->sh, batch, 0), dcs->id);
+		pool = flow_dv_find_pool_by_id(cont, dcs->id);
 		if (!pool) {
-			pool = flow_dv_pool_create(dev, dcs, batch);
-			if (!pool) {
+			cont = flow_dv_pool_create(dev, dcs, batch);
+			if (!cont) {
 				mlx5_devx_cmd_destroy(dcs);
 				return NULL;
 			}
+			pool = TAILQ_FIRST(&cont->pool_list);
 		} else if (dcs->id < pool->min_dcs->id) {
 			rte_atomic64_set(&pool->a64_dcs,
 					 (int64_t)(uintptr_t)dcs);
@@ -4039,7 +4043,7 @@ flow_dv_counter_pool_prepare(struct rte_eth_dev *dev,
 		TAILQ_INSERT_HEAD(&pool->counters, cnt, next);
 		cnt->dcs = dcs;
 		*cnt_free = cnt;
-		return pool;
+		return cont;
 	}
 	/* bulk_bitmap is in 128 counters units. */
 	if (priv->config.hca_attr.flow_counter_bulk_alloc_bitmap & 0x4)
@@ -4048,18 +4052,19 @@ flow_dv_counter_pool_prepare(struct rte_eth_dev *dev,
 		rte_errno = ENODATA;
 		return NULL;
 	}
-	pool = flow_dv_pool_create(dev, dcs, batch);
-	if (!pool) {
+	cont = flow_dv_pool_create(dev, dcs, batch);
+	if (!cont) {
 		mlx5_devx_cmd_destroy(dcs);
 		return NULL;
 	}
+	pool = TAILQ_FIRST(&cont->pool_list);
 	for (i = 0; i < MLX5_COUNTERS_PER_POOL; ++i) {
 		cnt = &pool->counters_raw[i];
 		cnt->pool = pool;
 		TAILQ_INSERT_HEAD(&pool->counters, cnt, next);
 	}
 	*cnt_free = &pool->counters_raw[0];
-	return pool;
+	return cont;
 }
 
 /**
@@ -4160,9 +4165,10 @@ flow_dv_counter_alloc(struct rte_eth_dev *dev, uint32_t shared, uint32_t id,
 		cnt_free = NULL;
 	}
 	if (!cnt_free) {
-		pool = flow_dv_counter_pool_prepare(dev, &cnt_free, batch);
-		if (!pool)
+		cont = flow_dv_counter_pool_prepare(dev, &cnt_free, batch);
+		if (!cont)
 			return NULL;
+		pool = TAILQ_FIRST(&cont->pool_list);
 	}
 	cnt_free->batch = batch;
 	/* Create a DV counter action only in the first time usage. */
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:47.018109957 +0100
+++ 0062-net-mlx5-fix-counter-container-usage.patch	2020-05-19 14:04:44.216648373 +0100
@@ -1,8 +1,10 @@
-From 92a0a3a13876789b1f5e3217b4a07e52b96dd7d0 Mon Sep 17 00:00:00 2001
+From 03527bd3937cbd3b00250749918d82774d39e9c9 Mon Sep 17 00:00:00 2001
 From: Suanming Mou <suanmingm@mellanox.com>
 Date: Tue, 7 Apr 2020 11:59:40 +0800
 Subject: [PATCH] net/mlx5: fix counter container usage
 
+[ upstream commit 92a0a3a13876789b1f5e3217b4a07e52b96dd7d0 ]
+
 As none-batch counter pool allocates only one counter every time, after
 the new allocated counter pop out, the pool will be empty and moved to
 the end of the container list in the container.
@@ -17,7 +19,6 @@
 add the pool to the incorrect container.
 
 Fixes: 5382d28c2110 ("net/mlx5: accelerate DV flow counter transactions")
-Cc: stable@dpdk.org
 
 Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
 Acked-by: Matan Azrad <matan@mellanox.com>
@@ -26,10 +27,10 @@
  1 file changed, 22 insertions(+), 16 deletions(-)
 
 diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index f5d98d267b..6a49bc9311 100644
+index f0edb98c02..88793eb7a7 100644
 --- a/drivers/net/mlx5/mlx5_flow_dv.c
 +++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -4153,11 +4153,13 @@ _flow_dv_query_count(struct rte_eth_dev *dev,
+@@ -3947,11 +3947,13 @@ _flow_dv_query_count(struct rte_eth_dev *dev,
   *   The devX counter handle.
   * @param[in] batch
   *   Whether the pool is for counter that was allocated by batch command.
@@ -45,7 +46,7 @@
  flow_dv_pool_create(struct rte_eth_dev *dev, struct mlx5_devx_obj *dcs,
  		    uint32_t batch)
  {
-@@ -4191,12 +4193,12 @@ flow_dv_pool_create(struct rte_eth_dev *dev, struct mlx5_devx_obj *dcs,
+@@ -3985,12 +3987,12 @@ flow_dv_pool_create(struct rte_eth_dev *dev, struct mlx5_devx_obj *dcs,
  	 */
  	rte_atomic64_set(&pool->query_gen, 0x2);
  	TAILQ_INIT(&pool->counters);
@@ -60,7 +61,7 @@
  }
  
  /**
-@@ -4210,33 +4212,35 @@ flow_dv_pool_create(struct rte_eth_dev *dev, struct mlx5_devx_obj *dcs,
+@@ -4004,33 +4006,35 @@ flow_dv_pool_create(struct rte_eth_dev *dev, struct mlx5_devx_obj *dcs,
   *   Whether the pool is for counter that was allocated by batch command.
   *
   * @return
@@ -102,7 +103,7 @@
  		} else if (dcs->id < pool->min_dcs->id) {
  			rte_atomic64_set(&pool->a64_dcs,
  					 (int64_t)(uintptr_t)dcs);
-@@ -4245,7 +4249,7 @@ flow_dv_counter_pool_prepare(struct rte_eth_dev *dev,
+@@ -4039,7 +4043,7 @@ flow_dv_counter_pool_prepare(struct rte_eth_dev *dev,
  		TAILQ_INSERT_HEAD(&pool->counters, cnt, next);
  		cnt->dcs = dcs;
  		*cnt_free = cnt;
@@ -111,7 +112,7 @@
  	}
  	/* bulk_bitmap is in 128 counters units. */
  	if (priv->config.hca_attr.flow_counter_bulk_alloc_bitmap & 0x4)
-@@ -4254,18 +4258,19 @@ flow_dv_counter_pool_prepare(struct rte_eth_dev *dev,
+@@ -4048,18 +4052,19 @@ flow_dv_counter_pool_prepare(struct rte_eth_dev *dev,
  		rte_errno = ENODATA;
  		return NULL;
  	}
@@ -134,7 +135,7 @@
  }
  
  /**
-@@ -4366,9 +4371,10 @@ flow_dv_counter_alloc(struct rte_eth_dev *dev, uint32_t shared, uint32_t id,
+@@ -4160,9 +4165,10 @@ flow_dv_counter_alloc(struct rte_eth_dev *dev, uint32_t shared, uint32_t id,
  		cnt_free = NULL;
  	}
  	if (!cnt_free) {

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

* [dpdk-stable] patch 'app/testpmd: fix PPPoE flow command' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (60 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/mlx5: fix counter container usage' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/pfe: fix double free of MAC address' " luca.boccassi
                     ` (150 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Xiao Zhang; +Cc: Ori Kam, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 175f707d92eae1f01ae0412ba22ac0e914e3f6c8 Mon Sep 17 00:00:00 2001
From: Xiao Zhang <xiao.zhang@intel.com>
Date: Tue, 31 Mar 2020 21:29:40 +0800
Subject: [PATCH] app/testpmd: fix PPPoE flow command

[ upstream commit c3ea098ae3a99fcf654432154ebc5b7a33866d89 ]

The command line to create RTE flow for specific proto_id of PPPOES can
not work.

It was:
testpmd> flow create 0 ingress pattern proto_id
 proto_id [TOKEN]: match PPPoE session protocol identifier
testpmd> flow create 0 ingress pattern proto_id proto_id
 proto_id [TOKEN]: match PPPoE session protocol identifier
testpmd> flow create 0 ingress pattern proto_id proto_id proto_id
 proto_id [TOKEN]: match PPPoE session protocol identifier

The proto_id can not be set with previous implementation.

This patch is to fix this issue, and change the command line to:
testpmd> flow create 0 pattern pppoe_proto_id is xxxx

Fixes: 226c6e60c35b ("ethdev: add PPPoE to flow API")

Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Acked-by: Ori Kam <orika@mellanox.com>
---
 app/test-pmd/cmdline_flow.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index f059978730..deced65016 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -1005,7 +1005,6 @@ static const enum index item_pppoes[] = {
 };
 
 static const enum index item_pppoe_proto_id[] = {
-	ITEM_PPPOE_PROTO_ID,
 	ITEM_NEXT,
 	ZERO,
 };
@@ -2544,11 +2543,14 @@ static const struct token token_list[] = {
 					session_id)),
 	},
 	[ITEM_PPPOE_PROTO_ID] = {
-		.name = "proto_id",
+		.name = "pppoe_proto_id",
 		.help = "match PPPoE session protocol identifier",
 		.priv = PRIV_ITEM(PPPOE_PROTO_ID,
 				sizeof(struct rte_flow_item_pppoe_proto_id)),
-		.next = NEXT(item_pppoe_proto_id),
+		.next = NEXT(item_pppoe_proto_id, NEXT_ENTRY(UNSIGNED),
+			     item_param),
+		.args = ARGS(ARGS_ENTRY_HTON
+			     (struct rte_flow_item_pppoe_proto_id, proto_id)),
 		.call = parse_vc,
 	},
 	[ITEM_HIGIG2] = {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:47.064381159 +0100
+++ 0063-app-testpmd-fix-PPPoE-flow-command.patch	2020-05-19 14:04:44.220648445 +0100
@@ -1,8 +1,10 @@
-From c3ea098ae3a99fcf654432154ebc5b7a33866d89 Mon Sep 17 00:00:00 2001
+From 175f707d92eae1f01ae0412ba22ac0e914e3f6c8 Mon Sep 17 00:00:00 2001
 From: Xiao Zhang <xiao.zhang@intel.com>
 Date: Tue, 31 Mar 2020 21:29:40 +0800
 Subject: [PATCH] app/testpmd: fix PPPoE flow command
 
+[ upstream commit c3ea098ae3a99fcf654432154ebc5b7a33866d89 ]
+
 The command line to create RTE flow for specific proto_id of PPPOES can
 not work.
 
@@ -20,7 +22,6 @@
 testpmd> flow create 0 pattern pppoe_proto_id is xxxx
 
 Fixes: 226c6e60c35b ("ethdev: add PPPoE to flow API")
-Cc: stable@dpdk.org
 
 Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
 Acked-by: Ori Kam <orika@mellanox.com>
@@ -29,10 +30,10 @@
  1 file changed, 5 insertions(+), 3 deletions(-)
 
 diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
-index 4877ac6c8a..e6ab8ff2f7 100644
+index f059978730..deced65016 100644
 --- a/app/test-pmd/cmdline_flow.c
 +++ b/app/test-pmd/cmdline_flow.c
-@@ -1037,7 +1037,6 @@ static const enum index item_pppoes[] = {
+@@ -1005,7 +1005,6 @@ static const enum index item_pppoes[] = {
  };
  
  static const enum index item_pppoe_proto_id[] = {
@@ -40,7 +41,7 @@
  	ITEM_NEXT,
  	ZERO,
  };
-@@ -2649,11 +2648,14 @@ static const struct token token_list[] = {
+@@ -2544,11 +2543,14 @@ static const struct token token_list[] = {
  					session_id)),
  	},
  	[ITEM_PPPOE_PROTO_ID] = {

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

* [dpdk-stable] patch 'net/pfe: fix double free of MAC address' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (61 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'app/testpmd: fix PPPoE flow command' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/null: fix secondary burst function selection' " luca.boccassi
                     ` (149 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 670758fe8b981048653aec28701c3ebf0445775d Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Thu, 9 Apr 2020 09:59:00 +0800
Subject: [PATCH] net/pfe: fix double free of MAC address

[ upstream commit 497eb88c14481c262bfb4af3a7d2050d62e35295 ]

The 'mac_addrs' freeing has been moved to rte_eth_dev_release_port(),
so freeing 'mac_addrs' like this in pfe_eth_exit() is unnecessary and
will cause double free.

Fixes: 67fc3ff97c39 ("net/pfe: introduce basic functions")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/pfe/pfe_ethdev.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/pfe/pfe_ethdev.c b/drivers/net/pfe/pfe_ethdev.c
index 59b5b8387b..bdf2a7c76a 100644
--- a/drivers/net/pfe/pfe_ethdev.c
+++ b/drivers/net/pfe/pfe_ethdev.c
@@ -396,7 +396,6 @@ pfe_eth_exit(struct rte_eth_dev *dev, struct pfe *pfe)
 	/* Close the device file for link status */
 	pfe_eth_close_cdev(dev->data->dev_private);
 
-	rte_free(dev->data->mac_addrs);
 	rte_eth_dev_release_port(dev);
 	pfe->nb_devs--;
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:47.105279461 +0100
+++ 0064-net-pfe-fix-double-free-of-MAC-address.patch	2020-05-19 14:04:44.220648445 +0100
@@ -1,14 +1,15 @@
-From 497eb88c14481c262bfb4af3a7d2050d62e35295 Mon Sep 17 00:00:00 2001
+From 670758fe8b981048653aec28701c3ebf0445775d Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Thu, 9 Apr 2020 09:59:00 +0800
 Subject: [PATCH] net/pfe: fix double free of MAC address
 
+[ upstream commit 497eb88c14481c262bfb4af3a7d2050d62e35295 ]
+
 The 'mac_addrs' freeing has been moved to rte_eth_dev_release_port(),
 so freeing 'mac_addrs' like this in pfe_eth_exit() is unnecessary and
 will cause double free.
 
 Fixes: 67fc3ff97c39 ("net/pfe: introduce basic functions")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

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

* [dpdk-stable] patch 'net/null: fix secondary burst function selection' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (62 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/pfe: fix double free of MAC address' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/null: remove redundant check' " luca.boccassi
                     ` (148 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From bfc5290bc8e1cb8afab2b8858c28f303e9c9a6ff Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Mon, 2 Mar 2020 17:36:40 +0000
Subject: [PATCH] net/null: fix secondary burst function selection

[ upstream commit e2f4b25063d7d06f004d0809c30bb616f5bca61b ]

Secondary process uses the primary process device and while setting the
Rx/Tx functions it uses the device arguments from the secondary process
instead of the primary ones.

This may cause primary and secondary process use different Rx/Tx
functions unintentionally.

Fixes: bccc77a6a74a ("net/null: fix multi-process Rx and Tx")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/null/rte_eth_null.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c
index 025b73acb3..87a29b8535 100644
--- a/drivers/net/null/rte_eth_null.c
+++ b/drivers/net/null/rte_eth_null.c
@@ -584,6 +584,7 @@ rte_pmd_null_probe(struct rte_vdev_device *dev)
 	PMD_LOG(INFO, "Initializing pmd_null for %s", name);
 
 	if (rte_eal_process_type() == RTE_PROC_SECONDARY) {
+		struct pmd_internals *internals;
 		eth_dev = rte_eth_dev_attach_secondary(name);
 		if (!eth_dev) {
 			PMD_LOG(ERR, "Failed to probe %s", name);
@@ -592,7 +593,8 @@ rte_pmd_null_probe(struct rte_vdev_device *dev)
 		/* TODO: request info from primary to set up Rx and Tx */
 		eth_dev->dev_ops = &ops;
 		eth_dev->device = &dev->device;
-		if (packet_copy) {
+		internals = eth_dev->data->dev_private;
+		if (internals->packet_copy) {
 			eth_dev->rx_pkt_burst = eth_null_copy_rx;
 			eth_dev->tx_pkt_burst = eth_null_copy_tx;
 		} else {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:47.140388686 +0100
+++ 0065-net-null-fix-secondary-burst-function-selection.patch	2020-05-19 14:04:44.224648517 +0100
@@ -1,8 +1,10 @@
-From e2f4b25063d7d06f004d0809c30bb616f5bca61b Mon Sep 17 00:00:00 2001
+From bfc5290bc8e1cb8afab2b8858c28f303e9c9a6ff Mon Sep 17 00:00:00 2001
 From: Ferruh Yigit <ferruh.yigit@intel.com>
 Date: Mon, 2 Mar 2020 17:36:40 +0000
 Subject: [PATCH] net/null: fix secondary burst function selection
 
+[ upstream commit e2f4b25063d7d06f004d0809c30bb616f5bca61b ]
+
 Secondary process uses the primary process device and while setting the
 Rx/Tx functions it uses the device arguments from the secondary process
 instead of the primary ones.
@@ -11,7 +13,6 @@
 functions unintentionally.
 
 Fixes: bccc77a6a74a ("net/null: fix multi-process Rx and Tx")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
 ---

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

* [dpdk-stable] patch 'net/null: remove redundant check' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (63 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/null: fix secondary burst function selection' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/hinic/base: fix PF firmware hot-active problem' " luca.boccassi
                     ` (147 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From f662af80b15299bc08949511afff5a1b30e54e69 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Mon, 2 Mar 2020 17:36:42 +0000
Subject: [PATCH] net/null: remove redundant check

[ upstream commit c21a276bd8f3d4c5210ccd2074f7a87a7d00b3e4 ]

There is no need to check if the argument exist or not,
`rte_kvargs_process` returns success if the argument is not provided at
all.

Fixes: c743e50c475f ("null: new poll mode driver")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/null/rte_eth_null.c | 25 ++++++++++---------------
 1 file changed, 10 insertions(+), 15 deletions(-)

diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c
index 87a29b8535..beedd5f4b2 100644
--- a/drivers/net/null/rte_eth_null.c
+++ b/drivers/net/null/rte_eth_null.c
@@ -610,23 +610,18 @@ rte_pmd_null_probe(struct rte_vdev_device *dev)
 		if (kvlist == NULL)
 			return -1;
 
-		if (rte_kvargs_count(kvlist, ETH_NULL_PACKET_SIZE_ARG) == 1) {
+		ret = rte_kvargs_process(kvlist,
+				ETH_NULL_PACKET_SIZE_ARG,
+				&get_packet_size_arg, &packet_size);
+		if (ret < 0)
+			goto free_kvlist;
 
-			ret = rte_kvargs_process(kvlist,
-					ETH_NULL_PACKET_SIZE_ARG,
-					&get_packet_size_arg, &packet_size);
-			if (ret < 0)
-				goto free_kvlist;
-		}
 
-		if (rte_kvargs_count(kvlist, ETH_NULL_PACKET_COPY_ARG) == 1) {
-
-			ret = rte_kvargs_process(kvlist,
-					ETH_NULL_PACKET_COPY_ARG,
-					&get_packet_copy_arg, &packet_copy);
-			if (ret < 0)
-				goto free_kvlist;
-		}
+		ret = rte_kvargs_process(kvlist,
+				ETH_NULL_PACKET_COPY_ARG,
+				&get_packet_copy_arg, &packet_copy);
+		if (ret < 0)
+			goto free_kvlist;
 	}
 
 	PMD_LOG(INFO, "Configure pmd_null: packet size is %d, "
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:47.175947291 +0100
+++ 0066-net-null-remove-redundant-check.patch	2020-05-19 14:04:44.224648517 +0100
@@ -1,14 +1,15 @@
-From c21a276bd8f3d4c5210ccd2074f7a87a7d00b3e4 Mon Sep 17 00:00:00 2001
+From f662af80b15299bc08949511afff5a1b30e54e69 Mon Sep 17 00:00:00 2001
 From: Ferruh Yigit <ferruh.yigit@intel.com>
 Date: Mon, 2 Mar 2020 17:36:42 +0000
 Subject: [PATCH] net/null: remove redundant check
 
+[ upstream commit c21a276bd8f3d4c5210ccd2074f7a87a7d00b3e4 ]
+
 There is no need to check if the argument exist or not,
 `rte_kvargs_process` returns success if the argument is not provided at
 all.
 
 Fixes: c743e50c475f ("null: new poll mode driver")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
 ---

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

* [dpdk-stable] patch 'net/hinic/base: fix PF firmware hot-active problem' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (64 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/null: remove redundant check' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-20 12:29     ` Wangxiaoyun (Cloud)
  2020-05-19 13:03   ` [dpdk-stable] patch 'vhost/crypto: add missing user protocol flag' " luca.boccassi
                     ` (146 subsequent siblings)
  212 siblings, 1 reply; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Xiaoyun Wang; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 11d98470395eff60937bbdff411b19f6ac00f76f Mon Sep 17 00:00:00 2001
From: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
Date: Fri, 10 Apr 2020 17:21:45 +0800
Subject: [PATCH] net/hinic/base: fix PF firmware hot-active problem

[ upstream commit 036b61d85e4d1c45ac497a367c765ad463d2debf ]

When FW is hotactive which means updating the FW but not needs
to reboot OS, FW returns HINIC_DEV_BUSY_ACTIVE_FW for pf driver
because firmware is being reinitialized, at which point the cmdq
initialization that relies on the fw channel will fail, so driver
should reinit the cmdq when port start.

Fixes: 0194313b2df6 ("net/hinic/base: fix port start during FW hot update")

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
---
 drivers/net/hinic/base/hinic_pmd_cmdq.c  |  7 +++--
 drivers/net/hinic/base/hinic_pmd_hwdev.c |  4 +--
 drivers/net/hinic/base/hinic_pmd_mgmt.c  | 38 +++++++++++++-----------
 drivers/net/hinic/base/hinic_pmd_mgmt.h  |  2 ++
 drivers/net/hinic/base/hinic_pmd_nicio.c |  2 +-
 5 files changed, 31 insertions(+), 22 deletions(-)

diff --git a/drivers/net/hinic/base/hinic_pmd_cmdq.c b/drivers/net/hinic/base/hinic_pmd_cmdq.c
index 685498ec2f..2e98b9c286 100644
--- a/drivers/net/hinic/base/hinic_pmd_cmdq.c
+++ b/drivers/net/hinic/base/hinic_pmd_cmdq.c
@@ -440,9 +440,12 @@ static int hinic_set_cmdq_ctxts(struct hinic_hwdev *hwdev)
 					     cmdq_ctxt, in_size, NULL,
 					     NULL, 0);
 		if (err) {
-			if (err == HINIC_MBOX_PF_BUSY_ACTIVE_FW)
+			if (err == HINIC_MBOX_PF_BUSY_ACTIVE_FW ||
+				err == HINIC_DEV_BUSY_ACTIVE_FW) {
 				cmdqs->status |= HINIC_CMDQ_SET_FAIL;
-			PMD_DRV_LOG(ERR, "Set cmdq ctxt failed");
+				PMD_DRV_LOG(ERR, "PF or VF fw is hot active");
+			}
+			PMD_DRV_LOG(ERR, "Set cmdq ctxt failed, err: %d", err);
 			return -EFAULT;
 		}
 	}
diff --git a/drivers/net/hinic/base/hinic_pmd_hwdev.c b/drivers/net/hinic/base/hinic_pmd_hwdev.c
index cf2a9701f2..fc11ecd7a4 100644
--- a/drivers/net/hinic/base/hinic_pmd_hwdev.c
+++ b/drivers/net/hinic/base/hinic_pmd_hwdev.c
@@ -529,7 +529,7 @@ static int hinic_vf_rx_tx_flush(struct hinic_hwdev *hwdev)
 
 	err = hinic_reinit_cmdq_ctxts(hwdev);
 	if (err)
-		PMD_DRV_LOG(WARNING, "Reinit cmdq failed");
+		PMD_DRV_LOG(WARNING, "Reinit cmdq failed when vf flush");
 
 	return err;
 }
@@ -587,7 +587,7 @@ static int hinic_pf_rx_tx_flush(struct hinic_hwdev *hwdev)
 
 	err = hinic_reinit_cmdq_ctxts(hwdev);
 	if (err)
-		PMD_DRV_LOG(WARNING, "Reinit cmdq failed");
+		PMD_DRV_LOG(WARNING, "Reinit cmdq failed when pf flush");
 
 	return 0;
 }
diff --git a/drivers/net/hinic/base/hinic_pmd_mgmt.c b/drivers/net/hinic/base/hinic_pmd_mgmt.c
index eee50a80d1..ea79c300af 100644
--- a/drivers/net/hinic/base/hinic_pmd_mgmt.c
+++ b/drivers/net/hinic/base/hinic_pmd_mgmt.c
@@ -248,6 +248,19 @@ static void free_msg_buf(struct hinic_msg_pf_to_mgmt *pf_to_mgmt)
 	free_recv_msg(&pf_to_mgmt->recv_msg_from_mgmt);
 }
 
+static int hinic_get_mgmt_channel_status(void *hwdev)
+{
+	struct hinic_hwif *hwif = ((struct hinic_hwdev *)hwdev)->hwif;
+	u32 val;
+
+	if (hinic_func_type((struct hinic_hwdev *)hwdev) == TYPE_VF)
+		return false;
+
+	val = hinic_hwif_read_reg(hwif, HINIC_ICPL_RESERVD_ADDR);
+
+	return HINIC_GET_MGMT_CHANNEL_STATUS(val, MGMT_CHANNEL_STATUS);
+}
+
 /**
  * send_msg_to_mgmt_async - send async message
  * @pf_to_mgmt: PF to MGMT channel
@@ -309,6 +322,14 @@ static int send_msg_to_mgmt_sync(struct hinic_msg_pf_to_mgmt *pf_to_mgmt,
 	u64 header;
 	u16 cmd_size = mgmt_msg_len(msg_len);
 
+	/* If fw is hot active, return failed */
+	if (hinic_get_mgmt_channel_status(pf_to_mgmt->hwdev)) {
+		if (mod == HINIC_MOD_COMM || mod == HINIC_MOD_L2NIC)
+			return HINIC_DEV_BUSY_ACTIVE_FW;
+		else
+			return -EBUSY;
+	}
+
 	if (direction == HINIC_MSG_RESPONSE)
 		prepare_header(pf_to_mgmt, &header, msg_len, mod, ack_type,
 			       direction, cmd, resp_msg_id);
@@ -462,19 +483,6 @@ unlock_sync_msg:
 	return err;
 }
 
-static int hinic_get_mgmt_channel_status(void *hwdev)
-{
-	struct hinic_hwif *hwif = ((struct hinic_hwdev *)hwdev)->hwif;
-	u32 val;
-
-	if (hinic_func_type((struct hinic_hwdev *)hwdev) == TYPE_VF)
-		return false;
-
-	val = hinic_hwif_read_reg(hwif, HINIC_ICPL_RESERVD_ADDR);
-
-	return HINIC_GET_MGMT_CHANNEL_STATUS(val, MGMT_CHANNEL_STATUS);
-}
-
 int hinic_msg_to_mgmt_sync(void *hwdev, enum hinic_mod_type mod, u8 cmd,
 			   void *buf_in, u16 in_size,
 			   void *buf_out, u16 *out_size, u32 timeout)
@@ -484,10 +492,6 @@ int hinic_msg_to_mgmt_sync(void *hwdev, enum hinic_mod_type mod, u8 cmd,
 	if (!hwdev || in_size > HINIC_MSG_TO_MGMT_MAX_LEN)
 		return -EINVAL;
 
-	/* If status is hot upgrading, don't send message to mgmt */
-	if (hinic_get_mgmt_channel_status(hwdev))
-		return -EPERM;
-
 	if (hinic_func_type(hwdev) == TYPE_VF) {
 		rc = hinic_mbox_to_pf(hwdev, mod, cmd, buf_in, in_size,
 					buf_out, out_size, timeout);
diff --git a/drivers/net/hinic/base/hinic_pmd_mgmt.h b/drivers/net/hinic/base/hinic_pmd_mgmt.h
index cc18843bf8..52b319ead4 100644
--- a/drivers/net/hinic/base/hinic_pmd_mgmt.h
+++ b/drivers/net/hinic/base/hinic_pmd_mgmt.h
@@ -34,6 +34,8 @@
 #define HINIC_MSG_HEADER_P2P_IDX_MASK				0xF
 #define HINIC_MSG_HEADER_MSG_ID_MASK				0x3FF
 
+#define HINIC_DEV_BUSY_ACTIVE_FW				0xFE
+
 #define HINIC_MSG_HEADER_GET(val, member)			\
 		(((val) >> HINIC_MSG_HEADER_##member##_SHIFT) & \
 		HINIC_MSG_HEADER_##member##_MASK)
diff --git a/drivers/net/hinic/base/hinic_pmd_nicio.c b/drivers/net/hinic/base/hinic_pmd_nicio.c
index 31a13fbdcf..d3e8f2e74d 100644
--- a/drivers/net/hinic/base/hinic_pmd_nicio.c
+++ b/drivers/net/hinic/base/hinic_pmd_nicio.c
@@ -536,7 +536,7 @@ int hinic_init_qp_ctxts(struct hinic_hwdev *hwdev)
 	if (hwdev->cmdqs->status & HINIC_CMDQ_SET_FAIL) {
 		err = hinic_reinit_cmdq_ctxts(hwdev);
 		if (err) {
-			PMD_DRV_LOG(ERR, "Reinit cmdq context failed, rc: %d\n",
+			PMD_DRV_LOG(ERR, "Reinit cmdq context failed when dev start, err: %d",
 				err);
 			return err;
 		}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:47.211390397 +0100
+++ 0067-net-hinic-base-fix-PF-firmware-hot-active-problem.patch	2020-05-19 14:04:44.224648517 +0100
@@ -1,8 +1,10 @@
-From 036b61d85e4d1c45ac497a367c765ad463d2debf Mon Sep 17 00:00:00 2001
+From 11d98470395eff60937bbdff411b19f6ac00f76f Mon Sep 17 00:00:00 2001
 From: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
 Date: Fri, 10 Apr 2020 17:21:45 +0800
 Subject: [PATCH] net/hinic/base: fix PF firmware hot-active problem
 
+[ upstream commit 036b61d85e4d1c45ac497a367c765ad463d2debf ]
+
 When FW is hotactive which means updating the FW but not needs
 to reboot OS, FW returns HINIC_DEV_BUSY_ACTIVE_FW for pf driver
 because firmware is being reinitialized, at which point the cmdq
@@ -10,17 +12,15 @@
 should reinit the cmdq when port start.
 
 Fixes: 0194313b2df6 ("net/hinic/base: fix port start during FW hot update")
-Cc: stable@dpdk.org
 
 Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
 ---
  drivers/net/hinic/base/hinic_pmd_cmdq.c  |  7 +++--
  drivers/net/hinic/base/hinic_pmd_hwdev.c |  4 +--
- drivers/net/hinic/base/hinic_pmd_mgmt.c  | 40 +++++++++++++-----------
+ drivers/net/hinic/base/hinic_pmd_mgmt.c  | 38 +++++++++++++-----------
  drivers/net/hinic/base/hinic_pmd_mgmt.h  |  2 ++
  drivers/net/hinic/base/hinic_pmd_nicio.c |  2 +-
- drivers/net/hinic/hinic_pmd_ethdev.c     |  7 +----
- 6 files changed, 33 insertions(+), 29 deletions(-)
+ 5 files changed, 31 insertions(+), 22 deletions(-)
 
 diff --git a/drivers/net/hinic/base/hinic_pmd_cmdq.c b/drivers/net/hinic/base/hinic_pmd_cmdq.c
 index 685498ec2f..2e98b9c286 100644
@@ -64,7 +64,7 @@
  	return 0;
  }
 diff --git a/drivers/net/hinic/base/hinic_pmd_mgmt.c b/drivers/net/hinic/base/hinic_pmd_mgmt.c
-index addc9d2db4..06c9b68f16 100644
+index eee50a80d1..ea79c300af 100644
 --- a/drivers/net/hinic/base/hinic_pmd_mgmt.c
 +++ b/drivers/net/hinic/base/hinic_pmd_mgmt.c
 @@ -248,6 +248,19 @@ static void free_msg_buf(struct hinic_msg_pf_to_mgmt *pf_to_mgmt)
@@ -102,15 +102,6 @@
  	if (direction == HINIC_MSG_RESPONSE)
  		prepare_header(pf_to_mgmt, &header, msg_len, mod, ack_type,
  			       direction, cmd, resp_msg_id);
-@@ -449,7 +470,7 @@ hinic_pf_to_mgmt_sync(struct hinic_hwdev *hwdev,
- 			       recv_msg->msg_len);
- 			*out_size = recv_msg->msg_len;
- 		} else {
--			PMD_DRV_LOG(ERR, "Mgmt rsp's msg len: %u overflow.",
-+			PMD_DRV_LOG(ERR, "Mgmt rsp's msg len:%u overflow.",
- 				recv_msg->msg_len);
- 			err = -ERANGE;
- 		}
 @@ -462,19 +483,6 @@ unlock_sync_msg:
  	return err;
  }
@@ -156,43 +147,18 @@
  		(((val) >> HINIC_MSG_HEADER_##member##_SHIFT) & \
  		HINIC_MSG_HEADER_##member##_MASK)
 diff --git a/drivers/net/hinic/base/hinic_pmd_nicio.c b/drivers/net/hinic/base/hinic_pmd_nicio.c
-index fd34b03e3b..60c4e14055 100644
+index 31a13fbdcf..d3e8f2e74d 100644
 --- a/drivers/net/hinic/base/hinic_pmd_nicio.c
 +++ b/drivers/net/hinic/base/hinic_pmd_nicio.c
-@@ -537,7 +537,7 @@ int hinic_init_qp_ctxts(struct hinic_hwdev *hwdev)
+@@ -536,7 +536,7 @@ int hinic_init_qp_ctxts(struct hinic_hwdev *hwdev)
  	if (hwdev->cmdqs->status & HINIC_CMDQ_SET_FAIL) {
  		err = hinic_reinit_cmdq_ctxts(hwdev);
  		if (err) {
--			PMD_DRV_LOG(ERR, "Reinit cmdq context failed, rc: %d",
+-			PMD_DRV_LOG(ERR, "Reinit cmdq context failed, rc: %d\n",
 +			PMD_DRV_LOG(ERR, "Reinit cmdq context failed when dev start, err: %d",
  				err);
  			return err;
  		}
-diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c b/drivers/net/hinic/hinic_pmd_ethdev.c
-index 23724a0228..239a78c036 100644
---- a/drivers/net/hinic/hinic_pmd_ethdev.c
-+++ b/drivers/net/hinic/hinic_pmd_ethdev.c
-@@ -1862,11 +1862,6 @@ static int hinic_flow_ctrl_get(struct rte_eth_dev *dev,
- 	else
- 		fc_conf->mode = RTE_FC_NONE;
- 
--	PMD_DRV_LOG(INFO, "Get pause options, tx: %s, rx: %s, auto: %s\n",
--		nic_pause.tx_pause ? "on" : "off",
--		nic_pause.rx_pause ? "on" : "off",
--		nic_pause.auto_neg ? "on" : "off");
--
- 	return 0;
- }
- 
-@@ -1900,7 +1895,7 @@ static int hinic_flow_ctrl_set(struct rte_eth_dev *dev,
- 	nic_dev->nic_pause.rx_pause = nic_pause.rx_pause;
- 	nic_dev->nic_pause.tx_pause = nic_pause.tx_pause;
- 
--	PMD_DRV_LOG(INFO, "Get pause options, tx: %s, rx: %s, auto: %s\n",
-+	PMD_DRV_LOG(INFO, "Set pause options, tx: %s, rx: %s, auto: %s\n",
- 		nic_pause.tx_pause ? "on" : "off",
- 		nic_pause.rx_pause ? "on" : "off",
- 		nic_pause.auto_neg ? "on" : "off");
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'vhost/crypto: add missing user protocol flag' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (65 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/hinic/base: fix PF firmware hot-active problem' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'vhost: fix packed ring zero-copy' " luca.boccassi
                     ` (145 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Fan Zhang; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From e6247616042c0e01bcff7ee8f95a60c1f3dd4743 Mon Sep 17 00:00:00 2001
From: Fan Zhang <roy.fan.zhang@intel.com>
Date: Wed, 29 Jan 2020 10:19:37 +0000
Subject: [PATCH] vhost/crypto: add missing user protocol flag

[ upstream commit 699a225b3861bd1a02872ed389a317f2d18c8f3a ]

This patch fixes the vhost crypto missed
"VHOST_USER_PROTOCOL_F_CONFIG" flag problem during initialization.
Newer Qemu version requires this feature enabled.

Fixes: 939066d96563 ("vhost/crypto: add public function implementation")

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/rte_vhost.h    | 5 +++++
 lib/librte_vhost/vhost_crypto.c | 3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/lib/librte_vhost/rte_vhost.h b/lib/librte_vhost/rte_vhost.h
index 7b5dc87c2e..ad6e717026 100644
--- a/lib/librte_vhost/rte_vhost.h
+++ b/lib/librte_vhost/rte_vhost.h
@@ -68,6 +68,10 @@ extern "C" {
 #define VHOST_USER_PROTOCOL_F_PAGEFAULT 8
 #endif
 
+#ifndef VHOST_USER_PROTOCOL_F_CONFIG
+#define VHOST_USER_PROTOCOL_F_CONFIG 9
+#endif
+
 #ifndef VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD
 #define VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD 10
 #endif
@@ -85,6 +89,7 @@ extern "C" {
 #define VHOST_USER_F_PROTOCOL_FEATURES	30
 #endif
 
+
 /**
  * Information relating to memory regions including offsets to
  * addresses in QEMUs memory file.
diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c
index 07a4115482..0f9df4059d 100644
--- a/lib/librte_vhost/vhost_crypto.c
+++ b/lib/librte_vhost/vhost_crypto.c
@@ -40,7 +40,8 @@
 		(1 << VIRTIO_RING_F_EVENT_IDX) |			\
 		(1 << VIRTIO_CRYPTO_SERVICE_CIPHER) |			\
 		(1 << VIRTIO_CRYPTO_SERVICE_MAC) |			\
-		(1 << VIRTIO_NET_F_CTRL_VQ))
+		(1 << VIRTIO_NET_F_CTRL_VQ) |				\
+		(1 << VHOST_USER_PROTOCOL_F_CONFIG))
 
 #define IOVA_TO_VVA(t, r, a, l, p)					\
 	((t)(uintptr_t)vhost_iova_to_vva(r->dev, r->vq, a, l, p))
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:47.255549334 +0100
+++ 0068-vhost-crypto-add-missing-user-protocol-flag.patch	2020-05-19 14:04:44.228648590 +0100
@@ -1,14 +1,15 @@
-From 699a225b3861bd1a02872ed389a317f2d18c8f3a Mon Sep 17 00:00:00 2001
+From e6247616042c0e01bcff7ee8f95a60c1f3dd4743 Mon Sep 17 00:00:00 2001
 From: Fan Zhang <roy.fan.zhang@intel.com>
 Date: Wed, 29 Jan 2020 10:19:37 +0000
 Subject: [PATCH] vhost/crypto: add missing user protocol flag
 
+[ upstream commit 699a225b3861bd1a02872ed389a317f2d18c8f3a ]
+
 This patch fixes the vhost crypto missed
 "VHOST_USER_PROTOCOL_F_CONFIG" flag problem during initialization.
 Newer Qemu version requires this feature enabled.
 
 Fixes: 939066d96563 ("vhost/crypto: add public function implementation")
-Cc: stable@dpdk.org
 
 Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
 Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
@@ -18,10 +19,10 @@
  2 files changed, 7 insertions(+), 1 deletion(-)
 
 diff --git a/lib/librte_vhost/rte_vhost.h b/lib/librte_vhost/rte_vhost.h
-index c7b619ae0d..5c72fba797 100644
+index 7b5dc87c2e..ad6e717026 100644
 --- a/lib/librte_vhost/rte_vhost.h
 +++ b/lib/librte_vhost/rte_vhost.h
-@@ -69,6 +69,10 @@ extern "C" {
+@@ -68,6 +68,10 @@ extern "C" {
  #define VHOST_USER_PROTOCOL_F_PAGEFAULT 8
  #endif
  
@@ -32,7 +33,7 @@
  #ifndef VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD
  #define VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD 10
  #endif
-@@ -86,6 +90,7 @@ extern "C" {
+@@ -85,6 +89,7 @@ extern "C" {
  #define VHOST_USER_F_PROTOCOL_FEATURES	30
  #endif
  
@@ -41,7 +42,7 @@
   * Information relating to memory regions including offsets to
   * addresses in QEMUs memory file.
 diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c
-index 68911972b6..2e52ecae87 100644
+index 07a4115482..0f9df4059d 100644
 --- a/lib/librte_vhost/vhost_crypto.c
 +++ b/lib/librte_vhost/vhost_crypto.c
 @@ -40,7 +40,8 @@

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

* [dpdk-stable] patch 'vhost: fix packed ring zero-copy' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (66 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'vhost/crypto: add missing user protocol flag' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/vhost: fix potential memory leak on close' " luca.boccassi
                     ` (144 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Marvin Liu; +Cc: Yinan Wang, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From b35cbd50b952703f1d25743d865d1fa428aeaad9 Mon Sep 17 00:00:00 2001
From: Marvin Liu <yong.liu@intel.com>
Date: Mon, 24 Feb 2020 23:14:19 +0800
Subject: [PATCH] vhost: fix packed ring zero-copy

[ upstream commit 2a0ff4d55445988629e1a00afdf542c5e62387fa ]

Available buffer ID should be stored in the zmbuf in the packed-ring
dequeue path. There's no guarantee that local queue avail index is
equal to buffer ID.

Fixes: d1eafb532268 ("vhost: add packed ring zcopy batch and single dequeue")

Signed-off-by: Marvin Liu <yong.liu@intel.com>
Reported-by: Yinan Wang <yinan.wang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/virtio_net.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index 33f10258cf..3f46f5c517 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -2008,7 +2008,7 @@ virtio_dev_tx_batch_packed_zmbuf(struct virtio_net *dev,
 
 	vhost_for_each_try_unroll(i, 0, PACKED_BATCH_SIZE) {
 		zmbufs[i]->mbuf = pkts[i];
-		zmbufs[i]->desc_idx = avail_idx + i;
+		zmbufs[i]->desc_idx = ids[i];
 		zmbufs[i]->desc_count = 1;
 	}
 
@@ -2049,7 +2049,7 @@ virtio_dev_tx_single_packed_zmbuf(struct virtio_net *dev,
 		return -1;
 	}
 	zmbuf->mbuf = *pkts;
-	zmbuf->desc_idx = vq->last_avail_idx;
+	zmbuf->desc_idx = buf_id;
 	zmbuf->desc_count = desc_count;
 
 	rte_mbuf_refcnt_update(*pkts, 1);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:47.294164299 +0100
+++ 0069-vhost-fix-packed-ring-zero-copy.patch	2020-05-19 14:04:44.228648590 +0100
@@ -1,14 +1,15 @@
-From 2a0ff4d55445988629e1a00afdf542c5e62387fa Mon Sep 17 00:00:00 2001
+From b35cbd50b952703f1d25743d865d1fa428aeaad9 Mon Sep 17 00:00:00 2001
 From: Marvin Liu <yong.liu@intel.com>
 Date: Mon, 24 Feb 2020 23:14:19 +0800
 Subject: [PATCH] vhost: fix packed ring zero-copy
 
+[ upstream commit 2a0ff4d55445988629e1a00afdf542c5e62387fa ]
+
 Available buffer ID should be stored in the zmbuf in the packed-ring
 dequeue path. There's no guarantee that local queue avail index is
 equal to buffer ID.
 
 Fixes: d1eafb532268 ("vhost: add packed ring zcopy batch and single dequeue")
-Cc: stable@dpdk.org
 
 Signed-off-by: Marvin Liu <yong.liu@intel.com>
 Reported-by: Yinan Wang <yinan.wang@intel.com>
@@ -18,10 +19,10 @@
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
-index 37c47c7dc0..2104159047 100644
+index 33f10258cf..3f46f5c517 100644
 --- a/lib/librte_vhost/virtio_net.c
 +++ b/lib/librte_vhost/virtio_net.c
-@@ -2004,7 +2004,7 @@ virtio_dev_tx_batch_packed_zmbuf(struct virtio_net *dev,
+@@ -2008,7 +2008,7 @@ virtio_dev_tx_batch_packed_zmbuf(struct virtio_net *dev,
  
  	vhost_for_each_try_unroll(i, 0, PACKED_BATCH_SIZE) {
  		zmbufs[i]->mbuf = pkts[i];
@@ -30,7 +31,7 @@
  		zmbufs[i]->desc_count = 1;
  	}
  
-@@ -2045,7 +2045,7 @@ virtio_dev_tx_single_packed_zmbuf(struct virtio_net *dev,
+@@ -2049,7 +2049,7 @@ virtio_dev_tx_single_packed_zmbuf(struct virtio_net *dev,
  		return -1;
  	}
  	zmbuf->mbuf = *pkts;

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

* [dpdk-stable] patch 'net/vhost: fix potential memory leak on close' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (67 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'vhost: fix packed ring zero-copy' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/virtio: fix outdated comment' " luca.boccassi
                     ` (143 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Itsuro Oda; +Cc: Xiaolong Ye, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 4f5f084c7fd99f2db1c8cb88c4e97f6bd248e107 Mon Sep 17 00:00:00 2001
From: Itsuro Oda <oda@valinux.co.jp>
Date: Thu, 5 Mar 2020 11:54:50 +0900
Subject: [PATCH] net/vhost: fix potential memory leak on close

[ upstream commit 770fabcd36ec11d64544e86ed7d2dda9f5c64daf ]

If a vhost device is closed before eth_dev_configure is done
to the device, internal resources allocated to the device
would not be freed. This patch fixes it.

Fixes: 3d01b759d267 ("net/vhost: delay driver setup")

Signed-off-by: Itsuro Oda <oda@valinux.co.jp>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
 drivers/net/vhost/rte_eth_vhost.c | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index c5e3fa229a..85f91f0b9d 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -1066,16 +1066,14 @@ eth_dev_close(struct rte_eth_dev *dev)
 
 	eth_dev_stop(dev);
 
-	rte_vhost_driver_unregister(internal->iface_name);
-
 	list = find_internal_resource(internal->iface_name);
-	if (!list)
-		return;
-
-	pthread_mutex_lock(&internal_list_lock);
-	TAILQ_REMOVE(&internal_list, list, next);
-	pthread_mutex_unlock(&internal_list_lock);
-	rte_free(list);
+	if (list) {
+		rte_vhost_driver_unregister(internal->iface_name);
+		pthread_mutex_lock(&internal_list_lock);
+		TAILQ_REMOVE(&internal_list, list, next);
+		pthread_mutex_unlock(&internal_list_lock);
+		rte_free(list);
+	}
 
 	if (dev->data->rx_queues)
 		for (i = 0; i < dev->data->nb_rx_queues; i++)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:47.332697142 +0100
+++ 0070-net-vhost-fix-potential-memory-leak-on-close.patch	2020-05-19 14:04:44.232648662 +0100
@@ -1,14 +1,15 @@
-From 770fabcd36ec11d64544e86ed7d2dda9f5c64daf Mon Sep 17 00:00:00 2001
+From 4f5f084c7fd99f2db1c8cb88c4e97f6bd248e107 Mon Sep 17 00:00:00 2001
 From: Itsuro Oda <oda@valinux.co.jp>
 Date: Thu, 5 Mar 2020 11:54:50 +0900
 Subject: [PATCH] net/vhost: fix potential memory leak on close
 
+[ upstream commit 770fabcd36ec11d64544e86ed7d2dda9f5c64daf ]
+
 If a vhost device is closed before eth_dev_configure is done
 to the device, internal resources allocated to the device
 would not be freed. This patch fixes it.
 
 Fixes: 3d01b759d267 ("net/vhost: delay driver setup")
-Cc: stable@dpdk.org
 
 Signed-off-by: Itsuro Oda <oda@valinux.co.jp>
 Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
@@ -17,10 +18,10 @@
  1 file changed, 7 insertions(+), 9 deletions(-)
 
 diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
-index f44e6bbebe..808e670f13 100644
+index c5e3fa229a..85f91f0b9d 100644
 --- a/drivers/net/vhost/rte_eth_vhost.c
 +++ b/drivers/net/vhost/rte_eth_vhost.c
-@@ -1069,16 +1069,14 @@ eth_dev_close(struct rte_eth_dev *dev)
+@@ -1066,16 +1066,14 @@ eth_dev_close(struct rte_eth_dev *dev)
  
  	eth_dev_stop(dev);
  

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

* [dpdk-stable] patch 'net/virtio: fix outdated comment' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (68 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/vhost: fix potential memory leak on close' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'vhost: remove unused variable' " luca.boccassi
                     ` (142 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Xiaolong Ye; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 871773f3ac2889e365f7483311b3814b9c54ffad Mon Sep 17 00:00:00 2001
From: Xiaolong Ye <xiaolong.ye@intel.com>
Date: Sat, 7 Mar 2020 21:22:34 +0800
Subject: [PATCH] net/virtio: fix outdated comment

[ upstream commit f6ac14f13b040fb44db6ed4ab392865fb6648201 ]

Fix comment that is no more correct as the code evolved.

Fixes: 9470427c88e1 ("net/virtio: do not store PCI device pointer at shared memory")

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/virtio/virtio_ethdev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index f9d0ea70db..35203940a7 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -466,7 +466,7 @@ virtio_init_queue(struct rte_eth_dev *dev, uint16_t vtpci_queue_idx)
 	}
 
 	if (!vtpci_packed_queue(hw) && !rte_is_power_of_2(vq_size)) {
-		PMD_INIT_LOG(ERR, "split virtqueue size is not powerof 2");
+		PMD_INIT_LOG(ERR, "split virtqueue size is not power of 2");
 		return -EINVAL;
 	}
 
@@ -588,8 +588,8 @@ virtio_init_queue(struct rte_eth_dev *dev, uint16_t vtpci_queue_idx)
 		hw->cvq = cvq;
 	}
 
-	/* For virtio_user case (that is when hw->dev is NULL), we use
-	 * virtual address. And we need properly set _offset_, please see
+	/* For virtio_user case (that is when hw->virtio_user_dev is not NULL),
+	 * we use virtual address. And we need properly set _offset_, please see
 	 * VIRTIO_MBUF_DATA_DMA_ADDR in virtqueue.h for more information.
 	 */
 	if (!hw->virtio_user_dev)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:47.371982751 +0100
+++ 0071-net-virtio-fix-outdated-comment.patch	2020-05-19 14:04:44.232648662 +0100
@@ -1,12 +1,13 @@
-From f6ac14f13b040fb44db6ed4ab392865fb6648201 Mon Sep 17 00:00:00 2001
+From 871773f3ac2889e365f7483311b3814b9c54ffad Mon Sep 17 00:00:00 2001
 From: Xiaolong Ye <xiaolong.ye@intel.com>
 Date: Sat, 7 Mar 2020 21:22:34 +0800
 Subject: [PATCH] net/virtio: fix outdated comment
 
+[ upstream commit f6ac14f13b040fb44db6ed4ab392865fb6648201 ]
+
 Fix comment that is no more correct as the code evolved.
 
 Fixes: 9470427c88e1 ("net/virtio: do not store PCI device pointer at shared memory")
-Cc: stable@dpdk.org
 
 Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
 Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

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

* [dpdk-stable] patch 'vhost: remove unused variable' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (69 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/virtio: fix outdated comment' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'vhost: make IOTLB cache name unique among processes' " luca.boccassi
                     ` (141 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Xiaolong Ye; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From c0c67a2dacfa7334e4999dba05a7b48523cbd349 Mon Sep 17 00:00:00 2001
From: Xiaolong Ye <xiaolong.ye@intel.com>
Date: Sat, 7 Mar 2020 21:22:35 +0800
Subject: [PATCH] vhost: remove unused variable

[ upstream commit 96ddd23ae4e2aed9f79203a8ffbf2de86fbdeecb ]

VHOST_FEATURES has been removed in previous refactoring.

Fixes: 0917f9d1f059 ("vhost: use new APIs to handle features")

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/vhost.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
index 9ec5934566..844904ca3b 100644
--- a/lib/librte_vhost/vhost.h
+++ b/lib/librte_vhost/vhost.h
@@ -537,7 +537,6 @@ vhost_log_write_iova(struct virtio_net *dev, struct vhost_virtqueue *vq,
 #define PRINT_PACKET(device, addr, size, header) do {} while (0)
 #endif
 
-extern uint64_t VHOST_FEATURES;
 #define MAX_VHOST_DEVICE	1024
 extern struct virtio_net *vhost_devices[MAX_VHOST_DEVICE];
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:47.410943358 +0100
+++ 0072-vhost-remove-unused-variable.patch	2020-05-19 14:04:44.232648662 +0100
@@ -1,12 +1,13 @@
-From 96ddd23ae4e2aed9f79203a8ffbf2de86fbdeecb Mon Sep 17 00:00:00 2001
+From c0c67a2dacfa7334e4999dba05a7b48523cbd349 Mon Sep 17 00:00:00 2001
 From: Xiaolong Ye <xiaolong.ye@intel.com>
 Date: Sat, 7 Mar 2020 21:22:35 +0800
 Subject: [PATCH] vhost: remove unused variable
 
+[ upstream commit 96ddd23ae4e2aed9f79203a8ffbf2de86fbdeecb ]
+
 VHOST_FEATURES has been removed in previous refactoring.
 
 Fixes: 0917f9d1f059 ("vhost: use new APIs to handle features")
-Cc: stable@dpdk.org
 
 Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
 Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
@@ -15,10 +16,10 @@
  1 file changed, 1 deletion(-)
 
 diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
-index 2087d1400e..507dbf2147 100644
+index 9ec5934566..844904ca3b 100644
 --- a/lib/librte_vhost/vhost.h
 +++ b/lib/librte_vhost/vhost.h
-@@ -543,7 +543,6 @@ extern int vhost_data_log_level;
+@@ -537,7 +537,6 @@ vhost_log_write_iova(struct virtio_net *dev, struct vhost_virtqueue *vq,
  #define PRINT_PACKET(device, addr, size, header) do {} while (0)
  #endif
  

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

* [dpdk-stable] patch 'vhost: make IOTLB cache name unique among processes' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (70 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'vhost: remove unused variable' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/hns3: clear residual flow rules on init' " luca.boccassi
                     ` (140 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Itsuro Oda; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 1ff55a18be5ed03478749327009793522ed88424 Mon Sep 17 00:00:00 2001
From: Itsuro Oda <oda@valinux.co.jp>
Date: Thu, 12 Mar 2020 08:19:18 +0900
Subject: [PATCH] vhost: make IOTLB cache name unique among processes

[ upstream commit 7470f845c17ac27ce08b22f3c024169e51ade990 ]

Currently, iotlb cache name is comprised of vid and virtqueue
index. For example, "iotlb_cache_0_0". Because vid is assigned
per process, iotlb cache name is not unique among multi processes.
For example a secondary process uses a vhost
(ex. eth_vhost0,iface=/tmp/sock0) and another secondary process
uses a vhost (ex. eth_vhost1,iface=/tmp/sock1), iotlb cache
name of both vhost ("iotlb_cache_0_0") are same and as a result
iotlb cache is broken.

This patch makes iotlb cache name unique among milti processes
by adding process id to the iotlb cache name.

The prefix of the name is shortened to "iotlb_" since the maximum
length of pool name is 25 bytes (RTE_MEMPOOL_NAMESIZE is 26).
Note that it is just 25 characters in maximum at the moment.
Here,
* pid_t == int: max 10 digits.
* vid < MAX_VHOST_DECICE(1024): max 4 digits.
* vq_index < VHOST_MAX_VRING(256): max 3 digits.

Fixes: d012d1f293f4 ("vhost: add IOTLB helper functions")

Signed-off-by: Itsuro Oda <oda@valinux.co.jp>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/iotlb.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/librte_vhost/iotlb.c b/lib/librte_vhost/iotlb.c
index 4a1d8c1253..07443a94bc 100644
--- a/lib/librte_vhost/iotlb.c
+++ b/lib/librte_vhost/iotlb.c
@@ -308,8 +308,9 @@ vhost_user_iotlb_init(struct virtio_net *dev, int vq_index)
 	TAILQ_INIT(&vq->iotlb_list);
 	TAILQ_INIT(&vq->iotlb_pending_list);
 
-	snprintf(pool_name, sizeof(pool_name), "iotlb_cache_%d_%d",
-			dev->vid, vq_index);
+	snprintf(pool_name, sizeof(pool_name), "iotlb_%u_%d_%d",
+			getpid(), dev->vid, vq_index);
+	RTE_LOG(DEBUG, VHOST_CONFIG, "IOTLB cache name: %s\n", pool_name);
 
 	/* If already created, free it and recreate */
 	vq->iotlb_pool = rte_mempool_lookup(pool_name);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:47.446189585 +0100
+++ 0073-vhost-make-IOTLB-cache-name-unique-among-processes.patch	2020-05-19 14:04:44.232648662 +0100
@@ -1,8 +1,10 @@
-From 7470f845c17ac27ce08b22f3c024169e51ade990 Mon Sep 17 00:00:00 2001
+From 1ff55a18be5ed03478749327009793522ed88424 Mon Sep 17 00:00:00 2001
 From: Itsuro Oda <oda@valinux.co.jp>
 Date: Thu, 12 Mar 2020 08:19:18 +0900
 Subject: [PATCH] vhost: make IOTLB cache name unique among processes
 
+[ upstream commit 7470f845c17ac27ce08b22f3c024169e51ade990 ]
+
 Currently, iotlb cache name is comprised of vid and virtqueue
 index. For example, "iotlb_cache_0_0". Because vid is assigned
 per process, iotlb cache name is not unique among multi processes.
@@ -24,7 +26,6 @@
 * vq_index < VHOST_MAX_VRING(256): max 3 digits.
 
 Fixes: d012d1f293f4 ("vhost: add IOTLB helper functions")
-Cc: stable@dpdk.org
 
 Signed-off-by: Itsuro Oda <oda@valinux.co.jp>
 Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
@@ -33,7 +34,7 @@
  1 file changed, 3 insertions(+), 2 deletions(-)
 
 diff --git a/lib/librte_vhost/iotlb.c b/lib/librte_vhost/iotlb.c
-index bc17585288..5b3a0c090c 100644
+index 4a1d8c1253..07443a94bc 100644
 --- a/lib/librte_vhost/iotlb.c
 +++ b/lib/librte_vhost/iotlb.c
 @@ -308,8 +308,9 @@ vhost_user_iotlb_init(struct virtio_net *dev, int vq_index)
@@ -44,7 +45,7 @@
 -			dev->vid, vq_index);
 +	snprintf(pool_name, sizeof(pool_name), "iotlb_%u_%d_%d",
 +			getpid(), dev->vid, vq_index);
-+	VHOST_LOG_CONFIG(DEBUG, "IOTLB cache name: %s\n", pool_name);
++	RTE_LOG(DEBUG, VHOST_CONFIG, "IOTLB cache name: %s\n", pool_name);
  
  	/* If already created, free it and recreate */
  	vq->iotlb_pool = rte_mempool_lookup(pool_name);

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

* [dpdk-stable] patch 'net/hns3: clear residual flow rules on init' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (71 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'vhost: make IOTLB cache name unique among processes' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/hns3: add RSS hash offload to capabilities' " luca.boccassi
                     ` (139 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Wei Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 50daf2acc9b7057ba21ac1d21a49c71f2e8cb36e Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 10 Apr 2020 19:09:26 +0800
Subject: [PATCH] net/hns3: clear residual flow rules on init

[ upstream commit 31cdde02f0be730fc1b9b12a8b53f8a04fa423fc ]

This patch fixes that the flow director rules are not cleared during
initialization, which lead to remaining flow director rules after upper
application (such as testpmd) restarted.

Fixes: fcba820d9b9e ("net/hns3: support flow director")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 drivers/net/hns3/hns3_fdir.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/drivers/net/hns3/hns3_fdir.c b/drivers/net/hns3/hns3_fdir.c
index ca3c78e1ce..53c6448cdd 100644
--- a/drivers/net/hns3/hns3_fdir.c
+++ b/drivers/net/hns3/hns3_fdir.c
@@ -772,6 +772,20 @@ static int hns3_config_action(struct hns3_hw *hw, struct hns3_fdir_rule *rule)
 	return hns3_fd_ad_config(hw, ad_data.ad_id, &ad_data);
 }
 
+static int hns3_fd_clear_all_rules(struct hns3_hw *hw, uint32_t rule_num)
+{
+	uint32_t i;
+	int ret;
+
+	for (i = 0; i < rule_num; i++) {
+		ret = hns3_fd_tcam_config(hw, true, i, NULL, false);
+		if (ret)
+			return ret;
+	}
+
+	return 0;
+}
+
 int hns3_fdir_filter_init(struct hns3_adapter *hns)
 {
 	struct hns3_pf *pf = &hns->pf;
@@ -785,6 +799,13 @@ int hns3_fdir_filter_init(struct hns3_adapter *hns)
 		.hash_func = rte_hash_crc,
 		.hash_func_init_val = 0,
 	};
+	int ret;
+
+	ret = hns3_fd_clear_all_rules(&hns->hw, rule_num);
+	if (ret) {
+		PMD_INIT_LOG(ERR, "Clear all fd rules fail! ret = %d", ret);
+		return ret;
+	}
 
 	fdir_hash_params.socket_id = rte_socket_id();
 	TAILQ_INIT(&fdir_info->fdir_list);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:47.482647590 +0100
+++ 0074-net-hns3-clear-residual-flow-rules-on-init.patch	2020-05-19 14:04:44.236648735 +0100
@@ -1,14 +1,15 @@
-From 31cdde02f0be730fc1b9b12a8b53f8a04fa423fc Mon Sep 17 00:00:00 2001
+From 50daf2acc9b7057ba21ac1d21a49c71f2e8cb36e Mon Sep 17 00:00:00 2001
 From: Chengwen Feng <fengchengwen@huawei.com>
 Date: Fri, 10 Apr 2020 19:09:26 +0800
 Subject: [PATCH] net/hns3: clear residual flow rules on init
 
+[ upstream commit 31cdde02f0be730fc1b9b12a8b53f8a04fa423fc ]
+
 This patch fixes that the flow director rules are not cleared during
 initialization, which lead to remaining flow director rules after upper
 application (such as testpmd) restarted.
 
 Fixes: fcba820d9b9e ("net/hns3: support flow director")
-Cc: stable@dpdk.org
 
 Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -17,7 +18,7 @@
  1 file changed, 21 insertions(+)
 
 diff --git a/drivers/net/hns3/hns3_fdir.c b/drivers/net/hns3/hns3_fdir.c
-index a395eb1f83..26c3117580 100644
+index ca3c78e1ce..53c6448cdd 100644
 --- a/drivers/net/hns3/hns3_fdir.c
 +++ b/drivers/net/hns3/hns3_fdir.c
 @@ -772,6 +772,20 @@ static int hns3_config_action(struct hns3_hw *hw, struct hns3_fdir_rule *rule)

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

* [dpdk-stable] patch 'net/hns3: add RSS hash offload to capabilities' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (72 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/hns3: clear residual flow rules on init' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/hns3: fix RSS key length' " luca.boccassi
                     ` (138 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Lijun Ou; +Cc: Wei Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From c4e9d7e10cac163abf637f5748c38de019ded642 Mon Sep 17 00:00:00 2001
From: Lijun Ou <oulijun@huawei.com>
Date: Fri, 10 Apr 2020 19:09:27 +0800
Subject: [PATCH] net/hns3: add RSS hash offload to capabilities

[ upstream commit 2823b082f93c94c5c97fa572b5b84b637e088668 ]

Currently, when upper application calls rte_eth_dev_info_get API
function to query the Rx offload capability based on hns3 network
engine, RSS hash offload capacity is missing.

This patch fixes it by adding the related capacity in the
'.dev_infos_get' ops implementation function named hns3_dev_infos_get
and hns3vf_dev_infos_get for hns3 PF/VF PMD driver.

Fixes: c37ca66f2b27 ("net/hns3: support RSS")

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c    | 3 ++-
 drivers/net/hns3/hns3_ethdev_vf.c | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 42ef33f4b9..0ce5459389 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2209,7 +2209,8 @@ hns3_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
 				 DEV_RX_OFFLOAD_QINQ_STRIP |
 				 DEV_RX_OFFLOAD_VLAN_FILTER |
 				 DEV_RX_OFFLOAD_VLAN_EXTEND |
-				 DEV_RX_OFFLOAD_JUMBO_FRAME);
+				 DEV_RX_OFFLOAD_JUMBO_FRAME |
+				 DEV_RX_OFFLOAD_RSS_HASH);
 	info->tx_queue_offload_capa = DEV_TX_OFFLOAD_MBUF_FAST_FREE;
 	info->tx_offload_capa = (DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM |
 				 DEV_TX_OFFLOAD_IPV4_CKSUM |
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 6f8e909f62..08f5c78015 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -561,7 +561,8 @@ hns3vf_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
 				 DEV_RX_OFFLOAD_VLAN_STRIP |
 				 DEV_RX_OFFLOAD_QINQ_STRIP |
 				 DEV_RX_OFFLOAD_VLAN_FILTER |
-				 DEV_RX_OFFLOAD_JUMBO_FRAME);
+				 DEV_RX_OFFLOAD_JUMBO_FRAME |
+				 DEV_RX_OFFLOAD_RSS_HASH);
 	info->tx_queue_offload_capa = DEV_TX_OFFLOAD_MBUF_FAST_FREE;
 	info->tx_offload_capa = (DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM |
 				 DEV_TX_OFFLOAD_IPV4_CKSUM |
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:47.519947016 +0100
+++ 0075-net-hns3-add-RSS-hash-offload-to-capabilities.patch	2020-05-19 14:04:44.240648808 +0100
@@ -1,8 +1,10 @@
-From 2823b082f93c94c5c97fa572b5b84b637e088668 Mon Sep 17 00:00:00 2001
+From c4e9d7e10cac163abf637f5748c38de019ded642 Mon Sep 17 00:00:00 2001
 From: Lijun Ou <oulijun@huawei.com>
 Date: Fri, 10 Apr 2020 19:09:27 +0800
 Subject: [PATCH] net/hns3: add RSS hash offload to capabilities
 
+[ upstream commit 2823b082f93c94c5c97fa572b5b84b637e088668 ]
+
 Currently, when upper application calls rte_eth_dev_info_get API
 function to query the Rx offload capability based on hns3 network
 engine, RSS hash offload capacity is missing.
@@ -12,7 +14,6 @@
 and hns3vf_dev_infos_get for hns3 PF/VF PMD driver.
 
 Fixes: c37ca66f2b27 ("net/hns3: support RSS")
-Cc: stable@dpdk.org
 
 Signed-off-by: Lijun Ou <oulijun@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -22,10 +23,10 @@
  2 files changed, 4 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
-index 0add73d2f3..0b8fa0e7fc 100644
+index 42ef33f4b9..0ce5459389 100644
 --- a/drivers/net/hns3/hns3_ethdev.c
 +++ b/drivers/net/hns3/hns3_ethdev.c
-@@ -2407,7 +2407,8 @@ hns3_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
+@@ -2209,7 +2209,8 @@ hns3_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
  				 DEV_RX_OFFLOAD_QINQ_STRIP |
  				 DEV_RX_OFFLOAD_VLAN_FILTER |
  				 DEV_RX_OFFLOAD_VLAN_EXTEND |
@@ -36,10 +37,10 @@
  	info->tx_offload_capa = (DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM |
  				 DEV_TX_OFFLOAD_IPV4_CKSUM |
 diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
-index 2964991775..391079b8e1 100644
+index 6f8e909f62..08f5c78015 100644
 --- a/drivers/net/hns3/hns3_ethdev_vf.c
 +++ b/drivers/net/hns3/hns3_ethdev_vf.c
-@@ -908,7 +908,8 @@ hns3vf_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
+@@ -561,7 +561,8 @@ hns3vf_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
  				 DEV_RX_OFFLOAD_VLAN_STRIP |
  				 DEV_RX_OFFLOAD_QINQ_STRIP |
  				 DEV_RX_OFFLOAD_VLAN_FILTER |

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

* [dpdk-stable] patch 'net/hns3: fix RSS key length' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (73 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/hns3: add RSS hash offload to capabilities' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/hns3: fix default VLAN filter configuration for PF' " luca.boccassi
                     ` (137 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Lijun Ou; +Cc: Wei Hu, Chengwen Feng, Chengchang Tang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 0bd1d3b49ce2c0c2c14ce5fb5fefa0c7677c9d7d Mon Sep 17 00:00:00 2001
From: Lijun Ou <oulijun@huawei.com>
Date: Fri, 10 Apr 2020 19:09:28 +0800
Subject: [PATCH] net/hns3: fix RSS key length

[ upstream commit 708e60a4e63c872573e11befa9a073125395343d ]

When upper application calls the rte_eth_dev_rss_hash_conf_get API
function to get the RSS key parameters, the function should return the
RSS key length supported by the device. Otherwise, an error will occur
when the upper application needs to use the RSS key length supported
by this specified hardware for judgment and configure the specified
key into hardware.

For example, in the following scenario:
When users want to use their own RSS key, but the length of the key is
bigger than the one of the supported by hardware.

As a result, users need to get the RSS key length supported by hardware
according to the above API firstly, and then compare the actual obtained
RSS key length with the length of their own RSS key.

If the driver does not return the actual value, error may occur when
user calls the rte_eth_dev_rss_hash_update API function to configure
their own key into hardware.

Besides, this patch fixes the problem of stepping on memory when the RSS
key array configured by users are less than the RSS key length supported
by the driver at the same time.

Fixes: c37ca66f2b27 ("net/hns3: support RSS")

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
---
 drivers/net/hns3/hns3_rss.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c
index 9b6b72908f..ff2da5afd7 100644
--- a/drivers/net/hns3/hns3_rss.c
+++ b/drivers/net/hns3/hns3_rss.c
@@ -322,8 +322,10 @@ hns3_dev_rss_hash_conf_get(struct rte_eth_dev *dev,
 	rss_conf->rss_hf = rss_cfg->conf.types;
 
 	/* Get the RSS Key required by the user */
-	if (rss_conf->rss_key)
+	if (rss_conf->rss_key && rss_conf->rss_key_len >= HNS3_RSS_KEY_SIZE) {
 		memcpy(rss_conf->rss_key, rss_cfg->key, HNS3_RSS_KEY_SIZE);
+		rss_conf->rss_key_len = HNS3_RSS_KEY_SIZE;
+	}
 	rte_spinlock_unlock(&hw->lock);
 
 	return 0;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:47.562523801 +0100
+++ 0076-net-hns3-fix-RSS-key-length.patch	2020-05-19 14:04:44.240648808 +0100
@@ -1,8 +1,10 @@
-From 708e60a4e63c872573e11befa9a073125395343d Mon Sep 17 00:00:00 2001
+From 0bd1d3b49ce2c0c2c14ce5fb5fefa0c7677c9d7d Mon Sep 17 00:00:00 2001
 From: Lijun Ou <oulijun@huawei.com>
 Date: Fri, 10 Apr 2020 19:09:28 +0800
 Subject: [PATCH] net/hns3: fix RSS key length
 
+[ upstream commit 708e60a4e63c872573e11befa9a073125395343d ]
+
 When upper application calls the rte_eth_dev_rss_hash_conf_get API
 function to get the RSS key parameters, the function should return the
 RSS key length supported by the device. Otherwise, an error will occur
@@ -27,7 +29,6 @@
 by the driver at the same time.
 
 Fixes: c37ca66f2b27 ("net/hns3: support RSS")
-Cc: stable@dpdk.org
 
 Signed-off-by: Lijun Ou <oulijun@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -38,10 +39,10 @@
  1 file changed, 3 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c
-index 95a637ddc2..a6cab29c93 100644
+index 9b6b72908f..ff2da5afd7 100644
 --- a/drivers/net/hns3/hns3_rss.c
 +++ b/drivers/net/hns3/hns3_rss.c
-@@ -328,8 +328,10 @@ hns3_dev_rss_hash_conf_get(struct rte_eth_dev *dev,
+@@ -322,8 +322,10 @@ hns3_dev_rss_hash_conf_get(struct rte_eth_dev *dev,
  	rss_conf->rss_hf = rss_cfg->conf.types;
  
  	/* Get the RSS Key required by the user */

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

* [dpdk-stable] patch 'net/hns3: fix default VLAN filter configuration for PF' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (74 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/hns3: fix RSS key length' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/hns3: fix VLAN filter when setting promisucous mode' " luca.boccassi
                     ` (136 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Chengchang Tang; +Cc: Wei Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From c6f7d7594934cd5e12d140be110dc23575f3d919 Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Fri, 10 Apr 2020 19:09:29 +0800
Subject: [PATCH] net/hns3: fix default VLAN filter configuration for PF

[ upstream commit b02e982743211ecac1e8e96399f7088265ad448a ]

Currently, By default VLAN filter is enabled during initialization and
couldn't be turned off based on hns3 PF device. If upper applications
don't call rte_eth_dev_vlan_filter API function to set vlan based on
hns3 PF device, hns3 PF PMD driver will can't receive the packets with
vlan tag.  It will leads to some compatibility issues, the behaviors of
using hns3 network engine and other NICs are different.

This patch disables the VLAN filter during initialization and allows the
upper level applications to enable or disable the VLAN filter.

Fixes: 411d23b9eafb ("net/hns3: support VLAN")

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 65 ++++++++++++++++++++++++++++------
 1 file changed, 55 insertions(+), 10 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 0ce5459389..b6fac3e378 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -550,7 +550,7 @@ hns3_set_vlan_filter_ctrl(struct hns3_hw *hw, uint8_t vlan_type,
 }
 
 static int
-hns3_enable_vlan_filter(struct hns3_adapter *hns, bool enable)
+hns3_vlan_filter_init(struct hns3_adapter *hns)
 {
 	struct hns3_hw *hw = &hns->hw;
 	int ret;
@@ -558,14 +558,29 @@ hns3_enable_vlan_filter(struct hns3_adapter *hns, bool enable)
 	ret = hns3_set_vlan_filter_ctrl(hw, HNS3_FILTER_TYPE_VF,
 					HNS3_FILTER_FE_EGRESS, false, 0);
 	if (ret) {
-		hns3_err(hw, "hns3 enable filter fail, ret =%d", ret);
+		hns3_err(hw, "failed to init vf vlan filter, ret = %d", ret);
 		return ret;
 	}
 
+	ret = hns3_set_vlan_filter_ctrl(hw, HNS3_FILTER_TYPE_PORT,
+					HNS3_FILTER_FE_INGRESS, false, 0);
+	if (ret)
+		hns3_err(hw, "failed to init port vlan filter, ret = %d", ret);
+
+	return ret;
+}
+
+static int
+hns3_enable_vlan_filter(struct hns3_adapter *hns, bool enable)
+{
+	struct hns3_hw *hw = &hns->hw;
+	int ret;
+
 	ret = hns3_set_vlan_filter_ctrl(hw, HNS3_FILTER_TYPE_PORT,
 					HNS3_FILTER_FE_INGRESS, enable, 0);
 	if (ret)
-		hns3_err(hw, "hns3 enable filter fail, ret =%d", ret);
+		hns3_err(hw, "failed to %s port vlan filter, ret = %d",
+			 enable ? "enable" : "disable", ret);
 
 	return ret;
 }
@@ -583,6 +598,20 @@ hns3_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 	rte_spinlock_lock(&hw->lock);
 	rxmode = &dev->data->dev_conf.rxmode;
 	tmp_mask = (unsigned int)mask;
+	if (tmp_mask & ETH_VLAN_FILTER_MASK) {
+		/* Enable or disable VLAN filter */
+		enable = rxmode->offloads & DEV_RX_OFFLOAD_VLAN_FILTER ?
+		    true : false;
+
+		ret = hns3_enable_vlan_filter(hns, enable);
+		if (ret) {
+			rte_spinlock_unlock(&hw->lock);
+			hns3_err(hw, "failed to %s rx filter, ret = %d",
+				 enable ? "enable" : "disable", ret);
+			return ret;
+		}
+	}
+
 	if (tmp_mask & ETH_VLAN_STRIP_MASK) {
 		/* Enable or disable VLAN stripping */
 		enable = rxmode->offloads & DEV_RX_OFFLOAD_VLAN_STRIP ?
@@ -591,7 +620,8 @@ hns3_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 		ret = hns3_en_hw_strip_rxvtag(hns, enable);
 		if (ret) {
 			rte_spinlock_unlock(&hw->lock);
-			hns3_err(hw, "failed to enable rx strip, ret =%d", ret);
+			hns3_err(hw, "failed to %s rx strip, ret = %d",
+				 enable ? "enable" : "disable", ret);
 			return ret;
 		}
 	}
@@ -918,7 +948,7 @@ hns3_init_vlan_config(struct hns3_adapter *hns)
 	if (rte_atomic16_read(&hw->reset.resetting) == 0)
 		init_port_base_vlan_info(hw);
 
-	ret = hns3_enable_vlan_filter(hns, true);
+	ret = hns3_vlan_filter_init(hns);
 	if (ret) {
 		hns3_err(hw, "vlan init fail in pf, ret =%d", ret);
 		return ret;
@@ -960,17 +990,29 @@ hns3_restore_vlan_conf(struct hns3_adapter *hns)
 {
 	struct hns3_pf *pf = &hns->pf;
 	struct hns3_hw *hw = &hns->hw;
+	uint64_t offloads;
+	bool enable;
 	int ret;
 
+	/* restore vlan filter states */
+	offloads = hw->data->dev_conf.rxmode.offloads;
+	enable = offloads & DEV_RX_OFFLOAD_VLAN_FILTER ? true : false;
+	ret = hns3_enable_vlan_filter(hns, enable);
+	if (ret) {
+		hns3_err(hw, "failed to restore vlan rx filter conf, ret = %d",
+			 ret);
+		return ret;
+	}
+
 	ret = hns3_set_vlan_rx_offload_cfg(hns, &pf->vtag_config.rx_vcfg);
 	if (ret) {
-		hns3_err(hw, "hns3 restore vlan rx conf fail, ret =%d", ret);
+		hns3_err(hw, "failed to restore vlan rx conf, ret = %d", ret);
 		return ret;
 	}
 
 	ret = hns3_set_vlan_tx_offload_cfg(hns, &pf->vtag_config.tx_vcfg);
 	if (ret)
-		hns3_err(hw, "hns3 restore vlan tx conf fail, ret =%d", ret);
+		hns3_err(hw, "failed to restore vlan tx conf, ret = %d", ret);
 
 	return ret;
 }
@@ -982,6 +1024,7 @@ hns3_dev_configure_vlan(struct rte_eth_dev *dev)
 	struct rte_eth_dev_data *data = dev->data;
 	struct rte_eth_txmode *txmode;
 	struct hns3_hw *hw = &hns->hw;
+	int mask;
 	int ret;
 
 	txmode = &data->dev_conf.txmode;
@@ -995,9 +1038,11 @@ hns3_dev_configure_vlan(struct rte_eth_dev *dev)
 			  txmode->hw_vlan_reject_untagged);
 
 	/* Apply vlan offload setting */
-	ret = hns3_vlan_offload_set(dev, ETH_VLAN_STRIP_MASK);
+	mask = ETH_VLAN_STRIP_MASK | ETH_VLAN_FILTER_MASK;
+	ret = hns3_vlan_offload_set(dev, mask);
 	if (ret) {
-		hns3_err(hw, "dev config vlan Strip failed, ret =%d", ret);
+		hns3_err(hw, "dev config rx vlan offload failed, ret = %d",
+			 ret);
 		return ret;
 	}
 
@@ -1005,7 +1050,7 @@ hns3_dev_configure_vlan(struct rte_eth_dev *dev)
 	ret = hns3_vlan_pvid_set(dev, txmode->pvid,
 				 txmode->hw_vlan_insert_pvid);
 	if (ret)
-		hns3_err(hw, "dev config vlan pvid(%d) failed, ret =%d",
+		hns3_err(hw, "dev config vlan pvid(%d) failed, ret = %d",
 			 txmode->pvid, ret);
 
 	return ret;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:47.597371394 +0100
+++ 0077-net-hns3-fix-default-VLAN-filter-configuration-for-P.patch	2020-05-19 14:04:44.244648880 +0100
@@ -1,8 +1,10 @@
-From b02e982743211ecac1e8e96399f7088265ad448a Mon Sep 17 00:00:00 2001
+From c6f7d7594934cd5e12d140be110dc23575f3d919 Mon Sep 17 00:00:00 2001
 From: Chengchang Tang <tangchengchang@huawei.com>
 Date: Fri, 10 Apr 2020 19:09:29 +0800
 Subject: [PATCH] net/hns3: fix default VLAN filter configuration for PF
 
+[ upstream commit b02e982743211ecac1e8e96399f7088265ad448a ]
+
 Currently, By default VLAN filter is enabled during initialization and
 couldn't be turned off based on hns3 PF device. If upper applications
 don't call rte_eth_dev_vlan_filter API function to set vlan based on
@@ -14,7 +16,6 @@
 upper level applications to enable or disable the VLAN filter.
 
 Fixes: 411d23b9eafb ("net/hns3: support VLAN")
-Cc: stable@dpdk.org
 
 Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -23,10 +24,10 @@
  1 file changed, 55 insertions(+), 10 deletions(-)
 
 diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
-index 0b8fa0e7fc..bab4312b39 100644
+index 0ce5459389..b6fac3e378 100644
 --- a/drivers/net/hns3/hns3_ethdev.c
 +++ b/drivers/net/hns3/hns3_ethdev.c
-@@ -558,7 +558,7 @@ hns3_set_vlan_filter_ctrl(struct hns3_hw *hw, uint8_t vlan_type,
+@@ -550,7 +550,7 @@ hns3_set_vlan_filter_ctrl(struct hns3_hw *hw, uint8_t vlan_type,
  }
  
  static int
@@ -35,7 +36,7 @@
  {
  	struct hns3_hw *hw = &hns->hw;
  	int ret;
-@@ -566,14 +566,29 @@ hns3_enable_vlan_filter(struct hns3_adapter *hns, bool enable)
+@@ -558,14 +558,29 @@ hns3_enable_vlan_filter(struct hns3_adapter *hns, bool enable)
  	ret = hns3_set_vlan_filter_ctrl(hw, HNS3_FILTER_TYPE_VF,
  					HNS3_FILTER_FE_EGRESS, false, 0);
  	if (ret) {
@@ -67,7 +68,7 @@
  
  	return ret;
  }
-@@ -591,6 +606,20 @@ hns3_vlan_offload_set(struct rte_eth_dev *dev, int mask)
+@@ -583,6 +598,20 @@ hns3_vlan_offload_set(struct rte_eth_dev *dev, int mask)
  	rte_spinlock_lock(&hw->lock);
  	rxmode = &dev->data->dev_conf.rxmode;
  	tmp_mask = (unsigned int)mask;
@@ -88,7 +89,7 @@
  	if (tmp_mask & ETH_VLAN_STRIP_MASK) {
  		/* Enable or disable VLAN stripping */
  		enable = rxmode->offloads & DEV_RX_OFFLOAD_VLAN_STRIP ?
-@@ -599,7 +628,8 @@ hns3_vlan_offload_set(struct rte_eth_dev *dev, int mask)
+@@ -591,7 +620,8 @@ hns3_vlan_offload_set(struct rte_eth_dev *dev, int mask)
  		ret = hns3_en_hw_strip_rxvtag(hns, enable);
  		if (ret) {
  			rte_spinlock_unlock(&hw->lock);
@@ -98,7 +99,7 @@
  			return ret;
  		}
  	}
-@@ -926,7 +956,7 @@ hns3_init_vlan_config(struct hns3_adapter *hns)
+@@ -918,7 +948,7 @@ hns3_init_vlan_config(struct hns3_adapter *hns)
  	if (rte_atomic16_read(&hw->reset.resetting) == 0)
  		init_port_base_vlan_info(hw);
  
@@ -107,7 +108,7 @@
  	if (ret) {
  		hns3_err(hw, "vlan init fail in pf, ret =%d", ret);
  		return ret;
-@@ -968,17 +998,29 @@ hns3_restore_vlan_conf(struct hns3_adapter *hns)
+@@ -960,17 +990,29 @@ hns3_restore_vlan_conf(struct hns3_adapter *hns)
  {
  	struct hns3_pf *pf = &hns->pf;
  	struct hns3_hw *hw = &hns->hw;
@@ -139,7 +140,7 @@
  
  	return ret;
  }
-@@ -990,6 +1032,7 @@ hns3_dev_configure_vlan(struct rte_eth_dev *dev)
+@@ -982,6 +1024,7 @@ hns3_dev_configure_vlan(struct rte_eth_dev *dev)
  	struct rte_eth_dev_data *data = dev->data;
  	struct rte_eth_txmode *txmode;
  	struct hns3_hw *hw = &hns->hw;
@@ -147,7 +148,7 @@
  	int ret;
  
  	txmode = &data->dev_conf.txmode;
-@@ -1003,9 +1046,11 @@ hns3_dev_configure_vlan(struct rte_eth_dev *dev)
+@@ -995,9 +1038,11 @@ hns3_dev_configure_vlan(struct rte_eth_dev *dev)
  			  txmode->hw_vlan_reject_untagged);
  
  	/* Apply vlan offload setting */
@@ -161,7 +162,7 @@
  		return ret;
  	}
  
-@@ -1013,7 +1058,7 @@ hns3_dev_configure_vlan(struct rte_eth_dev *dev)
+@@ -1005,7 +1050,7 @@ hns3_dev_configure_vlan(struct rte_eth_dev *dev)
  	ret = hns3_vlan_pvid_set(dev, txmode->pvid,
  				 txmode->hw_vlan_insert_pvid);
  	if (ret)

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

* [dpdk-stable] patch 'net/hns3: fix VLAN filter when setting promisucous mode' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (75 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/hns3: fix default VLAN filter configuration for PF' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'common/mlx5: fix build with -fno-common' " luca.boccassi
                     ` (135 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Chengchang Tang; +Cc: Wei Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From be0d36b087b7ba1b9342d0c3a12e637245179b4b Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Fri, 10 Apr 2020 19:09:30 +0800
Subject: [PATCH] net/hns3: fix VLAN filter when setting promisucous mode

[ upstream commit 40b5448d045573d4d99c866665cd1a9350390f6c ]

Currently, when upper level application call the API function named
rte_eth_dev_set_vlan_offload to configure the hardware vlan filter
offload and call the rte_eth_promiscuous_enable API to enable
promiscuous mode based on hns3 PF device, driver can't receive the
packets with a vlan tag which has not been added by calling the API
function named rte_eth_dev_vlan_filter.

This patch fixes it by disabling the vlan filter when setting the
promiscuous mode and enabling the vlan filter again after the
promiscuous mode are disabled.

Fixes: 19a3ca4c99cf ("net/hns3: add start/stop and configure operations")

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 119 +++++++++++++++++++++++++--------
 1 file changed, 91 insertions(+), 28 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index b6fac3e378..378774396f 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -599,16 +599,19 @@ hns3_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 	rxmode = &dev->data->dev_conf.rxmode;
 	tmp_mask = (unsigned int)mask;
 	if (tmp_mask & ETH_VLAN_FILTER_MASK) {
-		/* Enable or disable VLAN filter */
-		enable = rxmode->offloads & DEV_RX_OFFLOAD_VLAN_FILTER ?
-		    true : false;
+		/* ignore vlan filter configuration during promiscuous mode */
+		if (!dev->data->promiscuous) {
+			/* Enable or disable VLAN filter */
+			enable = rxmode->offloads & DEV_RX_OFFLOAD_VLAN_FILTER ?
+				 true : false;
 
-		ret = hns3_enable_vlan_filter(hns, enable);
-		if (ret) {
-			rte_spinlock_unlock(&hw->lock);
-			hns3_err(hw, "failed to %s rx filter, ret = %d",
-				 enable ? "enable" : "disable", ret);
-			return ret;
+			ret = hns3_enable_vlan_filter(hns, enable);
+			if (ret) {
+				rte_spinlock_unlock(&hw->lock);
+				hns3_err(hw, "failed to %s rx filter, ret = %d",
+					 enable ? "enable" : "disable", ret);
+				return ret;
+			}
 		}
 	}
 
@@ -994,14 +997,16 @@ hns3_restore_vlan_conf(struct hns3_adapter *hns)
 	bool enable;
 	int ret;
 
-	/* restore vlan filter states */
-	offloads = hw->data->dev_conf.rxmode.offloads;
-	enable = offloads & DEV_RX_OFFLOAD_VLAN_FILTER ? true : false;
-	ret = hns3_enable_vlan_filter(hns, enable);
-	if (ret) {
-		hns3_err(hw, "failed to restore vlan rx filter conf, ret = %d",
-			 ret);
-		return ret;
+	if (!hw->data->promiscuous) {
+		/* restore vlan filter states */
+		offloads = hw->data->dev_conf.rxmode.offloads;
+		enable = offloads & DEV_RX_OFFLOAD_VLAN_FILTER ? true : false;
+		ret = hns3_enable_vlan_filter(hns, enable);
+		if (ret) {
+			hns3_err(hw, "failed to restore vlan rx filter conf, "
+				 "ret = %d", ret);
+			return ret;
+		}
 	}
 
 	ret = hns3_set_vlan_rx_offload_cfg(hns, &pf->vtag_config.rx_vcfg);
@@ -3628,16 +3633,43 @@ hns3_clear_all_vfs_promisc_mode(struct hns3_hw *hw)
 static int
 hns3_dev_promiscuous_enable(struct rte_eth_dev *dev)
 {
+	bool allmulti = dev->data->all_multicast ? true : false;
 	struct hns3_adapter *hns = dev->data->dev_private;
 	struct hns3_hw *hw = &hns->hw;
+	uint64_t offloads;
+	int err;
 	int ret = 0;
 
 	rte_spinlock_lock(&hw->lock);
 	ret = hns3_set_promisc_mode(hw, true, true);
-	rte_spinlock_unlock(&hw->lock);
-	if (ret)
-		hns3_err(hw, "Failed to enable promiscuous mode, ret = %d",
+	if (ret) {
+		rte_spinlock_unlock(&hw->lock);
+		hns3_err(hw, "failed to enable promiscuous mode, ret = %d",
 			 ret);
+		return ret;
+	}
+
+	/*
+	 * When promiscuous mode was enabled, disable the vlan filter to let
+	 * all packets coming in in the receiving direction.
+	 */
+	offloads = dev->data->dev_conf.rxmode.offloads;
+	if (offloads & DEV_RX_OFFLOAD_VLAN_FILTER) {
+		ret = hns3_enable_vlan_filter(hns, false);
+		if (ret) {
+			hns3_err(hw, "failed to enable promiscuous mode due to "
+				     "failure to disable vlan filter, ret = %d",
+				 ret);
+			err = hns3_set_promisc_mode(hw, false, allmulti);
+			if (err)
+				hns3_err(hw, "failed to restore promiscuous "
+					 "status after disable vlan filter "
+					 "failed during enabling promiscuous "
+					 "mode, ret = %d", ret);
+		}
+	}
+
+	rte_spinlock_unlock(&hw->lock);
 
 	return ret;
 }
@@ -3648,15 +3680,36 @@ hns3_dev_promiscuous_disable(struct rte_eth_dev *dev)
 	bool allmulti = dev->data->all_multicast ? true : false;
 	struct hns3_adapter *hns = dev->data->dev_private;
 	struct hns3_hw *hw = &hns->hw;
+	uint64_t offloads;
+	int err;
 	int ret = 0;
 
 	/* If now in all_multicast mode, must remain in all_multicast mode. */
 	rte_spinlock_lock(&hw->lock);
 	ret = hns3_set_promisc_mode(hw, false, allmulti);
-	rte_spinlock_unlock(&hw->lock);
-	if (ret)
-		hns3_err(hw, "Failed to disable promiscuous mode, ret = %d",
+	if (ret) {
+		rte_spinlock_unlock(&hw->lock);
+		hns3_err(hw, "failed to disable promiscuous mode, ret = %d",
 			 ret);
+		return ret;
+	}
+	/* when promiscuous mode was disabled, restore the vlan filter status */
+	offloads = dev->data->dev_conf.rxmode.offloads;
+	if (offloads & DEV_RX_OFFLOAD_VLAN_FILTER) {
+		ret = hns3_enable_vlan_filter(hns, true);
+		if (ret) {
+			hns3_err(hw, "failed to disable promiscuous mode due to"
+				 " failure to restore vlan filter, ret = %d",
+				 ret);
+			err = hns3_set_promisc_mode(hw, true, true);
+			if (err)
+				hns3_err(hw, "failed to restore promiscuous "
+					 "status after enabling vlan filter "
+					 "failed during disabling promiscuous "
+					 "mode, ret = %d", ret);
+		}
+	}
+	rte_spinlock_unlock(&hw->lock);
 
 	return ret;
 }
@@ -3675,7 +3728,7 @@ hns3_dev_allmulticast_enable(struct rte_eth_dev *dev)
 	ret = hns3_set_promisc_mode(hw, false, true);
 	rte_spinlock_unlock(&hw->lock);
 	if (ret)
-		hns3_err(hw, "Failed to enable allmulticast mode, ret = %d",
+		hns3_err(hw, "failed to enable allmulticast mode, ret = %d",
 			 ret);
 
 	return ret;
@@ -3696,7 +3749,7 @@ hns3_dev_allmulticast_disable(struct rte_eth_dev *dev)
 	ret = hns3_set_promisc_mode(hw, false, false);
 	rte_spinlock_unlock(&hw->lock);
 	if (ret)
-		hns3_err(hw, "Failed to disable allmulticast mode, ret =  %d",
+		hns3_err(hw, "failed to disable allmulticast mode, ret = %d",
 			 ret);
 
 	return ret;
@@ -3707,11 +3760,21 @@ hns3_dev_promisc_restore(struct hns3_adapter *hns)
 {
 	struct hns3_hw *hw = &hns->hw;
 	bool allmulti = hw->data->all_multicast ? true : false;
+	int ret;
 
-	if (hw->data->promiscuous)
-		return hns3_set_promisc_mode(hw, true, true);
+	if (hw->data->promiscuous) {
+		ret = hns3_set_promisc_mode(hw, true, true);
+		if (ret)
+			hns3_err(hw, "failed to restore promiscuous mode, "
+				 "ret = %d", ret);
+		return ret;
+	}
 
-	return hns3_set_promisc_mode(hw, false, allmulti);
+	ret = hns3_set_promisc_mode(hw, false, allmulti);
+	if (ret)
+		hns3_err(hw, "failed to restore allmulticast mode, ret = %d",
+			 ret);
+	return ret;
 }
 
 static int
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:47.640519973 +0100
+++ 0078-net-hns3-fix-VLAN-filter-when-setting-promisucous-mo.patch	2020-05-19 14:04:44.248648953 +0100
@@ -1,8 +1,10 @@
-From 40b5448d045573d4d99c866665cd1a9350390f6c Mon Sep 17 00:00:00 2001
+From be0d36b087b7ba1b9342d0c3a12e637245179b4b Mon Sep 17 00:00:00 2001
 From: Chengchang Tang <tangchengchang@huawei.com>
 Date: Fri, 10 Apr 2020 19:09:30 +0800
 Subject: [PATCH] net/hns3: fix VLAN filter when setting promisucous mode
 
+[ upstream commit 40b5448d045573d4d99c866665cd1a9350390f6c ]
+
 Currently, when upper level application call the API function named
 rte_eth_dev_set_vlan_offload to configure the hardware vlan filter
 offload and call the rte_eth_promiscuous_enable API to enable
@@ -15,7 +17,6 @@
 promiscuous mode are disabled.
 
 Fixes: 19a3ca4c99cf ("net/hns3: add start/stop and configure operations")
-Cc: stable@dpdk.org
 
 Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -24,10 +25,10 @@
  1 file changed, 91 insertions(+), 28 deletions(-)
 
 diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
-index bab4312b39..3e3a8c5f4e 100644
+index b6fac3e378..378774396f 100644
 --- a/drivers/net/hns3/hns3_ethdev.c
 +++ b/drivers/net/hns3/hns3_ethdev.c
-@@ -607,16 +607,19 @@ hns3_vlan_offload_set(struct rte_eth_dev *dev, int mask)
+@@ -599,16 +599,19 @@ hns3_vlan_offload_set(struct rte_eth_dev *dev, int mask)
  	rxmode = &dev->data->dev_conf.rxmode;
  	tmp_mask = (unsigned int)mask;
  	if (tmp_mask & ETH_VLAN_FILTER_MASK) {
@@ -56,7 +57,7 @@
  		}
  	}
  
-@@ -1002,14 +1005,16 @@ hns3_restore_vlan_conf(struct hns3_adapter *hns)
+@@ -994,14 +997,16 @@ hns3_restore_vlan_conf(struct hns3_adapter *hns)
  	bool enable;
  	int ret;
  
@@ -81,7 +82,7 @@
  	}
  
  	ret = hns3_set_vlan_rx_offload_cfg(hns, &pf->vtag_config.rx_vcfg);
-@@ -3830,16 +3835,43 @@ hns3_clear_all_vfs_promisc_mode(struct hns3_hw *hw)
+@@ -3628,16 +3633,43 @@ hns3_clear_all_vfs_promisc_mode(struct hns3_hw *hw)
  static int
  hns3_dev_promiscuous_enable(struct rte_eth_dev *dev)
  {
@@ -90,7 +91,7 @@
  	struct hns3_hw *hw = &hns->hw;
 +	uint64_t offloads;
 +	int err;
- 	int ret;
+ 	int ret = 0;
  
  	rte_spinlock_lock(&hw->lock);
  	ret = hns3_set_promisc_mode(hw, true, true);
@@ -128,13 +129,13 @@
  
  	return ret;
  }
-@@ -3850,15 +3882,36 @@ hns3_dev_promiscuous_disable(struct rte_eth_dev *dev)
+@@ -3648,15 +3680,36 @@ hns3_dev_promiscuous_disable(struct rte_eth_dev *dev)
  	bool allmulti = dev->data->all_multicast ? true : false;
  	struct hns3_adapter *hns = dev->data->dev_private;
  	struct hns3_hw *hw = &hns->hw;
 +	uint64_t offloads;
 +	int err;
- 	int ret;
+ 	int ret = 0;
  
  	/* If now in all_multicast mode, must remain in all_multicast mode. */
  	rte_spinlock_lock(&hw->lock);
@@ -168,7 +169,7 @@
  
  	return ret;
  }
-@@ -3877,7 +3930,7 @@ hns3_dev_allmulticast_enable(struct rte_eth_dev *dev)
+@@ -3675,7 +3728,7 @@ hns3_dev_allmulticast_enable(struct rte_eth_dev *dev)
  	ret = hns3_set_promisc_mode(hw, false, true);
  	rte_spinlock_unlock(&hw->lock);
  	if (ret)
@@ -177,7 +178,7 @@
  			 ret);
  
  	return ret;
-@@ -3898,7 +3951,7 @@ hns3_dev_allmulticast_disable(struct rte_eth_dev *dev)
+@@ -3696,7 +3749,7 @@ hns3_dev_allmulticast_disable(struct rte_eth_dev *dev)
  	ret = hns3_set_promisc_mode(hw, false, false);
  	rte_spinlock_unlock(&hw->lock);
  	if (ret)
@@ -186,7 +187,7 @@
  			 ret);
  
  	return ret;
-@@ -3909,11 +3962,21 @@ hns3_dev_promisc_restore(struct hns3_adapter *hns)
+@@ -3707,11 +3760,21 @@ hns3_dev_promisc_restore(struct hns3_adapter *hns)
  {
  	struct hns3_hw *hw = &hns->hw;
  	bool allmulti = hw->data->all_multicast ? true : false;

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

* [dpdk-stable] patch 'common/mlx5: fix build with -fno-common' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (76 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/hns3: fix VLAN filter when setting promisucous mode' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/mlx4: " luca.boccassi
                     ` (134 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From b3e01cd3e46fde2a6872b5b058890ac403701504 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Wed, 8 Apr 2020 02:08:59 +0200
Subject: [PATCH] common/mlx5: fix build with -fno-common

[ upstream commit 2889d38256906a5cbff717e7e524ec645c89c794 ]

The variable storages of the same name are merged together
if compiled with -fcommon. This is the default.
This default behaviour allows to declare a variable in a header file and
share the variable in every .o binaries thanks to merge at link-time.

In the case of dlopen linking of the glue library, the pointer mlx5_glue
is referencing the glue functions struct and is set after calling
dlopen.

If compiling with -fno-common (default in GCC 10), the variable must be
declared as extern to avoid multiple re-definitions.
In case the glue layer is split in glue library, the variable mlx5_glue
needs to have its own storage for the rest of the PMD.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx5/mlx5_glue.c | 4 ++++
 drivers/net/mlx5/mlx5_glue.h | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_glue.c b/drivers/net/mlx5/mlx5_glue.c
index 0917bf28d6..c5880dd6f2 100644
--- a/drivers/net/mlx5/mlx5_glue.c
+++ b/drivers/net/mlx5/mlx5_glue.c
@@ -30,6 +30,10 @@
 #include "mlx5_autoconf.h"
 #include "mlx5_glue.h"
 
+#ifdef MLX5_GLUE
+const struct mlx5_glue *mlx5_glue;
+#endif
+
 static int
 mlx5_glue_fork_init(void)
 {
diff --git a/drivers/net/mlx5/mlx5_glue.h b/drivers/net/mlx5/mlx5_glue.h
index 6442f1eba8..4e6465523a 100644
--- a/drivers/net/mlx5/mlx5_glue.h
+++ b/drivers/net/mlx5/mlx5_glue.h
@@ -258,6 +258,6 @@ struct mlx5_glue {
 			       struct mlx5dv_devx_port *mlx5_devx_port);
 };
 
-const struct mlx5_glue *mlx5_glue;
+extern const struct mlx5_glue *mlx5_glue;
 
 #endif /* MLX5_GLUE_H_ */
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:47.681096737 +0100
+++ 0079-common-mlx5-fix-build-with-fno-common.patch	2020-05-19 14:04:44.248648953 +0100
@@ -1,8 +1,10 @@
-From 2889d38256906a5cbff717e7e524ec645c89c794 Mon Sep 17 00:00:00 2001
+From b3e01cd3e46fde2a6872b5b058890ac403701504 Mon Sep 17 00:00:00 2001
 From: Thomas Monjalon <thomas@monjalon.net>
 Date: Wed, 8 Apr 2020 02:08:59 +0200
 Subject: [PATCH] common/mlx5: fix build with -fno-common
 
+[ upstream commit 2889d38256906a5cbff717e7e524ec645c89c794 ]
+
 The variable storages of the same name are merged together
 if compiled with -fcommon. This is the default.
 This default behaviour allows to declare a variable in a header file and
@@ -17,35 +19,34 @@
 In case the glue layer is split in glue library, the variable mlx5_glue
 needs to have its own storage for the rest of the PMD.
 
-Cc: stable@dpdk.org
-
 Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
 Acked-by: Matan Azrad <matan@mellanox.com>
 ---
- drivers/common/mlx5/mlx5_common.c | 3 +++
- drivers/common/mlx5/mlx5_glue.h   | 2 +-
- 2 files changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/drivers/common/mlx5/mlx5_common.c b/drivers/common/mlx5/mlx5_common.c
-index d8c01a5d14..42610459f7 100644
---- a/drivers/common/mlx5/mlx5_common.c
-+++ b/drivers/common/mlx5/mlx5_common.c
-@@ -18,6 +18,9 @@
- 
- int mlx5_common_logtype;
+ drivers/net/mlx5/mlx5_glue.c | 4 ++++
+ drivers/net/mlx5/mlx5_glue.h | 2 +-
+ 2 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/net/mlx5/mlx5_glue.c b/drivers/net/mlx5/mlx5_glue.c
+index 0917bf28d6..c5880dd6f2 100644
+--- a/drivers/net/mlx5/mlx5_glue.c
++++ b/drivers/net/mlx5/mlx5_glue.c
+@@ -30,6 +30,10 @@
+ #include "mlx5_autoconf.h"
+ #include "mlx5_glue.h"
  
 +#ifdef MLX5_GLUE
 +const struct mlx5_glue *mlx5_glue;
 +#endif
- 
- /**
-  * Get PCI information by sysfs device path.
-diff --git a/drivers/common/mlx5/mlx5_glue.h b/drivers/common/mlx5/mlx5_glue.h
-index cd1136f382..184c41071e 100644
---- a/drivers/common/mlx5/mlx5_glue.h
-+++ b/drivers/common/mlx5/mlx5_glue.h
-@@ -304,6 +304,6 @@ struct mlx5_glue {
- 			 size_t event_resp_len);
++
+ static int
+ mlx5_glue_fork_init(void)
+ {
+diff --git a/drivers/net/mlx5/mlx5_glue.h b/drivers/net/mlx5/mlx5_glue.h
+index 6442f1eba8..4e6465523a 100644
+--- a/drivers/net/mlx5/mlx5_glue.h
++++ b/drivers/net/mlx5/mlx5_glue.h
+@@ -258,6 +258,6 @@ struct mlx5_glue {
+ 			       struct mlx5dv_devx_port *mlx5_devx_port);
  };
  
 -const struct mlx5_glue *mlx5_glue;

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

* [dpdk-stable] patch 'net/mlx4: fix build with -fno-common' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (77 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'common/mlx5: fix build with -fno-common' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/mlx5: use open/read/close for ib stats query' " luca.boccassi
                     ` (133 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 624db5a0ab8e9cddd0f2322bb2c840e71f2e780e Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Wed, 8 Apr 2020 02:09:00 +0200
Subject: [PATCH] net/mlx4: fix build with -fno-common

[ upstream commit a5e5af7f20b4106b68eeedf83daada0371b83918 ]

The variable storages of the same name are merged together
if compiled with -fcommon. This is the default.
This default behaviour allows to declare a variable in a header file and
share the variable in every .o binaries thanks to merge at link-time.

In the case of dlopen linking of the glue library, the pointer mlx4_glue
is referencing the glue functions struct and is set after calling
dlopen.

If compiling with -fno-common (default in GCC 10), the variables must be
declared as extern to avoid multiple re-definitions.
In case the glue layer is split in glue library, the variable mlx4_glue
needs to have its own storage for the rest of the PMD.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx4/mlx4.c      | 4 ++++
 drivers/net/mlx4/mlx4_glue.h | 2 +-
 drivers/net/mlx4/mlx4_rxtx.h | 2 +-
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index ab5e6c66cb..7771417ebe 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -49,6 +49,10 @@
 #include "mlx4_rxtx.h"
 #include "mlx4_utils.h"
 
+#ifdef MLX4_GLUE
+const struct mlx4_glue *mlx4_glue;
+#endif
+
 static const char *MZ_MLX4_PMD_SHARED_DATA = "mlx4_pmd_shared_data";
 
 /* Shared memory between primary and secondary processes. */
diff --git a/drivers/net/mlx4/mlx4_glue.h b/drivers/net/mlx4/mlx4_glue.h
index 668ca86700..5d9e985495 100644
--- a/drivers/net/mlx4/mlx4_glue.h
+++ b/drivers/net/mlx4/mlx4_glue.h
@@ -84,6 +84,6 @@ struct mlx4_glue {
 				   void *attr);
 };
 
-const struct mlx4_glue *mlx4_glue;
+extern const struct mlx4_glue *mlx4_glue;
 
 #endif /* MLX4_GLUE_H_ */
diff --git a/drivers/net/mlx4/mlx4_rxtx.h b/drivers/net/mlx4/mlx4_rxtx.h
index 8baf33fa94..9de6c59411 100644
--- a/drivers/net/mlx4/mlx4_rxtx.h
+++ b/drivers/net/mlx4/mlx4_rxtx.h
@@ -124,7 +124,7 @@ struct txq {
 
 /* mlx4_rxq.c */
 
-uint8_t mlx4_rss_hash_key_default[MLX4_RSS_HASH_KEY_SIZE];
+extern uint8_t mlx4_rss_hash_key_default[MLX4_RSS_HASH_KEY_SIZE];
 int mlx4_rss_init(struct mlx4_priv *priv);
 void mlx4_rss_deinit(struct mlx4_priv *priv);
 struct mlx4_rss *mlx4_rss_get(struct mlx4_priv *priv, uint64_t fields,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:47.718686898 +0100
+++ 0080-net-mlx4-fix-build-with-fno-common.patch	2020-05-19 14:04:44.248648953 +0100
@@ -1,8 +1,10 @@
-From a5e5af7f20b4106b68eeedf83daada0371b83918 Mon Sep 17 00:00:00 2001
+From 624db5a0ab8e9cddd0f2322bb2c840e71f2e780e Mon Sep 17 00:00:00 2001
 From: Thomas Monjalon <thomas@monjalon.net>
 Date: Wed, 8 Apr 2020 02:09:00 +0200
 Subject: [PATCH] net/mlx4: fix build with -fno-common
 
+[ upstream commit a5e5af7f20b4106b68eeedf83daada0371b83918 ]
+
 The variable storages of the same name are merged together
 if compiled with -fcommon. This is the default.
 This default behaviour allows to declare a variable in a header file and
@@ -17,8 +19,6 @@
 In case the glue layer is split in glue library, the variable mlx4_glue
 needs to have its own storage for the rest of the PMD.
 
-Cc: stable@dpdk.org
-
 Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
 Acked-by: Matan Azrad <matan@mellanox.com>
 ---
@@ -28,7 +28,7 @@
  3 files changed, 6 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
-index 8e298788af..5d7202720b 100644
+index ab5e6c66cb..7771417ebe 100644
 --- a/drivers/net/mlx4/mlx4.c
 +++ b/drivers/net/mlx4/mlx4.c
 @@ -49,6 +49,10 @@

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

* [dpdk-stable] patch 'net/mlx5: use open/read/close for ib stats query' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (78 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/mlx4: " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/octeontx2: enable error and RAS interrupt in configure' " luca.boccassi
                     ` (132 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Mohsin Shaikh; +Cc: Alexander Kozyrev, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From fd2f1973f408d51e47a1a3cbd38f0e661b15b59d Mon Sep 17 00:00:00 2001
From: Mohsin Shaikh <mohsinshaikh@niometrics.com>
Date: Fri, 10 Apr 2020 04:37:06 +0800
Subject: [PATCH] net/mlx5: use open/read/close for ib stats query

[ upstream commit 00437823cb80b8fa87dbe61becc07bd42ee98549 ]

fgets(3)/fread(3)/fscanf(3) etc. use mmap(2)/munmap(2) which leads
to TLB shutdown interrupts to all DPDK app cores including RX cores.
This can cause packet drops. Use read(2)/write(2) instead.

Bugzilla ID: 440

Signed-off-by: Mohsin Shaikh <mohsinshaikh@niometrics.com>
Reviewed-by: Alexander Kozyrev <akozyrev@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
 drivers/net/mlx5/mlx5_stats.c | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_stats.c b/drivers/net/mlx5/mlx5_stats.c
index d60a633e15..636fc80c7c 100644
--- a/drivers/net/mlx5/mlx5_stats.c
+++ b/drivers/net/mlx5/mlx5_stats.c
@@ -3,11 +3,13 @@
  * Copyright 2015 Mellanox Technologies, Ltd
  */
 
+#include <fcntl.h>
 #include <inttypes.h>
 #include <linux/sockios.h>
 #include <linux/ethtool.h>
 #include <stdint.h>
 #include <stdio.h>
+#include <unistd.h>
 
 #include <rte_ethdev_driver.h>
 #include <rte_common.h>
@@ -139,20 +141,23 @@ static const unsigned int xstats_n = RTE_DIM(mlx5_counters_init);
 static inline int
 mlx5_read_ib_stat(struct mlx5_priv *priv, const char *ctr_name, uint64_t *stat)
 {
-	FILE *file;
+	int fd;
+
 	if (priv->sh) {
 		MKSTR(path, "%s/ports/%d/hw_counters/%s",
 			  priv->sh->ibdev_path,
 			  priv->ibv_port,
 			  ctr_name);
+		fd = open(path, O_RDONLY);
+		if (fd != -1) {
+			char buf[21] = {'\0'};
+			ssize_t n = read(fd, buf, sizeof(buf));
 
-		file = fopen(path, "rb");
-		if (file) {
-			int n = fscanf(file, "%" SCNu64, stat);
-
-			fclose(file);
-			if (n == 1)
+			close(fd);
+			if (n != -1) {
+				*stat = strtoull(buf, NULL, 10);
 				return 0;
+			}
 		}
 	}
 	*stat = 0;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:47.755394437 +0100
+++ 0081-net-mlx5-use-open-read-close-for-ib-stats-query.patch	2020-05-19 14:04:44.248648953 +0100
@@ -1,14 +1,15 @@
-From 00437823cb80b8fa87dbe61becc07bd42ee98549 Mon Sep 17 00:00:00 2001
+From fd2f1973f408d51e47a1a3cbd38f0e661b15b59d Mon Sep 17 00:00:00 2001
 From: Mohsin Shaikh <mohsinshaikh@niometrics.com>
 Date: Fri, 10 Apr 2020 04:37:06 +0800
 Subject: [PATCH] net/mlx5: use open/read/close for ib stats query
 
+[ upstream commit 00437823cb80b8fa87dbe61becc07bd42ee98549 ]
+
 fgets(3)/fread(3)/fscanf(3) etc. use mmap(2)/munmap(2) which leads
 to TLB shutdown interrupts to all DPDK app cores including RX cores.
 This can cause packet drops. Use read(2)/write(2) instead.
 
 Bugzilla ID: 440
-Cc: stable@dpdk.org
 
 Signed-off-by: Mohsin Shaikh <mohsinshaikh@niometrics.com>
 Reviewed-by: Alexander Kozyrev <akozyrev@mellanox.com>
@@ -18,7 +19,7 @@
  1 file changed, 12 insertions(+), 7 deletions(-)
 
 diff --git a/drivers/net/mlx5/mlx5_stats.c b/drivers/net/mlx5/mlx5_stats.c
-index 5bc6fa6aa1..b4ca6922a4 100644
+index d60a633e15..636fc80c7c 100644
 --- a/drivers/net/mlx5/mlx5_stats.c
 +++ b/drivers/net/mlx5/mlx5_stats.c
 @@ -3,11 +3,13 @@
@@ -35,7 +36,7 @@
  
  #include <rte_ethdev_driver.h>
  #include <rte_common.h>
-@@ -142,20 +144,23 @@ static const unsigned int xstats_n = RTE_DIM(mlx5_counters_init);
+@@ -139,20 +141,23 @@ static const unsigned int xstats_n = RTE_DIM(mlx5_counters_init);
  static inline int
  mlx5_read_ib_stat(struct mlx5_priv *priv, const char *ctr_name, uint64_t *stat)
  {

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

* [dpdk-stable] patch 'net/octeontx2: enable error and RAS interrupt in configure' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (79 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/mlx5: use open/read/close for ib stats query' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/octeontx2: disable unnecessary error interrupts' " luca.boccassi
                     ` (131 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Vamsi Attunuru; +Cc: Andrzej Ostruszka, Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 6075a1ee65707ee110f4bcab890e7e9ea8d8df6e Mon Sep 17 00:00:00 2001
From: Vamsi Attunuru <vattunuru@marvell.com>
Date: Fri, 3 Apr 2020 07:50:16 +0530
Subject: [PATCH] net/octeontx2: enable error and RAS interrupt in configure

[ upstream commit fdbdf2721c56f49290a45d801b6ac13568a6735b ]

Patch adds routines to set/clear nix lf error & ras interrupt enable
registers. These nix lf error interrupts get triggered if there are
any failures during nix lf configuration. This interrupts are enabled
before any hardware configurations initiated on the allocated nix lf.

Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Acked-by: Andrzej Ostruszka <aostruszka@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 drivers/net/octeontx2/otx2_ethdev.c     |  3 +++
 drivers/net/octeontx2/otx2_ethdev.h     |  2 ++
 drivers/net/octeontx2/otx2_ethdev_irq.c | 35 ++++++++++++++++++++-----
 3 files changed, 34 insertions(+), 6 deletions(-)

diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c
index e450a5ae01..f3281df9c4 100644
--- a/drivers/net/octeontx2/otx2_ethdev.c
+++ b/drivers/net/octeontx2/otx2_ethdev.c
@@ -1650,6 +1650,9 @@ otx2_nix_configure(struct rte_eth_dev *eth_dev)
 		goto fail_offloads;
 	}
 
+	otx2_nix_err_intr_enb_dis(eth_dev, true);
+	otx2_nix_ras_intr_enb_dis(eth_dev, true);
+
 	if (dev->ptp_en &&
 	    dev->npc_flow.switch_header_type == OTX2_PRIV_FLAGS_HIGIG) {
 		otx2_err("Both PTP and switch header enabled");
diff --git a/drivers/net/octeontx2/otx2_ethdev.h b/drivers/net/octeontx2/otx2_ethdev.h
index fdc79633e4..864356e36c 100644
--- a/drivers/net/octeontx2/otx2_ethdev.h
+++ b/drivers/net/octeontx2/otx2_ethdev.h
@@ -439,6 +439,8 @@ int oxt2_nix_register_cq_irqs(struct rte_eth_dev *eth_dev);
 void otx2_nix_unregister_irqs(struct rte_eth_dev *eth_dev);
 void oxt2_nix_unregister_queue_irqs(struct rte_eth_dev *eth_dev);
 void oxt2_nix_unregister_cq_irqs(struct rte_eth_dev *eth_dev);
+void otx2_nix_err_intr_enb_dis(struct rte_eth_dev *eth_dev, bool enb);
+void otx2_nix_ras_intr_enb_dis(struct rte_eth_dev *eth_dev, bool enb);
 
 int otx2_nix_rx_queue_intr_enable(struct rte_eth_dev *eth_dev,
 				  uint16_t rx_queue_id);
diff --git a/drivers/net/octeontx2/otx2_ethdev_irq.c b/drivers/net/octeontx2/otx2_ethdev_irq.c
index 2256e40b6f..96b848a919 100644
--- a/drivers/net/octeontx2/otx2_ethdev_irq.c
+++ b/drivers/net/octeontx2/otx2_ethdev_irq.c
@@ -41,11 +41,11 @@ nix_lf_register_err_irq(struct rte_eth_dev *eth_dev)
 	vec = dev->nix_msixoff + NIX_LF_INT_VEC_ERR_INT;
 
 	/* Clear err interrupt */
-	otx2_write64(~0ull, dev->base + NIX_LF_ERR_INT_ENA_W1C);
+	otx2_nix_err_intr_enb_dis(eth_dev, false);
 	/* Set used interrupt vectors */
 	rc = otx2_register_irq(handle, nix_lf_err_irq, eth_dev, vec);
 	/* Enable all dev interrupt except for RQ_DISABLED */
-	otx2_write64(~BIT_ULL(11), dev->base + NIX_LF_ERR_INT_ENA_W1S);
+	otx2_nix_err_intr_enb_dis(eth_dev, true);
 
 	return rc;
 }
@@ -61,7 +61,7 @@ nix_lf_unregister_err_irq(struct rte_eth_dev *eth_dev)
 	vec = dev->nix_msixoff + NIX_LF_INT_VEC_ERR_INT;
 
 	/* Clear err interrupt */
-	otx2_write64(~0ull, dev->base + NIX_LF_ERR_INT_ENA_W1C);
+	otx2_nix_err_intr_enb_dis(eth_dev, false);
 	otx2_unregister_irq(handle, nix_lf_err_irq, eth_dev, vec);
 }
 
@@ -97,11 +97,11 @@ nix_lf_register_ras_irq(struct rte_eth_dev *eth_dev)
 	vec = dev->nix_msixoff + NIX_LF_INT_VEC_POISON;
 
 	/* Clear err interrupt */
-	otx2_write64(~0ull, dev->base + NIX_LF_RAS_ENA_W1C);
+	otx2_nix_ras_intr_enb_dis(eth_dev, false);
 	/* Set used interrupt vectors */
 	rc = otx2_register_irq(handle, nix_lf_ras_irq, eth_dev, vec);
 	/* Enable dev interrupt */
-	otx2_write64(~0ull, dev->base + NIX_LF_RAS_ENA_W1S);
+	otx2_nix_ras_intr_enb_dis(eth_dev, true);
 
 	return rc;
 }
@@ -117,7 +117,7 @@ nix_lf_unregister_ras_irq(struct rte_eth_dev *eth_dev)
 	vec = dev->nix_msixoff + NIX_LF_INT_VEC_POISON;
 
 	/* Clear err interrupt */
-	otx2_write64(~0ull, dev->base + NIX_LF_RAS_ENA_W1C);
+	otx2_nix_ras_intr_enb_dis(eth_dev, false);
 	otx2_unregister_irq(handle, nix_lf_ras_irq, eth_dev, vec);
 }
 
@@ -466,3 +466,26 @@ otx2_nix_rx_queue_intr_disable(struct rte_eth_dev *eth_dev,
 
 	return 0;
 }
+
+void
+otx2_nix_err_intr_enb_dis(struct rte_eth_dev *eth_dev, bool enb)
+{
+	struct otx2_eth_dev *dev = otx2_eth_pmd_priv(eth_dev);
+
+	/* Enable all nix lf error interrupts except for RQ_DISABLED */
+	if (enb)
+		otx2_write64(~BIT_ULL(11), dev->base + NIX_LF_ERR_INT_ENA_W1S);
+	else
+		otx2_write64(~0ull, dev->base + NIX_LF_ERR_INT_ENA_W1C);
+}
+
+void
+otx2_nix_ras_intr_enb_dis(struct rte_eth_dev *eth_dev, bool enb)
+{
+	struct otx2_eth_dev *dev = otx2_eth_pmd_priv(eth_dev);
+
+	if (enb)
+		otx2_write64(~0ull, dev->base + NIX_LF_RAS_ENA_W1S);
+	else
+		otx2_write64(~0ull, dev->base + NIX_LF_RAS_ENA_W1C);
+}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:47.791085258 +0100
+++ 0082-net-octeontx2-enable-error-and-RAS-interrupt-in-conf.patch	2020-05-19 14:04:44.252649025 +0100
@@ -1,8 +1,10 @@
-From fdbdf2721c56f49290a45d801b6ac13568a6735b Mon Sep 17 00:00:00 2001
+From 6075a1ee65707ee110f4bcab890e7e9ea8d8df6e Mon Sep 17 00:00:00 2001
 From: Vamsi Attunuru <vattunuru@marvell.com>
 Date: Fri, 3 Apr 2020 07:50:16 +0530
 Subject: [PATCH] net/octeontx2: enable error and RAS interrupt in configure
 
+[ upstream commit fdbdf2721c56f49290a45d801b6ac13568a6735b ]
+
 Patch adds routines to set/clear nix lf error & ras interrupt enable
 registers. These nix lf error interrupts get triggered if there are
 any failures during nix lf configuration. This interrupts are enabled
@@ -18,10 +20,10 @@
  3 files changed, 34 insertions(+), 6 deletions(-)
 
 diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c
-index 7202af625c..c56b399af2 100644
+index e450a5ae01..f3281df9c4 100644
 --- a/drivers/net/octeontx2/otx2_ethdev.c
 +++ b/drivers/net/octeontx2/otx2_ethdev.c
-@@ -1666,6 +1666,9 @@ otx2_nix_configure(struct rte_eth_dev *eth_dev)
+@@ -1650,6 +1650,9 @@ otx2_nix_configure(struct rte_eth_dev *eth_dev)
  		goto fail_offloads;
  	}
  
@@ -32,10 +34,10 @@
  	    dev->npc_flow.switch_header_type == OTX2_PRIV_FLAGS_HIGIG) {
  		otx2_err("Both PTP and switch header enabled");
 diff --git a/drivers/net/octeontx2/otx2_ethdev.h b/drivers/net/octeontx2/otx2_ethdev.h
-index e5684f9f00..22a4ea9cb6 100644
+index fdc79633e4..864356e36c 100644
 --- a/drivers/net/octeontx2/otx2_ethdev.h
 +++ b/drivers/net/octeontx2/otx2_ethdev.h
-@@ -445,6 +445,8 @@ int oxt2_nix_register_cq_irqs(struct rte_eth_dev *eth_dev);
+@@ -439,6 +439,8 @@ int oxt2_nix_register_cq_irqs(struct rte_eth_dev *eth_dev);
  void otx2_nix_unregister_irqs(struct rte_eth_dev *eth_dev);
  void oxt2_nix_unregister_queue_irqs(struct rte_eth_dev *eth_dev);
  void oxt2_nix_unregister_cq_irqs(struct rte_eth_dev *eth_dev);

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

* [dpdk-stable] patch 'net/octeontx2: disable unnecessary error interrupts' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (80 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/octeontx2: enable error and RAS interrupt in configure' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/i40e: relax barrier in Tx for NEON' " luca.boccassi
                     ` (130 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Nithin Dabilpuram; +Cc: Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 85897fd567efec8e63eb73d498dc4a468443a451 Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <ndabilpuram@marvell.com>
Date: Mon, 13 Apr 2020 19:15:40 +0530
Subject: [PATCH] net/octeontx2: disable unnecessary error interrupts

[ upstream commit c3d30e9d753ef3121c25b9403bf56ee09f2a2086 ]

Disable CQ_DISABLED error interrupt in NIX_LF_ERR_INT
to fix spurious interrupts in event dev mode. Also skip
configuring RSS when RQ count is '0' because
RSS table initialization is done incorrectly due to
divide-by-zero error and it is leading to RQ_OOR error
in NIX_LF_ERR_INT.

Fixes: 83ce2880e22e ("net/octeontx2: support RSS")

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 drivers/net/octeontx2/otx2_ethdev_irq.c | 7 +++++--
 drivers/net/octeontx2/otx2_rss.c        | 2 +-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/net/octeontx2/otx2_ethdev_irq.c b/drivers/net/octeontx2/otx2_ethdev_irq.c
index 96b848a919..b121488faf 100644
--- a/drivers/net/octeontx2/otx2_ethdev_irq.c
+++ b/drivers/net/octeontx2/otx2_ethdev_irq.c
@@ -472,9 +472,12 @@ otx2_nix_err_intr_enb_dis(struct rte_eth_dev *eth_dev, bool enb)
 {
 	struct otx2_eth_dev *dev = otx2_eth_pmd_priv(eth_dev);
 
-	/* Enable all nix lf error interrupts except for RQ_DISABLED */
+	/* Enable all nix lf error interrupts except
+	 * RQ_DISABLED and CQ_DISABLED.
+	 */
 	if (enb)
-		otx2_write64(~BIT_ULL(11), dev->base + NIX_LF_ERR_INT_ENA_W1S);
+		otx2_write64(~(BIT_ULL(11) | BIT_ULL(24)),
+			     dev->base + NIX_LF_ERR_INT_ENA_W1S);
 	else
 		otx2_write64(~0ull, dev->base + NIX_LF_ERR_INT_ENA_W1C);
 }
diff --git a/drivers/net/octeontx2/otx2_rss.c b/drivers/net/octeontx2/otx2_rss.c
index bc7b64387a..d80579725a 100644
--- a/drivers/net/octeontx2/otx2_rss.c
+++ b/drivers/net/octeontx2/otx2_rss.c
@@ -341,7 +341,7 @@ otx2_nix_rss_config(struct rte_eth_dev *eth_dev)
 	int rc;
 
 	/* Skip further configuration if selected mode is not RSS */
-	if (eth_dev->data->dev_conf.rxmode.mq_mode != ETH_MQ_RX_RSS)
+	if (eth_dev->data->dev_conf.rxmode.mq_mode != ETH_MQ_RX_RSS || !qcnt)
 		return 0;
 
 	/* Update default RSS key and cfg */
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:47.831912175 +0100
+++ 0083-net-octeontx2-disable-unnecessary-error-interrupts.patch	2020-05-19 14:04:44.252649025 +0100
@@ -1,8 +1,10 @@
-From c3d30e9d753ef3121c25b9403bf56ee09f2a2086 Mon Sep 17 00:00:00 2001
+From 85897fd567efec8e63eb73d498dc4a468443a451 Mon Sep 17 00:00:00 2001
 From: Nithin Dabilpuram <ndabilpuram@marvell.com>
 Date: Mon, 13 Apr 2020 19:15:40 +0530
 Subject: [PATCH] net/octeontx2: disable unnecessary error interrupts
 
+[ upstream commit c3d30e9d753ef3121c25b9403bf56ee09f2a2086 ]
+
 Disable CQ_DISABLED error interrupt in NIX_LF_ERR_INT
 to fix spurious interrupts in event dev mode. Also skip
 configuring RSS when RQ count is '0' because
@@ -11,7 +13,6 @@
 in NIX_LF_ERR_INT.
 
 Fixes: 83ce2880e22e ("net/octeontx2: support RSS")
-Cc: stable@dpdk.org
 
 Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
 Acked-by: Jerin Jacob <jerinj@marvell.com>
@@ -40,10 +41,10 @@
  		otx2_write64(~0ull, dev->base + NIX_LF_ERR_INT_ENA_W1C);
  }
 diff --git a/drivers/net/octeontx2/otx2_rss.c b/drivers/net/octeontx2/otx2_rss.c
-index a29441e6c9..5e3f866819 100644
+index bc7b64387a..d80579725a 100644
 --- a/drivers/net/octeontx2/otx2_rss.c
 +++ b/drivers/net/octeontx2/otx2_rss.c
-@@ -358,7 +358,7 @@ otx2_nix_rss_config(struct rte_eth_dev *eth_dev)
+@@ -341,7 +341,7 @@ otx2_nix_rss_config(struct rte_eth_dev *eth_dev)
  	int rc;
  
  	/* Skip further configuration if selected mode is not RSS */

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

* [dpdk-stable] patch 'net/i40e: relax barrier in Tx for NEON' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (81 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/octeontx2: disable unnecessary error interrupts' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/mlx5: add device parameter for MPRQ stride size' " luca.boccassi
                     ` (129 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Gavin Hu; +Cc: Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 31d1b373d5ab079273f9f5b164b2d5720081b39e Mon Sep 17 00:00:00 2001
From: Gavin Hu <gavin.hu@arm.com>
Date: Tue, 14 Apr 2020 00:40:24 +0800
Subject: [PATCH] net/i40e: relax barrier in Tx for NEON

[ upstream commit 6b50c489a3bb1d82e2549ae2f1e2c46961572c27 ]

To keep ordering of mixed accesses, 'DMB OSH' is sufficient.
'DSB' inside the I40E_PCI_REG_WRITE is overkill.[1]

This patch fixes by replacing with just sufficient barriers in the
normal PMD and vPMD.

It showed 7% performance uplift on ThunderX2 and 4% on Arm N1SDP.
The test case is the RFC2544 zero-loss test running testpmd.

[1] http://inbox.dpdk.org/dev/CALBAE1M-ezVWCjqCZDBw+MMDEC4O9
qf0Kpn89EMdGDajepKoZQ@mail.gmail.com

Fixes: ae0eb310f253 ("net/i40e: implement vector PMD for ARM")

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 drivers/net/i40e/i40e_rxtx_vec_neon.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/i40e_rxtx_vec_neon.c b/drivers/net/i40e/i40e_rxtx_vec_neon.c
index deb185fe2f..4376d8911c 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_neon.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_neon.c
@@ -72,8 +72,9 @@ i40e_rxq_rearm(struct i40e_rx_queue *rxq)
 	rx_id = (uint16_t)((rxq->rxrearm_start == 0) ?
 			     (rxq->nb_rx_desc - 1) : (rxq->rxrearm_start - 1));
 
+	rte_cio_wmb();
 	/* Update the tail pointer on the NIC */
-	I40E_PCI_REG_WRITE(rxq->qrx_tail, rx_id);
+	I40E_PCI_REG_WRITE_RELAXED(rxq->qrx_tail, rx_id);
 }
 
 static inline void
@@ -564,7 +565,8 @@ i40e_xmit_fixed_burst_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
 
 	txq->tx_tail = tx_id;
 
-	I40E_PCI_REG_WRITE(txq->qtx_tail, txq->tx_tail);
+	rte_cio_wmb();
+	I40E_PCI_REG_WRITE_RELAXED(txq->qtx_tail, tx_id);
 
 	return nb_pkts;
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:47.870108580 +0100
+++ 0084-net-i40e-relax-barrier-in-Tx-for-NEON.patch	2020-05-19 14:04:44.252649025 +0100
@@ -1,8 +1,10 @@
-From 6b50c489a3bb1d82e2549ae2f1e2c46961572c27 Mon Sep 17 00:00:00 2001
+From 31d1b373d5ab079273f9f5b164b2d5720081b39e Mon Sep 17 00:00:00 2001
 From: Gavin Hu <gavin.hu@arm.com>
 Date: Tue, 14 Apr 2020 00:40:24 +0800
 Subject: [PATCH] net/i40e: relax barrier in Tx for NEON
 
+[ upstream commit 6b50c489a3bb1d82e2549ae2f1e2c46961572c27 ]
+
 To keep ordering of mixed accesses, 'DMB OSH' is sufficient.
 'DSB' inside the I40E_PCI_REG_WRITE is overkill.[1]
 
@@ -16,7 +18,6 @@
 qf0Kpn89EMdGDajepKoZQ@mail.gmail.com
 
 Fixes: ae0eb310f253 ("net/i40e: implement vector PMD for ARM")
-Cc: stable@dpdk.org
 
 Signed-off-by: Gavin Hu <gavin.hu@arm.com>
 Acked-by: Jerin Jacob <jerinj@marvell.com>
@@ -25,7 +26,7 @@
  1 file changed, 4 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/i40e/i40e_rxtx_vec_neon.c b/drivers/net/i40e/i40e_rxtx_vec_neon.c
-index d7d6decafd..8b99354a5f 100644
+index deb185fe2f..4376d8911c 100644
 --- a/drivers/net/i40e/i40e_rxtx_vec_neon.c
 +++ b/drivers/net/i40e/i40e_rxtx_vec_neon.c
 @@ -72,8 +72,9 @@ i40e_rxq_rearm(struct i40e_rx_queue *rxq)

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

* [dpdk-stable] patch 'net/mlx5: add device parameter for MPRQ stride size' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (82 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/i40e: relax barrier in Tx for NEON' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/mlx5: enable MPRQ multi-stride operations' " luca.boccassi
                     ` (128 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Alexander Kozyrev; +Cc: Viacheslav Ovsiienko, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From a1b3dc84bceef016a935c236d180da040938436f Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev@mellanox.com>
Date: Thu, 9 Apr 2020 22:23:51 +0000
Subject: [PATCH] net/mlx5: add device parameter for MPRQ stride size

[ upstream commit ecb160456aed51ccf69dc96cb835c259d611d276 ]

Define a device parameter to configure log 2 of a stride size for MPRQ
- mprq_log_stride_size. User is able to specify a stride size in a range
allowed by an underlying hardware. The default stride size is defined as
2048 bytes to encompass most commonly used packet sizes in the Internet
(MTU 1518 and less) and will be used in case a maximum configured packet
size cannot fit into the largest possible stride size. Otherwise a
stride size is set to a large enough value to encompass a whole packet.

Signed-off-by: Alexander Kozyrev <akozyrev@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 doc/guides/nics/mlx5.rst     | 17 ++++++++++--
 drivers/net/mlx5/mlx5.c      | 34 ++++++++++++++++++-----
 drivers/net/mlx5/mlx5.h      |  1 +
 drivers/net/mlx5/mlx5_defs.h |  3 +++
 drivers/net/mlx5/mlx5_rxq.c  | 52 ++++++++++++++++++++++++++----------
 5 files changed, 84 insertions(+), 23 deletions(-)

diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
index 830a02dc90..261002621c 100644
--- a/doc/guides/nics/mlx5.rst
+++ b/doc/guides/nics/mlx5.rst
@@ -360,8 +360,7 @@ Run-time configuration
 
   A nonzero value enables configuring Multi-Packet Rx queues. Rx queue is
   configured as Multi-Packet RQ if the total number of Rx queues is
-  ``rxqs_min_mprq`` or more and Rx scatter isn't configured. Disabled by
-  default.
+  ``rxqs_min_mprq`` or more. Disabled by default.
 
   Multi-Packet Rx Queue (MPRQ a.k.a Striding RQ) can further save PCIe bandwidth
   by posting a single large buffer for multiple packets. Instead of posting a
@@ -386,6 +385,20 @@ Run-time configuration
 
   The size of Rx queue should be bigger than the number of strides.
 
+- ``mprq_log_stride_size`` parameter [int]
+
+  Log 2 of the size of a stride for Multi-Packet Rx queue. Configuring a smaller
+  stride size can save some memory and reduce probability of a depletion of all
+  available strides due to unreleased packets by an application. If configured
+  value is not in the range of device capability, the default value will be set
+  with a warning message. The default value is 11 which is 2048 bytes per a
+  stride, valid only if ``mprq_en`` is set. With ``mprq_log_stride_size`` set
+  it is possible for a pcaket to span across multiple strides. This mode allows
+  support of jumbo frames (9K) with MPRQ. The memcopy of some packets (or part
+  of a packet if Rx scatter is configured) may be required in case there is no
+  space left for a head room at the end of a stride which incurs some
+  performance penalty.
+
 - ``mprq_max_memcpy_len`` parameter [int]
 
   The maximum length of packet to memcpy in case of Multi-Packet Rx queue. Rx
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 5d6ae245d0..6ac387bd24 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -62,6 +62,9 @@
 /* Device parameter to configure log 2 of the number of strides for MPRQ. */
 #define MLX5_RX_MPRQ_LOG_STRIDE_NUM "mprq_log_stride_num"
 
+/* Device parameter to configure log 2 of the stride size for MPRQ. */
+#define MLX5_RX_MPRQ_LOG_STRIDE_SIZE "mprq_log_stride_size"
+
 /* Device parameter to limit the size of memcpy'd packet for MPRQ. */
 #define MLX5_RX_MPRQ_MAX_MEMCPY_LEN "mprq_max_memcpy_len"
 
@@ -1499,6 +1502,8 @@ mlx5_args_check(const char *key, const char *val, void *opaque)
 		config->mprq.enabled = !!tmp;
 	} else if (strcmp(MLX5_RX_MPRQ_LOG_STRIDE_NUM, key) == 0) {
 		config->mprq.stride_num_n = tmp;
+	} else if (strcmp(MLX5_RX_MPRQ_LOG_STRIDE_SIZE, key) == 0) {
+		config->mprq.stride_size_n = tmp;
 	} else if (strcmp(MLX5_RX_MPRQ_MAX_MEMCPY_LEN, key) == 0) {
 		config->mprq.max_memcpy_len = tmp;
 	} else if (strcmp(MLX5_RXQS_MIN_MPRQ, key) == 0) {
@@ -1591,6 +1596,7 @@ mlx5_args(struct mlx5_dev_config *config, struct rte_devargs *devargs)
 		MLX5_RXQ_PKT_PAD_EN,
 		MLX5_RX_MPRQ_EN,
 		MLX5_RX_MPRQ_LOG_STRIDE_NUM,
+		MLX5_RX_MPRQ_LOG_STRIDE_SIZE,
 		MLX5_RX_MPRQ_MAX_MEMCPY_LEN,
 		MLX5_RXQS_MIN_MPRQ,
 		MLX5_TXQ_INLINE,
@@ -2245,8 +2251,6 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
 			mprq_caps.min_single_wqe_log_num_of_strides;
 		mprq_max_stride_num_n =
 			mprq_caps.max_single_wqe_log_num_of_strides;
-		config.mprq.stride_num_n = RTE_MAX(MLX5_MPRQ_STRIDE_NUM_N,
-						   mprq_min_stride_num_n);
 	}
 #endif
 	if (RTE_CACHE_LINE_SIZE == 128 &&
@@ -2561,17 +2565,32 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
 #endif
 	}
 	if (config.mprq.enabled && mprq) {
-		if (config.mprq.stride_num_n > mprq_max_stride_num_n ||
-		    config.mprq.stride_num_n < mprq_min_stride_num_n) {
+		if (config.mprq.stride_num_n &&
+		    (config.mprq.stride_num_n > mprq_max_stride_num_n ||
+		     config.mprq.stride_num_n < mprq_min_stride_num_n)) {
 			config.mprq.stride_num_n =
-				RTE_MAX(MLX5_MPRQ_STRIDE_NUM_N,
-					mprq_min_stride_num_n);
+				RTE_MIN(RTE_MAX(MLX5_MPRQ_STRIDE_NUM_N,
+						mprq_min_stride_num_n),
+					mprq_max_stride_num_n);
 			DRV_LOG(WARNING,
 				"the number of strides"
 				" for Multi-Packet RQ is out of range,"
 				" setting default value (%u)",
 				1 << config.mprq.stride_num_n);
 		}
+		if (config.mprq.stride_size_n &&
+		    (config.mprq.stride_size_n > mprq_max_stride_size_n ||
+		     config.mprq.stride_size_n < mprq_min_stride_size_n)) {
+			config.mprq.stride_size_n =
+				RTE_MIN(RTE_MAX(MLX5_MPRQ_STRIDE_SIZE_N,
+						mprq_min_stride_size_n),
+					mprq_max_stride_size_n);
+			DRV_LOG(WARNING,
+				"the size of a stride"
+				" for Multi-Packet RQ is out of range,"
+				" setting default value (%u)",
+				1 << config.mprq.stride_size_n);
+		}
 		config.mprq.min_stride_size_n = mprq_min_stride_size_n;
 		config.mprq.max_stride_size_n = mprq_max_stride_size_n;
 	} else if (config.mprq.enabled && !mprq) {
@@ -3290,7 +3309,8 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 		.mr_ext_memseg_en = 1,
 		.mprq = {
 			.enabled = 0, /* Disabled by default. */
-			.stride_num_n = MLX5_MPRQ_STRIDE_NUM_N,
+			.stride_num_n = 0,
+			.stride_size_n = 0,
 			.max_memcpy_len = MLX5_MPRQ_MEMCPY_DEFAULT_LEN,
 			.min_rxqs_num = MLX5_MPRQ_MIN_RXQS,
 		},
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 048bc66052..a3f42995f2 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -267,6 +267,7 @@ struct mlx5_dev_config {
 	struct {
 		unsigned int enabled:1; /* Whether MPRQ is enabled. */
 		unsigned int stride_num_n; /* Number of strides. */
+		unsigned int stride_size_n; /* Size of a stride. */
 		unsigned int min_stride_size_n; /* Min size of a stride. */
 		unsigned int max_stride_size_n; /* Max size of a stride. */
 		unsigned int max_memcpy_len;
diff --git a/drivers/net/mlx5/mlx5_defs.h b/drivers/net/mlx5/mlx5_defs.h
index 330666cd60..418e744d65 100644
--- a/drivers/net/mlx5/mlx5_defs.h
+++ b/drivers/net/mlx5/mlx5_defs.h
@@ -146,6 +146,9 @@
 /* Log 2 of the default number of strides per WQE for Multi-Packet RQ. */
 #define MLX5_MPRQ_STRIDE_NUM_N 6U
 
+/* Log 2 of the default size of a stride per WQE for Multi-Packet RQ. */
+#define MLX5_MPRQ_STRIDE_SIZE_N 11U
+
 /* Two-byte shift is disabled for Multi-Packet RQ. */
 #define MLX5_MPRQ_TWO_BYTE_SHIFT 0
 
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index 5f3740b812..a3d62bdd81 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -1768,7 +1768,9 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
 	struct mlx5_priv *priv = dev->data->dev_private;
 	struct mlx5_rxq_ctrl *tmpl;
 	unsigned int mb_len = rte_pktmbuf_data_room_size(mp);
+	unsigned int mprq_stride_nums;
 	unsigned int mprq_stride_size;
+	unsigned int mprq_stride_cap;
 	struct mlx5_dev_config *config = &priv->config;
 	unsigned int strd_headroom_en;
 	/*
@@ -1831,25 +1833,40 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
 		strd_headroom_en = 1;
 		mprq_stride_size = non_scatter_min_mbuf_size;
 	}
+	mprq_stride_nums = config->mprq.stride_num_n ?
+		config->mprq.stride_num_n : MLX5_MPRQ_STRIDE_NUM_N;
+	mprq_stride_size = (mprq_stride_size <=
+			(1U << config->mprq.max_stride_size_n)) ?
+		log2above(mprq_stride_size) : MLX5_MPRQ_STRIDE_SIZE_N;
+	mprq_stride_cap = (config->mprq.stride_num_n ?
+		(1U << config->mprq.stride_num_n) : (1U << mprq_stride_nums)) *
+			(config->mprq.stride_size_n ?
+		(1U << config->mprq.stride_size_n) : (1U << mprq_stride_size));
 	/*
 	 * This Rx queue can be configured as a Multi-Packet RQ if all of the
 	 * following conditions are met:
 	 *  - MPRQ is enabled.
 	 *  - The number of descs is more than the number of strides.
-	 *  - max_rx_pkt_len plus overhead is less than the max size of a
-	 *    stride.
+	 *  - max_rx_pkt_len plus overhead is less than the max size
+	 *    of a stride or mprq_stride_size is specified by a user.
+	 *    Need to nake sure that there are enough stides to encap
+	 *    the maximum packet size in case mprq_stride_size is set.
 	 *  Otherwise, enable Rx scatter if necessary.
 	 */
-	if (mprq_en &&
-	    desc > (1U << config->mprq.stride_num_n) &&
-	    mprq_stride_size <= (1U << config->mprq.max_stride_size_n)) {
+	if (mprq_en && desc > (1U << mprq_stride_nums) &&
+	    (non_scatter_min_mbuf_size -
+	     (lro_on_queue ? RTE_PKTMBUF_HEADROOM : 0) <=
+	     (1U << config->mprq.max_stride_size_n) ||
+	     (config->mprq.stride_size_n &&
+	      non_scatter_min_mbuf_size <= mprq_stride_cap))) {
 		/* TODO: Rx scatter isn't supported yet. */
 		tmpl->rxq.sges_n = 0;
 		/* Trim the number of descs needed. */
-		desc >>= config->mprq.stride_num_n;
-		tmpl->rxq.strd_num_n = config->mprq.stride_num_n;
-		tmpl->rxq.strd_sz_n = RTE_MAX(log2above(mprq_stride_size),
-					      config->mprq.min_stride_size_n);
+		desc >>= mprq_stride_nums;
+		tmpl->rxq.strd_num_n = config->mprq.stride_num_n ?
+			config->mprq.stride_num_n : mprq_stride_nums;
+		tmpl->rxq.strd_sz_n = config->mprq.stride_size_n ?
+			config->mprq.stride_size_n : mprq_stride_size;
 		tmpl->rxq.strd_shift_en = MLX5_MPRQ_TWO_BYTE_SHIFT;
 		tmpl->rxq.strd_headroom_en = strd_headroom_en;
 		tmpl->rxq.mprq_max_memcpy_len = RTE_MIN(first_mb_free_size,
@@ -1898,11 +1915,18 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
 	if (mprq_en && !mlx5_rxq_mprq_enabled(&tmpl->rxq))
 		DRV_LOG(WARNING,
 			"port %u MPRQ is requested but cannot be enabled"
-			" (requested: desc = %u, stride_sz = %u,"
-			" supported: min_stride_num = %u, max_stride_sz = %u).",
-			dev->data->port_id, desc, mprq_stride_size,
-			(1 << config->mprq.stride_num_n),
-			(1 << config->mprq.max_stride_size_n));
+			" (requested: packet size = %u, desc = %u,"
+			" stride_sz = %u, stride_num = %u,"
+			" supported: min_stride_sz = %u, max_stride_sz = %u).",
+			dev->data->port_id, non_scatter_min_mbuf_size, desc,
+			config->mprq.stride_size_n ?
+				(1U << config->mprq.stride_size_n) :
+				(1U << mprq_stride_size),
+			config->mprq.stride_num_n ?
+				(1U << config->mprq.stride_num_n) :
+				(1U << mprq_stride_nums),
+			(1U << config->mprq.min_stride_size_n),
+			(1U << config->mprq.max_stride_size_n));
 	DRV_LOG(DEBUG, "port %u maximum number of segments per packet: %u",
 		dev->data->port_id, 1 << tmpl->rxq.sges_n);
 	if (desc % (1 << tmpl->rxq.sges_n)) {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:47.905951671 +0100
+++ 0085-net-mlx5-add-device-parameter-for-MPRQ-stride-size.patch	2020-05-19 14:04:44.260649170 +0100
@@ -1,8 +1,10 @@
-From ecb160456aed51ccf69dc96cb835c259d611d276 Mon Sep 17 00:00:00 2001
+From a1b3dc84bceef016a935c236d180da040938436f Mon Sep 17 00:00:00 2001
 From: Alexander Kozyrev <akozyrev@mellanox.com>
 Date: Thu, 9 Apr 2020 22:23:51 +0000
 Subject: [PATCH] net/mlx5: add device parameter for MPRQ stride size
 
+[ upstream commit ecb160456aed51ccf69dc96cb835c259d611d276 ]
+
 Define a device parameter to configure log 2 of a stride size for MPRQ
 - mprq_log_stride_size. User is able to specify a stride size in a range
 allowed by an underlying hardware. The default stride size is defined as
@@ -11,25 +13,22 @@
 size cannot fit into the largest possible stride size. Otherwise a
 stride size is set to a large enough value to encompass a whole packet.
 
-Cc: stable@dpdk.org
-
 Signed-off-by: Alexander Kozyrev <akozyrev@mellanox.com>
 Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
 Acked-by: Matan Azrad <matan@mellanox.com>
 ---
- doc/guides/nics/mlx5.rst               | 17 ++++++++-
- doc/guides/rel_notes/release_20_05.rst |  1 +
- drivers/net/mlx5/mlx5.c                | 34 +++++++++++++----
- drivers/net/mlx5/mlx5.h                |  1 +
- drivers/net/mlx5/mlx5_defs.h           |  3 ++
- drivers/net/mlx5/mlx5_rxq.c            | 52 +++++++++++++++++++-------
- 6 files changed, 85 insertions(+), 23 deletions(-)
+ doc/guides/nics/mlx5.rst     | 17 ++++++++++--
+ drivers/net/mlx5/mlx5.c      | 34 ++++++++++++++++++-----
+ drivers/net/mlx5/mlx5.h      |  1 +
+ drivers/net/mlx5/mlx5_defs.h |  3 +++
+ drivers/net/mlx5/mlx5_rxq.c  | 52 ++++++++++++++++++++++++++----------
+ 5 files changed, 84 insertions(+), 23 deletions(-)
 
 diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
-index ca4ded2f22..34c18b7f19 100644
+index 830a02dc90..261002621c 100644
 --- a/doc/guides/nics/mlx5.rst
 +++ b/doc/guides/nics/mlx5.rst
-@@ -408,8 +408,7 @@ Run-time configuration
+@@ -360,8 +360,7 @@ Run-time configuration
  
    A nonzero value enables configuring Multi-Packet Rx queues. Rx queue is
    configured as Multi-Packet RQ if the total number of Rx queues is
@@ -39,7 +38,7 @@
  
    Multi-Packet Rx Queue (MPRQ a.k.a Striding RQ) can further save PCIe bandwidth
    by posting a single large buffer for multiple packets. Instead of posting a
-@@ -434,6 +433,20 @@ Run-time configuration
+@@ -386,6 +385,20 @@ Run-time configuration
  
    The size of Rx queue should be bigger than the number of strides.
  
@@ -60,23 +59,11 @@
  - ``mprq_max_memcpy_len`` parameter [int]
  
    The maximum length of packet to memcpy in case of Multi-Packet Rx queue. Rx
-diff --git a/doc/guides/rel_notes/release_20_05.rst b/doc/guides/rel_notes/release_20_05.rst
-index 2cc583610b..31b5b992d1 100644
---- a/doc/guides/rel_notes/release_20_05.rst
-+++ b/doc/guides/rel_notes/release_20_05.rst
-@@ -126,6 +126,7 @@ New Features
- 
-   * Added support for matching on IPv4 Time To Live and IPv6 Hop Limit.
-   * Added support for creating Relaxed Ordering Memory Regions.
-+  * Added support for jumbo frame size (9K MTU) in Multi-Packet RQ mode.
- 
- * **Updated the AESNI MB crypto PMD.**
- 
 diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
-index efdd53cc5c..293d316413 100644
+index 5d6ae245d0..6ac387bd24 100644
 --- a/drivers/net/mlx5/mlx5.c
 +++ b/drivers/net/mlx5/mlx5.c
-@@ -63,6 +63,9 @@
+@@ -62,6 +62,9 @@
  /* Device parameter to configure log 2 of the number of strides for MPRQ. */
  #define MLX5_RX_MPRQ_LOG_STRIDE_NUM "mprq_log_stride_num"
  
@@ -86,7 +73,7 @@
  /* Device parameter to limit the size of memcpy'd packet for MPRQ. */
  #define MLX5_RX_MPRQ_MAX_MEMCPY_LEN "mprq_max_memcpy_len"
  
-@@ -1533,6 +1536,8 @@ mlx5_args_check(const char *key, const char *val, void *opaque)
+@@ -1499,6 +1502,8 @@ mlx5_args_check(const char *key, const char *val, void *opaque)
  		config->mprq.enabled = !!tmp;
  	} else if (strcmp(MLX5_RX_MPRQ_LOG_STRIDE_NUM, key) == 0) {
  		config->mprq.stride_num_n = tmp;
@@ -95,7 +82,7 @@
  	} else if (strcmp(MLX5_RX_MPRQ_MAX_MEMCPY_LEN, key) == 0) {
  		config->mprq.max_memcpy_len = tmp;
  	} else if (strcmp(MLX5_RXQS_MIN_MPRQ, key) == 0) {
-@@ -1629,6 +1634,7 @@ mlx5_args(struct mlx5_dev_config *config, struct rte_devargs *devargs)
+@@ -1591,6 +1596,7 @@ mlx5_args(struct mlx5_dev_config *config, struct rte_devargs *devargs)
  		MLX5_RXQ_PKT_PAD_EN,
  		MLX5_RX_MPRQ_EN,
  		MLX5_RX_MPRQ_LOG_STRIDE_NUM,
@@ -103,7 +90,7 @@
  		MLX5_RX_MPRQ_MAX_MEMCPY_LEN,
  		MLX5_RXQS_MIN_MPRQ,
  		MLX5_TXQ_INLINE,
-@@ -2304,8 +2310,6 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
+@@ -2245,8 +2251,6 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
  			mprq_caps.min_single_wqe_log_num_of_strides;
  		mprq_max_stride_num_n =
  			mprq_caps.max_single_wqe_log_num_of_strides;
@@ -112,7 +99,7 @@
  	}
  #endif
  	if (RTE_CACHE_LINE_SIZE == 128 &&
-@@ -2619,17 +2623,32 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
+@@ -2561,17 +2565,32 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
  #endif
  	}
  	if (config.mprq.enabled && mprq) {
@@ -149,7 +136,7 @@
  		config.mprq.min_stride_size_n = mprq_min_stride_size_n;
  		config.mprq.max_stride_size_n = mprq_max_stride_size_n;
  	} else if (config.mprq.enabled && !mprq) {
-@@ -3363,7 +3382,8 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
+@@ -3290,7 +3309,8 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
  		.mr_ext_memseg_en = 1,
  		.mprq = {
  			.enabled = 0, /* Disabled by default. */
@@ -160,10 +147,10 @@
  			.min_rxqs_num = MLX5_MPRQ_MIN_RXQS,
  		},
 diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
-index 45619dcfff..94178e7ae7 100644
+index 048bc66052..a3f42995f2 100644
 --- a/drivers/net/mlx5/mlx5.h
 +++ b/drivers/net/mlx5/mlx5.h
-@@ -179,6 +179,7 @@ struct mlx5_dev_config {
+@@ -267,6 +267,7 @@ struct mlx5_dev_config {
  	struct {
  		unsigned int enabled:1; /* Whether MPRQ is enabled. */
  		unsigned int stride_num_n; /* Number of strides. */
@@ -172,10 +159,10 @@
  		unsigned int max_stride_size_n; /* Max size of a stride. */
  		unsigned int max_memcpy_len;
 diff --git a/drivers/net/mlx5/mlx5_defs.h b/drivers/net/mlx5/mlx5_defs.h
-index 19e8253d57..260f584298 100644
+index 330666cd60..418e744d65 100644
 --- a/drivers/net/mlx5/mlx5_defs.h
 +++ b/drivers/net/mlx5/mlx5_defs.h
-@@ -143,6 +143,9 @@
+@@ -146,6 +146,9 @@
  /* Log 2 of the default number of strides per WQE for Multi-Packet RQ. */
  #define MLX5_MPRQ_STRIDE_NUM_N 6U
  
@@ -186,10 +173,10 @@
  #define MLX5_MPRQ_TWO_BYTE_SHIFT 0
  
 diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
-index 0a95e3c753..1b57f00cb2 100644
+index 5f3740b812..a3d62bdd81 100644
 --- a/drivers/net/mlx5/mlx5_rxq.c
 +++ b/drivers/net/mlx5/mlx5_rxq.c
-@@ -1793,7 +1793,9 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
+@@ -1768,7 +1768,9 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
  	struct mlx5_priv *priv = dev->data->dev_private;
  	struct mlx5_rxq_ctrl *tmpl;
  	unsigned int mb_len = rte_pktmbuf_data_room_size(mp);
@@ -199,7 +186,7 @@
  	struct mlx5_dev_config *config = &priv->config;
  	unsigned int strd_headroom_en;
  	/*
-@@ -1856,25 +1858,40 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
+@@ -1831,25 +1833,40 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
  		strd_headroom_en = 1;
  		mprq_stride_size = non_scatter_min_mbuf_size;
  	}
@@ -249,7 +236,7 @@
  		tmpl->rxq.strd_shift_en = MLX5_MPRQ_TWO_BYTE_SHIFT;
  		tmpl->rxq.strd_headroom_en = strd_headroom_en;
  		tmpl->rxq.mprq_max_memcpy_len = RTE_MIN(first_mb_free_size,
-@@ -1923,11 +1940,18 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
+@@ -1898,11 +1915,18 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
  	if (mprq_en && !mlx5_rxq_mprq_enabled(&tmpl->rxq))
  		DRV_LOG(WARNING,
  			"port %u MPRQ is requested but cannot be enabled"

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

* [dpdk-stable] patch 'net/mlx5: enable MPRQ multi-stride operations' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (83 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/mlx5: add device parameter for MPRQ stride size' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/mlx5: add multi-segment packets in MPRQ mode' " luca.boccassi
                     ` (127 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Alexander Kozyrev; +Cc: Viacheslav Ovsiienko, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From bbdd1a9c79b0fcaa80b6111c1ac4fe63f8f30d27 Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev@mellanox.com>
Date: Thu, 9 Apr 2020 22:23:52 +0000
Subject: [PATCH] net/mlx5: enable MPRQ multi-stride operations

[ upstream commit bd0d5930bf567b41c634b5a7ef0fe76c167ef3b6 ]

MPRQ feature should be updated to allow a packet to be received
into multiple strides in order to support the MTU exceeding 8KB.
Special care is needed to prevent the headroom corruption in the
multi-stride mode since the headroom space is borrowed by the PMD
from the tail of the preceding stride. Copy the whole packet into
a separate mbuf in this case or just the overlapping data if the
Rx scattering is supported by an application.

Signed-off-by: Alexander Kozyrev <akozyrev@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx5/mlx5_rxq.c  | 28 ++++-----------
 drivers/net/mlx5/mlx5_rxtx.c | 68 +++++++++++++++---------------------
 drivers/net/mlx5/mlx5_rxtx.h |  2 +-
 3 files changed, 36 insertions(+), 62 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index a3d62bdd81..a4071f891e 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -1772,7 +1772,6 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
 	unsigned int mprq_stride_size;
 	unsigned int mprq_stride_cap;
 	struct mlx5_dev_config *config = &priv->config;
-	unsigned int strd_headroom_en;
 	/*
 	 * Always allocate extra slots, even if eventually
 	 * the vector Rx will not be used.
@@ -1818,26 +1817,11 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
 	tmpl->socket = socket;
 	if (dev->data->dev_conf.intr_conf.rxq)
 		tmpl->irq = 1;
-	/*
-	 * LRO packet may consume all the stride memory, hence we cannot
-	 * guaranty head-room near the packet memory in the stride.
-	 * In this case scatter is, for sure, enabled and an empty mbuf may be
-	 * added in the start for the head-room.
-	 */
-	if (lro_on_queue && RTE_PKTMBUF_HEADROOM > 0 &&
-	    non_scatter_min_mbuf_size > mb_len) {
-		strd_headroom_en = 0;
-		mprq_stride_size = RTE_MIN(max_rx_pkt_len,
-					1u << config->mprq.max_stride_size_n);
-	} else {
-		strd_headroom_en = 1;
-		mprq_stride_size = non_scatter_min_mbuf_size;
-	}
 	mprq_stride_nums = config->mprq.stride_num_n ?
 		config->mprq.stride_num_n : MLX5_MPRQ_STRIDE_NUM_N;
-	mprq_stride_size = (mprq_stride_size <=
-			(1U << config->mprq.max_stride_size_n)) ?
-		log2above(mprq_stride_size) : MLX5_MPRQ_STRIDE_SIZE_N;
+	mprq_stride_size = non_scatter_min_mbuf_size <=
+		(1U << config->mprq.max_stride_size_n) ?
+		log2above(non_scatter_min_mbuf_size) : MLX5_MPRQ_STRIDE_SIZE_N;
 	mprq_stride_cap = (config->mprq.stride_num_n ?
 		(1U << config->mprq.stride_num_n) : (1U << mprq_stride_nums)) *
 			(config->mprq.stride_size_n ?
@@ -1854,8 +1838,7 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
 	 *  Otherwise, enable Rx scatter if necessary.
 	 */
 	if (mprq_en && desc > (1U << mprq_stride_nums) &&
-	    (non_scatter_min_mbuf_size -
-	     (lro_on_queue ? RTE_PKTMBUF_HEADROOM : 0) <=
+	    (non_scatter_min_mbuf_size <=
 	     (1U << config->mprq.max_stride_size_n) ||
 	     (config->mprq.stride_size_n &&
 	      non_scatter_min_mbuf_size <= mprq_stride_cap))) {
@@ -1868,7 +1851,8 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
 		tmpl->rxq.strd_sz_n = config->mprq.stride_size_n ?
 			config->mprq.stride_size_n : mprq_stride_size;
 		tmpl->rxq.strd_shift_en = MLX5_MPRQ_TWO_BYTE_SHIFT;
-		tmpl->rxq.strd_headroom_en = strd_headroom_en;
+		tmpl->rxq.strd_scatter_en =
+				!!(offloads & DEV_RX_OFFLOAD_SCATTER);
 		tmpl->rxq.mprq_max_memcpy_len = RTE_MIN(first_mb_free_size,
 				config->mprq.max_memcpy_len);
 		max_lro_size = RTE_MIN(max_rx_pkt_len,
diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index 905a84d4dc..c2007282f6 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -1570,21 +1570,20 @@ mlx5_rx_burst_mprq(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
 	unsigned int i = 0;
 	uint32_t rq_ci = rxq->rq_ci;
 	uint16_t consumed_strd = rxq->consumed_strd;
-	uint16_t headroom_sz = rxq->strd_headroom_en * RTE_PKTMBUF_HEADROOM;
 	struct mlx5_mprq_buf *buf = (*rxq->mprq_bufs)[rq_ci & wq_mask];
 
 	while (i < pkts_n) {
 		struct rte_mbuf *pkt;
 		void *addr;
 		int ret;
-		unsigned int len;
+		uint32_t len;
 		uint16_t strd_cnt;
 		uint16_t strd_idx;
 		uint32_t offset;
 		uint32_t byte_cnt;
+		int32_t hdrm_overlap;
 		volatile struct mlx5_mini_cqe8 *mcqe = NULL;
 		uint32_t rss_hash_res = 0;
-		uint8_t lro_num_seg;
 
 		if (consumed_strd == strd_n) {
 			/* Replace WQE only if the buffer is still in use. */
@@ -1630,18 +1629,6 @@ mlx5_rx_burst_mprq(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
 		}
 		assert(strd_idx < strd_n);
 		assert(!((rte_be_to_cpu_16(cqe->wqe_id) ^ rq_ci) & wq_mask));
-		lro_num_seg = cqe->lro_num_seg;
-		/*
-		 * Currently configured to receive a packet per a stride. But if
-		 * MTU is adjusted through kernel interface, device could
-		 * consume multiple strides without raising an error. In this
-		 * case, the packet should be dropped because it is bigger than
-		 * the max_rx_pkt_len.
-		 */
-		if (unlikely(!lro_num_seg && strd_cnt > 1)) {
-			++rxq->stats.idropped;
-			continue;
-		}
 		pkt = rte_pktmbuf_alloc(rxq->mp);
 		if (unlikely(pkt == NULL)) {
 			++rxq->stats.rx_nombuf;
@@ -1653,12 +1640,16 @@ mlx5_rx_burst_mprq(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
 			len -= RTE_ETHER_CRC_LEN;
 		offset = strd_idx * strd_sz + strd_shift;
 		addr = RTE_PTR_ADD(mlx5_mprq_buf_addr(buf, strd_n), offset);
+		hdrm_overlap = len + RTE_PKTMBUF_HEADROOM - strd_cnt * strd_sz;
 		/*
 		 * Memcpy packets to the target mbuf if:
 		 * - The size of packet is smaller than mprq_max_memcpy_len.
 		 * - Out of buffer in the Mempool for Multi-Packet RQ.
+		 * - There is no space for a headroom and scatter is disabled.
 		 */
-		if (len <= rxq->mprq_max_memcpy_len || rxq->mprq_repl == NULL) {
+		if (len <= rxq->mprq_max_memcpy_len ||
+		    rxq->mprq_repl == NULL ||
+		    (hdrm_overlap > 0 && !rxq->strd_scatter_en)) {
 			/*
 			 * When memcpy'ing packet due to out-of-buffer, the
 			 * packet must be smaller than the target mbuf.
@@ -1680,7 +1671,7 @@ mlx5_rx_burst_mprq(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
 			rte_atomic16_add_return(&buf->refcnt, 1);
 			assert((uint16_t)rte_atomic16_read(&buf->refcnt) <=
 			       strd_n + 1);
-			buf_addr = RTE_PTR_SUB(addr, headroom_sz);
+			buf_addr = RTE_PTR_SUB(addr, RTE_PKTMBUF_HEADROOM);
 			/*
 			 * MLX5 device doesn't use iova but it is necessary in a
 			 * case where the Rx packet is transmitted via a
@@ -1699,43 +1690,42 @@ mlx5_rx_burst_mprq(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
 			rte_pktmbuf_attach_extbuf(pkt, buf_addr, buf_iova,
 						  buf_len, shinfo);
 			/* Set mbuf head-room. */
-			pkt->data_off = headroom_sz;
+			SET_DATA_OFF(pkt, RTE_PKTMBUF_HEADROOM);
 			assert(pkt->ol_flags == EXT_ATTACHED_MBUF);
-			/*
-			 * Prevent potential overflow due to MTU change through
-			 * kernel interface.
-			 */
-			if (unlikely(rte_pktmbuf_tailroom(pkt) < len)) {
-				rte_pktmbuf_free_seg(pkt);
-				++rxq->stats.idropped;
-				continue;
-			}
+			assert(rte_pktmbuf_tailroom(pkt) <
+				len - (hdrm_overlap > 0 ? hdrm_overlap : 0));
 			DATA_LEN(pkt) = len;
 			/*
-			 * LRO packet may consume all the stride memory, in this
-			 * case packet head-room space is not guaranteed so must
-			 * to add an empty mbuf for the head-room.
+			 * Copy the last fragment of a packet (up to headroom
+			 * size bytes) in case there is a stride overlap with
+			 * a next packet's headroom. Allocate a separate mbuf
+			 * to store this fragment and link it. Scatter is on.
 			 */
-			if (!rxq->strd_headroom_en) {
-				struct rte_mbuf *headroom_mbuf =
-						rte_pktmbuf_alloc(rxq->mp);
+			if (hdrm_overlap > 0) {
+				assert(rxq->strd_scatter_en);
+				struct rte_mbuf *seg =
+					rte_pktmbuf_alloc(rxq->mp);
 
-				if (unlikely(headroom_mbuf == NULL)) {
+				if (unlikely(seg == NULL)) {
 					rte_pktmbuf_free_seg(pkt);
 					++rxq->stats.rx_nombuf;
 					break;
 				}
-				PORT(pkt) = rxq->port_id;
-				NEXT(headroom_mbuf) = pkt;
-				pkt = headroom_mbuf;
+				SET_DATA_OFF(seg, 0);
+				rte_memcpy(rte_pktmbuf_mtod(seg, void *),
+					RTE_PTR_ADD(addr, len - hdrm_overlap),
+					hdrm_overlap);
+				DATA_LEN(seg) = hdrm_overlap;
+				DATA_LEN(pkt) = len - hdrm_overlap;
+				NEXT(pkt) = seg;
 				NB_SEGS(pkt) = 2;
 			}
 		}
 		rxq_cq_to_mbuf(rxq, pkt, cqe, rss_hash_res);
-		if (lro_num_seg > 1) {
+		if (cqe->lro_num_seg > 1) {
 			mlx5_lro_update_hdr(addr, cqe, len);
 			pkt->ol_flags |= PKT_RX_LRO;
-			pkt->tso_segsz = strd_sz;
+			pkt->tso_segsz = len / cqe->lro_num_seg;
 		}
 		PKT_LEN(pkt) = len;
 		PORT(pkt) = rxq->port_id;
diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
index e362b4afe0..aa6fabbd3d 100644
--- a/drivers/net/mlx5/mlx5_rxtx.h
+++ b/drivers/net/mlx5/mlx5_rxtx.h
@@ -114,7 +114,7 @@ struct mlx5_rxq_data {
 	unsigned int strd_sz_n:4; /* Log 2 of stride size. */
 	unsigned int strd_shift_en:1; /* Enable 2bytes shift on a stride. */
 	unsigned int err_state:2; /* enum mlx5_rxq_err_state. */
-	unsigned int strd_headroom_en:1; /* Enable mbuf headroom in MPRQ. */
+	unsigned int strd_scatter_en:1; /* Scattered packets from a stride. */
 	unsigned int lro:1; /* Enable LRO. */
 	unsigned int :1; /* Remaining bits. */
 	volatile uint32_t *rq_db;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:47.950748412 +0100
+++ 0086-net-mlx5-enable-MPRQ-multi-stride-operations.patch	2020-05-19 14:04:44.268649315 +0100
@@ -1,8 +1,10 @@
-From bd0d5930bf567b41c634b5a7ef0fe76c167ef3b6 Mon Sep 17 00:00:00 2001
+From bbdd1a9c79b0fcaa80b6111c1ac4fe63f8f30d27 Mon Sep 17 00:00:00 2001
 From: Alexander Kozyrev <akozyrev@mellanox.com>
 Date: Thu, 9 Apr 2020 22:23:52 +0000
 Subject: [PATCH] net/mlx5: enable MPRQ multi-stride operations
 
+[ upstream commit bd0d5930bf567b41c634b5a7ef0fe76c167ef3b6 ]
+
 MPRQ feature should be updated to allow a packet to be received
 into multiple strides in order to support the MTU exceeding 8KB.
 Special care is needed to prevent the headroom corruption in the
@@ -11,8 +13,6 @@
 a separate mbuf in this case or just the overlapping data if the
 Rx scattering is supported by an application.
 
-Cc: stable@dpdk.org
-
 Signed-off-by: Alexander Kozyrev <akozyrev@mellanox.com>
 Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
 Acked-by: Matan Azrad <matan@mellanox.com>
@@ -23,10 +23,10 @@
  3 files changed, 36 insertions(+), 62 deletions(-)
 
 diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
-index 1b57f00cb2..1cc9f1dba8 100644
+index a3d62bdd81..a4071f891e 100644
 --- a/drivers/net/mlx5/mlx5_rxq.c
 +++ b/drivers/net/mlx5/mlx5_rxq.c
-@@ -1797,7 +1797,6 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
+@@ -1772,7 +1772,6 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
  	unsigned int mprq_stride_size;
  	unsigned int mprq_stride_cap;
  	struct mlx5_dev_config *config = &priv->config;
@@ -34,7 +34,7 @@
  	/*
  	 * Always allocate extra slots, even if eventually
  	 * the vector Rx will not be used.
-@@ -1843,26 +1842,11 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
+@@ -1818,26 +1817,11 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
  	tmpl->socket = socket;
  	if (dev->data->dev_conf.intr_conf.rxq)
  		tmpl->irq = 1;
@@ -64,7 +64,7 @@
  	mprq_stride_cap = (config->mprq.stride_num_n ?
  		(1U << config->mprq.stride_num_n) : (1U << mprq_stride_nums)) *
  			(config->mprq.stride_size_n ?
-@@ -1879,8 +1863,7 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
+@@ -1854,8 +1838,7 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
  	 *  Otherwise, enable Rx scatter if necessary.
  	 */
  	if (mprq_en && desc > (1U << mprq_stride_nums) &&
@@ -74,7 +74,7 @@
  	     (1U << config->mprq.max_stride_size_n) ||
  	     (config->mprq.stride_size_n &&
  	      non_scatter_min_mbuf_size <= mprq_stride_cap))) {
-@@ -1893,7 +1876,8 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
+@@ -1868,7 +1851,8 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
  		tmpl->rxq.strd_sz_n = config->mprq.stride_size_n ?
  			config->mprq.stride_size_n : mprq_stride_size;
  		tmpl->rxq.strd_shift_en = MLX5_MPRQ_TWO_BYTE_SHIFT;
@@ -85,10 +85,10 @@
  				config->mprq.max_memcpy_len);
  		max_lro_size = RTE_MIN(max_rx_pkt_len,
 diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
-index f3bf763769..4c279520d1 100644
+index 905a84d4dc..c2007282f6 100644
 --- a/drivers/net/mlx5/mlx5_rxtx.c
 +++ b/drivers/net/mlx5/mlx5_rxtx.c
-@@ -1658,21 +1658,20 @@ mlx5_rx_burst_mprq(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
+@@ -1570,21 +1570,20 @@ mlx5_rx_burst_mprq(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
  	unsigned int i = 0;
  	uint32_t rq_ci = rxq->rq_ci;
  	uint16_t consumed_strd = rxq->consumed_strd;
@@ -112,10 +112,10 @@
  
  		if (consumed_strd == strd_n) {
  			/* Replace WQE only if the buffer is still in use. */
-@@ -1719,18 +1718,6 @@ mlx5_rx_burst_mprq(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
- 		MLX5_ASSERT(strd_idx < strd_n);
- 		MLX5_ASSERT(!((rte_be_to_cpu_16(cqe->wqe_id) ^ rq_ci) &
- 			    wq_mask));
+@@ -1630,18 +1629,6 @@ mlx5_rx_burst_mprq(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
+ 		}
+ 		assert(strd_idx < strd_n);
+ 		assert(!((rte_be_to_cpu_16(cqe->wqe_id) ^ rq_ci) & wq_mask));
 -		lro_num_seg = cqe->lro_num_seg;
 -		/*
 -		 * Currently configured to receive a packet per a stride. But if
@@ -131,7 +131,7 @@
  		pkt = rte_pktmbuf_alloc(rxq->mp);
  		if (unlikely(pkt == NULL)) {
  			++rxq->stats.rx_nombuf;
-@@ -1742,12 +1729,16 @@ mlx5_rx_burst_mprq(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
+@@ -1653,12 +1640,16 @@ mlx5_rx_burst_mprq(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
  			len -= RTE_ETHER_CRC_LEN;
  		offset = strd_idx * strd_sz + strd_shift;
  		addr = RTE_PTR_ADD(mlx5_mprq_buf_addr(buf, strd_n), offset);
@@ -149,22 +149,22 @@
  			/*
  			 * When memcpy'ing packet due to out-of-buffer, the
  			 * packet must be smaller than the target mbuf.
-@@ -1769,7 +1760,7 @@ mlx5_rx_burst_mprq(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
+@@ -1680,7 +1671,7 @@ mlx5_rx_burst_mprq(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
  			rte_atomic16_add_return(&buf->refcnt, 1);
- 			MLX5_ASSERT((uint16_t)rte_atomic16_read(&buf->refcnt) <=
- 				    strd_n + 1);
+ 			assert((uint16_t)rte_atomic16_read(&buf->refcnt) <=
+ 			       strd_n + 1);
 -			buf_addr = RTE_PTR_SUB(addr, headroom_sz);
 +			buf_addr = RTE_PTR_SUB(addr, RTE_PKTMBUF_HEADROOM);
  			/*
  			 * MLX5 device doesn't use iova but it is necessary in a
  			 * case where the Rx packet is transmitted via a
-@@ -1788,43 +1779,42 @@ mlx5_rx_burst_mprq(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
+@@ -1699,43 +1690,42 @@ mlx5_rx_burst_mprq(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
  			rte_pktmbuf_attach_extbuf(pkt, buf_addr, buf_iova,
  						  buf_len, shinfo);
  			/* Set mbuf head-room. */
 -			pkt->data_off = headroom_sz;
 +			SET_DATA_OFF(pkt, RTE_PKTMBUF_HEADROOM);
- 			MLX5_ASSERT(pkt->ol_flags == EXT_ATTACHED_MBUF);
+ 			assert(pkt->ol_flags == EXT_ATTACHED_MBUF);
 -			/*
 -			 * Prevent potential overflow due to MTU change through
 -			 * kernel interface.
@@ -174,7 +174,7 @@
 -				++rxq->stats.idropped;
 -				continue;
 -			}
-+			MLX5_ASSERT(rte_pktmbuf_tailroom(pkt) <
++			assert(rte_pktmbuf_tailroom(pkt) <
 +				len - (hdrm_overlap > 0 ? hdrm_overlap : 0));
  			DATA_LEN(pkt) = len;
  			/*
@@ -190,7 +190,7 @@
 -				struct rte_mbuf *headroom_mbuf =
 -						rte_pktmbuf_alloc(rxq->mp);
 +			if (hdrm_overlap > 0) {
-+				MLX5_ASSERT(rxq->strd_scatter_en);
++				assert(rxq->strd_scatter_en);
 +				struct rte_mbuf *seg =
 +					rte_pktmbuf_alloc(rxq->mp);
  
@@ -224,10 +224,10 @@
  		PKT_LEN(pkt) = len;
  		PORT(pkt) = rxq->port_id;
 diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
-index 939778aa55..d155c241eb 100644
+index e362b4afe0..aa6fabbd3d 100644
 --- a/drivers/net/mlx5/mlx5_rxtx.h
 +++ b/drivers/net/mlx5/mlx5_rxtx.h
-@@ -119,7 +119,7 @@ struct mlx5_rxq_data {
+@@ -114,7 +114,7 @@ struct mlx5_rxq_data {
  	unsigned int strd_sz_n:4; /* Log 2 of stride size. */
  	unsigned int strd_shift_en:1; /* Enable 2bytes shift on a stride. */
  	unsigned int err_state:2; /* enum mlx5_rxq_err_state. */

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

* [dpdk-stable] patch 'net/mlx5: add multi-segment packets in MPRQ mode' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (84 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/mlx5: enable MPRQ multi-stride operations' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/mlx5: fix meter suffix table leak' " luca.boccassi
                     ` (126 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Alexander Kozyrev; +Cc: Viacheslav Ovsiienko, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From afca8bc661463f5f6c09ec6ecbcecd88f8f3a7ea Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev@mellanox.com>
Date: Thu, 9 Apr 2020 22:23:53 +0000
Subject: [PATCH] net/mlx5: add multi-segment packets in MPRQ mode

[ upstream commit 775fc97b0125c29f4bd36490f46f5f1e11dc048f ]

The multi-stride operations now allow to reduce a stride size
while supporting Jumbo frames. That means that it is possible
to have mbufs configured with a size smaller than the whole
packet received. It is not an issue during normal MPRQ operations
since we attach external buffers instead of copying the data
into the mbuf itself. But it is not the case in "emergency mode"
when we have to copy every packet because of no more external
mbufs are available. Assemble a multi-segment packet to overcome
this issue in case scatter mode is enabled, drop a packet if not.

Signed-off-by: Alexander Kozyrev <akozyrev@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx5/mlx5_rxtx.c | 47 ++++++++++++++++++++++++++++++------
 1 file changed, 39 insertions(+), 8 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index c2007282f6..ae89406d65 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -1645,22 +1645,52 @@ mlx5_rx_burst_mprq(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
 		 * Memcpy packets to the target mbuf if:
 		 * - The size of packet is smaller than mprq_max_memcpy_len.
 		 * - Out of buffer in the Mempool for Multi-Packet RQ.
-		 * - There is no space for a headroom and scatter is disabled.
+		 * - The packet's stride overlaps a headroom and scatter is off.
 		 */
 		if (len <= rxq->mprq_max_memcpy_len ||
 		    rxq->mprq_repl == NULL ||
 		    (hdrm_overlap > 0 && !rxq->strd_scatter_en)) {
-			/*
-			 * When memcpy'ing packet due to out-of-buffer, the
-			 * packet must be smaller than the target mbuf.
-			 */
-			if (unlikely(rte_pktmbuf_tailroom(pkt) < len)) {
+			if (likely(rte_pktmbuf_tailroom(pkt) >= len)) {
+				rte_memcpy(rte_pktmbuf_mtod(pkt, void *),
+					   addr, len);
+				DATA_LEN(pkt) = len;
+			} else if (rxq->strd_scatter_en) {
+				struct rte_mbuf *prev = pkt;
+				uint32_t seg_len =
+					RTE_MIN(rte_pktmbuf_tailroom(pkt), len);
+				uint32_t rem_len = len - seg_len;
+
+				rte_memcpy(rte_pktmbuf_mtod(pkt, void *),
+					   addr, seg_len);
+				DATA_LEN(pkt) = seg_len;
+				while (rem_len) {
+					struct rte_mbuf *next =
+						rte_pktmbuf_alloc(rxq->mp);
+
+					if (unlikely(next == NULL)) {
+						rte_pktmbuf_free(pkt);
+						++rxq->stats.rx_nombuf;
+						goto out;
+					}
+					NEXT(prev) = next;
+					SET_DATA_OFF(next, 0);
+					addr = RTE_PTR_ADD(addr, seg_len);
+					seg_len = RTE_MIN
+						(rte_pktmbuf_tailroom(next),
+						 rem_len);
+					rte_memcpy
+						(rte_pktmbuf_mtod(next, void *),
+						 addr, seg_len);
+					DATA_LEN(next) = seg_len;
+					rem_len -= seg_len;
+					prev = next;
+					++NB_SEGS(pkt);
+				}
+			} else {
 				rte_pktmbuf_free_seg(pkt);
 				++rxq->stats.idropped;
 				continue;
 			}
-			rte_memcpy(rte_pktmbuf_mtod(pkt, void *), addr, len);
-			DATA_LEN(pkt) = len;
 		} else {
 			rte_iova_t buf_iova;
 			struct rte_mbuf_ext_shared_info *shinfo;
@@ -1737,6 +1767,7 @@ mlx5_rx_burst_mprq(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
 		*(pkts++) = pkt;
 		++i;
 	}
+out:
 	/* Update the consumer indexes. */
 	rxq->consumed_strd = consumed_strd;
 	rte_cio_wmb();
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:48.003190361 +0100
+++ 0087-net-mlx5-add-multi-segment-packets-in-MPRQ-mode.patch	2020-05-19 14:04:44.272649387 +0100
@@ -1,8 +1,10 @@
-From 775fc97b0125c29f4bd36490f46f5f1e11dc048f Mon Sep 17 00:00:00 2001
+From afca8bc661463f5f6c09ec6ecbcecd88f8f3a7ea Mon Sep 17 00:00:00 2001
 From: Alexander Kozyrev <akozyrev@mellanox.com>
 Date: Thu, 9 Apr 2020 22:23:53 +0000
 Subject: [PATCH] net/mlx5: add multi-segment packets in MPRQ mode
 
+[ upstream commit 775fc97b0125c29f4bd36490f46f5f1e11dc048f ]
+
 The multi-stride operations now allow to reduce a stride size
 while supporting Jumbo frames. That means that it is possible
 to have mbufs configured with a size smaller than the whole
@@ -13,8 +15,6 @@
 mbufs are available. Assemble a multi-segment packet to overcome
 this issue in case scatter mode is enabled, drop a packet if not.
 
-Cc: stable@dpdk.org
-
 Signed-off-by: Alexander Kozyrev <akozyrev@mellanox.com>
 Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
 Acked-by: Matan Azrad <matan@mellanox.com>
@@ -23,10 +23,10 @@
  1 file changed, 39 insertions(+), 8 deletions(-)
 
 diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
-index 4c279520d1..7ce3732fd3 100644
+index c2007282f6..ae89406d65 100644
 --- a/drivers/net/mlx5/mlx5_rxtx.c
 +++ b/drivers/net/mlx5/mlx5_rxtx.c
-@@ -1734,22 +1734,52 @@ mlx5_rx_burst_mprq(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
+@@ -1645,22 +1645,52 @@ mlx5_rx_burst_mprq(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
  		 * Memcpy packets to the target mbuf if:
  		 * - The size of packet is smaller than mprq_max_memcpy_len.
  		 * - Out of buffer in the Mempool for Multi-Packet RQ.
@@ -87,7 +87,7 @@
  		} else {
  			rte_iova_t buf_iova;
  			struct rte_mbuf_ext_shared_info *shinfo;
-@@ -1826,6 +1856,7 @@ mlx5_rx_burst_mprq(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
+@@ -1737,6 +1767,7 @@ mlx5_rx_burst_mprq(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
  		*(pkts++) = pkt;
  		++i;
  	}

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

* [dpdk-stable] patch 'net/mlx5: fix meter suffix table leak' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (85 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/mlx5: add multi-segment packets in MPRQ mode' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/mlx5: fix jump " luca.boccassi
                     ` (125 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Suanming Mou; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 652a21028a466bceadffb6a26484292206b0c0c0 Mon Sep 17 00:00:00 2001
From: Suanming Mou <suanmingm@mellanox.com>
Date: Mon, 13 Apr 2020 21:29:12 +0800
Subject: [PATCH] net/mlx5: fix meter suffix table leak

[ upstream commit 9dbaf7eef6e17113f5c681c3c4fcee6bcda4b5f0 ]

Currently, the meter suffix table is created and saved in the mlx5
shared struct. It causes the suffix table will never be released
even without any meter rules.

Move the suffix table to meter domain struct to help the suffix table
be released when all the meter rules are destroyed.

Fixes: 46a5e6bc6a85 ("net/mlx5: prepare meter flow tables")

Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
 drivers/net/mlx5/mlx5.h         |  6 -----
 drivers/net/mlx5/mlx5_flow.h    |  2 ++
 drivers/net/mlx5/mlx5_flow_dv.c | 48 +++++++++++++++------------------
 3 files changed, 23 insertions(+), 33 deletions(-)

diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index a3f42995f2..73142085f7 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -667,14 +667,8 @@ struct mlx5_ibv_shared {
 	uint32_t dv_regc0_mask; /* available bits of metatada reg_c[0]. */
 	uint32_t dv_refcnt; /* DV/DR data reference counter. */
 	void *fdb_domain; /* FDB Direct Rules name space handle. */
-	struct mlx5_flow_tbl_resource *fdb_mtr_sfx_tbl;
-	/* FDB meter suffix rules table. */
 	void *rx_domain; /* RX Direct Rules name space handle. */
-	struct mlx5_flow_tbl_resource *rx_mtr_sfx_tbl;
-	/* RX meter suffix rules table. */
 	void *tx_domain; /* TX Direct Rules name space handle. */
-	struct mlx5_flow_tbl_resource *tx_mtr_sfx_tbl;
-	/* TX meter suffix rules table. */
 	struct mlx5_hlist *flow_tbls;
 	/* Direct Rules tables for FDB, NIC TX+RX */
 	void *esw_drop_action; /* Pointer to DR E-Switch drop action. */
diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index 2353e182d1..6d278c63d8 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -572,6 +572,8 @@ struct mlx5_flow_policer_stats {
 struct mlx5_meter_domain_info {
 	struct mlx5_flow_tbl_resource *tbl;
 	/**< Meter table. */
+	struct mlx5_flow_tbl_resource *sfx_tbl;
+	/**< Meter suffix table. */
 	void *any_matcher;
 	/**< Meter color not match default criteria. */
 	void *color_matcher;
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 88793eb7a7..1f53aad40f 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -8108,6 +8108,9 @@ flow_dv_destroy_mtr_tbl(struct rte_eth_dev *dev,
 	if (mtd->egress.tbl)
 		claim_zero(flow_dv_tbl_resource_release(dev,
 							mtd->egress.tbl));
+	if (mtd->egress.sfx_tbl)
+		claim_zero(flow_dv_tbl_resource_release(dev,
+							mtd->egress.sfx_tbl));
 	if (mtd->ingress.color_matcher)
 		claim_zero(mlx5_glue->dv_destroy_flow_matcher
 			  (mtd->ingress.color_matcher));
@@ -8117,6 +8120,9 @@ flow_dv_destroy_mtr_tbl(struct rte_eth_dev *dev,
 	if (mtd->ingress.tbl)
 		claim_zero(flow_dv_tbl_resource_release(dev,
 							mtd->ingress.tbl));
+	if (mtd->ingress.sfx_tbl)
+		claim_zero(flow_dv_tbl_resource_release(dev,
+							mtd->ingress.sfx_tbl));
 	if (mtd->transfer.color_matcher)
 		claim_zero(mlx5_glue->dv_destroy_flow_matcher
 			  (mtd->transfer.color_matcher));
@@ -8126,6 +8132,9 @@ flow_dv_destroy_mtr_tbl(struct rte_eth_dev *dev,
 	if (mtd->transfer.tbl)
 		claim_zero(flow_dv_tbl_resource_release(dev,
 							mtd->transfer.tbl));
+	if (mtd->transfer.sfx_tbl)
+		claim_zero(flow_dv_tbl_resource_release(dev,
+							mtd->transfer.sfx_tbl));
 	if (mtd->drop_actn)
 		claim_zero(mlx5_glue->destroy_flow_action(mtd->drop_actn));
 	rte_free(mtd);
@@ -8173,31 +8182,16 @@ flow_dv_prepare_mtr_tables(struct rte_eth_dev *dev,
 		.match_mask = (void *)&mask,
 	};
 	void *actions[METER_ACTIONS];
-	struct mlx5_flow_tbl_resource **sfx_tbl;
 	struct mlx5_meter_domain_info *dtb;
 	struct rte_flow_error error;
 	int i = 0;
 
-	if (transfer) {
-		sfx_tbl = &sh->fdb_mtr_sfx_tbl;
+	if (transfer)
 		dtb = &mtb->transfer;
-	} else if (egress) {
-		sfx_tbl = &sh->tx_mtr_sfx_tbl;
+	else if (egress)
 		dtb = &mtb->egress;
-	} else {
-		sfx_tbl = &sh->rx_mtr_sfx_tbl;
+	else
 		dtb = &mtb->ingress;
-	}
-	/* If the suffix table in missing, create it. */
-	if (!(*sfx_tbl)) {
-		*sfx_tbl = flow_dv_tbl_resource_get(dev,
-						MLX5_FLOW_TABLE_LEVEL_SUFFIX,
-						egress, transfer, &error);
-		if (!(*sfx_tbl)) {
-			DRV_LOG(ERR, "Failed to create meter suffix table.");
-			return -1;
-		}
-	}
 	/* Create the meter table with METER level. */
 	dtb->tbl = flow_dv_tbl_resource_get(dev, MLX5_FLOW_TABLE_LEVEL_METER,
 					    egress, transfer, &error);
@@ -8205,6 +8199,14 @@ flow_dv_prepare_mtr_tables(struct rte_eth_dev *dev,
 		DRV_LOG(ERR, "Failed to create meter policer table.");
 		return -1;
 	}
+	/* Create the meter suffix table with SUFFIX level. */
+	dtb->sfx_tbl = flow_dv_tbl_resource_get(dev,
+					    MLX5_FLOW_TABLE_LEVEL_SUFFIX,
+					    egress, transfer, &error);
+	if (!dtb->sfx_tbl) {
+		DRV_LOG(ERR, "Failed to create meter suffix table.");
+		return -1;
+	}
 	/* Create matchers, Any and Color. */
 	dv_attr.priority = 3;
 	dv_attr.match_criteria_enable = 0;
@@ -8375,8 +8377,6 @@ flow_dv_destroy_policer_rules(struct rte_eth_dev *dev __rte_unused,
  *   Pointer to flow meter structure.
  * @param[in] mtb
  *   Pointer to DV meter table set.
- * @param[in] sfx_tb
- *   Pointer to suffix table.
  * @param[in] mtr_reg_c
  *   Color match REG_C.
  *
@@ -8386,7 +8386,6 @@ flow_dv_destroy_policer_rules(struct rte_eth_dev *dev __rte_unused,
 static int
 flow_dv_create_policer_forward_rule(struct mlx5_flow_meter *fm,
 				    struct mlx5_meter_domain_info *dtb,
-				    struct mlx5_flow_tbl_resource *sfx_tb,
 				    uint8_t mtr_reg_c)
 {
 	struct mlx5_flow_dv_match_params matcher = {
@@ -8400,12 +8399,10 @@ flow_dv_create_policer_forward_rule(struct mlx5_flow_meter *fm,
 	int i;
 
 	/* Create jump action. */
-	if (!sfx_tb)
-		return -1;
 	if (!dtb->jump_actn)
 		dtb->jump_actn =
 			mlx5_glue->dr_create_flow_action_dest_flow_tbl
-							(sfx_tb->obj);
+							(dtb->sfx_tbl->obj);
 	if (!dtb->jump_actn) {
 		DRV_LOG(ERR, "Failed to create policer jump action.");
 		goto error;
@@ -8460,7 +8457,6 @@ flow_dv_create_policer_rules(struct rte_eth_dev *dev,
 
 	if (attr->egress) {
 		ret = flow_dv_create_policer_forward_rule(fm, &mtb->egress,
-						priv->sh->tx_mtr_sfx_tbl,
 						priv->mtr_color_reg);
 		if (ret) {
 			DRV_LOG(ERR, "Failed to create egress policer.");
@@ -8469,7 +8465,6 @@ flow_dv_create_policer_rules(struct rte_eth_dev *dev,
 	}
 	if (attr->ingress) {
 		ret = flow_dv_create_policer_forward_rule(fm, &mtb->ingress,
-						priv->sh->rx_mtr_sfx_tbl,
 						priv->mtr_color_reg);
 		if (ret) {
 			DRV_LOG(ERR, "Failed to create ingress policer.");
@@ -8478,7 +8473,6 @@ flow_dv_create_policer_rules(struct rte_eth_dev *dev,
 	}
 	if (attr->transfer) {
 		ret = flow_dv_create_policer_forward_rule(fm, &mtb->transfer,
-						priv->sh->fdb_mtr_sfx_tbl,
 						priv->mtr_color_reg);
 		if (ret) {
 			DRV_LOG(ERR, "Failed to create transfer policer.");
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:48.045265010 +0100
+++ 0088-net-mlx5-fix-meter-suffix-table-leak.patch	2020-05-19 14:04:44.280649533 +0100
@@ -1,8 +1,10 @@
-From 9dbaf7eef6e17113f5c681c3c4fcee6bcda4b5f0 Mon Sep 17 00:00:00 2001
+From 652a21028a466bceadffb6a26484292206b0c0c0 Mon Sep 17 00:00:00 2001
 From: Suanming Mou <suanmingm@mellanox.com>
 Date: Mon, 13 Apr 2020 21:29:12 +0800
 Subject: [PATCH] net/mlx5: fix meter suffix table leak
 
+[ upstream commit 9dbaf7eef6e17113f5c681c3c4fcee6bcda4b5f0 ]
+
 Currently, the meter suffix table is created and saved in the mlx5
 shared struct. It causes the suffix table will never be released
 even without any meter rules.
@@ -11,7 +13,6 @@
 be released when all the meter rules are destroyed.
 
 Fixes: 46a5e6bc6a85 ("net/mlx5: prepare meter flow tables")
-Cc: stable@dpdk.org
 
 Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
 Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
@@ -22,10 +23,10 @@
  3 files changed, 23 insertions(+), 33 deletions(-)
 
 diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
-index 94178e7ae7..1850cf94ab 100644
+index a3f42995f2..73142085f7 100644
 --- a/drivers/net/mlx5/mlx5.h
 +++ b/drivers/net/mlx5/mlx5.h
-@@ -455,14 +455,8 @@ struct mlx5_ibv_shared {
+@@ -667,14 +667,8 @@ struct mlx5_ibv_shared {
  	uint32_t dv_regc0_mask; /* available bits of metatada reg_c[0]. */
  	uint32_t dv_refcnt; /* DV/DR data reference counter. */
  	void *fdb_domain; /* FDB Direct Rules name space handle. */
@@ -41,10 +42,10 @@
  	/* Direct Rules tables for FDB, NIC TX+RX */
  	void *esw_drop_action; /* Pointer to DR E-Switch drop action. */
 diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
-index daa1f84145..df09d0bb6f 100644
+index 2353e182d1..6d278c63d8 100644
 --- a/drivers/net/mlx5/mlx5_flow.h
 +++ b/drivers/net/mlx5/mlx5_flow.h
-@@ -642,6 +642,8 @@ struct mlx5_flow_policer_stats {
+@@ -572,6 +572,8 @@ struct mlx5_flow_policer_stats {
  struct mlx5_meter_domain_info {
  	struct mlx5_flow_tbl_resource *tbl;
  	/**< Meter table. */
@@ -54,10 +55,10 @@
  	/**< Meter color not match default criteria. */
  	void *color_matcher;
 diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index 18ea577f8c..0676b6f203 100644
+index 88793eb7a7..1f53aad40f 100644
 --- a/drivers/net/mlx5/mlx5_flow_dv.c
 +++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -8516,6 +8516,9 @@ flow_dv_destroy_mtr_tbl(struct rte_eth_dev *dev,
+@@ -8108,6 +8108,9 @@ flow_dv_destroy_mtr_tbl(struct rte_eth_dev *dev,
  	if (mtd->egress.tbl)
  		claim_zero(flow_dv_tbl_resource_release(dev,
  							mtd->egress.tbl));
@@ -67,7 +68,7 @@
  	if (mtd->ingress.color_matcher)
  		claim_zero(mlx5_glue->dv_destroy_flow_matcher
  			  (mtd->ingress.color_matcher));
-@@ -8525,6 +8528,9 @@ flow_dv_destroy_mtr_tbl(struct rte_eth_dev *dev,
+@@ -8117,6 +8120,9 @@ flow_dv_destroy_mtr_tbl(struct rte_eth_dev *dev,
  	if (mtd->ingress.tbl)
  		claim_zero(flow_dv_tbl_resource_release(dev,
  							mtd->ingress.tbl));
@@ -77,7 +78,7 @@
  	if (mtd->transfer.color_matcher)
  		claim_zero(mlx5_glue->dv_destroy_flow_matcher
  			  (mtd->transfer.color_matcher));
-@@ -8534,6 +8540,9 @@ flow_dv_destroy_mtr_tbl(struct rte_eth_dev *dev,
+@@ -8126,6 +8132,9 @@ flow_dv_destroy_mtr_tbl(struct rte_eth_dev *dev,
  	if (mtd->transfer.tbl)
  		claim_zero(flow_dv_tbl_resource_release(dev,
  							mtd->transfer.tbl));
@@ -87,7 +88,7 @@
  	if (mtd->drop_actn)
  		claim_zero(mlx5_glue->destroy_flow_action(mtd->drop_actn));
  	rte_free(mtd);
-@@ -8581,31 +8590,16 @@ flow_dv_prepare_mtr_tables(struct rte_eth_dev *dev,
+@@ -8173,31 +8182,16 @@ flow_dv_prepare_mtr_tables(struct rte_eth_dev *dev,
  		.match_mask = (void *)&mask,
  	};
  	void *actions[METER_ACTIONS];
@@ -122,7 +123,7 @@
  	/* Create the meter table with METER level. */
  	dtb->tbl = flow_dv_tbl_resource_get(dev, MLX5_FLOW_TABLE_LEVEL_METER,
  					    egress, transfer, &error);
-@@ -8613,6 +8607,14 @@ flow_dv_prepare_mtr_tables(struct rte_eth_dev *dev,
+@@ -8205,6 +8199,14 @@ flow_dv_prepare_mtr_tables(struct rte_eth_dev *dev,
  		DRV_LOG(ERR, "Failed to create meter policer table.");
  		return -1;
  	}
@@ -137,7 +138,7 @@
  	/* Create matchers, Any and Color. */
  	dv_attr.priority = 3;
  	dv_attr.match_criteria_enable = 0;
-@@ -8786,8 +8788,6 @@ flow_dv_destroy_policer_rules(struct rte_eth_dev *dev __rte_unused,
+@@ -8375,8 +8377,6 @@ flow_dv_destroy_policer_rules(struct rte_eth_dev *dev __rte_unused,
   *   Pointer to flow meter structure.
   * @param[in] mtb
   *   Pointer to DV meter table set.
@@ -146,7 +147,7 @@
   * @param[in] mtr_reg_c
   *   Color match REG_C.
   *
-@@ -8797,7 +8797,6 @@ flow_dv_destroy_policer_rules(struct rte_eth_dev *dev __rte_unused,
+@@ -8386,7 +8386,6 @@ flow_dv_destroy_policer_rules(struct rte_eth_dev *dev __rte_unused,
  static int
  flow_dv_create_policer_forward_rule(struct mlx5_flow_meter *fm,
  				    struct mlx5_meter_domain_info *dtb,
@@ -154,7 +155,7 @@
  				    uint8_t mtr_reg_c)
  {
  	struct mlx5_flow_dv_match_params matcher = {
-@@ -8811,12 +8810,10 @@ flow_dv_create_policer_forward_rule(struct mlx5_flow_meter *fm,
+@@ -8400,12 +8399,10 @@ flow_dv_create_policer_forward_rule(struct mlx5_flow_meter *fm,
  	int i;
  
  	/* Create jump action. */
@@ -168,7 +169,7 @@
  	if (!dtb->jump_actn) {
  		DRV_LOG(ERR, "Failed to create policer jump action.");
  		goto error;
-@@ -8871,7 +8868,6 @@ flow_dv_create_policer_rules(struct rte_eth_dev *dev,
+@@ -8460,7 +8457,6 @@ flow_dv_create_policer_rules(struct rte_eth_dev *dev,
  
  	if (attr->egress) {
  		ret = flow_dv_create_policer_forward_rule(fm, &mtb->egress,
@@ -176,7 +177,7 @@
  						priv->mtr_color_reg);
  		if (ret) {
  			DRV_LOG(ERR, "Failed to create egress policer.");
-@@ -8880,7 +8876,6 @@ flow_dv_create_policer_rules(struct rte_eth_dev *dev,
+@@ -8469,7 +8465,6 @@ flow_dv_create_policer_rules(struct rte_eth_dev *dev,
  	}
  	if (attr->ingress) {
  		ret = flow_dv_create_policer_forward_rule(fm, &mtb->ingress,
@@ -184,7 +185,7 @@
  						priv->mtr_color_reg);
  		if (ret) {
  			DRV_LOG(ERR, "Failed to create ingress policer.");
-@@ -8889,7 +8884,6 @@ flow_dv_create_policer_rules(struct rte_eth_dev *dev,
+@@ -8478,7 +8473,6 @@ flow_dv_create_policer_rules(struct rte_eth_dev *dev,
  	}
  	if (attr->transfer) {
  		ret = flow_dv_create_policer_forward_rule(fm, &mtb->transfer,

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

* [dpdk-stable] patch 'net/mlx5: fix jump table leak' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (86 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/mlx5: fix meter suffix table leak' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/enic: fix flow action reordering' " luca.boccassi
                     ` (124 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Suanming Mou; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From d3c99e41b1b2a9166da2ce228045ab26b58c6583 Mon Sep 17 00:00:00 2001
From: Suanming Mou <suanmingm@mellanox.com>
Date: Mon, 13 Apr 2020 21:29:13 +0800
Subject: [PATCH] net/mlx5: fix jump table leak

[ upstream commit fe2c412ca935fb6e14605795243b85aac5778455 ]

Currently, when translate jump action, the table reference will be
increased all the time. But when release the jump action, the table
resource reference will only be decreased when jump action is released.
It means for jump action which was referenced more than one time, the
increased table reference only decrease one time when jump action is
released.

Add table release when the jump action was not new created.

Fixes: 684b9a1b1f5c ("net/mlx5: support jump action")

Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 1f53aad40f..0f438bfc3b 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -70,6 +70,10 @@ union flow_dv_attr {
 	uint32_t attr;
 };
 
+static int
+flow_dv_tbl_resource_release(struct rte_eth_dev *dev,
+			     struct mlx5_flow_tbl_resource *tbl);
+
 /**
  * Initialize flow attributes structure according to flow items' types.
  *
@@ -2397,6 +2401,8 @@ flow_dv_jump_tbl_resource_register
 		DRV_LOG(DEBUG, "new jump table resource %p: refcnt %d++",
 			(void *)&tbl_data->jump, cnt);
 	} else {
+		/* old jump should not make the table ref++. */
+		flow_dv_tbl_resource_release(dev, &tbl_data->tbl);
 		assert(tbl_data->jump.action);
 		DRV_LOG(DEBUG, "existed jump table resource %p: refcnt %d++",
 			(void *)&tbl_data->jump, cnt);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:48.093165793 +0100
+++ 0089-net-mlx5-fix-jump-table-leak.patch	2020-05-19 14:04:44.284649605 +0100
@@ -1,8 +1,10 @@
-From fe2c412ca935fb6e14605795243b85aac5778455 Mon Sep 17 00:00:00 2001
+From d3c99e41b1b2a9166da2ce228045ab26b58c6583 Mon Sep 17 00:00:00 2001
 From: Suanming Mou <suanmingm@mellanox.com>
 Date: Mon, 13 Apr 2020 21:29:13 +0800
 Subject: [PATCH] net/mlx5: fix jump table leak
 
+[ upstream commit fe2c412ca935fb6e14605795243b85aac5778455 ]
+
 Currently, when translate jump action, the table reference will be
 increased all the time. But when release the jump action, the table
 resource reference will only be decreased when jump action is released.
@@ -13,7 +15,6 @@
 Add table release when the jump action was not new created.
 
 Fixes: 684b9a1b1f5c ("net/mlx5: support jump action")
-Cc: stable@dpdk.org
 
 Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
 Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
@@ -22,10 +23,10 @@
  1 file changed, 6 insertions(+)
 
 diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index 0676b6f203..e87e30f65f 100644
+index 1f53aad40f..0f438bfc3b 100644
 --- a/drivers/net/mlx5/mlx5_flow_dv.c
 +++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -73,6 +73,10 @@ union flow_dv_attr {
+@@ -70,6 +70,10 @@ union flow_dv_attr {
  	uint32_t attr;
  };
  
@@ -36,13 +37,13 @@
  /**
   * Initialize flow attributes structure according to flow items' types.
   *
-@@ -2530,6 +2534,8 @@ flow_dv_jump_tbl_resource_register
+@@ -2397,6 +2401,8 @@ flow_dv_jump_tbl_resource_register
  		DRV_LOG(DEBUG, "new jump table resource %p: refcnt %d++",
  			(void *)&tbl_data->jump, cnt);
  	} else {
 +		/* old jump should not make the table ref++. */
 +		flow_dv_tbl_resource_release(dev, &tbl_data->tbl);
- 		MLX5_ASSERT(tbl_data->jump.action);
+ 		assert(tbl_data->jump.action);
  		DRV_LOG(DEBUG, "existed jump table resource %p: refcnt %d++",
  			(void *)&tbl_data->jump, cnt);
 -- 

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

* [dpdk-stable] patch 'net/enic: fix flow action reordering' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (87 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/mlx5: fix jump " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/mlx5: fix push VLAN action to use item info' " luca.boccassi
                     ` (123 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Hyong Youb Kim; +Cc: John Daley, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 1603ade39cffc542a9ab9f2fc77e02baf33a78cf Mon Sep 17 00:00:00 2001
From: Hyong Youb Kim <hyonkim@cisco.com>
Date: Tue, 14 Apr 2020 18:06:37 -0700
Subject: [PATCH] net/enic: fix flow action reordering

[ upstream commit 4bcbbb430fc999c3980f07d4490b2a0dfabb059c ]

The current implementation produces wrong ordering for several cases
like these:

1. mark, decap, steer
Current: steer, mark, decap
Correct: mark, steer, decap

2. decap, steer, steer
Current: steer, steer, decap
Correct: steer, decap, steer

Simplify the logic and swap 1st steer and decap.
Also, allow just one decap action per flow.

Fixes: ea7768b5bba8 ("net/enic: add flow implementation based on Flow Manager API")

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Signed-off-by: John Daley <johndale@cisco.com>
---
 drivers/net/enic/enic_fm_flow.c | 61 +++++++++++++++------------------
 1 file changed, 28 insertions(+), 33 deletions(-)

diff --git a/drivers/net/enic/enic_fm_flow.c b/drivers/net/enic/enic_fm_flow.c
index e3e3d737bc..e8d5927674 100644
--- a/drivers/net/enic/enic_fm_flow.c
+++ b/drivers/net/enic/enic_fm_flow.c
@@ -869,46 +869,36 @@ enic_fm_append_action_op(struct enic_flowman *fm,
 	return 0;
 }
 
-/* Steer operations need to appear before other ops */
+/* NIC requires that 1st steer appear before decap.
+ * Correct example: steer, decap, steer, steer, ...
+ */
 static void
 enic_fm_reorder_action_op(struct enic_flowman *fm)
 {
-	struct fm_action_op *dst, *dst_head, *src, *src_head;
+	struct fm_action_op *op, *steer, *decap;
+	struct fm_action_op tmp_op;
 
 	ENICPMD_FUNC_TRACE();
-	/* Move steer ops to the front. */
-	src = fm->action.fma_action_ops;
-	src_head = src;
-	dst = fm->action_tmp.fma_action_ops;
-	dst_head = dst;
-	/* Copy steer ops to tmp */
-	while (src->fa_op != FMOP_END) {
-		if (src->fa_op == FMOP_RQ_STEER) {
-			ENICPMD_LOG(DEBUG, "move op: %ld -> dst %ld",
-				    (long)(src - src_head),
-				    (long)(dst - dst_head));
-			*dst = *src;
-			dst++;
-		}
-		src++;
+	/* Find 1st steer and decap */
+	op = fm->action.fma_action_ops;
+	steer = NULL;
+	decap = NULL;
+	while (op->fa_op != FMOP_END) {
+		if (!decap && op->fa_op == FMOP_DECAP_NOSTRIP)
+			decap = op;
+		else if (!steer && op->fa_op == FMOP_RQ_STEER)
+			steer = op;
+		op++;
 	}
-	/* Then append non-steer ops */
-	src = src_head;
-	while (src->fa_op != FMOP_END) {
-		if (src->fa_op != FMOP_RQ_STEER) {
-			ENICPMD_LOG(DEBUG, "move op: %ld -> dst %ld",
-				    (long)(src - src_head),
-				    (long)(dst - dst_head));
-			*dst = *src;
-			dst++;
-		}
-		src++;
+	/* If decap is before steer, swap */
+	if (steer && decap && decap < steer) {
+		op = fm->action.fma_action_ops;
+		ENICPMD_LOG(DEBUG, "swap decap %ld <-> steer %ld",
+			    (long)(decap - op), (long)(steer - op));
+		tmp_op = *decap;
+		*decap = *steer;
+		*steer = tmp_op;
 	}
-	/* Copy END */
-	*dst = *src;
-	/* Finally replace the original action with the reordered one */
-	memcpy(fm->action.fma_action_ops, fm->action_tmp.fma_action_ops,
-	       sizeof(fm->action.fma_action_ops));
 }
 
 /* VXLAN decap is done via flowman compound action */
@@ -1099,6 +1089,7 @@ enic_fm_copy_action(struct enic_flowman *fm,
 		PASSTHRU = 1 << 2,
 		COUNT = 1 << 3,
 		ENCAP = 1 << 4,
+		DECAP = 1 << 5,
 	};
 	struct fm_tcam_match_entry *fmt;
 	struct fm_action_op fm_op;
@@ -1281,6 +1272,10 @@ enic_fm_copy_action(struct enic_flowman *fm,
 			break;
 		}
 		case RTE_FLOW_ACTION_TYPE_VXLAN_DECAP: {
+			if (overlap & DECAP)
+				goto unsupported;
+			overlap |= DECAP;
+
 			ret = enic_fm_copy_vxlan_decap(fm, fmt, actions,
 				error);
 			if (ret != 0)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:48.140851170 +0100
+++ 0090-net-enic-fix-flow-action-reordering.patch	2020-05-19 14:04:44.288649678 +0100
@@ -1,8 +1,10 @@
-From 4bcbbb430fc999c3980f07d4490b2a0dfabb059c Mon Sep 17 00:00:00 2001
+From 1603ade39cffc542a9ab9f2fc77e02baf33a78cf Mon Sep 17 00:00:00 2001
 From: Hyong Youb Kim <hyonkim@cisco.com>
 Date: Tue, 14 Apr 2020 18:06:37 -0700
 Subject: [PATCH] net/enic: fix flow action reordering
 
+[ upstream commit 4bcbbb430fc999c3980f07d4490b2a0dfabb059c ]
+
 The current implementation produces wrong ordering for several cases
 like these:
 
@@ -18,7 +20,6 @@
 Also, allow just one decap action per flow.
 
 Fixes: ea7768b5bba8 ("net/enic: add flow implementation based on Flow Manager API")
-Cc: stable@dpdk.org
 
 Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
 Signed-off-by: John Daley <johndale@cisco.com>
@@ -27,10 +28,10 @@
  1 file changed, 28 insertions(+), 33 deletions(-)
 
 diff --git a/drivers/net/enic/enic_fm_flow.c b/drivers/net/enic/enic_fm_flow.c
-index d815f369ed..8d715fc436 100644
+index e3e3d737bc..e8d5927674 100644
 --- a/drivers/net/enic/enic_fm_flow.c
 +++ b/drivers/net/enic/enic_fm_flow.c
-@@ -870,46 +870,36 @@ enic_fm_append_action_op(struct enic_flowman *fm,
+@@ -869,46 +869,36 @@ enic_fm_append_action_op(struct enic_flowman *fm,
  	return 0;
  }
  
@@ -100,7 +101,7 @@
  }
  
  /* VXLAN decap is done via flowman compound action */
-@@ -1100,6 +1090,7 @@ enic_fm_copy_action(struct enic_flowman *fm,
+@@ -1099,6 +1089,7 @@ enic_fm_copy_action(struct enic_flowman *fm,
  		PASSTHRU = 1 << 2,
  		COUNT = 1 << 3,
  		ENCAP = 1 << 4,
@@ -108,7 +109,7 @@
  	};
  	struct fm_tcam_match_entry *fmt;
  	struct fm_action_op fm_op;
-@@ -1282,6 +1273,10 @@ enic_fm_copy_action(struct enic_flowman *fm,
+@@ -1281,6 +1272,10 @@ enic_fm_copy_action(struct enic_flowman *fm,
  			break;
  		}
  		case RTE_FLOW_ACTION_TYPE_VXLAN_DECAP: {

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

* [dpdk-stable] patch 'net/mlx5: fix push VLAN action to use item info' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (88 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/enic: fix flow action reordering' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/mlx5: fix validation of push VLAN without full mask' " luca.boccassi
                     ` (122 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Xiaoyu Min; +Cc: Dekel Peled, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From d2f4d1ae3d66e9f54788f21552d5c30e18828b79 Mon Sep 17 00:00:00 2001
From: Xiaoyu Min <jackmin@mellanox.com>
Date: Mon, 13 Apr 2020 06:29:03 +0300
Subject: [PATCH] net/mlx5: fix push VLAN action to use item info

[ upstream commit 7162c02d7bf700312f644ca3e598ab6e034e180c ]

Currently when PMD create push VLAN action it need to provide VID to HW
and PMD get VID value from item VLAN in pattern if there is no
of_set_vlan_vid action following.

When user create rule like [1], which has of_set_vlan_vid action
before of_push_vlan, the intention is to modify VID on existing VLAN
header and push a new VLAN header with VID _inherit_ from the previous
of_set_vlan_vid.

Currently the above is not covered by PMD, PMD always fetch the VLAN
information from item for of_push_vlan action.

Fix it by only fetch VLAN information from item when there is no
previous of_set_vlan_vid action.

[1]: testpmd> flow create 2 ingress transfer group 1 priority 3 pattern
                eth / vlan vid is 2731 / ipv4 / end actions
		of_set_vlan_vid vlan_vid 3209 / of_push_vlan ethertype
		0x88A8 / port_id id 1 / end

Fixes: b8c0372bc5ac ("net/mlx5: fix set VLAN ID/PCP in new header")

Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Reviewed-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 0f438bfc3b..8c3748f13c 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -7119,7 +7119,9 @@ cnt_err:
 			action_flags |= MLX5_FLOW_ACTION_OF_POP_VLAN;
 			break;
 		case RTE_FLOW_ACTION_TYPE_OF_PUSH_VLAN:
-			flow_dev_get_vlan_info_from_items(items, &vlan);
+			if (!(action_flags &
+			      MLX5_FLOW_ACTION_OF_SET_VLAN_VID))
+				flow_dev_get_vlan_info_from_items(items, &vlan);
 			vlan.eth_proto = rte_be_to_cpu_16
 			     ((((const struct rte_flow_action_of_push_vlan *)
 						   actions->conf)->ethertype));
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:48.177747609 +0100
+++ 0091-net-mlx5-fix-push-VLAN-action-to-use-item-info.patch	2020-05-19 14:04:44.296649823 +0100
@@ -1,8 +1,10 @@
-From 7162c02d7bf700312f644ca3e598ab6e034e180c Mon Sep 17 00:00:00 2001
+From d2f4d1ae3d66e9f54788f21552d5c30e18828b79 Mon Sep 17 00:00:00 2001
 From: Xiaoyu Min <jackmin@mellanox.com>
 Date: Mon, 13 Apr 2020 06:29:03 +0300
 Subject: [PATCH] net/mlx5: fix push VLAN action to use item info
 
+[ upstream commit 7162c02d7bf700312f644ca3e598ab6e034e180c ]
+
 Currently when PMD create push VLAN action it need to provide VID to HW
 and PMD get VID value from item VLAN in pattern if there is no
 of_set_vlan_vid action following.
@@ -24,7 +26,6 @@
 		0x88A8 / port_id id 1 / end
 
 Fixes: b8c0372bc5ac ("net/mlx5: fix set VLAN ID/PCP in new header")
-Cc: stable@dpdk.org
 
 Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
 Reviewed-by: Dekel Peled <dekelp@mellanox.com>
@@ -34,10 +35,10 @@
  1 file changed, 3 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index e87e30f65f..5f093bedd3 100644
+index 0f438bfc3b..8c3748f13c 100644
 --- a/drivers/net/mlx5/mlx5_flow_dv.c
 +++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -7517,7 +7517,9 @@ cnt_err:
+@@ -7119,7 +7119,9 @@ cnt_err:
  			action_flags |= MLX5_FLOW_ACTION_OF_POP_VLAN;
  			break;
  		case RTE_FLOW_ACTION_TYPE_OF_PUSH_VLAN:

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

* [dpdk-stable] patch 'net/mlx5: fix validation of push VLAN without full mask' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (89 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/mlx5: fix push VLAN action to use item info' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/tap: fix mbuf double free when writev fails' " luca.boccassi
                     ` (121 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Xiaoyu Min; +Cc: Dekel Peled, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From ab9701159da2a8eb298ba906aa8a7fc6c8ca086f Mon Sep 17 00:00:00 2001
From: Xiaoyu Min <jackmin@mellanox.com>
Date: Mon, 13 Apr 2020 06:32:56 +0300
Subject: [PATCH] net/mlx5: fix validation of push VLAN without full mask

[ upstream commit 889cf609e555ab6b8263cb96d06ae4c7ddfb9a24 ]

Due the limitation of HW, when PMD create push VLAN action it needs to
know what exactly the value of VID/PCP.

PMD try to figure out them via:
  - of_set_vlan_vid/pcp actions
  - VLAN item in pattern
If none of above is provided, default value - zero is used.

However user will write rule like [1] which match on a range of VID and
without of_set_vlan_vid action and expect the VID will inherit from
original packet. This is not supported by HW currently. PMD will set VID
to default value - zero because it cannot figure out the exact value of
VID from VLAN item.

This is sort of misleading for some users.

In order to avoid this, PMD will spit out error for rule like [1] to
force user to provide explicit VID/PCP for new pushed VLAN headers.

[1]: testpmd> flow create 2 ingress transfer group 0 priority 3 pattern
               eth / vlan vid spec 2859 vid prefix 4 / ipv4 / end
	       actcions  of_push_vlan ethertype 0x88A8 /
	       of_set_vlan_pcp vlan_pcp 6 / port_id id 0 / end

Fixes: 9aee7a8418d4 ("net/mlx5: support push flow action on VLAN header")

Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Reviewed-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 34 +++++++++++++++++++++++++++++++--
 1 file changed, 32 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 8c3748f13c..3574b94f4a 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1700,7 +1700,7 @@ flow_dev_get_vlan_info_from_items(const struct rte_flow_item *items,
 static int
 flow_dv_validate_action_push_vlan(struct rte_eth_dev *dev,
 				  uint64_t action_flags,
-				  uint64_t item_flags __rte_unused,
+				  const struct rte_flow_item_vlan *vlan_m,
 				  const struct rte_flow_action *action,
 				  const struct rte_flow_attr *attr,
 				  struct rte_flow_error *error)
@@ -1734,6 +1734,32 @@ flow_dv_validate_action_push_vlan(struct rte_eth_dev *dev,
 					  RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
 					  "push vlan action for VF representor "
 					  "not supported on NIC table");
+	if (vlan_m &&
+	    (vlan_m->tci & MLX5DV_FLOW_VLAN_PCP_MASK_BE) &&
+	    (vlan_m->tci & MLX5DV_FLOW_VLAN_PCP_MASK_BE) !=
+		MLX5DV_FLOW_VLAN_PCP_MASK_BE &&
+	    !(action_flags & MLX5_FLOW_ACTION_OF_SET_VLAN_PCP) &&
+	    !(mlx5_flow_find_action
+		(action + 1, RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_PCP)))
+		return rte_flow_error_set(error, EINVAL,
+					  RTE_FLOW_ERROR_TYPE_ACTION, action,
+					  "not full match mask on VLAN PCP and "
+					  "there is no of_set_vlan_pcp action, "
+					  "push VLAN action cannot figure out "
+					  "PCP value");
+	if (vlan_m &&
+	    (vlan_m->tci & MLX5DV_FLOW_VLAN_VID_MASK_BE) &&
+	    (vlan_m->tci & MLX5DV_FLOW_VLAN_VID_MASK_BE) !=
+		MLX5DV_FLOW_VLAN_VID_MASK_BE &&
+	    !(action_flags & MLX5_FLOW_ACTION_OF_SET_VLAN_VID) &&
+	    !(mlx5_flow_find_action
+		(action + 1, RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_VID)))
+		return rte_flow_error_set(error, EINVAL,
+					  RTE_FLOW_ERROR_TYPE_ACTION, action,
+					  "not full match mask on VLAN VID and "
+					  "there is no of_set_vlan_vid action, "
+					  "push VLAN action cannot figure out "
+					  "VID value");
 	(void)attr;
 	return 0;
 }
@@ -4364,6 +4390,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 	struct mlx5_priv *priv = dev->data->dev_private;
 	struct mlx5_dev_config *dev_conf = &priv->config;
 	uint16_t queue_index = 0xFFFF;
+	const struct rte_flow_item_vlan *vlan_m = NULL;
 
 	if (items == NULL)
 		return -1;
@@ -4421,6 +4448,9 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 			} else {
 				ether_type = 0;
 			}
+			/* Store outer VLAN mask for of_push_vlan action. */
+			if (!tunnel)
+				vlan_m = items->mask;
 			break;
 		case RTE_FLOW_ITEM_TYPE_IPV4:
 			mlx5_flow_tunnel_ip_check(items, next_protocol,
@@ -4727,7 +4757,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 		case RTE_FLOW_ACTION_TYPE_OF_PUSH_VLAN:
 			ret = flow_dv_validate_action_push_vlan(dev,
 								action_flags,
-								item_flags,
+								vlan_m,
 								actions, attr,
 								error);
 			if (ret < 0)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:48.223946154 +0100
+++ 0092-net-mlx5-fix-validation-of-push-VLAN-without-full-ma.patch	2020-05-19 14:04:44.300649895 +0100
@@ -1,8 +1,10 @@
-From 889cf609e555ab6b8263cb96d06ae4c7ddfb9a24 Mon Sep 17 00:00:00 2001
+From ab9701159da2a8eb298ba906aa8a7fc6c8ca086f Mon Sep 17 00:00:00 2001
 From: Xiaoyu Min <jackmin@mellanox.com>
 Date: Mon, 13 Apr 2020 06:32:56 +0300
 Subject: [PATCH] net/mlx5: fix validation of push VLAN without full mask
 
+[ upstream commit 889cf609e555ab6b8263cb96d06ae4c7ddfb9a24 ]
+
 Due the limitation of HW, when PMD create push VLAN action it needs to
 know what exactly the value of VID/PCP.
 
@@ -28,7 +30,6 @@
 	       of_set_vlan_pcp vlan_pcp 6 / port_id id 0 / end
 
 Fixes: 9aee7a8418d4 ("net/mlx5: support push flow action on VLAN header")
-Cc: stable@dpdk.org
 
 Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
 Reviewed-by: Dekel Peled <dekelp@mellanox.com>
@@ -38,10 +39,10 @@
  1 file changed, 32 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index 5f093bedd3..ae00ca431e 100644
+index 8c3748f13c..3574b94f4a 100644
 --- a/drivers/net/mlx5/mlx5_flow_dv.c
 +++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -1833,7 +1833,7 @@ flow_dev_get_vlan_info_from_items(const struct rte_flow_item *items,
+@@ -1700,7 +1700,7 @@ flow_dev_get_vlan_info_from_items(const struct rte_flow_item *items,
  static int
  flow_dv_validate_action_push_vlan(struct rte_eth_dev *dev,
  				  uint64_t action_flags,
@@ -50,7 +51,7 @@
  				  const struct rte_flow_action *action,
  				  const struct rte_flow_attr *attr,
  				  struct rte_flow_error *error)
-@@ -1867,6 +1867,32 @@ flow_dv_validate_action_push_vlan(struct rte_eth_dev *dev,
+@@ -1734,6 +1734,32 @@ flow_dv_validate_action_push_vlan(struct rte_eth_dev *dev,
  					  RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
  					  "push vlan action for VF representor "
  					  "not supported on NIC table");
@@ -83,7 +84,7 @@
  	(void)attr;
  	return 0;
  }
-@@ -4569,6 +4595,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -4364,6 +4390,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
  	struct mlx5_priv *priv = dev->data->dev_private;
  	struct mlx5_dev_config *dev_conf = &priv->config;
  	uint16_t queue_index = 0xFFFF;
@@ -91,7 +92,7 @@
  
  	if (items == NULL)
  		return -1;
-@@ -4626,6 +4653,9 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -4421,6 +4448,9 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
  			} else {
  				ether_type = 0;
  			}
@@ -101,7 +102,7 @@
  			break;
  		case RTE_FLOW_ITEM_TYPE_IPV4:
  			mlx5_flow_tunnel_ip_check(items, next_protocol,
-@@ -4941,7 +4971,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -4727,7 +4757,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
  		case RTE_FLOW_ACTION_TYPE_OF_PUSH_VLAN:
  			ret = flow_dv_validate_action_push_vlan(dev,
  								action_flags,

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

* [dpdk-stable] patch 'net/tap: fix mbuf double free when writev fails' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (90 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/mlx5: fix validation of push VLAN without full mask' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/tap: fix mbuf and mem leak during queue release' " luca.boccassi
                     ` (120 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Ferruh Yigit, Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 908866e6fc81fb9cfd6e36518be56b0f6fe3f0e3 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Thu, 16 Apr 2020 11:04:07 +0800
Subject: [PATCH] net/tap: fix mbuf double free when writev fails

[ upstream commit 24cb500c17c6914fce4c8df278b06966d70b897d ]

When the tap_write_mbufs() function return with break, mbuf was freed
without increasing num_packets, which could cause applications to free
the mbuf again. And the pmd_tx_burst() function should returns the
number of original packets it actually sent excluding tso mbufs.

Fixes: 9396ad334672 ("net/tap: fix reported number of Tx packets")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/tap/rte_eth_tap.c | 34 ++++++++++++++++++++++------------
 1 file changed, 22 insertions(+), 12 deletions(-)

diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 4b2168e440..6d54c254d7 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -520,7 +520,7 @@ tap_tx_l3_cksum(char *packet, uint64_t ol_flags, unsigned int l2_len,
 	}
 }
 
-static inline void
+static inline int
 tap_write_mbufs(struct tx_queue *txq, uint16_t num_mbufs,
 			struct rte_mbuf **pmbufs,
 			uint16_t *num_packets, unsigned long *num_tx_bytes)
@@ -587,7 +587,7 @@ tap_write_mbufs(struct tx_queue *txq, uint16_t num_mbufs,
 			seg_len = rte_pktmbuf_data_len(mbuf);
 			l234_hlen = mbuf->l2_len + mbuf->l3_len + mbuf->l4_len;
 			if (seg_len < l234_hlen)
-				break;
+				return -1;
 
 			/* To change checksums, work on a * copy of l2, l3
 			 * headers + l4 pseudo header
@@ -633,10 +633,12 @@ tap_write_mbufs(struct tx_queue *txq, uint16_t num_mbufs,
 		/* copy the tx frame data */
 		n = writev(process_private->txq_fds[txq->queue_id], iovecs, j);
 		if (n <= 0)
-			break;
+			return -1;
+
 		(*num_packets)++;
 		(*num_tx_bytes) += rte_pktmbuf_pkt_len(mbuf);
 	}
+	return 0;
 }
 
 /* Callback to handle sending packets from the tap interface
@@ -662,8 +664,8 @@ pmd_tx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 		uint16_t num_mbufs = 0;
 		uint16_t tso_segsz = 0;
 		int ret;
+		int num_tso_mbufs;
 		uint16_t hdrs_len;
-		int j;
 		uint64_t tso;
 
 		tso = mbuf_in->ol_flags & PKT_TX_TCP_SEG;
@@ -683,43 +685,51 @@ pmd_tx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 				break;
 			}
 			gso_ctx->gso_size = tso_segsz;
-			ret = rte_gso_segment(mbuf_in, /* packet to segment */
+			/* 'mbuf_in' packet to segment */
+			num_tso_mbufs = rte_gso_segment(mbuf_in,
 				gso_ctx, /* gso control block */
 				(struct rte_mbuf **)&gso_mbufs, /* out mbufs */
 				RTE_DIM(gso_mbufs)); /* max tso mbufs */
 
 			/* ret contains the number of new created mbufs */
-			if (ret < 0)
+			if (num_tso_mbufs < 0)
 				break;
 
 			mbuf = gso_mbufs;
-			num_mbufs = ret;
+			num_mbufs = num_tso_mbufs;
 		} else {
 			/* stats.errs will be incremented */
 			if (rte_pktmbuf_pkt_len(mbuf_in) > max_size)
 				break;
 
 			/* ret 0 indicates no new mbufs were created */
-			ret = 0;
+			num_tso_mbufs = 0;
 			mbuf = &mbuf_in;
 			num_mbufs = 1;
 		}
 
-		tap_write_mbufs(txq, num_mbufs, mbuf,
+		ret = tap_write_mbufs(txq, num_mbufs, mbuf,
 				&num_packets, &num_tx_bytes);
+		if (ret == -1) {
+			txq->stats.errs++;
+			/* free tso mbufs */
+			if (num_tso_mbufs > 0)
+				rte_pktmbuf_free_bulk(mbuf, num_tso_mbufs);
+			break;
+		}
 		num_tx++;
 		/* free original mbuf */
 		rte_pktmbuf_free(mbuf_in);
 		/* free tso mbufs */
-		for (j = 0; j < ret; j++)
-			rte_pktmbuf_free(mbuf[j]);
+		if (num_tso_mbufs > 0)
+			rte_pktmbuf_free_bulk(mbuf, num_tso_mbufs);
 	}
 
 	txq->stats.opackets += num_packets;
 	txq->stats.errs += nb_pkts - num_tx;
 	txq->stats.obytes += num_tx_bytes;
 
-	return num_packets;
+	return num_tx;
 }
 
 static const char *
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:48.269728872 +0100
+++ 0093-net-tap-fix-mbuf-double-free-when-writev-fails.patch	2020-05-19 14:04:44.304649968 +0100
@@ -1,15 +1,16 @@
-From 24cb500c17c6914fce4c8df278b06966d70b897d Mon Sep 17 00:00:00 2001
+From 908866e6fc81fb9cfd6e36518be56b0f6fe3f0e3 Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Thu, 16 Apr 2020 11:04:07 +0800
 Subject: [PATCH] net/tap: fix mbuf double free when writev fails
 
+[ upstream commit 24cb500c17c6914fce4c8df278b06966d70b897d ]
+
 When the tap_write_mbufs() function return with break, mbuf was freed
 without increasing num_packets, which could cause applications to free
 the mbuf again. And the pmd_tx_burst() function should returns the
 number of original packets it actually sent excluding tso mbufs.
 
 Fixes: 9396ad334672 ("net/tap: fix reported number of Tx packets")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

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

* [dpdk-stable] patch 'net/tap: fix mbuf and mem leak during queue release' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (91 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/tap: fix mbuf double free when writev fails' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/tap: fix check for mbuf number of segment' " luca.boccassi
                     ` (119 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Ferruh Yigit, Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 2fe4af64f9f3d2c979fde46a7f7ecd81f292d45a Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Thu, 16 Apr 2020 11:04:25 +0800
Subject: [PATCH] net/tap: fix mbuf and mem leak during queue release

[ upstream commit 710aa4279097e9ee5a131b7e0732e5a8ef8bcfc1 ]

For the tap PMD, we should release mbufs and iovecs from the Rx queue
when closing device. In order to remove duplicated code,
rte_pmd_tap_remove() calls tap_dev_close().

Fixes: 0781f5762cfe ("net/tap: support segmented mbufs")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/tap/rte_eth_tap.c | 36 ++++++++++++++---------------------
 1 file changed, 14 insertions(+), 22 deletions(-)

diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 6d54c254d7..9c88b9268e 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -1020,15 +1020,25 @@ tap_dev_close(struct rte_eth_dev *dev)
 	int i;
 	struct pmd_internals *internals = dev->data->dev_private;
 	struct pmd_process_private *process_private = dev->process_private;
+	struct rx_queue *rxq;
 
 	tap_link_set_down(dev);
-	tap_flow_flush(dev, NULL);
-	tap_flow_implicit_flush(internals, NULL);
+	if (internals->nlsk_fd != -1) {
+		tap_flow_flush(dev, NULL);
+		tap_flow_implicit_flush(internals, NULL);
+		tap_nl_final(internals->nlsk_fd);
+		internals->nlsk_fd = -1;
+	}
 
 	for (i = 0; i < RTE_PMD_TAP_MAX_QUEUES; i++) {
 		if (process_private->rxq_fds[i] != -1) {
+			rxq = &internals->rxq[i];
 			close(process_private->rxq_fds[i]);
 			process_private->rxq_fds[i] = -1;
+			rte_pktmbuf_free(rxq->pool);
+			rte_free(rxq->iovecs);
+			rxq->pool = NULL;
+			rxq->iovecs = NULL;
 		}
 		if (process_private->txq_fds[i] != -1) {
 			close(process_private->txq_fds[i]);
@@ -2398,8 +2408,6 @@ rte_pmd_tap_remove(struct rte_vdev_device *dev)
 {
 	struct rte_eth_dev *eth_dev = NULL;
 	struct pmd_internals *internals;
-	struct pmd_process_private *process_private;
-	int i;
 
 	/* find the ethdev entry */
 	eth_dev = rte_eth_dev_allocated(rte_vdev_device_name(dev));
@@ -2412,28 +2420,12 @@ rte_pmd_tap_remove(struct rte_vdev_device *dev)
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
 		return rte_eth_dev_release_port(eth_dev);
 
+	tap_dev_close(eth_dev);
+
 	internals = eth_dev->data->dev_private;
-	process_private = eth_dev->process_private;
-
 	TAP_LOG(DEBUG, "Closing %s Ethernet device on numa %u",
 		tuntap_types[internals->type], rte_socket_id());
 
-	if (internals->nlsk_fd) {
-		tap_flow_flush(eth_dev, NULL);
-		tap_flow_implicit_flush(internals, NULL);
-		tap_nl_final(internals->nlsk_fd);
-	}
-	for (i = 0; i < RTE_PMD_TAP_MAX_QUEUES; i++) {
-		if (process_private->rxq_fds[i] != -1) {
-			close(process_private->rxq_fds[i]);
-			process_private->rxq_fds[i] = -1;
-		}
-		if (process_private->txq_fds[i] != -1) {
-			close(process_private->txq_fds[i]);
-			process_private->txq_fds[i] = -1;
-		}
-	}
-
 	close(internals->ioctl_sock);
 	rte_free(eth_dev->process_private);
 	if (tap_devices_count == 1)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:48.307562558 +0100
+++ 0094-net-tap-fix-mbuf-and-mem-leak-during-queue-release.patch	2020-05-19 14:04:44.304649968 +0100
@@ -1,14 +1,15 @@
-From 710aa4279097e9ee5a131b7e0732e5a8ef8bcfc1 Mon Sep 17 00:00:00 2001
+From 2fe4af64f9f3d2c979fde46a7f7ecd81f292d45a Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Thu, 16 Apr 2020 11:04:25 +0800
 Subject: [PATCH] net/tap: fix mbuf and mem leak during queue release
 
+[ upstream commit 710aa4279097e9ee5a131b7e0732e5a8ef8bcfc1 ]
+
 For the tap PMD, we should release mbufs and iovecs from the Rx queue
 when closing device. In order to remove duplicated code,
 rte_pmd_tap_remove() calls tap_dev_close().
 
 Fixes: 0781f5762cfe ("net/tap: support segmented mbufs")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

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

* [dpdk-stable] patch 'net/tap: fix check for mbuf number of segment' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (92 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/tap: fix mbuf and mem leak during queue release' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/tap: fix file close on remove' " luca.boccassi
                     ` (118 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Ferruh Yigit, Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 2b74a885aafea68be58f6ad98cc2acf7af7ce086 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Thu, 16 Apr 2020 11:04:35 +0800
Subject: [PATCH] net/tap: fix check for mbuf number of segment

[ upstream commit cc6cf04f59ec20757990b3e8586b7c3a7f497720 ]

Now the rxq->pool is mbuf concatenation, but its nb_segs is 1. When
conducting some sanity checks on the mbuf with debug enabled, it fails.

Fixes: 0781f5762cfe ("net/tap: support segmented mbufs")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/tap/rte_eth_tap.c | 25 +++++++++++++++++++++----
 1 file changed, 21 insertions(+), 4 deletions(-)

diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 9c88b9268e..2846ce0d3e 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -338,6 +338,23 @@ tap_rx_offload_get_queue_capa(void)
 	       DEV_RX_OFFLOAD_TCP_CKSUM;
 }
 
+static void
+tap_rxq_pool_free(struct rte_mbuf *pool)
+{
+	struct rte_mbuf *mbuf = pool;
+	uint16_t nb_segs = 1;
+
+	if (mbuf == NULL)
+		return;
+
+	while (mbuf->next) {
+		mbuf = mbuf->next;
+		nb_segs++;
+	}
+	pool->nb_segs = nb_segs;
+	rte_pktmbuf_free(pool);
+}
+
 /* Callback to handle the rx burst of packets to the correct interface and
  * file descriptor(s) in a multi-queue setup.
  */
@@ -388,7 +405,7 @@ pmd_rx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 					goto end;
 
 				seg->next = NULL;
-				rte_pktmbuf_free(mbuf);
+				tap_rxq_pool_free(mbuf);
 
 				goto end;
 			}
@@ -1035,7 +1052,7 @@ tap_dev_close(struct rte_eth_dev *dev)
 			rxq = &internals->rxq[i];
 			close(process_private->rxq_fds[i]);
 			process_private->rxq_fds[i] = -1;
-			rte_pktmbuf_free(rxq->pool);
+			tap_rxq_pool_free(rxq->pool);
 			rte_free(rxq->iovecs);
 			rxq->pool = NULL;
 			rxq->iovecs = NULL;
@@ -1074,7 +1091,7 @@ tap_rx_queue_release(void *queue)
 	if (process_private->rxq_fds[rxq->queue_id] > 0) {
 		close(process_private->rxq_fds[rxq->queue_id]);
 		process_private->rxq_fds[rxq->queue_id] = -1;
-		rte_pktmbuf_free(rxq->pool);
+		tap_rxq_pool_free(rxq->pool);
 		rte_free(rxq->iovecs);
 		rxq->pool = NULL;
 		rxq->iovecs = NULL;
@@ -1484,7 +1501,7 @@ tap_rx_queue_setup(struct rte_eth_dev *dev,
 	return 0;
 
 error:
-	rte_pktmbuf_free(rxq->pool);
+	tap_rxq_pool_free(rxq->pool);
 	rxq->pool = NULL;
 	rte_free(rxq->iovecs);
 	rxq->iovecs = NULL;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:48.345034391 +0100
+++ 0095-net-tap-fix-check-for-mbuf-number-of-segment.patch	2020-05-19 14:04:44.304649968 +0100
@@ -1,13 +1,14 @@
-From cc6cf04f59ec20757990b3e8586b7c3a7f497720 Mon Sep 17 00:00:00 2001
+From 2b74a885aafea68be58f6ad98cc2acf7af7ce086 Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Thu, 16 Apr 2020 11:04:35 +0800
 Subject: [PATCH] net/tap: fix check for mbuf number of segment
 
+[ upstream commit cc6cf04f59ec20757990b3e8586b7c3a7f497720 ]
+
 Now the rxq->pool is mbuf concatenation, but its nb_segs is 1. When
 conducting some sanity checks on the mbuf with debug enabled, it fails.
 
 Fixes: 0781f5762cfe ("net/tap: support segmented mbufs")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

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

* [dpdk-stable] patch 'net/tap: fix file close on remove' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (93 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/tap: fix check for mbuf number of segment' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/tap: fix fd leak on creation failure' " luca.boccassi
                     ` (117 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Ferruh Yigit, Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 2523e877dcbf0ede8baf9223af113b6974225515 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Thu, 16 Apr 2020 11:04:45 +0800
Subject: [PATCH] net/tap: fix file close on remove

[ upstream commit f9d5da4ab686b331c55bb98f43237d64ab820d0b ]

The internal structure is freed and set to NULL in the
rte_eth_dev_release_port() and zero is a valid fd. Ultimately
leads to a valid fd was closed by mistake.

Fixes: 3101191c63ab ("net/tap: fix device removal when no queue exist")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/tap/rte_eth_tap.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 2846ce0d3e..41ea54888e 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -2450,10 +2450,6 @@ rte_pmd_tap_remove(struct rte_vdev_device *dev)
 	tap_devices_count--;
 	rte_eth_dev_release_port(eth_dev);
 
-	if (internals->ka_fd != -1) {
-		close(internals->ka_fd);
-		internals->ka_fd = -1;
-	}
 	return 0;
 }
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:48.383133582 +0100
+++ 0096-net-tap-fix-file-close-on-remove.patch	2020-05-19 14:04:44.308650040 +0100
@@ -1,14 +1,15 @@
-From f9d5da4ab686b331c55bb98f43237d64ab820d0b Mon Sep 17 00:00:00 2001
+From 2523e877dcbf0ede8baf9223af113b6974225515 Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Thu, 16 Apr 2020 11:04:45 +0800
 Subject: [PATCH] net/tap: fix file close on remove
 
+[ upstream commit f9d5da4ab686b331c55bb98f43237d64ab820d0b ]
+
 The internal structure is freed and set to NULL in the
 rte_eth_dev_release_port() and zero is a valid fd. Ultimately
 leads to a valid fd was closed by mistake.
 
 Fixes: 3101191c63ab ("net/tap: fix device removal when no queue exist")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

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

* [dpdk-stable] patch 'net/tap: fix fd leak on creation failure' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (94 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/tap: fix file close on remove' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/tap: fix unexpected link handler' " luca.boccassi
                     ` (116 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Ferruh Yigit, Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 8e90f78a02bdc2477e5697865c86a8832ac3e32e Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Thu, 16 Apr 2020 11:04:56 +0800
Subject: [PATCH] net/tap: fix fd leak on creation failure

[ upstream commit cbf8909b3aa16c2b1807bd980aad56d8d1e9362e ]

When eth_dev_tap_create() is failed, nlsk_fd and ka_fd won't be closed
thus leading fds leak. Zero is a valid fd. Ultimately leads to a valid
fd was closed by mistake.

Fixes: bf7b7f437b49 ("net/tap: create netdevice during probing")
Fixes: cb7e68da630a ("net/tap: fix cleanup on allocation failure")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/tap/rte_eth_tap.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 41ea54888e..fea464c3d2 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -1823,6 +1823,8 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, const char *tap_name,
 	pmd->dev = dev;
 	strlcpy(pmd->name, tap_name, sizeof(pmd->name));
 	pmd->type = type;
+	pmd->ka_fd = -1;
+	pmd->nlsk_fd = -1;
 
 	pmd->ioctl_sock = socket(AF_INET, SOCK_DGRAM, 0);
 	if (pmd->ioctl_sock == -1) {
@@ -1853,7 +1855,6 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, const char *tap_name,
 	dev->intr_handle = &pmd->intr_handle;
 
 	/* Presetup the fds to -1 as being not valid */
-	pmd->ka_fd = -1;
 	for (i = 0; i < RTE_PMD_TAP_MAX_QUEUES; i++) {
 		process_private->rxq_fds[i] = -1;
 		process_private->txq_fds[i] = -1;
@@ -1993,7 +1994,11 @@ error_remote:
 	tap_flow_implicit_flush(pmd, NULL);
 
 error_exit:
-	if (pmd->ioctl_sock > 0)
+	if (pmd->nlsk_fd != -1)
+		close(pmd->nlsk_fd);
+	if (pmd->ka_fd != -1)
+		close(pmd->ka_fd);
+	if (pmd->ioctl_sock != -1)
 		close(pmd->ioctl_sock);
 	/* mac_addrs must not be freed alone because part of dev_private */
 	dev->data->mac_addrs = NULL;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:48.421545917 +0100
+++ 0097-net-tap-fix-fd-leak-on-creation-failure.patch	2020-05-19 14:04:44.308650040 +0100
@@ -1,15 +1,16 @@
-From cbf8909b3aa16c2b1807bd980aad56d8d1e9362e Mon Sep 17 00:00:00 2001
+From 8e90f78a02bdc2477e5697865c86a8832ac3e32e Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Thu, 16 Apr 2020 11:04:56 +0800
 Subject: [PATCH] net/tap: fix fd leak on creation failure
 
+[ upstream commit cbf8909b3aa16c2b1807bd980aad56d8d1e9362e ]
+
 When eth_dev_tap_create() is failed, nlsk_fd and ka_fd won't be closed
 thus leading fds leak. Zero is a valid fd. Ultimately leads to a valid
 fd was closed by mistake.
 
 Fixes: bf7b7f437b49 ("net/tap: create netdevice during probing")
 Fixes: cb7e68da630a ("net/tap: fix cleanup on allocation failure")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

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

* [dpdk-stable] patch 'net/tap: fix unexpected link handler' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (95 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/tap: fix fd leak on creation failure' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'vhost: fix shadow update' " luca.boccassi
                     ` (115 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From d28299df0a2419b69b35ad5b3d2205ad6605a8a6 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Thu, 16 Apr 2020 21:50:52 +0800
Subject: [PATCH] net/tap: fix unexpected link handler

[ upstream commit dc1a4d86c63732e57e9593919504e8c81f46fcdf ]

The nic's interrupt source has some active handler, which maybe call
tap_dev_intr_handler() to set link handler. We should cancel the link
handler before close fd to prevent executing the link handler. It
triggers segfault.

Call Trace:
   0x00007f15e08dad99 in __rte_panic (Error adding fd %d epoll_ctl, %s\n")
   0x00007f15e08e9b87 in eal_intr_thread_main ()
   0x00007f15e249be15 in start_thread ()
   0x00007f15d5322f9d in clone ()

Fixes: c0bddd3a057f ("net/tap: add link status notification")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/tap/rte_eth_tap.c | 27 ++++++++++++++++++++++-----
 1 file changed, 22 insertions(+), 5 deletions(-)

diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index fea464c3d2..e644f8875b 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -18,6 +18,7 @@
 #include <rte_string_fns.h>
 #include <rte_ethdev.h>
 #include <rte_errno.h>
+#include <rte_cycles.h>
 
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -1599,13 +1600,12 @@ static int
 tap_lsc_intr_handle_set(struct rte_eth_dev *dev, int set)
 {
 	struct pmd_internals *pmd = dev->data->dev_private;
+	int ret;
 
 	/* In any case, disable interrupt if the conf is no longer there. */
 	if (!dev->data->dev_conf.intr_conf.lsc) {
 		if (pmd->intr_handle.fd != -1) {
-			tap_nl_final(pmd->intr_handle.fd);
-			rte_intr_callback_unregister(&pmd->intr_handle,
-				tap_dev_intr_handler, dev);
+			goto clean;
 		}
 		return 0;
 	}
@@ -1616,9 +1616,26 @@ tap_lsc_intr_handle_set(struct rte_eth_dev *dev, int set)
 		return rte_intr_callback_register(
 			&pmd->intr_handle, tap_dev_intr_handler, dev);
 	}
+
+clean:
+	do {
+		ret = rte_intr_callback_unregister(&pmd->intr_handle,
+			tap_dev_intr_handler, dev);
+		if (ret >= 0) {
+			break;
+		} else if (ret == -EAGAIN) {
+			rte_delay_ms(100);
+		} else {
+			TAP_LOG(ERR, "intr callback unregister failed: %d",
+				     ret);
+			break;
+		}
+	} while (true);
+
 	tap_nl_final(pmd->intr_handle.fd);
-	return rte_intr_callback_unregister(&pmd->intr_handle,
-					    tap_dev_intr_handler, dev);
+	pmd->intr_handle.fd = -1;
+
+	return 0;
 }
 
 static int
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:48.459531234 +0100
+++ 0098-net-tap-fix-unexpected-link-handler.patch	2020-05-19 14:04:44.308650040 +0100
@@ -1,8 +1,10 @@
-From dc1a4d86c63732e57e9593919504e8c81f46fcdf Mon Sep 17 00:00:00 2001
+From d28299df0a2419b69b35ad5b3d2205ad6605a8a6 Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Thu, 16 Apr 2020 21:50:52 +0800
 Subject: [PATCH] net/tap: fix unexpected link handler
 
+[ upstream commit dc1a4d86c63732e57e9593919504e8c81f46fcdf ]
+
 The nic's interrupt source has some active handler, which maybe call
 tap_dev_intr_handler() to set link handler. We should cancel the link
 handler before close fd to prevent executing the link handler. It
@@ -15,7 +17,6 @@
    0x00007f15d5322f9d in clone ()
 
 Fixes: c0bddd3a057f ("net/tap: add link status notification")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

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

* [dpdk-stable] patch 'vhost: fix shadow update' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (96 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/tap: fix unexpected link handler' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'vhost: fix shadowed descriptors not flushed' " luca.boccassi
                     ` (114 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Marvin Liu; +Cc: Yinan Wang, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 2f48b0530563e5ce5f383212d0da5fad758cab82 Mon Sep 17 00:00:00 2001
From: Marvin Liu <yong.liu@intel.com>
Date: Fri, 17 Apr 2020 10:39:05 +0800
Subject: [PATCH] vhost: fix shadow update

[ upstream commit 8b13d12a16e7da07326f75bb8b5b82a39bdcbe9e ]

Defer shadow ring update introduces functional issue which has been
described in Eugenio's fix patch.

The current implementation of vhost_net in packed vring tries to fill
the shadow vector before send any actual changes to the guest. While
this can be beneficial for the throughput, it conflicts with some
bufferfloats methods like the linux kernel napi, that stops
transmitting packets if there are too much bytes/buffers in the
driver.

It also introduces performance issue when frontend run much faster than
backend. Frontend may not be able to collect available descs when shadow
update is deferred. That will harm RFC2544 throughput.

Appropriate choice is to remove deferred shadowed update method.
Now shadowed used descs are flushed at the end of dequeue function.

Fixes: 31d6c6a5b820 ("vhost: optimize packed ring dequeue")

Signed-off-by: Marvin Liu <yong.liu@intel.com>
Tested-by: Yinan Wang <yinan.wang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/virtio_net.c | 46 ++---------------------------------
 1 file changed, 2 insertions(+), 44 deletions(-)

diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index 3f46f5c517..4c7ae29a36 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -382,25 +382,6 @@ vhost_shadow_enqueue_single_packed(struct virtio_net *dev,
 	}
 }
 
-static __rte_always_inline void
-vhost_flush_dequeue_packed(struct virtio_net *dev,
-			   struct vhost_virtqueue *vq)
-{
-	int shadow_count;
-	if (!vq->shadow_used_idx)
-		return;
-
-	shadow_count = vq->last_used_idx - vq->shadow_last_used_idx;
-	if (shadow_count <= 0)
-		shadow_count += vq->size;
-
-	if ((uint32_t)shadow_count >= (vq->size - MAX_PKT_BURST)) {
-		do_data_copy_dequeue(vq);
-		vhost_flush_dequeue_shadow_packed(dev, vq);
-		vhost_vring_call_packed(dev, vq);
-	}
-}
-
 /* avoid write operation when necessary, to lessen cache issues */
 #define ASSIGN_UNLESS_EQUAL(var, val) do {	\
 	if ((var) != (val))			\
@@ -2137,20 +2118,6 @@ virtio_dev_tx_packed_zmbuf(struct virtio_net *dev,
 	return pkt_idx;
 }
 
-static __rte_always_inline bool
-next_desc_is_avail(const struct vhost_virtqueue *vq)
-{
-	bool wrap_counter = vq->avail_wrap_counter;
-	uint16_t next_used_idx = vq->last_used_idx + 1;
-
-	if (next_used_idx >= vq->size) {
-		next_used_idx -= vq->size;
-		wrap_counter ^= 1;
-	}
-
-	return desc_is_avail(&vq->desc_packed[next_used_idx], wrap_counter);
-}
-
 static __rte_noinline uint16_t
 virtio_dev_tx_packed(struct virtio_net *dev,
 		     struct vhost_virtqueue *vq,
@@ -2167,7 +2134,6 @@ virtio_dev_tx_packed(struct virtio_net *dev,
 		if (remained >= PACKED_BATCH_SIZE) {
 			if (!virtio_dev_tx_batch_packed(dev, vq, mbuf_pool,
 							&pkts[pkt_idx])) {
-				vhost_flush_dequeue_packed(dev, vq);
 				pkt_idx += PACKED_BATCH_SIZE;
 				remained -= PACKED_BATCH_SIZE;
 				continue;
@@ -2177,7 +2143,6 @@ virtio_dev_tx_packed(struct virtio_net *dev,
 		if (virtio_dev_tx_single_packed(dev, vq, mbuf_pool,
 						&pkts[pkt_idx]))
 			break;
-		vhost_flush_dequeue_packed(dev, vq);
 		pkt_idx++;
 		remained--;
 
@@ -2186,15 +2151,8 @@ virtio_dev_tx_packed(struct virtio_net *dev,
 	if (vq->shadow_used_idx) {
 		do_data_copy_dequeue(vq);
 
-		if (remained && !next_desc_is_avail(vq)) {
-			/*
-			 * The guest may be waiting to TX some buffers to
-			 * enqueue more to avoid bufferfloat, so we try to
-			 * reduce latency here.
-			 */
-			vhost_flush_dequeue_shadow_packed(dev, vq);
-			vhost_vring_call_packed(dev, vq);
-		}
+		vhost_flush_dequeue_shadow_packed(dev, vq);
+		vhost_vring_call_packed(dev, vq);
 	}
 
 	return pkt_idx;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:48.497459873 +0100
+++ 0099-vhost-fix-shadow-update.patch	2020-05-19 14:04:44.312650112 +0100
@@ -1,8 +1,10 @@
-From 8b13d12a16e7da07326f75bb8b5b82a39bdcbe9e Mon Sep 17 00:00:00 2001
+From 2f48b0530563e5ce5f383212d0da5fad758cab82 Mon Sep 17 00:00:00 2001
 From: Marvin Liu <yong.liu@intel.com>
 Date: Fri, 17 Apr 2020 10:39:05 +0800
 Subject: [PATCH] vhost: fix shadow update
 
+[ upstream commit 8b13d12a16e7da07326f75bb8b5b82a39bdcbe9e ]
+
 Defer shadow ring update introduces functional issue which has been
 described in Eugenio's fix patch.
 
@@ -21,7 +23,6 @@
 Now shadowed used descs are flushed at the end of dequeue function.
 
 Fixes: 31d6c6a5b820 ("vhost: optimize packed ring dequeue")
-Cc: stable@dpdk.org
 
 Signed-off-by: Marvin Liu <yong.liu@intel.com>
 Tested-by: Yinan Wang <yinan.wang@intel.com>
@@ -31,7 +32,7 @@
  1 file changed, 2 insertions(+), 44 deletions(-)
 
 diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
-index 2104159047..4a75319432 100644
+index 3f46f5c517..4c7ae29a36 100644
 --- a/lib/librte_vhost/virtio_net.c
 +++ b/lib/librte_vhost/virtio_net.c
 @@ -382,25 +382,6 @@ vhost_shadow_enqueue_single_packed(struct virtio_net *dev,
@@ -60,7 +61,7 @@
  /* avoid write operation when necessary, to lessen cache issues */
  #define ASSIGN_UNLESS_EQUAL(var, val) do {	\
  	if ((var) != (val))			\
-@@ -2133,20 +2114,6 @@ virtio_dev_tx_packed_zmbuf(struct virtio_net *dev,
+@@ -2137,20 +2118,6 @@ virtio_dev_tx_packed_zmbuf(struct virtio_net *dev,
  	return pkt_idx;
  }
  
@@ -81,7 +82,7 @@
  static __rte_noinline uint16_t
  virtio_dev_tx_packed(struct virtio_net *dev,
  		     struct vhost_virtqueue *vq,
-@@ -2163,7 +2130,6 @@ virtio_dev_tx_packed(struct virtio_net *dev,
+@@ -2167,7 +2134,6 @@ virtio_dev_tx_packed(struct virtio_net *dev,
  		if (remained >= PACKED_BATCH_SIZE) {
  			if (!virtio_dev_tx_batch_packed(dev, vq, mbuf_pool,
  							&pkts[pkt_idx])) {
@@ -89,7 +90,7 @@
  				pkt_idx += PACKED_BATCH_SIZE;
  				remained -= PACKED_BATCH_SIZE;
  				continue;
-@@ -2173,7 +2139,6 @@ virtio_dev_tx_packed(struct virtio_net *dev,
+@@ -2177,7 +2143,6 @@ virtio_dev_tx_packed(struct virtio_net *dev,
  		if (virtio_dev_tx_single_packed(dev, vq, mbuf_pool,
  						&pkts[pkt_idx]))
  			break;
@@ -97,7 +98,7 @@
  		pkt_idx++;
  		remained--;
  
-@@ -2182,15 +2147,8 @@ virtio_dev_tx_packed(struct virtio_net *dev,
+@@ -2186,15 +2151,8 @@ virtio_dev_tx_packed(struct virtio_net *dev,
  	if (vq->shadow_used_idx) {
  		do_data_copy_dequeue(vq);
  

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

* [dpdk-stable] patch 'vhost: fix shadowed descriptors not flushed' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (97 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'vhost: fix shadow update' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/virtio-user: fix devargs parsing' " luca.boccassi
                     ` (113 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Marvin Liu; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 74a51ef091b2366b7c7751594da270eaa34187d6 Mon Sep 17 00:00:00 2001
From: Marvin Liu <yong.liu@intel.com>
Date: Fri, 17 Apr 2020 09:16:09 +0800
Subject: [PATCH] vhost: fix shadowed descriptors not flushed

[ upstream commit c7de6f9be56793a681964b2ff3ee234e9d1d551a ]

When ring size or enqueue packets not aligned with batch number, it is
possible that descs update still kept in shadowed used structure when
batched enqueue. Fix this issue by flushing remained shadowed used descs
before batch flush.

Fixes: f41516c309d7 ("vhost: flush batched enqueue descs directly")

Signed-off-by: Marvin Liu <yong.liu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/virtio_net.c | 65 +++++++++++++++++++----------------
 1 file changed, 35 insertions(+), 30 deletions(-)

diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index 4c7ae29a36..22dcdf72bd 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -43,6 +43,36 @@ is_valid_virt_queue_idx(uint32_t idx, int is_tx, uint32_t nr_vring)
 	return (is_tx ^ (idx & 1)) == 0 && idx < nr_vring;
 }
 
+static inline void
+do_data_copy_enqueue(struct virtio_net *dev, struct vhost_virtqueue *vq)
+{
+	struct batch_copy_elem *elem = vq->batch_copy_elems;
+	uint16_t count = vq->batch_copy_nb_elems;
+	int i;
+
+	for (i = 0; i < count; i++) {
+		rte_memcpy(elem[i].dst, elem[i].src, elem[i].len);
+		vhost_log_cache_write_iova(dev, vq, elem[i].log_addr,
+					   elem[i].len);
+		PRINT_PACKET(dev, (uintptr_t)elem[i].dst, elem[i].len, 0);
+	}
+
+	vq->batch_copy_nb_elems = 0;
+}
+
+static inline void
+do_data_copy_dequeue(struct vhost_virtqueue *vq)
+{
+	struct batch_copy_elem *elem = vq->batch_copy_elems;
+	uint16_t count = vq->batch_copy_nb_elems;
+	int i;
+
+	for (i = 0; i < count; i++)
+		rte_memcpy(elem[i].dst, elem[i].src, elem[i].len);
+
+	vq->batch_copy_nb_elems = 0;
+}
+
 static __rte_always_inline void
 do_flush_shadow_used_ring_split(struct virtio_net *dev,
 			struct vhost_virtqueue *vq,
@@ -186,6 +216,11 @@ vhost_flush_enqueue_batch_packed(struct virtio_net *dev,
 	uint16_t i;
 	uint16_t flags;
 
+	if (vq->shadow_used_idx) {
+		do_data_copy_enqueue(dev, vq);
+		vhost_flush_enqueue_shadow_packed(dev, vq);
+	}
+
 	flags = PACKED_DESC_ENQUEUE_USED_FLAG(vq->used_wrap_counter);
 
 	vhost_for_each_try_unroll(i, 0, PACKED_BATCH_SIZE) {
@@ -325,36 +360,6 @@ vhost_shadow_dequeue_single_packed_inorder(struct vhost_virtqueue *vq,
 	vq_inc_last_used_packed(vq, count);
 }
 
-static inline void
-do_data_copy_enqueue(struct virtio_net *dev, struct vhost_virtqueue *vq)
-{
-	struct batch_copy_elem *elem = vq->batch_copy_elems;
-	uint16_t count = vq->batch_copy_nb_elems;
-	int i;
-
-	for (i = 0; i < count; i++) {
-		rte_memcpy(elem[i].dst, elem[i].src, elem[i].len);
-		vhost_log_cache_write_iova(dev, vq, elem[i].log_addr,
-					   elem[i].len);
-		PRINT_PACKET(dev, (uintptr_t)elem[i].dst, elem[i].len, 0);
-	}
-
-	vq->batch_copy_nb_elems = 0;
-}
-
-static inline void
-do_data_copy_dequeue(struct vhost_virtqueue *vq)
-{
-	struct batch_copy_elem *elem = vq->batch_copy_elems;
-	uint16_t count = vq->batch_copy_nb_elems;
-	int i;
-
-	for (i = 0; i < count; i++)
-		rte_memcpy(elem[i].dst, elem[i].src, elem[i].len);
-
-	vq->batch_copy_nb_elems = 0;
-}
-
 static __rte_always_inline void
 vhost_shadow_enqueue_single_packed(struct virtio_net *dev,
 				   struct vhost_virtqueue *vq,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:48.535325259 +0100
+++ 0100-vhost-fix-shadowed-descriptors-not-flushed.patch	2020-05-19 14:04:44.312650112 +0100
@@ -1,15 +1,16 @@
-From c7de6f9be56793a681964b2ff3ee234e9d1d551a Mon Sep 17 00:00:00 2001
+From 74a51ef091b2366b7c7751594da270eaa34187d6 Mon Sep 17 00:00:00 2001
 From: Marvin Liu <yong.liu@intel.com>
 Date: Fri, 17 Apr 2020 09:16:09 +0800
 Subject: [PATCH] vhost: fix shadowed descriptors not flushed
 
+[ upstream commit c7de6f9be56793a681964b2ff3ee234e9d1d551a ]
+
 When ring size or enqueue packets not aligned with batch number, it is
 possible that descs update still kept in shadowed used structure when
 batched enqueue. Fix this issue by flushing remained shadowed used descs
 before batch flush.
 
 Fixes: f41516c309d7 ("vhost: flush batched enqueue descs directly")
-Cc: stable@dpdk.org
 
 Signed-off-by: Marvin Liu <yong.liu@intel.com>
 Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
@@ -18,7 +19,7 @@
  1 file changed, 35 insertions(+), 30 deletions(-)
 
 diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
-index 4a75319432..1fc30c6819 100644
+index 4c7ae29a36..22dcdf72bd 100644
 --- a/lib/librte_vhost/virtio_net.c
 +++ b/lib/librte_vhost/virtio_net.c
 @@ -43,6 +43,36 @@ is_valid_virt_queue_idx(uint32_t idx, int is_tx, uint32_t nr_vring)

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

* [dpdk-stable] patch 'net/virtio-user: fix devargs parsing' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (98 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'vhost: fix shadowed descriptors not flushed' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/tap: fix queues fd check before close' " luca.boccassi
                     ` (112 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Ivan Dyukov; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 4c587687f7c913b75a9dabc5787fb556cd158cd4 Mon Sep 17 00:00:00 2001
From: Ivan Dyukov <i.dyukov@samsung.com>
Date: Mon, 30 Mar 2020 10:58:00 +0300
Subject: [PATCH] net/virtio-user: fix devargs parsing

[ upstream commit bc5b6c11bd81ada50345db5919dc6c7850f91de1 ]

strtoull returns 0 if it fails to parse input string. It's ignored
in get_integer_arg.

This patch handles error cases for strtoull function.

Fixes: ce2eabdd43ec ("net/virtio-user: add virtual device")

Signed-off-by: Ivan Dyukov <i.dyukov@samsung.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/virtio/virtio_user_ethdev.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c
index 5637001dfc..741b3b0d60 100644
--- a/drivers/net/virtio/virtio_user_ethdev.c
+++ b/drivers/net/virtio/virtio_user_ethdev.c
@@ -477,12 +477,17 @@ static int
 get_integer_arg(const char *key __rte_unused,
 		const char *value, void *extra_args)
 {
+	uint64_t integer = 0;
 	if (!value || !extra_args)
 		return -EINVAL;
-
-	*(uint64_t *)extra_args = strtoull(value, NULL, 0);
-
-	return 0;
+	errno = 0;
+	integer = strtoull(value, NULL, 0);
+	/* extra_args keeps default value, it should be replaced
+	 * only in case of successful parsing of the 'value' arg
+	 */
+	if (errno == 0)
+		*(uint64_t *)extra_args = integer;
+	return -errno;
 }
 
 static struct rte_eth_dev *
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:48.574119922 +0100
+++ 0101-net-virtio-user-fix-devargs-parsing.patch	2020-05-19 14:04:44.312650112 +0100
@@ -1,15 +1,16 @@
-From bc5b6c11bd81ada50345db5919dc6c7850f91de1 Mon Sep 17 00:00:00 2001
+From 4c587687f7c913b75a9dabc5787fb556cd158cd4 Mon Sep 17 00:00:00 2001
 From: Ivan Dyukov <i.dyukov@samsung.com>
 Date: Mon, 30 Mar 2020 10:58:00 +0300
 Subject: [PATCH] net/virtio-user: fix devargs parsing
 
+[ upstream commit bc5b6c11bd81ada50345db5919dc6c7850f91de1 ]
+
 strtoull returns 0 if it fails to parse input string. It's ignored
 in get_integer_arg.
 
 This patch handles error cases for strtoull function.
 
 Fixes: ce2eabdd43ec ("net/virtio-user: add virtual device")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ivan Dyukov <i.dyukov@samsung.com>
 Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

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

* [dpdk-stable] patch 'net/tap: fix queues fd check before close' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (99 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/virtio-user: fix devargs parsing' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/i40e: fix flow director initialisation' " luca.boccassi
                     ` (111 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From ac051be918c7237f8db11090cf0d709d8a2925e2 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Fri, 17 Apr 2020 20:03:57 +0800
Subject: [PATCH] net/tap: fix queues fd check before close

[ upstream commit 13b698d11feca4ab12237303d553dc4e89d8a8d6 ]

The fd is possibly a negative value while it is passed as an
argument to function "close". Fix the check to the fd.

Fixes: ed8132e7c912 ("net/tap: move fds of queues to be in process private")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/tap/rte_eth_tap.c | 4 ++--
 drivers/net/tap/tap_intr.c    | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index e644f8875b..7081ae23e9 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -1089,7 +1089,7 @@ tap_rx_queue_release(void *queue)
 	if (!rxq)
 		return;
 	process_private = rte_eth_devices[rxq->in_port].process_private;
-	if (process_private->rxq_fds[rxq->queue_id] > 0) {
+	if (process_private->rxq_fds[rxq->queue_id] != -1) {
 		close(process_private->rxq_fds[rxq->queue_id]);
 		process_private->rxq_fds[rxq->queue_id] = -1;
 		tap_rxq_pool_free(rxq->pool);
@@ -1109,7 +1109,7 @@ tap_tx_queue_release(void *queue)
 		return;
 	process_private = rte_eth_devices[txq->out_port].process_private;
 
-	if (process_private->txq_fds[txq->queue_id] > 0) {
+	if (process_private->txq_fds[txq->queue_id] != -1) {
 		close(process_private->txq_fds[txq->queue_id]);
 		process_private->txq_fds[txq->queue_id] = -1;
 	}
diff --git a/drivers/net/tap/tap_intr.c b/drivers/net/tap/tap_intr.c
index 58f36d3ccb..5cf4f173a0 100644
--- a/drivers/net/tap/tap_intr.c
+++ b/drivers/net/tap/tap_intr.c
@@ -71,7 +71,7 @@ tap_rx_intr_vec_install(struct rte_eth_dev *dev)
 		struct rx_queue *rxq = pmd->dev->data->rx_queues[i];
 
 		/* Skip queues that cannot request interrupts. */
-		if (!rxq || process_private->rxq_fds[i] <= 0) {
+		if (!rxq || process_private->rxq_fds[i] == -1) {
 			/* Use invalid intr_vec[] index to disable entry. */
 			intr_handle->intr_vec[i] =
 				RTE_INTR_VEC_RXTX_OFFSET +
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:48.609446182 +0100
+++ 0102-net-tap-fix-queues-fd-check-before-close.patch	2020-05-19 14:04:44.312650112 +0100
@@ -1,13 +1,14 @@
-From 13b698d11feca4ab12237303d553dc4e89d8a8d6 Mon Sep 17 00:00:00 2001
+From ac051be918c7237f8db11090cf0d709d8a2925e2 Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Fri, 17 Apr 2020 20:03:57 +0800
 Subject: [PATCH] net/tap: fix queues fd check before close
 
+[ upstream commit 13b698d11feca4ab12237303d553dc4e89d8a8d6 ]
+
 The fd is possibly a negative value while it is passed as an
 argument to function "close". Fix the check to the fd.
 
 Fixes: ed8132e7c912 ("net/tap: move fds of queues to be in process private")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

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

* [dpdk-stable] patch 'net/i40e: fix flow director initialisation' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (100 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/tap: fix queues fd check before close' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:03   ` [dpdk-stable] patch 'common/mlx5: fix build with rdma-core 21' " luca.boccassi
                     ` (110 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Bernard Iremonger; +Cc: Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 461a2ba67a7e9836cd99aab3d0d585eed317c5bd Mon Sep 17 00:00:00 2001
From: Bernard Iremonger <bernard.iremonger@intel.com>
Date: Tue, 7 Apr 2020 16:26:41 +0100
Subject: [PATCH] net/i40e: fix flow director initialisation

[ upstream commit ae08c73e6f55e62e402fcdbfa6e8e967bf4bc5cc ]

Remove references to struct rte_fdir_conf which is deprecated,
in i40e_flow_parse_fdir_filter(), i40e_flow_destroy() and
i40e_flow_add_del_fdir_filter().

Fixes: c3be43817cfb ("net/i40e: fix unexpected skip FDIR setup")
Fixes: 2e67a7fbf3ff ("net/i40e: config flow director automatically")
Fixes: 4149825bbdb9 ("net/i40e: finish integration FDIR with generic flow API")

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/i40e_fdir.c | 4 ++--
 drivers/net/i40e/i40e_flow.c | 7 +------
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
index dee007daae..239cdbf522 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -1559,8 +1559,8 @@ i40e_flow_add_del_fdir_filter(struct rte_eth_dev *dev,
 	struct i40e_fdir_filter check_filter; /* Check if the filter exists */
 	int ret = 0;
 
-	if (dev->data->dev_conf.fdir_conf.mode != RTE_FDIR_MODE_PERFECT) {
-		PMD_DRV_LOG(ERR, "FDIR is not enabled, please check the mode in fdir_conf.");
+	if (pf->fdir.fdir_vsi == NULL) {
+		PMD_DRV_LOG(ERR, "FDIR is not enabled");
 		return -ENOTSUP;
 	}
 
diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index 61021037c8..a5bd1c7783 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -3208,8 +3208,7 @@ i40e_flow_parse_fdir_filter(struct rte_eth_dev *dev,
 
 	cons_filter_type = RTE_ETH_FILTER_FDIR;
 
-	if (dev->data->dev_conf.fdir_conf.mode != RTE_FDIR_MODE_PERFECT ||
-		pf->fdir.fdir_vsi == NULL) {
+	if (pf->fdir.fdir_vsi == NULL) {
 		/* Enable fdir when fdir flow is added at first time. */
 		ret = i40e_fdir_setup(pf);
 		if (ret != I40E_SUCCESS) {
@@ -3225,8 +3224,6 @@ i40e_flow_parse_fdir_filter(struct rte_eth_dev *dev,
 					   NULL, "Failed to configure fdir.");
 			goto err;
 		}
-
-		dev->data->dev_conf.fdir_conf.mode = RTE_FDIR_MODE_PERFECT;
 	}
 
 	return 0;
@@ -4797,8 +4794,6 @@ i40e_flow_destroy(struct rte_eth_dev *dev,
 		/* If the last flow is destroyed, disable fdir. */
 		if (!ret && TAILQ_EMPTY(&pf->fdir.fdir_list)) {
 			i40e_fdir_teardown(pf);
-			dev->data->dev_conf.fdir_conf.mode =
-				   RTE_FDIR_MODE_NONE;
 			i40e_fdir_rx_proc_enable(dev, 0);
 		}
 		break;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:48.646677538 +0100
+++ 0103-net-i40e-fix-flow-director-initialisation.patch	2020-05-19 14:04:44.320650258 +0100
@@ -1,8 +1,10 @@
-From ae08c73e6f55e62e402fcdbfa6e8e967bf4bc5cc Mon Sep 17 00:00:00 2001
+From 461a2ba67a7e9836cd99aab3d0d585eed317c5bd Mon Sep 17 00:00:00 2001
 From: Bernard Iremonger <bernard.iremonger@intel.com>
 Date: Tue, 7 Apr 2020 16:26:41 +0100
 Subject: [PATCH] net/i40e: fix flow director initialisation
 
+[ upstream commit ae08c73e6f55e62e402fcdbfa6e8e967bf4bc5cc ]
+
 Remove references to struct rte_fdir_conf which is deprecated,
 in i40e_flow_parse_fdir_filter(), i40e_flow_destroy() and
 i40e_flow_add_del_fdir_filter().
@@ -10,7 +12,6 @@
 Fixes: c3be43817cfb ("net/i40e: fix unexpected skip FDIR setup")
 Fixes: 2e67a7fbf3ff ("net/i40e: config flow director automatically")
 Fixes: 4149825bbdb9 ("net/i40e: finish integration FDIR with generic flow API")
-Cc: stable@dpdk.org
 
 Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
 Acked-by: Beilei Xing <beilei.xing@intel.com>
@@ -20,10 +21,10 @@
  2 files changed, 3 insertions(+), 8 deletions(-)
 
 diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
-index 2f24615b65..d59399afea 100644
+index dee007daae..239cdbf522 100644
 --- a/drivers/net/i40e/i40e_fdir.c
 +++ b/drivers/net/i40e/i40e_fdir.c
-@@ -1695,8 +1695,8 @@ i40e_flow_add_del_fdir_filter(struct rte_eth_dev *dev,
+@@ -1559,8 +1559,8 @@ i40e_flow_add_del_fdir_filter(struct rte_eth_dev *dev,
  	struct i40e_fdir_filter check_filter; /* Check if the filter exists */
  	int ret = 0;
  
@@ -35,10 +36,10 @@
  	}
  
 diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
-index d1bc960843..7e64ae53a3 100644
+index 61021037c8..a5bd1c7783 100644
 --- a/drivers/net/i40e/i40e_flow.c
 +++ b/drivers/net/i40e/i40e_flow.c
-@@ -3445,8 +3445,7 @@ i40e_flow_parse_fdir_filter(struct rte_eth_dev *dev,
+@@ -3208,8 +3208,7 @@ i40e_flow_parse_fdir_filter(struct rte_eth_dev *dev,
  
  	cons_filter_type = RTE_ETH_FILTER_FDIR;
  
@@ -48,7 +49,7 @@
  		/* Enable fdir when fdir flow is added at first time. */
  		ret = i40e_fdir_setup(pf);
  		if (ret != I40E_SUCCESS) {
-@@ -3462,8 +3461,6 @@ i40e_flow_parse_fdir_filter(struct rte_eth_dev *dev,
+@@ -3225,8 +3224,6 @@ i40e_flow_parse_fdir_filter(struct rte_eth_dev *dev,
  					   NULL, "Failed to configure fdir.");
  			goto err;
  		}
@@ -57,7 +58,7 @@
  	}
  
  	return 0;
-@@ -5151,8 +5148,6 @@ i40e_flow_destroy(struct rte_eth_dev *dev,
+@@ -4797,8 +4794,6 @@ i40e_flow_destroy(struct rte_eth_dev *dev,
  		/* If the last flow is destroyed, disable fdir. */
  		if (!ret && TAILQ_EMPTY(&pf->fdir.fdir_list)) {
  			i40e_fdir_teardown(pf);

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

* [dpdk-stable] patch 'common/mlx5: fix build with rdma-core 21' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (101 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/i40e: fix flow director initialisation' " luca.boccassi
@ 2020-05-19 13:03   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/mlx5: fix crash when releasing meter table' " luca.boccassi
                     ` (109 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:03 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From a9018074d1ce9bd4474e28fe0cbf06b7e3e8056a Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Thu, 16 Apr 2020 17:59:04 +0200
Subject: [PATCH] common/mlx5: fix build with rdma-core 21

[ upstream commit d53a513aedab1b4d2405ccb1157cd0b9f16f8afb ]

drivers/common/mlx5/mlx5_glue.c: In function 'mlx5_glue_devx_qp_query':
drivers/common/mlx5/mlx5_glue.c:1010:9: error:
implicit declaration of function 'mlx5dv_devx_qp_query'

The function mlx5dv_devx_qp_query() was added in rdma-core 22.
This function is compiled only if HAVE_IBV_DEVX_OBJ,
which is true if the function mlx5dv_devx_obj_create is found.
Unfortunately mlx5dv_devx_obj_create() was introduced in rdma-core 21,
when mlx5dv_devx_qp_query() did not exist yet.

A new flag HAVE_IBV_DEVX_QP is added when mlx5dv_devx_qp_query()
is found.

Fixes: 62d6f70f30f4 ("net/mlx5: add glue for queue query via DevX")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
 drivers/net/mlx5/Makefile    | 5 +++++
 drivers/net/mlx5/meson.build | 2 ++
 drivers/net/mlx5/mlx5_glue.c | 2 +-
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile
index c5cf4397ac..605975c245 100644
--- a/drivers/net/mlx5/Makefile
+++ b/drivers/net/mlx5/Makefile
@@ -193,6 +193,11 @@ mlx5_autoconf.h.new: $(RTE_SDK)/buildtools/auto-config-h.sh
 		infiniband/mlx5dv.h \
 		func mlx5dv_devx_obj_query_async \
 		$(AUTOCONF_OUTPUT)
+	$Q sh -- '$<' '$@' \
+		HAVE_IBV_DEVX_QP \
+		infiniband/mlx5dv.h \
+		func mlx5dv_devx_qp_query \
+		$(AUTOCONF_OUTPUT)
 	$Q sh -- '$<' '$@' \
 		HAVE_MLX5DV_DR_ACTION_DEST_DEVX_TIR \
 		infiniband/mlx5dv.h \
diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build
index 33c9bc5f53..a5775d18e3 100644
--- a/drivers/net/mlx5/meson.build
+++ b/drivers/net/mlx5/meson.build
@@ -143,6 +143,8 @@ if build
 		'MLX5DV_FLOW_ACTION_COUNTERS_DEVX' ],
 		[ 'HAVE_IBV_DEVX_ASYNC', 'infiniband/mlx5dv.h',
 		'mlx5dv_devx_obj_query_async' ],
+		[ 'HAVE_IBV_DEVX_QP', 'infiniband/mlx5dv.h',
+		'mlx5dv_devx_qp_query' ],
 		[ 'HAVE_MLX5DV_DR_ACTION_DEST_DEVX_TIR', 'infiniband/mlx5dv.h',
 		'mlx5dv_dr_action_create_dest_devx_tir' ],
 		[ 'HAVE_MLX5_DR_CREATE_ACTION_FLOW_METER', 'infiniband/mlx5dv.h',
diff --git a/drivers/net/mlx5/mlx5_glue.c b/drivers/net/mlx5/mlx5_glue.c
index c5880dd6f2..c2dd0392d0 100644
--- a/drivers/net/mlx5/mlx5_glue.c
+++ b/drivers/net/mlx5/mlx5_glue.c
@@ -1012,7 +1012,7 @@ mlx5_glue_devx_qp_query(struct ibv_qp *qp,
 			const void *in, size_t inlen,
 			void *out, size_t outlen)
 {
-#ifdef HAVE_IBV_DEVX_OBJ
+#ifdef HAVE_IBV_DEVX_QP
 	return mlx5dv_devx_qp_query(qp, in, inlen, out, outlen);
 #else
 	(void)qp;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:48.689886957 +0100
+++ 0104-common-mlx5-fix-build-with-rdma-core-21.patch	2020-05-19 14:04:44.320650258 +0100
@@ -1,8 +1,10 @@
-From d53a513aedab1b4d2405ccb1157cd0b9f16f8afb Mon Sep 17 00:00:00 2001
+From a9018074d1ce9bd4474e28fe0cbf06b7e3e8056a Mon Sep 17 00:00:00 2001
 From: Thomas Monjalon <thomas@monjalon.net>
 Date: Thu, 16 Apr 2020 17:59:04 +0200
 Subject: [PATCH] common/mlx5: fix build with rdma-core 21
 
+[ upstream commit d53a513aedab1b4d2405ccb1157cd0b9f16f8afb ]
+
 drivers/common/mlx5/mlx5_glue.c: In function 'mlx5_glue_devx_qp_query':
 drivers/common/mlx5/mlx5_glue.c:1010:9: error:
 implicit declaration of function 'mlx5dv_devx_qp_query'
@@ -17,21 +19,20 @@
 is found.
 
 Fixes: 62d6f70f30f4 ("net/mlx5: add glue for queue query via DevX")
-Cc: stable@dpdk.org
 
 Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
 Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
 ---
- drivers/common/mlx5/Makefile    | 5 +++++
- drivers/common/mlx5/meson.build | 2 ++
- drivers/common/mlx5/mlx5_glue.c | 2 +-
+ drivers/net/mlx5/Makefile    | 5 +++++
+ drivers/net/mlx5/meson.build | 2 ++
+ drivers/net/mlx5/mlx5_glue.c | 2 +-
  3 files changed, 8 insertions(+), 1 deletion(-)
 
-diff --git a/drivers/common/mlx5/Makefile b/drivers/common/mlx5/Makefile
-index 0c67755225..8b663ef25f 100644
---- a/drivers/common/mlx5/Makefile
-+++ b/drivers/common/mlx5/Makefile
-@@ -152,6 +152,11 @@ mlx5_autoconf.h.new: $(RTE_SDK)/buildtools/auto-config-h.sh
+diff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile
+index c5cf4397ac..605975c245 100644
+--- a/drivers/net/mlx5/Makefile
++++ b/drivers/net/mlx5/Makefile
+@@ -193,6 +193,11 @@ mlx5_autoconf.h.new: $(RTE_SDK)/buildtools/auto-config-h.sh
  		infiniband/mlx5dv.h \
  		func mlx5dv_devx_obj_query_async \
  		$(AUTOCONF_OUTPUT)
@@ -43,24 +44,24 @@
  	$Q sh -- '$<' '$@' \
  		HAVE_MLX5DV_DR_ACTION_DEST_DEVX_TIR \
  		infiniband/mlx5dv.h \
-diff --git a/drivers/common/mlx5/meson.build b/drivers/common/mlx5/meson.build
-index 347d282193..165aa25523 100644
---- a/drivers/common/mlx5/meson.build
-+++ b/drivers/common/mlx5/meson.build
-@@ -120,6 +120,8 @@ has_sym_args = [
- 	'MLX5DV_FLOW_ACTION_COUNTERS_DEVX' ],
- 	[ 'HAVE_IBV_DEVX_ASYNC', 'infiniband/mlx5dv.h',
- 	'mlx5dv_devx_obj_query_async' ],
-+	[ 'HAVE_IBV_DEVX_QP', 'infiniband/mlx5dv.h',
-+	'mlx5dv_devx_qp_query' ],
- 	[ 'HAVE_MLX5DV_DR_ACTION_DEST_DEVX_TIR', 'infiniband/mlx5dv.h',
- 	'mlx5dv_dr_action_create_dest_devx_tir' ],
- 	[ 'HAVE_IBV_DEVX_EVENT', 'infiniband/mlx5dv.h',
-diff --git a/drivers/common/mlx5/mlx5_glue.c b/drivers/common/mlx5/mlx5_glue.c
-index 428de0ffd9..f270f677b7 100644
---- a/drivers/common/mlx5/mlx5_glue.c
-+++ b/drivers/common/mlx5/mlx5_glue.c
-@@ -1006,7 +1006,7 @@ mlx5_glue_devx_qp_query(struct ibv_qp *qp,
+diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build
+index 33c9bc5f53..a5775d18e3 100644
+--- a/drivers/net/mlx5/meson.build
++++ b/drivers/net/mlx5/meson.build
+@@ -143,6 +143,8 @@ if build
+ 		'MLX5DV_FLOW_ACTION_COUNTERS_DEVX' ],
+ 		[ 'HAVE_IBV_DEVX_ASYNC', 'infiniband/mlx5dv.h',
+ 		'mlx5dv_devx_obj_query_async' ],
++		[ 'HAVE_IBV_DEVX_QP', 'infiniband/mlx5dv.h',
++		'mlx5dv_devx_qp_query' ],
+ 		[ 'HAVE_MLX5DV_DR_ACTION_DEST_DEVX_TIR', 'infiniband/mlx5dv.h',
+ 		'mlx5dv_dr_action_create_dest_devx_tir' ],
+ 		[ 'HAVE_MLX5_DR_CREATE_ACTION_FLOW_METER', 'infiniband/mlx5dv.h',
+diff --git a/drivers/net/mlx5/mlx5_glue.c b/drivers/net/mlx5/mlx5_glue.c
+index c5880dd6f2..c2dd0392d0 100644
+--- a/drivers/net/mlx5/mlx5_glue.c
++++ b/drivers/net/mlx5/mlx5_glue.c
+@@ -1012,7 +1012,7 @@ mlx5_glue_devx_qp_query(struct ibv_qp *qp,
  			const void *in, size_t inlen,
  			void *out, size_t outlen)
  {

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

* [dpdk-stable] patch 'net/mlx5: fix crash when releasing meter table' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (102 preceding siblings ...)
  2020-05-19 13:03   ` [dpdk-stable] patch 'common/mlx5: fix build with rdma-core 21' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/mlx5: fix header modify action validation' " luca.boccassi
                     ` (108 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Tonghao Zhang; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From da5c4ff51b3bd72c44096d4d1f24db301a966237 Mon Sep 17 00:00:00 2001
From: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Date: Wed, 15 Apr 2020 16:52:29 +0800
Subject: [PATCH] net/mlx5: fix crash when releasing meter table

[ upstream commit 0d7d180a0dda4b97021fc1f580d6bfe3b42a332d ]

The meters of ports share the same meter table on
the port. When releasing meters, don't check value returned
using assert. Because other meters may reference to it.

Fixes: 46a5e6bc6a85 ("net/mlx5: prepare meter flow tables")
Fixes: 9dbaf7eef6e1 ("net/mlx5: fix meter suffix table leak")

Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 3574b94f4a..acc0fd3271 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -8144,11 +8144,9 @@ flow_dv_destroy_mtr_tbl(struct rte_eth_dev *dev,
 		claim_zero(mlx5_glue->dv_destroy_flow_matcher
 			  (mtd->egress.any_matcher));
 	if (mtd->egress.tbl)
-		claim_zero(flow_dv_tbl_resource_release(dev,
-							mtd->egress.tbl));
+		flow_dv_tbl_resource_release(dev, mtd->egress.tbl);
 	if (mtd->egress.sfx_tbl)
-		claim_zero(flow_dv_tbl_resource_release(dev,
-							mtd->egress.sfx_tbl));
+		flow_dv_tbl_resource_release(dev, mtd->egress.sfx_tbl);
 	if (mtd->ingress.color_matcher)
 		claim_zero(mlx5_glue->dv_destroy_flow_matcher
 			  (mtd->ingress.color_matcher));
@@ -8156,11 +8154,9 @@ flow_dv_destroy_mtr_tbl(struct rte_eth_dev *dev,
 		claim_zero(mlx5_glue->dv_destroy_flow_matcher
 			  (mtd->ingress.any_matcher));
 	if (mtd->ingress.tbl)
-		claim_zero(flow_dv_tbl_resource_release(dev,
-							mtd->ingress.tbl));
+		flow_dv_tbl_resource_release(dev, mtd->ingress.tbl);
 	if (mtd->ingress.sfx_tbl)
-		claim_zero(flow_dv_tbl_resource_release(dev,
-							mtd->ingress.sfx_tbl));
+		flow_dv_tbl_resource_release(dev, mtd->ingress.sfx_tbl);
 	if (mtd->transfer.color_matcher)
 		claim_zero(mlx5_glue->dv_destroy_flow_matcher
 			  (mtd->transfer.color_matcher));
@@ -8168,11 +8164,9 @@ flow_dv_destroy_mtr_tbl(struct rte_eth_dev *dev,
 		claim_zero(mlx5_glue->dv_destroy_flow_matcher
 			  (mtd->transfer.any_matcher));
 	if (mtd->transfer.tbl)
-		claim_zero(flow_dv_tbl_resource_release(dev,
-							mtd->transfer.tbl));
+		flow_dv_tbl_resource_release(dev, mtd->transfer.tbl);
 	if (mtd->transfer.sfx_tbl)
-		claim_zero(flow_dv_tbl_resource_release(dev,
-							mtd->transfer.sfx_tbl));
+		flow_dv_tbl_resource_release(dev, mtd->transfer.sfx_tbl);
 	if (mtd->drop_actn)
 		claim_zero(mlx5_glue->destroy_flow_action(mtd->drop_actn));
 	rte_free(mtd);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:48.727023141 +0100
+++ 0105-net-mlx5-fix-crash-when-releasing-meter-table.patch	2020-05-19 14:04:44.328650403 +0100
@@ -1,15 +1,16 @@
-From 0d7d180a0dda4b97021fc1f580d6bfe3b42a332d Mon Sep 17 00:00:00 2001
+From da5c4ff51b3bd72c44096d4d1f24db301a966237 Mon Sep 17 00:00:00 2001
 From: Tonghao Zhang <xiangxia.m.yue@gmail.com>
 Date: Wed, 15 Apr 2020 16:52:29 +0800
 Subject: [PATCH] net/mlx5: fix crash when releasing meter table
 
+[ upstream commit 0d7d180a0dda4b97021fc1f580d6bfe3b42a332d ]
+
 The meters of ports share the same meter table on
 the port. When releasing meters, don't check value returned
 using assert. Because other meters may reference to it.
 
 Fixes: 46a5e6bc6a85 ("net/mlx5: prepare meter flow tables")
 Fixes: 9dbaf7eef6e1 ("net/mlx5: fix meter suffix table leak")
-Cc: stable@dpdk.org
 
 Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
 Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
@@ -18,10 +19,10 @@
  1 file changed, 6 insertions(+), 12 deletions(-)
 
 diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index e156c79e01..c6d132c6b7 100644
+index 3574b94f4a..acc0fd3271 100644
 --- a/drivers/net/mlx5/mlx5_flow_dv.c
 +++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -8699,11 +8699,9 @@ flow_dv_destroy_mtr_tbl(struct rte_eth_dev *dev,
+@@ -8144,11 +8144,9 @@ flow_dv_destroy_mtr_tbl(struct rte_eth_dev *dev,
  		claim_zero(mlx5_glue->dv_destroy_flow_matcher
  			  (mtd->egress.any_matcher));
  	if (mtd->egress.tbl)
@@ -35,7 +36,7 @@
  	if (mtd->ingress.color_matcher)
  		claim_zero(mlx5_glue->dv_destroy_flow_matcher
  			  (mtd->ingress.color_matcher));
-@@ -8711,11 +8709,9 @@ flow_dv_destroy_mtr_tbl(struct rte_eth_dev *dev,
+@@ -8156,11 +8154,9 @@ flow_dv_destroy_mtr_tbl(struct rte_eth_dev *dev,
  		claim_zero(mlx5_glue->dv_destroy_flow_matcher
  			  (mtd->ingress.any_matcher));
  	if (mtd->ingress.tbl)
@@ -49,7 +50,7 @@
  	if (mtd->transfer.color_matcher)
  		claim_zero(mlx5_glue->dv_destroy_flow_matcher
  			  (mtd->transfer.color_matcher));
-@@ -8723,11 +8719,9 @@ flow_dv_destroy_mtr_tbl(struct rte_eth_dev *dev,
+@@ -8168,11 +8164,9 @@ flow_dv_destroy_mtr_tbl(struct rte_eth_dev *dev,
  		claim_zero(mlx5_glue->dv_destroy_flow_matcher
  			  (mtd->transfer.any_matcher));
  	if (mtd->transfer.tbl)

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

* [dpdk-stable] patch 'net/mlx5: fix header modify action validation' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (103 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/mlx5: fix crash when releasing meter table' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/mlx5: set dynamic flow metadata in Rx queues' " luca.boccassi
                     ` (107 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Bing Zhao; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From bf10f18c64b7ab27ec38682f4eefe4702a7ef9b2 Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@mellanox.com>
Date: Tue, 21 Apr 2020 22:03:34 +0800
Subject: [PATCH] net/mlx5: fix header modify action validation

[ upstream commit 72a944dba1639fff11f74c5ae1ab7d622bcc39fd ]

The header modify actions number supported now has some limitation,
and it is decided by both driver and hardware. If the configuration
is different or the table to insert the flow is different, the result
might be different if the flow contains header modify actions.
Currently, the actual action number could only be calculated in the
later stage called translate, from user specified value to the driver
format. And the action numbers checking is missed in the flow
validation. So PMD will return incorrect result to indicate the
flow actions are valid by rte_flow_validate but then it will fail
when calling rte_flow_create.

Adding some simple checking in the validation will help to get rid
of this incorrect checking. Most of the actions will only consume 1
SW action field except the MAC address and IPv6 address. And from
SW POV, the maximal action fields for these will be consumed even if
only part of such field will be modified because that there is no
mask in the flow actions and the mask will always be all ONEs.

The metering or extra metadata supports will cost one more action.

Fixes: 9597330c6844 ("net/mlx5: update modify header action translator")

Signed-off-by: Bing Zhao <bingz@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow.c       | 58 +++++++++++++++-------------
 drivers/net/mlx5/mlx5_flow.h       | 18 +++++++++
 drivers/net/mlx5/mlx5_flow_dv.c    | 61 ++++++++++++++++++++++++++----
 drivers/net/mlx5/mlx5_flow_verbs.c |  3 ++
 4 files changed, 106 insertions(+), 34 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 55f514af30..05e2d4c82a 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -2302,6 +2302,7 @@ flow_null_validate(struct rte_eth_dev *dev __rte_unused,
 		   const struct rte_flow_item items[] __rte_unused,
 		   const struct rte_flow_action actions[] __rte_unused,
 		   bool external __rte_unused,
+		   int hairpin __rte_unused,
 		   struct rte_flow_error *error)
 {
 	return rte_flow_error_set(error, ENOTSUP,
@@ -2416,6 +2417,8 @@ flow_get_drv_type(struct rte_eth_dev *dev, const struct rte_flow_attr *attr)
  *   Pointer to the list of actions.
  * @param[in] external
  *   This flow rule is created by request external to PMD.
+ * @param[in] hairpin
+ *   Number of hairpin TX actions, 0 means classic flow.
  * @param[out] error
  *   Pointer to the error structure.
  *
@@ -2427,13 +2430,14 @@ flow_drv_validate(struct rte_eth_dev *dev,
 		  const struct rte_flow_attr *attr,
 		  const struct rte_flow_item items[],
 		  const struct rte_flow_action actions[],
-		  bool external, struct rte_flow_error *error)
+		  bool external, int hairpin, struct rte_flow_error *error)
 {
 	const struct mlx5_flow_driver_ops *fops;
 	enum mlx5_flow_drv_type type = flow_get_drv_type(dev, attr);
 
 	fops = flow_get_drv_ops(type);
-	return fops->validate(dev, attr, items, actions, external, error);
+	return fops->validate(dev, attr, items, actions, external,
+			      hairpin, error);
 }
 
 /**
@@ -2591,27 +2595,6 @@ flow_drv_destroy(struct rte_eth_dev *dev, struct rte_flow *flow)
 	fops->destroy(dev, flow);
 }
 
-/**
- * Validate a flow supported by the NIC.
- *
- * @see rte_flow_validate()
- * @see rte_flow_ops
- */
-int
-mlx5_flow_validate(struct rte_eth_dev *dev,
-		   const struct rte_flow_attr *attr,
-		   const struct rte_flow_item items[],
-		   const struct rte_flow_action actions[],
-		   struct rte_flow_error *error)
-{
-	int ret;
-
-	ret = flow_drv_validate(dev, attr, items, actions, true, error);
-	if (ret < 0)
-		return ret;
-	return 0;
-}
-
 /**
  * Get RSS action from the action list.
  *
@@ -4184,15 +4167,16 @@ flow_list_create(struct rte_eth_dev *dev, struct mlx5_flows *list,
 	const struct rte_flow_action *p_actions_rx = actions;
 	uint32_t i;
 	uint32_t flow_size;
-	int hairpin_flow = 0;
+	int hairpin_flow;
 	uint32_t hairpin_id = 0;
 	struct rte_flow_attr attr_tx = { .priority = 0 };
-	int ret = flow_drv_validate(dev, attr, items, p_actions_rx, external,
-				    error);
+	int ret;
 
+	hairpin_flow = flow_check_hairpin_split(dev, attr, actions);
+	ret = flow_drv_validate(dev, attr, items, p_actions_rx,
+				external, hairpin_flow, error);
 	if (ret < 0)
 		return NULL;
-	hairpin_flow = flow_check_hairpin_split(dev, attr, actions);
 	if (hairpin_flow > 0) {
 		if (hairpin_flow > MLX5_MAX_SPLIT_ACTIONS) {
 			rte_errno = EINVAL;
@@ -4369,6 +4353,26 @@ mlx5_flow_create_esw_table_zero_flow(struct rte_eth_dev *dev)
 				actions, false, &error);
 }
 
+/**
+ * Validate a flow supported by the NIC.
+ *
+ * @see rte_flow_validate()
+ * @see rte_flow_ops
+ */
+int
+mlx5_flow_validate(struct rte_eth_dev *dev,
+		   const struct rte_flow_attr *attr,
+		   const struct rte_flow_item items[],
+		   const struct rte_flow_action actions[],
+		   struct rte_flow_error *error)
+{
+	int hairpin_flow;
+
+	hairpin_flow = flow_check_hairpin_split(dev, attr, actions);
+	return flow_drv_validate(dev, attr, items, actions,
+				true, hairpin_flow, error);
+}
+
 /**
  * Create a flow.
  *
diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index 6d278c63d8..4e38d3fa5a 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -330,6 +330,23 @@ enum mlx5_feature_name {
 #define MLX5_ENCAPSULATION_DECISION_SIZE (sizeof(struct rte_flow_item_eth) + \
 					  sizeof(struct rte_flow_item_ipv4))
 
+/* Software header modify action numbers of a flow. */
+#define MLX5_ACT_NUM_MDF_IPV4		1
+#define MLX5_ACT_NUM_MDF_IPV6		4
+#define MLX5_ACT_NUM_MDF_MAC		2
+#define MLX5_ACT_NUM_MDF_VID		1
+#define MLX5_ACT_NUM_MDF_PORT		2
+#define MLX5_ACT_NUM_MDF_TTL		1
+#define MLX5_ACT_NUM_DEC_TTL		MLX5_ACT_NUM_MDF_TTL
+#define MLX5_ACT_NUM_MDF_TCPSEQ		1
+#define MLX5_ACT_NUM_MDF_TCPACK		1
+#define MLX5_ACT_NUM_SET_REG		1
+#define MLX5_ACT_NUM_SET_TAG		1
+#define MLX5_ACT_NUM_CPY_MREG		MLX5_ACT_NUM_SET_TAG
+#define MLX5_ACT_NUM_SET_MARK		MLX5_ACT_NUM_SET_TAG
+#define MLX5_ACT_NUM_SET_META		MLX5_ACT_NUM_SET_TAG
+#define MLX5_ACT_NUM_SET_DSCP		1
+
 enum mlx5_flow_drv_type {
 	MLX5_FLOW_TYPE_MIN,
 	MLX5_FLOW_TYPE_DV,
@@ -677,6 +694,7 @@ typedef int (*mlx5_flow_validate_t)(struct rte_eth_dev *dev,
 				    const struct rte_flow_item items[],
 				    const struct rte_flow_action actions[],
 				    bool external,
+				    int hairpin,
 				    struct rte_flow_error *error);
 typedef struct mlx5_flow *(*mlx5_flow_prepare_t)
 	(const struct rte_flow_attr *attr, const struct rte_flow_item items[],
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index acc0fd3271..8d326f0229 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -427,6 +427,7 @@ flow_dv_convert_modify_action(struct rte_flow_item *item,
 		/* Fetch variable byte size mask from the array. */
 		mask = flow_dv_fetch_field((const uint8_t *)item->mask +
 					   field->offset, field->size);
+		assert(mask);
 		if (!mask) {
 			++field;
 			continue;
@@ -4285,7 +4286,9 @@ flow_dv_counter_release(struct rte_eth_dev *dev,
  *   Pointer to error structure.
  *
  * @return
- *   0 on success, a negative errno value otherwise and rte_errno is set.
+ *   - 0 on success and non root table.
+ *   - 1 on success and root table.
+ *   - a negative errno value otherwise and rte_errno is set.
  */
 static int
 flow_dv_validate_attributes(struct rte_eth_dev *dev,
@@ -4295,6 +4298,7 @@ flow_dv_validate_attributes(struct rte_eth_dev *dev,
 {
 	struct mlx5_priv *priv = dev->data->dev_private;
 	uint32_t priority_max = priv->config.flow_prio - 1;
+	int ret = 0;
 
 #ifndef HAVE_MLX5DV_DR
 	if (attributes->group)
@@ -4303,14 +4307,15 @@ flow_dv_validate_attributes(struct rte_eth_dev *dev,
 					  NULL,
 					  "groups are not supported");
 #else
-	uint32_t table;
-	int ret;
+	uint32_t table = 0;
 
 	ret = mlx5_flow_group_to_table(attributes, external,
 				       attributes->group, !!priv->fdb_def_rule,
 				       &table, error);
 	if (ret)
 		return ret;
+	if (!table)
+		ret = MLX5DV_DR_ACTION_FLAGS_ROOT_LEVEL;
 #endif
 	if (attributes->priority != MLX5_FLOW_PRIO_RSVD &&
 	    attributes->priority >= priority_max)
@@ -4340,7 +4345,7 @@ flow_dv_validate_attributes(struct rte_eth_dev *dev,
 					  RTE_FLOW_ERROR_TYPE_ATTR, NULL,
 					  "must specify exactly one of "
 					  "ingress or egress");
-	return 0;
+	return ret;
 }
 
 /**
@@ -4356,6 +4361,8 @@ flow_dv_validate_attributes(struct rte_eth_dev *dev,
  *   Pointer to the list of actions.
  * @param[in] external
  *   This flow rule is created by request external to PMD.
+ * @param[in] hairpin
+ *   Number of hairpin TX actions, 0 means classic flow.
  * @param[out] error
  *   Pointer to the error structure.
  *
@@ -4366,7 +4373,7 @@ static int
 flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 		 const struct rte_flow_item items[],
 		 const struct rte_flow_action actions[],
-		 bool external, struct rte_flow_error *error)
+		 bool external, int hairpin, struct rte_flow_error *error)
 {
 	int ret;
 	uint64_t action_flags = 0;
@@ -4391,12 +4398,15 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 	struct mlx5_dev_config *dev_conf = &priv->config;
 	uint16_t queue_index = 0xFFFF;
 	const struct rte_flow_item_vlan *vlan_m = NULL;
+	int16_t rw_act_num = 0;
+	uint64_t is_root;
 
 	if (items == NULL)
 		return -1;
 	ret = flow_dv_validate_attributes(dev, attr, external, error);
 	if (ret < 0)
 		return ret;
+	is_root = (uint64_t)ret;
 	for (; items->type != RTE_FLOW_ITEM_TYPE_END; items++) {
 		int tunnel = !!(item_flags & MLX5_FLOW_LAYER_TUNNEL);
 		int type = items->type;
@@ -4664,6 +4674,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 				action_flags |= MLX5_FLOW_ACTION_FLAG;
 				++actions_n;
 			}
+			rw_act_num += MLX5_ACT_NUM_SET_MARK;
 			break;
 		case RTE_FLOW_ACTION_TYPE_MARK:
 			ret = flow_dv_validate_action_mark(dev, actions,
@@ -4682,6 +4693,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 				action_flags |= MLX5_FLOW_ACTION_MARK;
 				++actions_n;
 			}
+			rw_act_num += MLX5_ACT_NUM_SET_MARK;
 			break;
 		case RTE_FLOW_ACTION_TYPE_SET_META:
 			ret = flow_dv_validate_action_set_meta(dev, actions,
@@ -4693,6 +4705,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 			if (!(action_flags & MLX5_FLOW_MODIFY_HDR_ACTIONS))
 				++actions_n;
 			action_flags |= MLX5_FLOW_ACTION_SET_META;
+			rw_act_num += MLX5_ACT_NUM_SET_META;
 			break;
 		case RTE_FLOW_ACTION_TYPE_SET_TAG:
 			ret = flow_dv_validate_action_set_tag(dev, actions,
@@ -4704,6 +4717,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 			if (!(action_flags & MLX5_FLOW_MODIFY_HDR_ACTIONS))
 				++actions_n;
 			action_flags |= MLX5_FLOW_ACTION_SET_TAG;
+			rw_act_num += MLX5_ACT_NUM_SET_TAG;
 			break;
 		case RTE_FLOW_ACTION_TYPE_DROP:
 			ret = mlx5_flow_validate_action_drop(action_flags,
@@ -4781,6 +4795,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 				return ret;
 			/* Count VID with push_vlan command. */
 			action_flags |= MLX5_FLOW_ACTION_OF_SET_VLAN_VID;
+			rw_act_num += MLX5_ACT_NUM_MDF_VID;
 			break;
 		case RTE_FLOW_ACTION_TYPE_VXLAN_ENCAP:
 		case RTE_FLOW_ACTION_TYPE_NVGRE_ENCAP:
@@ -4842,8 +4857,15 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 					RTE_FLOW_ACTION_TYPE_SET_MAC_SRC ?
 						MLX5_FLOW_ACTION_SET_MAC_SRC :
 						MLX5_FLOW_ACTION_SET_MAC_DST;
+			/*
+			 * Even if the source and destination MAC addresses have
+			 * overlap in the header with 4B alignment, the convert
+			 * function will handle them separately and 4 SW actions
+			 * will be created. And 2 actions will be added each
+			 * time no matter how many bytes of address will be set.
+			 */
+			rw_act_num += MLX5_ACT_NUM_MDF_MAC;
 			break;
-
 		case RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC:
 		case RTE_FLOW_ACTION_TYPE_SET_IPV4_DST:
 			ret = flow_dv_validate_action_modify_ipv4(action_flags,
@@ -4859,6 +4881,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 					RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC ?
 						MLX5_FLOW_ACTION_SET_IPV4_SRC :
 						MLX5_FLOW_ACTION_SET_IPV4_DST;
+			rw_act_num += MLX5_ACT_NUM_MDF_IPV4;
 			break;
 		case RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC:
 		case RTE_FLOW_ACTION_TYPE_SET_IPV6_DST:
@@ -4881,6 +4904,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 					RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC ?
 						MLX5_FLOW_ACTION_SET_IPV6_SRC :
 						MLX5_FLOW_ACTION_SET_IPV6_DST;
+			rw_act_num += MLX5_ACT_NUM_MDF_IPV6;
 			break;
 		case RTE_FLOW_ACTION_TYPE_SET_TP_SRC:
 		case RTE_FLOW_ACTION_TYPE_SET_TP_DST:
@@ -4897,6 +4921,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 					RTE_FLOW_ACTION_TYPE_SET_TP_SRC ?
 						MLX5_FLOW_ACTION_SET_TP_SRC :
 						MLX5_FLOW_ACTION_SET_TP_DST;
+			rw_act_num += MLX5_ACT_NUM_MDF_PORT;
 			break;
 		case RTE_FLOW_ACTION_TYPE_DEC_TTL:
 		case RTE_FLOW_ACTION_TYPE_SET_TTL:
@@ -4913,6 +4938,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 					RTE_FLOW_ACTION_TYPE_SET_TTL ?
 						MLX5_FLOW_ACTION_SET_TTL :
 						MLX5_FLOW_ACTION_DEC_TTL;
+			rw_act_num += MLX5_ACT_NUM_MDF_TTL;
 			break;
 		case RTE_FLOW_ACTION_TYPE_JUMP:
 			ret = flow_dv_validate_action_jump(actions,
@@ -4940,6 +4966,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 					RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ ?
 						MLX5_FLOW_ACTION_INC_TCP_SEQ :
 						MLX5_FLOW_ACTION_DEC_TCP_SEQ;
+			rw_act_num += MLX5_ACT_NUM_MDF_TCPSEQ;
 			break;
 		case RTE_FLOW_ACTION_TYPE_INC_TCP_ACK:
 		case RTE_FLOW_ACTION_TYPE_DEC_TCP_ACK:
@@ -4957,10 +4984,13 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 					RTE_FLOW_ACTION_TYPE_INC_TCP_ACK ?
 						MLX5_FLOW_ACTION_INC_TCP_ACK :
 						MLX5_FLOW_ACTION_DEC_TCP_ACK;
+			rw_act_num += MLX5_ACT_NUM_MDF_TCPACK;
 			break;
-		case MLX5_RTE_FLOW_ACTION_TYPE_TAG:
 		case MLX5_RTE_FLOW_ACTION_TYPE_MARK:
+			break;
+		case MLX5_RTE_FLOW_ACTION_TYPE_TAG:
 		case MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG:
+			rw_act_num += MLX5_ACT_NUM_SET_TAG;
 			break;
 		case RTE_FLOW_ACTION_TYPE_METER:
 			ret = mlx5_flow_validate_action_meter(dev,
@@ -4971,6 +5001,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 				return ret;
 			action_flags |= MLX5_FLOW_ACTION_METER;
 			++actions_n;
+			/* Meter action will add one more TAG action. */
+			rw_act_num += MLX5_ACT_NUM_SET_TAG;
 			break;
 		default:
 			return rte_flow_error_set(error, ENOTSUP,
@@ -5043,6 +5075,21 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 						  NULL, "encap is not supported"
 						  " for ingress traffic");
 	}
+	/* Hairpin flow will add one more TAG action. */
+	if (hairpin > 0)
+		rw_act_num += MLX5_ACT_NUM_SET_TAG;
+	/* extra metadata enabled: one more TAG action will be add. */
+	if (dev_conf->dv_flow_en &&
+	    dev_conf->dv_xmeta_en != MLX5_XMETA_MODE_LEGACY &&
+	    mlx5_flow_ext_mreg_supported(dev))
+		rw_act_num += MLX5_ACT_NUM_SET_TAG;
+	if ((uint32_t)rw_act_num >=
+			flow_dv_modify_hdr_action_max(dev, is_root)) {
+		return rte_flow_error_set(error, ENOTSUP,
+					  RTE_FLOW_ERROR_TYPE_ACTION,
+					  NULL, "too many header modify"
+					  " actions to support");
+	}
 	return 0;
 }
 
diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c b/drivers/net/mlx5/mlx5_flow_verbs.c
index c162527a5e..f66489c791 100644
--- a/drivers/net/mlx5/mlx5_flow_verbs.c
+++ b/drivers/net/mlx5/mlx5_flow_verbs.c
@@ -1016,6 +1016,8 @@ flow_verbs_translate_action_count(struct mlx5_flow *dev_flow,
  *   Pointer to the list of actions.
  * @param[in] external
  *   This flow rule is created by request external to PMD.
+ * @param[in] hairpin
+ *   Number of hairpin TX actions, 0 means classic flow.
  * @param[out] error
  *   Pointer to the error structure.
  *
@@ -1028,6 +1030,7 @@ flow_verbs_validate(struct rte_eth_dev *dev,
 		    const struct rte_flow_item items[],
 		    const struct rte_flow_action actions[],
 		    bool external __rte_unused,
+		    int hairpin __rte_unused,
 		    struct rte_flow_error *error)
 {
 	int ret;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:48.772446780 +0100
+++ 0106-net-mlx5-fix-header-modify-action-validation.patch	2020-05-19 14:04:44.340650620 +0100
@@ -1,8 +1,10 @@
-From 72a944dba1639fff11f74c5ae1ab7d622bcc39fd Mon Sep 17 00:00:00 2001
+From bf10f18c64b7ab27ec38682f4eefe4702a7ef9b2 Mon Sep 17 00:00:00 2001
 From: Bing Zhao <bingz@mellanox.com>
 Date: Tue, 21 Apr 2020 22:03:34 +0800
 Subject: [PATCH] net/mlx5: fix header modify action validation
 
+[ upstream commit 72a944dba1639fff11f74c5ae1ab7d622bcc39fd ]
+
 The header modify actions number supported now has some limitation,
 and it is decided by both driver and hardware. If the configuration
 is different or the table to insert the flow is different, the result
@@ -24,22 +26,21 @@
 The metering or extra metadata supports will cost one more action.
 
 Fixes: 9597330c6844 ("net/mlx5: update modify header action translator")
-Cc: stable@dpdk.org
 
 Signed-off-by: Bing Zhao <bingz@mellanox.com>
 Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
 ---
- drivers/net/mlx5/mlx5_flow.c       | 58 ++++++++++++++-------------
+ drivers/net/mlx5/mlx5_flow.c       | 58 +++++++++++++++-------------
  drivers/net/mlx5/mlx5_flow.h       | 18 +++++++++
- drivers/net/mlx5/mlx5_flow_dv.c    | 63 ++++++++++++++++++++++++++----
+ drivers/net/mlx5/mlx5_flow_dv.c    | 61 ++++++++++++++++++++++++++----
  drivers/net/mlx5/mlx5_flow_verbs.c |  3 ++
- 4 files changed, 108 insertions(+), 34 deletions(-)
+ 4 files changed, 106 insertions(+), 34 deletions(-)
 
 diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
-index 109d71e923..84aa069db4 100644
+index 55f514af30..05e2d4c82a 100644
 --- a/drivers/net/mlx5/mlx5_flow.c
 +++ b/drivers/net/mlx5/mlx5_flow.c
-@@ -2342,6 +2342,7 @@ flow_null_validate(struct rte_eth_dev *dev __rte_unused,
+@@ -2302,6 +2302,7 @@ flow_null_validate(struct rte_eth_dev *dev __rte_unused,
  		   const struct rte_flow_item items[] __rte_unused,
  		   const struct rte_flow_action actions[] __rte_unused,
  		   bool external __rte_unused,
@@ -47,7 +48,7 @@
  		   struct rte_flow_error *error)
  {
  	return rte_flow_error_set(error, ENOTSUP,
-@@ -2457,6 +2458,8 @@ flow_get_drv_type(struct rte_eth_dev *dev, const struct rte_flow_attr *attr)
+@@ -2416,6 +2417,8 @@ flow_get_drv_type(struct rte_eth_dev *dev, const struct rte_flow_attr *attr)
   *   Pointer to the list of actions.
   * @param[in] external
   *   This flow rule is created by request external to PMD.
@@ -56,7 +57,7 @@
   * @param[out] error
   *   Pointer to the error structure.
   *
-@@ -2468,13 +2471,14 @@ flow_drv_validate(struct rte_eth_dev *dev,
+@@ -2427,13 +2430,14 @@ flow_drv_validate(struct rte_eth_dev *dev,
  		  const struct rte_flow_attr *attr,
  		  const struct rte_flow_item items[],
  		  const struct rte_flow_action actions[],
@@ -73,7 +74,7 @@
  }
  
  /**
-@@ -2635,27 +2639,6 @@ flow_drv_destroy(struct rte_eth_dev *dev, struct rte_flow *flow)
+@@ -2591,27 +2595,6 @@ flow_drv_destroy(struct rte_eth_dev *dev, struct rte_flow *flow)
  	fops->destroy(dev, flow);
  }
  
@@ -101,10 +102,10 @@
  /**
   * Get RSS action from the action list.
   *
-@@ -4271,15 +4254,16 @@ flow_list_create(struct rte_eth_dev *dev, uint32_t *list,
+@@ -4184,15 +4167,16 @@ flow_list_create(struct rte_eth_dev *dev, struct mlx5_flows *list,
  	const struct rte_flow_action *p_actions_rx = actions;
  	uint32_t i;
- 	uint32_t idx = 0;
+ 	uint32_t flow_size;
 -	int hairpin_flow = 0;
 +	int hairpin_flow;
  	uint32_t hairpin_id = 0;
@@ -117,13 +118,13 @@
 +	ret = flow_drv_validate(dev, attr, items, p_actions_rx,
 +				external, hairpin_flow, error);
  	if (ret < 0)
- 		return 0;
+ 		return NULL;
 -	hairpin_flow = flow_check_hairpin_split(dev, attr, actions);
  	if (hairpin_flow > 0) {
  		if (hairpin_flow > MLX5_MAX_SPLIT_ACTIONS) {
  			rte_errno = EINVAL;
-@@ -4470,6 +4454,26 @@ mlx5_flow_create_esw_table_zero_flow(struct rte_eth_dev *dev)
- 						   actions, false, &error);
+@@ -4369,6 +4353,26 @@ mlx5_flow_create_esw_table_zero_flow(struct rte_eth_dev *dev)
+ 				actions, false, &error);
  }
  
 +/**
@@ -150,10 +151,10 @@
   * Create a flow.
   *
 diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
-index 062bcf1f57..2a1f59698c 100644
+index 6d278c63d8..4e38d3fa5a 100644
 --- a/drivers/net/mlx5/mlx5_flow.h
 +++ b/drivers/net/mlx5/mlx5_flow.h
-@@ -332,6 +332,23 @@ enum mlx5_feature_name {
+@@ -330,6 +330,23 @@ enum mlx5_feature_name {
  #define MLX5_ENCAPSULATION_DECISION_SIZE (sizeof(struct rte_flow_item_eth) + \
  					  sizeof(struct rte_flow_item_ipv4))
  
@@ -177,27 +178,27 @@
  enum mlx5_flow_drv_type {
  	MLX5_FLOW_TYPE_MIN,
  	MLX5_FLOW_TYPE_DV,
-@@ -812,6 +829,7 @@ typedef int (*mlx5_flow_validate_t)(struct rte_eth_dev *dev,
+@@ -677,6 +694,7 @@ typedef int (*mlx5_flow_validate_t)(struct rte_eth_dev *dev,
  				    const struct rte_flow_item items[],
  				    const struct rte_flow_action actions[],
  				    bool external,
 +				    int hairpin,
  				    struct rte_flow_error *error);
  typedef struct mlx5_flow *(*mlx5_flow_prepare_t)
- 	(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+ 	(const struct rte_flow_attr *attr, const struct rte_flow_item items[],
 diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index c6d132c6b7..6263ecc731 100644
+index acc0fd3271..8d326f0229 100644
 --- a/drivers/net/mlx5/mlx5_flow_dv.c
 +++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -434,6 +434,7 @@ flow_dv_convert_modify_action(struct rte_flow_item *item,
+@@ -427,6 +427,7 @@ flow_dv_convert_modify_action(struct rte_flow_item *item,
  		/* Fetch variable byte size mask from the array. */
  		mask = flow_dv_fetch_field((const uint8_t *)item->mask +
  					   field->offset, field->size);
-+		MLX5_ASSERT(mask);
++		assert(mask);
  		if (!mask) {
  			++field;
  			continue;
-@@ -4490,7 +4491,9 @@ flow_dv_counter_release(struct rte_eth_dev *dev, uint32_t counter)
+@@ -4285,7 +4286,9 @@ flow_dv_counter_release(struct rte_eth_dev *dev,
   *   Pointer to error structure.
   *
   * @return
@@ -208,7 +209,7 @@
   */
  static int
  flow_dv_validate_attributes(struct rte_eth_dev *dev,
-@@ -4500,6 +4503,7 @@ flow_dv_validate_attributes(struct rte_eth_dev *dev,
+@@ -4295,6 +4298,7 @@ flow_dv_validate_attributes(struct rte_eth_dev *dev,
  {
  	struct mlx5_priv *priv = dev->data->dev_private;
  	uint32_t priority_max = priv->config.flow_prio - 1;
@@ -216,7 +217,7 @@
  
  #ifndef HAVE_MLX5DV_DR
  	if (attributes->group)
-@@ -4508,14 +4512,15 @@ flow_dv_validate_attributes(struct rte_eth_dev *dev,
+@@ -4303,14 +4307,15 @@ flow_dv_validate_attributes(struct rte_eth_dev *dev,
  					  NULL,
  					  "groups are not supported");
  #else
@@ -234,7 +235,7 @@
  #endif
  	if (attributes->priority != MLX5_FLOW_PRIO_RSVD &&
  	    attributes->priority >= priority_max)
-@@ -4545,7 +4550,7 @@ flow_dv_validate_attributes(struct rte_eth_dev *dev,
+@@ -4340,7 +4345,7 @@ flow_dv_validate_attributes(struct rte_eth_dev *dev,
  					  RTE_FLOW_ERROR_TYPE_ATTR, NULL,
  					  "must specify exactly one of "
  					  "ingress or egress");
@@ -243,7 +244,7 @@
  }
  
  /**
-@@ -4561,6 +4566,8 @@ flow_dv_validate_attributes(struct rte_eth_dev *dev,
+@@ -4356,6 +4361,8 @@ flow_dv_validate_attributes(struct rte_eth_dev *dev,
   *   Pointer to the list of actions.
   * @param[in] external
   *   This flow rule is created by request external to PMD.
@@ -252,7 +253,7 @@
   * @param[out] error
   *   Pointer to the error structure.
   *
-@@ -4571,7 +4578,7 @@ static int
+@@ -4366,7 +4373,7 @@ static int
  flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
  		 const struct rte_flow_item items[],
  		 const struct rte_flow_action actions[],
@@ -261,7 +262,7 @@
  {
  	int ret;
  	uint64_t action_flags = 0;
-@@ -4618,12 +4625,15 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -4391,12 +4398,15 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
  	struct mlx5_dev_config *dev_conf = &priv->config;
  	uint16_t queue_index = 0xFFFF;
  	const struct rte_flow_item_vlan *vlan_m = NULL;
@@ -277,7 +278,7 @@
  	for (; items->type != RTE_FLOW_ITEM_TYPE_END; items++) {
  		int tunnel = !!(item_flags & MLX5_FLOW_LAYER_TUNNEL);
  		int type = items->type;
-@@ -4900,6 +4910,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -4664,6 +4674,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
  				action_flags |= MLX5_FLOW_ACTION_FLAG;
  				++actions_n;
  			}
@@ -285,7 +286,7 @@
  			break;
  		case RTE_FLOW_ACTION_TYPE_MARK:
  			ret = flow_dv_validate_action_mark(dev, actions,
-@@ -4918,6 +4929,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -4682,6 +4693,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
  				action_flags |= MLX5_FLOW_ACTION_MARK;
  				++actions_n;
  			}
@@ -293,7 +294,7 @@
  			break;
  		case RTE_FLOW_ACTION_TYPE_SET_META:
  			ret = flow_dv_validate_action_set_meta(dev, actions,
-@@ -4929,6 +4941,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -4693,6 +4705,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
  			if (!(action_flags & MLX5_FLOW_MODIFY_HDR_ACTIONS))
  				++actions_n;
  			action_flags |= MLX5_FLOW_ACTION_SET_META;
@@ -301,7 +302,7 @@
  			break;
  		case RTE_FLOW_ACTION_TYPE_SET_TAG:
  			ret = flow_dv_validate_action_set_tag(dev, actions,
-@@ -4940,6 +4953,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -4704,6 +4717,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
  			if (!(action_flags & MLX5_FLOW_MODIFY_HDR_ACTIONS))
  				++actions_n;
  			action_flags |= MLX5_FLOW_ACTION_SET_TAG;
@@ -309,7 +310,7 @@
  			break;
  		case RTE_FLOW_ACTION_TYPE_DROP:
  			ret = mlx5_flow_validate_action_drop(action_flags,
-@@ -5017,6 +5031,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -4781,6 +4795,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
  				return ret;
  			/* Count VID with push_vlan command. */
  			action_flags |= MLX5_FLOW_ACTION_OF_SET_VLAN_VID;
@@ -317,7 +318,7 @@
  			break;
  		case RTE_FLOW_ACTION_TYPE_VXLAN_ENCAP:
  		case RTE_FLOW_ACTION_TYPE_NVGRE_ENCAP:
-@@ -5078,8 +5093,15 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -4842,8 +4857,15 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
  					RTE_FLOW_ACTION_TYPE_SET_MAC_SRC ?
  						MLX5_FLOW_ACTION_SET_MAC_SRC :
  						MLX5_FLOW_ACTION_SET_MAC_DST;
@@ -334,7 +335,7 @@
  		case RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC:
  		case RTE_FLOW_ACTION_TYPE_SET_IPV4_DST:
  			ret = flow_dv_validate_action_modify_ipv4(action_flags,
-@@ -5095,6 +5117,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -4859,6 +4881,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
  					RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC ?
  						MLX5_FLOW_ACTION_SET_IPV4_SRC :
  						MLX5_FLOW_ACTION_SET_IPV4_DST;
@@ -342,7 +343,7 @@
  			break;
  		case RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC:
  		case RTE_FLOW_ACTION_TYPE_SET_IPV6_DST:
-@@ -5117,6 +5140,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -4881,6 +4904,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
  					RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC ?
  						MLX5_FLOW_ACTION_SET_IPV6_SRC :
  						MLX5_FLOW_ACTION_SET_IPV6_DST;
@@ -350,7 +351,7 @@
  			break;
  		case RTE_FLOW_ACTION_TYPE_SET_TP_SRC:
  		case RTE_FLOW_ACTION_TYPE_SET_TP_DST:
-@@ -5133,6 +5157,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -4897,6 +4921,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
  					RTE_FLOW_ACTION_TYPE_SET_TP_SRC ?
  						MLX5_FLOW_ACTION_SET_TP_SRC :
  						MLX5_FLOW_ACTION_SET_TP_DST;
@@ -358,7 +359,7 @@
  			break;
  		case RTE_FLOW_ACTION_TYPE_DEC_TTL:
  		case RTE_FLOW_ACTION_TYPE_SET_TTL:
-@@ -5149,6 +5174,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -4913,6 +4938,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
  					RTE_FLOW_ACTION_TYPE_SET_TTL ?
  						MLX5_FLOW_ACTION_SET_TTL :
  						MLX5_FLOW_ACTION_DEC_TTL;
@@ -366,7 +367,7 @@
  			break;
  		case RTE_FLOW_ACTION_TYPE_JUMP:
  			ret = flow_dv_validate_action_jump(actions,
-@@ -5176,6 +5202,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -4940,6 +4966,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
  					RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ ?
  						MLX5_FLOW_ACTION_INC_TCP_SEQ :
  						MLX5_FLOW_ACTION_DEC_TCP_SEQ;
@@ -374,7 +375,7 @@
  			break;
  		case RTE_FLOW_ACTION_TYPE_INC_TCP_ACK:
  		case RTE_FLOW_ACTION_TYPE_DEC_TCP_ACK:
-@@ -5193,10 +5220,13 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -4957,10 +4984,13 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
  					RTE_FLOW_ACTION_TYPE_INC_TCP_ACK ?
  						MLX5_FLOW_ACTION_INC_TCP_ACK :
  						MLX5_FLOW_ACTION_DEC_TCP_ACK;
@@ -389,32 +390,16 @@
  			break;
  		case RTE_FLOW_ACTION_TYPE_METER:
  			ret = mlx5_flow_validate_action_meter(dev,
-@@ -5207,6 +5237,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -4971,6 +5001,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
  				return ret;
  			action_flags |= MLX5_FLOW_ACTION_METER;
  			++actions_n;
 +			/* Meter action will add one more TAG action. */
 +			rw_act_num += MLX5_ACT_NUM_SET_TAG;
  			break;
- 		case RTE_FLOW_ACTION_TYPE_SET_IPV4_DSCP:
- 			ret = flow_dv_validate_action_modify_ipv4_dscp
-@@ -5220,6 +5252,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
- 			if (!(action_flags & MLX5_FLOW_MODIFY_HDR_ACTIONS))
- 				++actions_n;
- 			action_flags |= MLX5_FLOW_ACTION_SET_IPV4_DSCP;
-+			rw_act_num += MLX5_ACT_NUM_SET_DSCP;
- 			break;
- 		case RTE_FLOW_ACTION_TYPE_SET_IPV6_DSCP:
- 			ret = flow_dv_validate_action_modify_ipv6_dscp
-@@ -5233,6 +5266,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
- 			if (!(action_flags & MLX5_FLOW_MODIFY_HDR_ACTIONS))
- 				++actions_n;
- 			action_flags |= MLX5_FLOW_ACTION_SET_IPV6_DSCP;
-+			rw_act_num += MLX5_ACT_NUM_SET_DSCP;
- 			break;
  		default:
  			return rte_flow_error_set(error, ENOTSUP,
-@@ -5305,6 +5339,21 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -5043,6 +5075,21 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
  						  NULL, "encap is not supported"
  						  " for ingress traffic");
  	}
@@ -437,10 +422,10 @@
  }
  
 diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c b/drivers/net/mlx5/mlx5_flow_verbs.c
-index 722220c3d3..d20098ce45 100644
+index c162527a5e..f66489c791 100644
 --- a/drivers/net/mlx5/mlx5_flow_verbs.c
 +++ b/drivers/net/mlx5/mlx5_flow_verbs.c
-@@ -1108,6 +1108,8 @@ flow_verbs_translate_action_count(struct mlx5_flow *dev_flow,
+@@ -1016,6 +1016,8 @@ flow_verbs_translate_action_count(struct mlx5_flow *dev_flow,
   *   Pointer to the list of actions.
   * @param[in] external
   *   This flow rule is created by request external to PMD.
@@ -449,7 +434,7 @@
   * @param[out] error
   *   Pointer to the error structure.
   *
-@@ -1120,6 +1122,7 @@ flow_verbs_validate(struct rte_eth_dev *dev,
+@@ -1028,6 +1030,7 @@ flow_verbs_validate(struct rte_eth_dev *dev,
  		    const struct rte_flow_item items[],
  		    const struct rte_flow_action actions[],
  		    bool external __rte_unused,

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

* [dpdk-stable] patch 'net/mlx5: set dynamic flow metadata in Rx queues' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (104 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/mlx5: fix header modify action validation' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/mlx5: improve logging of MPRQ selection' " luca.boccassi
                     ` (106 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Alexander Kozyrev; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From f0a019c95077c363ebf20fb07067e03c8b3f87a1 Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev@mellanox.com>
Date: Fri, 17 Apr 2020 17:14:53 +0000
Subject: [PATCH] net/mlx5: set dynamic flow metadata in Rx queues

[ upstream commit 6c55b622a95693c6269ef8add75328813ee08e95 ]

Using a global mbuf dynamic field for metadata incurs some
performance penalty on a datapath. Store this information in
the Rx queue descriptor for a better cache locality.

Fixes: a18ac6113331 ("net/mlx5: add metadata support to Rx datapath")

Signed-off-by: Alexander Kozyrev <akozyrev@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
 drivers/net/mlx5/mlx5.h                  |  1 +
 drivers/net/mlx5/mlx5_flow.c             | 29 ++++++++++++++
 drivers/net/mlx5/mlx5_rxtx.c             |  7 ++--
 drivers/net/mlx5/mlx5_rxtx.h             |  4 +-
 drivers/net/mlx5/mlx5_rxtx_vec_altivec.h | 27 +++++++------
 drivers/net/mlx5/mlx5_rxtx_vec_neon.h    | 49 ++++++++++++++----------
 drivers/net/mlx5/mlx5_rxtx_vec_sse.h     | 49 ++++++++++++++----------
 drivers/net/mlx5/mlx5_trigger.c          |  2 +
 lib/librte_ethdev/rte_flow.c             |  2 +-
 lib/librte_ethdev/rte_flow.h             |  2 +-
 10 files changed, 113 insertions(+), 59 deletions(-)

diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 73142085f7..bbf6ecda63 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -975,6 +975,7 @@ struct mlx5_flow_counter *mlx5_counter_alloc(struct rte_eth_dev *dev);
 void mlx5_counter_free(struct rte_eth_dev *dev, struct mlx5_flow_counter *cnt);
 int mlx5_counter_query(struct rte_eth_dev *dev, struct mlx5_flow_counter *cnt,
 		       bool clear, uint64_t *pkts, uint64_t *bytes);
+void mlx5_flow_rxq_dynf_metadata_set(struct rte_eth_dev *dev);
 
 /* mlx5_mp.c */
 void mlx5_mp_req_start_rxtx(struct rte_eth_dev *dev);
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 05e2d4c82a..bb8538e816 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -869,6 +869,35 @@ flow_rxq_flags_clear(struct rte_eth_dev *dev)
 	}
 }
 
+/**
+ * Set the Rx queue dynamic metadata (mask and offset) for a flow
+ *
+ * @param[in] dev
+ *   Pointer to the Ethernet device structure.
+ */
+void
+mlx5_flow_rxq_dynf_metadata_set(struct rte_eth_dev *dev)
+{
+	struct mlx5_priv *priv = dev->data->dev_private;
+	struct mlx5_rxq_data *data;
+	unsigned int i;
+
+	for (i = 0; i != priv->rxqs_n; ++i) {
+		if (!(*priv->rxqs)[i])
+			continue;
+		data = (*priv->rxqs)[i];
+		if (!rte_flow_dynf_metadata_avail()) {
+			data->dynf_meta = 0;
+			data->flow_meta_mask = 0;
+			data->flow_meta_offset = -1;
+		} else {
+			data->dynf_meta = 1;
+			data->flow_meta_mask = rte_flow_dynf_metadata_mask;
+			data->flow_meta_offset = rte_flow_dynf_metadata_offs;
+		}
+	}
+}
+
 /*
  * return a pointer to the desired action in the list of actions.
  *
diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index ae89406d65..9d61dd68f7 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -1249,9 +1249,10 @@ rxq_cq_to_mbuf(struct mlx5_rxq_data *rxq, struct rte_mbuf *pkt,
 			pkt->hash.fdir.hi = mlx5_flow_mark_get(mark);
 		}
 	}
-	if (rte_flow_dynf_metadata_avail() && cqe->flow_table_metadata) {
-		pkt->ol_flags |= PKT_RX_DYNF_METADATA;
-		*RTE_FLOW_DYNF_METADATA(pkt) = cqe->flow_table_metadata;
+	if (rxq->dynf_meta && cqe->flow_table_metadata) {
+		pkt->ol_flags |= rxq->flow_meta_mask;
+		*RTE_MBUF_DYNFIELD(pkt, rxq->flow_meta_offset, uint32_t *) =
+			cqe->flow_table_metadata;
 	}
 	if (rxq->csum)
 		pkt->ol_flags |= rxq_cq_to_ol_flags(cqe);
diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
index aa6fabbd3d..a50f057c1e 100644
--- a/drivers/net/mlx5/mlx5_rxtx.h
+++ b/drivers/net/mlx5/mlx5_rxtx.h
@@ -116,7 +116,7 @@ struct mlx5_rxq_data {
 	unsigned int err_state:2; /* enum mlx5_rxq_err_state. */
 	unsigned int strd_scatter_en:1; /* Scattered packets from a stride. */
 	unsigned int lro:1; /* Enable LRO. */
-	unsigned int :1; /* Remaining bits. */
+	unsigned int dynf_meta:1; /* Dynamic metadata is configured. */
 	volatile uint32_t *rq_db;
 	volatile uint32_t *cq_db;
 	uint16_t port_id;
@@ -154,6 +154,8 @@ struct mlx5_rxq_data {
 	/* CQ (UAR) access lock required for 32bit implementations */
 #endif
 	uint32_t tunnel; /* Tunnel information. */
+	uint64_t flow_meta_mask;
+	int32_t flow_meta_offset;
 } __rte_cache_aligned;
 
 enum mlx5_rxq_obj_type {
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h b/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h
index 4df13b6d80..5bc47c714b 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h
@@ -263,17 +263,22 @@ rxq_cq_decompress_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
 			elts[pos + 2]->hash.fdir.hi = flow_tag;
 			elts[pos + 3]->hash.fdir.hi = flow_tag;
 		}
-		if (rte_flow_dynf_metadata_avail()) {
-			const uint32_t meta = *RTE_FLOW_DYNF_METADATA(t_pkt);
+		if (!!rxq->flow_meta_mask) {
+			int32_t offs = rxq->flow_meta_offset;
+			const uint32_t meta =
+				*RTE_MBUF_DYNFIELD(t_pkt, offs, uint32_t *);
 
 			/* Check if title packet has valid metadata. */
 			if (meta) {
-				assert(t_pkt->ol_flags &
-					    PKT_RX_DYNF_METADATA);
-				*RTE_FLOW_DYNF_METADATA(elts[pos]) = meta;
-				*RTE_FLOW_DYNF_METADATA(elts[pos + 1]) = meta;
-				*RTE_FLOW_DYNF_METADATA(elts[pos + 2]) = meta;
-				*RTE_FLOW_DYNF_METADATA(elts[pos + 3]) = meta;
+				assert(t_pkt->ol_flags & offs);
+				*RTE_MBUF_DYNFIELD(elts[pos], offs,
+							uint32_t *) = meta;
+				*RTE_MBUF_DYNFIELD(elts[pos + 1], offs,
+							uint32_t *) = meta;
+				*RTE_MBUF_DYNFIELD(elts[pos + 2], offs,
+							uint32_t *) = meta;
+				*RTE_MBUF_DYNFIELD(elts[pos + 3], offs,
+							uint32_t *) = meta;
 			}
 		}
 
@@ -1023,9 +1028,9 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
 			pkts[pos + 3]->timestamp =
 				rte_be_to_cpu_64(cq[pos + p3].timestamp);
 		}
-		if (rte_flow_dynf_metadata_avail()) {
-			uint64_t flag = rte_flow_dynf_metadata_mask;
-			int offs = rte_flow_dynf_metadata_offs;
+		if (!!rxq->flow_meta_mask) {
+			uint64_t flag = rxq->flow_meta_mask;
+			int32_t offs = rxq->flow_meta_offset;
 			uint32_t metadata;
 
 			/* This code is subject for futher optimization. */
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
index b3a3e028ee..2880f97af1 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
@@ -205,17 +205,22 @@ rxq_cq_decompress_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
 			elts[pos + 2]->hash.fdir.hi = flow_tag;
 			elts[pos + 3]->hash.fdir.hi = flow_tag;
 		}
-		if (rte_flow_dynf_metadata_avail()) {
-			const uint32_t meta = *RTE_FLOW_DYNF_METADATA(t_pkt);
+		if (!!rxq->flow_meta_mask) {
+			int32_t offs = rxq->flow_meta_offset;
+			const uint32_t meta =
+				*RTE_MBUF_DYNFIELD(t_pkt, offs, uint32_t *);
 
 			/* Check if title packet has valid metadata. */
 			if (meta) {
-				assert(t_pkt->ol_flags &
-					    PKT_RX_DYNF_METADATA);
-				*RTE_FLOW_DYNF_METADATA(elts[pos]) = meta;
-				*RTE_FLOW_DYNF_METADATA(elts[pos + 1]) = meta;
-				*RTE_FLOW_DYNF_METADATA(elts[pos + 2]) = meta;
-				*RTE_FLOW_DYNF_METADATA(elts[pos + 3]) = meta;
+				assert(t_pkt->ol_flags & offs);
+				*RTE_MBUF_DYNFIELD(elts[pos], offs,
+							uint32_t *) = meta;
+				*RTE_MBUF_DYNFIELD(elts[pos + 1], offs,
+							uint32_t *) = meta;
+				*RTE_MBUF_DYNFIELD(elts[pos + 2], offs,
+							uint32_t *) = meta;
+				*RTE_MBUF_DYNFIELD(elts[pos + 3], offs,
+							uint32_t *) = meta;
 			}
 		}
 		pos += MLX5_VPMD_DESCS_PER_LOOP;
@@ -700,28 +705,30 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
 					container_of(p3, struct mlx5_cqe,
 						     pkt_info)->timestamp);
 		}
-		if (rte_flow_dynf_metadata_avail()) {
+		if (!!rxq->flow_meta_mask) {
 			/* This code is subject for futher optimization. */
-			*RTE_FLOW_DYNF_METADATA(elts[pos]) =
+			int32_t offs = rxq->flow_meta_offset;
+
+			*RTE_MBUF_DYNFIELD(pkts[pos], offs, uint32_t *) =
 				container_of(p0, struct mlx5_cqe,
 					     pkt_info)->flow_table_metadata;
-			*RTE_FLOW_DYNF_METADATA(elts[pos + 1]) =
+			*RTE_MBUF_DYNFIELD(pkts[pos], offs, uint32_t *) =
 				container_of(p1, struct mlx5_cqe,
 					     pkt_info)->flow_table_metadata;
-			*RTE_FLOW_DYNF_METADATA(elts[pos + 2]) =
+			*RTE_MBUF_DYNFIELD(pkts[pos], offs, uint32_t *) =
 				container_of(p2, struct mlx5_cqe,
 					     pkt_info)->flow_table_metadata;
-			*RTE_FLOW_DYNF_METADATA(elts[pos + 3]) =
+			*RTE_MBUF_DYNFIELD(pkts[pos], offs, uint32_t *) =
 				container_of(p3, struct mlx5_cqe,
 					     pkt_info)->flow_table_metadata;
-			if (*RTE_FLOW_DYNF_METADATA(elts[pos]))
-				elts[pos]->ol_flags |= PKT_RX_DYNF_METADATA;
-			if (*RTE_FLOW_DYNF_METADATA(elts[pos + 1]))
-				elts[pos + 1]->ol_flags |= PKT_RX_DYNF_METADATA;
-			if (*RTE_FLOW_DYNF_METADATA(elts[pos + 2]))
-				elts[pos + 2]->ol_flags |= PKT_RX_DYNF_METADATA;
-			if (*RTE_FLOW_DYNF_METADATA(elts[pos + 3]))
-				elts[pos + 3]->ol_flags |= PKT_RX_DYNF_METADATA;
+			if (*RTE_MBUF_DYNFIELD(pkts[pos], offs, uint32_t *))
+				elts[pos]->ol_flags |= rxq->flow_meta_mask;
+			if (*RTE_MBUF_DYNFIELD(pkts[pos + 1], offs, uint32_t *))
+				elts[pos + 1]->ol_flags |= rxq->flow_meta_mask;
+			if (*RTE_MBUF_DYNFIELD(pkts[pos + 2], offs, uint32_t *))
+				elts[pos + 2]->ol_flags |= rxq->flow_meta_mask;
+			if (*RTE_MBUF_DYNFIELD(pkts[pos + 3], offs, uint32_t *))
+				elts[pos + 3]->ol_flags |= rxq->flow_meta_mask;
 		}
 #ifdef MLX5_PMD_SOFT_COUNTERS
 		/* Add up received bytes count. */
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
index 8aa3f0489c..ac8568ed4b 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
@@ -190,17 +190,22 @@ rxq_cq_decompress_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
 			elts[pos + 2]->hash.fdir.hi = flow_tag;
 			elts[pos + 3]->hash.fdir.hi = flow_tag;
 		}
-		if (rte_flow_dynf_metadata_avail()) {
-			const uint32_t meta = *RTE_FLOW_DYNF_METADATA(t_pkt);
+		if (rxq->dynf_meta) {
+			int32_t offs = rxq->flow_meta_offset;
+			const uint32_t meta =
+				*RTE_MBUF_DYNFIELD(t_pkt, offs, uint32_t *);
 
 			/* Check if title packet has valid metadata. */
 			if (meta) {
-				assert(t_pkt->ol_flags &
-					    PKT_RX_DYNF_METADATA);
-				*RTE_FLOW_DYNF_METADATA(elts[pos]) = meta;
-				*RTE_FLOW_DYNF_METADATA(elts[pos + 1]) = meta;
-				*RTE_FLOW_DYNF_METADATA(elts[pos + 2]) = meta;
-				*RTE_FLOW_DYNF_METADATA(elts[pos + 3]) = meta;
+				assert(t_pkt->ol_flags & offs);
+				*RTE_MBUF_DYNFIELD(elts[pos], offs,
+							uint32_t *) = meta;
+				*RTE_MBUF_DYNFIELD(elts[pos + 1], offs,
+							uint32_t *) = meta;
+				*RTE_MBUF_DYNFIELD(elts[pos + 2], offs,
+							uint32_t *) = meta;
+				*RTE_MBUF_DYNFIELD(elts[pos + 3], offs,
+							uint32_t *) = meta;
 			}
 		}
 		pos += MLX5_VPMD_DESCS_PER_LOOP;
@@ -652,24 +657,26 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
 			pkts[pos + 3]->timestamp =
 				rte_be_to_cpu_64(cq[pos + p3].timestamp);
 		}
-		if (rte_flow_dynf_metadata_avail()) {
+		if (rxq->dynf_meta) {
 			/* This code is subject for futher optimization. */
-			*RTE_FLOW_DYNF_METADATA(pkts[pos]) =
+			int32_t offs = rxq->flow_meta_offset;
+
+			*RTE_MBUF_DYNFIELD(pkts[pos], offs, uint32_t *) =
 				cq[pos].flow_table_metadata;
-			*RTE_FLOW_DYNF_METADATA(pkts[pos + 1]) =
+			*RTE_MBUF_DYNFIELD(pkts[pos + 1], offs, uint32_t *) =
 				cq[pos + p1].flow_table_metadata;
-			*RTE_FLOW_DYNF_METADATA(pkts[pos + 2]) =
+			*RTE_MBUF_DYNFIELD(pkts[pos + 2], offs, uint32_t *) =
 				cq[pos + p2].flow_table_metadata;
-			*RTE_FLOW_DYNF_METADATA(pkts[pos + 3]) =
+			*RTE_MBUF_DYNFIELD(pkts[pos + 3], offs, uint32_t *) =
 				cq[pos + p3].flow_table_metadata;
-			if (*RTE_FLOW_DYNF_METADATA(pkts[pos]))
-				pkts[pos]->ol_flags |= PKT_RX_DYNF_METADATA;
-			if (*RTE_FLOW_DYNF_METADATA(pkts[pos + 1]))
-				pkts[pos + 1]->ol_flags |= PKT_RX_DYNF_METADATA;
-			if (*RTE_FLOW_DYNF_METADATA(pkts[pos + 2]))
-				pkts[pos + 2]->ol_flags |= PKT_RX_DYNF_METADATA;
-			if (*RTE_FLOW_DYNF_METADATA(pkts[pos + 3]))
-				pkts[pos + 3]->ol_flags |= PKT_RX_DYNF_METADATA;
+			if (*RTE_MBUF_DYNFIELD(pkts[pos], offs, uint32_t *))
+				pkts[pos]->ol_flags |= rxq->flow_meta_mask;
+			if (*RTE_MBUF_DYNFIELD(pkts[pos + 1], offs, uint32_t *))
+				pkts[pos + 1]->ol_flags |= rxq->flow_meta_mask;
+			if (*RTE_MBUF_DYNFIELD(pkts[pos + 2], offs, uint32_t *))
+				pkts[pos + 2]->ol_flags |= rxq->flow_meta_mask;
+			if (*RTE_MBUF_DYNFIELD(pkts[pos + 3], offs, uint32_t *))
+				pkts[pos + 3]->ol_flags |= rxq->flow_meta_mask;
 		}
 #ifdef MLX5_PMD_SOFT_COUNTERS
 		/* Add up received bytes count. */
diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index e3ea2862a5..6fc4190f4e 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -314,6 +314,8 @@ mlx5_dev_start(struct rte_eth_dev *dev)
 			dev->data->port_id);
 		goto error;
 	}
+	/* Set a mask and offset of dynamic metadata flows into Rx queues*/
+	mlx5_flow_rxq_dynf_metadata_set(dev);
 	ret = mlx5_flow_start(dev, &priv->flows);
 	if (ret) {
 		DRV_LOG(DEBUG, "port %u failed to set flows",
diff --git a/lib/librte_ethdev/rte_flow.c b/lib/librte_ethdev/rte_flow.c
index 87a3e8c4c6..391165646a 100644
--- a/lib/librte_ethdev/rte_flow.c
+++ b/lib/librte_ethdev/rte_flow.c
@@ -19,7 +19,7 @@
 #include "rte_flow.h"
 
 /* Mbuf dynamic field name for metadata. */
-int rte_flow_dynf_metadata_offs = -1;
+int32_t rte_flow_dynf_metadata_offs = -1;
 
 /* Mbuf dynamic field flag bit number for metadata. */
 uint64_t rte_flow_dynf_metadata_mask;
diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h
index 58b50265d2..693824da8a 100644
--- a/lib/librte_ethdev/rte_flow.h
+++ b/lib/librte_ethdev/rte_flow.h
@@ -2531,7 +2531,7 @@ struct rte_flow_action_set_meta {
 };
 
 /* Mbuf dynamic field offset for metadata. */
-extern int rte_flow_dynf_metadata_offs;
+extern int32_t rte_flow_dynf_metadata_offs;
 
 /* Mbuf dynamic field flag mask for metadata. */
 extern uint64_t rte_flow_dynf_metadata_mask;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:48.827164928 +0100
+++ 0107-net-mlx5-set-dynamic-flow-metadata-in-Rx-queues.patch	2020-05-19 14:04:44.352650837 +0100
@@ -1,14 +1,15 @@
-From 6c55b622a95693c6269ef8add75328813ee08e95 Mon Sep 17 00:00:00 2001
+From f0a019c95077c363ebf20fb07067e03c8b3f87a1 Mon Sep 17 00:00:00 2001
 From: Alexander Kozyrev <akozyrev@mellanox.com>
 Date: Fri, 17 Apr 2020 17:14:53 +0000
 Subject: [PATCH] net/mlx5: set dynamic flow metadata in Rx queues
 
+[ upstream commit 6c55b622a95693c6269ef8add75328813ee08e95 ]
+
 Using a global mbuf dynamic field for metadata incurs some
 performance penalty on a datapath. Store this information in
 the Rx queue descriptor for a better cache locality.
 
 Fixes: a18ac6113331 ("net/mlx5: add metadata support to Rx datapath")
-Cc: stable@dpdk.org
 
 Signed-off-by: Alexander Kozyrev <akozyrev@mellanox.com>
 Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
@@ -26,22 +27,22 @@
  10 files changed, 113 insertions(+), 59 deletions(-)
 
 diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
-index 770425c4f0..50349abf34 100644
+index 73142085f7..bbf6ecda63 100644
 --- a/drivers/net/mlx5/mlx5.h
 +++ b/drivers/net/mlx5/mlx5.h
-@@ -753,6 +753,7 @@ int mlx5_counter_query(struct rte_eth_dev *dev, uint32_t cnt,
+@@ -975,6 +975,7 @@ struct mlx5_flow_counter *mlx5_counter_alloc(struct rte_eth_dev *dev);
+ void mlx5_counter_free(struct rte_eth_dev *dev, struct mlx5_flow_counter *cnt);
+ int mlx5_counter_query(struct rte_eth_dev *dev, struct mlx5_flow_counter *cnt,
  		       bool clear, uint64_t *pkts, uint64_t *bytes);
- int mlx5_flow_dev_dump(struct rte_eth_dev *dev, FILE *file,
- 		       struct rte_flow_error *error);
 +void mlx5_flow_rxq_dynf_metadata_set(struct rte_eth_dev *dev);
  
  /* mlx5_mp.c */
- int mlx5_mp_primary_handle(const struct rte_mp_msg *mp_msg, const void *peer);
+ void mlx5_mp_req_start_rxtx(struct rte_eth_dev *dev);
 diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
-index 84aa069db4..cba1f23e81 100644
+index 05e2d4c82a..bb8538e816 100644
 --- a/drivers/net/mlx5/mlx5_flow.c
 +++ b/drivers/net/mlx5/mlx5_flow.c
-@@ -894,6 +894,35 @@ flow_rxq_flags_clear(struct rte_eth_dev *dev)
+@@ -869,6 +869,35 @@ flow_rxq_flags_clear(struct rte_eth_dev *dev)
  	}
  }
  
@@ -78,10 +79,10 @@
   * return a pointer to the desired action in the list of actions.
   *
 diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
-index 3e583d49a6..0010b423df 100644
+index ae89406d65..9d61dd68f7 100644
 --- a/drivers/net/mlx5/mlx5_rxtx.c
 +++ b/drivers/net/mlx5/mlx5_rxtx.c
-@@ -1339,9 +1339,10 @@ rxq_cq_to_mbuf(struct mlx5_rxq_data *rxq, struct rte_mbuf *pkt,
+@@ -1249,9 +1249,10 @@ rxq_cq_to_mbuf(struct mlx5_rxq_data *rxq, struct rte_mbuf *pkt,
  			pkt->hash.fdir.hi = mlx5_flow_mark_get(mark);
  		}
  	}
@@ -96,10 +97,10 @@
  	if (rxq->csum)
  		pkt->ol_flags |= rxq_cq_to_ol_flags(cqe);
 diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
-index 869521841e..48f2b79411 100644
+index aa6fabbd3d..a50f057c1e 100644
 --- a/drivers/net/mlx5/mlx5_rxtx.h
 +++ b/drivers/net/mlx5/mlx5_rxtx.h
-@@ -121,7 +121,7 @@ struct mlx5_rxq_data {
+@@ -116,7 +116,7 @@ struct mlx5_rxq_data {
  	unsigned int err_state:2; /* enum mlx5_rxq_err_state. */
  	unsigned int strd_scatter_en:1; /* Scattered packets from a stride. */
  	unsigned int lro:1; /* Enable LRO. */
@@ -108,7 +109,7 @@
  	volatile uint32_t *rq_db;
  	volatile uint32_t *cq_db;
  	uint16_t port_id;
-@@ -159,6 +159,8 @@ struct mlx5_rxq_data {
+@@ -154,6 +154,8 @@ struct mlx5_rxq_data {
  	/* CQ (UAR) access lock required for 32bit implementations */
  #endif
  	uint32_t tunnel; /* Tunnel information. */
@@ -118,10 +119,10 @@
  
  enum mlx5_rxq_obj_type {
 diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h b/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h
-index 9778b0bbc1..45ff8e65b6 100644
+index 4df13b6d80..5bc47c714b 100644
 --- a/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h
 +++ b/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h
-@@ -264,17 +264,22 @@ rxq_cq_decompress_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
+@@ -263,17 +263,22 @@ rxq_cq_decompress_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
  			elts[pos + 2]->hash.fdir.hi = flow_tag;
  			elts[pos + 3]->hash.fdir.hi = flow_tag;
  		}
@@ -134,13 +135,13 @@
  
  			/* Check if title packet has valid metadata. */
  			if (meta) {
--				MLX5_ASSERT(t_pkt->ol_flags &
+-				assert(t_pkt->ol_flags &
 -					    PKT_RX_DYNF_METADATA);
 -				*RTE_FLOW_DYNF_METADATA(elts[pos]) = meta;
 -				*RTE_FLOW_DYNF_METADATA(elts[pos + 1]) = meta;
 -				*RTE_FLOW_DYNF_METADATA(elts[pos + 2]) = meta;
 -				*RTE_FLOW_DYNF_METADATA(elts[pos + 3]) = meta;
-+				MLX5_ASSERT(t_pkt->ol_flags & offs);
++				assert(t_pkt->ol_flags & offs);
 +				*RTE_MBUF_DYNFIELD(elts[pos], offs,
 +							uint32_t *) = meta;
 +				*RTE_MBUF_DYNFIELD(elts[pos + 1], offs,
@@ -166,7 +167,7 @@
  
  			/* This code is subject for futher optimization. */
 diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
-index 7b6c5db491..d39e72680b 100644
+index b3a3e028ee..2880f97af1 100644
 --- a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
 +++ b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
 @@ -205,17 +205,22 @@ rxq_cq_decompress_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
@@ -182,13 +183,13 @@
  
  			/* Check if title packet has valid metadata. */
  			if (meta) {
--				MLX5_ASSERT(t_pkt->ol_flags &
+-				assert(t_pkt->ol_flags &
 -					    PKT_RX_DYNF_METADATA);
 -				*RTE_FLOW_DYNF_METADATA(elts[pos]) = meta;
 -				*RTE_FLOW_DYNF_METADATA(elts[pos + 1]) = meta;
 -				*RTE_FLOW_DYNF_METADATA(elts[pos + 2]) = meta;
 -				*RTE_FLOW_DYNF_METADATA(elts[pos + 3]) = meta;
-+				MLX5_ASSERT(t_pkt->ol_flags & offs);
++				assert(t_pkt->ol_flags & offs);
 +				*RTE_MBUF_DYNFIELD(elts[pos], offs,
 +							uint32_t *) = meta;
 +				*RTE_MBUF_DYNFIELD(elts[pos + 1], offs,
@@ -200,7 +201,7 @@
  			}
  		}
  		pos += MLX5_VPMD_DESCS_PER_LOOP;
-@@ -701,28 +706,30 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
+@@ -700,28 +705,30 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
  					container_of(p3, struct mlx5_cqe,
  						     pkt_info)->timestamp);
  		}
@@ -245,10 +246,10 @@
  #ifdef MLX5_PMD_SOFT_COUNTERS
  		/* Add up received bytes count. */
 diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
-index 4b711f0f1f..f110f73b4a 100644
+index 8aa3f0489c..ac8568ed4b 100644
 --- a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
 +++ b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
-@@ -192,17 +192,22 @@ rxq_cq_decompress_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
+@@ -190,17 +190,22 @@ rxq_cq_decompress_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
  			elts[pos + 2]->hash.fdir.hi = flow_tag;
  			elts[pos + 3]->hash.fdir.hi = flow_tag;
  		}
@@ -261,13 +262,13 @@
  
  			/* Check if title packet has valid metadata. */
  			if (meta) {
--				MLX5_ASSERT(t_pkt->ol_flags &
+-				assert(t_pkt->ol_flags &
 -					    PKT_RX_DYNF_METADATA);
 -				*RTE_FLOW_DYNF_METADATA(elts[pos]) = meta;
 -				*RTE_FLOW_DYNF_METADATA(elts[pos + 1]) = meta;
 -				*RTE_FLOW_DYNF_METADATA(elts[pos + 2]) = meta;
 -				*RTE_FLOW_DYNF_METADATA(elts[pos + 3]) = meta;
-+				MLX5_ASSERT(t_pkt->ol_flags & offs);
++				assert(t_pkt->ol_flags & offs);
 +				*RTE_MBUF_DYNFIELD(elts[pos], offs,
 +							uint32_t *) = meta;
 +				*RTE_MBUF_DYNFIELD(elts[pos + 1], offs,
@@ -279,7 +280,7 @@
  			}
  		}
  		pos += MLX5_VPMD_DESCS_PER_LOOP;
-@@ -654,24 +659,26 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
+@@ -652,24 +657,26 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
  			pkts[pos + 3]->timestamp =
  				rte_be_to_cpu_64(cq[pos + p3].timestamp);
  		}
@@ -320,20 +321,20 @@
  #ifdef MLX5_PMD_SOFT_COUNTERS
  		/* Add up received bytes count. */
 diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
-index 759670408b..feb9154199 100644
+index e3ea2862a5..6fc4190f4e 100644
 --- a/drivers/net/mlx5/mlx5_trigger.c
 +++ b/drivers/net/mlx5/mlx5_trigger.c
-@@ -323,6 +323,8 @@ mlx5_dev_start(struct rte_eth_dev *dev)
+@@ -314,6 +314,8 @@ mlx5_dev_start(struct rte_eth_dev *dev)
  			dev->data->port_id);
  		goto error;
  	}
 +	/* Set a mask and offset of dynamic metadata flows into Rx queues*/
 +	mlx5_flow_rxq_dynf_metadata_set(dev);
- 	/*
- 	 * In non-cached mode, it only needs to start the default mreg copy
- 	 * action and no flow created by application exists anymore.
+ 	ret = mlx5_flow_start(dev, &priv->flows);
+ 	if (ret) {
+ 		DRV_LOG(DEBUG, "port %u failed to set flows",
 diff --git a/lib/librte_ethdev/rte_flow.c b/lib/librte_ethdev/rte_flow.c
-index 3699edce49..1685be5f73 100644
+index 87a3e8c4c6..391165646a 100644
 --- a/lib/librte_ethdev/rte_flow.c
 +++ b/lib/librte_ethdev/rte_flow.c
 @@ -19,7 +19,7 @@
@@ -346,10 +347,10 @@
  /* Mbuf dynamic field flag bit number for metadata. */
  uint64_t rte_flow_dynf_metadata_mask;
 diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h
-index fab44f6c0b..132b44edc6 100644
+index 58b50265d2..693824da8a 100644
 --- a/lib/librte_ethdev/rte_flow.h
 +++ b/lib/librte_ethdev/rte_flow.h
-@@ -2653,7 +2653,7 @@ struct rte_flow_action_set_dscp {
+@@ -2531,7 +2531,7 @@ struct rte_flow_action_set_meta {
  };
  
  /* Mbuf dynamic field offset for metadata. */

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

* [dpdk-stable] patch 'net/mlx5: improve logging of MPRQ selection' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (105 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/mlx5: set dynamic flow metadata in Rx queues' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/ixgbe: fix resource leak after thread exits normally' " luca.boccassi
                     ` (105 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Alexander Kozyrev; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 4c84ef15a76a8a0e4352baa71938c780cc4a514b Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev@mellanox.com>
Date: Fri, 17 Apr 2020 17:20:39 +0000
Subject: [PATCH] net/mlx5: improve logging of MPRQ selection

[ upstream commit a24431dffb206948de15687e6b49198b5d50fb12 ]

MPRQ is silently turned off in case there is not enough
Rx queues configured. Improve the logging to show a
warning in this case to notify a user about the Rx burst
function selected.

Fixes: 7d6bf6b866b8 ("net/mlx5: add Multi-Packet Rx support")

Signed-off-by: Alexander Kozyrev <akozyrev@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
 drivers/net/mlx5/mlx5_rxq.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index a4071f891e..c687752cb7 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -1896,19 +1896,22 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
 		tmpl->rxq.sges_n = sges_n;
 		max_lro_size = max_rx_pkt_len;
 	}
-	if (mprq_en && !mlx5_rxq_mprq_enabled(&tmpl->rxq))
+	if (config->mprq.enabled && !mlx5_rxq_mprq_enabled(&tmpl->rxq))
 		DRV_LOG(WARNING,
-			"port %u MPRQ is requested but cannot be enabled"
-			" (requested: packet size = %u, desc = %u,"
-			" stride_sz = %u, stride_num = %u,"
-			" supported: min_stride_sz = %u, max_stride_sz = %u).",
-			dev->data->port_id, non_scatter_min_mbuf_size, desc,
+			"port %u MPRQ is requested but cannot be enabled\n"
+			" (requested: pkt_sz = %u, desc_num = %u,"
+			" rxq_num = %u, stride_sz = %u, stride_num = %u\n"
+			"  supported: min_rxqs_num = %u,"
+			" min_stride_sz = %u, max_stride_sz = %u).",
+			dev->data->port_id, non_scatter_min_mbuf_size,
+			desc, priv->rxqs_n,
 			config->mprq.stride_size_n ?
 				(1U << config->mprq.stride_size_n) :
 				(1U << mprq_stride_size),
 			config->mprq.stride_num_n ?
 				(1U << config->mprq.stride_num_n) :
 				(1U << mprq_stride_nums),
+			config->mprq.min_rxqs_num,
 			(1U << config->mprq.min_stride_size_n),
 			(1U << config->mprq.max_stride_size_n));
 	DRV_LOG(DEBUG, "port %u maximum number of segments per packet: %u",
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:48.883667543 +0100
+++ 0108-net-mlx5-improve-logging-of-MPRQ-selection.patch	2020-05-19 14:04:44.356650911 +0100
@@ -1,15 +1,16 @@
-From a24431dffb206948de15687e6b49198b5d50fb12 Mon Sep 17 00:00:00 2001
+From 4c84ef15a76a8a0e4352baa71938c780cc4a514b Mon Sep 17 00:00:00 2001
 From: Alexander Kozyrev <akozyrev@mellanox.com>
 Date: Fri, 17 Apr 2020 17:20:39 +0000
 Subject: [PATCH] net/mlx5: improve logging of MPRQ selection
 
+[ upstream commit a24431dffb206948de15687e6b49198b5d50fb12 ]
+
 MPRQ is silently turned off in case there is not enough
 Rx queues configured. Improve the logging to show a
 warning in this case to notify a user about the Rx burst
 function selected.
 
 Fixes: 7d6bf6b866b8 ("net/mlx5: add Multi-Packet Rx support")
-Cc: stable@dpdk.org
 
 Signed-off-by: Alexander Kozyrev <akozyrev@mellanox.com>
 Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
@@ -18,10 +19,10 @@
  1 file changed, 9 insertions(+), 6 deletions(-)
 
 diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
-index 9bc7af6d92..7a50ec6f16 100644
+index a4071f891e..c687752cb7 100644
 --- a/drivers/net/mlx5/mlx5_rxq.c
 +++ b/drivers/net/mlx5/mlx5_rxq.c
-@@ -1921,19 +1921,22 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
+@@ -1896,19 +1896,22 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
  		tmpl->rxq.sges_n = sges_n;
  		max_lro_size = max_rx_pkt_len;
  	}

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

* [dpdk-stable] patch 'net/ixgbe: fix resource leak after thread exits normally' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (106 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/mlx5: improve logging of MPRQ selection' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/ixgbe: fix link status after port reset' " luca.boccassi
                     ` (104 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Tao Zhu; +Cc: Konstantin Ananyev, Xiaolong Ye, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 9a673fc54474800604960850eacf78e0ca35b286 Mon Sep 17 00:00:00 2001
From: Tao Zhu <taox.zhu@intel.com>
Date: Wed, 22 Apr 2020 12:37:36 +0000
Subject: [PATCH] net/ixgbe: fix resource leak after thread exits normally

[ upstream commit d68ab7a9f9aeb486bd17d5fa42bd5cc9f179693f ]

When the thread exits normally, pthread_join() is not called, which can
result in a resource leak. Therefore, the thread is set to separation
mode using function pthread_detach(), so that no program call
pthread_join() is required to recycle, and when the thread exits,
the system automatically reclaims resources.

Wait for the thread to finish with timeout argument(0 means that it will
not return until link complete), wait until the thread finishes before
returning. Normally, the thread will finish in a shorter time, and give
a warning message if it hasn't finished in a longer time.

Fixes: 819d0d1d57f1 ("net/ixgbe: fix blocking system events")

Signed-off-by: Tao Zhu <taox.zhu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 58 +++++++++++++++-----------------
 1 file changed, 28 insertions(+), 30 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 2cedd1a273..89d0e1c66a 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -230,7 +230,8 @@ static int ixgbe_dev_interrupt_action(struct rte_eth_dev *dev);
 static void ixgbe_dev_interrupt_handler(void *param);
 static void ixgbe_dev_interrupt_delayed_handler(void *param);
 static void *ixgbe_dev_setup_link_thread_handler(void *param);
-static void ixgbe_dev_cancel_link_thread(struct rte_eth_dev *dev);
+static int ixgbe_dev_wait_setup_link_complete(struct rte_eth_dev *dev,
+					      uint32_t timeout_ms);
 
 static int ixgbe_add_rar(struct rte_eth_dev *dev,
 			struct rte_ether_addr *mac_addr,
@@ -2598,7 +2599,7 @@ ixgbe_dev_start(struct rte_eth_dev *dev)
 	PMD_INIT_FUNC_TRACE();
 
 	/* Stop the link setup handler before resetting the HW. */
-	ixgbe_dev_cancel_link_thread(dev);
+	ixgbe_dev_wait_setup_link_complete(dev, 0);
 
 	/* disable uio/vfio intr/eventfd mapping */
 	rte_intr_disable(intr_handle);
@@ -2885,7 +2886,7 @@ ixgbe_dev_stop(struct rte_eth_dev *dev)
 
 	PMD_INIT_FUNC_TRACE();
 
-	ixgbe_dev_cancel_link_thread(dev);
+	ixgbe_dev_wait_setup_link_complete(dev, 0);
 
 	/* disable interrupts */
 	ixgbe_disable_intr(hw);
@@ -4140,36 +4141,32 @@ out:
 	return ret_val;
 }
 
-/* return 1: setup complete, return 0: setup not complete, and wait timeout*/
+/*
+ * If @timeout_ms was 0, it means that it will not return until link complete.
+ * It returns 1 on complete, return 0 on timeout.
+ */
 static int
-ixgbe_dev_wait_setup_link_complete(struct rte_eth_dev *dev)
+ixgbe_dev_wait_setup_link_complete(struct rte_eth_dev *dev, uint32_t timeout_ms)
 {
-#define DELAY_INTERVAL 100 /* 100ms */
-#define MAX_TIMEOUT    90 /* 9s (90 * 100ms) in total */
+#define WARNING_TIMEOUT    9000 /* 9s  in total */
 	struct ixgbe_adapter *ad = dev->data->dev_private;
-	int timeout = MAX_TIMEOUT;
+	uint32_t timeout = timeout_ms ? timeout_ms : WARNING_TIMEOUT;
 
-	while (rte_atomic32_read(&ad->link_thread_running) && timeout) {
-		msec_delay(DELAY_INTERVAL);
+	while (rte_atomic32_read(&ad->link_thread_running)) {
+		msec_delay(1);
 		timeout--;
-	}
-
-
-	return !!timeout;
-}
 
-static void
-ixgbe_dev_cancel_link_thread(struct rte_eth_dev *dev)
-{
-	struct ixgbe_adapter *ad = dev->data->dev_private;
-	void *retval;
-
-	if (!ixgbe_dev_wait_setup_link_complete(dev)) {
-		pthread_cancel(ad->link_thread_tid);
-		pthread_join(ad->link_thread_tid, &retval);
-		rte_atomic32_clear(&ad->link_thread_running);
-		PMD_DRV_LOG(ERR, "Link thread not complete, cancel it!");
+		if (timeout_ms) {
+			if (!timeout)
+				return 0;
+		} else if (!timeout) {
+			/* It will not return until link complete */
+			timeout = WARNING_TIMEOUT;
+			PMD_DRV_LOG(ERR, "IXGBE link thread not complete too long time!");
+		}
 	}
+
+	return 1;
 }
 
 static void *
@@ -4183,6 +4180,7 @@ ixgbe_dev_setup_link_thread_handler(void *param)
 	u32 speed;
 	bool autoneg = false;
 
+	pthread_detach(pthread_self());
 	speed = hw->phy.autoneg_advertised;
 	if (!speed)
 		ixgbe_get_link_capabilities(hw, &speed, &autoneg);
@@ -4278,8 +4276,8 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
 	if (link_up == 0) {
 		if (ixgbe_get_media_type(hw) == ixgbe_media_type_fiber) {
 			intr->flags |= IXGBE_FLAG_NEED_LINK_CONFIG;
-			if (ixgbe_dev_wait_setup_link_complete(dev) &&
-			    rte_atomic32_test_and_set(&ad->link_thread_running)) {
+			ixgbe_dev_wait_setup_link_complete(dev, 0);
+			if (rte_atomic32_test_and_set(&ad->link_thread_running)) {
 				if (rte_ctrl_thread_create(&ad->link_thread_tid,
 					"ixgbe-link-handler",
 					NULL,
@@ -5319,7 +5317,7 @@ ixgbevf_dev_start(struct rte_eth_dev *dev)
 	PMD_INIT_FUNC_TRACE();
 
 	/* Stop the link setup handler before resetting the HW. */
-	ixgbe_dev_cancel_link_thread(dev);
+	ixgbe_dev_wait_setup_link_complete(dev, 0);
 
 	err = hw->mac.ops.reset_hw(hw);
 	if (err) {
@@ -5417,7 +5415,7 @@ ixgbevf_dev_stop(struct rte_eth_dev *dev)
 
 	PMD_INIT_FUNC_TRACE();
 
-	ixgbe_dev_cancel_link_thread(dev);
+	ixgbe_dev_wait_setup_link_complete(dev, 0);
 
 	ixgbevf_intr_disable(dev);
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:48.920788348 +0100
+++ 0109-net-ixgbe-fix-resource-leak-after-thread-exits-norma.patch	2020-05-19 14:04:44.360650983 +0100
@@ -1,8 +1,10 @@
-From d68ab7a9f9aeb486bd17d5fa42bd5cc9f179693f Mon Sep 17 00:00:00 2001
+From 9a673fc54474800604960850eacf78e0ca35b286 Mon Sep 17 00:00:00 2001
 From: Tao Zhu <taox.zhu@intel.com>
 Date: Wed, 22 Apr 2020 12:37:36 +0000
 Subject: [PATCH] net/ixgbe: fix resource leak after thread exits normally
 
+[ upstream commit d68ab7a9f9aeb486bd17d5fa42bd5cc9f179693f ]
+
 When the thread exits normally, pthread_join() is not called, which can
 result in a resource leak. Therefore, the thread is set to separation
 mode using function pthread_detach(), so that no program call
@@ -15,7 +17,6 @@
 a warning message if it hasn't finished in a longer time.
 
 Fixes: 819d0d1d57f1 ("net/ixgbe: fix blocking system events")
-Cc: stable@dpdk.org
 
 Signed-off-by: Tao Zhu <taox.zhu@intel.com>
 Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
@@ -25,7 +26,7 @@
  1 file changed, 28 insertions(+), 30 deletions(-)
 
 diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
-index 2a8543fd73..d26cf0ab9e 100644
+index 2cedd1a273..89d0e1c66a 100644
 --- a/drivers/net/ixgbe/ixgbe_ethdev.c
 +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
 @@ -230,7 +230,8 @@ static int ixgbe_dev_interrupt_action(struct rte_eth_dev *dev);
@@ -38,7 +39,7 @@
  
  static int ixgbe_add_rar(struct rte_eth_dev *dev,
  			struct rte_ether_addr *mac_addr,
-@@ -2601,7 +2602,7 @@ ixgbe_dev_start(struct rte_eth_dev *dev)
+@@ -2598,7 +2599,7 @@ ixgbe_dev_start(struct rte_eth_dev *dev)
  	PMD_INIT_FUNC_TRACE();
  
  	/* Stop the link setup handler before resetting the HW. */
@@ -47,7 +48,7 @@
  
  	/* disable uio/vfio intr/eventfd mapping */
  	rte_intr_disable(intr_handle);
-@@ -2888,7 +2889,7 @@ ixgbe_dev_stop(struct rte_eth_dev *dev)
+@@ -2885,7 +2886,7 @@ ixgbe_dev_stop(struct rte_eth_dev *dev)
  
  	PMD_INIT_FUNC_TRACE();
  
@@ -56,7 +57,7 @@
  
  	/* disable interrupts */
  	ixgbe_disable_intr(hw);
-@@ -4143,36 +4144,32 @@ out:
+@@ -4140,36 +4141,32 @@ out:
  	return ret_val;
  }
  
@@ -112,7 +113,7 @@
  }
  
  static void *
-@@ -4186,6 +4183,7 @@ ixgbe_dev_setup_link_thread_handler(void *param)
+@@ -4183,6 +4180,7 @@ ixgbe_dev_setup_link_thread_handler(void *param)
  	u32 speed;
  	bool autoneg = false;
  
@@ -120,7 +121,7 @@
  	speed = hw->phy.autoneg_advertised;
  	if (!speed)
  		ixgbe_get_link_capabilities(hw, &speed, &autoneg);
-@@ -4282,8 +4280,8 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
+@@ -4278,8 +4276,8 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
  	if (link_up == 0) {
  		if (ixgbe_get_media_type(hw) == ixgbe_media_type_fiber) {
  			intr->flags |= IXGBE_FLAG_NEED_LINK_CONFIG;
@@ -131,7 +132,7 @@
  				if (rte_ctrl_thread_create(&ad->link_thread_tid,
  					"ixgbe-link-handler",
  					NULL,
-@@ -5323,7 +5321,7 @@ ixgbevf_dev_start(struct rte_eth_dev *dev)
+@@ -5319,7 +5317,7 @@ ixgbevf_dev_start(struct rte_eth_dev *dev)
  	PMD_INIT_FUNC_TRACE();
  
  	/* Stop the link setup handler before resetting the HW. */
@@ -140,7 +141,7 @@
  
  	err = hw->mac.ops.reset_hw(hw);
  	if (err) {
-@@ -5421,7 +5419,7 @@ ixgbevf_dev_stop(struct rte_eth_dev *dev)
+@@ -5417,7 +5415,7 @@ ixgbevf_dev_stop(struct rte_eth_dev *dev)
  
  	PMD_INIT_FUNC_TRACE();
  

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

* [dpdk-stable] patch 'net/ixgbe: fix link status after port reset' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (107 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/ixgbe: fix resource leak after thread exits normally' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/iavf: fix stats query error code' " luca.boccassi
                     ` (103 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Shougang Wang; +Cc: Qiming Yang, Xueming Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From ca2ecc15f20193a74bd9e6a0c14162e48daade97 Mon Sep 17 00:00:00 2001
From: Shougang Wang <shougangx.wang@intel.com>
Date: Mon, 13 Apr 2020 01:38:39 +0000
Subject: [PATCH] net/ixgbe: fix link status after port reset

[ upstream commit dfcea7f90f703dabcb3589ea06070a228dbcef12 ]

It's a normal behavior to change the link status to up after
resetting the port. So it is unnecessary to set link down before
starting port, and changing the link state(link up/down) frequently
will cause link speed unstable.

Fixes: c3f2fbff78cf ("net/ixgbe: fix link status")

Signed-off-by: Shougang Wang <shougangx.wang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
Tested-by: Xueming Zhang <xuemingx.zhang@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 89d0e1c66a..29b7501e0a 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -1195,7 +1195,6 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
 	diag = ixgbe_bypass_init_hw(hw);
 #else
 	diag = ixgbe_init_hw(hw);
-	hw->mac.autotry_restart = false;
 #endif /* RTE_LIBRTE_IXGBE_BYPASS */
 
 	/*
@@ -1306,8 +1305,6 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
 	/* enable support intr */
 	ixgbe_enable_intr(eth_dev);
 
-	ixgbe_dev_set_link_down(eth_dev);
-
 	/* initialize filter info */
 	memset(filter_info, 0,
 	       sizeof(struct ixgbe_filter_info));
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:48.965781779 +0100
+++ 0110-net-ixgbe-fix-link-status-after-port-reset.patch	2020-05-19 14:04:44.368651128 +0100
@@ -1,15 +1,16 @@
-From dfcea7f90f703dabcb3589ea06070a228dbcef12 Mon Sep 17 00:00:00 2001
+From ca2ecc15f20193a74bd9e6a0c14162e48daade97 Mon Sep 17 00:00:00 2001
 From: Shougang Wang <shougangx.wang@intel.com>
 Date: Mon, 13 Apr 2020 01:38:39 +0000
 Subject: [PATCH] net/ixgbe: fix link status after port reset
 
+[ upstream commit dfcea7f90f703dabcb3589ea06070a228dbcef12 ]
+
 It's a normal behavior to change the link status to up after
 resetting the port. So it is unnecessary to set link down before
 starting port, and changing the link state(link up/down) frequently
 will cause link speed unstable.
 
 Fixes: c3f2fbff78cf ("net/ixgbe: fix link status")
-Cc: stable@dpdk.org
 
 Signed-off-by: Shougang Wang <shougangx.wang@intel.com>
 Acked-by: Qiming Yang <qiming.yang@intel.com>
@@ -19,10 +20,10 @@
  1 file changed, 3 deletions(-)
 
 diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
-index d26cf0ab9e..aa1e8aac51 100644
+index 89d0e1c66a..29b7501e0a 100644
 --- a/drivers/net/ixgbe/ixgbe_ethdev.c
 +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
-@@ -1197,7 +1197,6 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
+@@ -1195,7 +1195,6 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
  	diag = ixgbe_bypass_init_hw(hw);
  #else
  	diag = ixgbe_init_hw(hw);
@@ -30,7 +31,7 @@
  #endif /* RTE_LIBRTE_IXGBE_BYPASS */
  
  	/*
-@@ -1308,8 +1307,6 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
+@@ -1306,8 +1305,6 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
  	/* enable support intr */
  	ixgbe_enable_intr(eth_dev);
  

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

* [dpdk-stable] patch 'net/iavf: fix stats query error code' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (108 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/ixgbe: fix link status after port reset' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/bnxt: fix HWRM command during FW reset' " luca.boccassi
                     ` (102 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Cheng Peng; +Cc: Xiaolong Ye, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From c1b7cb6792de8f9f301940b24c4a1d07694db1bc Mon Sep 17 00:00:00 2001
From: Cheng Peng <cheng.peng5@zte.com.cn>
Date: Tue, 14 Apr 2020 09:56:57 +0800
Subject: [PATCH] net/iavf: fix stats query error code

[ upstream commit fdfbfe7085934f3b84c5c8d89f4ab7d7016cb458 ]

The iavf_dev_stats_get function should return ret instead of -eio.

Fixes: f4a41a6953af ("net/avf: support stats")

Signed-off-by: Cheng Peng <cheng.peng5@zte.com.cn>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
 drivers/net/iavf/iavf_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index f544303c05..266200dbe6 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -1079,7 +1079,7 @@ iavf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 	} else {
 		PMD_DRV_LOG(ERR, "Get statistics failed");
 	}
-	return -EIO;
+	return ret;
 }
 
 static int
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:49.009675974 +0100
+++ 0111-net-iavf-fix-stats-query-error-code.patch	2020-05-19 14:04:44.368651128 +0100
@@ -1,12 +1,13 @@
-From fdfbfe7085934f3b84c5c8d89f4ab7d7016cb458 Mon Sep 17 00:00:00 2001
+From c1b7cb6792de8f9f301940b24c4a1d07694db1bc Mon Sep 17 00:00:00 2001
 From: Cheng Peng <cheng.peng5@zte.com.cn>
 Date: Tue, 14 Apr 2020 09:56:57 +0800
 Subject: [PATCH] net/iavf: fix stats query error code
 
+[ upstream commit fdfbfe7085934f3b84c5c8d89f4ab7d7016cb458 ]
+
 The iavf_dev_stats_get function should return ret instead of -eio.
 
 Fixes: f4a41a6953af ("net/avf: support stats")
-Cc: stable@dpdk.org
 
 Signed-off-by: Cheng Peng <cheng.peng5@zte.com.cn>
 Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
@@ -15,10 +16,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
-index 4280a92bb1..117fbc5f73 100644
+index f544303c05..266200dbe6 100644
 --- a/drivers/net/iavf/iavf_ethdev.c
 +++ b/drivers/net/iavf/iavf_ethdev.c
-@@ -1083,7 +1083,7 @@ iavf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
+@@ -1079,7 +1079,7 @@ iavf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
  	} else {
  		PMD_DRV_LOG(ERR, "Get statistics failed");
  	}

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

* [dpdk-stable] patch 'net/bnxt: fix HWRM command during FW reset' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (109 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/iavf: fix stats query error code' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/bnxt: use true/false for bool types' " luca.boccassi
                     ` (101 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Lance Richardson, Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 886085974e84c040e84058d508b739875090321b Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Tue, 21 Apr 2020 14:33:46 -0700
Subject: [PATCH] net/bnxt: fix HWRM command during FW reset

[ upstream commit ac2df046a0cabd68e520fafbeaccd35e3e1b86ef ]

FW returns HWRM_ERR_CODE_HOT_RESET_PROGRESS(0xa) when it is
unable to process a specific cmd while hot reset is in progress.
Host driver is expected to keep retrying the cmd for 2s with
a gap of 50ms between each retrial.

Also, fixed to fail port start if the HWRM_FUNC_DRV_IF_CHANGE
still returns error after 2 seconds.

Fixes: 0b533591238f ("net/bnxt: inform firmware about IF state changes")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt.h        |  5 +++++
 drivers/net/bnxt/bnxt_ethdev.c | 25 +++++++++++++++++--------
 drivers/net/bnxt/bnxt_hwrm.c   |  4 ++++
 3 files changed, 26 insertions(+), 8 deletions(-)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 93735a2a46..cfd6f197da 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -470,6 +470,11 @@ struct bnxt_error_recovery_info {
 	uint32_t        last_reset_counter;
 };
 
+/* Frequency for the FUNC_DRV_IF_CHANGE retry in milliseconds */
+#define BNXT_IF_CHANGE_RETRY_INTERVAL	50
+/* Maximum retry count for FUNC_DRV_IF_CHANGE */
+#define BNXT_IF_CHANGE_RETRY_COUNT	40
+
 /* address space location of register */
 #define BNXT_FW_STATUS_REG_TYPE_MASK	3
 /* register is located in PCIe config space */
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index dedb012382..b85ec14005 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -833,7 +833,7 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
 	struct bnxt *bp = eth_dev->data->dev_private;
 	uint64_t rx_offloads = eth_dev->data->dev_conf.rxmode.offloads;
 	int vlan_mask = 0;
-	int rc;
+	int rc, retry_cnt = BNXT_IF_CHANGE_RETRY_COUNT;
 
 	if (!eth_dev->data->nb_tx_queues || !eth_dev->data->nb_rx_queues) {
 		PMD_DRV_LOG(ERR, "Queues are not configured yet!\n");
@@ -846,14 +846,23 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
 			bp->rx_cp_nr_rings, RTE_ETHDEV_QUEUE_STAT_CNTRS);
 	}
 
-	rc = bnxt_hwrm_if_change(bp, 1);
-	if (!rc) {
-		if (bp->flags & BNXT_FLAG_IF_CHANGE_HOT_FW_RESET_DONE) {
-			rc = bnxt_handle_if_change_status(bp);
-			if (rc)
-				return rc;
-		}
+	do {
+		rc = bnxt_hwrm_if_change(bp, 1);
+		if (rc == 0 || rc != -EAGAIN)
+			break;
+
+		rte_delay_ms(BNXT_IF_CHANGE_RETRY_INTERVAL);
+	} while (retry_cnt--);
+
+	if (rc)
+		return rc;
+
+	if (bp->flags & BNXT_FLAG_IF_CHANGE_HOT_FW_RESET_DONE) {
+		rc = bnxt_handle_if_change_status(bp);
+		if (rc)
+			return rc;
 	}
+
 	bnxt_enable_int(bp);
 
 	rc = bnxt_init_chip(bp);
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 7408412c9b..b8d1d6322e 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -221,6 +221,8 @@ static int bnxt_hwrm_send_message(struct bnxt *bp, void *msg,
 			rc = -EINVAL; \
 		else if (rc == HWRM_ERR_CODE_CMD_NOT_SUPPORTED) \
 			rc = -ENOTSUP; \
+		else if (rc == HWRM_ERR_CODE_HOT_RESET_PROGRESS) \
+			rc = -EAGAIN; \
 		else if (rc > 0) \
 			rc = -EIO; \
 		return rc; \
@@ -249,6 +251,8 @@ static int bnxt_hwrm_send_message(struct bnxt *bp, void *msg,
 			rc = -EINVAL; \
 		else if (rc == HWRM_ERR_CODE_CMD_NOT_SUPPORTED) \
 			rc = -ENOTSUP; \
+		else if (rc == HWRM_ERR_CODE_HOT_RESET_PROGRESS) \
+			rc = -EAGAIN; \
 		else if (rc > 0) \
 			rc = -EIO; \
 		return rc; \
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:49.045497222 +0100
+++ 0112-net-bnxt-fix-HWRM-command-during-FW-reset.patch	2020-05-19 14:04:44.376651273 +0100
@@ -1,8 +1,10 @@
-From ac2df046a0cabd68e520fafbeaccd35e3e1b86ef Mon Sep 17 00:00:00 2001
+From 886085974e84c040e84058d508b739875090321b Mon Sep 17 00:00:00 2001
 From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
 Date: Tue, 21 Apr 2020 14:33:46 -0700
 Subject: [PATCH] net/bnxt: fix HWRM command during FW reset
 
+[ upstream commit ac2df046a0cabd68e520fafbeaccd35e3e1b86ef ]
+
 FW returns HWRM_ERR_CODE_HOT_RESET_PROGRESS(0xa) when it is
 unable to process a specific cmd while hot reset is in progress.
 Host driver is expected to keep retrying the cmd for 2s with
@@ -12,7 +14,6 @@
 still returns error after 2 seconds.
 
 Fixes: 0b533591238f ("net/bnxt: inform firmware about IF state changes")
-Cc: stable@dpdk.org
 
 Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
 Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
@@ -25,10 +26,10 @@
  3 files changed, 26 insertions(+), 8 deletions(-)
 
 diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
-index a7a9e4113a..d55a570396 100644
+index 93735a2a46..cfd6f197da 100644
 --- a/drivers/net/bnxt/bnxt.h
 +++ b/drivers/net/bnxt/bnxt.h
-@@ -480,6 +480,11 @@ struct bnxt_error_recovery_info {
+@@ -470,6 +470,11 @@ struct bnxt_error_recovery_info {
  	uint32_t        last_reset_counter;
  };
  
@@ -37,14 +38,14 @@
 +/* Maximum retry count for FUNC_DRV_IF_CHANGE */
 +#define BNXT_IF_CHANGE_RETRY_COUNT	40
 +
- struct bnxt_mark_info {
- 	uint32_t	mark_id;
- 	bool		valid;
+ /* address space location of register */
+ #define BNXT_FW_STATUS_REG_TYPE_MASK	3
+ /* register is located in PCIe config space */
 diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
-index 3397c05353..b6c7132564 100644
+index dedb012382..b85ec14005 100644
 --- a/drivers/net/bnxt/bnxt_ethdev.c
 +++ b/drivers/net/bnxt/bnxt_ethdev.c
-@@ -1051,7 +1051,7 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
+@@ -833,7 +833,7 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
  	struct bnxt *bp = eth_dev->data->dev_private;
  	uint64_t rx_offloads = eth_dev->data->dev_conf.rxmode.offloads;
  	int vlan_mask = 0;
@@ -53,7 +54,7 @@
  
  	if (!eth_dev->data->nb_tx_queues || !eth_dev->data->nb_rx_queues) {
  		PMD_DRV_LOG(ERR, "Queues are not configured yet!\n");
-@@ -1064,14 +1064,23 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
+@@ -846,14 +846,23 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
  			bp->rx_cp_nr_rings, RTE_ETHDEV_QUEUE_STAT_CNTRS);
  	}
  
@@ -85,7 +86,7 @@
  
  	rc = bnxt_init_chip(bp);
 diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
-index 4c0fac6be1..dc0b405606 100644
+index 7408412c9b..b8d1d6322e 100644
 --- a/drivers/net/bnxt/bnxt_hwrm.c
 +++ b/drivers/net/bnxt/bnxt_hwrm.c
 @@ -221,6 +221,8 @@ static int bnxt_hwrm_send_message(struct bnxt *bp, void *msg,

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

* [dpdk-stable] patch 'net/bnxt: use true/false for bool types' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (110 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/bnxt: fix HWRM command during FW reset' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/bnxt: fix port start failure handling' " luca.boccassi
                     ` (100 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Somnath Kotur, Lance Richardson, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 6cc939165f7e4397f740b00898889c1fd1fc63e0 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Tue, 21 Apr 2020 14:33:47 -0700
Subject: [PATCH] net/bnxt: use true/false for bool types

[ upstream commit ec16ad80c692e8d285fd4660703615725181419e ]

Fixes: 0b533591238f ("net/bnxt: inform firmware about IF state changes")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index b85ec14005..ed88b594df 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -847,7 +847,7 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
 	}
 
 	do {
-		rc = bnxt_hwrm_if_change(bp, 1);
+		rc = bnxt_hwrm_if_change(bp, true);
 		if (rc == 0 || rc != -EAGAIN)
 			break;
 
@@ -891,7 +891,7 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
 	return 0;
 
 error:
-	bnxt_hwrm_if_change(bp, 0);
+	bnxt_hwrm_if_change(bp, false);
 	bnxt_shutdown_nic(bp);
 	bnxt_free_tx_mbufs(bp);
 	bnxt_free_rx_mbufs(bp);
@@ -965,7 +965,7 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
 	/* Process any remaining notifications in default completion queue */
 	bnxt_int_handler(eth_dev);
 	bnxt_shutdown_nic(bp);
-	bnxt_hwrm_if_change(bp, 0);
+	bnxt_hwrm_if_change(bp, false);
 	bp->rx_cosq_cnt = 0;
 }
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:49.090845796 +0100
+++ 0113-net-bnxt-use-true-false-for-bool-types.patch	2020-05-19 14:04:44.380651345 +0100
@@ -1,10 +1,11 @@
-From ec16ad80c692e8d285fd4660703615725181419e Mon Sep 17 00:00:00 2001
+From 6cc939165f7e4397f740b00898889c1fd1fc63e0 Mon Sep 17 00:00:00 2001
 From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
 Date: Tue, 21 Apr 2020 14:33:47 -0700
 Subject: [PATCH] net/bnxt: use true/false for bool types
 
+[ upstream commit ec16ad80c692e8d285fd4660703615725181419e ]
+
 Fixes: 0b533591238f ("net/bnxt: inform firmware about IF state changes")
-Cc: stable@dpdk.org
 
 Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
 Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
@@ -15,10 +16,10 @@
  1 file changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
-index b6c7132564..780d9c46e9 100644
+index b85ec14005..ed88b594df 100644
 --- a/drivers/net/bnxt/bnxt_ethdev.c
 +++ b/drivers/net/bnxt/bnxt_ethdev.c
-@@ -1065,7 +1065,7 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
+@@ -847,7 +847,7 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
  	}
  
  	do {
@@ -27,7 +28,7 @@
  		if (rc == 0 || rc != -EAGAIN)
  			break;
  
-@@ -1113,7 +1113,7 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
+@@ -891,7 +891,7 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
  	return 0;
  
  error:
@@ -36,15 +37,15 @@
  	bnxt_shutdown_nic(bp);
  	bnxt_free_tx_mbufs(bp);
  	bnxt_free_rx_mbufs(bp);
-@@ -1190,7 +1190,7 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
+@@ -965,7 +965,7 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
  	/* Process any remaining notifications in default completion queue */
  	bnxt_int_handler(eth_dev);
  	bnxt_shutdown_nic(bp);
 -	bnxt_hwrm_if_change(bp, 0);
 +	bnxt_hwrm_if_change(bp, false);
+ 	bp->rx_cosq_cnt = 0;
+ }
  
- 	rte_free(bp->mark_table);
- 	bp->mark_table = NULL;
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'net/bnxt: fix port start failure handling' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (111 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/bnxt: use true/false for bool types' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/bnxt: fix VLAN add when port is stopped' " luca.boccassi
                     ` (99 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From a62880c4d4ae861422c966ebbbb33082e474ddc1 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Tue, 21 Apr 2020 14:33:48 -0700
Subject: [PATCH] net/bnxt: fix port start failure handling

[ upstream commit cf2445374c573bdbccb8144962367cb21e99e58e ]

Fixed to invoke clean up in the reverse sequence of
initialization in case any of the FW commands fail
during port start.

Fixes: 0b533591238f ("net/bnxt: inform firmware about IF state changes")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index ed88b594df..cddcd427df 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -891,10 +891,10 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
 	return 0;
 
 error:
-	bnxt_hwrm_if_change(bp, false);
 	bnxt_shutdown_nic(bp);
 	bnxt_free_tx_mbufs(bp);
 	bnxt_free_rx_mbufs(bp);
+	bnxt_hwrm_if_change(bp, false);
 	eth_dev->data->dev_started = 0;
 	return rc;
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:49.133136338 +0100
+++ 0114-net-bnxt-fix-port-start-failure-handling.patch	2020-05-19 14:04:44.384651418 +0100
@@ -1,14 +1,15 @@
-From cf2445374c573bdbccb8144962367cb21e99e58e Mon Sep 17 00:00:00 2001
+From a62880c4d4ae861422c966ebbbb33082e474ddc1 Mon Sep 17 00:00:00 2001
 From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
 Date: Tue, 21 Apr 2020 14:33:48 -0700
 Subject: [PATCH] net/bnxt: fix port start failure handling
 
+[ upstream commit cf2445374c573bdbccb8144962367cb21e99e58e ]
+
 Fixed to invoke clean up in the reverse sequence of
 initialization in case any of the FW commands fail
 during port start.
 
 Fixes: 0b533591238f ("net/bnxt: inform firmware about IF state changes")
-Cc: stable@dpdk.org
 
 Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
 Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
@@ -18,10 +19,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
-index 780d9c46e9..206111db5b 100644
+index ed88b594df..cddcd427df 100644
 --- a/drivers/net/bnxt/bnxt_ethdev.c
 +++ b/drivers/net/bnxt/bnxt_ethdev.c
-@@ -1113,10 +1113,10 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
+@@ -891,10 +891,10 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
  	return 0;
  
  error:

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

* [dpdk-stable] patch 'net/bnxt: fix VLAN add when port is stopped' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (112 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/bnxt: fix port start failure handling' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'security: fix crash at accessing non-implemented ops' " luca.boccassi
                     ` (98 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Venkat Duvvuru, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 0407d17daef926a5909d9a8ebc70faa1477c4ede Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Tue, 21 Apr 2020 14:33:49 -0700
Subject: [PATCH] net/bnxt: fix VLAN add when port is stopped

[ upstream commit 8b60154d4b8a413eec43aafce1b4341dd575d4c3 ]

Driver destroys the vnic when the port is brought down.
When user tries to add a vlan when port is stopped, driver
issues HWRM command to FW with invalid vnic_id and it fails.

Fixed to return an error while setting vlan when port is
not started.

Fixes: b4e190d55c25 ("net/bnxt: fix MAC/VLAN filter allocation")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index cddcd427df..a4cd6cc672 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1849,6 +1849,11 @@ static int bnxt_vlan_filter_set_op(struct rte_eth_dev *eth_dev,
 	if (rc)
 		return rc;
 
+	if (!eth_dev->data->dev_started) {
+		PMD_DRV_LOG(ERR, "port must be started before setting vlan\n");
+		return -EINVAL;
+	}
+
 	/* These operations apply to ALL existing MAC/VLAN filters */
 	if (on)
 		return bnxt_add_vlan_filter(bp, vlan_id);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:49.173896464 +0100
+++ 0115-net-bnxt-fix-VLAN-add-when-port-is-stopped.patch	2020-05-19 14:04:44.384651418 +0100
@@ -1,8 +1,10 @@
-From 8b60154d4b8a413eec43aafce1b4341dd575d4c3 Mon Sep 17 00:00:00 2001
+From 0407d17daef926a5909d9a8ebc70faa1477c4ede Mon Sep 17 00:00:00 2001
 From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
 Date: Tue, 21 Apr 2020 14:33:49 -0700
 Subject: [PATCH] net/bnxt: fix VLAN add when port is stopped
 
+[ upstream commit 8b60154d4b8a413eec43aafce1b4341dd575d4c3 ]
+
 Driver destroys the vnic when the port is brought down.
 When user tries to add a vlan when port is stopped, driver
 issues HWRM command to FW with invalid vnic_id and it fails.
@@ -11,7 +13,6 @@
 not started.
 
 Fixes: b4e190d55c25 ("net/bnxt: fix MAC/VLAN filter allocation")
-Cc: stable@dpdk.org
 
 Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
 Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
@@ -21,10 +22,10 @@
  1 file changed, 5 insertions(+)
 
 diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
-index 206111db5b..589190b372 100644
+index cddcd427df..a4cd6cc672 100644
 --- a/drivers/net/bnxt/bnxt_ethdev.c
 +++ b/drivers/net/bnxt/bnxt_ethdev.c
-@@ -2082,6 +2082,11 @@ static int bnxt_vlan_filter_set_op(struct rte_eth_dev *eth_dev,
+@@ -1849,6 +1849,11 @@ static int bnxt_vlan_filter_set_op(struct rte_eth_dev *eth_dev,
  	if (rc)
  		return rc;
  

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

* [dpdk-stable] patch 'security: fix crash at accessing non-implemented ops' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (113 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/bnxt: fix VLAN add when port is stopped' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'mempool: remove inline functions from export list' " luca.boccassi
                     ` (97 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Konstantin Ananyev; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 632fec749fda933bc9b25817165ad1bde21800ae Mon Sep 17 00:00:00 2001
From: Konstantin Ananyev <konstantin.ananyev@intel.com>
Date: Thu, 23 Apr 2020 16:10:42 +0100
Subject: [PATCH] security: fix crash at accessing non-implemented ops

[ upstream commit 34dff8bacc7b95cc288c24894443bd356e453b64 ]

Valid checks for optional function pointers inside dev-ops
were disabled by undefined macro.

Fixes: b6ee98547847 ("security: fix verification of parameters")

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 lib/librte_security/rte_security.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/lib/librte_security/rte_security.c b/lib/librte_security/rte_security.c
index d475b09771..dc9a3e89cd 100644
--- a/lib/librte_security/rte_security.c
+++ b/lib/librte_security/rte_security.c
@@ -108,10 +108,11 @@ rte_security_set_pkt_metadata(struct rte_security_ctx *instance,
 			      struct rte_mbuf *m, void *params)
 {
 #ifdef RTE_DEBUG
-	RTE_PTR_CHAIN3_OR_ERR_RET(instance, ops, set_pkt_metadata, -EINVAL,
-			-ENOTSUP);
 	RTE_PTR_OR_ERR_RET(sess, -EINVAL);
+	RTE_PTR_OR_ERR_RET(instance, -EINVAL);
+	RTE_PTR_OR_ERR_RET(instance->ops, -EINVAL);
 #endif
+	RTE_FUNC_PTR_OR_ERR_RET(*instance->ops->set_pkt_metadata, -ENOTSUP);
 	return instance->ops->set_pkt_metadata(instance->device,
 					       sess, m, params);
 }
@@ -122,8 +123,10 @@ rte_security_get_userdata(struct rte_security_ctx *instance, uint64_t md)
 	void *userdata = NULL;
 
 #ifdef RTE_DEBUG
-	RTE_PTR_CHAIN3_OR_ERR_RET(instance, ops, get_userdata, NULL, NULL);
+	RTE_PTR_OR_ERR_RET(instance, NULL);
+	RTE_PTR_OR_ERR_RET(instance->ops, NULL);
 #endif
+	RTE_FUNC_PTR_OR_ERR_RET(*instance->ops->get_userdata, NULL);
 	if (instance->ops->get_userdata(instance->device, md, &userdata))
 		return NULL;
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:49.215022709 +0100
+++ 0116-security-fix-crash-at-accessing-non-implemented-ops.patch	2020-05-19 14:04:44.384651418 +0100
@@ -1,13 +1,14 @@
-From 34dff8bacc7b95cc288c24894443bd356e453b64 Mon Sep 17 00:00:00 2001
+From 632fec749fda933bc9b25817165ad1bde21800ae Mon Sep 17 00:00:00 2001
 From: Konstantin Ananyev <konstantin.ananyev@intel.com>
 Date: Thu, 23 Apr 2020 16:10:42 +0100
 Subject: [PATCH] security: fix crash at accessing non-implemented ops
 
+[ upstream commit 34dff8bacc7b95cc288c24894443bd356e453b64 ]
+
 Valid checks for optional function pointers inside dev-ops
 were disabled by undefined macro.
 
 Fixes: b6ee98547847 ("security: fix verification of parameters")
-Cc: stable@dpdk.org
 
 Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
 Acked-by: Akhil Goyal <akhil.goyal@nxp.com>

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

* [dpdk-stable] patch 'mempool: remove inline functions from export list' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (114 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'security: fix crash at accessing non-implemented ops' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'lpm6: fix size of tbl8 group' " luca.boccassi
                     ` (96 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Fady Bader; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 8426cebb497d7588ccb0ce7d717d8241466ef260 Mon Sep 17 00:00:00 2001
From: Fady Bader <fady@mellanox.com>
Date: Wed, 22 Apr 2020 10:37:44 +0300
Subject: [PATCH] mempool: remove inline functions from export list

[ upstream commit 036d82365e7e26adc5061cae49778f96c431e697 ]

The code didn't compile when using exported mempool functions
under Windows.

compilation error logs:
rte_mempool_exports.def : error LNK2001:
unresolved external symbol rte_mempool_cache_flush
rte_mempool_exports.def : error LNK2001:
unresolved external symbol rte_mempool_default_cache
rte_mempool_exports.def : error LNK2001:
unresolved external symbol rte_mempool_generic_get
rte_mempool_exports.def : error LNK2001:
unresolved external symbol rte_mempool_generic_put
lib\librte_mempool.dll.a : fatal error LNK1120: 4 unresolved externals
clang: error: linker command failed with exit code 1120 (use -v to see invocation)

The cause was that there were some inline functions that were included
in the export list.
To solve this the functions, which are implemented in the header
and shouldn't be exported, were removed from rte_mempool_version.map
export list.

Fixes: 4b5062755aa7 ("mempool: allow user-owned cache")
Fixes: 656f2d3ede96 ("mempool: deprecate specific get and put functions")

Signed-off-by: Fady Bader <fady@mellanox.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 lib/librte_mempool/rte_mempool_version.map | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/lib/librte_mempool/rte_mempool_version.map b/lib/librte_mempool/rte_mempool_version.map
index d002dfc46f..d67ed2e2b9 100644
--- a/lib/librte_mempool/rte_mempool_version.map
+++ b/lib/librte_mempool/rte_mempool_version.map
@@ -4,18 +4,14 @@ DPDK_20.0 {
 	rte_mempool_audit;
 	rte_mempool_avail_count;
 	rte_mempool_cache_create;
-	rte_mempool_cache_flush;
 	rte_mempool_cache_free;
 	rte_mempool_calc_obj_size;
 	rte_mempool_check_cookies;
 	rte_mempool_contig_blocks_check_cookies;
 	rte_mempool_create;
 	rte_mempool_create_empty;
-	rte_mempool_default_cache;
 	rte_mempool_dump;
 	rte_mempool_free;
-	rte_mempool_generic_get;
-	rte_mempool_generic_put;
 	rte_mempool_in_use_count;
 	rte_mempool_list_dump;
 	rte_mempool_lookup;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:49.248275586 +0100
+++ 0117-mempool-remove-inline-functions-from-export-list.patch	2020-05-19 14:04:44.388651490 +0100
@@ -1,8 +1,10 @@
-From 036d82365e7e26adc5061cae49778f96c431e697 Mon Sep 17 00:00:00 2001
+From 8426cebb497d7588ccb0ce7d717d8241466ef260 Mon Sep 17 00:00:00 2001
 From: Fady Bader <fady@mellanox.com>
 Date: Wed, 22 Apr 2020 10:37:44 +0300
 Subject: [PATCH] mempool: remove inline functions from export list
 
+[ upstream commit 036d82365e7e26adc5061cae49778f96c431e697 ]
+
 The code didn't compile when using exported mempool functions
 under Windows.
 
@@ -26,7 +28,6 @@
 
 Fixes: 4b5062755aa7 ("mempool: allow user-owned cache")
 Fixes: 656f2d3ede96 ("mempool: deprecate specific get and put functions")
-Cc: stable@dpdk.org
 
 Signed-off-by: Fady Bader <fady@mellanox.com>
 Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
@@ -35,7 +36,7 @@
  1 file changed, 4 deletions(-)
 
 diff --git a/lib/librte_mempool/rte_mempool_version.map b/lib/librte_mempool/rte_mempool_version.map
-index 4fffd3ea41..695dd6e04f 100644
+index d002dfc46f..d67ed2e2b9 100644
 --- a/lib/librte_mempool/rte_mempool_version.map
 +++ b/lib/librte_mempool/rte_mempool_version.map
 @@ -4,18 +4,14 @@ DPDK_20.0 {

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

* [dpdk-stable] patch 'lpm6: fix size of tbl8 group' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (115 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'mempool: remove inline functions from export list' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'lpm6: fix comments spelling' " luca.boccassi
                     ` (95 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Alex Kiselev; +Cc: Andrzej Ostruszka, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From eee7a4f08927726f70672838571c92687c687ed5 Mon Sep 17 00:00:00 2001
From: Alex Kiselev <alex@therouter.net>
Date: Wed, 8 Apr 2020 15:07:30 +0200
Subject: [PATCH] lpm6: fix size of tbl8 group

[ upstream commit 64c46bacf48550f09ef758a15cee9d3b6f443f59 ]

Fixes: e480688dce6d ("lpm6: add incremental update on delete")

Signed-off-by: Alex Kiselev <alex@therouter.net>
Acked-by: Andrzej Ostruszka <aostruszka@marvell.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_lpm/rte_lpm6.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/librte_lpm/rte_lpm6.c b/lib/librte_lpm/rte_lpm6.c
index b981e40714..2e3efc7186 100644
--- a/lib/librte_lpm/rte_lpm6.c
+++ b/lib/librte_lpm/rte_lpm6.c
@@ -726,7 +726,8 @@ add_step(struct rte_lpm6 *lpm, struct rte_lpm6_tbl_entry *tbl,
 			tbl8_group_start = tbl8_gindex *
 					RTE_LPM6_TBL8_GROUP_NUM_ENTRIES;
 			memset(&lpm->tbl8[tbl8_group_start], 0,
-					  RTE_LPM6_TBL8_GROUP_NUM_ENTRIES);
+					RTE_LPM6_TBL8_GROUP_NUM_ENTRIES *
+					sizeof(struct rte_lpm6_tbl_entry));
 
 			/* init the new table's header:
 			 *   save the reference to the owner table
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:49.281903836 +0100
+++ 0118-lpm6-fix-size-of-tbl8-group.patch	2020-05-19 14:04:44.388651490 +0100
@@ -1,10 +1,11 @@
-From 64c46bacf48550f09ef758a15cee9d3b6f443f59 Mon Sep 17 00:00:00 2001
+From eee7a4f08927726f70672838571c92687c687ed5 Mon Sep 17 00:00:00 2001
 From: Alex Kiselev <alex@therouter.net>
 Date: Wed, 8 Apr 2020 15:07:30 +0200
 Subject: [PATCH] lpm6: fix size of tbl8 group
 
+[ upstream commit 64c46bacf48550f09ef758a15cee9d3b6f443f59 ]
+
 Fixes: e480688dce6d ("lpm6: add incremental update on delete")
-Cc: stable@dpdk.org
 
 Signed-off-by: Alex Kiselev <alex@therouter.net>
 Acked-by: Andrzej Ostruszka <aostruszka@marvell.com>
@@ -14,7 +15,7 @@
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/lib/librte_lpm/rte_lpm6.c b/lib/librte_lpm/rte_lpm6.c
-index 1047efa8a5..f5979fb159 100644
+index b981e40714..2e3efc7186 100644
 --- a/lib/librte_lpm/rte_lpm6.c
 +++ b/lib/librte_lpm/rte_lpm6.c
 @@ -726,7 +726,8 @@ add_step(struct rte_lpm6 *lpm, struct rte_lpm6_tbl_entry *tbl,

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

* [dpdk-stable] patch 'lpm6: fix comments spelling' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (116 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'lpm6: fix size of tbl8 group' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'eal: " luca.boccassi
                     ` (94 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 32688549a0bda75e02ea46b895814cdd03bc9e86 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 10 Mar 2020 09:26:22 -0700
Subject: [PATCH] lpm6: fix comments spelling

[ upstream commit e2635408a0e3e190c22362e8dd4f8226f6e73308 ]

Fix spelling errors in comments.

Fixes: e480688dce6d ("lpm6: add incremental update on delete")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/librte_lpm/rte_lpm6.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/librte_lpm/rte_lpm6.c b/lib/librte_lpm/rte_lpm6.c
index 2e3efc7186..6e1b18d6fd 100644
--- a/lib/librte_lpm/rte_lpm6.c
+++ b/lib/librte_lpm/rte_lpm6.c
@@ -814,7 +814,7 @@ add_step(struct rte_lpm6 *lpm, struct rte_lpm6_tbl_entry *tbl,
  *
  *	Returns:
  *    0 on success
- *    -ENOSPC not enought tbl8 left
+ *    -ENOSPC not enough tbl8 left
  */
 static int
 simulate_add(struct rte_lpm6 *lpm, const uint8_t *masked_ip, uint8_t depth)
@@ -844,7 +844,7 @@ simulate_add(struct rte_lpm6 *lpm, const uint8_t *masked_ip, uint8_t depth)
 	}
 
 	if (tbl8_available(lpm) < total_need_tbl_nb)
-		/* not enought tbl8 to add a rule */
+		/* not enough tbl8 to add a rule */
 		return -ENOSPC;
 
 	return 0;
@@ -1212,7 +1212,7 @@ rule_find_range(struct rte_lpm6 *lpm, const uint8_t *ip, uint8_t depth,
 		/* minus top level */
 		depth -= 24;
 
-		/* interate through levels (tbl8s)
+		/* iterate through levels (tbl8s)
 		 * until we reach the last one
 		 */
 		while (depth > 8) {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:49.317631883 +0100
+++ 0119-lpm6-fix-comments-spelling.patch	2020-05-19 14:04:44.388651490 +0100
@@ -1,12 +1,13 @@
-From e2635408a0e3e190c22362e8dd4f8226f6e73308 Mon Sep 17 00:00:00 2001
+From 32688549a0bda75e02ea46b895814cdd03bc9e86 Mon Sep 17 00:00:00 2001
 From: Stephen Hemminger <stephen@networkplumber.org>
 Date: Tue, 10 Mar 2020 09:26:22 -0700
 Subject: [PATCH] lpm6: fix comments spelling
 
+[ upstream commit e2635408a0e3e190c22362e8dd4f8226f6e73308 ]
+
 Fix spelling errors in comments.
 
 Fixes: e480688dce6d ("lpm6: add incremental update on delete")
-Cc: stable@dpdk.org
 
 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
 ---
@@ -14,7 +15,7 @@
  1 file changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/lib/librte_lpm/rte_lpm6.c b/lib/librte_lpm/rte_lpm6.c
-index f5979fb159..37baabb26d 100644
+index 2e3efc7186..6e1b18d6fd 100644
 --- a/lib/librte_lpm/rte_lpm6.c
 +++ b/lib/librte_lpm/rte_lpm6.c
 @@ -814,7 +814,7 @@ add_step(struct rte_lpm6 *lpm, struct rte_lpm6_tbl_entry *tbl,

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

* [dpdk-stable] patch 'eal: fix comments spelling' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (117 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'lpm6: fix comments spelling' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'timer: protect initialization with lock' " luca.boccassi
                     ` (93 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 6be8fba61669dbf57b055c85b8d0b401acffa9bb Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 10 Mar 2020 09:35:20 -0700
Subject: [PATCH] eal: fix comments spelling

[ upstream commit a9aa14d9aa755472ab4e2aae62524feed7e8731f ]

Fix spelling errors in comments (found with codespell).

Note that "inbetween" is not correct in English and should
either be two words or better yet, the in can be dropped.
https://www.grammarly.com/blog/in-between-or-inbetween/

Fixes: 12f45fa7e29b ("eal/arm: read timer from PMU if enabled")
Fixes: 096ffd811fe2 ("eal/x86: use lock-prefixed instructions for SMP barrier")
Fixes: 1d406458db47 ("mem: make segment preallocation OS-specific")
Fixes: bb372060dad4 ("malloc: make heap a doubly-linked list")
Fixes: 7353ee7344b4 ("fbarray: add API to find biggest used or free chunks")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/librte_eal/common/eal_common_fbarray.c             | 2 +-
 lib/librte_eal/common/include/arch/arm/rte_cycles_32.h | 2 +-
 lib/librte_eal/common/include/arch/x86/rte_atomic.h    | 2 +-
 lib/librte_eal/common/malloc_elem.c                    | 2 +-
 lib/librte_eal/freebsd/eal/eal_memory.c                | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/librte_eal/common/eal_common_fbarray.c b/lib/librte_eal/common/eal_common_fbarray.c
index 1312f936b8..4f8f1af73c 100644
--- a/lib/librte_eal/common/eal_common_fbarray.c
+++ b/lib/librte_eal/common/eal_common_fbarray.c
@@ -1337,7 +1337,7 @@ fbarray_find_biggest(struct rte_fbarray *arr, unsigned int start, bool used,
 	 */
 
 	/* the API's called are thread-safe, but something may still happen
-	 * inbetween the API calls, so lock the fbarray. all other API's are
+	 * between the API calls, so lock the fbarray. all other API's are
 	 * read-locking the fbarray, so read lock here is OK.
 	 */
 	rte_rwlock_read_lock(&arr->rwlock);
diff --git a/lib/librte_eal/common/include/arch/arm/rte_cycles_32.h b/lib/librte_eal/common/include/arch/arm/rte_cycles_32.h
index 859b09748c..f79718ce8c 100644
--- a/lib/librte_eal/common/include/arch/arm/rte_cycles_32.h
+++ b/lib/librte_eal/common/include/arch/arm/rte_cycles_32.h
@@ -57,7 +57,7 @@ __rte_rdtsc_syscall(void)
  *      asm volatile("mcr p15, 0, %0, c9, c12, 0" : : "r"(29));
  *      asm volatile("mcr p15, 0, %0, c9, c12, 1" : : "r"(0x8000000f));
  *
- * which is possible only from the priviledged mode (kernel space).
+ * which is possible only from the privileged mode (kernel space).
  */
 static inline uint64_t
 __rte_rdtsc_pmccntr(void)
diff --git a/lib/librte_eal/common/include/arch/x86/rte_atomic.h b/lib/librte_eal/common/include/arch/x86/rte_atomic.h
index 148398f50a..b9dcd30aba 100644
--- a/lib/librte_eal/common/include/arch/x86/rte_atomic.h
+++ b/lib/librte_eal/common/include/arch/x86/rte_atomic.h
@@ -55,7 +55,7 @@ extern "C" {
  *
  * As pointed by Java guys, that makes possible to use lock-prefixed
  * instructions to get the same effect as mfence and on most modern HW
- * that gives a better perfomance then using mfence:
+ * that gives a better performance then using mfence:
  * https://shipilev.net/blog/2014/on-the-fence-with-dependencies/
  * Basic idea is to use lock prefixed add with some dummy memory location
  * as the destination. From their experiments 128B(2 cache lines) below
diff --git a/lib/librte_eal/common/malloc_elem.c b/lib/librte_eal/common/malloc_elem.c
index 885d00424b..51cdfc5d59 100644
--- a/lib/librte_eal/common/malloc_elem.c
+++ b/lib/librte_eal/common/malloc_elem.c
@@ -171,7 +171,7 @@ malloc_elem_insert(struct malloc_elem *elem)
 		next_elem = NULL;
 		heap->last = elem;
 	} else {
-		/* the new memory is somewhere inbetween start and end */
+		/* the new memory is somewhere between start and end */
 		uint64_t dist_from_start, dist_from_end;
 
 		dist_from_end = RTE_PTR_DIFF(heap->last, elem);
diff --git a/lib/librte_eal/freebsd/eal/eal_memory.c b/lib/librte_eal/freebsd/eal/eal_memory.c
index a97d8f0f0c..5bc2da160c 100644
--- a/lib/librte_eal/freebsd/eal/eal_memory.c
+++ b/lib/librte_eal/freebsd/eal/eal_memory.c
@@ -449,7 +449,7 @@ memseg_primary_init(void)
 		 *
 		 * we need (N*2)-1 segments because we cannot guarantee that
 		 * each segment will be IOVA-contiguous with the previous one,
-		 * so we will allocate more and put spaces inbetween segments
+		 * so we will allocate more and put spaces between segments
 		 * that are non-contiguous.
 		 */
 		avail_segs = (hpi->num_pages[0] * 2) - 1;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:49.355478389 +0100
+++ 0120-eal-fix-comments-spelling.patch	2020-05-19 14:04:44.392651562 +0100
@@ -1,8 +1,10 @@
-From a9aa14d9aa755472ab4e2aae62524feed7e8731f Mon Sep 17 00:00:00 2001
+From 6be8fba61669dbf57b055c85b8d0b401acffa9bb Mon Sep 17 00:00:00 2001
 From: Stephen Hemminger <stephen@networkplumber.org>
 Date: Tue, 10 Mar 2020 09:35:20 -0700
 Subject: [PATCH] eal: fix comments spelling
 
+[ upstream commit a9aa14d9aa755472ab4e2aae62524feed7e8731f ]
+
 Fix spelling errors in comments (found with codespell).
 
 Note that "inbetween" is not correct in English and should
@@ -14,30 +16,16 @@
 Fixes: 1d406458db47 ("mem: make segment preallocation OS-specific")
 Fixes: bb372060dad4 ("malloc: make heap a doubly-linked list")
 Fixes: 7353ee7344b4 ("fbarray: add API to find biggest used or free chunks")
-Cc: stable@dpdk.org
 
 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
 ---
- lib/librte_eal/arm/include/rte_cycles_32.h | 2 +-
- lib/librte_eal/common/eal_common_fbarray.c | 2 +-
- lib/librte_eal/common/malloc_elem.c        | 2 +-
- lib/librte_eal/freebsd/eal_memory.c        | 2 +-
- lib/librte_eal/x86/include/rte_atomic.h    | 2 +-
+ lib/librte_eal/common/eal_common_fbarray.c             | 2 +-
+ lib/librte_eal/common/include/arch/arm/rte_cycles_32.h | 2 +-
+ lib/librte_eal/common/include/arch/x86/rte_atomic.h    | 2 +-
+ lib/librte_eal/common/malloc_elem.c                    | 2 +-
+ lib/librte_eal/freebsd/eal/eal_memory.c                | 2 +-
  5 files changed, 5 insertions(+), 5 deletions(-)
 
-diff --git a/lib/librte_eal/arm/include/rte_cycles_32.h b/lib/librte_eal/arm/include/rte_cycles_32.h
-index 859b09748c..f79718ce8c 100644
---- a/lib/librte_eal/arm/include/rte_cycles_32.h
-+++ b/lib/librte_eal/arm/include/rte_cycles_32.h
-@@ -57,7 +57,7 @@ __rte_rdtsc_syscall(void)
-  *      asm volatile("mcr p15, 0, %0, c9, c12, 0" : : "r"(29));
-  *      asm volatile("mcr p15, 0, %0, c9, c12, 1" : : "r"(0x8000000f));
-  *
-- * which is possible only from the priviledged mode (kernel space).
-+ * which is possible only from the privileged mode (kernel space).
-  */
- static inline uint64_t
- __rte_rdtsc_pmccntr(void)
 diff --git a/lib/librte_eal/common/eal_common_fbarray.c b/lib/librte_eal/common/eal_common_fbarray.c
 index 1312f936b8..4f8f1af73c 100644
 --- a/lib/librte_eal/common/eal_common_fbarray.c
@@ -51,6 +39,32 @@
  	 * read-locking the fbarray, so read lock here is OK.
  	 */
  	rte_rwlock_read_lock(&arr->rwlock);
+diff --git a/lib/librte_eal/common/include/arch/arm/rte_cycles_32.h b/lib/librte_eal/common/include/arch/arm/rte_cycles_32.h
+index 859b09748c..f79718ce8c 100644
+--- a/lib/librte_eal/common/include/arch/arm/rte_cycles_32.h
++++ b/lib/librte_eal/common/include/arch/arm/rte_cycles_32.h
+@@ -57,7 +57,7 @@ __rte_rdtsc_syscall(void)
+  *      asm volatile("mcr p15, 0, %0, c9, c12, 0" : : "r"(29));
+  *      asm volatile("mcr p15, 0, %0, c9, c12, 1" : : "r"(0x8000000f));
+  *
+- * which is possible only from the priviledged mode (kernel space).
++ * which is possible only from the privileged mode (kernel space).
+  */
+ static inline uint64_t
+ __rte_rdtsc_pmccntr(void)
+diff --git a/lib/librte_eal/common/include/arch/x86/rte_atomic.h b/lib/librte_eal/common/include/arch/x86/rte_atomic.h
+index 148398f50a..b9dcd30aba 100644
+--- a/lib/librte_eal/common/include/arch/x86/rte_atomic.h
++++ b/lib/librte_eal/common/include/arch/x86/rte_atomic.h
+@@ -55,7 +55,7 @@ extern "C" {
+  *
+  * As pointed by Java guys, that makes possible to use lock-prefixed
+  * instructions to get the same effect as mfence and on most modern HW
+- * that gives a better perfomance then using mfence:
++ * that gives a better performance then using mfence:
+  * https://shipilev.net/blog/2014/on-the-fence-with-dependencies/
+  * Basic idea is to use lock prefixed add with some dummy memory location
+  * as the destination. From their experiments 128B(2 cache lines) below
 diff --git a/lib/librte_eal/common/malloc_elem.c b/lib/librte_eal/common/malloc_elem.c
 index 885d00424b..51cdfc5d59 100644
 --- a/lib/librte_eal/common/malloc_elem.c
@@ -64,10 +78,10 @@
  		uint64_t dist_from_start, dist_from_end;
  
  		dist_from_end = RTE_PTR_DIFF(heap->last, elem);
-diff --git a/lib/librte_eal/freebsd/eal_memory.c b/lib/librte_eal/freebsd/eal_memory.c
+diff --git a/lib/librte_eal/freebsd/eal/eal_memory.c b/lib/librte_eal/freebsd/eal/eal_memory.c
 index a97d8f0f0c..5bc2da160c 100644
---- a/lib/librte_eal/freebsd/eal_memory.c
-+++ b/lib/librte_eal/freebsd/eal_memory.c
+--- a/lib/librte_eal/freebsd/eal/eal_memory.c
++++ b/lib/librte_eal/freebsd/eal/eal_memory.c
 @@ -449,7 +449,7 @@ memseg_primary_init(void)
  		 *
  		 * we need (N*2)-1 segments because we cannot guarantee that
@@ -77,19 +91,6 @@
  		 * that are non-contiguous.
  		 */
  		avail_segs = (hpi->num_pages[0] * 2) - 1;
-diff --git a/lib/librte_eal/x86/include/rte_atomic.h b/lib/librte_eal/x86/include/rte_atomic.h
-index 148398f50a..b9dcd30aba 100644
---- a/lib/librte_eal/x86/include/rte_atomic.h
-+++ b/lib/librte_eal/x86/include/rte_atomic.h
-@@ -55,7 +55,7 @@ extern "C" {
-  *
-  * As pointed by Java guys, that makes possible to use lock-prefixed
-  * instructions to get the same effect as mfence and on most modern HW
-- * that gives a better perfomance then using mfence:
-+ * that gives a better performance then using mfence:
-  * https://shipilev.net/blog/2014/on-the-fence-with-dependencies/
-  * Basic idea is to use lock prefixed add with some dummy memory location
-  * as the destination. From their experiments 128B(2 cache lines) below
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'timer: protect initialization with lock' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (118 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'eal: " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'fix various typos found by Lintian' " luca.boccassi
                     ` (92 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Honnappa Nagarahalli
  Cc: Gavin Hu, Phil Yang, Erik Gabriel Carrillo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From ccc676944f86c16151db2516a9bce37274c73f3b Mon Sep 17 00:00:00 2001
From: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Date: Mon, 24 Feb 2020 14:42:18 +0800
Subject: [PATCH] timer: protect initialization with lock

[ upstream commit 68f7f31aaa7479d36ae1d1e7853940ce4874cba7 ]

rte_timer_subsystem_initialized is a global variable that can be
accessed by multiple processes simultaneously. Hence, any access
to rte_timer_subsystem_initialized should be protected by
rte_mcfg_timer_lock.

Fixes: f9d6cd8bfe9e ("timer: fix resource leak in finalize")

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Acked-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
---
 lib/librte_timer/rte_timer.c | 24 ++++++++++++++----------
 1 file changed, 14 insertions(+), 10 deletions(-)

diff --git a/lib/librte_timer/rte_timer.c b/lib/librte_timer/rte_timer.c
index 4680a91b58..99862a3ba1 100644
--- a/lib/librte_timer/rte_timer.c
+++ b/lib/librte_timer/rte_timer.c
@@ -145,10 +145,12 @@ rte_timer_subsystem_init(void)
 	const size_t mem_size = data_arr_size + sizeof(*rte_timer_mz_refcnt);
 	bool do_full_init = true;
 
-	if (rte_timer_subsystem_initialized)
+	rte_mcfg_timer_lock();
+
+	if (rte_timer_subsystem_initialized) {
+		rte_mcfg_timer_unlock();
 		return -EALREADY;
-
-	rte_mcfg_timer_lock();
+	}
 
 	mz = rte_memzone_lookup(mz_name);
 	if (mz == NULL) {
@@ -183,27 +185,29 @@ rte_timer_subsystem_init(void)
 	rte_timer_data_arr[default_data_id].internal_flags |= FL_ALLOCATED;
 	(*rte_timer_mz_refcnt)++;
 
-	rte_mcfg_timer_unlock();
-
 	rte_timer_subsystem_initialized = 1;
 
+	rte_mcfg_timer_unlock();
+
 	return 0;
 }
 
 void
 rte_timer_subsystem_finalize(void)
 {
-	if (!rte_timer_subsystem_initialized)
-		return;
-
 	rte_mcfg_timer_lock();
 
+	if (!rte_timer_subsystem_initialized) {
+		rte_mcfg_timer_unlock();
+		return;
+	}
+
 	if (--(*rte_timer_mz_refcnt) == 0)
 		rte_memzone_free(rte_timer_data_mz);
 
-	rte_mcfg_timer_unlock();
-
 	rte_timer_subsystem_initialized = 0;
+
+	rte_mcfg_timer_unlock();
 }
 
 /* Initialize the timer handle tim for use */
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:49.393882410 +0100
+++ 0121-timer-protect-initialization-with-lock.patch	2020-05-19 14:04:44.392651562 +0100
@@ -1,15 +1,16 @@
-From 68f7f31aaa7479d36ae1d1e7853940ce4874cba7 Mon Sep 17 00:00:00 2001
+From ccc676944f86c16151db2516a9bce37274c73f3b Mon Sep 17 00:00:00 2001
 From: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
 Date: Mon, 24 Feb 2020 14:42:18 +0800
 Subject: [PATCH] timer: protect initialization with lock
 
+[ upstream commit 68f7f31aaa7479d36ae1d1e7853940ce4874cba7 ]
+
 rte_timer_subsystem_initialized is a global variable that can be
 accessed by multiple processes simultaneously. Hence, any access
 to rte_timer_subsystem_initialized should be protected by
 rte_mcfg_timer_lock.
 
 Fixes: f9d6cd8bfe9e ("timer: fix resource leak in finalize")
-Cc: stable@dpdk.org
 
 Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
 Reviewed-by: Gavin Hu <gavin.hu@arm.com>
@@ -20,7 +21,7 @@
  1 file changed, 14 insertions(+), 10 deletions(-)
 
 diff --git a/lib/librte_timer/rte_timer.c b/lib/librte_timer/rte_timer.c
-index 89f27074f8..269e92114c 100644
+index 4680a91b58..99862a3ba1 100644
 --- a/lib/librte_timer/rte_timer.c
 +++ b/lib/librte_timer/rte_timer.c
 @@ -145,10 +145,12 @@ rte_timer_subsystem_init(void)

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

* [dpdk-stable] patch 'fix various typos found by Lintian' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (119 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'timer: protect initialization with lock' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'app: fix usage help of options separated by dashes' " luca.boccassi
                     ` (91 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Luca Boccassi; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 0d7e4fbf2d6b4fffc5590bc373b1eb84442a86fb Mon Sep 17 00:00:00 2001
From: Luca Boccassi <bluca@debian.org>
Date: Sat, 29 Feb 2020 16:37:06 +0000
Subject: [PATCH] fix various typos found by Lintian

[ upstream commit 611faa5f46cc67449f272e14450fc6a0a275767d ]

Signed-off-by: Luca Boccassi <bluca@debian.org>
---
 app/test-pmd/cmdline.c                  | 4 ++--
 app/test/test_mbuf.c                    | 2 +-
 drivers/common/octeontx2/hw/otx2_npc.h  | 4 ++--
 drivers/compress/octeontx/otx_zip_pmd.c | 2 +-
 drivers/event/dpaa2/dpaa2_eventdev.c    | 2 +-
 drivers/net/bnxt/bnxt_ethdev.c          | 2 +-
 drivers/net/cxgbe/cxgbe_flow.c          | 2 +-
 drivers/net/dpaa2/dpaa2_flow.c          | 4 ++--
 drivers/net/dpaa2/dpaa2_mux.c           | 2 +-
 drivers/net/hinic/base/hinic_pmd_mbox.c | 2 +-
 drivers/net/mlx5/mlx5_rxtx.c            | 2 +-
 drivers/net/pfe/pfe_ethdev.c            | 2 +-
 drivers/net/qede/qede_ethdev.c          | 2 +-
 lib/librte_eal/linux/eal/eal.c          | 2 +-
 lib/librte_ipsec/sa.h                   | 2 +-
 15 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index d9f5f6f167..1dbde50566 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -94,7 +94,7 @@ static void cmd_help_brief_parsed(__attribute__((unused)) void *parsed_result,
 		"    help ports                      : Configuring ports.\n"
 		"    help registers                  : Reading and setting port registers.\n"
 		"    help filters                    : Filters configuration help.\n"
-		"    help traffic_management         : Traffic Management commmands.\n"
+		"    help traffic_management         : Traffic Management commands.\n"
 		"    help devices                    : Device related cmds.\n"
 		"    help all                        : All of the above sections.\n\n"
 	);
@@ -5122,7 +5122,7 @@ cmd_gso_size_parsed(void *parsed_result,
 
 	if (test_done == 0) {
 		printf("Before setting GSO segsz, please first"
-				" stop fowarding\n");
+				" stop forwarding\n");
 		return;
 	}
 
diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c
index 61ecffc184..f2922e05e0 100644
--- a/app/test/test_mbuf.c
+++ b/app/test/test_mbuf.c
@@ -1144,7 +1144,7 @@ test_refcnt_mbuf(void)
 		tref += refcnt_lcore[slave];
 
 	if (tref != refcnt_lcore[master])
-		rte_panic("refernced mbufs: %u, freed mbufs: %u\n",
+		rte_panic("referenced mbufs: %u, freed mbufs: %u\n",
 		          tref, refcnt_lcore[master]);
 
 	rte_mempool_dump(stdout, refcnt_pool);
diff --git a/drivers/common/octeontx2/hw/otx2_npc.h b/drivers/common/octeontx2/hw/otx2_npc.h
index 3dfc137a30..600084ff31 100644
--- a/drivers/common/octeontx2/hw/otx2_npc.h
+++ b/drivers/common/octeontx2/hw/otx2_npc.h
@@ -213,7 +213,7 @@ enum npc_kpu_lc_ltype {
 	NPC_LT_LC_FCOE,
 };
 
-/* Don't modify Ltypes upto SCTP, otherwise it will
+/* Don't modify Ltypes up to SCTP, otherwise it will
  * effect flow tag calculation and thus RSS.
  */
 enum npc_kpu_ld_ltype {
@@ -260,7 +260,7 @@ enum npc_kpu_lg_ltype {
 	NPC_LT_LG_TU_ETHER_IN_NSH,
 };
 
-/* Don't modify Ltypes upto SCTP, otherwise it will
+/* Don't modify Ltypes up to SCTP, otherwise it will
  * effect flow tag calculation and thus RSS.
  */
 enum npc_kpu_lh_ltype {
diff --git a/drivers/compress/octeontx/otx_zip_pmd.c b/drivers/compress/octeontx/otx_zip_pmd.c
index 9e00c86630..bff8ef035e 100644
--- a/drivers/compress/octeontx/otx_zip_pmd.c
+++ b/drivers/compress/octeontx/otx_zip_pmd.c
@@ -406,7 +406,7 @@ zip_pmd_qp_setup(struct rte_compressdev *dev, uint16_t qp_id,
 
 	qp->name = name;
 
-	/* Create completion queue upto max_inflight_ops */
+	/* Create completion queue up to max_inflight_ops */
 	qp->processed_pkts = zip_pmd_qp_create_processed_pkts_ring(qp,
 						max_inflight_ops, socket_id);
 	if (qp->processed_pkts == NULL)
diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c
index 1833d659d8..2be6e12f66 100644
--- a/drivers/event/dpaa2/dpaa2_eventdev.c
+++ b/drivers/event/dpaa2/dpaa2_eventdev.c
@@ -391,7 +391,7 @@ dpaa2_eventdev_info_get(struct rte_eventdev *dev,
 	dev_info->max_event_priority_levels =
 		DPAA2_EVENT_MAX_EVENT_PRIORITY_LEVELS;
 	dev_info->max_event_ports = rte_fslmc_get_device_count(DPAA2_IO);
-	/* we only support dpio upto number of cores*/
+	/* we only support dpio up to number of cores */
 	if (dev_info->max_event_ports > rte_lcore_count())
 		dev_info->max_event_ports = rte_lcore_count();
 	dev_info->max_event_port_dequeue_depth =
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index a4cd6cc672..90e65d1a56 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1517,7 +1517,7 @@ static int bnxt_rss_hash_conf_get_op(struct rte_eth_dev *eth_dev,
 		}
 		if (hash_types) {
 			PMD_DRV_LOG(ERR,
-				"Unknwon RSS config from firmware (%08x), RSS disabled",
+				"Unknown RSS config from firmware (%08x), RSS disabled",
 				vnic->hash_type);
 			return -ENOTSUP;
 		}
diff --git a/drivers/net/cxgbe/cxgbe_flow.c b/drivers/net/cxgbe/cxgbe_flow.c
index 9070f4960d..2fb77b4abb 100644
--- a/drivers/net/cxgbe/cxgbe_flow.c
+++ b/drivers/net/cxgbe/cxgbe_flow.c
@@ -230,7 +230,7 @@ ch_rte_parsetype_port(const void *dmask, const struct rte_flow_item *item,
 	if (val->index > 0x7)
 		return rte_flow_error_set(e, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM,
 					  item,
-					  "port index upto 0x7 is supported");
+					  "port index up to 0x7 is supported");
 
 	CXGBE_FILL_FS(val->index, mask->index, iport);
 
diff --git a/drivers/net/dpaa2/dpaa2_flow.c b/drivers/net/dpaa2/dpaa2_flow.c
index 2212650320..8aa65db305 100644
--- a/drivers/net/dpaa2/dpaa2_flow.c
+++ b/drivers/net/dpaa2/dpaa2_flow.c
@@ -1850,13 +1850,13 @@ struct rte_flow *dpaa2_flow_create(struct rte_eth_dev *dev,
 	key_iova = (size_t)rte_malloc(NULL, 256, 64);
 	if (!key_iova) {
 		DPAA2_PMD_ERR(
-			"Memory allocation failure for rule configration\n");
+			"Memory allocation failure for rule configuration\n");
 		goto mem_failure;
 	}
 	mask_iova = (size_t)rte_malloc(NULL, 256, 64);
 	if (!mask_iova) {
 		DPAA2_PMD_ERR(
-			"Memory allocation failure for rule configration\n");
+			"Memory allocation failure for rule configuration\n");
 		goto mem_failure;
 	}
 
diff --git a/drivers/net/dpaa2/dpaa2_mux.c b/drivers/net/dpaa2/dpaa2_mux.c
index 1910cc4184..af90adb828 100644
--- a/drivers/net/dpaa2/dpaa2_mux.c
+++ b/drivers/net/dpaa2/dpaa2_mux.c
@@ -84,7 +84,7 @@ rte_pmd_dpaa2_mux_flow_create(uint32_t dpdmux_id,
 			   (2 * DIST_PARAM_IOVA_SIZE), RTE_CACHE_LINE_SIZE);
 	if (!flow) {
 		DPAA2_PMD_ERR(
-			"Memory allocation failure for rule configration\n");
+			"Memory allocation failure for rule configuration\n");
 		goto creation_error;
 	}
 	key_iova = (void *)((size_t)flow + sizeof(struct rte_flow));
diff --git a/drivers/net/hinic/base/hinic_pmd_mbox.c b/drivers/net/hinic/base/hinic_pmd_mbox.c
index 935d60bc81..cfe91ddbad 100644
--- a/drivers/net/hinic/base/hinic_pmd_mbox.c
+++ b/drivers/net/hinic/base/hinic_pmd_mbox.c
@@ -870,7 +870,7 @@ static int hinic_func_to_func_init(struct hinic_hwdev *hwdev)
 
 	err = alloc_mbox_info(func_to_func->mbox_resp);
 	if (err) {
-		PMD_DRV_LOG(ERR, "Allocating memory for mailbox responsing failed");
+		PMD_DRV_LOG(ERR, "Allocating memory for mailbox responding failed");
 		goto alloc_mbox_for_resp_err;
 	}
 
diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index 9d61dd68f7..03debf79b1 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -4674,7 +4674,7 @@ send_loop:
 	/*
 	 * Calculate the number of available resources - elts and WQEs.
 	 * There are two possible different scenarios:
-	 * - no data inlining into WQEs, one WQEBB may contains upto
+	 * - no data inlining into WQEs, one WQEBB may contains up to
 	 *   four packets, in this case elts become scarce resource
 	 * - data inlining into WQEs, one packet may require multiple
 	 *   WQEBBs, the WQEs become the limiting factor.
diff --git a/drivers/net/pfe/pfe_ethdev.c b/drivers/net/pfe/pfe_ethdev.c
index bdf2a7c76a..b1de866d34 100644
--- a/drivers/net/pfe/pfe_ethdev.c
+++ b/drivers/net/pfe/pfe_ethdev.c
@@ -13,7 +13,7 @@
 #include "pfe_logs.h"
 #include "pfe_mod.h"
 
-#define PFE_MAX_MACS 1 /*we can support upto 4 MACs per IF*/
+#define PFE_MAX_MACS 1 /* we can support up to 4 MACs per IF */
 #define PFE_VDEV_GEM_ID_ARG	"intf"
 
 struct pfe_vdev_init_params {
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index e01d437f19..c7a4c031b7 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -1064,7 +1064,7 @@ static int qede_dev_start(struct rte_eth_dev *eth_dev)
 		qede_reset_queue_stats(qdev, true);
 
 	/* Newer SR-IOV PF driver expects RX/TX queues to be started before
-	 * enabling RSS. Hence RSS configuration is deferred upto this point.
+	 * enabling RSS. Hence RSS configuration is deferred up to this point.
 	 * Also, we would like to retain similar behavior in PF case, so we
 	 * don't do PF/VF specific check here.
 	 */
diff --git a/lib/librte_eal/linux/eal/eal.c b/lib/librte_eal/linux/eal/eal.c
index 9530ee55f8..e6d4cc7178 100644
--- a/lib/librte_eal/linux/eal/eal.c
+++ b/lib/librte_eal/linux/eal/eal.c
@@ -1077,7 +1077,7 @@ rte_eal_init(int argc, char **argv)
 #if defined(RTE_LIBRTE_KNI) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
 			} else if (rte_eal_check_module("rte_kni") == 1) {
 				iova_mode = RTE_IOVA_PA;
-				RTE_LOG(DEBUG, EAL, "KNI is loaded, selecting IOVA as PA mode for better KNI perfomance.\n");
+				RTE_LOG(DEBUG, EAL, "KNI is loaded, selecting IOVA as PA mode for better KNI performance.\n");
 #endif
 			} else if (is_iommu_enabled()) {
 				/* we have an IOMMU, pick IOVA as VA mode */
diff --git a/lib/librte_ipsec/sa.h b/lib/librte_ipsec/sa.h
index 51e69ad05a..0cfe82f634 100644
--- a/lib/librte_ipsec/sa.h
+++ b/lib/librte_ipsec/sa.h
@@ -113,7 +113,7 @@ struct rte_ipsec_sa {
 	 * sqn and replay window
 	 * In case of SA handled by multiple threads *sqn* cacheline
 	 * could be shared by multiple cores.
-	 * To minimise perfomance impact, we try to locate in a separate
+	 * To minimise performance impact, we try to locate in a separate
 	 * place from other frequently accesed data.
 	 */
 	union {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:49.430124535 +0100
+++ 0122-fix-various-typos-found-by-Lintian.patch	2020-05-19 14:04:44.428652215 +0100
@@ -1,9 +1,9 @@
-From 611faa5f46cc67449f272e14450fc6a0a275767d Mon Sep 17 00:00:00 2001
+From 0d7e4fbf2d6b4fffc5590bc373b1eb84442a86fb Mon Sep 17 00:00:00 2001
 From: Luca Boccassi <bluca@debian.org>
 Date: Sat, 29 Feb 2020 16:37:06 +0000
 Subject: [PATCH] fix various typos found by Lintian
 
-Cc: stable@dpdk.org
+[ upstream commit 611faa5f46cc67449f272e14450fc6a0a275767d ]
 
 Signed-off-by: Luca Boccassi <bluca@debian.org>
 ---
@@ -20,15 +20,15 @@
  drivers/net/mlx5/mlx5_rxtx.c            | 2 +-
  drivers/net/pfe/pfe_ethdev.c            | 2 +-
  drivers/net/qede/qede_ethdev.c          | 2 +-
- lib/librte_eal/linux/eal.c              | 2 +-
+ lib/librte_eal/linux/eal/eal.c          | 2 +-
  lib/librte_ipsec/sa.h                   | 2 +-
  15 files changed, 18 insertions(+), 18 deletions(-)
 
 diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
-index 22fb23a92d..1375f223eb 100644
+index d9f5f6f167..1dbde50566 100644
 --- a/app/test-pmd/cmdline.c
 +++ b/app/test-pmd/cmdline.c
-@@ -95,7 +95,7 @@ static void cmd_help_brief_parsed(__rte_unused void *parsed_result,
+@@ -94,7 +94,7 @@ static void cmd_help_brief_parsed(__attribute__((unused)) void *parsed_result,
  		"    help ports                      : Configuring ports.\n"
  		"    help registers                  : Reading and setting port registers.\n"
  		"    help filters                    : Filters configuration help.\n"
@@ -37,7 +37,7 @@
  		"    help devices                    : Device related cmds.\n"
  		"    help all                        : All of the above sections.\n\n"
  	);
-@@ -5150,7 +5150,7 @@ cmd_gso_size_parsed(void *parsed_result,
+@@ -5122,7 +5122,7 @@ cmd_gso_size_parsed(void *parsed_result,
  
  	if (test_done == 0) {
  		printf("Before setting GSO segsz, please first"
@@ -47,10 +47,10 @@
  	}
  
 diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c
-index 8200b4f71e..71bdab6917 100644
+index 61ecffc184..f2922e05e0 100644
 --- a/app/test/test_mbuf.c
 +++ b/app/test/test_mbuf.c
-@@ -1157,7 +1157,7 @@ test_refcnt_mbuf(void)
+@@ -1144,7 +1144,7 @@ test_refcnt_mbuf(void)
  		tref += refcnt_lcore[slave];
  
  	if (tref != refcnt_lcore[master])
@@ -60,10 +60,10 @@
  
  	rte_mempool_dump(stdout, refcnt_pool);
 diff --git a/drivers/common/octeontx2/hw/otx2_npc.h b/drivers/common/octeontx2/hw/otx2_npc.h
-index 8083c780e1..efde1e214a 100644
+index 3dfc137a30..600084ff31 100644
 --- a/drivers/common/octeontx2/hw/otx2_npc.h
 +++ b/drivers/common/octeontx2/hw/otx2_npc.h
-@@ -215,7 +215,7 @@ enum npc_kpu_lc_ltype {
+@@ -213,7 +213,7 @@ enum npc_kpu_lc_ltype {
  	NPC_LT_LC_FCOE,
  };
  
@@ -72,7 +72,7 @@
   * effect flow tag calculation and thus RSS.
   */
  enum npc_kpu_ld_ltype {
-@@ -262,7 +262,7 @@ enum npc_kpu_lg_ltype {
+@@ -260,7 +260,7 @@ enum npc_kpu_lg_ltype {
  	NPC_LT_LG_TU_ETHER_IN_NSH,
  };
  
@@ -108,10 +108,10 @@
  		dev_info->max_event_ports = rte_lcore_count();
  	dev_info->max_event_port_dequeue_depth =
 diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
-index 1a3c7e6098..6d42e3f85f 100644
+index a4cd6cc672..90e65d1a56 100644
 --- a/drivers/net/bnxt/bnxt_ethdev.c
 +++ b/drivers/net/bnxt/bnxt_ethdev.c
-@@ -1752,7 +1752,7 @@ static int bnxt_rss_hash_conf_get_op(struct rte_eth_dev *eth_dev,
+@@ -1517,7 +1517,7 @@ static int bnxt_rss_hash_conf_get_op(struct rte_eth_dev *eth_dev,
  		}
  		if (hash_types) {
  			PMD_DRV_LOG(ERR,
@@ -121,10 +121,10 @@
  			return -ENOTSUP;
  		}
 diff --git a/drivers/net/cxgbe/cxgbe_flow.c b/drivers/net/cxgbe/cxgbe_flow.c
-index a46515d3b6..166c39ba55 100644
+index 9070f4960d..2fb77b4abb 100644
 --- a/drivers/net/cxgbe/cxgbe_flow.c
 +++ b/drivers/net/cxgbe/cxgbe_flow.c
-@@ -233,7 +233,7 @@ ch_rte_parsetype_port(const void *dmask, const struct rte_flow_item *item,
+@@ -230,7 +230,7 @@ ch_rte_parsetype_port(const void *dmask, const struct rte_flow_item *item,
  	if (val->index > 0x7)
  		return rte_flow_error_set(e, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM,
  					  item,
@@ -167,10 +167,10 @@
  	}
  	key_iova = (void *)((size_t)flow + sizeof(struct rte_flow));
 diff --git a/drivers/net/hinic/base/hinic_pmd_mbox.c b/drivers/net/hinic/base/hinic_pmd_mbox.c
-index bf83fbd7ef..ab1106a37d 100644
+index 935d60bc81..cfe91ddbad 100644
 --- a/drivers/net/hinic/base/hinic_pmd_mbox.c
 +++ b/drivers/net/hinic/base/hinic_pmd_mbox.c
-@@ -869,7 +869,7 @@ static int hinic_func_to_func_init(struct hinic_hwdev *hwdev)
+@@ -870,7 +870,7 @@ static int hinic_func_to_func_init(struct hinic_hwdev *hwdev)
  
  	err = alloc_mbox_info(func_to_func->mbox_resp);
  	if (err) {
@@ -180,10 +180,10 @@
  	}
  
 diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
-index 0010b423df..a21201038c 100644
+index 9d61dd68f7..03debf79b1 100644
 --- a/drivers/net/mlx5/mlx5_rxtx.c
 +++ b/drivers/net/mlx5/mlx5_rxtx.c
-@@ -4850,7 +4850,7 @@ send_loop:
+@@ -4674,7 +4674,7 @@ send_loop:
  	/*
  	 * Calculate the number of available resources - elts and WQEs.
  	 * There are two possible different scenarios:
@@ -206,10 +206,10 @@
  
  struct pfe_vdev_init_params {
 diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
-index 74dfe895ad..1542073a27 100644
+index e01d437f19..c7a4c031b7 100644
 --- a/drivers/net/qede/qede_ethdev.c
 +++ b/drivers/net/qede/qede_ethdev.c
-@@ -1100,7 +1100,7 @@ static int qede_dev_start(struct rte_eth_dev *eth_dev)
+@@ -1064,7 +1064,7 @@ static int qede_dev_start(struct rte_eth_dev *eth_dev)
  		qede_reset_queue_stats(qdev, true);
  
  	/* Newer SR-IOV PF driver expects RX/TX queues to be started before
@@ -218,11 +218,11 @@
  	 * Also, we would like to retain similar behavior in PF case, so we
  	 * don't do PF/VF specific check here.
  	 */
-diff --git a/lib/librte_eal/linux/eal.c b/lib/librte_eal/linux/eal.c
-index 937d867aa6..aa72d36509 100644
---- a/lib/librte_eal/linux/eal.c
-+++ b/lib/librte_eal/linux/eal.c
-@@ -1084,7 +1084,7 @@ rte_eal_init(int argc, char **argv)
+diff --git a/lib/librte_eal/linux/eal/eal.c b/lib/librte_eal/linux/eal/eal.c
+index 9530ee55f8..e6d4cc7178 100644
+--- a/lib/librte_eal/linux/eal/eal.c
++++ b/lib/librte_eal/linux/eal/eal.c
+@@ -1077,7 +1077,7 @@ rte_eal_init(int argc, char **argv)
  #if defined(RTE_LIBRTE_KNI) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
  			} else if (rte_eal_check_module("rte_kni") == 1) {
  				iova_mode = RTE_IOVA_PA;
@@ -232,10 +232,10 @@
  			} else if (is_iommu_enabled()) {
  				/* we have an IOMMU, pick IOVA as VA mode */
 diff --git a/lib/librte_ipsec/sa.h b/lib/librte_ipsec/sa.h
-index d22451b38a..29cfe7279a 100644
+index 51e69ad05a..0cfe82f634 100644
 --- a/lib/librte_ipsec/sa.h
 +++ b/lib/librte_ipsec/sa.h
-@@ -115,7 +115,7 @@ struct rte_ipsec_sa {
+@@ -113,7 +113,7 @@ struct rte_ipsec_sa {
  	 * sqn and replay window
  	 * In case of SA handled by multiple threads *sqn* cacheline
  	 * could be shared by multiple cores.

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

* [dpdk-stable] patch 'app: fix usage help of options separated by dashes' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (120 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'fix various typos found by Lintian' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'usertools: check for pci.ids in /usr/share/misc' " luca.boccassi
                     ` (90 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From a8e6e27b007bb7ac737b07bdcdf290b380efc1b5 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Tue, 21 Apr 2020 01:25:31 +0200
Subject: [PATCH] app: fix usage help of options separated by dashes

[ upstream commit a658775c57947a50847c1ca01d39de0b81400678 ]

The EAL options and app-specific options are separated
with double dashes.

The help of testpmd, test-acl and pdump were missing
the dashes after EAL options.
Note: testpmd was completely missing the EAL options.

Fixes: af75078fece3 ("first public release")
Fixes: 26c057ab6c45 ("acl: new test-acl application")
Fixes: b2854d5317e8 ("app/pdump: support multi-core capture")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 app/pdump/main.c          | 2 +-
 app/test-acl/main.c       | 2 +-
 app/test-pmd/parameters.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/app/pdump/main.c b/app/pdump/main.c
index d05a023667..c38c53719e 100644
--- a/app/pdump/main.c
+++ b/app/pdump/main.c
@@ -151,7 +151,7 @@ static uint8_t multiple_core_capture;
 static void
 pdump_usage(const char *prgname)
 {
-	printf("usage: %s [EAL options]"
+	printf("usage: %s [EAL options] --"
 			" --["CMD_LINE_OPT_MULTI"]\n"
 			" --"CMD_LINE_OPT_PDUMP" "
 			"'(port=<port id> | device_id=<pci id or vdev name>),"
diff --git a/app/test-acl/main.c b/app/test-acl/main.c
index 57f23942eb..08f06c1fa3 100644
--- a/app/test-acl/main.c
+++ b/app/test-acl/main.c
@@ -12,7 +12,7 @@
 #include <rte_lcore.h>
 #include <rte_ip.h>
 
-#define	PRINT_USAGE_START	"%s [EAL options]\n"
+#define	PRINT_USAGE_START	"%s [EAL options] --\n"
 
 #define	RTE_LOGTYPE_TESTACL	RTE_LOGTYPE_USER1
 
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index 2e7a504415..0eb7844783 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -49,7 +49,7 @@
 static void
 usage(char* progname)
 {
-	printf("usage: %s "
+	printf("usage: %s [EAL options] -- "
 #ifdef RTE_LIBRTE_CMDLINE
 	       "[--interactive|-i] "
 	       "[--cmdline-file=FILENAME] "
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:49.509041741 +0100
+++ 0123-app-fix-usage-help-of-options-separated-by-dashes.patch	2020-05-19 14:04:44.432652287 +0100
@@ -1,8 +1,10 @@
-From a658775c57947a50847c1ca01d39de0b81400678 Mon Sep 17 00:00:00 2001
+From a8e6e27b007bb7ac737b07bdcdf290b380efc1b5 Mon Sep 17 00:00:00 2001
 From: Thomas Monjalon <thomas@monjalon.net>
 Date: Tue, 21 Apr 2020 01:25:31 +0200
 Subject: [PATCH] app: fix usage help of options separated by dashes
 
+[ upstream commit a658775c57947a50847c1ca01d39de0b81400678 ]
+
 The EAL options and app-specific options are separated
 with double dashes.
 
@@ -13,7 +15,6 @@
 Fixes: af75078fece3 ("first public release")
 Fixes: 26c057ab6c45 ("acl: new test-acl application")
 Fixes: b2854d5317e8 ("app/pdump: support multi-core capture")
-Cc: stable@dpdk.org
 
 Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
 Acked-by: Bruce Richardson <bruce.richardson@intel.com>
@@ -37,7 +38,7 @@
  			" --"CMD_LINE_OPT_PDUMP" "
  			"'(port=<port id> | device_id=<pci id or vdev name>),"
 diff --git a/app/test-acl/main.c b/app/test-acl/main.c
-index 4bc00272f4..0a5dfb621d 100644
+index 57f23942eb..08f06c1fa3 100644
 --- a/app/test-acl/main.c
 +++ b/app/test-acl/main.c
 @@ -12,7 +12,7 @@
@@ -50,7 +51,7 @@
  #define	RTE_LOGTYPE_TESTACL	RTE_LOGTYPE_USER1
  
 diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
-index 404dba2b20..30c1753c32 100644
+index 2e7a504415..0eb7844783 100644
 --- a/app/test-pmd/parameters.c
 +++ b/app/test-pmd/parameters.c
 @@ -49,7 +49,7 @@

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

* [dpdk-stable] patch 'usertools: check for pci.ids in /usr/share/misc' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (121 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'app: fix usage help of options separated by dashes' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'bus/pci: fix UIO resource access from secondary process' " luca.boccassi
                     ` (89 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Luca Boccassi; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 35348ca71ef7dca4513fe2d95ed1e78a4ce82927 Mon Sep 17 00:00:00 2001
From: Luca Boccassi <luca.boccassi@microsoft.com>
Date: Thu, 12 Mar 2020 16:30:27 +0000
Subject: [PATCH] usertools: check for pci.ids in /usr/share/misc

[ upstream commit 2ad9f1fab883dd4e5ebad7a912f9258cc9f3fbb9 ]

Debian and Ubuntu switched years ago from /usr/share/hwdata to
/usr/share/misc, and the former is just a compat symlink now.
We are starting to get bug reports to nudge us into changing.
So check the new path first, and the old one as a fallback.

Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 usertools/dpdk-pmdinfo.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/usertools/dpdk-pmdinfo.py b/usertools/dpdk-pmdinfo.py
index 9d5c6369a0..12f20735e0 100755
--- a/usertools/dpdk-pmdinfo.py
+++ b/usertools/dpdk-pmdinfo.py
@@ -561,7 +561,10 @@ def main(stream=None):
 
     pcifile_default = "./pci.ids"  # For unknown OS's assume local file
     if platform.system() == 'Linux':
-        pcifile_default = "/usr/share/hwdata/pci.ids"
+        # hwdata is the legacy location, misc is supported going forward
+        pcifile_default = "/usr/share/misc/pci.ids"
+        if not os.path.exists(pcifile_default):
+            pcifile_default = "/usr/share/hwdata/pci.ids"
     elif platform.system() == 'FreeBSD':
         pcifile_default = "/usr/local/share/pciids/pci.ids"
         if not os.path.exists(pcifile_default):
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:49.546168639 +0100
+++ 0124-usertools-check-for-pci.ids-in-usr-share-misc.patch	2020-05-19 14:04:44.432652287 +0100
@@ -1,15 +1,15 @@
-From 2ad9f1fab883dd4e5ebad7a912f9258cc9f3fbb9 Mon Sep 17 00:00:00 2001
+From 35348ca71ef7dca4513fe2d95ed1e78a4ce82927 Mon Sep 17 00:00:00 2001
 From: Luca Boccassi <luca.boccassi@microsoft.com>
 Date: Thu, 12 Mar 2020 16:30:27 +0000
 Subject: [PATCH] usertools: check for pci.ids in /usr/share/misc
 
+[ upstream commit 2ad9f1fab883dd4e5ebad7a912f9258cc9f3fbb9 ]
+
 Debian and Ubuntu switched years ago from /usr/share/hwdata to
 /usr/share/misc, and the former is just a compat symlink now.
 We are starting to get bug reports to nudge us into changing.
 So check the new path first, and the old one as a fallback.
 
-Cc: stable@dpdk.org
-
 Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
 Acked-by: David Marchand <david.marchand@redhat.com>
 ---

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

* [dpdk-stable] patch 'bus/pci: fix UIO resource access from secondary process' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (122 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'usertools: check for pci.ids in /usr/share/misc' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/bnxt: fix memory leak during queue restart' " luca.boccassi
                     ` (88 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Vijaya Mohan Guvva; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From e09bf2672d3962c16f2d87b6974c521d06e9f805 Mon Sep 17 00:00:00 2001
From: Vijaya Mohan Guvva <vijay1054@gmail.com>
Date: Fri, 24 Apr 2020 13:08:28 -0400
Subject: [PATCH] bus/pci: fix UIO resource access from secondary process

[ upstream commit e6cf7bee1c77a0f321cea3494a106bfa5de6f53c ]

For PCI devices presented through igb_uio, pcidev->mem_resource[] is
not populated when the device is initialized for secondary process.

Initialize pcidev->mem_resource[] with pci-bar mapped addresses.

Fixes: eee16c964cd6 ("pci: support multiple PCI regions per device")

Signed-off-by: Vijaya Mohan Guvva <vijay1054@gmail.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/bus/pci/pci_common_uio.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/bus/pci/pci_common_uio.c b/drivers/bus/pci/pci_common_uio.c
index 7ea73dbc5b..f4dca9da91 100644
--- a/drivers/bus/pci/pci_common_uio.c
+++ b/drivers/bus/pci/pci_common_uio.c
@@ -70,6 +70,7 @@ pci_uio_map_secondary(struct rte_pci_device *dev)
 				}
 				return -1;
 			}
+			dev->mem_resource[i].addr = mapaddr;
 		}
 		return 0;
 	}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:49.581175365 +0100
+++ 0125-bus-pci-fix-UIO-resource-access-from-secondary-proce.patch	2020-05-19 14:04:44.432652287 +0100
@@ -1,15 +1,16 @@
-From e6cf7bee1c77a0f321cea3494a106bfa5de6f53c Mon Sep 17 00:00:00 2001
+From e09bf2672d3962c16f2d87b6974c521d06e9f805 Mon Sep 17 00:00:00 2001
 From: Vijaya Mohan Guvva <vijay1054@gmail.com>
 Date: Fri, 24 Apr 2020 13:08:28 -0400
 Subject: [PATCH] bus/pci: fix UIO resource access from secondary process
 
+[ upstream commit e6cf7bee1c77a0f321cea3494a106bfa5de6f53c ]
+
 For PCI devices presented through igb_uio, pcidev->mem_resource[] is
 not populated when the device is initialized for secondary process.
 
 Initialize pcidev->mem_resource[] with pci-bar mapped addresses.
 
 Fixes: eee16c964cd6 ("pci: support multiple PCI regions per device")
-Cc: stable@dpdk.org
 
 Signed-off-by: Vijaya Mohan Guvva <vijay1054@gmail.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

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

* [dpdk-stable] patch 'net/bnxt: fix memory leak during queue restart' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (123 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'bus/pci: fix UIO resource access from secondary process' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/bnxt: fix VNIC Rx queue count on VNIC free' " luca.boccassi
                     ` (87 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Rahul Gupta; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 61c8f03fd45d0e5611714af7f3264d309e4c165c Mon Sep 17 00:00:00 2001
From: Rahul Gupta <rahul.gupta@broadcom.com>
Date: Thu, 23 Apr 2020 20:32:23 +0530
Subject: [PATCH] net/bnxt: fix memory leak during queue restart

[ upstream commit d256c73c11229c0a7eae32a7e0baaa7a457000e1 ]

During port 0 rxq 1 start ie queue start,
bnxt_free_hwrm_rx_ring() we are clearing the pointers to mbuf array.
Due to this we overwrite the queue with fresh mbuf allocations
causing previously allocated mbufs to leak.
Add a check before allocating mbuf to replenish only empty mbuf slots
in the RxQ.

Fixes: 2eb53b134aae ("net/bnxt: add initial Rx code")

Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 12 ----------
 drivers/net/bnxt/bnxt_rxr.c  | 44 ++++++++++++++++++++----------------
 2 files changed, 25 insertions(+), 31 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index b8d1d6322e..7de5b88f0c 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -2370,13 +2370,6 @@ void bnxt_free_hwrm_rx_ring(struct bnxt *bp, int queue_index)
 		if (BNXT_HAS_RING_GRPS(bp))
 			bp->grp_info[queue_index].rx_fw_ring_id =
 							INVALID_HW_RING_ID;
-		memset(rxr->rx_desc_ring, 0,
-		       rxr->rx_ring_struct->ring_size *
-		       sizeof(*rxr->rx_desc_ring));
-		memset(rxr->rx_buf_ring, 0,
-		       rxr->rx_ring_struct->ring_size *
-		       sizeof(*rxr->rx_buf_ring));
-		rxr->rx_prod = 0;
 	}
 	ring = rxr->ag_ring_struct;
 	if (ring->fw_ring_id != INVALID_HW_RING_ID) {
@@ -2384,11 +2377,6 @@ void bnxt_free_hwrm_rx_ring(struct bnxt *bp, int queue_index)
 				    BNXT_CHIP_THOR(bp) ?
 				    HWRM_RING_FREE_INPUT_RING_TYPE_RX_AGG :
 				    HWRM_RING_FREE_INPUT_RING_TYPE_RX);
-		ring->fw_ring_id = INVALID_HW_RING_ID;
-		memset(rxr->ag_buf_ring, 0,
-		       rxr->ag_ring_struct->ring_size *
-		       sizeof(*rxr->ag_buf_ring));
-		rxr->ag_prod = 0;
 		if (BNXT_HAS_RING_GRPS(bp))
 			bp->grp_info[queue_index].ag_fw_ring_id =
 							INVALID_HW_RING_ID;
diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index 7338a81029..3ebc398375 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -853,14 +853,16 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
 
 	prod = rxr->rx_prod;
 	for (i = 0; i < ring->ring_size; i++) {
-		if (bnxt_alloc_rx_data(rxq, rxr, prod) != 0) {
-			PMD_DRV_LOG(WARNING,
-				"init'ed rx ring %d with %d/%d mbufs only\n",
-				rxq->queue_id, i, ring->ring_size);
-			break;
+		if (unlikely(!rxr->rx_buf_ring[i].mbuf)) {
+			if (bnxt_alloc_rx_data(rxq, rxr, prod) != 0) {
+				PMD_DRV_LOG(WARNING,
+					    "init'ed rx ring %d with %d/%d mbufs only\n",
+					    rxq->queue_id, i, ring->ring_size);
+				break;
+			}
+			rxr->rx_prod = prod;
+			prod = RING_NEXT(rxr->rx_ring_struct, prod);
 		}
-		rxr->rx_prod = prod;
-		prod = RING_NEXT(rxr->rx_ring_struct, prod);
 	}
 
 	ring = rxr->ag_ring_struct;
@@ -869,14 +871,16 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
 	prod = rxr->ag_prod;
 
 	for (i = 0; i < ring->ring_size; i++) {
-		if (bnxt_alloc_ag_data(rxq, rxr, prod) != 0) {
-			PMD_DRV_LOG(WARNING,
-			"init'ed AG ring %d with %d/%d mbufs only\n",
-			rxq->queue_id, i, ring->ring_size);
-			break;
+		if (unlikely(!rxr->ag_buf_ring[i].mbuf)) {
+			if (bnxt_alloc_ag_data(rxq, rxr, prod) != 0) {
+				PMD_DRV_LOG(WARNING,
+					    "init'ed AG ring %d with %d/%d mbufs only\n",
+					    rxq->queue_id, i, ring->ring_size);
+				break;
+			}
+			rxr->ag_prod = prod;
+			prod = RING_NEXT(rxr->ag_ring_struct, prod);
 		}
-		rxr->ag_prod = prod;
-		prod = RING_NEXT(rxr->ag_ring_struct, prod);
 	}
 	PMD_DRV_LOG(DEBUG, "AGG Done!\n");
 
@@ -884,11 +888,13 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
 		unsigned int max_aggs = BNXT_TPA_MAX_AGGS(rxq->bp);
 
 		for (i = 0; i < max_aggs; i++) {
-			rxr->tpa_info[i].mbuf =
-				__bnxt_alloc_rx_data(rxq->mb_pool);
-			if (!rxr->tpa_info[i].mbuf) {
-				rte_atomic64_inc(&rxq->rx_mbuf_alloc_fail);
-				return -ENOMEM;
+			if (unlikely(!rxr->tpa_info[i].mbuf)) {
+				rxr->tpa_info[i].mbuf =
+					__bnxt_alloc_rx_data(rxq->mb_pool);
+				if (!rxr->tpa_info[i].mbuf) {
+					rte_atomic64_inc(&rxq->rx_mbuf_alloc_fail);
+					return -ENOMEM;
+				}
 			}
 		}
 	}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:49.615803560 +0100
+++ 0126-net-bnxt-fix-memory-leak-during-queue-restart.patch	2020-05-19 14:04:44.436652361 +0100
@@ -1,8 +1,10 @@
-From d256c73c11229c0a7eae32a7e0baaa7a457000e1 Mon Sep 17 00:00:00 2001
+From 61c8f03fd45d0e5611714af7f3264d309e4c165c Mon Sep 17 00:00:00 2001
 From: Rahul Gupta <rahul.gupta@broadcom.com>
 Date: Thu, 23 Apr 2020 20:32:23 +0530
 Subject: [PATCH] net/bnxt: fix memory leak during queue restart
 
+[ upstream commit d256c73c11229c0a7eae32a7e0baaa7a457000e1 ]
+
 During port 0 rxq 1 start ie queue start,
 bnxt_free_hwrm_rx_ring() we are clearing the pointers to mbuf array.
 Due to this we overwrite the queue with fresh mbuf allocations
@@ -11,7 +13,6 @@
 in the RxQ.
 
 Fixes: 2eb53b134aae ("net/bnxt: add initial Rx code")
-Cc: stable@dpdk.org
 
 Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
 Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
@@ -22,10 +23,10 @@
  2 files changed, 25 insertions(+), 31 deletions(-)
 
 diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
-index ebf73e44c8..b0a783525e 100644
+index b8d1d6322e..7de5b88f0c 100644
 --- a/drivers/net/bnxt/bnxt_hwrm.c
 +++ b/drivers/net/bnxt/bnxt_hwrm.c
-@@ -2476,13 +2476,6 @@ void bnxt_free_hwrm_rx_ring(struct bnxt *bp, int queue_index)
+@@ -2370,13 +2370,6 @@ void bnxt_free_hwrm_rx_ring(struct bnxt *bp, int queue_index)
  		if (BNXT_HAS_RING_GRPS(bp))
  			bp->grp_info[queue_index].rx_fw_ring_id =
  							INVALID_HW_RING_ID;
@@ -39,7 +40,7 @@
  	}
  	ring = rxr->ag_ring_struct;
  	if (ring->fw_ring_id != INVALID_HW_RING_ID) {
-@@ -2490,11 +2483,6 @@ void bnxt_free_hwrm_rx_ring(struct bnxt *bp, int queue_index)
+@@ -2384,11 +2377,6 @@ void bnxt_free_hwrm_rx_ring(struct bnxt *bp, int queue_index)
  				    BNXT_CHIP_THOR(bp) ?
  				    HWRM_RING_FREE_INPUT_RING_TYPE_RX_AGG :
  				    HWRM_RING_FREE_INPUT_RING_TYPE_RX);
@@ -52,10 +53,10 @@
  			bp->grp_info[queue_index].ag_fw_ring_id =
  							INVALID_HW_RING_ID;
 diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
-index 40da2f2051..a657150d15 100644
+index 7338a81029..3ebc398375 100644
 --- a/drivers/net/bnxt/bnxt_rxr.c
 +++ b/drivers/net/bnxt/bnxt_rxr.c
-@@ -963,14 +963,16 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
+@@ -853,14 +853,16 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
  
  	prod = rxr->rx_prod;
  	for (i = 0; i < ring->ring_size; i++) {
@@ -79,7 +80,7 @@
  	}
  
  	ring = rxr->ag_ring_struct;
-@@ -979,14 +981,16 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
+@@ -869,14 +871,16 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
  	prod = rxr->ag_prod;
  
  	for (i = 0; i < ring->ring_size; i++) {
@@ -103,7 +104,7 @@
  	}
  	PMD_DRV_LOG(DEBUG, "AGG Done!\n");
  
-@@ -994,11 +998,13 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
+@@ -884,11 +888,13 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
  		unsigned int max_aggs = BNXT_TPA_MAX_AGGS(rxq->bp);
  
  		for (i = 0; i < max_aggs; i++) {

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

* [dpdk-stable] patch 'net/bnxt: fix VNIC Rx queue count on VNIC free' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (124 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/bnxt: fix memory leak during queue restart' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'app/testpmd: add parsing for QinQ VLAN headers' " luca.boccassi
                     ` (86 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 26467e800b4f5281c41fa7ed3f61181d272cff99 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Thu, 23 Apr 2020 20:32:24 +0530
Subject: [PATCH] net/bnxt: fix VNIC Rx queue count on VNIC free

[ upstream commit bc75bdb60f4ea3eea4de76a60312711447055852 ]

bnxt_free_one_vnic and bnxt_setup_one_vnic are called on configuring
port vlan stripping. bnxt_setup_one_vnic keeps incrementing the
vnic rx_queue_cnt. Fix to reset vnic rx_queue_cnt in bnxt_free_one_vnic.

Fixes: cfadfee41ed1 ("net/bnxt: fix VLAN strip")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 90e65d1a56..d05c291592 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1940,6 +1940,8 @@ static int bnxt_free_one_vnic(struct bnxt *bp, uint16_t vnic_id)
 	rte_free(vnic->fw_grp_ids);
 	vnic->fw_grp_ids = NULL;
 
+	vnic->rx_queue_cnt = 0;
+
 	return 0;
 }
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:49.654603444 +0100
+++ 0127-net-bnxt-fix-VNIC-Rx-queue-count-on-VNIC-free.patch	2020-05-19 14:04:44.440652433 +0100
@@ -1,14 +1,15 @@
-From bc75bdb60f4ea3eea4de76a60312711447055852 Mon Sep 17 00:00:00 2001
+From 26467e800b4f5281c41fa7ed3f61181d272cff99 Mon Sep 17 00:00:00 2001
 From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
 Date: Thu, 23 Apr 2020 20:32:24 +0530
 Subject: [PATCH] net/bnxt: fix VNIC Rx queue count on VNIC free
 
+[ upstream commit bc75bdb60f4ea3eea4de76a60312711447055852 ]
+
 bnxt_free_one_vnic and bnxt_setup_one_vnic are called on configuring
 port vlan stripping. bnxt_setup_one_vnic keeps incrementing the
 vnic rx_queue_cnt. Fix to reset vnic rx_queue_cnt in bnxt_free_one_vnic.
 
 Fixes: cfadfee41ed1 ("net/bnxt: fix VLAN strip")
-Cc: stable@dpdk.org
 
 Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
 Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
@@ -17,10 +18,10 @@
  1 file changed, 2 insertions(+)
 
 diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
-index 6d42e3f85f..c2bee54d16 100644
+index 90e65d1a56..d05c291592 100644
 --- a/drivers/net/bnxt/bnxt_ethdev.c
 +++ b/drivers/net/bnxt/bnxt_ethdev.c
-@@ -2173,6 +2173,8 @@ static int bnxt_free_one_vnic(struct bnxt *bp, uint16_t vnic_id)
+@@ -1940,6 +1940,8 @@ static int bnxt_free_one_vnic(struct bnxt *bp, uint16_t vnic_id)
  	rte_free(vnic->fw_grp_ids);
  	vnic->fw_grp_ids = NULL;
  

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

* [dpdk-stable] patch 'app/testpmd: add parsing for QinQ VLAN headers' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (125 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/bnxt: fix VNIC Rx queue count on VNIC free' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'doc: fix log level example in Linux guide' " luca.boccassi
                     ` (85 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Raslan Darawsheh; +Cc: Ori Kam, Bernard Iremonger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From aecc7782a68c56948d8173f44a2c388d6c1a4240 Mon Sep 17 00:00:00 2001
From: Raslan Darawsheh <rasland@mellanox.com>
Date: Thu, 23 Apr 2020 12:05:26 +0300
Subject: [PATCH] app/testpmd: add parsing for QinQ VLAN headers

[ upstream commit f16d377150a0ab406d1e845ae1c96a4519f9c0ee ]

When having QinQ VLAN headers in the packet, parse_ethernet
is capable of parsing only the first VLAN.

Add parsing for QinQ VLAN headers in the packet.

Fixes: 51f694dd40f5 ("app/testpmd: rework checksum forward engine")

Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 app/test-pmd/csumonly.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index 25091de881..7b92ab1195 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -139,22 +139,23 @@ parse_ipv6(struct rte_ipv6_hdr *ipv6_hdr, struct testpmd_offload_info *info)
 
 /*
  * Parse an ethernet header to fill the ethertype, l2_len, l3_len and
- * ipproto. This function is able to recognize IPv4/IPv6 with one optional vlan
- * header. The l4_len argument is only set in case of TCP (useful for TSO).
+ * ipproto. This function is able to recognize IPv4/IPv6 with optional VLAN
+ * headers. The l4_len argument is only set in case of TCP (useful for TSO).
  */
 static void
 parse_ethernet(struct rte_ether_hdr *eth_hdr, struct testpmd_offload_info *info)
 {
 	struct rte_ipv4_hdr *ipv4_hdr;
 	struct rte_ipv6_hdr *ipv6_hdr;
+	struct rte_vlan_hdr *vlan_hdr;
 
 	info->l2_len = sizeof(struct rte_ether_hdr);
 	info->ethertype = eth_hdr->ether_type;
 
-	if (info->ethertype == _htons(RTE_ETHER_TYPE_VLAN)) {
-		struct rte_vlan_hdr *vlan_hdr = (
-			struct rte_vlan_hdr *)(eth_hdr + 1);
-
+	while (info->ethertype == _htons(RTE_ETHER_TYPE_VLAN) ||
+	       info->ethertype == _htons(RTE_ETHER_TYPE_QINQ)) {
+		vlan_hdr = (struct rte_vlan_hdr *)
+			((char *)eth_hdr + info->l2_len);
 		info->l2_len  += sizeof(struct rte_vlan_hdr);
 		info->ethertype = vlan_hdr->eth_proto;
 	}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:49.696266225 +0100
+++ 0128-app-testpmd-add-parsing-for-QinQ-VLAN-headers.patch	2020-05-19 14:04:44.440652433 +0100
@@ -1,15 +1,16 @@
-From f16d377150a0ab406d1e845ae1c96a4519f9c0ee Mon Sep 17 00:00:00 2001
+From aecc7782a68c56948d8173f44a2c388d6c1a4240 Mon Sep 17 00:00:00 2001
 From: Raslan Darawsheh <rasland@mellanox.com>
 Date: Thu, 23 Apr 2020 12:05:26 +0300
 Subject: [PATCH] app/testpmd: add parsing for QinQ VLAN headers
 
+[ upstream commit f16d377150a0ab406d1e845ae1c96a4519f9c0ee ]
+
 When having QinQ VLAN headers in the packet, parse_ethernet
 is capable of parsing only the first VLAN.
 
 Add parsing for QinQ VLAN headers in the packet.
 
 Fixes: 51f694dd40f5 ("app/testpmd: rework checksum forward engine")
-Cc: stable@dpdk.org
 
 Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
 Acked-by: Ori Kam <orika@mellanox.com>
@@ -19,7 +20,7 @@
  1 file changed, 7 insertions(+), 6 deletions(-)
 
 diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
-index fe19615b14..8626223793 100644
+index 25091de881..7b92ab1195 100644
 --- a/app/test-pmd/csumonly.c
 +++ b/app/test-pmd/csumonly.c
 @@ -139,22 +139,23 @@ parse_ipv6(struct rte_ipv6_hdr *ipv6_hdr, struct testpmd_offload_info *info)

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

* [dpdk-stable] patch 'doc: fix log level example in Linux guide' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (126 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'app/testpmd: add parsing for QinQ VLAN headers' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'eal: fix typo in endian conversion macros' " luca.boccassi
                     ` (84 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Xiaolong Ye; +Cc: Haiyue Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 9ef224696240f86847094adfe2c0fb21e58c9d84 Mon Sep 17 00:00:00 2001
From: Xiaolong Ye <xiaolong.ye@intel.com>
Date: Wed, 18 Mar 2020 08:58:08 +0800
Subject: [PATCH] doc: fix log level example in Linux guide

[ upstream commit 97fbfe5a9526c6ef6e5583330161f1ea4add22bd ]

Now we need to add prefix like lib. to enable the log,
also changing val 8 to "debug"" which would be more descriptive.

Fixes: ffb9fd1b0808 ("log: update legacy modules dynamic logs regex")

Reported-by: Haiyue Wang <haiyue.wang@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
 doc/guides/linux_gsg/eal_args.include.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/guides/linux_gsg/eal_args.include.rst b/doc/guides/linux_gsg/eal_args.include.rst
index ed8b0e35b0..7b2f6b1d43 100644
--- a/doc/guides/linux_gsg/eal_args.include.rst
+++ b/doc/guides/linux_gsg/eal_args.include.rst
@@ -132,7 +132,7 @@ Debugging options
 
     Specify log level for a specific component. For example::
 
-        --log-level eal:8
+        --log-level lib.eal:debug
 
     Can be specified multiple times.
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:49.730765180 +0100
+++ 0129-doc-fix-log-level-example-in-Linux-guide.patch	2020-05-19 14:04:44.440652433 +0100
@@ -1,13 +1,14 @@
-From 97fbfe5a9526c6ef6e5583330161f1ea4add22bd Mon Sep 17 00:00:00 2001
+From 9ef224696240f86847094adfe2c0fb21e58c9d84 Mon Sep 17 00:00:00 2001
 From: Xiaolong Ye <xiaolong.ye@intel.com>
 Date: Wed, 18 Mar 2020 08:58:08 +0800
 Subject: [PATCH] doc: fix log level example in Linux guide
 
+[ upstream commit 97fbfe5a9526c6ef6e5583330161f1ea4add22bd ]
+
 Now we need to add prefix like lib. to enable the log,
 also changing val 8 to "debug"" which would be more descriptive.
 
 Fixes: ffb9fd1b0808 ("log: update legacy modules dynamic logs regex")
-Cc: stable@dpdk.org
 
 Reported-by: Haiyue Wang <haiyue.wang@intel.com>
 Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
@@ -16,7 +17,7 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/doc/guides/linux_gsg/eal_args.include.rst b/doc/guides/linux_gsg/eal_args.include.rst
-index 361c7cf67f..711a246a08 100644
+index ed8b0e35b0..7b2f6b1d43 100644
 --- a/doc/guides/linux_gsg/eal_args.include.rst
 +++ b/doc/guides/linux_gsg/eal_args.include.rst
 @@ -132,7 +132,7 @@ Debugging options

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

* [dpdk-stable] patch 'eal: fix typo in endian conversion macros' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (127 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'doc: fix log level example in Linux guide' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/avp: fix gcc 10 maybe-uninitialized warning' " luca.boccassi
                     ` (83 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: David Marchand; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From daa2cd115ff17867873cb99b3caaa3a6d0a565ce Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Mon, 27 Apr 2020 15:23:40 +0200
Subject: [PATCH] eal: fix typo in endian conversion macros

[ upstream commit a3e283ed904c3a15971f58525b09e4e5d5e323a9 ]

Caught by code inspection, for little endian, RTE_LEXX macros should
provide rte_leXX_t type values.

Fixes: b75667ef9f7e ("eal: add static endianness conversion macros")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_eal/common/include/generic/rte_byteorder.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/librte_eal/common/include/generic/rte_byteorder.h b/lib/librte_eal/common/include/generic/rte_byteorder.h
index 38e8cfd32b..9ca960932f 100644
--- a/lib/librte_eal/common/include/generic/rte_byteorder.h
+++ b/lib/librte_eal/common/include/generic/rte_byteorder.h
@@ -93,9 +93,9 @@
 #define RTE_BE16(v) (rte_be16_t)(RTE_STATIC_BSWAP16(v))
 #define RTE_BE32(v) (rte_be32_t)(RTE_STATIC_BSWAP32(v))
 #define RTE_BE64(v) (rte_be64_t)(RTE_STATIC_BSWAP64(v))
-#define RTE_LE16(v) (rte_be16_t)(v)
-#define RTE_LE32(v) (rte_be32_t)(v)
-#define RTE_LE64(v) (rte_be64_t)(v)
+#define RTE_LE16(v) (rte_le16_t)(v)
+#define RTE_LE32(v) (rte_le32_t)(v)
+#define RTE_LE64(v) (rte_le64_t)(v)
 #else
 #error Unsupported endianness.
 #endif
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:49.763579771 +0100
+++ 0130-eal-fix-typo-in-endian-conversion-macros.patch	2020-05-19 14:04:44.440652433 +0100
@@ -1,24 +1,25 @@
-From a3e283ed904c3a15971f58525b09e4e5d5e323a9 Mon Sep 17 00:00:00 2001
+From daa2cd115ff17867873cb99b3caaa3a6d0a565ce Mon Sep 17 00:00:00 2001
 From: David Marchand <david.marchand@redhat.com>
 Date: Mon, 27 Apr 2020 15:23:40 +0200
 Subject: [PATCH] eal: fix typo in endian conversion macros
 
+[ upstream commit a3e283ed904c3a15971f58525b09e4e5d5e323a9 ]
+
 Caught by code inspection, for little endian, RTE_LEXX macros should
 provide rte_leXX_t type values.
 
 Fixes: b75667ef9f7e ("eal: add static endianness conversion macros")
-Cc: stable@dpdk.org
 
 Signed-off-by: David Marchand <david.marchand@redhat.com>
 Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
 ---
- lib/librte_eal/include/generic/rte_byteorder.h | 6 +++---
+ lib/librte_eal/common/include/generic/rte_byteorder.h | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
 
-diff --git a/lib/librte_eal/include/generic/rte_byteorder.h b/lib/librte_eal/include/generic/rte_byteorder.h
+diff --git a/lib/librte_eal/common/include/generic/rte_byteorder.h b/lib/librte_eal/common/include/generic/rte_byteorder.h
 index 38e8cfd32b..9ca960932f 100644
---- a/lib/librte_eal/include/generic/rte_byteorder.h
-+++ b/lib/librte_eal/include/generic/rte_byteorder.h
+--- a/lib/librte_eal/common/include/generic/rte_byteorder.h
++++ b/lib/librte_eal/common/include/generic/rte_byteorder.h
 @@ -93,9 +93,9 @@
  #define RTE_BE16(v) (rte_be16_t)(RTE_STATIC_BSWAP16(v))
  #define RTE_BE32(v) (rte_be32_t)(RTE_STATIC_BSWAP32(v))

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

* [dpdk-stable] patch 'net/avp: fix gcc 10 maybe-uninitialized warning' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (128 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'eal: fix typo in endian conversion macros' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'examples/ipsec-gw: " luca.boccassi
                     ` (82 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Kevin Traynor; +Cc: Steven Webster, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From ea0fb3e5a5ba8b9aed88471c969ad56583c88470 Mon Sep 17 00:00:00 2001
From: Kevin Traynor <ktraynor@redhat.com>
Date: Wed, 11 Mar 2020 11:32:59 +0000
Subject: [PATCH] net/avp: fix gcc 10 maybe-uninitialized warning
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit ec87d3b2c2451ce0fa71f53f64987c68a0b3423c ]

gcc 10.0.1 reports:

../drivers/net/avp/avp_ethdev.c: In function ‘avp_xmit_scattered_pkts’:
../drivers/net/avp/avp_ethdev.c:1791:24:
warning: ‘avp_bufs[count]’ may be used uninitialized in this function
 [-Wmaybe-uninitialized]
 1791 |   tx_bufs[i] = avp_bufs[count];
      |                ~~~~~~~~^~~~~~~
../drivers/net/avp/avp_ethdev.c:1791:24:
warning: ‘avp_bufs[count]’ may be used uninitialized in this function
 [-Wmaybe-uninitialized]

Fix by initializing the array.

Fixes: 295abce2d25b ("net/avp: add packet transmit functions")

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: Steven Webster <steven.webster@windriver.com>
---
 drivers/net/avp/avp_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/avp/avp_ethdev.c b/drivers/net/avp/avp_ethdev.c
index cd747b6beb..1abe96ce50 100644
--- a/drivers/net/avp/avp_ethdev.c
+++ b/drivers/net/avp/avp_ethdev.c
@@ -1694,7 +1694,7 @@ avp_xmit_scattered_pkts(void *tx_queue,
 			uint16_t nb_pkts)
 {
 	struct rte_avp_desc *avp_bufs[(AVP_MAX_TX_BURST *
-				       RTE_AVP_MAX_MBUF_SEGMENTS)];
+				       RTE_AVP_MAX_MBUF_SEGMENTS)] = {};
 	struct avp_queue *txq = (struct avp_queue *)tx_queue;
 	struct rte_avp_desc *tx_bufs[AVP_MAX_TX_BURST];
 	struct avp_dev *avp = txq->avp;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:49.797286310 +0100
+++ 0131-net-avp-fix-gcc-10-maybe-uninitialized-warning.patch	2020-05-19 14:04:44.444652506 +0100
@@ -1,4 +1,4 @@
-From ec87d3b2c2451ce0fa71f53f64987c68a0b3423c Mon Sep 17 00:00:00 2001
+From ea0fb3e5a5ba8b9aed88471c969ad56583c88470 Mon Sep 17 00:00:00 2001
 From: Kevin Traynor <ktraynor@redhat.com>
 Date: Wed, 11 Mar 2020 11:32:59 +0000
 Subject: [PATCH] net/avp: fix gcc 10 maybe-uninitialized warning
@@ -6,6 +6,8 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit ec87d3b2c2451ce0fa71f53f64987c68a0b3423c ]
+
 gcc 10.0.1 reports:
 
 ../drivers/net/avp/avp_ethdev.c: In function ‘avp_xmit_scattered_pkts’:
@@ -21,7 +23,6 @@
 Fix by initializing the array.
 
 Fixes: 295abce2d25b ("net/avp: add packet transmit functions")
-Cc: stable@dpdk.org
 
 Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
 Acked-by: Steven Webster <steven.webster@windriver.com>

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

* [dpdk-stable] patch 'examples/ipsec-gw: fix gcc 10 maybe-uninitialized warning' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (129 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/avp: fix gcc 10 maybe-uninitialized warning' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'eal/x86: ignore gcc 10 stringop-overflow warnings' " luca.boccassi
                     ` (81 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Kevin Traynor; +Cc: Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 274dec754807019cbc8c3c063e5a5b0b46b2f1d7 Mon Sep 17 00:00:00 2001
From: Kevin Traynor <ktraynor@redhat.com>
Date: Wed, 11 Mar 2020 11:33:00 +0000
Subject: [PATCH] examples/ipsec-gw: fix gcc 10 maybe-uninitialized warning
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit f8afd2924753b7fbc9e28771277928ac1d6fb4a7 ]

gcc 10.0.1 reports:

../examples/ipsec-secgw/ipsec_process.c: In function ‘ipsec_process’:
../examples/ipsec-secgw/ipsec_process.c:132:34:
error: ‘grp.m’ may be used uninitialized in this function
 [-Werror=maybe-uninitialized]
  132 |    grp[n].cnt = pkts + i - grp[n].m;
      |                            ~~~~~~^~

This is a correct warning for the initial execution of the statement.
However, it is the design of the loop that grp[0].cnt will later be
written with the correct value using an initialized grp[0].m before it
is used.

In order to remove the warning, initialize grp[0].m for the initial and
unused calculation of grp[0].cnt.

Fixes: 3e5f4625dc17 ("examples/ipsec-secgw: make data-path to use IPsec library")

Suggested-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 examples/ipsec-secgw/ipsec_process.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/examples/ipsec-secgw/ipsec_process.c b/examples/ipsec-secgw/ipsec_process.c
index 2eb5c8b345..37f406d46c 100644
--- a/examples/ipsec-secgw/ipsec_process.c
+++ b/examples/ipsec-secgw/ipsec_process.c
@@ -125,6 +125,7 @@ sa_group(void *sa_ptr[], struct rte_mbuf *pkts[],
 	void * const nosa = &spi;
 
 	sa = nosa;
+	grp[0].m = pkts;
 	for (i = 0, n = 0; i != num; i++) {
 
 		if (sa != sa_ptr[i]) {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:49.833263858 +0100
+++ 0132-examples-ipsec-gw-fix-gcc-10-maybe-uninitialized-war.patch	2020-05-19 14:04:44.444652506 +0100
@@ -1,4 +1,4 @@
-From f8afd2924753b7fbc9e28771277928ac1d6fb4a7 Mon Sep 17 00:00:00 2001
+From 274dec754807019cbc8c3c063e5a5b0b46b2f1d7 Mon Sep 17 00:00:00 2001
 From: Kevin Traynor <ktraynor@redhat.com>
 Date: Wed, 11 Mar 2020 11:33:00 +0000
 Subject: [PATCH] examples/ipsec-gw: fix gcc 10 maybe-uninitialized warning
@@ -6,6 +6,8 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit f8afd2924753b7fbc9e28771277928ac1d6fb4a7 ]
+
 gcc 10.0.1 reports:
 
 ../examples/ipsec-secgw/ipsec_process.c: In function ‘ipsec_process’:
@@ -24,7 +26,6 @@
 unused calculation of grp[0].cnt.
 
 Fixes: 3e5f4625dc17 ("examples/ipsec-secgw: make data-path to use IPsec library")
-Cc: stable@dpdk.org
 
 Suggested-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
 Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
@@ -34,10 +35,10 @@
  1 file changed, 1 insertion(+)
 
 diff --git a/examples/ipsec-secgw/ipsec_process.c b/examples/ipsec-secgw/ipsec_process.c
-index bb2f2b82da..6d3a3c9a1b 100644
+index 2eb5c8b345..37f406d46c 100644
 --- a/examples/ipsec-secgw/ipsec_process.c
 +++ b/examples/ipsec-secgw/ipsec_process.c
-@@ -126,6 +126,7 @@ sa_group(void *sa_ptr[], struct rte_mbuf *pkts[],
+@@ -125,6 +125,7 @@ sa_group(void *sa_ptr[], struct rte_mbuf *pkts[],
  	void * const nosa = &spi;
  
  	sa = nosa;

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

* [dpdk-stable] patch 'eal/x86: ignore gcc 10 stringop-overflow warnings' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (130 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'examples/ipsec-gw: " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'kvargs: fix invalid token parsing on FreeBSD' " luca.boccassi
                     ` (80 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Kevin Traynor; +Cc: Bruce Richardson, Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From df17bcb43b419b5157a8e202d6277aa4a0029bae Mon Sep 17 00:00:00 2001
From: Kevin Traynor <ktraynor@redhat.com>
Date: Fri, 17 Apr 2020 16:43:35 +0100
Subject: [PATCH] eal/x86: ignore gcc 10 stringop-overflow warnings
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit b5b3ea803e4741ad6a46a38d8227c78226d9054d ]

stringop-overflow warns when it sees a possible overflow
in a string operation.

In the rte_memcpy functions different branches are taken
depending on the size. stringop-overflow is raised for the
branches in the function where it sees the static size of the
src could be overflowed.

However, in reality a correct size argument and in some cases
dynamic allocation would ensure that this does not happen.

For example, in the case below for key, the correct path will be
chosen in rte_memcpy_generic at runtime based on the size argument
but as some paths in the function could lead to a cast to 32 bytes
a warning is raised.

In function ‘_mm256_storeu_si256’,
inlined from ‘rte_memcpy_generic’
at ../lib/librte_eal/common/include/arch/x86/rte_memcpy.h:315:2,
inlined from ‘iavf_configure_rss_key’
at ../lib/librte_eal/common/include/arch/x86/rte_memcpy.h:869:10:

/usr/lib/gcc/x86_64-redhat-linux/10/include/avxintrin.h:928:8:
warning: writing 32 bytes into a region of size 1 [-Wstringop-overflow=]
  928 |   *__P = __A;
      |   ~~~~~^~~~~
In file included
from ../drivers/net/iavf/../../common/iavf/iavf_prototype.h:10,
from ../drivers/net/iavf/iavf.h:9,
from ../drivers/net/iavf/iavf_vchnl.c:22:

../drivers/net/iavf/iavf_vchnl.c:
In function ‘iavf_configure_rss_key’:

../drivers/net/iavf/../../common/iavf/virtchnl.h:508:5:
note: at offset 0 to object ‘key’ with size 1 declared here
  508 |  u8 key[1];         /* RSS hash key, packed bytes */
      |     ^~~

Ignore the stringop-overflow warnings for rte_memcpy.h functions.

Bugzilla ID: 394
Bugzilla ID: 421

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 lib/librte_eal/common/include/arch/x86/rte_memcpy.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lib/librte_eal/common/include/arch/x86/rte_memcpy.h b/lib/librte_eal/common/include/arch/x86/rte_memcpy.h
index ba44c4a328..9c67232df9 100644
--- a/lib/librte_eal/common/include/arch/x86/rte_memcpy.h
+++ b/lib/librte_eal/common/include/arch/x86/rte_memcpy.h
@@ -22,6 +22,11 @@
 extern "C" {
 #endif
 
+#if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION >= 100000)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wstringop-overflow"
+#endif
+
 /**
  * Copy bytes from one location to another. The locations must not overlap.
  *
@@ -869,6 +874,10 @@ rte_memcpy(void *dst, const void *src, size_t n)
 		return rte_memcpy_generic(dst, src, n);
 }
 
+#if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION >= 100000)
+#pragma GCC diagnostic pop
+#endif
+
 #ifdef __cplusplus
 }
 #endif
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:49.865529125 +0100
+++ 0133-eal-x86-ignore-gcc-10-stringop-overflow-warnings.patch	2020-05-19 14:04:44.444652506 +0100
@@ -1,4 +1,4 @@
-From b5b3ea803e4741ad6a46a38d8227c78226d9054d Mon Sep 17 00:00:00 2001
+From df17bcb43b419b5157a8e202d6277aa4a0029bae Mon Sep 17 00:00:00 2001
 From: Kevin Traynor <ktraynor@redhat.com>
 Date: Fri, 17 Apr 2020 16:43:35 +0100
 Subject: [PATCH] eal/x86: ignore gcc 10 stringop-overflow warnings
@@ -6,6 +6,8 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit b5b3ea803e4741ad6a46a38d8227c78226d9054d ]
+
 stringop-overflow warns when it sees a possible overflow
 in a string operation.
 
@@ -49,19 +51,18 @@
 
 Bugzilla ID: 394
 Bugzilla ID: 421
-Cc: stable@dpdk.org
 
 Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
 Acked-by: Bruce Richardson <bruce.richardson@intel.com>
 Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
 ---
- lib/librte_eal/x86/include/rte_memcpy.h | 9 +++++++++
+ lib/librte_eal/common/include/arch/x86/rte_memcpy.h | 9 +++++++++
  1 file changed, 9 insertions(+)
 
-diff --git a/lib/librte_eal/x86/include/rte_memcpy.h b/lib/librte_eal/x86/include/rte_memcpy.h
+diff --git a/lib/librte_eal/common/include/arch/x86/rte_memcpy.h b/lib/librte_eal/common/include/arch/x86/rte_memcpy.h
 index ba44c4a328..9c67232df9 100644
---- a/lib/librte_eal/x86/include/rte_memcpy.h
-+++ b/lib/librte_eal/x86/include/rte_memcpy.h
+--- a/lib/librte_eal/common/include/arch/x86/rte_memcpy.h
++++ b/lib/librte_eal/common/include/arch/x86/rte_memcpy.h
 @@ -22,6 +22,11 @@
  extern "C" {
  #endif

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

* [dpdk-stable] patch 'kvargs: fix invalid token parsing on FreeBSD' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (131 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'eal/x86: ignore gcc 10 stringop-overflow warnings' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'eal/ppc: fix build with gcc 9.3' " luca.boccassi
                     ` (79 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Olivier Matz; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 2acc78a0a186b598cadcc14b59f8df480d0a6ae9 Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Wed, 29 Apr 2020 15:17:00 +0200
Subject: [PATCH] kvargs: fix invalid token parsing on FreeBSD
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit b2aa2c9723796d81cb9216f3a5c5e195796985fa ]

The behavior of strtok_r() is not the same between GNU libc and FreeBSD
libc: in the first case, the context is set to "" when the last token is
returned, while in the second case it is set to NULL.

On FreeBSD, the current code crashes because we are dereferencing a NULL
pointer (ctx1). Fix it by first checking if it is NULL. This works with
both GNU and FreeBSD libc.

Fixes: ffcf831454a9 ("kvargs: fix buffer overflow when parsing list")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Tested-by: Zhimin Huang <zhiminx.huang@intel.com>
---
 lib/librte_kvargs/rte_kvargs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_kvargs/rte_kvargs.c b/lib/librte_kvargs/rte_kvargs.c
index 1d815dcd96..285081c86c 100644
--- a/lib/librte_kvargs/rte_kvargs.c
+++ b/lib/librte_kvargs/rte_kvargs.c
@@ -50,7 +50,7 @@ rte_kvargs_tokenize(struct rte_kvargs *kvlist, const char *params)
 			/* Find the end of the list. */
 			while (str[strlen(str) - 1] != ']') {
 				/* Restore the comma erased by strtok_r(). */
-				if (ctx1[0] == '\0')
+				if (ctx1 == NULL || ctx1[0] == '\0')
 					return -1; /* no closing bracket */
 				str[strlen(str)] = ',';
 				/* Parse until next comma. */
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:49.901634272 +0100
+++ 0134-kvargs-fix-invalid-token-parsing-on-FreeBSD.patch	2020-05-19 14:04:44.444652506 +0100
@@ -1,4 +1,4 @@
-From b2aa2c9723796d81cb9216f3a5c5e195796985fa Mon Sep 17 00:00:00 2001
+From 2acc78a0a186b598cadcc14b59f8df480d0a6ae9 Mon Sep 17 00:00:00 2001
 From: Olivier Matz <olivier.matz@6wind.com>
 Date: Wed, 29 Apr 2020 15:17:00 +0200
 Subject: [PATCH] kvargs: fix invalid token parsing on FreeBSD
@@ -6,6 +6,8 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit b2aa2c9723796d81cb9216f3a5c5e195796985fa ]
+
 The behavior of strtok_r() is not the same between GNU libc and FreeBSD
 libc: in the first case, the context is set to "" when the last token is
 returned, while in the second case it is set to NULL.
@@ -15,7 +17,6 @@
 both GNU and FreeBSD libc.
 
 Fixes: ffcf831454a9 ("kvargs: fix buffer overflow when parsing list")
-Cc: stable@dpdk.org
 
 Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
 Tested-by: Zhimin Huang <zhiminx.huang@intel.com>

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

* [dpdk-stable] patch 'eal/ppc: fix build with gcc 9.3' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (132 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'kvargs: fix invalid token parsing on FreeBSD' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/bnxt: fix max ring count' " luca.boccassi
                     ` (78 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: David Christensen; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From a131ab7d0f2fb6ab35e9e556f7630a607be9eefe Mon Sep 17 00:00:00 2001
From: David Christensen <drc@linux.vnet.ibm.com>
Date: Mon, 4 May 2020 14:03:47 -0700
Subject: [PATCH] eal/ppc: fix build with gcc 9.3

[ upstream commit 67889d11306a6e531be8d2fe53bc216172b90f5d ]

Building DPDK on Ubuntu 20.04 with GCC 9.3.0 results in a "subscript is
outside array bounds" message in rte_memcpy function.  The build error
is caused by an interaction between __builtin_constant_p and
"-Werror=array-bounds" as described in this bugzilla:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90387

Modify the code to disable the array-bounds check for GCC versions 9.0
to 9.3.

Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
---
 .../common/include/arch/ppc_64/rte_memcpy.h           | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/lib/librte_eal/common/include/arch/ppc_64/rte_memcpy.h b/lib/librte_eal/common/include/arch/ppc_64/rte_memcpy.h
index 25311ba1d7..02188e79bc 100644
--- a/lib/librte_eal/common/include/arch/ppc_64/rte_memcpy.h
+++ b/lib/librte_eal/common/include/arch/ppc_64/rte_memcpy.h
@@ -11,12 +11,19 @@
 /*To include altivec.h, GCC version must  >= 4.8 */
 #include <altivec.h>
 
+#include "rte_common.h"
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
 #include "generic/rte_memcpy.h"
 
+#if (GCC_VERSION >= 90000 && GCC_VERSION < 90400)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Warray-bounds"
+#endif
+
 static inline void
 rte_mov16(uint8_t *dst, const uint8_t *src)
 {
@@ -192,6 +199,10 @@ rte_memcpy_func(void *dst, const void *src, size_t n)
 	return ret;
 }
 
+#if (GCC_VERSION >= 90000 && GCC_VERSION < 90400)
+#pragma GCC diagnostic pop
+#endif
+
 #ifdef __cplusplus
 }
 #endif
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:49.936695226 +0100
+++ 0135-eal-ppc-fix-build-with-gcc-9.3.patch	2020-05-19 14:04:44.444652506 +0100
@@ -1,8 +1,10 @@
-From 67889d11306a6e531be8d2fe53bc216172b90f5d Mon Sep 17 00:00:00 2001
+From a131ab7d0f2fb6ab35e9e556f7630a607be9eefe Mon Sep 17 00:00:00 2001
 From: David Christensen <drc@linux.vnet.ibm.com>
 Date: Mon, 4 May 2020 14:03:47 -0700
 Subject: [PATCH] eal/ppc: fix build with gcc 9.3
 
+[ upstream commit 67889d11306a6e531be8d2fe53bc216172b90f5d ]
+
 Building DPDK on Ubuntu 20.04 with GCC 9.3.0 results in a "subscript is
 outside array bounds" message in rte_memcpy function.  The build error
 is caused by an interaction between __builtin_constant_p and
@@ -13,26 +15,24 @@
 Modify the code to disable the array-bounds check for GCC versions 9.0
 to 9.3.
 
-Cc: stable@dpdk.org
-
 Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
 ---
- lib/librte_eal/ppc/include/rte_memcpy.h | 10 ++++++++++
- 1 file changed, 10 insertions(+)
+ .../common/include/arch/ppc_64/rte_memcpy.h           | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
 
-diff --git a/lib/librte_eal/ppc/include/rte_memcpy.h b/lib/librte_eal/ppc/include/rte_memcpy.h
-index d685b7b15b..c2a1f356d5 100644
---- a/lib/librte_eal/ppc/include/rte_memcpy.h
-+++ b/lib/librte_eal/ppc/include/rte_memcpy.h
-@@ -10,6 +10,7 @@
- #include <string.h>
+diff --git a/lib/librte_eal/common/include/arch/ppc_64/rte_memcpy.h b/lib/librte_eal/common/include/arch/ppc_64/rte_memcpy.h
+index 25311ba1d7..02188e79bc 100644
+--- a/lib/librte_eal/common/include/arch/ppc_64/rte_memcpy.h
++++ b/lib/librte_eal/common/include/arch/ppc_64/rte_memcpy.h
+@@ -11,12 +11,19 @@
+ /*To include altivec.h, GCC version must  >= 4.8 */
+ #include <altivec.h>
  
- #include "rte_altivec.h"
 +#include "rte_common.h"
- 
++
  #ifdef __cplusplus
  extern "C" {
-@@ -17,6 +18,11 @@ extern "C" {
+ #endif
  
  #include "generic/rte_memcpy.h"
  
@@ -44,7 +44,7 @@
  static inline void
  rte_mov16(uint8_t *dst, const uint8_t *src)
  {
-@@ -192,6 +198,10 @@ rte_memcpy_func(void *dst, const void *src, size_t n)
+@@ -192,6 +199,10 @@ rte_memcpy_func(void *dst, const void *src, size_t n)
  	return ret;
  }
  

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

* [dpdk-stable] patch 'net/bnxt: fix max ring count' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (133 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'eal/ppc: fix build with gcc 9.3' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/i40e: fix flow director for ARP packets' " luca.boccassi
                     ` (77 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Somnath Kotur; +Cc: Kalesh AP, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From fe42bb4b74d1d537fc8c758341e1b9afc44afe44 Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Fri, 24 Apr 2020 16:30:54 +0530
Subject: [PATCH] net/bnxt: fix max ring count

[ upstream commit 9bccd7010f1f627895409fe189627b2dd5a2c460 ]

Max Rx Ring count could be < Max stat contexts. While accounting
for stat contexts, this should be also considered and
the max ring count adjusted accordingly.

Fixes: f03e66cb64ce ("net/bnxt: limit queue count for NS3/Stingray devices")

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
---
 drivers/net/bnxt/bnxt.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index cfd6f197da..0ef0282d2a 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -630,10 +630,10 @@ struct bnxt {
 #define MAX_STINGRAY_RINGS		128U
 /* For sake of symmetry, max Tx rings == max Rx rings, one stat ctx for each */
 #define BNXT_MAX_RX_RINGS(bp) \
-	(BNXT_STINGRAY(bp) ? RTE_MIN(RTE_MIN(bp->max_rx_rings, \
+	(BNXT_STINGRAY(bp) ? RTE_MIN(RTE_MIN(bp->max_rx_rings / 2U, \
 					     MAX_STINGRAY_RINGS), \
 				     bp->max_stat_ctx / 2U) : \
-				RTE_MIN(bp->max_rx_rings, \
+				RTE_MIN(bp->max_rx_rings / 2U, \
 					bp->max_stat_ctx / 2U))
 #define BNXT_MAX_TX_RINGS(bp) \
 	(RTE_MIN((bp)->max_tx_rings, BNXT_MAX_RX_RINGS(bp)))
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:49.970202575 +0100
+++ 0136-net-bnxt-fix-max-ring-count.patch	2020-05-19 14:04:44.448652578 +0100
@@ -1,14 +1,15 @@
-From 9bccd7010f1f627895409fe189627b2dd5a2c460 Mon Sep 17 00:00:00 2001
+From fe42bb4b74d1d537fc8c758341e1b9afc44afe44 Mon Sep 17 00:00:00 2001
 From: Somnath Kotur <somnath.kotur@broadcom.com>
 Date: Fri, 24 Apr 2020 16:30:54 +0530
 Subject: [PATCH] net/bnxt: fix max ring count
 
+[ upstream commit 9bccd7010f1f627895409fe189627b2dd5a2c460 ]
+
 Max Rx Ring count could be < Max stat contexts. While accounting
 for stat contexts, this should be also considered and
 the max ring count adjusted accordingly.
 
 Fixes: f03e66cb64ce ("net/bnxt: limit queue count for NS3/Stingray devices")
-Cc: stable@dpdk.org
 
 Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
 Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
@@ -17,10 +18,10 @@
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
-index 586d3f5349..12fed1e9d7 100644
+index cfd6f197da..0ef0282d2a 100644
 --- a/drivers/net/bnxt/bnxt.h
 +++ b/drivers/net/bnxt/bnxt.h
-@@ -653,10 +653,10 @@ struct bnxt {
+@@ -630,10 +630,10 @@ struct bnxt {
  #define MAX_STINGRAY_RINGS		128U
  /* For sake of symmetry, max Tx rings == max Rx rings, one stat ctx for each */
  #define BNXT_MAX_RX_RINGS(bp) \

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

* [dpdk-stable] patch 'net/i40e: fix flow director for ARP packets' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (134 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/bnxt: fix max ring count' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'doc: add i40e limitation for flow director' " luca.boccassi
                     ` (76 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Wei Zhao; +Cc: Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 74095b0ca6c98ff3a51769689f6a2266cefe41c3 Mon Sep 17 00:00:00 2001
From: Wei Zhao <wei.zhao1@intel.com>
Date: Wed, 29 Apr 2020 10:03:51 +0800
Subject: [PATCH] net/i40e: fix flow director for ARP packets

[ upstream commit 73cc2f0ab5cfaa7f4b2dd4c0cacc98b8e17cc778 ]

Currently, flow "pattern eth type is 0x0806 / end actions mark id
0x86 / rss / end" can't be created successfully. FDIR parser
shouldn't deny RTE_ETHER_TYPE_ARP since ARP packets will be
parsed as PCTYPE_L2_PAYLOAD. This patch fixes the issue.

Bugzilla ID: 402
Fixes: 42044b69c67d ("net/i40e: support input set selection for FDIR")

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/i40e_flow.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index a5bd1c7783..6cd39babba 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -2542,7 +2542,6 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
 				if (next_type == RTE_FLOW_ITEM_TYPE_VLAN ||
 				    ether_type == RTE_ETHER_TYPE_IPV4 ||
 				    ether_type == RTE_ETHER_TYPE_IPV6 ||
-				    ether_type == RTE_ETHER_TYPE_ARP ||
 				    ether_type == outer_tpid) {
 					rte_flow_error_set(error, EINVAL,
 						     RTE_FLOW_ERROR_TYPE_ITEM,
@@ -2587,7 +2586,6 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
 
 				if (ether_type == RTE_ETHER_TYPE_IPV4 ||
 				    ether_type == RTE_ETHER_TYPE_IPV6 ||
-				    ether_type == RTE_ETHER_TYPE_ARP ||
 				    ether_type == outer_tpid) {
 					rte_flow_error_set(error, EINVAL,
 						     RTE_FLOW_ERROR_TYPE_ITEM,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:50.004588081 +0100
+++ 0137-net-i40e-fix-flow-director-for-ARP-packets.patch	2020-05-19 14:04:44.448652578 +0100
@@ -1,8 +1,10 @@
-From 73cc2f0ab5cfaa7f4b2dd4c0cacc98b8e17cc778 Mon Sep 17 00:00:00 2001
+From 74095b0ca6c98ff3a51769689f6a2266cefe41c3 Mon Sep 17 00:00:00 2001
 From: Wei Zhao <wei.zhao1@intel.com>
 Date: Wed, 29 Apr 2020 10:03:51 +0800
 Subject: [PATCH] net/i40e: fix flow director for ARP packets
 
+[ upstream commit 73cc2f0ab5cfaa7f4b2dd4c0cacc98b8e17cc778 ]
+
 Currently, flow "pattern eth type is 0x0806 / end actions mark id
 0x86 / rss / end" can't be created successfully. FDIR parser
 shouldn't deny RTE_ETHER_TYPE_ARP since ARP packets will be
@@ -10,7 +12,6 @@
 
 Bugzilla ID: 402
 Fixes: 42044b69c67d ("net/i40e: support input set selection for FDIR")
-Cc: stable@dpdk.org
 
 Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
 Acked-by: Beilei Xing <beilei.xing@intel.com>
@@ -19,10 +20,10 @@
  1 file changed, 2 deletions(-)
 
 diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
-index 7e64ae53a3..1533d5abbd 100644
+index a5bd1c7783..6cd39babba 100644
 --- a/drivers/net/i40e/i40e_flow.c
 +++ b/drivers/net/i40e/i40e_flow.c
-@@ -2666,7 +2666,6 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
+@@ -2542,7 +2542,6 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
  				if (next_type == RTE_FLOW_ITEM_TYPE_VLAN ||
  				    ether_type == RTE_ETHER_TYPE_IPV4 ||
  				    ether_type == RTE_ETHER_TYPE_IPV6 ||
@@ -30,7 +31,7 @@
  				    ether_type == outer_tpid) {
  					rte_flow_error_set(error, EINVAL,
  						     RTE_FLOW_ERROR_TYPE_ITEM,
-@@ -2711,7 +2710,6 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
+@@ -2587,7 +2586,6 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
  
  				if (ether_type == RTE_ETHER_TYPE_IPV4 ||
  				    ether_type == RTE_ETHER_TYPE_IPV6 ||

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

* [dpdk-stable] patch 'doc: add i40e limitation for flow director' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (135 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/i40e: fix flow director for ARP packets' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/i40e: fix flush of flow director filter' " luca.boccassi
                     ` (75 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Wei Zhao; +Cc: Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From a42e97921778918dc898b0579e7bdcbc38b68b50 Mon Sep 17 00:00:00 2001
From: Wei Zhao <wei.zhao1@intel.com>
Date: Wed, 29 Apr 2020 10:03:52 +0800
Subject: [PATCH] doc: add i40e limitation for flow director

[ upstream commit 5b728485d6bf5cfb1fb0dadb76b518df3575da07 ]

Each PCTYPE can only have one specific FDIR input set at one time.
Add input set requirement info to i40e doc.

Bugzilla ID: 403
Fixes: 14c66a451ef7 ("net/i40e: flush tunnel filters")

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 doc/guides/nics/i40e.rst | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/doc/guides/nics/i40e.rst b/doc/guides/nics/i40e.rst
index c7c34b62f6..61d72c2b10 100644
--- a/doc/guides/nics/i40e.rst
+++ b/doc/guides/nics/i40e.rst
@@ -667,6 +667,15 @@ Use 16 Bytes RX Descriptor Size
 As i40e PMD supports both 16 and 32 bytes RX descriptor sizes, and 16 bytes size can provide helps to high performance of small packets.
 Configuration of ``CONFIG_RTE_LIBRTE_I40E_16BYTE_RX_DESC`` in config files can be changed to use 16 bytes size RX descriptors.
 
+Input set requirement of each pctype for FDIR
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Each PCTYPE can only have one specific FDIR input set at one time.
+For example, if creating 2 rte_flow rules with different input set for one PCTYPE,
+it will fail and return the info "Conflict with the first rule's input set",
+which means the current rule's input set conflicts with the first rule's.
+Remove the first rule if want to change the input set of the PCTYPE.
+
 Example of getting best performance with l3fwd example
 ------------------------------------------------------
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:50.051379049 +0100
+++ 0138-doc-add-i40e-limitation-for-flow-director.patch	2020-05-19 14:04:44.448652578 +0100
@@ -1,14 +1,15 @@
-From 5b728485d6bf5cfb1fb0dadb76b518df3575da07 Mon Sep 17 00:00:00 2001
+From a42e97921778918dc898b0579e7bdcbc38b68b50 Mon Sep 17 00:00:00 2001
 From: Wei Zhao <wei.zhao1@intel.com>
 Date: Wed, 29 Apr 2020 10:03:52 +0800
 Subject: [PATCH] doc: add i40e limitation for flow director
 
+[ upstream commit 5b728485d6bf5cfb1fb0dadb76b518df3575da07 ]
+
 Each PCTYPE can only have one specific FDIR input set at one time.
 Add input set requirement info to i40e doc.
 
 Bugzilla ID: 403
 Fixes: 14c66a451ef7 ("net/i40e: flush tunnel filters")
-Cc: stable@dpdk.org
 
 Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
 Acked-by: Beilei Xing <beilei.xing@intel.com>
@@ -17,10 +18,10 @@
  1 file changed, 9 insertions(+)
 
 diff --git a/doc/guides/nics/i40e.rst b/doc/guides/nics/i40e.rst
-index 416b3904ee..2f846091cf 100644
+index c7c34b62f6..61d72c2b10 100644
 --- a/doc/guides/nics/i40e.rst
 +++ b/doc/guides/nics/i40e.rst
-@@ -747,6 +747,15 @@ Use 16 Bytes RX Descriptor Size
+@@ -667,6 +667,15 @@ Use 16 Bytes RX Descriptor Size
  As i40e PMD supports both 16 and 32 bytes RX descriptor sizes, and 16 bytes size can provide helps to high performance of small packets.
  Configuration of ``CONFIG_RTE_LIBRTE_I40E_16BYTE_RX_DESC`` in config files can be changed to use 16 bytes size RX descriptors.
  

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

* [dpdk-stable] patch 'net/i40e: fix flush of flow director filter' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (136 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'doc: add i40e limitation for flow director' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/mlx5: fix assert in doorbell lookup' " luca.boccassi
                     ` (74 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Wei Zhao; +Cc: Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From d6db84d0b1ed83c463fd29b3b9183db3b65bf9ef Mon Sep 17 00:00:00 2001
From: Wei Zhao <wei.zhao1@intel.com>
Date: Wed, 29 Apr 2020 10:03:53 +0800
Subject: [PATCH] net/i40e: fix flush of flow director filter

[ upstream commit 1491f63c75596b01b95355e395dde6795fab3c8b ]

When we flush FDIR filter, we can not call i40e_fdir_teardown()
function as it will free vsi used for FDIR, then the vsi->base_queue
will be freed from pf->qp_pool, but vsi->base_queue can only get
once when do dev init in i40e_pf_setup(). If we free it, it will
never be alloc again.

Bugzilla ID: 404
Fixes: 2e67a7fbf3ff ("net/i40e: config flow director automatically")

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/i40e_flow.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index 6cd39babba..ea3b223e11 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -4791,7 +4791,6 @@ i40e_flow_destroy(struct rte_eth_dev *dev,
 
 		/* If the last flow is destroyed, disable fdir. */
 		if (!ret && TAILQ_EMPTY(&pf->fdir.fdir_list)) {
-			i40e_fdir_teardown(pf);
 			i40e_fdir_rx_proc_enable(dev, 0);
 		}
 		break;
@@ -4989,8 +4988,6 @@ i40e_flow_flush_fdir_filter(struct i40e_pf *pf)
 			pf->fdir.inset_flag[pctype] = 0;
 	}
 
-	i40e_fdir_teardown(pf);
-
 	return ret;
 }
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:50.091230009 +0100
+++ 0139-net-i40e-fix-flush-of-flow-director-filter.patch	2020-05-19 14:04:44.452652651 +0100
@@ -1,8 +1,10 @@
-From 1491f63c75596b01b95355e395dde6795fab3c8b Mon Sep 17 00:00:00 2001
+From d6db84d0b1ed83c463fd29b3b9183db3b65bf9ef Mon Sep 17 00:00:00 2001
 From: Wei Zhao <wei.zhao1@intel.com>
 Date: Wed, 29 Apr 2020 10:03:53 +0800
 Subject: [PATCH] net/i40e: fix flush of flow director filter
 
+[ upstream commit 1491f63c75596b01b95355e395dde6795fab3c8b ]
+
 When we flush FDIR filter, we can not call i40e_fdir_teardown()
 function as it will free vsi used for FDIR, then the vsi->base_queue
 will be freed from pf->qp_pool, but vsi->base_queue can only get
@@ -11,7 +13,6 @@
 
 Bugzilla ID: 404
 Fixes: 2e67a7fbf3ff ("net/i40e: config flow director automatically")
-Cc: stable@dpdk.org
 
 Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
 Acked-by: Beilei Xing <beilei.xing@intel.com>
@@ -20,10 +21,10 @@
  1 file changed, 3 deletions(-)
 
 diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
-index 1533d5abbd..65f877866d 100644
+index 6cd39babba..ea3b223e11 100644
 --- a/drivers/net/i40e/i40e_flow.c
 +++ b/drivers/net/i40e/i40e_flow.c
-@@ -5145,7 +5145,6 @@ i40e_flow_destroy(struct rte_eth_dev *dev,
+@@ -4791,7 +4791,6 @@ i40e_flow_destroy(struct rte_eth_dev *dev,
  
  		/* If the last flow is destroyed, disable fdir. */
  		if (!ret && TAILQ_EMPTY(&pf->fdir.fdir_list)) {
@@ -31,7 +32,7 @@
  			i40e_fdir_rx_proc_enable(dev, 0);
  		}
  		break;
-@@ -5343,8 +5342,6 @@ i40e_flow_flush_fdir_filter(struct i40e_pf *pf)
+@@ -4989,8 +4988,6 @@ i40e_flow_flush_fdir_filter(struct i40e_pf *pf)
  			pf->fdir.inset_flag[pctype] = 0;
  	}
  

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

* [dpdk-stable] patch 'net/mlx5: fix assert in doorbell lookup' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (137 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/i40e: fix flush of flow director filter' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'vhost: fix peer close check' " luca.boccassi
                     ` (73 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Asaf Penso; +Cc: Dekel Peled, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From fd7ba64cb44468d9c7d91aa60e710dbceb37c301 Mon Sep 17 00:00:00 2001
From: Asaf Penso <asafp@mellanox.com>
Date: Thu, 16 Apr 2020 17:15:09 +0000
Subject: [PATCH] net/mlx5: fix assert in doorbell lookup

[ upstream commit 9b080425e31297199dcbfa35d95d287d729c68a0 ]

The asserts makes sure that 'i' doesn't exceed the expected value.
This to prevent an out of bound access to dbr_bitmap.

The current location of the assert protects the assignment of
dbr_bitmap, but not the access to it.

Moved the assert to the correct place, to protect both cases.
Also, used an existing define for the assert.

Fixes: 21cae8580fd0 ("net/mlx5: allocate door-bells via DevX")

Signed-off-by: Asaf Penso <asafp@mellanox.com>
Reviewed-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
 drivers/net/mlx5/mlx5.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 6ac387bd24..9ecf31da7c 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -1946,8 +1946,8 @@ mlx5_get_dbr(struct rte_eth_dev *dev, struct mlx5_devx_dbr_page **dbr_page)
 	     i++)
 		; /* Empty. */
 	/* Find the first clear bit. */
+	assert(i < MLX5_DBR_BITMAP_SIZE);
 	j = rte_bsf64(~page->dbr_bitmap[i]);
-	assert(i < (MLX5_DBR_PER_PAGE / 64));
 	page->dbr_bitmap[i] |= (1 << j);
 	page->dbr_count++;
 	*dbr_page = page;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:50.132975267 +0100
+++ 0140-net-mlx5-fix-assert-in-doorbell-lookup.patch	2020-05-19 14:04:44.456652723 +0100
@@ -1,8 +1,10 @@
-From 9b080425e31297199dcbfa35d95d287d729c68a0 Mon Sep 17 00:00:00 2001
+From fd7ba64cb44468d9c7d91aa60e710dbceb37c301 Mon Sep 17 00:00:00 2001
 From: Asaf Penso <asafp@mellanox.com>
 Date: Thu, 16 Apr 2020 17:15:09 +0000
 Subject: [PATCH] net/mlx5: fix assert in doorbell lookup
 
+[ upstream commit 9b080425e31297199dcbfa35d95d287d729c68a0 ]
+
 The asserts makes sure that 'i' doesn't exceed the expected value.
 This to prevent an out of bound access to dbr_bitmap.
 
@@ -13,7 +15,6 @@
 Also, used an existing define for the assert.
 
 Fixes: 21cae8580fd0 ("net/mlx5: allocate door-bells via DevX")
-Cc: stable@dpdk.org
 
 Signed-off-by: Asaf Penso <asafp@mellanox.com>
 Reviewed-by: Dekel Peled <dekelp@mellanox.com>
@@ -23,16 +24,16 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
-index cc13e447d6..75ada96cc5 100644
+index 6ac387bd24..9ecf31da7c 100644
 --- a/drivers/net/mlx5/mlx5.c
 +++ b/drivers/net/mlx5/mlx5.c
-@@ -2149,8 +2149,8 @@ mlx5_get_dbr(struct rte_eth_dev *dev, struct mlx5_devx_dbr_page **dbr_page)
+@@ -1946,8 +1946,8 @@ mlx5_get_dbr(struct rte_eth_dev *dev, struct mlx5_devx_dbr_page **dbr_page)
  	     i++)
  		; /* Empty. */
  	/* Find the first clear bit. */
-+	MLX5_ASSERT(i < MLX5_DBR_BITMAP_SIZE);
++	assert(i < MLX5_DBR_BITMAP_SIZE);
  	j = rte_bsf64(~page->dbr_bitmap[i]);
--	MLX5_ASSERT(i < (MLX5_DBR_PER_PAGE / 64));
+-	assert(i < (MLX5_DBR_PER_PAGE / 64));
  	page->dbr_bitmap[i] |= (1 << j);
  	page->dbr_count++;
  	*dbr_page = page;

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

* [dpdk-stable] patch 'vhost: fix peer close check' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (138 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/mlx5: fix assert in doorbell lookup' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'vhost: prevent zero-copy with incompatible client mode' " luca.boccassi
                     ` (72 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Roland Qi; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 5099fb8d5986ab25e7e30940f4b46797bc5bec9c Mon Sep 17 00:00:00 2001
From: Roland Qi <roland.qi@ucloud.cn>
Date: Tue, 21 Apr 2020 16:59:39 +0800
Subject: [PATCH] vhost: fix peer close check

[ upstream commit 41f32b052c78898d20d04913a7e205970b96309a ]

In process_slave_message_reply(), there is a
possibility that receiving a peer close
message instead of a real message response.

This patch targeting to handle the peer close
scenario and report the correct error message.

Fixes: a277c7159876 ("vhost: refactor code structure")

Signed-off-by: Roland Qi <roland.qi@ucloud.cn>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/vhost_user.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 8954f7930e..31080be2bd 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -2828,11 +2828,19 @@ static int process_slave_message_reply(struct virtio_net *dev,
 	if ((msg->flags & VHOST_USER_NEED_REPLY) == 0)
 		return 0;
 
-	if (read_vhost_message(dev->slave_req_fd, &msg_reply) < 0) {
+	ret = read_vhost_message(dev->slave_req_fd, &msg_reply);
+	if (ret <= 0) {
+		if (ret < 0)
+			RTE_LOG(ERR, VHOST_CONFIG,
+				"vhost read slave message reply failed\n");
+		else
+			RTE_LOG(INFO, VHOST_CONFIG,
+				"vhost peer closed\n");
 		ret = -1;
 		goto out;
 	}
 
+	ret = 0;
 	if (msg_reply.request.slave != msg->request.slave) {
 		RTE_LOG(ERR, VHOST_CONFIG,
 			"Received unexpected msg type (%u), expected %u\n",
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:50.176037364 +0100
+++ 0141-vhost-fix-peer-close-check.patch	2020-05-19 14:04:44.456652723 +0100
@@ -1,8 +1,10 @@
-From 41f32b052c78898d20d04913a7e205970b96309a Mon Sep 17 00:00:00 2001
+From 5099fb8d5986ab25e7e30940f4b46797bc5bec9c Mon Sep 17 00:00:00 2001
 From: Roland Qi <roland.qi@ucloud.cn>
 Date: Tue, 21 Apr 2020 16:59:39 +0800
 Subject: [PATCH] vhost: fix peer close check
 
+[ upstream commit 41f32b052c78898d20d04913a7e205970b96309a ]
+
 In process_slave_message_reply(), there is a
 possibility that receiving a peer close
 message instead of a real message response.
@@ -11,7 +13,6 @@
 scenario and report the correct error message.
 
 Fixes: a277c7159876 ("vhost: refactor code structure")
-Cc: stable@dpdk.org
 
 Signed-off-by: Roland Qi <roland.qi@ucloud.cn>
 Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
@@ -20,10 +21,10 @@
  1 file changed, 9 insertions(+), 1 deletion(-)
 
 diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
-index bd1be01040..971ccdb01c 100644
+index 8954f7930e..31080be2bd 100644
 --- a/lib/librte_vhost/vhost_user.c
 +++ b/lib/librte_vhost/vhost_user.c
-@@ -2812,11 +2812,19 @@ static int process_slave_message_reply(struct virtio_net *dev,
+@@ -2828,11 +2828,19 @@ static int process_slave_message_reply(struct virtio_net *dev,
  	if ((msg->flags & VHOST_USER_NEED_REPLY) == 0)
  		return 0;
  
@@ -31,10 +32,10 @@
 +	ret = read_vhost_message(dev->slave_req_fd, &msg_reply);
 +	if (ret <= 0) {
 +		if (ret < 0)
-+			VHOST_LOG_CONFIG(ERR,
++			RTE_LOG(ERR, VHOST_CONFIG,
 +				"vhost read slave message reply failed\n");
 +		else
-+			VHOST_LOG_CONFIG(INFO,
++			RTE_LOG(INFO, VHOST_CONFIG,
 +				"vhost peer closed\n");
  		ret = -1;
  		goto out;
@@ -42,7 +43,7 @@
  
 +	ret = 0;
  	if (msg_reply.request.slave != msg->request.slave) {
- 		VHOST_LOG_CONFIG(ERR,
+ 		RTE_LOG(ERR, VHOST_CONFIG,
  			"Received unexpected msg type (%u), expected %u\n",
 -- 
 2.20.1

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

* [dpdk-stable] patch 'vhost: prevent zero-copy with incompatible client mode' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (139 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'vhost: fix peer close check' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/mlx5: fix assert in dynamic metadata handling' " luca.boccassi
                     ` (71 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Xuan Ding; +Cc: Yinan Wang, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From a6ae060e3995d8157b363155f88e39e6a67bbd63 Mon Sep 17 00:00:00 2001
From: Xuan Ding <xuan.ding@intel.com>
Date: Wed, 29 Apr 2020 02:59:46 +0000
Subject: [PATCH] vhost: prevent zero-copy with incompatible client mode

[ upstream commit 715070ea10e6da1169deef2a3ea77ae934b4c333 ]

In server mode, virtio-user inits under the assumption that vhost-user
supports a list of features. However, this could be problematic when
in_order feature is negotiated but not supported by vhost-user when
enables dequeue_zero_copy later.

Add handling when vhost-user enables dequeue_zero_copy as client.

Fixes: 64ab701c3d1e ("vhost: add vhost-user client mode")

Signed-off-by: Xuan Ding <xuan.ding@intel.com>
Tested-by: Yinan Wang <yinan.wang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/socket.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
index c9322707e7..8a87c38c4e 100644
--- a/lib/librte_vhost/socket.c
+++ b/lib/librte_vhost/socket.c
@@ -926,6 +926,12 @@ rte_vhost_driver_register(const char *path, uint64_t flags)
 			ret = -1;
 			goto out_mutex;
 		}
+		if (!vsocket->is_server) {
+			RTE_LOG(ERR, VHOST_CONFIG,
+			"error: zero copy is incompatible with vhost client mode\n");
+			ret = -1;
+			goto out_mutex;
+		}
 		vsocket->supported_features &= ~(1ULL << VIRTIO_F_IN_ORDER);
 		vsocket->features &= ~(1ULL << VIRTIO_F_IN_ORDER);
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:50.221520306 +0100
+++ 0142-vhost-prevent-zero-copy-with-incompatible-client-mod.patch	2020-05-19 14:04:44.456652723 +0100
@@ -1,8 +1,10 @@
-From 715070ea10e6da1169deef2a3ea77ae934b4c333 Mon Sep 17 00:00:00 2001
+From a6ae060e3995d8157b363155f88e39e6a67bbd63 Mon Sep 17 00:00:00 2001
 From: Xuan Ding <xuan.ding@intel.com>
 Date: Wed, 29 Apr 2020 02:59:46 +0000
 Subject: [PATCH] vhost: prevent zero-copy with incompatible client mode
 
+[ upstream commit 715070ea10e6da1169deef2a3ea77ae934b4c333 ]
+
 In server mode, virtio-user inits under the assumption that vhost-user
 supports a list of features. However, this could be problematic when
 in_order feature is negotiated but not supported by vhost-user when
@@ -11,7 +13,6 @@
 Add handling when vhost-user enables dequeue_zero_copy as client.
 
 Fixes: 64ab701c3d1e ("vhost: add vhost-user client mode")
-Cc: stable@dpdk.org
 
 Signed-off-by: Xuan Ding <xuan.ding@intel.com>
 Tested-by: Yinan Wang <yinan.wang@intel.com>
@@ -21,7 +22,7 @@
  1 file changed, 6 insertions(+)
 
 diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
-index 7c80121790..bb8d0d7801 100644
+index c9322707e7..8a87c38c4e 100644
 --- a/lib/librte_vhost/socket.c
 +++ b/lib/librte_vhost/socket.c
 @@ -926,6 +926,12 @@ rte_vhost_driver_register(const char *path, uint64_t flags)
@@ -29,7 +30,7 @@
  			goto out_mutex;
  		}
 +		if (!vsocket->is_server) {
-+			VHOST_LOG_CONFIG(ERR,
++			RTE_LOG(ERR, VHOST_CONFIG,
 +			"error: zero copy is incompatible with vhost client mode\n");
 +			ret = -1;
 +			goto out_mutex;

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

* [dpdk-stable] patch 'net/mlx5: fix assert in dynamic metadata handling' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (140 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'vhost: prevent zero-copy with incompatible client mode' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/mlx5: fix actions validation on root table' " luca.boccassi
                     ` (70 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Alexander Kozyrev; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 58ca518c24dc1fd75f6c047efe4fb8bfe23eb6f1 Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev@mellanox.com>
Date: Mon, 27 Apr 2020 18:20:11 +0000
Subject: [PATCH] net/mlx5: fix assert in dynamic metadata handling

[ upstream commit 0c55591588e017f1ef2c1ac845a1fa23ea1e19fb ]

The assert in dynamic flow metadata handling is wrong after the
fix for the performance degradation. The assert meant to check
the metadata mask but was updated with the metadata offset instead.
Fix this assert and restore proper metadata mask checking.

Fixes: 6c55b622a956 ("net/mlx5: set dynamic flow metadata in Rx queues")

Signed-off-by: Alexander Kozyrev <akozyrev@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
 drivers/net/mlx5/mlx5_rxtx_vec_altivec.h | 7 ++++---
 drivers/net/mlx5/mlx5_rxtx_vec_neon.h    | 5 +++--
 drivers/net/mlx5/mlx5_rxtx_vec_sse.h     | 3 ++-
 3 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h b/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h
index 5bc47c714b..23ffb8d036 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h
@@ -263,14 +263,15 @@ rxq_cq_decompress_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
 			elts[pos + 2]->hash.fdir.hi = flow_tag;
 			elts[pos + 3]->hash.fdir.hi = flow_tag;
 		}
-		if (!!rxq->flow_meta_mask) {
+		if (rxq->dynf_meta) {
 			int32_t offs = rxq->flow_meta_offset;
 			const uint32_t meta =
 				*RTE_MBUF_DYNFIELD(t_pkt, offs, uint32_t *);
 
 			/* Check if title packet has valid metadata. */
 			if (meta) {
-				assert(t_pkt->ol_flags & offs);
+				assert(t_pkt->ol_flags &
+					    rxq->flow_meta_mask);
 				*RTE_MBUF_DYNFIELD(elts[pos], offs,
 							uint32_t *) = meta;
 				*RTE_MBUF_DYNFIELD(elts[pos + 1], offs,
@@ -1028,7 +1029,7 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
 			pkts[pos + 3]->timestamp =
 				rte_be_to_cpu_64(cq[pos + p3].timestamp);
 		}
-		if (!!rxq->flow_meta_mask) {
+		if (rxq->dynf_meta) {
 			uint64_t flag = rxq->flow_meta_mask;
 			int32_t offs = rxq->flow_meta_offset;
 			uint32_t metadata;
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
index 2880f97af1..f92ece4299 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
@@ -205,14 +205,15 @@ rxq_cq_decompress_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
 			elts[pos + 2]->hash.fdir.hi = flow_tag;
 			elts[pos + 3]->hash.fdir.hi = flow_tag;
 		}
-		if (!!rxq->flow_meta_mask) {
+		if (rxq->dynf_meta) {
 			int32_t offs = rxq->flow_meta_offset;
 			const uint32_t meta =
 				*RTE_MBUF_DYNFIELD(t_pkt, offs, uint32_t *);
 
 			/* Check if title packet has valid metadata. */
 			if (meta) {
-				assert(t_pkt->ol_flags & offs);
+				assert(t_pkt->ol_flags &
+					    rxq->flow_meta_mask);
 				*RTE_MBUF_DYNFIELD(elts[pos], offs,
 							uint32_t *) = meta;
 				*RTE_MBUF_DYNFIELD(elts[pos + 1], offs,
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
index ac8568ed4b..bb59163a26 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
@@ -197,7 +197,8 @@ rxq_cq_decompress_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
 
 			/* Check if title packet has valid metadata. */
 			if (meta) {
-				assert(t_pkt->ol_flags & offs);
+				assert(t_pkt->ol_flags &
+					    rxq->flow_meta_mask);
 				*RTE_MBUF_DYNFIELD(elts[pos], offs,
 							uint32_t *) = meta;
 				*RTE_MBUF_DYNFIELD(elts[pos + 1], offs,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:50.262014190 +0100
+++ 0143-net-mlx5-fix-assert-in-dynamic-metadata-handling.patch	2020-05-19 14:04:44.460652796 +0100
@@ -1,15 +1,16 @@
-From 0c55591588e017f1ef2c1ac845a1fa23ea1e19fb Mon Sep 17 00:00:00 2001
+From 58ca518c24dc1fd75f6c047efe4fb8bfe23eb6f1 Mon Sep 17 00:00:00 2001
 From: Alexander Kozyrev <akozyrev@mellanox.com>
 Date: Mon, 27 Apr 2020 18:20:11 +0000
 Subject: [PATCH] net/mlx5: fix assert in dynamic metadata handling
 
+[ upstream commit 0c55591588e017f1ef2c1ac845a1fa23ea1e19fb ]
+
 The assert in dynamic flow metadata handling is wrong after the
 fix for the performance degradation. The assert meant to check
 the metadata mask but was updated with the metadata offset instead.
 Fix this assert and restore proper metadata mask checking.
 
 Fixes: 6c55b622a956 ("net/mlx5: set dynamic flow metadata in Rx queues")
-Cc: stable@dpdk.org
 
 Signed-off-by: Alexander Kozyrev <akozyrev@mellanox.com>
 Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
@@ -20,10 +21,10 @@
  3 files changed, 9 insertions(+), 6 deletions(-)
 
 diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h b/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h
-index 69b934707c..26715ef450 100644
+index 5bc47c714b..23ffb8d036 100644
 --- a/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h
 +++ b/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h
-@@ -264,14 +264,15 @@ rxq_cq_decompress_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
+@@ -263,14 +263,15 @@ rxq_cq_decompress_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
  			elts[pos + 2]->hash.fdir.hi = flow_tag;
  			elts[pos + 3]->hash.fdir.hi = flow_tag;
  		}
@@ -35,8 +36,8 @@
  
  			/* Check if title packet has valid metadata. */
  			if (meta) {
--				MLX5_ASSERT(t_pkt->ol_flags & offs);
-+				MLX5_ASSERT(t_pkt->ol_flags &
+-				assert(t_pkt->ol_flags & offs);
++				assert(t_pkt->ol_flags &
 +					    rxq->flow_meta_mask);
  				*RTE_MBUF_DYNFIELD(elts[pos], offs,
  							uint32_t *) = meta;
@@ -51,7 +52,7 @@
  			int32_t offs = rxq->flow_meta_offset;
  			uint32_t metadata;
 diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
-index d39e72680b..ecafbf8004 100644
+index 2880f97af1..f92ece4299 100644
 --- a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
 +++ b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
 @@ -205,14 +205,15 @@ rxq_cq_decompress_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
@@ -66,22 +67,22 @@
  
  			/* Check if title packet has valid metadata. */
  			if (meta) {
--				MLX5_ASSERT(t_pkt->ol_flags & offs);
-+				MLX5_ASSERT(t_pkt->ol_flags &
+-				assert(t_pkt->ol_flags & offs);
++				assert(t_pkt->ol_flags &
 +					    rxq->flow_meta_mask);
  				*RTE_MBUF_DYNFIELD(elts[pos], offs,
  							uint32_t *) = meta;
  				*RTE_MBUF_DYNFIELD(elts[pos + 1], offs,
 diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
-index f110f73b4a..6847ae7827 100644
+index ac8568ed4b..bb59163a26 100644
 --- a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
 +++ b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
-@@ -199,7 +199,8 @@ rxq_cq_decompress_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
+@@ -197,7 +197,8 @@ rxq_cq_decompress_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
  
  			/* Check if title packet has valid metadata. */
  			if (meta) {
--				MLX5_ASSERT(t_pkt->ol_flags & offs);
-+				MLX5_ASSERT(t_pkt->ol_flags &
+-				assert(t_pkt->ol_flags & offs);
++				assert(t_pkt->ol_flags &
 +					    rxq->flow_meta_mask);
  				*RTE_MBUF_DYNFIELD(elts[pos], offs,
  							uint32_t *) = meta;

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

* [dpdk-stable] patch 'net/mlx5: fix actions validation on root table' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (141 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/mlx5: fix assert in dynamic metadata handling' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/sfc/base: use simpler EF10 family conditional check' " luca.boccassi
                     ` (69 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Bing Zhao; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From ecd69bfb766fc75c0ef16824a1d9389603f94b98 Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@mellanox.com>
Date: Wed, 29 Apr 2020 20:54:20 +0800
Subject: [PATCH] net/mlx5: fix actions validation on root table

[ upstream commit 0ba70e439ee44c222cccf6bef6460db31611dfaa ]

The maximal supported header modifications number of a single modify
context on the root table cannot be queried from firmware directly.
It is a fixed value of 16 in the latest releases. In the validation
stage, PMD driver should ensure that no more than 16 header modify
actions exist in a single context.
In some old firmware releases, the supported value is 8. PMD driver
should try its best to create the flow. Firmware will return error
and refuse to create the flow if the actions number exceeds the
maximal value.

Fixes: 72a944dba163 ("net/mlx5: fix header modify action validation")

Signed-off-by: Bing Zhao <bingz@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow.h    | 12 +++++++-----
 drivers/net/mlx5/mlx5_flow_dv.c | 17 +++++++----------
 2 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index 4e38d3fa5a..f8046119ec 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -402,14 +402,16 @@ struct mlx5_flow_dv_tag_resource {
 
 /*
  * Number of modification commands.
- * If extensive metadata registers are supported, the maximal actions amount is
- * 16 and 8 otherwise on root table. The validation could also be done in the
- * lower driver layer.
- * On non-root table, there is no limitation, but 32 is enough right now.
+ * The maximal actions amount in FW is some constant, and it is 16 in the
+ * latest releases. In some old releases, it will be limited to 8.
+ * Since there is no interface to query the capacity, the maximal value should
+ * be used to allow PMD to create the flow. The validation will be done in the
+ * lower driver layer or FW. A failure will be returned if exceeds the maximal
+ * supported actions number on the root table.
+ * On non-root tables, there is no limitation, but 32 is enough right now.
  */
 #define MLX5_MAX_MODIFY_NUM			32
 #define MLX5_ROOT_TBL_MODIFY_NUM		16
-#define MLX5_ROOT_TBL_MODIFY_NUM_NO_MREG	8
 
 /* Modify resource structure */
 struct mlx5_flow_dv_modify_hdr_resource {
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 8d326f0229..8ed29adaaa 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -3485,21 +3485,18 @@ flow_dv_validate_action_port_id(struct rte_eth_dev *dev,
  * @return
  *   Max number of modify header actions device can support.
  */
-static unsigned int
-flow_dv_modify_hdr_action_max(struct rte_eth_dev *dev, uint64_t flags)
+static inline unsigned int
+flow_dv_modify_hdr_action_max(struct rte_eth_dev *dev __rte_unused,
+			      uint64_t flags)
 {
 	/*
-	 * There's no way to directly query the max cap. Although it has to be
-	 * acquried by iterative trial, it is a safe assumption that more
-	 * actions are supported by FW if extensive metadata register is
-	 * supported. (Only in the root table)
+	 * There's no way to directly query the max capacity from FW.
+	 * The maximal value on root table should be assumed to be supported.
 	 */
 	if (!(flags & MLX5DV_DR_ACTION_FLAGS_ROOT_LEVEL))
 		return MLX5_MAX_MODIFY_NUM;
 	else
-		return mlx5_flow_ext_mreg_supported(dev) ?
-					MLX5_ROOT_TBL_MODIFY_NUM :
-					MLX5_ROOT_TBL_MODIFY_NUM_NO_MREG;
+		return MLX5_ROOT_TBL_MODIFY_NUM;
 }
 
 /**
@@ -5083,7 +5080,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 	    dev_conf->dv_xmeta_en != MLX5_XMETA_MODE_LEGACY &&
 	    mlx5_flow_ext_mreg_supported(dev))
 		rw_act_num += MLX5_ACT_NUM_SET_TAG;
-	if ((uint32_t)rw_act_num >=
+	if ((uint32_t)rw_act_num >
 			flow_dv_modify_hdr_action_max(dev, is_root)) {
 		return rte_flow_error_set(error, ENOTSUP,
 					  RTE_FLOW_ERROR_TYPE_ACTION,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:50.301757595 +0100
+++ 0144-net-mlx5-fix-actions-validation-on-root-table.patch	2020-05-19 14:04:44.464652868 +0100
@@ -1,8 +1,10 @@
-From 0ba70e439ee44c222cccf6bef6460db31611dfaa Mon Sep 17 00:00:00 2001
+From ecd69bfb766fc75c0ef16824a1d9389603f94b98 Mon Sep 17 00:00:00 2001
 From: Bing Zhao <bingz@mellanox.com>
 Date: Wed, 29 Apr 2020 20:54:20 +0800
 Subject: [PATCH] net/mlx5: fix actions validation on root table
 
+[ upstream commit 0ba70e439ee44c222cccf6bef6460db31611dfaa ]
+
 The maximal supported header modifications number of a single modify
 context on the root table cannot be queried from firmware directly.
 It is a fixed value of 16 in the latest releases. In the validation
@@ -14,7 +16,6 @@
 maximal value.
 
 Fixes: 72a944dba163 ("net/mlx5: fix header modify action validation")
-Cc: stable@dpdk.org
 
 Signed-off-by: Bing Zhao <bingz@mellanox.com>
 Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
@@ -24,10 +25,10 @@
  2 files changed, 14 insertions(+), 15 deletions(-)
 
 diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
-index 2a1f59698c..75b82885c1 100644
+index 4e38d3fa5a..f8046119ec 100644
 --- a/drivers/net/mlx5/mlx5_flow.h
 +++ b/drivers/net/mlx5/mlx5_flow.h
-@@ -415,14 +415,16 @@ struct mlx5_flow_dv_tag_resource {
+@@ -402,14 +402,16 @@ struct mlx5_flow_dv_tag_resource {
  
  /*
   * Number of modification commands.
@@ -50,10 +51,10 @@
  /* Modify resource structure */
  struct mlx5_flow_dv_modify_hdr_resource {
 diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index 2fdd40319c..18d9d302e3 100644
+index 8d326f0229..8ed29adaaa 100644
 --- a/drivers/net/mlx5/mlx5_flow_dv.c
 +++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -3640,21 +3640,18 @@ flow_dv_validate_action_port_id(struct rte_eth_dev *dev,
+@@ -3485,21 +3485,18 @@ flow_dv_validate_action_port_id(struct rte_eth_dev *dev,
   * @return
   *   Max number of modify header actions device can support.
   */
@@ -81,7 +82,7 @@
  }
  
  /**
-@@ -5347,7 +5344,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -5083,7 +5080,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
  	    dev_conf->dv_xmeta_en != MLX5_XMETA_MODE_LEGACY &&
  	    mlx5_flow_ext_mreg_supported(dev))
  		rw_act_num += MLX5_ACT_NUM_SET_TAG;

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

* [dpdk-stable] patch 'net/sfc/base: use simpler EF10 family conditional check' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (142 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/mlx5: fix actions validation on root table' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/sfc/base: use simpler EF10 family run-time checks' " luca.boccassi
                     ` (68 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 68409f9a6cb68aa0157b828c971a251a2738112c Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <arybchenko@solarflare.com>
Date: Tue, 28 Apr 2020 14:37:24 +0100
Subject: [PATCH] net/sfc/base: use simpler EF10 family conditional check

[ upstream commit f201b886b74f60886477188a9b7510102a712780 ]

Fixes: 4f12e20c85dc ("net/sfc/base: introduce EVB module for SR-IOV")
Fixes: 18c8e84d7726 ("net/sfc/base: support proxy auth operations for SR-IOV")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/base/ef10_evb.c  | 4 ++--
 drivers/net/sfc/base/efx_evb.c   | 4 ++--
 drivers/net/sfc/base/efx_proxy.c | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/sfc/base/ef10_evb.c b/drivers/net/sfc/base/ef10_evb.c
index 1788a2c96a..cde2196f18 100644
--- a/drivers/net/sfc/base/ef10_evb.c
+++ b/drivers/net/sfc/base/ef10_evb.c
@@ -9,7 +9,7 @@
 
 #if EFSYS_OPT_EVB
 
-#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2
+#if EFX_OPTS_EF10()
 
 	__checkReturn	efx_rc_t
 ef10_evb_init(
@@ -549,5 +549,5 @@ ef10_evb_vport_stats(
 			EFX_STATS_UPLOAD, 0));
 }
 
-#endif /* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2 */
+#endif /* EFX_OPTS_EF10() */
 #endif /* EFSYS_OPT_EVB */
diff --git a/drivers/net/sfc/base/efx_evb.c b/drivers/net/sfc/base/efx_evb.c
index dd64bc7854..5fa0d99809 100644
--- a/drivers/net/sfc/base/efx_evb.c
+++ b/drivers/net/sfc/base/efx_evb.c
@@ -28,7 +28,7 @@ static const efx_evb_ops_t	__efx_evb_dummy_ops = {
 };
 #endif /* EFSYS_OPT_SIENA */
 
-#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2
+#if EFX_OPTS_EF10()
 static const efx_evb_ops_t	__efx_evb_ef10_ops = {
 	ef10_evb_init,			/* eeo_init */
 	ef10_evb_fini,			/* eeo_fini */
@@ -44,7 +44,7 @@ static const efx_evb_ops_t	__efx_evb_ef10_ops = {
 	ef10_evb_vport_reconfigure,	/* eeo_vport_reconfigure */
 	ef10_evb_vport_stats,		/* eeo_vport_stats */
 };
-#endif /* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2 */
+#endif /* EFX_OPTS_EF10() */
 
 	__checkReturn	efx_rc_t
 efx_evb_init(
diff --git a/drivers/net/sfc/base/efx_proxy.c b/drivers/net/sfc/base/efx_proxy.c
index 791105a5a0..ecf703b03d 100644
--- a/drivers/net/sfc/base/efx_proxy.c
+++ b/drivers/net/sfc/base/efx_proxy.c
@@ -23,7 +23,7 @@ static const efx_proxy_ops_t	__efx_proxy_dummy_ops = {
 };
 #endif /* EFSYS_OPT_SIENA */
 
-#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2
+#if EFX_OPTS_EF10()
 static const efx_proxy_ops_t			__efx_proxy_ef10_ops = {
 	ef10_proxy_auth_init,			/* epo_init */
 	ef10_proxy_auth_fini,			/* epo_fini */
@@ -35,7 +35,7 @@ static const efx_proxy_ops_t			__efx_proxy_ef10_ops = {
 	ef10_proxy_auth_exec_cmd,		/* epo_exec_cmd */
 	ef10_proxy_auth_get_privilege_mask,	/* epo_get_privilege_mask */
 };
-#endif /* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2 */
+#endif /* EFX_OPTS_EF10() */
 
 	__checkReturn	efx_rc_t
 efx_proxy_auth_init(
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:50.355580804 +0100
+++ 0145-net-sfc-base-use-simpler-EF10-family-conditional-che.patch	2020-05-19 14:04:44.468652941 +0100
@@ -1,11 +1,12 @@
-From f201b886b74f60886477188a9b7510102a712780 Mon Sep 17 00:00:00 2001
+From 68409f9a6cb68aa0157b828c971a251a2738112c Mon Sep 17 00:00:00 2001
 From: Andrew Rybchenko <arybchenko@solarflare.com>
 Date: Tue, 28 Apr 2020 14:37:24 +0100
 Subject: [PATCH] net/sfc/base: use simpler EF10 family conditional check
 
+[ upstream commit f201b886b74f60886477188a9b7510102a712780 ]
+
 Fixes: 4f12e20c85dc ("net/sfc/base: introduce EVB module for SR-IOV")
 Fixes: 18c8e84d7726 ("net/sfc/base: support proxy auth operations for SR-IOV")
-Cc: stable@dpdk.org
 
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
 ---
@@ -15,7 +16,7 @@
  3 files changed, 6 insertions(+), 6 deletions(-)
 
 diff --git a/drivers/net/sfc/base/ef10_evb.c b/drivers/net/sfc/base/ef10_evb.c
-index a1528508ea..f290339f2f 100644
+index 1788a2c96a..cde2196f18 100644
 --- a/drivers/net/sfc/base/ef10_evb.c
 +++ b/drivers/net/sfc/base/ef10_evb.c
 @@ -9,7 +9,7 @@
@@ -35,7 +36,7 @@
 +#endif /* EFX_OPTS_EF10() */
  #endif /* EFSYS_OPT_EVB */
 diff --git a/drivers/net/sfc/base/efx_evb.c b/drivers/net/sfc/base/efx_evb.c
-index 9725ba1f45..17318b7e11 100644
+index dd64bc7854..5fa0d99809 100644
 --- a/drivers/net/sfc/base/efx_evb.c
 +++ b/drivers/net/sfc/base/efx_evb.c
 @@ -28,7 +28,7 @@ static const efx_evb_ops_t	__efx_evb_dummy_ops = {
@@ -57,7 +58,7 @@
  	__checkReturn	efx_rc_t
  efx_evb_init(
 diff --git a/drivers/net/sfc/base/efx_proxy.c b/drivers/net/sfc/base/efx_proxy.c
-index 5b4e98c381..24baa5a3a4 100644
+index 791105a5a0..ecf703b03d 100644
 --- a/drivers/net/sfc/base/efx_proxy.c
 +++ b/drivers/net/sfc/base/efx_proxy.c
 @@ -23,7 +23,7 @@ static const efx_proxy_ops_t	__efx_proxy_dummy_ops = {

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

* [dpdk-stable] patch 'net/sfc/base: use simpler EF10 family run-time checks' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (143 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/sfc/base: use simpler EF10 family conditional check' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/sfc/base: fix build when EVB is enabled' " luca.boccassi
                     ` (67 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 5862e3fe624e0ca0e30bcc07492a94e511558e1e Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <arybchenko@solarflare.com>
Date: Tue, 28 Apr 2020 14:37:25 +0100
Subject: [PATCH] net/sfc/base: use simpler EF10 family run-time checks

[ upstream commit dd3d209cb12090b7cda31323fec61951087febac ]

Fixes: 4625c4f5277d ("net/sfc/base: factor out upstream port vAdaptor allocation")
Fixes: 4f12e20c85dc ("net/sfc/base: introduce EVB module for SR-IOV")
Fixes: 18c8e84d7726 ("net/sfc/base: support proxy auth operations for SR-IOV")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/base/ef10_evb.c   | 8 ++------
 drivers/net/sfc/base/ef10_nic.c   | 4 +---
 drivers/net/sfc/base/ef10_proxy.c | 8 ++------
 3 files changed, 5 insertions(+), 15 deletions(-)

diff --git a/drivers/net/sfc/base/ef10_evb.c b/drivers/net/sfc/base/ef10_evb.c
index cde2196f18..c26cada5da 100644
--- a/drivers/net/sfc/base/ef10_evb.c
+++ b/drivers/net/sfc/base/ef10_evb.c
@@ -15,9 +15,7 @@
 ef10_evb_init(
 	__in		efx_nic_t *enp)
 {
-	EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON ||
-		enp->en_family == EFX_FAMILY_MEDFORD ||
-		enp->en_family == EFX_FAMILY_MEDFORD2);
+	EFSYS_ASSERT(EFX_FAMILY_IS_EF10(enp));
 
 	return (0);
 }
@@ -26,9 +24,7 @@ ef10_evb_init(
 ef10_evb_fini(
 	__in		efx_nic_t *enp)
 {
-	EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON ||
-		enp->en_family == EFX_FAMILY_MEDFORD ||
-		enp->en_family == EFX_FAMILY_MEDFORD2);
+	EFSYS_ASSERT(EFX_FAMILY_IS_EF10(enp));
 }
 
 	__checkReturn	efx_rc_t
diff --git a/drivers/net/sfc/base/ef10_nic.c b/drivers/net/sfc/base/ef10_nic.c
index b25ce1908e..3eb4674c5e 100644
--- a/drivers/net/sfc/base/ef10_nic.c
+++ b/drivers/net/sfc/base/ef10_nic.c
@@ -2288,9 +2288,7 @@ ef10_nic_init(
 	efx_rc_t rc;
 	boolean_t alloc_vadaptor = B_TRUE;
 
-	EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON ||
-	    enp->en_family == EFX_FAMILY_MEDFORD ||
-	    enp->en_family == EFX_FAMILY_MEDFORD2);
+	EFSYS_ASSERT(EFX_FAMILY_IS_EF10(enp));
 
 	/* Enable reporting of some events (e.g. link change) */
 	if ((rc = efx_mcdi_log_ctrl(enp)) != 0)
diff --git a/drivers/net/sfc/base/ef10_proxy.c b/drivers/net/sfc/base/ef10_proxy.c
index 059b2f5f4d..619d98e472 100644
--- a/drivers/net/sfc/base/ef10_proxy.c
+++ b/drivers/net/sfc/base/ef10_proxy.c
@@ -13,9 +13,7 @@
 ef10_proxy_auth_init(
 	__in		efx_nic_t *enp)
 {
-	EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON ||
-		enp->en_family == EFX_FAMILY_MEDFORD ||
-		enp->en_family == EFX_FAMILY_MEDFORD2);
+	EFSYS_ASSERT(EFX_FAMILY_IS_EF10(enp));
 
 	return (0);
 }
@@ -24,9 +22,7 @@ ef10_proxy_auth_init(
 ef10_proxy_auth_fini(
 	__in		efx_nic_t *enp)
 {
-	EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON ||
-		enp->en_family == EFX_FAMILY_MEDFORD ||
-		enp->en_family == EFX_FAMILY_MEDFORD2);
+	EFSYS_ASSERT(EFX_FAMILY_IS_EF10(enp));
 }
 
 static	__checkReturn	efx_rc_t
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:50.398791647 +0100
+++ 0146-net-sfc-base-use-simpler-EF10-family-run-time-checks.patch	2020-05-19 14:04:44.468652941 +0100
@@ -1,12 +1,13 @@
-From dd3d209cb12090b7cda31323fec61951087febac Mon Sep 17 00:00:00 2001
+From 5862e3fe624e0ca0e30bcc07492a94e511558e1e Mon Sep 17 00:00:00 2001
 From: Andrew Rybchenko <arybchenko@solarflare.com>
 Date: Tue, 28 Apr 2020 14:37:25 +0100
 Subject: [PATCH] net/sfc/base: use simpler EF10 family run-time checks
 
+[ upstream commit dd3d209cb12090b7cda31323fec61951087febac ]
+
 Fixes: 4625c4f5277d ("net/sfc/base: factor out upstream port vAdaptor allocation")
 Fixes: 4f12e20c85dc ("net/sfc/base: introduce EVB module for SR-IOV")
 Fixes: 18c8e84d7726 ("net/sfc/base: support proxy auth operations for SR-IOV")
-Cc: stable@dpdk.org
 
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
 ---
@@ -16,7 +17,7 @@
  3 files changed, 5 insertions(+), 15 deletions(-)
 
 diff --git a/drivers/net/sfc/base/ef10_evb.c b/drivers/net/sfc/base/ef10_evb.c
-index f290339f2f..d541db4980 100644
+index cde2196f18..c26cada5da 100644
 --- a/drivers/net/sfc/base/ef10_evb.c
 +++ b/drivers/net/sfc/base/ef10_evb.c
 @@ -15,9 +15,7 @@
@@ -42,7 +43,7 @@
  
  	__checkReturn	efx_rc_t
 diff --git a/drivers/net/sfc/base/ef10_nic.c b/drivers/net/sfc/base/ef10_nic.c
-index d1802da0bd..34fa45e8c1 100644
+index b25ce1908e..3eb4674c5e 100644
 --- a/drivers/net/sfc/base/ef10_nic.c
 +++ b/drivers/net/sfc/base/ef10_nic.c
 @@ -2288,9 +2288,7 @@ ef10_nic_init(
@@ -57,7 +58,7 @@
  	/* Enable reporting of some events (e.g. link change) */
  	if ((rc = efx_mcdi_log_ctrl(enp)) != 0)
 diff --git a/drivers/net/sfc/base/ef10_proxy.c b/drivers/net/sfc/base/ef10_proxy.c
-index 9be9e221d5..19c11c6ebc 100644
+index 059b2f5f4d..619d98e472 100644
 --- a/drivers/net/sfc/base/ef10_proxy.c
 +++ b/drivers/net/sfc/base/ef10_proxy.c
 @@ -13,9 +13,7 @@

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

* [dpdk-stable] patch 'net/sfc/base: fix build when EVB is enabled' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (144 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/sfc/base: use simpler EF10 family run-time checks' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/softnic: fix memory leak for thread' " luca.boccassi
                     ` (66 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From e399ff6427a992e46484a73f0ae6576b37314939 Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <arybchenko@solarflare.com>
Date: Tue, 28 Apr 2020 14:37:26 +0100
Subject: [PATCH] net/sfc/base: fix build when EVB is enabled

[ upstream commit afff2aa3e34ea4c739327d71ab14a7b754a14483 ]

Make local MCDI helper functions static.

Fixes: f0bda0cd680d ("net/sfc/base: add MCDI wrappers for vPort and vSwitch in EVB")
Fixes: ea94d14dbea0 ("net/sfc/base: provide APIs to configure and reset vPort")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/base/ef10_evb.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/net/sfc/base/ef10_evb.c b/drivers/net/sfc/base/ef10_evb.c
index c26cada5da..9b33e89fc1 100644
--- a/drivers/net/sfc/base/ef10_evb.c
+++ b/drivers/net/sfc/base/ef10_evb.c
@@ -27,7 +27,7 @@ ef10_evb_fini(
 	EFSYS_ASSERT(EFX_FAMILY_IS_EF10(enp));
 }
 
-	__checkReturn	efx_rc_t
+static	__checkReturn	efx_rc_t
 efx_mcdi_vswitch_alloc(
 	__in		efx_nic_t *enp,
 	__in		efx_vport_id_t vport_id,
@@ -94,7 +94,7 @@ fail1:
 	return (rc);
 }
 
-	__checkReturn	efx_rc_t
+static	__checkReturn	efx_rc_t
 efx_mcdi_vswitch_free(
 	__in		efx_nic_t *enp)
 {
@@ -125,7 +125,7 @@ fail1:
 	return (rc);
 }
 
-	__checkReturn	efx_rc_t
+static	__checkReturn	efx_rc_t
 efx_mcdi_vport_alloc(
 	__in		efx_nic_t *enp,
 	__in		efx_vport_type_t vport_type,
@@ -188,7 +188,7 @@ fail1:
 	return (rc);
 }
 
-	__checkReturn	efx_rc_t
+static	__checkReturn	efx_rc_t
 efx_mcdi_vport_free(
 	__in		efx_nic_t *enp,
 	__in		efx_vport_id_t vport_id)
@@ -219,7 +219,7 @@ fail1:
 	return (rc);
 }
 
-	__checkReturn			efx_rc_t
+static	__checkReturn			efx_rc_t
 efx_mcdi_vport_mac_addr_add(
 	__in				efx_nic_t *enp,
 	__in				efx_vport_id_t vport_id,
@@ -254,7 +254,7 @@ fail1:
 	return (rc);
 }
 
-	__checkReturn			efx_rc_t
+static	__checkReturn			efx_rc_t
 efx_mcdi_vport_mac_addr_del(
 	__in				efx_nic_t *enp,
 	__in				efx_vport_id_t vport_id,
@@ -289,7 +289,7 @@ fail1:
 	return (rc);
 }
 
-	__checkReturn	efx_rc_t
+static	__checkReturn	efx_rc_t
 efx_mcdi_port_assign(
 	__in		efx_nic_t *enp,
 	__in		efx_vport_id_t vport_id,
@@ -326,7 +326,7 @@ fail1:
 	return (rc);
 }
 
-	__checkReturn				efx_rc_t
+static	__checkReturn				efx_rc_t
 efx_mcdi_vport_reconfigure(
 	__in					efx_nic_t *enp,
 	__in					efx_vport_id_t vport_id,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:50.442338789 +0100
+++ 0147-net-sfc-base-fix-build-when-EVB-is-enabled.patch	2020-05-19 14:04:44.472653013 +0100
@@ -1,13 +1,14 @@
-From afff2aa3e34ea4c739327d71ab14a7b754a14483 Mon Sep 17 00:00:00 2001
+From e399ff6427a992e46484a73f0ae6576b37314939 Mon Sep 17 00:00:00 2001
 From: Andrew Rybchenko <arybchenko@solarflare.com>
 Date: Tue, 28 Apr 2020 14:37:26 +0100
 Subject: [PATCH] net/sfc/base: fix build when EVB is enabled
 
+[ upstream commit afff2aa3e34ea4c739327d71ab14a7b754a14483 ]
+
 Make local MCDI helper functions static.
 
 Fixes: f0bda0cd680d ("net/sfc/base: add MCDI wrappers for vPort and vSwitch in EVB")
 Fixes: ea94d14dbea0 ("net/sfc/base: provide APIs to configure and reset vPort")
-Cc: stable@dpdk.org
 
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
 ---
@@ -15,7 +16,7 @@
  1 file changed, 8 insertions(+), 8 deletions(-)
 
 diff --git a/drivers/net/sfc/base/ef10_evb.c b/drivers/net/sfc/base/ef10_evb.c
-index d541db4980..aeeaa5189f 100644
+index c26cada5da..9b33e89fc1 100644
 --- a/drivers/net/sfc/base/ef10_evb.c
 +++ b/drivers/net/sfc/base/ef10_evb.c
 @@ -27,7 +27,7 @@ ef10_evb_fini(

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

* [dpdk-stable] patch 'net/softnic: fix memory leak for thread' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (145 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/sfc/base: fix build when EVB is enabled' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/softnic: fix resource leak for pipeline' " luca.boccassi
                     ` (65 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Jasvinder Singh; +Cc: Cristian Dumitrescu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 60dfeffc23ad872474da8ac65e1323e072705d8d Mon Sep 17 00:00:00 2001
From: Jasvinder Singh <jasvinder.singh@intel.com>
Date: Mon, 27 Apr 2020 18:13:20 +0100
Subject: [PATCH] net/softnic: fix memory leak for thread

[ upstream commit 22335d4348d4b4b615d5556947c0297e0fe5d79b ]

For sending request messages to data plane threads, the
caller invokes thread_msg_send_recv() function which never
returns null response. Thus, removed redundant check on
the returned response.

Coverity issue: 357717, 357772
Fixes: 70709c78fda6 ("net/softnic: add command to enable/disable pipeline")

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
 drivers/net/softnic/rte_eth_softnic_thread.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/softnic/rte_eth_softnic_thread.c b/drivers/net/softnic/rte_eth_softnic_thread.c
index d610b1617e..d61846e030 100644
--- a/drivers/net/softnic/rte_eth_softnic_thread.c
+++ b/drivers/net/softnic/rte_eth_softnic_thread.c
@@ -359,8 +359,6 @@ softnic_thread_pipeline_enable(struct pmd_internals *softnic,
 
 	/* Send request and wait for response */
 	rsp = thread_msg_send_recv(softnic, thread_id, req);
-	if (rsp == NULL)
-		return -1;
 
 	/* Read response */
 	status = rsp->status;
@@ -444,8 +442,6 @@ softnic_thread_pipeline_disable(struct pmd_internals *softnic,
 
 	/* Send request and wait for response */
 	rsp = thread_msg_send_recv(softnic, thread_id, req);
-	if (rsp == NULL)
-		return -1;
 
 	/* Read response */
 	status = rsp->status;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:50.482343836 +0100
+++ 0148-net-softnic-fix-memory-leak-for-thread.patch	2020-05-19 14:04:44.472653013 +0100
@@ -1,8 +1,10 @@
-From 22335d4348d4b4b615d5556947c0297e0fe5d79b Mon Sep 17 00:00:00 2001
+From 60dfeffc23ad872474da8ac65e1323e072705d8d Mon Sep 17 00:00:00 2001
 From: Jasvinder Singh <jasvinder.singh@intel.com>
 Date: Mon, 27 Apr 2020 18:13:20 +0100
 Subject: [PATCH] net/softnic: fix memory leak for thread
 
+[ upstream commit 22335d4348d4b4b615d5556947c0297e0fe5d79b ]
+
 For sending request messages to data plane threads, the
 caller invokes thread_msg_send_recv() function which never
 returns null response. Thus, removed redundant check on
@@ -10,7 +12,6 @@
 
 Coverity issue: 357717, 357772
 Fixes: 70709c78fda6 ("net/softnic: add command to enable/disable pipeline")
-Cc: stable@dpdk.org
 
 Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
 Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>

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

* [dpdk-stable] patch 'net/softnic: fix resource leak for pipeline' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (146 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/softnic: fix memory leak for thread' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/hns3: fix VLAN PVID when configuring device' " luca.boccassi
                     ` (64 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Jasvinder Singh; +Cc: Cristian Dumitrescu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 66861316719b43f18dedb0b750f6fd2e85a208da Mon Sep 17 00:00:00 2001
From: Jasvinder Singh <jasvinder.singh@intel.com>
Date: Mon, 27 Apr 2020 18:15:51 +0100
Subject: [PATCH] net/softnic: fix resource leak for pipeline

[ upstream commit c1ea7a5f99ce476631281184b109eb5248ce4a32 ]

For sending request messages to data plane threads, the
caller invokes pipeline_msg_send_recv() function which never
returns null response. Thus, removed redundant check on
the returned response.

Coverity issue: 357676, 357680, 357681, 357682, 357690, 357693, 357711
Coverity issue: 357722, 357725, 357734, 357739, 357743, 357747, 357762
Coverity issue: 357766, 357787

Fixes: 6d4d05402501 ("net/softnic: add command to read stats")
Fixes: 202905f3ee4d ("net/softnic: add command to create objects")
Fixes: ee19326a4b1e ("net/softnic: add command for pipeline table entries")
Fixes: 9bc0ce0ad17c ("net/softnic: add command for meter action")
Fixes: 2505030a8383 ("net/softnic: add command for TTL action")

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
 drivers/net/softnic/rte_eth_softnic_thread.c | 34 --------------------
 1 file changed, 34 deletions(-)

diff --git a/drivers/net/softnic/rte_eth_softnic_thread.c b/drivers/net/softnic/rte_eth_softnic_thread.c
index d61846e030..dcfb5eb82c 100644
--- a/drivers/net/softnic/rte_eth_softnic_thread.c
+++ b/drivers/net/softnic/rte_eth_softnic_thread.c
@@ -835,8 +835,6 @@ softnic_pipeline_port_in_stats_read(struct pmd_internals *softnic,
 
 	/* Send request and wait for response */
 	rsp = pipeline_msg_send_recv(p, req);
-	if (rsp == NULL)
-		return -1;
 
 	/* Read response */
 	status = rsp->status;
@@ -884,8 +882,6 @@ softnic_pipeline_port_in_enable(struct pmd_internals *softnic,
 
 	/* Send request and wait for response */
 	rsp = pipeline_msg_send_recv(p, req);
-	if (rsp == NULL)
-		return -1;
 
 	/* Read response */
 	status = rsp->status;
@@ -931,8 +927,6 @@ softnic_pipeline_port_in_disable(struct pmd_internals *softnic,
 
 	/* Send request and wait for response */
 	rsp = pipeline_msg_send_recv(p, req);
-	if (rsp == NULL)
-		return -1;
 
 	/* Read response */
 	status = rsp->status;
@@ -986,8 +980,6 @@ softnic_pipeline_port_out_stats_read(struct pmd_internals *softnic,
 
 	/* Send request and wait for response */
 	rsp = pipeline_msg_send_recv(p, req);
-	if (rsp == NULL)
-		return -1;
 
 	/* Read response */
 	status = rsp->status;
@@ -1043,8 +1035,6 @@ softnic_pipeline_table_stats_read(struct pmd_internals *softnic,
 
 	/* Send request and wait for response */
 	rsp = pipeline_msg_send_recv(p, req);
-	if (rsp == NULL)
-		return -1;
 
 	/* Read response */
 	status = rsp->status;
@@ -1323,8 +1313,6 @@ softnic_pipeline_table_rule_add(struct pmd_internals *softnic,
 
 	/* Send request and wait for response */
 	rsp = pipeline_msg_send_recv(p, req);
-	if (rsp == NULL)
-		return -1;
 
 	/* Read response */
 	status = rsp->status;
@@ -1407,8 +1395,6 @@ softnic_pipeline_table_rule_add_default(struct pmd_internals *softnic,
 
 	/* Send request and wait for response */
 	rsp = pipeline_msg_send_recv(p, req);
-	if (rsp == NULL)
-		return -1;
 
 	/* Read response */
 	status = rsp->status;
@@ -1565,8 +1551,6 @@ fail:
 
 	/* Send request and wait for response */
 	rsp = pipeline_msg_send_recv(p, req);
-	if (rsp == NULL)
-		return -1;
 
 	/* Read response */
 	status = rsp->status;
@@ -1630,8 +1614,6 @@ softnic_pipeline_table_rule_delete(struct pmd_internals *softnic,
 
 	/* Send request and wait for response */
 	rsp = pipeline_msg_send_recv(p, req);
-	if (rsp == NULL)
-		return -1;
 
 	/* Read response */
 	status = rsp->status;
@@ -1680,8 +1662,6 @@ softnic_pipeline_table_rule_delete_default(struct pmd_internals *softnic,
 
 	/* Send request and wait for response */
 	rsp = pipeline_msg_send_recv(p, req);
-	if (rsp == NULL)
-		return -1;
 
 	/* Read response */
 	status = rsp->status;
@@ -1740,8 +1720,6 @@ softnic_pipeline_table_rule_stats_read(struct pmd_internals *softnic,
 
 	/* Send request and wait for response */
 	rsp = pipeline_msg_send_recv(p, req);
-	if (rsp == NULL)
-		return -1;
 
 	/* Read response */
 	status = rsp->status;
@@ -1821,10 +1799,6 @@ softnic_pipeline_table_mtr_profile_add(struct pmd_internals *softnic,
 
 	/* Send request and wait for response */
 	rsp = pipeline_msg_send_recv(p, req);
-	if (rsp == NULL) {
-		free(mp);
-		return -1;
-	}
 
 	/* Read response */
 	status = rsp->status;
@@ -1880,8 +1854,6 @@ softnic_pipeline_table_mtr_profile_delete(struct pmd_internals *softnic,
 
 	/* Send request and wait for response */
 	rsp = pipeline_msg_send_recv(p, req);
-	if (rsp == NULL)
-		return -1;
 
 	/* Read response */
 	status = rsp->status;
@@ -1943,8 +1915,6 @@ softnic_pipeline_table_rule_mtr_read(struct pmd_internals *softnic,
 
 	/* Send request and wait for response */
 	rsp = pipeline_msg_send_recv(p, req);
-	if (rsp == NULL)
-		return -1;
 
 	/* Read response */
 	status = rsp->status;
@@ -2008,8 +1978,6 @@ softnic_pipeline_table_dscp_table_update(struct pmd_internals *softnic,
 
 	/* Send request and wait for response */
 	rsp = pipeline_msg_send_recv(p, req);
-	if (rsp == NULL)
-		return -1;
 
 	/* Read response */
 	status = rsp->status;
@@ -2073,8 +2041,6 @@ softnic_pipeline_table_rule_ttl_read(struct pmd_internals *softnic,
 
 	/* Send request and wait for response */
 	rsp = pipeline_msg_send_recv(p, req);
-	if (rsp == NULL)
-		return -1;
 
 	/* Read response */
 	status = rsp->status;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:50.522131161 +0100
+++ 0149-net-softnic-fix-resource-leak-for-pipeline.patch	2020-05-19 14:04:44.476653085 +0100
@@ -1,8 +1,10 @@
-From c1ea7a5f99ce476631281184b109eb5248ce4a32 Mon Sep 17 00:00:00 2001
+From 66861316719b43f18dedb0b750f6fd2e85a208da Mon Sep 17 00:00:00 2001
 From: Jasvinder Singh <jasvinder.singh@intel.com>
 Date: Mon, 27 Apr 2020 18:15:51 +0100
 Subject: [PATCH] net/softnic: fix resource leak for pipeline
 
+[ upstream commit c1ea7a5f99ce476631281184b109eb5248ce4a32 ]
+
 For sending request messages to data plane threads, the
 caller invokes pipeline_msg_send_recv() function which never
 returns null response. Thus, removed redundant check on
@@ -17,7 +19,6 @@
 Fixes: ee19326a4b1e ("net/softnic: add command for pipeline table entries")
 Fixes: 9bc0ce0ad17c ("net/softnic: add command for meter action")
 Fixes: 2505030a8383 ("net/softnic: add command for TTL action")
-Cc: stable@dpdk.org
 
 Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
 Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>

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

* [dpdk-stable] patch 'net/hns3: fix VLAN PVID when configuring device' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (147 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/softnic: fix resource leak for pipeline' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/hns3: fix return value when clearing statistics' " luca.boccassi
                     ` (63 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: Wei Hu, Chengchang Tang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 827eb6ca970dc842f2c71365246397bb67381e5a Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Wed, 29 Apr 2020 19:13:26 +0800
Subject: [PATCH] net/hns3: fix VLAN PVID when configuring device

[ upstream commit 99d673d5d3a8046a7f55d82a0a26244372f76abd ]

In current version, when upper level application calls the
rte_eth_dev_configure API function, if pvid config is not set of the
input parameter which struct type is rte_eth_conf, hns3 pmd driver also
sets the VLAN pvid related configuration to hardware, and this is not
reasonable. For example, As pvid is set to 100 by
rte_eth_dev_set_vlan_pvid, when pvid config is not set in rte_eth_conf,
rte_eth_dev_configure will tell driver to delete pvid 0, and that is
meaningless.

This patch fixes it to ensure that driver does not set VLAN pvid related
configuration to hardware when pvid config is not set in rte_eth_conf.

Fixes: 411d23b9eafb ("net/hns3: support VLAN")

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 378774396f..6eb36d4258 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -1051,6 +1051,13 @@ hns3_dev_configure_vlan(struct rte_eth_dev *dev)
 		return ret;
 	}
 
+	/*
+	 * If pvid config is not set in rte_eth_conf, driver needn't to set
+	 * VLAN pvid related configuration to hardware.
+	 */
+	if (txmode->pvid == 0 && txmode->hw_vlan_insert_pvid == 0)
+		return 0;
+
 	/* Apply pvid setting */
 	ret = hns3_vlan_pvid_set(dev, txmode->pvid,
 				 txmode->hw_vlan_insert_pvid);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:50.560787758 +0100
+++ 0150-net-hns3-fix-VLAN-PVID-when-configuring-device.patch	2020-05-19 14:04:44.476653085 +0100
@@ -1,8 +1,10 @@
-From 99d673d5d3a8046a7f55d82a0a26244372f76abd Mon Sep 17 00:00:00 2001
+From 827eb6ca970dc842f2c71365246397bb67381e5a Mon Sep 17 00:00:00 2001
 From: "Min Hu (Connor)" <humin29@huawei.com>
 Date: Wed, 29 Apr 2020 19:13:26 +0800
 Subject: [PATCH] net/hns3: fix VLAN PVID when configuring device
 
+[ upstream commit 99d673d5d3a8046a7f55d82a0a26244372f76abd ]
+
 In current version, when upper level application calls the
 rte_eth_dev_configure API function, if pvid config is not set of the
 input parameter which struct type is rte_eth_conf, hns3 pmd driver also
@@ -16,7 +18,6 @@
 configuration to hardware when pvid config is not set in rte_eth_conf.
 
 Fixes: 411d23b9eafb ("net/hns3: support VLAN")
-Cc: stable@dpdk.org
 
 Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -26,10 +27,10 @@
  1 file changed, 7 insertions(+)
 
 diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
-index ae87aa0dd2..1fac4f3666 100644
+index 378774396f..6eb36d4258 100644
 --- a/drivers/net/hns3/hns3_ethdev.c
 +++ b/drivers/net/hns3/hns3_ethdev.c
-@@ -1059,6 +1059,13 @@ hns3_dev_configure_vlan(struct rte_eth_dev *dev)
+@@ -1051,6 +1051,13 @@ hns3_dev_configure_vlan(struct rte_eth_dev *dev)
  		return ret;
  	}
  

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

* [dpdk-stable] patch 'net/hns3: fix return value when clearing statistics' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (148 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/hns3: fix VLAN PVID when configuring device' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/octeontx: fix dangling pointer on init failure' " luca.boccassi
                     ` (62 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Wei Hu (Xavier); +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From ee263a1371c2258602fb6674957b95c3d6068f62 Mon Sep 17 00:00:00 2001
From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
Date: Wed, 29 Apr 2020 19:13:28 +0800
Subject: [PATCH] net/hns3: fix return value when clearing statistics

[ upstream commit 68ca93e31cff53d7726d5f7e2b71c5c1cb1743e6 ]

Since the return value of the '.stats_reset' and '.xstats_reset'
callback function is int, when failing to issue command to firmware to
execute clear statistics, the relevant callback function should return
non-zero value.

Fixes: 8839c5e202f3 ("net/hns3: support device stats")

Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 drivers/net/hns3/hns3_stats.c | 21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)

diff --git a/drivers/net/hns3/hns3_stats.c b/drivers/net/hns3/hns3_stats.c
index 9948beb179..6e13948f48 100644
--- a/drivers/net/hns3/hns3_stats.c
+++ b/drivers/net/hns3/hns3_stats.c
@@ -492,6 +492,7 @@ hns3_stats_reset(struct rte_eth_dev *eth_dev)
 		if (ret) {
 			hns3_err(hw, "Failed to reset RX No.%d queue stat: %d",
 				 i, ret);
+			return ret;
 		}
 
 		hns3_cmd_setup_basic_desc(&desc_reset, HNS3_OPC_QUERY_TX_STATUS,
@@ -502,6 +503,7 @@ hns3_stats_reset(struct rte_eth_dev *eth_dev)
 		if (ret) {
 			hns3_err(hw, "Failed to reset TX No.%d queue stat: %d",
 				 i, ret);
+			return ret;
 		}
 	}
 
@@ -524,7 +526,7 @@ hns3_stats_reset(struct rte_eth_dev *eth_dev)
 	return 0;
 }
 
-static void
+static int
 hns3_mac_stats_reset(__rte_unused struct rte_eth_dev *dev)
 {
 	struct hns3_adapter *hns = dev->data->dev_private;
@@ -533,10 +535,14 @@ hns3_mac_stats_reset(__rte_unused struct rte_eth_dev *dev)
 	int ret;
 
 	ret = hns3_query_update_mac_stats(dev);
-	if (ret)
+	if (ret) {
 		hns3_err(hw, "Clear Mac stats fail : %d", ret);
+		return ret;
+	}
 
 	memset(mac_stats, 0, sizeof(struct hns3_mac_stats));
+
+	return 0;
 }
 
 /* This function calculates the number of xstats based on the current config */
@@ -911,9 +917,13 @@ hns3_dev_xstats_reset(struct rte_eth_dev *dev)
 {
 	struct hns3_adapter *hns = dev->data->dev_private;
 	struct hns3_pf *pf = &hns->pf;
+	int ret;
 
 	/* Clear tqp stats */
-	(void)hns3_stats_reset(dev);
+	ret = hns3_stats_reset(dev);
+	if (ret)
+		return ret;
+
 	/* Clear reset stats */
 	memset(&hns->hw.reset.stats, 0, sizeof(struct hns3_reset_stats));
 
@@ -921,7 +931,10 @@ hns3_dev_xstats_reset(struct rte_eth_dev *dev)
 		return 0;
 
 	/* HW registers are cleared on read */
-	hns3_mac_stats_reset(dev);
+	ret = hns3_mac_stats_reset(dev);
+	if (ret)
+		return ret;
+
 	/* Clear error stats */
 	memset(&pf->abn_int_stats, 0, sizeof(struct hns3_err_msix_intr_stats));
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:50.602429184 +0100
+++ 0151-net-hns3-fix-return-value-when-clearing-statistics.patch	2020-05-19 14:04:44.476653085 +0100
@@ -1,15 +1,16 @@
-From 68ca93e31cff53d7726d5f7e2b71c5c1cb1743e6 Mon Sep 17 00:00:00 2001
+From ee263a1371c2258602fb6674957b95c3d6068f62 Mon Sep 17 00:00:00 2001
 From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
 Date: Wed, 29 Apr 2020 19:13:28 +0800
 Subject: [PATCH] net/hns3: fix return value when clearing statistics
 
+[ upstream commit 68ca93e31cff53d7726d5f7e2b71c5c1cb1743e6 ]
+
 Since the return value of the '.stats_reset' and '.xstats_reset'
 callback function is int, when failing to issue command to firmware to
 execute clear statistics, the relevant callback function should return
 non-zero value.
 
 Fixes: 8839c5e202f3 ("net/hns3: support device stats")
-Cc: stable@dpdk.org
 
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
 ---
@@ -17,10 +18,10 @@
  1 file changed, 17 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/net/hns3/hns3_stats.c b/drivers/net/hns3/hns3_stats.c
-index ad276206c5..d2467a4840 100644
+index 9948beb179..6e13948f48 100644
 --- a/drivers/net/hns3/hns3_stats.c
 +++ b/drivers/net/hns3/hns3_stats.c
-@@ -527,6 +527,7 @@ hns3_stats_reset(struct rte_eth_dev *eth_dev)
+@@ -492,6 +492,7 @@ hns3_stats_reset(struct rte_eth_dev *eth_dev)
  		if (ret) {
  			hns3_err(hw, "Failed to reset RX No.%d queue stat: %d",
  				 i, ret);
@@ -28,7 +29,7 @@
  		}
  
  		hns3_cmd_setup_basic_desc(&desc_reset, HNS3_OPC_QUERY_TX_STATUS,
-@@ -537,6 +538,7 @@ hns3_stats_reset(struct rte_eth_dev *eth_dev)
+@@ -502,6 +503,7 @@ hns3_stats_reset(struct rte_eth_dev *eth_dev)
  		if (ret) {
  			hns3_err(hw, "Failed to reset TX No.%d queue stat: %d",
  				 i, ret);
@@ -36,7 +37,7 @@
  		}
  	}
  
-@@ -571,7 +573,7 @@ hns3_stats_reset(struct rte_eth_dev *eth_dev)
+@@ -524,7 +526,7 @@ hns3_stats_reset(struct rte_eth_dev *eth_dev)
  	return 0;
  }
  
@@ -45,7 +46,7 @@
  hns3_mac_stats_reset(__rte_unused struct rte_eth_dev *dev)
  {
  	struct hns3_adapter *hns = dev->data->dev_private;
-@@ -580,10 +582,14 @@ hns3_mac_stats_reset(__rte_unused struct rte_eth_dev *dev)
+@@ -533,10 +535,14 @@ hns3_mac_stats_reset(__rte_unused struct rte_eth_dev *dev)
  	int ret;
  
  	ret = hns3_query_update_mac_stats(dev);
@@ -61,7 +62,7 @@
  }
  
  /* This function calculates the number of xstats based on the current config */
-@@ -979,9 +985,13 @@ hns3_dev_xstats_reset(struct rte_eth_dev *dev)
+@@ -911,9 +917,13 @@ hns3_dev_xstats_reset(struct rte_eth_dev *dev)
  {
  	struct hns3_adapter *hns = dev->data->dev_private;
  	struct hns3_pf *pf = &hns->pf;
@@ -76,7 +77,7 @@
  	/* Clear reset stats */
  	memset(&hns->hw.reset.stats, 0, sizeof(struct hns3_reset_stats));
  
-@@ -989,7 +999,10 @@ hns3_dev_xstats_reset(struct rte_eth_dev *dev)
+@@ -921,7 +931,10 @@ hns3_dev_xstats_reset(struct rte_eth_dev *dev)
  		return 0;
  
  	/* HW registers are cleared on read */

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

* [dpdk-stable] patch 'net/octeontx: fix dangling pointer on init failure' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (149 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/hns3: fix return value when clearing statistics' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/mlx5: fix RSS enablement' " luca.boccassi
                     ` (61 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Harman Kalra, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From ea6b087b9b8b40c7aa6f4ac50ff28fb75f364941 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Tue, 7 Apr 2020 19:35:43 +0800
Subject: [PATCH] net/octeontx: fix dangling pointer on init failure

[ upstream commit 5ed5df8073c80d1af9ec8c89a8b2a5299463058d ]

When octeontx_create() is cleaning up, it does not correctly set
the mac_addrs variable to NULL, which will lead to a double free.

Fixes: 9e399b88ce2f ("net/octeontx: fix memory leak of MAC address table")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Harman Kalra <hkalra@marvell.com>
---
 drivers/net/octeontx/octeontx_ethdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index 1d022e79a0..e85acdde0a 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -1124,6 +1124,7 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev,
 
 free_mac_addrs:
 	rte_free(data->mac_addrs);
+	data->mac_addrs = NULL;
 err:
 	if (nic)
 		octeontx_port_close(nic);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:50.639435754 +0100
+++ 0152-net-octeontx-fix-dangling-pointer-on-init-failure.patch	2020-05-19 14:04:44.480653158 +0100
@@ -1,13 +1,14 @@
-From 5ed5df8073c80d1af9ec8c89a8b2a5299463058d Mon Sep 17 00:00:00 2001
+From ea6b087b9b8b40c7aa6f4ac50ff28fb75f364941 Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Tue, 7 Apr 2020 19:35:43 +0800
 Subject: [PATCH] net/octeontx: fix dangling pointer on init failure
 
+[ upstream commit 5ed5df8073c80d1af9ec8c89a8b2a5299463058d ]
+
 When octeontx_create() is cleaning up, it does not correctly set
 the mac_addrs variable to NULL, which will lead to a double free.
 
 Fixes: 9e399b88ce2f ("net/octeontx: fix memory leak of MAC address table")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Acked-by: Harman Kalra <hkalra@marvell.com>
@@ -16,10 +17,10 @@
  1 file changed, 1 insertion(+)
 
 diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
-index ea3b278a15..d5371ae07d 100644
+index 1d022e79a0..e85acdde0a 100644
 --- a/drivers/net/octeontx/octeontx_ethdev.c
 +++ b/drivers/net/octeontx/octeontx_ethdev.c
-@@ -1454,6 +1454,7 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev,
+@@ -1124,6 +1124,7 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev,
  
  free_mac_addrs:
  	rte_free(data->mac_addrs);

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

* [dpdk-stable] patch 'net/mlx5: fix RSS enablement' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (150 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/octeontx: fix dangling pointer on init failure' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/mlx5: fix assert in modify converting' " luca.boccassi
                     ` (60 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Xiaoyu Min; +Cc: Viacheslav Ovsiienko, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 831152d0d94a8548aa804ece84acd2ac1529fc8b Mon Sep 17 00:00:00 2001
From: Xiaoyu Min <jackmin@mellanox.com>
Date: Wed, 29 Apr 2020 16:00:42 +0300
Subject: [PATCH] net/mlx5: fix RSS enablement

[ upstream commit 0afac6dcca44dea15f23e93851b6e52f014a98e4 ]

PMD create some default control rules with RSS action
if it's not isolated mode.

However whether default control rules need to do RSS or not should be
controlled by device configuration, the mq_mode of rxmode configuration
in specific.

In another word, only when mq_mode is configured with ETH_MQ_RX_RSS_FLAG
set, then RSS is needed for default rules.

Fixes: c64ccc0eca2f ("mlx5: fix overwritten RSS configuration")

Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index bb8538e816..15d895c847 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -4691,6 +4691,8 @@ mlx5_ctrl_flow_vlan(struct rte_eth_dev *dev,
 	if (!priv->reta_idx_n || !priv->rxqs_n) {
 		return 0;
 	}
+	if (!(dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG))
+		action_rss.types = 0;
 	for (i = 0; i != priv->reta_idx_n; ++i)
 		queue[i] = (*priv->reta_idx)[i];
 	flow = flow_list_create(dev, &priv->ctrl_flows,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:50.677331839 +0100
+++ 0153-net-mlx5-fix-RSS-enablement.patch	2020-05-19 14:04:44.484653231 +0100
@@ -1,8 +1,10 @@
-From 0afac6dcca44dea15f23e93851b6e52f014a98e4 Mon Sep 17 00:00:00 2001
+From 831152d0d94a8548aa804ece84acd2ac1529fc8b Mon Sep 17 00:00:00 2001
 From: Xiaoyu Min <jackmin@mellanox.com>
 Date: Wed, 29 Apr 2020 16:00:42 +0300
 Subject: [PATCH] net/mlx5: fix RSS enablement
 
+[ upstream commit 0afac6dcca44dea15f23e93851b6e52f014a98e4 ]
+
 PMD create some default control rules with RSS action
 if it's not isolated mode.
 
@@ -14,7 +16,6 @@
 set, then RSS is needed for default rules.
 
 Fixes: c64ccc0eca2f ("mlx5: fix overwritten RSS configuration")
-Cc: stable@dpdk.org
 
 Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
 Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
@@ -25,10 +26,10 @@
  1 file changed, 2 insertions(+)
 
 diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
-index e9ae2f782c..cb593c9449 100644
+index bb8538e816..15d895c847 100644
 --- a/drivers/net/mlx5/mlx5_flow.c
 +++ b/drivers/net/mlx5/mlx5_flow.c
-@@ -4912,6 +4912,8 @@ mlx5_ctrl_flow_vlan(struct rte_eth_dev *dev,
+@@ -4691,6 +4691,8 @@ mlx5_ctrl_flow_vlan(struct rte_eth_dev *dev,
  	if (!priv->reta_idx_n || !priv->rxqs_n) {
  		return 0;
  	}
@@ -36,7 +37,7 @@
 +		action_rss.types = 0;
  	for (i = 0; i != priv->reta_idx_n; ++i)
  		queue[i] = (*priv->reta_idx)[i];
- 	flow_idx = flow_list_create(dev, &priv->ctrl_flows,
+ 	flow = flow_list_create(dev, &priv->ctrl_flows,
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'net/mlx5: fix assert in modify converting' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (151 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/mlx5: fix RSS enablement' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/mlx5: fix VLAN ID check' " luca.boccassi
                     ` (59 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Bing Zhao; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 4fdea813e5d0447db8d6d8d6d0de081290355e78 Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@mellanox.com>
Date: Wed, 29 Apr 2020 21:06:14 +0800
Subject: [PATCH] net/mlx5: fix assert in modify converting

[ upstream commit c8fa92f6c16691664a3f8e080233aa3480907497 ]

The assertion was added incorrectly in converting the modify actions
into the format of low layer driver.
There is no mask specified in the rte_flow actions, and PMD driver
will give a mask of all 1s to the field to be modified. For each
field, the mask could not be zero. But for the whole header which
contains this field, the masks of other fields could be zero. The
assertion needs to be removed for debug mode.

Fixes: 72a944dba163 ("net/mlx5: fix header modify action validation")

Signed-off-by: Bing Zhao <bingz@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 8ed29adaaa..6cdaa00519 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -427,7 +427,6 @@ flow_dv_convert_modify_action(struct rte_flow_item *item,
 		/* Fetch variable byte size mask from the array. */
 		mask = flow_dv_fetch_field((const uint8_t *)item->mask +
 					   field->offset, field->size);
-		assert(mask);
 		if (!mask) {
 			++field;
 			continue;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:50.719611722 +0100
+++ 0154-net-mlx5-fix-assert-in-modify-converting.patch	2020-05-19 14:04:44.488653303 +0100
@@ -1,8 +1,10 @@
-From c8fa92f6c16691664a3f8e080233aa3480907497 Mon Sep 17 00:00:00 2001
+From 4fdea813e5d0447db8d6d8d6d0de081290355e78 Mon Sep 17 00:00:00 2001
 From: Bing Zhao <bingz@mellanox.com>
 Date: Wed, 29 Apr 2020 21:06:14 +0800
 Subject: [PATCH] net/mlx5: fix assert in modify converting
 
+[ upstream commit c8fa92f6c16691664a3f8e080233aa3480907497 ]
+
 The assertion was added incorrectly in converting the modify actions
 into the format of low layer driver.
 There is no mask specified in the rte_flow actions, and PMD driver
@@ -12,7 +14,6 @@
 assertion needs to be removed for debug mode.
 
 Fixes: 72a944dba163 ("net/mlx5: fix header modify action validation")
-Cc: stable@dpdk.org
 
 Signed-off-by: Bing Zhao <bingz@mellanox.com>
 Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
@@ -21,14 +22,14 @@
  1 file changed, 1 deletion(-)
 
 diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index c8035b352e..794afcf18c 100644
+index 8ed29adaaa..6cdaa00519 100644
 --- a/drivers/net/mlx5/mlx5_flow_dv.c
 +++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -435,7 +435,6 @@ flow_dv_convert_modify_action(struct rte_flow_item *item,
+@@ -427,7 +427,6 @@ flow_dv_convert_modify_action(struct rte_flow_item *item,
  		/* Fetch variable byte size mask from the array. */
  		mask = flow_dv_fetch_field((const uint8_t *)item->mask +
  					   field->offset, field->size);
--		MLX5_ASSERT(mask);
+-		assert(mask);
  		if (!mask) {
  			++field;
  			continue;

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

* [dpdk-stable] patch 'net/mlx5: fix VLAN ID check' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (152 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/mlx5: fix assert in modify converting' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/mlx5: fix gcc 10 enum-conversion warning' " luca.boccassi
                     ` (58 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Wisam Jaddo; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 7e01ad84bf0b9d564ed4d9ff22eeb9552330da15 Mon Sep 17 00:00:00 2001
From: Wisam Jaddo <wisamm@mellanox.com>
Date: Thu, 30 Apr 2020 08:31:03 +0000
Subject: [PATCH] net/mlx5: fix VLAN ID check

[ upstream commit b756f2980718bf2cb1c8f57762f42c656986998d ]

All comparison should be done in CPU endianness, otherwise
it will not give right results.

for example:
255 after converting into RTE_BE16 will be biger than 4096 after
converting into RTE_BE16.

Fixes: a5f2da0b816b ("net/mlx5: support modify VLAN ID on new VLAN header")

Signed-off-by: Wisam Jaddo <wisamm@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 6cdaa00519..5b6d78c86e 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1831,7 +1831,7 @@ flow_dv_validate_action_set_vlan_vid(uint64_t item_flags,
 	const struct rte_flow_action *action = actions;
 	const struct rte_flow_action_of_set_vlan_vid *conf = action->conf;
 
-	if (conf->vlan_vid > RTE_BE16(0xFFE))
+	if (rte_be_to_cpu_16(conf->vlan_vid) > 0xFFE)
 		return rte_flow_error_set(error, EINVAL,
 					  RTE_FLOW_ERROR_TYPE_ACTION, action,
 					  "VLAN VID value is too big");
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:50.775567308 +0100
+++ 0155-net-mlx5-fix-VLAN-ID-check.patch	2020-05-19 14:04:44.492653376 +0100
@@ -1,8 +1,10 @@
-From b756f2980718bf2cb1c8f57762f42c656986998d Mon Sep 17 00:00:00 2001
+From 7e01ad84bf0b9d564ed4d9ff22eeb9552330da15 Mon Sep 17 00:00:00 2001
 From: Wisam Jaddo <wisamm@mellanox.com>
 Date: Thu, 30 Apr 2020 08:31:03 +0000
 Subject: [PATCH] net/mlx5: fix VLAN ID check
 
+[ upstream commit b756f2980718bf2cb1c8f57762f42c656986998d ]
+
 All comparison should be done in CPU endianness, otherwise
 it will not give right results.
 
@@ -11,7 +13,6 @@
 converting into RTE_BE16.
 
 Fixes: a5f2da0b816b ("net/mlx5: support modify VLAN ID on new VLAN header")
-Cc: stable@dpdk.org
 
 Signed-off-by: Wisam Jaddo <wisamm@mellanox.com>
 Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
@@ -20,10 +21,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index 794afcf18c..8aba5c774a 100644
+index 6cdaa00519..5b6d78c86e 100644
 --- a/drivers/net/mlx5/mlx5_flow_dv.c
 +++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -1965,7 +1965,7 @@ flow_dv_validate_action_set_vlan_vid(uint64_t item_flags,
+@@ -1831,7 +1831,7 @@ flow_dv_validate_action_set_vlan_vid(uint64_t item_flags,
  	const struct rte_flow_action *action = actions;
  	const struct rte_flow_action_of_set_vlan_vid *conf = action->conf;
  

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

* [dpdk-stable] patch 'net/mlx5: fix gcc 10 enum-conversion warning' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (153 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/mlx5: fix VLAN ID check' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'event/octeontx2: fix queue removal from Rx adapter' " luca.boccassi
                     ` (57 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Kevin Traynor; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 46b7943fda728784115ef6297a44f1a3030cea72 Mon Sep 17 00:00:00 2001
From: Kevin Traynor <ktraynor@redhat.com>
Date: Fri, 20 Mar 2020 16:47:42 +0000
Subject: [PATCH] net/mlx5: fix gcc 10 enum-conversion warning
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 869ea2e62de7f981c4b69fc0b63d32ca0c1213cd ]

gcc 10.0.1 reports warnings when using mlx5_rte_flow enums
with rte_flow type enums. For example:

../drivers/net/mlx5/mlx5_flow.c: In function ‘flow_hairpin_split’:
../drivers/net/mlx5/mlx5_flow.c:3406:19:
warning: implicit conversion from ‘enum mlx5_rtedflow_action_type’ to
         ‘enum rte_flow_action_type’ [-Wenum-conversion]
 3406 |  tag_action->type = MLX5_RTE_FLOW_ACTION_TYPE_TAG;
      |                   ^
../drivers/net/mlx5/mlx5_flow.c:3419:13:
warning: implicit conversion from ‘enum mlx5_rte_flow_item_type’
         to ‘enum rte_flow_item_type’ [-Wenum-conversion]
 3419 |  item->type = MLX5_RTE_FLOW_ITEM_TYPE_TAG;
      |             ^

Fix by casting to the correct enum.

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow.c | 46 ++++++++++++++++++++++++------------
 1 file changed, 31 insertions(+), 15 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 15d895c847..5fcff9a075 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -2962,18 +2962,21 @@ flow_mreg_add_copy_action(struct rte_eth_dev *dev, uint32_t mark_id,
 	/* Build a new flow. */
 	if (mark_id != MLX5_DEFAULT_COPY_ID) {
 		items[0] = (struct rte_flow_item){
-			.type = MLX5_RTE_FLOW_ITEM_TYPE_TAG,
+			.type = (enum rte_flow_item_type)
+				MLX5_RTE_FLOW_ITEM_TYPE_TAG,
 			.spec = &tag_spec,
 		};
 		items[1] = (struct rte_flow_item){
 			.type = RTE_FLOW_ITEM_TYPE_END,
 		};
 		actions[0] = (struct rte_flow_action){
-			.type = MLX5_RTE_FLOW_ACTION_TYPE_MARK,
+			.type = (enum rte_flow_action_type)
+				MLX5_RTE_FLOW_ACTION_TYPE_MARK,
 			.conf = &ftag,
 		};
 		actions[1] = (struct rte_flow_action){
-			.type = MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG,
+			.type = (enum rte_flow_action_type)
+				MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG,
 			.conf = &cp_mreg,
 		};
 		actions[2] = (struct rte_flow_action){
@@ -2990,7 +2993,8 @@ flow_mreg_add_copy_action(struct rte_eth_dev *dev, uint32_t mark_id,
 			.type = RTE_FLOW_ITEM_TYPE_END,
 		};
 		actions[0] = (struct rte_flow_action){
-			.type = MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG,
+			.type = (enum rte_flow_action_type)
+				MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG,
 			.conf = &cp_mreg,
 		};
 		actions[1] = (struct rte_flow_action){
@@ -3364,7 +3368,8 @@ flow_hairpin_split(struct rte_eth_dev *dev,
 	}
 	/* Add set meta action and end action for the Rx flow. */
 	tag_action = actions_rx;
-	tag_action->type = MLX5_RTE_FLOW_ACTION_TYPE_TAG;
+	tag_action->type = (enum rte_flow_action_type)
+			   MLX5_RTE_FLOW_ACTION_TYPE_TAG;
 	actions_rx++;
 	rte_memcpy(actions_rx, actions, sizeof(struct rte_flow_action));
 	actions_rx++;
@@ -3377,7 +3382,8 @@ flow_hairpin_split(struct rte_eth_dev *dev,
 	rte_memcpy(actions_tx, actions, sizeof(struct rte_flow_action));
 	addr = (void *)&pattern_tx[2];
 	item = pattern_tx;
-	item->type = MLX5_RTE_FLOW_ITEM_TYPE_TAG;
+	item->type = (enum rte_flow_item_type)
+		     MLX5_RTE_FLOW_ITEM_TYPE_TAG;
 	tag_item = (void *)addr;
 	tag_item->data = *flow_id;
 	tag_item->id = mlx5_flow_get_reg_id(dev, MLX5_HAIRPIN_TX, 0, NULL);
@@ -3509,7 +3515,8 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
 		case RTE_FLOW_ACTION_TYPE_METER:
 			/* Add the extra tag action first. */
 			tag_action = actions_pre;
-			tag_action->type = MLX5_RTE_FLOW_ACTION_TYPE_TAG;
+			tag_action->type = (enum rte_flow_action_type)
+					   MLX5_RTE_FLOW_ACTION_TYPE_TAG;
 			actions_pre++;
 			action_cur = &actions_pre;
 			break;
@@ -3570,7 +3577,8 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
 				 * Convert to internal match item, it is used
 				 * for vlan push and set vid.
 				 */
-				sfx_items->type = MLX5_RTE_FLOW_ITEM_TYPE_VLAN;
+				sfx_items->type = (enum rte_flow_item_type)
+						  MLX5_RTE_FLOW_ITEM_TYPE_VLAN;
 				sfx_items++;
 			}
 			break;
@@ -3585,7 +3593,8 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
 	tag_spec->id = mlx5_flow_get_reg_id(dev, MLX5_MTR_SFX, 0, &error);
 	tag_mask = tag_spec + 1;
 	tag_mask->data = 0xffffff00;
-	tag_item->type = MLX5_RTE_FLOW_ITEM_TYPE_TAG;
+	tag_item->type = (enum rte_flow_item_type)
+			 MLX5_RTE_FLOW_ITEM_TYPE_TAG;
 	tag_item->spec = tag_spec;
 	tag_item->last = NULL;
 	tag_item->mask = tag_mask;
@@ -3688,7 +3697,8 @@ flow_mreg_split_qrss_prep(struct rte_eth_dev *dev,
 		/* Construct new actions array. */
 		/* Replace QUEUE/RSS action. */
 		split_actions[qrss_idx] = (struct rte_flow_action){
-			.type = MLX5_RTE_FLOW_ACTION_TYPE_TAG,
+			.type = (enum rte_flow_action_type)
+				MLX5_RTE_FLOW_ACTION_TYPE_TAG,
 			.conf = set_tag,
 		};
 	}
@@ -3751,7 +3761,8 @@ flow_mreg_tx_copy_prep(struct rte_eth_dev *dev,
 		memcpy(ext_actions, actions, sizeof(*ext_actions) * encap_idx);
 	if (encap_idx == actions_n - 1) {
 		ext_actions[actions_n - 1] = (struct rte_flow_action){
-			.type = MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG,
+			.type = (enum rte_flow_action_type)
+				MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG,
 			.conf = cp_mreg,
 		};
 		ext_actions[actions_n] = (struct rte_flow_action){
@@ -3759,7 +3770,8 @@ flow_mreg_tx_copy_prep(struct rte_eth_dev *dev,
 		};
 	} else {
 		ext_actions[encap_idx] = (struct rte_flow_action){
-			.type = MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG,
+			.type = (enum rte_flow_action_type)
+				MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG,
 			.conf = cp_mreg,
 		};
 		memcpy(ext_actions + encap_idx + 1, actions + encap_idx,
@@ -3873,6 +3885,7 @@ flow_create_split_metadata(struct rte_eth_dev *dev,
 						RTE_FLOW_ACTION_TYPE_VOID;
 		else
 			ext_actions[qrss - actions].type =
+						(enum rte_flow_action_type)
 						MLX5_RTE_FLOW_ACTION_TYPE_TAG;
 		/*
 		 * Create the new actions list with removed Q/RSS action
@@ -3924,7 +3937,8 @@ flow_create_split_metadata(struct rte_eth_dev *dev,
 		};
 		struct rte_flow_item q_items[] = {
 			{
-				.type = MLX5_RTE_FLOW_ITEM_TYPE_TAG,
+				.type = (enum rte_flow_item_type)
+					MLX5_RTE_FLOW_ITEM_TYPE_TAG,
 				.spec = &q_tag_spec,
 				.last = NULL,
 				.mask = NULL,
@@ -4586,7 +4600,8 @@ mlx5_ctrl_flow_source_queue(struct rte_eth_dev *dev,
 	};
 	struct rte_flow_item items[] = {
 		{
-			.type = MLX5_RTE_FLOW_ITEM_TYPE_TX_QUEUE,
+			.type = (enum rte_flow_item_type)
+				MLX5_RTE_FLOW_ITEM_TYPE_TX_QUEUE,
 			.spec = &queue_spec,
 			.last = NULL,
 			.mask = &queue_mask,
@@ -5705,7 +5720,8 @@ mlx5_flow_discover_mreg_c(struct rte_eth_dev *dev)
 		};
 		struct rte_flow_action actions[] = {
 			[0] = {
-				.type = MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG,
+				.type = (enum rte_flow_action_type)
+					MLX5_RTE_FLOW_ACTION_TYPE_COPY_MREG,
 				.conf = &(struct mlx5_flow_action_copy_mreg){
 					.src = REG_C_1,
 					.dst = idx,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:50.834375911 +0100
+++ 0156-net-mlx5-fix-gcc-10-enum-conversion-warning.patch	2020-05-19 14:04:44.496653448 +0100
@@ -1,4 +1,4 @@
-From 869ea2e62de7f981c4b69fc0b63d32ca0c1213cd Mon Sep 17 00:00:00 2001
+From 46b7943fda728784115ef6297a44f1a3030cea72 Mon Sep 17 00:00:00 2001
 From: Kevin Traynor <ktraynor@redhat.com>
 Date: Fri, 20 Mar 2020 16:47:42 +0000
 Subject: [PATCH] net/mlx5: fix gcc 10 enum-conversion warning
@@ -6,6 +6,8 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit 869ea2e62de7f981c4b69fc0b63d32ca0c1213cd ]
+
 gcc 10.0.1 reports warnings when using mlx5_rte_flow enums
 with rte_flow type enums. For example:
 
@@ -30,10 +32,10 @@
  1 file changed, 31 insertions(+), 15 deletions(-)
 
 diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
-index a373f33b6e..01376f3c51 100644
+index 15d895c847..5fcff9a075 100644
 --- a/drivers/net/mlx5/mlx5_flow.c
 +++ b/drivers/net/mlx5/mlx5_flow.c
-@@ -3021,18 +3021,21 @@ flow_mreg_add_copy_action(struct rte_eth_dev *dev, uint32_t mark_id,
+@@ -2962,18 +2962,21 @@ flow_mreg_add_copy_action(struct rte_eth_dev *dev, uint32_t mark_id,
  	/* Build a new flow. */
  	if (mark_id != MLX5_DEFAULT_COPY_ID) {
  		items[0] = (struct rte_flow_item){
@@ -58,7 +60,7 @@
  			.conf = &cp_mreg,
  		};
  		actions[2] = (struct rte_flow_action){
-@@ -3049,7 +3052,8 @@ flow_mreg_add_copy_action(struct rte_eth_dev *dev, uint32_t mark_id,
+@@ -2990,7 +2993,8 @@ flow_mreg_add_copy_action(struct rte_eth_dev *dev, uint32_t mark_id,
  			.type = RTE_FLOW_ITEM_TYPE_END,
  		};
  		actions[0] = (struct rte_flow_action){
@@ -68,7 +70,7 @@
  			.conf = &cp_mreg,
  		};
  		actions[1] = (struct rte_flow_action){
-@@ -3456,7 +3460,8 @@ flow_hairpin_split(struct rte_eth_dev *dev,
+@@ -3364,7 +3368,8 @@ flow_hairpin_split(struct rte_eth_dev *dev,
  	}
  	/* Add set meta action and end action for the Rx flow. */
  	tag_action = actions_rx;
@@ -78,7 +80,7 @@
  	actions_rx++;
  	rte_memcpy(actions_rx, actions, sizeof(struct rte_flow_action));
  	actions_rx++;
-@@ -3469,7 +3474,8 @@ flow_hairpin_split(struct rte_eth_dev *dev,
+@@ -3377,7 +3382,8 @@ flow_hairpin_split(struct rte_eth_dev *dev,
  	rte_memcpy(actions_tx, actions, sizeof(struct rte_flow_action));
  	addr = (void *)&pattern_tx[2];
  	item = pattern_tx;
@@ -88,7 +90,7 @@
  	tag_item = (void *)addr;
  	tag_item->data = *flow_id;
  	tag_item->id = mlx5_flow_get_reg_id(dev, MLX5_HAIRPIN_TX, 0, NULL);
-@@ -3606,7 +3612,8 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
+@@ -3509,7 +3515,8 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
  		case RTE_FLOW_ACTION_TYPE_METER:
  			/* Add the extra tag action first. */
  			tag_action = actions_pre;
@@ -98,7 +100,7 @@
  			actions_pre++;
  			action_cur = &actions_pre;
  			break;
-@@ -3667,7 +3674,8 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
+@@ -3570,7 +3577,8 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
  				 * Convert to internal match item, it is used
  				 * for vlan push and set vid.
  				 */
@@ -108,7 +110,7 @@
  				sfx_items++;
  			}
  			break;
-@@ -3682,7 +3690,8 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
+@@ -3585,7 +3593,8 @@ flow_meter_split_prep(struct rte_eth_dev *dev,
  	tag_spec->id = mlx5_flow_get_reg_id(dev, MLX5_MTR_SFX, 0, &error);
  	tag_mask = tag_spec + 1;
  	tag_mask->data = 0xffffff00;
@@ -118,7 +120,7 @@
  	tag_item->spec = tag_spec;
  	tag_item->last = NULL;
  	tag_item->mask = tag_mask;
-@@ -3785,7 +3794,8 @@ flow_mreg_split_qrss_prep(struct rte_eth_dev *dev,
+@@ -3688,7 +3697,8 @@ flow_mreg_split_qrss_prep(struct rte_eth_dev *dev,
  		/* Construct new actions array. */
  		/* Replace QUEUE/RSS action. */
  		split_actions[qrss_idx] = (struct rte_flow_action){
@@ -128,7 +130,7 @@
  			.conf = set_tag,
  		};
  	}
-@@ -3848,7 +3858,8 @@ flow_mreg_tx_copy_prep(struct rte_eth_dev *dev,
+@@ -3751,7 +3761,8 @@ flow_mreg_tx_copy_prep(struct rte_eth_dev *dev,
  		memcpy(ext_actions, actions, sizeof(*ext_actions) * encap_idx);
  	if (encap_idx == actions_n - 1) {
  		ext_actions[actions_n - 1] = (struct rte_flow_action){
@@ -138,7 +140,7 @@
  			.conf = cp_mreg,
  		};
  		ext_actions[actions_n] = (struct rte_flow_action){
-@@ -3856,7 +3867,8 @@ flow_mreg_tx_copy_prep(struct rte_eth_dev *dev,
+@@ -3759,7 +3770,8 @@ flow_mreg_tx_copy_prep(struct rte_eth_dev *dev,
  		};
  	} else {
  		ext_actions[encap_idx] = (struct rte_flow_action){
@@ -148,7 +150,7 @@
  			.conf = cp_mreg,
  		};
  		memcpy(ext_actions + encap_idx + 1, actions + encap_idx,
-@@ -3973,6 +3985,7 @@ flow_create_split_metadata(struct rte_eth_dev *dev,
+@@ -3873,6 +3885,7 @@ flow_create_split_metadata(struct rte_eth_dev *dev,
  						RTE_FLOW_ACTION_TYPE_VOID;
  		else
  			ext_actions[qrss - actions].type =
@@ -156,7 +158,7 @@
  						MLX5_RTE_FLOW_ACTION_TYPE_TAG;
  		/*
  		 * Create the new actions list with removed Q/RSS action
-@@ -4024,7 +4037,8 @@ flow_create_split_metadata(struct rte_eth_dev *dev,
+@@ -3924,7 +3937,8 @@ flow_create_split_metadata(struct rte_eth_dev *dev,
  		};
  		struct rte_flow_item q_items[] = {
  			{
@@ -166,7 +168,7 @@
  				.spec = &q_tag_spec,
  				.last = NULL,
  				.mask = NULL,
-@@ -4830,7 +4844,8 @@ mlx5_ctrl_flow_source_queue(struct rte_eth_dev *dev,
+@@ -4586,7 +4600,8 @@ mlx5_ctrl_flow_source_queue(struct rte_eth_dev *dev,
  	};
  	struct rte_flow_item items[] = {
  		{
@@ -176,7 +178,7 @@
  			.spec = &queue_spec,
  			.last = NULL,
  			.mask = &queue_mask,
-@@ -6100,7 +6115,8 @@ mlx5_flow_discover_mreg_c(struct rte_eth_dev *dev)
+@@ -5705,7 +5720,8 @@ mlx5_flow_discover_mreg_c(struct rte_eth_dev *dev)
  		};
  		struct rte_flow_action actions[] = {
  			[0] = {

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

* [dpdk-stable] patch 'event/octeontx2: fix queue removal from Rx adapter' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (154 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'net/mlx5: fix gcc 10 enum-conversion warning' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'eventdev: fix probe and remove for secondary process' " luca.boccassi
                     ` (56 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Lukasz Bartosik; +Cc: Pavan Nikhilesh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From a309eafc8902de65a2caf0e64a4c5c0303fbc27b Mon Sep 17 00:00:00 2001
From: Lukasz Bartosik <lbartosik@marvell.com>
Date: Thu, 16 Apr 2020 17:47:40 +0200
Subject: [PATCH] event/octeontx2: fix queue removal from Rx adapter

[ upstream commit 534d1d4b65468deed18723fb45818275887c8ecd ]

When eth port queue is removed from Rx adapter using
rte_event_eth_rx_adapter_queue_del() it incorrectly
initializes CQ context instead of modifying it. This
might lead to a crash when CQ context is modified
as a part of rte_eth_dev_stop() sequence as CQ will
hold invalid entries. This is responsibility of an
application to call rte_event_eth_rx_adapter_queue_del()
to remove eth port queue from Rx adapter in tear down
sequence.

Fixes: 37720fc1fba8 ("event/octeontx2: add Rx adapter")

Signed-off-by: Lukasz Bartosik <lbartosik@marvell.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 drivers/event/octeontx2/otx2_evdev_adptr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/event/octeontx2/otx2_evdev_adptr.c b/drivers/event/octeontx2/otx2_evdev_adptr.c
index 233cba2aa3..8bdcfa3ea5 100644
--- a/drivers/event/octeontx2/otx2_evdev_adptr.c
+++ b/drivers/event/octeontx2/otx2_evdev_adptr.c
@@ -133,7 +133,7 @@ sso_rxq_disable(struct otx2_eth_dev *dev, uint16_t qid)
 	aq = otx2_mbox_alloc_msg_nix_aq_enq(mbox);
 	aq->qidx = qid;
 	aq->ctype = NIX_AQ_CTYPE_CQ;
-	aq->op = NIX_AQ_INSTOP_INIT;
+	aq->op = NIX_AQ_INSTOP_WRITE;
 
 	aq->cq.ena = 1;
 	aq->cq.caching = 1;
@@ -144,7 +144,7 @@ sso_rxq_disable(struct otx2_eth_dev *dev, uint16_t qid)
 
 	rc = otx2_mbox_process(mbox);
 	if (rc < 0) {
-		otx2_err("Failed to init cq context");
+		otx2_err("Failed to enable cq context");
 		goto fail;
 	}
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:50.881850262 +0100
+++ 0157-event-octeontx2-fix-queue-removal-from-Rx-adapter.patch	2020-05-19 14:04:44.496653448 +0100
@@ -1,8 +1,10 @@
-From 534d1d4b65468deed18723fb45818275887c8ecd Mon Sep 17 00:00:00 2001
+From a309eafc8902de65a2caf0e64a4c5c0303fbc27b Mon Sep 17 00:00:00 2001
 From: Lukasz Bartosik <lbartosik@marvell.com>
 Date: Thu, 16 Apr 2020 17:47:40 +0200
 Subject: [PATCH] event/octeontx2: fix queue removal from Rx adapter
 
+[ upstream commit 534d1d4b65468deed18723fb45818275887c8ecd ]
+
 When eth port queue is removed from Rx adapter using
 rte_event_eth_rx_adapter_queue_del() it incorrectly
 initializes CQ context instead of modifying it. This
@@ -14,7 +16,6 @@
 sequence.
 
 Fixes: 37720fc1fba8 ("event/octeontx2: add Rx adapter")
-Cc: stable@dpdk.org
 
 Signed-off-by: Lukasz Bartosik <lbartosik@marvell.com>
 Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>

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

* [dpdk-stable] patch 'eventdev: fix probe and remove for secondary process' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (155 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'event/octeontx2: fix queue removal from Rx adapter' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'event/dsw: avoid reusing previously recorded events' " luca.boccassi
                     ` (55 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 85c1aae896b33b12ff65b26e45bdcb8471e2ee02 Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Mon, 27 Apr 2020 23:40:38 +0530
Subject: [PATCH] eventdev: fix probe and remove for secondary process

[ upstream commit a5f30c925b88bb3613535fb27eb3459d19226cd0 ]

When probing event device in secondary process skip reinitializing
the device data structure as it is already done in primary process.

When removing event device in secondary process skip closing the
event device as it should be done by primary process.

Fixes: 322d0345c2bc ("eventdev: implement PMD registration functions")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 lib/librte_eventdev/rte_eventdev.c         | 13 ++++++++-----
 lib/librte_eventdev/rte_eventdev_pmd_pci.h |  8 +++++---
 2 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/lib/librte_eventdev/rte_eventdev.c b/lib/librte_eventdev/rte_eventdev.c
index b987e07454..9aca7fbd52 100644
--- a/lib/librte_eventdev/rte_eventdev.c
+++ b/lib/librte_eventdev/rte_eventdev.c
@@ -1364,14 +1364,17 @@ rte_event_pmd_allocate(const char *name, int socket_id)
 
 		eventdev->data = eventdev_data;
 
-		strlcpy(eventdev->data->name, name, RTE_EVENTDEV_NAME_MAX_LEN);
+		if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
 
-		eventdev->data->dev_id = dev_id;
-		eventdev->data->socket_id = socket_id;
-		eventdev->data->dev_started = 0;
+			strlcpy(eventdev->data->name, name,
+				RTE_EVENTDEV_NAME_MAX_LEN);
+
+			eventdev->data->dev_id = dev_id;
+			eventdev->data->socket_id = socket_id;
+			eventdev->data->dev_started = 0;
+		}
 
 		eventdev->attached = RTE_EVENTDEV_ATTACHED;
-
 		eventdev_globals.nb_devs++;
 	}
 
diff --git a/lib/librte_eventdev/rte_eventdev_pmd_pci.h b/lib/librte_eventdev/rte_eventdev_pmd_pci.h
index 8fb61386fd..443cd38c23 100644
--- a/lib/librte_eventdev/rte_eventdev_pmd_pci.h
+++ b/lib/librte_eventdev/rte_eventdev_pmd_pci.h
@@ -112,9 +112,11 @@ rte_event_pmd_pci_remove(struct rte_pci_device *pci_dev,
 	if (eventdev == NULL)
 		return -ENODEV;
 
-	ret = rte_event_dev_close(eventdev->data->dev_id);
-	if (ret < 0)
-		return ret;
+	if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
+		ret = rte_event_dev_close(eventdev->data->dev_id);
+		if (ret < 0)
+			return ret;
+	}
 
 	/* Invoke PMD device un-init function */
 	if (devuninit)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:50.922122047 +0100
+++ 0158-eventdev-fix-probe-and-remove-for-secondary-process.patch	2020-05-19 14:04:44.496653448 +0100
@@ -1,8 +1,10 @@
-From a5f30c925b88bb3613535fb27eb3459d19226cd0 Mon Sep 17 00:00:00 2001
+From 85c1aae896b33b12ff65b26e45bdcb8471e2ee02 Mon Sep 17 00:00:00 2001
 From: Pavan Nikhilesh <pbhagavatula@marvell.com>
 Date: Mon, 27 Apr 2020 23:40:38 +0530
 Subject: [PATCH] eventdev: fix probe and remove for secondary process
 
+[ upstream commit a5f30c925b88bb3613535fb27eb3459d19226cd0 ]
+
 When probing event device in secondary process skip reinitializing
 the device data structure as it is already done in primary process.
 
@@ -10,7 +12,6 @@
 event device as it should be done by primary process.
 
 Fixes: 322d0345c2bc ("eventdev: implement PMD registration functions")
-Cc: stable@dpdk.org
 
 Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
 Acked-by: Jerin Jacob <jerinj@marvell.com>
@@ -20,10 +21,10 @@
  2 files changed, 13 insertions(+), 8 deletions(-)
 
 diff --git a/lib/librte_eventdev/rte_eventdev.c b/lib/librte_eventdev/rte_eventdev.c
-index e72d8b941c..82c177c734 100644
+index b987e07454..9aca7fbd52 100644
 --- a/lib/librte_eventdev/rte_eventdev.c
 +++ b/lib/librte_eventdev/rte_eventdev.c
-@@ -1373,14 +1373,17 @@ rte_event_pmd_allocate(const char *name, int socket_id)
+@@ -1364,14 +1364,17 @@ rte_event_pmd_allocate(const char *name, int socket_id)
  
  		eventdev->data = eventdev_data;
  

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

* [dpdk-stable] patch 'event/dsw: avoid reusing previously recorded events' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (156 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'eventdev: fix probe and remove for secondary process' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'common/octeontx: fix gcc 9.1 ABI break' " luca.boccassi
                     ` (54 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Mattias Rönnblom; +Cc: Venky Venkatesh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 9022ffe0031ffea6b711869627945e96760a7bc8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= <mattias.ronnblom@ericsson.com>
Date: Mon, 4 May 2020 11:30:59 +0200
Subject: [PATCH] event/dsw: avoid reusing previously recorded events
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 52b66b2f208aea74e5fc3b004c1e14056bb22970 ]

Avoid reusing recorded events when performing a migration, since this
may make the migration selection logic pick an already-moved flow.

Fixes: f6257b22e767 ("event/dsw: add load balancing")

Reported-by: Venky Venkatesh <vvenkatesh@paloaltonetworks.com>
Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
---
 drivers/event/dsw/dsw_event.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/event/dsw/dsw_event.c b/drivers/event/dsw/dsw_event.c
index 10e44fd497..f3873c54e5 100644
--- a/drivers/event/dsw/dsw_event.c
+++ b/drivers/event/dsw/dsw_event.c
@@ -658,6 +658,9 @@ dsw_port_consider_migration(struct dsw_evdev *dsw,
 	if (dsw->num_ports == 1)
 		return;
 
+	if (seen_events_len < DSW_MAX_EVENTS_RECORDED)
+		return;
+
 	DSW_LOG_DP_PORT(DEBUG, source_port->id, "Considering migration.\n");
 
 	/* Randomize interval to avoid having all threads considering
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:50.967379207 +0100
+++ 0159-event-dsw-avoid-reusing-previously-recorded-events.patch	2020-05-19 14:04:44.500653521 +0100
@@ -1,4 +1,4 @@
-From 52b66b2f208aea74e5fc3b004c1e14056bb22970 Mon Sep 17 00:00:00 2001
+From 9022ffe0031ffea6b711869627945e96760a7bc8 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= <mattias.ronnblom@ericsson.com>
 Date: Mon, 4 May 2020 11:30:59 +0200
 Subject: [PATCH] event/dsw: avoid reusing previously recorded events
@@ -6,11 +6,12 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit 52b66b2f208aea74e5fc3b004c1e14056bb22970 ]
+
 Avoid reusing recorded events when performing a migration, since this
 may make the migration selection logic pick an already-moved flow.
 
 Fixes: f6257b22e767 ("event/dsw: add load balancing")
-Cc: stable@dpdk.org
 
 Reported-by: Venky Venkatesh <vvenkatesh@paloaltonetworks.com>
 Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
@@ -19,17 +20,17 @@
  1 file changed, 3 insertions(+)
 
 diff --git a/drivers/event/dsw/dsw_event.c b/drivers/event/dsw/dsw_event.c
-index 8323903736..e5e3597aae 100644
+index 10e44fd497..f3873c54e5 100644
 --- a/drivers/event/dsw/dsw_event.c
 +++ b/drivers/event/dsw/dsw_event.c
-@@ -821,6 +821,9 @@ dsw_port_consider_emigration(struct dsw_evdev *dsw,
+@@ -658,6 +658,9 @@ dsw_port_consider_migration(struct dsw_evdev *dsw,
  	if (dsw->num_ports == 1)
  		return;
  
 +	if (seen_events_len < DSW_MAX_EVENTS_RECORDED)
 +		return;
 +
- 	DSW_LOG_DP_PORT(DEBUG, source_port->id, "Considering emigration.\n");
+ 	DSW_LOG_DP_PORT(DEBUG, source_port->id, "Considering migration.\n");
  
  	/* Randomize interval to avoid having all threads considering
 -- 

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

* [dpdk-stable] patch 'common/octeontx: fix gcc 9.1 ABI break' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (157 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'event/dsw: avoid reusing previously recorded events' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'mk: fix static linkage of mlx dependency' " luca.boccassi
                     ` (53 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: Harman Kalra, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From d104eb2c03edfb1eb2caaa0a2efeac10e00c8564 Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Sat, 2 May 2020 21:40:31 +0530
Subject: [PATCH] common/octeontx: fix gcc 9.1 ABI break
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 838d94399b18f26beb1a39998bb9503b38c4a093 ]

GCC 9.1 fixes a bug with passing bitfields as pass by value in function
parameters and generates a warning for the same as below:

drivers/common/octeontx/octeontx_mbox.c:282:1: note: parameter passing
for argument of type ‘struct mbox_intf_ver’ changed in GCC 9.1

Fix the warning generated by passing bitfield as pass by reference.

Fixes: b4134b2d31cc ("common/octeontx: update mbox to version 1.1.3")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Harman Kalra <hkalra@marvell.com>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/common/octeontx/octeontx_mbox.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/drivers/common/octeontx/octeontx_mbox.c b/drivers/common/octeontx/octeontx_mbox.c
index 2fd2531072..effe0b267e 100644
--- a/drivers/common/octeontx/octeontx_mbox.c
+++ b/drivers/common/octeontx/octeontx_mbox.c
@@ -279,7 +279,7 @@ octeontx_start_domain(void)
 }
 
 static int
-octeontx_check_mbox_version(struct mbox_intf_ver app_intf_ver,
+octeontx_check_mbox_version(struct mbox_intf_ver *app_intf_ver,
 			    struct mbox_intf_ver *intf_ver)
 {
 	struct mbox_intf_ver kernel_intf_ver = {0};
@@ -290,8 +290,9 @@ octeontx_check_mbox_version(struct mbox_intf_ver app_intf_ver,
 	hdr.coproc = NO_COPROC;
 	hdr.msg = RM_INTERFACE_VERSION;
 
-	result = octeontx_mbox_send(&hdr, &app_intf_ver, sizeof(app_intf_ver),
-			&kernel_intf_ver, sizeof(kernel_intf_ver));
+	result = octeontx_mbox_send(&hdr, app_intf_ver,
+				    sizeof(struct mbox_intf_ver),
+				    &kernel_intf_ver, sizeof(kernel_intf_ver));
 	if (result != sizeof(kernel_intf_ver)) {
 		mbox_log_err("Could not send interface version. Err=%d. FuncErr=%d\n",
 			     result, hdr.res_code);
@@ -301,9 +302,9 @@ octeontx_check_mbox_version(struct mbox_intf_ver app_intf_ver,
 	if (intf_ver)
 		*intf_ver = kernel_intf_ver;
 
-	if (app_intf_ver.platform != kernel_intf_ver.platform ||
-			app_intf_ver.major != kernel_intf_ver.major ||
-			app_intf_ver.minor != kernel_intf_ver.minor)
+	if (app_intf_ver->platform != kernel_intf_ver.platform ||
+			app_intf_ver->major != kernel_intf_ver.major ||
+			app_intf_ver->minor != kernel_intf_ver.minor)
 		result = -EINVAL;
 
 	return result;
@@ -312,7 +313,7 @@ octeontx_check_mbox_version(struct mbox_intf_ver app_intf_ver,
 int
 octeontx_mbox_init(void)
 {
-	const struct mbox_intf_ver MBOX_INTERFACE_VERSION = {
+	struct mbox_intf_ver MBOX_INTERFACE_VERSION = {
 		.platform = 0x01,
 		.major = 0x01,
 		.minor = 0x03
@@ -330,7 +331,7 @@ octeontx_mbox_init(void)
 		return ret;
 	}
 
-	ret = octeontx_check_mbox_version(MBOX_INTERFACE_VERSION,
+	ret = octeontx_check_mbox_version(&MBOX_INTERFACE_VERSION,
 					  &rm_intf_ver);
 	if (ret < 0) {
 		mbox_log_err("MBOX version: Kernel(%d.%d.%d) != DPDK(%d.%d.%d)",
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:51.011822064 +0100
+++ 0160-common-octeontx-fix-gcc-9.1-ABI-break.patch	2020-05-19 14:04:44.500653521 +0100
@@ -1,4 +1,4 @@
-From 838d94399b18f26beb1a39998bb9503b38c4a093 Mon Sep 17 00:00:00 2001
+From d104eb2c03edfb1eb2caaa0a2efeac10e00c8564 Mon Sep 17 00:00:00 2001
 From: Pavan Nikhilesh <pbhagavatula@marvell.com>
 Date: Sat, 2 May 2020 21:40:31 +0530
 Subject: [PATCH] common/octeontx: fix gcc 9.1 ABI break
@@ -6,6 +6,8 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit 838d94399b18f26beb1a39998bb9503b38c4a093 ]
+
 GCC 9.1 fixes a bug with passing bitfields as pass by value in function
 parameters and generates a warning for the same as below:
 
@@ -15,7 +17,6 @@
 Fix the warning generated by passing bitfield as pass by reference.
 
 Fixes: b4134b2d31cc ("common/octeontx: update mbox to version 1.1.3")
-Cc: stable@dpdk.org
 
 Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
 Acked-by: Harman Kalra <hkalra@marvell.com>

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

* [dpdk-stable] patch 'mk: fix static linkage of mlx dependency' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (158 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'common/octeontx: fix gcc 9.1 ABI break' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'service: fix race condition for MT unsafe service' " luca.boccassi
                     ` (52 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Bing Zhao; +Cc: Thomas Monjalon, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From c4c95316484c1f2ece020eb64444647954a64832 Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@mellanox.com>
Date: Wed, 29 Apr 2020 20:11:55 +0800
Subject: [PATCH] mk: fix static linkage of mlx dependency

[ upstream commit c093e28f494d92f71fd3ce16a8daacb0cf1715ae ]

When building a target application with static linking mode via
makefiles and enable linking to ibverbs libs by setting
"CONFIG_RTE_IBVERBS_LINK_STATIC=y". The libibverbs.pc will be
chosen and all the libs listed in the file will be linked
by default. Some static lib archives may contain the same files
and common interfaces inside.
The "--no-whole-archive" needs to be enabled for the linker to
discard the useless symbols and resolve the symbols redefinition
error.

Fixes: 2c0dd7b69fb0 ("config: add static linkage of mlx dependency")

Signed-off-by: Bing Zhao <bingz@mellanox.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
---
 mk/rte.app.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index 05ea034b99..44dd684cb1 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -196,8 +196,12 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD)       += -ldl
 _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD)       += -ldl
 else ifeq ($(CONFIG_RTE_IBVERBS_LINK_STATIC),y)
 LIBS_IBVERBS_STATIC = $(shell $(RTE_SDK)/buildtools/options-ibverbs-static.sh)
+_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD)       += --no-whole-archive
 _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD)       += $(LIBS_IBVERBS_STATIC)
+_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD)       += --whole-archive
+_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD)       += --no-whole-archive
 _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD)       += $(LIBS_IBVERBS_STATIC)
+_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD)       += --whole-archive
 else
 _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD)       += -libverbs -lmlx4
 _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD)       += -libverbs -lmlx5
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:51.054695246 +0100
+++ 0161-mk-fix-static-linkage-of-mlx-dependency.patch	2020-05-19 14:04:44.500653521 +0100
@@ -1,8 +1,10 @@
-From c093e28f494d92f71fd3ce16a8daacb0cf1715ae Mon Sep 17 00:00:00 2001
+From c4c95316484c1f2ece020eb64444647954a64832 Mon Sep 17 00:00:00 2001
 From: Bing Zhao <bingz@mellanox.com>
 Date: Wed, 29 Apr 2020 20:11:55 +0800
 Subject: [PATCH] mk: fix static linkage of mlx dependency
 
+[ upstream commit c093e28f494d92f71fd3ce16a8daacb0cf1715ae ]
+
 When building a target application with static linking mode via
 makefiles and enable linking to ibverbs libs by setting
 "CONFIG_RTE_IBVERBS_LINK_STATIC=y". The libibverbs.pc will be
@@ -14,28 +16,30 @@
 error.
 
 Fixes: 2c0dd7b69fb0 ("config: add static linkage of mlx dependency")
-Cc: stable@dpdk.org
 
 Signed-off-by: Bing Zhao <bingz@mellanox.com>
 Acked-by: Thomas Monjalon <thomas@monjalon.net>
 ---
- mk/rte.app.mk | 2 ++
- 1 file changed, 2 insertions(+)
+ mk/rte.app.mk | 4 ++++
+ 1 file changed, 4 insertions(+)
 
 diff --git a/mk/rte.app.mk b/mk/rte.app.mk
-index 244e74d883..db619c5e3f 100644
+index 05ea034b99..44dd684cb1 100644
 --- a/mk/rte.app.mk
 +++ b/mk/rte.app.mk
-@@ -209,7 +209,9 @@ ifeq ($(CONFIG_RTE_IBVERBS_LINK_DLOPEN),y)
- _LDLIBS-y                                   += -ldl
+@@ -196,8 +196,12 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD)       += -ldl
+ _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD)       += -ldl
  else ifeq ($(CONFIG_RTE_IBVERBS_LINK_STATIC),y)
  LIBS_IBVERBS_STATIC = $(shell $(RTE_SDK)/buildtools/options-ibverbs-static.sh)
-+_LDLIBS-y                                   += --no-whole-archive
- _LDLIBS-y                                   += $(LIBS_IBVERBS_STATIC)
-+_LDLIBS-y                                   += --whole-archive
++_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD)       += --no-whole-archive
+ _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD)       += $(LIBS_IBVERBS_STATIC)
++_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD)       += --whole-archive
++_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD)       += --no-whole-archive
+ _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD)       += $(LIBS_IBVERBS_STATIC)
++_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD)       += --whole-archive
  else
- ifeq ($(findstring y,$(CONFIG_RTE_LIBRTE_MLX5_PMD)$(CONFIG_RTE_LIBRTE_MLX5_VDPA_PMD)),y)
- _LDLIBS-y                                   += -libverbs -lmlx5
+ _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD)       += -libverbs -lmlx4
+ _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD)       += -libverbs -lmlx5
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'service: fix race condition for MT unsafe service' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (159 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'mk: fix static linkage of mlx dependency' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'service: fix identification of service running on other lcore' " luca.boccassi
                     ` (51 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Honnappa Nagarahalli; +Cc: Phil Yang, Harry van Haaren, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From c4bcf57075dbc3763c697925f8664d9ff1ae84f1 Mon Sep 17 00:00:00 2001
From: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Date: Wed, 6 May 2020 23:27:59 +0800
Subject: [PATCH] service: fix race condition for MT unsafe service

[ upstream commit 18cae99cb9096abe0f33b43e51eb8b781e8a5ff9 ]

A MT unsafe service might get configured to run on another core
while the service is running currently. This might result in the
MT unsafe service running on multiple cores simultaneously. Use
'execute_lock' always when the service is MT unsafe.

If the service is known to be mapped on a single lcore,
setting the service capability to MT safe will avoid taking
the lock and improve the performance.

Fixes: e9139a32f6e8 ("service: add function to run on app lcore")

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
---
 lib/librte_eal/common/include/rte_service.h           |  8 ++++++--
 lib/librte_eal/common/include/rte_service_component.h |  6 +++++-
 lib/librte_eal/common/rte_service.c                   | 11 +++++------
 3 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/lib/librte_eal/common/include/rte_service.h b/lib/librte_eal/common/include/rte_service.h
index d8701dd4cf..3a1c735c58 100644
--- a/lib/librte_eal/common/include/rte_service.h
+++ b/lib/librte_eal/common/include/rte_service.h
@@ -104,12 +104,16 @@ int32_t rte_service_probe_capability(uint32_t id, uint32_t capability);
  * Each core can be added or removed from running a specific service. This
  * function enables or disables *lcore* to run *service_id*.
  *
- * If multiple cores are enabled on a service, an atomic is used to ensure that
- * only one cores runs the service at a time. The exception to this is when
+ * If multiple cores are enabled on a service, a lock is used to ensure that
+ * only one core runs the service at a time. The exception to this is when
  * a service indicates that it is multi-thread safe by setting the capability
  * called RTE_SERVICE_CAP_MT_SAFE. With the multi-thread safe capability set,
  * the service function can be run on multiple threads at the same time.
  *
+ * If the service is known to be mapped to a single lcore, setting the
+ * capability of the service to RTE_SERVICE_CAP_MT_SAFE can achieve
+ * better performance by avoiding the use of lock.
+ *
  * @param service_id the service to apply the lcore to
  * @param lcore The lcore that will be mapped to service
  * @param enable Zero to unmap or disable the core, non-zero to enable
diff --git a/lib/librte_eal/common/include/rte_service_component.h b/lib/librte_eal/common/include/rte_service_component.h
index 16eab79eea..b75aba11b9 100644
--- a/lib/librte_eal/common/include/rte_service_component.h
+++ b/lib/librte_eal/common/include/rte_service_component.h
@@ -43,7 +43,7 @@ struct rte_service_spec {
 /**
  * Register a new service.
  *
- * A service represents a component that the requires CPU time periodically to
+ * A service represents a component that requires CPU time periodically to
  * achieve its purpose.
  *
  * For example the eventdev SW PMD requires CPU cycles to perform its
@@ -56,6 +56,10 @@ struct rte_service_spec {
  * *rte_service_component_runstate_set*, which indicates that the service
  * component is ready to be executed.
  *
+ * If the service is known to be mapped to a single lcore, setting the
+ * capability of the service to RTE_SERVICE_CAP_MT_SAFE can achieve
+ * better performance.
+ *
  * @param spec The specification of the service to register
  * @param[out] service_id A pointer to a uint32_t, which will be filled in
  *             during registration of the service. It is set to the integers
diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c
index b0b78baabd..4cf5254cc3 100644
--- a/lib/librte_eal/common/rte_service.c
+++ b/lib/librte_eal/common/rte_service.c
@@ -50,6 +50,10 @@ struct rte_service_spec_impl {
 	uint8_t internal_flags;
 
 	/* per service statistics */
+	/* Indicates how many cores the service is mapped to run on.
+	 * It does not indicate the number of cores the service is running
+	 * on currently.
+	 */
 	rte_atomic32_t num_mapped_cores;
 	uint64_t calls;
 	uint64_t cycles_spent;
@@ -370,12 +374,7 @@ service_run(uint32_t i, struct core_state *cs, uint64_t service_mask,
 
 	cs->service_active_on_lcore[i] = 1;
 
-	/* check do we need cmpset, if MT safe or <= 1 core
-	 * mapped, atomic ops are not required.
-	 */
-	const int use_atomics = (service_mt_safe(s) == 0) &&
-				(rte_atomic32_read(&s->num_mapped_cores) > 1);
-	if (use_atomics) {
+	if (service_mt_safe(s) == 0) {
 		if (!rte_atomic32_cmpset((uint32_t *)&s->execute_lock, 0, 1))
 			return -EBUSY;
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:51.094341615 +0100
+++ 0162-service-fix-race-condition-for-MT-unsafe-service.patch	2020-05-19 14:04:44.500653521 +0100
@@ -1,8 +1,10 @@
-From 18cae99cb9096abe0f33b43e51eb8b781e8a5ff9 Mon Sep 17 00:00:00 2001
+From c4bcf57075dbc3763c697925f8664d9ff1ae84f1 Mon Sep 17 00:00:00 2001
 From: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
 Date: Wed, 6 May 2020 23:27:59 +0800
 Subject: [PATCH] service: fix race condition for MT unsafe service
 
+[ upstream commit 18cae99cb9096abe0f33b43e51eb8b781e8a5ff9 ]
+
 A MT unsafe service might get configured to run on another core
 while the service is running currently. This might result in the
 MT unsafe service running on multiple cores simultaneously. Use
@@ -13,50 +15,20 @@
 the lock and improve the performance.
 
 Fixes: e9139a32f6e8 ("service: add function to run on app lcore")
-Cc: stable@dpdk.org
 
 Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
 Reviewed-by: Phil Yang <phil.yang@arm.com>
 Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
 ---
- lib/librte_eal/common/rte_service.c            | 11 +++++------
- lib/librte_eal/include/rte_service.h           |  8 ++++++--
- lib/librte_eal/include/rte_service_component.h |  6 +++++-
+ lib/librte_eal/common/include/rte_service.h           |  8 ++++++--
+ lib/librte_eal/common/include/rte_service_component.h |  6 +++++-
+ lib/librte_eal/common/rte_service.c                   | 11 +++++------
  3 files changed, 16 insertions(+), 9 deletions(-)
 
-diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c
-index 70d17a5d79..b8c465eb96 100644
---- a/lib/librte_eal/common/rte_service.c
-+++ b/lib/librte_eal/common/rte_service.c
-@@ -50,6 +50,10 @@ struct rte_service_spec_impl {
- 	uint8_t internal_flags;
- 
- 	/* per service statistics */
-+	/* Indicates how many cores the service is mapped to run on.
-+	 * It does not indicate the number of cores the service is running
-+	 * on currently.
-+	 */
- 	rte_atomic32_t num_mapped_cores;
- 	uint64_t calls;
- 	uint64_t cycles_spent;
-@@ -370,12 +374,7 @@ service_run(uint32_t i, struct core_state *cs, uint64_t service_mask,
- 
- 	cs->service_active_on_lcore[i] = 1;
- 
--	/* check do we need cmpset, if MT safe or <= 1 core
--	 * mapped, atomic ops are not required.
--	 */
--	const int use_atomics = (service_mt_safe(s) == 0) &&
--				(rte_atomic32_read(&s->num_mapped_cores) > 1);
--	if (use_atomics) {
-+	if (service_mt_safe(s) == 0) {
- 		if (!rte_atomic32_cmpset((uint32_t *)&s->execute_lock, 0, 1))
- 			return -EBUSY;
- 
-diff --git a/lib/librte_eal/include/rte_service.h b/lib/librte_eal/include/rte_service.h
+diff --git a/lib/librte_eal/common/include/rte_service.h b/lib/librte_eal/common/include/rte_service.h
 index d8701dd4cf..3a1c735c58 100644
---- a/lib/librte_eal/include/rte_service.h
-+++ b/lib/librte_eal/include/rte_service.h
+--- a/lib/librte_eal/common/include/rte_service.h
++++ b/lib/librte_eal/common/include/rte_service.h
 @@ -104,12 +104,16 @@ int32_t rte_service_probe_capability(uint32_t id, uint32_t capability);
   * Each core can be added or removed from running a specific service. This
   * function enables or disables *lcore* to run *service_id*.
@@ -76,10 +48,10 @@
   * @param service_id the service to apply the lcore to
   * @param lcore The lcore that will be mapped to service
   * @param enable Zero to unmap or disable the core, non-zero to enable
-diff --git a/lib/librte_eal/include/rte_service_component.h b/lib/librte_eal/include/rte_service_component.h
+diff --git a/lib/librte_eal/common/include/rte_service_component.h b/lib/librte_eal/common/include/rte_service_component.h
 index 16eab79eea..b75aba11b9 100644
---- a/lib/librte_eal/include/rte_service_component.h
-+++ b/lib/librte_eal/include/rte_service_component.h
+--- a/lib/librte_eal/common/include/rte_service_component.h
++++ b/lib/librte_eal/common/include/rte_service_component.h
 @@ -43,7 +43,7 @@ struct rte_service_spec {
  /**
   * Register a new service.
@@ -100,6 +72,35 @@
   * @param spec The specification of the service to register
   * @param[out] service_id A pointer to a uint32_t, which will be filled in
   *             during registration of the service. It is set to the integers
+diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c
+index b0b78baabd..4cf5254cc3 100644
+--- a/lib/librte_eal/common/rte_service.c
++++ b/lib/librte_eal/common/rte_service.c
+@@ -50,6 +50,10 @@ struct rte_service_spec_impl {
+ 	uint8_t internal_flags;
+ 
+ 	/* per service statistics */
++	/* Indicates how many cores the service is mapped to run on.
++	 * It does not indicate the number of cores the service is running
++	 * on currently.
++	 */
+ 	rte_atomic32_t num_mapped_cores;
+ 	uint64_t calls;
+ 	uint64_t cycles_spent;
+@@ -370,12 +374,7 @@ service_run(uint32_t i, struct core_state *cs, uint64_t service_mask,
+ 
+ 	cs->service_active_on_lcore[i] = 1;
+ 
+-	/* check do we need cmpset, if MT safe or <= 1 core
+-	 * mapped, atomic ops are not required.
+-	 */
+-	const int use_atomics = (service_mt_safe(s) == 0) &&
+-				(rte_atomic32_read(&s->num_mapped_cores) > 1);
+-	if (use_atomics) {
++	if (service_mt_safe(s) == 0) {
+ 		if (!rte_atomic32_cmpset((uint32_t *)&s->execute_lock, 0, 1))
+ 			return -EBUSY;
+ 
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'service: fix identification of service running on other lcore' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (160 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'service: fix race condition for MT unsafe service' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:04   ` [dpdk-stable] patch 'service: remove rte prefix from static functions' " luca.boccassi
                     ` (50 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Honnappa Nagarahalli; +Cc: Phil Yang, Harry van Haaren, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 99303c675dd25151ed360468a049c909531dad1e Mon Sep 17 00:00:00 2001
From: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Date: Wed, 6 May 2020 23:28:00 +0800
Subject: [PATCH] service: fix identification of service running on other lcore

[ upstream commit 5c76111f068c4ef8aff4f5b4e2e641a21ff733a0 ]

The logic to identify if the MT unsafe service is running on another
core can return -EBUSY spuriously. In such cases, running the service
becomes costlier than using atomic operations. Assume that the
application passes the right parameters and reduce the number of
instructions for all cases.

Fixes: 8d39d3e237c2 ("service: fix race in service on app lcore function")

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
---
 lib/librte_eal/common/rte_service.c | 26 ++++++++------------------
 1 file changed, 8 insertions(+), 18 deletions(-)

diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c
index 4cf5254cc3..62618910f6 100644
--- a/lib/librte_eal/common/rte_service.c
+++ b/lib/librte_eal/common/rte_service.c
@@ -360,7 +360,7 @@ rte_service_runner_do_callback(struct rte_service_spec_impl *s,
 /* 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)
+	    struct rte_service_spec_impl *s, uint32_t serialize_mt_unsafe)
 {
 	if (!s)
 		return -EINVAL;
@@ -374,7 +374,7 @@ service_run(uint32_t i, struct core_state *cs, uint64_t service_mask,
 
 	cs->service_active_on_lcore[i] = 1;
 
-	if (service_mt_safe(s) == 0) {
+	if ((service_mt_safe(s) == 0) && (serialize_mt_unsafe == 1)) {
 		if (!rte_atomic32_cmpset((uint32_t *)&s->execute_lock, 0, 1))
 			return -EBUSY;
 
@@ -412,24 +412,14 @@ rte_service_run_iter_on_app_lcore(uint32_t id, uint32_t serialize_mt_unsafe)
 
 	SERVICE_VALID_GET_OR_ERR_RET(id, s, -EINVAL);
 
-	/* Atomically add this core to the mapped cores first, then examine if
-	 * we can run the service. This avoids a race condition between
-	 * checking the value, and atomically adding to the mapped count.
+	/* Increment num_mapped_cores to reflect that this core is
+	 * now mapped capable of running the service.
 	 */
-	if (serialize_mt_unsafe)
-		rte_atomic32_inc(&s->num_mapped_cores);
+	rte_atomic32_inc(&s->num_mapped_cores);
 
-	if (service_mt_safe(s) == 0 &&
-			rte_atomic32_read(&s->num_mapped_cores) > 1) {
-		if (serialize_mt_unsafe)
-			rte_atomic32_dec(&s->num_mapped_cores);
-		return -EBUSY;
-	}
+	int ret = service_run(id, cs, UINT64_MAX, s, serialize_mt_unsafe);
 
-	int ret = service_run(id, cs, UINT64_MAX, s);
-
-	if (serialize_mt_unsafe)
-		rte_atomic32_dec(&s->num_mapped_cores);
+	rte_atomic32_dec(&s->num_mapped_cores);
 
 	return ret;
 }
@@ -449,7 +439,7 @@ rte_service_runner_func(void *arg)
 			if (!service_valid(i))
 				continue;
 			/* return value ignored as no change to code flow */
-			service_run(i, cs, service_mask, service_get(i));
+			service_run(i, cs, service_mask, service_get(i), 1);
 		}
 
 		cs->loops++;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:51.136888089 +0100
+++ 0163-service-fix-identification-of-service-running-on-oth.patch	2020-05-19 14:04:44.504653593 +0100
@@ -1,15 +1,16 @@
-From 5c76111f068c4ef8aff4f5b4e2e641a21ff733a0 Mon Sep 17 00:00:00 2001
+From 99303c675dd25151ed360468a049c909531dad1e Mon Sep 17 00:00:00 2001
 From: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
 Date: Wed, 6 May 2020 23:28:00 +0800
 Subject: [PATCH] service: fix identification of service running on other lcore
 
+[ upstream commit 5c76111f068c4ef8aff4f5b4e2e641a21ff733a0 ]
+
 The logic to identify if the MT unsafe service is running on another
 core can return -EBUSY spuriously. In such cases, running the service
 becomes costlier than using atomic operations. Assume that the
 application passes the right parameters and reduce the number of
 instructions for all cases.
 
-Cc: stable@dpdk.org
 Fixes: 8d39d3e237c2 ("service: fix race in service on app lcore function")
 
 Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
@@ -20,7 +21,7 @@
  1 file changed, 8 insertions(+), 18 deletions(-)
 
 diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c
-index b8c465eb96..c283408cf1 100644
+index 4cf5254cc3..62618910f6 100644
 --- a/lib/librte_eal/common/rte_service.c
 +++ b/lib/librte_eal/common/rte_service.c
 @@ -360,7 +360,7 @@ rte_service_runner_do_callback(struct rte_service_spec_impl *s,

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

* [dpdk-stable] patch 'service: remove rte prefix from static functions' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (161 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'service: fix identification of service running on other lcore' " luca.boccassi
@ 2020-05-19 13:04   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'remove references to private PCI probe function' " luca.boccassi
                     ` (49 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:04 UTC (permalink / raw)
  To: Phil Yang; +Cc: Honnappa Nagarahalli, Harry van Haaren, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From d8aeeb8cfbefb964b97d3eb1b78f4fd8be29f1b5 Mon Sep 17 00:00:00 2001
From: Phil Yang <phil.yang@arm.com>
Date: Wed, 6 May 2020 23:28:01 +0800
Subject: [PATCH] service: remove rte prefix from static functions

[ upstream commit 7a0ad72f6e1fc31e020af77d102dc2f1e67d52b9 ]

clean up rte prefix from static functions.
remove unused parameter for service_dump_one function.

Signed-off-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
---
 lib/librte_eal/common/rte_service.c | 36 ++++++++++-------------------
 1 file changed, 12 insertions(+), 24 deletions(-)

diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c
index 62618910f6..d5dd32d8d9 100644
--- a/lib/librte_eal/common/rte_service.c
+++ b/lib/librte_eal/common/rte_service.c
@@ -340,8 +340,8 @@ rte_service_runstate_get(uint32_t id)
 }
 
 static inline void
-rte_service_runner_do_callback(struct rte_service_spec_impl *s,
-			       struct core_state *cs, uint32_t service_idx)
+service_runner_do_callback(struct rte_service_spec_impl *s,
+			   struct core_state *cs, uint32_t service_idx)
 {
 	void *userdata = s->spec.callback_userdata;
 
@@ -378,10 +378,10 @@ service_run(uint32_t i, struct core_state *cs, uint64_t service_mask,
 		if (!rte_atomic32_cmpset((uint32_t *)&s->execute_lock, 0, 1))
 			return -EBUSY;
 
-		rte_service_runner_do_callback(s, cs, i);
+		service_runner_do_callback(s, cs, i);
 		rte_atomic32_clear(&s->execute_lock);
 	} else
-		rte_service_runner_do_callback(s, cs, i);
+		service_runner_do_callback(s, cs, i);
 
 	return 0;
 }
@@ -425,14 +425,14 @@ rte_service_run_iter_on_app_lcore(uint32_t id, uint32_t serialize_mt_unsafe)
 }
 
 static int32_t
-rte_service_runner_func(void *arg)
+service_runner_func(void *arg)
 {
 	RTE_SET_USED(arg);
 	uint32_t i;
 	const int lcore = rte_lcore_id();
 	struct core_state *cs = &lcore_states[lcore];
 
-	while (lcore_states[lcore].runstate == RUNSTATE_RUNNING) {
+	while (cs->runstate == RUNSTATE_RUNNING) {
 		const uint64_t service_mask = cs->service_mask;
 
 		for (i = 0; i < RTE_SERVICE_NUM_MAX; i++) {
@@ -693,9 +693,9 @@ rte_service_lcore_start(uint32_t lcore)
 	/* set core to run state first, and then launch otherwise it will
 	 * return immediately as runstate keeps it in the service poll loop
 	 */
-	lcore_states[lcore].runstate = RUNSTATE_RUNNING;
+	cs->runstate = RUNSTATE_RUNNING;
 
-	int ret = rte_eal_remote_launch(rte_service_runner_func, 0, lcore);
+	int ret = rte_eal_remote_launch(service_runner_func, 0, lcore);
 	/* returns -EBUSY if the core is already launched, 0 on success */
 	return ret;
 }
@@ -774,13 +774,9 @@ rte_service_lcore_attr_get(uint32_t lcore, uint32_t attr_id,
 }
 
 static void
-rte_service_dump_one(FILE *f, struct rte_service_spec_impl *s,
-		     uint64_t all_cycles, uint32_t reset)
+service_dump_one(FILE *f, struct rte_service_spec_impl *s, uint32_t reset)
 {
 	/* avoid divide by zero */
-	if (all_cycles == 0)
-		all_cycles = 1;
-
 	int calls = 1;
 	if (s->calls != 0)
 		calls = s->calls;
@@ -807,7 +803,7 @@ rte_service_attr_reset_all(uint32_t id)
 	SERVICE_VALID_GET_OR_ERR_RET(id, s, -EINVAL);
 
 	int reset = 1;
-	rte_service_dump_one(NULL, s, 0, reset);
+	service_dump_one(NULL, s, reset);
 	return 0;
 }
 
@@ -851,21 +847,13 @@ rte_service_dump(FILE *f, uint32_t id)
 	uint32_t i;
 	int print_one = (id != UINT32_MAX);
 
-	uint64_t total_cycles = 0;
-
-	for (i = 0; i < RTE_SERVICE_NUM_MAX; i++) {
-		if (!service_valid(i))
-			continue;
-		total_cycles += rte_services[i].cycles_spent;
-	}
-
 	/* print only the specified service */
 	if (print_one) {
 		struct rte_service_spec_impl *s;
 		SERVICE_VALID_GET_OR_ERR_RET(id, s, -EINVAL);
 		fprintf(f, "Service %s Summary\n", s->spec.name);
 		uint32_t reset = 0;
-		rte_service_dump_one(f, s, total_cycles, reset);
+		service_dump_one(f, s, reset);
 		return 0;
 	}
 
@@ -875,7 +863,7 @@ rte_service_dump(FILE *f, uint32_t id)
 		if (!service_valid(i))
 			continue;
 		uint32_t reset = 0;
-		rte_service_dump_one(f, &rte_services[i], total_cycles, reset);
+		service_dump_one(f, &rte_services[i], reset);
 	}
 
 	fprintf(f, "Service Cores Summary\n");
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:51.178390228 +0100
+++ 0164-service-remove-rte-prefix-from-static-functions.patch	2020-05-19 14:04:44.504653593 +0100
@@ -1,8 +1,10 @@
-From 7a0ad72f6e1fc31e020af77d102dc2f1e67d52b9 Mon Sep 17 00:00:00 2001
+From d8aeeb8cfbefb964b97d3eb1b78f4fd8be29f1b5 Mon Sep 17 00:00:00 2001
 From: Phil Yang <phil.yang@arm.com>
 Date: Wed, 6 May 2020 23:28:01 +0800
 Subject: [PATCH] service: remove rte prefix from static functions
 
+[ upstream commit 7a0ad72f6e1fc31e020af77d102dc2f1e67d52b9 ]
+
 clean up rte prefix from static functions.
 remove unused parameter for service_dump_one function.
 
@@ -14,7 +16,7 @@
  1 file changed, 12 insertions(+), 24 deletions(-)
 
 diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c
-index c283408cf1..94266e83ff 100644
+index 62618910f6..d5dd32d8d9 100644
 --- a/lib/librte_eal/common/rte_service.c
 +++ b/lib/librte_eal/common/rte_service.c
 @@ -340,8 +340,8 @@ rte_service_runstate_get(uint32_t id)

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

* [dpdk-stable] patch 'remove references to private PCI probe function' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (162 preceding siblings ...)
  2020-05-19 13:04   ` [dpdk-stable] patch 'service: remove rte prefix from static functions' " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'examples/l2fwd-keepalive: fix mbuf pool size' " luca.boccassi
                     ` (48 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: David Marchand; +Cc: Gaetan Rivet, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From deb055888f02324a3791b10421e871a6b9a1f28b Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 6 May 2020 14:43:13 +0200
Subject: [PATCH] remove references to private PCI probe function

[ upstream commit 87db93e07aeeecc96a9e63b43a652511b95013d6 ]

rte_pci_probe() is private to the PCI bus.
Clean the remaining references in the documentation and comments.

Fixes: c752998b5e2e ("pci: introduce library and driver")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Gaetan Rivet <grive@u256.net>
---
 doc/guides/sample_app_ug/l2_forward_event.rst        |  8 --------
 doc/guides/sample_app_ug/l2_forward_real_virtual.rst |  9 ---------
 doc/guides/sample_app_ug/link_status_intr.rst        |  7 -------
 doc/guides/sample_app_ug/multi_process.rst           |  2 +-
 drivers/bus/pci/pci_common.c                         |  6 +++---
 drivers/bus/pci/private.h                            | 10 ----------
 drivers/net/virtio/virtio_user_ethdev.c              |  2 +-
 7 files changed, 5 insertions(+), 39 deletions(-)

diff --git a/doc/guides/sample_app_ug/l2_forward_event.rst b/doc/guides/sample_app_ug/l2_forward_event.rst
index 8c519c3046..c5fad93d00 100644
--- a/doc/guides/sample_app_ug/l2_forward_event.rst
+++ b/doc/guides/sample_app_ug/l2_forward_event.rst
@@ -202,9 +202,6 @@ chapters that related to the Poll Mode and Event mode Driver in the
 
 .. code-block:: c
 
-    if (rte_pci_probe() < 0)
-        rte_panic("Cannot probe PCI\n");
-
     /* reset l2fwd_dst_ports */
 
     for (portid = 0; portid < RTE_MAX_ETHPORTS; portid++)
@@ -234,11 +231,6 @@ chapters that related to the Poll Mode and Event mode Driver in the
         rte_eth_dev_info_get((uint8_t) portid, &dev_info);
     }
 
-Observe that:
-
-*   rte_pci_probe() parses the devices on the PCI bus and initializes recognized
-    devices.
-
 The next step is to configure the RX and TX queues. For each port, there is only
 one RX queue (only one lcore is able to poll a given port). The number of TX
 queues depends on the number of available lcores. The rte_eth_dev_configure()
diff --git a/doc/guides/sample_app_ug/l2_forward_real_virtual.rst b/doc/guides/sample_app_ug/l2_forward_real_virtual.rst
index 39d6b0067a..671d0c7c19 100644
--- a/doc/guides/sample_app_ug/l2_forward_real_virtual.rst
+++ b/doc/guides/sample_app_ug/l2_forward_real_virtual.rst
@@ -194,9 +194,6 @@ in the *DPDK Programmer's Guide* - Rel 1.4 EAR and the *DPDK API Reference*.
 
 .. code-block:: c
 
-    if (rte_pci_probe() < 0)
-        rte_exit(EXIT_FAILURE, "Cannot probe PCI\n");
-
     /* reset l2fwd_dst_ports */
 
     for (portid = 0; portid < RTE_MAX_ETHPORTS; portid++)
@@ -226,12 +223,6 @@ in the *DPDK Programmer's Guide* - Rel 1.4 EAR and the *DPDK API Reference*.
         rte_eth_dev_info_get((uint8_t) portid, &dev_info);
     }
 
-Observe that:
-
-*   rte_igb_pmd_init_all() simultaneously registers the driver as a PCI driver and as an Ethernet* Poll Mode Driver.
-
-*   rte_pci_probe() parses the devices on the PCI bus and initializes recognized devices.
-
 The next step is to configure the RX and TX queues.
 For each port, there is only one RX queue (only one lcore is able to poll a given port).
 The number of TX queues depends on the number of available lcores.
diff --git a/doc/guides/sample_app_ug/link_status_intr.rst b/doc/guides/sample_app_ug/link_status_intr.rst
index 5283be8b7c..04c40f2854 100644
--- a/doc/guides/sample_app_ug/link_status_intr.rst
+++ b/doc/guides/sample_app_ug/link_status_intr.rst
@@ -88,9 +88,6 @@ To fully understand this code, it is recommended to study the chapters that rela
 
 .. code-block:: c
 
-    if (rte_pci_probe() < 0)
-        rte_exit(EXIT_FAILURE, "Cannot probe PCI\n");
-
     /*
      * Each logical core is assigned a dedicated TX queue on each port.
      */
@@ -115,10 +112,6 @@ To fully understand this code, it is recommended to study the chapters that rela
         rte_eth_dev_info_get((uint8_t) portid, &dev_info);
     }
 
-Observe that:
-
-*   rte_pci_probe()  parses the devices on the PCI bus and initializes recognized devices.
-
 The next step is to configure the RX and TX queues.
 For each port, there is only one RX queue (only one lcore is able to poll a given port).
 The number of TX queues depends on the number of available lcores.
diff --git a/doc/guides/sample_app_ug/multi_process.rst b/doc/guides/sample_app_ug/multi_process.rst
index 9c374da6f7..f2a79a6397 100644
--- a/doc/guides/sample_app_ug/multi_process.rst
+++ b/doc/guides/sample_app_ug/multi_process.rst
@@ -209,7 +209,7 @@ How the Application Works
 ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 The initialization calls in both the primary and secondary instances are the same for the most part,
-calling the rte_eal_init(), 1 G and 10 G driver initialization and then rte_pci_probe() functions.
+calling the rte_eal_init(), 1 G and 10 G driver initialization and then probing devices.
 Thereafter, the initialization done depends on whether the process is configured as a primary or secondary instance.
 
 In the primary instance, a memory pool is created for the packet mbufs and the network ports to be used are initialized -
diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c
index 3f55420769..ab73c009ac 100644
--- a/drivers/bus/pci/pci_common.c
+++ b/drivers/bus/pci/pci_common.c
@@ -288,8 +288,8 @@ pci_probe_all_drivers(struct rte_pci_device *dev)
  * all registered drivers that have a matching entry in its id_table
  * for discovered devices.
  */
-int
-rte_pci_probe(void)
+static int
+pci_probe(void)
 {
 	struct rte_pci_device *dev = NULL;
 	size_t probed = 0, failed = 0;
@@ -675,7 +675,7 @@ rte_pci_get_iommu_class(void)
 struct rte_pci_bus rte_pci_bus = {
 	.bus = {
 		.scan = rte_pci_scan,
-		.probe = rte_pci_probe,
+		.probe = pci_probe,
 		.find_device = pci_find_device,
 		.plug = pci_plug,
 		.unplug = pci_unplug,
diff --git a/drivers/bus/pci/private.h b/drivers/bus/pci/private.h
index a205d4d9f0..af1c7ae5fe 100644
--- a/drivers/bus/pci/private.h
+++ b/drivers/bus/pci/private.h
@@ -17,16 +17,6 @@ struct rte_pci_device;
 
 extern struct rte_pci_bus rte_pci_bus;
 
-/**
- * Probe the PCI bus
- *
- * @return
- *   - 0 on success.
- *   - !0 on error.
- */
-int
-rte_pci_probe(void);
-
 /**
  * Scan the content of the PCI bus, and the devices in the devices
  * list
diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c
index 741b3b0d60..e5b5a804a2 100644
--- a/drivers/net/virtio/virtio_user_ethdev.c
+++ b/drivers/net/virtio/virtio_user_ethdev.c
@@ -718,7 +718,7 @@ virtio_user_pmd_probe(struct rte_vdev_device *dev)
 		goto end;
 	}
 
-	/* previously called by rte_pci_probe() for physical dev */
+	/* previously called by pci probing for physical dev */
 	if (eth_virtio_dev_init(eth_dev) < 0) {
 		PMD_INIT_LOG(ERR, "eth_virtio_dev_init fails");
 		virtio_user_eth_dev_free(eth_dev);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:51.223753201 +0100
+++ 0165-remove-references-to-private-PCI-probe-function.patch	2020-05-19 14:04:44.508653666 +0100
@@ -1,13 +1,14 @@
-From 87db93e07aeeecc96a9e63b43a652511b95013d6 Mon Sep 17 00:00:00 2001
+From deb055888f02324a3791b10421e871a6b9a1f28b Mon Sep 17 00:00:00 2001
 From: David Marchand <david.marchand@redhat.com>
 Date: Wed, 6 May 2020 14:43:13 +0200
 Subject: [PATCH] remove references to private PCI probe function
 
+[ upstream commit 87db93e07aeeecc96a9e63b43a652511b95013d6 ]
+
 rte_pci_probe() is private to the PCI bus.
 Clean the remaining references in the documentation and comments.
 
 Fixes: c752998b5e2e ("pci: introduce library and driver")
-Cc: stable@dpdk.org
 
 Signed-off-by: David Marchand <david.marchand@redhat.com>
 Reviewed-by: Gaetan Rivet <grive@u256.net>
@@ -22,10 +23,10 @@
  7 files changed, 5 insertions(+), 39 deletions(-)
 
 diff --git a/doc/guides/sample_app_ug/l2_forward_event.rst b/doc/guides/sample_app_ug/l2_forward_event.rst
-index 8bdf352c4e..d536eee819 100644
+index 8c519c3046..c5fad93d00 100644
 --- a/doc/guides/sample_app_ug/l2_forward_event.rst
 +++ b/doc/guides/sample_app_ug/l2_forward_event.rst
-@@ -204,9 +204,6 @@ chapters that related to the Poll Mode and Event mode Driver in the
+@@ -202,9 +202,6 @@ chapters that related to the Poll Mode and Event mode Driver in the
  
  .. code-block:: c
  
@@ -35,7 +36,7 @@
      /* reset l2fwd_dst_ports */
  
      for (portid = 0; portid < RTE_MAX_ETHPORTS; portid++)
-@@ -236,11 +233,6 @@ chapters that related to the Poll Mode and Event mode Driver in the
+@@ -234,11 +231,6 @@ chapters that related to the Poll Mode and Event mode Driver in the
          rte_eth_dev_info_get((uint8_t) portid, &dev_info);
      }
  
@@ -113,10 +114,10 @@
  
  In the primary instance, a memory pool is created for the packet mbufs and the network ports to be used are initialized -
 diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c
-index 6585a4b476..648705582a 100644
+index 3f55420769..ab73c009ac 100644
 --- a/drivers/bus/pci/pci_common.c
 +++ b/drivers/bus/pci/pci_common.c
-@@ -292,8 +292,8 @@ pci_probe_all_drivers(struct rte_pci_device *dev)
+@@ -288,8 +288,8 @@ pci_probe_all_drivers(struct rte_pci_device *dev)
   * all registered drivers that have a matching entry in its id_table
   * for discovered devices.
   */
@@ -127,7 +128,7 @@
  {
  	struct rte_pci_device *dev = NULL;
  	size_t probed = 0, failed = 0;
-@@ -679,7 +679,7 @@ rte_pci_get_iommu_class(void)
+@@ -675,7 +675,7 @@ rte_pci_get_iommu_class(void)
  struct rte_pci_bus rte_pci_bus = {
  	.bus = {
  		.scan = rte_pci_scan,
@@ -158,10 +159,10 @@
   * Scan the content of the PCI bus, and the devices in the devices
   * list
 diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c
-index c54698ad1e..dfc5291d4c 100644
+index 741b3b0d60..e5b5a804a2 100644
 --- a/drivers/net/virtio/virtio_user_ethdev.c
 +++ b/drivers/net/virtio/virtio_user_ethdev.c
-@@ -733,7 +733,7 @@ virtio_user_pmd_probe(struct rte_vdev_device *dev)
+@@ -718,7 +718,7 @@ virtio_user_pmd_probe(struct rte_vdev_device *dev)
  		goto end;
  	}
  

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

* [dpdk-stable] patch 'examples/l2fwd-keepalive: fix mbuf pool size' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (163 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'remove references to private PCI probe function' " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'mem: fix overflow on allocation' " luca.boccassi
                     ` (47 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Louise Kilheeney; +Cc: Xi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From f0ac3aa2d2e7d04bf184f89ab310d02edce8f316 Mon Sep 17 00:00:00 2001
From: Louise Kilheeney <louise.kilheeney@intel.com>
Date: Mon, 27 Apr 2020 15:57:43 +0100
Subject: [PATCH] examples/l2fwd-keepalive: fix mbuf pool size

[ upstream commit 0c2b79e8d59f31bc4bd39a7cd8f1960689465979 ]

MBUF pool of size 8192 was causing packet loss when using four ports. To
fix this issue this patch specifies the number of MBUF's per port
instead of having one set MBUF pool size, this way it will adapt to any
number of ports.

Fixes: e64833f2273a ("examples/l2fwd-keepalive: add sample application")

Signed-off-by: Louise Kilheeney <louise.kilheeney@intel.com>
Tested-by: Xi Zhang <xix.zhang@intel.com>
---
 examples/l2fwd-keepalive/main.c | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/examples/l2fwd-keepalive/main.c b/examples/l2fwd-keepalive/main.c
index b36834974e..eda703e684 100644
--- a/examples/l2fwd-keepalive/main.c
+++ b/examples/l2fwd-keepalive/main.c
@@ -44,7 +44,7 @@
 
 #define RTE_LOGTYPE_L2FWD RTE_LOGTYPE_USER1
 
-#define NB_MBUF   8192
+#define NB_MBUF_PER_PORT 3000
 
 #define MAX_PKT_BURST 32
 #define BURST_TX_DRAIN_US 100 /* TX drain every ~100us */
@@ -536,6 +536,7 @@ main(int argc, char **argv)
 	uint16_t portid, last_port;
 	unsigned lcore_id, rx_lcore_id;
 	unsigned nb_ports_in_mask = 0;
+	unsigned int total_nb_mbufs;
 	struct sigaction signal_handler;
 	struct rte_keepalive_shm *ka_shm;
 
@@ -561,16 +562,19 @@ main(int argc, char **argv)
 	if (ret < 0)
 		rte_exit(EXIT_FAILURE, "Invalid L2FWD arguments\n");
 
-	/* create the mbuf pool */
-	l2fwd_pktmbuf_pool = rte_pktmbuf_pool_create("mbuf_pool", NB_MBUF, 32,
-		0, RTE_MBUF_DEFAULT_BUF_SIZE, rte_socket_id());
-	if (l2fwd_pktmbuf_pool == NULL)
-		rte_exit(EXIT_FAILURE, "Cannot init mbuf pool\n");
-
 	nb_ports = rte_eth_dev_count_avail();
 	if (nb_ports == 0)
 		rte_exit(EXIT_FAILURE, "No Ethernet ports - bye\n");
 
+	/* create the mbuf pool */
+	total_nb_mbufs = NB_MBUF_PER_PORT * nb_ports;
+
+	l2fwd_pktmbuf_pool = rte_pktmbuf_pool_create("mbuf_pool",
+		total_nb_mbufs,	32, 0, RTE_MBUF_DEFAULT_BUF_SIZE,
+		rte_socket_id());
+	if (l2fwd_pktmbuf_pool == NULL)
+		rte_exit(EXIT_FAILURE, "Cannot init mbuf pool\n");
+
 	/* reset l2fwd_dst_ports */
 	for (portid = 0; portid < RTE_MAX_ETHPORTS; portid++)
 		l2fwd_dst_ports[portid] = 0;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:51.271603050 +0100
+++ 0166-examples-l2fwd-keepalive-fix-mbuf-pool-size.patch	2020-05-19 14:04:44.508653666 +0100
@@ -1,15 +1,16 @@
-From 0c2b79e8d59f31bc4bd39a7cd8f1960689465979 Mon Sep 17 00:00:00 2001
+From f0ac3aa2d2e7d04bf184f89ab310d02edce8f316 Mon Sep 17 00:00:00 2001
 From: Louise Kilheeney <louise.kilheeney@intel.com>
 Date: Mon, 27 Apr 2020 15:57:43 +0100
 Subject: [PATCH] examples/l2fwd-keepalive: fix mbuf pool size
 
+[ upstream commit 0c2b79e8d59f31bc4bd39a7cd8f1960689465979 ]
+
 MBUF pool of size 8192 was causing packet loss when using four ports. To
 fix this issue this patch specifies the number of MBUF's per port
 instead of having one set MBUF pool size, this way it will adapt to any
 number of ports.
 
 Fixes: e64833f2273a ("examples/l2fwd-keepalive: add sample application")
-Cc: stable@dpdk.org
 
 Signed-off-by: Louise Kilheeney <louise.kilheeney@intel.com>
 Tested-by: Xi Zhang <xix.zhang@intel.com>
@@ -18,7 +19,7 @@
  1 file changed, 11 insertions(+), 7 deletions(-)
 
 diff --git a/examples/l2fwd-keepalive/main.c b/examples/l2fwd-keepalive/main.c
-index 2ae5a3c6a9..32482158d6 100644
+index b36834974e..eda703e684 100644
 --- a/examples/l2fwd-keepalive/main.c
 +++ b/examples/l2fwd-keepalive/main.c
 @@ -44,7 +44,7 @@

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

* [dpdk-stable] patch 'mem: fix overflow on allocation' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (164 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'examples/l2fwd-keepalive: fix mbuf pool size' " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'examples/eventdev: fix crash on exit' " luca.boccassi
                     ` (46 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Bing Zhao; +Cc: Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From fd554a1f8f2a11739712f6367c0804e0943924a7 Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@mellanox.com>
Date: Thu, 7 May 2020 16:02:54 +0800
Subject: [PATCH] mem: fix overflow on allocation

[ upstream commit b341a09c1dd3664b43d5b3a91b6a83136f2d4a12 ]

The size checking is done in the caller. The size parameter is an
unsigned (64b wide) right now, so the comparison with zero should be
enough in most cases. But it won't help in the following case.
If the allocating request input a huge number by mistake, e.g., some
overflow after the calculation (especially subtraction), the checking
in the caller will succeed since it is not zero. Indeed, there is not
enough space in the system to support such huge memory allocation.
Usually it will return failure in the following code. But if the
input size is just a little smaller than the UINT64_MAX, like -2 in
signed type.
The roundup will cause an overflow and then "reset" the size to 0,
and then only a header (128B now) with zero length will be returned.
The following will be the previous allocation header.
It should be OK in most cases if the application won't access the
memory body. Or else, some critical issue will be caused and not easy
to debug. So this issue should be prevented at the beginning, like
other big size failure, NULL pointer should be returned also.

Fixes: fdf20fa7bee9 ("add prefix to cache line macros")

Signed-off-by: Bing Zhao <bingz@mellanox.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 app/test/test_malloc.c              | 12 ++++++++++++
 lib/librte_eal/common/malloc_heap.c |  3 +++
 2 files changed, 15 insertions(+)

diff --git a/app/test/test_malloc.c b/app/test/test_malloc.c
index a16e28cc32..57f796f9e5 100644
--- a/app/test/test_malloc.c
+++ b/app/test/test_malloc.c
@@ -746,6 +746,18 @@ test_malloc_bad_params(void)
 	if (bad_ptr != NULL)
 		goto err_return;
 
+	/* rte_malloc expected to return null with size will cause overflow */
+	align = RTE_CACHE_LINE_SIZE;
+	size = (size_t)-8;
+
+	bad_ptr = rte_malloc(type, size, align);
+	if (bad_ptr != NULL)
+		goto err_return;
+
+	bad_ptr = rte_realloc(NULL, size, align);
+	if (bad_ptr != NULL)
+		goto err_return;
+
 	return 0;
 
 err_return:
diff --git a/lib/librte_eal/common/malloc_heap.c b/lib/librte_eal/common/malloc_heap.c
index 842eb9de75..bd5065698d 100644
--- a/lib/librte_eal/common/malloc_heap.c
+++ b/lib/librte_eal/common/malloc_heap.c
@@ -241,6 +241,9 @@ heap_alloc(struct malloc_heap *heap, const char *type __rte_unused, size_t size,
 	size = RTE_CACHE_LINE_ROUNDUP(size);
 	align = RTE_CACHE_LINE_ROUNDUP(align);
 
+	/* roundup might cause an overflow */
+	if (size == 0)
+		return NULL;
 	elem = find_suitable_element(heap, size, flags, align, bound, contig);
 	if (elem != NULL) {
 		elem = malloc_elem_alloc(elem, size, align, bound, contig);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:51.314294269 +0100
+++ 0167-mem-fix-overflow-on-allocation.patch	2020-05-19 14:04:44.512653738 +0100
@@ -1,8 +1,10 @@
-From b341a09c1dd3664b43d5b3a91b6a83136f2d4a12 Mon Sep 17 00:00:00 2001
+From fd554a1f8f2a11739712f6367c0804e0943924a7 Mon Sep 17 00:00:00 2001
 From: Bing Zhao <bingz@mellanox.com>
 Date: Thu, 7 May 2020 16:02:54 +0800
 Subject: [PATCH] mem: fix overflow on allocation
 
+[ upstream commit b341a09c1dd3664b43d5b3a91b6a83136f2d4a12 ]
+
 The size checking is done in the caller. The size parameter is an
 unsigned (64b wide) right now, so the comparison with zero should be
 enough in most cases. But it won't help in the following case.
@@ -22,7 +24,6 @@
 other big size failure, NULL pointer should be returned also.
 
 Fixes: fdf20fa7bee9 ("add prefix to cache line macros")
-Cc: stable@dpdk.org
 
 Signed-off-by: Bing Zhao <bingz@mellanox.com>
 Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
@@ -32,10 +33,10 @@
  2 files changed, 15 insertions(+)
 
 diff --git a/app/test/test_malloc.c b/app/test/test_malloc.c
-index 40a2f500cd..71b3cfdde5 100644
+index a16e28cc32..57f796f9e5 100644
 --- a/app/test/test_malloc.c
 +++ b/app/test/test_malloc.c
-@@ -846,6 +846,18 @@ test_malloc_bad_params(void)
+@@ -746,6 +746,18 @@ test_malloc_bad_params(void)
  	if (bad_ptr != NULL)
  		goto err_return;
  

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

* [dpdk-stable] patch 'examples/eventdev: fix crash on exit' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (165 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'mem: fix overflow on allocation' " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'mempool/octeontx2: fix build for gcc O1 optimization' " luca.boccassi
                     ` (45 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Harry van Haaren; +Cc: Jun W Zhou, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 2cb05361578d6ecb0b8517cb27e8d9974528b267 Mon Sep 17 00:00:00 2001
From: Harry van Haaren <harry.van.haaren@intel.com>
Date: Tue, 5 May 2020 10:39:04 +0100
Subject: [PATCH] examples/eventdev: fix crash on exit

[ upstream commit 2c434431f47c55e63b91cd32e7476cb8c15f3328 ]

This commit fixes a segfault on exit by using Ctrl^C if the master lcore
was also being used as a worker core. The root cause of the issue was
that the interrupt handler was cleaning up resources such as the ethdev
and eventdev ports, and once the interrupt handler would return, that
thread would continue working as an eventdev worker, and dereference the
memory which just had free() called on it.

Fixed by moving the cleanup code from the interrupt handler to the
cleanup stage of main(), which the master thread will execute once
it has returned from its worker() functionality.

Fixes: 085edac2ca38 ("examples/eventdev_pipeline: support Tx adapter")

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Tested-by: Jun W Zhou <junx.w.zhou@intel.com>
---
 examples/eventdev_pipeline/main.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/examples/eventdev_pipeline/main.c b/examples/eventdev_pipeline/main.c
index d0da51b1c9..21958269f7 100644
--- a/examples/eventdev_pipeline/main.c
+++ b/examples/eventdev_pipeline/main.c
@@ -301,12 +301,6 @@ signal_handler(int signum)
 
 		rte_eal_mp_wait_lcore();
 
-		RTE_ETH_FOREACH_DEV(portid) {
-			rte_eth_dev_close(portid);
-		}
-
-		rte_event_dev_stop(0);
-		rte_event_dev_close(0);
 	}
 	if (signum == SIGTSTP)
 		rte_event_dev_dump(0, stdout);
@@ -469,5 +463,14 @@ main(int argc, char **argv)
 
 	}
 
+	RTE_ETH_FOREACH_DEV(portid) {
+		rte_eth_dev_close(portid);
+	}
+
+	rte_event_dev_stop(0);
+	rte_event_dev_close(0);
+
+	rte_eal_cleanup();
+
 	return 0;
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:51.359060969 +0100
+++ 0168-examples-eventdev-fix-crash-on-exit.patch	2020-05-19 14:04:44.512653738 +0100
@@ -1,8 +1,10 @@
-From 2c434431f47c55e63b91cd32e7476cb8c15f3328 Mon Sep 17 00:00:00 2001
+From 2cb05361578d6ecb0b8517cb27e8d9974528b267 Mon Sep 17 00:00:00 2001
 From: Harry van Haaren <harry.van.haaren@intel.com>
 Date: Tue, 5 May 2020 10:39:04 +0100
 Subject: [PATCH] examples/eventdev: fix crash on exit
 
+[ upstream commit 2c434431f47c55e63b91cd32e7476cb8c15f3328 ]
+
 This commit fixes a segfault on exit by using Ctrl^C if the master lcore
 was also being used as a worker core. The root cause of the issue was
 that the interrupt handler was cleaning up resources such as the ethdev
@@ -15,7 +17,6 @@
 it has returned from its worker() functionality.
 
 Fixes: 085edac2ca38 ("examples/eventdev_pipeline: support Tx adapter")
-Cc: stable@dpdk.org
 
 Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
 Tested-by: Jun W Zhou <junx.w.zhou@intel.com>

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

* [dpdk-stable] patch 'mempool/octeontx2: fix build for gcc O1 optimization' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (166 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'examples/eventdev: fix crash on exit' " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/ena: fix build for " luca.boccassi
                     ` (44 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From c6f6f3d8e13cd78421fd7803599483ec6c59eaac Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Mon, 11 May 2020 17:07:23 +0100
Subject: [PATCH] mempool/octeontx2: fix build for gcc O1 optimization
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 0403b233ee4fd4857808fcc811054bc9109feb97 ]

Can be reproduced with "make EXTRA_CFLAGS='-O1'" command using
gcc (GCC) 9.3.1 20200408 (Red Hat 9.3.1-2)

Build error:
In file included from .../drivers/mempool/octeontx2/otx2_mempool.h:13,
                from .../drivers/mempool/octeontx2/otx2_mempool_ops.c:8:
.../drivers/mempool/octeontx2/otx2_mempool_ops.c:
	In function ‘otx2_npa_alloc’:
.../drivers/common/octeontx2/otx2_common.h:94:2:
    error: ‘aura_handle’ may be used uninitialized in this function
           [-Werror=maybe-uninitialized]
   94 |  rte_log(RTE_LOG_DEBUG, otx2_logtype_ ## subsystem,  \
      |  ^~~~~~~
.../drivers/mempool/octeontx2/otx2_mempool_ops.c:643:11:
    note: ‘aura_handle’ was declared here
  643 |  uint64_t aura_handle;
      |           ^~~~~~~~~~~

This looks like false positive, assigning an initial value to
'aura_handle' to fix the build error.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 drivers/mempool/octeontx2/otx2_mempool_ops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mempool/octeontx2/otx2_mempool_ops.c b/drivers/mempool/octeontx2/otx2_mempool_ops.c
index ea4b1c45d2..18bdb0b4c4 100644
--- a/drivers/mempool/octeontx2/otx2_mempool_ops.c
+++ b/drivers/mempool/octeontx2/otx2_mempool_ops.c
@@ -637,10 +637,10 @@ static int
 otx2_npa_alloc(struct rte_mempool *mp)
 {
 	uint32_t block_size, block_count;
+	uint64_t aura_handle = 0;
 	struct otx2_npa_lf *lf;
 	struct npa_aura_s aura;
 	struct npa_pool_s pool;
-	uint64_t aura_handle;
 	int rc;
 
 	lf = otx2_npa_lf_obj_get();
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:51.400660538 +0100
+++ 0169-mempool-octeontx2-fix-build-for-gcc-O1-optimization.patch	2020-05-19 14:04:44.512653738 +0100
@@ -1,4 +1,4 @@
-From 0403b233ee4fd4857808fcc811054bc9109feb97 Mon Sep 17 00:00:00 2001
+From c6f6f3d8e13cd78421fd7803599483ec6c59eaac Mon Sep 17 00:00:00 2001
 From: Ferruh Yigit <ferruh.yigit@intel.com>
 Date: Mon, 11 May 2020 17:07:23 +0100
 Subject: [PATCH] mempool/octeontx2: fix build for gcc O1 optimization
@@ -6,6 +6,8 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit 0403b233ee4fd4857808fcc811054bc9109feb97 ]
+
 Can be reproduced with "make EXTRA_CFLAGS='-O1'" command using
 gcc (GCC) 9.3.1 20200408 (Red Hat 9.3.1-2)
 
@@ -34,7 +36,7 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/mempool/octeontx2/otx2_mempool_ops.c b/drivers/mempool/octeontx2/otx2_mempool_ops.c
-index 162b7f01da..a14c9c5e94 100644
+index ea4b1c45d2..18bdb0b4c4 100644
 --- a/drivers/mempool/octeontx2/otx2_mempool_ops.c
 +++ b/drivers/mempool/octeontx2/otx2_mempool_ops.c
 @@ -637,10 +637,10 @@ static int
@@ -46,9 +48,9 @@
  	struct npa_aura_s aura;
  	struct npa_pool_s pool;
 -	uint64_t aura_handle;
- 	size_t padding;
  	int rc;
  
+ 	lf = otx2_npa_lf_obj_get();
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'net/ena: fix build for O1 optimization' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (167 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'mempool/octeontx2: fix build for gcc O1 optimization' " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'event/octeontx2: " luca.boccassi
                     ` (43 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Michal Krawczyk, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 6fc3588de0e2085d1ac60aae506e61ba98ee80a5 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Mon, 11 May 2020 17:07:24 +0100
Subject: [PATCH] net/ena: fix build for O1 optimization
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 5f267cb01b41def2af37b8fa56828e75ae91add0 ]

Can be reproduced with "make EXTRA_CFLAGS='-O1'" command using
gcc (GCC) 9.3.1 20200408 (Red Hat 9.3.1-2)

Build error:
.../drivers/net/ena/ena_ethdev.c: In function ‘eth_ena_dev_init’:
.../drivers/net/ena/ena_ethdev.c:1815:20:
    error: ‘wd_state’ may be used uninitialized in this function
           [-Werror=maybe-uninitialized]
 1815 |  adapter->wd_state = wd_state;
      |  ~~~~~~~~~~~~~~~~~~^~~~~~~~~~

This looks like false positive, fixing by assigning initial value to
'wd_state' variable.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Michal Krawczyk <mk@semihalf.com>
---
 drivers/net/ena/ena_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 36e9b4ad9e..e8753ce010 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -1674,7 +1674,7 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev)
 	int rc;
 
 	static int adapters_found;
-	bool wd_state;
+	bool wd_state = false;
 
 	eth_dev->dev_ops = &ena_dev_ops;
 	eth_dev->rx_pkt_burst = &eth_ena_recv_pkts;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:51.443739711 +0100
+++ 0170-net-ena-fix-build-for-O1-optimization.patch	2020-05-19 14:04:44.512653738 +0100
@@ -1,4 +1,4 @@
-From 5f267cb01b41def2af37b8fa56828e75ae91add0 Mon Sep 17 00:00:00 2001
+From 6fc3588de0e2085d1ac60aae506e61ba98ee80a5 Mon Sep 17 00:00:00 2001
 From: Ferruh Yigit <ferruh.yigit@intel.com>
 Date: Mon, 11 May 2020 17:07:24 +0100
 Subject: [PATCH] net/ena: fix build for O1 optimization
@@ -6,6 +6,8 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit 5f267cb01b41def2af37b8fa56828e75ae91add0 ]
+
 Can be reproduced with "make EXTRA_CFLAGS='-O1'" command using
 gcc (GCC) 9.3.1 20200408 (Red Hat 9.3.1-2)
 
@@ -27,13 +29,13 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
-index c3fd3a4ac0..fbddc79f79 100644
+index 36e9b4ad9e..e8753ce010 100644
 --- a/drivers/net/ena/ena_ethdev.c
 +++ b/drivers/net/ena/ena_ethdev.c
-@@ -1756,7 +1756,7 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev)
+@@ -1674,7 +1674,7 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev)
  	int rc;
+ 
  	static int adapters_found;
- 	bool disable_meta_caching;
 -	bool wd_state;
 +	bool wd_state = false;
  

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

* [dpdk-stable] patch 'event/octeontx2: fix build for O1 optimization' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (168 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/ena: fix build for " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'test/flow_classify: enable multi-sockets system' " luca.boccassi
                     ` (42 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Konstantin Ananyev, Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From a009c7667f92df63260908faa5891eb862b54cbd Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Mon, 11 May 2020 17:07:25 +0100
Subject: [PATCH] event/octeontx2: fix build for O1 optimization
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit ea153cc853049c6f935693e48d2866782370a3fe ]

Can be reproduced with "make EXTRA_CFLAGS='-O1'" command using
gcc 7.3.0

Build error
In file included from .../drivers/event/octeontx2/ot
x2_evdev.c:15:0:
.../drivers/event/octeontx2/otx2_evdev_stats.h:
    In function ‘otx2_sso_xstats_get’:
.../drivers/event/octeontx2/otx2_evdev_stats.h:124:9:
    error: ‘xstats’ may be used uninitialized in this function
           [-Werror=maybe-uninitialized]
   xstat = &xstats[ids[i] - start_offset];
   ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This is false positive, 'xstats_mode_count' should be preventing taking
the loop and accessing 'xstats'.
Returning in that case to silence the compiler warning.

Reported-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tested-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 drivers/event/octeontx2/otx2_evdev_stats.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/event/octeontx2/otx2_evdev_stats.h b/drivers/event/octeontx2/otx2_evdev_stats.h
index 9d7c694ee6..74fcec8a07 100644
--- a/drivers/event/octeontx2/otx2_evdev_stats.h
+++ b/drivers/event/octeontx2/otx2_evdev_stats.h
@@ -67,7 +67,7 @@ otx2_sso_xstats_get(const struct rte_eventdev *event_dev,
 
 	switch (mode) {
 	case RTE_EVENT_DEV_XSTATS_DEVICE:
-		break;
+		return 0;
 	case RTE_EVENT_DEV_XSTATS_PORT:
 		if (queue_port_id >= (signed int)dev->nb_event_ports)
 			goto invalid_value;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:51.493924246 +0100
+++ 0171-event-octeontx2-fix-build-for-O1-optimization.patch	2020-05-19 14:04:44.512653738 +0100
@@ -1,4 +1,4 @@
-From ea153cc853049c6f935693e48d2866782370a3fe Mon Sep 17 00:00:00 2001
+From a009c7667f92df63260908faa5891eb862b54cbd Mon Sep 17 00:00:00 2001
 From: Ferruh Yigit <ferruh.yigit@intel.com>
 Date: Mon, 11 May 2020 17:07:25 +0100
 Subject: [PATCH] event/octeontx2: fix build for O1 optimization
@@ -6,6 +6,8 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit ea153cc853049c6f935693e48d2866782370a3fe ]
+
 Can be reproduced with "make EXTRA_CFLAGS='-O1'" command using
 gcc 7.3.0
 

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

* [dpdk-stable] patch 'test/flow_classify: enable multi-sockets system' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (169 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'event/octeontx2: " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'bbdev: fix doxygen comments' " luca.boccassi
                     ` (41 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Harry van Haaren; +Cc: Ferruh Yigit, Bernard Iremonger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From abc111ae3d724dfe85bae1d1ffd9dff49ffe2b42 Mon Sep 17 00:00:00 2001
From: Harry van Haaren <harry.van.haaren@intel.com>
Date: Fri, 1 May 2020 12:08:14 +0100
Subject: [PATCH] test/flow_classify: enable multi-sockets system

[ upstream commit 8978ab3b0392d1279d92c706e9e0b00703a85c18 ]

This commit fixes failures of the flow_classify_autotest when
ran on dual-socket servers, as the sample application does not
support more than a single socket. Increasing the NB_SOCKETS
value allows the test to run successfully.

Fixes: 9c9befea4f57 ("test: add flow classify unit tests")

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tested-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 app/test/test_flow_classify.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test/test_flow_classify.c b/app/test/test_flow_classify.c
index ff5265c6af..ef0b6fdd5c 100644
--- a/app/test/test_flow_classify.c
+++ b/app/test/test_flow_classify.c
@@ -23,7 +23,7 @@
 
 #define FLOW_CLASSIFY_MAX_RULE_NUM 100
 #define MAX_PKT_BURST              32
-#define NB_SOCKETS                 1
+#define NB_SOCKETS                 4
 #define MEMPOOL_CACHE_SIZE         256
 #define MBUF_SIZE                  512
 #define NB_MBUF                    512
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:51.536086283 +0100
+++ 0172-test-flow_classify-enable-multi-sockets-system.patch	2020-05-19 14:04:44.516653810 +0100
@@ -1,15 +1,16 @@
-From 8978ab3b0392d1279d92c706e9e0b00703a85c18 Mon Sep 17 00:00:00 2001
+From abc111ae3d724dfe85bae1d1ffd9dff49ffe2b42 Mon Sep 17 00:00:00 2001
 From: Harry van Haaren <harry.van.haaren@intel.com>
 Date: Fri, 1 May 2020 12:08:14 +0100
 Subject: [PATCH] test/flow_classify: enable multi-sockets system
 
+[ upstream commit 8978ab3b0392d1279d92c706e9e0b00703a85c18 ]
+
 This commit fixes failures of the flow_classify_autotest when
 ran on dual-socket servers, as the sample application does not
 support more than a single socket. Increasing the NB_SOCKETS
 value allows the test to run successfully.
 
 Fixes: 9c9befea4f57 ("test: add flow classify unit tests")
-Cc: stable@dpdk.org
 
 Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
 Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>

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

* [dpdk-stable] patch 'bbdev: fix doxygen comments' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (170 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'test/flow_classify: enable multi-sockets system' " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'crypto/ccp: fix fd leak on probe failure' " luca.boccassi
                     ` (40 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Nicolas Chautru; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 6e0bdc2ba184f08dd3245f2cff1db490973dcf9a Mon Sep 17 00:00:00 2001
From: Nicolas Chautru <nicolas.chautru@intel.com>
Date: Sun, 19 Apr 2020 16:39:48 -0700
Subject: [PATCH] bbdev: fix doxygen comments

[ upstream commit cc29fea1ca53ce9860566b6986491bcf5aab99b5 ]

Several doxygen markup were incorrect in header files.

Fixes: 4935e1e9f76e ("bbdev: introduce wireless base band device lib")

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 lib/librte_bbdev/rte_bbdev.h     | 16 ++++++++--------
 lib/librte_bbdev/rte_bbdev_op.h  | 16 ++++++++--------
 lib/librte_bbdev/rte_bbdev_pmd.h | 14 +++++++-------
 3 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/lib/librte_bbdev/rte_bbdev.h b/lib/librte_bbdev/rte_bbdev.h
index 591fb7914a..1f58a0762f 100644
--- a/lib/librte_bbdev/rte_bbdev.h
+++ b/lib/librte_bbdev/rte_bbdev.h
@@ -440,21 +440,21 @@ TAILQ_HEAD(rte_bbdev_cb_list, rte_bbdev_callback);
  * these fields, but should only write to the *_ops fields.
  */
 struct __rte_cache_aligned rte_bbdev {
-	/**< Enqueue encode function */
+	/** Enqueue encode function */
 	rte_bbdev_enqueue_enc_ops_t enqueue_enc_ops;
-	/**< Enqueue decode function */
+	/** Enqueue decode function */
 	rte_bbdev_enqueue_dec_ops_t enqueue_dec_ops;
-	/**< Dequeue encode function */
+	/** Dequeue encode function */
 	rte_bbdev_dequeue_enc_ops_t dequeue_enc_ops;
-	/**< Dequeue decode function */
+	/** Dequeue decode function */
 	rte_bbdev_dequeue_dec_ops_t dequeue_dec_ops;
-	/**< Enqueue encode function */
+	/** Enqueue encode function */
 	rte_bbdev_enqueue_enc_ops_t enqueue_ldpc_enc_ops;
-	/**< Enqueue decode function */
+	/** Enqueue decode function */
 	rte_bbdev_enqueue_dec_ops_t enqueue_ldpc_dec_ops;
-	/**< Dequeue encode function */
+	/** Dequeue encode function */
 	rte_bbdev_dequeue_enc_ops_t dequeue_ldpc_enc_ops;
-	/**< Dequeue decode function */
+	/** Dequeue decode function */
 	rte_bbdev_dequeue_dec_ops_t dequeue_ldpc_dec_ops;
 	const struct rte_bbdev_ops *dev_ops;  /**< Functions exported by PMD */
 	struct rte_bbdev_data *data;  /**< Pointer to device data */
diff --git a/lib/librte_bbdev/rte_bbdev_op.h b/lib/librte_bbdev/rte_bbdev_op.h
index 1e119a757b..6e43495fb4 100644
--- a/lib/librte_bbdev/rte_bbdev_op.h
+++ b/lib/librte_bbdev/rte_bbdev_op.h
@@ -389,12 +389,12 @@ struct rte_bbdev_op_turbo_dec {
 	 */
 	uint8_t num_maps;
 
-	/**< [0 - TB : 1 - CB] */
+	/** [0 - TB : 1 - CB] */
 	uint8_t code_block_mode;
 	union {
-		/**< Struct which stores Code Block specific parameters */
+		/** Struct which stores Code Block specific parameters */
 		struct rte_bbdev_op_dec_turbo_cb_params cb_params;
-		/**< Struct which stores Transport Block specific parameters */
+		/** Struct which stores Transport Block specific parameters */
 		struct rte_bbdev_op_dec_turbo_tb_params tb_params;
 	};
 };
@@ -545,7 +545,7 @@ struct rte_bbdev_op_enc_turbo_tb_params {
 	 * the Turbo operation when r >= C-, [K:3*Kpi]
 	 */
 	uint16_t ncb_pos;
-	/**< The index of the first CB in the inbound mbuf data, default is 0 */
+	/** The index of the first CB in the inbound mbuf data, default is 0 */
 	uint8_t r;
 };
 
@@ -744,11 +744,11 @@ enum {
 
 /** Structure specifying a single encode operation */
 struct rte_bbdev_enc_op {
-	/**< Status of operation that was performed */
+	/** Status of operation that was performed */
 	int status;
-	/**< Mempool which op instance is in */
+	/** Mempool which op instance is in */
 	struct rte_mempool *mempool;
-	/**< Opaque pointer for user data */
+	/** Opaque pointer for user data */
 	void *opaque_data;
 	union {
 		/** Contains turbo decoder specific parameters */
@@ -785,7 +785,7 @@ struct rte_bbdev_op_cap {
 	} cap;  /**< Operation-type specific capabilities */
 };
 
-/**< @internal Private data structure stored with operation pool. */
+/** @internal Private data structure stored with operation pool. */
 struct rte_bbdev_op_pool_private {
 	enum rte_bbdev_op_type type;  /**< Type of operations in a pool */
 };
diff --git a/lib/librte_bbdev/rte_bbdev_pmd.h b/lib/librte_bbdev/rte_bbdev_pmd.h
index 24ddcee7af..237e3361d7 100644
--- a/lib/librte_bbdev/rte_bbdev_pmd.h
+++ b/lib/librte_bbdev/rte_bbdev_pmd.h
@@ -146,18 +146,18 @@ typedef int (*rte_bbdev_queue_intr_disable_t)(struct rte_bbdev *dev,
  * fields are for non-vital operations
  */
 struct rte_bbdev_ops {
-	/**< Allocate and configure device memory. Optional. */
+	/** Allocate and configure device memory. Optional. */
 	rte_bbdev_setup_queues_t setup_queues;
-	/**< Configure interrupts. Optional. */
+	/** Configure interrupts. Optional. */
 	rte_bbdev_intr_enable_t intr_enable;
-	/**< Start device. Optional. */
+	/** Start device. Optional. */
 	rte_bbdev_start_t start;
-	/**< Stop device. Optional. */
+	/** Stop device. Optional. */
 	rte_bbdev_stop_t stop;
-	/**< Close device. Optional. */
+	/** Close device. Optional. */
 	rte_bbdev_close_t close;
 
-	/**< Get device info. Required. */
+	/** Get device info. Required. */
 	rte_bbdev_info_get_t info_get;
 	/** Get device statistics. Optional. */
 	rte_bbdev_stats_get_t stats_get;
@@ -170,7 +170,7 @@ struct rte_bbdev_ops {
 	rte_bbdev_queue_release_t queue_release;
 	/** Start a queue. Optional. */
 	rte_bbdev_queue_start_t queue_start;
-	/**< Stop a queue pair. Optional. */
+	/** Stop a queue pair. Optional. */
 	rte_bbdev_queue_stop_t queue_stop;
 
 	/** Enable queue interrupt. Optional */
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:51.581369117 +0100
+++ 0173-bbdev-fix-doxygen-comments.patch	2020-05-19 14:04:44.516653810 +0100
@@ -1,12 +1,13 @@
-From cc29fea1ca53ce9860566b6986491bcf5aab99b5 Mon Sep 17 00:00:00 2001
+From 6e0bdc2ba184f08dd3245f2cff1db490973dcf9a Mon Sep 17 00:00:00 2001
 From: Nicolas Chautru <nicolas.chautru@intel.com>
 Date: Sun, 19 Apr 2020 16:39:48 -0700
 Subject: [PATCH] bbdev: fix doxygen comments
 
+[ upstream commit cc29fea1ca53ce9860566b6986491bcf5aab99b5 ]
+
 Several doxygen markup were incorrect in header files.
 
 Fixes: 4935e1e9f76e ("bbdev: introduce wireless base band device lib")
-Cc: stable@dpdk.org
 
 Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
 Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
@@ -17,10 +18,10 @@
  3 files changed, 23 insertions(+), 23 deletions(-)
 
 diff --git a/lib/librte_bbdev/rte_bbdev.h b/lib/librte_bbdev/rte_bbdev.h
-index 38d9d50057..ecd95a823d 100644
+index 591fb7914a..1f58a0762f 100644
 --- a/lib/librte_bbdev/rte_bbdev.h
 +++ b/lib/librte_bbdev/rte_bbdev.h
-@@ -442,21 +442,21 @@ TAILQ_HEAD(rte_bbdev_cb_list, rte_bbdev_callback);
+@@ -440,21 +440,21 @@ TAILQ_HEAD(rte_bbdev_cb_list, rte_bbdev_callback);
   * these fields, but should only write to the *_ops fields.
   */
  struct __rte_cache_aligned rte_bbdev {
@@ -51,10 +52,10 @@
  	const struct rte_bbdev_ops *dev_ops;  /**< Functions exported by PMD */
  	struct rte_bbdev_data *data;  /**< Pointer to device data */
 diff --git a/lib/librte_bbdev/rte_bbdev_op.h b/lib/librte_bbdev/rte_bbdev_op.h
-index 9c66721e32..f726d7302e 100644
+index 1e119a757b..6e43495fb4 100644
 --- a/lib/librte_bbdev/rte_bbdev_op.h
 +++ b/lib/librte_bbdev/rte_bbdev_op.h
-@@ -398,12 +398,12 @@ struct rte_bbdev_op_turbo_dec {
+@@ -389,12 +389,12 @@ struct rte_bbdev_op_turbo_dec {
  	 */
  	uint8_t num_maps;
  
@@ -70,7 +71,7 @@
  		struct rte_bbdev_op_dec_turbo_tb_params tb_params;
  	};
  };
-@@ -554,7 +554,7 @@ struct rte_bbdev_op_enc_turbo_tb_params {
+@@ -545,7 +545,7 @@ struct rte_bbdev_op_enc_turbo_tb_params {
  	 * the Turbo operation when r >= C-, [K:3*Kpi]
  	 */
  	uint16_t ncb_pos;
@@ -79,7 +80,7 @@
  	uint8_t r;
  };
  
-@@ -751,11 +751,11 @@ enum {
+@@ -744,11 +744,11 @@ enum {
  
  /** Structure specifying a single encode operation */
  struct rte_bbdev_enc_op {
@@ -94,7 +95,7 @@
  	void *opaque_data;
  	union {
  		/** Contains turbo decoder specific parameters */
-@@ -792,7 +792,7 @@ struct rte_bbdev_op_cap {
+@@ -785,7 +785,7 @@ struct rte_bbdev_op_cap {
  	} cap;  /**< Operation-type specific capabilities */
  };
  

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

* [dpdk-stable] patch 'crypto/ccp: fix fd leak on probe failure' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (171 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'bbdev: fix doxygen comments' " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:20     ` Kumar, Ravi1
  2020-05-19 13:05   ` [dpdk-stable] patch 'app/crypto-perf: fix display of sample test vector' " luca.boccassi
                     ` (39 subsequent siblings)
  212 siblings, 1 reply; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Ravi Kumar, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 9b91b991b69c8f44c194259e42a4197261c06593 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Sun, 26 Apr 2020 14:36:15 +0800
Subject: [PATCH] crypto/ccp: fix fd leak on probe failure

[ upstream commit 4f429be4c09a00ccc5cd13cfb14a11f90958ac74 ]

Zero is a valid fd. When ccp_probe_device() is failed, the uio_fd won't be
closed thus leading fd leak.

Fixes: ef4b04f87fa6 ("crypto/ccp: support device init")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Ravi Kumar <ravi1.kumar@amd.com>
---
 drivers/crypto/ccp/ccp_dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/ccp/ccp_dev.c b/drivers/crypto/ccp/ccp_dev.c
index 80fe6a4533..7d98b2eb25 100644
--- a/drivers/crypto/ccp/ccp_dev.c
+++ b/drivers/crypto/ccp/ccp_dev.c
@@ -760,7 +760,7 @@ ccp_probe_device(const char *dirname, uint16_t domain,
 	return 0;
 fail:
 	CCP_LOG_ERR("CCP Device probe failed");
-	if (uio_fd > 0)
+	if (uio_fd >= 0)
 		close(uio_fd);
 	if (ccp_dev)
 		rte_free(ccp_dev);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:51.623305330 +0100
+++ 0174-crypto-ccp-fix-fd-leak-on-probe-failure.patch	2020-05-19 14:04:44.516653810 +0100
@@ -1,13 +1,14 @@
-From 4f429be4c09a00ccc5cd13cfb14a11f90958ac74 Mon Sep 17 00:00:00 2001
+From 9b91b991b69c8f44c194259e42a4197261c06593 Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Sun, 26 Apr 2020 14:36:15 +0800
 Subject: [PATCH] crypto/ccp: fix fd leak on probe failure
 
+[ upstream commit 4f429be4c09a00ccc5cd13cfb14a11f90958ac74 ]
+
 Zero is a valid fd. When ccp_probe_device() is failed, the uio_fd won't be
 closed thus leading fd leak.
 
 Fixes: ef4b04f87fa6 ("crypto/ccp: support device init")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Acked-by: Ravi Kumar <ravi1.kumar@amd.com>

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

* [dpdk-stable] patch 'app/crypto-perf: fix display of sample test vector' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (172 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'crypto/ccp: fix fd leak on probe failure' " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'crypto/qat: fix cipher descriptor for ZUC and SNOW' " luca.boccassi
                     ` (38 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Adam Dybkowski; +Cc: Fiona Trahe, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From de299dec147034a5e8c91638d90087a793fe37d4 Mon Sep 17 00:00:00 2001
From: Adam Dybkowski <adamx.dybkowski@intel.com>
Date: Wed, 29 Apr 2020 12:57:04 +0200
Subject: [PATCH] app/crypto-perf: fix display of sample test vector

[ upstream commit 16f25ee0bf45a3e1b5c4ba4b7e548e321c7db60d ]

This patch disables displaying sample test vector contents when
executing throughput and latency tests as the sample data is not
used in those tests (not copied to input mbuf in order to achieve
better performance).

Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application")

Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
---
 app/test-crypto-perf/main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
index 52a1860fbf..7bb286ccbe 100644
--- a/app/test-crypto-perf/main.c
+++ b/app/test-crypto-perf/main.c
@@ -582,7 +582,8 @@ main(int argc, char **argv)
 		goto err;
 	}
 
-	if (!opts.silent)
+	if (!opts.silent && opts.test != CPERF_TEST_TYPE_THROUGHPUT &&
+			opts.test != CPERF_TEST_TYPE_LATENCY)
 		show_test_vector(t_vec);
 
 	total_nb_qps = nb_cryptodevs * opts.nb_qps;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:51.663266950 +0100
+++ 0175-app-crypto-perf-fix-display-of-sample-test-vector.patch	2020-05-19 14:04:44.516653810 +0100
@@ -1,15 +1,16 @@
-From 16f25ee0bf45a3e1b5c4ba4b7e548e321c7db60d Mon Sep 17 00:00:00 2001
+From de299dec147034a5e8c91638d90087a793fe37d4 Mon Sep 17 00:00:00 2001
 From: Adam Dybkowski <adamx.dybkowski@intel.com>
 Date: Wed, 29 Apr 2020 12:57:04 +0200
 Subject: [PATCH] app/crypto-perf: fix display of sample test vector
 
+[ upstream commit 16f25ee0bf45a3e1b5c4ba4b7e548e321c7db60d ]
+
 This patch disables displaying sample test vector contents when
 executing throughput and latency tests as the sample data is not
 used in those tests (not copied to input mbuf in order to achieve
 better performance).
 
 Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application")
-Cc: stable@dpdk.org
 
 Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
 Acked-by: Fiona Trahe <fiona.trahe@intel.com>

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

* [dpdk-stable] patch 'crypto/qat: fix cipher descriptor for ZUC and SNOW' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (173 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'app/crypto-perf: fix display of sample test vector' " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'crypto/kasumi: fix extern declaration' " luca.boccassi
                     ` (37 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Arek Kusztal; +Cc: Fiona Trahe, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 0665fb6e097a758af43ef525e9e0dde16d960ff5 Mon Sep 17 00:00:00 2001
From: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Date: Wed, 29 Apr 2020 16:51:34 +0200
Subject: [PATCH] crypto/qat: fix cipher descriptor for ZUC and SNOW

[ upstream commit fae347cb345a844442c18e1384b832912e07daa0 ]

Offset of cd pointer is too big by state1size + state2size, so few extra
unnecessary bytes will be copied into cd. Snow offset was improved as well.

Fixes: d9b7d5bbc845 ("crypto/qat: add ZUC EEA3/EIA3 capability")

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
---
 drivers/crypto/qat/qat_sym_session.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c
index 72290ba480..f69c2e2fd7 100644
--- a/drivers/crypto/qat/qat_sym_session.c
+++ b/drivers/crypto/qat/qat_sym_session.c
@@ -1524,7 +1524,7 @@ int qat_sym_session_aead_create_cd_auth(struct qat_sym_session *cdesc,
 		(struct icp_qat_fw_la_auth_req_params *)
 		((char *)&req_tmpl->serv_specif_rqpars +
 		ICP_QAT_FW_HASH_REQUEST_PARAMETERS_OFFSET);
-	uint16_t state1_size = 0, state2_size = 0;
+	uint16_t state1_size = 0, state2_size = 0, cd_extra_size = 0;
 	uint16_t hash_offset, cd_size;
 	uint32_t *aad_len = NULL;
 	uint32_t wordIndex  = 0;
@@ -1700,7 +1700,7 @@ int qat_sym_session_aead_create_cd_auth(struct qat_sym_session *cdesc,
 		memcpy(cipherconfig->key, authkey, authkeylen);
 		memset(cipherconfig->key + authkeylen,
 				0, ICP_QAT_HW_SNOW_3G_UEA2_IV_SZ);
-		cdesc->cd_cur_ptr += sizeof(struct icp_qat_hw_cipher_config) +
+		cd_extra_size += sizeof(struct icp_qat_hw_cipher_config) +
 				authkeylen + ICP_QAT_HW_SNOW_3G_UEA2_IV_SZ;
 		auth_param->hash_state_sz = ICP_QAT_HW_SNOW_3G_UEA2_IV_SZ >> 3;
 		break;
@@ -1716,8 +1716,7 @@ int qat_sym_session_aead_create_cd_auth(struct qat_sym_session *cdesc,
 			+ ICP_QAT_HW_ZUC_3G_EEA3_IV_SZ);
 
 		memcpy(cdesc->cd_cur_ptr + state1_size, authkey, authkeylen);
-		cdesc->cd_cur_ptr += state1_size + state2_size
-			+ ICP_QAT_HW_ZUC_3G_EEA3_IV_SZ;
+		cd_extra_size += ICP_QAT_HW_ZUC_3G_EEA3_IV_SZ;
 		auth_param->hash_state_sz = ICP_QAT_HW_ZUC_3G_EEA3_IV_SZ >> 3;
 		cdesc->min_qat_dev_gen = QAT_GEN2;
 
@@ -1803,7 +1802,7 @@ int qat_sym_session_aead_create_cd_auth(struct qat_sym_session *cdesc,
 			 RTE_ALIGN_CEIL(hash_cd_ctrl->inner_state1_sz, 8))
 					>> 3);
 
-	cdesc->cd_cur_ptr += state1_size + state2_size;
+	cdesc->cd_cur_ptr += state1_size + state2_size + cd_extra_size;
 	cd_size = cdesc->cd_cur_ptr-(uint8_t *)&cdesc->cd;
 
 	cd_pars->u.s.content_desc_addr = cdesc->cd_paddr;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:51.704190182 +0100
+++ 0176-crypto-qat-fix-cipher-descriptor-for-ZUC-and-SNOW.patch	2020-05-19 14:04:44.520653884 +0100
@@ -1,13 +1,14 @@
-From fae347cb345a844442c18e1384b832912e07daa0 Mon Sep 17 00:00:00 2001
+From 0665fb6e097a758af43ef525e9e0dde16d960ff5 Mon Sep 17 00:00:00 2001
 From: Arek Kusztal <arkadiuszx.kusztal@intel.com>
 Date: Wed, 29 Apr 2020 16:51:34 +0200
 Subject: [PATCH] crypto/qat: fix cipher descriptor for ZUC and SNOW
 
+[ upstream commit fae347cb345a844442c18e1384b832912e07daa0 ]
+
 Offset of cd pointer is too big by state1size + state2size, so few extra
 unnecessary bytes will be copied into cd. Snow offset was improved as well.
 
 Fixes: d9b7d5bbc845 ("crypto/qat: add ZUC EEA3/EIA3 capability")
-Cc: stable@dpdk.org
 
 Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
 Acked-by: Fiona Trahe <fiona.trahe@intel.com>
@@ -16,10 +17,10 @@
  1 file changed, 4 insertions(+), 5 deletions(-)
 
 diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c
-index 3727d564d8..58bdbd3438 100644
+index 72290ba480..f69c2e2fd7 100644
 --- a/drivers/crypto/qat/qat_sym_session.c
 +++ b/drivers/crypto/qat/qat_sym_session.c
-@@ -1664,7 +1664,7 @@ int qat_sym_session_aead_create_cd_auth(struct qat_sym_session *cdesc,
+@@ -1524,7 +1524,7 @@ int qat_sym_session_aead_create_cd_auth(struct qat_sym_session *cdesc,
  		(struct icp_qat_fw_la_auth_req_params *)
  		((char *)&req_tmpl->serv_specif_rqpars +
  		ICP_QAT_FW_HASH_REQUEST_PARAMETERS_OFFSET);
@@ -28,7 +29,7 @@
  	uint16_t hash_offset, cd_size;
  	uint32_t *aad_len = NULL;
  	uint32_t wordIndex  = 0;
-@@ -1886,7 +1886,7 @@ int qat_sym_session_aead_create_cd_auth(struct qat_sym_session *cdesc,
+@@ -1700,7 +1700,7 @@ int qat_sym_session_aead_create_cd_auth(struct qat_sym_session *cdesc,
  		memcpy(cipherconfig->key, authkey, authkeylen);
  		memset(cipherconfig->key + authkeylen,
  				0, ICP_QAT_HW_SNOW_3G_UEA2_IV_SZ);
@@ -37,7 +38,7 @@
  				authkeylen + ICP_QAT_HW_SNOW_3G_UEA2_IV_SZ;
  		auth_param->hash_state_sz = ICP_QAT_HW_SNOW_3G_UEA2_IV_SZ >> 3;
  		break;
-@@ -1902,8 +1902,7 @@ int qat_sym_session_aead_create_cd_auth(struct qat_sym_session *cdesc,
+@@ -1716,8 +1716,7 @@ int qat_sym_session_aead_create_cd_auth(struct qat_sym_session *cdesc,
  			+ ICP_QAT_HW_ZUC_3G_EEA3_IV_SZ);
  
  		memcpy(cdesc->cd_cur_ptr + state1_size, authkey, authkeylen);
@@ -47,7 +48,7 @@
  		auth_param->hash_state_sz = ICP_QAT_HW_ZUC_3G_EEA3_IV_SZ >> 3;
  		cdesc->min_qat_dev_gen = QAT_GEN2;
  
-@@ -1989,7 +1988,7 @@ int qat_sym_session_aead_create_cd_auth(struct qat_sym_session *cdesc,
+@@ -1803,7 +1802,7 @@ int qat_sym_session_aead_create_cd_auth(struct qat_sym_session *cdesc,
  			 RTE_ALIGN_CEIL(hash_cd_ctrl->inner_state1_sz, 8))
  					>> 3);
  

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

* [dpdk-stable] patch 'crypto/kasumi: fix extern declaration' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (174 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'crypto/qat: fix cipher descriptor for ZUC and SNOW' " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'examples/fips_validation: fix parsing of algorithms' " luca.boccassi
                     ` (36 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Kevin Traynor; +Cc: Pablo de Lara, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From b1684830892f12d0696c3cdebd19ef1df149a712 Mon Sep 17 00:00:00 2001
From: Kevin Traynor <ktraynor@redhat.com>
Date: Wed, 6 May 2020 10:45:18 +0100
Subject: [PATCH] crypto/kasumi: fix extern declaration

[ upstream commit 6a6b5d5616c976eb306cbdbcf9241aba08d2516e ]

gcc 10 defaults to fno-common and it reports:

crypto_kasumi_rte_kasumi_pmd_ops.c.o:(.data.rel+0x0):
multiple definition of `rte_kasumi_pmd_ops';
crypto_kasumi_rte_kasumi_pmd.c.o:(.bss+0x8): first defined here

Fix by making rte_kasumi_pmd_ops extern in the header file.

Fixes: 2773c86d061a ("crypto/kasumi: add driver for KASUMI library")

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 drivers/crypto/kasumi/kasumi_pmd_private.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/kasumi/kasumi_pmd_private.h b/drivers/crypto/kasumi/kasumi_pmd_private.h
index fda696804e..f0b83f2272 100644
--- a/drivers/crypto/kasumi/kasumi_pmd_private.h
+++ b/drivers/crypto/kasumi/kasumi_pmd_private.h
@@ -72,6 +72,6 @@ kasumi_set_session_parameters(struct kasumi_session *sess,
 
 
 /** device specific operations function pointer structure */
-struct rte_cryptodev_ops *rte_kasumi_pmd_ops;
+extern struct rte_cryptodev_ops *rte_kasumi_pmd_ops;
 
 #endif /* _KASUMI_PMD_PRIVATE_H_ */
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:51.747066072 +0100
+++ 0177-crypto-kasumi-fix-extern-declaration.patch	2020-05-19 14:04:44.520653884 +0100
@@ -1,8 +1,10 @@
-From 6a6b5d5616c976eb306cbdbcf9241aba08d2516e Mon Sep 17 00:00:00 2001
+From b1684830892f12d0696c3cdebd19ef1df149a712 Mon Sep 17 00:00:00 2001
 From: Kevin Traynor <ktraynor@redhat.com>
 Date: Wed, 6 May 2020 10:45:18 +0100
 Subject: [PATCH] crypto/kasumi: fix extern declaration
 
+[ upstream commit 6a6b5d5616c976eb306cbdbcf9241aba08d2516e ]
+
 gcc 10 defaults to fno-common and it reports:
 
 crypto_kasumi_rte_kasumi_pmd_ops.c.o:(.data.rel+0x0):
@@ -12,7 +14,6 @@
 Fix by making rte_kasumi_pmd_ops extern in the header file.
 
 Fixes: 2773c86d061a ("crypto/kasumi: add driver for KASUMI library")
-Cc: stable@dpdk.org
 
 Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
 Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
@@ -21,10 +22,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/crypto/kasumi/kasumi_pmd_private.h b/drivers/crypto/kasumi/kasumi_pmd_private.h
-index b7f1c428b4..abedcd616d 100644
+index fda696804e..f0b83f2272 100644
 --- a/drivers/crypto/kasumi/kasumi_pmd_private.h
 +++ b/drivers/crypto/kasumi/kasumi_pmd_private.h
-@@ -76,6 +76,6 @@ kasumi_set_session_parameters(MB_MGR *mgr, struct kasumi_session *sess,
+@@ -72,6 +72,6 @@ kasumi_set_session_parameters(struct kasumi_session *sess,
  
  
  /** device specific operations function pointer structure */

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

* [dpdk-stable] patch 'examples/fips_validation: fix parsing of algorithms' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (175 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'crypto/kasumi: fix extern declaration' " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'drivers/crypto: disable gcc 10 no-common errors' " luca.boccassi
                     ` (35 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Archana Muniganti; +Cc: Ayuj Verma, Anoob Joseph, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From b64337ffa33f3afb40026230ad19484e58196640 Mon Sep 17 00:00:00 2001
From: Archana Muniganti <marchana@marvell.com>
Date: Fri, 17 Apr 2020 20:38:40 +0530
Subject: [PATCH] examples/fips_validation: fix parsing of algorithms

[ upstream commit 90ecace4f6d741c944243dda3ae88c882d4ac12d ]

Few of the NIST TDES test files don't contain TDES string.
Added indicators to identify such files. These indicators
are part of only NIST TDES test vector files.

Fixes: 527cbf3d5ee3 ("examples/fips_validation: support TDES parsing")

Signed-off-by: Archana Muniganti <marchana@marvell.com>
Signed-off-by: Ayuj Verma <ayverma@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
---
 examples/fips_validation/fips_validation.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/examples/fips_validation/fips_validation.c b/examples/fips_validation/fips_validation.c
index 07ffa62e9e..b79a095aca 100644
--- a/examples/fips_validation/fips_validation.c
+++ b/examples/fips_validation/fips_validation.c
@@ -144,6 +144,24 @@ fips_test_parse_header(void)
 				ret = parse_test_tdes_init();
 				if (ret < 0)
 					return 0;
+			} else if (strstr(info.vec[i], "PERMUTATION")) {
+				algo_parsed = 1;
+				info.algo = FIPS_TEST_ALGO_TDES;
+				ret = parse_test_tdes_init();
+				if (ret < 0)
+					return 0;
+			} else if (strstr(info.vec[i], "VARIABLE")) {
+				algo_parsed = 1;
+				info.algo = FIPS_TEST_ALGO_TDES;
+				ret = parse_test_tdes_init();
+				if (ret < 0)
+					return 0;
+			} else if (strstr(info.vec[i], "SUBSTITUTION")) {
+				algo_parsed = 1;
+				info.algo = FIPS_TEST_ALGO_TDES;
+				ret = parse_test_tdes_init();
+				if (ret < 0)
+					return 0;
 			} else if (strstr(info.vec[i], "SHA-")) {
 				algo_parsed = 1;
 				info.algo = FIPS_TEST_ALGO_SHA;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:51.787690209 +0100
+++ 0178-examples-fips_validation-fix-parsing-of-algorithms.patch	2020-05-19 14:04:44.520653884 +0100
@@ -1,14 +1,15 @@
-From 90ecace4f6d741c944243dda3ae88c882d4ac12d Mon Sep 17 00:00:00 2001
+From b64337ffa33f3afb40026230ad19484e58196640 Mon Sep 17 00:00:00 2001
 From: Archana Muniganti <marchana@marvell.com>
 Date: Fri, 17 Apr 2020 20:38:40 +0530
 Subject: [PATCH] examples/fips_validation: fix parsing of algorithms
 
+[ upstream commit 90ecace4f6d741c944243dda3ae88c882d4ac12d ]
+
 Few of the NIST TDES test files don't contain TDES string.
 Added indicators to identify such files. These indicators
 are part of only NIST TDES test vector files.
 
 Fixes: 527cbf3d5ee3 ("examples/fips_validation: support TDES parsing")
-Cc: stable@dpdk.org
 
 Signed-off-by: Archana Muniganti <marchana@marvell.com>
 Signed-off-by: Ayuj Verma <ayverma@marvell.com>
@@ -18,7 +19,7 @@
  1 file changed, 18 insertions(+)
 
 diff --git a/examples/fips_validation/fips_validation.c b/examples/fips_validation/fips_validation.c
-index ef24b72037..a34e34d25a 100644
+index 07ffa62e9e..b79a095aca 100644
 --- a/examples/fips_validation/fips_validation.c
 +++ b/examples/fips_validation/fips_validation.c
 @@ -144,6 +144,24 @@ fips_test_parse_header(void)

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

* [dpdk-stable] patch 'drivers/crypto: disable gcc 10 no-common errors' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (176 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'examples/fips_validation: fix parsing of algorithms' " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'ipsec: check SAD lookup error' " luca.boccassi
                     ` (34 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Kevin Traynor; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 7b842acdfa21c91164c3fc2be296d7003b73d818 Mon Sep 17 00:00:00 2001
From: Kevin Traynor <ktraynor@redhat.com>
Date: Fri, 8 May 2020 17:27:55 +0100
Subject: [PATCH] drivers/crypto: disable gcc 10 no-common errors

[ upstream commit 50b03f3b8eaf725c9e9b35f614c4a33f9623e29a ]

gcc 10 defaults to -fno-common and as a result when linking
with crypto drivers:

drivers/librte_pmd_dpaa_sec.a(crypto_dpaa_sec_dpaa_sec.c.o):
(.bss+0x4): multiple definition of `rta_sec_era';
drivers/librte_pmd_caam_jr.a(crypto_caam_jr_caam_jr.c.o):
(.bss+0x0): first defined here

drivers/librte_pmd_dpaa2_sec.a(crypto_dpaa2_sec_dpaa2_sec_dpseci.c.o):
(.data+0x0): multiple definition of `rta_sec_era';
drivers/librte_pmd_caam_jr.a(crypto_caam_jr_caam_jr.c.o):
(.bss+0x0): first defined here

This is a blunt fix for the issue by enabling fcommon for
dpaa_sec/dpaa2_sec/caam_jr.

Bugzilla ID: 469

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 drivers/crypto/caam_jr/Makefile      | 7 +++++++
 drivers/crypto/caam_jr/meson.build   | 5 +++++
 drivers/crypto/dpaa2_sec/Makefile    | 7 +++++++
 drivers/crypto/dpaa2_sec/meson.build | 5 +++++
 drivers/crypto/dpaa_sec/Makefile     | 7 +++++++
 drivers/crypto/dpaa_sec/meson.build  | 5 +++++
 6 files changed, 36 insertions(+)

diff --git a/drivers/crypto/caam_jr/Makefile b/drivers/crypto/caam_jr/Makefile
index 1b1f25a2a2..5b27b84c09 100644
--- a/drivers/crypto/caam_jr/Makefile
+++ b/drivers/crypto/caam_jr/Makefile
@@ -16,6 +16,13 @@ CFLAGS += -D _GNU_SOURCE
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
 
+# FIXME: temporary solution for Bugzilla 469
+ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
+ifeq ($(shell test $(GCC_VERSION) -ge 100 && echo 1), 1)
+CFLAGS += -fcommon
+endif
+endif
+
 CFLAGS += -I$(RTE_SDK)/drivers/bus/dpaa/include
 CFLAGS += -I$(RTE_SDK)/drivers/common/dpaax
 CFLAGS += -I$(RTE_SDK)/drivers/common/dpaax/caamflib/
diff --git a/drivers/crypto/caam_jr/meson.build b/drivers/crypto/caam_jr/meson.build
index 50132aebef..0dbfa2ee9c 100644
--- a/drivers/crypto/caam_jr/meson.build
+++ b/drivers/crypto/caam_jr/meson.build
@@ -14,6 +14,11 @@ sources = files('caam_jr_capabilities.c',
 
 allow_experimental_apis = true
 
+# FIXME: temporary solution for Bugzilla 469
+if (toolchain == 'gcc' and cc.version().version_compare('>=10.0.0'))
+	cflags += '-fcommon'
+endif
+
 includes += include_directories('../../bus/dpaa/include/')
 includes += include_directories('../../common/dpaax/')
 includes += include_directories('../../common/dpaax/caamflib/')
diff --git a/drivers/crypto/dpaa2_sec/Makefile b/drivers/crypto/dpaa2_sec/Makefile
index 96b9c78435..183e9412ae 100644
--- a/drivers/crypto/dpaa2_sec/Makefile
+++ b/drivers/crypto/dpaa2_sec/Makefile
@@ -20,6 +20,13 @@ CFLAGS += -Wno-implicit-fallthrough
 endif
 endif
 
+# FIXME: temporary solution for Bugzilla 469
+ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
+ifeq ($(shell test $(GCC_VERSION) -ge 100 && echo 1), 1)
+CFLAGS += -fcommon
+endif
+endif
+
 CFLAGS += -I$(RTE_SDK)/drivers/common/dpaax
 CFLAGS += -I$(RTE_SDK)/drivers/common/dpaax/caamflib
 CFLAGS += -I$(RTE_SDK)/drivers/crypto/dpaa2_sec/
diff --git a/drivers/crypto/dpaa2_sec/meson.build b/drivers/crypto/dpaa2_sec/meson.build
index ab9c8c8bf9..3f1dfd67da 100644
--- a/drivers/crypto/dpaa2_sec/meson.build
+++ b/drivers/crypto/dpaa2_sec/meson.build
@@ -12,4 +12,9 @@ sources = files('dpaa2_sec_dpseci.c',
 
 allow_experimental_apis = true
 
+# FIXME: temporary solution for Bugzilla 469
+if (toolchain == 'gcc' and cc.version().version_compare('>=10.0.0'))
+	cflags += '-fcommon'
+endif
+
 includes += include_directories('mc', '../../common/dpaax', '../../common/dpaax/caamflib')
diff --git a/drivers/crypto/dpaa_sec/Makefile b/drivers/crypto/dpaa_sec/Makefile
index fbfd775855..b5a97b9f6e 100644
--- a/drivers/crypto/dpaa_sec/Makefile
+++ b/drivers/crypto/dpaa_sec/Makefile
@@ -14,6 +14,13 @@ CFLAGS += -DALLOW_EXPERIMENTAL_API
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
 
+# FIXME: temporary solution for Bugzilla 469
+ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
+ifeq ($(shell test $(GCC_VERSION) -ge 100 && echo 1), 1)
+CFLAGS += -fcommon
+endif
+endif
+
 CFLAGS += -I$(RTE_SDK)/drivers/bus/dpaa
 CFLAGS += -I$(RTE_SDK)/drivers/bus/dpaa/include
 CFLAGS += -I$(RTE_SDK)/drivers/bus/dpaa/base/qbman
diff --git a/drivers/crypto/dpaa_sec/meson.build b/drivers/crypto/dpaa_sec/meson.build
index 71de819407..e819f9cf1b 100644
--- a/drivers/crypto/dpaa_sec/meson.build
+++ b/drivers/crypto/dpaa_sec/meson.build
@@ -11,6 +11,11 @@ sources = files('dpaa_sec.c')
 
 allow_experimental_apis = true
 
+# FIXME: temporary solution for Bugzilla 469
+if (toolchain == 'gcc' and cc.version().version_compare('>=10.0.0'))
+	cflags += '-fcommon'
+endif
+
 includes += include_directories('../../bus/dpaa/include')
 includes += include_directories('../../common/dpaax')
 includes += include_directories('../../common/dpaax/caamflib/')
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:51.829677547 +0100
+++ 0179-drivers-crypto-disable-gcc-10-no-common-errors.patch	2020-05-19 14:04:44.520653884 +0100
@@ -1,8 +1,10 @@
-From 50b03f3b8eaf725c9e9b35f614c4a33f9623e29a Mon Sep 17 00:00:00 2001
+From 7b842acdfa21c91164c3fc2be296d7003b73d818 Mon Sep 17 00:00:00 2001
 From: Kevin Traynor <ktraynor@redhat.com>
 Date: Fri, 8 May 2020 17:27:55 +0100
 Subject: [PATCH] drivers/crypto: disable gcc 10 no-common errors
 
+[ upstream commit 50b03f3b8eaf725c9e9b35f614c4a33f9623e29a ]
+
 gcc 10 defaults to -fno-common and as a result when linking
 with crypto drivers:
 
@@ -20,7 +22,6 @@
 dpaa_sec/dpaa2_sec/caam_jr.
 
 Bugzilla ID: 469
-Cc: stable@dpdk.org
 
 Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
 Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
@@ -34,10 +35,10 @@
  6 files changed, 36 insertions(+)
 
 diff --git a/drivers/crypto/caam_jr/Makefile b/drivers/crypto/caam_jr/Makefile
-index 89d3238172..10848884cb 100644
+index 1b1f25a2a2..5b27b84c09 100644
 --- a/drivers/crypto/caam_jr/Makefile
 +++ b/drivers/crypto/caam_jr/Makefile
-@@ -14,6 +14,13 @@ CFLAGS += -D _GNU_SOURCE
+@@ -16,6 +16,13 @@ CFLAGS += -D _GNU_SOURCE
  CFLAGS += -O3
  CFLAGS += $(WERROR_FLAGS)
  
@@ -52,12 +53,12 @@
  CFLAGS += -I$(RTE_SDK)/drivers/common/dpaax
  CFLAGS += -I$(RTE_SDK)/drivers/common/dpaax/caamflib/
 diff --git a/drivers/crypto/caam_jr/meson.build b/drivers/crypto/caam_jr/meson.build
-index f8b5250a93..551b136322 100644
+index 50132aebef..0dbfa2ee9c 100644
 --- a/drivers/crypto/caam_jr/meson.build
 +++ b/drivers/crypto/caam_jr/meson.build
-@@ -12,6 +12,11 @@ sources = files('caam_jr_capabilities.c',
- 		'caam_jr_uio.c',
- 		'caam_jr.c')
+@@ -14,6 +14,11 @@ sources = files('caam_jr_capabilities.c',
+ 
+ allow_experimental_apis = true
  
 +# FIXME: temporary solution for Bugzilla 469
 +if (toolchain == 'gcc' and cc.version().version_compare('>=10.0.0'))
@@ -68,10 +69,10 @@
  includes += include_directories('../../common/dpaax/')
  includes += include_directories('../../common/dpaax/caamflib/')
 diff --git a/drivers/crypto/dpaa2_sec/Makefile b/drivers/crypto/dpaa2_sec/Makefile
-index a0a2795575..8ce637db60 100644
+index 96b9c78435..183e9412ae 100644
 --- a/drivers/crypto/dpaa2_sec/Makefile
 +++ b/drivers/crypto/dpaa2_sec/Makefile
-@@ -19,6 +19,13 @@ CFLAGS += -Wno-implicit-fallthrough
+@@ -20,6 +20,13 @@ CFLAGS += -Wno-implicit-fallthrough
  endif
  endif
  
@@ -86,12 +87,12 @@
  CFLAGS += -I$(RTE_SDK)/drivers/common/dpaax/caamflib
  CFLAGS += -I$(RTE_SDK)/drivers/crypto/dpaa2_sec/
 diff --git a/drivers/crypto/dpaa2_sec/meson.build b/drivers/crypto/dpaa2_sec/meson.build
-index cb1c2d0492..505ad94146 100644
+index ab9c8c8bf9..3f1dfd67da 100644
 --- a/drivers/crypto/dpaa2_sec/meson.build
 +++ b/drivers/crypto/dpaa2_sec/meson.build
-@@ -10,4 +10,9 @@ deps += ['security', 'mempool_dpaa2']
- sources = files('dpaa2_sec_dpseci.c',
- 		'mc/dpseci.c')
+@@ -12,4 +12,9 @@ sources = files('dpaa2_sec_dpseci.c',
+ 
+ allow_experimental_apis = true
  
 +# FIXME: temporary solution for Bugzilla 469
 +if (toolchain == 'gcc' and cc.version().version_compare('>=10.0.0'))
@@ -100,10 +101,10 @@
 +
  includes += include_directories('mc', '../../common/dpaax', '../../common/dpaax/caamflib')
 diff --git a/drivers/crypto/dpaa_sec/Makefile b/drivers/crypto/dpaa_sec/Makefile
-index ea266962a3..6cf392cb37 100644
+index fbfd775855..b5a97b9f6e 100644
 --- a/drivers/crypto/dpaa_sec/Makefile
 +++ b/drivers/crypto/dpaa_sec/Makefile
-@@ -13,6 +13,13 @@ LIB = librte_pmd_dpaa_sec.a
+@@ -14,6 +14,13 @@ CFLAGS += -DALLOW_EXPERIMENTAL_API
  CFLAGS += -O3
  CFLAGS += $(WERROR_FLAGS)
  
@@ -118,12 +119,12 @@
  CFLAGS += -I$(RTE_SDK)/drivers/bus/dpaa/include
  CFLAGS += -I$(RTE_SDK)/drivers/bus/dpaa/base/qbman
 diff --git a/drivers/crypto/dpaa_sec/meson.build b/drivers/crypto/dpaa_sec/meson.build
-index 7d422d8d55..f5e6604575 100644
+index 71de819407..e819f9cf1b 100644
 --- a/drivers/crypto/dpaa_sec/meson.build
 +++ b/drivers/crypto/dpaa_sec/meson.build
-@@ -9,6 +9,11 @@ endif
- deps += ['bus_dpaa', 'mempool_dpaa', 'security']
- sources = files('dpaa_sec.c')
+@@ -11,6 +11,11 @@ sources = files('dpaa_sec.c')
+ 
+ allow_experimental_apis = true
  
 +# FIXME: temporary solution for Bugzilla 469
 +if (toolchain == 'gcc' and cc.version().version_compare('>=10.0.0'))

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

* [dpdk-stable] patch 'ipsec: check SAD lookup error' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (177 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'drivers/crypto: disable gcc 10 no-common errors' " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/failsafe: fix fd leak' " luca.boccassi
                     ` (33 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Vladimir Medvedkin; +Cc: Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 47bd1f0ad23fa4d71509ccb23af1a382a0d6a64f Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Date: Mon, 11 May 2020 10:23:06 +0100
Subject: [PATCH] ipsec: check SAD lookup error

[ upstream commit e62893f5ec27a361e74b3961edb808fb3d420bb1 ]

Explicitly check return value in add_specific()
CID 357760 (#2 of 2): Negative array index write (NEGATIVE_RETURNS)
8. negative_returns: Using variable ret as an index to array sad->cnt_arr

Coverity issue: 357760
Fixes: b2ee26926775 ("ipsec: add SAD add/delete/lookup implementation")

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 lib/librte_ipsec/ipsec_sad.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/librte_ipsec/ipsec_sad.c b/lib/librte_ipsec/ipsec_sad.c
index db2c44c804..31b5956d89 100644
--- a/lib/librte_ipsec/ipsec_sad.c
+++ b/lib/librte_ipsec/ipsec_sad.c
@@ -94,6 +94,8 @@ add_specific(struct rte_ipsec_sad *sad, const void *key,
 
 	/* Update a counter for a given SPI */
 	ret = rte_hash_lookup(sad->hash[RTE_IPSEC_SAD_SPI_ONLY], key);
+	if (ret < 0)
+		return ret;
 	if (key_type == RTE_IPSEC_SAD_SPI_DIP)
 		sad->cnt_arr[ret].cnt_dip += notexist;
 	else
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:51.870105974 +0100
+++ 0180-ipsec-check-SAD-lookup-error.patch	2020-05-19 14:04:44.520653884 +0100
@@ -1,15 +1,16 @@
-From e62893f5ec27a361e74b3961edb808fb3d420bb1 Mon Sep 17 00:00:00 2001
+From 47bd1f0ad23fa4d71509ccb23af1a382a0d6a64f Mon Sep 17 00:00:00 2001
 From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
 Date: Mon, 11 May 2020 10:23:06 +0100
 Subject: [PATCH] ipsec: check SAD lookup error
 
+[ upstream commit e62893f5ec27a361e74b3961edb808fb3d420bb1 ]
+
 Explicitly check return value in add_specific()
 CID 357760 (#2 of 2): Negative array index write (NEGATIVE_RETURNS)
 8. negative_returns: Using variable ret as an index to array sad->cnt_arr
 
 Coverity issue: 357760
 Fixes: b2ee26926775 ("ipsec: add SAD add/delete/lookup implementation")
-Cc: stable@dpdk.org
 
 Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
 Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
@@ -18,13 +19,13 @@
  1 file changed, 2 insertions(+)
 
 diff --git a/lib/librte_ipsec/ipsec_sad.c b/lib/librte_ipsec/ipsec_sad.c
-index 6c95240578..3f9533c80a 100644
+index db2c44c804..31b5956d89 100644
 --- a/lib/librte_ipsec/ipsec_sad.c
 +++ b/lib/librte_ipsec/ipsec_sad.c
-@@ -104,6 +104,8 @@ add_specific(struct rte_ipsec_sad *sad, const void *key,
- 	ret = rte_hash_lookup_with_hash(sad->hash[RTE_IPSEC_SAD_SPI_ONLY], key,
- 		rte_hash_crc(key, sad->keysize[RTE_IPSEC_SAD_SPI_ONLY],
- 		sad->init_val));
+@@ -94,6 +94,8 @@ add_specific(struct rte_ipsec_sad *sad, const void *key,
+ 
+ 	/* Update a counter for a given SPI */
+ 	ret = rte_hash_lookup(sad->hash[RTE_IPSEC_SAD_SPI_ONLY], key);
 +	if (ret < 0)
 +		return ret;
  	if (key_type == RTE_IPSEC_SAD_SPI_DIP)

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

* [dpdk-stable] patch 'net/failsafe: fix fd leak' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (178 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'ipsec: check SAD lookup error' " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'app/testpmd: fix statistics after reset' " luca.boccassi
                     ` (32 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Gaetan Rivet, Ali Alnubani, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 556ae6bd83a2970e0b7cf2ae216ef87eac2d1ab4 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Mon, 27 Apr 2020 18:44:19 +0800
Subject: [PATCH] net/failsafe: fix fd leak

[ upstream commit b9663f60359296bcb6f0be8a3d6a2a838c77ee30 ]

Zero is a valid fd. The fd won't be closed thus leading fd leak,
when it is zero.

Also the service proxy is initialized at 0. This is assuming that all of
its fields are invalid at 0. The issue is that a file descriptor at 0 is
a valid one.

The value -1 is used as sentinel during cleanup. Initialize the RX proxy
file descriptor to -1.

Fixes: f234e5bd996d ("net/failsafe: register slaves Rx interrupts")
Fixes: 9e0360aebf23 ("net/failsafe: register as Rx interrupt mode")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Signed-off-by: Gaetan Rivet <grive@u256.net>
Tested-by: Ali Alnubani <alialnu@mellanox.com>
---
 drivers/net/failsafe/failsafe.c         | 1 +
 drivers/net/failsafe/failsafe_intr.c    | 2 +-
 drivers/net/failsafe/failsafe_ops.c     | 2 +-
 drivers/net/failsafe/failsafe_private.h | 8 ++++++++
 4 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c
index 8af31d71b3..72362f35de 100644
--- a/drivers/net/failsafe/failsafe.c
+++ b/drivers/net/failsafe/failsafe.c
@@ -190,6 +190,7 @@ fs_eth_dev_create(struct rte_vdev_device *vdev)
 	}
 	priv = PRIV(dev);
 	priv->data = dev->data;
+	priv->rxp = FS_RX_PROXY_INIT;
 	dev->dev_ops = &failsafe_ops;
 	dev->data->mac_addrs = &PRIV(dev)->mac_addrs[0];
 	dev->data->dev_link = eth_link;
diff --git a/drivers/net/failsafe/failsafe_intr.c b/drivers/net/failsafe/failsafe_intr.c
index 0f34c5bbac..bb5b089b31 100644
--- a/drivers/net/failsafe/failsafe_intr.c
+++ b/drivers/net/failsafe/failsafe_intr.c
@@ -394,7 +394,7 @@ fs_rx_event_proxy_uninstall(struct fs_priv *priv)
 		free(priv->rxp.evec);
 		priv->rxp.evec = NULL;
 	}
-	if (priv->rxp.efd > 0) {
+	if (priv->rxp.efd >= 0) {
 		close(priv->rxp.efd);
 		priv->rxp.efd = -1;
 	}
diff --git a/drivers/net/failsafe/failsafe_ops.c b/drivers/net/failsafe/failsafe_ops.c
index 50f2aca4e7..e1d08e46c8 100644
--- a/drivers/net/failsafe/failsafe_ops.c
+++ b/drivers/net/failsafe/failsafe_ops.c
@@ -380,7 +380,7 @@ fs_rx_queue_release(void *queue)
 	rxq = queue;
 	dev = &rte_eth_devices[rxq->priv->data->port_id];
 	fs_lock(dev, 0);
-	if (rxq->event_fd > 0)
+	if (rxq->event_fd >= 0)
 		close(rxq->event_fd);
 	FOREACH_SUBDEV_STATE(sdev, i, dev, DEV_ACTIVE) {
 		if (ETH(sdev)->data->rx_queues != NULL &&
diff --git a/drivers/net/failsafe/failsafe_private.h b/drivers/net/failsafe/failsafe_private.h
index 8e9706aef0..651578a128 100644
--- a/drivers/net/failsafe/failsafe_private.h
+++ b/drivers/net/failsafe/failsafe_private.h
@@ -58,6 +58,14 @@ struct rx_proxy {
 	enum rxp_service_state sstate;
 };
 
+#define FS_RX_PROXY_INIT (struct rx_proxy){ \
+	.efd = -1, \
+	.evec = NULL, \
+	.sid = 0, \
+	.scid = 0, \
+	.sstate = SS_NO_SERVICE, \
+}
+
 struct rxq {
 	struct fs_priv *priv;
 	uint16_t qid;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:51.913176286 +0100
+++ 0181-net-failsafe-fix-fd-leak.patch	2020-05-19 14:04:44.524653956 +0100
@@ -1,8 +1,10 @@
-From b9663f60359296bcb6f0be8a3d6a2a838c77ee30 Mon Sep 17 00:00:00 2001
+From 556ae6bd83a2970e0b7cf2ae216ef87eac2d1ab4 Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Mon, 27 Apr 2020 18:44:19 +0800
 Subject: [PATCH] net/failsafe: fix fd leak
 
+[ upstream commit b9663f60359296bcb6f0be8a3d6a2a838c77ee30 ]
+
 Zero is a valid fd. The fd won't be closed thus leading fd leak,
 when it is zero.
 
@@ -15,7 +17,6 @@
 
 Fixes: f234e5bd996d ("net/failsafe: register slaves Rx interrupts")
 Fixes: 9e0360aebf23 ("net/failsafe: register as Rx interrupt mode")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Signed-off-by: Gaetan Rivet <grive@u256.net>
@@ -40,10 +41,10 @@
  	dev->data->mac_addrs = &PRIV(dev)->mac_addrs[0];
  	dev->data->dev_link = eth_link;
 diff --git a/drivers/net/failsafe/failsafe_intr.c b/drivers/net/failsafe/failsafe_intr.c
-index d8728fe7e3..602c04033c 100644
+index 0f34c5bbac..bb5b089b31 100644
 --- a/drivers/net/failsafe/failsafe_intr.c
 +++ b/drivers/net/failsafe/failsafe_intr.c
-@@ -393,7 +393,7 @@ fs_rx_event_proxy_uninstall(struct fs_priv *priv)
+@@ -394,7 +394,7 @@ fs_rx_event_proxy_uninstall(struct fs_priv *priv)
  		free(priv->rxp.evec);
  		priv->rxp.evec = NULL;
  	}

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

* [dpdk-stable] patch 'app/testpmd: fix statistics after reset' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (179 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/failsafe: fix fd leak' " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/netvsc: fix comment spelling' " luca.boccassi
                     ` (31 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Wei Hu (Xavier); +Cc: Chengwen Feng, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 024a56857898bf3aabee0b15e9d44cb4d81776bf Mon Sep 17 00:00:00 2001
From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
Date: Tue, 28 Apr 2020 19:50:45 +0800
Subject: [PATCH] app/testpmd: fix statistics after reset

[ upstream commit 9eb974221f44cf210fe5d883bdccfcb48de75fc6 ]

Currently, when running start/clear stats&xstats/stop command many times
based on testpmd application, there are incorrect forward Rx/Tx-packets
stats as below:
---------------------- Forward statistics for port 0  --------------
RX-packets: 18446744073709544808 RX-dropped: 0                <snip>
TX-packets: 18446744073709536616 TX-dropped: 0                <snip>
--------------------------------------------------------------------

The root cause as below:
1. The struct rte_port of testpmd.h has a member variable "struct
   rte_eth_stats stats" to store the last port statistics.
2. When running start command, it execute cmd_start_parsed ->
   start_packet_forwarding -> fwd_stats_reset, which call
   rte_eth_stats_get API function to save current port statistics.
3. When running stop command, it execute fwd_stats_display, which call
   rte_eth_stats_get to get current port statistics, and then minus last
   port statistics.
4. If we run clear stats or xstats after start command, then run stop,
   it may display above incorrect stats because the current
   Rx/Tx-packets is lower than the last saved RX/TX-packets(uint64_t
   overflow).

This patch fixes it by clearing last port statistics when executing
"clear stats/xstats" command.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/test-pmd/config.c                       | 26 ++++++++++++++++++++-
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |  2 +-
 2 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 62e547be09..42eba68b35 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -223,11 +223,26 @@ nic_stats_display(portid_t port_id)
 void
 nic_stats_clear(portid_t port_id)
 {
+	int ret;
+
 	if (port_id_is_invalid(port_id, ENABLED_WARN)) {
 		print_valid_ports();
 		return;
 	}
-	rte_eth_stats_reset(port_id);
+
+	ret = rte_eth_stats_reset(port_id);
+	if (ret != 0) {
+		printf("%s: Error: failed to reset stats (port %u): %s",
+		       __func__, port_id, strerror(ret));
+		return;
+	}
+
+	ret = rte_eth_stats_get(port_id, &ports[port_id].stats);
+	if (ret != 0) {
+		printf("%s: Error: failed to get stats (port %u): %s",
+		       __func__, port_id, strerror(ret));
+		return;
+	}
 	printf("\n  NIC statistics for port %d cleared\n", port_id);
 }
 
@@ -303,10 +318,19 @@ nic_xstats_clear(portid_t port_id)
 		print_valid_ports();
 		return;
 	}
+
 	ret = rte_eth_xstats_reset(port_id);
 	if (ret != 0) {
 		printf("%s: Error: failed to reset xstats (port %u): %s",
 		       __func__, port_id, strerror(ret));
+		return;
+	}
+
+	ret = rte_eth_stats_get(port_id, &ports[port_id].stats);
+	if (ret != 0) {
+		printf("%s: Error: failed to get stats (port %u): %s",
+		       __func__, port_id, strerror(ret));
+		return;
 	}
 }
 
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index 73ef0b41d3..78bdf60fe6 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -237,7 +237,7 @@ Display the RSS hash functions and RSS hash key of a port::
 clear port
 ~~~~~~~~~~
 
-Clear the port statistics for a given port or for all ports::
+Clear the port statistics and forward engine statistics for a given port or for all ports::
 
    testpmd> clear port (info|stats|xstats|fdir|stat_qmap) (port_id|all)
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:51.957781396 +0100
+++ 0182-app-testpmd-fix-statistics-after-reset.patch	2020-05-19 14:04:44.532654101 +0100
@@ -1,8 +1,10 @@
-From 9eb974221f44cf210fe5d883bdccfcb48de75fc6 Mon Sep 17 00:00:00 2001
+From 024a56857898bf3aabee0b15e9d44cb4d81776bf Mon Sep 17 00:00:00 2001
 From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
 Date: Tue, 28 Apr 2020 19:50:45 +0800
 Subject: [PATCH] app/testpmd: fix statistics after reset
 
+[ upstream commit 9eb974221f44cf210fe5d883bdccfcb48de75fc6 ]
+
 Currently, when running start/clear stats&xstats/stop command many times
 based on testpmd application, there are incorrect forward Rx/Tx-packets
 stats as below:
@@ -29,7 +31,6 @@
 "clear stats/xstats" command.
 
 Fixes: af75078fece3 ("first public release")
-Cc: stable@dpdk.org
 
 Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -40,10 +41,10 @@
  2 files changed, 26 insertions(+), 2 deletions(-)
 
 diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
-index 035d336ab5..5381207cc2 100644
+index 62e547be09..42eba68b35 100644
 --- a/app/test-pmd/config.c
 +++ b/app/test-pmd/config.c
-@@ -234,11 +234,26 @@ nic_stats_display(portid_t port_id)
+@@ -223,11 +223,26 @@ nic_stats_display(portid_t port_id)
  void
  nic_stats_clear(portid_t port_id)
  {
@@ -71,7 +72,7 @@
  	printf("\n  NIC statistics for port %d cleared\n", port_id);
  }
  
-@@ -314,10 +329,19 @@ nic_xstats_clear(portid_t port_id)
+@@ -303,10 +318,19 @@ nic_xstats_clear(portid_t port_id)
  		print_valid_ports();
  		return;
  	}
@@ -92,7 +93,7 @@
  }
  
 diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
-index 19260cc2d9..581cd45ebb 100644
+index 73ef0b41d3..78bdf60fe6 100644
 --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
 +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
 @@ -237,7 +237,7 @@ Display the RSS hash functions and RSS hash key of a port::

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

* [dpdk-stable] patch 'net/netvsc: fix comment spelling' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (180 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'app/testpmd: fix statistics after reset' " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'bus/vmbus: " luca.boccassi
                     ` (30 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 4fe11771a22db8b07830b64782df4d830fcd9bf6 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 30 Apr 2020 12:08:47 -0700
Subject: [PATCH] net/netvsc: fix comment spelling

[ upstream commit 672f4d127ba44c5fe89a425fd757d6a0ad4749e1 ]

No code change here.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/netvsc/hn_ethdev.c | 2 +-
 drivers/net/netvsc/hn_nvs.h    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index 05f1a25a1a..46da5a4e81 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -72,7 +72,7 @@ static const struct hn_xstats_name_off hn_stat_strings[] = {
 
 /* The default RSS key.
  * This value is the same as MLX5 so that flows will be
- * received on same path for both VF ans synthetic NIC.
+ * received on same path for both VF and synthetic NIC.
  */
 static const uint8_t rss_default_key[NDIS_HASH_KEYSIZE_TOEPLITZ] = {
 	0x2c, 0xc6, 0x81, 0xd1,	0x5b, 0xdb, 0xf4, 0xf7,
diff --git a/drivers/net/netvsc/hn_nvs.h b/drivers/net/netvsc/hn_nvs.h
index 2563fd8d86..015839e364 100644
--- a/drivers/net/netvsc/hn_nvs.h
+++ b/drivers/net/netvsc/hn_nvs.h
@@ -37,7 +37,7 @@
 #define NVS_RNDIS_MTYPE_CTRL		1
 
 /*
- * NVS message transacion status codes.
+ * NVS message transaction status codes.
  */
 #define NVS_STATUS_OK		1
 #define NVS_STATUS_FAILED		2
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:52.010433663 +0100
+++ 0183-net-netvsc-fix-comment-spelling.patch	2020-05-19 14:04:44.532654101 +0100
@@ -1,8 +1,10 @@
-From 672f4d127ba44c5fe89a425fd757d6a0ad4749e1 Mon Sep 17 00:00:00 2001
+From 4fe11771a22db8b07830b64782df4d830fcd9bf6 Mon Sep 17 00:00:00 2001
 From: Stephen Hemminger <stephen@networkplumber.org>
 Date: Thu, 30 Apr 2020 12:08:47 -0700
 Subject: [PATCH] net/netvsc: fix comment spelling
 
+[ upstream commit 672f4d127ba44c5fe89a425fd757d6a0ad4749e1 ]
+
 No code change here.
 
 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

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

* [dpdk-stable] patch 'bus/vmbus: fix comment spelling' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (181 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/netvsc: fix comment spelling' " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/netvsc: do RSS across Rx queue only' " luca.boccassi
                     ` (29 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From bb0fd68c99b74941ff7e420ecfc90bc3149a9afa Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 30 Apr 2020 12:08:48 -0700
Subject: [PATCH] bus/vmbus: fix comment spelling

[ upstream commit 3a185ff42e7f147b7125fb1d718d349baa4f1aef ]

No code change here.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/bus/vmbus/linux/vmbus_uio.c | 2 +-
 drivers/bus/vmbus/vmbus_common.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/bus/vmbus/linux/vmbus_uio.c b/drivers/bus/vmbus/linux/vmbus_uio.c
index 10e50c9b5a..5451bfd150 100644
--- a/drivers/bus/vmbus/linux/vmbus_uio.c
+++ b/drivers/bus/vmbus/linux/vmbus_uio.c
@@ -165,7 +165,7 @@ vmbus_uio_map_resource_by_index(struct rte_vmbus_device *dev, int idx,
 	dev->resource[idx].addr = mapaddr;
 	vmbus_map_addr = RTE_PTR_ADD(mapaddr, size);
 
-	/* Record result of sucessful mapping for use by secondary */
+	/* Record result of successful mapping for use by secondary */
 	maps[idx].addr = mapaddr;
 	maps[idx].size = size;
 
diff --git a/drivers/bus/vmbus/vmbus_common.c b/drivers/bus/vmbus/vmbus_common.c
index 48a219f735..3adef01c95 100644
--- a/drivers/bus/vmbus/vmbus_common.c
+++ b/drivers/bus/vmbus/vmbus_common.c
@@ -131,7 +131,7 @@ vmbus_probe_one_driver(struct rte_vmbus_driver *dr,
 }
 
 /*
- * IF device class GUID mathces, call the probe function of
+ * If device class GUID matches, call the probe function of
  * registere drivers for the vmbus device.
  * Return -1 if initialization failed,
  * and 1 if no driver found for this device.
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:52.052536441 +0100
+++ 0184-bus-vmbus-fix-comment-spelling.patch	2020-05-19 14:04:44.532654101 +0100
@@ -1,8 +1,10 @@
-From 3a185ff42e7f147b7125fb1d718d349baa4f1aef Mon Sep 17 00:00:00 2001
+From bb0fd68c99b74941ff7e420ecfc90bc3149a9afa Mon Sep 17 00:00:00 2001
 From: Stephen Hemminger <stephen@networkplumber.org>
 Date: Thu, 30 Apr 2020 12:08:48 -0700
 Subject: [PATCH] bus/vmbus: fix comment spelling
 
+[ upstream commit 3a185ff42e7f147b7125fb1d718d349baa4f1aef ]
+
 No code change here.
 
 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

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

* [dpdk-stable] patch 'net/netvsc: do RSS across Rx queue only' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (182 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'bus/vmbus: " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/netvsc: do not configure RSS if disabled' " luca.boccassi
                     ` (28 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From f815b93c27797ab45ba080d1715e195ecfdef994 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 30 Apr 2020 12:08:52 -0700
Subject: [PATCH] net/netvsc: do RSS across Rx queue only

[ upstream commit 019a28912bf0113566ed5599192973bc1a7cbb07 ]

If number of tx queues is greater than the number of rx queues;
the driver ends up allocating more channels than rx queues.
The problem is that the RSS indirection table is programmed such
that some packets will end up on a channel that would never be
polled. The fix is to limit the RSS indirection table by number
of rx queues not channels.

Fixes: 92d23a57cafe ("net/netvsc: support configuring RSS parameters")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/netvsc/hn_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index 46da5a4e81..15a085c849 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -575,7 +575,7 @@ static int hn_dev_configure(struct rte_eth_dev *dev)
 				 dev->data->nb_tx_queues);
 
 	for (i = 0; i < NDIS_HASH_INDCNT; i++)
-		hv->rss_ind[i] = i % hv->num_queues;
+		hv->rss_ind[i] = i % dev->data->nb_rx_queues;
 
 	hn_rss_hash_init(hv, rss_conf);
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:52.098175590 +0100
+++ 0185-net-netvsc-do-RSS-across-Rx-queue-only.patch	2020-05-19 14:04:44.532654101 +0100
@@ -1,8 +1,10 @@
-From 019a28912bf0113566ed5599192973bc1a7cbb07 Mon Sep 17 00:00:00 2001
+From f815b93c27797ab45ba080d1715e195ecfdef994 Mon Sep 17 00:00:00 2001
 From: Stephen Hemminger <stephen@networkplumber.org>
 Date: Thu, 30 Apr 2020 12:08:52 -0700
 Subject: [PATCH] net/netvsc: do RSS across Rx queue only
 
+[ upstream commit 019a28912bf0113566ed5599192973bc1a7cbb07 ]
+
 If number of tx queues is greater than the number of rx queues;
 the driver ends up allocating more channels than rx queues.
 The problem is that the RSS indirection table is programmed such
@@ -11,7 +13,6 @@
 of rx queues not channels.
 
 Fixes: 92d23a57cafe ("net/netvsc: support configuring RSS parameters")
-Cc: stable@dpdk.org
 
 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
 ---
@@ -19,7 +20,7 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
-index 7bf5465ce5..60102362e1 100644
+index 46da5a4e81..15a085c849 100644
 --- a/drivers/net/netvsc/hn_ethdev.c
 +++ b/drivers/net/netvsc/hn_ethdev.c
 @@ -575,7 +575,7 @@ static int hn_dev_configure(struct rte_eth_dev *dev)

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

* [dpdk-stable] patch 'net/netvsc: do not configure RSS if disabled' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (183 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/netvsc: do RSS across Rx queue only' " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/bnxt: fix possible stack smashing' " luca.boccassi
                     ` (27 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 1a476dbabdb73561a338fad7b508b2ad825f886a Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 30 Apr 2020 12:08:53 -0700
Subject: [PATCH] net/netvsc: do not configure RSS if disabled

[ upstream commit c6611b77d0613b6dddc0c207f19e6f5574e13d8e ]

This fixes the problem where driver would not start if only
have a single Rx queue and multiple Txq. In that case, RSS
should stay disabled.

Fixes: 92d23a57cafe ("net/netvsc: support configuring RSS parameters")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/netvsc/hn_ethdev.c | 25 ++++++++++++++-----------
 1 file changed, 14 insertions(+), 11 deletions(-)

diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index 15a085c849..6950682a94 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -376,14 +376,15 @@ static int hn_rss_hash_update(struct rte_eth_dev *dev,
 
 	hn_rss_hash_init(hv, rss_conf);
 
-	err = hn_rndis_conf_rss(hv, 0);
-	if (err) {
-		PMD_DRV_LOG(NOTICE,
-			    "rss reconfig failed (RSS disabled)");
-		return err;
+	if (rss_conf->rss_hf != 0) {
+		err = hn_rndis_conf_rss(hv, 0);
+		if (err) {
+			PMD_DRV_LOG(NOTICE,
+				    "rss reconfig failed (RSS disabled)");
+			return err;
+		}
 	}
 
-
 	return hn_vf_rss_hash_update(dev, rss_conf);
 }
 
@@ -595,11 +596,13 @@ static int hn_dev_configure(struct rte_eth_dev *dev)
 			return err;
 		}
 
-		err = hn_rndis_conf_rss(hv, 0);
-		if (err) {
-			PMD_DRV_LOG(NOTICE,
-				    "initial RSS config failed");
-			return err;
+		if (rss_conf->rss_hf != 0) {
+			err = hn_rndis_conf_rss(hv, 0);
+			if (err) {
+				PMD_DRV_LOG(NOTICE,
+					    "initial RSS config failed");
+				return err;
+			}
 		}
 	}
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:52.140828329 +0100
+++ 0186-net-netvsc-do-not-configure-RSS-if-disabled.patch	2020-05-19 14:04:44.536654173 +0100
@@ -1,14 +1,15 @@
-From c6611b77d0613b6dddc0c207f19e6f5574e13d8e Mon Sep 17 00:00:00 2001
+From 1a476dbabdb73561a338fad7b508b2ad825f886a Mon Sep 17 00:00:00 2001
 From: Stephen Hemminger <stephen@networkplumber.org>
 Date: Thu, 30 Apr 2020 12:08:53 -0700
 Subject: [PATCH] net/netvsc: do not configure RSS if disabled
 
+[ upstream commit c6611b77d0613b6dddc0c207f19e6f5574e13d8e ]
+
 This fixes the problem where driver would not start if only
 have a single Rx queue and multiple Txq. In that case, RSS
 should stay disabled.
 
 Fixes: 92d23a57cafe ("net/netvsc: support configuring RSS parameters")
-Cc: stable@dpdk.org
 
 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
 ---
@@ -16,7 +17,7 @@
  1 file changed, 14 insertions(+), 11 deletions(-)
 
 diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
-index 60102362e1..55b8a63804 100644
+index 15a085c849..6950682a94 100644
 --- a/drivers/net/netvsc/hn_ethdev.c
 +++ b/drivers/net/netvsc/hn_ethdev.c
 @@ -376,14 +376,15 @@ static int hn_rss_hash_update(struct rte_eth_dev *dev,

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

* [dpdk-stable] patch 'net/bnxt: fix possible stack smashing' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (184 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/netvsc: do not configure RSS if disabled' " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/iavf: fix link speed' " luca.boccassi
                     ` (26 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Linsi Yuan; +Cc: Dongsheng Rong, Lance Richardson, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

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

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

Thanks.

Luca Boccassi

---
From 6c8f2aef2f40eeda2cc2c870395d7e89b997a200 Mon Sep 17 00:00:00 2001
From: Linsi Yuan <yuanlinsi01@baidu.com>
Date: Thu, 30 Apr 2020 21:37:52 +0800
Subject: [PATCH] net/bnxt: fix possible stack smashing

[ upstream commit 6ebabb76a57c02681a01e07bf8016e4308c14c7c ]

We see a stack smashing as a result of defensive code missing. Once the
nb_pkts is less than RTE_BNXT_DESCS_PER_LOOP, it will be modified to
zero after doing a floor align, and we can not exit the following
receiving packets loop. And the buffers will be overwrite, then the
stack frame was ruined.

Fix the problem by adding defensive code, once the nb_pkts is zero, just
directly return with no packets.

Fixes: bc4a000f2f53 ("net/bnxt: implement SSE vector mode")

Signed-off-by: Linsi Yuan <yuanlinsi01@baidu.com>
Signed-off-by: Dongsheng Rong <rongdongsheng@baidu.com>
Acked-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxtx_vec_sse.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_rxtx_vec_sse.c b/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
index 31457300a7..8b4c396821 100644
--- a/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
+++ b/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
@@ -233,8 +233,13 @@ bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 	/* Return no more than RTE_BNXT_MAX_RX_BURST per call. */
 	nb_pkts = RTE_MIN(nb_pkts, RTE_BNXT_MAX_RX_BURST);
 
-	/* Make nb_pkts an integer multiple of RTE_BNXT_DESCS_PER_LOOP */
+	/*
+	 * Make nb_pkts an integer multiple of RTE_BNXT_DESCS_PER_LOOP.
+	 * nb_pkts < RTE_BNXT_DESCS_PER_LOOP, just return no packet
+	 */
 	nb_pkts = RTE_ALIGN_FLOOR(nb_pkts, RTE_BNXT_DESCS_PER_LOOP);
+	if (!nb_pkts)
+		return 0;
 
 	/* Handle RX burst request */
 	while (1) {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:52.186426245 +0100
+++ 0187-net-bnxt-fix-possible-stack-smashing.patch	2020-05-19 14:04:44.536654173 +0100
@@ -1,8 +1,10 @@
-From 6ebabb76a57c02681a01e07bf8016e4308c14c7c Mon Sep 17 00:00:00 2001
+From 6c8f2aef2f40eeda2cc2c870395d7e89b997a200 Mon Sep 17 00:00:00 2001
 From: Linsi Yuan <yuanlinsi01@baidu.com>
 Date: Thu, 30 Apr 2020 21:37:52 +0800
 Subject: [PATCH] net/bnxt: fix possible stack smashing
 
+[ upstream commit 6ebabb76a57c02681a01e07bf8016e4308c14c7c ]
+
 We see a stack smashing as a result of defensive code missing. Once the
 nb_pkts is less than RTE_BNXT_DESCS_PER_LOOP, it will be modified to
 zero after doing a floor align, and we can not exit the following
@@ -13,7 +15,6 @@
 directly return with no packets.
 
 Fixes: bc4a000f2f53 ("net/bnxt: implement SSE vector mode")
-Cc: stable@dpdk.org
 
 Signed-off-by: Linsi Yuan <yuanlinsi01@baidu.com>
 Signed-off-by: Dongsheng Rong <rongdongsheng@baidu.com>
@@ -24,7 +25,7 @@
  1 file changed, 6 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/bnxt/bnxt_rxtx_vec_sse.c b/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
-index d0e7910e77..8f73add9be 100644
+index 31457300a7..8b4c396821 100644
 --- a/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
 +++ b/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
 @@ -233,8 +233,13 @@ bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/iavf: fix link speed' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (185 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/bnxt: fix possible stack smashing' " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/ixgbe: fix link status synchronization on BSD' " luca.boccassi
                     ` (25 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Alvin Zhang; +Cc: Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/21/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From b639786c5f18b036a2dbe95637281ad75083ccad Mon Sep 17 00:00:00 2001
From: Alvin Zhang <alvinx.zhang@intel.com>
Date: Thu, 30 Apr 2020 11:21:11 +0800
Subject: [PATCH] net/iavf: fix link speed

[ upstream commit 5330b042977c61b1600700013c6ef2509d496b16 ]

If the PF driver does not support the new speed reporting capabilities
then use link_event instead of link_event_adv to get the speed.

Fixes: 48de41ca11f0 ("net/avf: enable link status update")

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/iavf/iavf_vchnl.c | 41 ++++++++++++++++++++++++++++++++++-
 1 file changed, 40 insertions(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index cf0f6458ed..149673b9b3 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -132,6 +132,38 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args)
 	return err;
 }
 
+static uint32_t
+iavf_convert_link_speed(enum virtchnl_link_speed virt_link_speed)
+{
+	uint32_t speed;
+
+	switch (virt_link_speed) {
+	case VIRTCHNL_LINK_SPEED_100MB:
+		speed = 100;
+		break;
+	case VIRTCHNL_LINK_SPEED_1GB:
+		speed = 1000;
+		break;
+	case VIRTCHNL_LINK_SPEED_10GB:
+		speed = 10000;
+		break;
+	case VIRTCHNL_LINK_SPEED_40GB:
+		speed = 40000;
+		break;
+	case VIRTCHNL_LINK_SPEED_20GB:
+		speed = 20000;
+		break;
+	case VIRTCHNL_LINK_SPEED_25GB:
+		speed = 25000;
+		break;
+	default:
+		speed = 0;
+		break;
+	}
+
+	return speed;
+}
+
 static void
 iavf_handle_pf_event_msg(struct rte_eth_dev *dev, uint8_t *msg,
 			uint16_t msglen)
@@ -153,7 +185,14 @@ iavf_handle_pf_event_msg(struct rte_eth_dev *dev, uint8_t *msg,
 	case VIRTCHNL_EVENT_LINK_CHANGE:
 		PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_LINK_CHANGE event");
 		vf->link_up = pf_msg->event_data.link_event.link_status;
-		vf->link_speed = pf_msg->event_data.link_event_adv.link_speed;
+		if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_CAP_ADV_LINK_SPEED) {
+			vf->link_speed =
+				pf_msg->event_data.link_event_adv.link_speed;
+		} else {
+			enum virtchnl_link_speed speed;
+			speed = pf_msg->event_data.link_event.link_speed;
+			vf->link_speed = iavf_convert_link_speed(speed);
+		}
 		iavf_dev_link_update(dev, 0);
 		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC,
 					      NULL);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:52.225467416 +0100
+++ 0188-net-iavf-fix-link-speed.patch	2020-05-19 14:04:44.536654173 +0100
@@ -1,25 +1,26 @@
-From 5330b042977c61b1600700013c6ef2509d496b16 Mon Sep 17 00:00:00 2001
+From b639786c5f18b036a2dbe95637281ad75083ccad Mon Sep 17 00:00:00 2001
 From: Alvin Zhang <alvinx.zhang@intel.com>
 Date: Thu, 30 Apr 2020 11:21:11 +0800
 Subject: [PATCH] net/iavf: fix link speed
 
+[ upstream commit 5330b042977c61b1600700013c6ef2509d496b16 ]
+
 If the PF driver does not support the new speed reporting capabilities
 then use link_event instead of link_event_adv to get the speed.
 
 Fixes: 48de41ca11f0 ("net/avf: enable link status update")
-Cc: stable@dpdk.org
 
 Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
 Acked-by: Beilei Xing <beilei.xing@intel.com>
 ---
- drivers/net/iavf/iavf_vchnl.c | 47 ++++++++++++++++++++++++++++++++++-
- 1 file changed, 46 insertions(+), 1 deletion(-)
+ drivers/net/iavf/iavf_vchnl.c | 41 ++++++++++++++++++++++++++++++++++-
+ 1 file changed, 40 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
-index 2a0cdd927f..5b8d32ee24 100644
+index cf0f6458ed..149673b9b3 100644
 --- a/drivers/net/iavf/iavf_vchnl.c
 +++ b/drivers/net/iavf/iavf_vchnl.c
-@@ -130,6 +130,44 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args)
+@@ -132,6 +132,38 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args)
  	return err;
  }
  
@@ -47,12 +48,6 @@
 +	case VIRTCHNL_LINK_SPEED_25GB:
 +		speed = 25000;
 +		break;
-+	case VIRTCHNL_LINK_SPEED_2_5GB:
-+		speed = 2500;
-+		break;
-+	case VIRTCHNL_LINK_SPEED_5GB:
-+		speed = 5000;
-+		break;
 +	default:
 +		speed = 0;
 +		break;
@@ -64,7 +59,7 @@
  static void
  iavf_handle_pf_event_msg(struct rte_eth_dev *dev, uint8_t *msg,
  			uint16_t msglen)
-@@ -151,7 +189,14 @@ iavf_handle_pf_event_msg(struct rte_eth_dev *dev, uint8_t *msg,
+@@ -153,7 +185,14 @@ iavf_handle_pf_event_msg(struct rte_eth_dev *dev, uint8_t *msg,
  	case VIRTCHNL_EVENT_LINK_CHANGE:
  		PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_LINK_CHANGE event");
  		vf->link_up = pf_msg->event_data.link_event.link_status;

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/ixgbe: fix link status synchronization on BSD' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (186 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/iavf: fix link speed' " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/ice: support mark only action for flow director' " luca.boccassi
                     ` (24 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Zhihong Peng; +Cc: Zhimin Huang, Xiaolong Ye, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/21/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From f05c433b440fb20cccfa18ac0328f2ac9abdca60 Mon Sep 17 00:00:00 2001
From: Zhihong Peng <zhihongx.peng@intel.com>
Date: Thu, 16 Apr 2020 23:52:12 -0400
Subject: [PATCH] net/ixgbe: fix link status synchronization on BSD

[ upstream commit 0012111a3d879b0b0e27d14a841e2a729545727d ]

DPDK does not implement interrupt mechanism on BSD,
so force NIC status synchronization.

Fixes: dc66e5fd01b9 ("net/ixgbe: improve link state check on VF")

Signed-off-by: Zhihong Peng <zhihongx.peng@intel.com>
Tested-by: Zhimin Huang <zhiminx.huang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 29b7501e0a..e0f59e307d 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -4253,6 +4253,11 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
 	if (wait_to_complete == 0 || dev->data->dev_conf.intr_conf.lsc != 0)
 		wait = 0;
 
+/* BSD has no interrupt mechanism, so force NIC status synchronization. */
+#ifdef RTE_EXEC_ENV_FREEBSD
+	wait = 1;
+#endif
+
 	if (vf)
 		diag = ixgbevf_check_link(hw, &link_speed, &link_up, wait);
 	else
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:52.264636938 +0100
+++ 0189-net-ixgbe-fix-link-status-synchronization-on-BSD.patch	2020-05-19 14:04:44.540654246 +0100
@@ -1,13 +1,14 @@
-From 0012111a3d879b0b0e27d14a841e2a729545727d Mon Sep 17 00:00:00 2001
+From f05c433b440fb20cccfa18ac0328f2ac9abdca60 Mon Sep 17 00:00:00 2001
 From: Zhihong Peng <zhihongx.peng@intel.com>
 Date: Thu, 16 Apr 2020 23:52:12 -0400
 Subject: [PATCH] net/ixgbe: fix link status synchronization on BSD
 
+[ upstream commit 0012111a3d879b0b0e27d14a841e2a729545727d ]
+
 DPDK does not implement interrupt mechanism on BSD,
 so force NIC status synchronization.
 
 Fixes: dc66e5fd01b9 ("net/ixgbe: improve link state check on VF")
-Cc: stable@dpdk.org
 
 Signed-off-by: Zhihong Peng <zhihongx.peng@intel.com>
 Tested-by: Zhimin Huang <zhiminx.huang@intel.com>
@@ -17,10 +18,10 @@
  1 file changed, 5 insertions(+)
 
 diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
-index aa1e8aac51..cf5f1fe709 100644
+index 29b7501e0a..e0f59e307d 100644
 --- a/drivers/net/ixgbe/ixgbe_ethdev.c
 +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
-@@ -4257,6 +4257,11 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
+@@ -4253,6 +4253,11 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
  	if (wait_to_complete == 0 || dev->data->dev_conf.intr_conf.lsc != 0)
  		wait = 0;
  

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/ice: support mark only action for flow director' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (187 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/ixgbe: fix link status synchronization on BSD' " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/ice: fix crash in switch filter' " luca.boccassi
                     ` (23 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Simei Su; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/21/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 2e1e12f6a83b7e94ab50ccfa0df05629482a331e Mon Sep 17 00:00:00 2001
From: Simei Su <simei.su@intel.com>
Date: Tue, 14 Apr 2020 23:11:13 +0800
Subject: [PATCH] net/ice: support mark only action for flow director

[ upstream commit 0f664f7d57268f9ab9bdef95f0d48b3ce5004a61 ]

This patch fixes issue that doesn't support mark only case.
Mark only action is equal to mark + passthru action.

Fixes: f5cafa961fae ("net/ice: add flow director create and destroy")

Signed-off-by: Simei Su <simei.su@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_fdir_filter.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index 6342b560c9..91fef712c1 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -1533,7 +1533,7 @@ ice_fdir_parse_action(struct ice_adapter *ad,
 		}
 	}
 
-	if (dest_num == 0 || dest_num >= 2) {
+	if (dest_num >= 2) {
 		rte_flow_error_set(error, EINVAL,
 			   RTE_FLOW_ERROR_TYPE_ACTION, actions,
 			   "Unsupported action combination");
@@ -1554,6 +1554,18 @@ ice_fdir_parse_action(struct ice_adapter *ad,
 		return -rte_errno;
 	}
 
+	if (dest_num + mark_num + counter_num == 0) {
+		rte_flow_error_set(error, EINVAL,
+			   RTE_FLOW_ERROR_TYPE_ACTION, actions,
+			   "Empty action");
+		return -rte_errno;
+	}
+
+	/* set default action to PASSTHRU mode, in "mark/count only" case. */
+	if (dest_num == 0)
+		filter->input.dest_ctl =
+			ICE_FLTR_PRGM_DESC_DEST_DIRECT_PKT_OTHER;
+
 	return 0;
 }
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:52.315888095 +0100
+++ 0190-net-ice-support-mark-only-action-for-flow-director.patch	2020-05-19 14:04:44.544654318 +0100
@@ -1,13 +1,14 @@
-From 0f664f7d57268f9ab9bdef95f0d48b3ce5004a61 Mon Sep 17 00:00:00 2001
+From 2e1e12f6a83b7e94ab50ccfa0df05629482a331e Mon Sep 17 00:00:00 2001
 From: Simei Su <simei.su@intel.com>
 Date: Tue, 14 Apr 2020 23:11:13 +0800
 Subject: [PATCH] net/ice: support mark only action for flow director
 
+[ upstream commit 0f664f7d57268f9ab9bdef95f0d48b3ce5004a61 ]
+
 This patch fixes issue that doesn't support mark only case.
 Mark only action is equal to mark + passthru action.
 
 Fixes: f5cafa961fae ("net/ice: add flow director create and destroy")
-Cc: stable@dpdk.org
 
 Signed-off-by: Simei Su <simei.su@intel.com>
 Acked-by: Qi Zhang <qi.z.zhang@intel.com>
@@ -16,10 +17,10 @@
  1 file changed, 13 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
-index 1a85d6cc16..69c714c59c 100644
+index 6342b560c9..91fef712c1 100644
 --- a/drivers/net/ice/ice_fdir_filter.c
 +++ b/drivers/net/ice/ice_fdir_filter.c
-@@ -1539,7 +1539,7 @@ ice_fdir_parse_action(struct ice_adapter *ad,
+@@ -1533,7 +1533,7 @@ ice_fdir_parse_action(struct ice_adapter *ad,
  		}
  	}
  
@@ -28,7 +29,7 @@
  		rte_flow_error_set(error, EINVAL,
  			   RTE_FLOW_ERROR_TYPE_ACTION, actions,
  			   "Unsupported action combination");
-@@ -1560,6 +1560,18 @@ ice_fdir_parse_action(struct ice_adapter *ad,
+@@ -1554,6 +1554,18 @@ ice_fdir_parse_action(struct ice_adapter *ad,
  		return -rte_errno;
  	}
  

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/ice: fix crash in switch filter' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (188 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/ice: support mark only action for flow director' " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/tap: fix crash in flow destroy' " luca.boccassi
                     ` (22 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Junyu Jiang; +Cc: Qimai Xiao, Qiming Yang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/21/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 82e2269d013d7bd8af27f0982ab4a279b6edd020 Mon Sep 17 00:00:00 2001
From: Junyu Jiang <junyux.jiang@intel.com>
Date: Wed, 6 May 2020 03:05:25 +0000
Subject: [PATCH] net/ice: fix crash in switch filter

[ upstream commit 1f8672be4208e897e0d1004f43dadcac80749f68 ]

The number of queues in queue group should be checked before
using it. This patch fixed the issue.

Fixes: 47d460d63233 ("net/ice: rework switch filter")

Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
Tested-by: Qimai Xiao <qimaix.xiao@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
---
 drivers/net/ice/ice_switch_filter.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c
index 1d91d773ec..202f29dab5 100644
--- a/drivers/net/ice/ice_switch_filter.c
+++ b/drivers/net/ice/ice_switch_filter.c
@@ -937,6 +937,8 @@ ice_switch_parse_action(struct ice_pf *pf,
 		switch (action_type) {
 		case RTE_FLOW_ACTION_TYPE_RSS:
 			act_qgrop = action->conf;
+			if (act_qgrop->queue_num <= 1)
+				goto error;
 			rule_info->sw_act.fltr_act =
 				ICE_FWD_TO_QGRP;
 			rule_info->sw_act.fwd_id.q_id =
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:52.356196987 +0100
+++ 0191-net-ice-fix-crash-in-switch-filter.patch	2020-05-19 14:04:44.544654318 +0100
@@ -1,13 +1,14 @@
-From 1f8672be4208e897e0d1004f43dadcac80749f68 Mon Sep 17 00:00:00 2001
+From 82e2269d013d7bd8af27f0982ab4a279b6edd020 Mon Sep 17 00:00:00 2001
 From: Junyu Jiang <junyux.jiang@intel.com>
 Date: Wed, 6 May 2020 03:05:25 +0000
 Subject: [PATCH] net/ice: fix crash in switch filter
 
+[ upstream commit 1f8672be4208e897e0d1004f43dadcac80749f68 ]
+
 The number of queues in queue group should be checked before
 using it. This patch fixed the issue.
 
 Fixes: 47d460d63233 ("net/ice: rework switch filter")
-Cc: stable@dpdk.org
 
 Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
 Tested-by: Qimai Xiao <qimaix.xiao@intel.com>
@@ -17,10 +18,10 @@
  1 file changed, 2 insertions(+)
 
 diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c
-index 72bb22395b..1bea7e807c 100644
+index 1d91d773ec..202f29dab5 100644
 --- a/drivers/net/ice/ice_switch_filter.c
 +++ b/drivers/net/ice/ice_switch_filter.c
-@@ -1297,6 +1297,8 @@ ice_switch_parse_action(struct ice_pf *pf,
+@@ -937,6 +937,8 @@ ice_switch_parse_action(struct ice_pf *pf,
  		switch (action_type) {
  		case RTE_FLOW_ACTION_TYPE_RSS:
  			act_qgrop = action->conf;

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/tap: fix crash in flow destroy' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (189 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/ice: fix crash in switch filter' " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/bnxt: fix number of TQM ring' " luca.boccassi
                     ` (21 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/21/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 2befb2f470b5141bead91c26d1220304b0667385 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Mon, 27 Apr 2020 14:39:26 -0700
Subject: [PATCH] net/tap: fix crash in flow destroy

[ upstream commit 8451387df206f5ad34461280ab6a2e5bfe382b9b ]

The TAP driver does not initialize all the elements of the rte_flow
structure. This can lead to crash in rte_flow_destroy.

(gdb) where
    flow=0x100e99280, error=0x0)
    at drivers/net/tap/tap_flow.c:1514

(gdb) p remote_flow
$1 = (struct rte_flow *) 0x6b6b6b6b6b6b6b6b

Which is here:
static int
tap_flow_destroy_pmd(struct pmd_internals *pmd,
		     struct rte_flow *flow,
		     struct rte_flow_error *error)
{
	struct rte_flow *remote_flow = flow->remote_flow;
...
	if (remote_flow) {
		remote_flow->msg.nh.nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK;

Simplest fix is to use rte_zmalloc() so remote_flow and other fields
are always set at zero.

Fixes: 2bc06869cd94 ("net/tap: add remote netdevice traffic capture")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/tap/tap_flow.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/tap/tap_flow.c b/drivers/net/tap/tap_flow.c
index 9d90361d99..1538349e9c 100644
--- a/drivers/net/tap/tap_flow.c
+++ b/drivers/net/tap/tap_flow.c
@@ -1380,7 +1380,7 @@ tap_flow_create(struct rte_eth_dev *dev,
 			NULL, "priority value too big");
 		goto fail;
 	}
-	flow = rte_malloc(__func__, sizeof(struct rte_flow), 0);
+	flow = rte_zmalloc(__func__, sizeof(struct rte_flow), 0);
 	if (!flow) {
 		rte_flow_error_set(error, ENOMEM, RTE_FLOW_ERROR_TYPE_HANDLE,
 				   NULL, "cannot allocate memory for rte_flow");
@@ -1416,7 +1416,7 @@ tap_flow_create(struct rte_eth_dev *dev,
 	 * to the local pmd->if_index.
 	 */
 	if (pmd->remote_if_index) {
-		remote_flow = rte_malloc(__func__, sizeof(struct rte_flow), 0);
+		remote_flow = rte_zmalloc(__func__, sizeof(struct rte_flow), 0);
 		if (!remote_flow) {
 			rte_flow_error_set(
 				error, ENOMEM, RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
@@ -1693,7 +1693,7 @@ int tap_flow_implicit_create(struct pmd_internals *pmd,
 		}
 	};
 
-	remote_flow = rte_malloc(__func__, sizeof(struct rte_flow), 0);
+	remote_flow = rte_zmalloc(__func__, sizeof(struct rte_flow), 0);
 	if (!remote_flow) {
 		TAP_LOG(ERR, "Cannot allocate memory for rte_flow");
 		goto fail;
@@ -1896,7 +1896,7 @@ static int rss_enable(struct pmd_internals *pmd,
 			return -ENOTSUP;
 		}
 
-		rss_flow = rte_malloc(__func__, sizeof(struct rte_flow), 0);
+		rss_flow = rte_zmalloc(__func__, sizeof(struct rte_flow), 0);
 		if (!rss_flow) {
 			TAP_LOG(ERR,
 				"Cannot allocate memory for rte_flow");
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:52.397843905 +0100
+++ 0192-net-tap-fix-crash-in-flow-destroy.patch	2020-05-19 14:04:44.544654318 +0100
@@ -1,8 +1,10 @@
-From 8451387df206f5ad34461280ab6a2e5bfe382b9b Mon Sep 17 00:00:00 2001
+From 2befb2f470b5141bead91c26d1220304b0667385 Mon Sep 17 00:00:00 2001
 From: Stephen Hemminger <stephen@networkplumber.org>
 Date: Mon, 27 Apr 2020 14:39:26 -0700
 Subject: [PATCH] net/tap: fix crash in flow destroy
 
+[ upstream commit 8451387df206f5ad34461280ab6a2e5bfe382b9b ]
+
 The TAP driver does not initialize all the elements of the rte_flow
 structure. This can lead to crash in rte_flow_destroy.
 
@@ -28,7 +30,6 @@
 are always set at zero.
 
 Fixes: 2bc06869cd94 ("net/tap: add remote netdevice traffic capture")
-Cc: stable@dpdk.org
 
 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/bnxt: fix number of TQM ring' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (190 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/tap: fix crash in flow destroy' " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/bnxt: fix TQM ring context memory size' " luca.boccassi
                     ` (20 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/21/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 426e8b5253f7798462dc6622e09d7420fe9e9bf1 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 6 May 2020 11:57:09 +0530
Subject: [PATCH] net/bnxt: fix number of TQM ring

[ upstream commit fd14f72296a3c2b113b5dc232f5d7cf3a8a72b0d ]

Newer firmware advertises the number of TQM rings to allocate
context memory for.  Use the firmware specified value and fall back
to the old value derived from "bp->max_q" if it is not available.

Fixes: f8168ca0e690 ("net/bnxt: support thor controller")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt.h        |  2 +-
 drivers/net/bnxt/bnxt_ethdev.c |  5 ++---
 drivers/net/bnxt/bnxt_hwrm.c   | 31 +++++++++++++++++++------------
 3 files changed, 22 insertions(+), 16 deletions(-)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 0ef0282d2a..334eb036dc 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -359,7 +359,6 @@ struct bnxt_coal {
 #define BNXT_MAX_TC    8
 #define BNXT_MAX_QUEUE 8
 #define BNXT_MAX_TC_Q  (BNXT_MAX_TC + 1)
-#define BNXT_MAX_Q     (bp->max_q + 1)
 #define BNXT_PAGE_SHFT 12
 #define BNXT_PAGE_SIZE (1 << BNXT_PAGE_SHFT)
 #define MAX_CTX_PAGES  (BNXT_PAGE_SIZE / 8)
@@ -418,6 +417,7 @@ struct bnxt_ctx_mem_info {
 	uint16_t        tim_entry_size;
 	uint32_t        tim_max_entries;
 	uint8_t         tqm_entries_multiple;
+	uint8_t         tqm_fp_rings_count;
 
 	uint32_t        flags;
 #define BNXT_CTX_FLAG_INITED    0x01
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index d05c291592..7a9c557b52 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -4401,7 +4401,7 @@ static void bnxt_free_ctx_mem(struct bnxt *bp)
 	rte_memzone_free(bp->ctx->vnic_mem.ring_mem.pg_tbl_mz);
 	rte_memzone_free(bp->ctx->stat_mem.ring_mem.pg_tbl_mz);
 
-	for (i = 0; i < BNXT_MAX_Q; i++) {
+	for (i = 0; i < bp->ctx->tqm_fp_rings_count + 1; i++) {
 		if (bp->ctx->tqm_mem[i])
 			rte_memzone_free(bp->ctx->tqm_mem[i]->ring_mem.mz);
 	}
@@ -4482,9 +4482,8 @@ int bnxt_alloc_ctx_mem(struct bnxt *bp)
 	entries = bnxt_roundup(entries, ctx->tqm_entries_multiple);
 	entries = clamp_t(uint32_t, entries, ctx->tqm_min_entries_per_ring,
 			  ctx->tqm_max_entries_per_ring);
-	for (i = 0, ena = 0; i < BNXT_MAX_Q; i++) {
+	for (i = 0, ena = 0; i < ctx->tqm_fp_rings_count + 1; i++) {
 		ctx_pg = ctx->tqm_mem[i];
-		/* use min tqm entries for now. */
 		ctx_pg->entries = entries;
 		mem_size = ctx->tqm_entry_size * ctx_pg->entries;
 		rc = bnxt_alloc_ctx_mem_blk(bp, ctx_pg, mem_size, "tqm_mem", i);
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 7de5b88f0c..af3560befa 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -4546,7 +4546,7 @@ int bnxt_hwrm_func_backing_store_qcaps(struct bnxt *bp)
 	struct bnxt_ctx_pg_info *ctx_pg;
 	struct bnxt_ctx_mem_info *ctx;
 	int total_alloc_len;
-	int rc, i;
+	int rc, i, tqm_rings;
 
 	if (!BNXT_CHIP_THOR(bp) ||
 	    bp->hwrm_spec_code < HWRM_VERSION_1_9_2 ||
@@ -4566,17 +4566,6 @@ int bnxt_hwrm_func_backing_store_qcaps(struct bnxt *bp)
 		goto ctx_err;
 	}
 
-	ctx_pg = rte_malloc("bnxt_ctx_pg_mem",
-			    sizeof(*ctx_pg) * BNXT_MAX_Q,
-			    RTE_CACHE_LINE_SIZE);
-	if (!ctx_pg) {
-		rc = -ENOMEM;
-		goto ctx_err;
-	}
-	for (i = 0; i < BNXT_MAX_Q; i++, ctx_pg++)
-		ctx->tqm_mem[i] = ctx_pg;
-
-	bp->ctx = ctx;
 	ctx->qp_max_entries = rte_le_to_cpu_32(resp->qp_max_entries);
 	ctx->qp_min_qp1_entries =
 		rte_le_to_cpu_16(resp->qp_min_qp1_entries);
@@ -4612,6 +4601,24 @@ int bnxt_hwrm_func_backing_store_qcaps(struct bnxt *bp)
 	ctx->mrav_entry_size = rte_le_to_cpu_16(resp->mrav_entry_size);
 	ctx->tim_entry_size = rte_le_to_cpu_16(resp->tim_entry_size);
 	ctx->tim_max_entries = rte_le_to_cpu_32(resp->tim_max_entries);
+	ctx->tqm_fp_rings_count = resp->tqm_fp_rings_count;
+
+	if (!ctx->tqm_fp_rings_count)
+		ctx->tqm_fp_rings_count = bp->max_q;
+
+	tqm_rings = ctx->tqm_fp_rings_count + 1;
+
+	ctx_pg = rte_malloc("bnxt_ctx_pg_mem",
+			    sizeof(*ctx_pg) * tqm_rings,
+			    RTE_CACHE_LINE_SIZE);
+	if (!ctx_pg) {
+		rc = -ENOMEM;
+		goto ctx_err;
+	}
+	for (i = 0; i < tqm_rings; i++, ctx_pg++)
+		ctx->tqm_mem[i] = ctx_pg;
+
+	bp->ctx = ctx;
 ctx_err:
 	HWRM_UNLOCK();
 	return rc;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:52.442316570 +0100
+++ 0193-net-bnxt-fix-number-of-TQM-ring.patch	2020-05-19 14:04:44.552654463 +0100
@@ -1,14 +1,15 @@
-From fd14f72296a3c2b113b5dc232f5d7cf3a8a72b0d Mon Sep 17 00:00:00 2001
+From 426e8b5253f7798462dc6622e09d7420fe9e9bf1 Mon Sep 17 00:00:00 2001
 From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
 Date: Wed, 6 May 2020 11:57:09 +0530
 Subject: [PATCH] net/bnxt: fix number of TQM ring
 
+[ upstream commit fd14f72296a3c2b113b5dc232f5d7cf3a8a72b0d ]
+
 Newer firmware advertises the number of TQM rings to allocate
 context memory for.  Use the firmware specified value and fall back
 to the old value derived from "bp->max_q" if it is not available.
 
 Fixes: f8168ca0e690 ("net/bnxt: support thor controller")
-Cc: stable@dpdk.org
 
 Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
 Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
@@ -20,10 +21,10 @@
  3 files changed, 22 insertions(+), 16 deletions(-)
 
 diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
-index 12fed1e9d7..bf5b39cd30 100644
+index 0ef0282d2a..334eb036dc 100644
 --- a/drivers/net/bnxt/bnxt.h
 +++ b/drivers/net/bnxt/bnxt.h
-@@ -362,7 +362,6 @@ struct bnxt_coal {
+@@ -359,7 +359,6 @@ struct bnxt_coal {
  #define BNXT_MAX_TC    8
  #define BNXT_MAX_QUEUE 8
  #define BNXT_MAX_TC_Q  (BNXT_MAX_TC + 1)
@@ -31,7 +32,7 @@
  #define BNXT_PAGE_SHFT 12
  #define BNXT_PAGE_SIZE (1 << BNXT_PAGE_SHFT)
  #define MAX_CTX_PAGES  (BNXT_PAGE_SIZE / 8)
-@@ -421,6 +420,7 @@ struct bnxt_ctx_mem_info {
+@@ -418,6 +417,7 @@ struct bnxt_ctx_mem_info {
  	uint16_t        tim_entry_size;
  	uint32_t        tim_max_entries;
  	uint8_t         tqm_entries_multiple;
@@ -40,10 +41,10 @@
  	uint32_t        flags;
  #define BNXT_CTX_FLAG_INITED    0x01
 diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
-index c2bee54d16..d877ff655d 100644
+index d05c291592..7a9c557b52 100644
 --- a/drivers/net/bnxt/bnxt_ethdev.c
 +++ b/drivers/net/bnxt/bnxt_ethdev.c
-@@ -4644,7 +4644,7 @@ static void bnxt_free_ctx_mem(struct bnxt *bp)
+@@ -4401,7 +4401,7 @@ static void bnxt_free_ctx_mem(struct bnxt *bp)
  	rte_memzone_free(bp->ctx->vnic_mem.ring_mem.pg_tbl_mz);
  	rte_memzone_free(bp->ctx->stat_mem.ring_mem.pg_tbl_mz);
  
@@ -52,7 +53,7 @@
  		if (bp->ctx->tqm_mem[i])
  			rte_memzone_free(bp->ctx->tqm_mem[i]->ring_mem.mz);
  	}
-@@ -4725,9 +4725,8 @@ int bnxt_alloc_ctx_mem(struct bnxt *bp)
+@@ -4482,9 +4482,8 @@ int bnxt_alloc_ctx_mem(struct bnxt *bp)
  	entries = bnxt_roundup(entries, ctx->tqm_entries_multiple);
  	entries = clamp_t(uint32_t, entries, ctx->tqm_min_entries_per_ring,
  			  ctx->tqm_max_entries_per_ring);
@@ -64,10 +65,10 @@
  		mem_size = ctx->tqm_entry_size * ctx_pg->entries;
  		rc = bnxt_alloc_ctx_mem_blk(bp, ctx_pg, mem_size, "tqm_mem", i);
 diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
-index b0a783525e..ef65107384 100644
+index 7de5b88f0c..af3560befa 100644
 --- a/drivers/net/bnxt/bnxt_hwrm.c
 +++ b/drivers/net/bnxt/bnxt_hwrm.c
-@@ -4694,7 +4694,7 @@ int bnxt_hwrm_func_backing_store_qcaps(struct bnxt *bp)
+@@ -4546,7 +4546,7 @@ int bnxt_hwrm_func_backing_store_qcaps(struct bnxt *bp)
  	struct bnxt_ctx_pg_info *ctx_pg;
  	struct bnxt_ctx_mem_info *ctx;
  	int total_alloc_len;
@@ -76,7 +77,7 @@
  
  	if (!BNXT_CHIP_THOR(bp) ||
  	    bp->hwrm_spec_code < HWRM_VERSION_1_9_2 ||
-@@ -4714,17 +4714,6 @@ int bnxt_hwrm_func_backing_store_qcaps(struct bnxt *bp)
+@@ -4566,17 +4566,6 @@ int bnxt_hwrm_func_backing_store_qcaps(struct bnxt *bp)
  		goto ctx_err;
  	}
  
@@ -94,7 +95,7 @@
  	ctx->qp_max_entries = rte_le_to_cpu_32(resp->qp_max_entries);
  	ctx->qp_min_qp1_entries =
  		rte_le_to_cpu_16(resp->qp_min_qp1_entries);
-@@ -4760,6 +4749,24 @@ int bnxt_hwrm_func_backing_store_qcaps(struct bnxt *bp)
+@@ -4612,6 +4601,24 @@ int bnxt_hwrm_func_backing_store_qcaps(struct bnxt *bp)
  	ctx->mrav_entry_size = rte_le_to_cpu_16(resp->mrav_entry_size);
  	ctx->tim_entry_size = rte_le_to_cpu_16(resp->tim_entry_size);
  	ctx->tim_max_entries = rte_le_to_cpu_32(resp->tim_max_entries);

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/bnxt: fix TQM ring context memory size' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (191 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/bnxt: fix number of TQM ring' " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/virtio: fix crash when device reconnecting' " luca.boccassi
                     ` (19 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/21/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From abe65fce866a24fb36ccd2da847be7258b48370a Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 6 May 2020 11:57:10 +0530
Subject: [PATCH] net/bnxt: fix TQM ring context memory size

[ upstream commit 2f8cc21f0943e1fde68b38e09f9bf238d0eb7811 ]

The current formulas to calculate the TQM slow path and fast path ring
context memory sizes are not quite correct. TQM slow path entry is
array index 0 of ctx->tqm_mem[]. The other array entries are for fast
path. Fix these sizes according to firmware spec. for 57500 and newer
chips.

Fixes: cc5e26b8ef98 ("net/bnxt: increase TQM entry allocation")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 7a9c557b52..fe134108b6 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -4429,6 +4429,7 @@ int bnxt_alloc_ctx_mem(struct bnxt *bp)
 	struct bnxt_ctx_pg_info *ctx_pg;
 	struct bnxt_ctx_mem_info *ctx;
 	uint32_t mem_size, ena, entries;
+	uint32_t entries_sp, min;
 	int i, rc;
 
 	rc = bnxt_hwrm_func_backing_store_qcaps(bp);
@@ -4476,15 +4477,20 @@ int bnxt_alloc_ctx_mem(struct bnxt *bp)
 	if (rc)
 		return rc;
 
-	entries = ctx->qp_max_l2_entries +
-		  ctx->vnic_max_vnic_entries +
-		  ctx->tqm_min_entries_per_ring;
+	min = ctx->tqm_min_entries_per_ring;
+
+	entries_sp = ctx->qp_max_l2_entries +
+		     ctx->vnic_max_vnic_entries +
+		     2 * ctx->qp_min_qp1_entries + min;
+	entries_sp = bnxt_roundup(entries_sp, ctx->tqm_entries_multiple);
+
+	entries = ctx->qp_max_l2_entries + ctx->qp_min_qp1_entries;
 	entries = bnxt_roundup(entries, ctx->tqm_entries_multiple);
-	entries = clamp_t(uint32_t, entries, ctx->tqm_min_entries_per_ring,
+	entries = clamp_t(uint32_t, entries, min,
 			  ctx->tqm_max_entries_per_ring);
 	for (i = 0, ena = 0; i < ctx->tqm_fp_rings_count + 1; i++) {
 		ctx_pg = ctx->tqm_mem[i];
-		ctx_pg->entries = entries;
+		ctx_pg->entries = i ? entries : entries_sp;
 		mem_size = ctx->tqm_entry_size * ctx_pg->entries;
 		rc = bnxt_alloc_ctx_mem_blk(bp, ctx_pg, mem_size, "tqm_mem", i);
 		if (rc)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:52.494717622 +0100
+++ 0194-net-bnxt-fix-TQM-ring-context-memory-size.patch	2020-05-19 14:04:44.552654463 +0100
@@ -1,8 +1,10 @@
-From 2f8cc21f0943e1fde68b38e09f9bf238d0eb7811 Mon Sep 17 00:00:00 2001
+From abe65fce866a24fb36ccd2da847be7258b48370a Mon Sep 17 00:00:00 2001
 From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
 Date: Wed, 6 May 2020 11:57:10 +0530
 Subject: [PATCH] net/bnxt: fix TQM ring context memory size
 
+[ upstream commit 2f8cc21f0943e1fde68b38e09f9bf238d0eb7811 ]
+
 The current formulas to calculate the TQM slow path and fast path ring
 context memory sizes are not quite correct. TQM slow path entry is
 array index 0 of ctx->tqm_mem[]. The other array entries are for fast
@@ -10,7 +12,6 @@
 chips.
 
 Fixes: cc5e26b8ef98 ("net/bnxt: increase TQM entry allocation")
-Cc: stable@dpdk.org
 
 Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
 Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
@@ -20,10 +21,10 @@
  1 file changed, 11 insertions(+), 5 deletions(-)
 
 diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
-index d877ff655d..dab291c7ce 100644
+index 7a9c557b52..fe134108b6 100644
 --- a/drivers/net/bnxt/bnxt_ethdev.c
 +++ b/drivers/net/bnxt/bnxt_ethdev.c
-@@ -4672,6 +4672,7 @@ int bnxt_alloc_ctx_mem(struct bnxt *bp)
+@@ -4429,6 +4429,7 @@ int bnxt_alloc_ctx_mem(struct bnxt *bp)
  	struct bnxt_ctx_pg_info *ctx_pg;
  	struct bnxt_ctx_mem_info *ctx;
  	uint32_t mem_size, ena, entries;
@@ -31,7 +32,7 @@
  	int i, rc;
  
  	rc = bnxt_hwrm_func_backing_store_qcaps(bp);
-@@ -4719,15 +4720,20 @@ int bnxt_alloc_ctx_mem(struct bnxt *bp)
+@@ -4476,15 +4477,20 @@ int bnxt_alloc_ctx_mem(struct bnxt *bp)
  	if (rc)
  		return rc;
  

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/virtio: fix crash when device reconnecting' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (192 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/bnxt: fix TQM ring context memory size' " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/bnxt: fix FW version query' " luca.boccassi
                     ` (18 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Marvin Liu; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/21/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From dafdf5879988e8eb64b4659a0f104b665fd5aab9 Mon Sep 17 00:00:00 2001
From: Marvin Liu <yong.liu@intel.com>
Date: Wed, 6 May 2020 23:07:24 +0800
Subject: [PATCH] net/virtio: fix crash when device reconnecting

[ upstream commit 01996a034a78db79686238a9656f8a49367fe963 ]

When doing virtio device initialization, virtqueues will be reset in
server mode if ring type is packed. It will cause issue because queues
have been freed in the beginning of device initialization.

Fix this issue by checking whether device has been initialized before
reset. If device hasn't been initialized, there's no need to reset
queues.

Fixes: 6ebbf4109f35 ("net/virtio-user: fix packed ring server mode")

Signed-off-by: Marvin Liu <yong.liu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/virtio/virtio_user_ethdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c
index e5b5a804a2..e2cbd2478d 100644
--- a/drivers/net/virtio/virtio_user_ethdev.c
+++ b/drivers/net/virtio/virtio_user_ethdev.c
@@ -89,7 +89,8 @@ virtio_user_server_reconnect(struct virtio_user_dev *dev)
 	dev->features &= dev->device_features;
 
 	/* For packed ring, resetting queues is required in reconnection. */
-	if (vtpci_packed_queue(hw)) {
+	if (vtpci_packed_queue(hw) &&
+	   (vtpci_get_status(hw) & VIRTIO_CONFIG_STATUS_DRIVER_OK)) {
 		PMD_INIT_LOG(NOTICE, "Packets on the fly will be dropped"
 				" when packed ring reconnecting.");
 		virtio_user_reset_queues_packed(eth_dev);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:52.539641439 +0100
+++ 0195-net-virtio-fix-crash-when-device-reconnecting.patch	2020-05-19 14:04:44.556654535 +0100
@@ -1,8 +1,10 @@
-From 01996a034a78db79686238a9656f8a49367fe963 Mon Sep 17 00:00:00 2001
+From dafdf5879988e8eb64b4659a0f104b665fd5aab9 Mon Sep 17 00:00:00 2001
 From: Marvin Liu <yong.liu@intel.com>
 Date: Wed, 6 May 2020 23:07:24 +0800
 Subject: [PATCH] net/virtio: fix crash when device reconnecting
 
+[ upstream commit 01996a034a78db79686238a9656f8a49367fe963 ]
+
 When doing virtio device initialization, virtqueues will be reset in
 server mode if ring type is packed. It will cause issue because queues
 have been freed in the beginning of device initialization.
@@ -12,7 +14,6 @@
 queues.
 
 Fixes: 6ebbf4109f35 ("net/virtio-user: fix packed ring server mode")
-Cc: stable@dpdk.org
 
 Signed-off-by: Marvin Liu <yong.liu@intel.com>
 Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
@@ -21,7 +22,7 @@
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c
-index dfc5291d4c..798f191c32 100644
+index e5b5a804a2..e2cbd2478d 100644
 --- a/drivers/net/virtio/virtio_user_ethdev.c
 +++ b/drivers/net/virtio/virtio_user_ethdev.c
 @@ -89,7 +89,8 @@ virtio_user_server_reconnect(struct virtio_user_dev *dev)

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/bnxt: fix FW version query' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (193 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/virtio: fix crash when device reconnecting' " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'app/testpmd: fix memory failure handling for i40e DDP' " luca.boccassi
                     ` (17 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/21/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From e428b51c180ef54098f846e4c81681965d2e4f2f Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Wed, 6 May 2020 22:43:28 -0700
Subject: [PATCH] net/bnxt: fix FW version query

[ upstream commit cfa9e98d3c135e4f937265263feb7377330219f6 ]

bnxt_fw_version_get is not indicating the complete FW version.
Fix it to indicate complete version string.

Fixes: e2652b0a20a0 ("net/bnxt: support get FW version")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index fe134108b6..c1e5dfa936 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -2171,10 +2171,11 @@ bnxt_fw_version_get(struct rte_eth_dev *dev, char *fw_version, size_t fw_size)
 	uint8_t fw_major = (bp->fw_ver >> 24) & 0xff;
 	uint8_t fw_minor = (bp->fw_ver >> 16) & 0xff;
 	uint8_t fw_updt = (bp->fw_ver >> 8) & 0xff;
+	uint8_t fw_rsvd = bp->fw_ver & 0xff;
 	int ret;
 
-	ret = snprintf(fw_version, fw_size, "%d.%d.%d",
-			fw_major, fw_minor, fw_updt);
+	ret = snprintf(fw_version, fw_size, "%d.%d.%d.%d",
+			fw_major, fw_minor, fw_updt, fw_rsvd);
 
 	ret += 1; /* add the size of '\0' */
 	if (fw_size < (uint32_t)ret)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:52.578226630 +0100
+++ 0196-net-bnxt-fix-FW-version-query.patch	2020-05-19 14:04:44.556654535 +0100
@@ -1,13 +1,14 @@
-From cfa9e98d3c135e4f937265263feb7377330219f6 Mon Sep 17 00:00:00 2001
+From e428b51c180ef54098f846e4c81681965d2e4f2f Mon Sep 17 00:00:00 2001
 From: Ajit Khaparde <ajit.khaparde@broadcom.com>
 Date: Wed, 6 May 2020 22:43:28 -0700
 Subject: [PATCH] net/bnxt: fix FW version query
 
+[ upstream commit cfa9e98d3c135e4f937265263feb7377330219f6 ]
+
 bnxt_fw_version_get is not indicating the complete FW version.
 Fix it to indicate complete version string.
 
 Fixes: e2652b0a20a0 ("net/bnxt: support get FW version")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
 ---
@@ -15,10 +16,10 @@
  1 file changed, 3 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
-index dab291c7ce..ee0550b324 100644
+index fe134108b6..c1e5dfa936 100644
 --- a/drivers/net/bnxt/bnxt_ethdev.c
 +++ b/drivers/net/bnxt/bnxt_ethdev.c
-@@ -2404,10 +2404,11 @@ bnxt_fw_version_get(struct rte_eth_dev *dev, char *fw_version, size_t fw_size)
+@@ -2171,10 +2171,11 @@ bnxt_fw_version_get(struct rte_eth_dev *dev, char *fw_version, size_t fw_size)
  	uint8_t fw_major = (bp->fw_ver >> 24) & 0xff;
  	uint8_t fw_minor = (bp->fw_ver >> 16) & 0xff;
  	uint8_t fw_updt = (bp->fw_ver >> 8) & 0xff;

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'app/testpmd: fix memory failure handling for i40e DDP' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (194 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/bnxt: fix FW version query' " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'bus/fslmc: fix dereferencing null pointer' " luca.boccassi
                     ` (16 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Bernard Iremonger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/21/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From f83c2ba6ea55b08113640b0b6da079b516095861 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Fri, 8 May 2020 10:20:24 +0530
Subject: [PATCH] app/testpmd: fix memory failure handling for i40e DDP

[ upstream commit 489bdbbfc269c819ec679605d1f0e8ad058789f4 ]

In cmd_ddp_get_list_parsed(), elements of "p_list" are accessed
even after the memory allocation for "p_list" fails.

With this patch, this null pointer dereference is avoided as we
return when there is malloc failure.

Fixes: e088907bb851 ("app/testpmd: add command for getting loaded DDP profiles")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 app/test-pmd/cmdline.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 1dbde50566..d508d1e26d 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -16805,8 +16805,10 @@ cmd_ddp_get_list_parsed(
 #ifdef RTE_LIBRTE_I40E_PMD
 	size = PROFILE_INFO_SIZE * MAX_PROFILE_NUM + 4;
 	p_list = (struct rte_pmd_i40e_profile_list *)malloc(size);
-	if (!p_list)
+	if (!p_list) {
 		printf("%s: Failed to malloc buffer\n", __func__);
+		return;
+	}
 
 	if (ret == -ENOTSUP)
 		ret = rte_pmd_i40e_get_ddp_list(res->port_id,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:52.622826347 +0100
+++ 0197-app-testpmd-fix-memory-failure-handling-for-i40e-DDP.patch	2020-05-19 14:04:44.572654826 +0100
@@ -1,8 +1,10 @@
-From 489bdbbfc269c819ec679605d1f0e8ad058789f4 Mon Sep 17 00:00:00 2001
+From f83c2ba6ea55b08113640b0b6da079b516095861 Mon Sep 17 00:00:00 2001
 From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
 Date: Fri, 8 May 2020 10:20:24 +0530
 Subject: [PATCH] app/testpmd: fix memory failure handling for i40e DDP
 
+[ upstream commit 489bdbbfc269c819ec679605d1f0e8ad058789f4 ]
+
 In cmd_ddp_get_list_parsed(), elements of "p_list" are accessed
 even after the memory allocation for "p_list" fails.
 
@@ -10,7 +12,6 @@
 return when there is malloc failure.
 
 Fixes: e088907bb851 ("app/testpmd: add command for getting loaded DDP profiles")
-Cc: stable@dpdk.org
 
 Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
 Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
@@ -19,10 +20,10 @@
  1 file changed, 3 insertions(+), 1 deletion(-)
 
 diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
-index b040630c54..996a498768 100644
+index 1dbde50566..d508d1e26d 100644
 --- a/app/test-pmd/cmdline.c
 +++ b/app/test-pmd/cmdline.c
-@@ -16891,8 +16891,10 @@ cmd_ddp_get_list_parsed(
+@@ -16805,8 +16805,10 @@ cmd_ddp_get_list_parsed(
  #ifdef RTE_LIBRTE_I40E_PMD
  	size = PROFILE_INFO_SIZE * MAX_PROFILE_NUM + 4;
  	p_list = (struct rte_pmd_i40e_profile_list *)malloc(size);

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'bus/fslmc: fix dereferencing null pointer' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (195 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'app/testpmd: fix memory failure handling for i40e DDP' " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/dpaa2: fix 10G port negotiation' " luca.boccassi
                     ` (15 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Apeksha Gupta; +Cc: Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/21/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From ef6d112d7d5eec99030464e162f8b21428454403 Mon Sep 17 00:00:00 2001
From: Apeksha Gupta <apeksha.gupta@nxp.com>
Date: Fri, 8 May 2020 18:32:02 +0530
Subject: [PATCH] bus/fslmc: fix dereferencing null pointer

[ upstream commit 27ede02945b31e952a66c1bdbf7cf9481698d8dd ]

Fixes: 6fef517e17cf ("bus/fslmc: add qman HW fq query count API")

Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/fslmc/qbman/qbman_debug.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/bus/fslmc/qbman/qbman_debug.c b/drivers/bus/fslmc/qbman/qbman_debug.c
index 0bb2ce880f..4cd0923acb 100644
--- a/drivers/bus/fslmc/qbman/qbman_debug.c
+++ b/drivers/bus/fslmc/qbman/qbman_debug.c
@@ -27,19 +27,20 @@ int qbman_fq_query_state(struct qbman_swp *s, uint32_t fqid,
 			 struct qbman_fq_query_np_rslt *r)
 {
 	struct qbman_fq_query_desc *p;
+	struct qbman_fq_query_np_rslt *var;
 
 	p = (struct qbman_fq_query_desc *)qbman_swp_mc_start(s);
 	if (!p)
 		return -EBUSY;
 
 	p->fqid = fqid;
-	*r = *(struct qbman_fq_query_np_rslt *)qbman_swp_mc_complete(s, p,
-						QBMAN_FQ_QUERY_NP);
-	if (!r) {
+	var = qbman_swp_mc_complete(s, p, QBMAN_FQ_QUERY_NP);
+	if (!var) {
 		pr_err("qbman: Query FQID %d NP fields failed, no response\n",
 		       fqid);
 		return -EIO;
 	}
+	*r = *var;
 
 	/* Decode the outcome */
 	QBMAN_BUG_ON((r->verb & QBMAN_RESPONSE_VERB_MASK) != QBMAN_FQ_QUERY_NP);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:52.682163223 +0100
+++ 0198-bus-fslmc-fix-dereferencing-null-pointer.patch	2020-05-19 14:04:44.572654826 +0100
@@ -1,10 +1,11 @@
-From 27ede02945b31e952a66c1bdbf7cf9481698d8dd Mon Sep 17 00:00:00 2001
+From ef6d112d7d5eec99030464e162f8b21428454403 Mon Sep 17 00:00:00 2001
 From: Apeksha Gupta <apeksha.gupta@nxp.com>
 Date: Fri, 8 May 2020 18:32:02 +0530
 Subject: [PATCH] bus/fslmc: fix dereferencing null pointer
 
+[ upstream commit 27ede02945b31e952a66c1bdbf7cf9481698d8dd ]
+
 Fixes: 6fef517e17cf ("bus/fslmc: add qman HW fq query count API")
-Cc: stable@dpdk.org
 
 Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
 Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/dpaa2: fix 10G port negotiation' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (196 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'bus/fslmc: fix dereferencing null pointer' " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/dpaa2: fix congestion ID for multiple traffic classes' " luca.boccassi
                     ` (14 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Rohit Raj; +Cc: Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/21/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From a71e30e6b072eb83febbe3a4fa282c518eee6788 Mon Sep 17 00:00:00 2001
From: Rohit Raj <rohit.raj@nxp.com>
Date: Fri, 8 May 2020 18:32:03 +0530
Subject: [PATCH] net/dpaa2: fix 10G port negotiation

[ upstream commit 7e6ecac281e4571d942889d6de687bb87623899b ]

Fixed 10G port negotiation issue with another 10G/non 10G port.

When running testpmd with 10G interfaces on 10BaseT interface
on LS2088ARDB, the ports were showing link as down.

This was identified to be caused by the setting of link as down
during config.
Also, the line rate was not being updated in device link params,
thus having the incorrect link speed in status (as 0).

Fixes: c5acbb5ea20e ("net/dpaa2: support link status event")

Signed-off-by: Rohit Raj <rohit.raj@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa2/dpaa2_ethdev.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 2cde55e7cc..4fc550a885 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -553,9 +553,6 @@ dpaa2_eth_dev_configure(struct rte_eth_dev *dev)
 	if (rx_offloads & DEV_RX_OFFLOAD_VLAN_FILTER)
 		dpaa2_vlan_offload_set(dev, ETH_VLAN_FILTER_MASK);
 
-	/* update the current status */
-	dpaa2_dev_link_update(dev, 0);
-
 	return 0;
 }
 
@@ -1757,6 +1754,7 @@ dpaa2_dev_set_link_up(struct rte_eth_dev *dev)
 	/* changing tx burst function to start enqueues */
 	dev->tx_pkt_burst = dpaa2_dev_tx;
 	dev->data->dev_link.link_status = state.up;
+	dev->data->dev_link.link_speed = state.rate;
 
 	if (state.up)
 		DPAA2_PMD_INFO("Port %d Link is Up", dev->data->port_id);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:52.721428481 +0100
+++ 0199-net-dpaa2-fix-10G-port-negotiation.patch	2020-05-19 14:04:44.572654826 +0100
@@ -1,8 +1,10 @@
-From 7e6ecac281e4571d942889d6de687bb87623899b Mon Sep 17 00:00:00 2001
+From a71e30e6b072eb83febbe3a4fa282c518eee6788 Mon Sep 17 00:00:00 2001
 From: Rohit Raj <rohit.raj@nxp.com>
 Date: Fri, 8 May 2020 18:32:03 +0530
 Subject: [PATCH] net/dpaa2: fix 10G port negotiation
 
+[ upstream commit 7e6ecac281e4571d942889d6de687bb87623899b ]
+
 Fixed 10G port negotiation issue with another 10G/non 10G port.
 
 When running testpmd with 10G interfaces on 10BaseT interface
@@ -14,7 +16,6 @@
 thus having the incorrect link speed in status (as 0).
 
 Fixes: c5acbb5ea20e ("net/dpaa2: support link status event")
-Cc: stable@dpdk.org
 
 Signed-off-by: Rohit Raj <rohit.raj@nxp.com>
 Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/dpaa2: fix congestion ID for multiple traffic classes' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (197 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/dpaa2: fix 10G port negotiation' " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'bus/fslmc: fix size of qman fq descriptor' " luca.boccassi
                     ` (13 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Jun Yang; +Cc: Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/21/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From eeaa4c42b347a19845b43b0a42e36b90fe79adf3 Mon Sep 17 00:00:00 2001
From: Jun Yang <jun.yang@nxp.com>
Date: Fri, 8 May 2020 18:32:09 +0530
Subject: [PATCH] net/dpaa2: fix congestion ID for multiple traffic classes

[ upstream commit 7a3a9d5660303971acb487d016613ce52105ac01 ]

When using a single TC, flow id is same as congestion group id.
However in case of multiple traffic classes, same flow id values
are used within each traffic class, which causes incorrect
traffic behavior e.g. halting of traffic.
This patches changes to use the cgid as the index which works
for single as well as multiple traffic classes.

Fixes: 13b856ac02a8 ("net/dpaa2: support taildrop on frame count basis")

Signed-off-by: Jun Yang <jun.yang@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa2/dpaa2_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 4fc550a885..19196cbb65 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -660,7 +660,7 @@ dpaa2_dev_rx_queue_setup(struct rte_eth_dev *dev,
 						DPNI_CP_CONGESTION_GROUP,
 						DPNI_QUEUE_RX,
 						dpaa2_q->tc_index,
-						flow_id, &taildrop);
+						dpaa2_q->cgid, &taildrop);
 		} else {
 			/*enabling per rx queue congestion control */
 			taildrop.threshold = CONG_THRESHOLD_RX_BYTES_Q;
@@ -687,7 +687,7 @@ dpaa2_dev_rx_queue_setup(struct rte_eth_dev *dev,
 			ret = dpni_set_taildrop(dpni, CMD_PRI_LOW, priv->token,
 					DPNI_CP_CONGESTION_GROUP, DPNI_QUEUE_RX,
 					dpaa2_q->tc_index,
-					flow_id, &taildrop);
+					dpaa2_q->cgid, &taildrop);
 		} else {
 			ret = dpni_set_taildrop(dpni, CMD_PRI_LOW, priv->token,
 					DPNI_CP_QUEUE, DPNI_QUEUE_RX,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:52.761946721 +0100
+++ 0200-net-dpaa2-fix-congestion-ID-for-multiple-traffic-cla.patch	2020-05-19 14:04:44.576654898 +0100
@@ -1,8 +1,10 @@
-From 7a3a9d5660303971acb487d016613ce52105ac01 Mon Sep 17 00:00:00 2001
+From eeaa4c42b347a19845b43b0a42e36b90fe79adf3 Mon Sep 17 00:00:00 2001
 From: Jun Yang <jun.yang@nxp.com>
 Date: Fri, 8 May 2020 18:32:09 +0530
 Subject: [PATCH] net/dpaa2: fix congestion ID for multiple traffic classes
 
+[ upstream commit 7a3a9d5660303971acb487d016613ce52105ac01 ]
+
 When using a single TC, flow id is same as congestion group id.
 However in case of multiple traffic classes, same flow id values
 are used within each traffic class, which causes incorrect
@@ -11,7 +13,6 @@
 for single as well as multiple traffic classes.
 
 Fixes: 13b856ac02a8 ("net/dpaa2: support taildrop on frame count basis")
-Cc: stable@dpdk.org
 
 Signed-off-by: Jun Yang <jun.yang@nxp.com>
 Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
@@ -20,10 +21,10 @@
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
-index 08f9832eb8..d9960b01f7 100644
+index 4fc550a885..19196cbb65 100644
 --- a/drivers/net/dpaa2/dpaa2_ethdev.c
 +++ b/drivers/net/dpaa2/dpaa2_ethdev.c
-@@ -669,7 +669,7 @@ dpaa2_dev_rx_queue_setup(struct rte_eth_dev *dev,
+@@ -660,7 +660,7 @@ dpaa2_dev_rx_queue_setup(struct rte_eth_dev *dev,
  						DPNI_CP_CONGESTION_GROUP,
  						DPNI_QUEUE_RX,
  						dpaa2_q->tc_index,
@@ -32,7 +33,7 @@
  		} else {
  			/*enabling per rx queue congestion control */
  			taildrop.threshold = CONG_THRESHOLD_RX_BYTES_Q;
-@@ -696,7 +696,7 @@ dpaa2_dev_rx_queue_setup(struct rte_eth_dev *dev,
+@@ -687,7 +687,7 @@ dpaa2_dev_rx_queue_setup(struct rte_eth_dev *dev,
  			ret = dpni_set_taildrop(dpni, CMD_PRI_LOW, priv->token,
  					DPNI_CP_CONGESTION_GROUP, DPNI_QUEUE_RX,
  					dpaa2_q->tc_index,

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'bus/fslmc: fix size of qman fq descriptor' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (198 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/dpaa2: fix congestion ID for multiple traffic classes' " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/ixgbe: fix link state timing on fiber ports' " luca.boccassi
                     ` (12 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/21/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 61706cf3f2c094710d354fae1bceccca27903fee Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Fri, 8 May 2020 18:32:10 +0530
Subject: [PATCH] bus/fslmc: fix size of qman fq descriptor

[ upstream commit 231366ba5f538eff9eaffbda35e422cb95af0337 ]

Correct the qman_fq_desc as per the HW defined size

Fixes: 6fef517e17cf ("bus/fslmc: add qman HW fq query count API")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/fslmc/qbman/qbman_debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bus/fslmc/qbman/qbman_debug.c b/drivers/bus/fslmc/qbman/qbman_debug.c
index 4cd0923acb..34374ae4b6 100644
--- a/drivers/bus/fslmc/qbman/qbman_debug.c
+++ b/drivers/bus/fslmc/qbman/qbman_debug.c
@@ -20,7 +20,7 @@ struct qbman_fq_query_desc {
 	uint8_t verb;
 	uint8_t reserved[3];
 	uint32_t fqid;
-	uint8_t reserved2[57];
+	uint8_t reserved2[56];
 };
 
 int qbman_fq_query_state(struct qbman_swp *s, uint32_t fqid,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:52.802776741 +0100
+++ 0201-bus-fslmc-fix-size-of-qman-fq-descriptor.patch	2020-05-19 14:04:44.576654898 +0100
@@ -1,12 +1,13 @@
-From 231366ba5f538eff9eaffbda35e422cb95af0337 Mon Sep 17 00:00:00 2001
+From 61706cf3f2c094710d354fae1bceccca27903fee Mon Sep 17 00:00:00 2001
 From: Hemant Agrawal <hemant.agrawal@nxp.com>
 Date: Fri, 8 May 2020 18:32:10 +0530
 Subject: [PATCH] bus/fslmc: fix size of qman fq descriptor
 
+[ upstream commit 231366ba5f538eff9eaffbda35e422cb95af0337 ]
+
 Correct the qman_fq_desc as per the HW defined size
 
 Fixes: 6fef517e17cf ("bus/fslmc: add qman HW fq query count API")
-Cc: stable@dpdk.org
 
 Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
 ---

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/ixgbe: fix link state timing on fiber ports' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (199 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'bus/fslmc: fix size of qman fq descriptor' " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'Revert "net/bnxt: fix TQM ring context memory size"' " luca.boccassi
                     ` (11 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Phil Yang; +Cc: Lijian Zhang, Xiaolong Ye, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/21/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 53038c47603c0998c117d416894bf63b46b77f24 Mon Sep 17 00:00:00 2001
From: Phil Yang <phil.yang@arm.com>
Date: Fri, 8 May 2020 18:28:27 +0800
Subject: [PATCH] net/ixgbe: fix link state timing on fiber ports

[ upstream commit d70a869db27871db90f86e108fdbb9a22fc6d8c7 ]

In ixgbe_dev_link_update_share(), if the media type is fiber and the
link is down, a flag (IXGBE_FLAG_NEED_LINK_CONFIG) is set. A callback
to ixgbe_dev_setup_link_thread_handler() is scheduled which should
try to set up the link and clear the flag afterwards. This flag works
as a guard variable between threads.

To avoid potential race condition between threads, set the
IXGBE_FLAG_NEED_LINK_CONFIG flag only when there is no link thread
running.

Bugzilla ID: 388
Fixes: 819d0d1d57f1 ("net/ixgbe: fix blocking system events")

Signed-off-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Lijian Zhang <lijian.zhang@arm.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index e0f59e307d..ce0c05fcc2 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -4277,9 +4277,13 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
 
 	if (link_up == 0) {
 		if (ixgbe_get_media_type(hw) == ixgbe_media_type_fiber) {
-			intr->flags |= IXGBE_FLAG_NEED_LINK_CONFIG;
 			ixgbe_dev_wait_setup_link_complete(dev, 0);
 			if (rte_atomic32_test_and_set(&ad->link_thread_running)) {
+				/* To avoid race condition between threads, set
+				 * the IXGBE_FLAG_NEED_LINK_CONFIG flag only
+				 * when there is no link thread running.
+				 */
+				intr->flags |= IXGBE_FLAG_NEED_LINK_CONFIG;
 				if (rte_ctrl_thread_create(&ad->link_thread_tid,
 					"ixgbe-link-handler",
 					NULL,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:52.847816797 +0100
+++ 0202-net-ixgbe-fix-link-state-timing-on-fiber-ports.patch	2020-05-19 14:04:44.580654971 +0100
@@ -1,8 +1,10 @@
-From d70a869db27871db90f86e108fdbb9a22fc6d8c7 Mon Sep 17 00:00:00 2001
+From 53038c47603c0998c117d416894bf63b46b77f24 Mon Sep 17 00:00:00 2001
 From: Phil Yang <phil.yang@arm.com>
 Date: Fri, 8 May 2020 18:28:27 +0800
 Subject: [PATCH] net/ixgbe: fix link state timing on fiber ports
 
+[ upstream commit d70a869db27871db90f86e108fdbb9a22fc6d8c7 ]
+
 In ixgbe_dev_link_update_share(), if the media type is fiber and the
 link is down, a flag (IXGBE_FLAG_NEED_LINK_CONFIG) is set. A callback
 to ixgbe_dev_setup_link_thread_handler() is scheduled which should
@@ -15,7 +17,6 @@
 
 Bugzilla ID: 388
 Fixes: 819d0d1d57f1 ("net/ixgbe: fix blocking system events")
-Cc: stable@dpdk.org
 
 Signed-off-by: Phil Yang <phil.yang@arm.com>
 Reviewed-by: Lijian Zhang <lijian.zhang@arm.com>
@@ -25,10 +26,10 @@
  1 file changed, 5 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
-index cf5f1fe709..a4e5c539de 100644
+index e0f59e307d..ce0c05fcc2 100644
 --- a/drivers/net/ixgbe/ixgbe_ethdev.c
 +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
-@@ -4281,9 +4281,13 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
+@@ -4277,9 +4277,13 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
  
  	if (link_up == 0) {
  		if (ixgbe_get_media_type(hw) == ixgbe_media_type_fiber) {

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'Revert "net/bnxt: fix TQM ring context memory size"' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (200 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/ixgbe: fix link state timing on fiber ports' " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'Revert "net/bnxt: fix number of TQM ring"' " luca.boccassi
                     ` (10 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Luca Boccassi; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/21/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From ee4518a2de30bd5b4c7533676805132862ce8578 Mon Sep 17 00:00:00 2001
From: Luca Boccassi <luca.boccassi@microsoft.com>
Date: Tue, 12 May 2020 15:14:29 +0100
Subject: [PATCH] Revert "net/bnxt: fix TQM ring context memory size"

This reverts commit a120aef7b2bebb2811ce18b27318b15289a539e9.
---
 drivers/net/bnxt/bnxt_ethdev.c | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index c1e5dfa936..30d82d1d36 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -4430,7 +4430,6 @@ int bnxt_alloc_ctx_mem(struct bnxt *bp)
 	struct bnxt_ctx_pg_info *ctx_pg;
 	struct bnxt_ctx_mem_info *ctx;
 	uint32_t mem_size, ena, entries;
-	uint32_t entries_sp, min;
 	int i, rc;
 
 	rc = bnxt_hwrm_func_backing_store_qcaps(bp);
@@ -4478,20 +4477,15 @@ int bnxt_alloc_ctx_mem(struct bnxt *bp)
 	if (rc)
 		return rc;
 
-	min = ctx->tqm_min_entries_per_ring;
-
-	entries_sp = ctx->qp_max_l2_entries +
-		     ctx->vnic_max_vnic_entries +
-		     2 * ctx->qp_min_qp1_entries + min;
-	entries_sp = bnxt_roundup(entries_sp, ctx->tqm_entries_multiple);
-
-	entries = ctx->qp_max_l2_entries + ctx->qp_min_qp1_entries;
+	entries = ctx->qp_max_l2_entries +
+		  ctx->vnic_max_vnic_entries +
+		  ctx->tqm_min_entries_per_ring;
 	entries = bnxt_roundup(entries, ctx->tqm_entries_multiple);
-	entries = clamp_t(uint32_t, entries, min,
+	entries = clamp_t(uint32_t, entries, ctx->tqm_min_entries_per_ring,
 			  ctx->tqm_max_entries_per_ring);
 	for (i = 0, ena = 0; i < ctx->tqm_fp_rings_count + 1; i++) {
 		ctx_pg = ctx->tqm_mem[i];
-		ctx_pg->entries = i ? entries : entries_sp;
+		ctx_pg->entries = entries;
 		mem_size = ctx->tqm_entry_size * ctx_pg->entries;
 		rc = bnxt_alloc_ctx_mem_blk(bp, ctx_pg, mem_size, "tqm_mem", i);
 		if (rc)
-- 
2.20.1


^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'Revert "net/bnxt: fix number of TQM ring"' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (201 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'Revert "net/bnxt: fix TQM ring context memory size"' " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/ice: fix variable initialization' " luca.boccassi
                     ` (9 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Luca Boccassi; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/21/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 8ec53ab74558cd9d3eda676296555e40758c00bf Mon Sep 17 00:00:00 2001
From: Luca Boccassi <luca.boccassi@microsoft.com>
Date: Tue, 12 May 2020 15:14:30 +0100
Subject: [PATCH] Revert "net/bnxt: fix number of TQM ring"

This reverts commit 6b4e89fc3db1a002ddef107a8a4028e47a8bc9e5.
---
 drivers/net/bnxt/bnxt.h        |  2 +-
 drivers/net/bnxt/bnxt_ethdev.c |  5 +++--
 drivers/net/bnxt/bnxt_hwrm.c   | 31 ++++++++++++-------------------
 3 files changed, 16 insertions(+), 22 deletions(-)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 334eb036dc..0ef0282d2a 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -359,6 +359,7 @@ struct bnxt_coal {
 #define BNXT_MAX_TC    8
 #define BNXT_MAX_QUEUE 8
 #define BNXT_MAX_TC_Q  (BNXT_MAX_TC + 1)
+#define BNXT_MAX_Q     (bp->max_q + 1)
 #define BNXT_PAGE_SHFT 12
 #define BNXT_PAGE_SIZE (1 << BNXT_PAGE_SHFT)
 #define MAX_CTX_PAGES  (BNXT_PAGE_SIZE / 8)
@@ -417,7 +418,6 @@ struct bnxt_ctx_mem_info {
 	uint16_t        tim_entry_size;
 	uint32_t        tim_max_entries;
 	uint8_t         tqm_entries_multiple;
-	uint8_t         tqm_fp_rings_count;
 
 	uint32_t        flags;
 #define BNXT_CTX_FLAG_INITED    0x01
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 30d82d1d36..4547dd1420 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -4402,7 +4402,7 @@ static void bnxt_free_ctx_mem(struct bnxt *bp)
 	rte_memzone_free(bp->ctx->vnic_mem.ring_mem.pg_tbl_mz);
 	rte_memzone_free(bp->ctx->stat_mem.ring_mem.pg_tbl_mz);
 
-	for (i = 0; i < bp->ctx->tqm_fp_rings_count + 1; i++) {
+	for (i = 0; i < BNXT_MAX_Q; i++) {
 		if (bp->ctx->tqm_mem[i])
 			rte_memzone_free(bp->ctx->tqm_mem[i]->ring_mem.mz);
 	}
@@ -4483,8 +4483,9 @@ int bnxt_alloc_ctx_mem(struct bnxt *bp)
 	entries = bnxt_roundup(entries, ctx->tqm_entries_multiple);
 	entries = clamp_t(uint32_t, entries, ctx->tqm_min_entries_per_ring,
 			  ctx->tqm_max_entries_per_ring);
-	for (i = 0, ena = 0; i < ctx->tqm_fp_rings_count + 1; i++) {
+	for (i = 0, ena = 0; i < BNXT_MAX_Q; i++) {
 		ctx_pg = ctx->tqm_mem[i];
+		/* use min tqm entries for now. */
 		ctx_pg->entries = entries;
 		mem_size = ctx->tqm_entry_size * ctx_pg->entries;
 		rc = bnxt_alloc_ctx_mem_blk(bp, ctx_pg, mem_size, "tqm_mem", i);
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index af3560befa..7de5b88f0c 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -4546,7 +4546,7 @@ int bnxt_hwrm_func_backing_store_qcaps(struct bnxt *bp)
 	struct bnxt_ctx_pg_info *ctx_pg;
 	struct bnxt_ctx_mem_info *ctx;
 	int total_alloc_len;
-	int rc, i, tqm_rings;
+	int rc, i;
 
 	if (!BNXT_CHIP_THOR(bp) ||
 	    bp->hwrm_spec_code < HWRM_VERSION_1_9_2 ||
@@ -4566,6 +4566,17 @@ int bnxt_hwrm_func_backing_store_qcaps(struct bnxt *bp)
 		goto ctx_err;
 	}
 
+	ctx_pg = rte_malloc("bnxt_ctx_pg_mem",
+			    sizeof(*ctx_pg) * BNXT_MAX_Q,
+			    RTE_CACHE_LINE_SIZE);
+	if (!ctx_pg) {
+		rc = -ENOMEM;
+		goto ctx_err;
+	}
+	for (i = 0; i < BNXT_MAX_Q; i++, ctx_pg++)
+		ctx->tqm_mem[i] = ctx_pg;
+
+	bp->ctx = ctx;
 	ctx->qp_max_entries = rte_le_to_cpu_32(resp->qp_max_entries);
 	ctx->qp_min_qp1_entries =
 		rte_le_to_cpu_16(resp->qp_min_qp1_entries);
@@ -4601,24 +4612,6 @@ int bnxt_hwrm_func_backing_store_qcaps(struct bnxt *bp)
 	ctx->mrav_entry_size = rte_le_to_cpu_16(resp->mrav_entry_size);
 	ctx->tim_entry_size = rte_le_to_cpu_16(resp->tim_entry_size);
 	ctx->tim_max_entries = rte_le_to_cpu_32(resp->tim_max_entries);
-	ctx->tqm_fp_rings_count = resp->tqm_fp_rings_count;
-
-	if (!ctx->tqm_fp_rings_count)
-		ctx->tqm_fp_rings_count = bp->max_q;
-
-	tqm_rings = ctx->tqm_fp_rings_count + 1;
-
-	ctx_pg = rte_malloc("bnxt_ctx_pg_mem",
-			    sizeof(*ctx_pg) * tqm_rings,
-			    RTE_CACHE_LINE_SIZE);
-	if (!ctx_pg) {
-		rc = -ENOMEM;
-		goto ctx_err;
-	}
-	for (i = 0; i < tqm_rings; i++, ctx_pg++)
-		ctx->tqm_mem[i] = ctx_pg;
-
-	bp->ctx = ctx;
 ctx_err:
 	HWRM_UNLOCK();
 	return rc;
-- 
2.20.1


^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/ice: fix variable initialization' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (202 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'Revert "net/bnxt: fix number of TQM ring"' " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/ring: fix device pointer on allocation' " luca.boccassi
                     ` (8 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Xiaolong Ye, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/21/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 39abdde91aabcf8605b7e113f451821e1a4db7ba Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Wed, 6 May 2020 18:43:15 +0800
Subject: [PATCH] net/ice: fix variable initialization

[ upstream commit 0beafe7b042f5ea3814471ef6c98aa895d345d4d ]

Fix coverity defect due to uninitialized scalar variable.

Coverity issue: 357763
Fixes: 47d460d63233 ("net/ice: rework switch filter")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
 drivers/net/ice/ice_switch_filter.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c
index 202f29dab5..6c24731638 100644
--- a/drivers/net/ice/ice_switch_filter.c
+++ b/drivers/net/ice/ice_switch_filter.c
@@ -1094,6 +1094,7 @@ ice_switch_parse_pattern_action(struct ice_adapter *ad,
 		return -rte_errno;
 	}
 
+	memset(&rule_info, 0, sizeof(rule_info));
 	rule_info.tun_type = tun_type;
 
 	sw_meta_ptr =
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:52.967344369 +0100
+++ 0205-net-ice-fix-variable-initialization.patch	2020-05-19 14:04:44.592655188 +0100
@@ -1,13 +1,14 @@
-From 0beafe7b042f5ea3814471ef6c98aa895d345d4d Mon Sep 17 00:00:00 2001
+From 39abdde91aabcf8605b7e113f451821e1a4db7ba Mon Sep 17 00:00:00 2001
 From: Qi Zhang <qi.z.zhang@intel.com>
 Date: Wed, 6 May 2020 18:43:15 +0800
 Subject: [PATCH] net/ice: fix variable initialization
 
+[ upstream commit 0beafe7b042f5ea3814471ef6c98aa895d345d4d ]
+
 Fix coverity defect due to uninitialized scalar variable.
 
 Coverity issue: 357763
 Fixes: 47d460d63233 ("net/ice: rework switch filter")
-Cc: stable@dpdk.org
 
 Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
 Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
@@ -16,17 +17,17 @@
  1 file changed, 1 insertion(+)
 
 diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c
-index 1bea7e807c..dd3f4847aa 100644
+index 202f29dab5..6c24731638 100644
 --- a/drivers/net/ice/ice_switch_filter.c
 +++ b/drivers/net/ice/ice_switch_filter.c
-@@ -1503,6 +1503,7 @@ ice_switch_parse_pattern_action(struct ice_adapter *ad,
- 		goto error;
+@@ -1094,6 +1094,7 @@ ice_switch_parse_pattern_action(struct ice_adapter *ad,
+ 		return -rte_errno;
  	}
  
 +	memset(&rule_info, 0, sizeof(rule_info));
  	rule_info.tun_type = tun_type;
  
- 	ret = ice_switch_check_action(actions, error);
+ 	sw_meta_ptr =
 -- 
 2.20.1
 

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/ring: fix device pointer on allocation' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (203 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/ice: fix variable initialization' " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/mlx5: fix match on empty VLAN item in DV mode' " luca.boccassi
                     ` (7 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Gaetan Rivet; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/21/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 425b3ccd2d6454ce4bf30ee2aee000ff439b7892 Mon Sep 17 00:00:00 2001
From: Gaetan Rivet <grive@u256.net>
Date: Wed, 6 May 2020 20:09:49 +0200
Subject: [PATCH] net/ring: fix device pointer on allocation

[ upstream commit 8459f5ab32211fb10bbfe388fa0e017475d8507c ]

When a net_ring device is allocated, its device pointer is not set
before calling rte_eth_dev_probing_finish, which is incorrect.

The following:
  commit 96cb19521147 ("net/ring: use EAL APIs in PMD specific API")
  commit a6992e961050 ("net/ring: set ethernet device field")

already fixed the same issue in 17.08, which was fine at the time.
Adding the hook rte_eth_dev_probing_finish() however created this bug,
as the eth_dev exposed when this hook is executed is expected to be
complete.

Remove the prior attempts to fix the issue in rte_pmd_ring_probe() and
write the pointer properly in do_eth_dev_ring_create().

Fixes: fbe90cdd776c ("ethdev: add probing finish function")

Signed-off-by: Gaetan Rivet <grive@u256.net>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/ring/rte_eth_ring.c | 29 +++++++++++++++--------------
 1 file changed, 15 insertions(+), 14 deletions(-)

diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c
index 41acbc513d..f0fafa0c0d 100644
--- a/drivers/net/ring/rte_eth_ring.c
+++ b/drivers/net/ring/rte_eth_ring.c
@@ -246,6 +246,7 @@ static const struct eth_dev_ops ops = {
 
 static int
 do_eth_dev_ring_create(const char *name,
+		struct rte_vdev_device *vdev,
 		struct rte_ring * const rx_queues[],
 		const unsigned int nb_rx_queues,
 		struct rte_ring *const tx_queues[],
@@ -291,12 +292,15 @@ do_eth_dev_ring_create(const char *name,
 	}
 
 	/* now put it all together
+	 * - store EAL device in eth_dev,
 	 * - store queue data in internals,
 	 * - store numa_node info in eth_dev_data
 	 * - point eth_dev_data to internals
 	 * - and point eth_dev structure to new eth_dev_data structure
 	 */
 
+	eth_dev->device = &vdev->device;
+
 	data = eth_dev->data;
 	data->rx_queues = rx_queues_local;
 	data->tx_queues = tx_queues_local;
@@ -408,7 +412,9 @@ rte_eth_from_ring(struct rte_ring *r)
 }
 
 static int
-eth_dev_ring_create(const char *name, const unsigned int numa_node,
+eth_dev_ring_create(const char *name,
+		struct rte_vdev_device *vdev,
+		const unsigned int numa_node,
 		enum dev_action action, struct rte_eth_dev **eth_dev)
 {
 	/* rx and tx are so-called from point of view of first port.
@@ -438,7 +444,7 @@ eth_dev_ring_create(const char *name, const unsigned int numa_node,
 			return -1;
 	}
 
-	if (do_eth_dev_ring_create(name, rxtx, num_rings, rxtx, num_rings,
+	if (do_eth_dev_ring_create(name, vdev, rxtx, num_rings, rxtx, num_rings,
 		numa_node, action, eth_dev) < 0)
 		return -1;
 
@@ -560,12 +566,12 @@ rte_pmd_ring_probe(struct rte_vdev_device *dev)
 	PMD_LOG(INFO, "Initializing pmd_ring for %s", name);
 
 	if (params == NULL || params[0] == '\0') {
-		ret = eth_dev_ring_create(name, rte_socket_id(), DEV_CREATE,
+		ret = eth_dev_ring_create(name, dev, rte_socket_id(), DEV_CREATE,
 				&eth_dev);
 		if (ret == -1) {
 			PMD_LOG(INFO,
 				"Attach to pmd_ring for %s", name);
-			ret = eth_dev_ring_create(name, rte_socket_id(),
+			ret = eth_dev_ring_create(name, dev, rte_socket_id(),
 						  DEV_ATTACH, &eth_dev);
 		}
 	} else {
@@ -574,19 +580,16 @@ rte_pmd_ring_probe(struct rte_vdev_device *dev)
 		if (!kvlist) {
 			PMD_LOG(INFO,
 				"Ignoring unsupported parameters when creatingrings-backed ethernet device");
-			ret = eth_dev_ring_create(name, rte_socket_id(),
+			ret = eth_dev_ring_create(name, dev, rte_socket_id(),
 						  DEV_CREATE, &eth_dev);
 			if (ret == -1) {
 				PMD_LOG(INFO,
 					"Attach to pmd_ring for %s",
 					name);
-				ret = eth_dev_ring_create(name, rte_socket_id(),
+				ret = eth_dev_ring_create(name, dev, rte_socket_id(),
 							  DEV_ATTACH, &eth_dev);
 			}
 
-			if (eth_dev)
-				eth_dev->device = &dev->device;
-
 			return ret;
 		}
 
@@ -597,7 +600,7 @@ rte_pmd_ring_probe(struct rte_vdev_device *dev)
 			if (ret < 0)
 				goto out_free;
 
-			ret = do_eth_dev_ring_create(name,
+			ret = do_eth_dev_ring_create(name, dev,
 				internal_args->rx_queues,
 				internal_args->nb_rx_queues,
 				internal_args->tx_queues,
@@ -627,6 +630,7 @@ rte_pmd_ring_probe(struct rte_vdev_device *dev)
 
 			for (info->count = 0; info->count < info->total; info->count++) {
 				ret = eth_dev_ring_create(info->list[info->count].name,
+							  dev,
 							  info->list[info->count].node,
 							  info->list[info->count].action,
 							  &eth_dev);
@@ -635,7 +639,7 @@ rte_pmd_ring_probe(struct rte_vdev_device *dev)
 					PMD_LOG(INFO,
 						"Attach to pmd_ring for %s",
 						name);
-					ret = eth_dev_ring_create(name,
+					ret = eth_dev_ring_create(name, dev,
 							info->list[info->count].node,
 							DEV_ATTACH,
 							&eth_dev);
@@ -644,9 +648,6 @@ rte_pmd_ring_probe(struct rte_vdev_device *dev)
 		}
 	}
 
-	if (eth_dev)
-		eth_dev->device = &dev->device;
-
 out_free:
 	rte_kvargs_free(kvlist);
 	rte_free(info);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:53.005060816 +0100
+++ 0206-net-ring-fix-device-pointer-on-allocation.patch	2020-05-19 14:04:44.592655188 +0100
@@ -1,8 +1,10 @@
-From 8459f5ab32211fb10bbfe388fa0e017475d8507c Mon Sep 17 00:00:00 2001
+From 425b3ccd2d6454ce4bf30ee2aee000ff439b7892 Mon Sep 17 00:00:00 2001
 From: Gaetan Rivet <grive@u256.net>
 Date: Wed, 6 May 2020 20:09:49 +0200
 Subject: [PATCH] net/ring: fix device pointer on allocation
 
+[ upstream commit 8459f5ab32211fb10bbfe388fa0e017475d8507c ]
+
 When a net_ring device is allocated, its device pointer is not set
 before calling rte_eth_dev_probing_finish, which is incorrect.
 
@@ -19,7 +21,6 @@
 write the pointer properly in do_eth_dev_ring_create().
 
 Fixes: fbe90cdd776c ("ethdev: add probing finish function")
-Cc: stable@dpdk.org
 
 Signed-off-by: Gaetan Rivet <grive@u256.net>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/mlx5: fix match on empty VLAN item in DV mode' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (204 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/ring: fix device pointer on allocation' " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/mlx5: fix matching for UDP tunnels with Verbs' " luca.boccassi
                     ` (6 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Dekel Peled; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/21/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 23e2c36fa119fc89e02a6645f048699a5a0dee1e Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Tue, 5 May 2020 15:57:54 +0300
Subject: [PATCH] net/mlx5: fix match on empty VLAN item in DV mode

[ upstream commit 92818d839e8eb0ce479db826f00aa6d62384fc92 ]

In existing implementation, using wild card VLAN item is not allowed.
A VLAN item in flow pattern must include VLAN ID (vid) value.
This obligation contradict the flow API specification [1].

This patch updates the VLAN item validation and translation, to allow
wild card VLAN item, without VLAN ID value.
User guide and release notes are updated accordingly.

[1]
commit 40513808b165 ("doc: refine ethernet and VLAN flow rule items")

Fixes: 00f75a40576b ("net/mlx5: fix VLAN match for DV mode")

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
 doc/guides/nics/mlx5.rst        |  18 +++++
 drivers/net/mlx5/mlx5_flow_dv.c | 116 ++++++++++++++++++++++++++------
 2 files changed, 115 insertions(+), 19 deletions(-)

diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
index 261002621c..75f58e6027 100644
--- a/doc/guides/nics/mlx5.rst
+++ b/doc/guides/nics/mlx5.rst
@@ -123,6 +123,24 @@ Limitations
 
   Will match any ipv4 packet (VLAN included).
 
+- When using DV flow engine (``dv_flow_en`` = 1), flow pattern without VLAN item
+  will match untagged packets only.
+  The flow rule::
+
+        flow create 0 ingress pattern eth / ipv4 / end ...
+
+  Will match untagged packets only.
+  The flow rule::
+
+        flow create 0 ingress pattern eth / vlan / ipv4 / end ...
+
+  Will match tagged packets only, with any VLAN ID value.
+  The flow rule::
+
+        flow create 0 ingress pattern eth / vlan vid is 3 / ipv4 / end ...
+
+  Will only match tagged packets with VLAN ID 3.
+
 - VLAN pop offload command:
 
   - Flow rules having a VLAN pop offload command as one of their actions and
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 5b6d78c86e..9233853e1d 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1555,6 +1555,79 @@ flow_dv_validate_item_port_id(struct rte_eth_dev *dev,
 	return 0;
 }
 
+/**
+ * Validate VLAN item.
+ *
+ * @param[in] item
+ *   Item specification.
+ * @param[in] item_flags
+ *   Bit-fields that holds the items detected until now.
+ * @param[in] dev
+ *   Ethernet device flow is being created on.
+ * @param[out] error
+ *   Pointer to error structure.
+ *
+ * @return
+ *   0 on success, a negative errno value otherwise and rte_errno is set.
+ */
+static int
+flow_dv_validate_item_vlan(const struct rte_flow_item *item,
+			   uint64_t item_flags,
+			   struct rte_eth_dev *dev,
+			   struct rte_flow_error *error)
+{
+	const struct rte_flow_item_vlan *mask = item->mask;
+	const struct rte_flow_item_vlan nic_mask = {
+		.tci = RTE_BE16(UINT16_MAX),
+		.inner_type = RTE_BE16(UINT16_MAX),
+	};
+	const int tunnel = !!(item_flags & MLX5_FLOW_LAYER_TUNNEL);
+	int ret;
+	const uint64_t l34m = tunnel ? (MLX5_FLOW_LAYER_INNER_L3 |
+					MLX5_FLOW_LAYER_INNER_L4) :
+				       (MLX5_FLOW_LAYER_OUTER_L3 |
+					MLX5_FLOW_LAYER_OUTER_L4);
+	const uint64_t vlanm = tunnel ? MLX5_FLOW_LAYER_INNER_VLAN :
+					MLX5_FLOW_LAYER_OUTER_VLAN;
+
+	if (item_flags & vlanm)
+		return rte_flow_error_set(error, EINVAL,
+					  RTE_FLOW_ERROR_TYPE_ITEM, item,
+					  "multiple VLAN layers not supported");
+	else if ((item_flags & l34m) != 0)
+		return rte_flow_error_set(error, EINVAL,
+					  RTE_FLOW_ERROR_TYPE_ITEM, item,
+					  "VLAN cannot follow L3/L4 layer");
+	if (!mask)
+		mask = &rte_flow_item_vlan_mask;
+	ret = mlx5_flow_item_acceptable(item, (const uint8_t *)mask,
+					(const uint8_t *)&nic_mask,
+					sizeof(struct rte_flow_item_vlan),
+					error);
+	if (ret)
+		return ret;
+	if (!tunnel && mask->tci != RTE_BE16(0x0fff)) {
+		struct mlx5_priv *priv = dev->data->dev_private;
+
+		if (priv->vmwa_context) {
+			/*
+			 * Non-NULL context means we have a virtual machine
+			 * and SR-IOV enabled, we have to create VLAN interface
+			 * to make hypervisor to setup E-Switch vport
+			 * context correctly. We avoid creating the multiple
+			 * VLAN interfaces, so we cannot support VLAN tag mask.
+			 */
+			return rte_flow_error_set(error, EINVAL,
+						  RTE_FLOW_ERROR_TYPE_ITEM,
+						  item,
+						  "VLAN tag mask is not"
+						  " supported in virtual"
+						  " environment");
+		}
+	}
+	return 0;
+}
+
 /**
  * Validate the pop VLAN action.
  *
@@ -4437,8 +4510,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 			}
 			break;
 		case RTE_FLOW_ITEM_TYPE_VLAN:
-			ret = mlx5_flow_validate_item_vlan(items, item_flags,
-							   dev, error);
+			ret = flow_dv_validate_item_vlan(items, item_flags,
+							 dev, error);
 			if (ret < 0)
 				return ret;
 			last_item = tunnel ? MLX5_FLOW_LAYER_INNER_VLAN :
@@ -5264,29 +5337,34 @@ flow_dv_translate_item_vlan(struct mlx5_flow *dev_flow,
 	uint16_t tci_m;
 	uint16_t tci_v;
 
+	if (inner) {
+		headers_m = MLX5_ADDR_OF(fte_match_param, matcher,
+					 inner_headers);
+		headers_v = MLX5_ADDR_OF(fte_match_param, key, inner_headers);
+	} else {
+		headers_m = MLX5_ADDR_OF(fte_match_param, matcher,
+					 outer_headers);
+		headers_v = MLX5_ADDR_OF(fte_match_param, key, outer_headers);
+		/*
+		 * This is workaround, masks are not supported,
+		 * and pre-validated.
+		 */
+		if (vlan_v)
+			dev_flow->dv.vf_vlan.tag =
+					rte_be_to_cpu_16(vlan_v->tci) & 0x0fff;
+	}
+	/*
+	 * When VLAN item exists in flow, mark packet as tagged,
+	 * even if TCI is not specified.
+	 */
+	MLX5_SET(fte_match_set_lyr_2_4, headers_m, cvlan_tag, 1);
+	MLX5_SET(fte_match_set_lyr_2_4, headers_v, cvlan_tag, 1);
 	if (!vlan_v)
 		return;
 	if (!vlan_m)
 		vlan_m = &rte_flow_item_vlan_mask;
-	if (inner) {
-		headers_m = MLX5_ADDR_OF(fte_match_param, matcher,
-					 inner_headers);
-		headers_v = MLX5_ADDR_OF(fte_match_param, key, inner_headers);
-	} else {
-		headers_m = MLX5_ADDR_OF(fte_match_param, matcher,
-					 outer_headers);
-		headers_v = MLX5_ADDR_OF(fte_match_param, key, outer_headers);
-		/*
-		 * This is workaround, masks are not supported,
-		 * and pre-validated.
-		 */
-		dev_flow->dv.vf_vlan.tag =
-			rte_be_to_cpu_16(vlan_v->tci) & 0x0fff;
-	}
 	tci_m = rte_be_to_cpu_16(vlan_m->tci);
 	tci_v = rte_be_to_cpu_16(vlan_m->tci & vlan_v->tci);
-	MLX5_SET(fte_match_set_lyr_2_4, headers_m, cvlan_tag, 1);
-	MLX5_SET(fte_match_set_lyr_2_4, headers_v, cvlan_tag, 1);
 	MLX5_SET(fte_match_set_lyr_2_4, headers_m, first_vid, tci_m);
 	MLX5_SET(fte_match_set_lyr_2_4, headers_v, first_vid, tci_v);
 	MLX5_SET(fte_match_set_lyr_2_4, headers_m, first_cfi, tci_m >> 12);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:53.042348058 +0100
+++ 0207-net-mlx5-fix-match-on-empty-VLAN-item-in-DV-mode.patch	2020-05-19 14:04:44.600655334 +0100
@@ -1,8 +1,10 @@
-From 92818d839e8eb0ce479db826f00aa6d62384fc92 Mon Sep 17 00:00:00 2001
+From 23e2c36fa119fc89e02a6645f048699a5a0dee1e Mon Sep 17 00:00:00 2001
 From: Dekel Peled <dekelp@mellanox.com>
 Date: Tue, 5 May 2020 15:57:54 +0300
 Subject: [PATCH] net/mlx5: fix match on empty VLAN item in DV mode
 
+[ upstream commit 92818d839e8eb0ce479db826f00aa6d62384fc92 ]
+
 In existing implementation, using wild card VLAN item is not allowed.
 A VLAN item in flow pattern must include VLAN ID (vid) value.
 This obligation contradict the flow API specification [1].
@@ -15,21 +17,19 @@
 commit 40513808b165 ("doc: refine ethernet and VLAN flow rule items")
 
 Fixes: 00f75a40576b ("net/mlx5: fix VLAN match for DV mode")
-Cc: stable@dpdk.org
 
 Signed-off-by: Dekel Peled <dekelp@mellanox.com>
 Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
 ---
- doc/guides/nics/mlx5.rst               |  18 ++++
- doc/guides/rel_notes/release_20_05.rst |   1 +
- drivers/net/mlx5/mlx5_flow_dv.c        | 116 +++++++++++++++++++++----
- 3 files changed, 116 insertions(+), 19 deletions(-)
+ doc/guides/nics/mlx5.rst        |  18 +++++
+ drivers/net/mlx5/mlx5_flow_dv.c | 116 ++++++++++++++++++++++++++------
+ 2 files changed, 115 insertions(+), 19 deletions(-)
 
 diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
-index c4bc77c0b6..07f5a3bccd 100644
+index 261002621c..75f58e6027 100644
 --- a/doc/guides/nics/mlx5.rst
 +++ b/doc/guides/nics/mlx5.rst
-@@ -127,6 +127,24 @@ Limitations
+@@ -123,6 +123,24 @@ Limitations
  
    Will match any ipv4 packet (VLAN included).
  
@@ -54,23 +54,11 @@
  - VLAN pop offload command:
  
    - Flow rules having a VLAN pop offload command as one of their actions and
-diff --git a/doc/guides/rel_notes/release_20_05.rst b/doc/guides/rel_notes/release_20_05.rst
-index 32ca4fa869..281feb0ead 100644
---- a/doc/guides/rel_notes/release_20_05.rst
-+++ b/doc/guides/rel_notes/release_20_05.rst
-@@ -146,6 +146,7 @@ New Features
-   * Removed flow rules caching for memory saving and compliance with ethdev API.
-   * Optimized the memory consumption of flow.
-   * Added support for flow aging based on hardware counter.
-+  * Added support for flow pattern with wildcard VLAN item (without VID value).
- 
- * **Added Chacha20-Poly1305 algorithm to Cryptodev API.**
- 
 diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index aa5c353a3b..5a0bb9d789 100644
+index 5b6d78c86e..9233853e1d 100644
 --- a/drivers/net/mlx5/mlx5_flow_dv.c
 +++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -1639,6 +1639,79 @@ flow_dv_validate_item_port_id(struct rte_eth_dev *dev,
+@@ -1555,6 +1555,79 @@ flow_dv_validate_item_port_id(struct rte_eth_dev *dev,
  	return 0;
  }
  
@@ -148,9 +136,9 @@
 +}
 +
  /**
-  * Validate GTP item.
+  * Validate the pop VLAN action.
   *
-@@ -4818,8 +4891,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -4437,8 +4510,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
  			}
  			break;
  		case RTE_FLOW_ITEM_TYPE_VLAN:
@@ -161,7 +149,7 @@
  			if (ret < 0)
  				return ret;
  			last_item = tunnel ? MLX5_FLOW_LAYER_INNER_VLAN :
-@@ -5754,29 +5827,34 @@ flow_dv_translate_item_vlan(struct mlx5_flow *dev_flow,
+@@ -5264,29 +5337,34 @@ flow_dv_translate_item_vlan(struct mlx5_flow *dev_flow,
  	uint16_t tci_m;
  	uint16_t tci_v;
  
@@ -178,7 +166,7 @@
 +		 * and pre-validated.
 +		 */
 +		if (vlan_v)
-+			dev_flow->handle->vf_vlan.tag =
++			dev_flow->dv.vf_vlan.tag =
 +					rte_be_to_cpu_16(vlan_v->tci) & 0x0fff;
 +	}
 +	/*
@@ -203,7 +191,7 @@
 -		 * This is workaround, masks are not supported,
 -		 * and pre-validated.
 -		 */
--		dev_flow->handle->vf_vlan.tag =
+-		dev_flow->dv.vf_vlan.tag =
 -			rte_be_to_cpu_16(vlan_v->tci) & 0x0fff;
 -	}
  	tci_m = rte_be_to_cpu_16(vlan_m->tci);

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/mlx5: fix matching for UDP tunnels with Verbs' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (205 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/mlx5: fix match on empty VLAN item in DV mode' " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/mlx5: fix meter color register consideration' " luca.boccassi
                     ` (5 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Raslan Darawsheh; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/21/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 77ca941f9db712eeac44afd8566cf8899bb697d5 Mon Sep 17 00:00:00 2001
From: Raslan Darawsheh <rasland@mellanox.com>
Date: Wed, 6 May 2020 09:57:56 +0300
Subject: [PATCH] net/mlx5: fix matching for UDP tunnels with Verbs

[ upstream commit 8a2e026add3a6a7161a7273aedcf396f2a05f3f1 ]

When creating flow rule with zero specs it will cause
matching all UDP packets like following:
 eth / ipv4 / udp / vxlan / end
Such rule will match all udp packets.

This change the behavior to match the dv flow engine
which will automatically set the match on relative
outer UDP port if the user didn't specify any.

Fixes: 84c406e74524 ("net/mlx5: add flow translate function")

Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow_verbs.c | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c b/drivers/net/mlx5/mlx5_flow_verbs.c
index f66489c791..7ac6a25e43 100644
--- a/drivers/net/mlx5/mlx5_flow_verbs.c
+++ b/drivers/net/mlx5/mlx5_flow_verbs.c
@@ -586,6 +586,28 @@ flow_verbs_translate_item_udp(struct mlx5_flow *dev_flow,
 		udp.val.src_port &= udp.mask.src_port;
 		udp.val.dst_port &= udp.mask.dst_port;
 	}
+	item++;
+	while (item->type == RTE_FLOW_ITEM_TYPE_VOID)
+		item++;
+	if (!(udp.val.dst_port & udp.mask.dst_port)) {
+		switch ((item)->type) {
+		case RTE_FLOW_ITEM_TYPE_VXLAN:
+			udp.val.dst_port = htons(MLX5_UDP_PORT_VXLAN);
+			udp.mask.dst_port = 0xffff;
+			break;
+		case RTE_FLOW_ITEM_TYPE_VXLAN_GPE:
+			udp.val.dst_port = htons(MLX5_UDP_PORT_VXLAN_GPE);
+			udp.mask.dst_port = 0xffff;
+			break;
+		case RTE_FLOW_ITEM_TYPE_MPLS:
+			udp.val.dst_port = htons(MLX5_UDP_PORT_MPLS);
+			udp.mask.dst_port = 0xffff;
+			break;
+		default:
+			break;
+		}
+	}
+
 	flow_verbs_spec_add(&dev_flow->verbs, &udp, size);
 }
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:53.092511764 +0100
+++ 0208-net-mlx5-fix-matching-for-UDP-tunnels-with-Verbs.patch	2020-05-19 14:04:44.600655334 +0100
@@ -1,8 +1,10 @@
-From 8a2e026add3a6a7161a7273aedcf396f2a05f3f1 Mon Sep 17 00:00:00 2001
+From 77ca941f9db712eeac44afd8566cf8899bb697d5 Mon Sep 17 00:00:00 2001
 From: Raslan Darawsheh <rasland@mellanox.com>
 Date: Wed, 6 May 2020 09:57:56 +0300
 Subject: [PATCH] net/mlx5: fix matching for UDP tunnels with Verbs
 
+[ upstream commit 8a2e026add3a6a7161a7273aedcf396f2a05f3f1 ]
+
 When creating flow rule with zero specs it will cause
 matching all UDP packets like following:
  eth / ipv4 / udp / vxlan / end
@@ -13,7 +15,6 @@
 outer UDP port if the user didn't specify any.
 
 Fixes: 84c406e74524 ("net/mlx5: add flow translate function")
-Cc: stable@dpdk.org
 
 Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
 Acked-by: Matan Azrad <matan@mellanox.com>
@@ -22,10 +23,10 @@
  1 file changed, 22 insertions(+)
 
 diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c b/drivers/net/mlx5/mlx5_flow_verbs.c
-index 4659f0a7f7..c403f72be3 100644
+index f66489c791..7ac6a25e43 100644
 --- a/drivers/net/mlx5/mlx5_flow_verbs.c
 +++ b/drivers/net/mlx5/mlx5_flow_verbs.c
-@@ -680,6 +680,28 @@ flow_verbs_translate_item_udp(struct mlx5_flow *dev_flow,
+@@ -586,6 +586,28 @@ flow_verbs_translate_item_udp(struct mlx5_flow *dev_flow,
  		udp.val.src_port &= udp.mask.src_port;
  		udp.val.dst_port &= udp.mask.dst_port;
  	}

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/mlx5: fix meter color register consideration' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (206 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/mlx5: fix matching for UDP tunnels with Verbs' " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/mlx4: fix drop queue error handling' " luca.boccassi
                     ` (4 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Michael Baum; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/21/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 46cd8f27b1dd7a7ac17e125eb7d263e0682c651d Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@mellanox.com>
Date: Wed, 6 May 2020 16:24:06 +0000
Subject: [PATCH] net/mlx5: fix meter color register consideration

[ upstream commit c8f0abe7f89d61a347ba9e2d3bf337c89c0fb16f ]

The mlx5_flow_get_reg_id() function translates tag ID to register
from the registers that are supported and available for use. The
user does not know which register is available at a time and therefore
there is an array that represents mapping to the available registers.
Usually the free registers are continuous in the flow_mreg_c array but
sometimes the mtr_color_reg register is between them and it must be
skipped and the next register returned, in which case the function
returns the mapping of the next entity in the array.

When the function reads from the next entity in the array, it does not
check whether such an entity exists and in some situation invalid access
to memory occurs beyond the array boundaries.

So, when all the registers are valid from HW perspective and the meter
color register is not the default, the tag id 5 causes an out of bound
access.

Validate registers availability when meter color register is not the
default.

Coverity issue: 146355
Fixes: 792e749e92d5 ("net/mlx5: fix register usage in meter")

Signed-off-by: Michael Baum <michaelba@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 5fcff9a075..e05c35a417 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -432,6 +432,10 @@ mlx5_flow_get_reg_id(struct rte_eth_dev *dev,
 		 */
 		if (skip_mtr_reg && config->flow_mreg_c
 		    [id + start_reg - REG_C_0] >= priv->mtr_color_reg) {
+			if (id >= (REG_C_7 - start_reg))
+				return rte_flow_error_set(error, EINVAL,
+						       RTE_FLOW_ERROR_TYPE_ITEM,
+							NULL, "invalid tag id");
 			if (config->flow_mreg_c
 			    [id + 1 + start_reg - REG_C_0] != REG_NONE)
 				return config->flow_mreg_c
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:53.130573830 +0100
+++ 0209-net-mlx5-fix-meter-color-register-consideration.patch	2020-05-19 14:04:44.604655406 +0100
@@ -1,8 +1,10 @@
-From c8f0abe7f89d61a347ba9e2d3bf337c89c0fb16f Mon Sep 17 00:00:00 2001
+From 46cd8f27b1dd7a7ac17e125eb7d263e0682c651d Mon Sep 17 00:00:00 2001
 From: Michael Baum <michaelba@mellanox.com>
 Date: Wed, 6 May 2020 16:24:06 +0000
 Subject: [PATCH] net/mlx5: fix meter color register consideration
 
+[ upstream commit c8f0abe7f89d61a347ba9e2d3bf337c89c0fb16f ]
+
 The mlx5_flow_get_reg_id() function translates tag ID to register
 from the registers that are supported and available for use. The
 user does not know which register is available at a time and therefore
@@ -25,7 +27,6 @@
 
 Coverity issue: 146355
 Fixes: 792e749e92d5 ("net/mlx5: fix register usage in meter")
-Cc: stable@dpdk.org
 
 Signed-off-by: Michael Baum <michaelba@mellanox.com>
 Acked-by: Matan Azrad <matan@mellanox.com>
@@ -34,10 +35,10 @@
  1 file changed, 4 insertions(+)
 
 diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
-index 01376f3c51..08c7cdf005 100644
+index 5fcff9a075..e05c35a417 100644
 --- a/drivers/net/mlx5/mlx5_flow.c
 +++ b/drivers/net/mlx5/mlx5_flow.c
-@@ -442,6 +442,10 @@ mlx5_flow_get_reg_id(struct rte_eth_dev *dev,
+@@ -432,6 +432,10 @@ mlx5_flow_get_reg_id(struct rte_eth_dev *dev,
  		 */
  		if (skip_mtr_reg && config->flow_mreg_c
  		    [id + start_reg - REG_C_0] >= priv->mtr_color_reg) {

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/mlx4: fix drop queue error handling' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (207 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/mlx5: fix meter color register consideration' " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/mlx5: fix Tx queue release debug log timing' " luca.boccassi
                     ` (3 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Michael Baum; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/21/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From ead66a3fb93a254de0dcd91400a8ff2a81210dfb Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@mellanox.com>
Date: Wed, 6 May 2020 16:27:54 +0000
Subject: [PATCH] net/mlx4: fix drop queue error handling
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 6f155c0b9de5a58b5653d3e81c553564984f3c36 ]

The function mlx4_drop_get() creates pointer to a struct mlx4_drop and
if needed allocates by rte_malloc.

If the allocation is failed the function goes to label “error”, and
there does dereference to a null pointer.

Skip resources cleaning when the memory allocation is failed.

Coverity issue: 146206
Coverity issue: 146146
Fixes: d3a7e09234e4 ("net/mlx4: allocate drop flow resources on demand")

Signed-off-by: Michael Baum <michaelba@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx4/mlx4_flow.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/net/mlx4/mlx4_flow.c b/drivers/net/mlx4/mlx4_flow.c
index 96479b83dd..2da4f6d965 100644
--- a/drivers/net/mlx4/mlx4_flow.c
+++ b/drivers/net/mlx4/mlx4_flow.c
@@ -981,12 +981,13 @@ mlx4_drop_get(struct mlx4_priv *priv)
 	priv->drop = drop;
 	return drop;
 error:
-	if (drop->qp)
-		claim_zero(mlx4_glue->destroy_qp(drop->qp));
-	if (drop->cq)
-		claim_zero(mlx4_glue->destroy_cq(drop->cq));
-	if (drop)
+	if (drop) {
+		if (drop->qp)
+			claim_zero(mlx4_glue->destroy_qp(drop->qp));
+		if (drop->cq)
+			claim_zero(mlx4_glue->destroy_cq(drop->cq));
 		rte_free(drop);
+	}
 	rte_errno = ENOMEM;
 	return NULL;
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:53.171424223 +0100
+++ 0210-net-mlx4-fix-drop-queue-error-handling.patch	2020-05-19 14:04:44.604655406 +0100
@@ -1,4 +1,4 @@
-From 6f155c0b9de5a58b5653d3e81c553564984f3c36 Mon Sep 17 00:00:00 2001
+From ead66a3fb93a254de0dcd91400a8ff2a81210dfb Mon Sep 17 00:00:00 2001
 From: Michael Baum <michaelba@mellanox.com>
 Date: Wed, 6 May 2020 16:27:54 +0000
 Subject: [PATCH] net/mlx4: fix drop queue error handling
@@ -6,6 +6,8 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit 6f155c0b9de5a58b5653d3e81c553564984f3c36 ]
+
 The function mlx4_drop_get() creates pointer to a struct mlx4_drop and
 if needed allocates by rte_malloc.
 
@@ -17,7 +19,6 @@
 Coverity issue: 146206
 Coverity issue: 146146
 Fixes: d3a7e09234e4 ("net/mlx4: allocate drop flow resources on demand")
-Cc: stable@dpdk.org
 
 Signed-off-by: Michael Baum <michaelba@mellanox.com>
 Acked-by: Matan Azrad <matan@mellanox.com>
@@ -26,10 +27,10 @@
  1 file changed, 6 insertions(+), 5 deletions(-)
 
 diff --git a/drivers/net/mlx4/mlx4_flow.c b/drivers/net/mlx4/mlx4_flow.c
-index 793f0b090e..2a86382db7 100644
+index 96479b83dd..2da4f6d965 100644
 --- a/drivers/net/mlx4/mlx4_flow.c
 +++ b/drivers/net/mlx4/mlx4_flow.c
-@@ -980,12 +980,13 @@ mlx4_drop_get(struct mlx4_priv *priv)
+@@ -981,12 +981,13 @@ mlx4_drop_get(struct mlx4_priv *priv)
  	priv->drop = drop;
  	return drop;
  error:

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/mlx5: fix Tx queue release debug log timing' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (208 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/mlx4: fix drop queue error handling' " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'app: remove extra new line after link duplex' " luca.boccassi
                     ` (2 subsequent siblings)
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Alexander Kozyrev; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/21/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 40a2233e7897b48d042bd59c90ba9c22e4788a59 Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev@mellanox.com>
Date: Wed, 6 May 2020 18:10:59 +0000
Subject: [PATCH] net/mlx5: fix Tx queue release debug log timing

[ upstream commit 776aec28fc47dbf29466555b34cd79ab9cf7a7bc ]

Program received signal SIGSEGV, Segmentation fault.
0x00000000008ef7c4 in mlx5_tx_queue_release (dpdk_txq=0x17ce01680) at
drivers/net/mlx5/mlx5_txq.c:302
301 mlx5_txq_release(ETH_DEV(priv), i);
302 DRV_LOG(DEBUG, "port %u removing Tx queue %u from list",
303         PORT_ID(priv), txq->idx);
The problem is txq is freed inside the mlx5_txq_release() function
and no longer valid in the debug log right after this invocation.
Move the debug log before the mlx5_txq_release() function to fix this.

Fixes: a6d83b6a9209 ("net/mlx5: standardize on negative errno values")

Signed-off-by: Alexander Kozyrev <akozyrev@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx5/mlx5_txq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index 3e29613d4b..c7751e83c0 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -295,9 +295,9 @@ mlx5_tx_queue_release(void *dpdk_txq)
 	priv = txq_ctrl->priv;
 	for (i = 0; (i != priv->txqs_n); ++i)
 		if ((*priv->txqs)[i] == txq) {
-			mlx5_txq_release(ETH_DEV(priv), i);
 			DRV_LOG(DEBUG, "port %u removing Tx queue %u from list",
 				PORT_ID(priv), txq->idx);
+			mlx5_txq_release(ETH_DEV(priv), i);
 			break;
 		}
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:53.206934177 +0100
+++ 0211-net-mlx5-fix-Tx-queue-release-debug-log-timing.patch	2020-05-19 14:04:44.608655479 +0100
@@ -1,8 +1,10 @@
-From 776aec28fc47dbf29466555b34cd79ab9cf7a7bc Mon Sep 17 00:00:00 2001
+From 40a2233e7897b48d042bd59c90ba9c22e4788a59 Mon Sep 17 00:00:00 2001
 From: Alexander Kozyrev <akozyrev@mellanox.com>
 Date: Wed, 6 May 2020 18:10:59 +0000
 Subject: [PATCH] net/mlx5: fix Tx queue release debug log timing
 
+[ upstream commit 776aec28fc47dbf29466555b34cd79ab9cf7a7bc ]
+
 Program received signal SIGSEGV, Segmentation fault.
 0x00000000008ef7c4 in mlx5_tx_queue_release (dpdk_txq=0x17ce01680) at
 drivers/net/mlx5/mlx5_txq.c:302
@@ -14,7 +16,6 @@
 Move the debug log before the mlx5_txq_release() function to fix this.
 
 Fixes: a6d83b6a9209 ("net/mlx5: standardize on negative errno values")
-Cc: stable@dpdk.org
 
 Signed-off-by: Alexander Kozyrev <akozyrev@mellanox.com>
 Acked-by: Matan Azrad <matan@mellanox.com>
@@ -23,10 +24,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
-index 29e5cabab6..a211fa91b2 100644
+index 3e29613d4b..c7751e83c0 100644
 --- a/drivers/net/mlx5/mlx5_txq.c
 +++ b/drivers/net/mlx5/mlx5_txq.c
-@@ -298,9 +298,9 @@ mlx5_tx_queue_release(void *dpdk_txq)
+@@ -295,9 +295,9 @@ mlx5_tx_queue_release(void *dpdk_txq)
  	priv = txq_ctrl->priv;
  	for (i = 0; (i != priv->txqs_n); ++i)
  		if ((*priv->txqs)[i] == txq) {

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'app: remove extra new line after link duplex' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (209 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'net/mlx5: fix Tx queue release debug log timing' " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'examples: " luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'crypto/qat: support plain SHA1..SHA512 hashes' " luca.boccassi
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Ivan Dyukov; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/21/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 83e7cafc27ee757115ae709756dac35d8723497a Mon Sep 17 00:00:00 2001
From: Ivan Dyukov <i.dyukov@samsung.com>
Date: Thu, 7 May 2020 21:26:01 +0300
Subject: [PATCH] app: remove extra new line after link duplex

[ upstream commit a357d09d54246ea72625c22a970d81a3165fbf94 ]

This is testpmd part of new line cleanup.

Fixes: 002ade70e9 ("app/test: measure cycles per packet in Rx/Tx")
Fixes: ce8d561418 ("app/testpmd: add port configuration settings")

Signed-off-by: Ivan Dyukov <i.dyukov@samsung.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 app/test-pmd/testpmd.c   | 2 +-
 app/test/test_pmd_perf.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 31361e4996..46d0f1c875 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2752,7 +2752,7 @@ check_all_ports_link_status(uint32_t port_mask)
 					"Port%d Link Up. speed %u Mbps- %s\n",
 					portid, link.link_speed,
 				(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?
-					("full-duplex") : ("half-duplex\n"));
+					("full-duplex") : ("half-duplex"));
 				else
 					printf("Port %d Link Down\n", portid);
 				continue;
diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c
index d61be58bb3..352cd47156 100644
--- a/app/test/test_pmd_perf.c
+++ b/app/test/test_pmd_perf.c
@@ -151,7 +151,7 @@ check_all_ports_link_status(uint16_t port_num, uint32_t port_mask)
 					"Port%d Link Up. Speed %u Mbps - %s\n",
 						portid, link.link_speed,
 				(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?
-					("full-duplex") : ("half-duplex\n"));
+					("full-duplex") : ("half-duplex"));
 					if (link_mbps == 0)
 						link_mbps = link.link_speed;
 				} else
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:53.244804328 +0100
+++ 0212-app-remove-extra-new-line-after-link-duplex.patch	2020-05-19 14:04:44.612655551 +0100
@@ -1,13 +1,14 @@
-From a357d09d54246ea72625c22a970d81a3165fbf94 Mon Sep 17 00:00:00 2001
+From 83e7cafc27ee757115ae709756dac35d8723497a Mon Sep 17 00:00:00 2001
 From: Ivan Dyukov <i.dyukov@samsung.com>
 Date: Thu, 7 May 2020 21:26:01 +0300
 Subject: [PATCH] app: remove extra new line after link duplex
 
+[ upstream commit a357d09d54246ea72625c22a970d81a3165fbf94 ]
+
 This is testpmd part of new line cleanup.
 
 Fixes: 002ade70e9 ("app/test: measure cycles per packet in Rx/Tx")
 Fixes: ce8d561418 ("app/testpmd: add port configuration settings")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ivan Dyukov <i.dyukov@samsung.com>
 Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
@@ -17,10 +18,10 @@
  2 files changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
-index 4b13bf6a98..9cbe6e9f68 100644
+index 31361e4996..46d0f1c875 100644
 --- a/app/test-pmd/testpmd.c
 +++ b/app/test-pmd/testpmd.c
-@@ -3012,7 +3012,7 @@ check_all_ports_link_status(uint32_t port_mask)
+@@ -2752,7 +2752,7 @@ check_all_ports_link_status(uint32_t port_mask)
  					"Port%d Link Up. speed %u Mbps- %s\n",
  					portid, link.link_speed,
  				(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'examples: remove extra new line after link duplex' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (210 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'app: remove extra new line after link duplex' " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-19 13:05   ` [dpdk-stable] patch 'crypto/qat: support plain SHA1..SHA512 hashes' " luca.boccassi
  212 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Ivan Dyukov; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/21/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 507cda6e23745cf900e3e2388e433447df728519 Mon Sep 17 00:00:00 2001
From: Ivan Dyukov <i.dyukov@samsung.com>
Date: Thu, 7 May 2020 21:26:02 +0300
Subject: [PATCH] examples: remove extra new line after link duplex

[ upstream commit c81e3f21d1ea05e5123278b15d9d5e1257b6ba99 ]

This patch removes extra 'new line' in few app examples.

Fixes: d3641ae863 ("examples: update link status checks")
Fixes: 387259bd6c ("examples/l2fwd-crypto: add sample application")
Fixes: 4ff457986f ("examples/l2fwd-event: add default poll mode routines")
Fixes: e64833f227 ("examples/l2fwd-keepalive: add sample application")
Fixes: 204896f8d6 ("examples/l2fwd-jobstats: add new example")
Fixes: c8e6ceeceb ("examples/ioat: add new sample app for ioat driver")
Fixes: cc8f4d020c ("examples/ip_reassembly: initial import")
Fixes: d299106e8e ("examples/ipsec-secgw: add IPsec sample application")
Fixes: 39aad0e88c ("examples/flow_distributor: new example to demonstrate EFD")
Fixes: d48415e1fe ("examples/performance-thread: add l3fwd-thread app")
Fixes: 20c78ac9ee ("examples/vm_power_mgr: add port initialisation")
Fixes: 361b2e9559 ("acl: new sample l3fwd-acl")
Fixes: de3cfa2c98 ("sched: initial import")
Fixes: d7937e2e3d ("power: initial import")
Fixes: 3fc5ca2f63 ("kni: initial import")

Signed-off-by: Ivan Dyukov <i.dyukov@samsung.com>
---
 examples/ioat/ioatfwd.c                                  | 2 +-
 examples/ip_fragmentation/main.c                         | 2 +-
 examples/ip_reassembly/main.c                            | 2 +-
 examples/ipsec-secgw/ipsec-secgw.c                       | 2 +-
 examples/ipv4_multicast/main.c                           | 2 +-
 examples/kni/main.c                                      | 2 +-
 examples/l2fwd-crypto/main.c                             | 2 +-
 examples/l2fwd-event/main.c                              | 2 +-
 examples/l2fwd-jobstats/main.c                           | 2 +-
 examples/l2fwd-keepalive/main.c                          | 2 +-
 examples/l2fwd/main.c                                    | 2 +-
 examples/l3fwd-acl/main.c                                | 2 +-
 examples/l3fwd-power/main.c                              | 2 +-
 examples/l3fwd/main.c                                    | 2 +-
 examples/link_status_interrupt/main.c                    | 2 +-
 examples/multi_process/client_server_mp/mp_server/init.c | 2 +-
 examples/multi_process/symmetric_mp/main.c               | 2 +-
 examples/performance-thread/l3fwd-thread/main.c          | 2 +-
 examples/qos_sched/init.c                                | 2 +-
 examples/server_node_efd/server/init.c                   | 2 +-
 examples/vm_power_manager/main.c                         | 2 +-
 21 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/examples/ioat/ioatfwd.c b/examples/ioat/ioatfwd.c
index 7255ff3c9e..53de231795 100644
--- a/examples/ioat/ioatfwd.c
+++ b/examples/ioat/ioatfwd.c
@@ -718,7 +718,7 @@ check_link_status(uint32_t port_mask)
 				"Port %d Link Up. Speed %u Mbps - %s\n",
 				portid, link.link_speed,
 				(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?
-				("full-duplex") : ("half-duplex\n"));
+				("full-duplex") : ("half-duplex"));
 			link_status = 1;
 		} else
 			printf("Port %d Link Down\n", portid);
diff --git a/examples/ip_fragmentation/main.c b/examples/ip_fragmentation/main.c
index 28febf49e7..90e4d1ea4a 100644
--- a/examples/ip_fragmentation/main.c
+++ b/examples/ip_fragmentation/main.c
@@ -617,7 +617,7 @@ check_all_ports_link_status(uint32_t port_mask)
 					"Port%d Link Up .Speed %u Mbps - %s\n",
 						portid, link.link_speed,
 				(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?
-					("full-duplex") : ("half-duplex\n"));
+					("full-duplex") : ("half-duplex"));
 				else
 					printf("Port %d Link Down\n", portid);
 				continue;
diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c
index d59e6d02ff..29b34d0710 100644
--- a/examples/ip_reassembly/main.c
+++ b/examples/ip_reassembly/main.c
@@ -736,7 +736,7 @@ check_all_ports_link_status(uint32_t port_mask)
 					"Port%d Link Up. Speed %u Mbps - %s\n",
 						portid, link.link_speed,
 				(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?
-					("full-duplex") : ("half-duplex\n"));
+					("full-duplex") : ("half-duplex"));
 				else
 					printf("Port %d Link Down\n", portid);
 				continue;
diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 3b5aaf6832..1493be9025 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -1668,7 +1668,7 @@ check_all_ports_link_status(uint32_t port_mask)
 					"Port%d Link Up - speed %u Mbps -%s\n",
 						portid, link.link_speed,
 				(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?
-					("full-duplex") : ("half-duplex\n"));
+					("full-duplex") : ("half-duplex"));
 				else
 					printf("Port %d Link Down\n", portid);
 				continue;
diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c
index 63333b5b69..09d9270aff 100644
--- a/examples/ipv4_multicast/main.c
+++ b/examples/ipv4_multicast/main.c
@@ -600,7 +600,7 @@ check_all_ports_link_status(uint32_t port_mask)
 					"Port%d Link Up. Speed %u Mbps - %s\n",
 					portid, link.link_speed,
 				(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?
-					("full-duplex") : ("half-duplex\n"));
+					("full-duplex") : ("half-duplex"));
 				else
 					printf("Port %d Link Down\n", portid);
 				continue;
diff --git a/examples/kni/main.c b/examples/kni/main.c
index 5f713e6b22..f867f5fc9b 100644
--- a/examples/kni/main.c
+++ b/examples/kni/main.c
@@ -679,7 +679,7 @@ check_all_ports_link_status(uint32_t port_mask)
 					"Port%d Link Up - speed %uMbps - %s\n",
 						portid, link.link_speed,
 				(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?
-					("full-duplex") : ("half-duplex\n"));
+					("full-duplex") : ("half-duplex"));
 				else
 					printf("Port %d Link Down\n", portid);
 				continue;
diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 61d78295d4..fcb55c370a 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -1756,7 +1756,7 @@ check_all_ports_link_status(uint32_t port_mask)
 					"Port%d Link Up. Speed %u Mbps - %s\n",
 						portid, link.link_speed,
 				(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?
-					("full-duplex") : ("half-duplex\n"));
+					("full-duplex") : ("half-duplex"));
 				else
 					printf("Port %d Link Down\n", portid);
 				continue;
diff --git a/examples/l2fwd-event/main.c b/examples/l2fwd-event/main.c
index 89a6bb9a44..384b71238f 100644
--- a/examples/l2fwd-event/main.c
+++ b/examples/l2fwd-event/main.c
@@ -263,7 +263,7 @@ check_all_ports_link_status(struct l2fwd_resources *rsrc,
 					"Port%d Link Up. Speed %u Mbps - %s\n",
 						port_id, link.link_speed,
 				(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?
-					("full-duplex") : ("half-duplex\n"));
+					("full-duplex") : ("half-duplex"));
 				else
 					printf("Port %d Link Down\n", port_id);
 				continue;
diff --git a/examples/l2fwd-jobstats/main.c b/examples/l2fwd-jobstats/main.c
index f975aa12d0..e0255080e2 100644
--- a/examples/l2fwd-jobstats/main.c
+++ b/examples/l2fwd-jobstats/main.c
@@ -710,7 +710,7 @@ check_all_ports_link_status(uint32_t port_mask)
 					"Port%d Link Up. Speed %u Mbps - %s\n",
 						portid, link.link_speed,
 				(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?
-					("full-duplex") : ("half-duplex\n"));
+					("full-duplex") : ("half-duplex"));
 				else
 					printf("Port %d Link Down\n", portid);
 				continue;
diff --git a/examples/l2fwd-keepalive/main.c b/examples/l2fwd-keepalive/main.c
index eda703e684..3d59e2ca90 100644
--- a/examples/l2fwd-keepalive/main.c
+++ b/examples/l2fwd-keepalive/main.c
@@ -475,7 +475,7 @@ check_all_ports_link_status(uint32_t port_mask)
 					"Port%d Link Up. Speed %u Mbps - %s\n",
 						portid, link.link_speed,
 				(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?
-					("full-duplex") : ("half-duplex\n"));
+					("full-duplex") : ("half-duplex"));
 				else
 					printf("Port %d Link Down\n", portid);
 				continue;
diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c
index 09257aab1c..fcef232731 100644
--- a/examples/l2fwd/main.c
+++ b/examples/l2fwd/main.c
@@ -478,7 +478,7 @@ check_all_ports_link_status(uint32_t port_mask)
 					"Port%d Link Up. Speed %u Mbps - %s\n",
 						portid, link.link_speed,
 				(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?
-					("full-duplex") : ("half-duplex\n"));
+					("full-duplex") : ("half-duplex"));
 				else
 					printf("Port %d Link Down\n", portid);
 				continue;
diff --git a/examples/l3fwd-acl/main.c b/examples/l3fwd-acl/main.c
index fa92a28297..cfbeee962b 100644
--- a/examples/l3fwd-acl/main.c
+++ b/examples/l3fwd-acl/main.c
@@ -1839,7 +1839,7 @@ check_all_ports_link_status(uint32_t port_mask)
 					"Port%d Link Up. Speed %u Mbps %s\n",
 						portid, link.link_speed,
 				(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?
-					("full-duplex") : ("half-duplex\n"));
+					("full-duplex") : ("half-duplex"));
 				else
 					printf("Port %d Link Down\n", portid);
 				continue;
diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index e9b2cb5b30..aa6ff2627b 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -1998,7 +1998,7 @@ check_all_ports_link_status(uint32_t port_mask)
 						"Mbps - %s\n", (uint8_t)portid,
 						(unsigned)link.link_speed,
 				(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?
-					("full-duplex") : ("half-duplex\n"));
+					("full-duplex") : ("half-duplex"));
 				else
 					printf("Port %d Link Down\n",
 						(uint8_t)portid);
diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c
index 4dea12a653..3a8ec5a7f2 100644
--- a/examples/l3fwd/main.c
+++ b/examples/l3fwd/main.c
@@ -747,7 +747,7 @@ check_all_ports_link_status(uint32_t port_mask)
 					"Port%d Link Up. Speed %u Mbps -%s\n",
 						portid, link.link_speed,
 				(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?
-					("full-duplex") : ("half-duplex\n"));
+					("full-duplex") : ("half-duplex"));
 				else
 					printf("Port %d Link Down\n", portid);
 				continue;
diff --git a/examples/link_status_interrupt/main.c b/examples/link_status_interrupt/main.c
index a924aa2313..72f86e502f 100644
--- a/examples/link_status_interrupt/main.c
+++ b/examples/link_status_interrupt/main.c
@@ -500,7 +500,7 @@ check_all_ports_link_status(uint16_t port_num, uint32_t port_mask)
 					"Port%d Link Up. Speed %u Mbps - %s\n",
 						portid, link.link_speed,
 				(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?
-					("full-duplex") : ("half-duplex\n"));
+					("full-duplex") : ("half-duplex"));
 				else
 					printf("Port %d Link Down\n", portid);
 				continue;
diff --git a/examples/multi_process/client_server_mp/mp_server/init.c b/examples/multi_process/client_server_mp/mp_server/init.c
index ad9f46f0aa..c2ec07ac65 100644
--- a/examples/multi_process/client_server_mp/mp_server/init.c
+++ b/examples/multi_process/client_server_mp/mp_server/init.c
@@ -209,7 +209,7 @@ check_all_ports_link_status(uint16_t port_num, uint32_t port_mask)
 						"Mbps - %s\n", ports->id[portid],
 						(unsigned)link.link_speed,
 				(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?
-					("full-duplex") : ("half-duplex\n"));
+					("full-duplex") : ("half-duplex"));
 				else
 					printf("Port %d Link Down\n",
 						(uint8_t)ports->id[portid]);
diff --git a/examples/multi_process/symmetric_mp/main.c b/examples/multi_process/symmetric_mp/main.c
index 7f491452a7..c5cd8825e5 100644
--- a/examples/multi_process/symmetric_mp/main.c
+++ b/examples/multi_process/symmetric_mp/main.c
@@ -389,7 +389,7 @@ check_all_ports_link_status(uint16_t port_num, uint32_t port_mask)
 					"Port%d Link Up. Speed %u Mbps - %s\n",
 						portid, link.link_speed,
 				(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?
-					("full-duplex") : ("half-duplex\n"));
+					("full-duplex") : ("half-duplex"));
 				else
 					printf("Port %d Link Down\n", portid);
 				continue;
diff --git a/examples/performance-thread/l3fwd-thread/main.c b/examples/performance-thread/l3fwd-thread/main.c
index ad540fd842..f58a70b77f 100644
--- a/examples/performance-thread/l3fwd-thread/main.c
+++ b/examples/performance-thread/l3fwd-thread/main.c
@@ -3457,7 +3457,7 @@ check_all_ports_link_status(uint32_t port_mask)
 					"Port%d Link Up. Speed %u Mbps - %s\n",
 						portid, link.link_speed,
 				(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?
-					("full-duplex") : ("half-duplex\n"));
+					("full-duplex") : ("half-duplex"));
 				else
 					printf("Port %d Link Down\n", portid);
 				continue;
diff --git a/examples/qos_sched/init.c b/examples/qos_sched/init.c
index 0a17e0d4d5..9626c15b81 100644
--- a/examples/qos_sched/init.c
+++ b/examples/qos_sched/init.c
@@ -164,7 +164,7 @@ app_init_port(uint16_t portid, struct rte_mempool *mp)
 		printf(" Link Up - speed %u Mbps - %s\n",
 			(uint32_t) link.link_speed,
 			(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?
-			("full-duplex") : ("half-duplex\n"));
+			("full-duplex") : ("half-duplex"));
 	} else {
 		printf(" Link Down\n");
 	}
diff --git a/examples/server_node_efd/server/init.c b/examples/server_node_efd/server/init.c
index 00e2e40599..378a74fa5c 100644
--- a/examples/server_node_efd/server/init.c
+++ b/examples/server_node_efd/server/init.c
@@ -272,7 +272,7 @@ check_all_ports_link_status(uint16_t port_num, uint32_t port_mask)
 						info->id[portid],
 						link.link_speed,
 				(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?
-					("full-duplex") : ("half-duplex\n"));
+					("full-duplex") : ("half-duplex"));
 				else
 					printf("Port %d Link Down\n",
 						info->id[portid]);
diff --git a/examples/vm_power_manager/main.c b/examples/vm_power_manager/main.c
index d39f044c1e..0409a832b5 100644
--- a/examples/vm_power_manager/main.c
+++ b/examples/vm_power_manager/main.c
@@ -272,7 +272,7 @@ check_all_ports_link_status(uint32_t port_mask)
 						"Mbps - %s\n", (uint16_t)portid,
 						(unsigned int)link.link_speed,
 				(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?
-					("full-duplex") : ("half-duplex\n"));
+					("full-duplex") : ("half-duplex"));
 				else
 					printf("Port %d Link Down\n",
 						(uint16_t)portid);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:53.283606344 +0100
+++ 0213-examples-remove-extra-new-line-after-link-duplex.patch	2020-05-19 14:04:44.632655913 +0100
@@ -1,8 +1,10 @@
-From c81e3f21d1ea05e5123278b15d9d5e1257b6ba99 Mon Sep 17 00:00:00 2001
+From 507cda6e23745cf900e3e2388e433447df728519 Mon Sep 17 00:00:00 2001
 From: Ivan Dyukov <i.dyukov@samsung.com>
 Date: Thu, 7 May 2020 21:26:02 +0300
 Subject: [PATCH] examples: remove extra new line after link duplex
 
+[ upstream commit c81e3f21d1ea05e5123278b15d9d5e1257b6ba99 ]
+
 This patch removes extra 'new line' in few app examples.
 
 Fixes: d3641ae863 ("examples: update link status checks")
@@ -20,7 +22,6 @@
 Fixes: de3cfa2c98 ("sched: initial import")
 Fixes: d7937e2e3d ("power: initial import")
 Fixes: 3fc5ca2f63 ("kni: initial import")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ivan Dyukov <i.dyukov@samsung.com>
 ---
@@ -61,7 +62,7 @@
  		} else
  			printf("Port %d Link Down\n", portid);
 diff --git a/examples/ip_fragmentation/main.c b/examples/ip_fragmentation/main.c
-index 5eca7ba994..4afb97109f 100644
+index 28febf49e7..90e4d1ea4a 100644
 --- a/examples/ip_fragmentation/main.c
 +++ b/examples/ip_fragmentation/main.c
 @@ -617,7 +617,7 @@ check_all_ports_link_status(uint32_t port_mask)
@@ -74,7 +75,7 @@
  					printf("Port %d Link Down\n", portid);
  				continue;
 diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c
-index e34d8f0e12..494d7ee776 100644
+index d59e6d02ff..29b34d0710 100644
 --- a/examples/ip_reassembly/main.c
 +++ b/examples/ip_reassembly/main.c
 @@ -736,7 +736,7 @@ check_all_ports_link_status(uint32_t port_mask)
@@ -87,10 +88,10 @@
  					printf("Port %d Link Down\n", portid);
  				continue;
 diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
-index 161fd218aa..f777ce2afe 100644
+index 3b5aaf6832..1493be9025 100644
 --- a/examples/ipsec-secgw/ipsec-secgw.c
 +++ b/examples/ipsec-secgw/ipsec-secgw.c
-@@ -1799,7 +1799,7 @@ check_all_ports_link_status(uint32_t port_mask)
+@@ -1668,7 +1668,7 @@ check_all_ports_link_status(uint32_t port_mask)
  					"Port%d Link Up - speed %u Mbps -%s\n",
  						portid, link.link_speed,
  				(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?
@@ -100,10 +101,10 @@
  					printf("Port %d Link Down\n", portid);
  				continue;
 diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c
-index 1fb28513b0..7e255c35a3 100644
+index 63333b5b69..09d9270aff 100644
 --- a/examples/ipv4_multicast/main.c
 +++ b/examples/ipv4_multicast/main.c
-@@ -596,7 +596,7 @@ check_all_ports_link_status(uint32_t port_mask)
+@@ -600,7 +600,7 @@ check_all_ports_link_status(uint32_t port_mask)
  					"Port%d Link Up. Speed %u Mbps - %s\n",
  					portid, link.link_speed,
  				(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?
@@ -113,10 +114,10 @@
  					printf("Port %d Link Down\n", portid);
  				continue;
 diff --git a/examples/kni/main.c b/examples/kni/main.c
-index 29fc37e1fb..6b4ab3b5b5 100644
+index 5f713e6b22..f867f5fc9b 100644
 --- a/examples/kni/main.c
 +++ b/examples/kni/main.c
-@@ -683,7 +683,7 @@ check_all_ports_link_status(uint32_t port_mask)
+@@ -679,7 +679,7 @@ check_all_ports_link_status(uint32_t port_mask)
  					"Port%d Link Up - speed %uMbps - %s\n",
  						portid, link.link_speed,
  				(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?
@@ -139,10 +140,10 @@
  					printf("Port %d Link Down\n", portid);
  				continue;
 diff --git a/examples/l2fwd-event/main.c b/examples/l2fwd-event/main.c
-index 9cc29d7324..9593ef11e3 100644
+index 89a6bb9a44..384b71238f 100644
 --- a/examples/l2fwd-event/main.c
 +++ b/examples/l2fwd-event/main.c
-@@ -394,7 +394,7 @@ check_all_ports_link_status(struct l2fwd_resources *rsrc,
+@@ -263,7 +263,7 @@ check_all_ports_link_status(struct l2fwd_resources *rsrc,
  					"Port%d Link Up. Speed %u Mbps - %s\n",
  						port_id, link.link_speed,
  				(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?
@@ -152,7 +153,7 @@
  					printf("Port %d Link Down\n", port_id);
  				continue;
 diff --git a/examples/l2fwd-jobstats/main.c b/examples/l2fwd-jobstats/main.c
-index c1ca100ed0..396fd89db4 100644
+index f975aa12d0..e0255080e2 100644
 --- a/examples/l2fwd-jobstats/main.c
 +++ b/examples/l2fwd-jobstats/main.c
 @@ -710,7 +710,7 @@ check_all_ports_link_status(uint32_t port_mask)
@@ -165,7 +166,7 @@
  					printf("Port %d Link Down\n", portid);
  				continue;
 diff --git a/examples/l2fwd-keepalive/main.c b/examples/l2fwd-keepalive/main.c
-index 32482158d6..b7585d55e1 100644
+index eda703e684..3d59e2ca90 100644
 --- a/examples/l2fwd-keepalive/main.c
 +++ b/examples/l2fwd-keepalive/main.c
 @@ -475,7 +475,7 @@ check_all_ports_link_status(uint32_t port_mask)
@@ -178,7 +179,7 @@
  					printf("Port %d Link Down\n", portid);
  				continue;
 diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c
-index 88ddfe5897..f8d14b843a 100644
+index 09257aab1c..fcef232731 100644
 --- a/examples/l2fwd/main.c
 +++ b/examples/l2fwd/main.c
 @@ -478,7 +478,7 @@ check_all_ports_link_status(uint32_t port_mask)
@@ -191,7 +192,7 @@
  					printf("Port %d Link Down\n", portid);
  				continue;
 diff --git a/examples/l3fwd-acl/main.c b/examples/l3fwd-acl/main.c
-index cccf81929c..f22fca7328 100644
+index fa92a28297..cfbeee962b 100644
 --- a/examples/l3fwd-acl/main.c
 +++ b/examples/l3fwd-acl/main.c
 @@ -1839,7 +1839,7 @@ check_all_ports_link_status(uint32_t port_mask)
@@ -204,10 +205,10 @@
  					printf("Port %d Link Down\n", portid);
  				continue;
 diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
-index 48b9c85e1b..9db94ce044 100644
+index e9b2cb5b30..aa6ff2627b 100644
 --- a/examples/l3fwd-power/main.c
 +++ b/examples/l3fwd-power/main.c
-@@ -1969,7 +1969,7 @@ check_all_ports_link_status(uint32_t port_mask)
+@@ -1998,7 +1998,7 @@ check_all_ports_link_status(uint32_t port_mask)
  						"Mbps - %s\n", (uint8_t)portid,
  						(unsigned)link.link_speed,
  				(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?
@@ -217,10 +218,10 @@
  					printf("Port %d Link Down\n",
  						(uint8_t)portid);
 diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c
-index dda430d68a..84f171f18b 100644
+index 4dea12a653..3a8ec5a7f2 100644
 --- a/examples/l3fwd/main.c
 +++ b/examples/l3fwd/main.c
-@@ -838,7 +838,7 @@ check_all_ports_link_status(uint32_t port_mask)
+@@ -747,7 +747,7 @@ check_all_ports_link_status(uint32_t port_mask)
  					"Port%d Link Up. Speed %u Mbps -%s\n",
  						portid, link.link_speed,
  				(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?
@@ -230,7 +231,7 @@
  					printf("Port %d Link Down\n", portid);
  				continue;
 diff --git a/examples/link_status_interrupt/main.c b/examples/link_status_interrupt/main.c
-index 38422f6ac5..25efe2b09a 100644
+index a924aa2313..72f86e502f 100644
 --- a/examples/link_status_interrupt/main.c
 +++ b/examples/link_status_interrupt/main.c
 @@ -500,7 +500,7 @@ check_all_ports_link_status(uint16_t port_num, uint32_t port_mask)
@@ -256,7 +257,7 @@
  					printf("Port %d Link Down\n",
  						(uint8_t)ports->id[portid]);
 diff --git a/examples/multi_process/symmetric_mp/main.c b/examples/multi_process/symmetric_mp/main.c
-index 522f211c0f..9a16e198cb 100644
+index 7f491452a7..c5cd8825e5 100644
 --- a/examples/multi_process/symmetric_mp/main.c
 +++ b/examples/multi_process/symmetric_mp/main.c
 @@ -389,7 +389,7 @@ check_all_ports_link_status(uint16_t port_num, uint32_t port_mask)
@@ -269,7 +270,7 @@
  					printf("Port %d Link Down\n", portid);
  				continue;
 diff --git a/examples/performance-thread/l3fwd-thread/main.c b/examples/performance-thread/l3fwd-thread/main.c
-index 43a5b9248d..84c1d7b3a2 100644
+index ad540fd842..f58a70b77f 100644
 --- a/examples/performance-thread/l3fwd-thread/main.c
 +++ b/examples/performance-thread/l3fwd-thread/main.c
 @@ -3457,7 +3457,7 @@ check_all_ports_link_status(uint32_t port_mask)
@@ -308,7 +309,7 @@
  					printf("Port %d Link Down\n",
  						info->id[portid]);
 diff --git a/examples/vm_power_manager/main.c b/examples/vm_power_manager/main.c
-index dc6afb132c..273bfec299 100644
+index d39f044c1e..0409a832b5 100644
 --- a/examples/vm_power_manager/main.c
 +++ b/examples/vm_power_manager/main.c
 @@ -272,7 +272,7 @@ check_all_ports_link_status(uint32_t port_mask)

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'crypto/qat: support plain SHA1..SHA512 hashes' has been queued to stable release 19.11.3
  2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
                     ` (211 preceding siblings ...)
  2020-05-19 13:05   ` [dpdk-stable] patch 'examples: " luca.boccassi
@ 2020-05-19 13:05   ` luca.boccassi
  2020-05-22  9:39     ` [dpdk-stable] patch 'event/dsw: fix enqueue burst return value' " luca.boccassi
  212 siblings, 1 reply; 371+ messages in thread
From: luca.boccassi @ 2020-05-19 13:05 UTC (permalink / raw)
  To: Adam Dybkowski; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/21/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 32b5e80df1cfb5c7a8151e789981c7bf73e5a0a8 Mon Sep 17 00:00:00 2001
From: Adam Dybkowski <adamx.dybkowski@intel.com>
Date: Tue, 21 Apr 2020 14:55:42 +0200
Subject: [PATCH] crypto/qat: support plain SHA1..SHA512 hashes

This patch adds support for plain SHA-1, SHA-224, SHA-256,
SHA-384 and SHA-512 hashes to QAT PMD.

Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
 app/test/test_cryptodev_hash_test_vectors.h |  10 ++
 doc/guides/cryptodevs/features/qat.ini      |   5 +
 doc/guides/cryptodevs/qat.rst               |   5 +
 drivers/crypto/qat/qat_sym_capabilities.h   | 105 ++++++++++++++++++
 drivers/crypto/qat/qat_sym_session.c        | 113 ++++++++++++++++++--
 drivers/crypto/qat/qat_sym_session.h        |   1 +
 6 files changed, 232 insertions(+), 7 deletions(-)

diff --git a/app/test/test_cryptodev_hash_test_vectors.h b/app/test/test_cryptodev_hash_test_vectors.h
index cff2831185..394bb6b60b 100644
--- a/app/test/test_cryptodev_hash_test_vectors.h
+++ b/app/test/test_cryptodev_hash_test_vectors.h
@@ -460,6 +460,7 @@ static const struct blockcipher_test_case hash_test_cases[] = {
 		.test_data = &sha1_test_vector,
 		.op_mask = BLOCKCIPHER_TEST_OP_AUTH_GEN,
 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
+			    BLOCKCIPHER_TEST_TARGET_PMD_QAT |
 			    BLOCKCIPHER_TEST_TARGET_PMD_CCP |
 			    BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
 #if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
@@ -473,6 +474,7 @@ static const struct blockcipher_test_case hash_test_cases[] = {
 		.test_data = &sha1_test_vector,
 		.op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY,
 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
+			    BLOCKCIPHER_TEST_TARGET_PMD_QAT |
 			    BLOCKCIPHER_TEST_TARGET_PMD_CCP |
 			    BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
 #if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
@@ -540,6 +542,7 @@ static const struct blockcipher_test_case hash_test_cases[] = {
 		.test_data = &sha224_test_vector,
 		.op_mask = BLOCKCIPHER_TEST_OP_AUTH_GEN,
 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
+			    BLOCKCIPHER_TEST_TARGET_PMD_QAT |
 			    BLOCKCIPHER_TEST_TARGET_PMD_CCP |
 			    BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
 #if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
@@ -553,6 +556,7 @@ static const struct blockcipher_test_case hash_test_cases[] = {
 		.test_data = &sha224_test_vector,
 		.op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY,
 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
+			    BLOCKCIPHER_TEST_TARGET_PMD_QAT |
 			    BLOCKCIPHER_TEST_TARGET_PMD_CCP |
 			    BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
 #if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
@@ -596,6 +600,7 @@ static const struct blockcipher_test_case hash_test_cases[] = {
 		.test_data = &sha256_test_vector,
 		.op_mask = BLOCKCIPHER_TEST_OP_AUTH_GEN,
 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
+			    BLOCKCIPHER_TEST_TARGET_PMD_QAT |
 			    BLOCKCIPHER_TEST_TARGET_PMD_CCP |
 			    BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
 #if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
@@ -609,6 +614,7 @@ static const struct blockcipher_test_case hash_test_cases[] = {
 		.test_data = &sha256_test_vector,
 		.op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY,
 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
+			    BLOCKCIPHER_TEST_TARGET_PMD_QAT |
 			    BLOCKCIPHER_TEST_TARGET_PMD_CCP |
 			    BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
 #if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
@@ -654,6 +660,7 @@ static const struct blockcipher_test_case hash_test_cases[] = {
 		.test_data = &sha384_test_vector,
 		.op_mask = BLOCKCIPHER_TEST_OP_AUTH_GEN,
 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
+			    BLOCKCIPHER_TEST_TARGET_PMD_QAT |
 			    BLOCKCIPHER_TEST_TARGET_PMD_CCP |
 			    BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
 #if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
@@ -667,6 +674,7 @@ static const struct blockcipher_test_case hash_test_cases[] = {
 		.test_data = &sha384_test_vector,
 		.op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY,
 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
+			    BLOCKCIPHER_TEST_TARGET_PMD_QAT |
 			    BLOCKCIPHER_TEST_TARGET_PMD_CCP |
 			    BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
 #if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
@@ -712,6 +720,7 @@ static const struct blockcipher_test_case hash_test_cases[] = {
 		.test_data = &sha512_test_vector,
 		.op_mask = BLOCKCIPHER_TEST_OP_AUTH_GEN,
 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
+			    BLOCKCIPHER_TEST_TARGET_PMD_QAT |
 			    BLOCKCIPHER_TEST_TARGET_PMD_CCP |
 			    BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
 #if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
@@ -724,6 +733,7 @@ static const struct blockcipher_test_case hash_test_cases[] = {
 		.test_data = &sha512_test_vector,
 		.op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY,
 		.pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL |
+			    BLOCKCIPHER_TEST_TARGET_PMD_QAT |
 			    BLOCKCIPHER_TEST_TARGET_PMD_CCP |
 			    BLOCKCIPHER_TEST_TARGET_PMD_MVSAM |
 #if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
diff --git a/doc/guides/cryptodevs/features/qat.ini b/doc/guides/cryptodevs/features/qat.ini
index 6e350eb81f..a722419979 100644
--- a/doc/guides/cryptodevs/features/qat.ini
+++ b/doc/guides/cryptodevs/features/qat.ini
@@ -44,10 +44,15 @@ ZUC EEA3       = Y
 [Auth]
 NULL         = Y
 MD5 HMAC     = Y
+SHA1         = Y
 SHA1 HMAC    = Y
+SHA224       = Y
 SHA224 HMAC  = Y
+SHA256       = Y
 SHA256 HMAC  = Y
+SHA384       = Y
 SHA384 HMAC  = Y
+SHA512       = Y
 SHA512 HMAC  = Y
 AES GMAC     = Y
 SNOW3G UIA2  = Y
diff --git a/doc/guides/cryptodevs/qat.rst b/doc/guides/cryptodevs/qat.rst
index 5ab80b1c0f..cc35a64137 100644
--- a/doc/guides/cryptodevs/qat.rst
+++ b/doc/guides/cryptodevs/qat.rst
@@ -52,10 +52,15 @@ Cipher algorithms:
 
 Hash algorithms:
 
+* ``RTE_CRYPTO_AUTH_SHA1``
 * ``RTE_CRYPTO_AUTH_SHA1_HMAC``
+* ``RTE_CRYPTO_AUTH_SHA224``
 * ``RTE_CRYPTO_AUTH_SHA224_HMAC``
+* ``RTE_CRYPTO_AUTH_SHA256``
 * ``RTE_CRYPTO_AUTH_SHA256_HMAC``
+* ``RTE_CRYPTO_AUTH_SHA384``
 * ``RTE_CRYPTO_AUTH_SHA384_HMAC``
+* ``RTE_CRYPTO_AUTH_SHA512``
 * ``RTE_CRYPTO_AUTH_SHA512_HMAC``
 * ``RTE_CRYPTO_AUTH_AES_XCBC_MAC``
 * ``RTE_CRYPTO_AUTH_SNOW3G_UIA2``
diff --git a/drivers/crypto/qat/qat_sym_capabilities.h b/drivers/crypto/qat/qat_sym_capabilities.h
index 028a56c568..dbeea43408 100644
--- a/drivers/crypto/qat/qat_sym_capabilities.h
+++ b/drivers/crypto/qat/qat_sym_capabilities.h
@@ -6,6 +6,111 @@
 #define _QAT_SYM_CAPABILITIES_H_
 
 #define QAT_BASE_GEN1_SYM_CAPABILITIES					\
+	{	/* SHA1 */						\
+		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,			\
+		{.sym = {						\
+			.xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,	\
+			{.auth = {					\
+				.algo = RTE_CRYPTO_AUTH_SHA1,		\
+				.block_size = 64,			\
+				.key_size = {				\
+					.min = 0,			\
+					.max = 0,			\
+					.increment = 0			\
+				},					\
+				.digest_size = {			\
+					.min = 1,			\
+					.max = 20,			\
+					.increment = 1			\
+				},					\
+				.iv_size = { 0 }			\
+			}, }						\
+		}, }							\
+	},								\
+	{	/* SHA224 */						\
+		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,			\
+		{.sym = {						\
+			.xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,	\
+			{.auth = {					\
+				.algo = RTE_CRYPTO_AUTH_SHA224,		\
+				.block_size = 64,			\
+				.key_size = {				\
+					.min = 0,			\
+					.max = 0,			\
+					.increment = 0			\
+				},					\
+				.digest_size = {			\
+					.min = 1,			\
+					.max = 28,			\
+					.increment = 1			\
+				},					\
+				.iv_size = { 0 }			\
+			}, }						\
+		}, }							\
+	},								\
+	{	/* SHA256 */						\
+		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,			\
+		{.sym = {						\
+			.xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,	\
+			{.auth = {					\
+				.algo = RTE_CRYPTO_AUTH_SHA256,		\
+				.block_size = 64,			\
+				.key_size = {				\
+					.min = 0,			\
+					.max = 0,			\
+					.increment = 0			\
+				},					\
+				.digest_size = {			\
+					.min = 1,			\
+					.max = 32,			\
+					.increment = 1			\
+				},					\
+				.iv_size = { 0 }			\
+			}, }						\
+		}, }							\
+	},								\
+	{	/* SHA384 */						\
+		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,			\
+		{.sym = {						\
+			.xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,	\
+			{.auth = {					\
+				.algo = RTE_CRYPTO_AUTH_SHA384,		\
+				.block_size = 128,			\
+				.key_size = {				\
+					.min = 0,			\
+					.max = 0,			\
+					.increment = 0			\
+				},					\
+				.digest_size = {			\
+					.min = 1,			\
+					.max = 48,			\
+					.increment = 1			\
+				},					\
+				.iv_size = { 0 }			\
+			}, }						\
+		}, }							\
+	},								\
+	{	/* SHA512 */						\
+		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,			\
+		{.sym = {						\
+			.xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,	\
+			{.auth = {					\
+				.algo = RTE_CRYPTO_AUTH_SHA512,		\
+				.block_size = 128,			\
+				.key_size = {				\
+					.min = 0,			\
+					.max = 0,			\
+					.increment = 0			\
+				},					\
+				.digest_size = {			\
+					.min = 1,			\
+					.max = 64,			\
+					.increment = 1			\
+				},					\
+				.iv_size = { 0 }			\
+			}, }						\
+		}, }							\
+	},								\
 	{	/* SHA1 HMAC */						\
 		.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,			\
 		{.sym = {						\
diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c
index f69c2e2fd7..695ba7e178 100644
--- a/drivers/crypto/qat/qat_sym_session.c
+++ b/drivers/crypto/qat/qat_sym_session.c
@@ -19,6 +19,41 @@
 #include "qat_sym_session.h"
 #include "qat_sym_pmd.h"
 
+/* SHA1 - 20 bytes - Initialiser state can be found in FIPS stds 180-2 */
+static const uint8_t sha1InitialState[] = {
+	0x67, 0x45, 0x23, 0x01, 0xef, 0xcd, 0xab, 0x89, 0x98, 0xba,
+	0xdc, 0xfe, 0x10, 0x32, 0x54, 0x76, 0xc3, 0xd2, 0xe1, 0xf0};
+
+/* SHA 224 - 32 bytes - Initialiser state can be found in FIPS stds 180-2 */
+static const uint8_t sha224InitialState[] = {
+	0xc1, 0x05, 0x9e, 0xd8, 0x36, 0x7c, 0xd5, 0x07, 0x30, 0x70, 0xdd,
+	0x17, 0xf7, 0x0e, 0x59, 0x39, 0xff, 0xc0, 0x0b, 0x31, 0x68, 0x58,
+	0x15, 0x11, 0x64, 0xf9, 0x8f, 0xa7, 0xbe, 0xfa, 0x4f, 0xa4};
+
+/* SHA 256 - 32 bytes - Initialiser state can be found in FIPS stds 180-2 */
+static const uint8_t sha256InitialState[] = {
+	0x6a, 0x09, 0xe6, 0x67, 0xbb, 0x67, 0xae, 0x85, 0x3c, 0x6e, 0xf3,
+	0x72, 0xa5, 0x4f, 0xf5, 0x3a, 0x51, 0x0e, 0x52, 0x7f, 0x9b, 0x05,
+	0x68, 0x8c, 0x1f, 0x83, 0xd9, 0xab, 0x5b, 0xe0, 0xcd, 0x19};
+
+/* SHA 384 - 64 bytes - Initialiser state can be found in FIPS stds 180-2 */
+static const uint8_t sha384InitialState[] = {
+	0xcb, 0xbb, 0x9d, 0x5d, 0xc1, 0x05, 0x9e, 0xd8, 0x62, 0x9a, 0x29,
+	0x2a, 0x36, 0x7c, 0xd5, 0x07, 0x91, 0x59, 0x01, 0x5a, 0x30, 0x70,
+	0xdd, 0x17, 0x15, 0x2f, 0xec, 0xd8, 0xf7, 0x0e, 0x59, 0x39, 0x67,
+	0x33, 0x26, 0x67, 0xff, 0xc0, 0x0b, 0x31, 0x8e, 0xb4, 0x4a, 0x87,
+	0x68, 0x58, 0x15, 0x11, 0xdb, 0x0c, 0x2e, 0x0d, 0x64, 0xf9, 0x8f,
+	0xa7, 0x47, 0xb5, 0x48, 0x1d, 0xbe, 0xfa, 0x4f, 0xa4};
+
+/* SHA 512 - 64 bytes - Initialiser state can be found in FIPS stds 180-2 */
+static const uint8_t sha512InitialState[] = {
+	0x6a, 0x09, 0xe6, 0x67, 0xf3, 0xbc, 0xc9, 0x08, 0xbb, 0x67, 0xae,
+	0x85, 0x84, 0xca, 0xa7, 0x3b, 0x3c, 0x6e, 0xf3, 0x72, 0xfe, 0x94,
+	0xf8, 0x2b, 0xa5, 0x4f, 0xf5, 0x3a, 0x5f, 0x1d, 0x36, 0xf1, 0x51,
+	0x0e, 0x52, 0x7f, 0xad, 0xe6, 0x82, 0xd1, 0x9b, 0x05, 0x68, 0x8c,
+	0x2b, 0x3e, 0x6c, 0x1f, 0x1f, 0x83, 0xd9, 0xab, 0xfb, 0x41, 0xbd,
+	0x6b, 0x5b, 0xe0, 0xcd, 0x19, 0x13, 0x7e, 0x21, 0x79};
+
 /** Frees a context previously created
  *  Depends on openssl libcrypto
  */
@@ -580,8 +615,29 @@ qat_sym_session_configure_auth(struct rte_cryptodev *dev,
 	const uint8_t *key_data = auth_xform->key.data;
 	uint8_t key_length = auth_xform->key.length;
 	session->aes_cmac = 0;
+	session->auth_mode = ICP_QAT_HW_AUTH_MODE1;
 
 	switch (auth_xform->algo) {
+	case RTE_CRYPTO_AUTH_SHA1:
+		session->qat_hash_alg = ICP_QAT_HW_AUTH_ALGO_SHA1;
+		session->auth_mode = ICP_QAT_HW_AUTH_MODE0;
+		break;
+	case RTE_CRYPTO_AUTH_SHA224:
+		session->qat_hash_alg = ICP_QAT_HW_AUTH_ALGO_SHA224;
+		session->auth_mode = ICP_QAT_HW_AUTH_MODE0;
+		break;
+	case RTE_CRYPTO_AUTH_SHA256:
+		session->qat_hash_alg = ICP_QAT_HW_AUTH_ALGO_SHA256;
+		session->auth_mode = ICP_QAT_HW_AUTH_MODE0;
+		break;
+	case RTE_CRYPTO_AUTH_SHA384:
+		session->qat_hash_alg = ICP_QAT_HW_AUTH_ALGO_SHA384;
+		session->auth_mode = ICP_QAT_HW_AUTH_MODE0;
+		break;
+	case RTE_CRYPTO_AUTH_SHA512:
+		session->qat_hash_alg = ICP_QAT_HW_AUTH_ALGO_SHA512;
+		session->auth_mode = ICP_QAT_HW_AUTH_MODE0;
+		break;
 	case RTE_CRYPTO_AUTH_SHA1_HMAC:
 		session->qat_hash_alg = ICP_QAT_HW_AUTH_ALGO_SHA1;
 		break;
@@ -635,11 +691,6 @@ qat_sym_session_configure_auth(struct rte_cryptodev *dev,
 		}
 		session->qat_hash_alg = ICP_QAT_HW_AUTH_ALGO_ZUC_3G_128_EIA3;
 		break;
-	case RTE_CRYPTO_AUTH_SHA1:
-	case RTE_CRYPTO_AUTH_SHA256:
-	case RTE_CRYPTO_AUTH_SHA512:
-	case RTE_CRYPTO_AUTH_SHA224:
-	case RTE_CRYPTO_AUTH_SHA384:
 	case RTE_CRYPTO_AUTH_MD5:
 	case RTE_CRYPTO_AUTH_AES_CBC_MAC:
 		QAT_LOG(ERR, "Crypto: Unsupported hash alg %u",
@@ -727,6 +778,8 @@ qat_sym_session_configure_aead(struct rte_cryptodev *dev,
 	session->cipher_iv.offset = xform->aead.iv.offset;
 	session->cipher_iv.length = xform->aead.iv.length;
 
+	session->auth_mode = ICP_QAT_HW_AUTH_MODE1;
+
 	switch (aead_xform->algo) {
 	case RTE_CRYPTO_AEAD_AES_GCM:
 		if (qat_sym_validate_aes_key(aead_xform->key.length,
@@ -1574,10 +1627,11 @@ int qat_sym_session_aead_create_cd_auth(struct qat_sym_session *cdesc,
 	hash = (struct icp_qat_hw_auth_setup *)cdesc->cd_cur_ptr;
 	hash->auth_config.reserved = 0;
 	hash->auth_config.config =
-			ICP_QAT_HW_AUTH_CONFIG_BUILD(ICP_QAT_HW_AUTH_MODE1,
+			ICP_QAT_HW_AUTH_CONFIG_BUILD(cdesc->auth_mode,
 				cdesc->qat_hash_alg, digestsize);
 
-	if (cdesc->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_SNOW_3G_UIA2
+	if (cdesc->auth_mode == ICP_QAT_HW_AUTH_MODE0
+		|| cdesc->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_SNOW_3G_UIA2
 		|| cdesc->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_KASUMI_F9
 		|| cdesc->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_ZUC_3G_128_EIA3
 		|| cdesc->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_AES_XCBC_MAC
@@ -1600,6 +1654,15 @@ int qat_sym_session_aead_create_cd_auth(struct qat_sym_session *cdesc,
 	 */
 	switch (cdesc->qat_hash_alg) {
 	case ICP_QAT_HW_AUTH_ALGO_SHA1:
+		if (cdesc->auth_mode == ICP_QAT_HW_AUTH_MODE0) {
+			/* Plain SHA-1 */
+			rte_memcpy(cdesc->cd_cur_ptr, sha1InitialState,
+					sizeof(sha1InitialState));
+			state1_size = qat_hash_get_state1_size(
+					cdesc->qat_hash_alg);
+			break;
+		}
+		/* SHA-1 HMAC */
 		if (qat_sym_do_precomputes(ICP_QAT_HW_AUTH_ALGO_SHA1, authkey,
 			authkeylen, cdesc->cd_cur_ptr, &state1_size,
 			cdesc->aes_cmac)) {
@@ -1609,6 +1672,15 @@ int qat_sym_session_aead_create_cd_auth(struct qat_sym_session *cdesc,
 		state2_size = RTE_ALIGN_CEIL(ICP_QAT_HW_SHA1_STATE2_SZ, 8);
 		break;
 	case ICP_QAT_HW_AUTH_ALGO_SHA224:
+		if (cdesc->auth_mode == ICP_QAT_HW_AUTH_MODE0) {
+			/* Plain SHA-224 */
+			rte_memcpy(cdesc->cd_cur_ptr, sha224InitialState,
+					sizeof(sha224InitialState));
+			state1_size = qat_hash_get_state1_size(
+					cdesc->qat_hash_alg);
+			break;
+		}
+		/* SHA-224 HMAC */
 		if (qat_sym_do_precomputes(ICP_QAT_HW_AUTH_ALGO_SHA224, authkey,
 			authkeylen, cdesc->cd_cur_ptr, &state1_size,
 			cdesc->aes_cmac)) {
@@ -1618,6 +1690,15 @@ int qat_sym_session_aead_create_cd_auth(struct qat_sym_session *cdesc,
 		state2_size = ICP_QAT_HW_SHA224_STATE2_SZ;
 		break;
 	case ICP_QAT_HW_AUTH_ALGO_SHA256:
+		if (cdesc->auth_mode == ICP_QAT_HW_AUTH_MODE0) {
+			/* Plain SHA-256 */
+			rte_memcpy(cdesc->cd_cur_ptr, sha256InitialState,
+					sizeof(sha256InitialState));
+			state1_size = qat_hash_get_state1_size(
+					cdesc->qat_hash_alg);
+			break;
+		}
+		/* SHA-256 HMAC */
 		if (qat_sym_do_precomputes(ICP_QAT_HW_AUTH_ALGO_SHA256, authkey,
 			authkeylen, cdesc->cd_cur_ptr,	&state1_size,
 			cdesc->aes_cmac)) {
@@ -1627,6 +1708,15 @@ int qat_sym_session_aead_create_cd_auth(struct qat_sym_session *cdesc,
 		state2_size = ICP_QAT_HW_SHA256_STATE2_SZ;
 		break;
 	case ICP_QAT_HW_AUTH_ALGO_SHA384:
+		if (cdesc->auth_mode == ICP_QAT_HW_AUTH_MODE0) {
+			/* Plain SHA-384 */
+			rte_memcpy(cdesc->cd_cur_ptr, sha384InitialState,
+					sizeof(sha384InitialState));
+			state1_size = qat_hash_get_state1_size(
+					cdesc->qat_hash_alg);
+			break;
+		}
+		/* SHA-384 HMAC */
 		if (qat_sym_do_precomputes(ICP_QAT_HW_AUTH_ALGO_SHA384, authkey,
 			authkeylen, cdesc->cd_cur_ptr, &state1_size,
 			cdesc->aes_cmac)) {
@@ -1636,6 +1726,15 @@ int qat_sym_session_aead_create_cd_auth(struct qat_sym_session *cdesc,
 		state2_size = ICP_QAT_HW_SHA384_STATE2_SZ;
 		break;
 	case ICP_QAT_HW_AUTH_ALGO_SHA512:
+		if (cdesc->auth_mode == ICP_QAT_HW_AUTH_MODE0) {
+			/* Plain SHA-512 */
+			rte_memcpy(cdesc->cd_cur_ptr, sha512InitialState,
+					sizeof(sha512InitialState));
+			state1_size = qat_hash_get_state1_size(
+					cdesc->qat_hash_alg);
+			break;
+		}
+		/* SHA-512 HMAC */
 		if (qat_sym_do_precomputes(ICP_QAT_HW_AUTH_ALGO_SHA512, authkey,
 			authkeylen, cdesc->cd_cur_ptr,	&state1_size,
 			cdesc->aes_cmac)) {
diff --git a/drivers/crypto/qat/qat_sym_session.h b/drivers/crypto/qat/qat_sym_session.h
index 98985d6867..bcab5b2b60 100644
--- a/drivers/crypto/qat/qat_sym_session.h
+++ b/drivers/crypto/qat/qat_sym_session.h
@@ -62,6 +62,7 @@ struct qat_sym_session {
 	enum icp_qat_hw_cipher_mode qat_mode;
 	enum icp_qat_hw_auth_algo qat_hash_alg;
 	enum icp_qat_hw_auth_op auth_op;
+	enum icp_qat_hw_auth_mode auth_mode;
 	void *bpi_ctx;
 	struct qat_sym_cd cd;
 	uint8_t *cd_cur_ptr;
-- 
2.20.1


^ permalink raw reply	[flat|nested] 371+ messages in thread

* Re: [dpdk-stable] patch 'crypto/ccp: fix fd leak on probe failure' has been queued to stable release 19.11.3
  2020-05-19 13:05   ` [dpdk-stable] patch 'crypto/ccp: fix fd leak on probe failure' " luca.boccassi
@ 2020-05-19 13:20     ` Kumar, Ravi1
  0 siblings, 0 replies; 371+ messages in thread
From: Kumar, Ravi1 @ 2020-05-19 13:20 UTC (permalink / raw)
  To: luca.boccassi, Yunjian Wang; +Cc: dpdk stable, Somalapuram, Amaranath

[AMD Public Use]

+Amar 

-----Original Message-----
From: luca.boccassi@gmail.com <luca.boccassi@gmail.com> 
Sent: Tuesday, May 19, 2020 6:35 PM
To: Yunjian Wang <wangyunjian@huawei.com>
Cc: Kumar, Ravi1 <Ravi1.Kumar@amd.com>; dpdk stable <stable@dpdk.org>
Subject: patch 'crypto/ccp: fix fd leak on probe failure' has been queued to stable release 19.11.3

[CAUTION: External Email]

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to https://nam11.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdpdk.org%2Fbrowse%2Fdpdk-stable&amp;data=02%7C01%7Cravi1.kumar%40amd.com%7C7d732966a80441d4cb2608d7fbf6a1f0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637254909006890050&amp;sdata=BQ8zWW2d9itJUf%2FBGPHtXaNLiskAJ1ks1vfSdZ%2BeNlo%3D&amp;reserved=0 yet.
It will be pushed if I get no objections before 05/21/20. So please shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was correctly done.

Thanks.

Luca Boccassi

---
From 9b91b991b69c8f44c194259e42a4197261c06593 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Sun, 26 Apr 2020 14:36:15 +0800
Subject: [PATCH] crypto/ccp: fix fd leak on probe failure

[ upstream commit 4f429be4c09a00ccc5cd13cfb14a11f90958ac74 ]

Zero is a valid fd. When ccp_probe_device() is failed, the uio_fd won't be closed thus leading fd leak.

Fixes: ef4b04f87fa6 ("crypto/ccp: support device init")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Ravi Kumar <ravi1.kumar@amd.com>
---
 drivers/crypto/ccp/ccp_dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/ccp/ccp_dev.c b/drivers/crypto/ccp/ccp_dev.c index 80fe6a4533..7d98b2eb25 100644
--- a/drivers/crypto/ccp/ccp_dev.c
+++ b/drivers/crypto/ccp/ccp_dev.c
@@ -760,7 +760,7 @@ ccp_probe_device(const char *dirname, uint16_t domain,
        return 0;
 fail:
        CCP_LOG_ERR("CCP Device probe failed");
-       if (uio_fd > 0)
+       if (uio_fd >= 0)
                close(uio_fd);
        if (ccp_dev)
                rte_free(ccp_dev);
--
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -   2020-05-19 14:04:51.623305330 +0100
+++ 0174-crypto-ccp-fix-fd-leak-on-probe-failure.patch  2020-05-19 
+++ 14:04:44.516653810 +0100
@@ -1,13 +1,14 @@
-From 4f429be4c09a00ccc5cd13cfb14a11f90958ac74 Mon Sep 17 00:00:00 2001
+From 9b91b991b69c8f44c194259e42a4197261c06593 Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Sun, 26 Apr 2020 14:36:15 +0800
 Subject: [PATCH] crypto/ccp: fix fd leak on probe failure

+[ upstream commit 4f429be4c09a00ccc5cd13cfb14a11f90958ac74 ]
+
 Zero is a valid fd. When ccp_probe_device() is failed, the uio_fd won't be  closed thus leading fd leak.

 Fixes: ef4b04f87fa6 ("crypto/ccp: support device init")
-Cc: stable@dpdk.org

 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Acked-by: Ravi Kumar <ravi1.kumar@amd.com>

^ permalink raw reply	[flat|nested] 371+ messages in thread

* Re: [dpdk-stable] patch 'net/sfc/base: handle manual and auto filter clashes in EF10' has been queued to stable release 19.11.3
  2020-05-19 12:53 ` [dpdk-stable] patch 'net/sfc/base: handle manual and auto filter clashes " luca.boccassi
@ 2020-05-20  9:53   ` Igor Romanov
  2020-05-20 11:57     ` Luca Boccassi
  0 siblings, 1 reply; 371+ messages in thread
From: Igor Romanov @ 2020-05-20  9:53 UTC (permalink / raw)
  To: luca.boccassi, Igor Romanov; +Cc: Andrew Rybchenko, dpdk stable

Hi!

The patch has an issue that is fixed in the attached patch.

On 5/19/20 3:53 PM, luca.boccassi@gmail.com wrote:
> Hi,
>
> FYI, your patch has been queued to stable release 19.11.3
>
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 05/21/20. So please
> shout if anyone has objections.
>
> Also note that after the patch there's a diff of the upstream commit vs the
> patch applied to the branch. This will indicate if there was any rebasing
> needed to apply to the stable branch. If there were code changes for rebasing
> (ie: not only metadata diffs), please double check that the rebase was
> correctly done.
>
> Thanks.
>
> Luca Boccassi
>
> ---
> >From 8ea2ea8fe40c8a13bca536bcb4683d9225cd0ea2 Mon Sep 17 00:00:00 2001
> From: Igor Romanov <igor.romanov@oktetlabs.ru>
> Date: Tue, 10 Mar 2020 09:48:39 +0000
> Subject: [PATCH] net/sfc/base: handle manual and auto filter clashes in EF10
>
> [ upstream commit 585c22edb29cc3cfdb3628c41effd8ff3b75f224 ]
>
> Make user filters a priority in EF10 datapath. When a manual
> filter with a specification that is equal to an existing auto
> filter is inserted, the manual filter:
> - replaces auto filter if the specification is exclusive;
> - is inserted along existing auto filter otherwise;
>
> In the first case the auto filter that was replaced is saved.
> This saved filter can be updated on filter reconfiguration and
> is restored on the manual filter removal.
>
> Fixes: e7cd430c864f ("net/sfc/base: import SFN7xxx family support")
>
> Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
> ---
>   drivers/net/sfc/base/ef10_filter.c | 519 ++++++++++++++++++++++-------
>   drivers/net/sfc/base/ef10_impl.h   |   4 +-
>   drivers/net/sfc/base/efx.h         |   7 +
>   drivers/net/sfc/base/efx_filter.c  |  17 +-
>   drivers/net/sfc/base/efx_impl.h    |  21 +-
>   5 files changed, 437 insertions(+), 131 deletions(-)
>
> diff --git a/drivers/net/sfc/base/ef10_filter.c b/drivers/net/sfc/base/ef10_filter.c
> index 5578765ab3..12802a3d13 100644
> --- a/drivers/net/sfc/base/ef10_filter.c
> +++ b/drivers/net/sfc/base/ef10_filter.c
> @@ -590,6 +590,231 @@ fail1:
>   	return (rc);
>   }
>   
> +enum ef10_filter_add_action_e {
> +	/* Insert a new filter */
> +	EF10_FILTER_ADD_NEW,
> +	/*
> +	 * Replace old filter with a new, overriding the old one
> +	 * if it has lower priority.
> +	 */
> +	EF10_FILTER_ADD_REPLACE,
> +	/* Store new, lower priority filter as overridden by old filter */
> +	EF10_FILTER_ADD_STORE,
> +	/* Special case for AUTO filters, remove AUTO_OLD flag */
> +	EF10_FILTER_ADD_REFRESH,
> +};
> +
> +static	__checkReturn	efx_rc_t
> +ef10_filter_add_lookup_equal_spec(
> +	__in		efx_filter_spec_t *spec,
> +	__in		efx_filter_spec_t *probe_spec,
> +	__in		efx_filter_replacement_policy_t policy,
> +	__out		boolean_t *found)
> +{
> +	efx_rc_t rc;
> +
> +	/* Refreshing AUTO filter */
> +	if (spec->efs_priority == EFX_FILTER_PRI_AUTO &&
> +	    probe_spec->efs_priority == EFX_FILTER_PRI_AUTO) {
> +		*found = B_TRUE;
> +		return (0);
> +	}
> +
> +	/*
> +	 * With exclusive filters, higher priority ones
> +	 * override lower priority ones, and lower priority
> +	 * ones are stored in case the higher priority one
> +	 * is removed.
> +	 */
> +	if (ef10_filter_is_exclusive(spec)) {
> +		switch (policy) {
> +		case EFX_FILTER_REPLACEMENT_HIGHER_OR_EQUAL_PRIORITY:
> +			if (spec->efs_priority == probe_spec->efs_priority) {
> +				*found = B_TRUE;
> +				break;
> +			}
> +			/* Fall-through */
> +		case EFX_FILTER_REPLACEMENT_HIGHER_PRIORITY:
> +			if (spec->efs_priority > probe_spec->efs_priority) {
> +				*found = B_TRUE;
> +				break;
> +			}
> +			/* Fall-through */
> +		case EFX_FILTER_REPLACEMENT_NEVER:
> +			/*
> +			 * Lower priority filter needs to be
> +			 * stored. It does *not* replace the
> +			 * old one. That is why EEXIST is not
> +			 * returned in that case.
> +			 */
> +			if (spec->efs_priority < probe_spec->efs_priority) {
> +				*found = B_TRUE;
> +				break;
> +			} else {
> +				rc = EEXIST;
> +				goto fail1;
> +			}
> +		default:
> +			EFSYS_ASSERT(0);
> +			rc = EEXIST;
> +			goto fail2;
> +		}
> +	} else {
> +		*found = B_FALSE;
> +	}
> +
> +	return (0);
> +
> +fail2:
> +	EFSYS_PROBE(fail2);
> +
> +fail1:
> +	EFSYS_PROBE1(fail1, efx_rc_t, rc);
> +
> +	return (rc);
> +}
> +
> +
> +static			void
> +ef10_filter_add_select_action(
> +	__in		efx_filter_spec_t *saved_spec,
> +	__in		efx_filter_spec_t *spec,
> +	__out		enum ef10_filter_add_action_e *action,
> +	__out		efx_filter_spec_t **overridden_spec)
> +{
> +	efx_filter_spec_t *overridden = NULL;
> +
> +	if (saved_spec == NULL) {
> +		*action = EF10_FILTER_ADD_NEW;
> +	} else if (ef10_filter_is_exclusive(spec) == B_FALSE) {
> +		/*
> +		 * Non-exclusive filters are always stored in separate entries
> +		 * in the table. The only case involving a saved spec is
> +		 * refreshing an AUTO filter.
> +		 */
> +		EFSYS_ASSERT(saved_spec->efs_overridden_spec == NULL);
> +		EFSYS_ASSERT(spec->efs_priority == EFX_FILTER_PRI_AUTO);
> +		EFSYS_ASSERT(saved_spec->efs_priority == EFX_FILTER_PRI_AUTO);
> +		*action = EF10_FILTER_ADD_REFRESH;
> +	} else {
> +		/* Exclusive filters stored in the same entry */
> +		if (spec->efs_priority > saved_spec->efs_priority) {
> +			/*
> +			 * Insert a high priority filter over a lower priority
> +			 * one. Only two priority levels are implemented, so
> +			 * there must not already be an overridden filter.
> +			 */
> +			EFX_STATIC_ASSERT(EFX_FILTER_NPRI == 2);
> +			EFSYS_ASSERT(saved_spec->efs_overridden_spec == NULL);
> +			overridden = saved_spec;
> +			*action = EF10_FILTER_ADD_REPLACE;
> +		} else if (spec->efs_priority == saved_spec->efs_priority) {
> +			/* Replace in-place or refresh an existing filter */
> +			if (spec->efs_priority == EFX_FILTER_PRI_AUTO)
> +				*action = EF10_FILTER_ADD_REFRESH;
> +			else
> +				*action = EF10_FILTER_ADD_REPLACE;
> +		} else {
> +			/*
> +			 * Insert a lower priority filter, storing it in case
> +			 * the higher priority filter is removed.
> +			 *
> +			 * Currently there are only two priority levels, so this
> +			 * must be an AUTO filter.
> +			 */
> +			EFX_STATIC_ASSERT(EFX_FILTER_NPRI == 2);
> +			EFSYS_ASSERT(spec->efs_priority == EFX_FILTER_PRI_AUTO);
> +			if (saved_spec->efs_overridden_spec != NULL) {
> +				*action = EF10_FILTER_ADD_REFRESH;
> +			} else {
> +				overridden = spec;
> +				*action = EF10_FILTER_ADD_STORE;
> +			}
> +		}
> +	}
> +
> +	*overridden_spec = overridden;
> +}
> +
> +static	__checkReturn	efx_rc_t
> +ef10_filter_add_execute_action(
> +	__in		efx_nic_t *enp,
> +	__in		efx_filter_spec_t *saved_spec,
> +	__in		efx_filter_spec_t *spec,
> +	__in		efx_filter_spec_t *overridden_spec,
> +	__in		enum ef10_filter_add_action_e action,
> +	__in		int ins_index)
> +{
> +	ef10_filter_table_t *eftp = enp->en_filter.ef_ef10_filter_table;
> +	efsys_lock_state_t state;
> +	efx_rc_t rc;
> +
> +	EFSYS_LOCK(enp->en_eslp, state);
> +
> +	if (action == EF10_FILTER_ADD_REFRESH) {
> +		ef10_filter_set_entry_not_auto_old(eftp, ins_index);
> +		goto out_unlock;
> +	} else if (action == EF10_FILTER_ADD_STORE) {
> +		EFSYS_ASSERT(overridden_spec != NULL);
> +		saved_spec->efs_overridden_spec = overridden_spec;
> +		goto out_unlock;
> +	}
> +
> +	EFSYS_UNLOCK(enp->en_eslp, state);
> +
> +	switch (action) {
> +	case EF10_FILTER_ADD_REPLACE:
> +		/*
> +		 * On replacing the filter handle may change after a
> +		 * successful replace operation.
> +		 */
> +		rc = efx_mcdi_filter_op_add(enp, spec,
> +		    MC_CMD_FILTER_OP_IN_OP_REPLACE,
> +		    &eftp->eft_entry[ins_index].efe_handle);
> +		break;
> +	case EF10_FILTER_ADD_NEW:
> +		if (ef10_filter_is_exclusive(spec)) {
> +			rc = efx_mcdi_filter_op_add(enp, spec,
> +			    MC_CMD_FILTER_OP_IN_OP_INSERT,
> +			    &eftp->eft_entry[ins_index].efe_handle);
> +		} else {
> +			rc = efx_mcdi_filter_op_add(enp, spec,
> +			    MC_CMD_FILTER_OP_IN_OP_SUBSCRIBE,
> +			    &eftp->eft_entry[ins_index].efe_handle);
> +		}
> +		break;
> +	default:
> +		rc = EINVAL;
> +		EFSYS_ASSERT(0);
> +		break;
> +	}
> +	if (rc != 0)
> +		goto fail1;
> +
> +	EFSYS_LOCK(enp->en_eslp, state);
> +
> +	if (action == EF10_FILTER_ADD_REPLACE) {
> +		/* Update the fields that may differ */
> +		saved_spec->efs_priority = spec->efs_priority;
> +		saved_spec->efs_flags = spec->efs_flags;
> +		saved_spec->efs_rss_context = spec->efs_rss_context;
> +		saved_spec->efs_dmaq_id = spec->efs_dmaq_id;
> +
> +		if (overridden_spec != NULL)
> +			saved_spec->efs_overridden_spec = overridden_spec;
> +	}
> +
> +out_unlock:
> +	EFSYS_UNLOCK(enp->en_eslp, state);
> +
> +	return (0);
> +
> +fail1:
> +	EFSYS_PROBE1(fail1, efx_rc_t, rc);
> +
> +	return (rc);
> +}
> +
>   /*
>    * An arbitrary search limit for the software hash table. As per the linux net
>    * driver.
> @@ -600,22 +825,24 @@ static	__checkReturn	efx_rc_t
>   ef10_filter_add_internal(
>   	__in		efx_nic_t *enp,
>   	__inout		efx_filter_spec_t *spec,
> -	__in		boolean_t may_replace,
> +	__in		efx_filter_replacement_policy_t policy,
>   	__out_opt	uint32_t *filter_id)
>   {
>   	efx_rc_t rc;
>   	ef10_filter_table_t *eftp = enp->en_filter.ef_ef10_filter_table;
> +	enum ef10_filter_add_action_e action;
> +	efx_filter_spec_t *overridden_spec = NULL;
>   	efx_filter_spec_t *saved_spec;
>   	uint32_t hash;
>   	unsigned int depth;
>   	int ins_index;
> -	boolean_t replacing = B_FALSE;
> -	unsigned int i;
>   	efsys_lock_state_t state;
>   	boolean_t locked = B_FALSE;
>   
>   	EFSYS_ASSERT(EFX_FAMILY_IS_EF10(enp));
>   
> +	EFSYS_ASSERT(spec->efs_overridden_spec == NULL);
> +
>   	hash = ef10_filter_hash(spec);
>   
>   	/*
> @@ -635,35 +862,33 @@ retry:
>   	ins_index = -1;
>   
>   	for (depth = 1; depth <= EF10_FILTER_SEARCH_LIMIT; depth++) {
> -		i = (hash + depth) & (EFX_EF10_FILTER_TBL_ROWS - 1);
> -		saved_spec = ef10_filter_entry_spec(eftp, i);
> +		unsigned int probe_index;
> +		efx_filter_spec_t *probe_spec;
>   
> -		if (saved_spec == NULL) {
> +		probe_index = (hash + depth) & (EFX_EF10_FILTER_TBL_ROWS - 1);
> +		probe_spec = ef10_filter_entry_spec(eftp, probe_index);
> +
> +		if (probe_spec == NULL) {
>   			if (ins_index < 0)
> -				ins_index = i;
> -		} else if (ef10_filter_equal(spec, saved_spec)) {
> -			if (ef10_filter_entry_is_busy(eftp, i)) {
> +				ins_index = probe_index;
> +		} else if (ef10_filter_equal(spec, probe_spec)) {
> +			boolean_t found;
> +
> +			if (ef10_filter_entry_is_busy(eftp, probe_index)) {
>   				EFSYS_UNLOCK(enp->en_eslp, state);
>   				locked = B_FALSE;
>   				goto retry;
>   			}
>   
> -			if (saved_spec->efs_priority == EFX_FILTER_PRI_AUTO) {
> -				ins_index = i;
> -				goto found;
> -			}
> +			rc = ef10_filter_add_lookup_equal_spec(spec,
> +			    probe_spec, policy, &found);
> +			if (rc != 0)
> +				goto fail1;
>   
> -			if (ef10_filter_is_exclusive(spec)) {
> -				if (may_replace) {
> -					ins_index = i;
> -					goto found;
> -				} else {
> -					rc = EEXIST;
> -					goto fail1;
> -				}
> +			if (found != B_FALSE) {
> +				ins_index = probe_index;
> +				break;
>   			}
> -
> -			/* Leave existing */
>   		}
>   	}
>   
> @@ -676,93 +901,90 @@ retry:
>   		goto fail2;
>   	}
>   
> -found:
>   	/*
> -	 * Create a software table entry if necessary, and mark it
> -	 * busy.  We might yet fail to insert, but any attempt to
> -	 * insert a conflicting filter while we're waiting for the
> -	 * firmware must find the busy entry.
> +	 * Mark software table entry busy. We might yet fail to insert,
> +	 * but any attempt to insert a conflicting filter while we're
> +	 * waiting for the firmware must find the busy entry.
>   	 */
> +	ef10_filter_set_entry_busy(eftp, ins_index);
> +
>   	saved_spec = ef10_filter_entry_spec(eftp, ins_index);
> -	if (saved_spec) {
> -		if (saved_spec->efs_priority == EFX_FILTER_PRI_AUTO) {
> -			/* This is a filter we are refreshing */
> -			ef10_filter_set_entry_not_auto_old(eftp, ins_index);
> -			goto out_unlock;
> +	ef10_filter_add_select_action(saved_spec, spec, &action,
> +	    &overridden_spec);
>   
> -		}
> -		replacing = B_TRUE;
> -	} else {
> -		EFSYS_KMEM_ALLOC(enp->en_esip, sizeof (*spec), saved_spec);
> -		if (!saved_spec) {
> +	/*
> +	 * Allocate a new filter if found entry is empty or
> +	 * a filter should be overridden.
> +	 */
> +	if (overridden_spec != NULL || saved_spec == NULL) {
> +		efx_filter_spec_t *new_spec;
> +
> +		EFSYS_UNLOCK(enp->en_eslp, state);
> +		locked = B_FALSE;
> +
> +		EFSYS_KMEM_ALLOC(enp->en_esip, sizeof (*new_spec), new_spec);
> +		if (new_spec == NULL) {
>   			rc = ENOMEM;
> +			overridden_spec = NULL;
>   			goto fail3;
>   		}
> -		*saved_spec = *spec;
> -		ef10_filter_set_entry(eftp, ins_index, saved_spec);
> +
> +		EFSYS_LOCK(enp->en_eslp, state);
> +		locked = B_TRUE;
> +
> +		if (saved_spec == NULL) {
> +			*new_spec = *spec;
> +			ef10_filter_set_entry(eftp, ins_index, new_spec);
> +		} else {
> +			*new_spec = *overridden_spec;
> +			overridden_spec = new_spec;
> +		}
>   	}
> -	ef10_filter_set_entry_busy(eftp, ins_index);
>   
>   	EFSYS_UNLOCK(enp->en_eslp, state);
>   	locked = B_FALSE;
>   
> -	/*
> -	 * On replacing the filter handle may change after after a successful
> -	 * replace operation.
> -	 */
> -	if (replacing) {
> -		rc = efx_mcdi_filter_op_add(enp, spec,
> -		    MC_CMD_FILTER_OP_IN_OP_REPLACE,
> -		    &eftp->eft_entry[ins_index].efe_handle);
> -	} else if (ef10_filter_is_exclusive(spec)) {
> -		rc = efx_mcdi_filter_op_add(enp, spec,
> -		    MC_CMD_FILTER_OP_IN_OP_INSERT,
> -		    &eftp->eft_entry[ins_index].efe_handle);
> -	} else {
> -		rc = efx_mcdi_filter_op_add(enp, spec,
> -		    MC_CMD_FILTER_OP_IN_OP_SUBSCRIBE,
> -		    &eftp->eft_entry[ins_index].efe_handle);
> -	}
> -
> +	rc = ef10_filter_add_execute_action(enp, saved_spec, spec,
> +	    overridden_spec, action, ins_index);
>   	if (rc != 0)
>   		goto fail4;
>   
> -	EFSYS_LOCK(enp->en_eslp, state);
> -	locked = B_TRUE;
> -
> -	if (replacing) {
> -		/* Update the fields that may differ */
> -		saved_spec->efs_priority = spec->efs_priority;
> -		saved_spec->efs_flags = spec->efs_flags;
> -		saved_spec->efs_rss_context = spec->efs_rss_context;
> -		saved_spec->efs_dmaq_id = spec->efs_dmaq_id;
> -	}
> -
> -	ef10_filter_set_entry_not_busy(eftp, ins_index);
> -
> -out_unlock:
> -
> -	EFSYS_UNLOCK(enp->en_eslp, state);
> -	locked = B_FALSE;
> -
>   	if (filter_id)
>   		*filter_id = ins_index;
>   
> +	EFSYS_LOCK(enp->en_eslp, state);
> +	ef10_filter_set_entry_not_busy(eftp, ins_index);
> +	EFSYS_UNLOCK(enp->en_eslp, state);
> +
>   	return (0);
>   
>   fail4:
>   	EFSYS_PROBE(fail4);
>   
> -	if (!replacing) {
> -		EFSYS_KMEM_FREE(enp->en_esip, sizeof (*spec), saved_spec);
> -		saved_spec = NULL;
> +	EFSYS_ASSERT(locked == B_FALSE);
> +	EFSYS_LOCK(enp->en_eslp, state);
> +
> +	if (action == EF10_FILTER_ADD_NEW) {
> +		EFSYS_KMEM_FREE(enp->en_esip, sizeof (*spec),
> +		    ef10_filter_entry_spec(eftp, ins_index));
> +		ef10_filter_set_entry(eftp, ins_index, NULL);
>   	}
> -	ef10_filter_set_entry_not_busy(eftp, ins_index);
> -	ef10_filter_set_entry(eftp, ins_index, NULL);
> +
> +	EFSYS_UNLOCK(enp->en_eslp, state);
> +
> +	if (overridden_spec != NULL)
> +		EFSYS_KMEM_FREE(enp->en_esip, sizeof (*spec), overridden_spec);
>   
>   fail3:
>   	EFSYS_PROBE(fail3);
>   
> +	EFSYS_ASSERT(locked == B_FALSE);
> +	EFSYS_LOCK(enp->en_eslp, state);
> +
> +	ef10_filter_set_entry_not_busy(eftp, ins_index);
> +
> +	EFSYS_UNLOCK(enp->en_eslp, state);
> +
>   fail2:
>   	EFSYS_PROBE(fail2);
>   
> @@ -779,11 +1001,11 @@ fail1:
>   ef10_filter_add(
>   	__in		efx_nic_t *enp,
>   	__inout		efx_filter_spec_t *spec,
> -	__in		boolean_t may_replace)
> +	__in		enum efx_filter_replacement_policy_e policy)
>   {
>   	efx_rc_t rc;
>   
> -	rc = ef10_filter_add_internal(enp, spec, may_replace, NULL);
> +	rc = ef10_filter_add_internal(enp, spec, policy, NULL);
>   	if (rc != 0)
>   		goto fail1;
>   
> @@ -795,11 +1017,15 @@ fail1:
>   	return (rc);
>   }
>   
> -
> +/*
> + * Delete a filter by index from the filter table with priority
> + * that is not higher than specified.
> + */
>   static	__checkReturn	efx_rc_t
>   ef10_filter_delete_internal(
>   	__in		efx_nic_t *enp,
> -	__in		uint32_t filter_id)
> +	__in		uint32_t filter_id,
> +	__in		efx_filter_priority_t priority)
>   {
>   	efx_rc_t rc;
>   	ef10_filter_table_t *table = enp->en_filter.ef_ef10_filter_table;
> @@ -821,7 +1047,8 @@ ef10_filter_delete_internal(
>   		EFSYS_LOCK(enp->en_eslp, state);
>   	}
>   	if ((spec = ef10_filter_entry_spec(table, filter_idx)) != NULL) {
> -		ef10_filter_set_entry_busy(table, filter_idx);
> +		if (spec->efs_priority <= priority)
> +			ef10_filter_set_entry_busy(table, filter_idx);
>   	}
>   	EFSYS_UNLOCK(enp->en_eslp, state);
>   
> @@ -830,32 +1057,54 @@ ef10_filter_delete_internal(
>   		goto fail1;
>   	}
>   
> -	/*
> -	 * Try to remove the hardware filter. This may fail if the MC has
> -	 * rebooted (which frees all hardware filter resources).
> -	 */
> -	if (ef10_filter_is_exclusive(spec)) {
> -		rc = efx_mcdi_filter_op_delete(enp,
> -		    MC_CMD_FILTER_OP_IN_OP_REMOVE,
> -		    &table->eft_entry[filter_idx].efe_handle);
> +	if (spec->efs_priority > priority) {
> +		/*
> +		 * Applied filter stays, but overridden filter is removed since
> +		 * next user request to delete the applied filter should not
> +		 * restore outdated filter.
> +		 */
> +		if (spec->efs_overridden_spec != NULL) {
> +			EFSYS_ASSERT(spec->efs_overridden_spec->efs_overridden_spec ==
> +			    NULL);
> +			EFSYS_KMEM_FREE(enp->en_esip, sizeof (*spec),
> +			    spec->efs_overridden_spec);
> +			spec->efs_overridden_spec = NULL;
> +		}
>   	} else {
> -		rc = efx_mcdi_filter_op_delete(enp,
> -		    MC_CMD_FILTER_OP_IN_OP_UNSUBSCRIBE,
> -		    &table->eft_entry[filter_idx].efe_handle);
> +		/*
> +		 * Try to remove the hardware filter or replace it with the
> +		 * saved automatic filter. This may fail if the MC has
> +		 * rebooted (which frees all hardware filter resources).
> +		 */
> +		if (spec->efs_overridden_spec != NULL) {
> +			rc = efx_mcdi_filter_op_add(enp,
> +			    spec->efs_overridden_spec,
> +			    MC_CMD_FILTER_OP_IN_OP_REPLACE,
> +			    &table->eft_entry[filter_idx].efe_handle);
> +		} else if (ef10_filter_is_exclusive(spec)) {
> +			rc = efx_mcdi_filter_op_delete(enp,
> +			    MC_CMD_FILTER_OP_IN_OP_REMOVE,
> +			    &table->eft_entry[filter_idx].efe_handle);
> +		} else {
> +			rc = efx_mcdi_filter_op_delete(enp,
> +			    MC_CMD_FILTER_OP_IN_OP_UNSUBSCRIBE,
> +			    &table->eft_entry[filter_idx].efe_handle);
> +		}
> +
> +		/* Free the software table entry */
> +		EFSYS_LOCK(enp->en_eslp, state);
> +		ef10_filter_set_entry_not_busy(table, filter_idx);
> +		ef10_filter_set_entry(table, filter_idx,
> +		    spec->efs_overridden_spec);
> +		EFSYS_UNLOCK(enp->en_eslp, state);
> +
> +		EFSYS_KMEM_FREE(enp->en_esip, sizeof (*spec), spec);
> +
> +		/* Check result of hardware filter removal */
> +		if (rc != 0)
> +			goto fail2;
>   	}
>   
> -	/* Free the software table entry */
> -	EFSYS_LOCK(enp->en_eslp, state);
> -	ef10_filter_set_entry_not_busy(table, filter_idx);
> -	ef10_filter_set_entry(table, filter_idx, NULL);
> -	EFSYS_UNLOCK(enp->en_eslp, state);
> -
> -	EFSYS_KMEM_FREE(enp->en_esip, sizeof (*spec), spec);
> -
> -	/* Check result of hardware filter removal */
> -	if (rc != 0)
> -		goto fail2;
> -
>   	return (0);
>   
>   fail2:
> @@ -867,6 +1116,25 @@ fail1:
>   	return (rc);
>   }
>   
> +static			void
> +ef10_filter_delete_auto(
> +	__in		efx_nic_t *enp,
> +	__in		uint32_t filter_id)
> +{
> +	ef10_filter_table_t *table = enp->en_filter.ef_ef10_filter_table;
> +	uint32_t filter_idx = filter_id % EFX_EF10_FILTER_TBL_ROWS;
> +
> +	/*
> +	 * AUTO_OLD flag is cleared since the auto filter that is to be removed
> +	 * may not be the filter at the specified index itself, but the filter
> +	 * that is overridden by it.
> +	 */
> +	ef10_filter_set_entry_not_auto_old(table, filter_idx);
> +
> +	(void) ef10_filter_delete_internal(enp, filter_idx,
> +	    EFX_FILTER_PRI_AUTO);
> +}
> +
>   	__checkReturn	efx_rc_t
>   ef10_filter_delete(
>   	__in		efx_nic_t *enp,
> @@ -906,7 +1174,7 @@ ef10_filter_delete(
>   	EFSYS_UNLOCK(enp->en_eslp, state);
>   	locked = B_FALSE;
>   
> -	rc = ef10_filter_delete_internal(enp, i);
> +	rc = ef10_filter_delete_internal(enp, i, EFX_FILTER_PRI_MANUAL);
>   	if (rc != 0)
>   		goto fail2;
>   
> @@ -1131,7 +1399,7 @@ ef10_filter_insert_unicast(
>   	if (rc != 0)
>   		goto fail1;
>   
> -	rc = ef10_filter_add_internal(enp, &spec, B_TRUE,
> +	rc = ef10_filter_add_internal(enp, &spec, EFX_FILTER_REPLACEMENT_NEVER,
>   	    &eftp->eft_unicst_filter_indexes[eftp->eft_unicst_filter_count]);
>   	if (rc != 0)
>   		goto fail2;
> @@ -1165,7 +1433,7 @@ ef10_filter_insert_all_unicast(
>   	rc = efx_filter_spec_set_uc_def(&spec);
>   	if (rc != 0)
>   		goto fail1;
> -	rc = ef10_filter_add_internal(enp, &spec, B_TRUE,
> +	rc = ef10_filter_add_internal(enp, &spec, EFX_FILTER_REPLACEMENT_NEVER,
>   	    &eftp->eft_unicst_filter_indexes[eftp->eft_unicst_filter_count]);
>   	if (rc != 0)
>   		goto fail2;
> @@ -1235,8 +1503,8 @@ ef10_filter_insert_multicast_list(
>   			}
>   		}
>   
> -		rc = ef10_filter_add_internal(enp, &spec, B_TRUE,
> -					    &filter_index);
> +		rc = ef10_filter_add_internal(enp, &spec,
> +		    EFX_FILTER_REPLACEMENT_NEVER, &filter_index);
>   
>   		if (rc == 0) {
>   			eftp->eft_mulcst_filter_indexes[filter_count] =
> @@ -1263,8 +1531,8 @@ ef10_filter_insert_multicast_list(
>   			goto rollback;
>   		}
>   
> -		rc = ef10_filter_add_internal(enp, &spec, B_TRUE,
> -					    &filter_index);
> +		rc = ef10_filter_add_internal(enp, &spec,
> +		    EFX_FILTER_REPLACEMENT_NEVER, &filter_index);
>   
>   		if (rc == 0) {
>   			eftp->eft_mulcst_filter_indexes[filter_count] =
> @@ -1285,7 +1553,7 @@ rollback:
>   	/* Remove any filters we have inserted */
>   	i = filter_count;
>   	while (i--) {
> -		(void) ef10_filter_delete_internal(enp,
> +		ef10_filter_delete_auto(enp,
>   		    eftp->eft_mulcst_filter_indexes[i]);
>   	}
>   	eftp->eft_mulcst_filter_count = 0;
> @@ -1313,7 +1581,7 @@ ef10_filter_insert_all_multicast(
>   	if (rc != 0)
>   		goto fail1;
>   
> -	rc = ef10_filter_add_internal(enp, &spec, B_TRUE,
> +	rc = ef10_filter_add_internal(enp, &spec, EFX_FILTER_REPLACEMENT_NEVER,
>   	    &eftp->eft_mulcst_filter_indexes[0]);
>   	if (rc != 0)
>   		goto fail2;
> @@ -1416,8 +1684,9 @@ ef10_filter_insert_encap_filters(
>   		if (rc != 0)
>   			goto fail1;
>   
> -		rc = ef10_filter_add_internal(enp, &spec, B_TRUE,
> -			    &table->eft_encap_filter_indexes[
> +		rc = ef10_filter_add_internal(enp, &spec,
> +		    EFX_FILTER_REPLACEMENT_NEVER,
> +		    &table->eft_encap_filter_indexes[
>   				    table->eft_encap_filter_count]);
>   		if (rc != 0) {
>   			if (rc != EACCES)
> @@ -1446,7 +1715,7 @@ ef10_filter_remove_old(
>   
>   	for (i = 0; i < EFX_ARRAY_SIZE(table->eft_entry); i++) {
>   		if (ef10_filter_entry_is_auto_old(table, i)) {
> -			(void) ef10_filter_delete_internal(enp, i);
> +			ef10_filter_delete_auto(enp, i);
>   		}
>   	}
>   }
> @@ -1521,19 +1790,19 @@ ef10_filter_reconfigure(
>   		 * has rebooted, which removes hardware filters).
>   		 */
>   		for (i = 0; i < table->eft_unicst_filter_count; i++) {
> -			(void) ef10_filter_delete_internal(enp,
> +			ef10_filter_delete_auto(enp,
>   					table->eft_unicst_filter_indexes[i]);
>   		}
>   		table->eft_unicst_filter_count = 0;
>   
>   		for (i = 0; i < table->eft_mulcst_filter_count; i++) {
> -			(void) ef10_filter_delete_internal(enp,
> +			ef10_filter_delete_auto(enp,
>   					table->eft_mulcst_filter_indexes[i]);
>   		}
>   		table->eft_mulcst_filter_count = 0;
>   
>   		for (i = 0; i < table->eft_encap_filter_count; i++) {
> -			(void) ef10_filter_delete_internal(enp,
> +			ef10_filter_delete_auto(enp,
>   					table->eft_encap_filter_indexes[i]);
>   		}
>   		table->eft_encap_filter_count = 0;
> diff --git a/drivers/net/sfc/base/ef10_impl.h b/drivers/net/sfc/base/ef10_impl.h
> index 7a00047829..67abf3b853 100644
> --- a/drivers/net/sfc/base/ef10_impl.h
> +++ b/drivers/net/sfc/base/ef10_impl.h
> @@ -1079,6 +1079,8 @@ ef10_rx_fini(
>   
>   #if EFSYS_OPT_FILTER
>   
> +enum efx_filter_replacement_policy_e;
> +
>   typedef struct ef10_filter_handle_s {
>   	uint32_t	efh_lo;
>   	uint32_t	efh_hi;
> @@ -1148,7 +1150,7 @@ ef10_filter_restore(
>   ef10_filter_add(
>   	__in		efx_nic_t *enp,
>   	__inout		efx_filter_spec_t *spec,
> -	__in		boolean_t may_replace);
> +	__in		enum efx_filter_replacement_policy_e policy);
>   
>   	__checkReturn	efx_rc_t
>   ef10_filter_delete(
> diff --git a/drivers/net/sfc/base/efx.h b/drivers/net/sfc/base/efx.h
> index c609c700fa..d94d3c02f7 100644
> --- a/drivers/net/sfc/base/efx.h
> +++ b/drivers/net/sfc/base/efx.h
> @@ -2949,6 +2949,7 @@ typedef uint8_t efx_filter_flags_t;
>   
>   typedef uint32_t efx_filter_match_flags_t;
>   
> +/* Filter priority from lowest to highest */
>   typedef enum efx_filter_priority_s {
>   	EFX_FILTER_PRI_AUTO = 0,	/* Automatic filter based on device
>   					 * address list or hardware
> @@ -2956,6 +2957,7 @@ typedef enum efx_filter_priority_s {
>   					 * by the filter implementation for
>   					 * each NIC type. */
>   	EFX_FILTER_PRI_MANUAL,		/* Manually configured filter */
> +	EFX_FILTER_NPRI,
>   } efx_filter_priority_t;
>   
>   /*
> @@ -2970,6 +2972,11 @@ typedef struct efx_filter_spec_s {
>   	uint16_t			efs_dmaq_id;
>   	uint32_t			efs_rss_context;
>   	uint32_t			efs_mark;
> +	/*
> +	 * Saved lower-priority filter. If it is set, it is restored on
> +	 * filter delete operation.
> +	 */
> +	struct efx_filter_spec_s	*efs_overridden_spec;
>   	/* Fields below here are hashed for software filter lookup */
>   	uint16_t			efs_outer_vid;
>   	uint16_t			efs_inner_vid;
> diff --git a/drivers/net/sfc/base/efx_filter.c b/drivers/net/sfc/base/efx_filter.c
> index 36332a2801..9949d05bb3 100644
> --- a/drivers/net/sfc/base/efx_filter.c
> +++ b/drivers/net/sfc/base/efx_filter.c
> @@ -28,7 +28,7 @@ static	__checkReturn	efx_rc_t
>   siena_filter_add(
>   	__in		efx_nic_t *enp,
>   	__inout		efx_filter_spec_t *spec,
> -	__in		boolean_t may_replace);
> +	__in		efx_filter_replacement_policy_t policy);
>   
>   static	__checkReturn	efx_rc_t
>   siena_filter_delete(
> @@ -98,7 +98,8 @@ efx_filter_insert(
>   		goto fail3;
>   	}
>   
> -	return (efop->efo_add(enp, spec, B_FALSE));
> +	return (efop->efo_add(enp, spec,
> +	    EFX_FILTER_REPLACEMENT_HIGHER_PRIORITY));
>   
>   fail3:
>   	EFSYS_PROBE(fail3);
> @@ -1444,7 +1445,7 @@ static	 __checkReturn	efx_rc_t
>   siena_filter_add(
>   	__in		efx_nic_t *enp,
>   	__inout		efx_filter_spec_t *spec,
> -	__in		boolean_t may_replace)
> +	__in		efx_filter_replacement_policy_t policy)
>   {
>   	efx_rc_t rc;
>   	siena_filter_spec_t sf_spec;
> @@ -1485,9 +1486,17 @@ siena_filter_add(
>   	saved_sf_spec = &sftp->sft_spec[filter_idx];
>   
>   	if (siena_filter_test_used(sftp, filter_idx)) {
> -		if (may_replace == B_FALSE) {
> +		/* All Siena filter are considered the same priority */
> +		switch (policy) {
> +		case EFX_FILTER_REPLACEMENT_NEVER:
> +		case EFX_FILTER_REPLACEMENT_HIGHER_PRIORITY:
>   			rc = EEXIST;
>   			goto fail4;
> +		case EFX_FILTER_REPLACEMENT_HIGHER_OR_EQUAL_PRIORITY:
> +			break;
> +		default:
> +			EFSYS_ASSERT(0);
> +			break;
>   		}
>   	}
>   	siena_filter_set_used(sftp, filter_idx);
> diff --git a/drivers/net/sfc/base/efx_impl.h b/drivers/net/sfc/base/efx_impl.h
> index 85d984f651..9755f4dfd2 100644
> --- a/drivers/net/sfc/base/efx_impl.h
> +++ b/drivers/net/sfc/base/efx_impl.h
> @@ -246,12 +246,31 @@ typedef struct efx_phy_ops_s {
>   } efx_phy_ops_t;
>   
>   #if EFSYS_OPT_FILTER
> +
> +/*
> + * Policy for replacing existing filter when inserting a new one.
> + * Note that all policies allow for storing the new lower priority
> + * filters as overridden by existing higher priority ones. It is needed
> + * to restore the lower priority filters on higher priority ones removal.
> + */
> +typedef enum efx_filter_replacement_policy_e {
> +	/* Cannot replace existing filter */
> +	EFX_FILTER_REPLACEMENT_NEVER,
> +	/* Higher priority filters can replace lower priotiry ones */
> +	EFX_FILTER_REPLACEMENT_HIGHER_PRIORITY,
> +	/*
> +	 * Higher priority filters can replace lower priority ones and
> +	 * equal priority filters can replace each other.
> +	 */
> +	EFX_FILTER_REPLACEMENT_HIGHER_OR_EQUAL_PRIORITY,
> +} efx_filter_replacement_policy_t;
> +
>   typedef struct efx_filter_ops_s {
>   	efx_rc_t	(*efo_init)(efx_nic_t *);
>   	void		(*efo_fini)(efx_nic_t *);
>   	efx_rc_t	(*efo_restore)(efx_nic_t *);
>   	efx_rc_t	(*efo_add)(efx_nic_t *, efx_filter_spec_t *,
> -				   boolean_t may_replace);
> +				   efx_filter_replacement_policy_t policy);
>   	efx_rc_t	(*efo_delete)(efx_nic_t *, efx_filter_spec_t *);
>   	efx_rc_t	(*efo_supported_filters)(efx_nic_t *, uint32_t *,
>   				   size_t, size_t *);

-- 
Best regards,
Igor


^ permalink raw reply	[flat|nested] 371+ messages in thread

* Re: [dpdk-stable] patch 'net/sfc/base: handle manual and auto filter clashes in EF10' has been queued to stable release 19.11.3
  2020-05-20  9:53   ` Igor Romanov
@ 2020-05-20 11:57     ` Luca Boccassi
  2020-05-20 12:12       ` Igor Romanov
  0 siblings, 1 reply; 371+ messages in thread
From: Luca Boccassi @ 2020-05-20 11:57 UTC (permalink / raw)
  To: Igor Romanov, Igor Romanov; +Cc: Andrew Rybchenko, dpdk stable

The attached change does not seem to be present in master?

On Wed, 2020-05-20 at 12:53 +0300, Igor Romanov wrote:
> Hi!
> 
> The patch has an issue that is fixed in the attached patch.
> 
> On 5/19/20 3:53 PM, luca.boccassi@gmail.com wrote:
> > Hi,
> > 
> > FYI, your patch has been queued to stable release 19.11.3
> > 
> > Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> > It will be pushed if I get no objections before 05/21/20. So please
> > shout if anyone has objections.
> > 
> > Also note that after the patch there's a diff of the upstream commit vs the
> > patch applied to the branch. This will indicate if there was any rebasing
> > needed to apply to the stable branch. If there were code changes for rebasing
> > (ie: not only metadata diffs), please double check that the rebase was
> > correctly done.
> > 
> > Thanks.
> > 
> > Luca Boccassi
> > 
> > ---
> > > From 8ea2ea8fe40c8a13bca536bcb4683d9225cd0ea2 Mon Sep 17 00:00:00 2001
> > From: Igor Romanov <igor.romanov@oktetlabs.ru>
> > Date: Tue, 10 Mar 2020 09:48:39 +0000
> > Subject: [PATCH] net/sfc/base: handle manual and auto filter clashes in EF10
> > 
> > [ upstream commit 585c22edb29cc3cfdb3628c41effd8ff3b75f224 ]
> > 
> > Make user filters a priority in EF10 datapath. When a manual
> > filter with a specification that is equal to an existing auto
> > filter is inserted, the manual filter:
> > - replaces auto filter if the specification is exclusive;
> > - is inserted along existing auto filter otherwise;
> > 
> > In the first case the auto filter that was replaced is saved.
> > This saved filter can be updated on filter reconfiguration and
> > is restored on the manual filter removal.
> > 
> > Fixes: e7cd430c864f ("net/sfc/base: import SFN7xxx family support")
> > 
> > Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
> > Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
> > ---
> >   drivers/net/sfc/base/ef10_filter.c | 519 ++++++++++++++++++++++-------
> >   drivers/net/sfc/base/ef10_impl.h   |   4 +-
> >   drivers/net/sfc/base/efx.h         |   7 +
> >   drivers/net/sfc/base/efx_filter.c  |  17 +-
> >   drivers/net/sfc/base/efx_impl.h    |  21 +-
> >   5 files changed, 437 insertions(+), 131 deletions(-)
> > 
> > diff --git a/drivers/net/sfc/base/ef10_filter.c b/drivers/net/sfc/base/ef10_filter.c
> > index 5578765ab3..12802a3d13 100644
> > --- a/drivers/net/sfc/base/ef10_filter.c
> > +++ b/drivers/net/sfc/base/ef10_filter.c
> > @@ -590,6 +590,231 @@ fail1:
> >   	return (rc);
> >   }
> >   
> > +enum ef10_filter_add_action_e {
> > +	/* Insert a new filter */
> > +	EF10_FILTER_ADD_NEW,
> > +	/*
> > +	 * Replace old filter with a new, overriding the old one
> > +	 * if it has lower priority.
> > +	 */
> > +	EF10_FILTER_ADD_REPLACE,
> > +	/* Store new, lower priority filter as overridden by old filter */
> > +	EF10_FILTER_ADD_STORE,
> > +	/* Special case for AUTO filters, remove AUTO_OLD flag */
> > +	EF10_FILTER_ADD_REFRESH,
> > +};
> > +
> > +static	__checkReturn	efx_rc_t
> > +ef10_filter_add_lookup_equal_spec(
> > +	__in		efx_filter_spec_t *spec,
> > +	__in		efx_filter_spec_t *probe_spec,
> > +	__in		efx_filter_replacement_policy_t policy,
> > +	__out		boolean_t *found)
> > +{
> > +	efx_rc_t rc;
> > +
> > +	/* Refreshing AUTO filter */
> > +	if (spec->efs_priority == EFX_FILTER_PRI_AUTO &&
> > +	    probe_spec->efs_priority == EFX_FILTER_PRI_AUTO) {
> > +		*found = B_TRUE;
> > +		return (0);
> > +	}
> > +
> > +	/*
> > +	 * With exclusive filters, higher priority ones
> > +	 * override lower priority ones, and lower priority
> > +	 * ones are stored in case the higher priority one
> > +	 * is removed.
> > +	 */
> > +	if (ef10_filter_is_exclusive(spec)) {
> > +		switch (policy) {
> > +		case EFX_FILTER_REPLACEMENT_HIGHER_OR_EQUAL_PRIORITY:
> > +			if (spec->efs_priority == probe_spec->efs_priority) {
> > +				*found = B_TRUE;
> > +				break;
> > +			}
> > +			/* Fall-through */
> > +		case EFX_FILTER_REPLACEMENT_HIGHER_PRIORITY:
> > +			if (spec->efs_priority > probe_spec->efs_priority) {
> > +				*found = B_TRUE;
> > +				break;
> > +			}
> > +			/* Fall-through */
> > +		case EFX_FILTER_REPLACEMENT_NEVER:
> > +			/*
> > +			 * Lower priority filter needs to be
> > +			 * stored. It does *not* replace the
> > +			 * old one. That is why EEXIST is not
> > +			 * returned in that case.
> > +			 */
> > +			if (spec->efs_priority < probe_spec->efs_priority) {
> > +				*found = B_TRUE;
> > +				break;
> > +			} else {
> > +				rc = EEXIST;
> > +				goto fail1;
> > +			}
> > +		default:
> > +			EFSYS_ASSERT(0);
> > +			rc = EEXIST;
> > +			goto fail2;
> > +		}
> > +	} else {
> > +		*found = B_FALSE;
> > +	}
> > +
> > +	return (0);
> > +
> > +fail2:
> > +	EFSYS_PROBE(fail2);
> > +
> > +fail1:
> > +	EFSYS_PROBE1(fail1, efx_rc_t, rc);
> > +
> > +	return (rc);
> > +}
> > +
> > +
> > +static			void
> > +ef10_filter_add_select_action(
> > +	__in		efx_filter_spec_t *saved_spec,
> > +	__in		efx_filter_spec_t *spec,
> > +	__out		enum ef10_filter_add_action_e *action,
> > +	__out		efx_filter_spec_t **overridden_spec)
> > +{
> > +	efx_filter_spec_t *overridden = NULL;
> > +
> > +	if (saved_spec == NULL) {
> > +		*action = EF10_FILTER_ADD_NEW;
> > +	} else if (ef10_filter_is_exclusive(spec) == B_FALSE) {
> > +		/*
> > +		 * Non-exclusive filters are always stored in separate entries
> > +		 * in the table. The only case involving a saved spec is
> > +		 * refreshing an AUTO filter.
> > +		 */
> > +		EFSYS_ASSERT(saved_spec->efs_overridden_spec == NULL);
> > +		EFSYS_ASSERT(spec->efs_priority == EFX_FILTER_PRI_AUTO);
> > +		EFSYS_ASSERT(saved_spec->efs_priority == EFX_FILTER_PRI_AUTO);
> > +		*action = EF10_FILTER_ADD_REFRESH;
> > +	} else {
> > +		/* Exclusive filters stored in the same entry */
> > +		if (spec->efs_priority > saved_spec->efs_priority) {
> > +			/*
> > +			 * Insert a high priority filter over a lower priority
> > +			 * one. Only two priority levels are implemented, so
> > +			 * there must not already be an overridden filter.
> > +			 */
> > +			EFX_STATIC_ASSERT(EFX_FILTER_NPRI == 2);
> > +			EFSYS_ASSERT(saved_spec->efs_overridden_spec == NULL);
> > +			overridden = saved_spec;
> > +			*action = EF10_FILTER_ADD_REPLACE;
> > +		} else if (spec->efs_priority == saved_spec->efs_priority) {
> > +			/* Replace in-place or refresh an existing filter */
> > +			if (spec->efs_priority == EFX_FILTER_PRI_AUTO)
> > +				*action = EF10_FILTER_ADD_REFRESH;
> > +			else
> > +				*action = EF10_FILTER_ADD_REPLACE;
> > +		} else {
> > +			/*
> > +			 * Insert a lower priority filter, storing it in case
> > +			 * the higher priority filter is removed.
> > +			 *
> > +			 * Currently there are only two priority levels, so this
> > +			 * must be an AUTO filter.
> > +			 */
> > +			EFX_STATIC_ASSERT(EFX_FILTER_NPRI == 2);
> > +			EFSYS_ASSERT(spec->efs_priority == EFX_FILTER_PRI_AUTO);
> > +			if (saved_spec->efs_overridden_spec != NULL) {
> > +				*action = EF10_FILTER_ADD_REFRESH;
> > +			} else {
> > +				overridden = spec;
> > +				*action = EF10_FILTER_ADD_STORE;
> > +			}
> > +		}
> > +	}
> > +
> > +	*overridden_spec = overridden;
> > +}
> > +
> > +static	__checkReturn	efx_rc_t
> > +ef10_filter_add_execute_action(
> > +	__in		efx_nic_t *enp,
> > +	__in		efx_filter_spec_t *saved_spec,
> > +	__in		efx_filter_spec_t *spec,
> > +	__in		efx_filter_spec_t *overridden_spec,
> > +	__in		enum ef10_filter_add_action_e action,
> > +	__in		int ins_index)
> > +{
> > +	ef10_filter_table_t *eftp = enp->en_filter.ef_ef10_filter_table;
> > +	efsys_lock_state_t state;
> > +	efx_rc_t rc;
> > +
> > +	EFSYS_LOCK(enp->en_eslp, state);
> > +
> > +	if (action == EF10_FILTER_ADD_REFRESH) {
> > +		ef10_filter_set_entry_not_auto_old(eftp, ins_index);
> > +		goto out_unlock;
> > +	} else if (action == EF10_FILTER_ADD_STORE) {
> > +		EFSYS_ASSERT(overridden_spec != NULL);
> > +		saved_spec->efs_overridden_spec = overridden_spec;
> > +		goto out_unlock;
> > +	}
> > +
> > +	EFSYS_UNLOCK(enp->en_eslp, state);
> > +
> > +	switch (action) {
> > +	case EF10_FILTER_ADD_REPLACE:
> > +		/*
> > +		 * On replacing the filter handle may change after a
> > +		 * successful replace operation.
> > +		 */
> > +		rc = efx_mcdi_filter_op_add(enp, spec,
> > +		    MC_CMD_FILTER_OP_IN_OP_REPLACE,
> > +		    &eftp->eft_entry[ins_index].efe_handle);
> > +		break;
> > +	case EF10_FILTER_ADD_NEW:
> > +		if (ef10_filter_is_exclusive(spec)) {
> > +			rc = efx_mcdi_filter_op_add(enp, spec,
> > +			    MC_CMD_FILTER_OP_IN_OP_INSERT,
> > +			    &eftp->eft_entry[ins_index].efe_handle);
> > +		} else {
> > +			rc = efx_mcdi_filter_op_add(enp, spec,
> > +			    MC_CMD_FILTER_OP_IN_OP_SUBSCRIBE,
> > +			    &eftp->eft_entry[ins_index].efe_handle);
> > +		}
> > +		break;
> > +	default:
> > +		rc = EINVAL;
> > +		EFSYS_ASSERT(0);
> > +		break;
> > +	}
> > +	if (rc != 0)
> > +		goto fail1;
> > +
> > +	EFSYS_LOCK(enp->en_eslp, state);
> > +
> > +	if (action == EF10_FILTER_ADD_REPLACE) {
> > +		/* Update the fields that may differ */
> > +		saved_spec->efs_priority = spec->efs_priority;
> > +		saved_spec->efs_flags = spec->efs_flags;
> > +		saved_spec->efs_rss_context = spec->efs_rss_context;
> > +		saved_spec->efs_dmaq_id = spec->efs_dmaq_id;
> > +
> > +		if (overridden_spec != NULL)
> > +			saved_spec->efs_overridden_spec = overridden_spec;
> > +	}
> > +
> > +out_unlock:
> > +	EFSYS_UNLOCK(enp->en_eslp, state);
> > +
> > +	return (0);
> > +
> > +fail1:
> > +	EFSYS_PROBE1(fail1, efx_rc_t, rc);
> > +
> > +	return (rc);
> > +}
> > +
> >   /*
> >    * An arbitrary search limit for the software hash table. As per the linux net
> >    * driver.
> > @@ -600,22 +825,24 @@ static	__checkReturn	efx_rc_t
> >   ef10_filter_add_internal(
> >   	__in		efx_nic_t *enp,
> >   	__inout		efx_filter_spec_t *spec,
> > -	__in		boolean_t may_replace,
> > +	__in		efx_filter_replacement_policy_t policy,
> >   	__out_opt	uint32_t *filter_id)
> >   {
> >   	efx_rc_t rc;
> >   	ef10_filter_table_t *eftp = enp->en_filter.ef_ef10_filter_table;
> > +	enum ef10_filter_add_action_e action;
> > +	efx_filter_spec_t *overridden_spec = NULL;
> >   	efx_filter_spec_t *saved_spec;
> >   	uint32_t hash;
> >   	unsigned int depth;
> >   	int ins_index;
> > -	boolean_t replacing = B_FALSE;
> > -	unsigned int i;
> >   	efsys_lock_state_t state;
> >   	boolean_t locked = B_FALSE;
> >   
> >   	EFSYS_ASSERT(EFX_FAMILY_IS_EF10(enp));
> >   
> > +	EFSYS_ASSERT(spec->efs_overridden_spec == NULL);
> > +
> >   	hash = ef10_filter_hash(spec);
> >   
> >   	/*
> > @@ -635,35 +862,33 @@ retry:
> >   	ins_index = -1;
> >   
> >   	for (depth = 1; depth <= EF10_FILTER_SEARCH_LIMIT; depth++) {
> > -		i = (hash + depth) & (EFX_EF10_FILTER_TBL_ROWS - 1);
> > -		saved_spec = ef10_filter_entry_spec(eftp, i);
> > +		unsigned int probe_index;
> > +		efx_filter_spec_t *probe_spec;
> >   
> > -		if (saved_spec == NULL) {
> > +		probe_index = (hash + depth) & (EFX_EF10_FILTER_TBL_ROWS - 1);
> > +		probe_spec = ef10_filter_entry_spec(eftp, probe_index);
> > +
> > +		if (probe_spec == NULL) {
> >   			if (ins_index < 0)
> > -				ins_index = i;
> > -		} else if (ef10_filter_equal(spec, saved_spec)) {
> > -			if (ef10_filter_entry_is_busy(eftp, i)) {
> > +				ins_index = probe_index;
> > +		} else if (ef10_filter_equal(spec, probe_spec)) {
> > +			boolean_t found;
> > +
> > +			if (ef10_filter_entry_is_busy(eftp, probe_index)) {
> >   				EFSYS_UNLOCK(enp->en_eslp, state);
> >   				locked = B_FALSE;
> >   				goto retry;
> >   			}
> >   
> > -			if (saved_spec->efs_priority == EFX_FILTER_PRI_AUTO) {
> > -				ins_index = i;
> > -				goto found;
> > -			}
> > +			rc = ef10_filter_add_lookup_equal_spec(spec,
> > +			    probe_spec, policy, &found);
> > +			if (rc != 0)
> > +				goto fail1;
> >   
> > -			if (ef10_filter_is_exclusive(spec)) {
> > -				if (may_replace) {
> > -					ins_index = i;
> > -					goto found;
> > -				} else {
> > -					rc = EEXIST;
> > -					goto fail1;
> > -				}
> > +			if (found != B_FALSE) {
> > +				ins_index = probe_index;
> > +				break;
> >   			}
> > -
> > -			/* Leave existing */
> >   		}
> >   	}
> >   
> > @@ -676,93 +901,90 @@ retry:
> >   		goto fail2;
> >   	}
> >   
> > -found:
> >   	/*
> > -	 * Create a software table entry if necessary, and mark it
> > -	 * busy.  We might yet fail to insert, but any attempt to
> > -	 * insert a conflicting filter while we're waiting for the
> > -	 * firmware must find the busy entry.
> > +	 * Mark software table entry busy. We might yet fail to insert,
> > +	 * but any attempt to insert a conflicting filter while we're
> > +	 * waiting for the firmware must find the busy entry.
> >   	 */
> > +	ef10_filter_set_entry_busy(eftp, ins_index);
> > +
> >   	saved_spec = ef10_filter_entry_spec(eftp, ins_index);
> > -	if (saved_spec) {
> > -		if (saved_spec->efs_priority == EFX_FILTER_PRI_AUTO) {
> > -			/* This is a filter we are refreshing */
> > -			ef10_filter_set_entry_not_auto_old(eftp, ins_index);
> > -			goto out_unlock;
> > +	ef10_filter_add_select_action(saved_spec, spec, &action,
> > +	    &overridden_spec);
> >   
> > -		}
> > -		replacing = B_TRUE;
> > -	} else {
> > -		EFSYS_KMEM_ALLOC(enp->en_esip, sizeof (*spec), saved_spec);
> > -		if (!saved_spec) {
> > +	/*
> > +	 * Allocate a new filter if found entry is empty or
> > +	 * a filter should be overridden.
> > +	 */
> > +	if (overridden_spec != NULL || saved_spec == NULL) {
> > +		efx_filter_spec_t *new_spec;
> > +
> > +		EFSYS_UNLOCK(enp->en_eslp, state);
> > +		locked = B_FALSE;
> > +
> > +		EFSYS_KMEM_ALLOC(enp->en_esip, sizeof (*new_spec), new_spec);
> > +		if (new_spec == NULL) {
> >   			rc = ENOMEM;
> > +			overridden_spec = NULL;
> >   			goto fail3;
> >   		}
> > -		*saved_spec = *spec;
> > -		ef10_filter_set_entry(eftp, ins_index, saved_spec);
> > +
> > +		EFSYS_LOCK(enp->en_eslp, state);
> > +		locked = B_TRUE;
> > +
> > +		if (saved_spec == NULL) {
> > +			*new_spec = *spec;
> > +			ef10_filter_set_entry(eftp, ins_index, new_spec);
> > +		} else {
> > +			*new_spec = *overridden_spec;
> > +			overridden_spec = new_spec;
> > +		}
> >   	}
> > -	ef10_filter_set_entry_busy(eftp, ins_index);
> >   
> >   	EFSYS_UNLOCK(enp->en_eslp, state);
> >   	locked = B_FALSE;
> >   
> > -	/*
> > -	 * On replacing the filter handle may change after after a successful
> > -	 * replace operation.
> > -	 */
> > -	if (replacing) {
> > -		rc = efx_mcdi_filter_op_add(enp, spec,
> > -		    MC_CMD_FILTER_OP_IN_OP_REPLACE,
> > -		    &eftp->eft_entry[ins_index].efe_handle);
> > -	} else if (ef10_filter_is_exclusive(spec)) {
> > -		rc = efx_mcdi_filter_op_add(enp, spec,
> > -		    MC_CMD_FILTER_OP_IN_OP_INSERT,
> > -		    &eftp->eft_entry[ins_index].efe_handle);
> > -	} else {
> > -		rc = efx_mcdi_filter_op_add(enp, spec,
> > -		    MC_CMD_FILTER_OP_IN_OP_SUBSCRIBE,
> > -		    &eftp->eft_entry[ins_index].efe_handle);
> > -	}
> > -
> > +	rc = ef10_filter_add_execute_action(enp, saved_spec, spec,
> > +	    overridden_spec, action, ins_index);
> >   	if (rc != 0)
> >   		goto fail4;
> >   
> > -	EFSYS_LOCK(enp->en_eslp, state);
> > -	locked = B_TRUE;
> > -
> > -	if (replacing) {
> > -		/* Update the fields that may differ */
> > -		saved_spec->efs_priority = spec->efs_priority;
> > -		saved_spec->efs_flags = spec->efs_flags;
> > -		saved_spec->efs_rss_context = spec->efs_rss_context;
> > -		saved_spec->efs_dmaq_id = spec->efs_dmaq_id;
> > -	}
> > -
> > -	ef10_filter_set_entry_not_busy(eftp, ins_index);
> > -
> > -out_unlock:
> > -
> > -	EFSYS_UNLOCK(enp->en_eslp, state);
> > -	locked = B_FALSE;
> > -
> >   	if (filter_id)
> >   		*filter_id = ins_index;
> >   
> > +	EFSYS_LOCK(enp->en_eslp, state);
> > +	ef10_filter_set_entry_not_busy(eftp, ins_index);
> > +	EFSYS_UNLOCK(enp->en_eslp, state);
> > +
> >   	return (0);
> >   
> >   fail4:
> >   	EFSYS_PROBE(fail4);
> >   
> > -	if (!replacing) {
> > -		EFSYS_KMEM_FREE(enp->en_esip, sizeof (*spec), saved_spec);
> > -		saved_spec = NULL;
> > +	EFSYS_ASSERT(locked == B_FALSE);
> > +	EFSYS_LOCK(enp->en_eslp, state);
> > +
> > +	if (action == EF10_FILTER_ADD_NEW) {
> > +		EFSYS_KMEM_FREE(enp->en_esip, sizeof (*spec),
> > +		    ef10_filter_entry_spec(eftp, ins_index));
> > +		ef10_filter_set_entry(eftp, ins_index, NULL);
> >   	}
> > -	ef10_filter_set_entry_not_busy(eftp, ins_index);
> > -	ef10_filter_set_entry(eftp, ins_index, NULL);
> > +
> > +	EFSYS_UNLOCK(enp->en_eslp, state);
> > +
> > +	if (overridden_spec != NULL)
> > +		EFSYS_KMEM_FREE(enp->en_esip, sizeof (*spec), overridden_spec);
> >   
> >   fail3:
> >   	EFSYS_PROBE(fail3);
> >   
> > +	EFSYS_ASSERT(locked == B_FALSE);
> > +	EFSYS_LOCK(enp->en_eslp, state);
> > +
> > +	ef10_filter_set_entry_not_busy(eftp, ins_index);
> > +
> > +	EFSYS_UNLOCK(enp->en_eslp, state);
> > +
> >   fail2:
> >   	EFSYS_PROBE(fail2);
> >   
> > @@ -779,11 +1001,11 @@ fail1:
> >   ef10_filter_add(
> >   	__in		efx_nic_t *enp,
> >   	__inout		efx_filter_spec_t *spec,
> > -	__in		boolean_t may_replace)
> > +	__in		enum efx_filter_replacement_policy_e policy)
> >   {
> >   	efx_rc_t rc;
> >   
> > -	rc = ef10_filter_add_internal(enp, spec, may_replace, NULL);
> > +	rc = ef10_filter_add_internal(enp, spec, policy, NULL);
> >   	if (rc != 0)
> >   		goto fail1;
> >   
> > @@ -795,11 +1017,15 @@ fail1:
> >   	return (rc);
> >   }
> >   
> > -
> > +/*
> > + * Delete a filter by index from the filter table with priority
> > + * that is not higher than specified.
> > + */
> >   static	__checkReturn	efx_rc_t
> >   ef10_filter_delete_internal(
> >   	__in		efx_nic_t *enp,
> > -	__in		uint32_t filter_id)
> > +	__in		uint32_t filter_id,
> > +	__in		efx_filter_priority_t priority)
> >   {
> >   	efx_rc_t rc;
> >   	ef10_filter_table_t *table = enp->en_filter.ef_ef10_filter_table;
> > @@ -821,7 +1047,8 @@ ef10_filter_delete_internal(
> >   		EFSYS_LOCK(enp->en_eslp, state);
> >   	}
> >   	if ((spec = ef10_filter_entry_spec(table, filter_idx)) != NULL) {
> > -		ef10_filter_set_entry_busy(table, filter_idx);
> > +		if (spec->efs_priority <= priority)
> > +			ef10_filter_set_entry_busy(table, filter_idx);
> >   	}
> >   	EFSYS_UNLOCK(enp->en_eslp, state);
> >   
> > @@ -830,32 +1057,54 @@ ef10_filter_delete_internal(
> >   		goto fail1;
> >   	}
> >   
> > -	/*
> > -	 * Try to remove the hardware filter. This may fail if the MC has
> > -	 * rebooted (which frees all hardware filter resources).
> > -	 */
> > -	if (ef10_filter_is_exclusive(spec)) {
> > -		rc = efx_mcdi_filter_op_delete(enp,
> > -		    MC_CMD_FILTER_OP_IN_OP_REMOVE,
> > -		    &table->eft_entry[filter_idx].efe_handle);
> > +	if (spec->efs_priority > priority) {
> > +		/*
> > +		 * Applied filter stays, but overridden filter is removed since
> > +		 * next user request to delete the applied filter should not
> > +		 * restore outdated filter.
> > +		 */
> > +		if (spec->efs_overridden_spec != NULL) {
> > +			EFSYS_ASSERT(spec->efs_overridden_spec->efs_overridden_spec ==
> > +			    NULL);
> > +			EFSYS_KMEM_FREE(enp->en_esip, sizeof (*spec),
> > +			    spec->efs_overridden_spec);
> > +			spec->efs_overridden_spec = NULL;
> > +		}
> >   	} else {
> > -		rc = efx_mcdi_filter_op_delete(enp,
> > -		    MC_CMD_FILTER_OP_IN_OP_UNSUBSCRIBE,
> > -		    &table->eft_entry[filter_idx].efe_handle);
> > +		/*
> > +		 * Try to remove the hardware filter or replace it with the
> > +		 * saved automatic filter. This may fail if the MC has
> > +		 * rebooted (which frees all hardware filter resources).
> > +		 */
> > +		if (spec->efs_overridden_spec != NULL) {
> > +			rc = efx_mcdi_filter_op_add(enp,
> > +			    spec->efs_overridden_spec,
> > +			    MC_CMD_FILTER_OP_IN_OP_REPLACE,
> > +			    &table->eft_entry[filter_idx].efe_handle);
> > +		} else if (ef10_filter_is_exclusive(spec)) {
> > +			rc = efx_mcdi_filter_op_delete(enp,
> > +			    MC_CMD_FILTER_OP_IN_OP_REMOVE,
> > +			    &table->eft_entry[filter_idx].efe_handle);
> > +		} else {
> > +			rc = efx_mcdi_filter_op_delete(enp,
> > +			    MC_CMD_FILTER_OP_IN_OP_UNSUBSCRIBE,
> > +			    &table->eft_entry[filter_idx].efe_handle);
> > +		}
> > +
> > +		/* Free the software table entry */
> > +		EFSYS_LOCK(enp->en_eslp, state);
> > +		ef10_filter_set_entry_not_busy(table, filter_idx);
> > +		ef10_filter_set_entry(table, filter_idx,
> > +		    spec->efs_overridden_spec);
> > +		EFSYS_UNLOCK(enp->en_eslp, state);
> > +
> > +		EFSYS_KMEM_FREE(enp->en_esip, sizeof (*spec), spec);
> > +
> > +		/* Check result of hardware filter removal */
> > +		if (rc != 0)
> > +			goto fail2;
> >   	}
> >   
> > -	/* Free the software table entry */
> > -	EFSYS_LOCK(enp->en_eslp, state);
> > -	ef10_filter_set_entry_not_busy(table, filter_idx);
> > -	ef10_filter_set_entry(table, filter_idx, NULL);
> > -	EFSYS_UNLOCK(enp->en_eslp, state);
> > -
> > -	EFSYS_KMEM_FREE(enp->en_esip, sizeof (*spec), spec);
> > -
> > -	/* Check result of hardware filter removal */
> > -	if (rc != 0)
> > -		goto fail2;
> > -
> >   	return (0);
> >   
> >   fail2:
> > @@ -867,6 +1116,25 @@ fail1:
> >   	return (rc);
> >   }
> >   
> > +static			void
> > +ef10_filter_delete_auto(
> > +	__in		efx_nic_t *enp,
> > +	__in		uint32_t filter_id)
> > +{
> > +	ef10_filter_table_t *table = enp->en_filter.ef_ef10_filter_table;
> > +	uint32_t filter_idx = filter_id % EFX_EF10_FILTER_TBL_ROWS;
> > +
> > +	/*
> > +	 * AUTO_OLD flag is cleared since the auto filter that is to be removed
> > +	 * may not be the filter at the specified index itself, but the filter
> > +	 * that is overridden by it.
> > +	 */
> > +	ef10_filter_set_entry_not_auto_old(table, filter_idx);
> > +
> > +	(void) ef10_filter_delete_internal(enp, filter_idx,
> > +	    EFX_FILTER_PRI_AUTO);
> > +}
> > +
> >   	__checkReturn	efx_rc_t
> >   ef10_filter_delete(
> >   	__in		efx_nic_t *enp,
> > @@ -906,7 +1174,7 @@ ef10_filter_delete(
> >   	EFSYS_UNLOCK(enp->en_eslp, state);
> >   	locked = B_FALSE;
> >   
> > -	rc = ef10_filter_delete_internal(enp, i);
> > +	rc = ef10_filter_delete_internal(enp, i, EFX_FILTER_PRI_MANUAL);
> >   	if (rc != 0)
> >   		goto fail2;
> >   
> > @@ -1131,7 +1399,7 @@ ef10_filter_insert_unicast(
> >   	if (rc != 0)
> >   		goto fail1;
> >   
> > -	rc = ef10_filter_add_internal(enp, &spec, B_TRUE,
> > +	rc = ef10_filter_add_internal(enp, &spec, EFX_FILTER_REPLACEMENT_NEVER,
> >   	    &eftp->eft_unicst_filter_indexes[eftp->eft_unicst_filter_count]);
> >   	if (rc != 0)
> >   		goto fail2;
> > @@ -1165,7 +1433,7 @@ ef10_filter_insert_all_unicast(
> >   	rc = efx_filter_spec_set_uc_def(&spec);
> >   	if (rc != 0)
> >   		goto fail1;
> > -	rc = ef10_filter_add_internal(enp, &spec, B_TRUE,
> > +	rc = ef10_filter_add_internal(enp, &spec, EFX_FILTER_REPLACEMENT_NEVER,
> >   	    &eftp->eft_unicst_filter_indexes[eftp->eft_unicst_filter_count]);
> >   	if (rc != 0)
> >   		goto fail2;
> > @@ -1235,8 +1503,8 @@ ef10_filter_insert_multicast_list(
> >   			}
> >   		}
> >   
> > -		rc = ef10_filter_add_internal(enp, &spec, B_TRUE,
> > -					    &filter_index);
> > +		rc = ef10_filter_add_internal(enp, &spec,
> > +		    EFX_FILTER_REPLACEMENT_NEVER, &filter_index);
> >   
> >   		if (rc == 0) {
> >   			eftp->eft_mulcst_filter_indexes[filter_count] =
> > @@ -1263,8 +1531,8 @@ ef10_filter_insert_multicast_list(
> >   			goto rollback;
> >   		}
> >   
> > -		rc = ef10_filter_add_internal(enp, &spec, B_TRUE,
> > -					    &filter_index);
> > +		rc = ef10_filter_add_internal(enp, &spec,
> > +		    EFX_FILTER_REPLACEMENT_NEVER, &filter_index);
> >   
> >   		if (rc == 0) {
> >   			eftp->eft_mulcst_filter_indexes[filter_count] =
> > @@ -1285,7 +1553,7 @@ rollback:
> >   	/* Remove any filters we have inserted */
> >   	i = filter_count;
> >   	while (i--) {
> > -		(void) ef10_filter_delete_internal(enp,
> > +		ef10_filter_delete_auto(enp,
> >   		    eftp->eft_mulcst_filter_indexes[i]);
> >   	}
> >   	eftp->eft_mulcst_filter_count = 0;
> > @@ -1313,7 +1581,7 @@ ef10_filter_insert_all_multicast(
> >   	if (rc != 0)
> >   		goto fail1;
> >   
> > -	rc = ef10_filter_add_internal(enp, &spec, B_TRUE,
> > +	rc = ef10_filter_add_internal(enp, &spec, EFX_FILTER_REPLACEMENT_NEVER,
> >   	    &eftp->eft_mulcst_filter_indexes[0]);
> >   	if (rc != 0)
> >   		goto fail2;
> > @@ -1416,8 +1684,9 @@ ef10_filter_insert_encap_filters(
> >   		if (rc != 0)
> >   			goto fail1;
> >   
> > -		rc = ef10_filter_add_internal(enp, &spec, B_TRUE,
> > -			    &table->eft_encap_filter_indexes[
> > +		rc = ef10_filter_add_internal(enp, &spec,
> > +		    EFX_FILTER_REPLACEMENT_NEVER,
> > +		    &table->eft_encap_filter_indexes[
> >   				    table->eft_encap_filter_count]);
> >   		if (rc != 0) {
> >   			if (rc != EACCES)
> > @@ -1446,7 +1715,7 @@ ef10_filter_remove_old(
> >   
> >   	for (i = 0; i < EFX_ARRAY_SIZE(table->eft_entry); i++) {
> >   		if (ef10_filter_entry_is_auto_old(table, i)) {
> > -			(void) ef10_filter_delete_internal(enp, i);
> > +			ef10_filter_delete_auto(enp, i);
> >   		}
> >   	}
> >   }
> > @@ -1521,19 +1790,19 @@ ef10_filter_reconfigure(
> >   		 * has rebooted, which removes hardware filters).
> >   		 */
> >   		for (i = 0; i < table->eft_unicst_filter_count; i++) {
> > -			(void) ef10_filter_delete_internal(enp,
> > +			ef10_filter_delete_auto(enp,
> >   					table->eft_unicst_filter_indexes[i]);
> >   		}
> >   		table->eft_unicst_filter_count = 0;
> >   
> >   		for (i = 0; i < table->eft_mulcst_filter_count; i++) {
> > -			(void) ef10_filter_delete_internal(enp,
> > +			ef10_filter_delete_auto(enp,
> >   					table->eft_mulcst_filter_indexes[i]);
> >   		}
> >   		table->eft_mulcst_filter_count = 0;
> >   
> >   		for (i = 0; i < table->eft_encap_filter_count; i++) {
> > -			(void) ef10_filter_delete_internal(enp,
> > +			ef10_filter_delete_auto(enp,
> >   					table->eft_encap_filter_indexes[i]);
> >   		}
> >   		table->eft_encap_filter_count = 0;
> > diff --git a/drivers/net/sfc/base/ef10_impl.h b/drivers/net/sfc/base/ef10_impl.h
> > index 7a00047829..67abf3b853 100644
> > --- a/drivers/net/sfc/base/ef10_impl.h
> > +++ b/drivers/net/sfc/base/ef10_impl.h
> > @@ -1079,6 +1079,8 @@ ef10_rx_fini(
> >   
> >   #if EFSYS_OPT_FILTER
> >   
> > +enum efx_filter_replacement_policy_e;
> > +
> >   typedef struct ef10_filter_handle_s {
> >   	uint32_t	efh_lo;
> >   	uint32_t	efh_hi;
> > @@ -1148,7 +1150,7 @@ ef10_filter_restore(
> >   ef10_filter_add(
> >   	__in		efx_nic_t *enp,
> >   	__inout		efx_filter_spec_t *spec,
> > -	__in		boolean_t may_replace);
> > +	__in		enum efx_filter_replacement_policy_e policy);
> >   
> >   	__checkReturn	efx_rc_t
> >   ef10_filter_delete(
> > diff --git a/drivers/net/sfc/base/efx.h b/drivers/net/sfc/base/efx.h
> > index c609c700fa..d94d3c02f7 100644
> > --- a/drivers/net/sfc/base/efx.h
> > +++ b/drivers/net/sfc/base/efx.h
> > @@ -2949,6 +2949,7 @@ typedef uint8_t efx_filter_flags_t;
> >   
> >   typedef uint32_t efx_filter_match_flags_t;
> >   
> > +/* Filter priority from lowest to highest */
> >   typedef enum efx_filter_priority_s {
> >   	EFX_FILTER_PRI_AUTO = 0,	/* Automatic filter based on device
> >   					 * address list or hardware
> > @@ -2956,6 +2957,7 @@ typedef enum efx_filter_priority_s {
> >   					 * by the filter implementation for
> >   					 * each NIC type. */
> >   	EFX_FILTER_PRI_MANUAL,		/* Manually configured filter */
> > +	EFX_FILTER_NPRI,
> >   } efx_filter_priority_t;
> >   
> >   /*
> > @@ -2970,6 +2972,11 @@ typedef struct efx_filter_spec_s {
> >   	uint16_t			efs_dmaq_id;
> >   	uint32_t			efs_rss_context;
> >   	uint32_t			efs_mark;
> > +	/*
> > +	 * Saved lower-priority filter. If it is set, it is restored on
> > +	 * filter delete operation.
> > +	 */
> > +	struct efx_filter_spec_s	*efs_overridden_spec;
> >   	/* Fields below here are hashed for software filter lookup */
> >   	uint16_t			efs_outer_vid;
> >   	uint16_t			efs_inner_vid;
> > diff --git a/drivers/net/sfc/base/efx_filter.c b/drivers/net/sfc/base/efx_filter.c
> > index 36332a2801..9949d05bb3 100644
> > --- a/drivers/net/sfc/base/efx_filter.c
> > +++ b/drivers/net/sfc/base/efx_filter.c
> > @@ -28,7 +28,7 @@ static	__checkReturn	efx_rc_t
> >   siena_filter_add(
> >   	__in		efx_nic_t *enp,
> >   	__inout		efx_filter_spec_t *spec,
> > -	__in		boolean_t may_replace);
> > +	__in		efx_filter_replacement_policy_t policy);
> >   
> >   static	__checkReturn	efx_rc_t
> >   siena_filter_delete(
> > @@ -98,7 +98,8 @@ efx_filter_insert(
> >   		goto fail3;
> >   	}
> >   
> > -	return (efop->efo_add(enp, spec, B_FALSE));
> > +	return (efop->efo_add(enp, spec,
> > +	    EFX_FILTER_REPLACEMENT_HIGHER_PRIORITY));
> >   
> >   fail3:
> >   	EFSYS_PROBE(fail3);
> > @@ -1444,7 +1445,7 @@ static	 __checkReturn	efx_rc_t
> >   siena_filter_add(
> >   	__in		efx_nic_t *enp,
> >   	__inout		efx_filter_spec_t *spec,
> > -	__in		boolean_t may_replace)
> > +	__in		efx_filter_replacement_policy_t policy)
> >   {
> >   	efx_rc_t rc;
> >   	siena_filter_spec_t sf_spec;
> > @@ -1485,9 +1486,17 @@ siena_filter_add(
> >   	saved_sf_spec = &sftp->sft_spec[filter_idx];
> >   
> >   	if (siena_filter_test_used(sftp, filter_idx)) {
> > -		if (may_replace == B_FALSE) {
> > +		/* All Siena filter are considered the same priority */
> > +		switch (policy) {
> > +		case EFX_FILTER_REPLACEMENT_NEVER:
> > +		case EFX_FILTER_REPLACEMENT_HIGHER_PRIORITY:
> >   			rc = EEXIST;
> >   			goto fail4;
> > +		case EFX_FILTER_REPLACEMENT_HIGHER_OR_EQUAL_PRIORITY:
> > +			break;
> > +		default:
> > +			EFSYS_ASSERT(0);
> > +			break;
> >   		}
> >   	}
> >   	siena_filter_set_used(sftp, filter_idx);
> > diff --git a/drivers/net/sfc/base/efx_impl.h b/drivers/net/sfc/base/efx_impl.h
> > index 85d984f651..9755f4dfd2 100644
> > --- a/drivers/net/sfc/base/efx_impl.h
> > +++ b/drivers/net/sfc/base/efx_impl.h
> > @@ -246,12 +246,31 @@ typedef struct efx_phy_ops_s {
> >   } efx_phy_ops_t;
> >   
> >   #if EFSYS_OPT_FILTER
> > +
> > +/*
> > + * Policy for replacing existing filter when inserting a new one.
> > + * Note that all policies allow for storing the new lower priority
> > + * filters as overridden by existing higher priority ones. It is needed
> > + * to restore the lower priority filters on higher priority ones removal.
> > + */
> > +typedef enum efx_filter_replacement_policy_e {
> > +	/* Cannot replace existing filter */
> > +	EFX_FILTER_REPLACEMENT_NEVER,
> > +	/* Higher priority filters can replace lower priotiry ones */
> > +	EFX_FILTER_REPLACEMENT_HIGHER_PRIORITY,
> > +	/*
> > +	 * Higher priority filters can replace lower priority ones and
> > +	 * equal priority filters can replace each other.
> > +	 */
> > +	EFX_FILTER_REPLACEMENT_HIGHER_OR_EQUAL_PRIORITY,
> > +} efx_filter_replacement_policy_t;
> > +
> >   typedef struct efx_filter_ops_s {
> >   	efx_rc_t	(*efo_init)(efx_nic_t *);
> >   	void		(*efo_fini)(efx_nic_t *);
> >   	efx_rc_t	(*efo_restore)(efx_nic_t *);
> >   	efx_rc_t	(*efo_add)(efx_nic_t *, efx_filter_spec_t *,
> > -				   boolean_t may_replace);
> > +				   efx_filter_replacement_policy_t policy);
> >   	efx_rc_t	(*efo_delete)(efx_nic_t *, efx_filter_spec_t *);
> >   	efx_rc_t	(*efo_supported_filters)(efx_nic_t *, uint32_t *,
> >   				   size_t, size_t *);


^ permalink raw reply	[flat|nested] 371+ messages in thread

* Re: [dpdk-stable] patch 'net/sfc/base: handle manual and auto filter clashes in EF10' has been queued to stable release 19.11.3
  2020-05-20 11:57     ` Luca Boccassi
@ 2020-05-20 12:12       ` Igor Romanov
  2020-05-20 16:50         ` Luca Boccassi
  0 siblings, 1 reply; 371+ messages in thread
From: Igor Romanov @ 2020-05-20 12:12 UTC (permalink / raw)
  To: Luca Boccassi; +Cc: Andrew Rybchenko, dpdk stable

No, it is not present in master. Should I send it separately?

On 5/20/20 2:57 PM, Luca Boccassi wrote:
> The attached change does not seem to be present in master?
>
> On Wed, 2020-05-20 at 12:53 +0300, Igor Romanov wrote:
>> Hi!
>>
>> The patch has an issue that is fixed in the attached patch.
>>
>> On 5/19/20 3:53 PM, luca.boccassi@gmail.com wrote:
>>> Hi,
>>>
>>> FYI, your patch has been queued to stable release 19.11.3
>>>
>>> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
>>> It will be pushed if I get no objections before 05/21/20. So please
>>> shout if anyone has objections.
>>>
>>> Also note that after the patch there's a diff of the upstream commit vs the
>>> patch applied to the branch. This will indicate if there was any rebasing
>>> needed to apply to the stable branch. If there were code changes for rebasing
>>> (ie: not only metadata diffs), please double check that the rebase was
>>> correctly done.
>>>
>>> Thanks.
>>>
>>> Luca Boccassi
>>>
>>> ---
>>>>  From 8ea2ea8fe40c8a13bca536bcb4683d9225cd0ea2 Mon Sep 17 00:00:00 2001
>>> From: Igor Romanov <igor.romanov@oktetlabs.ru>
>>> Date: Tue, 10 Mar 2020 09:48:39 +0000
>>> Subject: [PATCH] net/sfc/base: handle manual and auto filter clashes in EF10
>>>
>>> [ upstream commit 585c22edb29cc3cfdb3628c41effd8ff3b75f224 ]
>>>
>>> Make user filters a priority in EF10 datapath. When a manual
>>> filter with a specification that is equal to an existing auto
>>> filter is inserted, the manual filter:
>>> - replaces auto filter if the specification is exclusive;
>>> - is inserted along existing auto filter otherwise;
>>>
>>> In the first case the auto filter that was replaced is saved.
>>> This saved filter can be updated on filter reconfiguration and
>>> is restored on the manual filter removal.
>>>
>>> Fixes: e7cd430c864f ("net/sfc/base: import SFN7xxx family support")
>>>
>>> Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
>>> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
>>> ---
>>>    drivers/net/sfc/base/ef10_filter.c | 519 ++++++++++++++++++++++-------
>>>    drivers/net/sfc/base/ef10_impl.h   |   4 +-
>>>    drivers/net/sfc/base/efx.h         |   7 +
>>>    drivers/net/sfc/base/efx_filter.c  |  17 +-
>>>    drivers/net/sfc/base/efx_impl.h    |  21 +-
>>>    5 files changed, 437 insertions(+), 131 deletions(-)
>>>
>>> diff --git a/drivers/net/sfc/base/ef10_filter.c b/drivers/net/sfc/base/ef10_filter.c
>>> index 5578765ab3..12802a3d13 100644
>>> --- a/drivers/net/sfc/base/ef10_filter.c
>>> +++ b/drivers/net/sfc/base/ef10_filter.c
>>> @@ -590,6 +590,231 @@ fail1:
>>>    	return (rc);
>>>    }
>>>    
>>> +enum ef10_filter_add_action_e {
>>> +	/* Insert a new filter */
>>> +	EF10_FILTER_ADD_NEW,
>>> +	/*
>>> +	 * Replace old filter with a new, overriding the old one
>>> +	 * if it has lower priority.
>>> +	 */
>>> +	EF10_FILTER_ADD_REPLACE,
>>> +	/* Store new, lower priority filter as overridden by old filter */
>>> +	EF10_FILTER_ADD_STORE,
>>> +	/* Special case for AUTO filters, remove AUTO_OLD flag */
>>> +	EF10_FILTER_ADD_REFRESH,
>>> +};
>>> +
>>> +static	__checkReturn	efx_rc_t
>>> +ef10_filter_add_lookup_equal_spec(
>>> +	__in		efx_filter_spec_t *spec,
>>> +	__in		efx_filter_spec_t *probe_spec,
>>> +	__in		efx_filter_replacement_policy_t policy,
>>> +	__out		boolean_t *found)
>>> +{
>>> +	efx_rc_t rc;
>>> +
>>> +	/* Refreshing AUTO filter */
>>> +	if (spec->efs_priority == EFX_FILTER_PRI_AUTO &&
>>> +	    probe_spec->efs_priority == EFX_FILTER_PRI_AUTO) {
>>> +		*found = B_TRUE;
>>> +		return (0);
>>> +	}
>>> +
>>> +	/*
>>> +	 * With exclusive filters, higher priority ones
>>> +	 * override lower priority ones, and lower priority
>>> +	 * ones are stored in case the higher priority one
>>> +	 * is removed.
>>> +	 */
>>> +	if (ef10_filter_is_exclusive(spec)) {
>>> +		switch (policy) {
>>> +		case EFX_FILTER_REPLACEMENT_HIGHER_OR_EQUAL_PRIORITY:
>>> +			if (spec->efs_priority == probe_spec->efs_priority) {
>>> +				*found = B_TRUE;
>>> +				break;
>>> +			}
>>> +			/* Fall-through */
>>> +		case EFX_FILTER_REPLACEMENT_HIGHER_PRIORITY:
>>> +			if (spec->efs_priority > probe_spec->efs_priority) {
>>> +				*found = B_TRUE;
>>> +				break;
>>> +			}
>>> +			/* Fall-through */
>>> +		case EFX_FILTER_REPLACEMENT_NEVER:
>>> +			/*
>>> +			 * Lower priority filter needs to be
>>> +			 * stored. It does *not* replace the
>>> +			 * old one. That is why EEXIST is not
>>> +			 * returned in that case.
>>> +			 */
>>> +			if (spec->efs_priority < probe_spec->efs_priority) {
>>> +				*found = B_TRUE;
>>> +				break;
>>> +			} else {
>>> +				rc = EEXIST;
>>> +				goto fail1;
>>> +			}
>>> +		default:
>>> +			EFSYS_ASSERT(0);
>>> +			rc = EEXIST;
>>> +			goto fail2;
>>> +		}
>>> +	} else {
>>> +		*found = B_FALSE;
>>> +	}
>>> +
>>> +	return (0);
>>> +
>>> +fail2:
>>> +	EFSYS_PROBE(fail2);
>>> +
>>> +fail1:
>>> +	EFSYS_PROBE1(fail1, efx_rc_t, rc);
>>> +
>>> +	return (rc);
>>> +}
>>> +
>>> +
>>> +static			void
>>> +ef10_filter_add_select_action(
>>> +	__in		efx_filter_spec_t *saved_spec,
>>> +	__in		efx_filter_spec_t *spec,
>>> +	__out		enum ef10_filter_add_action_e *action,
>>> +	__out		efx_filter_spec_t **overridden_spec)
>>> +{
>>> +	efx_filter_spec_t *overridden = NULL;
>>> +
>>> +	if (saved_spec == NULL) {
>>> +		*action = EF10_FILTER_ADD_NEW;
>>> +	} else if (ef10_filter_is_exclusive(spec) == B_FALSE) {
>>> +		/*
>>> +		 * Non-exclusive filters are always stored in separate entries
>>> +		 * in the table. The only case involving a saved spec is
>>> +		 * refreshing an AUTO filter.
>>> +		 */
>>> +		EFSYS_ASSERT(saved_spec->efs_overridden_spec == NULL);
>>> +		EFSYS_ASSERT(spec->efs_priority == EFX_FILTER_PRI_AUTO);
>>> +		EFSYS_ASSERT(saved_spec->efs_priority == EFX_FILTER_PRI_AUTO);
>>> +		*action = EF10_FILTER_ADD_REFRESH;
>>> +	} else {
>>> +		/* Exclusive filters stored in the same entry */
>>> +		if (spec->efs_priority > saved_spec->efs_priority) {
>>> +			/*
>>> +			 * Insert a high priority filter over a lower priority
>>> +			 * one. Only two priority levels are implemented, so
>>> +			 * there must not already be an overridden filter.
>>> +			 */
>>> +			EFX_STATIC_ASSERT(EFX_FILTER_NPRI == 2);
>>> +			EFSYS_ASSERT(saved_spec->efs_overridden_spec == NULL);
>>> +			overridden = saved_spec;
>>> +			*action = EF10_FILTER_ADD_REPLACE;
>>> +		} else if (spec->efs_priority == saved_spec->efs_priority) {
>>> +			/* Replace in-place or refresh an existing filter */
>>> +			if (spec->efs_priority == EFX_FILTER_PRI_AUTO)
>>> +				*action = EF10_FILTER_ADD_REFRESH;
>>> +			else
>>> +				*action = EF10_FILTER_ADD_REPLACE;
>>> +		} else {
>>> +			/*
>>> +			 * Insert a lower priority filter, storing it in case
>>> +			 * the higher priority filter is removed.
>>> +			 *
>>> +			 * Currently there are only two priority levels, so this
>>> +			 * must be an AUTO filter.
>>> +			 */
>>> +			EFX_STATIC_ASSERT(EFX_FILTER_NPRI == 2);
>>> +			EFSYS_ASSERT(spec->efs_priority == EFX_FILTER_PRI_AUTO);
>>> +			if (saved_spec->efs_overridden_spec != NULL) {
>>> +				*action = EF10_FILTER_ADD_REFRESH;
>>> +			} else {
>>> +				overridden = spec;
>>> +				*action = EF10_FILTER_ADD_STORE;
>>> +			}
>>> +		}
>>> +	}
>>> +
>>> +	*overridden_spec = overridden;
>>> +}
>>> +
>>> +static	__checkReturn	efx_rc_t
>>> +ef10_filter_add_execute_action(
>>> +	__in		efx_nic_t *enp,
>>> +	__in		efx_filter_spec_t *saved_spec,
>>> +	__in		efx_filter_spec_t *spec,
>>> +	__in		efx_filter_spec_t *overridden_spec,
>>> +	__in		enum ef10_filter_add_action_e action,
>>> +	__in		int ins_index)
>>> +{
>>> +	ef10_filter_table_t *eftp = enp->en_filter.ef_ef10_filter_table;
>>> +	efsys_lock_state_t state;
>>> +	efx_rc_t rc;
>>> +
>>> +	EFSYS_LOCK(enp->en_eslp, state);
>>> +
>>> +	if (action == EF10_FILTER_ADD_REFRESH) {
>>> +		ef10_filter_set_entry_not_auto_old(eftp, ins_index);
>>> +		goto out_unlock;
>>> +	} else if (action == EF10_FILTER_ADD_STORE) {
>>> +		EFSYS_ASSERT(overridden_spec != NULL);
>>> +		saved_spec->efs_overridden_spec = overridden_spec;
>>> +		goto out_unlock;
>>> +	}
>>> +
>>> +	EFSYS_UNLOCK(enp->en_eslp, state);
>>> +
>>> +	switch (action) {
>>> +	case EF10_FILTER_ADD_REPLACE:
>>> +		/*
>>> +		 * On replacing the filter handle may change after a
>>> +		 * successful replace operation.
>>> +		 */
>>> +		rc = efx_mcdi_filter_op_add(enp, spec,
>>> +		    MC_CMD_FILTER_OP_IN_OP_REPLACE,
>>> +		    &eftp->eft_entry[ins_index].efe_handle);
>>> +		break;
>>> +	case EF10_FILTER_ADD_NEW:
>>> +		if (ef10_filter_is_exclusive(spec)) {
>>> +			rc = efx_mcdi_filter_op_add(enp, spec,
>>> +			    MC_CMD_FILTER_OP_IN_OP_INSERT,
>>> +			    &eftp->eft_entry[ins_index].efe_handle);
>>> +		} else {
>>> +			rc = efx_mcdi_filter_op_add(enp, spec,
>>> +			    MC_CMD_FILTER_OP_IN_OP_SUBSCRIBE,
>>> +			    &eftp->eft_entry[ins_index].efe_handle);
>>> +		}
>>> +		break;
>>> +	default:
>>> +		rc = EINVAL;
>>> +		EFSYS_ASSERT(0);
>>> +		break;
>>> +	}
>>> +	if (rc != 0)
>>> +		goto fail1;
>>> +
>>> +	EFSYS_LOCK(enp->en_eslp, state);
>>> +
>>> +	if (action == EF10_FILTER_ADD_REPLACE) {
>>> +		/* Update the fields that may differ */
>>> +		saved_spec->efs_priority = spec->efs_priority;
>>> +		saved_spec->efs_flags = spec->efs_flags;
>>> +		saved_spec->efs_rss_context = spec->efs_rss_context;
>>> +		saved_spec->efs_dmaq_id = spec->efs_dmaq_id;
>>> +
>>> +		if (overridden_spec != NULL)
>>> +			saved_spec->efs_overridden_spec = overridden_spec;
>>> +	}
>>> +
>>> +out_unlock:
>>> +	EFSYS_UNLOCK(enp->en_eslp, state);
>>> +
>>> +	return (0);
>>> +
>>> +fail1:
>>> +	EFSYS_PROBE1(fail1, efx_rc_t, rc);
>>> +
>>> +	return (rc);
>>> +}
>>> +
>>>    /*
>>>     * An arbitrary search limit for the software hash table. As per the linux net
>>>     * driver.
>>> @@ -600,22 +825,24 @@ static	__checkReturn	efx_rc_t
>>>    ef10_filter_add_internal(
>>>    	__in		efx_nic_t *enp,
>>>    	__inout		efx_filter_spec_t *spec,
>>> -	__in		boolean_t may_replace,
>>> +	__in		efx_filter_replacement_policy_t policy,
>>>    	__out_opt	uint32_t *filter_id)
>>>    {
>>>    	efx_rc_t rc;
>>>    	ef10_filter_table_t *eftp = enp->en_filter.ef_ef10_filter_table;
>>> +	enum ef10_filter_add_action_e action;
>>> +	efx_filter_spec_t *overridden_spec = NULL;
>>>    	efx_filter_spec_t *saved_spec;
>>>    	uint32_t hash;
>>>    	unsigned int depth;
>>>    	int ins_index;
>>> -	boolean_t replacing = B_FALSE;
>>> -	unsigned int i;
>>>    	efsys_lock_state_t state;
>>>    	boolean_t locked = B_FALSE;
>>>    
>>>    	EFSYS_ASSERT(EFX_FAMILY_IS_EF10(enp));
>>>    
>>> +	EFSYS_ASSERT(spec->efs_overridden_spec == NULL);
>>> +
>>>    	hash = ef10_filter_hash(spec);
>>>    
>>>    	/*
>>> @@ -635,35 +862,33 @@ retry:
>>>    	ins_index = -1;
>>>    
>>>    	for (depth = 1; depth <= EF10_FILTER_SEARCH_LIMIT; depth++) {
>>> -		i = (hash + depth) & (EFX_EF10_FILTER_TBL_ROWS - 1);
>>> -		saved_spec = ef10_filter_entry_spec(eftp, i);
>>> +		unsigned int probe_index;
>>> +		efx_filter_spec_t *probe_spec;
>>>    
>>> -		if (saved_spec == NULL) {
>>> +		probe_index = (hash + depth) & (EFX_EF10_FILTER_TBL_ROWS - 1);
>>> +		probe_spec = ef10_filter_entry_spec(eftp, probe_index);
>>> +
>>> +		if (probe_spec == NULL) {
>>>    			if (ins_index < 0)
>>> -				ins_index = i;
>>> -		} else if (ef10_filter_equal(spec, saved_spec)) {
>>> -			if (ef10_filter_entry_is_busy(eftp, i)) {
>>> +				ins_index = probe_index;
>>> +		} else if (ef10_filter_equal(spec, probe_spec)) {
>>> +			boolean_t found;
>>> +
>>> +			if (ef10_filter_entry_is_busy(eftp, probe_index)) {
>>>    				EFSYS_UNLOCK(enp->en_eslp, state);
>>>    				locked = B_FALSE;
>>>    				goto retry;
>>>    			}
>>>    
>>> -			if (saved_spec->efs_priority == EFX_FILTER_PRI_AUTO) {
>>> -				ins_index = i;
>>> -				goto found;
>>> -			}
>>> +			rc = ef10_filter_add_lookup_equal_spec(spec,
>>> +			    probe_spec, policy, &found);
>>> +			if (rc != 0)
>>> +				goto fail1;
>>>    
>>> -			if (ef10_filter_is_exclusive(spec)) {
>>> -				if (may_replace) {
>>> -					ins_index = i;
>>> -					goto found;
>>> -				} else {
>>> -					rc = EEXIST;
>>> -					goto fail1;
>>> -				}
>>> +			if (found != B_FALSE) {
>>> +				ins_index = probe_index;
>>> +				break;
>>>    			}
>>> -
>>> -			/* Leave existing */
>>>    		}
>>>    	}
>>>    
>>> @@ -676,93 +901,90 @@ retry:
>>>    		goto fail2;
>>>    	}
>>>    
>>> -found:
>>>    	/*
>>> -	 * Create a software table entry if necessary, and mark it
>>> -	 * busy.  We might yet fail to insert, but any attempt to
>>> -	 * insert a conflicting filter while we're waiting for the
>>> -	 * firmware must find the busy entry.
>>> +	 * Mark software table entry busy. We might yet fail to insert,
>>> +	 * but any attempt to insert a conflicting filter while we're
>>> +	 * waiting for the firmware must find the busy entry.
>>>    	 */
>>> +	ef10_filter_set_entry_busy(eftp, ins_index);
>>> +
>>>    	saved_spec = ef10_filter_entry_spec(eftp, ins_index);
>>> -	if (saved_spec) {
>>> -		if (saved_spec->efs_priority == EFX_FILTER_PRI_AUTO) {
>>> -			/* This is a filter we are refreshing */
>>> -			ef10_filter_set_entry_not_auto_old(eftp, ins_index);
>>> -			goto out_unlock;
>>> +	ef10_filter_add_select_action(saved_spec, spec, &action,
>>> +	    &overridden_spec);
>>>    
>>> -		}
>>> -		replacing = B_TRUE;
>>> -	} else {
>>> -		EFSYS_KMEM_ALLOC(enp->en_esip, sizeof (*spec), saved_spec);
>>> -		if (!saved_spec) {
>>> +	/*
>>> +	 * Allocate a new filter if found entry is empty or
>>> +	 * a filter should be overridden.
>>> +	 */
>>> +	if (overridden_spec != NULL || saved_spec == NULL) {
>>> +		efx_filter_spec_t *new_spec;
>>> +
>>> +		EFSYS_UNLOCK(enp->en_eslp, state);
>>> +		locked = B_FALSE;
>>> +
>>> +		EFSYS_KMEM_ALLOC(enp->en_esip, sizeof (*new_spec), new_spec);
>>> +		if (new_spec == NULL) {
>>>    			rc = ENOMEM;
>>> +			overridden_spec = NULL;
>>>    			goto fail3;
>>>    		}
>>> -		*saved_spec = *spec;
>>> -		ef10_filter_set_entry(eftp, ins_index, saved_spec);
>>> +
>>> +		EFSYS_LOCK(enp->en_eslp, state);
>>> +		locked = B_TRUE;
>>> +
>>> +		if (saved_spec == NULL) {
>>> +			*new_spec = *spec;
>>> +			ef10_filter_set_entry(eftp, ins_index, new_spec);
>>> +		} else {
>>> +			*new_spec = *overridden_spec;
>>> +			overridden_spec = new_spec;
>>> +		}
>>>    	}
>>> -	ef10_filter_set_entry_busy(eftp, ins_index);
>>>    
>>>    	EFSYS_UNLOCK(enp->en_eslp, state);
>>>    	locked = B_FALSE;
>>>    
>>> -	/*
>>> -	 * On replacing the filter handle may change after after a successful
>>> -	 * replace operation.
>>> -	 */
>>> -	if (replacing) {
>>> -		rc = efx_mcdi_filter_op_add(enp, spec,
>>> -		    MC_CMD_FILTER_OP_IN_OP_REPLACE,
>>> -		    &eftp->eft_entry[ins_index].efe_handle);
>>> -	} else if (ef10_filter_is_exclusive(spec)) {
>>> -		rc = efx_mcdi_filter_op_add(enp, spec,
>>> -		    MC_CMD_FILTER_OP_IN_OP_INSERT,
>>> -		    &eftp->eft_entry[ins_index].efe_handle);
>>> -	} else {
>>> -		rc = efx_mcdi_filter_op_add(enp, spec,
>>> -		    MC_CMD_FILTER_OP_IN_OP_SUBSCRIBE,
>>> -		    &eftp->eft_entry[ins_index].efe_handle);
>>> -	}
>>> -
>>> +	rc = ef10_filter_add_execute_action(enp, saved_spec, spec,
>>> +	    overridden_spec, action, ins_index);
>>>    	if (rc != 0)
>>>    		goto fail4;
>>>    
>>> -	EFSYS_LOCK(enp->en_eslp, state);
>>> -	locked = B_TRUE;
>>> -
>>> -	if (replacing) {
>>> -		/* Update the fields that may differ */
>>> -		saved_spec->efs_priority = spec->efs_priority;
>>> -		saved_spec->efs_flags = spec->efs_flags;
>>> -		saved_spec->efs_rss_context = spec->efs_rss_context;
>>> -		saved_spec->efs_dmaq_id = spec->efs_dmaq_id;
>>> -	}
>>> -
>>> -	ef10_filter_set_entry_not_busy(eftp, ins_index);
>>> -
>>> -out_unlock:
>>> -
>>> -	EFSYS_UNLOCK(enp->en_eslp, state);
>>> -	locked = B_FALSE;
>>> -
>>>    	if (filter_id)
>>>    		*filter_id = ins_index;
>>>    
>>> +	EFSYS_LOCK(enp->en_eslp, state);
>>> +	ef10_filter_set_entry_not_busy(eftp, ins_index);
>>> +	EFSYS_UNLOCK(enp->en_eslp, state);
>>> +
>>>    	return (0);
>>>    
>>>    fail4:
>>>    	EFSYS_PROBE(fail4);
>>>    
>>> -	if (!replacing) {
>>> -		EFSYS_KMEM_FREE(enp->en_esip, sizeof (*spec), saved_spec);
>>> -		saved_spec = NULL;
>>> +	EFSYS_ASSERT(locked == B_FALSE);
>>> +	EFSYS_LOCK(enp->en_eslp, state);
>>> +
>>> +	if (action == EF10_FILTER_ADD_NEW) {
>>> +		EFSYS_KMEM_FREE(enp->en_esip, sizeof (*spec),
>>> +		    ef10_filter_entry_spec(eftp, ins_index));
>>> +		ef10_filter_set_entry(eftp, ins_index, NULL);
>>>    	}
>>> -	ef10_filter_set_entry_not_busy(eftp, ins_index);
>>> -	ef10_filter_set_entry(eftp, ins_index, NULL);
>>> +
>>> +	EFSYS_UNLOCK(enp->en_eslp, state);
>>> +
>>> +	if (overridden_spec != NULL)
>>> +		EFSYS_KMEM_FREE(enp->en_esip, sizeof (*spec), overridden_spec);
>>>    
>>>    fail3:
>>>    	EFSYS_PROBE(fail3);
>>>    
>>> +	EFSYS_ASSERT(locked == B_FALSE);
>>> +	EFSYS_LOCK(enp->en_eslp, state);
>>> +
>>> +	ef10_filter_set_entry_not_busy(eftp, ins_index);
>>> +
>>> +	EFSYS_UNLOCK(enp->en_eslp, state);
>>> +
>>>    fail2:
>>>    	EFSYS_PROBE(fail2);
>>>    
>>> @@ -779,11 +1001,11 @@ fail1:
>>>    ef10_filter_add(
>>>    	__in		efx_nic_t *enp,
>>>    	__inout		efx_filter_spec_t *spec,
>>> -	__in		boolean_t may_replace)
>>> +	__in		enum efx_filter_replacement_policy_e policy)
>>>    {
>>>    	efx_rc_t rc;
>>>    
>>> -	rc = ef10_filter_add_internal(enp, spec, may_replace, NULL);
>>> +	rc = ef10_filter_add_internal(enp, spec, policy, NULL);
>>>    	if (rc != 0)
>>>    		goto fail1;
>>>    
>>> @@ -795,11 +1017,15 @@ fail1:
>>>    	return (rc);
>>>    }
>>>    
>>> -
>>> +/*
>>> + * Delete a filter by index from the filter table with priority
>>> + * that is not higher than specified.
>>> + */
>>>    static	__checkReturn	efx_rc_t
>>>    ef10_filter_delete_internal(
>>>    	__in		efx_nic_t *enp,
>>> -	__in		uint32_t filter_id)
>>> +	__in		uint32_t filter_id,
>>> +	__in		efx_filter_priority_t priority)
>>>    {
>>>    	efx_rc_t rc;
>>>    	ef10_filter_table_t *table = enp->en_filter.ef_ef10_filter_table;
>>> @@ -821,7 +1047,8 @@ ef10_filter_delete_internal(
>>>    		EFSYS_LOCK(enp->en_eslp, state);
>>>    	}
>>>    	if ((spec = ef10_filter_entry_spec(table, filter_idx)) != NULL) {
>>> -		ef10_filter_set_entry_busy(table, filter_idx);
>>> +		if (spec->efs_priority <= priority)
>>> +			ef10_filter_set_entry_busy(table, filter_idx);
>>>    	}
>>>    	EFSYS_UNLOCK(enp->en_eslp, state);
>>>    
>>> @@ -830,32 +1057,54 @@ ef10_filter_delete_internal(
>>>    		goto fail1;
>>>    	}
>>>    
>>> -	/*
>>> -	 * Try to remove the hardware filter. This may fail if the MC has
>>> -	 * rebooted (which frees all hardware filter resources).
>>> -	 */
>>> -	if (ef10_filter_is_exclusive(spec)) {
>>> -		rc = efx_mcdi_filter_op_delete(enp,
>>> -		    MC_CMD_FILTER_OP_IN_OP_REMOVE,
>>> -		    &table->eft_entry[filter_idx].efe_handle);
>>> +	if (spec->efs_priority > priority) {
>>> +		/*
>>> +		 * Applied filter stays, but overridden filter is removed since
>>> +		 * next user request to delete the applied filter should not
>>> +		 * restore outdated filter.
>>> +		 */
>>> +		if (spec->efs_overridden_spec != NULL) {
>>> +			EFSYS_ASSERT(spec->efs_overridden_spec->efs_overridden_spec ==
>>> +			    NULL);
>>> +			EFSYS_KMEM_FREE(enp->en_esip, sizeof (*spec),
>>> +			    spec->efs_overridden_spec);
>>> +			spec->efs_overridden_spec = NULL;
>>> +		}
>>>    	} else {
>>> -		rc = efx_mcdi_filter_op_delete(enp,
>>> -		    MC_CMD_FILTER_OP_IN_OP_UNSUBSCRIBE,
>>> -		    &table->eft_entry[filter_idx].efe_handle);
>>> +		/*
>>> +		 * Try to remove the hardware filter or replace it with the
>>> +		 * saved automatic filter. This may fail if the MC has
>>> +		 * rebooted (which frees all hardware filter resources).
>>> +		 */
>>> +		if (spec->efs_overridden_spec != NULL) {
>>> +			rc = efx_mcdi_filter_op_add(enp,
>>> +			    spec->efs_overridden_spec,
>>> +			    MC_CMD_FILTER_OP_IN_OP_REPLACE,
>>> +			    &table->eft_entry[filter_idx].efe_handle);
>>> +		} else if (ef10_filter_is_exclusive(spec)) {
>>> +			rc = efx_mcdi_filter_op_delete(enp,
>>> +			    MC_CMD_FILTER_OP_IN_OP_REMOVE,
>>> +			    &table->eft_entry[filter_idx].efe_handle);
>>> +		} else {
>>> +			rc = efx_mcdi_filter_op_delete(enp,
>>> +			    MC_CMD_FILTER_OP_IN_OP_UNSUBSCRIBE,
>>> +			    &table->eft_entry[filter_idx].efe_handle);
>>> +		}
>>> +
>>> +		/* Free the software table entry */
>>> +		EFSYS_LOCK(enp->en_eslp, state);
>>> +		ef10_filter_set_entry_not_busy(table, filter_idx);
>>> +		ef10_filter_set_entry(table, filter_idx,
>>> +		    spec->efs_overridden_spec);
>>> +		EFSYS_UNLOCK(enp->en_eslp, state);
>>> +
>>> +		EFSYS_KMEM_FREE(enp->en_esip, sizeof (*spec), spec);
>>> +
>>> +		/* Check result of hardware filter removal */
>>> +		if (rc != 0)
>>> +			goto fail2;
>>>    	}
>>>    
>>> -	/* Free the software table entry */
>>> -	EFSYS_LOCK(enp->en_eslp, state);
>>> -	ef10_filter_set_entry_not_busy(table, filter_idx);
>>> -	ef10_filter_set_entry(table, filter_idx, NULL);
>>> -	EFSYS_UNLOCK(enp->en_eslp, state);
>>> -
>>> -	EFSYS_KMEM_FREE(enp->en_esip, sizeof (*spec), spec);
>>> -
>>> -	/* Check result of hardware filter removal */
>>> -	if (rc != 0)
>>> -		goto fail2;
>>> -
>>>    	return (0);
>>>    
>>>    fail2:
>>> @@ -867,6 +1116,25 @@ fail1:
>>>    	return (rc);
>>>    }
>>>    
>>> +static			void
>>> +ef10_filter_delete_auto(
>>> +	__in		efx_nic_t *enp,
>>> +	__in		uint32_t filter_id)
>>> +{
>>> +	ef10_filter_table_t *table = enp->en_filter.ef_ef10_filter_table;
>>> +	uint32_t filter_idx = filter_id % EFX_EF10_FILTER_TBL_ROWS;
>>> +
>>> +	/*
>>> +	 * AUTO_OLD flag is cleared since the auto filter that is to be removed
>>> +	 * may not be the filter at the specified index itself, but the filter
>>> +	 * that is overridden by it.
>>> +	 */
>>> +	ef10_filter_set_entry_not_auto_old(table, filter_idx);
>>> +
>>> +	(void) ef10_filter_delete_internal(enp, filter_idx,
>>> +	    EFX_FILTER_PRI_AUTO);
>>> +}
>>> +
>>>    	__checkReturn	efx_rc_t
>>>    ef10_filter_delete(
>>>    	__in		efx_nic_t *enp,
>>> @@ -906,7 +1174,7 @@ ef10_filter_delete(
>>>    	EFSYS_UNLOCK(enp->en_eslp, state);
>>>    	locked = B_FALSE;
>>>    
>>> -	rc = ef10_filter_delete_internal(enp, i);
>>> +	rc = ef10_filter_delete_internal(enp, i, EFX_FILTER_PRI_MANUAL);
>>>    	if (rc != 0)
>>>    		goto fail2;
>>>    
>>> @@ -1131,7 +1399,7 @@ ef10_filter_insert_unicast(
>>>    	if (rc != 0)
>>>    		goto fail1;
>>>    
>>> -	rc = ef10_filter_add_internal(enp, &spec, B_TRUE,
>>> +	rc = ef10_filter_add_internal(enp, &spec, EFX_FILTER_REPLACEMENT_NEVER,
>>>    	    &eftp->eft_unicst_filter_indexes[eftp->eft_unicst_filter_count]);
>>>    	if (rc != 0)
>>>    		goto fail2;
>>> @@ -1165,7 +1433,7 @@ ef10_filter_insert_all_unicast(
>>>    	rc = efx_filter_spec_set_uc_def(&spec);
>>>    	if (rc != 0)
>>>    		goto fail1;
>>> -	rc = ef10_filter_add_internal(enp, &spec, B_TRUE,
>>> +	rc = ef10_filter_add_internal(enp, &spec, EFX_FILTER_REPLACEMENT_NEVER,
>>>    	    &eftp->eft_unicst_filter_indexes[eftp->eft_unicst_filter_count]);
>>>    	if (rc != 0)
>>>    		goto fail2;
>>> @@ -1235,8 +1503,8 @@ ef10_filter_insert_multicast_list(
>>>    			}
>>>    		}
>>>    
>>> -		rc = ef10_filter_add_internal(enp, &spec, B_TRUE,
>>> -					    &filter_index);
>>> +		rc = ef10_filter_add_internal(enp, &spec,
>>> +		    EFX_FILTER_REPLACEMENT_NEVER, &filter_index);
>>>    
>>>    		if (rc == 0) {
>>>    			eftp->eft_mulcst_filter_indexes[filter_count] =
>>> @@ -1263,8 +1531,8 @@ ef10_filter_insert_multicast_list(
>>>    			goto rollback;
>>>    		}
>>>    
>>> -		rc = ef10_filter_add_internal(enp, &spec, B_TRUE,
>>> -					    &filter_index);
>>> +		rc = ef10_filter_add_internal(enp, &spec,
>>> +		    EFX_FILTER_REPLACEMENT_NEVER, &filter_index);
>>>    
>>>    		if (rc == 0) {
>>>    			eftp->eft_mulcst_filter_indexes[filter_count] =
>>> @@ -1285,7 +1553,7 @@ rollback:
>>>    	/* Remove any filters we have inserted */
>>>    	i = filter_count;
>>>    	while (i--) {
>>> -		(void) ef10_filter_delete_internal(enp,
>>> +		ef10_filter_delete_auto(enp,
>>>    		    eftp->eft_mulcst_filter_indexes[i]);
>>>    	}
>>>    	eftp->eft_mulcst_filter_count = 0;
>>> @@ -1313,7 +1581,7 @@ ef10_filter_insert_all_multicast(
>>>    	if (rc != 0)
>>>    		goto fail1;
>>>    
>>> -	rc = ef10_filter_add_internal(enp, &spec, B_TRUE,
>>> +	rc = ef10_filter_add_internal(enp, &spec, EFX_FILTER_REPLACEMENT_NEVER,
>>>    	    &eftp->eft_mulcst_filter_indexes[0]);
>>>    	if (rc != 0)
>>>    		goto fail2;
>>> @@ -1416,8 +1684,9 @@ ef10_filter_insert_encap_filters(
>>>    		if (rc != 0)
>>>    			goto fail1;
>>>    
>>> -		rc = ef10_filter_add_internal(enp, &spec, B_TRUE,
>>> -			    &table->eft_encap_filter_indexes[
>>> +		rc = ef10_filter_add_internal(enp, &spec,
>>> +		    EFX_FILTER_REPLACEMENT_NEVER,
>>> +		    &table->eft_encap_filter_indexes[
>>>    				    table->eft_encap_filter_count]);
>>>    		if (rc != 0) {
>>>    			if (rc != EACCES)
>>> @@ -1446,7 +1715,7 @@ ef10_filter_remove_old(
>>>    
>>>    	for (i = 0; i < EFX_ARRAY_SIZE(table->eft_entry); i++) {
>>>    		if (ef10_filter_entry_is_auto_old(table, i)) {
>>> -			(void) ef10_filter_delete_internal(enp, i);
>>> +			ef10_filter_delete_auto(enp, i);
>>>    		}
>>>    	}
>>>    }
>>> @@ -1521,19 +1790,19 @@ ef10_filter_reconfigure(
>>>    		 * has rebooted, which removes hardware filters).
>>>    		 */
>>>    		for (i = 0; i < table->eft_unicst_filter_count; i++) {
>>> -			(void) ef10_filter_delete_internal(enp,
>>> +			ef10_filter_delete_auto(enp,
>>>    					table->eft_unicst_filter_indexes[i]);
>>>    		}
>>>    		table->eft_unicst_filter_count = 0;
>>>    
>>>    		for (i = 0; i < table->eft_mulcst_filter_count; i++) {
>>> -			(void) ef10_filter_delete_internal(enp,
>>> +			ef10_filter_delete_auto(enp,
>>>    					table->eft_mulcst_filter_indexes[i]);
>>>    		}
>>>    		table->eft_mulcst_filter_count = 0;
>>>    
>>>    		for (i = 0; i < table->eft_encap_filter_count; i++) {
>>> -			(void) ef10_filter_delete_internal(enp,
>>> +			ef10_filter_delete_auto(enp,
>>>    					table->eft_encap_filter_indexes[i]);
>>>    		}
>>>    		table->eft_encap_filter_count = 0;
>>> diff --git a/drivers/net/sfc/base/ef10_impl.h b/drivers/net/sfc/base/ef10_impl.h
>>> index 7a00047829..67abf3b853 100644
>>> --- a/drivers/net/sfc/base/ef10_impl.h
>>> +++ b/drivers/net/sfc/base/ef10_impl.h
>>> @@ -1079,6 +1079,8 @@ ef10_rx_fini(
>>>    
>>>    #if EFSYS_OPT_FILTER
>>>    
>>> +enum efx_filter_replacement_policy_e;
>>> +
>>>    typedef struct ef10_filter_handle_s {
>>>    	uint32_t	efh_lo;
>>>    	uint32_t	efh_hi;
>>> @@ -1148,7 +1150,7 @@ ef10_filter_restore(
>>>    ef10_filter_add(
>>>    	__in		efx_nic_t *enp,
>>>    	__inout		efx_filter_spec_t *spec,
>>> -	__in		boolean_t may_replace);
>>> +	__in		enum efx_filter_replacement_policy_e policy);
>>>    
>>>    	__checkReturn	efx_rc_t
>>>    ef10_filter_delete(
>>> diff --git a/drivers/net/sfc/base/efx.h b/drivers/net/sfc/base/efx.h
>>> index c609c700fa..d94d3c02f7 100644
>>> --- a/drivers/net/sfc/base/efx.h
>>> +++ b/drivers/net/sfc/base/efx.h
>>> @@ -2949,6 +2949,7 @@ typedef uint8_t efx_filter_flags_t;
>>>    
>>>    typedef uint32_t efx_filter_match_flags_t;
>>>    
>>> +/* Filter priority from lowest to highest */
>>>    typedef enum efx_filter_priority_s {
>>>    	EFX_FILTER_PRI_AUTO = 0,	/* Automatic filter based on device
>>>    					 * address list or hardware
>>> @@ -2956,6 +2957,7 @@ typedef enum efx_filter_priority_s {
>>>    					 * by the filter implementation for
>>>    					 * each NIC type. */
>>>    	EFX_FILTER_PRI_MANUAL,		/* Manually configured filter */
>>> +	EFX_FILTER_NPRI,
>>>    } efx_filter_priority_t;
>>>    
>>>    /*
>>> @@ -2970,6 +2972,11 @@ typedef struct efx_filter_spec_s {
>>>    	uint16_t			efs_dmaq_id;
>>>    	uint32_t			efs_rss_context;
>>>    	uint32_t			efs_mark;
>>> +	/*
>>> +	 * Saved lower-priority filter. If it is set, it is restored on
>>> +	 * filter delete operation.
>>> +	 */
>>> +	struct efx_filter_spec_s	*efs_overridden_spec;
>>>    	/* Fields below here are hashed for software filter lookup */
>>>    	uint16_t			efs_outer_vid;
>>>    	uint16_t			efs_inner_vid;
>>> diff --git a/drivers/net/sfc/base/efx_filter.c b/drivers/net/sfc/base/efx_filter.c
>>> index 36332a2801..9949d05bb3 100644
>>> --- a/drivers/net/sfc/base/efx_filter.c
>>> +++ b/drivers/net/sfc/base/efx_filter.c
>>> @@ -28,7 +28,7 @@ static	__checkReturn	efx_rc_t
>>>    siena_filter_add(
>>>    	__in		efx_nic_t *enp,
>>>    	__inout		efx_filter_spec_t *spec,
>>> -	__in		boolean_t may_replace);
>>> +	__in		efx_filter_replacement_policy_t policy);
>>>    
>>>    static	__checkReturn	efx_rc_t
>>>    siena_filter_delete(
>>> @@ -98,7 +98,8 @@ efx_filter_insert(
>>>    		goto fail3;
>>>    	}
>>>    
>>> -	return (efop->efo_add(enp, spec, B_FALSE));
>>> +	return (efop->efo_add(enp, spec,
>>> +	    EFX_FILTER_REPLACEMENT_HIGHER_PRIORITY));
>>>    
>>>    fail3:
>>>    	EFSYS_PROBE(fail3);
>>> @@ -1444,7 +1445,7 @@ static	 __checkReturn	efx_rc_t
>>>    siena_filter_add(
>>>    	__in		efx_nic_t *enp,
>>>    	__inout		efx_filter_spec_t *spec,
>>> -	__in		boolean_t may_replace)
>>> +	__in		efx_filter_replacement_policy_t policy)
>>>    {
>>>    	efx_rc_t rc;
>>>    	siena_filter_spec_t sf_spec;
>>> @@ -1485,9 +1486,17 @@ siena_filter_add(
>>>    	saved_sf_spec = &sftp->sft_spec[filter_idx];
>>>    
>>>    	if (siena_filter_test_used(sftp, filter_idx)) {
>>> -		if (may_replace == B_FALSE) {
>>> +		/* All Siena filter are considered the same priority */
>>> +		switch (policy) {
>>> +		case EFX_FILTER_REPLACEMENT_NEVER:
>>> +		case EFX_FILTER_REPLACEMENT_HIGHER_PRIORITY:
>>>    			rc = EEXIST;
>>>    			goto fail4;
>>> +		case EFX_FILTER_REPLACEMENT_HIGHER_OR_EQUAL_PRIORITY:
>>> +			break;
>>> +		default:
>>> +			EFSYS_ASSERT(0);
>>> +			break;
>>>    		}
>>>    	}
>>>    	siena_filter_set_used(sftp, filter_idx);
>>> diff --git a/drivers/net/sfc/base/efx_impl.h b/drivers/net/sfc/base/efx_impl.h
>>> index 85d984f651..9755f4dfd2 100644
>>> --- a/drivers/net/sfc/base/efx_impl.h
>>> +++ b/drivers/net/sfc/base/efx_impl.h
>>> @@ -246,12 +246,31 @@ typedef struct efx_phy_ops_s {
>>>    } efx_phy_ops_t;
>>>    
>>>    #if EFSYS_OPT_FILTER
>>> +
>>> +/*
>>> + * Policy for replacing existing filter when inserting a new one.
>>> + * Note that all policies allow for storing the new lower priority
>>> + * filters as overridden by existing higher priority ones. It is needed
>>> + * to restore the lower priority filters on higher priority ones removal.
>>> + */
>>> +typedef enum efx_filter_replacement_policy_e {
>>> +	/* Cannot replace existing filter */
>>> +	EFX_FILTER_REPLACEMENT_NEVER,
>>> +	/* Higher priority filters can replace lower priotiry ones */
>>> +	EFX_FILTER_REPLACEMENT_HIGHER_PRIORITY,
>>> +	/*
>>> +	 * Higher priority filters can replace lower priority ones and
>>> +	 * equal priority filters can replace each other.
>>> +	 */
>>> +	EFX_FILTER_REPLACEMENT_HIGHER_OR_EQUAL_PRIORITY,
>>> +} efx_filter_replacement_policy_t;
>>> +
>>>    typedef struct efx_filter_ops_s {
>>>    	efx_rc_t	(*efo_init)(efx_nic_t *);
>>>    	void		(*efo_fini)(efx_nic_t *);
>>>    	efx_rc_t	(*efo_restore)(efx_nic_t *);
>>>    	efx_rc_t	(*efo_add)(efx_nic_t *, efx_filter_spec_t *,
>>> -				   boolean_t may_replace);
>>> +				   efx_filter_replacement_policy_t policy);
>>>    	efx_rc_t	(*efo_delete)(efx_nic_t *, efx_filter_spec_t *);
>>>    	efx_rc_t	(*efo_supported_filters)(efx_nic_t *, uint32_t *,
>>>    				   size_t, size_t *);

-- 
Best regards,
Igor


^ permalink raw reply	[flat|nested] 371+ messages in thread

* Re: [dpdk-stable] patch 'net/hinic/base: fix PF firmware hot-active problem' has been queued to stable release 19.11.3
  2020-05-19 13:03   ` [dpdk-stable] patch 'net/hinic/base: fix PF firmware hot-active problem' " luca.boccassi
@ 2020-05-20 12:29     ` Wangxiaoyun (Cloud)
  2020-05-20 12:48       ` Kevin Traynor
  2020-05-20 16:55       ` Luca Boccassi
  0 siblings, 2 replies; 371+ messages in thread
From: Wangxiaoyun (Cloud) @ 2020-05-20 12:29 UTC (permalink / raw)
  To: luca.boccassi; +Cc: dpdk stable, luoxingyu, yin.yinshi, luoxianjun, zhouguoyang

Hi Luca Boccassi,

These patches should be pushed to stable release 19.11.3 as follows:
      1) net/hinic: fix snprintf length   --fixed by Kevin Traynor
      2) net/hinic: fix repeating log and length check --fixed by Kevin Traynor
      3) net/hinic: alloc IO memory with socketid
      4) net/hinic: fix LRO problems

For hotupdate problem fixes, which needs the following 2 patches:
      5)net/hinic/base: fix hotupdate firmware problem
      6)net/hinic/base: fix PF firmware hotactive problem
      But I found the patch 6) may conflict with other patches, should I push a
new patch about patch 6) with 19.11 stable branch?

      And the other two patches also need to push to stable release:
      7) net/hinic: the queues resource free problem fixes
      8) net/hinic: the pkt len updates of mbuf fixes

Thanks.
Xiaoyun Wang

在 2020/5/19 21:03, luca.boccassi@gmail.com 写道:
> Hi,
> 
> FYI, your patch has been queued to stable release 19.11.3
> 
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 05/21/20. So please
> shout if anyone has objections.
> 
> Also note that after the patch there's a diff of the upstream commit vs the
> patch applied to the branch. This will indicate if there was any rebasing
> needed to apply to the stable branch. If there were code changes for rebasing
> (ie: not only metadata diffs), please double check that the rebase was
> correctly done.
> 
> Thanks.
> 
> Luca Boccassi
> 
> ---
>>From 11d98470395eff60937bbdff411b19f6ac00f76f Mon Sep 17 00:00:00 2001
> From: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
> Date: Fri, 10 Apr 2020 17:21:45 +0800
> Subject: [PATCH] net/hinic/base: fix PF firmware hot-active problem
> 
> [ upstream commit 036b61d85e4d1c45ac497a367c765ad463d2debf ]
> 
> When FW is hotactive which means updating the FW but not needs
> to reboot OS, FW returns HINIC_DEV_BUSY_ACTIVE_FW for pf driver
> because firmware is being reinitialized, at which point the cmdq
> initialization that relies on the fw channel will fail, so driver
> should reinit the cmdq when port start.
> 
> Fixes: 0194313b2df6 ("net/hinic/base: fix port start during FW hot update")
> 
> Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
> ---
>   drivers/net/hinic/base/hinic_pmd_cmdq.c  |  7 +++--
>   drivers/net/hinic/base/hinic_pmd_hwdev.c |  4 +--
>   drivers/net/hinic/base/hinic_pmd_mgmt.c  | 38 +++++++++++++-----------
>   drivers/net/hinic/base/hinic_pmd_mgmt.h  |  2 ++
>   drivers/net/hinic/base/hinic_pmd_nicio.c |  2 +-
>   5 files changed, 31 insertions(+), 22 deletions(-)
> 
> diff --git a/drivers/net/hinic/base/hinic_pmd_cmdq.c b/drivers/net/hinic/base/hinic_pmd_cmdq.c
> index 685498ec2f..2e98b9c286 100644
> --- a/drivers/net/hinic/base/hinic_pmd_cmdq.c
> +++ b/drivers/net/hinic/base/hinic_pmd_cmdq.c
> @@ -440,9 +440,12 @@ static int hinic_set_cmdq_ctxts(struct hinic_hwdev *hwdev)
>   					     cmdq_ctxt, in_size, NULL,
>   					     NULL, 0);
>   		if (err) {
> -			if (err == HINIC_MBOX_PF_BUSY_ACTIVE_FW)
> +			if (err == HINIC_MBOX_PF_BUSY_ACTIVE_FW ||
> +				err == HINIC_DEV_BUSY_ACTIVE_FW) {
>   				cmdqs->status |= HINIC_CMDQ_SET_FAIL;
> -			PMD_DRV_LOG(ERR, "Set cmdq ctxt failed");
> +				PMD_DRV_LOG(ERR, "PF or VF fw is hot active");
> +			}
> +			PMD_DRV_LOG(ERR, "Set cmdq ctxt failed, err: %d", err);
>   			return -EFAULT;
>   		}
>   	}
> diff --git a/drivers/net/hinic/base/hinic_pmd_hwdev.c b/drivers/net/hinic/base/hinic_pmd_hwdev.c
> index cf2a9701f2..fc11ecd7a4 100644
> --- a/drivers/net/hinic/base/hinic_pmd_hwdev.c
> +++ b/drivers/net/hinic/base/hinic_pmd_hwdev.c
> @@ -529,7 +529,7 @@ static int hinic_vf_rx_tx_flush(struct hinic_hwdev *hwdev)
>   
>   	err = hinic_reinit_cmdq_ctxts(hwdev);
>   	if (err)
> -		PMD_DRV_LOG(WARNING, "Reinit cmdq failed");
> +		PMD_DRV_LOG(WARNING, "Reinit cmdq failed when vf flush");
>   
>   	return err;
>   }
> @@ -587,7 +587,7 @@ static int hinic_pf_rx_tx_flush(struct hinic_hwdev *hwdev)
>   
>   	err = hinic_reinit_cmdq_ctxts(hwdev);
>   	if (err)
> -		PMD_DRV_LOG(WARNING, "Reinit cmdq failed");
> +		PMD_DRV_LOG(WARNING, "Reinit cmdq failed when pf flush");
>   
>   	return 0;
>   }
> diff --git a/drivers/net/hinic/base/hinic_pmd_mgmt.c b/drivers/net/hinic/base/hinic_pmd_mgmt.c
> index eee50a80d1..ea79c300af 100644
> --- a/drivers/net/hinic/base/hinic_pmd_mgmt.c
> +++ b/drivers/net/hinic/base/hinic_pmd_mgmt.c
> @@ -248,6 +248,19 @@ static void free_msg_buf(struct hinic_msg_pf_to_mgmt *pf_to_mgmt)
>   	free_recv_msg(&pf_to_mgmt->recv_msg_from_mgmt);
>   }
>   
> +static int hinic_get_mgmt_channel_status(void *hwdev)
> +{
> +	struct hinic_hwif *hwif = ((struct hinic_hwdev *)hwdev)->hwif;
> +	u32 val;
> +
> +	if (hinic_func_type((struct hinic_hwdev *)hwdev) == TYPE_VF)
> +		return false;
> +
> +	val = hinic_hwif_read_reg(hwif, HINIC_ICPL_RESERVD_ADDR);
> +
> +	return HINIC_GET_MGMT_CHANNEL_STATUS(val, MGMT_CHANNEL_STATUS);
> +}
> +
>   /**
>    * send_msg_to_mgmt_async - send async message
>    * @pf_to_mgmt: PF to MGMT channel
> @@ -309,6 +322,14 @@ static int send_msg_to_mgmt_sync(struct hinic_msg_pf_to_mgmt *pf_to_mgmt,
>   	u64 header;
>   	u16 cmd_size = mgmt_msg_len(msg_len);
>   
> +	/* If fw is hot active, return failed */
> +	if (hinic_get_mgmt_channel_status(pf_to_mgmt->hwdev)) {
> +		if (mod == HINIC_MOD_COMM || mod == HINIC_MOD_L2NIC)
> +			return HINIC_DEV_BUSY_ACTIVE_FW;
> +		else
> +			return -EBUSY;
> +	}
> +
>   	if (direction == HINIC_MSG_RESPONSE)
>   		prepare_header(pf_to_mgmt, &header, msg_len, mod, ack_type,
>   			       direction, cmd, resp_msg_id);
> @@ -462,19 +483,6 @@ unlock_sync_msg:
>   	return err;
>   }
>   
> -static int hinic_get_mgmt_channel_status(void *hwdev)
> -{
> -	struct hinic_hwif *hwif = ((struct hinic_hwdev *)hwdev)->hwif;
> -	u32 val;
> -
> -	if (hinic_func_type((struct hinic_hwdev *)hwdev) == TYPE_VF)
> -		return false;
> -
> -	val = hinic_hwif_read_reg(hwif, HINIC_ICPL_RESERVD_ADDR);
> -
> -	return HINIC_GET_MGMT_CHANNEL_STATUS(val, MGMT_CHANNEL_STATUS);
> -}
> -
>   int hinic_msg_to_mgmt_sync(void *hwdev, enum hinic_mod_type mod, u8 cmd,
>   			   void *buf_in, u16 in_size,
>   			   void *buf_out, u16 *out_size, u32 timeout)
> @@ -484,10 +492,6 @@ int hinic_msg_to_mgmt_sync(void *hwdev, enum hinic_mod_type mod, u8 cmd,
>   	if (!hwdev || in_size > HINIC_MSG_TO_MGMT_MAX_LEN)
>   		return -EINVAL;
>   
> -	/* If status is hot upgrading, don't send message to mgmt */
> -	if (hinic_get_mgmt_channel_status(hwdev))
> -		return -EPERM;
> -
>   	if (hinic_func_type(hwdev) == TYPE_VF) {
>   		rc = hinic_mbox_to_pf(hwdev, mod, cmd, buf_in, in_size,
>   					buf_out, out_size, timeout);
> diff --git a/drivers/net/hinic/base/hinic_pmd_mgmt.h b/drivers/net/hinic/base/hinic_pmd_mgmt.h
> index cc18843bf8..52b319ead4 100644
> --- a/drivers/net/hinic/base/hinic_pmd_mgmt.h
> +++ b/drivers/net/hinic/base/hinic_pmd_mgmt.h
> @@ -34,6 +34,8 @@
>   #define HINIC_MSG_HEADER_P2P_IDX_MASK				0xF
>   #define HINIC_MSG_HEADER_MSG_ID_MASK				0x3FF
>   
> +#define HINIC_DEV_BUSY_ACTIVE_FW				0xFE
> +
>   #define HINIC_MSG_HEADER_GET(val, member)			\
>   		(((val) >> HINIC_MSG_HEADER_##member##_SHIFT) & \
>   		HINIC_MSG_HEADER_##member##_MASK)
> diff --git a/drivers/net/hinic/base/hinic_pmd_nicio.c b/drivers/net/hinic/base/hinic_pmd_nicio.c
> index 31a13fbdcf..d3e8f2e74d 100644
> --- a/drivers/net/hinic/base/hinic_pmd_nicio.c
> +++ b/drivers/net/hinic/base/hinic_pmd_nicio.c
> @@ -536,7 +536,7 @@ int hinic_init_qp_ctxts(struct hinic_hwdev *hwdev)
>   	if (hwdev->cmdqs->status & HINIC_CMDQ_SET_FAIL) {
>   		err = hinic_reinit_cmdq_ctxts(hwdev);
>   		if (err) {
> -			PMD_DRV_LOG(ERR, "Reinit cmdq context failed, rc: %d\n",
> +			PMD_DRV_LOG(ERR, "Reinit cmdq context failed when dev start, err: %d",
>   				err);
>   			return err;
>   		}
> 


^ permalink raw reply	[flat|nested] 371+ messages in thread

* Re: [dpdk-stable] patch 'net/hinic/base: fix PF firmware hot-active problem' has been queued to stable release 19.11.3
  2020-05-20 12:29     ` Wangxiaoyun (Cloud)
@ 2020-05-20 12:48       ` Kevin Traynor
  2020-05-20 16:55       ` Luca Boccassi
  1 sibling, 0 replies; 371+ messages in thread
From: Kevin Traynor @ 2020-05-20 12:48 UTC (permalink / raw)
  To: Wangxiaoyun (Cloud), luca.boccassi
  Cc: dpdk stable, luoxingyu, yin.yinshi, luoxianjun, zhouguoyang

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=gbk, Size: 8266 bytes --]

On 20/05/2020 13:29, Wangxiaoyun (Cloud) wrote:
> Hi Luca Boccassi,
> 
> These patches should be pushed to stable release 19.11.3 as follows:
>       1) net/hinic: fix snprintf length   --fixed by Kevin Traynor
>       2) net/hinic: fix repeating log and length check --fixed by Kevin Traynor

These 2 ^ are already in the queue. Checked backport email yesterday and
there was only metadata changes - so should be no issues with them.

>       3) net/hinic: alloc IO memory with socketid
>       4) net/hinic: fix LRO problems
> 
> For hotupdate problem fixes, which needs the following 2 patches:
>       5)net/hinic/base: fix hotupdate firmware problem
>       6)net/hinic/base: fix PF firmware hotactive problem
>       But I found the patch 6) may conflict with other patches, should I push a
> new patch about patch 6) with 19.11 stable branch?
> 
>       And the other two patches also need to push to stable release:
>       7) net/hinic: the queues resource free problem fixes
>       8) net/hinic: the pkt len updates of mbuf fixes
> 
> Thanks.
> Xiaoyun Wang
> 
> 在 2020/5/19 21:03, luca.boccassi@gmail.com 写道:
>> Hi,
>>
>> FYI, your patch has been queued to stable release 19.11.3
>>
>> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
>> It will be pushed if I get no objections before 05/21/20. So please
>> shout if anyone has objections.
>>
>> Also note that after the patch there's a diff of the upstream commit vs the
>> patch applied to the branch. This will indicate if there was any rebasing
>> needed to apply to the stable branch. If there were code changes for rebasing
>> (ie: not only metadata diffs), please double check that the rebase was
>> correctly done.
>>
>> Thanks.
>>
>> Luca Boccassi
>>
>> ---
>> >From 11d98470395eff60937bbdff411b19f6ac00f76f Mon Sep 17 00:00:00 2001
>> From: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
>> Date: Fri, 10 Apr 2020 17:21:45 +0800
>> Subject: [PATCH] net/hinic/base: fix PF firmware hot-active problem
>>
>> [ upstream commit 036b61d85e4d1c45ac497a367c765ad463d2debf ]
>>
>> When FW is hotactive which means updating the FW but not needs
>> to reboot OS, FW returns HINIC_DEV_BUSY_ACTIVE_FW for pf driver
>> because firmware is being reinitialized, at which point the cmdq
>> initialization that relies on the fw channel will fail, so driver
>> should reinit the cmdq when port start.
>>
>> Fixes: 0194313b2df6 ("net/hinic/base: fix port start during FW hot update")
>>
>> Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
>> ---
>>   drivers/net/hinic/base/hinic_pmd_cmdq.c  |  7 +++--
>>   drivers/net/hinic/base/hinic_pmd_hwdev.c |  4 +--
>>   drivers/net/hinic/base/hinic_pmd_mgmt.c  | 38 +++++++++++++-----------
>>   drivers/net/hinic/base/hinic_pmd_mgmt.h  |  2 ++
>>   drivers/net/hinic/base/hinic_pmd_nicio.c |  2 +-
>>   5 files changed, 31 insertions(+), 22 deletions(-)
>>
>> diff --git a/drivers/net/hinic/base/hinic_pmd_cmdq.c b/drivers/net/hinic/base/hinic_pmd_cmdq.c
>> index 685498ec2f..2e98b9c286 100644
>> --- a/drivers/net/hinic/base/hinic_pmd_cmdq.c
>> +++ b/drivers/net/hinic/base/hinic_pmd_cmdq.c
>> @@ -440,9 +440,12 @@ static int hinic_set_cmdq_ctxts(struct hinic_hwdev *hwdev)
>>   					     cmdq_ctxt, in_size, NULL,
>>   					     NULL, 0);
>>   		if (err) {
>> -			if (err == HINIC_MBOX_PF_BUSY_ACTIVE_FW)
>> +			if (err == HINIC_MBOX_PF_BUSY_ACTIVE_FW ||
>> +				err == HINIC_DEV_BUSY_ACTIVE_FW) {
>>   				cmdqs->status |= HINIC_CMDQ_SET_FAIL;
>> -			PMD_DRV_LOG(ERR, "Set cmdq ctxt failed");
>> +				PMD_DRV_LOG(ERR, "PF or VF fw is hot active");
>> +			}
>> +			PMD_DRV_LOG(ERR, "Set cmdq ctxt failed, err: %d", err);
>>   			return -EFAULT;
>>   		}
>>   	}
>> diff --git a/drivers/net/hinic/base/hinic_pmd_hwdev.c b/drivers/net/hinic/base/hinic_pmd_hwdev.c
>> index cf2a9701f2..fc11ecd7a4 100644
>> --- a/drivers/net/hinic/base/hinic_pmd_hwdev.c
>> +++ b/drivers/net/hinic/base/hinic_pmd_hwdev.c
>> @@ -529,7 +529,7 @@ static int hinic_vf_rx_tx_flush(struct hinic_hwdev *hwdev)
>>   
>>   	err = hinic_reinit_cmdq_ctxts(hwdev);
>>   	if (err)
>> -		PMD_DRV_LOG(WARNING, "Reinit cmdq failed");
>> +		PMD_DRV_LOG(WARNING, "Reinit cmdq failed when vf flush");
>>   
>>   	return err;
>>   }
>> @@ -587,7 +587,7 @@ static int hinic_pf_rx_tx_flush(struct hinic_hwdev *hwdev)
>>   
>>   	err = hinic_reinit_cmdq_ctxts(hwdev);
>>   	if (err)
>> -		PMD_DRV_LOG(WARNING, "Reinit cmdq failed");
>> +		PMD_DRV_LOG(WARNING, "Reinit cmdq failed when pf flush");
>>   
>>   	return 0;
>>   }
>> diff --git a/drivers/net/hinic/base/hinic_pmd_mgmt.c b/drivers/net/hinic/base/hinic_pmd_mgmt.c
>> index eee50a80d1..ea79c300af 100644
>> --- a/drivers/net/hinic/base/hinic_pmd_mgmt.c
>> +++ b/drivers/net/hinic/base/hinic_pmd_mgmt.c
>> @@ -248,6 +248,19 @@ static void free_msg_buf(struct hinic_msg_pf_to_mgmt *pf_to_mgmt)
>>   	free_recv_msg(&pf_to_mgmt->recv_msg_from_mgmt);
>>   }
>>   
>> +static int hinic_get_mgmt_channel_status(void *hwdev)
>> +{
>> +	struct hinic_hwif *hwif = ((struct hinic_hwdev *)hwdev)->hwif;
>> +	u32 val;
>> +
>> +	if (hinic_func_type((struct hinic_hwdev *)hwdev) == TYPE_VF)
>> +		return false;
>> +
>> +	val = hinic_hwif_read_reg(hwif, HINIC_ICPL_RESERVD_ADDR);
>> +
>> +	return HINIC_GET_MGMT_CHANNEL_STATUS(val, MGMT_CHANNEL_STATUS);
>> +}
>> +
>>   /**
>>    * send_msg_to_mgmt_async - send async message
>>    * @pf_to_mgmt: PF to MGMT channel
>> @@ -309,6 +322,14 @@ static int send_msg_to_mgmt_sync(struct hinic_msg_pf_to_mgmt *pf_to_mgmt,
>>   	u64 header;
>>   	u16 cmd_size = mgmt_msg_len(msg_len);
>>   
>> +	/* If fw is hot active, return failed */
>> +	if (hinic_get_mgmt_channel_status(pf_to_mgmt->hwdev)) {
>> +		if (mod == HINIC_MOD_COMM || mod == HINIC_MOD_L2NIC)
>> +			return HINIC_DEV_BUSY_ACTIVE_FW;
>> +		else
>> +			return -EBUSY;
>> +	}
>> +
>>   	if (direction == HINIC_MSG_RESPONSE)
>>   		prepare_header(pf_to_mgmt, &header, msg_len, mod, ack_type,
>>   			       direction, cmd, resp_msg_id);
>> @@ -462,19 +483,6 @@ unlock_sync_msg:
>>   	return err;
>>   }
>>   
>> -static int hinic_get_mgmt_channel_status(void *hwdev)
>> -{
>> -	struct hinic_hwif *hwif = ((struct hinic_hwdev *)hwdev)->hwif;
>> -	u32 val;
>> -
>> -	if (hinic_func_type((struct hinic_hwdev *)hwdev) == TYPE_VF)
>> -		return false;
>> -
>> -	val = hinic_hwif_read_reg(hwif, HINIC_ICPL_RESERVD_ADDR);
>> -
>> -	return HINIC_GET_MGMT_CHANNEL_STATUS(val, MGMT_CHANNEL_STATUS);
>> -}
>> -
>>   int hinic_msg_to_mgmt_sync(void *hwdev, enum hinic_mod_type mod, u8 cmd,
>>   			   void *buf_in, u16 in_size,
>>   			   void *buf_out, u16 *out_size, u32 timeout)
>> @@ -484,10 +492,6 @@ int hinic_msg_to_mgmt_sync(void *hwdev, enum hinic_mod_type mod, u8 cmd,
>>   	if (!hwdev || in_size > HINIC_MSG_TO_MGMT_MAX_LEN)
>>   		return -EINVAL;
>>   
>> -	/* If status is hot upgrading, don't send message to mgmt */
>> -	if (hinic_get_mgmt_channel_status(hwdev))
>> -		return -EPERM;
>> -
>>   	if (hinic_func_type(hwdev) == TYPE_VF) {
>>   		rc = hinic_mbox_to_pf(hwdev, mod, cmd, buf_in, in_size,
>>   					buf_out, out_size, timeout);
>> diff --git a/drivers/net/hinic/base/hinic_pmd_mgmt.h b/drivers/net/hinic/base/hinic_pmd_mgmt.h
>> index cc18843bf8..52b319ead4 100644
>> --- a/drivers/net/hinic/base/hinic_pmd_mgmt.h
>> +++ b/drivers/net/hinic/base/hinic_pmd_mgmt.h
>> @@ -34,6 +34,8 @@
>>   #define HINIC_MSG_HEADER_P2P_IDX_MASK				0xF
>>   #define HINIC_MSG_HEADER_MSG_ID_MASK				0x3FF
>>   
>> +#define HINIC_DEV_BUSY_ACTIVE_FW				0xFE
>> +
>>   #define HINIC_MSG_HEADER_GET(val, member)			\
>>   		(((val) >> HINIC_MSG_HEADER_##member##_SHIFT) & \
>>   		HINIC_MSG_HEADER_##member##_MASK)
>> diff --git a/drivers/net/hinic/base/hinic_pmd_nicio.c b/drivers/net/hinic/base/hinic_pmd_nicio.c
>> index 31a13fbdcf..d3e8f2e74d 100644
>> --- a/drivers/net/hinic/base/hinic_pmd_nicio.c
>> +++ b/drivers/net/hinic/base/hinic_pmd_nicio.c
>> @@ -536,7 +536,7 @@ int hinic_init_qp_ctxts(struct hinic_hwdev *hwdev)
>>   	if (hwdev->cmdqs->status & HINIC_CMDQ_SET_FAIL) {
>>   		err = hinic_reinit_cmdq_ctxts(hwdev);
>>   		if (err) {
>> -			PMD_DRV_LOG(ERR, "Reinit cmdq context failed, rc: %d\n",
>> +			PMD_DRV_LOG(ERR, "Reinit cmdq context failed when dev start, err: %d",
>>   				err);
>>   			return err;
>>   		}
>>
> 


^ permalink raw reply	[flat|nested] 371+ messages in thread

* Re: [dpdk-stable] patch 'net/sfc/base: handle manual and auto filter clashes in EF10' has been queued to stable release 19.11.3
  2020-05-20 12:12       ` Igor Romanov
@ 2020-05-20 16:50         ` Luca Boccassi
  0 siblings, 0 replies; 371+ messages in thread
From: Luca Boccassi @ 2020-05-20 16:50 UTC (permalink / raw)
  To: Igor Romanov; +Cc: Andrew Rybchenko, dpdk stable

Yes, this is not an issue specific to the stable branch. So it needs to
go in master first, and then it will be backported.

On Wed, 2020-05-20 at 15:12 +0300, Igor Romanov wrote:
> No, it is not present in master. Should I send it separately?
> 
> On 5/20/20 2:57 PM, Luca Boccassi wrote:
> > The attached change does not seem to be present in master?
> > 
> > On Wed, 2020-05-20 at 12:53 +0300, Igor Romanov wrote:
> > > Hi!
> > > 
> > > The patch has an issue that is fixed in the attached patch.
> > > 
> > > On 5/19/20 3:53 PM, luca.boccassi@gmail.com wrote:
> > > > Hi,
> > > > 
> > > > FYI, your patch has been queued to stable release 19.11.3
> > > > 
> > > > Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> > > > It will be pushed if I get no objections before 05/21/20. So please
> > > > shout if anyone has objections.
> > > > 
> > > > Also note that after the patch there's a diff of the upstream commit vs the
> > > > patch applied to the branch. This will indicate if there was any rebasing
> > > > needed to apply to the stable branch. If there were code changes for rebasing
> > > > (ie: not only metadata diffs), please double check that the rebase was
> > > > correctly done.
> > > > 
> > > > Thanks.
> > > > 
> > > > Luca Boccassi
> > > > 
> > > > ---
> > > > >  From 8ea2ea8fe40c8a13bca536bcb4683d9225cd0ea2 Mon Sep 17 00:00:00 2001
> > > > From: Igor Romanov <igor.romanov@oktetlabs.ru>
> > > > Date: Tue, 10 Mar 2020 09:48:39 +0000
> > > > Subject: [PATCH] net/sfc/base: handle manual and auto filter clashes in EF10
> > > > 
> > > > [ upstream commit 585c22edb29cc3cfdb3628c41effd8ff3b75f224 ]
> > > > 
> > > > Make user filters a priority in EF10 datapath. When a manual
> > > > filter with a specification that is equal to an existing auto
> > > > filter is inserted, the manual filter:
> > > > - replaces auto filter if the specification is exclusive;
> > > > - is inserted along existing auto filter otherwise;
> > > > 
> > > > In the first case the auto filter that was replaced is saved.
> > > > This saved filter can be updated on filter reconfiguration and
> > > > is restored on the manual filter removal.
> > > > 
> > > > Fixes: e7cd430c864f ("net/sfc/base: import SFN7xxx family support")
> > > > 
> > > > Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
> > > > Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
> > > > ---
> > > >    drivers/net/sfc/base/ef10_filter.c | 519 ++++++++++++++++++++++-------
> > > >    drivers/net/sfc/base/ef10_impl.h   |   4 +-
> > > >    drivers/net/sfc/base/efx.h         |   7 +
> > > >    drivers/net/sfc/base/efx_filter.c  |  17 +-
> > > >    drivers/net/sfc/base/efx_impl.h    |  21 +-
> > > >    5 files changed, 437 insertions(+), 131 deletions(-)
> > > > 
> > > > diff --git a/drivers/net/sfc/base/ef10_filter.c b/drivers/net/sfc/base/ef10_filter.c
> > > > index 5578765ab3..12802a3d13 100644
> > > > --- a/drivers/net/sfc/base/ef10_filter.c
> > > > +++ b/drivers/net/sfc/base/ef10_filter.c
> > > > @@ -590,6 +590,231 @@ fail1:
> > > >    	return (rc);
> > > >    }
> > > >    
> > > > +enum ef10_filter_add_action_e {
> > > > +	/* Insert a new filter */
> > > > +	EF10_FILTER_ADD_NEW,
> > > > +	/*
> > > > +	 * Replace old filter with a new, overriding the old one
> > > > +	 * if it has lower priority.
> > > > +	 */
> > > > +	EF10_FILTER_ADD_REPLACE,
> > > > +	/* Store new, lower priority filter as overridden by old filter */
> > > > +	EF10_FILTER_ADD_STORE,
> > > > +	/* Special case for AUTO filters, remove AUTO_OLD flag */
> > > > +	EF10_FILTER_ADD_REFRESH,
> > > > +};
> > > > +
> > > > +static	__checkReturn	efx_rc_t
> > > > +ef10_filter_add_lookup_equal_spec(
> > > > +	__in		efx_filter_spec_t *spec,
> > > > +	__in		efx_filter_spec_t *probe_spec,
> > > > +	__in		efx_filter_replacement_policy_t policy,
> > > > +	__out		boolean_t *found)
> > > > +{
> > > > +	efx_rc_t rc;
> > > > +
> > > > +	/* Refreshing AUTO filter */
> > > > +	if (spec->efs_priority == EFX_FILTER_PRI_AUTO &&
> > > > +	    probe_spec->efs_priority == EFX_FILTER_PRI_AUTO) {
> > > > +		*found = B_TRUE;
> > > > +		return (0);
> > > > +	}
> > > > +
> > > > +	/*
> > > > +	 * With exclusive filters, higher priority ones
> > > > +	 * override lower priority ones, and lower priority
> > > > +	 * ones are stored in case the higher priority one
> > > > +	 * is removed.
> > > > +	 */
> > > > +	if (ef10_filter_is_exclusive(spec)) {
> > > > +		switch (policy) {
> > > > +		case EFX_FILTER_REPLACEMENT_HIGHER_OR_EQUAL_PRIORITY:
> > > > +			if (spec->efs_priority == probe_spec->efs_priority) {
> > > > +				*found = B_TRUE;
> > > > +				break;
> > > > +			}
> > > > +			/* Fall-through */
> > > > +		case EFX_FILTER_REPLACEMENT_HIGHER_PRIORITY:
> > > > +			if (spec->efs_priority > probe_spec->efs_priority) {
> > > > +				*found = B_TRUE;
> > > > +				break;
> > > > +			}
> > > > +			/* Fall-through */
> > > > +		case EFX_FILTER_REPLACEMENT_NEVER:
> > > > +			/*
> > > > +			 * Lower priority filter needs to be
> > > > +			 * stored. It does *not* replace the
> > > > +			 * old one. That is why EEXIST is not
> > > > +			 * returned in that case.
> > > > +			 */
> > > > +			if (spec->efs_priority < probe_spec->efs_priority) {
> > > > +				*found = B_TRUE;
> > > > +				break;
> > > > +			} else {
> > > > +				rc = EEXIST;
> > > > +				goto fail1;
> > > > +			}
> > > > +		default:
> > > > +			EFSYS_ASSERT(0);
> > > > +			rc = EEXIST;
> > > > +			goto fail2;
> > > > +		}
> > > > +	} else {
> > > > +		*found = B_FALSE;
> > > > +	}
> > > > +
> > > > +	return (0);
> > > > +
> > > > +fail2:
> > > > +	EFSYS_PROBE(fail2);
> > > > +
> > > > +fail1:
> > > > +	EFSYS_PROBE1(fail1, efx_rc_t, rc);
> > > > +
> > > > +	return (rc);
> > > > +}
> > > > +
> > > > +
> > > > +static			void
> > > > +ef10_filter_add_select_action(
> > > > +	__in		efx_filter_spec_t *saved_spec,
> > > > +	__in		efx_filter_spec_t *spec,
> > > > +	__out		enum ef10_filter_add_action_e *action,
> > > > +	__out		efx_filter_spec_t **overridden_spec)
> > > > +{
> > > > +	efx_filter_spec_t *overridden = NULL;
> > > > +
> > > > +	if (saved_spec == NULL) {
> > > > +		*action = EF10_FILTER_ADD_NEW;
> > > > +	} else if (ef10_filter_is_exclusive(spec) == B_FALSE) {
> > > > +		/*
> > > > +		 * Non-exclusive filters are always stored in separate entries
> > > > +		 * in the table. The only case involving a saved spec is
> > > > +		 * refreshing an AUTO filter.
> > > > +		 */
> > > > +		EFSYS_ASSERT(saved_spec->efs_overridden_spec == NULL);
> > > > +		EFSYS_ASSERT(spec->efs_priority == EFX_FILTER_PRI_AUTO);
> > > > +		EFSYS_ASSERT(saved_spec->efs_priority == EFX_FILTER_PRI_AUTO);
> > > > +		*action = EF10_FILTER_ADD_REFRESH;
> > > > +	} else {
> > > > +		/* Exclusive filters stored in the same entry */
> > > > +		if (spec->efs_priority > saved_spec->efs_priority) {
> > > > +			/*
> > > > +			 * Insert a high priority filter over a lower priority
> > > > +			 * one. Only two priority levels are implemented, so
> > > > +			 * there must not already be an overridden filter.
> > > > +			 */
> > > > +			EFX_STATIC_ASSERT(EFX_FILTER_NPRI == 2);
> > > > +			EFSYS_ASSERT(saved_spec->efs_overridden_spec == NULL);
> > > > +			overridden = saved_spec;
> > > > +			*action = EF10_FILTER_ADD_REPLACE;
> > > > +		} else if (spec->efs_priority == saved_spec->efs_priority) {
> > > > +			/* Replace in-place or refresh an existing filter */
> > > > +			if (spec->efs_priority == EFX_FILTER_PRI_AUTO)
> > > > +				*action = EF10_FILTER_ADD_REFRESH;
> > > > +			else
> > > > +				*action = EF10_FILTER_ADD_REPLACE;
> > > > +		} else {
> > > > +			/*
> > > > +			 * Insert a lower priority filter, storing it in case
> > > > +			 * the higher priority filter is removed.
> > > > +			 *
> > > > +			 * Currently there are only two priority levels, so this
> > > > +			 * must be an AUTO filter.
> > > > +			 */
> > > > +			EFX_STATIC_ASSERT(EFX_FILTER_NPRI == 2);
> > > > +			EFSYS_ASSERT(spec->efs_priority == EFX_FILTER_PRI_AUTO);
> > > > +			if (saved_spec->efs_overridden_spec != NULL) {
> > > > +				*action = EF10_FILTER_ADD_REFRESH;
> > > > +			} else {
> > > > +				overridden = spec;
> > > > +				*action = EF10_FILTER_ADD_STORE;
> > > > +			}
> > > > +		}
> > > > +	}
> > > > +
> > > > +	*overridden_spec = overridden;
> > > > +}
> > > > +
> > > > +static	__checkReturn	efx_rc_t
> > > > +ef10_filter_add_execute_action(
> > > > +	__in		efx_nic_t *enp,
> > > > +	__in		efx_filter_spec_t *saved_spec,
> > > > +	__in		efx_filter_spec_t *spec,
> > > > +	__in		efx_filter_spec_t *overridden_spec,
> > > > +	__in		enum ef10_filter_add_action_e action,
> > > > +	__in		int ins_index)
> > > > +{
> > > > +	ef10_filter_table_t *eftp = enp->en_filter.ef_ef10_filter_table;
> > > > +	efsys_lock_state_t state;
> > > > +	efx_rc_t rc;
> > > > +
> > > > +	EFSYS_LOCK(enp->en_eslp, state);
> > > > +
> > > > +	if (action == EF10_FILTER_ADD_REFRESH) {
> > > > +		ef10_filter_set_entry_not_auto_old(eftp, ins_index);
> > > > +		goto out_unlock;
> > > > +	} else if (action == EF10_FILTER_ADD_STORE) {
> > > > +		EFSYS_ASSERT(overridden_spec != NULL);
> > > > +		saved_spec->efs_overridden_spec = overridden_spec;
> > > > +		goto out_unlock;
> > > > +	}
> > > > +
> > > > +	EFSYS_UNLOCK(enp->en_eslp, state);
> > > > +
> > > > +	switch (action) {
> > > > +	case EF10_FILTER_ADD_REPLACE:
> > > > +		/*
> > > > +		 * On replacing the filter handle may change after a
> > > > +		 * successful replace operation.
> > > > +		 */
> > > > +		rc = efx_mcdi_filter_op_add(enp, spec,
> > > > +		    MC_CMD_FILTER_OP_IN_OP_REPLACE,
> > > > +		    &eftp->eft_entry[ins_index].efe_handle);
> > > > +		break;
> > > > +	case EF10_FILTER_ADD_NEW:
> > > > +		if (ef10_filter_is_exclusive(spec)) {
> > > > +			rc = efx_mcdi_filter_op_add(enp, spec,
> > > > +			    MC_CMD_FILTER_OP_IN_OP_INSERT,
> > > > +			    &eftp->eft_entry[ins_index].efe_handle);
> > > > +		} else {
> > > > +			rc = efx_mcdi_filter_op_add(enp, spec,
> > > > +			    MC_CMD_FILTER_OP_IN_OP_SUBSCRIBE,
> > > > +			    &eftp->eft_entry[ins_index].efe_handle);
> > > > +		}
> > > > +		break;
> > > > +	default:
> > > > +		rc = EINVAL;
> > > > +		EFSYS_ASSERT(0);
> > > > +		break;
> > > > +	}
> > > > +	if (rc != 0)
> > > > +		goto fail1;
> > > > +
> > > > +	EFSYS_LOCK(enp->en_eslp, state);
> > > > +
> > > > +	if (action == EF10_FILTER_ADD_REPLACE) {
> > > > +		/* Update the fields that may differ */
> > > > +		saved_spec->efs_priority = spec->efs_priority;
> > > > +		saved_spec->efs_flags = spec->efs_flags;
> > > > +		saved_spec->efs_rss_context = spec->efs_rss_context;
> > > > +		saved_spec->efs_dmaq_id = spec->efs_dmaq_id;
> > > > +
> > > > +		if (overridden_spec != NULL)
> > > > +			saved_spec->efs_overridden_spec = overridden_spec;
> > > > +	}
> > > > +
> > > > +out_unlock:
> > > > +	EFSYS_UNLOCK(enp->en_eslp, state);
> > > > +
> > > > +	return (0);
> > > > +
> > > > +fail1:
> > > > +	EFSYS_PROBE1(fail1, efx_rc_t, rc);
> > > > +
> > > > +	return (rc);
> > > > +}
> > > > +
> > > >    /*
> > > >     * An arbitrary search limit for the software hash table. As per the linux net
> > > >     * driver.
> > > > @@ -600,22 +825,24 @@ static	__checkReturn	efx_rc_t
> > > >    ef10_filter_add_internal(
> > > >    	__in		efx_nic_t *enp,
> > > >    	__inout		efx_filter_spec_t *spec,
> > > > -	__in		boolean_t may_replace,
> > > > +	__in		efx_filter_replacement_policy_t policy,
> > > >    	__out_opt	uint32_t *filter_id)
> > > >    {
> > > >    	efx_rc_t rc;
> > > >    	ef10_filter_table_t *eftp = enp->en_filter.ef_ef10_filter_table;
> > > > +	enum ef10_filter_add_action_e action;
> > > > +	efx_filter_spec_t *overridden_spec = NULL;
> > > >    	efx_filter_spec_t *saved_spec;
> > > >    	uint32_t hash;
> > > >    	unsigned int depth;
> > > >    	int ins_index;
> > > > -	boolean_t replacing = B_FALSE;
> > > > -	unsigned int i;
> > > >    	efsys_lock_state_t state;
> > > >    	boolean_t locked = B_FALSE;
> > > >    
> > > >    	EFSYS_ASSERT(EFX_FAMILY_IS_EF10(enp));
> > > >    
> > > > +	EFSYS_ASSERT(spec->efs_overridden_spec == NULL);
> > > > +
> > > >    	hash = ef10_filter_hash(spec);
> > > >    
> > > >    	/*
> > > > @@ -635,35 +862,33 @@ retry:
> > > >    	ins_index = -1;
> > > >    
> > > >    	for (depth = 1; depth <= EF10_FILTER_SEARCH_LIMIT; depth++) {
> > > > -		i = (hash + depth) & (EFX_EF10_FILTER_TBL_ROWS - 1);
> > > > -		saved_spec = ef10_filter_entry_spec(eftp, i);
> > > > +		unsigned int probe_index;
> > > > +		efx_filter_spec_t *probe_spec;
> > > >    
> > > > -		if (saved_spec == NULL) {
> > > > +		probe_index = (hash + depth) & (EFX_EF10_FILTER_TBL_ROWS - 1);
> > > > +		probe_spec = ef10_filter_entry_spec(eftp, probe_index);
> > > > +
> > > > +		if (probe_spec == NULL) {
> > > >    			if (ins_index < 0)
> > > > -				ins_index = i;
> > > > -		} else if (ef10_filter_equal(spec, saved_spec)) {
> > > > -			if (ef10_filter_entry_is_busy(eftp, i)) {
> > > > +				ins_index = probe_index;
> > > > +		} else if (ef10_filter_equal(spec, probe_spec)) {
> > > > +			boolean_t found;
> > > > +
> > > > +			if (ef10_filter_entry_is_busy(eftp, probe_index)) {
> > > >    				EFSYS_UNLOCK(enp->en_eslp, state);
> > > >    				locked = B_FALSE;
> > > >    				goto retry;
> > > >    			}
> > > >    
> > > > -			if (saved_spec->efs_priority == EFX_FILTER_PRI_AUTO) {
> > > > -				ins_index = i;
> > > > -				goto found;
> > > > -			}
> > > > +			rc = ef10_filter_add_lookup_equal_spec(spec,
> > > > +			    probe_spec, policy, &found);
> > > > +			if (rc != 0)
> > > > +				goto fail1;
> > > >    
> > > > -			if (ef10_filter_is_exclusive(spec)) {
> > > > -				if (may_replace) {
> > > > -					ins_index = i;
> > > > -					goto found;
> > > > -				} else {
> > > > -					rc = EEXIST;
> > > > -					goto fail1;
> > > > -				}
> > > > +			if (found != B_FALSE) {
> > > > +				ins_index = probe_index;
> > > > +				break;
> > > >    			}
> > > > -
> > > > -			/* Leave existing */
> > > >    		}
> > > >    	}
> > > >    
> > > > @@ -676,93 +901,90 @@ retry:
> > > >    		goto fail2;
> > > >    	}
> > > >    
> > > > -found:
> > > >    	/*
> > > > -	 * Create a software table entry if necessary, and mark it
> > > > -	 * busy.  We might yet fail to insert, but any attempt to
> > > > -	 * insert a conflicting filter while we're waiting for the
> > > > -	 * firmware must find the busy entry.
> > > > +	 * Mark software table entry busy. We might yet fail to insert,
> > > > +	 * but any attempt to insert a conflicting filter while we're
> > > > +	 * waiting for the firmware must find the busy entry.
> > > >    	 */
> > > > +	ef10_filter_set_entry_busy(eftp, ins_index);
> > > > +
> > > >    	saved_spec = ef10_filter_entry_spec(eftp, ins_index);
> > > > -	if (saved_spec) {
> > > > -		if (saved_spec->efs_priority == EFX_FILTER_PRI_AUTO) {
> > > > -			/* This is a filter we are refreshing */
> > > > -			ef10_filter_set_entry_not_auto_old(eftp, ins_index);
> > > > -			goto out_unlock;
> > > > +	ef10_filter_add_select_action(saved_spec, spec, &action,
> > > > +	    &overridden_spec);
> > > >    
> > > > -		}
> > > > -		replacing = B_TRUE;
> > > > -	} else {
> > > > -		EFSYS_KMEM_ALLOC(enp->en_esip, sizeof (*spec), saved_spec);
> > > > -		if (!saved_spec) {
> > > > +	/*
> > > > +	 * Allocate a new filter if found entry is empty or
> > > > +	 * a filter should be overridden.
> > > > +	 */
> > > > +	if (overridden_spec != NULL || saved_spec == NULL) {
> > > > +		efx_filter_spec_t *new_spec;
> > > > +
> > > > +		EFSYS_UNLOCK(enp->en_eslp, state);
> > > > +		locked = B_FALSE;
> > > > +
> > > > +		EFSYS_KMEM_ALLOC(enp->en_esip, sizeof (*new_spec), new_spec);
> > > > +		if (new_spec == NULL) {
> > > >    			rc = ENOMEM;
> > > > +			overridden_spec = NULL;
> > > >    			goto fail3;
> > > >    		}
> > > > -		*saved_spec = *spec;
> > > > -		ef10_filter_set_entry(eftp, ins_index, saved_spec);
> > > > +
> > > > +		EFSYS_LOCK(enp->en_eslp, state);
> > > > +		locked = B_TRUE;
> > > > +
> > > > +		if (saved_spec == NULL) {
> > > > +			*new_spec = *spec;
> > > > +			ef10_filter_set_entry(eftp, ins_index, new_spec);
> > > > +		} else {
> > > > +			*new_spec = *overridden_spec;
> > > > +			overridden_spec = new_spec;
> > > > +		}
> > > >    	}
> > > > -	ef10_filter_set_entry_busy(eftp, ins_index);
> > > >    
> > > >    	EFSYS_UNLOCK(enp->en_eslp, state);
> > > >    	locked = B_FALSE;
> > > >    
> > > > -	/*
> > > > -	 * On replacing the filter handle may change after after a successful
> > > > -	 * replace operation.
> > > > -	 */
> > > > -	if (replacing) {
> > > > -		rc = efx_mcdi_filter_op_add(enp, spec,
> > > > -		    MC_CMD_FILTER_OP_IN_OP_REPLACE,
> > > > -		    &eftp->eft_entry[ins_index].efe_handle);
> > > > -	} else if (ef10_filter_is_exclusive(spec)) {
> > > > -		rc = efx_mcdi_filter_op_add(enp, spec,
> > > > -		    MC_CMD_FILTER_OP_IN_OP_INSERT,
> > > > -		    &eftp->eft_entry[ins_index].efe_handle);
> > > > -	} else {
> > > > -		rc = efx_mcdi_filter_op_add(enp, spec,
> > > > -		    MC_CMD_FILTER_OP_IN_OP_SUBSCRIBE,
> > > > -		    &eftp->eft_entry[ins_index].efe_handle);
> > > > -	}
> > > > -
> > > > +	rc = ef10_filter_add_execute_action(enp, saved_spec, spec,
> > > > +	    overridden_spec, action, ins_index);
> > > >    	if (rc != 0)
> > > >    		goto fail4;
> > > >    
> > > > -	EFSYS_LOCK(enp->en_eslp, state);
> > > > -	locked = B_TRUE;
> > > > -
> > > > -	if (replacing) {
> > > > -		/* Update the fields that may differ */
> > > > -		saved_spec->efs_priority = spec->efs_priority;
> > > > -		saved_spec->efs_flags = spec->efs_flags;
> > > > -		saved_spec->efs_rss_context = spec->efs_rss_context;
> > > > -		saved_spec->efs_dmaq_id = spec->efs_dmaq_id;
> > > > -	}
> > > > -
> > > > -	ef10_filter_set_entry_not_busy(eftp, ins_index);
> > > > -
> > > > -out_unlock:
> > > > -
> > > > -	EFSYS_UNLOCK(enp->en_eslp, state);
> > > > -	locked = B_FALSE;
> > > > -
> > > >    	if (filter_id)
> > > >    		*filter_id = ins_index;
> > > >    
> > > > +	EFSYS_LOCK(enp->en_eslp, state);
> > > > +	ef10_filter_set_entry_not_busy(eftp, ins_index);
> > > > +	EFSYS_UNLOCK(enp->en_eslp, state);
> > > > +
> > > >    	return (0);
> > > >    
> > > >    fail4:
> > > >    	EFSYS_PROBE(fail4);
> > > >    
> > > > -	if (!replacing) {
> > > > -		EFSYS_KMEM_FREE(enp->en_esip, sizeof (*spec), saved_spec);
> > > > -		saved_spec = NULL;
> > > > +	EFSYS_ASSERT(locked == B_FALSE);
> > > > +	EFSYS_LOCK(enp->en_eslp, state);
> > > > +
> > > > +	if (action == EF10_FILTER_ADD_NEW) {
> > > > +		EFSYS_KMEM_FREE(enp->en_esip, sizeof (*spec),
> > > > +		    ef10_filter_entry_spec(eftp, ins_index));
> > > > +		ef10_filter_set_entry(eftp, ins_index, NULL);
> > > >    	}
> > > > -	ef10_filter_set_entry_not_busy(eftp, ins_index);
> > > > -	ef10_filter_set_entry(eftp, ins_index, NULL);
> > > > +
> > > > +	EFSYS_UNLOCK(enp->en_eslp, state);
> > > > +
> > > > +	if (overridden_spec != NULL)
> > > > +		EFSYS_KMEM_FREE(enp->en_esip, sizeof (*spec), overridden_spec);
> > > >    
> > > >    fail3:
> > > >    	EFSYS_PROBE(fail3);
> > > >    
> > > > +	EFSYS_ASSERT(locked == B_FALSE);
> > > > +	EFSYS_LOCK(enp->en_eslp, state);
> > > > +
> > > > +	ef10_filter_set_entry_not_busy(eftp, ins_index);
> > > > +
> > > > +	EFSYS_UNLOCK(enp->en_eslp, state);
> > > > +
> > > >    fail2:
> > > >    	EFSYS_PROBE(fail2);
> > > >    
> > > > @@ -779,11 +1001,11 @@ fail1:
> > > >    ef10_filter_add(
> > > >    	__in		efx_nic_t *enp,
> > > >    	__inout		efx_filter_spec_t *spec,
> > > > -	__in		boolean_t may_replace)
> > > > +	__in		enum efx_filter_replacement_policy_e policy)
> > > >    {
> > > >    	efx_rc_t rc;
> > > >    
> > > > -	rc = ef10_filter_add_internal(enp, spec, may_replace, NULL);
> > > > +	rc = ef10_filter_add_internal(enp, spec, policy, NULL);
> > > >    	if (rc != 0)
> > > >    		goto fail1;
> > > >    
> > > > @@ -795,11 +1017,15 @@ fail1:
> > > >    	return (rc);
> > > >    }
> > > >    
> > > > -
> > > > +/*
> > > > + * Delete a filter by index from the filter table with priority
> > > > + * that is not higher than specified.
> > > > + */
> > > >    static	__checkReturn	efx_rc_t
> > > >    ef10_filter_delete_internal(
> > > >    	__in		efx_nic_t *enp,
> > > > -	__in		uint32_t filter_id)
> > > > +	__in		uint32_t filter_id,
> > > > +	__in		efx_filter_priority_t priority)
> > > >    {
> > > >    	efx_rc_t rc;
> > > >    	ef10_filter_table_t *table = enp->en_filter.ef_ef10_filter_table;
> > > > @@ -821,7 +1047,8 @@ ef10_filter_delete_internal(
> > > >    		EFSYS_LOCK(enp->en_eslp, state);
> > > >    	}
> > > >    	if ((spec = ef10_filter_entry_spec(table, filter_idx)) != NULL) {
> > > > -		ef10_filter_set_entry_busy(table, filter_idx);
> > > > +		if (spec->efs_priority <= priority)
> > > > +			ef10_filter_set_entry_busy(table, filter_idx);
> > > >    	}
> > > >    	EFSYS_UNLOCK(enp->en_eslp, state);
> > > >    
> > > > @@ -830,32 +1057,54 @@ ef10_filter_delete_internal(
> > > >    		goto fail1;
> > > >    	}
> > > >    
> > > > -	/*
> > > > -	 * Try to remove the hardware filter. This may fail if the MC has
> > > > -	 * rebooted (which frees all hardware filter resources).
> > > > -	 */
> > > > -	if (ef10_filter_is_exclusive(spec)) {
> > > > -		rc = efx_mcdi_filter_op_delete(enp,
> > > > -		    MC_CMD_FILTER_OP_IN_OP_REMOVE,
> > > > -		    &table->eft_entry[filter_idx].efe_handle);
> > > > +	if (spec->efs_priority > priority) {
> > > > +		/*
> > > > +		 * Applied filter stays, but overridden filter is removed since
> > > > +		 * next user request to delete the applied filter should not
> > > > +		 * restore outdated filter.
> > > > +		 */
> > > > +		if (spec->efs_overridden_spec != NULL) {
> > > > +			EFSYS_ASSERT(spec->efs_overridden_spec->efs_overridden_spec ==
> > > > +			    NULL);
> > > > +			EFSYS_KMEM_FREE(enp->en_esip, sizeof (*spec),
> > > > +			    spec->efs_overridden_spec);
> > > > +			spec->efs_overridden_spec = NULL;
> > > > +		}
> > > >    	} else {
> > > > -		rc = efx_mcdi_filter_op_delete(enp,
> > > > -		    MC_CMD_FILTER_OP_IN_OP_UNSUBSCRIBE,
> > > > -		    &table->eft_entry[filter_idx].efe_handle);
> > > > +		/*
> > > > +		 * Try to remove the hardware filter or replace it with the
> > > > +		 * saved automatic filter. This may fail if the MC has
> > > > +		 * rebooted (which frees all hardware filter resources).
> > > > +		 */
> > > > +		if (spec->efs_overridden_spec != NULL) {
> > > > +			rc = efx_mcdi_filter_op_add(enp,
> > > > +			    spec->efs_overridden_spec,
> > > > +			    MC_CMD_FILTER_OP_IN_OP_REPLACE,
> > > > +			    &table->eft_entry[filter_idx].efe_handle);
> > > > +		} else if (ef10_filter_is_exclusive(spec)) {
> > > > +			rc = efx_mcdi_filter_op_delete(enp,
> > > > +			    MC_CMD_FILTER_OP_IN_OP_REMOVE,
> > > > +			    &table->eft_entry[filter_idx].efe_handle);
> > > > +		} else {
> > > > +			rc = efx_mcdi_filter_op_delete(enp,
> > > > +			    MC_CMD_FILTER_OP_IN_OP_UNSUBSCRIBE,
> > > > +			    &table->eft_entry[filter_idx].efe_handle);
> > > > +		}
> > > > +
> > > > +		/* Free the software table entry */
> > > > +		EFSYS_LOCK(enp->en_eslp, state);
> > > > +		ef10_filter_set_entry_not_busy(table, filter_idx);
> > > > +		ef10_filter_set_entry(table, filter_idx,
> > > > +		    spec->efs_overridden_spec);
> > > > +		EFSYS_UNLOCK(enp->en_eslp, state);
> > > > +
> > > > +		EFSYS_KMEM_FREE(enp->en_esip, sizeof (*spec), spec);
> > > > +
> > > > +		/* Check result of hardware filter removal */
> > > > +		if (rc != 0)
> > > > +			goto fail2;
> > > >    	}
> > > >    
> > > > -	/* Free the software table entry */
> > > > -	EFSYS_LOCK(enp->en_eslp, state);
> > > > -	ef10_filter_set_entry_not_busy(table, filter_idx);
> > > > -	ef10_filter_set_entry(table, filter_idx, NULL);
> > > > -	EFSYS_UNLOCK(enp->en_eslp, state);
> > > > -
> > > > -	EFSYS_KMEM_FREE(enp->en_esip, sizeof (*spec), spec);
> > > > -
> > > > -	/* Check result of hardware filter removal */
> > > > -	if (rc != 0)
> > > > -		goto fail2;
> > > > -
> > > >    	return (0);
> > > >    
> > > >    fail2:
> > > > @@ -867,6 +1116,25 @@ fail1:
> > > >    	return (rc);
> > > >    }
> > > >    
> > > > +static			void
> > > > +ef10_filter_delete_auto(
> > > > +	__in		efx_nic_t *enp,
> > > > +	__in		uint32_t filter_id)
> > > > +{
> > > > +	ef10_filter_table_t *table = enp->en_filter.ef_ef10_filter_table;
> > > > +	uint32_t filter_idx = filter_id % EFX_EF10_FILTER_TBL_ROWS;
> > > > +
> > > > +	/*
> > > > +	 * AUTO_OLD flag is cleared since the auto filter that is to be removed
> > > > +	 * may not be the filter at the specified index itself, but the filter
> > > > +	 * that is overridden by it.
> > > > +	 */
> > > > +	ef10_filter_set_entry_not_auto_old(table, filter_idx);
> > > > +
> > > > +	(void) ef10_filter_delete_internal(enp, filter_idx,
> > > > +	    EFX_FILTER_PRI_AUTO);
> > > > +}
> > > > +
> > > >    	__checkReturn	efx_rc_t
> > > >    ef10_filter_delete(
> > > >    	__in		efx_nic_t *enp,
> > > > @@ -906,7 +1174,7 @@ ef10_filter_delete(
> > > >    	EFSYS_UNLOCK(enp->en_eslp, state);
> > > >    	locked = B_FALSE;
> > > >    
> > > > -	rc = ef10_filter_delete_internal(enp, i);
> > > > +	rc = ef10_filter_delete_internal(enp, i, EFX_FILTER_PRI_MANUAL);
> > > >    	if (rc != 0)
> > > >    		goto fail2;
> > > >    
> > > > @@ -1131,7 +1399,7 @@ ef10_filter_insert_unicast(
> > > >    	if (rc != 0)
> > > >    		goto fail1;
> > > >    
> > > > -	rc = ef10_filter_add_internal(enp, &spec, B_TRUE,
> > > > +	rc = ef10_filter_add_internal(enp, &spec, EFX_FILTER_REPLACEMENT_NEVER,
> > > >    	    &eftp->eft_unicst_filter_indexes[eftp->eft_unicst_filter_count]);
> > > >    	if (rc != 0)
> > > >    		goto fail2;
> > > > @@ -1165,7 +1433,7 @@ ef10_filter_insert_all_unicast(
> > > >    	rc = efx_filter_spec_set_uc_def(&spec);
> > > >    	if (rc != 0)
> > > >    		goto fail1;
> > > > -	rc = ef10_filter_add_internal(enp, &spec, B_TRUE,
> > > > +	rc = ef10_filter_add_internal(enp, &spec, EFX_FILTER_REPLACEMENT_NEVER,
> > > >    	    &eftp->eft_unicst_filter_indexes[eftp->eft_unicst_filter_count]);
> > > >    	if (rc != 0)
> > > >    		goto fail2;
> > > > @@ -1235,8 +1503,8 @@ ef10_filter_insert_multicast_list(
> > > >    			}
> > > >    		}
> > > >    
> > > > -		rc = ef10_filter_add_internal(enp, &spec, B_TRUE,
> > > > -					    &filter_index);
> > > > +		rc = ef10_filter_add_internal(enp, &spec,
> > > > +		    EFX_FILTER_REPLACEMENT_NEVER, &filter_index);
> > > >    
> > > >    		if (rc == 0) {
> > > >    			eftp->eft_mulcst_filter_indexes[filter_count] =
> > > > @@ -1263,8 +1531,8 @@ ef10_filter_insert_multicast_list(
> > > >    			goto rollback;
> > > >    		}
> > > >    
> > > > -		rc = ef10_filter_add_internal(enp, &spec, B_TRUE,
> > > > -					    &filter_index);
> > > > +		rc = ef10_filter_add_internal(enp, &spec,
> > > > +		    EFX_FILTER_REPLACEMENT_NEVER, &filter_index);
> > > >    
> > > >    		if (rc == 0) {
> > > >    			eftp->eft_mulcst_filter_indexes[filter_count] =
> > > > @@ -1285,7 +1553,7 @@ rollback:
> > > >    	/* Remove any filters we have inserted */
> > > >    	i = filter_count;
> > > >    	while (i--) {
> > > > -		(void) ef10_filter_delete_internal(enp,
> > > > +		ef10_filter_delete_auto(enp,
> > > >    		    eftp->eft_mulcst_filter_indexes[i]);
> > > >    	}
> > > >    	eftp->eft_mulcst_filter_count = 0;
> > > > @@ -1313,7 +1581,7 @@ ef10_filter_insert_all_multicast(
> > > >    	if (rc != 0)
> > > >    		goto fail1;
> > > >    
> > > > -	rc = ef10_filter_add_internal(enp, &spec, B_TRUE,
> > > > +	rc = ef10_filter_add_internal(enp, &spec, EFX_FILTER_REPLACEMENT_NEVER,
> > > >    	    &eftp->eft_mulcst_filter_indexes[0]);
> > > >    	if (rc != 0)
> > > >    		goto fail2;
> > > > @@ -1416,8 +1684,9 @@ ef10_filter_insert_encap_filters(
> > > >    		if (rc != 0)
> > > >    			goto fail1;
> > > >    
> > > > -		rc = ef10_filter_add_internal(enp, &spec, B_TRUE,
> > > > -			    &table->eft_encap_filter_indexes[
> > > > +		rc = ef10_filter_add_internal(enp, &spec,
> > > > +		    EFX_FILTER_REPLACEMENT_NEVER,
> > > > +		    &table->eft_encap_filter_indexes[
> > > >    				    table->eft_encap_filter_count]);
> > > >    		if (rc != 0) {
> > > >    			if (rc != EACCES)
> > > > @@ -1446,7 +1715,7 @@ ef10_filter_remove_old(
> > > >    
> > > >    	for (i = 0; i < EFX_ARRAY_SIZE(table->eft_entry); i++) {
> > > >    		if (ef10_filter_entry_is_auto_old(table, i)) {
> > > > -			(void) ef10_filter_delete_internal(enp, i);
> > > > +			ef10_filter_delete_auto(enp, i);
> > > >    		}
> > > >    	}
> > > >    }
> > > > @@ -1521,19 +1790,19 @@ ef10_filter_reconfigure(
> > > >    		 * has rebooted, which removes hardware filters).
> > > >    		 */
> > > >    		for (i = 0; i < table->eft_unicst_filter_count; i++) {
> > > > -			(void) ef10_filter_delete_internal(enp,
> > > > +			ef10_filter_delete_auto(enp,
> > > >    					table->eft_unicst_filter_indexes[i]);
> > > >    		}
> > > >    		table->eft_unicst_filter_count = 0;
> > > >    
> > > >    		for (i = 0; i < table->eft_mulcst_filter_count; i++) {
> > > > -			(void) ef10_filter_delete_internal(enp,
> > > > +			ef10_filter_delete_auto(enp,
> > > >    					table->eft_mulcst_filter_indexes[i]);
> > > >    		}
> > > >    		table->eft_mulcst_filter_count = 0;
> > > >    
> > > >    		for (i = 0; i < table->eft_encap_filter_count; i++) {
> > > > -			(void) ef10_filter_delete_internal(enp,
> > > > +			ef10_filter_delete_auto(enp,
> > > >    					table->eft_encap_filter_indexes[i]);
> > > >    		}
> > > >    		table->eft_encap_filter_count = 0;
> > > > diff --git a/drivers/net/sfc/base/ef10_impl.h b/drivers/net/sfc/base/ef10_impl.h
> > > > index 7a00047829..67abf3b853 100644
> > > > --- a/drivers/net/sfc/base/ef10_impl.h
> > > > +++ b/drivers/net/sfc/base/ef10_impl.h
> > > > @@ -1079,6 +1079,8 @@ ef10_rx_fini(
> > > >    
> > > >    #if EFSYS_OPT_FILTER
> > > >    
> > > > +enum efx_filter_replacement_policy_e;
> > > > +
> > > >    typedef struct ef10_filter_handle_s {
> > > >    	uint32_t	efh_lo;
> > > >    	uint32_t	efh_hi;
> > > > @@ -1148,7 +1150,7 @@ ef10_filter_restore(
> > > >    ef10_filter_add(
> > > >    	__in		efx_nic_t *enp,
> > > >    	__inout		efx_filter_spec_t *spec,
> > > > -	__in		boolean_t may_replace);
> > > > +	__in		enum efx_filter_replacement_policy_e policy);
> > > >    
> > > >    	__checkReturn	efx_rc_t
> > > >    ef10_filter_delete(
> > > > diff --git a/drivers/net/sfc/base/efx.h b/drivers/net/sfc/base/efx.h
> > > > index c609c700fa..d94d3c02f7 100644
> > > > --- a/drivers/net/sfc/base/efx.h
> > > > +++ b/drivers/net/sfc/base/efx.h
> > > > @@ -2949,6 +2949,7 @@ typedef uint8_t efx_filter_flags_t;
> > > >    
> > > >    typedef uint32_t efx_filter_match_flags_t;
> > > >    
> > > > +/* Filter priority from lowest to highest */
> > > >    typedef enum efx_filter_priority_s {
> > > >    	EFX_FILTER_PRI_AUTO = 0,	/* Automatic filter based on device
> > > >    					 * address list or hardware
> > > > @@ -2956,6 +2957,7 @@ typedef enum efx_filter_priority_s {
> > > >    					 * by the filter implementation for
> > > >    					 * each NIC type. */
> > > >    	EFX_FILTER_PRI_MANUAL,		/* Manually configured filter */
> > > > +	EFX_FILTER_NPRI,
> > > >    } efx_filter_priority_t;
> > > >    
> > > >    /*
> > > > @@ -2970,6 +2972,11 @@ typedef struct efx_filter_spec_s {
> > > >    	uint16_t			efs_dmaq_id;
> > > >    	uint32_t			efs_rss_context;
> > > >    	uint32_t			efs_mark;
> > > > +	/*
> > > > +	 * Saved lower-priority filter. If it is set, it is restored on
> > > > +	 * filter delete operation.
> > > > +	 */
> > > > +	struct efx_filter_spec_s	*efs_overridden_spec;
> > > >    	/* Fields below here are hashed for software filter lookup */
> > > >    	uint16_t			efs_outer_vid;
> > > >    	uint16_t			efs_inner_vid;
> > > > diff --git a/drivers/net/sfc/base/efx_filter.c b/drivers/net/sfc/base/efx_filter.c
> > > > index 36332a2801..9949d05bb3 100644
> > > > --- a/drivers/net/sfc/base/efx_filter.c
> > > > +++ b/drivers/net/sfc/base/efx_filter.c
> > > > @@ -28,7 +28,7 @@ static	__checkReturn	efx_rc_t
> > > >    siena_filter_add(
> > > >    	__in		efx_nic_t *enp,
> > > >    	__inout		efx_filter_spec_t *spec,
> > > > -	__in		boolean_t may_replace);
> > > > +	__in		efx_filter_replacement_policy_t policy);
> > > >    
> > > >    static	__checkReturn	efx_rc_t
> > > >    siena_filter_delete(
> > > > @@ -98,7 +98,8 @@ efx_filter_insert(
> > > >    		goto fail3;
> > > >    	}
> > > >    
> > > > -	return (efop->efo_add(enp, spec, B_FALSE));
> > > > +	return (efop->efo_add(enp, spec,
> > > > +	    EFX_FILTER_REPLACEMENT_HIGHER_PRIORITY));
> > > >    
> > > >    fail3:
> > > >    	EFSYS_PROBE(fail3);
> > > > @@ -1444,7 +1445,7 @@ static	 __checkReturn	efx_rc_t
> > > >    siena_filter_add(
> > > >    	__in		efx_nic_t *enp,
> > > >    	__inout		efx_filter_spec_t *spec,
> > > > -	__in		boolean_t may_replace)
> > > > +	__in		efx_filter_replacement_policy_t policy)
> > > >    {
> > > >    	efx_rc_t rc;
> > > >    	siena_filter_spec_t sf_spec;
> > > > @@ -1485,9 +1486,17 @@ siena_filter_add(
> > > >    	saved_sf_spec = &sftp->sft_spec[filter_idx];
> > > >    
> > > >    	if (siena_filter_test_used(sftp, filter_idx)) {
> > > > -		if (may_replace == B_FALSE) {
> > > > +		/* All Siena filter are considered the same priority */
> > > > +		switch (policy) {
> > > > +		case EFX_FILTER_REPLACEMENT_NEVER:
> > > > +		case EFX_FILTER_REPLACEMENT_HIGHER_PRIORITY:
> > > >    			rc = EEXIST;
> > > >    			goto fail4;
> > > > +		case EFX_FILTER_REPLACEMENT_HIGHER_OR_EQUAL_PRIORITY:
> > > > +			break;
> > > > +		default:
> > > > +			EFSYS_ASSERT(0);
> > > > +			break;
> > > >    		}
> > > >    	}
> > > >    	siena_filter_set_used(sftp, filter_idx);
> > > > diff --git a/drivers/net/sfc/base/efx_impl.h b/drivers/net/sfc/base/efx_impl.h
> > > > index 85d984f651..9755f4dfd2 100644
> > > > --- a/drivers/net/sfc/base/efx_impl.h
> > > > +++ b/drivers/net/sfc/base/efx_impl.h
> > > > @@ -246,12 +246,31 @@ typedef struct efx_phy_ops_s {
> > > >    } efx_phy_ops_t;
> > > >    
> > > >    #if EFSYS_OPT_FILTER
> > > > +
> > > > +/*
> > > > + * Policy for replacing existing filter when inserting a new one.
> > > > + * Note that all policies allow for storing the new lower priority
> > > > + * filters as overridden by existing higher priority ones. It is needed
> > > > + * to restore the lower priority filters on higher priority ones removal.
> > > > + */
> > > > +typedef enum efx_filter_replacement_policy_e {
> > > > +	/* Cannot replace existing filter */
> > > > +	EFX_FILTER_REPLACEMENT_NEVER,
> > > > +	/* Higher priority filters can replace lower priotiry ones */
> > > > +	EFX_FILTER_REPLACEMENT_HIGHER_PRIORITY,
> > > > +	/*
> > > > +	 * Higher priority filters can replace lower priority ones and
> > > > +	 * equal priority filters can replace each other.
> > > > +	 */
> > > > +	EFX_FILTER_REPLACEMENT_HIGHER_OR_EQUAL_PRIORITY,
> > > > +} efx_filter_replacement_policy_t;
> > > > +
> > > >    typedef struct efx_filter_ops_s {
> > > >    	efx_rc_t	(*efo_init)(efx_nic_t *);
> > > >    	void		(*efo_fini)(efx_nic_t *);
> > > >    	efx_rc_t	(*efo_restore)(efx_nic_t *);
> > > >    	efx_rc_t	(*efo_add)(efx_nic_t *, efx_filter_spec_t *,
> > > > -				   boolean_t may_replace);
> > > > +				   efx_filter_replacement_policy_t policy);
> > > >    	efx_rc_t	(*efo_delete)(efx_nic_t *, efx_filter_spec_t *);
> > > >    	efx_rc_t	(*efo_supported_filters)(efx_nic_t *, uint32_t *,
> > > >    				   size_t, size_t *);


^ permalink raw reply	[flat|nested] 371+ messages in thread

* Re: [dpdk-stable] patch 'net/hinic/base: fix PF firmware hot-active problem' has been queued to stable release 19.11.3
  2020-05-20 12:29     ` Wangxiaoyun (Cloud)
  2020-05-20 12:48       ` Kevin Traynor
@ 2020-05-20 16:55       ` Luca Boccassi
  1 sibling, 0 replies; 371+ messages in thread
From: Luca Boccassi @ 2020-05-20 16:55 UTC (permalink / raw)
  To: Wangxiaoyun (Cloud)
  Cc: dpdk stable, luoxingyu, yin.yinshi, luoxianjun, zhouguoyang

These are all already included

On Wed, 2020-05-20 at 20:29 +0800, Wangxiaoyun (Cloud) wrote:
> Hi Luca Boccassi,
> 
> These patches should be pushed to stable release 19.11.3 as follows:
>       1) net/hinic: fix snprintf length   --fixed by Kevin Traynor
>       2) net/hinic: fix repeating log and length check --fixed by Kevin Traynor
>       3) net/hinic: alloc IO memory with socketid
>       4) net/hinic: fix LRO problems
> 
> For hotupdate problem fixes, which needs the following 2 patches:
>       5)net/hinic/base: fix hotupdate firmware problem
>       6)net/hinic/base: fix PF firmware hotactive problem
>       But I found the patch 6) may conflict with other patches, should I push a
> new patch about patch 6) with 19.11 stable branch?
> 
>       And the other two patches also need to push to stable release:
>       7) net/hinic: the queues resource free problem fixes
>       8) net/hinic: the pkt len updates of mbuf fixes
> 
> Thanks.
> Xiaoyun Wang
> 
> 在 2020/5/19 21:03, luca.boccassi@gmail.com 写道:
> > Hi,
> > 
> > FYI, your patch has been queued to stable release 19.11.3
> > 
> > Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> > It will be pushed if I get no objections before 05/21/20. So please
> > shout if anyone has objections.
> > 
> > Also note that after the patch there's a diff of the upstream commit vs the
> > patch applied to the branch. This will indicate if there was any rebasing
> > needed to apply to the stable branch. If there were code changes for rebasing
> > (ie: not only metadata diffs), please double check that the rebase was
> > correctly done.
> > 
> > Thanks.
> > 
> > Luca Boccassi
> > 
> > ---
> > > From 11d98470395eff60937bbdff411b19f6ac00f76f Mon Sep 17 00:00:00 2001
> > From: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
> > Date: Fri, 10 Apr 2020 17:21:45 +0800
> > Subject: [PATCH] net/hinic/base: fix PF firmware hot-active problem
> > 
> > [ upstream commit 036b61d85e4d1c45ac497a367c765ad463d2debf ]
> > 
> > When FW is hotactive which means updating the FW but not needs
> > to reboot OS, FW returns HINIC_DEV_BUSY_ACTIVE_FW for pf driver
> > because firmware is being reinitialized, at which point the cmdq
> > initialization that relies on the fw channel will fail, so driver
> > should reinit the cmdq when port start.
> > 
> > Fixes: 0194313b2df6 ("net/hinic/base: fix port start during FW hot update")
> > 
> > Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
> > ---
> >   drivers/net/hinic/base/hinic_pmd_cmdq.c  |  7 +++--
> >   drivers/net/hinic/base/hinic_pmd_hwdev.c |  4 +--
> >   drivers/net/hinic/base/hinic_pmd_mgmt.c  | 38 +++++++++++++-----------
> >   drivers/net/hinic/base/hinic_pmd_mgmt.h  |  2 ++
> >   drivers/net/hinic/base/hinic_pmd_nicio.c |  2 +-
> >   5 files changed, 31 insertions(+), 22 deletions(-)
> > 
> > diff --git a/drivers/net/hinic/base/hinic_pmd_cmdq.c b/drivers/net/hinic/base/hinic_pmd_cmdq.c
> > index 685498ec2f..2e98b9c286 100644
> > --- a/drivers/net/hinic/base/hinic_pmd_cmdq.c
> > +++ b/drivers/net/hinic/base/hinic_pmd_cmdq.c
> > @@ -440,9 +440,12 @@ static int hinic_set_cmdq_ctxts(struct hinic_hwdev *hwdev)
> >   					     cmdq_ctxt, in_size, NULL,
> >   					     NULL, 0);
> >   		if (err) {
> > -			if (err == HINIC_MBOX_PF_BUSY_ACTIVE_FW)
> > +			if (err == HINIC_MBOX_PF_BUSY_ACTIVE_FW ||
> > +				err == HINIC_DEV_BUSY_ACTIVE_FW) {
> >   				cmdqs->status |= HINIC_CMDQ_SET_FAIL;
> > -			PMD_DRV_LOG(ERR, "Set cmdq ctxt failed");
> > +				PMD_DRV_LOG(ERR, "PF or VF fw is hot active");
> > +			}
> > +			PMD_DRV_LOG(ERR, "Set cmdq ctxt failed, err: %d", err);
> >   			return -EFAULT;
> >   		}
> >   	}
> > diff --git a/drivers/net/hinic/base/hinic_pmd_hwdev.c b/drivers/net/hinic/base/hinic_pmd_hwdev.c
> > index cf2a9701f2..fc11ecd7a4 100644
> > --- a/drivers/net/hinic/base/hinic_pmd_hwdev.c
> > +++ b/drivers/net/hinic/base/hinic_pmd_hwdev.c
> > @@ -529,7 +529,7 @@ static int hinic_vf_rx_tx_flush(struct hinic_hwdev *hwdev)
> >   
> >   	err = hinic_reinit_cmdq_ctxts(hwdev);
> >   	if (err)
> > -		PMD_DRV_LOG(WARNING, "Reinit cmdq failed");
> > +		PMD_DRV_LOG(WARNING, "Reinit cmdq failed when vf flush");
> >   
> >   	return err;
> >   }
> > @@ -587,7 +587,7 @@ static int hinic_pf_rx_tx_flush(struct hinic_hwdev *hwdev)
> >   
> >   	err = hinic_reinit_cmdq_ctxts(hwdev);
> >   	if (err)
> > -		PMD_DRV_LOG(WARNING, "Reinit cmdq failed");
> > +		PMD_DRV_LOG(WARNING, "Reinit cmdq failed when pf flush");
> >   
> >   	return 0;
> >   }
> > diff --git a/drivers/net/hinic/base/hinic_pmd_mgmt.c b/drivers/net/hinic/base/hinic_pmd_mgmt.c
> > index eee50a80d1..ea79c300af 100644
> > --- a/drivers/net/hinic/base/hinic_pmd_mgmt.c
> > +++ b/drivers/net/hinic/base/hinic_pmd_mgmt.c
> > @@ -248,6 +248,19 @@ static void free_msg_buf(struct hinic_msg_pf_to_mgmt *pf_to_mgmt)
> >   	free_recv_msg(&pf_to_mgmt->recv_msg_from_mgmt);
> >   }
> >   
> > +static int hinic_get_mgmt_channel_status(void *hwdev)
> > +{
> > +	struct hinic_hwif *hwif = ((struct hinic_hwdev *)hwdev)->hwif;
> > +	u32 val;
> > +
> > +	if (hinic_func_type((struct hinic_hwdev *)hwdev) == TYPE_VF)
> > +		return false;
> > +
> > +	val = hinic_hwif_read_reg(hwif, HINIC_ICPL_RESERVD_ADDR);
> > +
> > +	return HINIC_GET_MGMT_CHANNEL_STATUS(val, MGMT_CHANNEL_STATUS);
> > +}
> > +
> >   /**
> >    * send_msg_to_mgmt_async - send async message
> >    * @pf_to_mgmt: PF to MGMT channel
> > @@ -309,6 +322,14 @@ static int send_msg_to_mgmt_sync(struct hinic_msg_pf_to_mgmt *pf_to_mgmt,
> >   	u64 header;
> >   	u16 cmd_size = mgmt_msg_len(msg_len);
> >   
> > +	/* If fw is hot active, return failed */
> > +	if (hinic_get_mgmt_channel_status(pf_to_mgmt->hwdev)) {
> > +		if (mod == HINIC_MOD_COMM || mod == HINIC_MOD_L2NIC)
> > +			return HINIC_DEV_BUSY_ACTIVE_FW;
> > +		else
> > +			return -EBUSY;
> > +	}
> > +
> >   	if (direction == HINIC_MSG_RESPONSE)
> >   		prepare_header(pf_to_mgmt, &header, msg_len, mod, ack_type,
> >   			       direction, cmd, resp_msg_id);
> > @@ -462,19 +483,6 @@ unlock_sync_msg:
> >   	return err;
> >   }
> >   
> > -static int hinic_get_mgmt_channel_status(void *hwdev)
> > -{
> > -	struct hinic_hwif *hwif = ((struct hinic_hwdev *)hwdev)->hwif;
> > -	u32 val;
> > -
> > -	if (hinic_func_type((struct hinic_hwdev *)hwdev) == TYPE_VF)
> > -		return false;
> > -
> > -	val = hinic_hwif_read_reg(hwif, HINIC_ICPL_RESERVD_ADDR);
> > -
> > -	return HINIC_GET_MGMT_CHANNEL_STATUS(val, MGMT_CHANNEL_STATUS);
> > -}
> > -
> >   int hinic_msg_to_mgmt_sync(void *hwdev, enum hinic_mod_type mod, u8 cmd,
> >   			   void *buf_in, u16 in_size,
> >   			   void *buf_out, u16 *out_size, u32 timeout)
> > @@ -484,10 +492,6 @@ int hinic_msg_to_mgmt_sync(void *hwdev, enum hinic_mod_type mod, u8 cmd,
> >   	if (!hwdev || in_size > HINIC_MSG_TO_MGMT_MAX_LEN)
> >   		return -EINVAL;
> >   
> > -	/* If status is hot upgrading, don't send message to mgmt */
> > -	if (hinic_get_mgmt_channel_status(hwdev))
> > -		return -EPERM;
> > -
> >   	if (hinic_func_type(hwdev) == TYPE_VF) {
> >   		rc = hinic_mbox_to_pf(hwdev, mod, cmd, buf_in, in_size,
> >   					buf_out, out_size, timeout);
> > diff --git a/drivers/net/hinic/base/hinic_pmd_mgmt.h b/drivers/net/hinic/base/hinic_pmd_mgmt.h
> > index cc18843bf8..52b319ead4 100644
> > --- a/drivers/net/hinic/base/hinic_pmd_mgmt.h
> > +++ b/drivers/net/hinic/base/hinic_pmd_mgmt.h
> > @@ -34,6 +34,8 @@
> >   #define HINIC_MSG_HEADER_P2P_IDX_MASK				0xF
> >   #define HINIC_MSG_HEADER_MSG_ID_MASK				0x3FF
> >   
> > +#define HINIC_DEV_BUSY_ACTIVE_FW				0xFE
> > +
> >   #define HINIC_MSG_HEADER_GET(val, member)			\
> >   		(((val) >> HINIC_MSG_HEADER_##member##_SHIFT) & \
> >   		HINIC_MSG_HEADER_##member##_MASK)
> > diff --git a/drivers/net/hinic/base/hinic_pmd_nicio.c b/drivers/net/hinic/base/hinic_pmd_nicio.c
> > index 31a13fbdcf..d3e8f2e74d 100644
> > --- a/drivers/net/hinic/base/hinic_pmd_nicio.c
> > +++ b/drivers/net/hinic/base/hinic_pmd_nicio.c
> > @@ -536,7 +536,7 @@ int hinic_init_qp_ctxts(struct hinic_hwdev *hwdev)
> >   	if (hwdev->cmdqs->status & HINIC_CMDQ_SET_FAIL) {
> >   		err = hinic_reinit_cmdq_ctxts(hwdev);
> >   		if (err) {
> > -			PMD_DRV_LOG(ERR, "Reinit cmdq context failed, rc: %d\n",
> > +			PMD_DRV_LOG(ERR, "Reinit cmdq context failed when dev start, err: %d",
> >   				err);
> >   			return err;
> >   		}
> > 


^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'event/dsw: fix enqueue burst return value' has been queued to stable release 19.11.3
  2020-05-19 13:05   ` [dpdk-stable] patch 'crypto/qat: support plain SHA1..SHA512 hashes' " luca.boccassi
@ 2020-05-22  9:39     ` luca.boccassi
  2020-05-22  9:39       ` [dpdk-stable] patch 'app/eventdev: check Tx adapter service ID' " luca.boccassi
                         ` (41 more replies)
  0 siblings, 42 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-22  9:39 UTC (permalink / raw)
  To: Yuri Chipchev; +Cc: Liron Himi, Mattias Rönnblom, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/24/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From a23ef1c188a9ab83a0a8e2fc188789b2795e49fd Mon Sep 17 00:00:00 2001
From: Yuri Chipchev <yuric@marvell.com>
Date: Wed, 6 May 2020 23:18:37 +0300
Subject: [PATCH] event/dsw: fix enqueue burst return value
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 1c4975d6dfa244cf52a2836ca267ba4a7b3ec75e ]

The returned number from rte_event_enqueue_*()
wouldn't include events marked with RTE_EVENT_OP_RELEASE.

Fixes: 1c8e3caa3 ("event/dsw: add event scheduling and device start/stop")

Signed-off-by: Yuri Chipchev <yuric@marvell.com>
Reviewed-by: Liron Himi <lironh@marvell.com>
Acked-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
---
 drivers/event/dsw/dsw_event.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/event/dsw/dsw_event.c b/drivers/event/dsw/dsw_event.c
index f3873c54e5..0df9209e4f 100644
--- a/drivers/event/dsw/dsw_event.c
+++ b/drivers/event/dsw/dsw_event.c
@@ -1097,7 +1097,7 @@ dsw_event_enqueue_burst_generic(struct dsw_port *source_port,
 	DSW_LOG_DP_PORT(DEBUG, source_port->id, "%d non-release events "
 			"accepted.\n", num_non_release);
 
-	return num_non_release;
+	return (num_non_release + num_release);
 }
 
 uint16_t
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-22 10:37:39.300834212 +0100
+++ 0001-event-dsw-fix-enqueue-burst-return-value.patch	2020-05-22 10:37:39.048411280 +0100
@@ -1,4 +1,4 @@
-From 1c4975d6dfa244cf52a2836ca267ba4a7b3ec75e Mon Sep 17 00:00:00 2001
+From a23ef1c188a9ab83a0a8e2fc188789b2795e49fd Mon Sep 17 00:00:00 2001
 From: Yuri Chipchev <yuric@marvell.com>
 Date: Wed, 6 May 2020 23:18:37 +0300
 Subject: [PATCH] event/dsw: fix enqueue burst return value
@@ -6,11 +6,12 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit 1c4975d6dfa244cf52a2836ca267ba4a7b3ec75e ]
+
 The returned number from rte_event_enqueue_*()
 wouldn't include events marked with RTE_EVENT_OP_RELEASE.
 
 Fixes: 1c8e3caa3 ("event/dsw: add event scheduling and device start/stop")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yuri Chipchev <yuric@marvell.com>
 Reviewed-by: Liron Himi <lironh@marvell.com>
@@ -20,10 +21,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/event/dsw/dsw_event.c b/drivers/event/dsw/dsw_event.c
-index e5e3597aae..611b36781f 100644
+index f3873c54e5..0df9209e4f 100644
 --- a/drivers/event/dsw/dsw_event.c
 +++ b/drivers/event/dsw/dsw_event.c
-@@ -1231,7 +1231,7 @@ dsw_event_enqueue_burst_generic(struct dsw_port *source_port,
+@@ -1097,7 +1097,7 @@ dsw_event_enqueue_burst_generic(struct dsw_port *source_port,
  	DSW_LOG_DP_PORT(DEBUG, source_port->id, "%d non-release events "
  			"accepted.\n", num_non_release);
  

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'app/eventdev: check Tx adapter service ID' has been queued to stable release 19.11.3
  2020-05-22  9:39     ` [dpdk-stable] patch 'event/dsw: fix enqueue burst return value' " luca.boccassi
@ 2020-05-22  9:39       ` luca.boccassi
  2020-05-22  9:39       ` [dpdk-stable] patch 'crypto/caam_jr: fix check of file descriptors' " luca.boccassi
                         ` (40 subsequent siblings)
  41 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-22  9:39 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/24/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 053c7ff9b5bc6166d3456098ac206a566d2d763b Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Thu, 14 May 2020 01:52:48 +0530
Subject: [PATCH] app/eventdev: check Tx adapter service ID

[ upstream commit 40984bf253e1bccea72a38b2a0edd7c16ea22831 ]

Fix unchecked return values reported by coverity.

Coverity issue: 357755
Fixes: 032a965a8f1d ("app/eventdev: support Tx adapter")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 app/test-eventdev/test_pipeline_common.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/app/test-eventdev/test_pipeline_common.c b/app/test-eventdev/test_pipeline_common.c
index fa91bf2290..126e2165a3 100644
--- a/app/test-eventdev/test_pipeline_common.c
+++ b/app/test-eventdev/test_pipeline_common.c
@@ -385,12 +385,16 @@ pipeline_event_tx_adapter_setup(struct evt_options *opt,
 		if (!(cap & RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT)) {
 			uint32_t service_id = -1U;
 
-			rte_event_eth_tx_adapter_service_id_get(consm,
-					&service_id);
+			ret = rte_event_eth_tx_adapter_service_id_get(consm,
+								   &service_id);
+			if (ret != -ESRCH && ret != 0) {
+				evt_err("Failed to get Tx adptr service ID");
+				return ret;
+			}
 			ret = evt_service_setup(service_id);
 			if (ret) {
 				evt_err("Failed to setup service core"
-						" for Tx adapter\n");
+						" for Tx adapter");
 				return ret;
 			}
 		}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-22 10:37:39.328432193 +0100
+++ 0002-app-eventdev-check-Tx-adapter-service-ID.patch	2020-05-22 10:37:39.052411351 +0100
@@ -1,13 +1,14 @@
-From 40984bf253e1bccea72a38b2a0edd7c16ea22831 Mon Sep 17 00:00:00 2001
+From 053c7ff9b5bc6166d3456098ac206a566d2d763b Mon Sep 17 00:00:00 2001
 From: Pavan Nikhilesh <pbhagavatula@marvell.com>
 Date: Thu, 14 May 2020 01:52:48 +0530
 Subject: [PATCH] app/eventdev: check Tx adapter service ID
 
+[ upstream commit 40984bf253e1bccea72a38b2a0edd7c16ea22831 ]
+
 Fix unchecked return values reported by coverity.
 
 Coverity issue: 357755
 Fixes: 032a965a8f1d ("app/eventdev: support Tx adapter")
-Cc: stable@dpdk.org
 
 Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
 Acked-by: Jerin Jacob <jerinj@marvell.com>
@@ -16,10 +17,10 @@
  1 file changed, 7 insertions(+), 3 deletions(-)
 
 diff --git a/app/test-eventdev/test_pipeline_common.c b/app/test-eventdev/test_pipeline_common.c
-index 84c42b33ce..17088b1b48 100644
+index fa91bf2290..126e2165a3 100644
 --- a/app/test-eventdev/test_pipeline_common.c
 +++ b/app/test-eventdev/test_pipeline_common.c
-@@ -392,12 +392,16 @@ pipeline_event_tx_adapter_setup(struct evt_options *opt,
+@@ -385,12 +385,16 @@ pipeline_event_tx_adapter_setup(struct evt_options *opt,
  		if (!(cap & RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT)) {
  			uint32_t service_id = -1U;
  

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'crypto/caam_jr: fix check of file descriptors' has been queued to stable release 19.11.3
  2020-05-22  9:39     ` [dpdk-stable] patch 'event/dsw: fix enqueue burst return value' " luca.boccassi
  2020-05-22  9:39       ` [dpdk-stable] patch 'app/eventdev: check Tx adapter service ID' " luca.boccassi
@ 2020-05-22  9:39       ` luca.boccassi
  2020-05-22  9:39       ` [dpdk-stable] patch 'crypto/caam_jr: fix IRQ functions return type' " luca.boccassi
                         ` (39 subsequent siblings)
  41 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-22  9:39 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Gagandeep Singh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/24/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 199d2c49a69f7c02d7d78251014667e679e580d9 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Thu, 14 May 2020 18:59:55 +0800
Subject: [PATCH] crypto/caam_jr: fix check of file descriptors

[ upstream commit 61552661e25df5b78be3079bc02b56a375dc0fdc ]

Zero is a valid fd. It will fail to check the fd if the fd is zero.
The "job_ring->uio_fd" is an fd, so define it as "int".

Fixes: e7a45f3cc245 ("crypto/caam_jr: add UIO specific operations")
Fixes: a5e1018d5e67 ("crypto/caam_jr: add routines to configure HW")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Gagandeep Singh <g.singh@nxp.com>
---
 drivers/crypto/caam_jr/caam_jr.c             | 23 ++++++++++++---
 drivers/crypto/caam_jr/caam_jr_hw_specific.h |  2 +-
 drivers/crypto/caam_jr/caam_jr_pvt.h         |  9 +++---
 drivers/crypto/caam_jr/caam_jr_uio.c         | 30 +++++++++++++-------
 4 files changed, 45 insertions(+), 19 deletions(-)

diff --git a/drivers/crypto/caam_jr/caam_jr.c b/drivers/crypto/caam_jr/caam_jr.c
index 8aaa3d45f6..86aa9a103e 100644
--- a/drivers/crypto/caam_jr/caam_jr.c
+++ b/drivers/crypto/caam_jr/caam_jr.c
@@ -2084,7 +2084,7 @@ static struct rte_security_ops caam_jr_security_ops = {
 static void
 close_job_ring(struct sec_job_ring_t *job_ring)
 {
-	if (job_ring->irq_fd) {
+	if (job_ring->irq_fd != -1) {
 		/* Producer index is frozen. If consumer index is not equal
 		 * with producer index, then we have descs to flush.
 		 */
@@ -2093,7 +2093,7 @@ close_job_ring(struct sec_job_ring_t *job_ring)
 
 		/* free the uio job ring */
 		free_job_ring(job_ring->irq_fd);
-		job_ring->irq_fd = 0;
+		job_ring->irq_fd = -1;
 		caam_jr_dma_free(job_ring->input_ring);
 		caam_jr_dma_free(job_ring->output_ring);
 		g_job_rings_no--;
@@ -2197,7 +2197,7 @@ caam_jr_dev_uninit(struct rte_cryptodev *dev)
  *
  */
 static void *
-init_job_ring(void *reg_base_addr, uint32_t irq_id)
+init_job_ring(void *reg_base_addr, int irq_id)
 {
 	struct sec_job_ring_t *job_ring = NULL;
 	int i, ret = 0;
@@ -2207,7 +2207,7 @@ init_job_ring(void *reg_base_addr, uint32_t irq_id)
 	int irq_coalescing_count = 0;
 
 	for (i = 0; i < MAX_SEC_JOB_RINGS; i++) {
-		if (g_job_rings[i].irq_fd == 0) {
+		if (g_job_rings[i].irq_fd == -1) {
 			job_ring = &g_job_rings[i];
 			g_job_rings_no++;
 			break;
@@ -2460,6 +2460,15 @@ cryptodev_caam_jr_remove(struct rte_vdev_device *vdev)
 	return rte_cryptodev_pmd_destroy(cryptodev);
 }
 
+static void
+sec_job_rings_init(void)
+{
+	int i;
+
+	for (i = 0; i < MAX_SEC_JOB_RINGS; i++)
+		g_job_rings[i].irq_fd = -1;
+}
+
 static struct rte_vdev_driver cryptodev_caam_jr_drv = {
 	.probe = cryptodev_caam_jr_probe,
 	.remove = cryptodev_caam_jr_remove
@@ -2474,6 +2483,12 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_CAAM_JR_PMD,
 RTE_PMD_REGISTER_CRYPTO_DRIVER(caam_jr_crypto_drv, cryptodev_caam_jr_drv.driver,
 		cryptodev_driver_id);
 
+RTE_INIT(caam_jr_init)
+{
+	sec_uio_job_rings_init();
+	sec_job_rings_init();
+}
+
 RTE_INIT(caam_jr_init_log)
 {
 	caam_jr_logtype = rte_log_register("pmd.crypto.caam");
diff --git a/drivers/crypto/caam_jr/caam_jr_hw_specific.h b/drivers/crypto/caam_jr/caam_jr_hw_specific.h
index 5f58a585d7..bbe8bc3f90 100644
--- a/drivers/crypto/caam_jr/caam_jr_hw_specific.h
+++ b/drivers/crypto/caam_jr/caam_jr_hw_specific.h
@@ -360,7 +360,7 @@ struct sec_job_ring_t {
 				 * bitwise operations.
 				 */
 
-	uint32_t irq_fd;	/* The file descriptor used for polling from
+	int irq_fd;		/* The file descriptor used for polling from
 				 * user space for interrupts notifications
 				 */
 	uint32_t jr_mode;	/* Model used by SEC Driver to receive
diff --git a/drivers/crypto/caam_jr/caam_jr_pvt.h b/drivers/crypto/caam_jr/caam_jr_pvt.h
index 98cd4438aa..d6b3dafaa6 100644
--- a/drivers/crypto/caam_jr/caam_jr_pvt.h
+++ b/drivers/crypto/caam_jr/caam_jr_pvt.h
@@ -216,7 +216,7 @@ calc_chksum(void *buffer, int len)
 }
 struct uio_job_ring {
 	uint32_t jr_id;
-	uint32_t uio_fd;
+	int uio_fd;
 	void *register_base_addr;
 	int map_size;
 	int uio_minor_number;
@@ -224,8 +224,9 @@ struct uio_job_ring {
 
 int sec_cleanup(void);
 int sec_configure(void);
+void sec_uio_job_rings_init(void);
 struct uio_job_ring *config_job_ring(void);
-void free_job_ring(uint32_t uio_fd);
+void free_job_ring(int uio_fd);
 
 /* For Dma memory allocation of specified length and alignment */
 static inline void *
@@ -279,7 +280,7 @@ static inline rte_iova_t caam_jr_dma_vtop(void *ptr)
  * @retval 0 for success
  * @retval -1 value for error
  */
-uint32_t caam_jr_enable_irqs(uint32_t uio_fd);
+uint32_t caam_jr_enable_irqs(int uio_fd);
 
 /** @brief Request to SEC kernel driver to disable interrupts for descriptor
  *  finished processing
@@ -292,6 +293,6 @@ uint32_t caam_jr_enable_irqs(uint32_t uio_fd);
  * @retval -1 value for error
  *
  */
-uint32_t caam_jr_disable_irqs(uint32_t uio_fd);
+uint32_t caam_jr_disable_irqs(int uio_fd);
 
 #endif
diff --git a/drivers/crypto/caam_jr/caam_jr_uio.c b/drivers/crypto/caam_jr/caam_jr_uio.c
index b1bb44ca42..30837c1164 100644
--- a/drivers/crypto/caam_jr/caam_jr_uio.c
+++ b/drivers/crypto/caam_jr/caam_jr_uio.c
@@ -145,7 +145,7 @@ file_read_first_line(const char root[], const char subdir[],
 		 "%s/%s/%s", root, subdir, filename);
 
 	fd = open(absolute_file_name, O_RDONLY);
-	SEC_ASSERT(fd > 0, fd, "Error opening file %s",
+	SEC_ASSERT(fd >= 0, fd, "Error opening file %s",
 			absolute_file_name);
 
 	/* read UIO device name from first line in file */
@@ -179,7 +179,7 @@ file_read_first_line(const char root[], const char subdir[],
  *         kernel driver as well. No special return values are used.
  */
 static int
-sec_uio_send_command(uint32_t uio_fd, int32_t uio_command)
+sec_uio_send_command(int uio_fd, int32_t uio_command)
 {
 	int ret;
 
@@ -202,7 +202,7 @@ sec_uio_send_command(uint32_t uio_fd, int32_t uio_command)
  * @retval -1 value for error
  */
 uint32_t
-caam_jr_enable_irqs(uint32_t uio_fd)
+caam_jr_enable_irqs(int uio_fd)
 {
 	int ret;
 
@@ -233,7 +233,7 @@ caam_jr_enable_irqs(uint32_t uio_fd)
  *
  */
 uint32_t
-caam_jr_disable_irqs(uint32_t uio_fd)
+caam_jr_disable_irqs(int uio_fd)
 {
 	int ret;
 
@@ -322,12 +322,12 @@ uio_map_registers(int uio_device_fd, int uio_device_id,
 }
 
 void
-free_job_ring(uint32_t uio_fd)
+free_job_ring(int uio_fd)
 {
 	struct uio_job_ring *job_ring = NULL;
 	int i;
 
-	if (!uio_fd)
+	if (uio_fd == -1)
 		return;
 
 	for (i = 0; i < MAX_SEC_JOB_RINGS; i++) {
@@ -347,7 +347,7 @@ free_job_ring(uint32_t uio_fd)
 			job_ring->jr_id, job_ring->uio_fd);
 	close(job_ring->uio_fd);
 	g_uio_jr_num--;
-	job_ring->uio_fd = 0;
+	job_ring->uio_fd = -1;
 	if (job_ring->register_base_addr == NULL)
 		return;
 
@@ -370,7 +370,7 @@ uio_job_ring *config_job_ring(void)
 	int i;
 
 	for (i = 0; i < MAX_SEC_JOB_RINGS; i++) {
-		if (g_uio_job_ring[i].uio_fd == 0) {
+		if (g_uio_job_ring[i].uio_fd == -1) {
 			job_ring = &g_uio_job_ring[i];
 			g_uio_jr_num++;
 			break;
@@ -389,7 +389,7 @@ uio_job_ring *config_job_ring(void)
 
 	/* Open device file */
 	job_ring->uio_fd = open(uio_device_file_name, O_RDWR);
-	SEC_ASSERT(job_ring->uio_fd > 0, NULL,
+	SEC_ASSERT(job_ring->uio_fd >= 0, NULL,
 		"Failed to open UIO device file for job ring %d",
 		job_ring->jr_id);
 
@@ -488,12 +488,22 @@ sec_cleanup(void)
 		/* I need to close the fd after shutdown UIO commands need to be
 		 * sent using the fd
 		 */
-		if (job_ring->uio_fd != 0) {
+		if (job_ring->uio_fd != -1) {
 			CAAM_JR_INFO(
 			"Closed device file for job ring %d , fd = %d",
 			job_ring->jr_id, job_ring->uio_fd);
 			close(job_ring->uio_fd);
+			job_ring->uio_fd = -1;
 		}
 	}
 	return 0;
 }
+
+void
+sec_uio_job_rings_init(void)
+{
+	int i;
+
+	for (i = 0; i < MAX_SEC_JOB_RINGS; i++)
+		g_uio_job_ring[i].uio_fd = -1;
+}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-22 10:37:39.359834240 +0100
+++ 0003-crypto-caam_jr-fix-check-of-file-descriptors.patch	2020-05-22 10:37:39.056411424 +0100
@@ -1,14 +1,15 @@
-From 61552661e25df5b78be3079bc02b56a375dc0fdc Mon Sep 17 00:00:00 2001
+From 199d2c49a69f7c02d7d78251014667e679e580d9 Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Thu, 14 May 2020 18:59:55 +0800
 Subject: [PATCH] crypto/caam_jr: fix check of file descriptors
 
+[ upstream commit 61552661e25df5b78be3079bc02b56a375dc0fdc ]
+
 Zero is a valid fd. It will fail to check the fd if the fd is zero.
 The "job_ring->uio_fd" is an fd, so define it as "int".
 
 Fixes: e7a45f3cc245 ("crypto/caam_jr: add UIO specific operations")
 Fixes: a5e1018d5e67 ("crypto/caam_jr: add routines to configure HW")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Acked-by: Gagandeep Singh <g.singh@nxp.com>
@@ -20,10 +21,10 @@
  4 files changed, 45 insertions(+), 19 deletions(-)
 
 diff --git a/drivers/crypto/caam_jr/caam_jr.c b/drivers/crypto/caam_jr/caam_jr.c
-index 45003ba25a..caf2386772 100644
+index 8aaa3d45f6..86aa9a103e 100644
 --- a/drivers/crypto/caam_jr/caam_jr.c
 +++ b/drivers/crypto/caam_jr/caam_jr.c
-@@ -2072,7 +2072,7 @@ static struct rte_security_ops caam_jr_security_ops = {
+@@ -2084,7 +2084,7 @@ static struct rte_security_ops caam_jr_security_ops = {
  static void
  close_job_ring(struct sec_job_ring_t *job_ring)
  {
@@ -32,7 +33,7 @@
  		/* Producer index is frozen. If consumer index is not equal
  		 * with producer index, then we have descs to flush.
  		 */
-@@ -2081,7 +2081,7 @@ close_job_ring(struct sec_job_ring_t *job_ring)
+@@ -2093,7 +2093,7 @@ close_job_ring(struct sec_job_ring_t *job_ring)
  
  		/* free the uio job ring */
  		free_job_ring(job_ring->irq_fd);
@@ -41,7 +42,7 @@
  		caam_jr_dma_free(job_ring->input_ring);
  		caam_jr_dma_free(job_ring->output_ring);
  		g_job_rings_no--;
-@@ -2185,7 +2185,7 @@ caam_jr_dev_uninit(struct rte_cryptodev *dev)
+@@ -2197,7 +2197,7 @@ caam_jr_dev_uninit(struct rte_cryptodev *dev)
   *
   */
  static void *
@@ -50,7 +51,7 @@
  {
  	struct sec_job_ring_t *job_ring = NULL;
  	int i, ret = 0;
-@@ -2195,7 +2195,7 @@ init_job_ring(void *reg_base_addr, uint32_t irq_id)
+@@ -2207,7 +2207,7 @@ init_job_ring(void *reg_base_addr, uint32_t irq_id)
  	int irq_coalescing_count = 0;
  
  	for (i = 0; i < MAX_SEC_JOB_RINGS; i++) {
@@ -59,7 +60,7 @@
  			job_ring = &g_job_rings[i];
  			g_job_rings_no++;
  			break;
-@@ -2448,6 +2448,15 @@ cryptodev_caam_jr_remove(struct rte_vdev_device *vdev)
+@@ -2460,6 +2460,15 @@ cryptodev_caam_jr_remove(struct rte_vdev_device *vdev)
  	return rte_cryptodev_pmd_destroy(cryptodev);
  }
  
@@ -75,7 +76,7 @@
  static struct rte_vdev_driver cryptodev_caam_jr_drv = {
  	.probe = cryptodev_caam_jr_probe,
  	.remove = cryptodev_caam_jr_remove
-@@ -2462,6 +2471,12 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_CAAM_JR_PMD,
+@@ -2474,6 +2483,12 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_CAAM_JR_PMD,
  RTE_PMD_REGISTER_CRYPTO_DRIVER(caam_jr_crypto_drv, cryptodev_caam_jr_drv.driver,
  		cryptodev_driver_id);
  

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'crypto/caam_jr: fix IRQ functions return type' has been queued to stable release 19.11.3
  2020-05-22  9:39     ` [dpdk-stable] patch 'event/dsw: fix enqueue burst return value' " luca.boccassi
  2020-05-22  9:39       ` [dpdk-stable] patch 'app/eventdev: check Tx adapter service ID' " luca.boccassi
  2020-05-22  9:39       ` [dpdk-stable] patch 'crypto/caam_jr: fix check of file descriptors' " luca.boccassi
@ 2020-05-22  9:39       ` luca.boccassi
  2020-05-22  9:39       ` [dpdk-stable] patch 'build: disable gcc 10 zero-length-bounds warning' " luca.boccassi
                         ` (38 subsequent siblings)
  41 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-22  9:39 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Gagandeep Singh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/24/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From b02c7838a053c59c66cd42117b6b7b17f1f6c192 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Thu, 14 May 2020 19:00:07 +0800
Subject: [PATCH] crypto/caam_jr: fix IRQ functions return type

[ upstream commit c40b4fcd98933749a41f7b8e9b66368f920038f6 ]

The caam_jr_enable_irqs() and caam_jr_disable_irqs() methods maybe return a
negative error. So use int instead of uint32_t int the functions.

Fixes: e7a45f3cc245 ("crypto/caam_jr: add UIO specific operations")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Gagandeep Singh <g.singh@nxp.com>
---
 drivers/crypto/caam_jr/caam_jr_pvt.h | 4 ++--
 drivers/crypto/caam_jr/caam_jr_uio.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/crypto/caam_jr/caam_jr_pvt.h b/drivers/crypto/caam_jr/caam_jr_pvt.h
index d6b3dafaa6..552d6b9b1b 100644
--- a/drivers/crypto/caam_jr/caam_jr_pvt.h
+++ b/drivers/crypto/caam_jr/caam_jr_pvt.h
@@ -280,7 +280,7 @@ static inline rte_iova_t caam_jr_dma_vtop(void *ptr)
  * @retval 0 for success
  * @retval -1 value for error
  */
-uint32_t caam_jr_enable_irqs(int uio_fd);
+int caam_jr_enable_irqs(int uio_fd);
 
 /** @brief Request to SEC kernel driver to disable interrupts for descriptor
  *  finished processing
@@ -293,6 +293,6 @@ uint32_t caam_jr_enable_irqs(int uio_fd);
  * @retval -1 value for error
  *
  */
-uint32_t caam_jr_disable_irqs(int uio_fd);
+int caam_jr_disable_irqs(int uio_fd);
 
 #endif
diff --git a/drivers/crypto/caam_jr/caam_jr_uio.c b/drivers/crypto/caam_jr/caam_jr_uio.c
index 30837c1164..e4ee102344 100644
--- a/drivers/crypto/caam_jr/caam_jr_uio.c
+++ b/drivers/crypto/caam_jr/caam_jr_uio.c
@@ -201,7 +201,7 @@ sec_uio_send_command(int uio_fd, int32_t uio_command)
  * @retval 0 for success
  * @retval -1 value for error
  */
-uint32_t
+int
 caam_jr_enable_irqs(int uio_fd)
 {
 	int ret;
@@ -232,7 +232,7 @@ caam_jr_enable_irqs(int uio_fd)
  * @retval -1 value for error
  *
  */
-uint32_t
+int
 caam_jr_disable_irqs(int uio_fd)
 {
 	int ret;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-22 10:37:39.398072839 +0100
+++ 0004-crypto-caam_jr-fix-IRQ-functions-return-type.patch	2020-05-22 10:37:39.056411424 +0100
@@ -1,13 +1,14 @@
-From c40b4fcd98933749a41f7b8e9b66368f920038f6 Mon Sep 17 00:00:00 2001
+From b02c7838a053c59c66cd42117b6b7b17f1f6c192 Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Thu, 14 May 2020 19:00:07 +0800
 Subject: [PATCH] crypto/caam_jr: fix IRQ functions return type
 
+[ upstream commit c40b4fcd98933749a41f7b8e9b66368f920038f6 ]
+
 The caam_jr_enable_irqs() and caam_jr_disable_irqs() methods maybe return a
 negative error. So use int instead of uint32_t int the functions.
 
 Fixes: e7a45f3cc245 ("crypto/caam_jr: add UIO specific operations")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Acked-by: Gagandeep Singh <g.singh@nxp.com>

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'build: disable gcc 10 zero-length-bounds warning' has been queued to stable release 19.11.3
  2020-05-22  9:39     ` [dpdk-stable] patch 'event/dsw: fix enqueue burst return value' " luca.boccassi
                         ` (2 preceding siblings ...)
  2020-05-22  9:39       ` [dpdk-stable] patch 'crypto/caam_jr: fix IRQ functions return type' " luca.boccassi
@ 2020-05-22  9:39       ` luca.boccassi
  2020-05-22  9:39       ` [dpdk-stable] patch 'doc: fix LTO config option' " luca.boccassi
                         ` (37 subsequent siblings)
  41 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-22  9:39 UTC (permalink / raw)
  To: Kevin Traynor; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/24/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From f40d9a3cbbf10a46087ac0835ee41587d9313903 Mon Sep 17 00:00:00 2001
From: Kevin Traynor <ktraynor@redhat.com>
Date: Thu, 14 May 2020 14:18:57 +0100
Subject: [PATCH] build: disable gcc 10 zero-length-bounds warning
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit cfacbcb5a23bc26cb913528c372adddabbb33ca1 ]

gcc 10 issues warnings about the use of rearm_data marker
from struct rte_mbuf.

e.g.
../drivers/net/enic/enic_rxtx_vec_avx2.c: In function ‘rx_one’:
../drivers/net/enic/enic_rxtx_vec_avx2.c:21:2:
warning:
array subscript 0 is outside the bounds of an interior zero-length array
‘RTE_MARKER64’ {aka ‘long unsigned int[0]’} [-Wzero-length-bounds]
   21 |  *(uint64_t *)&mb->rearm_data = enic->mbuf_initializer;
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../lib/librte_mbuf/rte_mbuf.h:45,
                 from ../drivers/net/enic/enic_rxtx_vec_avx2.c:6:
../lib/librte_mbuf/rte_mbuf_core.h:484:15:
note: while referencing ‘rearm_data’
  484 |  RTE_MARKER64 rearm_data;
      |

Disable this warning for gcc 10 in order to allow v20.05 to build
without changes to struct rte_mbuf.

Bugzilla ID: 396

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 config/meson.build           | 4 ++++
 mk/toolchain/gcc/rte.vars.mk | 5 +++++
 2 files changed, 9 insertions(+)

diff --git a/config/meson.build b/config/meson.build
index 35ef12e30c..78bfdf3094 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -191,6 +191,10 @@ warning_flags = [
 	'-Wno-packed-not-aligned',
 	'-Wno-missing-field-initializers'
 ]
+if cc.get_id() == 'gcc' and cc.version().version_compare('>=10.0')
+# FIXME: Bugzilla 396
+	warning_flags += '-Wno-zero-length-bounds'
+endif
 if not dpdk_conf.get('RTE_ARCH_64')
 # for 32-bit, don't warn about casting a 32-bit pointer to 64-bit int - it's fine!!
 	warning_flags += '-Wno-pointer-to-int-cast'
diff --git a/mk/toolchain/gcc/rte.vars.mk b/mk/toolchain/gcc/rte.vars.mk
index 9fc704193b..b3473c06fd 100644
--- a/mk/toolchain/gcc/rte.vars.mk
+++ b/mk/toolchain/gcc/rte.vars.mk
@@ -83,6 +83,11 @@ ifeq ($(shell test $(GCC_VERSION) -lt 47 && echo 1), 1)
 WERROR_FLAGS += -Wno-uninitialized
 endif
 
+ifeq ($(shell test $(GCC_VERSION) -ge 100 && echo 1), 1)
+# FIXME: Bugzilla 396
+WERROR_FLAGS += -Wno-zero-length-bounds
+endif
+
 HOST_WERROR_FLAGS := $(WERROR_FLAGS)
 
 ifeq ($(shell test $(HOST_GCC_VERSION) -gt 70 && echo 1), 1)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-22 10:37:39.433709093 +0100
+++ 0005-build-disable-gcc-10-zero-length-bounds-warning.patch	2020-05-22 10:37:39.060411495 +0100
@@ -1,4 +1,4 @@
-From cfacbcb5a23bc26cb913528c372adddabbb33ca1 Mon Sep 17 00:00:00 2001
+From f40d9a3cbbf10a46087ac0835ee41587d9313903 Mon Sep 17 00:00:00 2001
 From: Kevin Traynor <ktraynor@redhat.com>
 Date: Thu, 14 May 2020 14:18:57 +0100
 Subject: [PATCH] build: disable gcc 10 zero-length-bounds warning
@@ -6,6 +6,8 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit cfacbcb5a23bc26cb913528c372adddabbb33ca1 ]
+
 gcc 10 issues warnings about the use of rearm_data marker
 from struct rte_mbuf.
 
@@ -28,7 +30,6 @@
 without changes to struct rte_mbuf.
 
 Bugzilla ID: 396
-Cc: stable@dpdk.org
 
 Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
 Reviewed-by: David Marchand <david.marchand@redhat.com>
@@ -38,10 +39,10 @@
  2 files changed, 9 insertions(+)
 
 diff --git a/config/meson.build b/config/meson.build
-index a1c38c053e..43ab113106 100644
+index 35ef12e30c..78bfdf3094 100644
 --- a/config/meson.build
 +++ b/config/meson.build
-@@ -208,6 +208,10 @@ warning_flags = [
+@@ -191,6 +191,10 @@ warning_flags = [
  	'-Wno-packed-not-aligned',
  	'-Wno-missing-field-initializers'
  ]
@@ -53,10 +54,10 @@
  # for 32-bit, don't warn about casting a 32-bit pointer to 64-bit int - it's fine!!
  	warning_flags += '-Wno-pointer-to-int-cast'
 diff --git a/mk/toolchain/gcc/rte.vars.mk b/mk/toolchain/gcc/rte.vars.mk
-index f19305e495..928f0e0830 100644
+index 9fc704193b..b3473c06fd 100644
 --- a/mk/toolchain/gcc/rte.vars.mk
 +++ b/mk/toolchain/gcc/rte.vars.mk
-@@ -81,6 +81,11 @@ ifeq ($(shell test $(GCC_VERSION) -lt 47 && echo 1), 1)
+@@ -83,6 +83,11 @@ ifeq ($(shell test $(GCC_VERSION) -lt 47 && echo 1), 1)
  WERROR_FLAGS += -Wno-uninitialized
  endif
  

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'doc: fix LTO config option' has been queued to stable release 19.11.3
  2020-05-22  9:39     ` [dpdk-stable] patch 'event/dsw: fix enqueue burst return value' " luca.boccassi
                         ` (3 preceding siblings ...)
  2020-05-22  9:39       ` [dpdk-stable] patch 'build: disable gcc 10 zero-length-bounds warning' " luca.boccassi
@ 2020-05-22  9:39       ` luca.boccassi
  2020-05-22  9:39       ` [dpdk-stable] patch 'doc: fix default symbol binding in ABI guide' " luca.boccassi
                         ` (36 subsequent siblings)
  41 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-22  9:39 UTC (permalink / raw)
  To: Matteo Croce; +Cc: David Marchand, Andrzej Ostruszka, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/24/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From ef254d821e6f33a294874e01bd285ca32904160b Mon Sep 17 00:00:00 2001
From: Matteo Croce <mcroce@redhat.com>
Date: Tue, 12 May 2020 21:48:56 +0200
Subject: [PATCH] doc: fix LTO config option

[ upstream commit 9aef9b9fbc21531a127e082cd6cfa698d22d235f ]

The documentation says that CONFIG_ENABLE_LTO enables LTO during the
build, but the correct value actually is CONFIG_RTE_ENABLE_LTO.

Fixes: 098cc0fea3be ("build: add option to enable LTO")

Signed-off-by: Matteo Croce <mcroce@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Andrzej Ostruszka <aostruszka@marvell.com>
---
 doc/guides/prog_guide/lto.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/guides/prog_guide/lto.rst b/doc/guides/prog_guide/lto.rst
index 43f4c63379..277a6f1090 100644
--- a/doc/guides/prog_guide/lto.rst
+++ b/doc/guides/prog_guide/lto.rst
@@ -31,7 +31,7 @@ the whole DPDK by setting:
 
 .. code-block:: console
 
-    CONFIG_ENABLE_LTO=y
+    CONFIG_RTE_ENABLE_LTO=y
 
 in config file.
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-22 10:37:39.467390592 +0100
+++ 0006-doc-fix-LTO-config-option.patch	2020-05-22 10:37:39.060411495 +0100
@@ -1,13 +1,14 @@
-From 9aef9b9fbc21531a127e082cd6cfa698d22d235f Mon Sep 17 00:00:00 2001
+From ef254d821e6f33a294874e01bd285ca32904160b Mon Sep 17 00:00:00 2001
 From: Matteo Croce <mcroce@redhat.com>
 Date: Tue, 12 May 2020 21:48:56 +0200
 Subject: [PATCH] doc: fix LTO config option
 
+[ upstream commit 9aef9b9fbc21531a127e082cd6cfa698d22d235f ]
+
 The documentation says that CONFIG_ENABLE_LTO enables LTO during the
 build, but the correct value actually is CONFIG_RTE_ENABLE_LTO.
 
 Fixes: 098cc0fea3be ("build: add option to enable LTO")
-Cc: stable@dpdk.org
 
 Signed-off-by: Matteo Croce <mcroce@redhat.com>
 Reviewed-by: David Marchand <david.marchand@redhat.com>

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'doc: fix default symbol binding in ABI guide' has been queued to stable release 19.11.3
  2020-05-22  9:39     ` [dpdk-stable] patch 'event/dsw: fix enqueue burst return value' " luca.boccassi
                         ` (4 preceding siblings ...)
  2020-05-22  9:39       ` [dpdk-stable] patch 'doc: fix LTO config option' " luca.boccassi
@ 2020-05-22  9:39       ` luca.boccassi
  2020-05-22  9:39       ` [dpdk-stable] patch 'eal: fix C++17 compilation' " luca.boccassi
                         ` (35 subsequent siblings)
  41 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-22  9:39 UTC (permalink / raw)
  To: Ray Kinsella; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/24/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 2d2ba1fb005f8585606be28276a3ff653cd3c69d Mon Sep 17 00:00:00 2001
From: Ray Kinsella <mdr@ashroe.eu>
Date: Wed, 6 May 2020 16:41:05 +0100
Subject: [PATCH] doc: fix default symbol binding in ABI guide

[ upstream commit 45a4103e680d6b9bfb2b4ee4f4ef528d8de51ec0 ]

The document abi_versioning.rst incorrectly instructs the developer to
add BIND_DEFAULT_SYMBOL to the public header, not the source file. This
commit fixes the issue and adds some clarifications.

The commit also clarifies the use of use_function_versioning in the
meson/ninja build system, and does some minor re-organization of the
document.

Fixes: f1ef9794f9bd ("doc: add ABI guidelines")

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
---
 doc/guides/contributing/abi_versioning.rst | 130 ++++++++++++++-------
 1 file changed, 87 insertions(+), 43 deletions(-)

diff --git a/doc/guides/contributing/abi_versioning.rst b/doc/guides/contributing/abi_versioning.rst
index a21f4e7a41..e526fb179a 100644
--- a/doc/guides/contributing/abi_versioning.rst
+++ b/doc/guides/contributing/abi_versioning.rst
@@ -200,7 +200,7 @@ private, is safe), but it also requires modifying the code as follows
 Note also that, being a public function, the header file prototype must also be
 changed, as must all the call sites, to reflect the new ABI footprint.  We will
 maintain previous ABI versions that are accessible only to previously compiled
-binaries
+binaries.
 
 The addition of a parameter to the function is ABI breaking as the function is
 public, and existing application may use it in its current form. However, the
@@ -266,12 +266,12 @@ This file needs to be modified as follows
 
    } DPDK_20;
 
-The addition of the new block tells the linker that a new version node is
-available (DPDK_21), which contains the symbol rte_acl_create, and inherits
+The addition of the new block tells the linker that a new version node
+``DPDK_21`` is available, which contains the symbol rte_acl_create, and inherits
 the symbols from the DPDK_20 node. This list is directly translated into a
-list of exported symbols when DPDK is compiled as a shared library
+list of exported symbols when DPDK is compiled as a shared library.
 
-Next, we need to specify in the code which function map to the rte_acl_create
+Next, we need to specify in the code which function maps to the rte_acl_create
 symbol at which versions.  First, at the site of the initial symbol definition,
 we need to update the function so that it is uniquely named, and not in conflict
 with the public symbol name
@@ -288,24 +288,29 @@ with the public symbol name
         ...
 
 Note that the base name of the symbol was kept intact, as this is conducive to
-the macros used for versioning symbols and we have annotated the function as an
-implementation of versioned symbol.  That is our next step, mapping this new
-symbol name to the initial symbol name at version node 20.  Immediately after
-the function, we add this line of code
+the macros used for versioning symbols and we have annotated the function as
+``__vsym``, an implementation of a versioned symbol . That is our next step,
+mapping this new symbol name to the initial symbol name at version node 20.
+Immediately after the function, we add the VERSION_SYMBOL macro.
 
 .. code-block:: c
 
+   #include <rte_function_versioning.h>
+
+   ...
    VERSION_SYMBOL(rte_acl_create, _v20, 20);
 
 Remembering to also add the rte_function_versioning.h header to the requisite c
-file where these changes are being made. The above macro instructs the linker to
+file where these changes are being made. The macro instructs the linker to
 create a new symbol ``rte_acl_create@DPDK_20``, which matches the symbol created
 in older builds, but now points to the above newly named function. We have now
 mapped the original rte_acl_create symbol to the original function (but with a
 new name).
 
-Next, we need to create the 21 version of the symbol. We create a new function
-name, with a different suffix, and implement it appropriately
+Please see the section :ref:`Enabling versioning macros
+<enabling_versioning_macros>` to enable this macro in the meson/ninja build.
+Next, we need to create the new ``v21`` version of the symbol. We create a new
+function name, with the ``v21`` suffix, and implement it appropriately.
 
 .. code-block:: c
 
@@ -320,35 +325,58 @@ name, with a different suffix, and implement it appropriately
    }
 
 This code serves as our new API call. Its the same as our old call, but adds the
-new parameter in place. Next we need to map this function to the symbol
-``rte_acl_create@DPDK_21``. To do this, we modify the public prototype of the
-call in the header file, adding the macro there to inform all including
-applications, that on re-link, the default rte_acl_create symbol should point to
-this function. Note that we could do this by simply naming the function above
-rte_acl_create, and the linker would chose the most recent version tag to apply
-in the version script, but we can also do this in the header file
+new parameter in place. Next we need to map this function to the new default
+symbol ``rte_acl_create@DPDK_21``. To do this, immediately after the function,
+we add the BIND_DEFAULT_SYMBOL macro.
+
+.. code-block:: c
+
+   #include <rte_function_versioning.h>
+
+   ...
+   BIND_DEFAULT_SYMBOL(rte_acl_create, _v21, 21);
+
+The macro instructs the linker to create the new default symbol
+``rte_acl_create@DPDK_21``, which points to the above newly named function.
+
+We finally modify the prototype of the call in the public header file,
+such that it contains both versions of the symbol and the public API.
 
 .. code-block:: c
 
    struct rte_acl_ctx *
-   -rte_acl_create(const struct rte_acl_param *param);
-   +rte_acl_create_v21(const struct rte_acl_param *param, int debug);
-   +BIND_DEFAULT_SYMBOL(rte_acl_create, _v21, 21);
-
-The BIND_DEFAULT_SYMBOL macro explicitly tells applications that include this
-header, to link to the rte_acl_create_v21 function and apply the DPDK_21
-version node to it.  This method is more explicit and flexible than just
-re-implementing the exact symbol name, and allows for other features (such as
-linking to the old symbol version by default, when the new ABI is to be opt-in
-for a period.
-
-One last thing we need to do.  Note that we've taken what was a public symbol,
-and duplicated it into two uniquely and differently named symbols.  We've then
-mapped each of those back to the public symbol ``rte_acl_create`` with different
-version tags.  This only applies to dynamic linking, as static linking has no
-notion of versioning.  That leaves this code in a position of no longer having a
-symbol simply named ``rte_acl_create`` and a static build will fail on that
-missing symbol.
+   rte_acl_create(const struct rte_acl_param *param);
+
+   struct rte_acl_ctx * __vsym
+   rte_acl_create_v20(const struct rte_acl_param *param);
+
+   struct rte_acl_ctx * __vsym
+   rte_acl_create_v21(const struct rte_acl_param *param, int debug);
+
+
+And that's it, on the next shared library rebuild, there will be two versions of
+rte_acl_create, an old DPDK_20 version, used by previously built applications,
+and a new DPDK_21 version, used by future built applications.
+
+.. note::
+
+   **Before you leave**, please take care reviewing the sections on
+   :ref:`mapping static symbols <mapping_static_symbols>`,
+   :ref:`enabling versioning macros <enabling_versioning_macros>`,
+   and :ref:`ABI deprecation <abi_deprecation>`.
+
+
+.. _mapping_static_symbols:
+
+Mapping static symbols
+______________________
+
+Now we've taken what was a public symbol, and duplicated it into two uniquely
+and differently named symbols. We've then mapped each of those back to the
+public symbol ``rte_acl_create`` with different version tags. This only applies
+to dynamic linking, as static linking has no notion of versioning. That leaves
+this code in a position of no longer having a symbol simply named
+``rte_acl_create`` and a static build will fail on that missing symbol.
 
 To correct this, we can simply map a function of our choosing back to the public
 symbol in the static build with the ``MAP_STATIC_SYMBOL`` macro.  Generally the
@@ -369,15 +397,31 @@ defined, we add this
 That tells the compiler that, when building a static library, any calls to the
 symbol ``rte_acl_create`` should be linked to ``rte_acl_create_v21``
 
-That's it, on the next shared library rebuild, there will be two versions of
-rte_acl_create, an old DPDK_20 version, used by previously built applications,
-and a new DPDK_21 version, used by future built applications.
 
+.. _enabling_versioning_macros:
+
+Enabling versioning macros
+__________________________
+
+Finally, we need to indicate to the :doc:`meson/ninja build system
+<../prog_guide/build-sdk-meson>` to enable versioning macros when building the
+library or driver. In the libraries or driver where we have added symbol
+versioning, in the ``meson.build`` file we add the following
+
+.. code-block::
+
+   use_function_versioning = true
+
+at the start of the head of the file. This will indicate to the tool-chain to
+enable the function version macros when building. There is no corresponding
+directive required for the ``make`` build system.
+
+.. _abi_deprecation:
 
 Deprecating part of a public API
 ________________________________
 
-Lets assume that you've done the above update, and in preparation for the next
+Lets assume that you've done the above updates, and in preparation for the next
 major ABI version you decide you would like to retire the old version of the
 function. After having gone through the ABI deprecation announcement process,
 removal is easy. Start by removing the symbol from the requisite version map
@@ -421,8 +465,8 @@ Next remove the corresponding versioned export.
 
 
 Note that the internal function definition could also be removed, but its used
-in our example by the newer version v21, so we leave it in place and declare it
-as static. This is a coding style choice.
+in our example by the newer version ``v21``, so we leave it in place and declare
+it as static. This is a coding style choice.
 
 .. _deprecating_entire_abi:
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-22 10:37:39.501733021 +0100
+++ 0007-doc-fix-default-symbol-binding-in-ABI-guide.patch	2020-05-22 10:37:39.060411495 +0100
@@ -1,8 +1,10 @@
-From 45a4103e680d6b9bfb2b4ee4f4ef528d8de51ec0 Mon Sep 17 00:00:00 2001
+From 2d2ba1fb005f8585606be28276a3ff653cd3c69d Mon Sep 17 00:00:00 2001
 From: Ray Kinsella <mdr@ashroe.eu>
 Date: Wed, 6 May 2020 16:41:05 +0100
 Subject: [PATCH] doc: fix default symbol binding in ABI guide
 
+[ upstream commit 45a4103e680d6b9bfb2b4ee4f4ef528d8de51ec0 ]
+
 The document abi_versioning.rst incorrectly instructs the developer to
 add BIND_DEFAULT_SYMBOL to the public header, not the source file. This
 commit fixes the issue and adds some clarifications.
@@ -12,7 +14,6 @@
 document.
 
 Fixes: f1ef9794f9bd ("doc: add ABI guidelines")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
 ---

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'eal: fix C++17 compilation' has been queued to stable release 19.11.3
  2020-05-22  9:39     ` [dpdk-stable] patch 'event/dsw: fix enqueue burst return value' " luca.boccassi
                         ` (5 preceding siblings ...)
  2020-05-22  9:39       ` [dpdk-stable] patch 'doc: fix default symbol binding in ABI guide' " luca.boccassi
@ 2020-05-22  9:39       ` luca.boccassi
  2020-05-22  9:39       ` [dpdk-stable] patch 'doc: fix build issue in ABI guide' " luca.boccassi
                         ` (34 subsequent siblings)
  41 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-22  9:39 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/24/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From da5586fcbea509717b38c764e20de12e3dceb5b5 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Fri, 8 May 2020 16:25:05 -0700
Subject: [PATCH] eal: fix C++17 compilation
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 3a2cd6fd069e26410810df6c2ec81d283bb6fbaa ]

Compiling a C++ application that includes directly or indirectly
rte_common.h will cause a warning:

include/rte_common.h:350:37: warning: ISO C++17 does not allow
  ‘register’ storage class specifier [-Wregister]
 rte_combine32ms1b(register uint32_t x)

C++ is pickier than standard C and flags this antique usage.

The register keyword is an old K&R legacy and should be removed
everywhere in DPDK. For now, fix it where it hurts.

Fixes: 08f683174e94 ("eal: add functions for previous power of 2 alignment")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_eal/common/include/rte_common.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eal/common/include/rte_common.h b/lib/librte_eal/common/include/rte_common.h
index c352838073..41e2778ec1 100644
--- a/lib/librte_eal/common/include/rte_common.h
+++ b/lib/librte_eal/common/include/rte_common.h
@@ -347,7 +347,7 @@ typedef uint64_t rte_iova_t;
  *    The combined value.
  */
 static inline uint32_t
-rte_combine32ms1b(register uint32_t x)
+rte_combine32ms1b(uint32_t x)
 {
 	x |= x >> 1;
 	x |= x >> 2;
@@ -369,7 +369,7 @@ rte_combine32ms1b(register uint32_t x)
  *    The combined value.
  */
 static inline uint64_t
-rte_combine64ms1b(register uint64_t v)
+rte_combine64ms1b(uint64_t v)
 {
 	v |= v >> 1;
 	v |= v >> 2;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-22 10:37:39.536608858 +0100
+++ 0008-eal-fix-C-17-compilation.patch	2020-05-22 10:37:39.064411567 +0100
@@ -1,4 +1,4 @@
-From 3a2cd6fd069e26410810df6c2ec81d283bb6fbaa Mon Sep 17 00:00:00 2001
+From da5586fcbea509717b38c764e20de12e3dceb5b5 Mon Sep 17 00:00:00 2001
 From: Stephen Hemminger <stephen@networkplumber.org>
 Date: Fri, 8 May 2020 16:25:05 -0700
 Subject: [PATCH] eal: fix C++17 compilation
@@ -6,6 +6,8 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit 3a2cd6fd069e26410810df6c2ec81d283bb6fbaa ]
+
 Compiling a C++ application that includes directly or indirectly
 rte_common.h will cause a warning:
 
@@ -19,19 +21,18 @@
 everywhere in DPDK. For now, fix it where it hurts.
 
 Fixes: 08f683174e94 ("eal: add functions for previous power of 2 alignment")
-Cc: stable@dpdk.org
 
 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
 Acked-by: Bruce Richardson <bruce.richardson@intel.com>
 ---
- lib/librte_eal/include/rte_common.h | 4 ++--
+ lib/librte_eal/common/include/rte_common.h | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
-diff --git a/lib/librte_eal/include/rte_common.h b/lib/librte_eal/include/rte_common.h
-index 668e8b0af8..0843ce69e7 100644
---- a/lib/librte_eal/include/rte_common.h
-+++ b/lib/librte_eal/include/rte_common.h
-@@ -409,7 +409,7 @@ __extension__ typedef uint64_t RTE_MARKER64[0];
+diff --git a/lib/librte_eal/common/include/rte_common.h b/lib/librte_eal/common/include/rte_common.h
+index c352838073..41e2778ec1 100644
+--- a/lib/librte_eal/common/include/rte_common.h
++++ b/lib/librte_eal/common/include/rte_common.h
+@@ -347,7 +347,7 @@ typedef uint64_t rte_iova_t;
   *    The combined value.
   */
  static inline uint32_t
@@ -40,7 +41,7 @@
  {
  	x |= x >> 1;
  	x |= x >> 2;
-@@ -431,7 +431,7 @@ rte_combine32ms1b(register uint32_t x)
+@@ -369,7 +369,7 @@ rte_combine32ms1b(register uint32_t x)
   *    The combined value.
   */
  static inline uint64_t

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'doc: fix build issue in ABI guide' has been queued to stable release 19.11.3
  2020-05-22  9:39     ` [dpdk-stable] patch 'event/dsw: fix enqueue burst return value' " luca.boccassi
                         ` (6 preceding siblings ...)
  2020-05-22  9:39       ` [dpdk-stable] patch 'eal: fix C++17 compilation' " luca.boccassi
@ 2020-05-22  9:39       ` luca.boccassi
  2020-05-22  9:39       ` [dpdk-stable] patch 'net/e1000: fix port hotplug for multi-process' " luca.boccassi
                         ` (33 subsequent siblings)
  41 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-22  9:39 UTC (permalink / raw)
  To: Raslan Darawsheh; +Cc: Ray Kinsella, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/24/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 2e33e6b1448e9f70a4a56dfc35d2e8ef9431bcda Mon Sep 17 00:00:00 2001
From: Raslan Darawsheh <rasland@mellanox.com>
Date: Tue, 19 May 2020 10:36:53 +0300
Subject: [PATCH] doc: fix build issue in ABI guide

[ upstream commit efdda86bd4151dc2819ee4be5c6f3cb9245a84e8 ]

doc/guides/contributing/abi_versioning.rst:416:
 ERROR: Error in "code-block" directive:
1 argument(s) required, 0 supplied.

.. code-block::

   use_function_versioning = true

Fixes: 45a4103e680d ("doc: fix default symbol binding in ABI guide")

Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 doc/guides/contributing/abi_versioning.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/guides/contributing/abi_versioning.rst b/doc/guides/contributing/abi_versioning.rst
index e526fb179a..d4fe93bb3c 100644
--- a/doc/guides/contributing/abi_versioning.rst
+++ b/doc/guides/contributing/abi_versioning.rst
@@ -408,7 +408,7 @@ Finally, we need to indicate to the :doc:`meson/ninja build system
 library or driver. In the libraries or driver where we have added symbol
 versioning, in the ``meson.build`` file we add the following
 
-.. code-block::
+.. code-block:: none
 
    use_function_versioning = true
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-22 10:37:39.569905573 +0100
+++ 0009-doc-fix-build-issue-in-ABI-guide.patch	2020-05-22 10:37:39.064411567 +0100
@@ -1,8 +1,10 @@
-From efdda86bd4151dc2819ee4be5c6f3cb9245a84e8 Mon Sep 17 00:00:00 2001
+From 2e33e6b1448e9f70a4a56dfc35d2e8ef9431bcda Mon Sep 17 00:00:00 2001
 From: Raslan Darawsheh <rasland@mellanox.com>
 Date: Tue, 19 May 2020 10:36:53 +0300
 Subject: [PATCH] doc: fix build issue in ABI guide
 
+[ upstream commit efdda86bd4151dc2819ee4be5c6f3cb9245a84e8 ]
+
 doc/guides/contributing/abi_versioning.rst:416:
  ERROR: Error in "code-block" directive:
 1 argument(s) required, 0 supplied.
@@ -21,10 +23,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/doc/guides/contributing/abi_versioning.rst b/doc/guides/contributing/abi_versioning.rst
-index ef881877f1..f4a9273afc 100644
+index e526fb179a..d4fe93bb3c 100644
 --- a/doc/guides/contributing/abi_versioning.rst
 +++ b/doc/guides/contributing/abi_versioning.rst
-@@ -413,7 +413,7 @@ Finally, we need to indicate to the :doc:`meson/ninja build system
+@@ -408,7 +408,7 @@ Finally, we need to indicate to the :doc:`meson/ninja build system
  library or driver. In the libraries or driver where we have added symbol
  versioning, in the ``meson.build`` file we add the following
  

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/e1000: fix port hotplug for multi-process' has been queued to stable release 19.11.3
  2020-05-22  9:39     ` [dpdk-stable] patch 'event/dsw: fix enqueue burst return value' " luca.boccassi
                         ` (7 preceding siblings ...)
  2020-05-22  9:39       ` [dpdk-stable] patch 'doc: fix build issue in ABI guide' " luca.boccassi
@ 2020-05-22  9:39       ` luca.boccassi
  2020-05-22  9:39       ` [dpdk-stable] patch 'doc: fix multicast filter feature announcement' " luca.boccassi
                         ` (32 subsequent siblings)
  41 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-22  9:39 UTC (permalink / raw)
  To: Alvin Zhang; +Cc: Jianwei Mei, Jeff Guo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/24/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From fc962b01c7428ec199de39f6cae25a737ffc7ded Mon Sep 17 00:00:00 2001
From: Alvin Zhang <alvinx.zhang@intel.com>
Date: Wed, 29 Apr 2020 14:37:24 +0800
Subject: [PATCH] net/e1000: fix port hotplug for multi-process

[ upstream commit 3a19eeb0c3329905fbb927fdbac90e548061130d ]

Enable detach device on secondary process.

Fixes: b9eee2cb8c29 ("e1000: support port hotplug")

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Tested-by: Jianwei Mei <jianweix.mei@intel.com>
Reviewed-by: Jeff Guo <jia.guo@intel.com>
---
 drivers/net/e1000/em_ethdev.c  | 2 +-
 drivers/net/e1000/igb_ethdev.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index 080cbe2df5..fc47993c83 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -321,7 +321,7 @@ eth_em_dev_uninit(struct rte_eth_dev *eth_dev)
 	PMD_INIT_FUNC_TRACE();
 
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
-		return -EPERM;
+		return 0;
 
 	eth_em_close(eth_dev);
 
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index a3e30dbe5a..e061615b88 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -922,7 +922,7 @@ eth_igb_dev_uninit(struct rte_eth_dev *eth_dev)
 	PMD_INIT_FUNC_TRACE();
 
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
-		return -EPERM;
+		return 0;
 
 	eth_igb_close(eth_dev);
 
@@ -1043,7 +1043,7 @@ eth_igbvf_dev_uninit(struct rte_eth_dev *eth_dev)
 	PMD_INIT_FUNC_TRACE();
 
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
-		return -EPERM;
+		return 0;
 
 	igbvf_dev_close(eth_dev);
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-22 10:37:39.606036528 +0100
+++ 0010-net-e1000-fix-port-hotplug-for-multi-process.patch	2020-05-22 10:37:39.072411710 +0100
@@ -1,12 +1,13 @@
-From 3a19eeb0c3329905fbb927fdbac90e548061130d Mon Sep 17 00:00:00 2001
+From fc962b01c7428ec199de39f6cae25a737ffc7ded Mon Sep 17 00:00:00 2001
 From: Alvin Zhang <alvinx.zhang@intel.com>
 Date: Wed, 29 Apr 2020 14:37:24 +0800
 Subject: [PATCH] net/e1000: fix port hotplug for multi-process
 
+[ upstream commit 3a19eeb0c3329905fbb927fdbac90e548061130d ]
+
 Enable detach device on secondary process.
 
 Fixes: b9eee2cb8c29 ("e1000: support port hotplug")
-Cc: stable@dpdk.org
 
 Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
 Tested-by: Jianwei Mei <jianweix.mei@intel.com>
@@ -17,7 +18,7 @@
  2 files changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
-index 188cda3508..902b1cdca0 100644
+index 080cbe2df5..fc47993c83 100644
 --- a/drivers/net/e1000/em_ethdev.c
 +++ b/drivers/net/e1000/em_ethdev.c
 @@ -321,7 +321,7 @@ eth_em_dev_uninit(struct rte_eth_dev *eth_dev)
@@ -30,10 +31,10 @@
  	eth_em_close(eth_dev);
  
 diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
-index 520fba8fab..a5551e8175 100644
+index a3e30dbe5a..e061615b88 100644
 --- a/drivers/net/e1000/igb_ethdev.c
 +++ b/drivers/net/e1000/igb_ethdev.c
-@@ -923,7 +923,7 @@ eth_igb_dev_uninit(struct rte_eth_dev *eth_dev)
+@@ -922,7 +922,7 @@ eth_igb_dev_uninit(struct rte_eth_dev *eth_dev)
  	PMD_INIT_FUNC_TRACE();
  
  	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
@@ -42,7 +43,7 @@
  
  	eth_igb_close(eth_dev);
  
-@@ -1044,7 +1044,7 @@ eth_igbvf_dev_uninit(struct rte_eth_dev *eth_dev)
+@@ -1043,7 +1043,7 @@ eth_igbvf_dev_uninit(struct rte_eth_dev *eth_dev)
  	PMD_INIT_FUNC_TRACE();
  
  	if (rte_eal_process_type() != RTE_PROC_PRIMARY)

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'doc: fix multicast filter feature announcement' has been queued to stable release 19.11.3
  2020-05-22  9:39     ` [dpdk-stable] patch 'event/dsw: fix enqueue burst return value' " luca.boccassi
                         ` (8 preceding siblings ...)
  2020-05-22  9:39       ` [dpdk-stable] patch 'net/e1000: fix port hotplug for multi-process' " luca.boccassi
@ 2020-05-22  9:39       ` luca.boccassi
  2020-05-22  9:39       ` [dpdk-stable] patch 'common/mlx5: fix umem buffer alignment' " luca.boccassi
                         ` (31 subsequent siblings)
  41 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-22  9:39 UTC (permalink / raw)
  To: Qiming Yang; +Cc: Xiaolong Ye, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/24/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 348a2c5a9adc385b34bf0686c3c53da2eac59f69 Mon Sep 17 00:00:00 2001
From: Qiming Yang <qiming.yang@intel.com>
Date: Fri, 8 May 2020 22:04:09 +0800
Subject: [PATCH] doc: fix multicast filter feature announcement

[ upstream commit 13e4897d98b0af690c81ffd02d212992ce6d9348 ]

Multicast MAC filter flag means device ops set_mc_addr_list support
or not. This patch fixes the wrong flag value in Intel driver's document.

Fixes: 9db3f52126fb ("doc: generate NIC overview table from ini files")
Fixes: cb25d4323fbf ("net/avf: enable MAC VLAN and promisc ops")
Fixes: 26e887343321 ("net/ice: support MAC ops")

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
 doc/guides/nics/features/i40e.ini  | 1 -
 doc/guides/nics/features/iavf.ini  | 1 -
 doc/guides/nics/features/ice.ini   | 1 -
 doc/guides/nics/features/igb.ini   | 1 +
 doc/guides/nics/features/ixgbe.ini | 1 +
 5 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/doc/guides/nics/features/i40e.ini b/doc/guides/nics/features/i40e.ini
index e5ae6ded08..c2717cdc47 100644
--- a/doc/guides/nics/features/i40e.ini
+++ b/doc/guides/nics/features/i40e.ini
@@ -18,7 +18,6 @@ TSO                  = Y
 Promiscuous mode     = Y
 Allmulticast mode    = Y
 Unicast MAC filter   = Y
-Multicast MAC filter = Y
 RSS hash             = Y
 RSS key update       = Y
 RSS reta update      = Y
diff --git a/doc/guides/nics/features/iavf.ini b/doc/guides/nics/features/iavf.ini
index 80143059e4..f08392a9cf 100644
--- a/doc/guides/nics/features/iavf.ini
+++ b/doc/guides/nics/features/iavf.ini
@@ -15,7 +15,6 @@ TSO                  = Y
 Promiscuous mode     = Y
 Allmulticast mode    = Y
 Unicast MAC filter   = Y
-Multicast MAC filter = Y
 RSS hash             = Y
 RSS key update       = Y
 RSS reta update      = Y
diff --git a/doc/guides/nics/features/ice.ini b/doc/guides/nics/features/ice.ini
index 65923f0bc0..949d09f423 100644
--- a/doc/guides/nics/features/ice.ini
+++ b/doc/guides/nics/features/ice.ini
@@ -18,7 +18,6 @@ TSO                  = Y
 Promiscuous mode     = Y
 Allmulticast mode    = Y
 Unicast MAC filter   = Y
-Multicast MAC filter = Y
 RSS hash             = Y
 RSS key update       = Y
 RSS reta update      = Y
diff --git a/doc/guides/nics/features/igb.ini b/doc/guides/nics/features/igb.ini
index 0351f8495d..167c0cabe8 100644
--- a/doc/guides/nics/features/igb.ini
+++ b/doc/guides/nics/features/igb.ini
@@ -15,6 +15,7 @@ TSO                  = Y
 Promiscuous mode     = Y
 Allmulticast mode    = Y
 Unicast MAC filter   = Y
+Multicast MAC filter = Y
 RSS hash             = Y
 RSS key update       = Y
 RSS reta update      = Y
diff --git a/doc/guides/nics/features/ixgbe.ini b/doc/guides/nics/features/ixgbe.ini
index c412d7af1a..1c7a2a5240 100644
--- a/doc/guides/nics/features/ixgbe.ini
+++ b/doc/guides/nics/features/ixgbe.ini
@@ -17,6 +17,7 @@ TSO                  = Y
 Promiscuous mode     = Y
 Allmulticast mode    = Y
 Unicast MAC filter   = Y
+Multicast MAC filter = Y
 RSS hash             = Y
 RSS key update       = Y
 RSS reta update      = Y
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-22 10:37:39.649213343 +0100
+++ 0011-doc-fix-multicast-filter-feature-announcement.patch	2020-05-22 10:37:39.072411710 +0100
@@ -1,15 +1,16 @@
-From 13e4897d98b0af690c81ffd02d212992ce6d9348 Mon Sep 17 00:00:00 2001
+From 348a2c5a9adc385b34bf0686c3c53da2eac59f69 Mon Sep 17 00:00:00 2001
 From: Qiming Yang <qiming.yang@intel.com>
 Date: Fri, 8 May 2020 22:04:09 +0800
 Subject: [PATCH] doc: fix multicast filter feature announcement
 
+[ upstream commit 13e4897d98b0af690c81ffd02d212992ce6d9348 ]
+
 Multicast MAC filter flag means device ops set_mc_addr_list support
 or not. This patch fixes the wrong flag value in Intel driver's document.
 
 Fixes: 9db3f52126fb ("doc: generate NIC overview table from ini files")
 Fixes: cb25d4323fbf ("net/avf: enable MAC VLAN and promisc ops")
 Fixes: 26e887343321 ("net/ice: support MAC ops")
-Cc: stable@dpdk.org
 
 Signed-off-by: Qiming Yang <qiming.yang@intel.com>
 Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
@@ -22,10 +23,10 @@
  5 files changed, 2 insertions(+), 3 deletions(-)
 
 diff --git a/doc/guides/nics/features/i40e.ini b/doc/guides/nics/features/i40e.ini
-index a326f7345f..2e89079f51 100644
+index e5ae6ded08..c2717cdc47 100644
 --- a/doc/guides/nics/features/i40e.ini
 +++ b/doc/guides/nics/features/i40e.ini
-@@ -19,7 +19,6 @@ TSO                  = Y
+@@ -18,7 +18,6 @@ TSO                  = Y
  Promiscuous mode     = Y
  Allmulticast mode    = Y
  Unicast MAC filter   = Y
@@ -34,7 +35,7 @@
  RSS key update       = Y
  RSS reta update      = Y
 diff --git a/doc/guides/nics/features/iavf.ini b/doc/guides/nics/features/iavf.ini
-index 17f7928eb1..2e7cea38d8 100644
+index 80143059e4..f08392a9cf 100644
 --- a/doc/guides/nics/features/iavf.ini
 +++ b/doc/guides/nics/features/iavf.ini
 @@ -15,7 +15,6 @@ TSO                  = Y
@@ -46,7 +47,7 @@
  RSS key update       = Y
  RSS reta update      = Y
 diff --git a/doc/guides/nics/features/ice.ini b/doc/guides/nics/features/ice.ini
-index 895d6b3096..3ee1f6ea45 100644
+index 65923f0bc0..949d09f423 100644
 --- a/doc/guides/nics/features/ice.ini
 +++ b/doc/guides/nics/features/ice.ini
 @@ -18,7 +18,6 @@ TSO                  = Y
@@ -70,7 +71,7 @@
  RSS key update       = Y
  RSS reta update      = Y
 diff --git a/doc/guides/nics/features/ixgbe.ini b/doc/guides/nics/features/ixgbe.ini
-index fab0487fa9..f817c93b85 100644
+index c412d7af1a..1c7a2a5240 100644
 --- a/doc/guides/nics/features/ixgbe.ini
 +++ b/doc/guides/nics/features/ixgbe.ini
 @@ -17,6 +17,7 @@ TSO                  = Y

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'common/mlx5: fix umem buffer alignment' has been queued to stable release 19.11.3
  2020-05-22  9:39     ` [dpdk-stable] patch 'event/dsw: fix enqueue burst return value' " luca.boccassi
                         ` (9 preceding siblings ...)
  2020-05-22  9:39       ` [dpdk-stable] patch 'doc: fix multicast filter feature announcement' " luca.boccassi
@ 2020-05-22  9:39       ` luca.boccassi
  2020-05-22  9:39       ` [dpdk-stable] patch 'net/ixgbe: fix statistics in flow control mode' " luca.boccassi
                         ` (30 subsequent siblings)
  41 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-22  9:39 UTC (permalink / raw)
  To: Dekel Peled; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/24/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 22f701a5d4ce1a8f97695545818f1ac140ff91b3 Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Mon, 11 May 2020 13:02:45 +0300
Subject: [PATCH] common/mlx5: fix umem buffer alignment

[ upstream commit 4240b11e7b32e5b5ca23eb81fbcd6ac5c967248c ]

The value MLX5_WQE_BUF_ALIGNMENT is defined as 512.
In some cases this alignment size is not adequate, which results in
memory registration that is not accepted by FW.
The result error can be "page_offset is not aligned to page_size/64,
bad umem_offset" (syndrome 0x357275).

This patch updates the definition to match the running system.

Fixes: 18a68e046b51 ("net/mlx5: fix DevX Rx queue memory alignment")

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx5/mlx5_prm.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_prm.h b/drivers/net/mlx5/mlx5_prm.h
index bdbfe56a13..4c86719769 100644
--- a/drivers/net/mlx5/mlx5_prm.h
+++ b/drivers/net/mlx5/mlx5_prm.h
@@ -18,6 +18,8 @@
 #pragma GCC diagnostic error "-Wpedantic"
 #endif
 
+#include <unistd.h>
+
 #include <rte_vect.h>
 #include "mlx5_autoconf.h"
 
@@ -251,7 +253,7 @@
 #define MLX5_MAX_LOG_RQ_SEGS 5u
 
 /* The alignment needed for WQ buffer. */
-#define MLX5_WQE_BUF_ALIGNMENT 512
+#define MLX5_WQE_BUF_ALIGNMENT sysconf(_SC_PAGESIZE)
 
 /* Completion mode. */
 enum mlx5_completion_mode {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-22 10:37:39.684834095 +0100
+++ 0012-common-mlx5-fix-umem-buffer-alignment.patch	2020-05-22 10:37:39.076411781 +0100
@@ -1,8 +1,10 @@
-From 4240b11e7b32e5b5ca23eb81fbcd6ac5c967248c Mon Sep 17 00:00:00 2001
+From 22f701a5d4ce1a8f97695545818f1ac140ff91b3 Mon Sep 17 00:00:00 2001
 From: Dekel Peled <dekelp@mellanox.com>
 Date: Mon, 11 May 2020 13:02:45 +0300
 Subject: [PATCH] common/mlx5: fix umem buffer alignment
 
+[ upstream commit 4240b11e7b32e5b5ca23eb81fbcd6ac5c967248c ]
+
 The value MLX5_WQE_BUF_ALIGNMENT is defined as 512.
 In some cases this alignment size is not adequate, which results in
 memory registration that is not accepted by FW.
@@ -12,26 +14,25 @@
 This patch updates the definition to match the running system.
 
 Fixes: 18a68e046b51 ("net/mlx5: fix DevX Rx queue memory alignment")
-Cc: stable@dpdk.org
 
 Signed-off-by: Dekel Peled <dekelp@mellanox.com>
 Acked-by: Matan Azrad <matan@mellanox.com>
 ---
- drivers/common/mlx5/mlx5_prm.h | 4 +++-
+ drivers/net/mlx5/mlx5_prm.h | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
 
-diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h
-index 4ab1c75930..b39a141d74 100644
---- a/drivers/common/mlx5/mlx5_prm.h
-+++ b/drivers/common/mlx5/mlx5_prm.h
-@@ -16,6 +16,8 @@
+diff --git a/drivers/net/mlx5/mlx5_prm.h b/drivers/net/mlx5/mlx5_prm.h
+index bdbfe56a13..4c86719769 100644
+--- a/drivers/net/mlx5/mlx5_prm.h
++++ b/drivers/net/mlx5/mlx5_prm.h
+@@ -18,6 +18,8 @@
  #pragma GCC diagnostic error "-Wpedantic"
  #endif
  
 +#include <unistd.h>
 +
  #include <rte_vect.h>
- #include <rte_byteorder.h>
+ #include "mlx5_autoconf.h"
  
 @@ -251,7 +253,7 @@
  #define MLX5_MAX_LOG_RQ_SEGS 5u

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/ixgbe: fix statistics in flow control mode' has been queued to stable release 19.11.3
  2020-05-22  9:39     ` [dpdk-stable] patch 'event/dsw: fix enqueue burst return value' " luca.boccassi
                         ` (10 preceding siblings ...)
  2020-05-22  9:39       ` [dpdk-stable] patch 'common/mlx5: fix umem buffer alignment' " luca.boccassi
@ 2020-05-22  9:39       ` luca.boccassi
  2020-05-22  9:39       ` [dpdk-stable] patch 'net/qede: fix link state configuration' " luca.boccassi
                         ` (29 subsequent siblings)
  41 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-22  9:39 UTC (permalink / raw)
  To: Guinan Sun; +Cc: Wei Zhao, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/24/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From f98d3de91334216d2b9616ec987c0017473c66e0 Mon Sep 17 00:00:00 2001
From: Guinan Sun <guinanx.sun@intel.com>
Date: Tue, 12 May 2020 08:13:06 +0000
Subject: [PATCH] net/ixgbe: fix statistics in flow control mode

[ upstream commit 861ca8b1e97c68727cbafbb859cc6c2ff017801e ]

The register autoneg can't be updated synchronously with flow control
mode setting in the state of port start, so NIC statistics error occurs.
AUTO_NEG Advt register should be updated by ixgbe_setup_fc() when
enabling flow control.
The patch fixes the issue.

Fixes: a524f550da6e ("net/ixgbe: fix flow control mode setting")

Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index ce0c05fcc2..50edb69cb2 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -2541,6 +2541,8 @@ ixgbe_flow_ctrl_enable(struct rte_eth_dev *dev, struct ixgbe_hw *hw)
 	int err;
 	uint32_t mflcn;
 
+	ixgbe_setup_fc(hw);
+
 	err = ixgbe_fc_enable(hw);
 
 	/* Not negotiated is not an error case */
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-22 10:37:39.720114530 +0100
+++ 0013-net-ixgbe-fix-statistics-in-flow-control-mode.patch	2020-05-22 10:37:39.088411997 +0100
@@ -1,8 +1,10 @@
-From 861ca8b1e97c68727cbafbb859cc6c2ff017801e Mon Sep 17 00:00:00 2001
+From f98d3de91334216d2b9616ec987c0017473c66e0 Mon Sep 17 00:00:00 2001
 From: Guinan Sun <guinanx.sun@intel.com>
 Date: Tue, 12 May 2020 08:13:06 +0000
 Subject: [PATCH] net/ixgbe: fix statistics in flow control mode
 
+[ upstream commit 861ca8b1e97c68727cbafbb859cc6c2ff017801e ]
+
 The register autoneg can't be updated synchronously with flow control
 mode setting in the state of port start, so NIC statistics error occurs.
 AUTO_NEG Advt register should be updated by ixgbe_setup_fc() when
@@ -10,7 +12,6 @@
 The patch fixes the issue.
 
 Fixes: a524f550da6e ("net/ixgbe: fix flow control mode setting")
-Cc: stable@dpdk.org
 
 Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
 Reviewed-by: Wei Zhao <wei.zhao1@intel.com>
@@ -19,10 +20,10 @@
  1 file changed, 2 insertions(+)
 
 diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
-index a4e5c539de..f8a84c565f 100644
+index ce0c05fcc2..50edb69cb2 100644
 --- a/drivers/net/ixgbe/ixgbe_ethdev.c
 +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
-@@ -2543,6 +2543,8 @@ ixgbe_flow_ctrl_enable(struct rte_eth_dev *dev, struct ixgbe_hw *hw)
+@@ -2541,6 +2541,8 @@ ixgbe_flow_ctrl_enable(struct rte_eth_dev *dev, struct ixgbe_hw *hw)
  	int err;
  	uint32_t mflcn;
  

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/qede: fix link state configuration' has been queued to stable release 19.11.3
  2020-05-22  9:39     ` [dpdk-stable] patch 'event/dsw: fix enqueue burst return value' " luca.boccassi
                         ` (11 preceding siblings ...)
  2020-05-22  9:39       ` [dpdk-stable] patch 'net/ixgbe: fix statistics in flow control mode' " luca.boccassi
@ 2020-05-22  9:39       ` luca.boccassi
  2020-05-22  9:39       ` [dpdk-stable] patch 'net/mlx5: fix VLAN flow action with wildcard VLAN item' " luca.boccassi
                         ` (28 subsequent siblings)
  41 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-22  9:39 UTC (permalink / raw)
  To: Rasesh Mody; +Cc: Shahed Shaikh, Igor Russkikh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/24/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 4de7d8bc2151a12801432c72df41828d3eab4138 Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rmody@marvell.com>
Date: Wed, 13 May 2020 21:09:02 -0700
Subject: [PATCH] net/qede: fix link state configuration

[ upstream commit d789705873d47d70a3ba0a6a4dfb83fb629d3464 ]

Move link state enable/disable to dev_start() and dev_stop()
respectively. This will ensure when devices are stopped,
link status will be appropriately shown as down.

Fixes: dd28bc8c6ef4 ("net/qede: fix VF port creation sequence")

Signed-off-by: Shahed Shaikh <shshaikh@marvell.com>
Signed-off-by: Rasesh Mody <rmody@marvell.com>
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
---
 drivers/net/qede/qede_ethdev.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index c7a4c031b7..4b3f506506 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -1076,6 +1076,9 @@ static int qede_dev_start(struct rte_eth_dev *eth_dev)
 	if (qede_activate_vport(eth_dev, true))
 		goto err;
 
+	/* Bring-up the link */
+	qede_dev_set_link_state(eth_dev, true);
+
 	/* Update link status */
 	qede_link_update(eth_dev, 0);
 
@@ -1097,6 +1100,12 @@ static void qede_dev_stop(struct rte_eth_dev *eth_dev)
 
 	PMD_INIT_FUNC_TRACE(edev);
 
+	/* Bring the link down */
+	qede_dev_set_link_state(eth_dev, false);
+
+	/* Update link status */
+	qede_link_update(eth_dev, 0);
+
 	/* Disable vport */
 	if (qede_activate_vport(eth_dev, false))
 		return;
@@ -1481,8 +1490,6 @@ static void qede_dev_close(struct rte_eth_dev *eth_dev)
 	eth_dev->data->nb_rx_queues = 0;
 	eth_dev->data->nb_tx_queues = 0;
 
-	/* Bring the link down */
-	qede_dev_set_link_state(eth_dev, false);
 	qdev->ops->common->slowpath_stop(edev);
 	qdev->ops->common->remove(edev);
 	rte_intr_disable(&pci_dev->intr_handle);
@@ -2605,9 +2612,6 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf)
 
 	eth_dev->dev_ops = (is_vf) ? &qede_eth_vf_dev_ops : &qede_eth_dev_ops;
 
-	/* Bring-up the link */
-	qede_dev_set_link_state(eth_dev, true);
-
 	adapter->num_tx_queues = 0;
 	adapter->num_rx_queues = 0;
 	SLIST_INIT(&adapter->arfs_info.arfs_list_head);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-22 10:37:39.763972707 +0100
+++ 0014-net-qede-fix-link-state-configuration.patch	2020-05-22 10:37:39.088411997 +0100
@@ -1,14 +1,15 @@
-From d789705873d47d70a3ba0a6a4dfb83fb629d3464 Mon Sep 17 00:00:00 2001
+From 4de7d8bc2151a12801432c72df41828d3eab4138 Mon Sep 17 00:00:00 2001
 From: Rasesh Mody <rmody@marvell.com>
 Date: Wed, 13 May 2020 21:09:02 -0700
 Subject: [PATCH] net/qede: fix link state configuration
 
+[ upstream commit d789705873d47d70a3ba0a6a4dfb83fb629d3464 ]
+
 Move link state enable/disable to dev_start() and dev_stop()
 respectively. This will ensure when devices are stopped,
 link status will be appropriately shown as down.
 
 Fixes: dd28bc8c6ef4 ("net/qede: fix VF port creation sequence")
-Cc: stable@dpdk.org
 
 Signed-off-by: Shahed Shaikh <shshaikh@marvell.com>
 Signed-off-by: Rasesh Mody <rmody@marvell.com>
@@ -18,10 +19,10 @@
  1 file changed, 9 insertions(+), 5 deletions(-)
 
 diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
-index e71fa1e6a7..0b1fca9aca 100644
+index c7a4c031b7..4b3f506506 100644
 --- a/drivers/net/qede/qede_ethdev.c
 +++ b/drivers/net/qede/qede_ethdev.c
-@@ -1144,6 +1144,9 @@ static int qede_dev_start(struct rte_eth_dev *eth_dev)
+@@ -1076,6 +1076,9 @@ static int qede_dev_start(struct rte_eth_dev *eth_dev)
  	if (qede_activate_vport(eth_dev, true))
  		goto err;
  
@@ -31,7 +32,7 @@
  	/* Update link status */
  	qede_link_update(eth_dev, 0);
  
-@@ -1166,6 +1169,12 @@ static void qede_dev_stop(struct rte_eth_dev *eth_dev)
+@@ -1097,6 +1100,12 @@ static void qede_dev_stop(struct rte_eth_dev *eth_dev)
  
  	PMD_INIT_FUNC_TRACE(edev);
  
@@ -44,7 +45,7 @@
  	/* Disable vport */
  	if (qede_activate_vport(eth_dev, false))
  		return;
-@@ -1550,8 +1559,6 @@ static void qede_dev_close(struct rte_eth_dev *eth_dev)
+@@ -1481,8 +1490,6 @@ static void qede_dev_close(struct rte_eth_dev *eth_dev)
  	eth_dev->data->nb_rx_queues = 0;
  	eth_dev->data->nb_tx_queues = 0;
  
@@ -53,7 +54,7 @@
  	qdev->ops->common->slowpath_stop(edev);
  	qdev->ops->common->remove(edev);
  	rte_intr_disable(&pci_dev->intr_handle);
-@@ -2672,9 +2679,6 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf)
+@@ -2605,9 +2612,6 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf)
  
  	eth_dev->dev_ops = (is_vf) ? &qede_eth_vf_dev_ops : &qede_eth_dev_ops;
  

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/mlx5: fix VLAN flow action with wildcard VLAN item' has been queued to stable release 19.11.3
  2020-05-22  9:39     ` [dpdk-stable] patch 'event/dsw: fix enqueue burst return value' " luca.boccassi
                         ` (12 preceding siblings ...)
  2020-05-22  9:39       ` [dpdk-stable] patch 'net/qede: fix link state configuration' " luca.boccassi
@ 2020-05-22  9:39       ` luca.boccassi
  2020-05-22  9:39       ` [dpdk-stable] patch 'net/vmxnet3: handle bad host framing' " luca.boccassi
                         ` (27 subsequent siblings)
  41 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-22  9:39 UTC (permalink / raw)
  To: Dekel Peled; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/24/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From a15ee3e4a71265479439da08a2880a50ae6fd634 Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Wed, 13 May 2020 22:49:19 +0300
Subject: [PATCH] net/mlx5: fix VLAN flow action with wildcard VLAN item

[ upstream commit ff55182ce3f04c8f8851dc52f1719c26e3f3a40f ]

Previous patch added support of VLAN item without VLAN ID value,
i.e. using wildcard VLAN item, to match VLAN with any VLAN ID.
The implication on VLAN actions was not taken into consideration.
VLAN actions (e.g. push vlan) use the VLAN ID value in the VLAN item,
and expect it to be valid.

This patch updates function flow_dev_get_vlan_info_from_items() to
check the VLAN item contents before trying to use it.

Fixes: 92818d839e8e ("net/mlx5: fix match on empty VLAN item in DV mode")

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 9233853e1d..d83e49f954 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1728,6 +1728,9 @@ flow_dev_get_vlan_info_from_items(const struct rte_flow_item *items,
 		const struct rte_flow_item_vlan *vlan_m = items->mask;
 		const struct rte_flow_item_vlan *vlan_v = items->spec;
 
+		/* If VLAN item in pattern doesn't contain data, return here. */
+		if (!vlan_v)
+			return;
 		if (!vlan_m)
 			vlan_m = &nic_mask;
 		/* Only full match values are accepted */
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-22 10:37:39.802053062 +0100
+++ 0015-net-mlx5-fix-VLAN-flow-action-with-wildcard-VLAN-ite.patch	2020-05-22 10:37:39.100412212 +0100
@@ -1,8 +1,10 @@
-From ff55182ce3f04c8f8851dc52f1719c26e3f3a40f Mon Sep 17 00:00:00 2001
+From a15ee3e4a71265479439da08a2880a50ae6fd634 Mon Sep 17 00:00:00 2001
 From: Dekel Peled <dekelp@mellanox.com>
 Date: Wed, 13 May 2020 22:49:19 +0300
 Subject: [PATCH] net/mlx5: fix VLAN flow action with wildcard VLAN item
 
+[ upstream commit ff55182ce3f04c8f8851dc52f1719c26e3f3a40f ]
+
 Previous patch added support of VLAN item without VLAN ID value,
 i.e. using wildcard VLAN item, to match VLAN with any VLAN ID.
 The implication on VLAN actions was not taken into consideration.
@@ -13,7 +15,6 @@
 check the VLAN item contents before trying to use it.
 
 Fixes: 92818d839e8e ("net/mlx5: fix match on empty VLAN item in DV mode")
-Cc: stable@dpdk.org
 
 Signed-off-by: Dekel Peled <dekelp@mellanox.com>
 Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
@@ -22,10 +23,10 @@
  1 file changed, 3 insertions(+)
 
 diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index fd002f3c57..71da5fbefe 100644
+index 9233853e1d..d83e49f954 100644
 --- a/drivers/net/mlx5/mlx5_flow_dv.c
 +++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -1881,6 +1881,9 @@ flow_dev_get_vlan_info_from_items(const struct rte_flow_item *items,
+@@ -1728,6 +1728,9 @@ flow_dev_get_vlan_info_from_items(const struct rte_flow_item *items,
  		const struct rte_flow_item_vlan *vlan_m = items->mask;
  		const struct rte_flow_item_vlan *vlan_v = items->spec;
  

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/vmxnet3: handle bad host framing' has been queued to stable release 19.11.3
  2020-05-22  9:39     ` [dpdk-stable] patch 'event/dsw: fix enqueue burst return value' " luca.boccassi
                         ` (13 preceding siblings ...)
  2020-05-22  9:39       ` [dpdk-stable] patch 'net/mlx5: fix VLAN flow action with wildcard VLAN item' " luca.boccassi
@ 2020-05-22  9:39       ` luca.boccassi
  2020-05-22  9:39       ` [dpdk-stable] patch 'net/hinic: fix queues resource free' " luca.boccassi
                         ` (26 subsequent siblings)
  41 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-22  9:39 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Yong Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/24/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 733bc3f6391f89972e7c088785d7494de2dc80cd Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 12 May 2020 13:40:03 -0700
Subject: [PATCH] net/vmxnet3: handle bad host framing

[ upstream commit eb49f1671f30ede5121373e633c529b75993a6b2 ]

The VMXNet3 protocol has a start-of-packet (SOP) and end-of-packet (EOP)
marker. If there was a bug where mbuf arrived without SOP the code that
chains the mbuf would dereference a null pointer.
Also, record any mbuf's dropped in statistics.

Although did the initial code no longer have access to VMware.
Compile tested only!

Coverity issue: 124563
Fixes: 8ee787ce80a8 ("vmxnet3: remove asserts that confuse coverity")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Yong Wang <yongwang@vmware.com>
---
 drivers/net/vmxnet3/vmxnet3_rxtx.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c
index dd99684bee..73e270f30f 100644
--- a/drivers/net/vmxnet3/vmxnet3_rxtx.c
+++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c
@@ -950,13 +950,17 @@ vmxnet3_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 
 			RTE_ASSERT(rxd->btype == VMXNET3_RXD_BTYPE_BODY);
 
-			if (rxm->data_len) {
+			if (likely(start && rxm->data_len > 0)) {
 				start->pkt_len += rxm->data_len;
 				start->nb_segs++;
 
 				rxq->last_seg->next = rxm;
 				rxq->last_seg = rxm;
 			} else {
+				PMD_RX_LOG(ERR, "Error received empty or out of order frame.");
+				rxq->stats.drop_total++;
+				rxq->stats.drop_err++;
+
 				rte_pktmbuf_free_seg(rxm);
 			}
 		}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-22 10:37:39.845391541 +0100
+++ 0016-net-vmxnet3-handle-bad-host-framing.patch	2020-05-22 10:37:39.100412212 +0100
@@ -1,8 +1,10 @@
-From eb49f1671f30ede5121373e633c529b75993a6b2 Mon Sep 17 00:00:00 2001
+From 733bc3f6391f89972e7c088785d7494de2dc80cd Mon Sep 17 00:00:00 2001
 From: Stephen Hemminger <stephen@networkplumber.org>
 Date: Tue, 12 May 2020 13:40:03 -0700
 Subject: [PATCH] net/vmxnet3: handle bad host framing
 
+[ upstream commit eb49f1671f30ede5121373e633c529b75993a6b2 ]
+
 The VMXNet3 protocol has a start-of-packet (SOP) and end-of-packet (EOP)
 marker. If there was a bug where mbuf arrived without SOP the code that
 chains the mbuf would dereference a null pointer.
@@ -13,7 +15,6 @@
 
 Coverity issue: 124563
 Fixes: 8ee787ce80a8 ("vmxnet3: remove asserts that confuse coverity")
-Cc: stable@dpdk.org
 
 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
 Acked-by: Yong Wang <yongwang@vmware.com>

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/hinic: fix queues resource free' has been queued to stable release 19.11.3
  2020-05-22  9:39     ` [dpdk-stable] patch 'event/dsw: fix enqueue burst return value' " luca.boccassi
                         ` (14 preceding siblings ...)
  2020-05-22  9:39       ` [dpdk-stable] patch 'net/vmxnet3: handle bad host framing' " luca.boccassi
@ 2020-05-22  9:39       ` luca.boccassi
  2020-05-22  9:39       ` [dpdk-stable] patch 'net/hinic: fix Tx mbuf length while copying' " luca.boccassi
                         ` (25 subsequent siblings)
  41 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-22  9:39 UTC (permalink / raw)
  To: Xiaoyun Wang; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/24/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From b191e329751d9256389187bbdde8a8435ad69fd5 Mon Sep 17 00:00:00 2001
From: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
Date: Thu, 14 May 2020 17:29:16 +0800
Subject: [PATCH] net/hinic: fix queues resource free

[ upstream commit a2177d2e84c32fafb23f5863ef16ef1bf082d18f ]

Adds tx_queues and rx_queues non-null judgment before free tx or
rx resources, because some app may set tx_queues or rx_queues to
be null before call free resource interfaces, which may cause
a segfault.

Fixes: 64727024d2fd ("net/hinic: add device initialization")

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
---
 drivers/net/hinic/hinic_pmd_rx.c | 3 ++-
 drivers/net/hinic/hinic_pmd_tx.c | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/hinic/hinic_pmd_rx.c b/drivers/net/hinic/hinic_pmd_rx.c
index 224337ddd9..8572780c62 100644
--- a/drivers/net/hinic/hinic_pmd_rx.c
+++ b/drivers/net/hinic/hinic_pmd_rx.c
@@ -413,7 +413,8 @@ void hinic_free_all_rx_resources(struct rte_eth_dev *eth_dev)
 				HINIC_ETH_DEV_TO_PRIVATE_NIC_DEV(eth_dev);
 
 	for (q_id = 0; q_id < nic_dev->num_rq; q_id++) {
-		eth_dev->data->rx_queues[q_id] = NULL;
+		if (eth_dev->data->rx_queues != NULL)
+			eth_dev->data->rx_queues[q_id] = NULL;
 
 		if (nic_dev->rxqs[q_id] == NULL)
 			continue;
diff --git a/drivers/net/hinic/hinic_pmd_tx.c b/drivers/net/hinic/hinic_pmd_tx.c
index 64ec2c1198..a919417277 100644
--- a/drivers/net/hinic/hinic_pmd_tx.c
+++ b/drivers/net/hinic/hinic_pmd_tx.c
@@ -1185,7 +1185,8 @@ void hinic_free_all_tx_resources(struct rte_eth_dev *eth_dev)
 				HINIC_ETH_DEV_TO_PRIVATE_NIC_DEV(eth_dev);
 
 	for (q_id = 0; q_id < nic_dev->num_sq; q_id++) {
-		eth_dev->data->tx_queues[q_id] = NULL;
+		if (eth_dev->data->tx_queues != NULL)
+			eth_dev->data->tx_queues[q_id] = NULL;
 
 		if (nic_dev->txqs[q_id] == NULL)
 			continue;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-22 10:37:39.881800978 +0100
+++ 0017-net-hinic-fix-queues-resource-free.patch	2020-05-22 10:37:39.104412284 +0100
@@ -1,15 +1,16 @@
-From a2177d2e84c32fafb23f5863ef16ef1bf082d18f Mon Sep 17 00:00:00 2001
+From b191e329751d9256389187bbdde8a8435ad69fd5 Mon Sep 17 00:00:00 2001
 From: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
 Date: Thu, 14 May 2020 17:29:16 +0800
 Subject: [PATCH] net/hinic: fix queues resource free
 
+[ upstream commit a2177d2e84c32fafb23f5863ef16ef1bf082d18f ]
+
 Adds tx_queues and rx_queues non-null judgment before free tx or
 rx resources, because some app may set tx_queues or rx_queues to
 be null before call free resource interfaces, which may cause
 a segfault.
 
 Fixes: 64727024d2fd ("net/hinic: add device initialization")
-Cc: stable@dpdk.org
 
 Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
 ---
@@ -18,7 +19,7 @@
  2 files changed, 4 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/hinic/hinic_pmd_rx.c b/drivers/net/hinic/hinic_pmd_rx.c
-index 4ca74f0fb2..a49769a863 100644
+index 224337ddd9..8572780c62 100644
 --- a/drivers/net/hinic/hinic_pmd_rx.c
 +++ b/drivers/net/hinic/hinic_pmd_rx.c
 @@ -413,7 +413,8 @@ void hinic_free_all_rx_resources(struct rte_eth_dev *eth_dev)
@@ -32,10 +33,10 @@
  		if (nic_dev->rxqs[q_id] == NULL)
  			continue;
 diff --git a/drivers/net/hinic/hinic_pmd_tx.c b/drivers/net/hinic/hinic_pmd_tx.c
-index 258f2c1c4a..996e0b26ff 100644
+index 64ec2c1198..a919417277 100644
 --- a/drivers/net/hinic/hinic_pmd_tx.c
 +++ b/drivers/net/hinic/hinic_pmd_tx.c
-@@ -1217,7 +1217,8 @@ void hinic_free_all_tx_resources(struct rte_eth_dev *eth_dev)
+@@ -1185,7 +1185,8 @@ void hinic_free_all_tx_resources(struct rte_eth_dev *eth_dev)
  				HINIC_ETH_DEV_TO_PRIVATE_NIC_DEV(eth_dev);
  
  	for (q_id = 0; q_id < nic_dev->num_sq; q_id++) {

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/hinic: fix Tx mbuf length while copying' has been queued to stable release 19.11.3
  2020-05-22  9:39     ` [dpdk-stable] patch 'event/dsw: fix enqueue burst return value' " luca.boccassi
                         ` (15 preceding siblings ...)
  2020-05-22  9:39       ` [dpdk-stable] patch 'net/hinic: fix queues resource free' " luca.boccassi
@ 2020-05-22  9:39       ` luca.boccassi
  2020-05-22  9:39       ` [dpdk-stable] patch 'vhost: handle mbuf allocation failure' " luca.boccassi
                         ` (24 subsequent siblings)
  41 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-22  9:39 UTC (permalink / raw)
  To: Xiaoyun Wang; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/24/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 1e2a3beb12595d18270c2a01a54cf3a7c857e6d0 Mon Sep 17 00:00:00 2001
From: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
Date: Thu, 14 May 2020 17:29:17 +0800
Subject: [PATCH] net/hinic: fix Tx mbuf length while copying

[ upstream commit ee750eaa1476d55b812673fcfbe6352f67b890b4 ]

When copy a mbuf to a new dst_mbuf, the pkt_len member of
dst_mbuf needs to be updated.

Fixes: 076221c8fe1d ("net/hinic: add Rx/Tx")

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
---
 drivers/net/hinic/hinic_pmd_tx.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/hinic/hinic_pmd_tx.c b/drivers/net/hinic/hinic_pmd_tx.c
index a919417277..33d8ae2102 100644
--- a/drivers/net/hinic/hinic_pmd_tx.c
+++ b/drivers/net/hinic/hinic_pmd_tx.c
@@ -312,6 +312,8 @@ static inline struct rte_mbuf *hinic_copy_tx_mbuf(struct hinic_nic_dev *nic_dev,
 		mbuf = mbuf->next;
 	}
 
+	dst_mbuf->pkt_len = dst_mbuf->data_len;
+
 	return dst_mbuf;
 }
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-22 10:37:39.917042210 +0100
+++ 0018-net-hinic-fix-Tx-mbuf-length-while-copying.patch	2020-05-22 10:37:39.104412284 +0100
@@ -1,13 +1,14 @@
-From ee750eaa1476d55b812673fcfbe6352f67b890b4 Mon Sep 17 00:00:00 2001
+From 1e2a3beb12595d18270c2a01a54cf3a7c857e6d0 Mon Sep 17 00:00:00 2001
 From: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
 Date: Thu, 14 May 2020 17:29:17 +0800
 Subject: [PATCH] net/hinic: fix Tx mbuf length while copying
 
+[ upstream commit ee750eaa1476d55b812673fcfbe6352f67b890b4 ]
+
 When copy a mbuf to a new dst_mbuf, the pkt_len member of
 dst_mbuf needs to be updated.
 
 Fixes: 076221c8fe1d ("net/hinic: add Rx/Tx")
-Cc: stable@dpdk.org
 
 Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
 ---
@@ -15,10 +16,10 @@
  1 file changed, 2 insertions(+)
 
 diff --git a/drivers/net/hinic/hinic_pmd_tx.c b/drivers/net/hinic/hinic_pmd_tx.c
-index 996e0b26ff..bd39f9364f 100644
+index a919417277..33d8ae2102 100644
 --- a/drivers/net/hinic/hinic_pmd_tx.c
 +++ b/drivers/net/hinic/hinic_pmd_tx.c
-@@ -313,6 +313,8 @@ static inline struct rte_mbuf *hinic_copy_tx_mbuf(struct hinic_nic_dev *nic_dev,
+@@ -312,6 +312,8 @@ static inline struct rte_mbuf *hinic_copy_tx_mbuf(struct hinic_nic_dev *nic_dev,
  		mbuf = mbuf->next;
  	}
  

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'vhost: handle mbuf allocation failure' has been queued to stable release 19.11.3
  2020-05-22  9:39     ` [dpdk-stable] patch 'event/dsw: fix enqueue burst return value' " luca.boccassi
                         ` (16 preceding siblings ...)
  2020-05-22  9:39       ` [dpdk-stable] patch 'net/hinic: fix Tx mbuf length while copying' " luca.boccassi
@ 2020-05-22  9:39       ` luca.boccassi
  2020-05-22  9:39       ` [dpdk-stable] patch 'net/virtio: fix unexpected event after reconnect' " luca.boccassi
                         ` (23 subsequent siblings)
  41 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-22  9:39 UTC (permalink / raw)
  To: Sivaprasad Tummala; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/24/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From c651ee6999508d5cab36d2449cccce282ba903c4 Mon Sep 17 00:00:00 2001
From: Sivaprasad Tummala <sivaprasad.tummala@intel.com>
Date: Fri, 8 May 2020 16:47:51 +0530
Subject: [PATCH] vhost: handle mbuf allocation failure

[ upstream commit 0fd5608ef97f9c467f1ecc926463cf793189443e ]

vhost buffer allocation is successful for packets that fit
into a linear buffer. If it fails, vhost library is expected
to drop the current packet and skip to the next.

The patch fixes the error scenario by skipping to next packet.
Note: Drop counters are not currently supported.

Fixes: c3ff0ac70acb ("vhost: improve performance by supporting large buffer")

Signed-off-by: Sivaprasad Tummala <sivaprasad.tummala@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/virtio_net.c | 70 +++++++++++++++++++++++++++--------
 1 file changed, 55 insertions(+), 15 deletions(-)

diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index 22dcdf72bd..a6c106c13c 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -1676,6 +1676,8 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
 {
 	uint16_t i;
 	uint16_t free_entries;
+	uint16_t dropped = 0;
+	static bool allocerr_warned;
 
 	if (unlikely(dev->dequeue_zero_copy)) {
 		struct zcopy_mbuf *zmbuf, *next;
@@ -1739,13 +1741,35 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
 			update_shadow_used_ring_split(vq, head_idx, 0);
 
 		pkts[i] = virtio_dev_pktmbuf_alloc(dev, mbuf_pool, buf_len);
-		if (unlikely(pkts[i] == NULL))
+		if (unlikely(pkts[i] == NULL)) {
+			/*
+			 * mbuf allocation fails for jumbo packets when external
+			 * buffer allocation is not allowed and linear buffer
+			 * is required. Drop this packet.
+			 */
+			if (!allocerr_warned) {
+				RTE_LOG(ERR, VHOST_DATA,
+					"Failed mbuf alloc of size %d from %s on %s.\n",
+					buf_len, mbuf_pool->name, dev->ifname);
+				allocerr_warned = true;
+			}
+			dropped += 1;
+			i++;
 			break;
+		}
 
 		err = copy_desc_to_mbuf(dev, vq, buf_vec, nr_vec, pkts[i],
 				mbuf_pool);
 		if (unlikely(err)) {
 			rte_pktmbuf_free(pkts[i]);
+			if (!allocerr_warned) {
+				RTE_LOG(ERR, VHOST_DATA,
+					"Failed to copy desc to mbuf on %s.\n",
+					dev->ifname);
+				allocerr_warned = true;
+			}
+			dropped += 1;
+			i++;
 			break;
 		}
 
@@ -1755,6 +1779,8 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
 			zmbuf = get_zmbuf(vq);
 			if (!zmbuf) {
 				rte_pktmbuf_free(pkts[i]);
+				dropped += 1;
+				i++;
 				break;
 			}
 			zmbuf->mbuf = pkts[i];
@@ -1784,7 +1810,7 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
 		}
 	}
 
-	return i;
+	return (i - dropped);
 }
 
 static __rte_always_inline int
@@ -1918,6 +1944,7 @@ vhost_dequeue_single_packed(struct virtio_net *dev,
 	uint32_t buf_len;
 	uint16_t nr_vec = 0;
 	int err;
+	static bool allocerr_warned;
 
 	if (unlikely(fill_vec_buf_packed(dev, vq,
 					 vq->last_avail_idx, desc_count,
@@ -1928,14 +1955,24 @@ vhost_dequeue_single_packed(struct virtio_net *dev,
 
 	*pkts = virtio_dev_pktmbuf_alloc(dev, mbuf_pool, buf_len);
 	if (unlikely(*pkts == NULL)) {
-		RTE_LOG(ERR, VHOST_DATA,
-			"Failed to allocate memory for mbuf.\n");
+		if (!allocerr_warned) {
+			RTE_LOG(ERR, VHOST_DATA,
+				"Failed mbuf alloc of size %d from %s on %s.\n",
+				buf_len, mbuf_pool->name, dev->ifname);
+			allocerr_warned = true;
+		}
 		return -1;
 	}
 
 	err = copy_desc_to_mbuf(dev, vq, buf_vec, nr_vec, *pkts,
 				mbuf_pool);
 	if (unlikely(err)) {
+		if (!allocerr_warned) {
+			RTE_LOG(ERR, VHOST_DATA,
+				"Failed to copy desc to mbuf on %s.\n",
+				dev->ifname);
+			allocerr_warned = true;
+		}
 		rte_pktmbuf_free(*pkts);
 		return -1;
 	}
@@ -1950,21 +1987,24 @@ virtio_dev_tx_single_packed(struct virtio_net *dev,
 			    struct rte_mbuf **pkts)
 {
 
-	uint16_t buf_id, desc_count;
+	uint16_t buf_id, desc_count = 0;
+	int ret;
 
-	if (vhost_dequeue_single_packed(dev, vq, mbuf_pool, pkts, &buf_id,
-					&desc_count))
-		return -1;
+	ret = vhost_dequeue_single_packed(dev, vq, mbuf_pool, pkts, &buf_id,
+					&desc_count);
 
-	if (virtio_net_is_inorder(dev))
-		vhost_shadow_dequeue_single_packed_inorder(vq, buf_id,
-							   desc_count);
-	else
-		vhost_shadow_dequeue_single_packed(vq, buf_id, desc_count);
+	if (likely(desc_count > 0)) {
+		if (virtio_net_is_inorder(dev))
+			vhost_shadow_dequeue_single_packed_inorder(vq, buf_id,
+								   desc_count);
+		else
+			vhost_shadow_dequeue_single_packed(vq, buf_id,
+					desc_count);
 
-	vq_inc_last_avail_packed(vq, desc_count);
+		vq_inc_last_avail_packed(vq, desc_count);
+	}
 
-	return 0;
+	return ret;
 }
 
 static __rte_always_inline int
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-22 10:37:39.952737996 +0100
+++ 0019-vhost-handle-mbuf-allocation-failure.patch	2020-05-22 10:37:39.108412355 +0100
@@ -1,8 +1,10 @@
-From 0fd5608ef97f9c467f1ecc926463cf793189443e Mon Sep 17 00:00:00 2001
+From c651ee6999508d5cab36d2449cccce282ba903c4 Mon Sep 17 00:00:00 2001
 From: Sivaprasad Tummala <sivaprasad.tummala@intel.com>
 Date: Fri, 8 May 2020 16:47:51 +0530
 Subject: [PATCH] vhost: handle mbuf allocation failure
 
+[ upstream commit 0fd5608ef97f9c467f1ecc926463cf793189443e ]
+
 vhost buffer allocation is successful for packets that fit
 into a linear buffer. If it fails, vhost library is expected
 to drop the current packet and skip to the next.
@@ -11,7 +13,6 @@
 Note: Drop counters are not currently supported.
 
 Fixes: c3ff0ac70acb ("vhost: improve performance by supporting large buffer")
-Cc: stable@dpdk.org
 
 Signed-off-by: Sivaprasad Tummala <sivaprasad.tummala@intel.com>
 Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
@@ -20,10 +21,10 @@
  1 file changed, 55 insertions(+), 15 deletions(-)
 
 diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
-index 5e8c6b99c0..751c1f3733 100644
+index 22dcdf72bd..a6c106c13c 100644
 --- a/lib/librte_vhost/virtio_net.c
 +++ b/lib/librte_vhost/virtio_net.c
-@@ -1673,6 +1673,8 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
+@@ -1676,6 +1676,8 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
  {
  	uint16_t i;
  	uint16_t free_entries;
@@ -32,7 +33,7 @@
  
  	if (unlikely(dev->dequeue_zero_copy)) {
  		struct zcopy_mbuf *zmbuf, *next;
-@@ -1734,13 +1736,35 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
+@@ -1739,13 +1741,35 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
  			update_shadow_used_ring_split(vq, head_idx, 0);
  
  		pkts[i] = virtio_dev_pktmbuf_alloc(dev, mbuf_pool, buf_len);
@@ -44,7 +45,7 @@
 +			 * is required. Drop this packet.
 +			 */
 +			if (!allocerr_warned) {
-+				VHOST_LOG_DATA(ERR,
++				RTE_LOG(ERR, VHOST_DATA,
 +					"Failed mbuf alloc of size %d from %s on %s.\n",
 +					buf_len, mbuf_pool->name, dev->ifname);
 +				allocerr_warned = true;
@@ -59,7 +60,7 @@
  		if (unlikely(err)) {
  			rte_pktmbuf_free(pkts[i]);
 +			if (!allocerr_warned) {
-+				VHOST_LOG_DATA(ERR,
++				RTE_LOG(ERR, VHOST_DATA,
 +					"Failed to copy desc to mbuf on %s.\n",
 +					dev->ifname);
 +				allocerr_warned = true;
@@ -69,7 +70,7 @@
  			break;
  		}
  
-@@ -1750,6 +1774,8 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
+@@ -1755,6 +1779,8 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
  			zmbuf = get_zmbuf(vq);
  			if (!zmbuf) {
  				rte_pktmbuf_free(pkts[i]);
@@ -78,7 +79,7 @@
  				break;
  			}
  			zmbuf->mbuf = pkts[i];
-@@ -1779,7 +1805,7 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
+@@ -1784,7 +1810,7 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
  		}
  	}
  
@@ -87,7 +88,7 @@
  }
  
  static __rte_always_inline int
-@@ -1913,6 +1939,7 @@ vhost_dequeue_single_packed(struct virtio_net *dev,
+@@ -1918,6 +1944,7 @@ vhost_dequeue_single_packed(struct virtio_net *dev,
  	uint32_t buf_len;
  	uint16_t nr_vec = 0;
  	int err;
@@ -95,14 +96,14 @@
  
  	if (unlikely(fill_vec_buf_packed(dev, vq,
  					 vq->last_avail_idx, desc_count,
-@@ -1923,14 +1950,24 @@ vhost_dequeue_single_packed(struct virtio_net *dev,
+@@ -1928,14 +1955,24 @@ vhost_dequeue_single_packed(struct virtio_net *dev,
  
  	*pkts = virtio_dev_pktmbuf_alloc(dev, mbuf_pool, buf_len);
  	if (unlikely(*pkts == NULL)) {
--		VHOST_LOG_DATA(ERR,
+-		RTE_LOG(ERR, VHOST_DATA,
 -			"Failed to allocate memory for mbuf.\n");
 +		if (!allocerr_warned) {
-+			VHOST_LOG_DATA(ERR,
++			RTE_LOG(ERR, VHOST_DATA,
 +				"Failed mbuf alloc of size %d from %s on %s.\n",
 +				buf_len, mbuf_pool->name, dev->ifname);
 +			allocerr_warned = true;
@@ -114,7 +115,7 @@
  				mbuf_pool);
  	if (unlikely(err)) {
 +		if (!allocerr_warned) {
-+			VHOST_LOG_DATA(ERR,
++			RTE_LOG(ERR, VHOST_DATA,
 +				"Failed to copy desc to mbuf on %s.\n",
 +				dev->ifname);
 +			allocerr_warned = true;
@@ -122,7 +123,7 @@
  		rte_pktmbuf_free(*pkts);
  		return -1;
  	}
-@@ -1945,21 +1982,24 @@ virtio_dev_tx_single_packed(struct virtio_net *dev,
+@@ -1950,21 +1987,24 @@ virtio_dev_tx_single_packed(struct virtio_net *dev,
  			    struct rte_mbuf **pkts)
  {
  

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/virtio: fix unexpected event after reconnect' has been queued to stable release 19.11.3
  2020-05-22  9:39     ` [dpdk-stable] patch 'event/dsw: fix enqueue burst return value' " luca.boccassi
                         ` (17 preceding siblings ...)
  2020-05-22  9:39       ` [dpdk-stable] patch 'vhost: handle mbuf allocation failure' " luca.boccassi
@ 2020-05-22  9:39       ` luca.boccassi
  2020-05-22  9:40       ` [dpdk-stable] patch 'net/qede: fix port reconfiguration' " luca.boccassi
                         ` (22 subsequent siblings)
  41 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-22  9:39 UTC (permalink / raw)
  To: Marvin Liu; +Cc: Xiao Wang, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/24/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From f9630f56a4c7dc4781c94ab6782762eeb201d293 Mon Sep 17 00:00:00 2001
From: Marvin Liu <yong.liu@intel.com>
Date: Fri, 15 May 2020 10:35:07 +0800
Subject: [PATCH] net/virtio: fix unexpected event after reconnect

[ upstream commit f50560a54b8bd6b52d763213aee40f0164fb4099 ]

Event notification should be disabled after virtqueue initialization and
enabled by calling rte_eth_dev_rx_intr_enable later. When virtio user
device reconnecting to vhost, virtqueue_disable_intr should be called to
disable event notification.

Fixes: 6ebbf4109f35 ("net/virtio-user: fix packed ring server mode")

Signed-off-by: Marvin Liu <yong.liu@intel.com>
Acked-by: Xiao Wang <xiao.w.wang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/virtio/virtqueue.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/virtio/virtqueue.c b/drivers/net/virtio/virtqueue.c
index 0b4e3bf3e2..02c8b9fc54 100644
--- a/drivers/net/virtio/virtqueue.c
+++ b/drivers/net/virtio/virtqueue.c
@@ -174,6 +174,7 @@ virtqueue_rxvq_reset_packed(struct virtqueue *vq)
 
 	vring_desc_init_packed(vq, size);
 
+	virtqueue_disable_intr(vq);
 	return 0;
 }
 
@@ -210,5 +211,6 @@ virtqueue_txvq_reset_packed(struct virtqueue *vq)
 
 	vring_desc_init_packed(vq, size);
 
+	virtqueue_disable_intr(vq);
 	return 0;
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-22 10:37:39.988738322 +0100
+++ 0020-net-virtio-fix-unexpected-event-after-reconnect.patch	2020-05-22 10:37:39.108412355 +0100
@@ -1,15 +1,16 @@
-From f50560a54b8bd6b52d763213aee40f0164fb4099 Mon Sep 17 00:00:00 2001
+From f9630f56a4c7dc4781c94ab6782762eeb201d293 Mon Sep 17 00:00:00 2001
 From: Marvin Liu <yong.liu@intel.com>
 Date: Fri, 15 May 2020 10:35:07 +0800
 Subject: [PATCH] net/virtio: fix unexpected event after reconnect
 
+[ upstream commit f50560a54b8bd6b52d763213aee40f0164fb4099 ]
+
 Event notification should be disabled after virtqueue initialization and
 enabled by calling rte_eth_dev_rx_intr_enable later. When virtio user
 device reconnecting to vhost, virtqueue_disable_intr should be called to
 disable event notification.
 
 Fixes: 6ebbf4109f35 ("net/virtio-user: fix packed ring server mode")
-Cc: stable@dpdk.org
 
 Signed-off-by: Marvin Liu <yong.liu@intel.com>
 Acked-by: Xiao Wang <xiao.w.wang@intel.com>
@@ -19,10 +20,10 @@
  1 file changed, 2 insertions(+)
 
 diff --git a/drivers/net/virtio/virtqueue.c b/drivers/net/virtio/virtqueue.c
-index 408bba236a..2702e120ee 100644
+index 0b4e3bf3e2..02c8b9fc54 100644
 --- a/drivers/net/virtio/virtqueue.c
 +++ b/drivers/net/virtio/virtqueue.c
-@@ -175,6 +175,7 @@ virtqueue_rxvq_reset_packed(struct virtqueue *vq)
+@@ -174,6 +174,7 @@ virtqueue_rxvq_reset_packed(struct virtqueue *vq)
  
  	vring_desc_init_packed(vq, size);
  
@@ -30,7 +31,7 @@
  	return 0;
  }
  
-@@ -211,5 +212,6 @@ virtqueue_txvq_reset_packed(struct virtqueue *vq)
+@@ -210,5 +211,6 @@ virtqueue_txvq_reset_packed(struct virtqueue *vq)
  
  	vring_desc_init_packed(vq, size);
  

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/qede: fix port reconfiguration' has been queued to stable release 19.11.3
  2020-05-22  9:39     ` [dpdk-stable] patch 'event/dsw: fix enqueue burst return value' " luca.boccassi
                         ` (18 preceding siblings ...)
  2020-05-22  9:39       ` [dpdk-stable] patch 'net/virtio: fix unexpected event after reconnect' " luca.boccassi
@ 2020-05-22  9:40       ` luca.boccassi
  2020-05-22  9:40       ` [dpdk-stable] patch 'net/bnxt: fix error log for command timeout' " luca.boccassi
                         ` (21 subsequent siblings)
  41 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-22  9:40 UTC (permalink / raw)
  To: Rasesh Mody; +Cc: Igor Russkikh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/24/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From bbcbd194d8262a13cab44d3b4cb1d9bdd073b20a Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rmody@marvell.com>
Date: Thu, 14 May 2020 23:34:19 -0700
Subject: [PATCH] net/qede: fix port reconfiguration

[ upstream commit 05ccc9d8a9f9338b1cb4ae515c60c60f8b7f518d ]

This patch fixes deallocation of all fastpath resources unconditionally,
when re-configuring the device. When re-allocating resources PMD depends
on application to explicitly setup the Rx/Tx queue.

Deallocation of all the resources is only required if the Rx/Tx queue
configuration changes. For other scenarios like KNI MTU change we'd keep
existing configuration.

Fixes: 8de0c4201926 ("net/qede: fix odd number of queues usage in 100G mode")
Fixes: dd28bc8c6ef4 ("net/qede: fix VF port creation sequence")

Signed-off-by: Rasesh Mody <rmody@marvell.com>
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
---
 drivers/net/qede/qede_ethdev.c | 19 +++++++++++++------
 drivers/net/qede/qede_rxtx.c   |  4 +++-
 2 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 4b3f506506..2a1c82ac9a 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -1191,6 +1191,8 @@ static int qede_dev_configure(struct rte_eth_dev *eth_dev)
 	struct qede_dev *qdev = QEDE_INIT_QDEV(eth_dev);
 	struct ecore_dev *edev = QEDE_INIT_EDEV(qdev);
 	struct rte_eth_rxmode *rxmode = &eth_dev->data->dev_conf.rxmode;
+	uint8_t num_rxqs;
+	uint8_t num_txqs;
 	int ret;
 
 	PMD_INIT_FUNC_TRACE(edev);
@@ -1223,12 +1225,17 @@ static int qede_dev_configure(struct rte_eth_dev *eth_dev)
 	if (qede_check_fdir_support(eth_dev))
 		return -ENOTSUP;
 
-	qede_dealloc_fp_resc(eth_dev);
-	qdev->num_tx_queues = eth_dev->data->nb_tx_queues * edev->num_hwfns;
-	qdev->num_rx_queues = eth_dev->data->nb_rx_queues * edev->num_hwfns;
-
-	if (qede_alloc_fp_resc(qdev))
-		return -ENOMEM;
+	/* Allocate/reallocate fastpath resources only for new queue config */
+	num_txqs = eth_dev->data->nb_tx_queues * edev->num_hwfns;
+	num_rxqs = eth_dev->data->nb_rx_queues * edev->num_hwfns;
+	if (qdev->num_tx_queues != num_txqs ||
+	    qdev->num_rx_queues != num_rxqs) {
+		qede_dealloc_fp_resc(eth_dev);
+		qdev->num_tx_queues = num_txqs;
+		qdev->num_rx_queues = num_rxqs;
+		if (qede_alloc_fp_resc(qdev))
+			return -ENOMEM;
+	}
 
 	/* If jumbo enabled adjust MTU */
 	if (rxmode->offloads & DEV_RX_OFFLOAD_JUMBO_FRAME)
diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c
index a28dd0a07f..3c55c0efdf 100644
--- a/drivers/net/qede/qede_rxtx.c
+++ b/drivers/net/qede/qede_rxtx.c
@@ -593,12 +593,14 @@ qede_alloc_mem_sb(struct qede_dev *qdev, struct ecore_sb_info *sb_info,
 
 int qede_alloc_fp_resc(struct qede_dev *qdev)
 {
-	struct ecore_dev *edev = &qdev->edev;
+	struct ecore_dev *edev = QEDE_INIT_EDEV(qdev);
 	struct qede_fastpath *fp;
 	uint32_t num_sbs;
 	uint16_t sb_idx;
 	int i;
 
+	PMD_INIT_FUNC_TRACE(edev);
+
 	if (IS_VF(edev))
 		ecore_vf_get_num_sbs(ECORE_LEADING_HWFN(edev), &num_sbs);
 	else
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-22 10:37:40.021535341 +0100
+++ 0021-net-qede-fix-port-reconfiguration.patch	2020-05-22 10:37:39.112412427 +0100
@@ -1,8 +1,10 @@
-From 05ccc9d8a9f9338b1cb4ae515c60c60f8b7f518d Mon Sep 17 00:00:00 2001
+From bbcbd194d8262a13cab44d3b4cb1d9bdd073b20a Mon Sep 17 00:00:00 2001
 From: Rasesh Mody <rmody@marvell.com>
 Date: Thu, 14 May 2020 23:34:19 -0700
 Subject: [PATCH] net/qede: fix port reconfiguration
 
+[ upstream commit 05ccc9d8a9f9338b1cb4ae515c60c60f8b7f518d ]
+
 This patch fixes deallocation of all fastpath resources unconditionally,
 when re-configuring the device. When re-allocating resources PMD depends
 on application to explicitly setup the Rx/Tx queue.
@@ -13,7 +15,6 @@
 
 Fixes: 8de0c4201926 ("net/qede: fix odd number of queues usage in 100G mode")
 Fixes: dd28bc8c6ef4 ("net/qede: fix VF port creation sequence")
-Cc: stable@dpdk.org
 
 Signed-off-by: Rasesh Mody <rmody@marvell.com>
 Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
@@ -23,10 +24,10 @@
  2 files changed, 16 insertions(+), 7 deletions(-)
 
 diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
-index d3d916e81a..c4f8f12589 100644
+index 4b3f506506..2a1c82ac9a 100644
 --- a/drivers/net/qede/qede_ethdev.c
 +++ b/drivers/net/qede/qede_ethdev.c
-@@ -1273,6 +1273,8 @@ static int qede_dev_configure(struct rte_eth_dev *eth_dev)
+@@ -1191,6 +1191,8 @@ static int qede_dev_configure(struct rte_eth_dev *eth_dev)
  	struct qede_dev *qdev = QEDE_INIT_QDEV(eth_dev);
  	struct ecore_dev *edev = QEDE_INIT_EDEV(qdev);
  	struct rte_eth_rxmode *rxmode = &eth_dev->data->dev_conf.rxmode;
@@ -35,7 +36,7 @@
  	int ret;
  
  	PMD_INIT_FUNC_TRACE(edev);
-@@ -1305,12 +1307,17 @@ static int qede_dev_configure(struct rte_eth_dev *eth_dev)
+@@ -1223,12 +1225,17 @@ static int qede_dev_configure(struct rte_eth_dev *eth_dev)
  	if (qede_check_fdir_support(eth_dev))
  		return -ENOTSUP;
  
@@ -60,7 +61,7 @@
  	/* If jumbo enabled adjust MTU */
  	if (rxmode->offloads & DEV_RX_OFFLOAD_JUMBO_FRAME)
 diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c
-index b81788ca47..9878ba50ea 100644
+index a28dd0a07f..3c55c0efdf 100644
 --- a/drivers/net/qede/qede_rxtx.c
 +++ b/drivers/net/qede/qede_rxtx.c
 @@ -593,12 +593,14 @@ qede_alloc_mem_sb(struct qede_dev *qdev, struct ecore_sb_info *sb_info,

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/bnxt: fix error log for command timeout' has been queued to stable release 19.11.3
  2020-05-22  9:39     ` [dpdk-stable] patch 'event/dsw: fix enqueue burst return value' " luca.boccassi
                         ` (19 preceding siblings ...)
  2020-05-22  9:40       ` [dpdk-stable] patch 'net/qede: fix port reconfiguration' " luca.boccassi
@ 2020-05-22  9:40       ` luca.boccassi
  2020-05-22  9:40       ` [dpdk-stable] patch 'net/bnxt: fix using RSS config struct' " luca.boccassi
                         ` (20 subsequent siblings)
  41 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-22  9:40 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: Somnath Kotur, Kalesh AP, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/24/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 2109b14aa9bc684000a5521f476ec46a51bad239 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Thu, 14 May 2020 23:37:34 -0700
Subject: [PATCH] net/bnxt: fix error log for command timeout

[ upstream commit 4939f374ad369b4b15ba17a186bd17bf736371f0 ]

Log the command sequence number to aid debug in case of a
FW command timeout.

Fixes: 804e746c7b73 ("net/bnxt: add hardware resource manager init code")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 7de5b88f0c..9dad6bd319 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -164,8 +164,9 @@ static int bnxt_hwrm_send_message(struct bnxt *bp, void *msg,
 		    rte_cpu_to_le_16(req->req_type) == HWRM_VER_GET)
 			return -ETIMEDOUT;
 
-		PMD_DRV_LOG(ERR, "Error(timeout) sending msg 0x%04x\n",
-			    req->req_type);
+		PMD_DRV_LOG(ERR,
+			    "Error(timeout) sending msg 0x%04x, seq_id %d\n",
+			    req->req_type, req->seq_id);
 		return -ETIMEDOUT;
 	}
 	return 0;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-22 10:37:40.061006253 +0100
+++ 0022-net-bnxt-fix-error-log-for-command-timeout.patch	2020-05-22 10:37:39.120412571 +0100
@@ -1,13 +1,14 @@
-From 4939f374ad369b4b15ba17a186bd17bf736371f0 Mon Sep 17 00:00:00 2001
+From 2109b14aa9bc684000a5521f476ec46a51bad239 Mon Sep 17 00:00:00 2001
 From: Ajit Khaparde <ajit.khaparde@broadcom.com>
 Date: Thu, 14 May 2020 23:37:34 -0700
 Subject: [PATCH] net/bnxt: fix error log for command timeout
 
+[ upstream commit 4939f374ad369b4b15ba17a186bd17bf736371f0 ]
+
 Log the command sequence number to aid debug in case of a
 FW command timeout.
 
 Fixes: 804e746c7b73 ("net/bnxt: add hardware resource manager init code")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
 Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
@@ -17,7 +18,7 @@
  1 file changed, 3 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
-index 77a911067e..d80d67a2d5 100644
+index 7de5b88f0c..9dad6bd319 100644
 --- a/drivers/net/bnxt/bnxt_hwrm.c
 +++ b/drivers/net/bnxt/bnxt_hwrm.c
 @@ -164,8 +164,9 @@ static int bnxt_hwrm_send_message(struct bnxt *bp, void *msg,

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/bnxt: fix using RSS config struct' has been queued to stable release 19.11.3
  2020-05-22  9:39     ` [dpdk-stable] patch 'event/dsw: fix enqueue burst return value' " luca.boccassi
                         ` (20 preceding siblings ...)
  2020-05-22  9:40       ` [dpdk-stable] patch 'net/bnxt: fix error log for command timeout' " luca.boccassi
@ 2020-05-22  9:40       ` luca.boccassi
  2020-05-22  9:40       ` [dpdk-stable] patch 'net/bnxt: fix storing MAC address twice' " luca.boccassi
                         ` (19 subsequent siblings)
  41 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-22  9:40 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: Kalesh AP, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/24/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From ba15f6288ea1180bed75bf9bc5d40ad0b19e472b Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Fri, 15 May 2020 04:25:11 -0700
Subject: [PATCH] net/bnxt: fix using RSS config struct

[ upstream commit 39395b9d41aff5488db4924df94098abbe4d4e8c ]

There is no need to maintain local copy.
This helps reduce the size of the bnxt structure.

Fixes: fcc0aa1edc10 ("net/bnxt: add RSS hash configuration")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
---
 drivers/net/bnxt/bnxt.h        | 1 -
 drivers/net/bnxt/bnxt_ethdev.c | 4 +++-
 drivers/net/bnxt/bnxt_rxq.c    | 4 +---
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 0ef0282d2a..995e5980a6 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -499,7 +499,6 @@ struct bnxt {
 	void				*bar0;
 
 	struct rte_eth_dev		*eth_dev;
-	struct rte_eth_rss_conf		rss_conf;
 	struct rte_pci_device		*pdev;
 	void				*doorbell_base;
 
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 4547dd1420..aa6ceff13c 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1440,7 +1440,9 @@ static int bnxt_rss_hash_update_op(struct rte_eth_dev *eth_dev,
 	}
 
 	bp->flags |= BNXT_FLAG_UPDATE_HASH;
-	memcpy(&bp->rss_conf, rss_conf, sizeof(*rss_conf));
+	memcpy(&eth_dev->data->dev_conf.rx_adv_conf.rss_conf,
+	       rss_conf,
+	       sizeof(*rss_conf));
 
 	/* Update the default RSS VNIC(s) */
 	vnic = &bp->vnic_info[0];
diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index 457ebede0e..e42308a97f 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -168,10 +168,8 @@ out:
 	if (dev_conf->rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG) {
 		struct rte_eth_rss_conf *rss = &dev_conf->rx_adv_conf.rss_conf;
 
-		if (bp->flags & BNXT_FLAG_UPDATE_HASH) {
-			rss = &bp->rss_conf;
+		if (bp->flags & BNXT_FLAG_UPDATE_HASH)
 			bp->flags &= ~BNXT_FLAG_UPDATE_HASH;
-		}
 
 		for (i = 0; i < bp->nr_vnics; i++) {
 			vnic = &bp->vnic_info[i];
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-22 10:37:40.101096555 +0100
+++ 0023-net-bnxt-fix-using-RSS-config-struct.patch	2020-05-22 10:37:39.124412642 +0100
@@ -1,13 +1,14 @@
-From 39395b9d41aff5488db4924df94098abbe4d4e8c Mon Sep 17 00:00:00 2001
+From ba15f6288ea1180bed75bf9bc5d40ad0b19e472b Mon Sep 17 00:00:00 2001
 From: Ajit Khaparde <ajit.khaparde@broadcom.com>
 Date: Fri, 15 May 2020 04:25:11 -0700
 Subject: [PATCH] net/bnxt: fix using RSS config struct
 
+[ upstream commit 39395b9d41aff5488db4924df94098abbe4d4e8c ]
+
 There is no need to maintain local copy.
 This helps reduce the size of the bnxt structure.
 
 Fixes: fcc0aa1edc10 ("net/bnxt: add RSS hash configuration")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
 Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
@@ -18,10 +19,10 @@
  3 files changed, 4 insertions(+), 5 deletions(-)
 
 diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
-index 7410db5e42..4093a2f01e 100644
+index 0ef0282d2a..995e5980a6 100644
 --- a/drivers/net/bnxt/bnxt.h
 +++ b/drivers/net/bnxt/bnxt.h
-@@ -530,7 +530,6 @@ struct bnxt {
+@@ -499,7 +499,6 @@ struct bnxt {
  	void				*bar0;
  
  	struct rte_eth_dev		*eth_dev;
@@ -30,10 +31,10 @@
  	void				*doorbell_base;
  
 diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
-index b647450031..4d64a98351 100644
+index 4547dd1420..aa6ceff13c 100644
 --- a/drivers/net/bnxt/bnxt_ethdev.c
 +++ b/drivers/net/bnxt/bnxt_ethdev.c
-@@ -1796,7 +1796,9 @@ static int bnxt_rss_hash_update_op(struct rte_eth_dev *eth_dev,
+@@ -1440,7 +1440,9 @@ static int bnxt_rss_hash_update_op(struct rte_eth_dev *eth_dev,
  	}
  
  	bp->flags |= BNXT_FLAG_UPDATE_HASH;
@@ -43,7 +44,7 @@
 +	       sizeof(*rss_conf));
  
  	/* Update the default RSS VNIC(s) */
- 	vnic = BNXT_GET_DEFAULT_VNIC(bp);
+ 	vnic = &bp->vnic_info[0];
 diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
 index 457ebede0e..e42308a97f 100644
 --- a/drivers/net/bnxt/bnxt_rxq.c

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/bnxt: fix storing MAC address twice' has been queued to stable release 19.11.3
  2020-05-22  9:39     ` [dpdk-stable] patch 'event/dsw: fix enqueue burst return value' " luca.boccassi
                         ` (21 preceding siblings ...)
  2020-05-22  9:40       ` [dpdk-stable] patch 'net/bnxt: fix using RSS config struct' " luca.boccassi
@ 2020-05-22  9:40       ` luca.boccassi
  2020-05-22  9:40       ` [dpdk-stable] patch 'net/i40e: fix queue region in RSS flow' " luca.boccassi
                         ` (18 subsequent siblings)
  41 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-22  9:40 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/24/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 099b9e280c7f85a4345aca8a2e17d9813f0efe27 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Thu, 14 May 2020 22:04:36 -0700
Subject: [PATCH] net/bnxt: fix storing MAC address twice

[ upstream commit 86421846cc20e963e5b6878724727abd427cd1b6 ]

We are maintaining MAC address twice which is unnecessary.
This patch removes the copy which helps reduce size of bnxt structure.

Fixes: b7778e8a1c00 ("net/bnxt: refactor to properly allocate resources for PF/VF")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt.h        |  3 ++-
 drivers/net/bnxt/bnxt_ethdev.c | 11 ++++-------
 drivers/net/bnxt/bnxt_hwrm.c   |  8 ++++++--
 3 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 995e5980a6..404d58a037 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -527,6 +527,7 @@ struct bnxt {
 #define BNXT_FLAG_FW_CAP_ONE_STEP_TX_TS		BIT(22)
 #define BNXT_FLAG_ADV_FLOW_MGMT			BIT(23)
 #define BNXT_FLAG_NPAR_PF                      BIT(24)
+#define BNXT_FLAG_DFLT_MAC_SET			BIT(26)
 #define BNXT_PF(bp)		(!((bp)->flags & BNXT_FLAG_VF))
 #define BNXT_VF(bp)		((bp)->flags & BNXT_FLAG_VF)
 #define BNXT_NPAR(bp)		((bp)->flags & BNXT_FLAG_NPAR_PF)
@@ -539,6 +540,7 @@ struct bnxt {
 #define BNXT_STINGRAY(bp)	((bp)->flags & BNXT_FLAG_STINGRAY)
 #define BNXT_HAS_NQ(bp)		BNXT_CHIP_THOR(bp)
 #define BNXT_HAS_RING_GRPS(bp)	(!BNXT_CHIP_THOR(bp))
+#define BNXT_HAS_DFLT_MAC_SET(bp)      ((bp)->flags & BNXT_FLAG_DFLT_MAC_SET)
 
 	uint32_t		fw_cap;
 #define BNXT_FW_CAP_HOT_RESET		BIT(0)
@@ -621,7 +623,6 @@ struct bnxt {
 	uint8_t                 max_q;
 
 	uint16_t		fw_fid;
-	uint8_t			dflt_mac_addr[RTE_ETHER_ADDR_LEN];
 	uint16_t		max_rsscos_ctx;
 	uint16_t		max_cp_rings;
 	uint16_t		max_tx_rings;
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index aa6ceff13c..f1bd575356 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -4611,7 +4611,7 @@ static int bnxt_setup_mac_addr(struct rte_eth_dev *eth_dev)
 		return -ENOMEM;
 	}
 
-	if (bnxt_check_zero_bytes(bp->dflt_mac_addr, RTE_ETHER_ADDR_LEN)) {
+	if (!BNXT_HAS_DFLT_MAC_SET(bp)) {
 		if (BNXT_PF(bp))
 			return -EINVAL;
 
@@ -4624,14 +4624,11 @@ static int bnxt_setup_mac_addr(struct rte_eth_dev *eth_dev)
 			    bp->mac_addr[3], bp->mac_addr[4], bp->mac_addr[5]);
 
 		rc = bnxt_hwrm_set_mac(bp);
-		if (!rc)
-			memcpy(&bp->eth_dev->data->mac_addrs[0], bp->mac_addr,
-			       RTE_ETHER_ADDR_LEN);
-		return rc;
+		if (rc)
+			return rc;
 	}
 
 	/* Copy the permanent MAC from the FUNC_QCAPS response */
-	memcpy(bp->mac_addr, bp->dflt_mac_addr, RTE_ETHER_ADDR_LEN);
 	memcpy(&eth_dev->data->mac_addrs[0], bp->mac_addr, RTE_ETHER_ADDR_LEN);
 
 	return rc;
@@ -4642,7 +4639,7 @@ static int bnxt_restore_dflt_mac(struct bnxt *bp)
 	int rc = 0;
 
 	/* MAC is already configured in FW */
-	if (!bnxt_check_zero_bytes(bp->dflt_mac_addr, RTE_ETHER_ADDR_LEN))
+	if (BNXT_HAS_DFLT_MAC_SET(bp))
 		return 0;
 
 	/* Restore the old MAC configured */
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 9dad6bd319..33f352fade 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -646,7 +646,12 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
 	}
 
 	bp->fw_fid = rte_le_to_cpu_32(resp->fid);
-	memcpy(bp->dflt_mac_addr, &resp->mac_address, RTE_ETHER_ADDR_LEN);
+	if (!bnxt_check_zero_bytes(resp->mac_address, RTE_ETHER_ADDR_LEN)) {
+		bp->flags |= BNXT_FLAG_DFLT_MAC_SET;
+		memcpy(bp->mac_addr, &resp->mac_address, RTE_ETHER_ADDR_LEN);
+	} else {
+		bp->flags &= ~BNXT_FLAG_DFLT_MAC_SET;
+	}
 	bp->max_rsscos_ctx = rte_le_to_cpu_16(resp->max_rsscos_ctx);
 	bp->max_cp_rings = rte_le_to_cpu_16(resp->max_cmpl_rings);
 	bp->max_tx_rings = rte_le_to_cpu_16(resp->max_tx_rings);
@@ -4861,7 +4866,6 @@ int bnxt_hwrm_set_mac(struct bnxt *bp)
 
 	HWRM_CHECK_RESULT();
 
-	memcpy(bp->dflt_mac_addr, bp->mac_addr, RTE_ETHER_ADDR_LEN);
 	HWRM_UNLOCK();
 
 	return rc;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-22 10:37:40.141748846 +0100
+++ 0024-net-bnxt-fix-storing-MAC-address-twice.patch	2020-05-22 10:37:39.136412857 +0100
@@ -1,13 +1,14 @@
-From 86421846cc20e963e5b6878724727abd427cd1b6 Mon Sep 17 00:00:00 2001
+From 099b9e280c7f85a4345aca8a2e17d9813f0efe27 Mon Sep 17 00:00:00 2001
 From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
 Date: Thu, 14 May 2020 22:04:36 -0700
 Subject: [PATCH] net/bnxt: fix storing MAC address twice
 
+[ upstream commit 86421846cc20e963e5b6878724727abd427cd1b6 ]
+
 We are maintaining MAC address twice which is unnecessary.
 This patch removes the copy which helps reduce size of bnxt structure.
 
 Fixes: b7778e8a1c00 ("net/bnxt: refactor to properly allocate resources for PF/VF")
-Cc: stable@dpdk.org
 
 Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
 Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
@@ -18,26 +19,26 @@
  3 files changed, 12 insertions(+), 10 deletions(-)
 
 diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
-index 4093a2f01e..403b23f356 100644
+index 995e5980a6..404d58a037 100644
 --- a/drivers/net/bnxt/bnxt.h
 +++ b/drivers/net/bnxt/bnxt.h
-@@ -560,6 +560,7 @@ struct bnxt {
- #define BNXT_FLAG_FC_THREAD			BIT(23)
- #define BNXT_FLAG_RX_VECTOR_PKT_MODE		BIT(24)
- #define BNXT_FLAG_FLOW_XSTATS_EN		BIT(25)
+@@ -527,6 +527,7 @@ struct bnxt {
+ #define BNXT_FLAG_FW_CAP_ONE_STEP_TX_TS		BIT(22)
+ #define BNXT_FLAG_ADV_FLOW_MGMT			BIT(23)
+ #define BNXT_FLAG_NPAR_PF                      BIT(24)
 +#define BNXT_FLAG_DFLT_MAC_SET			BIT(26)
  #define BNXT_PF(bp)		(!((bp)->flags & BNXT_FLAG_VF))
  #define BNXT_VF(bp)		((bp)->flags & BNXT_FLAG_VF)
  #define BNXT_NPAR(bp)		((bp)->flags & BNXT_FLAG_NPAR_PF)
-@@ -573,6 +574,7 @@ struct bnxt {
+@@ -539,6 +540,7 @@ struct bnxt {
+ #define BNXT_STINGRAY(bp)	((bp)->flags & BNXT_FLAG_STINGRAY)
  #define BNXT_HAS_NQ(bp)		BNXT_CHIP_THOR(bp)
  #define BNXT_HAS_RING_GRPS(bp)	(!BNXT_CHIP_THOR(bp))
- #define BNXT_FLOW_XSTATS_EN(bp)	((bp)->flags & BNXT_FLAG_FLOW_XSTATS_EN)
 +#define BNXT_HAS_DFLT_MAC_SET(bp)      ((bp)->flags & BNXT_FLAG_DFLT_MAC_SET)
  
  	uint32_t		fw_cap;
  #define BNXT_FW_CAP_HOT_RESET		BIT(0)
-@@ -658,7 +660,6 @@ struct bnxt {
+@@ -621,7 +623,6 @@ struct bnxt {
  	uint8_t                 max_q;
  
  	uint16_t		fw_fid;
@@ -46,10 +47,10 @@
  	uint16_t		max_cp_rings;
  	uint16_t		max_tx_rings;
 diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
-index 4d64a98351..77492f89c7 100644
+index aa6ceff13c..f1bd575356 100644
 --- a/drivers/net/bnxt/bnxt_ethdev.c
 +++ b/drivers/net/bnxt/bnxt_ethdev.c
-@@ -4980,7 +4980,7 @@ static int bnxt_setup_mac_addr(struct rte_eth_dev *eth_dev)
+@@ -4611,7 +4611,7 @@ static int bnxt_setup_mac_addr(struct rte_eth_dev *eth_dev)
  		return -ENOMEM;
  	}
  
@@ -58,7 +59,7 @@
  		if (BNXT_PF(bp))
  			return -EINVAL;
  
-@@ -4993,14 +4993,11 @@ static int bnxt_setup_mac_addr(struct rte_eth_dev *eth_dev)
+@@ -4624,14 +4624,11 @@ static int bnxt_setup_mac_addr(struct rte_eth_dev *eth_dev)
  			    bp->mac_addr[3], bp->mac_addr[4], bp->mac_addr[5]);
  
  		rc = bnxt_hwrm_set_mac(bp);
@@ -75,7 +76,7 @@
  	memcpy(&eth_dev->data->mac_addrs[0], bp->mac_addr, RTE_ETHER_ADDR_LEN);
  
  	return rc;
-@@ -5011,7 +5008,7 @@ static int bnxt_restore_dflt_mac(struct bnxt *bp)
+@@ -4642,7 +4639,7 @@ static int bnxt_restore_dflt_mac(struct bnxt *bp)
  	int rc = 0;
  
  	/* MAC is already configured in FW */
@@ -85,10 +86,10 @@
  
  	/* Restore the old MAC configured */
 diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
-index a41d77669b..c1798b59d1 100644
+index 9dad6bd319..33f352fade 100644
 --- a/drivers/net/bnxt/bnxt_hwrm.c
 +++ b/drivers/net/bnxt/bnxt_hwrm.c
-@@ -731,7 +731,12 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
+@@ -646,7 +646,12 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
  	}
  
  	bp->fw_fid = rte_le_to_cpu_32(resp->fid);
@@ -102,7 +103,7 @@
  	bp->max_rsscos_ctx = rte_le_to_cpu_16(resp->max_rsscos_ctx);
  	bp->max_cp_rings = rte_le_to_cpu_16(resp->max_cmpl_rings);
  	bp->max_tx_rings = rte_le_to_cpu_16(resp->max_tx_rings);
-@@ -5027,7 +5032,6 @@ int bnxt_hwrm_set_mac(struct bnxt *bp)
+@@ -4861,7 +4866,6 @@ int bnxt_hwrm_set_mac(struct bnxt *bp)
  
  	HWRM_CHECK_RESULT();
  

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/i40e: fix queue region in RSS flow' has been queued to stable release 19.11.3
  2020-05-22  9:39     ` [dpdk-stable] patch 'event/dsw: fix enqueue burst return value' " luca.boccassi
                         ` (22 preceding siblings ...)
  2020-05-22  9:40       ` [dpdk-stable] patch 'net/bnxt: fix storing MAC address twice' " luca.boccassi
@ 2020-05-22  9:40       ` luca.boccassi
  2020-05-22  9:40       ` [dpdk-stable] patch 'net/mlx5: fix doorbell bitmap management offsets' " luca.boccassi
                         ` (17 subsequent siblings)
  41 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-22  9:40 UTC (permalink / raw)
  To: Shougang Wang; +Cc: Jeff Guo, Hailin Xu, Lunyuan Cui, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/24/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From fc047c800bad0e396e954523861151fbb5e794e1 Mon Sep 17 00:00:00 2001
From: Shougang Wang <shougangx.wang@intel.com>
Date: Fri, 15 May 2020 07:32:31 +0000
Subject: [PATCH] net/i40e: fix queue region in RSS flow

[ upstream commit da7018ec29d405e9b36b6997eedb728c04bb0fe8 ]

This patch fixes the issue that the queue region does not
take effect due to incorrectly setting the flow type.

Fixes: ecad87d22383 ("net/i40e: move RSS to flow API")

Signed-off-by: Shougang Wang <shougangx.wang@intel.com>
Reviewed-by: Jeff Guo <jia.guo@intel.com>
Tested-by: Hailin Xu <hailinx.xu@intel.com>
Tested-by: Lunyuan Cui <lunyuanx.cui@intel.com>
---
 drivers/net/i40e/i40e_flow.c | 36 ++++++++++++++++++++++++++++++++----
 1 file changed, 32 insertions(+), 4 deletions(-)

diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index ea3b223e11..9b5e797d59 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -4327,7 +4327,34 @@ i40e_flow_parse_rss_action(struct rte_eth_dev *dev,
 	struct i40e_rte_flow_rss_conf *rss_info = &pf->rss_info;
 	uint16_t i, j, n, tmp;
 	uint32_t index = 0;
-	uint64_t hf_bit = 1;
+
+	static const struct {
+		uint64_t rss_type;
+		enum i40e_filter_pctype pctype;
+	} pctype_match_table[] = {
+		{ETH_RSS_FRAG_IPV4,
+			I40E_FILTER_PCTYPE_FRAG_IPV4},
+		{ETH_RSS_NONFRAG_IPV4_TCP,
+			I40E_FILTER_PCTYPE_NONF_IPV4_TCP},
+		{ETH_RSS_NONFRAG_IPV4_UDP,
+			I40E_FILTER_PCTYPE_NONF_IPV4_UDP},
+		{ETH_RSS_NONFRAG_IPV4_SCTP,
+			I40E_FILTER_PCTYPE_NONF_IPV4_SCTP},
+		{ETH_RSS_NONFRAG_IPV4_OTHER,
+			I40E_FILTER_PCTYPE_NONF_IPV4_OTHER},
+		{ETH_RSS_FRAG_IPV6,
+			I40E_FILTER_PCTYPE_FRAG_IPV6},
+		{ETH_RSS_NONFRAG_IPV6_TCP,
+			I40E_FILTER_PCTYPE_NONF_IPV6_TCP},
+		{ETH_RSS_NONFRAG_IPV6_UDP,
+			I40E_FILTER_PCTYPE_NONF_IPV6_UDP},
+		{ETH_RSS_NONFRAG_IPV6_SCTP,
+			I40E_FILTER_PCTYPE_NONF_IPV6_SCTP},
+		{ETH_RSS_NONFRAG_IPV6_OTHER,
+			I40E_FILTER_PCTYPE_NONF_IPV6_OTHER},
+		{ETH_RSS_L2_PAYLOAD,
+			I40E_FILTER_PCTYPE_L2_PAYLOAD},
+	};
 
 	NEXT_ITEM_OF_ACTION(act, actions, index);
 	rss = act->conf;
@@ -4345,9 +4372,10 @@ i40e_flow_parse_rss_action(struct rte_eth_dev *dev,
 	}
 
 	if (action_flag) {
-		for (n = 0; n < 64; n++) {
-			if (rss->types & (hf_bit << n)) {
-				conf_info->region[0].hw_flowtype[0] = n;
+		for (j = 0; j < RTE_DIM(pctype_match_table); j++) {
+			if (rss->types & pctype_match_table[j].rss_type) {
+				conf_info->region[0].hw_flowtype[0] =
+					(uint8_t)pctype_match_table[j].pctype;
 				conf_info->region[0].flowtype_num = 1;
 				conf_info->queue_region_number = 1;
 				break;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-22 10:37:40.187412741 +0100
+++ 0025-net-i40e-fix-queue-region-in-RSS-flow.patch	2020-05-22 10:37:39.140412929 +0100
@@ -1,30 +1,33 @@
-From da7018ec29d405e9b36b6997eedb728c04bb0fe8 Mon Sep 17 00:00:00 2001
+From fc047c800bad0e396e954523861151fbb5e794e1 Mon Sep 17 00:00:00 2001
 From: Shougang Wang <shougangx.wang@intel.com>
 Date: Fri, 15 May 2020 07:32:31 +0000
 Subject: [PATCH] net/i40e: fix queue region in RSS flow
 
+[ upstream commit da7018ec29d405e9b36b6997eedb728c04bb0fe8 ]
+
 This patch fixes the issue that the queue region does not
 take effect due to incorrectly setting the flow type.
 
 Fixes: ecad87d22383 ("net/i40e: move RSS to flow API")
-Cc: stable@dpdk.org
 
 Signed-off-by: Shougang Wang <shougangx.wang@intel.com>
 Reviewed-by: Jeff Guo <jia.guo@intel.com>
 Tested-by: Hailin Xu <hailinx.xu@intel.com>
 Tested-by: Lunyuan Cui <lunyuanx.cui@intel.com>
 ---
- drivers/net/i40e/i40e_flow.c | 35 ++++++++++++++++++++++++++++++++---
- 1 file changed, 32 insertions(+), 3 deletions(-)
+ drivers/net/i40e/i40e_flow.c | 36 ++++++++++++++++++++++++++++++++----
+ 1 file changed, 32 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
-index 72f3527386..25c77e7aa6 100644
+index ea3b223e11..9b5e797d59 100644
 --- a/drivers/net/i40e/i40e_flow.c
 +++ b/drivers/net/i40e/i40e_flow.c
-@@ -4622,6 +4622,34 @@ i40e_flow_parse_rss_action(struct rte_eth_dev *dev,
+@@ -4327,7 +4327,34 @@ i40e_flow_parse_rss_action(struct rte_eth_dev *dev,
+ 	struct i40e_rte_flow_rss_conf *rss_info = &pf->rss_info;
+ 	uint16_t i, j, n, tmp;
  	uint32_t index = 0;
- 	uint64_t hf_bit = 1;
- 
+-	uint64_t hf_bit = 1;
++
 +	static const struct {
 +		uint64_t rss_type;
 +		enum i40e_filter_pctype pctype;
@@ -52,14 +55,13 @@
 +		{ETH_RSS_L2_PAYLOAD,
 +			I40E_FILTER_PCTYPE_L2_PAYLOAD},
 +	};
-+
+ 
  	NEXT_ITEM_OF_ACTION(act, actions, index);
  	rss = act->conf;
- 
-@@ -4638,9 +4666,10 @@ i40e_flow_parse_rss_action(struct rte_eth_dev *dev,
+@@ -4345,9 +4372,10 @@ i40e_flow_parse_rss_action(struct rte_eth_dev *dev,
  	}
  
- 	if (p_info.action_flag && rss->queue_num) {
+ 	if (action_flag) {
 -		for (n = 0; n < 64; n++) {
 -			if (rss->types & (hf_bit << n)) {
 -				conf_info->region[0].hw_flowtype[0] = n;

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/mlx5: fix doorbell bitmap management offsets' has been queued to stable release 19.11.3
  2020-05-22  9:39     ` [dpdk-stable] patch 'event/dsw: fix enqueue burst return value' " luca.boccassi
                         ` (23 preceding siblings ...)
  2020-05-22  9:40       ` [dpdk-stable] patch 'net/i40e: fix queue region in RSS flow' " luca.boccassi
@ 2020-05-22  9:40       ` luca.boccassi
  2020-05-22  9:40       ` [dpdk-stable] patch 'common/mlx5: fix netlink buffer allocation from stack' " luca.boccassi
                         ` (16 subsequent siblings)
  41 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-22  9:40 UTC (permalink / raw)
  To: Bing Zhao; +Cc: Viacheslav Ovsiienko, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/24/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 8fecf8ad1da951c1283202840763f884a49ceddb Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@mellanox.com>
Date: Fri, 15 May 2020 16:13:58 +0800
Subject: [PATCH] net/mlx5: fix doorbell bitmap management offsets

[ upstream commit 25a59a3076461b269b0f489a9f6865042092d1ee ]

The doorbell record is organized with page and bitmap. When some new
doorbell needs to be associated with a queue, the bit will be set
in the bitmap to indicate the corresponding doorbell occupied. A
counter is used to record the number of doorbell occupied to speed
up the searching.
If the number reaches the maximal value of a pre-defined number of a
page, a new page will be allocated. If not, then the bitmap will be
checked to find a free one.
The LSHIFT and OR (AND NOT) operations are used to update the bitmap
of a page. But 1 will be treated as a signed integer when compiling.
When the shift number is 31, the shifted value will be considered as
negative. Then a wrong extension will be done when setting it to a
64-bits variable. All the upper 32-bits will be set to 1 by such
extension.
Then a wrong offset value will be calculated because of this. The
next 64 bits will be also treated as the bitmap and get corrupted
through the bit set operation.
The immediate value 1 needs to be used as 64 bits width explicitly.

Fixes: 21cae8580fd0 ("net/mlx5: allocate door-bells via DevX")

Signed-off-by: Bing Zhao <bingz@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx5/mlx5.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 9ecf31da7c..2349a62674 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -1948,7 +1948,7 @@ mlx5_get_dbr(struct rte_eth_dev *dev, struct mlx5_devx_dbr_page **dbr_page)
 	/* Find the first clear bit. */
 	assert(i < MLX5_DBR_BITMAP_SIZE);
 	j = rte_bsf64(~page->dbr_bitmap[i]);
-	page->dbr_bitmap[i] |= (1 << j);
+	page->dbr_bitmap[i] |= (UINT64_C(1) << j);
 	page->dbr_count++;
 	*dbr_page = page;
 	return (((i * 64) + j) * sizeof(uint64_t));
@@ -1993,7 +1993,7 @@ mlx5_release_dbr(struct rte_eth_dev *dev, uint32_t umem_id, uint64_t offset)
 		int i = offset / 64;
 		int j = offset % 64;
 
-		page->dbr_bitmap[i] &= ~(1 << j);
+		page->dbr_bitmap[i] &= ~(UINT64_C(1) << j);
 	}
 	return ret;
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-22 10:37:40.226057429 +0100
+++ 0026-net-mlx5-fix-doorbell-bitmap-management-offsets.patch	2020-05-22 10:37:39.144413000 +0100
@@ -1,8 +1,10 @@
-From 25a59a3076461b269b0f489a9f6865042092d1ee Mon Sep 17 00:00:00 2001
+From 8fecf8ad1da951c1283202840763f884a49ceddb Mon Sep 17 00:00:00 2001
 From: Bing Zhao <bingz@mellanox.com>
 Date: Fri, 15 May 2020 16:13:58 +0800
 Subject: [PATCH] net/mlx5: fix doorbell bitmap management offsets
 
+[ upstream commit 25a59a3076461b269b0f489a9f6865042092d1ee ]
+
 The doorbell record is organized with page and bitmap. When some new
 doorbell needs to be associated with a queue, the bit will be set
 in the bitmap to indicate the corresponding doorbell occupied. A
@@ -23,7 +25,6 @@
 The immediate value 1 needs to be used as 64 bits width explicitly.
 
 Fixes: 21cae8580fd0 ("net/mlx5: allocate door-bells via DevX")
-Cc: stable@dpdk.org
 
 Signed-off-by: Bing Zhao <bingz@mellanox.com>
 Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
@@ -33,19 +34,19 @@
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
-index 14458098ec..ab4adecdc3 100644
+index 9ecf31da7c..2349a62674 100644
 --- a/drivers/net/mlx5/mlx5.c
 +++ b/drivers/net/mlx5/mlx5.c
-@@ -2174,7 +2174,7 @@ mlx5_get_dbr(struct rte_eth_dev *dev, struct mlx5_devx_dbr_page **dbr_page)
+@@ -1948,7 +1948,7 @@ mlx5_get_dbr(struct rte_eth_dev *dev, struct mlx5_devx_dbr_page **dbr_page)
  	/* Find the first clear bit. */
- 	MLX5_ASSERT(i < MLX5_DBR_BITMAP_SIZE);
+ 	assert(i < MLX5_DBR_BITMAP_SIZE);
  	j = rte_bsf64(~page->dbr_bitmap[i]);
 -	page->dbr_bitmap[i] |= (1 << j);
 +	page->dbr_bitmap[i] |= (UINT64_C(1) << j);
  	page->dbr_count++;
  	*dbr_page = page;
  	return (((i * 64) + j) * sizeof(uint64_t));
-@@ -2219,7 +2219,7 @@ mlx5_release_dbr(struct rte_eth_dev *dev, uint32_t umem_id, uint64_t offset)
+@@ -1993,7 +1993,7 @@ mlx5_release_dbr(struct rte_eth_dev *dev, uint32_t umem_id, uint64_t offset)
  		int i = offset / 64;
  		int j = offset % 64;
  

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'common/mlx5: fix netlink buffer allocation from stack' has been queued to stable release 19.11.3
  2020-05-22  9:39     ` [dpdk-stable] patch 'event/dsw: fix enqueue burst return value' " luca.boccassi
                         ` (24 preceding siblings ...)
  2020-05-22  9:40       ` [dpdk-stable] patch 'net/mlx5: fix doorbell bitmap management offsets' " luca.boccassi
@ 2020-05-22  9:40       ` luca.boccassi
  2020-05-22  9:40       ` [dpdk-stable] patch 'app/testpmd: fix DCB set' " luca.boccassi
                         ` (15 subsequent siblings)
  41 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-22  9:40 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: Stephen Hemminger, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/24/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 070a7b832dacc6a633585f3ec963682783c69b9b Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Thu, 14 May 2020 07:11:12 +0000
Subject: [PATCH] common/mlx5: fix netlink buffer allocation from stack

[ upstream commit 3acf1071958185d2a299b9765e0c5c82e67ff416 ]

The buffer size to receive netlink reply messages is relatively
large (32K), and it is allocated on the stack and it might
break in application is using smaller per-thread stacks.
This patch allocates temporary buffer from heap.

Fixes: ccdcba53a3f4 ("net/mlx5: use Netlink to add/remove MAC addresses")

Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx5/mlx5_nl.c | 27 +++++++++++++++++++--------
 1 file changed, 19 insertions(+), 8 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_nl.c b/drivers/net/mlx5/mlx5_nl.c
index e7ba03471d..64580b9e6a 100644
--- a/drivers/net/mlx5/mlx5_nl.c
+++ b/drivers/net/mlx5/mlx5_nl.c
@@ -269,10 +269,10 @@ mlx5_nl_recv(int nlsk_fd, uint32_t sn, int (*cb)(struct nlmsghdr *, void *arg),
 	     void *arg)
 {
 	struct sockaddr_nl sa;
-	char buf[MLX5_RECV_BUF_SIZE];
+	void *buf = malloc(MLX5_RECV_BUF_SIZE);
 	struct iovec iov = {
 		.iov_base = buf,
-		.iov_len = sizeof(buf),
+		.iov_len = MLX5_RECV_BUF_SIZE,
 	};
 	struct msghdr msg = {
 		.msg_name = &sa,
@@ -284,6 +284,10 @@ mlx5_nl_recv(int nlsk_fd, uint32_t sn, int (*cb)(struct nlmsghdr *, void *arg),
 	int multipart = 0;
 	int ret = 0;
 
+	if (!buf) {
+		rte_errno = ENOMEM;
+		return -rte_errno;
+	}
 	do {
 		struct nlmsghdr *nh;
 		int recv_bytes = 0;
@@ -292,7 +296,8 @@ mlx5_nl_recv(int nlsk_fd, uint32_t sn, int (*cb)(struct nlmsghdr *, void *arg),
 			recv_bytes = recvmsg(nlsk_fd, &msg, 0);
 			if (recv_bytes == -1) {
 				rte_errno = errno;
-				return -rte_errno;
+				ret = -rte_errno;
+				goto exit;
 			}
 			nh = (struct nlmsghdr *)buf;
 		} while (nh->nlmsg_seq != sn);
@@ -304,24 +309,30 @@ mlx5_nl_recv(int nlsk_fd, uint32_t sn, int (*cb)(struct nlmsghdr *, void *arg),
 
 				if (err_data->error < 0) {
 					rte_errno = -err_data->error;
-					return -rte_errno;
+					ret = -rte_errno;
+					goto exit;
 				}
 				/* Ack message. */
-				return 0;
+				ret = 0;
+				goto exit;
 			}
 			/* Multi-part msgs and their trailing DONE message. */
 			if (nh->nlmsg_flags & NLM_F_MULTI) {
-				if (nh->nlmsg_type == NLMSG_DONE)
-					return 0;
+				if (nh->nlmsg_type == NLMSG_DONE) {
+					ret =  0;
+					goto exit;
+				}
 				multipart = 1;
 			}
 			if (cb) {
 				ret = cb(nh, arg);
 				if (ret < 0)
-					return ret;
+					goto exit;
 			}
 		}
 	} while (multipart);
+exit:
+	free(buf);
 	return ret;
 }
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-22 10:37:40.262884873 +0100
+++ 0027-common-mlx5-fix-netlink-buffer-allocation-from-stack.patch	2020-05-22 10:37:39.144413000 +0100
@@ -1,28 +1,29 @@
-From 3acf1071958185d2a299b9765e0c5c82e67ff416 Mon Sep 17 00:00:00 2001
+From 070a7b832dacc6a633585f3ec963682783c69b9b Mon Sep 17 00:00:00 2001
 From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
 Date: Thu, 14 May 2020 07:11:12 +0000
 Subject: [PATCH] common/mlx5: fix netlink buffer allocation from stack
 
+[ upstream commit 3acf1071958185d2a299b9765e0c5c82e67ff416 ]
+
 The buffer size to receive netlink reply messages is relatively
 large (32K), and it is allocated on the stack and it might
 break in application is using smaller per-thread stacks.
 This patch allocates temporary buffer from heap.
 
 Fixes: ccdcba53a3f4 ("net/mlx5: use Netlink to add/remove MAC addresses")
-Cc: stable@dpdk.org
 
 Reported-by: Stephen Hemminger <stephen@networkplumber.org>
 Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
 Acked-by: Matan Azrad <matan@mellanox.com>
 ---
- drivers/common/mlx5/mlx5_nl.c | 27 +++++++++++++++++++--------
+ drivers/net/mlx5/mlx5_nl.c | 27 +++++++++++++++++++--------
  1 file changed, 19 insertions(+), 8 deletions(-)
 
-diff --git a/drivers/common/mlx5/mlx5_nl.c b/drivers/common/mlx5/mlx5_nl.c
-index 65efcd3df2..1a1033a40b 100644
---- a/drivers/common/mlx5/mlx5_nl.c
-+++ b/drivers/common/mlx5/mlx5_nl.c
-@@ -330,10 +330,10 @@ mlx5_nl_recv(int nlsk_fd, uint32_t sn, int (*cb)(struct nlmsghdr *, void *arg),
+diff --git a/drivers/net/mlx5/mlx5_nl.c b/drivers/net/mlx5/mlx5_nl.c
+index e7ba03471d..64580b9e6a 100644
+--- a/drivers/net/mlx5/mlx5_nl.c
++++ b/drivers/net/mlx5/mlx5_nl.c
+@@ -269,10 +269,10 @@ mlx5_nl_recv(int nlsk_fd, uint32_t sn, int (*cb)(struct nlmsghdr *, void *arg),
  	     void *arg)
  {
  	struct sockaddr_nl sa;
@@ -35,7 +36,7 @@
  	};
  	struct msghdr msg = {
  		.msg_name = &sa,
-@@ -345,6 +345,10 @@ mlx5_nl_recv(int nlsk_fd, uint32_t sn, int (*cb)(struct nlmsghdr *, void *arg),
+@@ -284,6 +284,10 @@ mlx5_nl_recv(int nlsk_fd, uint32_t sn, int (*cb)(struct nlmsghdr *, void *arg),
  	int multipart = 0;
  	int ret = 0;
  
@@ -46,7 +47,7 @@
  	do {
  		struct nlmsghdr *nh;
  		int recv_bytes = 0;
-@@ -353,7 +357,8 @@ mlx5_nl_recv(int nlsk_fd, uint32_t sn, int (*cb)(struct nlmsghdr *, void *arg),
+@@ -292,7 +296,8 @@ mlx5_nl_recv(int nlsk_fd, uint32_t sn, int (*cb)(struct nlmsghdr *, void *arg),
  			recv_bytes = recvmsg(nlsk_fd, &msg, 0);
  			if (recv_bytes == -1) {
  				rte_errno = errno;
@@ -56,7 +57,7 @@
  			}
  			nh = (struct nlmsghdr *)buf;
  		} while (nh->nlmsg_seq != sn);
-@@ -365,24 +370,30 @@ mlx5_nl_recv(int nlsk_fd, uint32_t sn, int (*cb)(struct nlmsghdr *, void *arg),
+@@ -304,24 +309,30 @@ mlx5_nl_recv(int nlsk_fd, uint32_t sn, int (*cb)(struct nlmsghdr *, void *arg),
  
  				if (err_data->error < 0) {
  					rte_errno = -err_data->error;

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'app/testpmd: fix DCB set' has been queued to stable release 19.11.3
  2020-05-22  9:39     ` [dpdk-stable] patch 'event/dsw: fix enqueue burst return value' " luca.boccassi
                         ` (25 preceding siblings ...)
  2020-05-22  9:40       ` [dpdk-stable] patch 'common/mlx5: fix netlink buffer allocation from stack' " luca.boccassi
@ 2020-05-22  9:40       ` luca.boccassi
  2020-05-22  9:40       ` [dpdk-stable] patch 'net/ixgbe/base: update copyright' " luca.boccassi
                         ` (14 subsequent siblings)
  41 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-22  9:40 UTC (permalink / raw)
  To: Ting Xu; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/24/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 7c36f2ea8b0efec5a75a367cf739cc023af0609c Mon Sep 17 00:00:00 2001
From: Ting Xu <ting.xu@intel.com>
Date: Tue, 12 May 2020 10:13:56 +0000
Subject: [PATCH] app/testpmd: fix DCB set

[ upstream commit 5139bc12b0d133fd99d0a0c07f0c5a31cff0ac39 ]

When set DCB in testpmd, there is a segmentation fault. It is
because the local variable rss_conf in get_eth_dcb_conf()
is not cleared, so that the pointer member variable rss_key has
a random address, which leads to an error in the following
processing. This patch initialized the local variable rss_conf
to avoid this situation.

Fixes: ac7c491c3fec ("app/testpmd: fix DCB config")

Signed-off-by: Ting Xu <ting.xu@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/test-pmd/testpmd.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 46d0f1c875..0b126594b7 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -3193,6 +3193,8 @@ get_eth_dcb_conf(portid_t pid, struct rte_eth_conf *eth_conf,
 		struct rte_eth_dcb_tx_conf *tx_conf =
 				&eth_conf->tx_adv_conf.dcb_tx_conf;
 
+		memset(&rss_conf, 0, sizeof(struct rte_eth_rss_conf));
+
 		rc = rte_eth_dev_rss_hash_conf_get(pid, &rss_conf);
 		if (rc != 0)
 			return rc;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-22 10:37:40.298575521 +0100
+++ 0028-app-testpmd-fix-DCB-set.patch	2020-05-22 10:37:39.148413072 +0100
@@ -1,8 +1,10 @@
-From 5139bc12b0d133fd99d0a0c07f0c5a31cff0ac39 Mon Sep 17 00:00:00 2001
+From 7c36f2ea8b0efec5a75a367cf739cc023af0609c Mon Sep 17 00:00:00 2001
 From: Ting Xu <ting.xu@intel.com>
 Date: Tue, 12 May 2020 10:13:56 +0000
 Subject: [PATCH] app/testpmd: fix DCB set
 
+[ upstream commit 5139bc12b0d133fd99d0a0c07f0c5a31cff0ac39 ]
+
 When set DCB in testpmd, there is a segmentation fault. It is
 because the local variable rss_conf in get_eth_dcb_conf()
 is not cleared, so that the pointer member variable rss_key has
@@ -11,7 +13,6 @@
 to avoid this situation.
 
 Fixes: ac7c491c3fec ("app/testpmd: fix DCB config")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ting Xu <ting.xu@intel.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -20,10 +21,10 @@
  1 file changed, 2 insertions(+)
 
 diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
-index baccc3a495..4989d22ca8 100644
+index 46d0f1c875..0b126594b7 100644
 --- a/app/test-pmd/testpmd.c
 +++ b/app/test-pmd/testpmd.c
-@@ -3460,6 +3460,8 @@ get_eth_dcb_conf(portid_t pid, struct rte_eth_conf *eth_conf,
+@@ -3193,6 +3193,8 @@ get_eth_dcb_conf(portid_t pid, struct rte_eth_conf *eth_conf,
  		struct rte_eth_dcb_tx_conf *tx_conf =
  				&eth_conf->tx_adv_conf.dcb_tx_conf;
  

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/ixgbe/base: update copyright' has been queued to stable release 19.11.3
  2020-05-22  9:39     ` [dpdk-stable] patch 'event/dsw: fix enqueue burst return value' " luca.boccassi
                         ` (26 preceding siblings ...)
  2020-05-22  9:40       ` [dpdk-stable] patch 'app/testpmd: fix DCB set' " luca.boccassi
@ 2020-05-22  9:40       ` luca.boccassi
  2020-05-22  9:40       ` [dpdk-stable] patch 'net/i40e/base: " luca.boccassi
                         ` (13 subsequent siblings)
  41 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-22  9:40 UTC (permalink / raw)
  To: Xiaoyun Li; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/24/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 3c6d1a0269a480c510d19df6068431afbead0f87 Mon Sep 17 00:00:00 2001
From: Xiaoyun Li <xiaoyun.li@intel.com>
Date: Mon, 18 May 2020 16:41:36 +0800
Subject: [PATCH] net/ixgbe/base: update copyright

[ upstream commit e071d4af8f2918df9542592acc877d75d40c783a ]

Clarify Intel copyright and update the date to 2020.

Fixes: 9db3087f4f77 ("net/ixgbe/base: update the license")

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/ixgbe/base/README            | 2 +-
 drivers/net/ixgbe/base/ixgbe_82598.c     | 2 +-
 drivers/net/ixgbe/base/ixgbe_82598.h     | 2 +-
 drivers/net/ixgbe/base/ixgbe_82599.c     | 2 +-
 drivers/net/ixgbe/base/ixgbe_82599.h     | 2 +-
 drivers/net/ixgbe/base/ixgbe_api.c       | 2 +-
 drivers/net/ixgbe/base/ixgbe_api.h       | 2 +-
 drivers/net/ixgbe/base/ixgbe_common.c    | 2 +-
 drivers/net/ixgbe/base/ixgbe_common.h    | 2 +-
 drivers/net/ixgbe/base/ixgbe_dcb.c       | 2 +-
 drivers/net/ixgbe/base/ixgbe_dcb.h       | 2 +-
 drivers/net/ixgbe/base/ixgbe_dcb_82598.c | 2 +-
 drivers/net/ixgbe/base/ixgbe_dcb_82598.h | 2 +-
 drivers/net/ixgbe/base/ixgbe_dcb_82599.c | 2 +-
 drivers/net/ixgbe/base/ixgbe_dcb_82599.h | 2 +-
 drivers/net/ixgbe/base/ixgbe_hv_vf.c     | 2 +-
 drivers/net/ixgbe/base/ixgbe_hv_vf.h     | 2 +-
 drivers/net/ixgbe/base/ixgbe_mbx.c       | 2 +-
 drivers/net/ixgbe/base/ixgbe_mbx.h       | 2 +-
 drivers/net/ixgbe/base/ixgbe_osdep.h     | 2 +-
 drivers/net/ixgbe/base/ixgbe_phy.c       | 2 +-
 drivers/net/ixgbe/base/ixgbe_phy.h       | 2 +-
 drivers/net/ixgbe/base/ixgbe_type.h      | 2 +-
 drivers/net/ixgbe/base/ixgbe_vf.c        | 2 +-
 drivers/net/ixgbe/base/ixgbe_vf.h        | 2 +-
 drivers/net/ixgbe/base/ixgbe_x540.c      | 2 +-
 drivers/net/ixgbe/base/ixgbe_x540.h      | 2 +-
 drivers/net/ixgbe/base/ixgbe_x550.c      | 2 +-
 drivers/net/ixgbe/base/ixgbe_x550.h      | 2 +-
 drivers/net/ixgbe/base/meson.build       | 2 +-
 30 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/drivers/net/ixgbe/base/README b/drivers/net/ixgbe/base/README
index b6b420e2f3..a48b14ed27 100644
--- a/drivers/net/ixgbe/base/README
+++ b/drivers/net/ixgbe/base/README
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2010-2018 Intel Corporation
+ * Copyright(c) 2010-2020 Intel Corporation
  */
 
 Intel® IXGBE driver
diff --git a/drivers/net/ixgbe/base/ixgbe_82598.c b/drivers/net/ixgbe/base/ixgbe_82598.c
index 245ff75d55..c83e1c6b30 100644
--- a/drivers/net/ixgbe/base/ixgbe_82598.c
+++ b/drivers/net/ixgbe/base/ixgbe_82598.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #include "ixgbe_type.h"
diff --git a/drivers/net/ixgbe/base/ixgbe_82598.h b/drivers/net/ixgbe/base/ixgbe_82598.h
index 8013f495ec..7bad5e12d3 100644
--- a/drivers/net/ixgbe/base/ixgbe_82598.h
+++ b/drivers/net/ixgbe/base/ixgbe_82598.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _IXGBE_82598_H_
diff --git a/drivers/net/ixgbe/base/ixgbe_82599.c b/drivers/net/ixgbe/base/ixgbe_82599.c
index 96bdde62c8..9cd0b1428c 100644
--- a/drivers/net/ixgbe/base/ixgbe_82599.c
+++ b/drivers/net/ixgbe/base/ixgbe_82599.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #include "ixgbe_type.h"
diff --git a/drivers/net/ixgbe/base/ixgbe_82599.h b/drivers/net/ixgbe/base/ixgbe_82599.h
index a32eb1f517..238481983f 100644
--- a/drivers/net/ixgbe/base/ixgbe_82599.h
+++ b/drivers/net/ixgbe/base/ixgbe_82599.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _IXGBE_82599_H_
diff --git a/drivers/net/ixgbe/base/ixgbe_api.c b/drivers/net/ixgbe/base/ixgbe_api.c
index 873c07999c..0a22df3d06 100644
--- a/drivers/net/ixgbe/base/ixgbe_api.c
+++ b/drivers/net/ixgbe/base/ixgbe_api.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #include "ixgbe_api.h"
diff --git a/drivers/net/ixgbe/base/ixgbe_api.h b/drivers/net/ixgbe/base/ixgbe_api.h
index ff8f7b2611..33e7c3c215 100644
--- a/drivers/net/ixgbe/base/ixgbe_api.h
+++ b/drivers/net/ixgbe/base/ixgbe_api.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _IXGBE_API_H_
diff --git a/drivers/net/ixgbe/base/ixgbe_common.c b/drivers/net/ixgbe/base/ixgbe_common.c
index 62ff767230..4eb98dc198 100644
--- a/drivers/net/ixgbe/base/ixgbe_common.c
+++ b/drivers/net/ixgbe/base/ixgbe_common.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #include "ixgbe_common.h"
diff --git a/drivers/net/ixgbe/base/ixgbe_common.h b/drivers/net/ixgbe/base/ixgbe_common.h
index 3bb2475119..7a31f088c4 100644
--- a/drivers/net/ixgbe/base/ixgbe_common.h
+++ b/drivers/net/ixgbe/base/ixgbe_common.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _IXGBE_COMMON_H_
diff --git a/drivers/net/ixgbe/base/ixgbe_dcb.c b/drivers/net/ixgbe/base/ixgbe_dcb.c
index a590e0e07c..53def2146e 100644
--- a/drivers/net/ixgbe/base/ixgbe_dcb.c
+++ b/drivers/net/ixgbe/base/ixgbe_dcb.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 
diff --git a/drivers/net/ixgbe/base/ixgbe_dcb.h b/drivers/net/ixgbe/base/ixgbe_dcb.h
index 503d06018f..c2a1013ac0 100644
--- a/drivers/net/ixgbe/base/ixgbe_dcb.h
+++ b/drivers/net/ixgbe/base/ixgbe_dcb.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _IXGBE_DCB_H_
diff --git a/drivers/net/ixgbe/base/ixgbe_dcb_82598.c b/drivers/net/ixgbe/base/ixgbe_dcb_82598.c
index d87cb58857..bb309e28fd 100644
--- a/drivers/net/ixgbe/base/ixgbe_dcb_82598.c
+++ b/drivers/net/ixgbe/base/ixgbe_dcb_82598.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 
diff --git a/drivers/net/ixgbe/base/ixgbe_dcb_82598.h b/drivers/net/ixgbe/base/ixgbe_dcb_82598.h
index 1a14744482..8f36881378 100644
--- a/drivers/net/ixgbe/base/ixgbe_dcb_82598.h
+++ b/drivers/net/ixgbe/base/ixgbe_dcb_82598.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _IXGBE_DCB_82598_H_
diff --git a/drivers/net/ixgbe/base/ixgbe_dcb_82599.c b/drivers/net/ixgbe/base/ixgbe_dcb_82599.c
index f4f0ff0190..04e0d1fb7d 100644
--- a/drivers/net/ixgbe/base/ixgbe_dcb_82599.c
+++ b/drivers/net/ixgbe/base/ixgbe_dcb_82599.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 
diff --git a/drivers/net/ixgbe/base/ixgbe_dcb_82599.h b/drivers/net/ixgbe/base/ixgbe_dcb_82599.h
index 085ada27f7..7bd1d6a325 100644
--- a/drivers/net/ixgbe/base/ixgbe_dcb_82599.h
+++ b/drivers/net/ixgbe/base/ixgbe_dcb_82599.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _IXGBE_DCB_82599_H_
diff --git a/drivers/net/ixgbe/base/ixgbe_hv_vf.c b/drivers/net/ixgbe/base/ixgbe_hv_vf.c
index 67a124d8d1..6005c4ac93 100644
--- a/drivers/net/ixgbe/base/ixgbe_hv_vf.c
+++ b/drivers/net/ixgbe/base/ixgbe_hv_vf.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #include "ixgbe_vf.h"
diff --git a/drivers/net/ixgbe/base/ixgbe_hv_vf.h b/drivers/net/ixgbe/base/ixgbe_hv_vf.h
index 9664f3bdbf..dd2e1eee4e 100644
--- a/drivers/net/ixgbe/base/ixgbe_hv_vf.h
+++ b/drivers/net/ixgbe/base/ixgbe_hv_vf.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _IXGBE_HV_VF_H_
diff --git a/drivers/net/ixgbe/base/ixgbe_mbx.c b/drivers/net/ixgbe/base/ixgbe_mbx.c
index cb82942dfa..13bdb5f68f 100644
--- a/drivers/net/ixgbe/base/ixgbe_mbx.c
+++ b/drivers/net/ixgbe/base/ixgbe_mbx.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #include "ixgbe_type.h"
diff --git a/drivers/net/ixgbe/base/ixgbe_mbx.h b/drivers/net/ixgbe/base/ixgbe_mbx.h
index 5d32cbc074..1a45e49c2f 100644
--- a/drivers/net/ixgbe/base/ixgbe_mbx.h
+++ b/drivers/net/ixgbe/base/ixgbe_mbx.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _IXGBE_MBX_H_
diff --git a/drivers/net/ixgbe/base/ixgbe_osdep.h b/drivers/net/ixgbe/base/ixgbe_osdep.h
index ea8dc1cbe5..a4eb71777c 100644
--- a/drivers/net/ixgbe/base/ixgbe_osdep.h
+++ b/drivers/net/ixgbe/base/ixgbe_osdep.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _IXGBE_OS_H_
diff --git a/drivers/net/ixgbe/base/ixgbe_phy.c b/drivers/net/ixgbe/base/ixgbe_phy.c
index dd118f9170..a8243fa974 100644
--- a/drivers/net/ixgbe/base/ixgbe_phy.c
+++ b/drivers/net/ixgbe/base/ixgbe_phy.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #include "ixgbe_api.h"
diff --git a/drivers/net/ixgbe/base/ixgbe_phy.h b/drivers/net/ixgbe/base/ixgbe_phy.h
index f1605f2cc9..a06c3be170 100644
--- a/drivers/net/ixgbe/base/ixgbe_phy.h
+++ b/drivers/net/ixgbe/base/ixgbe_phy.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _IXGBE_PHY_H_
diff --git a/drivers/net/ixgbe/base/ixgbe_type.h b/drivers/net/ixgbe/base/ixgbe_type.h
index 077b8f01c7..15e9370105 100644
--- a/drivers/net/ixgbe/base/ixgbe_type.h
+++ b/drivers/net/ixgbe/base/ixgbe_type.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _IXGBE_TYPE_H_
diff --git a/drivers/net/ixgbe/base/ixgbe_vf.c b/drivers/net/ixgbe/base/ixgbe_vf.c
index aac37822e4..7f69ece107 100644
--- a/drivers/net/ixgbe/base/ixgbe_vf.c
+++ b/drivers/net/ixgbe/base/ixgbe_vf.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 
diff --git a/drivers/net/ixgbe/base/ixgbe_vf.h b/drivers/net/ixgbe/base/ixgbe_vf.h
index dba643fced..be58b4f76e 100644
--- a/drivers/net/ixgbe/base/ixgbe_vf.h
+++ b/drivers/net/ixgbe/base/ixgbe_vf.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _IXGBE_VF_H_
diff --git a/drivers/net/ixgbe/base/ixgbe_x540.c b/drivers/net/ixgbe/base/ixgbe_x540.c
index f00f0eae7e..d65f47c181 100644
--- a/drivers/net/ixgbe/base/ixgbe_x540.c
+++ b/drivers/net/ixgbe/base/ixgbe_x540.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #include "ixgbe_x540.h"
diff --git a/drivers/net/ixgbe/base/ixgbe_x540.h b/drivers/net/ixgbe/base/ixgbe_x540.h
index 231dfe56e5..ba79847d11 100644
--- a/drivers/net/ixgbe/base/ixgbe_x540.h
+++ b/drivers/net/ixgbe/base/ixgbe_x540.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _IXGBE_X540_H_
diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c b/drivers/net/ixgbe/base/ixgbe_x550.c
index 930a61a20b..3de406fd35 100644
--- a/drivers/net/ixgbe/base/ixgbe_x550.c
+++ b/drivers/net/ixgbe/base/ixgbe_x550.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #include "ixgbe_x550.h"
diff --git a/drivers/net/ixgbe/base/ixgbe_x550.h b/drivers/net/ixgbe/base/ixgbe_x550.h
index 3bd98f243d..10086ab423 100644
--- a/drivers/net/ixgbe/base/ixgbe_x550.h
+++ b/drivers/net/ixgbe/base/ixgbe_x550.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _IXGBE_X550_H_
diff --git a/drivers/net/ixgbe/base/meson.build b/drivers/net/ixgbe/base/meson.build
index bbd0f51ea5..20677ab034 100644
--- a/drivers/net/ixgbe/base/meson.build
+++ b/drivers/net/ixgbe/base/meson.build
@@ -1,5 +1,5 @@
 # SPDX-License-Identifier: BSD-3-Clause
-# Copyright(c) 2017 Intel Corporation
+# Copyright(c) 2017-2020 Intel Corporation
 
 sources = [
 	'ixgbe_82598.c',
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-22 10:37:40.336501133 +0100
+++ 0029-net-ixgbe-base-update-copyright.patch	2020-05-22 10:37:39.168413430 +0100
@@ -1,12 +1,13 @@
-From e071d4af8f2918df9542592acc877d75d40c783a Mon Sep 17 00:00:00 2001
+From 3c6d1a0269a480c510d19df6068431afbead0f87 Mon Sep 17 00:00:00 2001
 From: Xiaoyun Li <xiaoyun.li@intel.com>
 Date: Mon, 18 May 2020 16:41:36 +0800
 Subject: [PATCH] net/ixgbe/base: update copyright
 
+[ upstream commit e071d4af8f2918df9542592acc877d75d40c783a ]
+
 Clarify Intel copyright and update the date to 2020.
 
 Fixes: 9db3087f4f77 ("net/ixgbe/base: update the license")
-Cc: stable@dpdk.org
 
 Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -253,7 +254,7 @@
  
  #ifndef _IXGBE_MBX_H_
 diff --git a/drivers/net/ixgbe/base/ixgbe_osdep.h b/drivers/net/ixgbe/base/ixgbe_osdep.h
-index 844d1701f5..dc712b7c02 100644
+index ea8dc1cbe5..a4eb71777c 100644
 --- a/drivers/net/ixgbe/base/ixgbe_osdep.h
 +++ b/drivers/net/ixgbe/base/ixgbe_osdep.h
 @@ -1,5 +1,5 @@
@@ -363,7 +364,7 @@
  
  #ifndef _IXGBE_X550_H_
 diff --git a/drivers/net/ixgbe/base/meson.build b/drivers/net/ixgbe/base/meson.build
-index da3887560d..48bbb86cb8 100644
+index bbd0f51ea5..20677ab034 100644
 --- a/drivers/net/ixgbe/base/meson.build
 +++ b/drivers/net/ixgbe/base/meson.build
 @@ -1,5 +1,5 @@

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/i40e/base: update copyright' has been queued to stable release 19.11.3
  2020-05-22  9:39     ` [dpdk-stable] patch 'event/dsw: fix enqueue burst return value' " luca.boccassi
                         ` (27 preceding siblings ...)
  2020-05-22  9:40       ` [dpdk-stable] patch 'net/ixgbe/base: update copyright' " luca.boccassi
@ 2020-05-22  9:40       ` luca.boccassi
  2020-05-22  9:40       ` [dpdk-stable] patch 'common/iavf: " luca.boccassi
                         ` (12 subsequent siblings)
  41 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-22  9:40 UTC (permalink / raw)
  To: Xiaoyun Li; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/24/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 75f2750b43be051dfb227dfc314b65c9c069d6ba Mon Sep 17 00:00:00 2001
From: Xiaoyun Li <xiaoyun.li@intel.com>
Date: Mon, 18 May 2020 16:44:06 +0800
Subject: [PATCH] net/i40e/base: update copyright

[ upstream commit 760ed82196c69695649b6681d76af0fea19f2cb8 ]

Clarify Intel copyright and update the date to 2020.

Fixes: 547be3f01f55 ("net/i40e/base: replace license text with SPDX tag")

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/i40e/base/README            | 2 +-
 drivers/net/i40e/base/i40e_adminq.c     | 2 +-
 drivers/net/i40e/base/i40e_adminq.h     | 2 +-
 drivers/net/i40e/base/i40e_adminq_cmd.h | 2 +-
 drivers/net/i40e/base/i40e_alloc.h      | 2 +-
 drivers/net/i40e/base/i40e_common.c     | 2 +-
 drivers/net/i40e/base/i40e_dcb.c        | 2 +-
 drivers/net/i40e/base/i40e_dcb.h        | 2 +-
 drivers/net/i40e/base/i40e_devids.h     | 2 +-
 drivers/net/i40e/base/i40e_diag.c       | 2 +-
 drivers/net/i40e/base/i40e_diag.h       | 2 +-
 drivers/net/i40e/base/i40e_hmc.c        | 2 +-
 drivers/net/i40e/base/i40e_hmc.h        | 2 +-
 drivers/net/i40e/base/i40e_lan_hmc.c    | 2 +-
 drivers/net/i40e/base/i40e_lan_hmc.h    | 2 +-
 drivers/net/i40e/base/i40e_nvm.c        | 2 +-
 drivers/net/i40e/base/i40e_osdep.h      | 2 +-
 drivers/net/i40e/base/i40e_prototype.h  | 2 +-
 drivers/net/i40e/base/i40e_register.h   | 2 +-
 drivers/net/i40e/base/i40e_status.h     | 2 +-
 drivers/net/i40e/base/i40e_type.h       | 2 +-
 drivers/net/i40e/base/meson.build       | 2 +-
 drivers/net/i40e/base/virtchnl.h        | 2 +-
 23 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/drivers/net/i40e/base/README b/drivers/net/i40e/base/README
index 8a5339cfff..b46593566b 100644
--- a/drivers/net/i40e/base/README
+++ b/drivers/net/i40e/base/README
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2017 Intel Corporation
+ * Copyright(c) 2017-2020 Intel Corporation
  */
 
 Intel® I40E driver
diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c
index b2fc6f5900..584da0383c 100644
--- a/drivers/net/i40e/base/i40e_adminq.c
+++ b/drivers/net/i40e/base/i40e_adminq.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #include "i40e_status.h"
diff --git a/drivers/net/i40e/base/i40e_adminq.h b/drivers/net/i40e/base/i40e_adminq.h
index 769d84809e..6ce262ad4b 100644
--- a/drivers/net/i40e/base/i40e_adminq.h
+++ b/drivers/net/i40e/base/i40e_adminq.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _I40E_ADMINQ_H_
diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h
index b459be9212..cd7f24cf14 100644
--- a/drivers/net/i40e/base/i40e_adminq_cmd.h
+++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _I40E_ADMINQ_CMD_H_
diff --git a/drivers/net/i40e/base/i40e_alloc.h b/drivers/net/i40e/base/i40e_alloc.h
index 4fc1860155..ae14e4d932 100644
--- a/drivers/net/i40e/base/i40e_alloc.h
+++ b/drivers/net/i40e/base/i40e_alloc.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _I40E_ALLOC_H_
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 9c6609bfc0..2172ea12fc 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #include "i40e_type.h"
diff --git a/drivers/net/i40e/base/i40e_dcb.c b/drivers/net/i40e/base/i40e_dcb.c
index a26f82b3a6..d99bd6e3f8 100644
--- a/drivers/net/i40e/base/i40e_dcb.c
+++ b/drivers/net/i40e/base/i40e_dcb.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #include "i40e_adminq.h"
diff --git a/drivers/net/i40e/base/i40e_dcb.h b/drivers/net/i40e/base/i40e_dcb.h
index 85b0eed3ad..8d36fce430 100644
--- a/drivers/net/i40e/base/i40e_dcb.h
+++ b/drivers/net/i40e/base/i40e_dcb.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _I40E_DCB_H_
diff --git a/drivers/net/i40e/base/i40e_devids.h b/drivers/net/i40e/base/i40e_devids.h
index f3c59bdea9..64cfe2bb26 100644
--- a/drivers/net/i40e/base/i40e_devids.h
+++ b/drivers/net/i40e/base/i40e_devids.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _I40E_DEVIDS_H_
diff --git a/drivers/net/i40e/base/i40e_diag.c b/drivers/net/i40e/base/i40e_diag.c
index 3ccbea4829..b3c4cfd3aa 100644
--- a/drivers/net/i40e/base/i40e_diag.c
+++ b/drivers/net/i40e/base/i40e_diag.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #include "i40e_diag.h"
diff --git a/drivers/net/i40e/base/i40e_diag.h b/drivers/net/i40e/base/i40e_diag.h
index 4434fc960b..cb59285d9c 100644
--- a/drivers/net/i40e/base/i40e_diag.h
+++ b/drivers/net/i40e/base/i40e_diag.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _I40E_DIAG_H_
diff --git a/drivers/net/i40e/base/i40e_hmc.c b/drivers/net/i40e/base/i40e_hmc.c
index 11c9ae2072..a47d6e0d79 100644
--- a/drivers/net/i40e/base/i40e_hmc.c
+++ b/drivers/net/i40e/base/i40e_hmc.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #include "i40e_osdep.h"
diff --git a/drivers/net/i40e/base/i40e_hmc.h b/drivers/net/i40e/base/i40e_hmc.h
index 289264ed99..f9aad7dc31 100644
--- a/drivers/net/i40e/base/i40e_hmc.h
+++ b/drivers/net/i40e/base/i40e_hmc.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _I40E_HMC_H_
diff --git a/drivers/net/i40e/base/i40e_lan_hmc.c b/drivers/net/i40e/base/i40e_lan_hmc.c
index 0afee49b13..d3969396f0 100644
--- a/drivers/net/i40e/base/i40e_lan_hmc.c
+++ b/drivers/net/i40e/base/i40e_lan_hmc.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #include "i40e_osdep.h"
diff --git a/drivers/net/i40e/base/i40e_lan_hmc.h b/drivers/net/i40e/base/i40e_lan_hmc.h
index e531ec490a..aa5dceb792 100644
--- a/drivers/net/i40e/base/i40e_lan_hmc.h
+++ b/drivers/net/i40e/base/i40e_lan_hmc.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _I40E_LAN_HMC_H_
diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c
index 6c8ca87718..d87a6e56ff 100644
--- a/drivers/net/i40e/base/i40e_nvm.c
+++ b/drivers/net/i40e/base/i40e_nvm.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #include "i40e_prototype.h"
diff --git a/drivers/net/i40e/base/i40e_osdep.h b/drivers/net/i40e/base/i40e_osdep.h
index 8a2d82a8d0..64b15e1b61 100644
--- a/drivers/net/i40e/base/i40e_osdep.h
+++ b/drivers/net/i40e/base/i40e_osdep.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _I40E_OSDEP_H_
diff --git a/drivers/net/i40e/base/i40e_prototype.h b/drivers/net/i40e/base/i40e_prototype.h
index 7e6ba3fd7a..f356834206 100644
--- a/drivers/net/i40e/base/i40e_prototype.h
+++ b/drivers/net/i40e/base/i40e_prototype.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _I40E_PROTOTYPE_H_
diff --git a/drivers/net/i40e/base/i40e_register.h b/drivers/net/i40e/base/i40e_register.h
index e93ec3f58f..2408dcb117 100644
--- a/drivers/net/i40e/base/i40e_register.h
+++ b/drivers/net/i40e/base/i40e_register.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _I40E_REGISTER_H_
diff --git a/drivers/net/i40e/base/i40e_status.h b/drivers/net/i40e/base/i40e_status.h
index 1dad4f4b83..cd72169f14 100644
--- a/drivers/net/i40e/base/i40e_status.h
+++ b/drivers/net/i40e/base/i40e_status.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _I40E_STATUS_H_
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index 8c7fc4394a..cc72cc0d58 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _I40E_TYPE_H_
diff --git a/drivers/net/i40e/base/meson.build b/drivers/net/i40e/base/meson.build
index 3dee8c9754..bfc38ae1a0 100644
--- a/drivers/net/i40e/base/meson.build
+++ b/drivers/net/i40e/base/meson.build
@@ -1,5 +1,5 @@
 # SPDX-License-Identifier: BSD-3-Clause
-# Copyright(c) 2017 Intel Corporation
+# Copyright(c) 2017-2020 Intel Corporation
 
 sources = [
 	'i40e_adminq.c',
diff --git a/drivers/net/i40e/base/virtchnl.h b/drivers/net/i40e/base/virtchnl.h
index 0b6f55e49d..0ec84e9dae 100644
--- a/drivers/net/i40e/base/virtchnl.h
+++ b/drivers/net/i40e/base/virtchnl.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2018
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _VIRTCHNL_H_
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-22 10:37:40.392207725 +0100
+++ 0030-net-i40e-base-update-copyright.patch	2020-05-22 10:37:39.192413861 +0100
@@ -1,12 +1,13 @@
-From 760ed82196c69695649b6681d76af0fea19f2cb8 Mon Sep 17 00:00:00 2001
+From 75f2750b43be051dfb227dfc314b65c9c069d6ba Mon Sep 17 00:00:00 2001
 From: Xiaoyun Li <xiaoyun.li@intel.com>
 Date: Mon, 18 May 2020 16:44:06 +0800
 Subject: [PATCH] net/i40e/base: update copyright
 
+[ upstream commit 760ed82196c69695649b6681d76af0fea19f2cb8 ]
+
 Clarify Intel copyright and update the date to 2020.
 
 Fixes: 547be3f01f55 ("net/i40e/base: replace license text with SPDX tag")
-Cc: stable@dpdk.org
 
 Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -37,7 +38,7 @@
  23 files changed, 23 insertions(+), 23 deletions(-)
 
 diff --git a/drivers/net/i40e/base/README b/drivers/net/i40e/base/README
-index e7b39b4d14..6baca43603 100644
+index 8a5339cfff..b46593566b 100644
 --- a/drivers/net/i40e/base/README
 +++ b/drivers/net/i40e/base/README
 @@ -1,5 +1,5 @@
@@ -48,7 +49,7 @@
  
  Intel® I40E driver
 diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c
-index 659b971e5c..c89e1fb3f7 100644
+index b2fc6f5900..584da0383c 100644
 --- a/drivers/net/i40e/base/i40e_adminq.c
 +++ b/drivers/net/i40e/base/i40e_adminq.c
 @@ -1,5 +1,5 @@
@@ -70,7 +71,7 @@
  
  #ifndef _I40E_ADMINQ_H_
 diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h
-index 55fd43e220..1905167f5e 100644
+index b459be9212..cd7f24cf14 100644
 --- a/drivers/net/i40e/base/i40e_adminq_cmd.h
 +++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
 @@ -1,5 +1,5 @@
@@ -92,7 +93,7 @@
  
  #ifndef _I40E_ALLOC_H_
 diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
-index 4e06f2d234..46a0b78816 100644
+index 9c6609bfc0..2172ea12fc 100644
 --- a/drivers/net/i40e/base/i40e_common.c
 +++ b/drivers/net/i40e/base/i40e_common.c
 @@ -1,5 +1,5 @@
@@ -103,7 +104,7 @@
  
  #include "i40e_type.h"
 diff --git a/drivers/net/i40e/base/i40e_dcb.c b/drivers/net/i40e/base/i40e_dcb.c
-index 2ab5021ee8..a07c61e673 100644
+index a26f82b3a6..d99bd6e3f8 100644
 --- a/drivers/net/i40e/base/i40e_dcb.c
 +++ b/drivers/net/i40e/base/i40e_dcb.c
 @@ -1,5 +1,5 @@
@@ -114,18 +115,18 @@
  
  #include "i40e_adminq.h"
 diff --git a/drivers/net/i40e/base/i40e_dcb.h b/drivers/net/i40e/base/i40e_dcb.h
-index 60193c98d6..0409fd3e1a 100644
+index 85b0eed3ad..8d36fce430 100644
 --- a/drivers/net/i40e/base/i40e_dcb.h
 +++ b/drivers/net/i40e/base/i40e_dcb.h
 @@ -1,5 +1,5 @@
  /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2001-2019
+- * Copyright(c) 2001-2018
 + * Copyright(c) 2001-2020 Intel Corporation
   */
  
  #ifndef _I40E_DCB_H_
 diff --git a/drivers/net/i40e/base/i40e_devids.h b/drivers/net/i40e/base/i40e_devids.h
-index b87e1bcb40..02ae7be550 100644
+index f3c59bdea9..64cfe2bb26 100644
 --- a/drivers/net/i40e/base/i40e_devids.h
 +++ b/drivers/net/i40e/base/i40e_devids.h
 @@ -1,5 +1,5 @@
@@ -202,7 +203,7 @@
  
  #ifndef _I40E_LAN_HMC_H_
 diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c
-index fc24cc2ce0..6466d86486 100644
+index 6c8ca87718..d87a6e56ff 100644
 --- a/drivers/net/i40e/base/i40e_nvm.c
 +++ b/drivers/net/i40e/base/i40e_nvm.c
 @@ -1,5 +1,5 @@
@@ -213,7 +214,7 @@
  
  #include "i40e_prototype.h"
 diff --git a/drivers/net/i40e/base/i40e_osdep.h b/drivers/net/i40e/base/i40e_osdep.h
-index 17eee94533..58be39677a 100644
+index 8a2d82a8d0..64b15e1b61 100644
 --- a/drivers/net/i40e/base/i40e_osdep.h
 +++ b/drivers/net/i40e/base/i40e_osdep.h
 @@ -1,5 +1,5 @@
@@ -224,7 +225,7 @@
  
  #ifndef _I40E_OSDEP_H_
 diff --git a/drivers/net/i40e/base/i40e_prototype.h b/drivers/net/i40e/base/i40e_prototype.h
-index d8ab3ea0a4..91fa234915 100644
+index 7e6ba3fd7a..f356834206 100644
 --- a/drivers/net/i40e/base/i40e_prototype.h
 +++ b/drivers/net/i40e/base/i40e_prototype.h
 @@ -1,5 +1,5 @@
@@ -235,7 +236,7 @@
  
  #ifndef _I40E_PROTOTYPE_H_
 diff --git a/drivers/net/i40e/base/i40e_register.h b/drivers/net/i40e/base/i40e_register.h
-index dffcc633c1..ee4f333f9c 100644
+index e93ec3f58f..2408dcb117 100644
 --- a/drivers/net/i40e/base/i40e_register.h
 +++ b/drivers/net/i40e/base/i40e_register.h
 @@ -1,5 +1,5 @@
@@ -257,7 +258,7 @@
  
  #ifndef _I40E_STATUS_H_
 diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
-index af9089829d..014a4c132a 100644
+index 8c7fc4394a..cc72cc0d58 100644
 --- a/drivers/net/i40e/base/i40e_type.h
 +++ b/drivers/net/i40e/base/i40e_type.h
 @@ -1,5 +1,5 @@
@@ -268,7 +269,7 @@
  
  #ifndef _I40E_TYPE_H_
 diff --git a/drivers/net/i40e/base/meson.build b/drivers/net/i40e/base/meson.build
-index db0c830dc2..8bc6a0fa0b 100644
+index 3dee8c9754..bfc38ae1a0 100644
 --- a/drivers/net/i40e/base/meson.build
 +++ b/drivers/net/i40e/base/meson.build
 @@ -1,5 +1,5 @@
@@ -279,7 +280,7 @@
  sources = [
  	'i40e_adminq.c',
 diff --git a/drivers/net/i40e/base/virtchnl.h b/drivers/net/i40e/base/virtchnl.h
-index 92515bf340..4f498ca456 100644
+index 0b6f55e49d..0ec84e9dae 100644
 --- a/drivers/net/i40e/base/virtchnl.h
 +++ b/drivers/net/i40e/base/virtchnl.h
 @@ -1,5 +1,5 @@

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'common/iavf: update copyright' has been queued to stable release 19.11.3
  2020-05-22  9:39     ` [dpdk-stable] patch 'event/dsw: fix enqueue burst return value' " luca.boccassi
                         ` (28 preceding siblings ...)
  2020-05-22  9:40       ` [dpdk-stable] patch 'net/i40e/base: " luca.boccassi
@ 2020-05-22  9:40       ` luca.boccassi
  2020-05-22  9:40       ` [dpdk-stable] patch 'net/ice/base: " luca.boccassi
                         ` (11 subsequent siblings)
  41 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-22  9:40 UTC (permalink / raw)
  To: Xiaoyun Li; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/24/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 0491724e4a3fd338bc421e487a4e7fb119c9ff1c Mon Sep 17 00:00:00 2001
From: Xiaoyun Li <xiaoyun.li@intel.com>
Date: Mon, 18 May 2020 16:45:46 +0800
Subject: [PATCH] common/iavf: update copyright

[ upstream commit 32c3e0b4882b75dcf44ae2faabe2dbba9f17ad2a ]

Clarify Intel copyright and update the date to 2020.

Fixes: 317862a4e44f ("net/iavf: replace license text with SPDX tag")

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/iavf/base/README        | 2 +-
 drivers/net/iavf/base/iavf_adminq.c | 2 +-
 drivers/net/iavf/base/iavf_adminq.h | 2 +-
 drivers/net/iavf/base/iavf_alloc.h  | 2 +-
 drivers/net/iavf/base/iavf_common.c | 2 +-
 drivers/net/iavf/base/iavf_devids.h | 2 +-
 drivers/net/iavf/base/iavf_osdep.h  | 2 +-
 drivers/net/iavf/base/iavf_status.h | 2 +-
 drivers/net/iavf/base/virtchnl.h    | 2 +-
 9 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/net/iavf/base/README b/drivers/net/iavf/base/README
index f57e1048ff..bc54ab2809 100644
--- a/drivers/net/iavf/base/README
+++ b/drivers/net/iavf/base/README
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2017 Intel Corporation
+ * Copyright(c) 2019-2020 Intel Corporation
  */
 
 Intel® IAVF driver
diff --git a/drivers/net/iavf/base/iavf_adminq.c b/drivers/net/iavf/base/iavf_adminq.c
index a9fc63992d..d6943e8260 100644
--- a/drivers/net/iavf/base/iavf_adminq.c
+++ b/drivers/net/iavf/base/iavf_adminq.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2013 - 2015 Intel Corporation
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #include "iavf_status.h"
diff --git a/drivers/net/iavf/base/iavf_adminq.h b/drivers/net/iavf/base/iavf_adminq.h
index 715621644b..f97fe8818e 100644
--- a/drivers/net/iavf/base/iavf_adminq.h
+++ b/drivers/net/iavf/base/iavf_adminq.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2013 - 2015 Intel Corporation
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _IAVF_ADMINQ_H_
diff --git a/drivers/net/iavf/base/iavf_alloc.h b/drivers/net/iavf/base/iavf_alloc.h
index 4ff307d23d..ef5ce080ad 100644
--- a/drivers/net/iavf/base/iavf_alloc.h
+++ b/drivers/net/iavf/base/iavf_alloc.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2013 - 2015 Intel Corporation
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _IAVF_ALLOC_H_
diff --git a/drivers/net/iavf/base/iavf_common.c b/drivers/net/iavf/base/iavf_common.c
index 916a8388b2..23f18aa2ec 100644
--- a/drivers/net/iavf/base/iavf_common.c
+++ b/drivers/net/iavf/base/iavf_common.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2013 - 2015 Intel Corporation
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #include "iavf_type.h"
diff --git a/drivers/net/iavf/base/iavf_devids.h b/drivers/net/iavf/base/iavf_devids.h
index 2cd88d62f0..08c523f19e 100644
--- a/drivers/net/iavf/base/iavf_devids.h
+++ b/drivers/net/iavf/base/iavf_devids.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2013 - 2015 Intel Corporation
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _IAVF_DEVIDS_H_
diff --git a/drivers/net/iavf/base/iavf_osdep.h b/drivers/net/iavf/base/iavf_osdep.h
index 6480266937..08b312cbd8 100644
--- a/drivers/net/iavf/base/iavf_osdep.h
+++ b/drivers/net/iavf/base/iavf_osdep.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2017 Intel Corporation
+ * Copyright(c) 2017-2020 Intel Corporation
  */
 
 #ifndef _IAVF_OSDEP_H_
diff --git a/drivers/net/iavf/base/iavf_status.h b/drivers/net/iavf/base/iavf_status.h
index cb91afb017..a981360af6 100644
--- a/drivers/net/iavf/base/iavf_status.h
+++ b/drivers/net/iavf/base/iavf_status.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2013 - 2015 Intel Corporation
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _IAVF_STATUS_H_
diff --git a/drivers/net/iavf/base/virtchnl.h b/drivers/net/iavf/base/virtchnl.h
index 50f7c8e49e..fa98417b05 100644
--- a/drivers/net/iavf/base/virtchnl.h
+++ b/drivers/net/iavf/base/virtchnl.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2013 - 2015 Intel Corporation
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _VIRTCHNL_H_
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-22 10:37:40.449748688 +0100
+++ 0031-common-iavf-update-copyright.patch	2020-05-22 10:37:39.196413933 +0100
@@ -1,125 +1,98 @@
-From 32c3e0b4882b75dcf44ae2faabe2dbba9f17ad2a Mon Sep 17 00:00:00 2001
+From 0491724e4a3fd338bc421e487a4e7fb119c9ff1c Mon Sep 17 00:00:00 2001
 From: Xiaoyun Li <xiaoyun.li@intel.com>
 Date: Mon, 18 May 2020 16:45:46 +0800
 Subject: [PATCH] common/iavf: update copyright
 
+[ upstream commit 32c3e0b4882b75dcf44ae2faabe2dbba9f17ad2a ]
+
 Clarify Intel copyright and update the date to 2020.
 
 Fixes: 317862a4e44f ("net/iavf: replace license text with SPDX tag")
-Cc: stable@dpdk.org
 
 Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
 ---
- drivers/common/iavf/README            | 2 +-
- drivers/common/iavf/iavf_adminq.c     | 2 +-
- drivers/common/iavf/iavf_adminq.h     | 2 +-
- drivers/common/iavf/iavf_adminq_cmd.h | 2 +-
- drivers/common/iavf/iavf_alloc.h      | 2 +-
- drivers/common/iavf/iavf_common.c     | 2 +-
- drivers/common/iavf/iavf_devids.h     | 2 +-
- drivers/common/iavf/iavf_impl.c       | 2 +-
- drivers/common/iavf/iavf_osdep.h      | 2 +-
- drivers/common/iavf/iavf_prototype.h  | 2 +-
- drivers/common/iavf/iavf_register.h   | 2 +-
- drivers/common/iavf/iavf_status.h     | 2 +-
- drivers/common/iavf/iavf_type.h       | 2 +-
- drivers/common/iavf/meson.build       | 2 +-
- drivers/common/iavf/virtchnl.h        | 2 +-
- 15 files changed, 15 insertions(+), 15 deletions(-)
+ drivers/net/iavf/base/README        | 2 +-
+ drivers/net/iavf/base/iavf_adminq.c | 2 +-
+ drivers/net/iavf/base/iavf_adminq.h | 2 +-
+ drivers/net/iavf/base/iavf_alloc.h  | 2 +-
+ drivers/net/iavf/base/iavf_common.c | 2 +-
+ drivers/net/iavf/base/iavf_devids.h | 2 +-
+ drivers/net/iavf/base/iavf_osdep.h  | 2 +-
+ drivers/net/iavf/base/iavf_status.h | 2 +-
+ drivers/net/iavf/base/virtchnl.h    | 2 +-
+ 9 files changed, 9 insertions(+), 9 deletions(-)
 
-diff --git a/drivers/common/iavf/README b/drivers/common/iavf/README
-index 034c7d7adc..f301ff665a 100644
---- a/drivers/common/iavf/README
-+++ b/drivers/common/iavf/README
+diff --git a/drivers/net/iavf/base/README b/drivers/net/iavf/base/README
+index f57e1048ff..bc54ab2809 100644
+--- a/drivers/net/iavf/base/README
++++ b/drivers/net/iavf/base/README
 @@ -1,5 +1,5 @@
  /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2019 Intel Corporation
+- * Copyright(c) 2017 Intel Corporation
 + * Copyright(c) 2019-2020 Intel Corporation
   */
  
  Intel® IAVF driver
-diff --git a/drivers/common/iavf/iavf_adminq.c b/drivers/common/iavf/iavf_adminq.c
-index ca265b0bcd..8bae51a46a 100644
---- a/drivers/common/iavf/iavf_adminq.c
-+++ b/drivers/common/iavf/iavf_adminq.c
+diff --git a/drivers/net/iavf/base/iavf_adminq.c b/drivers/net/iavf/base/iavf_adminq.c
+index a9fc63992d..d6943e8260 100644
+--- a/drivers/net/iavf/base/iavf_adminq.c
++++ b/drivers/net/iavf/base/iavf_adminq.c
 @@ -1,5 +1,5 @@
  /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2001-2020
+- * Copyright(c) 2013 - 2015 Intel Corporation
 + * Copyright(c) 2001-2020 Intel Corporation
   */
  
  #include "iavf_status.h"
-diff --git a/drivers/common/iavf/iavf_adminq.h b/drivers/common/iavf/iavf_adminq.h
-index 40e1336c10..93214162eb 100644
---- a/drivers/common/iavf/iavf_adminq.h
-+++ b/drivers/common/iavf/iavf_adminq.h
+diff --git a/drivers/net/iavf/base/iavf_adminq.h b/drivers/net/iavf/base/iavf_adminq.h
+index 715621644b..f97fe8818e 100644
+--- a/drivers/net/iavf/base/iavf_adminq.h
++++ b/drivers/net/iavf/base/iavf_adminq.h
 @@ -1,5 +1,5 @@
  /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2001-2020
+- * Copyright(c) 2013 - 2015 Intel Corporation
 + * Copyright(c) 2001-2020 Intel Corporation
   */
  
  #ifndef _IAVF_ADMINQ_H_
-diff --git a/drivers/common/iavf/iavf_adminq_cmd.h b/drivers/common/iavf/iavf_adminq_cmd.h
-index c24c2f0a2b..5b748426ad 100644
---- a/drivers/common/iavf/iavf_adminq_cmd.h
-+++ b/drivers/common/iavf/iavf_adminq_cmd.h
-@@ -1,5 +1,5 @@
- /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2001-2020
-+ * Copyright(c) 2001-2020 Intel Corporation
-  */
- 
- #ifndef _IAVF_ADMINQ_CMD_H_
-diff --git a/drivers/common/iavf/iavf_alloc.h b/drivers/common/iavf/iavf_alloc.h
-index e863d2545a..7b7a205cff 100644
---- a/drivers/common/iavf/iavf_alloc.h
-+++ b/drivers/common/iavf/iavf_alloc.h
+diff --git a/drivers/net/iavf/base/iavf_alloc.h b/drivers/net/iavf/base/iavf_alloc.h
+index 4ff307d23d..ef5ce080ad 100644
+--- a/drivers/net/iavf/base/iavf_alloc.h
++++ b/drivers/net/iavf/base/iavf_alloc.h
 @@ -1,5 +1,5 @@
  /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2001-2020
+- * Copyright(c) 2013 - 2015 Intel Corporation
 + * Copyright(c) 2001-2020 Intel Corporation
   */
  
  #ifndef _IAVF_ALLOC_H_
-diff --git a/drivers/common/iavf/iavf_common.c b/drivers/common/iavf/iavf_common.c
-index 6cf159518e..57ec1ff39b 100644
---- a/drivers/common/iavf/iavf_common.c
-+++ b/drivers/common/iavf/iavf_common.c
+diff --git a/drivers/net/iavf/base/iavf_common.c b/drivers/net/iavf/base/iavf_common.c
+index 916a8388b2..23f18aa2ec 100644
+--- a/drivers/net/iavf/base/iavf_common.c
++++ b/drivers/net/iavf/base/iavf_common.c
 @@ -1,5 +1,5 @@
  /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2001-2020
+- * Copyright(c) 2013 - 2015 Intel Corporation
 + * Copyright(c) 2001-2020 Intel Corporation
   */
  
  #include "iavf_type.h"
-diff --git a/drivers/common/iavf/iavf_devids.h b/drivers/common/iavf/iavf_devids.h
-index e6897983ea..2e63aac289 100644
---- a/drivers/common/iavf/iavf_devids.h
-+++ b/drivers/common/iavf/iavf_devids.h
+diff --git a/drivers/net/iavf/base/iavf_devids.h b/drivers/net/iavf/base/iavf_devids.h
+index 2cd88d62f0..08c523f19e 100644
+--- a/drivers/net/iavf/base/iavf_devids.h
++++ b/drivers/net/iavf/base/iavf_devids.h
 @@ -1,5 +1,5 @@
  /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2001-2020
+- * Copyright(c) 2013 - 2015 Intel Corporation
 + * Copyright(c) 2001-2020 Intel Corporation
   */
  
  #ifndef _IAVF_DEVIDS_H_
-diff --git a/drivers/common/iavf/iavf_impl.c b/drivers/common/iavf/iavf_impl.c
-index 70bab4cc66..6174a91440 100644
---- a/drivers/common/iavf/iavf_impl.c
-+++ b/drivers/common/iavf/iavf_impl.c
-@@ -1,5 +1,5 @@
- /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2019 Intel Corporation
-+ * Copyright(c) 2019-2020 Intel Corporation
-  */
- 
- #include <stdio.h>
-diff --git a/drivers/common/iavf/iavf_osdep.h b/drivers/common/iavf/iavf_osdep.h
-index 011b19336e..7cba13ff74 100644
---- a/drivers/common/iavf/iavf_osdep.h
-+++ b/drivers/common/iavf/iavf_osdep.h
+diff --git a/drivers/net/iavf/base/iavf_osdep.h b/drivers/net/iavf/base/iavf_osdep.h
+index 6480266937..08b312cbd8 100644
+--- a/drivers/net/iavf/base/iavf_osdep.h
++++ b/drivers/net/iavf/base/iavf_osdep.h
 @@ -1,5 +1,5 @@
  /* SPDX-License-Identifier: BSD-3-Clause
 - * Copyright(c) 2017 Intel Corporation
@@ -127,68 +100,24 @@
   */
  
  #ifndef _IAVF_OSDEP_H_
-diff --git a/drivers/common/iavf/iavf_prototype.h b/drivers/common/iavf/iavf_prototype.h
-index ed4057b1c0..31ce2af494 100644
---- a/drivers/common/iavf/iavf_prototype.h
-+++ b/drivers/common/iavf/iavf_prototype.h
-@@ -1,5 +1,5 @@
- /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2001-2020
-+ * Copyright(c) 2001-2020 Intel Corporation
-  */
- 
- #ifndef _IAVF_PROTOTYPE_H_
-diff --git a/drivers/common/iavf/iavf_register.h b/drivers/common/iavf/iavf_register.h
-index ee248dcf97..03d62a9da7 100644
---- a/drivers/common/iavf/iavf_register.h
-+++ b/drivers/common/iavf/iavf_register.h
-@@ -1,5 +1,5 @@
- /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2001-2020
-+ * Copyright(c) 2001-2020 Intel Corporation
-  */
- 
- #ifndef _IAVF_REGISTER_H_
-diff --git a/drivers/common/iavf/iavf_status.h b/drivers/common/iavf/iavf_status.h
-index 33a98a25a9..f425638063 100644
---- a/drivers/common/iavf/iavf_status.h
-+++ b/drivers/common/iavf/iavf_status.h
+diff --git a/drivers/net/iavf/base/iavf_status.h b/drivers/net/iavf/base/iavf_status.h
+index cb91afb017..a981360af6 100644
+--- a/drivers/net/iavf/base/iavf_status.h
++++ b/drivers/net/iavf/base/iavf_status.h
 @@ -1,5 +1,5 @@
  /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2001-2020
+- * Copyright(c) 2013 - 2015 Intel Corporation
 + * Copyright(c) 2001-2020 Intel Corporation
   */
  
  #ifndef _IAVF_STATUS_H_
-diff --git a/drivers/common/iavf/iavf_type.h b/drivers/common/iavf/iavf_type.h
-index 905e1afb63..665b070a0d 100644
---- a/drivers/common/iavf/iavf_type.h
-+++ b/drivers/common/iavf/iavf_type.h
-@@ -1,5 +1,5 @@
- /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2001-2020
-+ * Copyright(c) 2001-2020 Intel Corporation
-  */
- 
- #ifndef _IAVF_TYPE_H_
-diff --git a/drivers/common/iavf/meson.build b/drivers/common/iavf/meson.build
-index ce50aceaf0..1f4d8b898d 100644
---- a/drivers/common/iavf/meson.build
-+++ b/drivers/common/iavf/meson.build
-@@ -1,5 +1,5 @@
- # SPDX-License-Identifier: BSD-3-Clause
--# Copyright(c) 2019 Intel Corporation
-+# Copyright(c) 2019-2020 Intel Corporation
- 
- sources = files('iavf_adminq.c', 'iavf_common.c', 'iavf_impl.c')
- 
-diff --git a/drivers/common/iavf/virtchnl.h b/drivers/common/iavf/virtchnl.h
-index ef41a4f8ac..79515ee8bd 100644
---- a/drivers/common/iavf/virtchnl.h
-+++ b/drivers/common/iavf/virtchnl.h
+diff --git a/drivers/net/iavf/base/virtchnl.h b/drivers/net/iavf/base/virtchnl.h
+index 50f7c8e49e..fa98417b05 100644
+--- a/drivers/net/iavf/base/virtchnl.h
++++ b/drivers/net/iavf/base/virtchnl.h
 @@ -1,5 +1,5 @@
  /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2001-2020
+- * Copyright(c) 2013 - 2015 Intel Corporation
 + * Copyright(c) 2001-2020 Intel Corporation
   */
  

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/ice/base: update copyright' has been queued to stable release 19.11.3
  2020-05-22  9:39     ` [dpdk-stable] patch 'event/dsw: fix enqueue burst return value' " luca.boccassi
                         ` (29 preceding siblings ...)
  2020-05-22  9:40       ` [dpdk-stable] patch 'common/iavf: " luca.boccassi
@ 2020-05-22  9:40       ` luca.boccassi
  2020-05-22  9:40       ` [dpdk-stable] patch 'pci: accept 32-bit domain numbers' " luca.boccassi
                         ` (10 subsequent siblings)
  41 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-22  9:40 UTC (permalink / raw)
  To: Xiaoyun Li; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/24/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 7b732e25dff9699cc050830f3e956d02e12f4b68 Mon Sep 17 00:00:00 2001
From: Xiaoyun Li <xiaoyun.li@intel.com>
Date: Mon, 18 May 2020 17:07:33 +0800
Subject: [PATCH] net/ice/base: update copyright

[ upstream commit dc496974cd68e1e02365c2b7e28935ffad02a98e ]

Clarify Intel copyright and update the date to 2020.

Fixes: f3202a097f12 ("net/ice/base: add ACL module")
Fixes: a90fae1d0755 ("net/ice/base: add admin queue structures and commands")
Fixes: 2d2bdc026737 ("net/ice/base: add various headers")
Fixes: c9e37832c95f ("net/ice/base: rework on bit ops")
Fixes: 453d087ccaff ("net/ice/base: add common functions")
Fixes: 6c1f26be50a2 ("net/ice/base: add control queue information")
Fixes: 1082f786547e ("net/ice/base: support DCB")
Fixes: 6aa406714a65 ("net/ice/base: add device IDs for Intel E800 Series NICs")
Fixes: bd984f155f49 ("net/ice/base: support FDIR")
Fixes: 51d04e4933e3 ("net/ice/base: add flexible pipeline module")
Fixes: 2d2bdc026737 ("net/ice/base: add various headers")
Fixes: aa1cd410fa64 ("net/ice/base: add flow module")
Fixes: 51c7f09f3f81 ("net/ice/base: add registers for Intel E800 Series NIC")
Fixes: 64e9587d5629 ("net/ice/base: add structures for Rx/Tx queues")
Fixes: 557fa75bcf55 ("net/ice/base: add code to work with the NVM")
Fixes: b06499a43394 ("net/ice/base: update Boot Configuration Section read of NVM")
Fixes: 04b8ec1ea807 ("net/ice/base: add protocol structures and defines")
Fixes: 2a27e0a16d29 ("net/ice/base: add sideband queue info")
Fixes: 93e84b1bfc92 ("net/ice/base: add basic Tx scheduler")
Fixes: c7dd15931183 ("net/ice/base: add virtual switch code")
Fixes: a240ff50505b ("net/ice/base: add basic structures")

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/ice/base/ice_adminq_cmd.h    | 2 +-
 drivers/net/ice/base/ice_alloc.h         | 2 +-
 drivers/net/ice/base/ice_bitops.h        | 2 +-
 drivers/net/ice/base/ice_common.c        | 2 +-
 drivers/net/ice/base/ice_common.h        | 2 +-
 drivers/net/ice/base/ice_controlq.c      | 2 +-
 drivers/net/ice/base/ice_controlq.h      | 2 +-
 drivers/net/ice/base/ice_dcb.c           | 2 +-
 drivers/net/ice/base/ice_dcb.h           | 2 +-
 drivers/net/ice/base/ice_devids.h        | 2 +-
 drivers/net/ice/base/ice_fdir.c          | 2 +-
 drivers/net/ice/base/ice_fdir.h          | 2 +-
 drivers/net/ice/base/ice_flex_pipe.c     | 2 +-
 drivers/net/ice/base/ice_flex_pipe.h     | 2 +-
 drivers/net/ice/base/ice_flex_type.h     | 2 +-
 drivers/net/ice/base/ice_flow.c          | 2 +-
 drivers/net/ice/base/ice_flow.h          | 2 +-
 drivers/net/ice/base/ice_hw_autogen.h    | 2 +-
 drivers/net/ice/base/ice_lan_tx_rx.h     | 2 +-
 drivers/net/ice/base/ice_nvm.c           | 2 +-
 drivers/net/ice/base/ice_nvm.h           | 2 +-
 drivers/net/ice/base/ice_osdep.h         | 2 +-
 drivers/net/ice/base/ice_protocol_type.h | 2 +-
 drivers/net/ice/base/ice_sbq_cmd.h       | 2 +-
 drivers/net/ice/base/ice_sched.c         | 2 +-
 drivers/net/ice/base/ice_sched.h         | 2 +-
 drivers/net/ice/base/ice_status.h        | 2 +-
 drivers/net/ice/base/ice_switch.c        | 2 +-
 drivers/net/ice/base/ice_switch.h        | 2 +-
 drivers/net/ice/base/ice_type.h          | 2 +-
 drivers/net/ice/base/meson.build         | 2 +-
 31 files changed, 31 insertions(+), 31 deletions(-)

diff --git a/drivers/net/ice/base/ice_adminq_cmd.h b/drivers/net/ice/base/ice_adminq_cmd.h
index cb521ca178..d196434f4d 100644
--- a/drivers/net/ice/base/ice_adminq_cmd.h
+++ b/drivers/net/ice/base/ice_adminq_cmd.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2019
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _ICE_ADMINQ_CMD_H_
diff --git a/drivers/net/ice/base/ice_alloc.h b/drivers/net/ice/base/ice_alloc.h
index cf823a2c2a..cfe9199403 100644
--- a/drivers/net/ice/base/ice_alloc.h
+++ b/drivers/net/ice/base/ice_alloc.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2019
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _ICE_ALLOC_H_
diff --git a/drivers/net/ice/base/ice_bitops.h b/drivers/net/ice/base/ice_bitops.h
index 32f64cac0c..0344437c9e 100644
--- a/drivers/net/ice/base/ice_bitops.h
+++ b/drivers/net/ice/base/ice_bitops.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2019
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _ICE_BITOPS_H_
diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c
index 0dec997d87..77f68561e3 100644
--- a/drivers/net/ice/base/ice_common.c
+++ b/drivers/net/ice/base/ice_common.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2019
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #include "ice_common.h"
diff --git a/drivers/net/ice/base/ice_common.h b/drivers/net/ice/base/ice_common.h
index c73184499f..63b733d74f 100644
--- a/drivers/net/ice/base/ice_common.h
+++ b/drivers/net/ice/base/ice_common.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2019
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _ICE_COMMON_H_
diff --git a/drivers/net/ice/base/ice_controlq.c b/drivers/net/ice/base/ice_controlq.c
index 8a65fae40e..feffb51987 100644
--- a/drivers/net/ice/base/ice_controlq.c
+++ b/drivers/net/ice/base/ice_controlq.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2019
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #include "ice_common.h"
diff --git a/drivers/net/ice/base/ice_controlq.h b/drivers/net/ice/base/ice_controlq.h
index 8b60465474..423d171141 100644
--- a/drivers/net/ice/base/ice_controlq.h
+++ b/drivers/net/ice/base/ice_controlq.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2019
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _ICE_CONTROLQ_H_
diff --git a/drivers/net/ice/base/ice_dcb.c b/drivers/net/ice/base/ice_dcb.c
index 7048dbd02f..8918188193 100644
--- a/drivers/net/ice/base/ice_dcb.c
+++ b/drivers/net/ice/base/ice_dcb.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2019
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #include "ice_common.h"
diff --git a/drivers/net/ice/base/ice_dcb.h b/drivers/net/ice/base/ice_dcb.h
index 9a0968f5b8..3ffeb864cc 100644
--- a/drivers/net/ice/base/ice_dcb.h
+++ b/drivers/net/ice/base/ice_dcb.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2019
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _ICE_DCB_H_
diff --git a/drivers/net/ice/base/ice_devids.h b/drivers/net/ice/base/ice_devids.h
index 348d1907a4..8f778d918c 100644
--- a/drivers/net/ice/base/ice_devids.h
+++ b/drivers/net/ice/base/ice_devids.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2019
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _ICE_DEVIDS_H_
diff --git a/drivers/net/ice/base/ice_fdir.c b/drivers/net/ice/base/ice_fdir.c
index 8e5aef8a38..033f6ccb4e 100644
--- a/drivers/net/ice/base/ice_fdir.c
+++ b/drivers/net/ice/base/ice_fdir.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2019
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #include "ice_common.h"
diff --git a/drivers/net/ice/base/ice_fdir.h b/drivers/net/ice/base/ice_fdir.h
index 5b37705844..2cb7291eb1 100644
--- a/drivers/net/ice/base/ice_fdir.h
+++ b/drivers/net/ice/base/ice_fdir.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2019
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _ICE_FDIR_H_
diff --git a/drivers/net/ice/base/ice_flex_pipe.c b/drivers/net/ice/base/ice_flex_pipe.c
index 0de1e1b239..47adfd07a3 100644
--- a/drivers/net/ice/base/ice_flex_pipe.c
+++ b/drivers/net/ice/base/ice_flex_pipe.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2019
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #include "ice_common.h"
diff --git a/drivers/net/ice/base/ice_flex_pipe.h b/drivers/net/ice/base/ice_flex_pipe.h
index 80793b1ccd..10f328b652 100644
--- a/drivers/net/ice/base/ice_flex_pipe.h
+++ b/drivers/net/ice/base/ice_flex_pipe.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2019
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _ICE_FLEX_PIPE_H_
diff --git a/drivers/net/ice/base/ice_flex_type.h b/drivers/net/ice/base/ice_flex_type.h
index 1be98ea521..7708ced40a 100644
--- a/drivers/net/ice/base/ice_flex_type.h
+++ b/drivers/net/ice/base/ice_flex_type.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2019
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _ICE_FLEX_TYPE_H_
diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c
index 1fbb8ee1a7..c3a31374ea 100644
--- a/drivers/net/ice/base/ice_flow.c
+++ b/drivers/net/ice/base/ice_flow.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2019
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #include "ice_common.h"
diff --git a/drivers/net/ice/base/ice_flow.h b/drivers/net/ice/base/ice_flow.h
index 19f3ee7642..94a3801c9a 100644
--- a/drivers/net/ice/base/ice_flow.h
+++ b/drivers/net/ice/base/ice_flow.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2019
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _ICE_FLOW_H_
diff --git a/drivers/net/ice/base/ice_hw_autogen.h b/drivers/net/ice/base/ice_hw_autogen.h
index 92d432044d..1c9c84dfb4 100644
--- a/drivers/net/ice/base/ice_hw_autogen.h
+++ b/drivers/net/ice/base/ice_hw_autogen.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2019
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 /* Machine-generated file; do not edit */
diff --git a/drivers/net/ice/base/ice_lan_tx_rx.h b/drivers/net/ice/base/ice_lan_tx_rx.h
index a97c63cc97..51e30848f8 100644
--- a/drivers/net/ice/base/ice_lan_tx_rx.h
+++ b/drivers/net/ice/base/ice_lan_tx_rx.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2019
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _ICE_LAN_TX_RX_H_
diff --git a/drivers/net/ice/base/ice_nvm.c b/drivers/net/ice/base/ice_nvm.c
index 1dbfc2dcc7..434258b14c 100644
--- a/drivers/net/ice/base/ice_nvm.c
+++ b/drivers/net/ice/base/ice_nvm.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2019
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #include "ice_common.h"
diff --git a/drivers/net/ice/base/ice_nvm.h b/drivers/net/ice/base/ice_nvm.h
index d5b7b2d196..8624d19b19 100644
--- a/drivers/net/ice/base/ice_nvm.h
+++ b/drivers/net/ice/base/ice_nvm.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2019
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _ICE_NVM_H_
diff --git a/drivers/net/ice/base/ice_osdep.h b/drivers/net/ice/base/ice_osdep.h
index 7310cd0a27..32ac8ac397 100644
--- a/drivers/net/ice/base/ice_osdep.h
+++ b/drivers/net/ice/base/ice_osdep.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018 Intel Corporation
+ * Copyright(c) 2018-2020 Intel Corporation
  */
 
 #ifndef _ICE_OSDEP_H_
diff --git a/drivers/net/ice/base/ice_protocol_type.h b/drivers/net/ice/base/ice_protocol_type.h
index fdcbb2cad3..cbc7c37016 100644
--- a/drivers/net/ice/base/ice_protocol_type.h
+++ b/drivers/net/ice/base/ice_protocol_type.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2019
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _ICE_PROTOCOL_TYPE_H_
diff --git a/drivers/net/ice/base/ice_sbq_cmd.h b/drivers/net/ice/base/ice_sbq_cmd.h
index 70a019292a..22bfcebc3c 100644
--- a/drivers/net/ice/base/ice_sbq_cmd.h
+++ b/drivers/net/ice/base/ice_sbq_cmd.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2019
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _ICE_SBQ_CMD_H_
diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c
index 26c4ba36f1..0d2c64e33d 100644
--- a/drivers/net/ice/base/ice_sched.c
+++ b/drivers/net/ice/base/ice_sched.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2019
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #include "ice_sched.h"
diff --git a/drivers/net/ice/base/ice_sched.h b/drivers/net/ice/base/ice_sched.h
index 1a8549931f..57bf4b59d6 100644
--- a/drivers/net/ice/base/ice_sched.h
+++ b/drivers/net/ice/base/ice_sched.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2019
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _ICE_SCHED_H_
diff --git a/drivers/net/ice/base/ice_status.h b/drivers/net/ice/base/ice_status.h
index ac120fa300..ba28895a17 100644
--- a/drivers/net/ice/base/ice_status.h
+++ b/drivers/net/ice/base/ice_status.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2019
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _ICE_STATUS_H_
diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index 944d98522b..34d0a164ed 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2019
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #include "ice_switch.h"
diff --git a/drivers/net/ice/base/ice_switch.h b/drivers/net/ice/base/ice_switch.h
index 61083738ab..5dc795148e 100644
--- a/drivers/net/ice/base/ice_switch.h
+++ b/drivers/net/ice/base/ice_switch.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2019
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _ICE_SWITCH_H_
diff --git a/drivers/net/ice/base/ice_type.h b/drivers/net/ice/base/ice_type.h
index 8b29e519d8..bf3c5ffd0a 100644
--- a/drivers/net/ice/base/ice_type.h
+++ b/drivers/net/ice/base/ice_type.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2001-2019
+ * Copyright(c) 2001-2020 Intel Corporation
  */
 
 #ifndef _ICE_TYPE_H_
diff --git a/drivers/net/ice/base/meson.build b/drivers/net/ice/base/meson.build
index eff155574d..46c4ffb500 100644
--- a/drivers/net/ice/base/meson.build
+++ b/drivers/net/ice/base/meson.build
@@ -1,5 +1,5 @@
 # SPDX-License-Identifier: BSD-3-Clause
-# Copyright(c) 2018 Intel Corporation
+# Copyright(c) 2018-2020 Intel Corporation
 
 sources = [
 	'ice_controlq.c',
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-22 10:37:40.485152555 +0100
+++ 0032-net-ice-base-update-copyright.patch	2020-05-22 10:37:39.240414721 +0100
@@ -1,8 +1,10 @@
-From dc496974cd68e1e02365c2b7e28935ffad02a98e Mon Sep 17 00:00:00 2001
+From 7b732e25dff9699cc050830f3e956d02e12f4b68 Mon Sep 17 00:00:00 2001
 From: Xiaoyun Li <xiaoyun.li@intel.com>
 Date: Mon, 18 May 2020 17:07:33 +0800
 Subject: [PATCH] net/ice/base: update copyright
 
+[ upstream commit dc496974cd68e1e02365c2b7e28935ffad02a98e ]
+
 Clarify Intel copyright and update the date to 2020.
 
 Fixes: f3202a097f12 ("net/ice/base: add ACL module")
@@ -26,14 +28,10 @@
 Fixes: 93e84b1bfc92 ("net/ice/base: add basic Tx scheduler")
 Fixes: c7dd15931183 ("net/ice/base: add virtual switch code")
 Fixes: a240ff50505b ("net/ice/base: add basic structures")
-Cc: stable@dpdk.org
 
 Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
 ---
- drivers/net/ice/base/ice_acl.c           | 2 +-
- drivers/net/ice/base/ice_acl.h           | 2 +-
- drivers/net/ice/base/ice_acl_ctrl.c      | 2 +-
  drivers/net/ice/base/ice_adminq_cmd.h    | 2 +-
  drivers/net/ice/base/ice_alloc.h         | 2 +-
  drivers/net/ice/base/ice_bitops.h        | 2 +-
@@ -65,274 +63,241 @@
  drivers/net/ice/base/ice_switch.h        | 2 +-
  drivers/net/ice/base/ice_type.h          | 2 +-
  drivers/net/ice/base/meson.build         | 2 +-
- 34 files changed, 34 insertions(+), 34 deletions(-)
+ 31 files changed, 31 insertions(+), 31 deletions(-)
 
-diff --git a/drivers/net/ice/base/ice_acl.c b/drivers/net/ice/base/ice_acl.c
-index 26e03aa338..31244cb4b9 100644
---- a/drivers/net/ice/base/ice_acl.c
-+++ b/drivers/net/ice/base/ice_acl.c
-@@ -1,5 +1,5 @@
- /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2001-2020
-+ * Copyright(c) 2001-2020 Intel Corporation
-  */
- 
- #include "ice_acl.h"
-diff --git a/drivers/net/ice/base/ice_acl.h b/drivers/net/ice/base/ice_acl.h
-index 00296300b7..500db0c35e 100644
---- a/drivers/net/ice/base/ice_acl.h
-+++ b/drivers/net/ice/base/ice_acl.h
-@@ -1,5 +1,5 @@
- /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2001-2020
-+ * Copyright(c) 2001-2020 Intel Corporation
-  */
- 
- #ifndef _ICE_ACL_H_
-diff --git a/drivers/net/ice/base/ice_acl_ctrl.c b/drivers/net/ice/base/ice_acl_ctrl.c
-index 7dfe0eda3b..e676051410 100644
---- a/drivers/net/ice/base/ice_acl_ctrl.c
-+++ b/drivers/net/ice/base/ice_acl_ctrl.c
-@@ -1,5 +1,5 @@
- /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2001-2020
-+ * Copyright(c) 2001-2020 Intel Corporation
-  */
- 
- #include "ice_acl.h"
 diff --git a/drivers/net/ice/base/ice_adminq_cmd.h b/drivers/net/ice/base/ice_adminq_cmd.h
-index 4e280f4132..57a785508f 100644
+index cb521ca178..d196434f4d 100644
 --- a/drivers/net/ice/base/ice_adminq_cmd.h
 +++ b/drivers/net/ice/base/ice_adminq_cmd.h
 @@ -1,5 +1,5 @@
  /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2001-2020
+- * Copyright(c) 2001-2019
 + * Copyright(c) 2001-2020 Intel Corporation
   */
  
  #ifndef _ICE_ADMINQ_CMD_H_
 diff --git a/drivers/net/ice/base/ice_alloc.h b/drivers/net/ice/base/ice_alloc.h
-index 2a192f6136..cfe9199403 100644
+index cf823a2c2a..cfe9199403 100644
 --- a/drivers/net/ice/base/ice_alloc.h
 +++ b/drivers/net/ice/base/ice_alloc.h
 @@ -1,5 +1,5 @@
  /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2001-2020
+- * Copyright(c) 2001-2019
 + * Copyright(c) 2001-2020 Intel Corporation
   */
  
  #ifndef _ICE_ALLOC_H_
 diff --git a/drivers/net/ice/base/ice_bitops.h b/drivers/net/ice/base/ice_bitops.h
-index 0643904db0..87f47b2386 100644
+index 32f64cac0c..0344437c9e 100644
 --- a/drivers/net/ice/base/ice_bitops.h
 +++ b/drivers/net/ice/base/ice_bitops.h
 @@ -1,5 +1,5 @@
  /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2001-2020
+- * Copyright(c) 2001-2019
 + * Copyright(c) 2001-2020 Intel Corporation
   */
  
  #ifndef _ICE_BITOPS_H_
 diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c
-index dc9e541974..17ffdee006 100644
+index 0dec997d87..77f68561e3 100644
 --- a/drivers/net/ice/base/ice_common.c
 +++ b/drivers/net/ice/base/ice_common.c
 @@ -1,5 +1,5 @@
  /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2001-2020
+- * Copyright(c) 2001-2019
 + * Copyright(c) 2001-2020 Intel Corporation
   */
  
  #include "ice_common.h"
 diff --git a/drivers/net/ice/base/ice_common.h b/drivers/net/ice/base/ice_common.h
-index 9ca1f75e9c..2a1077b90f 100644
+index c73184499f..63b733d74f 100644
 --- a/drivers/net/ice/base/ice_common.h
 +++ b/drivers/net/ice/base/ice_common.h
 @@ -1,5 +1,5 @@
  /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2001-2020
+- * Copyright(c) 2001-2019
 + * Copyright(c) 2001-2020 Intel Corporation
   */
  
  #ifndef _ICE_COMMON_H_
 diff --git a/drivers/net/ice/base/ice_controlq.c b/drivers/net/ice/base/ice_controlq.c
-index 41c8c7e058..47dde2f7cb 100644
+index 8a65fae40e..feffb51987 100644
 --- a/drivers/net/ice/base/ice_controlq.c
 +++ b/drivers/net/ice/base/ice_controlq.c
 @@ -1,5 +1,5 @@
  /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2001-2020
+- * Copyright(c) 2001-2019
 + * Copyright(c) 2001-2020 Intel Corporation
   */
  
  #include "ice_common.h"
 diff --git a/drivers/net/ice/base/ice_controlq.h b/drivers/net/ice/base/ice_controlq.h
-index f47fd43468..e5e0001788 100644
+index 8b60465474..423d171141 100644
 --- a/drivers/net/ice/base/ice_controlq.h
 +++ b/drivers/net/ice/base/ice_controlq.h
 @@ -1,5 +1,5 @@
  /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2001-2020
+- * Copyright(c) 2001-2019
 + * Copyright(c) 2001-2020 Intel Corporation
   */
  
  #ifndef _ICE_CONTROLQ_H_
 diff --git a/drivers/net/ice/base/ice_dcb.c b/drivers/net/ice/base/ice_dcb.c
-index b238b966c7..50634a1454 100644
+index 7048dbd02f..8918188193 100644
 --- a/drivers/net/ice/base/ice_dcb.c
 +++ b/drivers/net/ice/base/ice_dcb.c
 @@ -1,5 +1,5 @@
  /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2001-2020
+- * Copyright(c) 2001-2019
 + * Copyright(c) 2001-2020 Intel Corporation
   */
  
  #include "ice_common.h"
 diff --git a/drivers/net/ice/base/ice_dcb.h b/drivers/net/ice/base/ice_dcb.h
-index fda7150c65..3ffeb864cc 100644
+index 9a0968f5b8..3ffeb864cc 100644
 --- a/drivers/net/ice/base/ice_dcb.h
 +++ b/drivers/net/ice/base/ice_dcb.h
 @@ -1,5 +1,5 @@
  /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2001-2020
+- * Copyright(c) 2001-2019
 + * Copyright(c) 2001-2020 Intel Corporation
   */
  
  #ifndef _ICE_DCB_H_
 diff --git a/drivers/net/ice/base/ice_devids.h b/drivers/net/ice/base/ice_devids.h
-index 21cc915a5d..e396f445af 100644
+index 348d1907a4..8f778d918c 100644
 --- a/drivers/net/ice/base/ice_devids.h
 +++ b/drivers/net/ice/base/ice_devids.h
 @@ -1,5 +1,5 @@
  /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2001-2020
+- * Copyright(c) 2001-2019
 + * Copyright(c) 2001-2020 Intel Corporation
   */
  
  #ifndef _ICE_DEVIDS_H_
 diff --git a/drivers/net/ice/base/ice_fdir.c b/drivers/net/ice/base/ice_fdir.c
-index f899641537..4e9aafc391 100644
+index 8e5aef8a38..033f6ccb4e 100644
 --- a/drivers/net/ice/base/ice_fdir.c
 +++ b/drivers/net/ice/base/ice_fdir.c
 @@ -1,5 +1,5 @@
  /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2001-2020
+- * Copyright(c) 2001-2019
 + * Copyright(c) 2001-2020 Intel Corporation
   */
  
  #include "ice_common.h"
 diff --git a/drivers/net/ice/base/ice_fdir.h b/drivers/net/ice/base/ice_fdir.h
-index e52104e9a0..18656c55f1 100644
+index 5b37705844..2cb7291eb1 100644
 --- a/drivers/net/ice/base/ice_fdir.h
 +++ b/drivers/net/ice/base/ice_fdir.h
 @@ -1,5 +1,5 @@
  /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2001-2020
+- * Copyright(c) 2001-2019
 + * Copyright(c) 2001-2020 Intel Corporation
   */
  
  #ifndef _ICE_FDIR_H_
 diff --git a/drivers/net/ice/base/ice_flex_pipe.c b/drivers/net/ice/base/ice_flex_pipe.c
-index de14d9d9d2..512ced6b8e 100644
+index 0de1e1b239..47adfd07a3 100644
 --- a/drivers/net/ice/base/ice_flex_pipe.c
 +++ b/drivers/net/ice/base/ice_flex_pipe.c
 @@ -1,5 +1,5 @@
  /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2001-2020
+- * Copyright(c) 2001-2019
 + * Copyright(c) 2001-2020 Intel Corporation
   */
  
  #include "ice_common.h"
 diff --git a/drivers/net/ice/base/ice_flex_pipe.h b/drivers/net/ice/base/ice_flex_pipe.h
-index 72225ac4b2..214c7a2837 100644
+index 80793b1ccd..10f328b652 100644
 --- a/drivers/net/ice/base/ice_flex_pipe.h
 +++ b/drivers/net/ice/base/ice_flex_pipe.h
 @@ -1,5 +1,5 @@
  /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2001-2020
+- * Copyright(c) 2001-2019
 + * Copyright(c) 2001-2020 Intel Corporation
   */
  
  #ifndef _ICE_FLEX_PIPE_H_
 diff --git a/drivers/net/ice/base/ice_flex_type.h b/drivers/net/ice/base/ice_flex_type.h
-index 4e4ba4deb0..b58007fb3f 100644
+index 1be98ea521..7708ced40a 100644
 --- a/drivers/net/ice/base/ice_flex_type.h
 +++ b/drivers/net/ice/base/ice_flex_type.h
 @@ -1,5 +1,5 @@
  /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2001-2020
+- * Copyright(c) 2001-2019
 + * Copyright(c) 2001-2020 Intel Corporation
   */
  
  #ifndef _ICE_FLEX_TYPE_H_
 diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c
-index c876377ed1..08e646b04e 100644
+index 1fbb8ee1a7..c3a31374ea 100644
 --- a/drivers/net/ice/base/ice_flow.c
 +++ b/drivers/net/ice/base/ice_flow.c
 @@ -1,5 +1,5 @@
  /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2001-2020
+- * Copyright(c) 2001-2019
 + * Copyright(c) 2001-2020 Intel Corporation
   */
  
  #include "ice_common.h"
 diff --git a/drivers/net/ice/base/ice_flow.h b/drivers/net/ice/base/ice_flow.h
-index 37f1c76aea..3897d8b884 100644
+index 19f3ee7642..94a3801c9a 100644
 --- a/drivers/net/ice/base/ice_flow.h
 +++ b/drivers/net/ice/base/ice_flow.h
 @@ -1,5 +1,5 @@
  /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2001-2020
+- * Copyright(c) 2001-2019
 + * Copyright(c) 2001-2020 Intel Corporation
   */
  
  #ifndef _ICE_FLOW_H_
 diff --git a/drivers/net/ice/base/ice_hw_autogen.h b/drivers/net/ice/base/ice_hw_autogen.h
-index 6b92d3ce9c..1c9c84dfb4 100644
+index 92d432044d..1c9c84dfb4 100644
 --- a/drivers/net/ice/base/ice_hw_autogen.h
 +++ b/drivers/net/ice/base/ice_hw_autogen.h
 @@ -1,5 +1,5 @@
  /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2001-2020
+- * Copyright(c) 2001-2019
 + * Copyright(c) 2001-2020 Intel Corporation
   */
  
  /* Machine-generated file; do not edit */
 diff --git a/drivers/net/ice/base/ice_lan_tx_rx.h b/drivers/net/ice/base/ice_lan_tx_rx.h
-index d904385cb6..a0e284a8d9 100644
+index a97c63cc97..51e30848f8 100644
 --- a/drivers/net/ice/base/ice_lan_tx_rx.h
 +++ b/drivers/net/ice/base/ice_lan_tx_rx.h
 @@ -1,5 +1,5 @@
  /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2001-2020
+- * Copyright(c) 2001-2019
 + * Copyright(c) 2001-2020 Intel Corporation
   */
  
  #ifndef _ICE_LAN_TX_RX_H_
 diff --git a/drivers/net/ice/base/ice_nvm.c b/drivers/net/ice/base/ice_nvm.c
-index 1bbd6e2090..d5e6215de2 100644
+index 1dbfc2dcc7..434258b14c 100644
 --- a/drivers/net/ice/base/ice_nvm.c
 +++ b/drivers/net/ice/base/ice_nvm.c
 @@ -1,5 +1,5 @@
  /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2001-2020
+- * Copyright(c) 2001-2019
 + * Copyright(c) 2001-2020 Intel Corporation
   */
  
  #include "ice_common.h"
 diff --git a/drivers/net/ice/base/ice_nvm.h b/drivers/net/ice/base/ice_nvm.h
-index e5f8888e3a..9a61d41534 100644
+index d5b7b2d196..8624d19b19 100644
 --- a/drivers/net/ice/base/ice_nvm.h
 +++ b/drivers/net/ice/base/ice_nvm.h
 @@ -1,5 +1,5 @@
  /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2001-2020
+- * Copyright(c) 2001-2019
 + * Copyright(c) 2001-2020 Intel Corporation
   */
  
  #ifndef _ICE_NVM_H_
 diff --git a/drivers/net/ice/base/ice_osdep.h b/drivers/net/ice/base/ice_osdep.h
-index c70f5f8a7e..921332fcd8 100644
+index 7310cd0a27..32ac8ac397 100644
 --- a/drivers/net/ice/base/ice_osdep.h
 +++ b/drivers/net/ice/base/ice_osdep.h
 @@ -1,5 +1,5 @@
@@ -343,95 +308,95 @@
  
  #ifndef _ICE_OSDEP_H_
 diff --git a/drivers/net/ice/base/ice_protocol_type.h b/drivers/net/ice/base/ice_protocol_type.h
-index 46cd77e68b..b6884a6359 100644
+index fdcbb2cad3..cbc7c37016 100644
 --- a/drivers/net/ice/base/ice_protocol_type.h
 +++ b/drivers/net/ice/base/ice_protocol_type.h
 @@ -1,5 +1,5 @@
  /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2001-2020
+- * Copyright(c) 2001-2019
 + * Copyright(c) 2001-2020 Intel Corporation
   */
  
  #ifndef _ICE_PROTOCOL_TYPE_H_
 diff --git a/drivers/net/ice/base/ice_sbq_cmd.h b/drivers/net/ice/base/ice_sbq_cmd.h
-index 937b76d18f..22bfcebc3c 100644
+index 70a019292a..22bfcebc3c 100644
 --- a/drivers/net/ice/base/ice_sbq_cmd.h
 +++ b/drivers/net/ice/base/ice_sbq_cmd.h
 @@ -1,5 +1,5 @@
  /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2001-2020
+- * Copyright(c) 2001-2019
 + * Copyright(c) 2001-2020 Intel Corporation
   */
  
  #ifndef _ICE_SBQ_CMD_H_
 diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c
-index 1dd563e5e5..af42fadfe0 100644
+index 26c4ba36f1..0d2c64e33d 100644
 --- a/drivers/net/ice/base/ice_sched.c
 +++ b/drivers/net/ice/base/ice_sched.c
 @@ -1,5 +1,5 @@
  /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2001-2020
+- * Copyright(c) 2001-2019
 + * Copyright(c) 2001-2020 Intel Corporation
   */
  
  #include "ice_sched.h"
 diff --git a/drivers/net/ice/base/ice_sched.h b/drivers/net/ice/base/ice_sched.h
-index 77c22e1962..57bf4b59d6 100644
+index 1a8549931f..57bf4b59d6 100644
 --- a/drivers/net/ice/base/ice_sched.h
 +++ b/drivers/net/ice/base/ice_sched.h
 @@ -1,5 +1,5 @@
  /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2001-2020
+- * Copyright(c) 2001-2019
 + * Copyright(c) 2001-2020 Intel Corporation
   */
  
  #ifndef _ICE_SCHED_H_
 diff --git a/drivers/net/ice/base/ice_status.h b/drivers/net/ice/base/ice_status.h
-index 446702f9ae..3ca1b5db71 100644
+index ac120fa300..ba28895a17 100644
 --- a/drivers/net/ice/base/ice_status.h
 +++ b/drivers/net/ice/base/ice_status.h
 @@ -1,5 +1,5 @@
  /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2001-2020
+- * Copyright(c) 2001-2019
 + * Copyright(c) 2001-2020 Intel Corporation
   */
  
  #ifndef _ICE_STATUS_H_
 diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
-index 17fbd26dae..5666850e74 100644
+index 944d98522b..34d0a164ed 100644
 --- a/drivers/net/ice/base/ice_switch.c
 +++ b/drivers/net/ice/base/ice_switch.c
 @@ -1,5 +1,5 @@
  /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2001-2020
+- * Copyright(c) 2001-2019
 + * Copyright(c) 2001-2020 Intel Corporation
   */
  
  #include "ice_switch.h"
 diff --git a/drivers/net/ice/base/ice_switch.h b/drivers/net/ice/base/ice_switch.h
-index 6bb742d2fd..6bd50518f7 100644
+index 61083738ab..5dc795148e 100644
 --- a/drivers/net/ice/base/ice_switch.h
 +++ b/drivers/net/ice/base/ice_switch.h
 @@ -1,5 +1,5 @@
  /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2001-2020
+- * Copyright(c) 2001-2019
 + * Copyright(c) 2001-2020 Intel Corporation
   */
  
  #ifndef _ICE_SWITCH_H_
 diff --git a/drivers/net/ice/base/ice_type.h b/drivers/net/ice/base/ice_type.h
-index da2b3548df..94ea442656 100644
+index 8b29e519d8..bf3c5ffd0a 100644
 --- a/drivers/net/ice/base/ice_type.h
 +++ b/drivers/net/ice/base/ice_type.h
 @@ -1,5 +1,5 @@
  /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2001-2020
+- * Copyright(c) 2001-2019
 + * Copyright(c) 2001-2020 Intel Corporation
   */
  
  #ifndef _ICE_TYPE_H_
 diff --git a/drivers/net/ice/base/meson.build b/drivers/net/ice/base/meson.build
-index 100630c5f1..22963ce31d 100644
+index eff155574d..46c4ffb500 100644
 --- a/drivers/net/ice/base/meson.build
 +++ b/drivers/net/ice/base/meson.build
 @@ -1,5 +1,5 @@

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'pci: accept 32-bit domain numbers' has been queued to stable release 19.11.3
  2020-05-22  9:39     ` [dpdk-stable] patch 'event/dsw: fix enqueue burst return value' " luca.boccassi
                         ` (30 preceding siblings ...)
  2020-05-22  9:40       ` [dpdk-stable] patch 'net/ice/base: " luca.boccassi
@ 2020-05-22  9:40       ` luca.boccassi
  2020-05-22  9:40       ` [dpdk-stable] patch 'pci: reject negative values in PCI id' " luca.boccassi
                         ` (9 subsequent siblings)
  41 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-22  9:40 UTC (permalink / raw)
  To: Darek Stojaczyk; +Cc: Gaetan Rivet, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/24/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From c4d58cd40cf7d8114ccdda5f62999b4a8c52d32f Mon Sep 17 00:00:00 2001
From: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Date: Tue, 12 May 2020 15:30:57 +0200
Subject: [PATCH] pci: accept 32-bit domain numbers

[ upstream commit 26cfc20feddd9fc5b87842d4c9bda6b9453e2c46 ]

The parsing code was bailing on domains greater than UINT16_MAX,
but domain numbers like that are still valid and present on some systems.
One example is Intel VMD (Volume Management Device), which acts somewhat
as a software-managed PCI switch and its upstream linux driver assigns
all downstream devices a PCI domain of 0x10000.

Parsing a BDF like 10000:01:00.0 was failing before. To fix it, increase
the upper limit of domain number to UINT32_MAX. This matches the size of
struct rte_pci_addr->domain (uint32).

Fixes: af75078fece3 ("first public release")

Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Acked-by: Gaetan Rivet <grive@u256.net>
---
 lib/librte_pci/rte_pci.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_pci/rte_pci.c b/lib/librte_pci/rte_pci.c
index d1ab6b414d..ad2cdfebb2 100644
--- a/lib/librte_pci/rte_pci.c
+++ b/lib/librte_pci/rte_pci.c
@@ -72,9 +72,9 @@ pci_dbdf_parse(const char *input, struct rte_pci_addr *dev_addr)
 
 	errno = 0;
 	val = strtoul(in, &end, 16);
-	if (errno != 0 || end[0] != ':' || val > UINT16_MAX)
+	if (errno != 0 || end[0] != ':' || val > UINT32_MAX)
 		return -EINVAL;
-	dev_addr->domain = (uint16_t)val;
+	dev_addr->domain = (uint32_t)val;
 	in = end + 1;
 	in = get_u8_pciaddr_field(in, &dev_addr->bus, ':');
 	if (in == NULL)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-22 10:37:40.562013852 +0100
+++ 0033-pci-accept-32-bit-domain-numbers.patch	2020-05-22 10:37:39.240414721 +0100
@@ -1,8 +1,10 @@
-From 26cfc20feddd9fc5b87842d4c9bda6b9453e2c46 Mon Sep 17 00:00:00 2001
+From c4d58cd40cf7d8114ccdda5f62999b4a8c52d32f Mon Sep 17 00:00:00 2001
 From: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
 Date: Tue, 12 May 2020 15:30:57 +0200
 Subject: [PATCH] pci: accept 32-bit domain numbers
 
+[ upstream commit 26cfc20feddd9fc5b87842d4c9bda6b9453e2c46 ]
+
 The parsing code was bailing on domains greater than UINT16_MAX,
 but domain numbers like that are still valid and present on some systems.
 One example is Intel VMD (Volume Management Device), which acts somewhat
@@ -14,7 +16,6 @@
 struct rte_pci_addr->domain (uint32).
 
 Fixes: af75078fece3 ("first public release")
-Cc: stable@dpdk.org
 
 Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
 Acked-by: Gaetan Rivet <grive@u256.net>

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'pci: reject negative values in PCI id' has been queued to stable release 19.11.3
  2020-05-22  9:39     ` [dpdk-stable] patch 'event/dsw: fix enqueue burst return value' " luca.boccassi
                         ` (31 preceding siblings ...)
  2020-05-22  9:40       ` [dpdk-stable] patch 'pci: accept 32-bit domain numbers' " luca.boccassi
@ 2020-05-22  9:40       ` luca.boccassi
  2020-05-22  9:40       ` [dpdk-stable] patch 'doc: fix typos in ABI policy' " luca.boccassi
                         ` (8 subsequent siblings)
  41 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-22  9:40 UTC (permalink / raw)
  To: Gaetan Rivet; +Cc: Darek Stojaczyk, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/24/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From a7413810b94b89763b3af7ba97a9a91f17737732 Mon Sep 17 00:00:00 2001
From: Gaetan Rivet <grive@u256.net>
Date: Wed, 13 May 2020 12:47:50 +0200
Subject: [PATCH] pci: reject negative values in PCI id

[ upstream commit 21a61fae51804cfdf7c6f7e6189c63f02025de89 ]

The function strtoul will not return ERANGE if the input is negative, as
one might expect.

   0000:-FFFFFFFFFFFFFFFB:00.0

is not a better way to write 0000:05:00.0.
To simplify checking for '-', forbid using spaces before the field value.

   0000: 00:   2c.0

Should not be accepted.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Gaetan Rivet <grive@u256.net>
Acked-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
---
 lib/librte_pci/rte_pci.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/lib/librte_pci/rte_pci.c b/lib/librte_pci/rte_pci.c
index ad2cdfebb2..5f7726fa89 100644
--- a/lib/librte_pci/rte_pci.c
+++ b/lib/librte_pci/rte_pci.c
@@ -35,6 +35,12 @@ get_u8_pciaddr_field(const char *in, void *_u8, char dlm)
 	if (*in == '\0')
 		return NULL;
 
+	/* PCI field starting with spaces is forbidden.
+	 * Negative wrap-around is not reported as an error by strtoul.
+	 */
+	if (*in == ' ' || *in == '-')
+		return NULL;
+
 	errno = 0;
 	val = strtoul(in, &end, 16);
 	if (errno != 0 || end[0] != dlm || val > UINT8_MAX) {
@@ -70,6 +76,12 @@ pci_dbdf_parse(const char *input, struct rte_pci_addr *dev_addr)
 	unsigned long val;
 	char *end;
 
+	/* PCI id starting with spaces is forbidden.
+	 * Negative wrap-around is not reported as an error by strtoul.
+	 */
+	if (*in == ' ' || *in == '-')
+		return -EINVAL;
+
 	errno = 0;
 	val = strtoul(in, &end, 16);
 	if (errno != 0 || end[0] != ':' || val > UINT32_MAX)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-22 10:37:40.590667334 +0100
+++ 0034-pci-reject-negative-values-in-PCI-id.patch	2020-05-22 10:37:39.240414721 +0100
@@ -1,8 +1,10 @@
-From 21a61fae51804cfdf7c6f7e6189c63f02025de89 Mon Sep 17 00:00:00 2001
+From a7413810b94b89763b3af7ba97a9a91f17737732 Mon Sep 17 00:00:00 2001
 From: Gaetan Rivet <grive@u256.net>
 Date: Wed, 13 May 2020 12:47:50 +0200
 Subject: [PATCH] pci: reject negative values in PCI id
 
+[ upstream commit 21a61fae51804cfdf7c6f7e6189c63f02025de89 ]
+
 The function strtoul will not return ERANGE if the input is negative, as
 one might expect.
 
@@ -16,7 +18,6 @@
 Should not be accepted.
 
 Fixes: af75078fece3 ("first public release")
-Cc: stable@dpdk.org
 
 Signed-off-by: Gaetan Rivet <grive@u256.net>
 Acked-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'doc: fix typos in ABI policy' has been queued to stable release 19.11.3
  2020-05-22  9:39     ` [dpdk-stable] patch 'event/dsw: fix enqueue burst return value' " luca.boccassi
                         ` (32 preceding siblings ...)
  2020-05-22  9:40       ` [dpdk-stable] patch 'pci: reject negative values in PCI id' " luca.boccassi
@ 2020-05-22  9:40       ` luca.boccassi
  2020-05-22  9:40       ` [dpdk-stable] patch 'kvargs: fix strcmp helper documentation' " luca.boccassi
                         ` (7 subsequent siblings)
  41 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-22  9:40 UTC (permalink / raw)
  To: Gaetan Rivet; +Cc: Ray Kinsella, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/24/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 0b45ef6e391e82585f9fb7dc50fc5a52ab769347 Mon Sep 17 00:00:00 2001
From: Gaetan Rivet <grive@u256.net>
Date: Wed, 13 May 2020 12:43:01 +0200
Subject: [PATCH] doc: fix typos in ABI policy

[ upstream commit ec5c0f80e8c6894269d9a8a467f9f0ffb769a313 ]

Some errors in the document:

  * API instead of ABI once.

Some typos:

  * __rte_depreciated instead of __rte_deprecated.
  * missing ```` around value.
  * inconsistent reference to major ABI version, most
    of the time described without the minor appended, except once.

Verbosity and grammar:

  * Long sentences that would be better cut short.
  * Comma abuse.
  * 'May' used where 'can' seems more fitting.

I'm not a native speaker though, so grain of salt applies.

Fixes: fdf7471cccb8 ("doc: introduce major ABI versions")

Signed-off-by: Gaetan Rivet <grive@u256.net>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
---
 doc/guides/contributing/abi_policy.rst | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/doc/guides/contributing/abi_policy.rst b/doc/guides/contributing/abi_policy.rst
index 05ca95980b..2198519d9b 100644
--- a/doc/guides/contributing/abi_policy.rst
+++ b/doc/guides/contributing/abi_policy.rst
@@ -220,19 +220,18 @@ Examples of ABI Changes
 The following are examples of allowable ABI changes occurring between
 declarations of major ABI versions.
 
-* DPDK 19.11 release, defines the function ``rte_foo()``, and ``rte_foo()``
-  as part of the major ABI version ``20``.
+* DPDK 19.11 release defines the function ``rte_foo()`` ; ``rte_foo()``
+  is part of the major ABI version ``20``.
 
-* DPDK 20.02 release defines a new function ``rte_foo(uint8_t bar)``, and
-  this is not a problem as long as the symbol ``rte_foo@DPDK20`` is
+* DPDK 20.02 release defines a new function ``rte_foo(uint8_t bar)``.
+  This is not a problem as long as the symbol ``rte_foo@DPDK20`` is
   preserved through :ref:`abi_versioning`.
 
   - The new function may be marked with the ``__rte_experimental`` tag for a
     number of releases, as described in the section :ref:`experimental_apis`.
 
-  - Once ``rte_foo(uint8_t bar)`` becomes non-experimental ``rte_foo()`` is then
-    declared as ``__rte_depreciated``, with an associated deprecation notice
-    provided.
+  - Once ``rte_foo(uint8_t bar)`` becomes non-experimental, ``rte_foo()`` is
+    declared as ``__rte_deprecated`` and an deprecation notice is provided.
 
 * DPDK 19.11 is not re-released to include ``rte_foo(uint8_t bar)``, the new
   version of ``rte_foo`` only exists from DPDK 20.02 onwards as described in the
@@ -242,13 +241,13 @@ declarations of major ABI versions.
   rte_baz()``. This function may or may not exist in the DPDK 20.05 release.
 
 * An application ``dPacket`` wishes to use ``rte_foo(uint8_t bar)``, before the
-  declaration of the DPDK ``21`` major API version. The application can only
+  declaration of the DPDK ``21`` major ABI version. The application can only
   ensure its runtime dependencies are met by specifying ``DPDK (>= 20.2)`` as
-  an explicit package dependency, as the soname only may only indicate the
+  an explicit package dependency, as the soname can only indicate the
   supported major ABI version.
 
 * At the release of DPDK 20.11, the function ``rte_foo(uint8_t bar)`` becomes
-  formally part of then new major ABI version DPDK 21.0 and ``rte_foo()`` may be
+  formally part of then new major ABI version DPDK ``21`` and ``rte_foo()`` may be
   removed.
 
 .. _deprecation_notices:
@@ -322,6 +321,6 @@ Libraries
 
 Libraries marked as ``experimental`` are entirely not considered part of an ABI
 version, and may change without warning at any time. Experimental libraries
-always have a major version of ``0`` to indicate they exist outside of
+always have a major ABI version of ``0`` to indicate they exist outside of
 :ref:`abi_versioning` , with the minor version incremented with each ABI change
 to library.
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-22 10:37:40.620187250 +0100
+++ 0035-doc-fix-typos-in-ABI-policy.patch	2020-05-22 10:37:39.240414721 +0100
@@ -1,8 +1,10 @@
-From ec5c0f80e8c6894269d9a8a467f9f0ffb769a313 Mon Sep 17 00:00:00 2001
+From 0b45ef6e391e82585f9fb7dc50fc5a52ab769347 Mon Sep 17 00:00:00 2001
 From: Gaetan Rivet <grive@u256.net>
 Date: Wed, 13 May 2020 12:43:01 +0200
 Subject: [PATCH] doc: fix typos in ABI policy
 
+[ upstream commit ec5c0f80e8c6894269d9a8a467f9f0ffb769a313 ]
+
 Some errors in the document:
 
   * API instead of ABI once.
@@ -23,7 +25,6 @@
 I'm not a native speaker though, so grain of salt applies.
 
 Fixes: fdf7471cccb8 ("doc: introduce major ABI versions")
-Cc: stable@dpdk.org
 
 Signed-off-by: Gaetan Rivet <grive@u256.net>
 Acked-by: Ray Kinsella <mdr@ashroe.eu>
@@ -32,10 +33,10 @@
  1 file changed, 10 insertions(+), 11 deletions(-)
 
 diff --git a/doc/guides/contributing/abi_policy.rst b/doc/guides/contributing/abi_policy.rst
-index b921928689..ee17ccb200 100644
+index 05ca95980b..2198519d9b 100644
 --- a/doc/guides/contributing/abi_policy.rst
 +++ b/doc/guides/contributing/abi_policy.rst
-@@ -226,19 +226,18 @@ Examples of ABI Changes
+@@ -220,19 +220,18 @@ Examples of ABI Changes
  The following are examples of allowable ABI changes occurring between
  declarations of major ABI versions.
  
@@ -61,7 +62,7 @@
  
  * DPDK 19.11 is not re-released to include ``rte_foo(uint8_t bar)``, the new
    version of ``rte_foo`` only exists from DPDK 20.02 onwards as described in the
-@@ -248,13 +247,13 @@ declarations of major ABI versions.
+@@ -242,13 +241,13 @@ declarations of major ABI versions.
    rte_baz()``. This function may or may not exist in the DPDK 20.05 release.
  
  * An application ``dPacket`` wishes to use ``rte_foo(uint8_t bar)``, before the
@@ -78,7 +79,7 @@
    removed.
  
  .. _deprecation_notices:
-@@ -333,6 +332,6 @@ Libraries
+@@ -322,6 +321,6 @@ Libraries
  
  Libraries marked as ``experimental`` are entirely not considered part of an ABI
  version, and may change without warning at any time. Experimental libraries

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'kvargs: fix strcmp helper documentation' has been queued to stable release 19.11.3
  2020-05-22  9:39     ` [dpdk-stable] patch 'event/dsw: fix enqueue burst return value' " luca.boccassi
                         ` (33 preceding siblings ...)
  2020-05-22  9:40       ` [dpdk-stable] patch 'doc: fix typos in ABI policy' " luca.boccassi
@ 2020-05-22  9:40       ` luca.boccassi
  2020-05-22  9:40       ` [dpdk-stable] patch 'mempool/dpaa2: install missing header with meson' " luca.boccassi
                         ` (6 subsequent siblings)
  41 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-22  9:40 UTC (permalink / raw)
  To: Gaetan Rivet; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/24/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From fd2cc33835c58a0b9edf8bd468c48ef2bbfe726a Mon Sep 17 00:00:00 2001
From: Gaetan Rivet <grive@u256.net>
Date: Wed, 13 May 2020 12:42:29 +0200
Subject: [PATCH] kvargs: fix strcmp helper documentation

[ upstream commit e90b9c52f8affc46ba41266ecdfe29bddaf62b0e ]

Minor error, "unless" was used instead of "unlike".

Fixes: a3b85476c51e ("kvargs: add generic string matching callback")

Signed-off-by: Gaetan Rivet <grive@u256.net>
---
 lib/librte_kvargs/rte_kvargs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_kvargs/rte_kvargs.h b/lib/librte_kvargs/rte_kvargs.h
index 1946195de4..eff598e08b 100644
--- a/lib/librte_kvargs/rte_kvargs.h
+++ b/lib/librte_kvargs/rte_kvargs.h
@@ -171,7 +171,7 @@ unsigned rte_kvargs_count(const struct rte_kvargs *kvlist,
  *   0 if the strings match.
  *   !0 otherwise or on error.
  *
- *   Unless strcmp, comparison ordering is not kept.
+ *   Unlike strcmp, comparison ordering is not kept.
  *   In order for rte_kvargs_process to stop processing on match error,
  *   a negative value is returned even if strcmp had returned a positive one.
  */
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-22 10:37:40.649375155 +0100
+++ 0036-kvargs-fix-strcmp-helper-documentation.patch	2020-05-22 10:37:39.240414721 +0100
@@ -1,12 +1,13 @@
-From e90b9c52f8affc46ba41266ecdfe29bddaf62b0e Mon Sep 17 00:00:00 2001
+From fd2cc33835c58a0b9edf8bd468c48ef2bbfe726a Mon Sep 17 00:00:00 2001
 From: Gaetan Rivet <grive@u256.net>
 Date: Wed, 13 May 2020 12:42:29 +0200
 Subject: [PATCH] kvargs: fix strcmp helper documentation
 
+[ upstream commit e90b9c52f8affc46ba41266ecdfe29bddaf62b0e ]
+
 Minor error, "unless" was used instead of "unlike".
 
 Fixes: a3b85476c51e ("kvargs: add generic string matching callback")
-Cc: stable@dpdk.org
 
 Signed-off-by: Gaetan Rivet <grive@u256.net>
 ---

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'mempool/dpaa2: install missing header with meson' has been queued to stable release 19.11.3
  2020-05-22  9:39     ` [dpdk-stable] patch 'event/dsw: fix enqueue burst return value' " luca.boccassi
                         ` (34 preceding siblings ...)
  2020-05-22  9:40       ` [dpdk-stable] patch 'kvargs: fix strcmp helper documentation' " luca.boccassi
@ 2020-05-22  9:40       ` luca.boccassi
  2020-05-22  9:40       ` [dpdk-stable] patch 'fix same typo in multiple places' " luca.boccassi
                         ` (5 subsequent siblings)
  41 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-22  9:40 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: Ray Kinsella, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/24/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From c85044909a812def4bcce482aded51c0da10fa7b Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Fri, 15 May 2020 15:17:47 +0530
Subject: [PATCH] mempool/dpaa2: install missing header with meson

[ upstream commit a95e588c07518356725ca1f30189262e3d1b1593 ]

rte_dpaa2_mempool.h header was missed to be added in meson.build
for header installation.

Fixes: 7ed359909556 ("mempool/dpaa2: add functions for CMDIF")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
---
 drivers/mempool/dpaa2/meson.build | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/mempool/dpaa2/meson.build b/drivers/mempool/dpaa2/meson.build
index d79fc31644..a4fe684fc4 100644
--- a/drivers/mempool/dpaa2/meson.build
+++ b/drivers/mempool/dpaa2/meson.build
@@ -9,5 +9,7 @@ endif
 deps += ['bus_fslmc']
 sources = files('dpaa2_hw_mempool.c')
 
+install_headers('rte_dpaa2_mempool.h')
+
 # depends on fslmc bus which uses experimental API
 allow_experimental_apis = true
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-22 10:37:40.677474280 +0100
+++ 0037-mempool-dpaa2-install-missing-header-with-meson.patch	2020-05-22 10:37:39.240414721 +0100
@@ -1,13 +1,14 @@
-From a95e588c07518356725ca1f30189262e3d1b1593 Mon Sep 17 00:00:00 2001
+From c85044909a812def4bcce482aded51c0da10fa7b Mon Sep 17 00:00:00 2001
 From: Hemant Agrawal <hemant.agrawal@nxp.com>
 Date: Fri, 15 May 2020 15:17:47 +0530
 Subject: [PATCH] mempool/dpaa2: install missing header with meson
 
+[ upstream commit a95e588c07518356725ca1f30189262e3d1b1593 ]
+
 rte_dpaa2_mempool.h header was missed to be added in meson.build
 for header installation.
 
 Fixes: 7ed359909556 ("mempool/dpaa2: add functions for CMDIF")
-Cc: stable@dpdk.org
 
 Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
 Acked-by: Ray Kinsella <mdr@ashroe.eu>
@@ -16,15 +17,17 @@
  1 file changed, 2 insertions(+)
 
 diff --git a/drivers/mempool/dpaa2/meson.build b/drivers/mempool/dpaa2/meson.build
-index df299a0456..c3f479afa1 100644
+index d79fc31644..a4fe684fc4 100644
 --- a/drivers/mempool/dpaa2/meson.build
 +++ b/drivers/mempool/dpaa2/meson.build
-@@ -8,3 +8,5 @@ endif
- 
+@@ -9,5 +9,7 @@ endif
  deps += ['bus_fslmc']
  sources = files('dpaa2_hw_mempool.c')
-+
+ 
 +install_headers('rte_dpaa2_mempool.h')
++
+ # depends on fslmc bus which uses experimental API
+ allow_experimental_apis = true
 -- 
 2.20.1
 

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'fix same typo in multiple places' has been queued to stable release 19.11.3
  2020-05-22  9:39     ` [dpdk-stable] patch 'event/dsw: fix enqueue burst return value' " luca.boccassi
                         ` (35 preceding siblings ...)
  2020-05-22  9:40       ` [dpdk-stable] patch 'mempool/dpaa2: install missing header with meson' " luca.boccassi
@ 2020-05-22  9:40       ` luca.boccassi
  2020-05-22  9:40       ` [dpdk-stable] patch 'examples/kni: fix MTU change to setup Tx queue' " luca.boccassi
                         ` (4 subsequent siblings)
  41 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-22  9:40 UTC (permalink / raw)
  To: Muhammad Bilal; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/24/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 4b369799c7d9e78003386f49786f6347db8dccf3 Mon Sep 17 00:00:00 2001
From: Muhammad Bilal <m.bilal@emumba.com>
Date: Fri, 15 May 2020 21:50:54 +0500
Subject: [PATCH] fix same typo in multiple places

[ upstream commit 5a448a55b4bb39720a42d9a186ed35dd6515e980 ]

Removed the typing error in doc/guides/eventdevs/index.rst,
drivers/net/mlx5/mlx5.c and in lib/librte_vhost/rte_vhost.h

Bugzilla ID: 477
Fixes: 0857b9421138 ("doc: add event device and software eventdev")
Fixes: 039253166a57 ("vhost: add device op when notification to guest is sent")
Fixes: ad74bc619504 ("net/mlx5: support multiport IB device during probing")

Signed-off-by: Muhammad Bilal <m.bilal@emumba.com>
---
 doc/guides/eventdevs/index.rst | 2 +-
 drivers/net/mlx5/mlx5.c        | 2 +-
 lib/librte_vhost/rte_vhost.h   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/doc/guides/eventdevs/index.rst b/doc/guides/eventdevs/index.rst
index 570905b813..bb66a5eacc 100644
--- a/doc/guides/eventdevs/index.rst
+++ b/doc/guides/eventdevs/index.rst
@@ -5,7 +5,7 @@ Event Device Drivers
 ====================
 
 The following are a list of event device PMDs, which can be used from an
-application trough the eventdev API.
+application through the eventdev API.
 
 .. toctree::
     :maxdepth: 2
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 2349a62674..9161114978 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -3109,7 +3109,7 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 		/*
 		 * Single IB device with multiple ports found,
 		 * it may be E-Switch master device and representors.
-		 * We have to perform identification trough the ports.
+		 * We have to perform identification through the ports.
 		 */
 		assert(nl_rdma >= 0);
 		assert(ns == 0);
diff --git a/lib/librte_vhost/rte_vhost.h b/lib/librte_vhost/rte_vhost.h
index ad6e717026..532ee0dec7 100644
--- a/lib/librte_vhost/rte_vhost.h
+++ b/lib/librte_vhost/rte_vhost.h
@@ -258,7 +258,7 @@ struct vhost_device_ops {
 
 	/**
 	 * This callback gets called each time a guest gets notified
-	 * about waiting packets. This is the interrupt handling trough
+	 * about waiting packets. This is the interrupt handling through
 	 * the eventfd_write(callfd), which can be used for counting these
 	 * "slow" syscalls.
 	 */
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-22 10:37:40.707630540 +0100
+++ 0038-fix-same-typo-in-multiple-places.patch	2020-05-22 10:37:39.244414793 +0100
@@ -1,8 +1,10 @@
-From 5a448a55b4bb39720a42d9a186ed35dd6515e980 Mon Sep 17 00:00:00 2001
+From 4b369799c7d9e78003386f49786f6347db8dccf3 Mon Sep 17 00:00:00 2001
 From: Muhammad Bilal <m.bilal@emumba.com>
 Date: Fri, 15 May 2020 21:50:54 +0500
 Subject: [PATCH] fix same typo in multiple places
 
+[ upstream commit 5a448a55b4bb39720a42d9a186ed35dd6515e980 ]
+
 Removed the typing error in doc/guides/eventdevs/index.rst,
 drivers/net/mlx5/mlx5.c and in lib/librte_vhost/rte_vhost.h
 
@@ -10,7 +12,6 @@
 Fixes: 0857b9421138 ("doc: add event device and software eventdev")
 Fixes: 039253166a57 ("vhost: add device op when notification to guest is sent")
 Fixes: ad74bc619504 ("net/mlx5: support multiport IB device during probing")
-Cc: stable@dpdk.org
 
 Signed-off-by: Muhammad Bilal <m.bilal@emumba.com>
 ---
@@ -33,23 +34,23 @@
  .. toctree::
      :maxdepth: 2
 diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
-index ab4adecdc3..5589772eb8 100644
+index 2349a62674..9161114978 100644
 --- a/drivers/net/mlx5/mlx5.c
 +++ b/drivers/net/mlx5/mlx5.c
-@@ -3374,7 +3374,7 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
+@@ -3109,7 +3109,7 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
  		/*
  		 * Single IB device with multiple ports found,
  		 * it may be E-Switch master device and representors.
 -		 * We have to perform identification trough the ports.
 +		 * We have to perform identification through the ports.
  		 */
- 		MLX5_ASSERT(nl_rdma >= 0);
- 		MLX5_ASSERT(ns == 0);
+ 		assert(nl_rdma >= 0);
+ 		assert(ns == 0);
 diff --git a/lib/librte_vhost/rte_vhost.h b/lib/librte_vhost/rte_vhost.h
-index 5c72fba797..d43669f2c2 100644
+index ad6e717026..532ee0dec7 100644
 --- a/lib/librte_vhost/rte_vhost.h
 +++ b/lib/librte_vhost/rte_vhost.h
-@@ -259,7 +259,7 @@ struct vhost_device_ops {
+@@ -258,7 +258,7 @@ struct vhost_device_ops {
  
  	/**
  	 * This callback gets called each time a guest gets notified

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'examples/kni: fix MTU change to setup Tx queue' has been queued to stable release 19.11.3
  2020-05-22  9:39     ` [dpdk-stable] patch 'event/dsw: fix enqueue burst return value' " luca.boccassi
                         ` (36 preceding siblings ...)
  2020-05-22  9:40       ` [dpdk-stable] patch 'fix same typo in multiple places' " luca.boccassi
@ 2020-05-22  9:40       ` luca.boccassi
  2020-05-22  9:40       ` [dpdk-stable] patch 'net/i40e: fix wild pointer' " luca.boccassi
                         ` (3 subsequent siblings)
  41 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-22  9:40 UTC (permalink / raw)
  To: Rasesh Mody; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/24/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 3af38347316ba0ff4312ecf52601998e6214f0ca Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rmody@marvell.com>
Date: Wed, 13 May 2020 21:09:38 -0700
Subject: [PATCH] examples/kni: fix MTU change to setup Tx queue

[ upstream commit a26b116749a38db09223cfbb18f4c349f2bbae8e ]

This patch adds a fix to setup Tx queue when changing KNI interface MTU.
It ensures device can safely start txq post MTU change operation.

Fixes: fc9ee41b7016 ("examples/kni: convert to new ethdev offloads API")

Signed-off-by: Rasesh Mody <rmody@marvell.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 examples/kni/main.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/examples/kni/main.c b/examples/kni/main.c
index f867f5fc9b..b2866238fd 100644
--- a/examples/kni/main.c
+++ b/examples/kni/main.c
@@ -770,9 +770,11 @@ kni_change_mtu(uint16_t port_id, unsigned int new_mtu)
 {
 	int ret;
 	uint16_t nb_rxd = NB_RXD;
+	uint16_t nb_txd = NB_TXD;
 	struct rte_eth_conf conf;
 	struct rte_eth_dev_info dev_info;
 	struct rte_eth_rxconf rxq_conf;
+	struct rte_eth_txconf txq_conf;
 
 	if (!rte_eth_dev_is_valid_port(port_id)) {
 		RTE_LOG(ERR, APP, "Invalid port id %d\n", port_id);
@@ -800,7 +802,7 @@ kni_change_mtu(uint16_t port_id, unsigned int new_mtu)
 		return ret;
 	}
 
-	ret = rte_eth_dev_adjust_nb_rx_tx_desc(port_id, &nb_rxd, NULL);
+	ret = rte_eth_dev_adjust_nb_rx_tx_desc(port_id, &nb_rxd, &nb_txd);
 	if (ret < 0)
 		rte_exit(EXIT_FAILURE, "Could not adjust number of descriptors "
 				"for port%u (%d)\n", (unsigned int)port_id,
@@ -825,6 +827,16 @@ kni_change_mtu(uint16_t port_id, unsigned int new_mtu)
 		return ret;
 	}
 
+	txq_conf = dev_info.default_txconf;
+	txq_conf.offloads = conf.txmode.offloads;
+	ret = rte_eth_tx_queue_setup(port_id, 0, nb_txd,
+		rte_eth_dev_socket_id(port_id), &txq_conf);
+	if (ret < 0) {
+		RTE_LOG(ERR, APP, "Fail to setup Tx queue of port %d\n",
+				port_id);
+		return ret;
+	}
+
 	/* Restart specific port */
 	ret = rte_eth_dev_start(port_id);
 	if (ret < 0) {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-22 10:37:40.744721585 +0100
+++ 0039-examples-kni-fix-MTU-change-to-setup-Tx-queue.patch	2020-05-22 10:37:39.248414865 +0100
@@ -1,13 +1,14 @@
-From a26b116749a38db09223cfbb18f4c349f2bbae8e Mon Sep 17 00:00:00 2001
+From 3af38347316ba0ff4312ecf52601998e6214f0ca Mon Sep 17 00:00:00 2001
 From: Rasesh Mody <rmody@marvell.com>
 Date: Wed, 13 May 2020 21:09:38 -0700
 Subject: [PATCH] examples/kni: fix MTU change to setup Tx queue
 
+[ upstream commit a26b116749a38db09223cfbb18f4c349f2bbae8e ]
+
 This patch adds a fix to setup Tx queue when changing KNI interface MTU.
 It ensures device can safely start txq post MTU change operation.
 
 Fixes: fc9ee41b7016 ("examples/kni: convert to new ethdev offloads API")
-Cc: stable@dpdk.org
 
 Signed-off-by: Rasesh Mody <rmody@marvell.com>
 Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -16,10 +17,10 @@
  1 file changed, 13 insertions(+), 1 deletion(-)
 
 diff --git a/examples/kni/main.c b/examples/kni/main.c
-index 6b4ab3b5b5..7a927a50c0 100644
+index f867f5fc9b..b2866238fd 100644
 --- a/examples/kni/main.c
 +++ b/examples/kni/main.c
-@@ -774,9 +774,11 @@ kni_change_mtu(uint16_t port_id, unsigned int new_mtu)
+@@ -770,9 +770,11 @@ kni_change_mtu(uint16_t port_id, unsigned int new_mtu)
  {
  	int ret;
  	uint16_t nb_rxd = NB_RXD;
@@ -31,7 +32,7 @@
  
  	if (!rte_eth_dev_is_valid_port(port_id)) {
  		RTE_LOG(ERR, APP, "Invalid port id %d\n", port_id);
-@@ -804,7 +806,7 @@ kni_change_mtu(uint16_t port_id, unsigned int new_mtu)
+@@ -800,7 +802,7 @@ kni_change_mtu(uint16_t port_id, unsigned int new_mtu)
  		return ret;
  	}
  
@@ -40,7 +41,7 @@
  	if (ret < 0)
  		rte_exit(EXIT_FAILURE, "Could not adjust number of descriptors "
  				"for port%u (%d)\n", (unsigned int)port_id,
-@@ -829,6 +831,16 @@ kni_change_mtu(uint16_t port_id, unsigned int new_mtu)
+@@ -825,6 +827,16 @@ kni_change_mtu(uint16_t port_id, unsigned int new_mtu)
  		return ret;
  	}
  

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/i40e: fix wild pointer' has been queued to stable release 19.11.3
  2020-05-22  9:39     ` [dpdk-stable] patch 'event/dsw: fix enqueue burst return value' " luca.boccassi
                         ` (37 preceding siblings ...)
  2020-05-22  9:40       ` [dpdk-stable] patch 'examples/kni: fix MTU change to setup Tx queue' " luca.boccassi
@ 2020-05-22  9:40       ` luca.boccassi
  2020-05-22  9:40       ` [dpdk-stable] patch 'net/ice: fix RSS for GTPU' " luca.boccassi
                         ` (2 subsequent siblings)
  41 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-22  9:40 UTC (permalink / raw)
  To: Wei Zhao; +Cc: Jeff Guo, Xiaolong Ye, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/24/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From f956486556f0181bb3eb819f6afad42e08b9dcd7 Mon Sep 17 00:00:00 2001
From: Wei Zhao <wei.zhao1@intel.com>
Date: Mon, 18 May 2020 16:00:51 +0800
Subject: [PATCH] net/i40e: fix wild pointer

[ upstream commit b342fd9084cf99292f0077e16b0edb3b6b79f6e7 ]

In i40e PMD code of function i40e_res_pool_free(), if valid_entry
is freed by "rte_free(valid_entry);" in the code, then the following
code for pool update may still use the wild pointer "valid_entry"
for pool info update. It seems has the risk of core dump for
using wild pointer operation, we should avoid this risk.

Fixes: 4861cde46116 ("i40e: new poll mode driver")

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Reviewed-by: Jeff Guo <jia.guo@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 55ba606f85..430e347073 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -4927,6 +4927,7 @@ i40e_res_pool_free(struct i40e_res_pool_info *pool,
 {
 	struct pool_entry *entry, *next, *prev, *valid_entry = NULL;
 	uint32_t pool_offset;
+	uint16_t len;
 	int insert;
 
 	if (pool == NULL) {
@@ -4965,12 +4966,13 @@ i40e_res_pool_free(struct i40e_res_pool_info *pool,
 	}
 
 	insert = 0;
+	len = valid_entry->len;
 	/* Try to merge with next one*/
 	if (next != NULL) {
 		/* Merge with next one */
-		if (valid_entry->base + valid_entry->len == next->base) {
+		if (valid_entry->base + len == next->base) {
 			next->base = valid_entry->base;
-			next->len += valid_entry->len;
+			next->len += len;
 			rte_free(valid_entry);
 			valid_entry = next;
 			insert = 1;
@@ -4980,13 +4982,15 @@ i40e_res_pool_free(struct i40e_res_pool_info *pool,
 	if (prev != NULL) {
 		/* Merge with previous one */
 		if (prev->base + prev->len == valid_entry->base) {
-			prev->len += valid_entry->len;
+			prev->len += len;
 			/* If it merge with next one, remove next node */
 			if (insert == 1) {
 				LIST_REMOVE(valid_entry, next);
 				rte_free(valid_entry);
+				valid_entry = NULL;
 			} else {
 				rte_free(valid_entry);
+				valid_entry = NULL;
 				insert = 1;
 			}
 		}
@@ -5002,8 +5006,8 @@ i40e_res_pool_free(struct i40e_res_pool_info *pool,
 			LIST_INSERT_HEAD(&pool->free_list, valid_entry, next);
 	}
 
-	pool->num_free += valid_entry->len;
-	pool->num_alloc -= valid_entry->len;
+	pool->num_free += len;
+	pool->num_alloc -= len;
 
 	return 0;
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-22 10:37:40.776407803 +0100
+++ 0040-net-i40e-fix-wild-pointer.patch	2020-05-22 10:37:39.256415008 +0100
@@ -1,8 +1,10 @@
-From b342fd9084cf99292f0077e16b0edb3b6b79f6e7 Mon Sep 17 00:00:00 2001
+From f956486556f0181bb3eb819f6afad42e08b9dcd7 Mon Sep 17 00:00:00 2001
 From: Wei Zhao <wei.zhao1@intel.com>
 Date: Mon, 18 May 2020 16:00:51 +0800
 Subject: [PATCH] net/i40e: fix wild pointer
 
+[ upstream commit b342fd9084cf99292f0077e16b0edb3b6b79f6e7 ]
+
 In i40e PMD code of function i40e_res_pool_free(), if valid_entry
 is freed by "rte_free(valid_entry);" in the code, then the following
 code for pool update may still use the wild pointer "valid_entry"
@@ -10,7 +12,6 @@
 using wild pointer operation, we should avoid this risk.
 
 Fixes: 4861cde46116 ("i40e: new poll mode driver")
-Cc: stable@dpdk.org
 
 Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
 Reviewed-by: Jeff Guo <jia.guo@intel.com>
@@ -20,10 +21,10 @@
  1 file changed, 9 insertions(+), 5 deletions(-)
 
 diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
-index 91dcd0ebf0..c68fba125e 100644
+index 55ba606f85..430e347073 100644
 --- a/drivers/net/i40e/i40e_ethdev.c
 +++ b/drivers/net/i40e/i40e_ethdev.c
-@@ -4935,6 +4935,7 @@ i40e_res_pool_free(struct i40e_res_pool_info *pool,
+@@ -4927,6 +4927,7 @@ i40e_res_pool_free(struct i40e_res_pool_info *pool,
  {
  	struct pool_entry *entry, *next, *prev, *valid_entry = NULL;
  	uint32_t pool_offset;
@@ -31,7 +32,7 @@
  	int insert;
  
  	if (pool == NULL) {
-@@ -4973,12 +4974,13 @@ i40e_res_pool_free(struct i40e_res_pool_info *pool,
+@@ -4965,12 +4966,13 @@ i40e_res_pool_free(struct i40e_res_pool_info *pool,
  	}
  
  	insert = 0;
@@ -47,7 +48,7 @@
  			rte_free(valid_entry);
  			valid_entry = next;
  			insert = 1;
-@@ -4988,13 +4990,15 @@ i40e_res_pool_free(struct i40e_res_pool_info *pool,
+@@ -4980,13 +4982,15 @@ i40e_res_pool_free(struct i40e_res_pool_info *pool,
  	if (prev != NULL) {
  		/* Merge with previous one */
  		if (prev->base + prev->len == valid_entry->base) {
@@ -64,7 +65,7 @@
  				insert = 1;
  			}
  		}
-@@ -5010,8 +5014,8 @@ i40e_res_pool_free(struct i40e_res_pool_info *pool,
+@@ -5002,8 +5006,8 @@ i40e_res_pool_free(struct i40e_res_pool_info *pool,
  			LIST_INSERT_HEAD(&pool->free_list, valid_entry, next);
  	}
  

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/ice: fix RSS for GTPU' has been queued to stable release 19.11.3
  2020-05-22  9:39     ` [dpdk-stable] patch 'event/dsw: fix enqueue burst return value' " luca.boccassi
                         ` (38 preceding siblings ...)
  2020-05-22  9:40       ` [dpdk-stable] patch 'net/i40e: fix wild pointer' " luca.boccassi
@ 2020-05-22  9:40       ` luca.boccassi
  2020-05-22  9:40       ` [dpdk-stable] patch 'net/i40e: fix queue related exception handling' " luca.boccassi
  2020-05-22  9:40       ` [dpdk-stable] patch 'vhost: fix zero-copy server mode' " luca.boccassi
  41 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-22  9:40 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Qiming Yang, Simei Su, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/24/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 69516f9e3f5a7e764c294fda1c2ada65755170db Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Wed, 13 May 2020 20:11:44 +0800
Subject: [PATCH] net/ice: fix RSS for GTPU

[ upstream commit 31fc9249c7212e3a6333f45110145b19432b1c1c ]

All supported pattern for GTPU include extend header:
pattern_eth_ipv4_gtpu_eh_ipv4
pattern_eth_ipv4_gtpu_eh_ipv4_udp
pattern_eth_ipv4_gtpu_eh_ipv4_tcp

So the RSS rule should only take effect on GTPU packet that contains
extend header. The patch fix above issue and also allow inner l4 port
as input set.

Fixes: c08a72c79c7f ("net/ice: fix pattern name of GTPU with extension header")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
Tested-by: Simei Su <simei.su@intel.com>
---
 drivers/net/ice/base/ice_flow.c | 42 +++++++++++++++++++++++----------
 drivers/net/ice/base/ice_flow.h |  1 +
 drivers/net/ice/ice_hash.c      | 10 +++++---
 3 files changed, 38 insertions(+), 15 deletions(-)

diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c
index c3a31374ea..9d58d284f3 100644
--- a/drivers/net/ice/base/ice_flow.c
+++ b/drivers/net/ice/base/ice_flow.c
@@ -548,11 +548,41 @@ ice_flow_proc_seg_hdrs(struct ice_flow_prof_params *params)
 				(const ice_bitmap_t *)ice_ptypes_ipv4_il;
 			ice_and_bitmap(params->ptypes, params->ptypes, src,
 				       ICE_FLOW_PTYPE_MAX);
+			if (hdrs & ICE_FLOW_SEG_HDR_UDP) {
+				src = (const ice_bitmap_t *)ice_ptypes_udp_il;
+				ice_and_bitmap(params->ptypes,
+						params->ptypes, src,
+					       ICE_FLOW_PTYPE_MAX);
+			} else if (hdrs & ICE_FLOW_SEG_HDR_TCP) {
+				ice_and_bitmap(params->ptypes, params->ptypes,
+					       (const ice_bitmap_t *)
+					       ice_ptypes_tcp_il,
+					       ICE_FLOW_PTYPE_MAX);
+			} else if (hdrs & ICE_FLOW_SEG_HDR_SCTP) {
+				src = (const ice_bitmap_t *)ice_ptypes_sctp_il;
+				ice_and_bitmap(params->ptypes, params->ptypes,
+					       src, ICE_FLOW_PTYPE_MAX);
+			}
 		} else if (hdrs & ICE_FLOW_SEG_HDR_IPV6) {
 			src = !i ? (const ice_bitmap_t *)ice_ptypes_ipv6_ofos :
 				(const ice_bitmap_t *)ice_ptypes_ipv6_il;
 			ice_and_bitmap(params->ptypes, params->ptypes, src,
 				       ICE_FLOW_PTYPE_MAX);
+			if (hdrs & ICE_FLOW_SEG_HDR_UDP) {
+				src = (const ice_bitmap_t *)ice_ptypes_udp_il;
+				ice_and_bitmap(params->ptypes,
+						params->ptypes, src,
+					       ICE_FLOW_PTYPE_MAX);
+			} else if (hdrs & ICE_FLOW_SEG_HDR_TCP) {
+				ice_and_bitmap(params->ptypes, params->ptypes,
+					       (const ice_bitmap_t *)
+					       ice_ptypes_tcp_il,
+					       ICE_FLOW_PTYPE_MAX);
+			} else if (hdrs & ICE_FLOW_SEG_HDR_SCTP) {
+				src = (const ice_bitmap_t *)ice_ptypes_sctp_il;
+				ice_and_bitmap(params->ptypes, params->ptypes,
+					       src, ICE_FLOW_PTYPE_MAX);
+			}
 		}
 
 		if (hdrs & ICE_FLOW_SEG_HDR_ICMP) {
@@ -560,18 +590,6 @@ ice_flow_proc_seg_hdrs(struct ice_flow_prof_params *params)
 				(const ice_bitmap_t *)ice_ptypes_icmp_il;
 			ice_and_bitmap(params->ptypes, params->ptypes, src,
 				       ICE_FLOW_PTYPE_MAX);
-		} else if (hdrs & ICE_FLOW_SEG_HDR_UDP) {
-			src = (const ice_bitmap_t *)ice_ptypes_udp_il;
-			ice_and_bitmap(params->ptypes, params->ptypes, src,
-				       ICE_FLOW_PTYPE_MAX);
-		} else if (hdrs & ICE_FLOW_SEG_HDR_TCP) {
-			ice_and_bitmap(params->ptypes, params->ptypes,
-				       (const ice_bitmap_t *)ice_ptypes_tcp_il,
-				       ICE_FLOW_PTYPE_MAX);
-		} else if (hdrs & ICE_FLOW_SEG_HDR_SCTP) {
-			src = (const ice_bitmap_t *)ice_ptypes_sctp_il;
-			ice_and_bitmap(params->ptypes, params->ptypes, src,
-				       ICE_FLOW_PTYPE_MAX);
 		} else if (hdrs & ICE_FLOW_SEG_HDR_GRE) {
 			if (!i) {
 				src = (const ice_bitmap_t *)ice_ptypes_gre_of;
diff --git a/drivers/net/ice/base/ice_flow.h b/drivers/net/ice/base/ice_flow.h
index 94a3801c9a..9b314a1eaa 100644
--- a/drivers/net/ice/base/ice_flow.h
+++ b/drivers/net/ice/base/ice_flow.h
@@ -118,6 +118,7 @@ enum ice_flow_seg_hdr {
  * ICE_FLOW_SEG_HDR_GTPU_UP           1              1
  */
 #define ICE_FLOW_SEG_HDR_GTPU (ICE_FLOW_SEG_HDR_GTPU_IP | \
+			       ICE_FLOW_SEG_HDR_GTPU_EH | \
 			       ICE_FLOW_SEG_HDR_GTPU_DWN | \
 			       ICE_FLOW_SEG_HDR_GTPU_UP)
 
diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
index 0fdd4d68d4..23c455762b 100644
--- a/drivers/net/ice/ice_hash.c
+++ b/drivers/net/ice/ice_hash.c
@@ -95,7 +95,7 @@ struct rss_type_match_hdr hint_7 = {
 struct rss_type_match_hdr hint_8 = {
 	ICE_FLOW_SEG_HDR_IPV6 | ICE_FLOW_SEG_HDR_SCTP, ETH_RSS_NONFRAG_IPV6_SCTP};
 struct rss_type_match_hdr hint_9 = {
-	ICE_FLOW_SEG_HDR_GTPU_IP,	ETH_RSS_IPV4};
+	ICE_FLOW_SEG_HDR_GTPU_EH, ETH_RSS_IPV4};
 struct rss_type_match_hdr hint_10 = {
 	ICE_FLOW_SEG_HDR_PPPOE,	ETH_RSS_IPV4};
 struct rss_type_match_hdr hint_11 = {
@@ -104,6 +104,10 @@ struct rss_type_match_hdr hint_12 = {
 	ICE_FLOW_SEG_HDR_PPPOE,	ETH_RSS_NONFRAG_IPV4_TCP};
 struct rss_type_match_hdr hint_13 = {
 	ICE_FLOW_SEG_HDR_PPPOE,	ETH_RSS_NONFRAG_IPV4_SCTP};
+struct rss_type_match_hdr hint_14 = {
+	ICE_FLOW_SEG_HDR_GTPU_EH, ETH_RSS_NONFRAG_IPV4_UDP};
+struct rss_type_match_hdr hint_15 = {
+	ICE_FLOW_SEG_HDR_GTPU_EH, ETH_RSS_NONFRAG_IPV4_TCP};
 
 /* Supported pattern for os default package. */
 static struct ice_pattern_match_item ice_hash_pattern_list_os[] = {
@@ -130,8 +134,8 @@ static struct ice_pattern_match_item ice_hash_pattern_list_comms[] = {
 	{pattern_eth_ipv6_sctp,		    ICE_INSET_NONE,  &hint_8},
 	{pattern_empty,			    ICE_INSET_NONE,  &hint_0},
 	{pattern_eth_ipv4_gtpu_eh_ipv4,	    ICE_INSET_NONE,  &hint_9},
-	{pattern_eth_ipv4_gtpu_eh_ipv4_udp, ICE_INSET_NONE,  &hint_9},
-	{pattern_eth_ipv4_gtpu_eh_ipv4_tcp, ICE_INSET_NONE,  &hint_9},
+	{pattern_eth_ipv4_gtpu_eh_ipv4_udp, ICE_INSET_NONE,  &hint_14},
+	{pattern_eth_ipv4_gtpu_eh_ipv4_tcp, ICE_INSET_NONE,  &hint_15},
 	{pattern_eth_pppoes_ipv4,	    ICE_INSET_NONE,  &hint_10},
 	{pattern_eth_pppoes_ipv4_udp,	    ICE_INSET_NONE,  &hint_11},
 	{pattern_eth_pppoes_ipv4_tcp,	    ICE_INSET_NONE,  &hint_12},
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-22 10:37:40.823041199 +0100
+++ 0041-net-ice-fix-RSS-for-GTPU.patch	2020-05-22 10:37:39.260415080 +0100
@@ -1,8 +1,10 @@
-From 31fc9249c7212e3a6333f45110145b19432b1c1c Mon Sep 17 00:00:00 2001
+From 69516f9e3f5a7e764c294fda1c2ada65755170db Mon Sep 17 00:00:00 2001
 From: Qi Zhang <qi.z.zhang@intel.com>
 Date: Wed, 13 May 2020 20:11:44 +0800
 Subject: [PATCH] net/ice: fix RSS for GTPU
 
+[ upstream commit 31fc9249c7212e3a6333f45110145b19432b1c1c ]
+
 All supported pattern for GTPU include extend header:
 pattern_eth_ipv4_gtpu_eh_ipv4
 pattern_eth_ipv4_gtpu_eh_ipv4_udp
@@ -13,7 +15,6 @@
 as input set.
 
 Fixes: c08a72c79c7f ("net/ice: fix pattern name of GTPU with extension header")
-Cc: stable@dpdk.org
 
 Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
 Acked-by: Qiming Yang <qiming.yang@intel.com>
@@ -25,10 +26,10 @@
  3 files changed, 38 insertions(+), 15 deletions(-)
 
 diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c
-index 08e646b04e..e741f59400 100644
+index c3a31374ea..9d58d284f3 100644
 --- a/drivers/net/ice/base/ice_flow.c
 +++ b/drivers/net/ice/base/ice_flow.c
-@@ -694,11 +694,41 @@ ice_flow_proc_seg_hdrs(struct ice_flow_prof_params *params)
+@@ -548,11 +548,41 @@ ice_flow_proc_seg_hdrs(struct ice_flow_prof_params *params)
  				(const ice_bitmap_t *)ice_ptypes_ipv4_il;
  			ice_and_bitmap(params->ptypes, params->ptypes, src,
  				       ICE_FLOW_PTYPE_MAX);
@@ -70,7 +71,7 @@
  		}
  
  		if (hdrs & ICE_FLOW_SEG_HDR_ICMP) {
-@@ -706,18 +736,6 @@ ice_flow_proc_seg_hdrs(struct ice_flow_prof_params *params)
+@@ -560,18 +590,6 @@ ice_flow_proc_seg_hdrs(struct ice_flow_prof_params *params)
  				(const ice_bitmap_t *)ice_ptypes_icmp_il;
  			ice_and_bitmap(params->ptypes, params->ptypes, src,
  				       ICE_FLOW_PTYPE_MAX);
@@ -90,19 +91,19 @@
  			if (!i) {
  				src = (const ice_bitmap_t *)ice_ptypes_gre_of;
 diff --git a/drivers/net/ice/base/ice_flow.h b/drivers/net/ice/base/ice_flow.h
-index 3897d8b884..c8a0483e38 100644
+index 94a3801c9a..9b314a1eaa 100644
 --- a/drivers/net/ice/base/ice_flow.h
 +++ b/drivers/net/ice/base/ice_flow.h
-@@ -160,6 +160,7 @@ enum ice_flow_seg_hdr {
+@@ -118,6 +118,7 @@ enum ice_flow_seg_hdr {
   * ICE_FLOW_SEG_HDR_GTPU_UP           1              1
   */
  #define ICE_FLOW_SEG_HDR_GTPU (ICE_FLOW_SEG_HDR_GTPU_IP | \
 +			       ICE_FLOW_SEG_HDR_GTPU_EH | \
  			       ICE_FLOW_SEG_HDR_GTPU_DWN | \
  			       ICE_FLOW_SEG_HDR_GTPU_UP)
- #define ICE_FLOW_SEG_HDR_PFCP (ICE_FLOW_SEG_HDR_PFCP_NODE | \
+ 
 diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
-index 72c8ddc9a8..11435cbfbe 100644
+index 0fdd4d68d4..23c455762b 100644
 --- a/drivers/net/ice/ice_hash.c
 +++ b/drivers/net/ice/ice_hash.c
 @@ -95,7 +95,7 @@ struct rss_type_match_hdr hint_7 = {

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/i40e: fix queue related exception handling' has been queued to stable release 19.11.3
  2020-05-22  9:39     ` [dpdk-stable] patch 'event/dsw: fix enqueue burst return value' " luca.boccassi
                         ` (39 preceding siblings ...)
  2020-05-22  9:40       ` [dpdk-stable] patch 'net/ice: fix RSS for GTPU' " luca.boccassi
@ 2020-05-22  9:40       ` luca.boccassi
  2020-05-22  9:40       ` [dpdk-stable] patch 'vhost: fix zero-copy server mode' " luca.boccassi
  41 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-22  9:40 UTC (permalink / raw)
  To: Qiming Yang; +Cc: Xiaolong Ye, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/24/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 3ddb8f1d078dcbe197aa6afba46fefad839c2653 Mon Sep 17 00:00:00 2001
From: Qiming Yang <qiming.yang@intel.com>
Date: Mon, 18 May 2020 13:45:53 +0800
Subject: [PATCH] net/i40e: fix queue related exception handling

[ upstream commit 6cc330b709b0d0b72880d872edf7d13b95649566 ]

There should have different behavior in queue start fail and stop fail
case.  When queue start fail, all the next actions should be terminated
and then started queues should be cleared. But for queue stop stage, one
queue stop fail should not end other queues stop. This patch fixed that
issue in PF and VF.

Fixes: b6583ee40265 ("i40e: full VMDQ pools support")
Fixes: 3f6a696f1054 ("i40evf: queue start and stop")

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c    | 116 +++++++-----------------------
 drivers/net/i40e/i40e_ethdev_vf.c |   2 -
 drivers/net/i40e/i40e_rxtx.c      |  28 ++++++++
 3 files changed, 53 insertions(+), 93 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 430e347073..67a44e25f1 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -2272,6 +2272,7 @@ i40e_dev_start(struct rte_eth_dev *dev)
 	struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
 	uint32_t intr_vector = 0;
 	struct i40e_vsi *vsi;
+	uint16_t nb_rxq, nb_txq;
 
 	hw->adapter_stopped = 0;
 
@@ -2303,7 +2304,7 @@ i40e_dev_start(struct rte_eth_dev *dev)
 	ret = i40e_dev_rxtx_init(pf);
 	if (ret != I40E_SUCCESS) {
 		PMD_DRV_LOG(ERR, "Failed to init rx/tx queues");
-		goto err_up;
+		return ret;
 	}
 
 	/* Map queues with MSIX interrupt */
@@ -2328,10 +2329,16 @@ i40e_dev_start(struct rte_eth_dev *dev)
 	}
 
 	/* Enable all queues which have been configured */
-	ret = i40e_dev_switch_queues(pf, TRUE);
-	if (ret != I40E_SUCCESS) {
-		PMD_DRV_LOG(ERR, "Failed to enable VSI");
-		goto err_up;
+	for (nb_rxq = 0; nb_rxq < dev->data->nb_rx_queues; nb_rxq++) {
+		ret = i40e_dev_rx_queue_start(dev, nb_rxq);
+		if (ret)
+			goto rx_err;
+	}
+
+	for (nb_txq = 0; nb_txq < dev->data->nb_tx_queues; nb_txq++) {
+		ret = i40e_dev_tx_queue_start(dev, nb_txq);
+		if (ret)
+			goto tx_err;
 	}
 
 	/* Enable receiving broadcast packets */
@@ -2361,7 +2368,7 @@ i40e_dev_start(struct rte_eth_dev *dev)
 		ret = i40e_aq_set_lb_modes(hw, dev->data->dev_conf.lpbk_mode, NULL);
 		if (ret != I40E_SUCCESS) {
 			PMD_DRV_LOG(ERR, "fail to set loopback link");
-			goto err_up;
+			goto tx_err;
 		}
 	}
 
@@ -2369,7 +2376,7 @@ i40e_dev_start(struct rte_eth_dev *dev)
 	ret = i40e_apply_link_speed(dev);
 	if (I40E_SUCCESS != ret) {
 		PMD_DRV_LOG(ERR, "Fail to apply link setting");
-		goto err_up;
+		goto tx_err;
 	}
 
 	if (!rte_intr_allow_others(intr_handle)) {
@@ -2412,9 +2419,12 @@ i40e_dev_start(struct rte_eth_dev *dev)
 
 	return I40E_SUCCESS;
 
-err_up:
-	i40e_dev_switch_queues(pf, FALSE);
-	i40e_dev_clear_queues(dev);
+tx_err:
+	for (i = 0; i < nb_txq; i++)
+		i40e_dev_tx_queue_stop(dev, i);
+rx_err:
+	for (i = 0; i < nb_rxq; i++)
+		i40e_dev_rx_queue_stop(dev, i);
 
 	return ret;
 }
@@ -2438,7 +2448,11 @@ i40e_dev_stop(struct rte_eth_dev *dev)
 	}
 
 	/* Disable all queues */
-	i40e_dev_switch_queues(pf, FALSE);
+	for (i = 0; i < dev->data->nb_tx_queues; i++)
+		i40e_dev_tx_queue_stop(dev, i);
+
+	for (i = 0; i < dev->data->nb_rx_queues; i++)
+		i40e_dev_rx_queue_stop(dev, i);
 
 	/* un-map queues with interrupt registers */
 	i40e_vsi_disable_queues_intr(main_vsi);
@@ -6278,33 +6292,6 @@ i40e_switch_tx_queue(struct i40e_hw *hw, uint16_t q_idx, bool on)
 	return I40E_SUCCESS;
 }
 
-/* Swith on or off the tx queues */
-static int
-i40e_dev_switch_tx_queues(struct i40e_pf *pf, bool on)
-{
-	struct rte_eth_dev_data *dev_data = pf->dev_data;
-	struct i40e_tx_queue *txq;
-	struct rte_eth_dev *dev = pf->adapter->eth_dev;
-	uint16_t i;
-	int ret;
-
-	for (i = 0; i < dev_data->nb_tx_queues; i++) {
-		txq = dev_data->tx_queues[i];
-		/* Don't operate the queue if not configured or
-		 * if starting only per queue */
-		if (!txq || !txq->q_set || (on && txq->tx_deferred_start))
-			continue;
-		if (on)
-			ret = i40e_dev_tx_queue_start(dev, i);
-		else
-			ret = i40e_dev_tx_queue_stop(dev, i);
-		if ( ret != I40E_SUCCESS)
-			return ret;
-	}
-
-	return I40E_SUCCESS;
-}
-
 int
 i40e_switch_rx_queue(struct i40e_hw *hw, uint16_t q_idx, bool on)
 {
@@ -6356,59 +6343,6 @@ i40e_switch_rx_queue(struct i40e_hw *hw, uint16_t q_idx, bool on)
 
 	return I40E_SUCCESS;
 }
-/* Switch on or off the rx queues */
-static int
-i40e_dev_switch_rx_queues(struct i40e_pf *pf, bool on)
-{
-	struct rte_eth_dev_data *dev_data = pf->dev_data;
-	struct i40e_rx_queue *rxq;
-	struct rte_eth_dev *dev = pf->adapter->eth_dev;
-	uint16_t i;
-	int ret;
-
-	for (i = 0; i < dev_data->nb_rx_queues; i++) {
-		rxq = dev_data->rx_queues[i];
-		/* Don't operate the queue if not configured or
-		 * if starting only per queue */
-		if (!rxq || !rxq->q_set || (on && rxq->rx_deferred_start))
-			continue;
-		if (on)
-			ret = i40e_dev_rx_queue_start(dev, i);
-		else
-			ret = i40e_dev_rx_queue_stop(dev, i);
-		if (ret != I40E_SUCCESS)
-			return ret;
-	}
-
-	return I40E_SUCCESS;
-}
-
-/* Switch on or off all the rx/tx queues */
-int
-i40e_dev_switch_queues(struct i40e_pf *pf, bool on)
-{
-	int ret;
-
-	if (on) {
-		/* enable rx queues before enabling tx queues */
-		ret = i40e_dev_switch_rx_queues(pf, on);
-		if (ret) {
-			PMD_DRV_LOG(ERR, "Failed to switch rx queues");
-			return ret;
-		}
-		ret = i40e_dev_switch_tx_queues(pf, on);
-	} else {
-		/* Stop tx queues before stopping rx queues */
-		ret = i40e_dev_switch_tx_queues(pf, on);
-		if (ret) {
-			PMD_DRV_LOG(ERR, "Failed to switch tx queues");
-			return ret;
-		}
-		ret = i40e_dev_switch_rx_queues(pf, on);
-	}
-
-	return ret;
-}
 
 /* Initialize VSI for TX */
 static int
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 5dba0928b9..1f17649081 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -763,7 +763,6 @@ i40evf_stop_queues(struct rte_eth_dev *dev)
 	for (i = 0; i < dev->data->nb_tx_queues; i++) {
 		if (i40evf_dev_tx_queue_stop(dev, i) != 0) {
 			PMD_DRV_LOG(ERR, "Fail to stop queue %u", i);
-			return -1;
 		}
 	}
 
@@ -771,7 +770,6 @@ i40evf_stop_queues(struct rte_eth_dev *dev)
 	for (i = 0; i < dev->data->nb_rx_queues; i++) {
 		if (i40evf_dev_rx_queue_stop(dev, i) != 0) {
 			PMD_DRV_LOG(ERR, "Fail to stop queue %u", i);
-			return -1;
 		}
 	}
 
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 9a1eab4653..249d0c7976 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -1571,6 +1571,15 @@ i40e_dev_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 	PMD_INIT_FUNC_TRACE();
 
 	rxq = dev->data->rx_queues[rx_queue_id];
+	if (!rxq || !rxq->q_set) {
+		PMD_DRV_LOG(ERR, "RX queue %u not available or setup",
+			    rx_queue_id);
+		return -EINVAL;
+	}
+
+	if (rxq->rx_deferred_start)
+		PMD_DRV_LOG(WARNING, "RX queue %u is deferrd start",
+			    rx_queue_id);
 
 	err = i40e_alloc_rx_queue_mbufs(rxq);
 	if (err) {
@@ -1603,6 +1612,11 @@ i40e_dev_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 	struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 
 	rxq = dev->data->rx_queues[rx_queue_id];
+	if (!rxq || !rxq->q_set) {
+		PMD_DRV_LOG(ERR, "RX queue %u not available or setup",
+				rx_queue_id);
+		return -EINVAL;
+	}
 
 	/*
 	 * rx_queue_id is queue id application refers to, while
@@ -1631,6 +1645,15 @@ i40e_dev_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id)
 	PMD_INIT_FUNC_TRACE();
 
 	txq = dev->data->tx_queues[tx_queue_id];
+	if (!txq || !txq->q_set) {
+		PMD_DRV_LOG(ERR, "TX queue %u is not available or setup",
+			    tx_queue_id);
+		return -EINVAL;
+	}
+
+	if (txq->tx_deferred_start)
+		PMD_DRV_LOG(WARNING, "TX queue %u is deferrd start",
+			    tx_queue_id);
 
 	/*
 	 * tx_queue_id is queue id application refers to, while
@@ -1655,6 +1678,11 @@ i40e_dev_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id)
 	struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 
 	txq = dev->data->tx_queues[tx_queue_id];
+	if (!txq || !txq->q_set) {
+		PMD_DRV_LOG(ERR, "TX queue %u is not available or setup",
+			tx_queue_id);
+		return -EINVAL;
+	}
 
 	/*
 	 * tx_queue_id is queue id application refers to, while
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-22 10:37:40.859332553 +0100
+++ 0042-net-i40e-fix-queue-related-exception-handling.patch	2020-05-22 10:37:39.276415366 +0100
@@ -1,8 +1,10 @@
-From 6cc330b709b0d0b72880d872edf7d13b95649566 Mon Sep 17 00:00:00 2001
+From 3ddb8f1d078dcbe197aa6afba46fefad839c2653 Mon Sep 17 00:00:00 2001
 From: Qiming Yang <qiming.yang@intel.com>
 Date: Mon, 18 May 2020 13:45:53 +0800
 Subject: [PATCH] net/i40e: fix queue related exception handling
 
+[ upstream commit 6cc330b709b0d0b72880d872edf7d13b95649566 ]
+
 There should have different behavior in queue start fail and stop fail
 case.  When queue start fail, all the next actions should be terminated
 and then started queues should be cleared. But for queue stop stage, one
@@ -11,7 +13,6 @@
 
 Fixes: b6583ee40265 ("i40e: full VMDQ pools support")
 Fixes: 3f6a696f1054 ("i40evf: queue start and stop")
-Cc: stable@dpdk.org
 
 Signed-off-by: Qiming Yang <qiming.yang@intel.com>
 Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
@@ -22,10 +23,10 @@
  3 files changed, 53 insertions(+), 93 deletions(-)
 
 diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
-index c68fba125e..970a31cb2e 100644
+index 430e347073..67a44e25f1 100644
 --- a/drivers/net/i40e/i40e_ethdev.c
 +++ b/drivers/net/i40e/i40e_ethdev.c
-@@ -2280,6 +2280,7 @@ i40e_dev_start(struct rte_eth_dev *dev)
+@@ -2272,6 +2272,7 @@ i40e_dev_start(struct rte_eth_dev *dev)
  	struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
  	uint32_t intr_vector = 0;
  	struct i40e_vsi *vsi;
@@ -33,7 +34,7 @@
  
  	hw->adapter_stopped = 0;
  
-@@ -2311,7 +2312,7 @@ i40e_dev_start(struct rte_eth_dev *dev)
+@@ -2303,7 +2304,7 @@ i40e_dev_start(struct rte_eth_dev *dev)
  	ret = i40e_dev_rxtx_init(pf);
  	if (ret != I40E_SUCCESS) {
  		PMD_DRV_LOG(ERR, "Failed to init rx/tx queues");
@@ -42,7 +43,7 @@
  	}
  
  	/* Map queues with MSIX interrupt */
-@@ -2336,10 +2337,16 @@ i40e_dev_start(struct rte_eth_dev *dev)
+@@ -2328,10 +2329,16 @@ i40e_dev_start(struct rte_eth_dev *dev)
  	}
  
  	/* Enable all queues which have been configured */
@@ -63,7 +64,7 @@
  	}
  
  	/* Enable receiving broadcast packets */
-@@ -2369,7 +2376,7 @@ i40e_dev_start(struct rte_eth_dev *dev)
+@@ -2361,7 +2368,7 @@ i40e_dev_start(struct rte_eth_dev *dev)
  		ret = i40e_aq_set_lb_modes(hw, dev->data->dev_conf.lpbk_mode, NULL);
  		if (ret != I40E_SUCCESS) {
  			PMD_DRV_LOG(ERR, "fail to set loopback link");
@@ -72,7 +73,7 @@
  		}
  	}
  
-@@ -2377,7 +2384,7 @@ i40e_dev_start(struct rte_eth_dev *dev)
+@@ -2369,7 +2376,7 @@ i40e_dev_start(struct rte_eth_dev *dev)
  	ret = i40e_apply_link_speed(dev);
  	if (I40E_SUCCESS != ret) {
  		PMD_DRV_LOG(ERR, "Fail to apply link setting");
@@ -81,7 +82,7 @@
  	}
  
  	if (!rte_intr_allow_others(intr_handle)) {
-@@ -2420,9 +2427,12 @@ i40e_dev_start(struct rte_eth_dev *dev)
+@@ -2412,9 +2419,12 @@ i40e_dev_start(struct rte_eth_dev *dev)
  
  	return I40E_SUCCESS;
  
@@ -97,7 +98,7 @@
  
  	return ret;
  }
-@@ -2446,7 +2456,11 @@ i40e_dev_stop(struct rte_eth_dev *dev)
+@@ -2438,7 +2448,11 @@ i40e_dev_stop(struct rte_eth_dev *dev)
  	}
  
  	/* Disable all queues */
@@ -110,7 +111,7 @@
  
  	/* un-map queues with interrupt registers */
  	i40e_vsi_disable_queues_intr(main_vsi);
-@@ -6286,33 +6300,6 @@ i40e_switch_tx_queue(struct i40e_hw *hw, uint16_t q_idx, bool on)
+@@ -6278,33 +6292,6 @@ i40e_switch_tx_queue(struct i40e_hw *hw, uint16_t q_idx, bool on)
  	return I40E_SUCCESS;
  }
  
@@ -144,7 +145,7 @@
  int
  i40e_switch_rx_queue(struct i40e_hw *hw, uint16_t q_idx, bool on)
  {
-@@ -6364,59 +6351,6 @@ i40e_switch_rx_queue(struct i40e_hw *hw, uint16_t q_idx, bool on)
+@@ -6356,59 +6343,6 @@ i40e_switch_rx_queue(struct i40e_hw *hw, uint16_t q_idx, bool on)
  
  	return I40E_SUCCESS;
  }
@@ -205,10 +206,10 @@
  /* Initialize VSI for TX */
  static int
 diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
-index bb5d28a448..eca716a6a8 100644
+index 5dba0928b9..1f17649081 100644
 --- a/drivers/net/i40e/i40e_ethdev_vf.c
 +++ b/drivers/net/i40e/i40e_ethdev_vf.c
-@@ -789,7 +789,6 @@ i40evf_stop_queues(struct rte_eth_dev *dev)
+@@ -763,7 +763,6 @@ i40evf_stop_queues(struct rte_eth_dev *dev)
  	for (i = 0; i < dev->data->nb_tx_queues; i++) {
  		if (i40evf_dev_tx_queue_stop(dev, i) != 0) {
  			PMD_DRV_LOG(ERR, "Fail to stop queue %u", i);
@@ -216,7 +217,7 @@
  		}
  	}
  
-@@ -797,7 +796,6 @@ i40evf_stop_queues(struct rte_eth_dev *dev)
+@@ -771,7 +770,6 @@ i40evf_stop_queues(struct rte_eth_dev *dev)
  	for (i = 0; i < dev->data->nb_rx_queues; i++) {
  		if (i40evf_dev_rx_queue_stop(dev, i) != 0) {
  			PMD_DRV_LOG(ERR, "Fail to stop queue %u", i);
@@ -225,7 +226,7 @@
  	}
  
 diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
-index 5e7c86ed82..840b6f387f 100644
+index 9a1eab4653..249d0c7976 100644
 --- a/drivers/net/i40e/i40e_rxtx.c
 +++ b/drivers/net/i40e/i40e_rxtx.c
 @@ -1571,6 +1571,15 @@ i40e_dev_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'vhost: fix zero-copy server mode' has been queued to stable release 19.11.3
  2020-05-22  9:39     ` [dpdk-stable] patch 'event/dsw: fix enqueue burst return value' " luca.boccassi
                         ` (40 preceding siblings ...)
  2020-05-22  9:40       ` [dpdk-stable] patch 'net/i40e: fix queue related exception handling' " luca.boccassi
@ 2020-05-22  9:40       ` luca.boccassi
  2020-05-27  9:24         ` [dpdk-stable] patch 'net/mvpp2: fix build with gcc 10' " luca.boccassi
  41 siblings, 1 reply; 371+ messages in thread
From: luca.boccassi @ 2020-05-22  9:40 UTC (permalink / raw)
  To: Xuan Ding; +Cc: Xiaolong Ye, Yinan Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/24/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 1c2eaf9a985203f5c3b35a7f4d72f2e60db5e85d Mon Sep 17 00:00:00 2001
From: Xuan Ding <xuan.ding@intel.com>
Date: Tue, 19 May 2020 10:15:46 +0000
Subject: [PATCH] vhost: fix zero-copy server mode

[ upstream commit 22fa1bcbcbc7489304a711c39aea9a1593a873a5 ]

This patch fixes the situation where vhost-user cannot start as server
with dequeue_zero_copy enabled.

Using flag instead of vsocket->is_server to determine whether vhost-user
is in client mode. Because vsocket->is_server is not ready at this time.

Fixes: 715070ea10e6 ("vhost: prevent zero-copy with incompatible client mode")

Signed-off-by: Xuan Ding <xuan.ding@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
Tested-by: Yinan Wang <yinan.wang@intel.com>
---
 lib/librte_vhost/socket.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
index 8a87c38c4e..2461549fea 100644
--- a/lib/librte_vhost/socket.c
+++ b/lib/librte_vhost/socket.c
@@ -926,7 +926,7 @@ rte_vhost_driver_register(const char *path, uint64_t flags)
 			ret = -1;
 			goto out_mutex;
 		}
-		if (!vsocket->is_server) {
+		if ((flags & RTE_VHOST_USER_CLIENT) != 0) {
 			RTE_LOG(ERR, VHOST_CONFIG,
 			"error: zero copy is incompatible with vhost client mode\n");
 			ret = -1;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-22 10:37:40.905462964 +0100
+++ 0043-vhost-fix-zero-copy-server-mode.patch	2020-05-22 10:37:39.276415366 +0100
@@ -1,8 +1,10 @@
-From 22fa1bcbcbc7489304a711c39aea9a1593a873a5 Mon Sep 17 00:00:00 2001
+From 1c2eaf9a985203f5c3b35a7f4d72f2e60db5e85d Mon Sep 17 00:00:00 2001
 From: Xuan Ding <xuan.ding@intel.com>
 Date: Tue, 19 May 2020 10:15:46 +0000
 Subject: [PATCH] vhost: fix zero-copy server mode
 
+[ upstream commit 22fa1bcbcbc7489304a711c39aea9a1593a873a5 ]
+
 This patch fixes the situation where vhost-user cannot start as server
 with dequeue_zero_copy enabled.
 
@@ -10,7 +12,6 @@
 is in client mode. Because vsocket->is_server is not ready at this time.
 
 Fixes: 715070ea10e6 ("vhost: prevent zero-copy with incompatible client mode")
-Cc: stable@dpdk.org
 
 Signed-off-by: Xuan Ding <xuan.ding@intel.com>
 Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
@@ -20,7 +21,7 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
-index bb8d0d7801..0a66ef9767 100644
+index 8a87c38c4e..2461549fea 100644
 --- a/lib/librte_vhost/socket.c
 +++ b/lib/librte_vhost/socket.c
 @@ -926,7 +926,7 @@ rte_vhost_driver_register(const char *path, uint64_t flags)
@@ -29,7 +30,7 @@
  		}
 -		if (!vsocket->is_server) {
 +		if ((flags & RTE_VHOST_USER_CLIENT) != 0) {
- 			VHOST_LOG_CONFIG(ERR,
+ 			RTE_LOG(ERR, VHOST_CONFIG,
  			"error: zero copy is incompatible with vhost client mode\n");
  			ret = -1;
 -- 

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/mvpp2: fix build with gcc 10' has been queued to stable release 19.11.3
  2020-05-22  9:40       ` [dpdk-stable] patch 'vhost: fix zero-copy server mode' " luca.boccassi
@ 2020-05-27  9:24         ` luca.boccassi
  2020-05-27  9:24           ` [dpdk-stable] patch 'examples/vm_power: fix build with -fno-common' " luca.boccassi
                             ` (17 more replies)
  0 siblings, 18 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-27  9:24 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Liron Himi, David Marchand, Kevin Traynor, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/29/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 4d1fd43b3a90f96882b5e4dd23187f2501263457 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Wed, 20 May 2020 11:56:02 +0200
Subject: [PATCH] net/mvpp2: fix build with gcc 10

[ upstream commit 7f55a2053b908ff08a8a2d1cc8d4d927923d52f7 ]

GCC 10 is detecting the enum mismatch when assigning UDP variables
with MUSDK constants for TCP.

drivers/net/mvpp2/mrvl_flow.c:2521:47: error: implicit conversion
from 'enum mv_net_tcp_fields' to 'enum mv_net_udp_fields'
[-Werror=enum-conversion]

An assigned field is also fixed from "tcp" to "udp".

Fixes: 7235341d7517 ("net/mrvl: support classifier")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Liron Himi <lironh@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
---
 drivers/net/mvpp2/mrvl_flow.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mvpp2/mrvl_flow.c b/drivers/net/mvpp2/mrvl_flow.c
index 381b54e291..ea43255284 100644
--- a/drivers/net/mvpp2/mrvl_flow.c
+++ b/drivers/net/mvpp2/mrvl_flow.c
@@ -2511,14 +2511,14 @@ mrvl_create_cls_table(struct rte_eth_dev *dev, struct rte_flow *first_flow)
 
 	if (first_flow->pattern & F_UDP_SPORT) {
 		key->proto_field[key->num_fields].proto = MV_NET_PROTO_UDP;
-		key->proto_field[key->num_fields].field.tcp = MV_NET_TCP_F_SP;
+		key->proto_field[key->num_fields].field.udp = MV_NET_UDP_F_SP;
 		key->key_size += 2;
 		key->num_fields += 1;
 	}
 
 	if (first_flow->pattern & F_UDP_DPORT) {
 		key->proto_field[key->num_fields].proto = MV_NET_PROTO_UDP;
-		key->proto_field[key->num_fields].field.udp = MV_NET_TCP_F_DP;
+		key->proto_field[key->num_fields].field.udp = MV_NET_UDP_F_DP;
 		key->key_size += 2;
 		key->num_fields += 1;
 	}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-27 10:23:31.692416519 +0100
+++ 0001-net-mvpp2-fix-build-with-gcc-10.patch	2020-05-27 10:23:31.615933607 +0100
@@ -1,8 +1,10 @@
-From 7f55a2053b908ff08a8a2d1cc8d4d927923d52f7 Mon Sep 17 00:00:00 2001
+From 4d1fd43b3a90f96882b5e4dd23187f2501263457 Mon Sep 17 00:00:00 2001
 From: Thomas Monjalon <thomas@monjalon.net>
 Date: Wed, 20 May 2020 11:56:02 +0200
 Subject: [PATCH] net/mvpp2: fix build with gcc 10
 
+[ upstream commit 7f55a2053b908ff08a8a2d1cc8d4d927923d52f7 ]
+
 GCC 10 is detecting the enum mismatch when assigning UDP variables
 with MUSDK constants for TCP.
 
@@ -13,7 +15,6 @@
 An assigned field is also fixed from "tcp" to "udp".
 
 Fixes: 7235341d7517 ("net/mrvl: support classifier")
-Cc: stable@dpdk.org
 
 Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
 Acked-by: Liron Himi <lironh@marvell.com>

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'examples/vm_power: fix build with -fno-common' has been queued to stable release 19.11.3
  2020-05-27  9:24         ` [dpdk-stable] patch 'net/mvpp2: fix build with gcc 10' " luca.boccassi
@ 2020-05-27  9:24           ` luca.boccassi
  2020-05-27  9:24           ` [dpdk-stable] patch 'examples/vm_power: drop Unix path limit redefinition' " luca.boccassi
                             ` (16 subsequent siblings)
  17 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-27  9:24 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: David Marchand, Kevin Traynor, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/29/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From ba5df75ed5ea04c8e0f357854ba78ce7d4d49ab3 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Wed, 20 May 2020 09:59:35 +0200
Subject: [PATCH] examples/vm_power: fix build with -fno-common

[ upstream commit 96d3d532f9f2e42cf8b620ad3ba9da1f04ccb3f0 ]

The variables of the same name are merged together
if compiled with -fcommon. It used to be the default.
This default behaviour allows to declare a variable in a header file and
share the variable in every .o binaries thanks to merge at link-time.

If compiling with -fno-common (default in GCC 10), the variable must be
shared as extern to avoid multiple re-definitions.

Fixes: dff22404aaad ("examples/vm_power_mgr: add VCPU to PCPU mapping")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
---
 examples/vm_power_manager/channel_manager.c | 2 ++
 examples/vm_power_manager/channel_manager.h | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/examples/vm_power_manager/channel_manager.c b/examples/vm_power_manager/channel_manager.c
index 4ac21f02c1..4d13697208 100644
--- a/examples/vm_power_manager/channel_manager.c
+++ b/examples/vm_power_manager/channel_manager.c
@@ -35,6 +35,8 @@
 
 #define RTE_LOGTYPE_CHANNEL_MANAGER RTE_LOGTYPE_USER1
 
+struct libvirt_vm_info lvm_info[MAX_CLIENTS];
+
 /* Global pointer to libvirt connection */
 static virConnectPtr global_vir_conn_ptr;
 
diff --git a/examples/vm_power_manager/channel_manager.h b/examples/vm_power_manager/channel_manager.h
index 8284be0a18..a2a2f2bba0 100644
--- a/examples/vm_power_manager/channel_manager.h
+++ b/examples/vm_power_manager/channel_manager.h
@@ -41,7 +41,7 @@ struct libvirt_vm_info {
 	uint8_t num_cpus;
 };
 
-struct libvirt_vm_info lvm_info[MAX_CLIENTS];
+extern struct libvirt_vm_info lvm_info[MAX_CLIENTS];
 /* Communication Channel Status */
 enum channel_status { CHANNEL_MGR_CHANNEL_DISCONNECTED = 0,
 	CHANNEL_MGR_CHANNEL_CONNECTED,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-27 10:23:31.723733670 +0100
+++ 0002-examples-vm_power-fix-build-with-fno-common.patch	2020-05-27 10:23:31.619933644 +0100
@@ -1,8 +1,10 @@
-From 96d3d532f9f2e42cf8b620ad3ba9da1f04ccb3f0 Mon Sep 17 00:00:00 2001
+From ba5df75ed5ea04c8e0f357854ba78ce7d4d49ab3 Mon Sep 17 00:00:00 2001
 From: Thomas Monjalon <thomas@monjalon.net>
 Date: Wed, 20 May 2020 09:59:35 +0200
 Subject: [PATCH] examples/vm_power: fix build with -fno-common
 
+[ upstream commit 96d3d532f9f2e42cf8b620ad3ba9da1f04ccb3f0 ]
+
 The variables of the same name are merged together
 if compiled with -fcommon. It used to be the default.
 This default behaviour allows to declare a variable in a header file and
@@ -12,7 +14,6 @@
 shared as extern to avoid multiple re-definitions.
 
 Fixes: dff22404aaad ("examples/vm_power_mgr: add VCPU to PCPU mapping")
-Cc: stable@dpdk.org
 
 Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
 Acked-by: David Marchand <david.marchand@redhat.com>

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'examples/vm_power: drop Unix path limit redefinition' has been queued to stable release 19.11.3
  2020-05-27  9:24         ` [dpdk-stable] patch 'net/mvpp2: fix build with gcc 10' " luca.boccassi
  2020-05-27  9:24           ` [dpdk-stable] patch 'examples/vm_power: fix build with -fno-common' " luca.boccassi
@ 2020-05-27  9:24           ` luca.boccassi
  2020-05-27  9:24           ` [dpdk-stable] patch 'doc: fix build with doxygen 1.8.18' " luca.boccassi
                             ` (15 subsequent siblings)
  17 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-27  9:24 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: David Marchand, Kevin Traynor, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/29/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 121f7527868fca5a3e2788a1f3a79ffa9920a136 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Wed, 20 May 2020 10:10:50 +0200
Subject: [PATCH] examples/vm_power: drop Unix path limit redefinition

[ upstream commit 666272d20da3deb1fb41051b9f91a46a8363f2b0 ]

The Unix socket path may be as long as UNIX_PATH_MAX.
This constant is supposed to be defined in sys/un.h.
On Linux, it appears to be in linux/un.h.

This constant was re-defined locally, based on a variable declaration.
It is breaking compilation with -fno-common (default in GCC 10)
We could avoid the variable declaration by using NULL struct,
but it looks simpler not redefining this system constant.

As the power library and its examples are restricted to Linux only,
the Linux header file is directly included.

Fixes: 0d74597c1b4f ("examples/vm_power: fix max length of unix socket path")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
---
 examples/vm_power_manager/channel_manager.c | 1 -
 examples/vm_power_manager/channel_manager.h | 7 +------
 examples/vm_power_manager/power_manager.c   | 1 -
 3 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/examples/vm_power_manager/channel_manager.c b/examples/vm_power_manager/channel_manager.c
index 4d13697208..74a2a677e8 100644
--- a/examples/vm_power_manager/channel_manager.c
+++ b/examples/vm_power_manager/channel_manager.c
@@ -4,7 +4,6 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <sys/un.h>
 #include <fcntl.h>
 #include <unistd.h>
 #include <inttypes.h>
diff --git a/examples/vm_power_manager/channel_manager.h b/examples/vm_power_manager/channel_manager.h
index a2a2f2bba0..e55376fcdb 100644
--- a/examples/vm_power_manager/channel_manager.h
+++ b/examples/vm_power_manager/channel_manager.h
@@ -10,7 +10,7 @@ extern "C" {
 #endif
 
 #include <linux/limits.h>
-#include <sys/un.h>
+#include <linux/un.h>
 #include <rte_atomic.h>
 #include <stdbool.h>
 
@@ -26,11 +26,6 @@ extern "C" {
 /* FIFO file name template */
 #define CHANNEL_MGR_FIFO_PATTERN_NAME   "fifo"
 
-#ifndef UNIX_PATH_MAX
-struct sockaddr_un _sockaddr_un;
-#define UNIX_PATH_MAX sizeof(_sockaddr_un.sun_path)
-#endif
-
 #define MAX_CLIENTS 64
 #define MAX_VCPUS 20
 
diff --git a/examples/vm_power_manager/power_manager.c b/examples/vm_power_manager/power_manager.c
index 7b4f4b3c4d..cd51d4741f 100644
--- a/examples/vm_power_manager/power_manager.c
+++ b/examples/vm_power_manager/power_manager.c
@@ -6,7 +6,6 @@
 #include <stdlib.h>
 #include <stdint.h>
 #include <inttypes.h>
-#include <sys/un.h>
 #include <fcntl.h>
 #include <unistd.h>
 #include <dirent.h>
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-27 10:23:31.756323216 +0100
+++ 0003-examples-vm_power-drop-Unix-path-limit-redefinition.patch	2020-05-27 10:23:31.623933682 +0100
@@ -1,8 +1,10 @@
-From 666272d20da3deb1fb41051b9f91a46a8363f2b0 Mon Sep 17 00:00:00 2001
+From 121f7527868fca5a3e2788a1f3a79ffa9920a136 Mon Sep 17 00:00:00 2001
 From: Thomas Monjalon <thomas@monjalon.net>
 Date: Wed, 20 May 2020 10:10:50 +0200
 Subject: [PATCH] examples/vm_power: drop Unix path limit redefinition
 
+[ upstream commit 666272d20da3deb1fb41051b9f91a46a8363f2b0 ]
+
 The Unix socket path may be as long as UNIX_PATH_MAX.
 This constant is supposed to be defined in sys/un.h.
 On Linux, it appears to be in linux/un.h.
@@ -16,7 +18,6 @@
 the Linux header file is directly included.
 
 Fixes: 0d74597c1b4f ("examples/vm_power: fix max length of unix socket path")
-Cc: stable@dpdk.org
 
 Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
 Acked-by: David Marchand <david.marchand@redhat.com>

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'doc: fix build with doxygen 1.8.18' has been queued to stable release 19.11.3
  2020-05-27  9:24         ` [dpdk-stable] patch 'net/mvpp2: fix build with gcc 10' " luca.boccassi
  2020-05-27  9:24           ` [dpdk-stable] patch 'examples/vm_power: fix build with -fno-common' " luca.boccassi
  2020-05-27  9:24           ` [dpdk-stable] patch 'examples/vm_power: drop Unix path limit redefinition' " luca.boccassi
@ 2020-05-27  9:24           ` luca.boccassi
  2020-05-27  9:24           ` [dpdk-stable] patch 'cryptodev: fix SHA-1 digest enum comment' " luca.boccassi
                             ` (14 subsequent siblings)
  17 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-27  9:24 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/29/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 86809db3105cb39d9d89159d3953585f107d862d Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Wed, 20 May 2020 15:33:43 +0200
Subject: [PATCH] doc: fix build with doxygen 1.8.18

[ upstream commit 76fb8fc486f94e268c1329425b3a0d5900cd3214 ]

Having an explicit "index" anchor looks forbidden:

doc/api/doxy-api-index.md:1: warning:
multiple use of section label 'index' for main page

Anyway this anchor was not used, it can be removed.

Fixes: 9bf486e606b0 ("doc: generate HTML for API with doxygen")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Tested-by: Jerin Jacob <jerinj@marvell.com>
---
 doc/api/doxy-api-index.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/api/doxy-api-index.md b/doc/api/doxy-api-index.md
index dff496be09..d7c8bd24db 100644
--- a/doc/api/doxy-api-index.md
+++ b/doc/api/doxy-api-index.md
@@ -1,4 +1,4 @@
-API {#index}
+API
 ===
 
 <!--
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-27 10:23:31.791244212 +0100
+++ 0004-doc-fix-build-with-doxygen-1.8.18.patch	2020-05-27 10:23:31.623933682 +0100
@@ -1,8 +1,10 @@
-From 76fb8fc486f94e268c1329425b3a0d5900cd3214 Mon Sep 17 00:00:00 2001
+From 86809db3105cb39d9d89159d3953585f107d862d Mon Sep 17 00:00:00 2001
 From: Thomas Monjalon <thomas@monjalon.net>
 Date: Wed, 20 May 2020 15:33:43 +0200
 Subject: [PATCH] doc: fix build with doxygen 1.8.18
 
+[ upstream commit 76fb8fc486f94e268c1329425b3a0d5900cd3214 ]
+
 Having an explicit "index" anchor looks forbidden:
 
 doc/api/doxy-api-index.md:1: warning:
@@ -11,7 +13,6 @@
 Anyway this anchor was not used, it can be removed.
 
 Fixes: 9bf486e606b0 ("doc: generate HTML for API with doxygen")
-Cc: stable@dpdk.org
 
 Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
 Tested-by: Jerin Jacob <jerinj@marvell.com>
@@ -20,7 +21,7 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/doc/api/doxy-api-index.md b/doc/api/doxy-api-index.md
-index 93f0d933b1..f597663237 100644
+index dff496be09..d7c8bd24db 100644
 --- a/doc/api/doxy-api-index.md
 +++ b/doc/api/doxy-api-index.md
 @@ -1,4 +1,4 @@

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'cryptodev: fix SHA-1 digest enum comment' has been queued to stable release 19.11.3
  2020-05-27  9:24         ` [dpdk-stable] patch 'net/mvpp2: fix build with gcc 10' " luca.boccassi
                             ` (2 preceding siblings ...)
  2020-05-27  9:24           ` [dpdk-stable] patch 'doc: fix build with doxygen 1.8.18' " luca.boccassi
@ 2020-05-27  9:24           ` luca.boccassi
  2020-05-27  9:24           ` [dpdk-stable] patch 'net/bnxt: fix Rx ring producer index' " luca.boccassi
                             ` (13 subsequent siblings)
  17 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-27  9:24 UTC (permalink / raw)
  To: Adam Dybkowski; +Cc: Fiona Trahe, Anoob Joseph, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/29/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 1df20ac457413526f21d9f715135964de69c705b Mon Sep 17 00:00:00 2001
From: Adam Dybkowski <adamx.dybkowski@intel.com>
Date: Thu, 21 May 2020 16:48:53 +0200
Subject: [PATCH] cryptodev: fix SHA-1 digest enum comment

[ upstream commit e475fd853ac1cae9cf837a10e8c386503175752e ]

This patch fixes improper SHA-1 digest size in the enum comment
and also adds the note about HMAC-SHA-1-96.

Fixes: 1bd407fac80b ("cryptodev: extract symmetric operations")

Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 lib/librte_cryptodev/rte_crypto_sym.h | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lib/librte_cryptodev/rte_crypto_sym.h b/lib/librte_cryptodev/rte_crypto_sym.h
index ffa038dc40..4e05c7c6ac 100644
--- a/lib/librte_cryptodev/rte_crypto_sym.h
+++ b/lib/librte_cryptodev/rte_crypto_sym.h
@@ -208,9 +208,12 @@ enum rte_crypto_auth_algorithm {
 	/**< HMAC using MD5 algorithm */
 
 	RTE_CRYPTO_AUTH_SHA1,
-	/**< 128 bit SHA algorithm. */
+	/**< 160 bit SHA algorithm. */
 	RTE_CRYPTO_AUTH_SHA1_HMAC,
-	/**< HMAC using 128 bit SHA algorithm. */
+	/**< HMAC using 160 bit SHA algorithm.
+	 * HMAC-SHA-1-96 can be generated by setting
+	 * digest_length to 12 bytes in auth/aead xforms.
+	 */
 	RTE_CRYPTO_AUTH_SHA224,
 	/**< 224 bit SHA algorithm. */
 	RTE_CRYPTO_AUTH_SHA224_HMAC,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-27 10:23:31.822513382 +0100
+++ 0005-cryptodev-fix-SHA-1-digest-enum-comment.patch	2020-05-27 10:23:31.627933720 +0100
@@ -1,13 +1,14 @@
-From e475fd853ac1cae9cf837a10e8c386503175752e Mon Sep 17 00:00:00 2001
+From 1df20ac457413526f21d9f715135964de69c705b Mon Sep 17 00:00:00 2001
 From: Adam Dybkowski <adamx.dybkowski@intel.com>
 Date: Thu, 21 May 2020 16:48:53 +0200
 Subject: [PATCH] cryptodev: fix SHA-1 digest enum comment
 
+[ upstream commit e475fd853ac1cae9cf837a10e8c386503175752e ]
+
 This patch fixes improper SHA-1 digest size in the enum comment
 and also adds the note about HMAC-SHA-1-96.
 
 Fixes: 1bd407fac80b ("cryptodev: extract symmetric operations")
-Cc: stable@dpdk.org
 
 Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
 Acked-by: Fiona Trahe <fiona.trahe@intel.com>
@@ -18,10 +19,10 @@
  1 file changed, 5 insertions(+), 2 deletions(-)
 
 diff --git a/lib/librte_cryptodev/rte_crypto_sym.h b/lib/librte_cryptodev/rte_crypto_sym.h
-index d9585ecd69..da961a19d2 100644
+index ffa038dc40..4e05c7c6ac 100644
 --- a/lib/librte_cryptodev/rte_crypto_sym.h
 +++ b/lib/librte_cryptodev/rte_crypto_sym.h
-@@ -269,9 +269,12 @@ enum rte_crypto_auth_algorithm {
+@@ -208,9 +208,12 @@ enum rte_crypto_auth_algorithm {
  	/**< HMAC using MD5 algorithm */
  
  	RTE_CRYPTO_AUTH_SHA1,

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/bnxt: fix Rx ring producer index' has been queued to stable release 19.11.3
  2020-05-27  9:24         ` [dpdk-stable] patch 'net/mvpp2: fix build with gcc 10' " luca.boccassi
                             ` (3 preceding siblings ...)
  2020-05-27  9:24           ` [dpdk-stable] patch 'cryptodev: fix SHA-1 digest enum comment' " luca.boccassi
@ 2020-05-27  9:24           ` luca.boccassi
  2020-05-27  9:24           ` [dpdk-stable] patch 'net/octeontx2: fix buffer size assignment' " luca.boccassi
                             ` (12 subsequent siblings)
  17 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-27  9:24 UTC (permalink / raw)
  To: Rahul Gupta; +Cc: Kalesh AP, Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/29/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 586faf5a4ff8e35fc5abb083327ba7f92bf3cd4e Mon Sep 17 00:00:00 2001
From: Rahul Gupta <rahul.gupta@broadcom.com>
Date: Wed, 20 May 2020 23:09:18 +0530
Subject: [PATCH] net/bnxt: fix Rx ring producer index

[ upstream commit 20cb28a0ec7fb0c49807c63e6f57b5e0cdb36065 ]

When a queue is started after deferred_start, then increment raw_prod
irrespective of new mbuf is allocated or old mbufs are used.

Fixes: d256c73c1122 ("net/bnxt: fix memory leak during queue restart")

Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxr.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index 3ebc398375..fa3b4a6be4 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -860,9 +860,9 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
 					    rxq->queue_id, i, ring->ring_size);
 				break;
 			}
-			rxr->rx_prod = prod;
-			prod = RING_NEXT(rxr->rx_ring_struct, prod);
 		}
+		rxr->rx_prod = prod;
+		prod = RING_NEXT(rxr->rx_ring_struct, prod);
 	}
 
 	ring = rxr->ag_ring_struct;
@@ -878,9 +878,9 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
 					    rxq->queue_id, i, ring->ring_size);
 				break;
 			}
-			rxr->ag_prod = prod;
-			prod = RING_NEXT(rxr->ag_ring_struct, prod);
 		}
+		rxr->ag_prod = prod;
+		prod = RING_NEXT(rxr->ag_ring_struct, prod);
 	}
 	PMD_DRV_LOG(DEBUG, "AGG Done!\n");
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-27 10:23:31.856330131 +0100
+++ 0006-net-bnxt-fix-Rx-ring-producer-index.patch	2020-05-27 10:23:31.627933720 +0100
@@ -1,13 +1,14 @@
-From 20cb28a0ec7fb0c49807c63e6f57b5e0cdb36065 Mon Sep 17 00:00:00 2001
+From 586faf5a4ff8e35fc5abb083327ba7f92bf3cd4e Mon Sep 17 00:00:00 2001
 From: Rahul Gupta <rahul.gupta@broadcom.com>
 Date: Wed, 20 May 2020 23:09:18 +0530
 Subject: [PATCH] net/bnxt: fix Rx ring producer index
 
+[ upstream commit 20cb28a0ec7fb0c49807c63e6f57b5e0cdb36065 ]
+
 When a queue is started after deferred_start, then increment raw_prod
 irrespective of new mbuf is allocated or old mbufs are used.
 
 Fixes: d256c73c1122 ("net/bnxt: fix memory leak during queue restart")
-Cc: stable@dpdk.org
 
 Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
 Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
@@ -18,10 +19,10 @@
  1 file changed, 4 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
-index d2955bae3c..ee1acb1969 100644
+index 3ebc398375..fa3b4a6be4 100644
 --- a/drivers/net/bnxt/bnxt_rxr.c
 +++ b/drivers/net/bnxt/bnxt_rxr.c
-@@ -987,9 +987,9 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
+@@ -860,9 +860,9 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
  					    rxq->queue_id, i, ring->ring_size);
  				break;
  			}
@@ -33,7 +34,7 @@
  	}
  
  	ring = rxr->ag_ring_struct;
-@@ -1005,9 +1005,9 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
+@@ -878,9 +878,9 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
  					    rxq->queue_id, i, ring->ring_size);
  				break;
  			}

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/octeontx2: fix buffer size assignment' has been queued to stable release 19.11.3
  2020-05-27  9:24         ` [dpdk-stable] patch 'net/mvpp2: fix build with gcc 10' " luca.boccassi
                             ` (4 preceding siblings ...)
  2020-05-27  9:24           ` [dpdk-stable] patch 'net/bnxt: fix Rx ring producer index' " luca.boccassi
@ 2020-05-27  9:24           ` luca.boccassi
  2020-05-27  9:24           ` [dpdk-stable] patch 'net/hinic: fix TSO' " luca.boccassi
                             ` (11 subsequent siblings)
  17 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-27  9:24 UTC (permalink / raw)
  To: Ankur Dwivedi; +Cc: Nithin Dabilpuram, Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/29/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From c4d7293707e802467de597fe4f828fbd1d03444d Mon Sep 17 00:00:00 2001
From: Ankur Dwivedi <adwivedi@marvell.com>
Date: Wed, 20 May 2020 17:50:10 +0530
Subject: [PATCH] net/octeontx2: fix buffer size assignment

[ upstream commit 357439ad0927ce817ad9d4138b71554c683406a8 ]

The elt_size field in mempool holds the size of one packet buffer.
It can be used to set the lpm_sizem1 field in rq context.

The lpb_sizem1 field in rq context is 12 bit, direct assignment
to it was causing overflow of value. Because of this errors
were observed while trying inline inbound with large packets.
This patch resolves the errors.

Fixes: 094fc8a3a1e2 ("net/octeontx2: add Rx queue setup and release")

Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
Reviewed-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
---
 drivers/net/octeontx2/otx2_ethdev.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c
index f3281df9c4..102d06b39b 100644
--- a/drivers/net/octeontx2/otx2_ethdev.c
+++ b/drivers/net/octeontx2/otx2_ethdev.c
@@ -350,10 +350,7 @@ nix_cq_rq_init(struct rte_eth_dev *eth_dev, struct otx2_eth_dev *dev,
 	aq->rq.first_skip = first_skip;
 	aq->rq.later_skip = (sizeof(struct rte_mbuf) / 8);
 	aq->rq.flow_tagw = 32; /* 32-bits */
-	aq->rq.lpb_sizem1 = rte_pktmbuf_data_room_size(mp);
-	aq->rq.lpb_sizem1 += rte_pktmbuf_priv_size(mp);
-	aq->rq.lpb_sizem1 += sizeof(struct rte_mbuf);
-	aq->rq.lpb_sizem1 /= 8;
+	aq->rq.lpb_sizem1 = mp->elt_size / 8;
 	aq->rq.lpb_sizem1 -= 1; /* Expressed in size minus one */
 	aq->rq.ena = 1;
 	aq->rq.pb_caching = 0x2; /* First cache aligned block to LLC */
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-27 10:23:31.888853091 +0100
+++ 0007-net-octeontx2-fix-buffer-size-assignment.patch	2020-05-27 10:23:31.631933757 +0100
@@ -1,8 +1,10 @@
-From 357439ad0927ce817ad9d4138b71554c683406a8 Mon Sep 17 00:00:00 2001
+From c4d7293707e802467de597fe4f828fbd1d03444d Mon Sep 17 00:00:00 2001
 From: Ankur Dwivedi <adwivedi@marvell.com>
 Date: Wed, 20 May 2020 17:50:10 +0530
 Subject: [PATCH] net/octeontx2: fix buffer size assignment
 
+[ upstream commit 357439ad0927ce817ad9d4138b71554c683406a8 ]
+
 The elt_size field in mempool holds the size of one packet buffer.
 It can be used to set the lpm_sizem1 field in rq context.
 
@@ -12,7 +14,6 @@
 This patch resolves the errors.
 
 Fixes: 094fc8a3a1e2 ("net/octeontx2: add Rx queue setup and release")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
 Reviewed-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
@@ -22,10 +23,10 @@
  1 file changed, 1 insertion(+), 4 deletions(-)
 
 diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c
-index 3116e5ca68..3f3f0a693f 100644
+index f3281df9c4..102d06b39b 100644
 --- a/drivers/net/octeontx2/otx2_ethdev.c
 +++ b/drivers/net/octeontx2/otx2_ethdev.c
-@@ -373,10 +373,7 @@ nix_cq_rq_init(struct rte_eth_dev *eth_dev, struct otx2_eth_dev *dev,
+@@ -350,10 +350,7 @@ nix_cq_rq_init(struct rte_eth_dev *eth_dev, struct otx2_eth_dev *dev,
  	aq->rq.first_skip = first_skip;
  	aq->rq.later_skip = (sizeof(struct rte_mbuf) / 8);
  	aq->rq.flow_tagw = 32; /* 32-bits */

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/hinic: fix TSO' has been queued to stable release 19.11.3
  2020-05-27  9:24         ` [dpdk-stable] patch 'net/mvpp2: fix build with gcc 10' " luca.boccassi
                             ` (5 preceding siblings ...)
  2020-05-27  9:24           ` [dpdk-stable] patch 'net/octeontx2: fix buffer size assignment' " luca.boccassi
@ 2020-05-27  9:24           ` luca.boccassi
  2020-05-27  9:24           ` [dpdk-stable] patch 'net/sfc/base: fix manual filter delete in EF10' " luca.boccassi
                             ` (10 subsequent siblings)
  17 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-27  9:24 UTC (permalink / raw)
  To: Xiaoyun Wang; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/29/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From bea8e15b59df75a267edf0eed907de8b03a0fc45 Mon Sep 17 00:00:00 2001
From: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
Date: Wed, 20 May 2020 19:52:59 +0800
Subject: [PATCH] net/hinic: fix TSO

[ upstream commit c6f9f0b7d495b27833077b7904f290f4a69e36ad ]

When TSO MSS is smaller than 80, and the sum length of continuous
sge num is larger than a MSS, which may cause hardware failed,
so in this scenarios pmd driver should adjust the tso_segsz with
the same with the value of hardware supported.

Fixes: 076221c8fe1d ("net/hinic: add Rx/Tx")

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
---
 drivers/net/hinic/hinic_pmd_tx.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/hinic/hinic_pmd_tx.c b/drivers/net/hinic/hinic_pmd_tx.c
index 33d8ae2102..05b23d9924 100644
--- a/drivers/net/hinic/hinic_pmd_tx.c
+++ b/drivers/net/hinic/hinic_pmd_tx.c
@@ -423,7 +423,7 @@ static inline bool hinic_is_tso_sge_valid(struct rte_mbuf *mbuf,
 					  *poff_info,
 					  struct hinic_wqe_info *sqe_info)
 {
-	u32 total_len, limit_len, checked_len, left_len;
+	u32 total_len, limit_len, checked_len, left_len, adjust_mss;
 	u32 i, first_mss_sges, left_sges;
 	struct rte_mbuf *mbuf_head, *mbuf_pre;
 
@@ -433,7 +433,9 @@ static inline bool hinic_is_tso_sge_valid(struct rte_mbuf *mbuf,
 	/* tso sge number validation */
 	if (unlikely(left_sges >= HINIC_NONTSO_PKT_MAX_SGE)) {
 		checked_len = 0;
-		limit_len = mbuf->tso_segsz + poff_info->payload_offset;
+		adjust_mss = mbuf->tso_segsz >= TX_MSS_MIN ?
+				mbuf->tso_segsz : TX_MSS_MIN;
+		limit_len = adjust_mss + poff_info->payload_offset;
 		first_mss_sges = HINIC_NONTSO_PKT_MAX_SGE;
 
 		/* each continues 17 mbufs segmust do one check */
@@ -447,7 +449,7 @@ static inline bool hinic_is_tso_sge_valid(struct rte_mbuf *mbuf,
 				mbuf_pre = mbuf;
 				mbuf = mbuf->next;
 				if (total_len >= limit_len) {
-					limit_len = mbuf_head->tso_segsz;
+					limit_len = adjust_mss;
 					break;
 				}
 			}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-27 10:23:31.922944285 +0100
+++ 0008-net-hinic-fix-TSO.patch	2020-05-27 10:23:31.635933795 +0100
@@ -1,15 +1,16 @@
-From c6f9f0b7d495b27833077b7904f290f4a69e36ad Mon Sep 17 00:00:00 2001
+From bea8e15b59df75a267edf0eed907de8b03a0fc45 Mon Sep 17 00:00:00 2001
 From: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
 Date: Wed, 20 May 2020 19:52:59 +0800
 Subject: [PATCH] net/hinic: fix TSO
 
+[ upstream commit c6f9f0b7d495b27833077b7904f290f4a69e36ad ]
+
 When TSO MSS is smaller than 80, and the sum length of continuous
 sge num is larger than a MSS, which may cause hardware failed,
 so in this scenarios pmd driver should adjust the tso_segsz with
 the same with the value of hardware supported.
 
 Fixes: 076221c8fe1d ("net/hinic: add Rx/Tx")
-Cc: stable@dpdk.org
 
 Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
 ---
@@ -17,10 +18,10 @@
  1 file changed, 5 insertions(+), 3 deletions(-)
 
 diff --git a/drivers/net/hinic/hinic_pmd_tx.c b/drivers/net/hinic/hinic_pmd_tx.c
-index bd39f9364f..4d999678fa 100644
+index 33d8ae2102..05b23d9924 100644
 --- a/drivers/net/hinic/hinic_pmd_tx.c
 +++ b/drivers/net/hinic/hinic_pmd_tx.c
-@@ -455,7 +455,7 @@ static inline bool hinic_is_tso_sge_valid(struct rte_mbuf *mbuf,
+@@ -423,7 +423,7 @@ static inline bool hinic_is_tso_sge_valid(struct rte_mbuf *mbuf,
  					  *poff_info,
  					  struct hinic_wqe_info *sqe_info)
  {
@@ -29,7 +30,7 @@
  	u32 i, first_mss_sges, left_sges;
  	struct rte_mbuf *mbuf_head, *mbuf_pre;
  
-@@ -465,7 +465,9 @@ static inline bool hinic_is_tso_sge_valid(struct rte_mbuf *mbuf,
+@@ -433,7 +433,9 @@ static inline bool hinic_is_tso_sge_valid(struct rte_mbuf *mbuf,
  	/* tso sge number validation */
  	if (unlikely(left_sges >= HINIC_NONTSO_PKT_MAX_SGE)) {
  		checked_len = 0;
@@ -40,7 +41,7 @@
  		first_mss_sges = HINIC_NONTSO_PKT_MAX_SGE;
  
  		/* each continues 17 mbufs segmust do one check */
-@@ -479,7 +481,7 @@ static inline bool hinic_is_tso_sge_valid(struct rte_mbuf *mbuf,
+@@ -447,7 +449,7 @@ static inline bool hinic_is_tso_sge_valid(struct rte_mbuf *mbuf,
  				mbuf_pre = mbuf;
  				mbuf = mbuf->next;
  				if (total_len >= limit_len) {

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/sfc/base: fix manual filter delete in EF10' has been queued to stable release 19.11.3
  2020-05-27  9:24         ` [dpdk-stable] patch 'net/mvpp2: fix build with gcc 10' " luca.boccassi
                             ` (6 preceding siblings ...)
  2020-05-27  9:24           ` [dpdk-stable] patch 'net/hinic: fix TSO' " luca.boccassi
@ 2020-05-27  9:24           ` luca.boccassi
  2020-05-27  9:24           ` [dpdk-stable] patch 'net/i40e: fix setting L2TAG' " luca.boccassi
                             ` (9 subsequent siblings)
  17 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-27  9:24 UTC (permalink / raw)
  To: Igor Romanov; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/29/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 696a40bd944c63b038c0b0f1b370c5f9ba52b8ee Mon Sep 17 00:00:00 2001
From: Igor Romanov <igor.romanov@oktetlabs.ru>
Date: Wed, 20 May 2020 14:59:52 +0100
Subject: [PATCH] net/sfc/base: fix manual filter delete in EF10

[ upstream commit 977424c2cc21a9b6542497546fbbfa2ad7f02ea3 ]

When user requests a filter deletion only filter with
manual priority must be deleted. When an automatic filter has
the same specification, it must be skipped.

Fixes: 585c22edb29c ("net/sfc/base: handle manual and auto filter clashes in EF10")

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/base/ef10_filter.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/sfc/base/ef10_filter.c b/drivers/net/sfc/base/ef10_filter.c
index 12802a3d13..158e77e3bb 100644
--- a/drivers/net/sfc/base/ef10_filter.c
+++ b/drivers/net/sfc/base/ef10_filter.c
@@ -1161,7 +1161,8 @@ ef10_filter_delete(
 		i = (hash + depth) & (EFX_EF10_FILTER_TBL_ROWS - 1);
 		saved_spec = ef10_filter_entry_spec(table, i);
 		if (saved_spec && ef10_filter_equal(spec, saved_spec) &&
-		    ef10_filter_same_dest(spec, saved_spec)) {
+		    ef10_filter_same_dest(spec, saved_spec) &&
+		    saved_spec->efs_priority == EFX_FILTER_PRI_MANUAL) {
 			break;
 		}
 		if (depth == EF10_FILTER_SEARCH_LIMIT) {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-27 10:23:31.955299567 +0100
+++ 0009-net-sfc-base-fix-manual-filter-delete-in-EF10.patch	2020-05-27 10:23:31.639933832 +0100
@@ -1,14 +1,15 @@
-From 977424c2cc21a9b6542497546fbbfa2ad7f02ea3 Mon Sep 17 00:00:00 2001
+From 696a40bd944c63b038c0b0f1b370c5f9ba52b8ee Mon Sep 17 00:00:00 2001
 From: Igor Romanov <igor.romanov@oktetlabs.ru>
 Date: Wed, 20 May 2020 14:59:52 +0100
 Subject: [PATCH] net/sfc/base: fix manual filter delete in EF10
 
+[ upstream commit 977424c2cc21a9b6542497546fbbfa2ad7f02ea3 ]
+
 When user requests a filter deletion only filter with
 manual priority must be deleted. When an automatic filter has
 the same specification, it must be skipped.
 
 Fixes: 585c22edb29c ("net/sfc/base: handle manual and auto filter clashes in EF10")
-Cc: stable@dpdk.org
 
 Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
@@ -17,7 +18,7 @@
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/sfc/base/ef10_filter.c b/drivers/net/sfc/base/ef10_filter.c
-index 7a726ef977..12c84a5640 100644
+index 12802a3d13..158e77e3bb 100644
 --- a/drivers/net/sfc/base/ef10_filter.c
 +++ b/drivers/net/sfc/base/ef10_filter.c
 @@ -1161,7 +1161,8 @@ ef10_filter_delete(

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/i40e: fix setting L2TAG' has been queued to stable release 19.11.3
  2020-05-27  9:24         ` [dpdk-stable] patch 'net/mvpp2: fix build with gcc 10' " luca.boccassi
                             ` (7 preceding siblings ...)
  2020-05-27  9:24           ` [dpdk-stable] patch 'net/sfc/base: fix manual filter delete in EF10' " luca.boccassi
@ 2020-05-27  9:24           ` luca.boccassi
  2020-05-27  9:24           ` [dpdk-stable] patch 'net/iavf: " luca.boccassi
                             ` (8 subsequent siblings)
  17 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-27  9:24 UTC (permalink / raw)
  To: Jeff Guo; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/29/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From b7a08ea7cd62e57220cad5c8ae0b3cacaaa33124 Mon Sep 17 00:00:00 2001
From: Jeff Guo <jia.guo@intel.com>
Date: Wed, 20 May 2020 17:25:21 -0400
Subject: [PATCH] net/i40e: fix setting L2TAG

[ upstream commit 61b26a9c5ae569ce5900414a41a42c41d069155c ]

Base on HW, if a packet is split into multiple segments, the L2TAG
should only be valid on the last Rx descriptor. So fix it by setting
L2TAG into mbuf when processing the last split packet.

Fixes: ca74903b75cf ("net/i40e: extract non-x86 specific code from vector driver")

Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_rxtx_vec_common.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/i40e/i40e_rxtx_vec_common.h b/drivers/net/i40e/i40e_rxtx_vec_common.h
index 0e6ffa0078..31f73f6054 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_common.h
+++ b/drivers/net/i40e/i40e_rxtx_vec_common.h
@@ -33,6 +33,7 @@ reassemble_packets(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_bufs,
 			if (!split_flags[buf_idx]) {
 				/* it's the last packet of the set */
 				start->hash = end->hash;
+				start->vlan_tci = end->vlan_tci;
 				start->ol_flags = end->ol_flags;
 				/* we need to strip crc for the whole packet */
 				start->pkt_len -= rxq->crc_len;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-27 10:23:31.989410111 +0100
+++ 0010-net-i40e-fix-setting-L2TAG.patch	2020-05-27 10:23:31.639933832 +0100
@@ -1,14 +1,15 @@
-From 61b26a9c5ae569ce5900414a41a42c41d069155c Mon Sep 17 00:00:00 2001
+From b7a08ea7cd62e57220cad5c8ae0b3cacaaa33124 Mon Sep 17 00:00:00 2001
 From: Jeff Guo <jia.guo@intel.com>
 Date: Wed, 20 May 2020 17:25:21 -0400
 Subject: [PATCH] net/i40e: fix setting L2TAG
 
+[ upstream commit 61b26a9c5ae569ce5900414a41a42c41d069155c ]
+
 Base on HW, if a packet is split into multiple segments, the L2TAG
 should only be valid on the last Rx descriptor. So fix it by setting
 L2TAG into mbuf when processing the last split packet.
 
 Fixes: ca74903b75cf ("net/i40e: extract non-x86 specific code from vector driver")
-Cc: stable@dpdk.org
 
 Signed-off-by: Jeff Guo <jia.guo@intel.com>
 Acked-by: Qi Zhang <qi.z.zhang@intel.com>

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/iavf: fix setting L2TAG' has been queued to stable release 19.11.3
  2020-05-27  9:24         ` [dpdk-stable] patch 'net/mvpp2: fix build with gcc 10' " luca.boccassi
                             ` (8 preceding siblings ...)
  2020-05-27  9:24           ` [dpdk-stable] patch 'net/i40e: fix setting L2TAG' " luca.boccassi
@ 2020-05-27  9:24           ` luca.boccassi
  2020-05-27  9:24           ` [dpdk-stable] patch 'net/ice: " luca.boccassi
                             ` (7 subsequent siblings)
  17 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-27  9:24 UTC (permalink / raw)
  To: Jeff Guo; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/29/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From a46186d06379be6cc756d619335975b143c71edd Mon Sep 17 00:00:00 2001
From: Jeff Guo <jia.guo@intel.com>
Date: Wed, 20 May 2020 17:44:14 -0400
Subject: [PATCH] net/iavf: fix setting L2TAG

[ upstream commit 2482a99f303873175c5781d3c685eaa9e17cfaf7 ]

Base on HW, if a packet is split into multiple segments, the L2TAG
should only be valid on the last Rx descriptor. So fix it by setting
L2TAG into mbuf when processing the last split packet.

Fixes: 319c421f3890 ("net/avf: enable SSE Rx Tx")

Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_rxtx_vec_common.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/iavf/iavf_rxtx_vec_common.h b/drivers/net/iavf/iavf_rxtx_vec_common.h
index a6ba227584..25bb502de2 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_common.h
+++ b/drivers/net/iavf/iavf_rxtx_vec_common.h
@@ -33,6 +33,7 @@ reassemble_packets(struct iavf_rx_queue *rxq, struct rte_mbuf **rx_bufs,
 			if (!split_flags[buf_idx]) {
 				/* it's the last packet of the set */
 				start->hash = end->hash;
+				start->vlan_tci = end->vlan_tci;
 				start->ol_flags = end->ol_flags;
 				/* we need to strip crc for the whole packet */
 				start->pkt_len -= rxq->crc_len;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-27 10:23:32.020286306 +0100
+++ 0011-net-iavf-fix-setting-L2TAG.patch	2020-05-27 10:23:31.639933832 +0100
@@ -1,14 +1,15 @@
-From 2482a99f303873175c5781d3c685eaa9e17cfaf7 Mon Sep 17 00:00:00 2001
+From a46186d06379be6cc756d619335975b143c71edd Mon Sep 17 00:00:00 2001
 From: Jeff Guo <jia.guo@intel.com>
 Date: Wed, 20 May 2020 17:44:14 -0400
 Subject: [PATCH] net/iavf: fix setting L2TAG
 
+[ upstream commit 2482a99f303873175c5781d3c685eaa9e17cfaf7 ]
+
 Base on HW, if a packet is split into multiple segments, the L2TAG
 should only be valid on the last Rx descriptor. So fix it by setting
 L2TAG into mbuf when processing the last split packet.
 
 Fixes: 319c421f3890 ("net/avf: enable SSE Rx Tx")
-Cc: stable@dpdk.org
 
 Signed-off-by: Jeff Guo <jia.guo@intel.com>
 Acked-by: Qi Zhang <qi.z.zhang@intel.com>

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/ice: fix setting L2TAG' has been queued to stable release 19.11.3
  2020-05-27  9:24         ` [dpdk-stable] patch 'net/mvpp2: fix build with gcc 10' " luca.boccassi
                             ` (9 preceding siblings ...)
  2020-05-27  9:24           ` [dpdk-stable] patch 'net/iavf: " luca.boccassi
@ 2020-05-27  9:24           ` luca.boccassi
  2020-05-27  9:24           ` [dpdk-stable] patch 'net/i40e: fix flow director enabling' " luca.boccassi
                             ` (6 subsequent siblings)
  17 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-27  9:24 UTC (permalink / raw)
  To: Jeff Guo; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/29/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From a6c3bc7236db22e8851dfb1a45a3c5378a90ee61 Mon Sep 17 00:00:00 2001
From: Jeff Guo <jia.guo@intel.com>
Date: Wed, 20 May 2020 17:46:14 -0400
Subject: [PATCH] net/ice: fix setting L2TAG

[ upstream commit c9047db4afa8b95bb9ade3ef58c348afcca29cb5 ]

Base on HW, if a packet is split into multiple segments, the L2TAG
should only be valid on the last Rx descriptor. So fix it by setting
L2TAG into mbuf when processing the last split packet.

Fixes: c68a52b8b38c ("net/ice: support vector SSE in Rx")

Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_rxtx_vec_common.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ice/ice_rxtx_vec_common.h b/drivers/net/ice/ice_rxtx_vec_common.h
index 6b57ff2ae0..46e3be98a6 100644
--- a/drivers/net/ice/ice_rxtx_vec_common.h
+++ b/drivers/net/ice/ice_rxtx_vec_common.h
@@ -29,6 +29,7 @@ ice_rx_reassemble_packets(struct ice_rx_queue *rxq, struct rte_mbuf **rx_bufs,
 			if (!split_flags[buf_idx]) {
 				/* it's the last packet of the set */
 				start->hash = end->hash;
+				start->vlan_tci = end->vlan_tci;
 				start->ol_flags = end->ol_flags;
 				/* we need to strip crc for the whole packet */
 				start->pkt_len -= rxq->crc_len;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-27 10:23:32.052586149 +0100
+++ 0012-net-ice-fix-setting-L2TAG.patch	2020-05-27 10:23:31.639933832 +0100
@@ -1,14 +1,15 @@
-From c9047db4afa8b95bb9ade3ef58c348afcca29cb5 Mon Sep 17 00:00:00 2001
+From a6c3bc7236db22e8851dfb1a45a3c5378a90ee61 Mon Sep 17 00:00:00 2001
 From: Jeff Guo <jia.guo@intel.com>
 Date: Wed, 20 May 2020 17:46:14 -0400
 Subject: [PATCH] net/ice: fix setting L2TAG
 
+[ upstream commit c9047db4afa8b95bb9ade3ef58c348afcca29cb5 ]
+
 Base on HW, if a packet is split into multiple segments, the L2TAG
 should only be valid on the last Rx descriptor. So fix it by setting
 L2TAG into mbuf when processing the last split packet.
 
 Fixes: c68a52b8b38c ("net/ice: support vector SSE in Rx")
-Cc: stable@dpdk.org
 
 Signed-off-by: Jeff Guo <jia.guo@intel.com>
 Acked-by: Qi Zhang <qi.z.zhang@intel.com>

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/i40e: fix flow director enabling' has been queued to stable release 19.11.3
  2020-05-27  9:24         ` [dpdk-stable] patch 'net/mvpp2: fix build with gcc 10' " luca.boccassi
                             ` (10 preceding siblings ...)
  2020-05-27  9:24           ` [dpdk-stable] patch 'net/ice: " luca.boccassi
@ 2020-05-27  9:24           ` luca.boccassi
  2020-05-27  9:24           ` [dpdk-stable] patch 'net/ixgbe: check driver type in MACsec API' " luca.boccassi
                             ` (5 subsequent siblings)
  17 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-27  9:24 UTC (permalink / raw)
  To: Wei Zhao; +Cc: Jeff Guo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/29/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 33189eecd08b48b12fc058b1b3fd38d33c0e55bb Mon Sep 17 00:00:00 2001
From: Wei Zhao <wei.zhao1@intel.com>
Date: Thu, 21 May 2020 16:03:06 +0800
Subject: [PATCH] net/i40e: fix flow director enabling

[ upstream commit be4ef2e0d09d5179e22d7574850d707d13713a87 ]

When we flush flow FDIR, all queues are disabled for FDIR.
If FDIR rule is created again, then the flow list is empty,
as it is the first time to create rule after flush fdir filter,
so we need to enable FDIR for all queues.
And also, disable FDIR for queues should be done in function
i40e_flow_flush_fdir_filter().

Fixes: 1491f63c7559 ("net/i40e: fix flush of flow director filter")
Fixes: 6ae9b2b5e8c2 ("net/i40e: cache flow director enable value in Rx queue")

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Reviewed-by: Jeff Guo <jia.guo@intel.com>
---
 drivers/net/i40e/i40e_flow.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index 9b5e797d59..a83543c26e 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -3224,6 +3224,10 @@ i40e_flow_parse_fdir_filter(struct rte_eth_dev *dev,
 		}
 	}
 
+	/* If create the first fdir rule, enable fdir check for rx queues */
+	if (TAILQ_EMPTY(&pf->fdir.fdir_list))
+		i40e_fdir_rx_proc_enable(dev, 1);
+
 	return 0;
 err:
 	i40e_fdir_teardown(pf);
@@ -4976,9 +4980,6 @@ i40e_flow_flush(struct rte_eth_dev *dev, struct rte_flow_error *error)
 		return -rte_errno;
 	}
 
-	/* Disable FDIR processing as all FDIR rules are now flushed */
-	i40e_fdir_rx_proc_enable(dev, 0);
-
 	return ret;
 }
 
@@ -5014,6 +5015,9 @@ i40e_flow_flush_fdir_filter(struct i40e_pf *pf)
 		for (pctype = I40E_FILTER_PCTYPE_NONF_IPV4_UDP;
 		     pctype <= I40E_FILTER_PCTYPE_L2_PAYLOAD; pctype++)
 			pf->fdir.inset_flag[pctype] = 0;
+
+		/* Disable FDIR processing as all FDIR rules are now flushed */
+		i40e_fdir_rx_proc_enable(dev, 0);
 	}
 
 	return ret;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-27 10:23:32.083805139 +0100
+++ 0013-net-i40e-fix-flow-director-enabling.patch	2020-05-27 10:23:31.647933907 +0100
@@ -1,8 +1,10 @@
-From be4ef2e0d09d5179e22d7574850d707d13713a87 Mon Sep 17 00:00:00 2001
+From 33189eecd08b48b12fc058b1b3fd38d33c0e55bb Mon Sep 17 00:00:00 2001
 From: Wei Zhao <wei.zhao1@intel.com>
 Date: Thu, 21 May 2020 16:03:06 +0800
 Subject: [PATCH] net/i40e: fix flow director enabling
 
+[ upstream commit be4ef2e0d09d5179e22d7574850d707d13713a87 ]
+
 When we flush flow FDIR, all queues are disabled for FDIR.
 If FDIR rule is created again, then the flow list is empty,
 as it is the first time to create rule after flush fdir filter,
@@ -12,7 +14,6 @@
 
 Fixes: 1491f63c7559 ("net/i40e: fix flush of flow director filter")
 Fixes: 6ae9b2b5e8c2 ("net/i40e: cache flow director enable value in Rx queue")
-Cc: stable@dpdk.org
 
 Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
 Reviewed-by: Jeff Guo <jia.guo@intel.com>
@@ -21,10 +22,10 @@
  1 file changed, 7 insertions(+), 3 deletions(-)
 
 diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
-index 25c77e7aa6..8f8df6fae9 100644
+index 9b5e797d59..a83543c26e 100644
 --- a/drivers/net/i40e/i40e_flow.c
 +++ b/drivers/net/i40e/i40e_flow.c
-@@ -3462,6 +3462,10 @@ i40e_flow_parse_fdir_filter(struct rte_eth_dev *dev,
+@@ -3224,6 +3224,10 @@ i40e_flow_parse_fdir_filter(struct rte_eth_dev *dev,
  		}
  	}
  
@@ -35,7 +36,7 @@
  	return 0;
  err:
  	i40e_fdir_teardown(pf);
-@@ -5330,9 +5334,6 @@ i40e_flow_flush(struct rte_eth_dev *dev, struct rte_flow_error *error)
+@@ -4976,9 +4980,6 @@ i40e_flow_flush(struct rte_eth_dev *dev, struct rte_flow_error *error)
  		return -rte_errno;
  	}
  
@@ -45,7 +46,7 @@
  	return ret;
  }
  
-@@ -5368,6 +5369,9 @@ i40e_flow_flush_fdir_filter(struct i40e_pf *pf)
+@@ -5014,6 +5015,9 @@ i40e_flow_flush_fdir_filter(struct i40e_pf *pf)
  		for (pctype = I40E_FILTER_PCTYPE_NONF_IPV4_UDP;
  		     pctype <= I40E_FILTER_PCTYPE_L2_PAYLOAD; pctype++)
  			pf->fdir.inset_flag[pctype] = 0;

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'net/ixgbe: check driver type in MACsec API' has been queued to stable release 19.11.3
  2020-05-27  9:24         ` [dpdk-stable] patch 'net/mvpp2: fix build with gcc 10' " luca.boccassi
                             ` (11 preceding siblings ...)
  2020-05-27  9:24           ` [dpdk-stable] patch 'net/i40e: fix flow director enabling' " luca.boccassi
@ 2020-05-27  9:24           ` luca.boccassi
  2020-05-27  9:24           ` [dpdk-stable] patch 'examples/kni: fix crash during MTU set' " luca.boccassi
                             ` (4 subsequent siblings)
  17 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-27  9:24 UTC (permalink / raw)
  To: Guinan Sun; +Cc: Kevin Traynor, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/29/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From d9da460ee380cead77aee168c9db8a27312b48df Mon Sep 17 00:00:00 2001
From: Guinan Sun <guinanx.sun@intel.com>
Date: Fri, 22 May 2020 05:59:55 +0000
Subject: [PATCH] net/ixgbe: check driver type in MACsec API

[ upstream commit dd8384a4f5dd7e04cd3bc7ded0f0a6d9c79d25b4 ]

The driver type need to be checked in private API.

Fixes: 50556c88104c ("net/ixgbe: fix MACsec setting")

Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/ixgbe/rte_pmd_ixgbe.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe.c b/drivers/net/ixgbe/rte_pmd_ixgbe.c
index 8bcaded6e5..9bff557f97 100644
--- a/drivers/net/ixgbe/rte_pmd_ixgbe.c
+++ b/drivers/net/ixgbe/rte_pmd_ixgbe.c
@@ -522,6 +522,9 @@ rte_pmd_ixgbe_macsec_enable(uint16_t port, uint8_t en, uint8_t rp)
 
 	dev = &rte_eth_devices[port];
 
+	if (!is_ixgbe_supported(dev))
+		return -ENOTSUP;
+
 	macsec_setting.offload_en = 1;
 	macsec_setting.encrypt_en = en;
 	macsec_setting.replayprotect_en = rp;
@@ -542,6 +545,9 @@ rte_pmd_ixgbe_macsec_disable(uint16_t port)
 
 	dev = &rte_eth_devices[port];
 
+	if (!is_ixgbe_supported(dev))
+		return -ENOTSUP;
+
 	ixgbe_dev_macsec_setting_reset(dev);
 
 	ixgbe_dev_macsec_register_disable(dev);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-27 10:23:32.120579905 +0100
+++ 0014-net-ixgbe-check-driver-type-in-MACsec-API.patch	2020-05-27 10:23:31.647933907 +0100
@@ -1,12 +1,13 @@
-From dd8384a4f5dd7e04cd3bc7ded0f0a6d9c79d25b4 Mon Sep 17 00:00:00 2001
+From d9da460ee380cead77aee168c9db8a27312b48df Mon Sep 17 00:00:00 2001
 From: Guinan Sun <guinanx.sun@intel.com>
 Date: Fri, 22 May 2020 05:59:55 +0000
 Subject: [PATCH] net/ixgbe: check driver type in MACsec API
 
+[ upstream commit dd8384a4f5dd7e04cd3bc7ded0f0a6d9c79d25b4 ]
+
 The driver type need to be checked in private API.
 
 Fixes: 50556c88104c ("net/ixgbe: fix MACsec setting")
-Cc: stable@dpdk.org
 
 Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
 Acked-by: Kevin Traynor <ktraynor@redhat.com>

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'examples/kni: fix crash during MTU set' has been queued to stable release 19.11.3
  2020-05-27  9:24         ` [dpdk-stable] patch 'net/mvpp2: fix build with gcc 10' " luca.boccassi
                             ` (12 preceding siblings ...)
  2020-05-27  9:24           ` [dpdk-stable] patch 'net/ixgbe: check driver type in MACsec API' " luca.boccassi
@ 2020-05-27  9:24           ` luca.boccassi
  2020-05-27  9:24           ` [dpdk-stable] patch 'examples/ip_pipeline: remove check of null response' " luca.boccassi
                             ` (3 subsequent siblings)
  17 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-27  9:24 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Rasesh Mody, Xi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/29/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 1b2d70662c00013a0157f8dc809f0ff600b33ceb Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Thu, 21 May 2020 16:10:42 +0100
Subject: [PATCH] examples/kni: fix crash during MTU set

[ upstream commit 36f9eba4710b521b95d72f0e65e85f38c1cff9b5 ]

During MTU set (kni_change_mtu) sample application setup queues, which
can free and re-allocate queues.
Meanwhile sample application keeps continues in Rx/Tx burst calls in
different threads, which may cause crash during queue setup.

Pausing application Rx/Tx calls before MTU set and starts it back
afterwards.

Bugzilla ID: 482
Fixes: a26b116749a3 ("examples/kni: fix MTU change to setup Tx queue")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Rasesh Mody <rmody@marvell.com>
Tested-by: Xi Zhang <xix.zhang@intel.com>
---
 examples/kni/main.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/examples/kni/main.c b/examples/kni/main.c
index b2866238fd..d48a59fcb1 100644
--- a/examples/kni/main.c
+++ b/examples/kni/main.c
@@ -764,9 +764,8 @@ monitor_all_ports_link_status(void *arg)
 	return NULL;
 }
 
-/* Callback for request of changing MTU */
 static int
-kni_change_mtu(uint16_t port_id, unsigned int new_mtu)
+kni_change_mtu_(uint16_t port_id, unsigned int new_mtu)
 {
 	int ret;
 	uint16_t nb_rxd = NB_RXD;
@@ -847,6 +846,19 @@ kni_change_mtu(uint16_t port_id, unsigned int new_mtu)
 	return 0;
 }
 
+/* Callback for request of changing MTU */
+static int
+kni_change_mtu(uint16_t port_id, unsigned int new_mtu)
+{
+	int ret;
+
+	rte_atomic32_inc(&kni_pause);
+	ret =  kni_change_mtu_(port_id, new_mtu);
+	rte_atomic32_dec(&kni_pause);
+
+	return ret;
+}
+
 /* Callback for request of configuring network interface up/down */
 static int
 kni_config_network_interface(uint16_t port_id, uint8_t if_up)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-27 10:23:32.152216439 +0100
+++ 0015-examples-kni-fix-crash-during-MTU-set.patch	2020-05-27 10:23:31.647933907 +0100
@@ -1,8 +1,10 @@
-From 36f9eba4710b521b95d72f0e65e85f38c1cff9b5 Mon Sep 17 00:00:00 2001
+From 1b2d70662c00013a0157f8dc809f0ff600b33ceb Mon Sep 17 00:00:00 2001
 From: Ferruh Yigit <ferruh.yigit@intel.com>
 Date: Thu, 21 May 2020 16:10:42 +0100
 Subject: [PATCH] examples/kni: fix crash during MTU set
 
+[ upstream commit 36f9eba4710b521b95d72f0e65e85f38c1cff9b5 ]
+
 During MTU set (kni_change_mtu) sample application setup queues, which
 can free and re-allocate queues.
 Meanwhile sample application keeps continues in Rx/Tx burst calls in
@@ -13,7 +15,6 @@
 
 Bugzilla ID: 482
 Fixes: a26b116749a3 ("examples/kni: fix MTU change to setup Tx queue")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
 Acked-by: Rasesh Mody <rmody@marvell.com>
@@ -23,10 +24,10 @@
  1 file changed, 14 insertions(+), 2 deletions(-)
 
 diff --git a/examples/kni/main.c b/examples/kni/main.c
-index 7a927a50c0..80dd0353e7 100644
+index b2866238fd..d48a59fcb1 100644
 --- a/examples/kni/main.c
 +++ b/examples/kni/main.c
-@@ -768,9 +768,8 @@ monitor_all_ports_link_status(void *arg)
+@@ -764,9 +764,8 @@ monitor_all_ports_link_status(void *arg)
  	return NULL;
  }
  
@@ -37,7 +38,7 @@
  {
  	int ret;
  	uint16_t nb_rxd = NB_RXD;
-@@ -851,6 +850,19 @@ kni_change_mtu(uint16_t port_id, unsigned int new_mtu)
+@@ -847,6 +846,19 @@ kni_change_mtu(uint16_t port_id, unsigned int new_mtu)
  	return 0;
  }
  

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'examples/ip_pipeline: remove check of null response' has been queued to stable release 19.11.3
  2020-05-27  9:24         ` [dpdk-stable] patch 'net/mvpp2: fix build with gcc 10' " luca.boccassi
                             ` (13 preceding siblings ...)
  2020-05-27  9:24           ` [dpdk-stable] patch 'examples/kni: fix crash during MTU set' " luca.boccassi
@ 2020-05-27  9:24           ` luca.boccassi
  2020-05-27  9:24           ` [dpdk-stable] patch 'doc: fix typo in contributors guide' " luca.boccassi
                             ` (2 subsequent siblings)
  17 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-27  9:24 UTC (permalink / raw)
  To: Jasvinder Singh; +Cc: Cristian Dumitrescu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/29/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 029c527ef48b34c20436d2306487c3b288d2c778 Mon Sep 17 00:00:00 2001
From: Jasvinder Singh <jasvinder.singh@intel.com>
Date: Mon, 27 Apr 2020 17:56:49 +0100
Subject: [PATCH] examples/ip_pipeline: remove check of null response

[ upstream commit 358eb13389070b34809f478678351ab99f813e5b ]

For sending request messages to data plane threads, the
caller invokes *_msg_send_recv() functions which never
return null response. Thus, removed redundant check on
the returned response.

Coverity issue: 357750, 357740, 357749, 357758, 357702, 357736
Coverity issue: 357679, 357791, 357738, 357778, 357716, 357705
Coverity issue: 357776, 357753, 357729, 357735, 357773, 357723
Fixes: 32e5d9b154cb ("examples/ip_pipeline: add enable and disable commands")
Fixes: 50e73d051806 ("examples/ip_pipeline: add stats read commands")
Fixes: 6b1b3c3c9d30 ("examples/ip_pipeline: add port enable and disable commands")
Fixes: a3a95b7d58b9 ("examples/ip_pipeline: add table entry commands")
Fixes: 3186282f8e12 ("examples/ip_pipeline: add table bulk add command")
Fixes: f634e4c5698a ("examples/ip_pipeline: add table entry delete command")
Fixes: c64b9121a963 ("examples/ip_pipeline: add table entry stats command")
Fixes: 7e11393e40ef ("examples/ip_pipeline: add meter profile commands")
Fixes: e92058d604e6 ("examples/ip_pipeline: add meter stats command")
Fixes: 2b82ef4861c0 ("examples/ip_pipeline: add DSCP table update command")
Fixes: d0d306c7f2a1 ("examples/ip_pipeline: add TTL stats command")
Fixes: a3169ee5ec59 ("examples/ip_pipeline: support rule time read")

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
 examples/ip_pipeline/thread.c | 44 -----------------------------------
 1 file changed, 44 deletions(-)

diff --git a/examples/ip_pipeline/thread.c b/examples/ip_pipeline/thread.c
index 272fbbeed1..adb83167cd 100644
--- a/examples/ip_pipeline/thread.c
+++ b/examples/ip_pipeline/thread.c
@@ -325,8 +325,6 @@ thread_pipeline_enable(uint32_t thread_id,
 
 	/* Send request and wait for response */
 	rsp = thread_msg_send_recv(thread_id, req);
-	if (rsp == NULL)
-		return -1;
 
 	/* Read response */
 	status = rsp->status;
@@ -412,8 +410,6 @@ thread_pipeline_disable(uint32_t thread_id,
 
 	/* Send request and wait for response */
 	rsp = thread_msg_send_recv(thread_id, req);
-	if (rsp == NULL)
-		return -1;
 
 	/* Read response */
 	status = rsp->status;
@@ -815,8 +811,6 @@ pipeline_port_in_stats_read(const char *pipeline_name,
 
 	/* Send request and wait for response */
 	rsp = pipeline_msg_send_recv(p, req);
-	if (rsp == NULL)
-		return -1;
 
 	/* Read response */
 	status = rsp->status;
@@ -863,8 +857,6 @@ pipeline_port_in_enable(const char *pipeline_name,
 
 	/* Send request and wait for response */
 	rsp = pipeline_msg_send_recv(p, req);
-	if (rsp == NULL)
-		return -1;
 
 	/* Read response */
 	status = rsp->status;
@@ -909,8 +901,6 @@ pipeline_port_in_disable(const char *pipeline_name,
 
 	/* Send request and wait for response */
 	rsp = pipeline_msg_send_recv(p, req);
-	if (rsp == NULL)
-		return -1;
 
 	/* Read response */
 	status = rsp->status;
@@ -963,8 +953,6 @@ pipeline_port_out_stats_read(const char *pipeline_name,
 
 	/* Send request and wait for response */
 	rsp = pipeline_msg_send_recv(p, req);
-	if (rsp == NULL)
-		return -1;
 
 	/* Read response */
 	status = rsp->status;
@@ -1019,8 +1007,6 @@ pipeline_table_stats_read(const char *pipeline_name,
 
 	/* Send request and wait for response */
 	rsp = pipeline_msg_send_recv(p, req);
-	if (rsp == NULL)
-		return -1;
 
 	/* Read response */
 	status = rsp->status;
@@ -1436,10 +1422,6 @@ pipeline_table_rule_add(const char *pipeline_name,
 
 	/* Send request and wait for response */
 	rsp = pipeline_msg_send_recv(p, req);
-	if (rsp == NULL) {
-		free(rule);
-		return -1;
-	}
 
 	/* Read response */
 	status = rsp->status;
@@ -1538,10 +1520,6 @@ pipeline_table_rule_add_default(const char *pipeline_name,
 
 	/* Send request and wait for response */
 	rsp = pipeline_msg_send_recv(p, req);
-	if (rsp == NULL) {
-		free(rule);
-		return -1;
-	}
 
 	/* Read response */
 	status = rsp->status;
@@ -1655,10 +1633,6 @@ pipeline_table_rule_add_bulk(const char *pipeline_name,
 
 	/* Send request and wait for response */
 	rsp = pipeline_msg_send_recv(p, req);
-	if (rsp == NULL) {
-		table_rule_list_free(list);
-		return -ENOMEM;
-	}
 
 	/* Read response */
 	status = rsp->status;
@@ -1733,8 +1707,6 @@ pipeline_table_rule_delete(const char *pipeline_name,
 
 	/* Send request and wait for response */
 	rsp = pipeline_msg_send_recv(p, req);
-	if (rsp == NULL)
-		return -1;
 
 	/* Read response */
 	status = rsp->status;
@@ -1790,8 +1762,6 @@ pipeline_table_rule_delete_default(const char *pipeline_name,
 
 	/* Send request and wait for response */
 	rsp = pipeline_msg_send_recv(p, req);
-	if (rsp == NULL)
-		return -1;
 
 	/* Read response */
 	status = rsp->status;
@@ -1857,8 +1827,6 @@ pipeline_table_rule_stats_read(const char *pipeline_name,
 
 	/* Send request and wait for response */
 	rsp = pipeline_msg_send_recv(p, req);
-	if (rsp == NULL)
-		return -1;
 
 	/* Read response */
 	status = rsp->status;
@@ -1915,8 +1883,6 @@ pipeline_table_mtr_profile_add(const char *pipeline_name,
 
 	/* Send request and wait for response */
 	rsp = pipeline_msg_send_recv(p, req);
-	if (rsp == NULL)
-		return -1;
 
 	/* Read response */
 	status = rsp->status;
@@ -1967,8 +1933,6 @@ pipeline_table_mtr_profile_delete(const char *pipeline_name,
 
 	/* Send request and wait for response */
 	rsp = pipeline_msg_send_recv(p, req);
-	if (rsp == NULL)
-		return -1;
 
 	/* Read response */
 	status = rsp->status;
@@ -2037,8 +2001,6 @@ pipeline_table_rule_mtr_read(const char *pipeline_name,
 
 	/* Send request and wait for response */
 	rsp = pipeline_msg_send_recv(p, req);
-	if (rsp == NULL)
-		return -1;
 
 	/* Read response */
 	status = rsp->status;
@@ -2096,8 +2058,6 @@ pipeline_table_dscp_table_update(const char *pipeline_name,
 
 	/* Send request and wait for response */
 	rsp = pipeline_msg_send_recv(p, req);
-	if (rsp == NULL)
-		return -1;
 
 	/* Read response */
 	status = rsp->status;
@@ -2164,8 +2124,6 @@ pipeline_table_rule_ttl_read(const char *pipeline_name,
 
 	/* Send request and wait for response */
 	rsp = pipeline_msg_send_recv(p, req);
-	if (rsp == NULL)
-		return -1;
 
 	/* Read response */
 	status = rsp->status;
@@ -2229,8 +2187,6 @@ pipeline_table_rule_time_read(const char *pipeline_name,
 
 	/* Send request and wait for response */
 	rsp = pipeline_msg_send_recv(p, req);
-	if (rsp == NULL)
-		return -1;
 
 	/* Read response */
 	status = rsp->status;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-27 10:23:32.185445631 +0100
+++ 0016-examples-ip_pipeline-remove-check-of-null-response.patch	2020-05-27 10:23:31.651933946 +0100
@@ -1,8 +1,10 @@
-From 358eb13389070b34809f478678351ab99f813e5b Mon Sep 17 00:00:00 2001
+From 029c527ef48b34c20436d2306487c3b288d2c778 Mon Sep 17 00:00:00 2001
 From: Jasvinder Singh <jasvinder.singh@intel.com>
 Date: Mon, 27 Apr 2020 17:56:49 +0100
 Subject: [PATCH] examples/ip_pipeline: remove check of null response
 
+[ upstream commit 358eb13389070b34809f478678351ab99f813e5b ]
+
 For sending request messages to data plane threads, the
 caller invokes *_msg_send_recv() functions which never
 return null response. Thus, removed redundant check on
@@ -23,7 +25,6 @@
 Fixes: 2b82ef4861c0 ("examples/ip_pipeline: add DSCP table update command")
 Fixes: d0d306c7f2a1 ("examples/ip_pipeline: add TTL stats command")
 Fixes: a3169ee5ec59 ("examples/ip_pipeline: support rule time read")
-Cc: stable@dpdk.org
 
 Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
 Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'doc: fix typo in contributors guide' has been queued to stable release 19.11.3
  2020-05-27  9:24         ` [dpdk-stable] patch 'net/mvpp2: fix build with gcc 10' " luca.boccassi
                             ` (14 preceding siblings ...)
  2020-05-27  9:24           ` [dpdk-stable] patch 'examples/ip_pipeline: remove check of null response' " luca.boccassi
@ 2020-05-27  9:24           ` luca.boccassi
  2020-05-27  9:24           ` luca.boccassi
  2020-05-27  9:24           ` [dpdk-stable] patch 'doc: prefer https when pointing to dpdk.org' " luca.boccassi
  17 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-27  9:24 UTC (permalink / raw)
  To: Sarosh Arif; +Cc: John McNamara, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/29/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From e9aeb99c93e7dafef71b5da55ce2ec6ebebf560a Mon Sep 17 00:00:00 2001
From: Sarosh Arif <sarosh.arif@emumba.com>
Date: Sat, 21 Mar 2020 23:06:54 +0500
Subject: [PATCH] doc: fix typo in contributors guide

[ upstream commit e37348d7a6c8cb36524910f029e9b1fa855845aa ]

Bugzilla ID: 420
Fixes: 58abf6e77c6b ("doc: add contributors guide")

Signed-off-by: Sarosh Arif <sarosh.arif@emumba.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
---
 doc/guides/contributing/patches.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/guides/contributing/patches.rst b/doc/guides/contributing/patches.rst
index 0686450e45..acdef7fa93 100644
--- a/doc/guides/contributing/patches.rst
+++ b/doc/guides/contributing/patches.rst
@@ -423,7 +423,7 @@ are loaded from the following files, in order of preference::
    ~/.config/dpdk/devel.config
    /etc/dpdk/devel.config.
 
-Once the environment variable the script can be run as follows::
+Once the environment variable is set, the script can be run as follows::
 
    devtools/checkpatches.sh ~/patch/
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-27 10:23:32.218684650 +0100
+++ 0017-doc-fix-typo-in-contributors-guide.patch	2020-05-27 10:23:31.651933946 +0100
@@ -1,11 +1,12 @@
-From e37348d7a6c8cb36524910f029e9b1fa855845aa Mon Sep 17 00:00:00 2001
+From e9aeb99c93e7dafef71b5da55ce2ec6ebebf560a Mon Sep 17 00:00:00 2001
 From: Sarosh Arif <sarosh.arif@emumba.com>
 Date: Sat, 21 Mar 2020 23:06:54 +0500
 Subject: [PATCH] doc: fix typo in contributors guide
 
+[ upstream commit e37348d7a6c8cb36524910f029e9b1fa855845aa ]
+
 Bugzilla ID: 420
 Fixes: 58abf6e77c6b ("doc: add contributors guide")
-Cc: stable@dpdk.org
 
 Signed-off-by: Sarosh Arif <sarosh.arif@emumba.com>
 Acked-by: John McNamara <john.mcnamara@intel.com>
@@ -14,7 +15,7 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/doc/guides/contributing/patches.rst b/doc/guides/contributing/patches.rst
-index e6a934846e..5e6faa0c63 100644
+index 0686450e45..acdef7fa93 100644
 --- a/doc/guides/contributing/patches.rst
 +++ b/doc/guides/contributing/patches.rst
 @@ -423,7 +423,7 @@ are loaded from the following files, in order of preference::

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'doc: fix typo in contributors guide' has been queued to stable release 19.11.3
  2020-05-27  9:24         ` [dpdk-stable] patch 'net/mvpp2: fix build with gcc 10' " luca.boccassi
                             ` (15 preceding siblings ...)
  2020-05-27  9:24           ` [dpdk-stable] patch 'doc: fix typo in contributors guide' " luca.boccassi
@ 2020-05-27  9:24           ` luca.boccassi
  2020-05-27  9:24           ` [dpdk-stable] patch 'doc: prefer https when pointing to dpdk.org' " luca.boccassi
  17 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-27  9:24 UTC (permalink / raw)
  To: Muhammad Bilal; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/29/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 130830b165956abce43c68caf42c745e40219ba6 Mon Sep 17 00:00:00 2001
From: Muhammad Bilal <m.bilal@emumba.com>
Date: Thu, 26 Mar 2020 10:46:54 +0500
Subject: [PATCH] doc: fix typo in contributors guide

[ upstream commit ba8af67fcd7aea9f0d4956bc58b15c71d3319744 ]

Bugzilla ID: 422
Fixes: 9e0e4a00df77 ("doc: suggest to keep doc and code in same patch")

Signed-off-by: Muhammad Bilal <m.bilal@emumba.com>
---
 doc/guides/contributing/patches.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/guides/contributing/patches.rst b/doc/guides/contributing/patches.rst
index acdef7fa93..e5c565b984 100644
--- a/doc/guides/contributing/patches.rst
+++ b/doc/guides/contributing/patches.rst
@@ -182,7 +182,7 @@ A good way of thinking about whether a patch should be split is to consider whet
 applied without dependencies as a backport.
 
 It is better to keep the related documentation changes in the same patch
-file as the code, rather than one big documentation patch at then end of a
+file as the code, rather than one big documentation patch at the end of a
 patchset. This makes it easier for future maintenance and development of the
 code.
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-27 10:23:32.251503903 +0100
+++ 0018-doc-fix-typo-in-contributors-guide.patch	2020-05-27 10:23:31.655933983 +0100
@@ -1,11 +1,12 @@
-From ba8af67fcd7aea9f0d4956bc58b15c71d3319744 Mon Sep 17 00:00:00 2001
+From 130830b165956abce43c68caf42c745e40219ba6 Mon Sep 17 00:00:00 2001
 From: Muhammad Bilal <m.bilal@emumba.com>
 Date: Thu, 26 Mar 2020 10:46:54 +0500
 Subject: [PATCH] doc: fix typo in contributors guide
 
+[ upstream commit ba8af67fcd7aea9f0d4956bc58b15c71d3319744 ]
+
 Bugzilla ID: 422
 Fixes: 9e0e4a00df77 ("doc: suggest to keep doc and code in same patch")
-Cc: stable@dpdk.org
 
 Signed-off-by: Muhammad Bilal <m.bilal@emumba.com>
 ---
@@ -13,7 +14,7 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/doc/guides/contributing/patches.rst b/doc/guides/contributing/patches.rst
-index 5e6faa0c63..01e0a2f6ba 100644
+index acdef7fa93..e5c565b984 100644
 --- a/doc/guides/contributing/patches.rst
 +++ b/doc/guides/contributing/patches.rst
 @@ -182,7 +182,7 @@ A good way of thinking about whether a patch should be split is to consider whet

^ permalink raw reply	[flat|nested] 371+ messages in thread

* [dpdk-stable] patch 'doc: prefer https when pointing to dpdk.org' has been queued to stable release 19.11.3
  2020-05-27  9:24         ` [dpdk-stable] patch 'net/mvpp2: fix build with gcc 10' " luca.boccassi
                             ` (16 preceding siblings ...)
  2020-05-27  9:24           ` luca.boccassi
@ 2020-05-27  9:24           ` luca.boccassi
  17 siblings, 0 replies; 371+ messages in thread
From: luca.boccassi @ 2020-05-27  9:24 UTC (permalink / raw)
  To: David Marchand; +Cc: Kevin Traynor, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/29/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 106dddaf877636331d25b24a0e7085c544e84ed2 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 19 Mar 2020 09:28:59 +0100
Subject: [PATCH] doc: prefer https when pointing to dpdk.org

[ upstream commit 3d4b2afb73f7f0988f8e66ba1b37f2a446e33868 ]

for file in $(git grep -l http://.*dpdk.org doc/); do
  sed -i -e 's#http://\(.*dpdk.org\)#https://\1#g' $file;
done

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
---
 devtools/checkpatches.sh                         |  8 ++++++++
 doc/guides/contributing/documentation.rst        | 12 ++++++------
 doc/guides/contributing/patches.rst              | 16 ++++++++--------
 doc/guides/contributing/stable.rst               |  8 ++++----
 doc/guides/contributing/vulnerability.rst        |  6 +++---
 doc/guides/freebsd_gsg/install_from_ports.rst    |  2 +-
 doc/guides/linux_gsg/nic_perf_intel_platform.rst |  2 +-
 doc/guides/nics/enic.rst                         |  2 +-
 doc/guides/prog_guide/cryptodev_lib.rst          |  2 +-
 9 files changed, 33 insertions(+), 25 deletions(-)

diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
index b16bace927..9902e2a9bc 100755
--- a/devtools/checkpatches.sh
+++ b/devtools/checkpatches.sh
@@ -70,6 +70,14 @@ check_forbidden_additions() { # <patch>
 		-f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \
 		"$1" || res=1
 
+	# links must prefer https over http
+	awk -v FOLDERS='doc' \
+		-v EXPRESSIONS='http://.*dpdk.org' \
+		-v RET_ON_FAIL=1 \
+		-v MESSAGE='Using non https link to dpdk.org' \
+		-f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \
+		"$1" || res=1
+
 	return $res
 }
 
diff --git a/doc/guides/contributing/documentation.rst b/doc/guides/contributing/documentation.rst
index 27e4b13be1..3924771cf0 100644
--- a/doc/guides/contributing/documentation.rst
+++ b/doc/guides/contributing/documentation.rst
@@ -82,7 +82,7 @@ added to by the developer.
 * **API documentation**
 
   The API documentation explains how to use the public DPDK functions.
-  The `API index page <http://doc.dpdk.org/api/>`_ shows the generated API documentation with related groups of functions.
+  The `API index page <https://doc.dpdk.org/api/>`_ shows the generated API documentation with related groups of functions.
 
   The API documentation should be updated via Doxygen comments when new functions are added.
 
@@ -561,14 +561,14 @@ Hyperlinks
 ~~~~~~~~~~
 
 * Links to external websites can be plain URLs.
-  The following is rendered as http://dpdk.org::
+  The following is rendered as https://dpdk.org::
 
-     http://dpdk.org
+     https://dpdk.org
 
 * They can contain alternative text.
-  The following is rendered as `Check out DPDK <http://dpdk.org>`_::
+  The following is rendered as `Check out DPDK <https://dpdk.org>`_::
 
-     `Check out DPDK <http://dpdk.org>`_
+     `Check out DPDK <https://dpdk.org>`_
 
 * An internal link can be generated by placing labels in the document with the format ``.. _label_name``.
 
@@ -666,7 +666,7 @@ The following are some guidelines for use of Doxygen in the DPDK API documentati
        */
 
   In the API documentation the functions will be rendered as links, see the
-  `online section of the rte_ethdev.h docs <http://doc.dpdk.org/api/rte__ethdev_8h.html>`_ that contains the above text.
+  `online section of the rte_ethdev.h docs <https://doc.dpdk.org/api/rte__ethdev_8h.html>`_ that contains the above text.
 
 * The ``@see`` keyword can be used to create a *see also* link to another file or library.
   This directive should be placed on one line at the bottom of the documentation section.
diff --git a/doc/guides/contributing/patches.rst b/doc/guides/contributing/patches.rst
index e5c565b984..5ca037757e 100644
--- a/doc/guides/contributing/patches.rst
+++ b/doc/guides/contributing/patches.rst
@@ -28,9 +28,9 @@ The DPDK development process has the following features:
 * All sub-repositories are merged into main repository for ``-rc1`` and ``-rc2`` versions of the release.
 * After the ``-rc2`` release all patches should target the main repository.
 
-The mailing list for DPDK development is `dev@dpdk.org <http://mails.dpdk.org/archives/dev/>`_.
-Contributors will need to `register for the mailing list <http://mails.dpdk.org/listinfo/dev>`_ in order to submit patches.
-It is also worth registering for the DPDK `Patchwork <http://patches.dpdk.org/project/dpdk/list/>`_
+The mailing list for DPDK development is `dev@dpdk.org <https://mails.dpdk.org/archives/dev/>`_.
+Contributors will need to `register for the mailing list <https://mails.dpdk.org/listinfo/dev>`_ in order to submit patches.
+It is also worth registering for the DPDK `Patchwork <https://patches.dpdk.org/project/dpdk/list/>`_
 
 If you are using the GitHub service, you can link your repository to
 the ``travis-ci.org`` build service.  When you push patches to your GitHub
@@ -130,12 +130,12 @@ The source code can be cloned using either of the following:
 main repository::
 
     git clone git://dpdk.org/dpdk
-    git clone http://dpdk.org/git/dpdk
+    git clone https://dpdk.org/git/dpdk
 
-sub-repositories (`list <http://git.dpdk.org/next>`_)::
+sub-repositories (`list <https://git.dpdk.org/next>`_)::
 
     git clone git://dpdk.org/next/dpdk-next-*
-    git clone http://dpdk.org/git/next/dpdk-next-*
+    git clone https://dpdk.org/git/next/dpdk-next-*
 
 Make your Changes
 -----------------
@@ -320,7 +320,7 @@ Patch for Stable Releases
 ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 All fix patches to the master branch that are candidates for backporting
-should also be CCed to the `stable@dpdk.org <http://mails.dpdk.org/listinfo/stable>`_
+should also be CCed to the `stable@dpdk.org <https://mails.dpdk.org/listinfo/stable>`_
 mailing list.
 In the commit message body the Cc: stable@dpdk.org should be inserted as follows::
 
@@ -548,7 +548,7 @@ If the patch is in relation to a previous email thread you can add it to the sam
    git send-email --to dev@dpdk.org --in-reply-to <1234-foo@bar.com> 000*.patch
 
 The Message ID can be found in the raw text of emails or at the top of each Patchwork patch,
-`for example <http://patches.dpdk.org/patch/7646/>`_.
+`for example <https://patches.dpdk.org/patch/7646/>`_.
 Shallow threading (``--thread --no-chain-reply-to``) is preferred for a patch series.
 
 Once submitted your patches will appear on the mailing list and in Patchwork.
diff --git a/doc/guides/contributing/stable.rst b/doc/guides/contributing/stable.rst
index 4d38bb8606..021c762fc6 100644
--- a/doc/guides/contributing/stable.rst
+++ b/doc/guides/contributing/stable.rst
@@ -51,7 +51,7 @@ agreement and a commitment from a maintainer. The current policy is that each
 year's November (X.11) release will be maintained as an LTS for 2 years.
 
 After the X.11 release, an LTS branch will be created for it at
-http://git.dpdk.org/dpdk-stable where bugfixes will be backported to.
+https://git.dpdk.org/dpdk-stable where bugfixes will be backported to.
 
 A LTS release may align with the declaration of a new major ABI version,
 please read the :doc:`abi_policy` for more information.
@@ -107,7 +107,7 @@ The Stable and LTS release are coordinated on the stable@dpdk.org mailing
 list.
 
 All fix patches to the master branch that are candidates for backporting
-should also be CCed to the `stable@dpdk.org <http://mails.dpdk.org/listinfo/stable>`_
+should also be CCed to the `stable@dpdk.org <https://mails.dpdk.org/listinfo/stable>`_
 mailing list.
 
 
@@ -118,7 +118,7 @@ A Stable Release will be released by:
 
 * Tagging the release with YY.MM.n (year, month, number).
 * Uploading a tarball of the release to dpdk.org.
-* Sending an announcement to the `announce@dpdk.org <http://mails.dpdk.org/listinfo/announce>`_
+* Sending an announcement to the `announce@dpdk.org <https://mails.dpdk.org/listinfo/announce>`_
   list.
 
-Stable releases are available on the `dpdk.org download page <http://core.dpdk.org/download/>`_.
+Stable releases are available on the `dpdk.org download page <https://core.dpdk.org/download/>`_.
diff --git a/doc/guides/contributing/vulnerability.rst b/doc/guides/contributing/vulnerability.rst
index 5484119d19..da00acd4f0 100644
--- a/doc/guides/contributing/vulnerability.rst
+++ b/doc/guides/contributing/vulnerability.rst
@@ -36,11 +36,11 @@ Report
 
 Do not use Bugzilla (unsecured).
 Instead, send GPG-encrypted emails
-to `security@dpdk.org <http://core.dpdk.org/security#contact>`_.
+to `security@dpdk.org <https://core.dpdk.org/security#contact>`_.
 Anyone can post to this list.
 In order to reduce the disclosure of a vulnerability in the early stages,
 membership of this list is intentionally limited to a `small number of people
-<http://mails.dpdk.org/roster/security>`_.
+<https://mails.dpdk.org/roster/security>`_.
 
 It is additionally encouraged to GPG-sign one-on-one conversations
 as part of the security process.
@@ -188,7 +188,7 @@ Downstream stakeholders are expected not to deploy or disclose patches
 until the embargo is passed, otherwise they will be removed from the list.
 
 Downstream stakeholders (in `security-prerelease list
-<http://mails.dpdk.org/roster/security-prerelease>`_), are:
+<https://mails.dpdk.org/roster/security-prerelease>`_), are:
 
 * Operating system vendors known to package DPDK
 * Major DPDK users, considered trustworthy by the technical board, who
diff --git a/doc/guides/freebsd_gsg/install_from_ports.rst b/doc/guides/freebsd_gsg/install_from_ports.rst
index 29f16cc6c5..dce028bc62 100644
--- a/doc/guides/freebsd_gsg/install_from_ports.rst
+++ b/doc/guides/freebsd_gsg/install_from_ports.rst
@@ -62,7 +62,7 @@ environmental variables should be set as below:
 .. note::
 
    To install a copy of the DPDK compiled using gcc, please download the
-   official DPDK package from http://core.dpdk.org/download/ and install manually using
+   official DPDK package from https://core.dpdk.org/download/ and install manually using
    the instructions given in the next chapter, :ref:`building_from_source`
 
 An example application can therefore be copied to a user's home directory and
diff --git a/doc/guides/linux_gsg/nic_perf_intel_platform.rst b/doc/guides/linux_gsg/nic_perf_intel_platform.rst
index c554c2159c..1dabbce244 100644
--- a/doc/guides/linux_gsg/nic_perf_intel_platform.rst
+++ b/doc/guides/linux_gsg/nic_perf_intel_platform.rst
@@ -64,7 +64,7 @@ This aligns with the previous output which showed that each channel has one memo
 Network Interface Card Requirements
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-Use a `DPDK supported <http://core.dpdk.org/supported/>`_ high end NIC such as the Intel XL710 40GbE.
+Use a `DPDK supported <https://core.dpdk.org/supported/>`_ high end NIC such as the Intel XL710 40GbE.
 
 Make sure each NIC has been flashed the latest version of NVM/firmware.
 
diff --git a/doc/guides/nics/enic.rst b/doc/guides/nics/enic.rst
index 65e536d422..24d2b5713a 100644
--- a/doc/guides/nics/enic.rst
+++ b/doc/guides/nics/enic.rst
@@ -14,7 +14,7 @@ How to obtain ENIC PMD integrated DPDK
 --------------------------------------
 
 ENIC PMD support is integrated into the DPDK suite. dpdk-<version>.tar.gz
-should be downloaded from http://core.dpdk.org/download/
+should be downloaded from https://core.dpdk.org/download/
 
 
 Configuration information
diff --git a/doc/guides/prog_guide/cryptodev_lib.rst b/doc/guides/prog_guide/cryptodev_lib.rst
index ac16437740..c839379885 100644
--- a/doc/guides/prog_guide/cryptodev_lib.rst
+++ b/doc/guides/prog_guide/cryptodev_lib.rst
@@ -1097,4 +1097,4 @@ Asymmetric Crypto Device API
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 The cryptodev Library API is described in the
-`DPDK API Reference <http://doc.dpdk.org/api/>`_
+`DPDK API Reference <https://doc.dpdk.org/api/>`_
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-27 10:23:32.282826964 +0100
+++ 0019-doc-prefer-https-when-pointing-to-dpdk.org.patch	2020-05-27 10:23:31.659934021 +0100
@@ -1,14 +1,14 @@
-From 3d4b2afb73f7f0988f8e66ba1b37f2a446e33868 Mon Sep 17 00:00:00 2001
+From 106dddaf877636331d25b24a0e7085c544e84ed2 Mon Sep 17 00:00:00 2001
 From: David Marchand <david.marchand@redhat.com>
 Date: Thu, 19 Mar 2020 09:28:59 +0100
 Subject: [PATCH] doc: prefer https when pointing to dpdk.org
 
+[ upstream commit 3d4b2afb73f7f0988f8e66ba1b37f2a446e33868 ]
+
 for file in $(git grep -l http://.*dpdk.org doc/); do
   sed -i -e 's#http://\(.*dpdk.org\)#https://\1#g' $file;
 done
 
-Cc: stable@dpdk.org
-
 Signed-off-by: David Marchand <david.marchand@redhat.com>
 Acked-by: Kevin Traynor <ktraynor@redhat.com>
 ---
@@ -21,14 +21,13 @@
  doc/guides/linux_gsg/nic_perf_intel_platform.rst |  2 +-
  doc/guides/nics/enic.rst                         |  2 +-
  doc/guides/prog_guide/cryptodev_lib.rst          |  2 +-
- doc/guides/rel_notes/deprecation.rst             |  2 +-
- 10 files changed, 34 insertions(+), 26 deletions(-)
+ 9 files changed, 33 insertions(+), 25 deletions(-)
 
 diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
-index 42b833e0d7..158087f1ca 100755
+index b16bace927..9902e2a9bc 100755
 --- a/devtools/checkpatches.sh
 +++ b/devtools/checkpatches.sh
-@@ -78,6 +78,14 @@ check_forbidden_additions() { # <patch>
+@@ -70,6 +70,14 @@ check_forbidden_additions() { # <patch>
  		-f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \
  		"$1" || res=1
  
@@ -44,7 +43,7 @@
  }
  
 diff --git a/doc/guides/contributing/documentation.rst b/doc/guides/contributing/documentation.rst
-index 550d8dec28..375ea64ba8 100644
+index 27e4b13be1..3924771cf0 100644
 --- a/doc/guides/contributing/documentation.rst
 +++ b/doc/guides/contributing/documentation.rst
 @@ -82,7 +82,7 @@ added to by the developer.
@@ -85,7 +84,7 @@
  * The ``@see`` keyword can be used to create a *see also* link to another file or library.
    This directive should be placed on one line at the bottom of the documentation section.
 diff --git a/doc/guides/contributing/patches.rst b/doc/guides/contributing/patches.rst
-index 01e0a2f6ba..16b40225f2 100644
+index e5c565b984..5ca037757e 100644
 --- a/doc/guides/contributing/patches.rst
 +++ b/doc/guides/contributing/patches.rst
 @@ -28,9 +28,9 @@ The DPDK development process has the following features:
@@ -126,7 +125,7 @@
  mailing list.
  In the commit message body the Cc: stable@dpdk.org should be inserted as follows::
  
-@@ -565,7 +565,7 @@ If the patch is in relation to a previous email thread you can add it to the sam
+@@ -548,7 +548,7 @@ If the patch is in relation to a previous email thread you can add it to the sam
     git send-email --to dev@dpdk.org --in-reply-to <1234-foo@bar.com> 000*.patch
  
  The Message ID can be found in the raw text of emails or at the top of each Patchwork patch,
@@ -136,7 +135,7 @@
  
  Once submitted your patches will appear on the mailing list and in Patchwork.
 diff --git a/doc/guides/contributing/stable.rst b/doc/guides/contributing/stable.rst
-index 626cebf655..890bbeccc3 100644
+index 4d38bb8606..021c762fc6 100644
 --- a/doc/guides/contributing/stable.rst
 +++ b/doc/guides/contributing/stable.rst
 @@ -51,7 +51,7 @@ agreement and a commitment from a maintainer. The current policy is that each
@@ -148,7 +147,7 @@
  
  A LTS release may align with the declaration of a new major ABI version,
  please read the :doc:`abi_policy` for more information.
-@@ -108,7 +108,7 @@ The Stable and LTS release are coordinated on the stable@dpdk.org mailing
+@@ -107,7 +107,7 @@ The Stable and LTS release are coordinated on the stable@dpdk.org mailing
  list.
  
  All fix patches to the master branch that are candidates for backporting
@@ -157,7 +156,7 @@
  mailing list.
  
  
-@@ -119,7 +119,7 @@ A Stable Release will be released by:
+@@ -118,7 +118,7 @@ A Stable Release will be released by:
  
  * Tagging the release with YY.MM.n (year, month, number).
  * Uploading a tarball of the release to dpdk.org.
@@ -195,10 +194,10 @@
  * Operating system vendors known to package DPDK
  * Major DPDK users, considered trustworthy by the technical board, who
 diff --git a/doc/guides/freebsd_gsg/install_from_ports.rst b/doc/guides/freebsd_gsg/install_from_ports.rst
-index 36dc4a417b..d946f3f3b2 100644
+index 29f16cc6c5..dce028bc62 100644
 --- a/doc/guides/freebsd_gsg/install_from_ports.rst
 +++ b/doc/guides/freebsd_gsg/install_from_ports.rst
-@@ -72,7 +72,7 @@ These examples can be compiled and run as described in :ref:`compiling_sample_ap
+@@ -62,7 +62,7 @@ environmental variables should be set as below:
  .. note::
  
     To install a copy of the DPDK compiled using gcc, please download the
@@ -221,7 +220,7 @@
  Make sure each NIC has been flashed the latest version of NVM/firmware.
  
 diff --git a/doc/guides/nics/enic.rst b/doc/guides/nics/enic.rst
-index aa4fdc0e39..a28a7f4e47 100644
+index 65e536d422..24d2b5713a 100644
 --- a/doc/guides/nics/enic.rst
 +++ b/doc/guides/nics/enic.rst
 @@ -14,7 +14,7 @@ How to obtain ENIC PMD integrated DPDK
@@ -234,28 +233,15 @@
  
  Configuration information
 diff --git a/doc/guides/prog_guide/cryptodev_lib.rst b/doc/guides/prog_guide/cryptodev_lib.rst
-index b91f7c8b7f..c14f750fa8 100644
+index ac16437740..c839379885 100644
 --- a/doc/guides/prog_guide/cryptodev_lib.rst
 +++ b/doc/guides/prog_guide/cryptodev_lib.rst
-@@ -1128,4 +1128,4 @@ Asymmetric Crypto Device API
+@@ -1097,4 +1097,4 @@ Asymmetric Crypto Device API
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  
  The cryptodev Library API is described in the
 -`DPDK API Reference <http://doc.dpdk.org/api/>`_
 +`DPDK API Reference <https://doc.dpdk.org/api/>`_
-diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
-index cf8b1eb7b0..e8fd441696 100644
---- a/doc/guides/rel_notes/deprecation.rst
-+++ b/doc/guides/rel_notes/deprecation.rst
-@@ -43,7 +43,7 @@ Deprecation Notices
-   kernel module to the dpdk-kmods repository in the /linux/igb_uio/ directory
-   in 20.11.
-   Minutes of Technical Board Meeting of `2019-11-06
--  <http://mails.dpdk.org/archives/dev/2019-November/151763.html>`_.
-+  <https://mails.dpdk.org/archives/dev/2019-November/151763.html>`_.
- 
- * lib: will fix extending some enum/define breaking the ABI. There are multiple
-   samples in DPDK that enum/define terminated with a ``.*MAX.*`` value which is
 -- 
 2.20.1
 

^ permalink raw reply	[flat|nested] 371+ messages in thread

* Re: [dpdk-stable] patch 'common/qat: fix GEN3 marketing name' has been queued to stable release 19.11.3
  2020-05-19 12:54 ` [dpdk-stable] patch 'common/qat: fix GEN3 marketing name' " luca.boccassi
@ 2020-06-04 17:13   ` Trahe, Fiona
  2020-06-05  7:52     ` Luca Boccassi
  0 siblings, 1 reply; 371+ messages in thread
From: Trahe, Fiona @ 2020-06-04 17:13 UTC (permalink / raw)
  To: luca.boccassi, Dybkowski, AdamX; +Cc: dpdk stable, Trahe, Fiona

Hi Luca, 

Sorry about the delay in responding to this - but I just found out that Intel don't want to do this after all.
We need to revert it in 20.08.
I can see you already applied it on 19.11.3.rc1, please, can you drop it.
Sorry for wasting your time with this.

Regards,
Fiona


> -----Original Message-----
> From: luca.boccassi@gmail.com <luca.boccassi@gmail.com>
> Sent: Tuesday, May 19, 2020 1:54 PM
> To: Dybkowski, AdamX <adamx.dybkowski@intel.com>
> Cc: Trahe, Fiona <fiona.trahe@intel.com>; dpdk stable <stable@dpdk.org>
> Subject: patch 'common/qat: fix GEN3 marketing name' has been queued to stable release 19.11.3
> 
> Hi,
> 
> FYI, your patch has been queued to stable release 19.11.3
> 
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 05/21/20. So please
> shout if anyone has objections.
> 
> Also note that after the patch there's a diff of the upstream commit vs the
> patch applied to the branch. This will indicate if there was any rebasing
> needed to apply to the stable branch. If there were code changes for rebasing
> (ie: not only metadata diffs), please double check that the rebase was
> correctly done.
> 
> Thanks.
> 
> Luca Boccassi
> 
> ---
> From 152fadd540a9f72046a0411522c95997636d1d55 Mon Sep 17 00:00:00 2001
> From: Adam Dybkowski <adamx.dybkowski@intel.com>
> Date: Wed, 4 Mar 2020 14:18:35 +0100
> Subject: [PATCH] common/qat: fix GEN3 marketing name
> 
> [ upstream commit 9cd9d3e702fba4700539c1a2eddac13dd14ecf70 ]
> 
> This patch fixes the marketing name of the QAT GEN3 to P5xxx.
> Updates this name mentioned in the compression PMD as well as
> in the documentation.
> 
> Fixes: aa983f03ad2e ("crypto/qat: handle Single Pass Crypto Requests on GEN3")
> Fixes: a124830a6f00 ("compress/qat: enable dynamic huffman encoding")
> Fixes: 1f5e4053f9b4 ("common/qat: support GEN3 devices")
> 
> Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
> Acked-by: Fiona Trahe <fiona.trahe@intel.com>
> ---
>  doc/guides/cryptodevs/qat.rst          | 6 +++---
>  doc/guides/rel_notes/release_19_11.rst | 2 +-
>  drivers/compress/qat/qat_comp_pmd.c    | 2 +-
>  3 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/doc/guides/cryptodevs/qat.rst b/doc/guides/cryptodevs/qat.rst
> index 6197875fe3..5ab80b1c0f 100644
> --- a/doc/guides/cryptodevs/qat.rst
> +++ b/doc/guides/cryptodevs/qat.rst
> @@ -23,7 +23,7 @@ poll mode crypto driver support for the following hardware accelerator devices:
>  * ``Intel QuickAssist Technology C62x``
>  * ``Intel QuickAssist Technology C3xxx``
>  * ``Intel QuickAssist Technology D15xx``
> -* ``Intel QuickAssist Technology C4xxx``
> +* ``Intel QuickAssist Technology P5xxx``
> 
> 
>  Features
> @@ -122,7 +122,7 @@ poll mode crypto driver support for the following hardware accelerator
> devices:
>  * ``Intel QuickAssist Technology C62x``
>  * ``Intel QuickAssist Technology C3xxx``
>  * ``Intel QuickAssist Technology D15xx``
> -* ``Intel QuickAssist Technology C4xxx``
> +* ``Intel QuickAssist Technology P5xxx``
> 
>  The QAT ASYM PMD has support for:
> 
> @@ -323,7 +323,7 @@ to see the full table)
>     +-----+-----+-----+-----+----------+---------------+---------------+------------+--------+------+--------+--------+
>     | Yes | No  | No  | 2   | D15xx    | p             | qat_d15xx     | d15xx      | 6f54   | 1    | 6f55   | 16     |
>     +-----+-----+-----+-----+----------+---------------+---------------+------------+--------+------+--------+--------+
> -   | Yes | No  | No  | 3   | C4xxx    | p             | qat_c4xxx     | c4xxx      | 18a0   | 1    | 18a1   | 128    |
> +   | Yes | No  | No  | 3   | P5xxx    | p             | qat_p5xxx     | p5xxx      | 18a0   | 1    | 18a1   | 128    |
>     +-----+-----+-----+-----+----------+---------------+---------------+------------+--------+------+--------+--------+
> 
>  The first 3 columns indicate the service:
> diff --git a/doc/guides/rel_notes/release_19_11.rst b/doc/guides/rel_notes/release_19_11.rst
> index 56f169f7f2..edf103b5f6 100644
> --- a/doc/guides/rel_notes/release_19_11.rst
> +++ b/doc/guides/rel_notes/release_19_11.rst
> @@ -260,7 +260,7 @@ New Features
>  * **Enabled Single Pass GCM acceleration on QAT GEN3.**
> 
>    Added support for Single Pass GCM, available on QAT GEN3 only (Intel
> -  QuickAssist Technology C4xxx). It is automatically chosen instead of the
> +  QuickAssist Technology P5xxx). It is automatically chosen instead of the
>    classic 2-pass mode when running on QAT GEN3, significantly improving
>    the performance of AES GCM operations.
> 
> diff --git a/drivers/compress/qat/qat_comp_pmd.c b/drivers/compress/qat/qat_comp_pmd.c
> index 05b7dfe774..eb3e422b27 100644
> --- a/drivers/compress/qat/qat_comp_pmd.c
> +++ b/drivers/compress/qat/qat_comp_pmd.c
> @@ -663,7 +663,7 @@ int
>  qat_comp_dev_create(struct qat_pci_device *qat_pci_dev)
>  {
>  	if (qat_pci_dev->qat_dev_gen == QAT_GEN3) {
> -		QAT_LOG(ERR, "Compression PMD not supported on QAT c4xxx");
> +		QAT_LOG(ERR, "Compression PMD not supported on QAT P5xxx");
>  		return 0;
>  	}
> 
> --
> 2.20.1
> 
> ---
>   Diff of the applied patch vs upstream commit (please double-check if non-empty:
> ---
> --- -	2020-05-19 13:56:21.315333455 +0100
> +++ 0061-common-qat-fix-GEN3-marketing-name.patch	2020-05-19 13:56:18.291503115
> +0100
> @@ -1,8 +1,10 @@
> -From 9cd9d3e702fba4700539c1a2eddac13dd14ecf70 Mon Sep 17 00:00:00 2001
> +From 152fadd540a9f72046a0411522c95997636d1d55 Mon Sep 17 00:00:00 2001
>  From: Adam Dybkowski <adamx.dybkowski@intel.com>
>  Date: Wed, 4 Mar 2020 14:18:35 +0100
>  Subject: [PATCH] common/qat: fix GEN3 marketing name
> 
> +[ upstream commit 9cd9d3e702fba4700539c1a2eddac13dd14ecf70 ]
> +
>  This patch fixes the marketing name of the QAT GEN3 to P5xxx.
>  Updates this name mentioned in the compression PMD as well as
>  in the documentation.
> @@ -10,7 +12,6 @@
>  Fixes: aa983f03ad2e ("crypto/qat: handle Single Pass Crypto Requests on GEN3")
>  Fixes: a124830a6f00 ("compress/qat: enable dynamic huffman encoding")
>  Fixes: 1f5e4053f9b4 ("common/qat: support GEN3 devices")
> -Cc: stable@dpdk.org
> 
>  Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
>  Acked-by: Fiona Trahe <fiona.trahe@intel.com>
> @@ -21,7 +22,7 @@
>   3 files changed, 5 insertions(+), 5 deletions(-)
> 
>  diff --git a/doc/guides/cryptodevs/qat.rst b/doc/guides/cryptodevs/qat.rst
> -index 06985e3193..1e83ed6267 100644
> +index 6197875fe3..5ab80b1c0f 100644
>  --- a/doc/guides/cryptodevs/qat.rst
>  +++ b/doc/guides/cryptodevs/qat.rst
>  @@ -23,7 +23,7 @@ poll mode crypto driver support for the following hardware accelerator devices:
> @@ -33,7 +34,7 @@
> 
> 
>   Features
> -@@ -149,7 +149,7 @@ poll mode crypto driver support for the following hardware accelerator
> devices:
> +@@ -122,7 +122,7 @@ poll mode crypto driver support for the following hardware accelerator
> devices:
>   * ``Intel QuickAssist Technology C62x``
>   * ``Intel QuickAssist Technology C3xxx``
>   * ``Intel QuickAssist Technology D15xx``
> @@ -42,7 +43,7 @@
> 
>   The QAT ASYM PMD has support for:
> 
> -@@ -376,7 +376,7 @@ to see the full table)
> +@@ -323,7 +323,7 @@ to see the full table)
>      +-----+-----+-----+-----+----------+---------------+---------------+------------+--------+------+--------+--------
> +
>      | Yes | No  | No  | 2   | D15xx    | p             | qat_d15xx     | d15xx      | 6f54   | 1    | 6f55   | 16     |
>      +-----+-----+-----+-----+----------+---------------+---------------+------------+--------+------+--------+--------
> +
> @@ -52,7 +53,7 @@
> 
>   The first 3 columns indicate the service:
>  diff --git a/doc/guides/rel_notes/release_19_11.rst b/doc/guides/rel_notes/release_19_11.rst
> -index eb05149f8f..0261d28431 100644
> +index 56f169f7f2..edf103b5f6 100644
>  --- a/doc/guides/rel_notes/release_19_11.rst
>  +++ b/doc/guides/rel_notes/release_19_11.rst
>  @@ -260,7 +260,7 @@ New Features
> @@ -65,12 +66,12 @@
>     the performance of AES GCM operations.
> 
>  diff --git a/drivers/compress/qat/qat_comp_pmd.c b/drivers/compress/qat/qat_comp_pmd.c
> -index 7d4fdf10c2..9a7ed19d76 100644
> +index 05b7dfe774..eb3e422b27 100644
>  --- a/drivers/compress/qat/qat_comp_pmd.c
>  +++ b/drivers/compress/qat/qat_comp_pmd.c
> -@@ -666,7 +666,7 @@ qat_comp_dev_create(struct qat_pci_device *qat_pci_dev,
> +@@ -663,7 +663,7 @@ int
> + qat_comp_dev_create(struct qat_pci_device *qat_pci_dev)
>   {
> - 	int i = 0;
>   	if (qat_pci_dev->qat_dev_gen == QAT_GEN3) {
>  -		QAT_LOG(ERR, "Compression PMD not supported on QAT c4xxx");
>  +		QAT_LOG(ERR, "Compression PMD not supported on QAT P5xxx");

^ permalink raw reply	[flat|nested] 371+ messages in thread

* Re: [dpdk-stable] patch 'common/qat: fix GEN3 marketing name' has been queued to stable release 19.11.3
  2020-06-04 17:13   ` Trahe, Fiona
@ 2020-06-05  7:52     ` Luca Boccassi
  0 siblings, 0 replies; 371+ messages in thread
From: Luca Boccassi @ 2020-06-05  7:52 UTC (permalink / raw)
  To: Trahe, Fiona, Dybkowski, AdamX; +Cc: dpdk stable

Hi,

Ok, seems safe enough to revert after validation has been performed

On Thu, 2020-06-04 at 17:13 +0000, Trahe, Fiona wrote:
> Hi Luca, 
> 
> Sorry about the delay in responding to this - but I just found out that Intel don't want to do this after all.
> We need to revert it in 20.08.
> I can see you already applied it on 19.11.3.rc1, please, can you drop it.
> Sorry for wasting your time with this.
> 
> Regards,
> Fiona
> 
> 
> > -----Original Message-----
> > From: luca.boccassi@gmail.com <luca.boccassi@gmail.com>
> > Sent: Tuesday, May 19, 2020 1:54 PM
> > To: Dybkowski, AdamX <adamx.dybkowski@intel.com>
> > Cc: Trahe, Fiona <fiona.trahe@intel.com>; dpdk stable <stable@dpdk.org>
> > Subject: patch 'common/qat: fix GEN3 marketing name' has been queued to stable release 19.11.3
> > 
> > Hi,
> > 
> > FYI, your patch has been queued to stable release 19.11.3
> > 
> > Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> > It will be pushed if I get no objections before 05/21/20. So please
> > shout if anyone has objections.
> > 
> > Also note that after the patch there's a diff of the upstream commit vs the
> > patch applied to the branch. This will indicate if there was any rebasing
> > needed to apply to the stable branch. If there were code changes for rebasing
> > (ie: not only metadata diffs), please double check that the rebase was
> > correctly done.
> > 
> > Thanks.
> > 
> > Luca Boccassi
> > 
> > ---
> > From 152fadd540a9f72046a0411522c95997636d1d55 Mon Sep 17 00:00:00 2001
> > From: Adam Dybkowski <adamx.dybkowski@intel.com>
> > Date: Wed, 4 Mar 2020 14:18:35 +0100
> > Subject: [PATCH] common/qat: fix GEN3 marketing name
> > 
> > [ upstream commit 9cd9d3e702fba4700539c1a2eddac13dd14ecf70 ]
> > 
> > This patch fixes the marketing name of the QAT GEN3 to P5xxx.
> > Updates this name mentioned in the compression PMD as well as
> > in the documentation.
> > 
> > Fixes: aa983f03ad2e ("crypto/qat: handle Single Pass Crypto Requests on GEN3")
> > Fixes: a124830a6f00 ("compress/qat: enable dynamic huffman encoding")
> > Fixes: 1f5e4053f9b4 ("common/qat: support GEN3 devices")
> > 
> > Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
> > Acked-by: Fiona Trahe <fiona.trahe@intel.com>
> > ---
> >  doc/guides/cryptodevs/qat.rst          | 6 +++---
> >  doc/guides/rel_notes/release_19_11.rst | 2 +-
> >  drivers/compress/qat/qat_comp_pmd.c    | 2 +-
> >  3 files changed, 5 insertions(+), 5 deletions(-)
> > 
> > diff --git a/doc/guides/cryptodevs/qat.rst b/doc/guides/cryptodevs/qat.rst
> > index 6197875fe3..5ab80b1c0f 100644
> > --- a/doc/guides/cryptodevs/qat.rst
> > +++ b/doc/guides/cryptodevs/qat.rst
> > @@ -23,7 +23,7 @@ poll mode crypto driver support for the following hardware accelerator devices:
> >  * ``Intel QuickAssist Technology C62x``
> >  * ``Intel QuickAssist Technology C3xxx``
> >  * ``Intel QuickAssist Technology D15xx``
> > -* ``Intel QuickAssist Technology C4xxx``
> > +* ``Intel QuickAssist Technology P5xxx``
> > 
> > 
> >  Features
> > @@ -122,7 +122,7 @@ poll mode crypto driver support for the following hardware accelerator
> > devices:
> >  * ``Intel QuickAssist Technology C62x``
> >  * ``Intel QuickAssist Technology C3xxx``
> >  * ``Intel QuickAssist Technology D15xx``
> > -* ``Intel QuickAssist Technology C4xxx``
> > +* ``Intel QuickAssist Technology P5xxx``
> > 
> >  The QAT ASYM PMD has support for:
> > 
> > @@ -323,7 +323,7 @@ to see the full table)
> >     +-----+-----+-----+-----+----------+---------------+---------------+------------+--------+------+--------+--------+
> >     | Yes | No  | No  | 2   | D15xx    | p             | qat_d15xx     | d15xx      | 6f54   | 1    | 6f55   | 16     |
> >     +-----+-----+-----+-----+----------+---------------+---------------+------------+--------+------+--------+--------+
> > -   | Yes | No  | No  | 3   | C4xxx    | p             | qat_c4xxx     | c4xxx      | 18a0   | 1    | 18a1   | 128    |
> > +   | Yes | No  | No  | 3   | P5xxx    | p             | qat_p5xxx     | p5xxx      | 18a0   | 1    | 18a1   | 128    |
> >     +-----+-----+-----+-----+----------+---------------+---------------+------------+--------+------+--------+--------+
> > 
> >  The first 3 columns indicate the service:
> > diff --git a/doc/guides/rel_notes/release_19_11.rst b/doc/guides/rel_notes/release_19_11.rst
> > index 56f169f7f2..edf103b5f6 100644
> > --- a/doc/guides/rel_notes/release_19_11.rst
> > +++ b/doc/guides/rel_notes/release_19_11.rst
> > @@ -260,7 +260,7 @@ New Features
> >  * **Enabled Single Pass GCM acceleration on QAT GEN3.**
> > 
> >    Added support for Single Pass GCM, available on QAT GEN3 only (Intel
> > -  QuickAssist Technology C4xxx). It is automatically chosen instead of the
> > +  QuickAssist Technology P5xxx). It is automatically chosen instead of the
> >    classic 2-pass mode when running on QAT GEN3, significantly improving
> >    the performance of AES GCM operations.
> > 
> > diff --git a/drivers/compress/qat/qat_comp_pmd.c b/drivers/compress/qat/qat_comp_pmd.c
> > index 05b7dfe774..eb3e422b27 100644
> > --- a/drivers/compress/qat/qat_comp_pmd.c
> > +++ b/drivers/compress/qat/qat_comp_pmd.c
> > @@ -663,7 +663,7 @@ int
> >  qat_comp_dev_create(struct qat_pci_device *qat_pci_dev)
> >  {
> >  	if (qat_pci_dev->qat_dev_gen == QAT_GEN3) {
> > -		QAT_LOG(ERR, "Compression PMD not supported on QAT c4xxx");
> > +		QAT_LOG(ERR, "Compression PMD not supported on QAT P5xxx");
> >  		return 0;
> >  	}
> > 
> > --
> > 2.20.1
> > 
> > ---
> >   Diff of the applied patch vs upstream commit (please double-check if non-empty:
> > ---
> > --- -	2020-05-19 13:56:21.315333455 +0100
> > +++ 0061-common-qat-fix-GEN3-marketing-name.patch	2020-05-19 13:56:18.291503115
> > +0100
> > @@ -1,8 +1,10 @@
> > -From 9cd9d3e702fba4700539c1a2eddac13dd14ecf70 Mon Sep 17 00:00:00 2001
> > +From 152fadd540a9f72046a0411522c95997636d1d55 Mon Sep 17 00:00:00 2001
> >  From: Adam Dybkowski <adamx.dybkowski@intel.com>
> >  Date: Wed, 4 Mar 2020 14:18:35 +0100
> >  Subject: [PATCH] common/qat: fix GEN3 marketing name
> > 
> > +[ upstream commit 9cd9d3e702fba4700539c1a2eddac13dd14ecf70 ]
> > +
> >  This patch fixes the marketing name of the QAT GEN3 to P5xxx.
> >  Updates this name mentioned in the compression PMD as well as
> >  in the documentation.
> > @@ -10,7 +12,6 @@
> >  Fixes: aa983f03ad2e ("crypto/qat: handle Single Pass Crypto Requests on GEN3")
> >  Fixes: a124830a6f00 ("compress/qat: enable dynamic huffman encoding")
> >  Fixes: 1f5e4053f9b4 ("common/qat: support GEN3 devices")
> > -Cc: stable@dpdk.org
> > 
> >  Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
> >  Acked-by: Fiona Trahe <fiona.trahe@intel.com>
> > @@ -21,7 +22,7 @@
> >   3 files changed, 5 insertions(+), 5 deletions(-)
> > 
> >  diff --git a/doc/guides/cryptodevs/qat.rst b/doc/guides/cryptodevs/qat.rst
> > -index 06985e3193..1e83ed6267 100644
> > +index 6197875fe3..5ab80b1c0f 100644
> >  --- a/doc/guides/cryptodevs/qat.rst
> >  +++ b/doc/guides/cryptodevs/qat.rst
> >  @@ -23,7 +23,7 @@ poll mode crypto driver support for the following hardware accelerator devices:
> > @@ -33,7 +34,7 @@
> > 
> > 
> >   Features
> > -@@ -149,7 +149,7 @@ poll mode crypto driver support for the following hardware accelerator
> > devices:
> > +@@ -122,7 +122,7 @@ poll mode crypto driver support for the following hardware accelerator
> > devices:
> >   * ``Intel QuickAssist Technology C62x``
> >   * ``Intel QuickAssist Technology C3xxx``
> >   * ``Intel QuickAssist Technology D15xx``
> > @@ -42,7 +43,7 @@
> > 
> >   The QAT ASYM PMD has support for:
> > 
> > -@@ -376,7 +376,7 @@ to see the full table)
> > +@@ -323,7 +323,7 @@ to see the full table)
> >      +-----+-----+-----+-----+----------+---------------+---------------+------------+--------+------+--------+--------
> > +
> >      | Yes | No  | No  | 2   | D15xx    | p             | qat_d15xx     | d15xx      | 6f54   | 1    | 6f55   | 16     |
> >      +-----+-----+-----+-----+----------+---------------+---------------+------------+--------+------+--------+--------
> > +
> > @@ -52,7 +53,7 @@
> > 
> >   The first 3 columns indicate the service:
> >  diff --git a/doc/guides/rel_notes/release_19_11.rst b/doc/guides/rel_notes/release_19_11.rst
> > -index eb05149f8f..0261d28431 100644
> > +index 56f169f7f2..edf103b5f6 100644
> >  --- a/doc/guides/rel_notes/release_19_11.rst
> >  +++ b/doc/guides/rel_notes/release_19_11.rst
> >  @@ -260,7 +260,7 @@ New Features
> > @@ -65,12 +66,12 @@
> >     the performance of AES GCM operations.
> > 
> >  diff --git a/drivers/compress/qat/qat_comp_pmd.c b/drivers/compress/qat/qat_comp_pmd.c
> > -index 7d4fdf10c2..9a7ed19d76 100644
> > +index 05b7dfe774..eb3e422b27 100644
> >  --- a/drivers/compress/qat/qat_comp_pmd.c
> >  +++ b/drivers/compress/qat/qat_comp_pmd.c
> > -@@ -666,7 +666,7 @@ qat_comp_dev_create(struct qat_pci_device *qat_pci_dev,
> > +@@ -663,7 +663,7 @@ int
> > + qat_comp_dev_create(struct qat_pci_device *qat_pci_dev)
> >   {
> > - 	int i = 0;
> >   	if (qat_pci_dev->qat_dev_gen == QAT_GEN3) {
> >  -		QAT_LOG(ERR, "Compression PMD not supported on QAT c4xxx");
> >  +		QAT_LOG(ERR, "Compression PMD not supported on QAT P5xxx");

^ permalink raw reply	[flat|nested] 371+ messages in thread

* Re: [dpdk-stable] patch 'mem: mark pages as not accessed when reserving VA' has been queued to stable release 19.11.3
  2020-05-19 12:53 ` [dpdk-stable] patch 'mem: mark pages as not accessed when reserving VA' " luca.boccassi
@ 2020-06-09 13:45   ` Kevin Traynor
  2020-06-09 14:14     ` Luca Boccassi
  0 siblings, 1 reply; 371+ messages in thread
From: Kevin Traynor @ 2020-06-09 13:45 UTC (permalink / raw)
  To: luca.boccassi, David Marchand
  Cc: Andrea Arcangeli, Maxime Coquelin, Aaron Conole, Anatoly Burakov,
	dpdk stable, fengli

On 19/05/2020 13:53, luca.boccassi@gmail.com wrote:
> Hi,
> 
> FYI, your patch has been queued to stable release 19.11.3
> 
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 05/21/20. So please
> shout if anyone has objections.
> 
> Also note that after the patch there's a diff of the upstream commit vs the
> patch applied to the branch. This will indicate if there was any rebasing
> needed to apply to the stable branch. If there were code changes for rebasing
> (ie: not only metadata diffs), please double check that the rebase was
> correctly done.
> 
> Thanks.
> 
> Luca Boccassi
> 
> ---
> From d0e456e9b1af8594ed22382e33bc6e1d5acec994 Mon Sep 17 00:00:00 2001
> From: David Marchand <david.marchand@redhat.com>
> Date: Mon, 9 Mar 2020 15:54:42 +0100
> Subject: [PATCH] mem: mark pages as not accessed when reserving VA
> 
> [ upstream commit 8a4baf06c17a806696fb10aba36fce7471983028 ]
> 
> When the memory allocator reserves virtual addresses, it still does not
> know what they will be used for.
> Besides, huge areas are reserved for memory hotplug in multiprocess
> setups. But most of the pages are unused in the whole life of the
> processes.
> 
> Change protection mode to PROT_NONE when only reserving VA.
> The memory allocator already switches to the right mode when making use
> of it.
> 
> It also has the nice effect of getting those pages skipped by the kernel
> when calling mlockall() or when a coredump gets generated.
> 

Hi, discussed this patch for 18.11 with David and he pointed out that
there is a fix for it on master:

commit 76e91e3f14fc13f31608167d698682790be45cba
Author: Li Feng <fengli@smartx.com>
Date:   Fri Apr 24 18:42:05 2020 +0800

    mem: mark pages as not accessed when freeing memory

    Commit 8a4baf06c17a ("mem: mark pages as not accessed when reserving
VA")
    has mapped the initialized memory with PROT_NONE, and when it's
unmapped,
    eal_memalloc.c should remmap the anonymous memory with PROT_NONE too.

    Fixes: 8a4baf06c17a ("mem: mark pages as not accessed when reserving
VA")
    Cc: stable@dpdk.org

    Signed-off-by: Li Feng <fengli@smartx.com>
    Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>


> Suggested-by: Andrea Arcangeli <aarcange@redhat.com>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> Acked-by: Aaron Conole <aconole@redhat.com>
> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
> ---
>  lib/librte_eal/common/eal_common_memory.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/librte_eal/common/eal_common_memory.c b/lib/librte_eal/common/eal_common_memory.c
> index 4a9cc1f19a..cc7d54e0c7 100644
> --- a/lib/librte_eal/common/eal_common_memory.c
> +++ b/lib/librte_eal/common/eal_common_memory.c
> @@ -97,7 +97,7 @@ eal_get_virtual_area(void *requested_addr, size_t *size,
>  			return NULL;
>  		}
>  
> -		mapped_addr = mmap(requested_addr, (size_t)map_sz, PROT_READ,
> +		mapped_addr = mmap(requested_addr, (size_t)map_sz, PROT_NONE,
>  				mmap_flags, -1, 0);
>  		if (mapped_addr == MAP_FAILED && allow_shrink)
>  			*size -= page_sz;
> 


^ permalink raw reply	[flat|nested] 371+ messages in thread

* Re: [dpdk-stable] patch 'mem: mark pages as not accessed when reserving VA' has been queued to stable release 19.11.3
  2020-06-09 13:45   ` Kevin Traynor
@ 2020-06-09 14:14     ` Luca Boccassi
  2020-06-12  8:00       ` Luca Boccassi
  0 siblings, 1 reply; 371+ messages in thread
From: Luca Boccassi @ 2020-06-09 14:14 UTC (permalink / raw)
  To: Kevin Traynor, David Marchand
  Cc: Andrea Arcangeli, Maxime Coquelin, Aaron Conole, Anatoly Burakov,
	dpdk stable, fengli

On Tue, 2020-06-09 at 14:45 +0100, Kevin Traynor wrote:
> On 19/05/2020 13:53, luca.boccassi@gmail.com wrote:
> > Hi,
> > 
> > FYI, your patch has been queued to stable release 19.11.3
> > 
> > Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> > It will be pushed if I get no objections before 05/21/20. So please
> > shout if anyone has objections.
> > 
> > Also note that after the patch there's a diff of the upstream commit vs the
> > patch applied to the branch. This will indicate if there was any rebasing
> > needed to apply to the stable branch. If there were code changes for rebasing
> > (ie: not only metadata diffs), please double check that the rebase was
> > correctly done.
> > 
> > Thanks.
> > 
> > Luca Boccassi
> > 
> > ---
> > From d0e456e9b1af8594ed22382e33bc6e1d5acec994 Mon Sep 17 00:00:00 2001
> > From: David Marchand <david.marchand@redhat.com>
> > Date: Mon, 9 Mar 2020 15:54:42 +0100
> > Subject: [PATCH] mem: mark pages as not accessed when reserving VA
> > 
> > [ upstream commit 8a4baf06c17a806696fb10aba36fce7471983028 ]
> > 
> > When the memory allocator reserves virtual addresses, it still does not
> > know what they will be used for.
> > Besides, huge areas are reserved for memory hotplug in multiprocess
> > setups. But most of the pages are unused in the whole life of the
> > processes.
> > 
> > Change protection mode to PROT_NONE when only reserving VA.
> > The memory allocator already switches to the right mode when making use
> > of it.
> > 
> > It also has the nice effect of getting those pages skipped by the kernel
> > when calling mlockall() or when a coredump gets generated.
> > 
> 
> Hi, discussed this patch for 18.11 with David and he pointed out that
> there is a fix for it on master:

Uh, I wonder how it got left behind, strange - how critical is it? And
how safe is it to pick up now, when validation has already started?

-- 
Kind regards,
Luca Boccassi

^ permalink raw reply	[flat|nested] 371+ messages in thread

* Re: [dpdk-stable] patch 'mem: mark pages as not accessed when reserving VA' has been queued to stable release 19.11.3
  2020-06-09 14:14     ` Luca Boccassi
@ 2020-06-12  8:00       ` Luca Boccassi
  2020-06-16  8:13         ` David Marchand
  0 siblings, 1 reply; 371+ messages in thread
From: Luca Boccassi @ 2020-06-12  8:00 UTC (permalink / raw)
  To: Kevin Traynor, David Marchand
  Cc: Andrea Arcangeli, Maxime Coquelin, Aaron Conole, Anatoly Burakov,
	dpdk stable, fengli

On Tue, 2020-06-09 at 15:14 +0100, Luca Boccassi wrote:
> On Tue, 2020-06-09 at 14:45 +0100, Kevin Traynor wrote:
> > On 19/05/2020 13:53, luca.boccassi@gmail.com wrote:
> > > Hi,
> > > 
> > > FYI, your patch has been queued to stable release 19.11.3
> > > 
> > > Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> > > It will be pushed if I get no objections before 05/21/20. So please
> > > shout if anyone has objections.
> > > 
> > > Also note that after the patch there's a diff of the upstream commit vs the
> > > patch applied to the branch. This will indicate if there was any rebasing
> > > needed to apply to the stable branch. If there were code changes for rebasing
> > > (ie: not only metadata diffs), please double check that the rebase was
> > > correctly done.
> > > 
> > > Thanks.
> > > 
> > > Luca Boccassi
> > > 
> > > ---
> > > From d0e456e9b1af8594ed22382e33bc6e1d5acec994 Mon Sep 17 00:00:00 2001
> > > From: David Marchand <david.marchand@redhat.com>
> > > Date: Mon, 9 Mar 2020 15:54:42 +0100
> > > Subject: [PATCH] mem: mark pages as not accessed when reserving VA
> > > 
> > > [ upstream commit 8a4baf06c17a806696fb10aba36fce7471983028 ]
> > > 
> > > When the memory allocator reserves virtual addresses, it still does not
> > > know what they will be used for.
> > > Besides, huge areas are reserved for memory hotplug in multiprocess
> > > setups. But most of the pages are unused in the whole life of the
> > > processes.
> > > 
> > > Change protection mode to PROT_NONE when only reserving VA.
> > > The memory allocator already switches to the right mode when making use
> > > of it.
> > > 
> > > It also has the nice effect of getting those pages skipped by the kernel
> > > when calling mlockall() or when a coredump gets generated.
> > > 
> > 
> > Hi, discussed this patch for 18.11 with David and he pointed out that
> > there is a fix for it on master:
> 
> Uh, I wonder how it got left behind, strange - how critical is it? And
> how safe is it to pick up now, when validation has already started?

Ping - David, what do you think about the above questions?

-- 
Kind regards,
Luca Boccassi

^ permalink raw reply	[flat|nested] 371+ messages in thread

* Re: [dpdk-stable] patch 'mem: mark pages as not accessed when reserving VA' has been queued to stable release 19.11.3
  2020-06-12  8:00       ` Luca Boccassi
@ 2020-06-16  8:13         ` David Marchand
  2020-06-16 10:41           ` Luca Boccassi
  0 siblings, 1 reply; 371+ messages in thread
From: David Marchand @ 2020-06-16  8:13 UTC (permalink / raw)
  To: Luca Boccassi
  Cc: Kevin Traynor, Andrea Arcangeli, Maxime Coquelin, Aaron Conole,
	Anatoly Burakov, dpdk stable, Li Feng

Hello Luca,

On Fri, Jun 12, 2020 at 10:00 AM Luca Boccassi <bluca@debian.org> wrote:
> On Tue, 2020-06-09 at 15:14 +0100, Luca Boccassi wrote:
> > On Tue, 2020-06-09 at 14:45 +0100, Kevin Traynor wrote:
> > > Hi, discussed this patch for 18.11 with David and he pointed out that
> > > there is a fix for it on master:
> >
> > Uh, I wonder how it got left behind, strange - how critical is it? And
> > how safe is it to pick up now, when validation has already started?
>

- On the reason of why it was left behind, iiuc, Kevin thought it was
because of how the git-log-fixes.sh script works and this patch was
not marked as a fix in master.

- This first patch fixed the way we mark anonymous pages used by the
dpdk memory allocator.

At initialisation, the dpdk memory allocator reserves anonymous
mappings for later uses.
Before this patch, it was instructing the kernel the mapping was used
for reading with PROT_READ (which has some side effects, for
applications calling mlockall()).
The dpdk memory allocator has no actual need at the time of the
reservation, it switches to the right memory protection when using the
mapping.
So the first patch switched the memory protection to PROT_NONE when reserving.

Later when the dpdk memory allocator frees some memory and does not
use a mapping, the memory protection on this mapping is left untouched
as I forgot to set it back to PROT_NONE: this is what the 2nd patch
from Li Feng addresses.


The first patch landed in master at the start of 20.05 and we lived in
this state for a month.
The second patch got merged just before tagging 20.05-rc1.
"Real" validation happened with both patches applied.

I can understand your reluctance at touching the memory allocator now
that validation for 19.11.3 started, but with only the first patch, we
end up with an intermediate behavior in the dpdk memory allocator.
I would go with backporting the second patch.


-- 
David Marchand


^ permalink raw reply	[flat|nested] 371+ messages in thread

* Re: [dpdk-stable] patch 'mem: mark pages as not accessed when reserving VA' has been queued to stable release 19.11.3
  2020-06-16  8:13         ` David Marchand
@ 2020-06-16 10:41           ` Luca Boccassi
  0 siblings, 0 replies; 371+ messages in thread
From: Luca Boccassi @ 2020-06-16 10:41 UTC (permalink / raw)
  To: David Marchand
  Cc: Kevin Traynor, Andrea Arcangeli, Maxime Coquelin, Aaron Conole,
	Anatoly Burakov, dpdk stable, Li Feng

On Tue, 2020-06-16 at 10:13 +0200, David Marchand wrote:
> Hello Luca,
> 
> On Fri, Jun 12, 2020 at 10:00 AM Luca Boccassi <bluca@debian.org> wrote:
> > On Tue, 2020-06-09 at 15:14 +0100, Luca Boccassi wrote:
> > > On Tue, 2020-06-09 at 14:45 +0100, Kevin Traynor wrote:
> > > > Hi, discussed this patch for 18.11 with David and he pointed out that
> > > > there is a fix for it on master:
> > > 
> > > Uh, I wonder how it got left behind, strange - how critical is it? And
> > > how safe is it to pick up now, when validation has already started?
> 
> - On the reason of why it was left behind, iiuc, Kevin thought it was
> because of how the git-log-fixes.sh script works and this patch was
> not marked as a fix in master.
> 
> - This first patch fixed the way we mark anonymous pages used by the
> dpdk memory allocator.
> 
> At initialisation, the dpdk memory allocator reserves anonymous
> mappings for later uses.
> Before this patch, it was instructing the kernel the mapping was used
> for reading with PROT_READ (which has some side effects, for
> applications calling mlockall()).
> The dpdk memory allocator has no actual need at the time of the
> reservation, it switches to the right memory protection when using the
> mapping.
> So the first patch switched the memory protection to PROT_NONE when reserving.
> 
> Later when the dpdk memory allocator frees some memory and does not
> use a mapping, the memory protection on this mapping is left untouched
> as I forgot to set it back to PROT_NONE: this is what the 2nd patch
> from Li Feng addresses.
> 
> 
> The first patch landed in master at the start of 20.05 and we lived in
> this state for a month.
> The second patch got merged just before tagging 20.05-rc1.
> "Real" validation happened with both patches applied.
> 
> I can understand your reluctance at touching the memory allocator now
> that validation for 19.11.3 started, but with only the first patch, we
> end up with an intermediate behavior in the dpdk memory allocator.
> I would go with backporting the second patch.

Ok, thank you. I will backport the patch.

-- 
Kind regards,
Luca Boccassi

^ permalink raw reply	[flat|nested] 371+ messages in thread

end of thread, other threads:[~2020-06-16 10:41 UTC | newest]

Thread overview: 371+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-19 12:53 [dpdk-stable] patch 'crypto/octeontx2: fix build with gcc 10' has been queued to stable release 19.11.3 luca.boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'test: " luca.boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'app/pipeline: " luca.boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'examples/vhost_blk: " luca.boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'examples/eventdev: " luca.boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'examples/qos_sched: " luca.boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'drivers: add crypto as dependency for event drivers' " luca.boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'drivers/crypto: fix build with make 4.3' " luca.boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'eal: fix log message print for regex' " luca.boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'eal/arm64: fix precise TSC' " luca.boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'mem: mark pages as not accessed when reserving VA' " luca.boccassi
2020-06-09 13:45   ` Kevin Traynor
2020-06-09 14:14     ` Luca Boccassi
2020-06-12  8:00       ` Luca Boccassi
2020-06-16  8:13         ` David Marchand
2020-06-16 10:41           ` Luca Boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'service: fix crash on exit' " luca.boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'telemetry: fix port stats retrieval' " luca.boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'pci: remove unneeded includes in public header file' " luca.boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'pci: fix build on FreeBSD' " luca.boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'pci: fix build on ppc' " luca.boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'build: fix linker warnings with clang on Windows' " luca.boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'net/octeontx2: fix link information for loopback port' " luca.boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'net/i40e: relax barrier in Tx' " luca.boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'net/mlx5: fix VLAN PCP item calculation' " luca.boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'net/i40e: fix X722 performance' " luca.boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'net/ice: fix hash flow crash' " luca.boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'net/enetc: fix Rx lock-up' " luca.boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'net/ice: remove unnecessary variable' " luca.boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'doc: fix number of failsafe sub-devices' " luca.boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'net/sfc: fix reported promiscuous/multicast mode' " luca.boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'net/vmxnet3: fix RSS setting on v4' " luca.boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'net/sfc: fix initialization error path' " luca.boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'net/sfc: fix Rx queue start failure " luca.boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'net/ice: remove bulk alloc option' " luca.boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'net/mlx5: fix mask used for IPv6 item validation' " luca.boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'build: support MinGW-w64 with Meson' " luca.boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'net/memif: fix init when already connected' " luca.boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'net/hinic: fix snprintf length of cable info' " luca.boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'net/hinic: fix repeating cable log and length check' " luca.boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'net/hns3: fix promiscuous mode for PF' " luca.boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'ethdev: fix spelling' " luca.boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'net/sfc: fix promiscuous and allmulticast toggles errors' " luca.boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'net/sfc: set priority of created filters to manual' " luca.boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'net/sfc/base: reduce filter priorities to implemented only' " luca.boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'net/sfc/base: reject automatic filter creation by users' " luca.boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'net/sfc/base: refactor filter lookup loop in EF10' " luca.boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'net/sfc/base: handle manual and auto filter clashes " luca.boccassi
2020-05-20  9:53   ` Igor Romanov
2020-05-20 11:57     ` Luca Boccassi
2020-05-20 12:12       ` Igor Romanov
2020-05-20 16:50         ` Luca Boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'net/mlx5: fix zero metadata action' " luca.boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'net/hinic: allocate IO memory with socket id' " luca.boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'net/mlx5: fix CVLAN tag set in IP item translation' " luca.boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'net/mlx5: reduce Tx completion index memory loads' " luca.boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'contigmem: cleanup properly when load fails' " luca.boccassi
2020-05-19 12:53 ` [dpdk-stable] patch 'devtools: fix symbol map change check' " luca.boccassi
2020-05-19 12:54 ` [dpdk-stable] patch 'test: load drivers when required' " luca.boccassi
2020-05-19 12:54 ` [dpdk-stable] patch 'test: skip some subtests in no-huge mode' " luca.boccassi
2020-05-19 12:54 ` [dpdk-stable] patch 'eal/freebsd: fix queuing duplicate alarm callbacks' " luca.boccassi
2020-05-19 12:54 ` [dpdk-stable] patch 'mem: preallocate VA space in no-huge mode' " luca.boccassi
2020-05-19 12:54 ` [dpdk-stable] patch 'test/kvargs: fix to consider empty elements as valid' " luca.boccassi
2020-05-19 12:54 ` [dpdk-stable] patch 'test/kvargs: fix invalid cases check' " luca.boccassi
2020-05-19 12:54 ` [dpdk-stable] patch 'kvargs: fix buffer overflow when parsing list' " luca.boccassi
2020-05-19 12:54 ` [dpdk-stable] patch 'bus/pci: fix devargs on probing again' " luca.boccassi
2020-05-19 12:54 ` [dpdk-stable] patch 'ci: fix telemetry dependency in Travis' " luca.boccassi
2020-05-19 12:54 ` [dpdk-stable] patch 'fib: fix headers for C++ support' " luca.boccassi
2020-05-19 12:54 ` [dpdk-stable] patch 'cryptodev: fix missing device id range checking' " luca.boccassi
2020-05-19 12:54 ` [dpdk-stable] patch 'common/qat: fix GEN3 marketing name' " luca.boccassi
2020-06-04 17:13   ` Trahe, Fiona
2020-06-05  7:52     ` Luca Boccassi
2020-05-19 12:54 ` [dpdk-stable] patch 'test/ipsec: fix crash in session destroy' " luca.boccassi
2020-05-19 12:54 ` [dpdk-stable] patch 'baseband/turbo_sw: fix exposed LLR decimals assumption' " luca.boccassi
2020-05-19 12:54 ` [dpdk-stable] patch 'crypto/nitrox: fix CSR register address generation' " luca.boccassi
2020-05-19 12:54 ` [dpdk-stable] patch 'crypto/nitrox: fix oversized device name' " luca.boccassi
2020-05-19 12:54 ` [dpdk-stable] patch 'event/dsw: remove redundant control ring poll' " luca.boccassi
2020-05-19 12:54 ` [dpdk-stable] patch 'event/dsw: remove unnecessary read barrier' " luca.boccassi
2020-05-19 12:54 ` [dpdk-stable] patch 'doc: fix sphinx compatibility' " luca.boccassi
2020-05-19 12:54 ` [dpdk-stable] patch 'ipsec: fix build dependency on hash lib' " luca.boccassi
2020-05-19 12:54 ` [dpdk-stable] patch 'log: fix level picked with globbing on type register' " luca.boccassi
2020-05-19 12:54 ` [dpdk-stable] patch 'doc: fix matrix CSS for recent sphinx' " luca.boccassi
2020-05-19 12:54 ` [dpdk-stable] patch 'eal: fix PRNG init with HPET enabled' " luca.boccassi
2020-05-19 12:54 ` [dpdk-stable] patch 'vfio: fix race condition with sysfs' " luca.boccassi
2020-05-19 12:54 ` [dpdk-stable] patch 'vfio: fix use after free with multiprocess' " luca.boccassi
2020-05-19 12:54 ` [dpdk-stable] patch 'drivers: fix log type variables for -fno-common' " luca.boccassi
2020-05-19 12:54 ` [dpdk-stable] patch 'cryptodev: add asymmetric session-less feature name' " luca.boccassi
2020-05-19 12:54 ` [dpdk-stable] patch 'drivers/crypto: fix log type variables for -fno-common' " luca.boccassi
2020-05-19 12:54 ` [dpdk-stable] patch 'test/crypto: fix flag check' " luca.boccassi
2020-05-19 12:54 ` [dpdk-stable] patch 'crypto/openssl: fix out-of-place encryption' " luca.boccassi
2020-05-19 12:54 ` [dpdk-stable] patch 'security: fix verification of parameters' " luca.boccassi
2020-05-19 13:02 ` [dpdk-stable] patch 'security: fix return types in documentation' " luca.boccassi
2020-05-19 13:02   ` [dpdk-stable] patch 'security: fix session counter' " luca.boccassi
2020-05-19 13:02   ` [dpdk-stable] patch 'test: remove redundant macro' " luca.boccassi
2020-05-19 13:02   ` [dpdk-stable] patch 'net/hns3: fix packets offload features flags in Rx' " luca.boccassi
2020-05-19 13:02   ` [dpdk-stable] patch 'net/hns3: fix default error code of command interface' " luca.boccassi
2020-05-19 13:02   ` [dpdk-stable] patch 'net/hns3: fix crash when flushing RSS flow rules with FLR' " luca.boccassi
2020-05-19 13:02   ` [dpdk-stable] patch 'net/hns3: fix configuring illegal VLAN PVID' " luca.boccassi
2020-05-19 13:02   ` [dpdk-stable] patch 'net/hns3: fix status after repeated resets' " luca.boccassi
2020-05-19 13:02   ` [dpdk-stable] patch 'net/hinic: fix LRO' " luca.boccassi
2020-05-19 13:02   ` [dpdk-stable] patch 'net/hinic/base: fix port start during FW hot update' " luca.boccassi
2020-05-19 13:02   ` [dpdk-stable] patch 'net/ipn3ke: use control thread to check link status' " luca.boccassi
2020-05-19 13:02   ` [dpdk-stable] patch 'net/hns3: fix configuring RSS hash when rules are flushed' " luca.boccassi
2020-05-19 13:02   ` [dpdk-stable] patch 'net/hns3: fix mailbox opcode data type' " luca.boccassi
2020-05-19 13:02   ` [dpdk-stable] patch 'net/hns3: fix return value of setting VLAN offload' " luca.boccassi
2020-05-19 13:02   ` [dpdk-stable] patch 'net/ice/base: fix uninitialized stack variables' " luca.boccassi
2020-05-19 13:02   ` [dpdk-stable] patch 'net/ice/base: read PSM clock frequency from register' " luca.boccassi
2020-05-19 13:02   ` [dpdk-stable] patch 'net/ice/base: minor fixes' " luca.boccassi
2020-05-19 13:02   ` [dpdk-stable] patch 'net/ice/base: fix MAC write command' " luca.boccassi
2020-05-19 13:02   ` [dpdk-stable] patch 'net/ixgbe: fix link status inconsistencies' " luca.boccassi
2020-05-19 13:02   ` [dpdk-stable] patch 'net/mlx5: fix validation of VXLAN/VXLAN-GPE specs' " luca.boccassi
2020-05-19 13:02   ` [dpdk-stable] patch 'net/mlx5: fix metadata for compressed Rx CQEs' " luca.boccassi
2020-05-19 13:02   ` [dpdk-stable] patch 'net/mlx5: update VLAN and encap actions validation' " luca.boccassi
2020-05-19 13:02   ` [dpdk-stable] patch 'net/mlx5: fix call to modify action without init item' " luca.boccassi
2020-05-19 13:02   ` [dpdk-stable] patch 'net/mlx5: fix zero value validation for metadata' " luca.boccassi
2020-05-19 13:02   ` [dpdk-stable] patch 'examples/vmdq: fix output of pools/queues' " luca.boccassi
2020-05-19 13:02   ` [dpdk-stable] patch 'net/mvneta: do not use PMD log type' " luca.boccassi
2020-05-19 13:02   ` [dpdk-stable] patch 'net/virtio: " luca.boccassi
2020-05-19 13:02   ` [dpdk-stable] patch 'net/tap: " luca.boccassi
2020-05-19 13:02   ` [dpdk-stable] patch 'net/pfe: " luca.boccassi
2020-05-19 13:02   ` [dpdk-stable] patch 'net/bnxt: " luca.boccassi
2020-05-19 13:02   ` [dpdk-stable] patch 'net/dpaa: use dynamic " luca.boccassi
2020-05-19 13:02   ` [dpdk-stable] patch 'net/thunderx: " luca.boccassi
2020-05-19 13:02   ` [dpdk-stable] patch 'net/mlx5: fix imissed counter overflow' " luca.boccassi
2020-05-19 13:02   ` [dpdk-stable] patch 'net/ice/base: fix binary order for GTPU filter' " luca.boccassi
2020-05-19 13:02   ` [dpdk-stable] patch 'net/ice/base: check memory pointer before copying' " luca.boccassi
2020-05-19 13:02   ` [dpdk-stable] patch 'net/tap: remove unused assert' " luca.boccassi
2020-05-19 13:02   ` [dpdk-stable] patch 'net/octeontx: fix meson build for disabled drivers' " luca.boccassi
2020-05-19 13:02   ` [dpdk-stable] patch 'net/octeontx2: fix device configuration sequence' " luca.boccassi
2020-05-19 13:02   ` [dpdk-stable] patch 'net/ice: change default tunnel type' " luca.boccassi
2020-05-19 13:02   ` [dpdk-stable] patch 'net/ice: add action number check for switch' " luca.boccassi
2020-05-19 13:02   ` [dpdk-stable] patch 'net/ice: fix input set of VLAN item' " luca.boccassi
2020-05-19 13:02   ` [dpdk-stable] patch 'net/netvsc: propagate descriptor limits from VF' " luca.boccassi
2020-05-19 13:02   ` [dpdk-stable] patch 'net/netvsc: handle Rx packets during multi-channel setup' " luca.boccassi
2020-05-19 13:02   ` [dpdk-stable] patch 'net/netvsc: split send buffers from Tx descriptors' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/netvsc: fix memory free on device close' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/netvsc: remove process event optimization' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/netvsc: handle Tx completions based on burst size' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/netvsc: avoid possible live lock' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/memif: fix resource leak' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'ethdev: fix build when vtune profiling is on' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'examples/vmdq: fix RSS configuration' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/nfp: fix log format specifiers' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/nfp: fix dangling pointer on probe failure' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/ice: fix RSS advanced rule' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/ice/base: remove unused code in switch " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/ena/base: make allocation macros thread-safe' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/ena/base: prevent allocation of zero sized memory' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/ena/base: fix documentation of functions' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/ena/base: fix indentation in CQ polling' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/ena/base: fix indentation of multiple defines' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/ena: set IO ring size to valid value' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/mlx5: fix counter container usage' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'app/testpmd: fix PPPoE flow command' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/pfe: fix double free of MAC address' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/null: fix secondary burst function selection' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/null: remove redundant check' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/hinic/base: fix PF firmware hot-active problem' " luca.boccassi
2020-05-20 12:29     ` Wangxiaoyun (Cloud)
2020-05-20 12:48       ` Kevin Traynor
2020-05-20 16:55       ` Luca Boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'vhost/crypto: add missing user protocol flag' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'vhost: fix packed ring zero-copy' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/vhost: fix potential memory leak on close' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/virtio: fix outdated comment' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'vhost: remove unused variable' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'vhost: make IOTLB cache name unique among processes' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/hns3: clear residual flow rules on init' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/hns3: add RSS hash offload to capabilities' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/hns3: fix RSS key length' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/hns3: fix default VLAN filter configuration for PF' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/hns3: fix VLAN filter when setting promisucous mode' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'common/mlx5: fix build with -fno-common' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/mlx4: " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/mlx5: use open/read/close for ib stats query' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/octeontx2: enable error and RAS interrupt in configure' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/octeontx2: disable unnecessary error interrupts' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/i40e: relax barrier in Tx for NEON' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/mlx5: add device parameter for MPRQ stride size' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/mlx5: enable MPRQ multi-stride operations' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/mlx5: add multi-segment packets in MPRQ mode' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/mlx5: fix meter suffix table leak' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/mlx5: fix jump " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/enic: fix flow action reordering' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/mlx5: fix push VLAN action to use item info' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/mlx5: fix validation of push VLAN without full mask' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/tap: fix mbuf double free when writev fails' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/tap: fix mbuf and mem leak during queue release' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/tap: fix check for mbuf number of segment' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/tap: fix file close on remove' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/tap: fix fd leak on creation failure' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/tap: fix unexpected link handler' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'vhost: fix shadow update' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'vhost: fix shadowed descriptors not flushed' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/virtio-user: fix devargs parsing' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/tap: fix queues fd check before close' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'net/i40e: fix flow director initialisation' " luca.boccassi
2020-05-19 13:03   ` [dpdk-stable] patch 'common/mlx5: fix build with rdma-core 21' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'net/mlx5: fix crash when releasing meter table' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'net/mlx5: fix header modify action validation' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'net/mlx5: set dynamic flow metadata in Rx queues' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'net/mlx5: improve logging of MPRQ selection' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'net/ixgbe: fix resource leak after thread exits normally' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'net/ixgbe: fix link status after port reset' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'net/iavf: fix stats query error code' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'net/bnxt: fix HWRM command during FW reset' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'net/bnxt: use true/false for bool types' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'net/bnxt: fix port start failure handling' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'net/bnxt: fix VLAN add when port is stopped' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'security: fix crash at accessing non-implemented ops' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'mempool: remove inline functions from export list' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'lpm6: fix size of tbl8 group' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'lpm6: fix comments spelling' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'eal: " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'timer: protect initialization with lock' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'fix various typos found by Lintian' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'app: fix usage help of options separated by dashes' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'usertools: check for pci.ids in /usr/share/misc' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'bus/pci: fix UIO resource access from secondary process' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'net/bnxt: fix memory leak during queue restart' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'net/bnxt: fix VNIC Rx queue count on VNIC free' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'app/testpmd: add parsing for QinQ VLAN headers' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'doc: fix log level example in Linux guide' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'eal: fix typo in endian conversion macros' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'net/avp: fix gcc 10 maybe-uninitialized warning' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'examples/ipsec-gw: " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'eal/x86: ignore gcc 10 stringop-overflow warnings' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'kvargs: fix invalid token parsing on FreeBSD' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'eal/ppc: fix build with gcc 9.3' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'net/bnxt: fix max ring count' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'net/i40e: fix flow director for ARP packets' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'doc: add i40e limitation for flow director' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'net/i40e: fix flush of flow director filter' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'net/mlx5: fix assert in doorbell lookup' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'vhost: fix peer close check' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'vhost: prevent zero-copy with incompatible client mode' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'net/mlx5: fix assert in dynamic metadata handling' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'net/mlx5: fix actions validation on root table' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'net/sfc/base: use simpler EF10 family conditional check' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'net/sfc/base: use simpler EF10 family run-time checks' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'net/sfc/base: fix build when EVB is enabled' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'net/softnic: fix memory leak for thread' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'net/softnic: fix resource leak for pipeline' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'net/hns3: fix VLAN PVID when configuring device' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'net/hns3: fix return value when clearing statistics' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'net/octeontx: fix dangling pointer on init failure' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'net/mlx5: fix RSS enablement' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'net/mlx5: fix assert in modify converting' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'net/mlx5: fix VLAN ID check' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'net/mlx5: fix gcc 10 enum-conversion warning' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'event/octeontx2: fix queue removal from Rx adapter' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'eventdev: fix probe and remove for secondary process' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'event/dsw: avoid reusing previously recorded events' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'common/octeontx: fix gcc 9.1 ABI break' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'mk: fix static linkage of mlx dependency' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'service: fix race condition for MT unsafe service' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'service: fix identification of service running on other lcore' " luca.boccassi
2020-05-19 13:04   ` [dpdk-stable] patch 'service: remove rte prefix from static functions' " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'remove references to private PCI probe function' " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'examples/l2fwd-keepalive: fix mbuf pool size' " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'mem: fix overflow on allocation' " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'examples/eventdev: fix crash on exit' " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'mempool/octeontx2: fix build for gcc O1 optimization' " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'net/ena: fix build for " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'event/octeontx2: " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'test/flow_classify: enable multi-sockets system' " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'bbdev: fix doxygen comments' " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'crypto/ccp: fix fd leak on probe failure' " luca.boccassi
2020-05-19 13:20     ` Kumar, Ravi1
2020-05-19 13:05   ` [dpdk-stable] patch 'app/crypto-perf: fix display of sample test vector' " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'crypto/qat: fix cipher descriptor for ZUC and SNOW' " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'crypto/kasumi: fix extern declaration' " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'examples/fips_validation: fix parsing of algorithms' " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'drivers/crypto: disable gcc 10 no-common errors' " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'ipsec: check SAD lookup error' " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'net/failsafe: fix fd leak' " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'app/testpmd: fix statistics after reset' " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'net/netvsc: fix comment spelling' " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'bus/vmbus: " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'net/netvsc: do RSS across Rx queue only' " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'net/netvsc: do not configure RSS if disabled' " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'net/bnxt: fix possible stack smashing' " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'net/iavf: fix link speed' " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'net/ixgbe: fix link status synchronization on BSD' " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'net/ice: support mark only action for flow director' " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'net/ice: fix crash in switch filter' " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'net/tap: fix crash in flow destroy' " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'net/bnxt: fix number of TQM ring' " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'net/bnxt: fix TQM ring context memory size' " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'net/virtio: fix crash when device reconnecting' " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'net/bnxt: fix FW version query' " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'app/testpmd: fix memory failure handling for i40e DDP' " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'bus/fslmc: fix dereferencing null pointer' " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'net/dpaa2: fix 10G port negotiation' " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'net/dpaa2: fix congestion ID for multiple traffic classes' " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'bus/fslmc: fix size of qman fq descriptor' " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'net/ixgbe: fix link state timing on fiber ports' " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'Revert "net/bnxt: fix TQM ring context memory size"' " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'Revert "net/bnxt: fix number of TQM ring"' " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'net/ice: fix variable initialization' " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'net/ring: fix device pointer on allocation' " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'net/mlx5: fix match on empty VLAN item in DV mode' " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'net/mlx5: fix matching for UDP tunnels with Verbs' " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'net/mlx5: fix meter color register consideration' " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'net/mlx4: fix drop queue error handling' " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'net/mlx5: fix Tx queue release debug log timing' " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'app: remove extra new line after link duplex' " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'examples: " luca.boccassi
2020-05-19 13:05   ` [dpdk-stable] patch 'crypto/qat: support plain SHA1..SHA512 hashes' " luca.boccassi
2020-05-22  9:39     ` [dpdk-stable] patch 'event/dsw: fix enqueue burst return value' " luca.boccassi
2020-05-22  9:39       ` [dpdk-stable] patch 'app/eventdev: check Tx adapter service ID' " luca.boccassi
2020-05-22  9:39       ` [dpdk-stable] patch 'crypto/caam_jr: fix check of file descriptors' " luca.boccassi
2020-05-22  9:39       ` [dpdk-stable] patch 'crypto/caam_jr: fix IRQ functions return type' " luca.boccassi
2020-05-22  9:39       ` [dpdk-stable] patch 'build: disable gcc 10 zero-length-bounds warning' " luca.boccassi
2020-05-22  9:39       ` [dpdk-stable] patch 'doc: fix LTO config option' " luca.boccassi
2020-05-22  9:39       ` [dpdk-stable] patch 'doc: fix default symbol binding in ABI guide' " luca.boccassi
2020-05-22  9:39       ` [dpdk-stable] patch 'eal: fix C++17 compilation' " luca.boccassi
2020-05-22  9:39       ` [dpdk-stable] patch 'doc: fix build issue in ABI guide' " luca.boccassi
2020-05-22  9:39       ` [dpdk-stable] patch 'net/e1000: fix port hotplug for multi-process' " luca.boccassi
2020-05-22  9:39       ` [dpdk-stable] patch 'doc: fix multicast filter feature announcement' " luca.boccassi
2020-05-22  9:39       ` [dpdk-stable] patch 'common/mlx5: fix umem buffer alignment' " luca.boccassi
2020-05-22  9:39       ` [dpdk-stable] patch 'net/ixgbe: fix statistics in flow control mode' " luca.boccassi
2020-05-22  9:39       ` [dpdk-stable] patch 'net/qede: fix link state configuration' " luca.boccassi
2020-05-22  9:39       ` [dpdk-stable] patch 'net/mlx5: fix VLAN flow action with wildcard VLAN item' " luca.boccassi
2020-05-22  9:39       ` [dpdk-stable] patch 'net/vmxnet3: handle bad host framing' " luca.boccassi
2020-05-22  9:39       ` [dpdk-stable] patch 'net/hinic: fix queues resource free' " luca.boccassi
2020-05-22  9:39       ` [dpdk-stable] patch 'net/hinic: fix Tx mbuf length while copying' " luca.boccassi
2020-05-22  9:39       ` [dpdk-stable] patch 'vhost: handle mbuf allocation failure' " luca.boccassi
2020-05-22  9:39       ` [dpdk-stable] patch 'net/virtio: fix unexpected event after reconnect' " luca.boccassi
2020-05-22  9:40       ` [dpdk-stable] patch 'net/qede: fix port reconfiguration' " luca.boccassi
2020-05-22  9:40       ` [dpdk-stable] patch 'net/bnxt: fix error log for command timeout' " luca.boccassi
2020-05-22  9:40       ` [dpdk-stable] patch 'net/bnxt: fix using RSS config struct' " luca.boccassi
2020-05-22  9:40       ` [dpdk-stable] patch 'net/bnxt: fix storing MAC address twice' " luca.boccassi
2020-05-22  9:40       ` [dpdk-stable] patch 'net/i40e: fix queue region in RSS flow' " luca.boccassi
2020-05-22  9:40       ` [dpdk-stable] patch 'net/mlx5: fix doorbell bitmap management offsets' " luca.boccassi
2020-05-22  9:40       ` [dpdk-stable] patch 'common/mlx5: fix netlink buffer allocation from stack' " luca.boccassi
2020-05-22  9:40       ` [dpdk-stable] patch 'app/testpmd: fix DCB set' " luca.boccassi
2020-05-22  9:40       ` [dpdk-stable] patch 'net/ixgbe/base: update copyright' " luca.boccassi
2020-05-22  9:40       ` [dpdk-stable] patch 'net/i40e/base: " luca.boccassi
2020-05-22  9:40       ` [dpdk-stable] patch 'common/iavf: " luca.boccassi
2020-05-22  9:40       ` [dpdk-stable] patch 'net/ice/base: " luca.boccassi
2020-05-22  9:40       ` [dpdk-stable] patch 'pci: accept 32-bit domain numbers' " luca.boccassi
2020-05-22  9:40       ` [dpdk-stable] patch 'pci: reject negative values in PCI id' " luca.boccassi
2020-05-22  9:40       ` [dpdk-stable] patch 'doc: fix typos in ABI policy' " luca.boccassi
2020-05-22  9:40       ` [dpdk-stable] patch 'kvargs: fix strcmp helper documentation' " luca.boccassi
2020-05-22  9:40       ` [dpdk-stable] patch 'mempool/dpaa2: install missing header with meson' " luca.boccassi
2020-05-22  9:40       ` [dpdk-stable] patch 'fix same typo in multiple places' " luca.boccassi
2020-05-22  9:40       ` [dpdk-stable] patch 'examples/kni: fix MTU change to setup Tx queue' " luca.boccassi
2020-05-22  9:40       ` [dpdk-stable] patch 'net/i40e: fix wild pointer' " luca.boccassi
2020-05-22  9:40       ` [dpdk-stable] patch 'net/ice: fix RSS for GTPU' " luca.boccassi
2020-05-22  9:40       ` [dpdk-stable] patch 'net/i40e: fix queue related exception handling' " luca.boccassi
2020-05-22  9:40       ` [dpdk-stable] patch 'vhost: fix zero-copy server mode' " luca.boccassi
2020-05-27  9:24         ` [dpdk-stable] patch 'net/mvpp2: fix build with gcc 10' " luca.boccassi
2020-05-27  9:24           ` [dpdk-stable] patch 'examples/vm_power: fix build with -fno-common' " luca.boccassi
2020-05-27  9:24           ` [dpdk-stable] patch 'examples/vm_power: drop Unix path limit redefinition' " luca.boccassi
2020-05-27  9:24           ` [dpdk-stable] patch 'doc: fix build with doxygen 1.8.18' " luca.boccassi
2020-05-27  9:24           ` [dpdk-stable] patch 'cryptodev: fix SHA-1 digest enum comment' " luca.boccassi
2020-05-27  9:24           ` [dpdk-stable] patch 'net/bnxt: fix Rx ring producer index' " luca.boccassi
2020-05-27  9:24           ` [dpdk-stable] patch 'net/octeontx2: fix buffer size assignment' " luca.boccassi
2020-05-27  9:24           ` [dpdk-stable] patch 'net/hinic: fix TSO' " luca.boccassi
2020-05-27  9:24           ` [dpdk-stable] patch 'net/sfc/base: fix manual filter delete in EF10' " luca.boccassi
2020-05-27  9:24           ` [dpdk-stable] patch 'net/i40e: fix setting L2TAG' " luca.boccassi
2020-05-27  9:24           ` [dpdk-stable] patch 'net/iavf: " luca.boccassi
2020-05-27  9:24           ` [dpdk-stable] patch 'net/ice: " luca.boccassi
2020-05-27  9:24           ` [dpdk-stable] patch 'net/i40e: fix flow director enabling' " luca.boccassi
2020-05-27  9:24           ` [dpdk-stable] patch 'net/ixgbe: check driver type in MACsec API' " luca.boccassi
2020-05-27  9:24           ` [dpdk-stable] patch 'examples/kni: fix crash during MTU set' " luca.boccassi
2020-05-27  9:24           ` [dpdk-stable] patch 'examples/ip_pipeline: remove check of null response' " luca.boccassi
2020-05-27  9:24           ` [dpdk-stable] patch 'doc: fix typo in contributors guide' " luca.boccassi
2020-05-27  9:24           ` luca.boccassi
2020-05-27  9:24           ` [dpdk-stable] patch 'doc: prefer https when pointing to dpdk.org' " luca.boccassi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).