* [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(¶m, &acl_param, sizeof(param));
- param.socket_id = RTE_MAX_NUMA_NODES + 1;
+ if (rte_eal_has_hugepages()) {
+ /* invalid NUMA node */
+ memcpy(¶m, &acl_param, sizeof(param));
+ param.socket_id = RTE_MAX_NUMA_NODES + 1;
- acx = rte_acl_create(¶m);
- 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(¶m);
+ 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 +
| 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;
}
--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, ð_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,