* patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6
@ 2024-06-24 23:57 luca.boccassi
2024-06-24 23:57 ` patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' " luca.boccassi
` (79 more replies)
0 siblings, 80 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:57 UTC (permalink / raw)
To: Christian Ehrhardt; +Cc: Luca Boccassi, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/9dc3826a4a05b41de3325af68b61cb00599f4e90
Thanks.
Luca Boccassi
---
From 9dc3826a4a05b41de3325af68b61cb00599f4e90 Mon Sep 17 00:00:00 2001
From: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Date: Tue, 28 Nov 2023 15:40:45 +0100
Subject: [PATCH] test: force IOVA mode on PPC64 without huge pages
[ upstream commit 6b07762e949036389030cf5a1a9bb8a1e4d6ee2d ]
On ppc64, without huge pages, pa would be the default but fails like:
EAL: Cannot use IOVA as 'PA' since physical addresses are not available
On a normal system setup we'd expect an admin to set up huge pages
and for the unlikely case that they do not do that set iova=va themselves.
But the testing infrastructure does not have this conscious
admin that will do that, so fix test execution that by adjusting the
tests arguments accordingly if the conditions are met.
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
app/test/meson.build | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/app/test/meson.build b/app/test/meson.build
index 4e39c9e7cf..eee02cd8ff 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -474,15 +474,21 @@ dpdk_test = executable('dpdk-test',
driver_install_path),
install: true)
-has_hugepage = run_command(py3, 'has_hugepage.py', check: true).stdout().strip() != '0'
-message('hugepage availability: @0@'.format(has_hugepage))
-
# some perf tests (eg: memcpy perf autotest)take very long
# to complete, so timeout to 10 minutes
timeout_seconds = 600
timeout_seconds_fast = 10
test_no_huge_args = ['--no-huge', '-m', '2048']
+has_hugepage = run_command(py3, 'has_hugepage.py', check: true).stdout().strip() != '0'
+message('hugepage availability: @0@'.format(has_hugepage))
+if not has_hugepage
+ if arch_subdir == 'ppc'
+ # On ppc64, without huge pages, PA would be the default but fails like:
+ # EAL: Cannot use IOVA as 'PA' since physical addresses are not available
+ test_no_huge_args += '--iova-mode=va'
+ endif
+endif
foreach arg : fast_tests
test_args = []
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:13.345210209 +0100
+++ 0001-test-force-IOVA-mode-on-PPC64-without-huge-pages.patch 2024-06-25 00:22:13.053182958 +0100
@@ -1 +1 @@
-From 6b07762e949036389030cf5a1a9bb8a1e4d6ee2d Mon Sep 17 00:00:00 2001
+From 9dc3826a4a05b41de3325af68b61cb00599f4e90 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6b07762e949036389030cf5a1a9bb8a1e4d6ee2d ]
+
@@ -18,2 +20,2 @@
- app/test/suites/meson.build | 7 +++++++
- 1 file changed, 7 insertions(+)
+ app/test/meson.build | 12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
@@ -21,5 +23,16 @@
-diff --git a/app/test/suites/meson.build b/app/test/suites/meson.build
-index 478f245a54..191702cf76 100644
---- a/app/test/suites/meson.build
-+++ b/app/test/suites/meson.build
-@@ -9,6 +9,13 @@ timeout_seconds_fast = 10
+diff --git a/app/test/meson.build b/app/test/meson.build
+index 4e39c9e7cf..eee02cd8ff 100644
+--- a/app/test/meson.build
++++ b/app/test/meson.build
+@@ -474,15 +474,21 @@ dpdk_test = executable('dpdk-test',
+ driver_install_path),
+ install: true)
+
+-has_hugepage = run_command(py3, 'has_hugepage.py', check: true).stdout().strip() != '0'
+-message('hugepage availability: @0@'.format(has_hugepage))
+-
+ # some perf tests (eg: memcpy perf autotest)take very long
+ # to complete, so timeout to 10 minutes
+ timeout_seconds = 600
+ timeout_seconds_fast = 10
+
@@ -27,2 +40,2 @@
- has_hugepage = run_command(has_hugepages_cmd, check: true).stdout().strip() != '0'
- message('hugepage availability: @0@'.format(has_hugepage))
++has_hugepage = run_command(py3, 'has_hugepage.py', check: true).stdout().strip() != '0'
++message('hugepage availability: @0@'.format(has_hugepage))
@@ -37,2 +50,2 @@
- # process source files to determine the different unit test suites
- # - fast_tests
+ foreach arg : fast_tests
+ test_args = []
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
@ 2024-06-24 23:57 ` luca.boccassi
2024-06-24 23:57 ` patch 'eal/unix: support ZSTD compression for firmware' " luca.boccassi
` (78 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:57 UTC (permalink / raw)
To: David Marchand
Cc: Bruce Richardson, Patrick Robb, Thomas Monjalon, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/502049c8b3e997a10a3e77ad87d714ec2df63235
Thanks.
Luca Boccassi
---
From 502049c8b3e997a10a3e77ad87d714ec2df63235 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Mon, 29 Apr 2024 12:00:59 +0200
Subject: [PATCH] bus/pci: fix build with musl 1.2.4 / Alpine 3.19
[ upstream commit 884f83ccf74b5364430d3b21c653d5f6e359e091 ]
Following an upgrade of musl, pread64/pwrite64 wrappers are not provided
anymore. Switch to POSIX pread/pwrite.
Bugzilla ID: 1422
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Patrick Robb <probb@iol.unh.edu>
Tested-by: Thomas Monjalon <thomas@monjalon.net>
---
drivers/bus/pci/linux/pci_vfio.c | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c
index fe83e1a04e..44c132ae8a 100644
--- a/drivers/bus/pci/linux/pci_vfio.c
+++ b/drivers/bus/pci/linux/pci_vfio.c
@@ -53,7 +53,7 @@ pci_vfio_read_config(const struct rte_intr_handle *intr_handle,
if (vfio_dev_fd < 0)
return -1;
- return pread64(vfio_dev_fd, buf, len,
+ return pread(vfio_dev_fd, buf, len,
VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) + offs);
}
@@ -66,7 +66,7 @@ pci_vfio_write_config(const struct rte_intr_handle *intr_handle,
if (vfio_dev_fd < 0)
return -1;
- return pwrite64(vfio_dev_fd, buf, len,
+ return pwrite(vfio_dev_fd, buf, len,
VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) + offs);
}
@@ -80,7 +80,7 @@ pci_vfio_get_msix_bar(int fd, struct pci_msix_table *msix_table)
uint8_t cap_id, cap_offset;
/* read PCI capability pointer from config space */
- ret = pread64(fd, ®, sizeof(reg),
+ ret = pread(fd, ®, sizeof(reg),
VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
PCI_CAPABILITY_LIST);
if (ret != sizeof(reg)) {
@@ -95,7 +95,7 @@ pci_vfio_get_msix_bar(int fd, struct pci_msix_table *msix_table)
while (cap_offset) {
/* read PCI capability ID */
- ret = pread64(fd, ®, sizeof(reg),
+ ret = pread(fd, ®, sizeof(reg),
VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
cap_offset);
if (ret != sizeof(reg)) {
@@ -109,7 +109,7 @@ pci_vfio_get_msix_bar(int fd, struct pci_msix_table *msix_table)
/* if we haven't reached MSI-X, check next capability */
if (cap_id != PCI_CAP_ID_MSIX) {
- ret = pread64(fd, ®, sizeof(reg),
+ ret = pread(fd, ®, sizeof(reg),
VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
cap_offset);
if (ret != sizeof(reg)) {
@@ -126,7 +126,7 @@ pci_vfio_get_msix_bar(int fd, struct pci_msix_table *msix_table)
/* else, read table offset */
else {
/* table offset resides in the next 4 bytes */
- ret = pread64(fd, ®, sizeof(reg),
+ ret = pread(fd, ®, sizeof(reg),
VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
cap_offset + 4);
if (ret != sizeof(reg)) {
@@ -135,7 +135,7 @@ pci_vfio_get_msix_bar(int fd, struct pci_msix_table *msix_table)
return -1;
}
- ret = pread64(fd, &flags, sizeof(flags),
+ ret = pread(fd, &flags, sizeof(flags),
VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
cap_offset + 2);
if (ret != sizeof(flags)) {
@@ -162,7 +162,7 @@ pci_vfio_enable_bus_memory(int dev_fd)
uint16_t cmd;
int ret;
- ret = pread64(dev_fd, &cmd, sizeof(cmd),
+ ret = pread(dev_fd, &cmd, sizeof(cmd),
VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
PCI_COMMAND);
@@ -175,7 +175,7 @@ pci_vfio_enable_bus_memory(int dev_fd)
return 0;
cmd |= PCI_COMMAND_MEMORY;
- ret = pwrite64(dev_fd, &cmd, sizeof(cmd),
+ ret = pwrite(dev_fd, &cmd, sizeof(cmd),
VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
PCI_COMMAND);
@@ -194,7 +194,7 @@ pci_vfio_set_bus_master(int dev_fd, bool op)
uint16_t reg;
int ret;
- ret = pread64(dev_fd, ®, sizeof(reg),
+ ret = pread(dev_fd, ®, sizeof(reg),
VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
PCI_COMMAND);
if (ret != sizeof(reg)) {
@@ -208,7 +208,7 @@ pci_vfio_set_bus_master(int dev_fd, bool op)
else
reg &= ~(PCI_COMMAND_MASTER);
- ret = pwrite64(dev_fd, ®, sizeof(reg),
+ ret = pwrite(dev_fd, ®, sizeof(reg),
VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
PCI_COMMAND);
@@ -464,7 +464,7 @@ pci_vfio_is_ioport_bar(int vfio_dev_fd, int bar_index)
uint32_t ioport_bar;
int ret;
- ret = pread64(vfio_dev_fd, &ioport_bar, sizeof(ioport_bar),
+ ret = pread(vfio_dev_fd, &ioport_bar, sizeof(ioport_bar),
VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX)
+ PCI_BASE_ADDRESS_0 + bar_index*4);
if (ret != sizeof(ioport_bar)) {
@@ -1133,7 +1133,7 @@ pci_vfio_ioport_read(struct rte_pci_ioport *p,
if (vfio_dev_fd < 0)
return;
- if (pread64(vfio_dev_fd, data,
+ if (pread(vfio_dev_fd, data,
len, p->base + offset) <= 0)
RTE_LOG(ERR, EAL,
"Can't read from PCI bar (%" PRIu64 ") : offset (%x)\n",
@@ -1150,7 +1150,7 @@ pci_vfio_ioport_write(struct rte_pci_ioport *p,
if (vfio_dev_fd < 0)
return;
- if (pwrite64(vfio_dev_fd, data,
+ if (pwrite(vfio_dev_fd, data,
len, p->base + offset) <= 0)
RTE_LOG(ERR, EAL,
"Can't write to PCI bar (%" PRIu64 ") : offset (%x)\n",
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:13.380509740 +0100
+++ 0002-bus-pci-fix-build-with-musl-1.2.4-Alpine-3.19.patch 2024-06-25 00:22:13.057183040 +0100
@@ -1 +1 @@
-From 884f83ccf74b5364430d3b21c653d5f6e359e091 Mon Sep 17 00:00:00 2001
+From 502049c8b3e997a10a3e77ad87d714ec2df63235 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 884f83ccf74b5364430d3b21c653d5f6e359e091 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -17,2 +18,2 @@
- drivers/bus/pci/linux/pci_vfio.c | 18 +++++++++---------
- 1 file changed, 9 insertions(+), 9 deletions(-)
+ drivers/bus/pci/linux/pci_vfio.c | 28 ++++++++++++++--------------
+ 1 file changed, 14 insertions(+), 14 deletions(-)
@@ -21 +22 @@
-index 87c16e6603..05b03a9667 100644
+index fe83e1a04e..44c132ae8a 100644
@@ -24,2 +25,2 @@
-@@ -80,7 +80,7 @@ pci_vfio_read_config(const struct rte_pci_device *dev,
- if ((uint64_t)len + offs > size)
+@@ -53,7 +53,7 @@ pci_vfio_read_config(const struct rte_intr_handle *intr_handle,
+ if (vfio_dev_fd < 0)
@@ -28,2 +29,3 @@
-- return pread64(fd, buf, len, offset + offs);
-+ return pread(fd, buf, len, offset + offs);
+- return pread64(vfio_dev_fd, buf, len,
++ return pread(vfio_dev_fd, buf, len,
+ VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) + offs);
@@ -32,3 +34,2 @@
- int
-@@ -101,7 +101,7 @@ pci_vfio_write_config(const struct rte_pci_device *dev,
- if ((uint64_t)len + offs > size)
+@@ -66,7 +66,7 @@ pci_vfio_write_config(const struct rte_intr_handle *intr_handle,
+ if (vfio_dev_fd < 0)
@@ -37,2 +38,3 @@
-- return pwrite64(fd, buf, len, offset + offs);
-+ return pwrite(fd, buf, len, offset + offs);
+- return pwrite64(vfio_dev_fd, buf, len,
++ return pwrite(vfio_dev_fd, buf, len,
+ VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) + offs);
@@ -41,4 +43,2 @@
- /* get PCI BAR number where MSI-X interrupts are */
-@@ -155,7 +155,7 @@ pci_vfio_enable_bus_memory(struct rte_pci_device *dev, int dev_fd)
- return -1;
- }
+@@ -80,7 +80,7 @@ pci_vfio_get_msix_bar(int fd, struct pci_msix_table *msix_table)
+ uint8_t cap_id, cap_offset;
@@ -46,2 +46,50 @@
-- ret = pread64(dev_fd, &cmd, sizeof(cmd), offset + RTE_PCI_COMMAND);
-+ ret = pread(dev_fd, &cmd, sizeof(cmd), offset + RTE_PCI_COMMAND);
+ /* read PCI capability pointer from config space */
+- ret = pread64(fd, ®, sizeof(reg),
++ ret = pread(fd, ®, sizeof(reg),
+ VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
+ PCI_CAPABILITY_LIST);
+ if (ret != sizeof(reg)) {
+@@ -95,7 +95,7 @@ pci_vfio_get_msix_bar(int fd, struct pci_msix_table *msix_table)
+ while (cap_offset) {
+
+ /* read PCI capability ID */
+- ret = pread64(fd, ®, sizeof(reg),
++ ret = pread(fd, ®, sizeof(reg),
+ VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
+ cap_offset);
+ if (ret != sizeof(reg)) {
+@@ -109,7 +109,7 @@ pci_vfio_get_msix_bar(int fd, struct pci_msix_table *msix_table)
+
+ /* if we haven't reached MSI-X, check next capability */
+ if (cap_id != PCI_CAP_ID_MSIX) {
+- ret = pread64(fd, ®, sizeof(reg),
++ ret = pread(fd, ®, sizeof(reg),
+ VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
+ cap_offset);
+ if (ret != sizeof(reg)) {
+@@ -126,7 +126,7 @@ pci_vfio_get_msix_bar(int fd, struct pci_msix_table *msix_table)
+ /* else, read table offset */
+ else {
+ /* table offset resides in the next 4 bytes */
+- ret = pread64(fd, ®, sizeof(reg),
++ ret = pread(fd, ®, sizeof(reg),
+ VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
+ cap_offset + 4);
+ if (ret != sizeof(reg)) {
+@@ -135,7 +135,7 @@ pci_vfio_get_msix_bar(int fd, struct pci_msix_table *msix_table)
+ return -1;
+ }
+
+- ret = pread64(fd, &flags, sizeof(flags),
++ ret = pread(fd, &flags, sizeof(flags),
+ VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
+ cap_offset + 2);
+ if (ret != sizeof(flags)) {
+@@ -162,7 +162,7 @@ pci_vfio_enable_bus_memory(int dev_fd)
+ uint16_t cmd;
+ int ret;
+
+- ret = pread64(dev_fd, &cmd, sizeof(cmd),
++ ret = pread(dev_fd, &cmd, sizeof(cmd),
+ VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
+ PCI_COMMAND);
@@ -49,3 +97 @@
- if (ret != sizeof(cmd)) {
- RTE_LOG(ERR, EAL, "Cannot read command from PCI config space!\n");
-@@ -166,7 +166,7 @@ pci_vfio_enable_bus_memory(struct rte_pci_device *dev, int dev_fd)
+@@ -175,7 +175,7 @@ pci_vfio_enable_bus_memory(int dev_fd)
@@ -54,9 +100,27 @@
- cmd |= RTE_PCI_COMMAND_MEMORY;
-- ret = pwrite64(dev_fd, &cmd, sizeof(cmd), offset + RTE_PCI_COMMAND);
-+ ret = pwrite(dev_fd, &cmd, sizeof(cmd), offset + RTE_PCI_COMMAND);
-
- if (ret != sizeof(cmd)) {
- RTE_LOG(ERR, EAL, "Cannot write command to PCI config space!\n");
-@@ -425,7 +425,7 @@ pci_vfio_is_ioport_bar(const struct rte_pci_device *dev, int vfio_dev_fd,
- return -1;
- }
+ cmd |= PCI_COMMAND_MEMORY;
+- ret = pwrite64(dev_fd, &cmd, sizeof(cmd),
++ ret = pwrite(dev_fd, &cmd, sizeof(cmd),
+ VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
+ PCI_COMMAND);
+
+@@ -194,7 +194,7 @@ pci_vfio_set_bus_master(int dev_fd, bool op)
+ uint16_t reg;
+ int ret;
+
+- ret = pread64(dev_fd, ®, sizeof(reg),
++ ret = pread(dev_fd, ®, sizeof(reg),
+ VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
+ PCI_COMMAND);
+ if (ret != sizeof(reg)) {
+@@ -208,7 +208,7 @@ pci_vfio_set_bus_master(int dev_fd, bool op)
+ else
+ reg &= ~(PCI_COMMAND_MASTER);
+
+- ret = pwrite64(dev_fd, ®, sizeof(reg),
++ ret = pwrite(dev_fd, ®, sizeof(reg),
+ VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
+ PCI_COMMAND);
+
+@@ -464,7 +464,7 @@ pci_vfio_is_ioport_bar(int vfio_dev_fd, int bar_index)
+ uint32_t ioport_bar;
+ int ret;
@@ -66 +130,2 @@
- offset + RTE_PCI_BASE_ADDRESS_0 + bar_index * 4);
+ VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX)
+ + PCI_BASE_ADDRESS_0 + bar_index*4);
@@ -68,2 +133 @@
- RTE_LOG(ERR, EAL, "Cannot read command (%x) from config space!\n",
-@@ -1276,7 +1276,7 @@ pci_vfio_ioport_read(struct rte_pci_ioport *p,
+@@ -1133,7 +1133,7 @@ pci_vfio_ioport_read(struct rte_pci_ioport *p,
@@ -78 +142 @@
-@@ -1293,7 +1293,7 @@ pci_vfio_ioport_write(struct rte_pci_ioport *p,
+@@ -1150,7 +1150,7 @@ pci_vfio_ioport_write(struct rte_pci_ioport *p,
@@ -87,18 +150,0 @@
-@@ -1324,7 +1324,7 @@ pci_vfio_mmio_read(const struct rte_pci_device *dev, int bar,
- if ((uint64_t)len + offs > size)
- return -1;
-
-- return pread64(fd, buf, len, offset + offs);
-+ return pread(fd, buf, len, offset + offs);
- }
-
- int
-@@ -1344,7 +1344,7 @@ pci_vfio_mmio_write(const struct rte_pci_device *dev, int bar,
- if ((uint64_t)len + offs > size)
- return -1;
-
-- return pwrite64(fd, buf, len, offset + offs);
-+ return pwrite(fd, buf, len, offset + offs);
- }
-
- int
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'eal/unix: support ZSTD compression for firmware' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
2024-06-24 23:57 ` patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' " luca.boccassi
@ 2024-06-24 23:57 ` luca.boccassi
2024-06-24 23:57 ` patch 'pcapng: add memcpy check' " luca.boccassi
` (77 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:57 UTC (permalink / raw)
To: David Marchand; +Cc: Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/73c189a0674d34b631241c3757e0a1ec13809c00
Thanks.
Luca Boccassi
---
From 73c189a0674d34b631241c3757e0a1ec13809c00 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 7 May 2024 13:01:53 +0200
Subject: [PATCH] eal/unix: support ZSTD compression for firmware
[ upstream commit 6f80df8cb0f889203d7cd27766abcc6ebc720e33 ]
Ubuntu 24.04 started to compress firmware files with ZSTD compression.
Bugzilla ID: 1437
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
lib/eal/unix/eal_firmware.c | 23 +++++++++++++++++------
1 file changed, 17 insertions(+), 6 deletions(-)
diff --git a/lib/eal/unix/eal_firmware.c b/lib/eal/unix/eal_firmware.c
index 1a7cf8e7b7..9fc2f7763a 100644
--- a/lib/eal/unix/eal_firmware.c
+++ b/lib/eal/unix/eal_firmware.c
@@ -15,6 +15,8 @@
#include "eal_firmware.h"
+static const char * const compression_suffixes[] = { "xz", "zst" };
+
#ifdef RTE_HAS_LIBARCHIVE
struct firmware_read_ctx {
@@ -36,7 +38,11 @@ firmware_open(struct firmware_read_ctx *ctx, const char *name, size_t blocksize)
err = archive_read_support_filter_xz(ctx->a);
if (err != ARCHIVE_OK && err != ARCHIVE_WARN)
- goto error;
+ RTE_LOG(DEBUG, EAL, "could not initialise libarchive for xz compression\n");
+
+ err = archive_read_support_filter_zstd(ctx->a);
+ if (err != ARCHIVE_OK && err != ARCHIVE_WARN)
+ RTE_LOG(DEBUG, EAL, "could not initialise libarchive for zstd compression\n");
if (archive_read_open_filename(ctx->a, name, blocksize) != ARCHIVE_OK)
goto error;
@@ -147,16 +153,21 @@ rte_firmware_read(const char *name, void **buf, size_t *bufsz)
ret = firmware_read(name, buf, bufsz);
if (ret < 0) {
- snprintf(path, sizeof(path), "%s.xz", name);
- path[PATH_MAX - 1] = '\0';
+ unsigned int i;
+
+ for (i = 0; i < RTE_DIM(compression_suffixes); i++) {
+ snprintf(path, sizeof(path), "%s.%s", name, compression_suffixes[i]);
+ path[PATH_MAX - 1] = '\0';
+ if (access(path, F_OK) != 0)
+ continue;
#ifndef RTE_HAS_LIBARCHIVE
- if (access(path, F_OK) == 0) {
RTE_LOG(WARNING, EAL, "libarchive not linked, %s cannot be decompressed\n",
path);
- }
#else
- ret = firmware_read(path, buf, bufsz);
+ ret = firmware_read(path, buf, bufsz);
#endif
+ break;
+ }
}
return ret;
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:13.416458958 +0100
+++ 0003-eal-unix-support-ZSTD-compression-for-firmware.patch 2024-06-25 00:22:13.061183121 +0100
@@ -1 +1 @@
-From 6f80df8cb0f889203d7cd27766abcc6ebc720e33 Mon Sep 17 00:00:00 2001
+From 73c189a0674d34b631241c3757e0a1ec13809c00 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6f80df8cb0f889203d7cd27766abcc6ebc720e33 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 1d47e879c8..0d69b1e3f0 100644
+index 1a7cf8e7b7..9fc2f7763a 100644
@@ -21 +22,2 @@
-@@ -16,6 +16,8 @@
+@@ -15,6 +15,8 @@
+
@@ -23 +24,0 @@
- #include "eal_private.h"
@@ -30 +31 @@
-@@ -37,7 +39,11 @@ firmware_open(struct firmware_read_ctx *ctx, const char *name, size_t blocksize)
+@@ -36,7 +38,11 @@ firmware_open(struct firmware_read_ctx *ctx, const char *name, size_t blocksize)
@@ -35 +36 @@
-+ EAL_LOG(DEBUG, "could not initialise libarchive for xz compression");
++ RTE_LOG(DEBUG, EAL, "could not initialise libarchive for xz compression\n");
@@ -39 +40 @@
-+ EAL_LOG(DEBUG, "could not initialise libarchive for zstd compression");
++ RTE_LOG(DEBUG, EAL, "could not initialise libarchive for zstd compression\n");
@@ -43 +44 @@
-@@ -148,16 +154,21 @@ rte_firmware_read(const char *name, void **buf, size_t *bufsz)
+@@ -147,16 +153,21 @@ rte_firmware_read(const char *name, void **buf, size_t *bufsz)
@@ -58 +59 @@
- EAL_LOG(WARNING, "libarchive not linked, %s cannot be decompressed",
+ RTE_LOG(WARNING, EAL, "libarchive not linked, %s cannot be decompressed\n",
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'pcapng: add memcpy check' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
2024-06-24 23:57 ` patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' " luca.boccassi
2024-06-24 23:57 ` patch 'eal/unix: support ZSTD compression for firmware' " luca.boccassi
@ 2024-06-24 23:57 ` luca.boccassi
2024-06-24 23:57 ` patch 'net/virtio-user: " luca.boccassi
` (76 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:57 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/461739eed3b49b2106ec8c8074f04daaa00d4a95
Thanks.
Luca Boccassi
---
From 461739eed3b49b2106ec8c8074f04daaa00d4a95 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Mon, 20 May 2024 18:01:03 -0700
Subject: [PATCH] pcapng: add memcpy check
[ upstream commit 06f69f8fdbd218ed7a7d664ee49bd27ee1641cdd ]
When adding option with no data, the rte_pcapng_add_option would
call memcpy with src of NULL and size of zero. This generates a
warning if fortify is enabled.
Bugzilla ID: 1446
Fixes: 8d23ce8f5ee9 ("pcapng: add new library for writing pcapng files")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/pcapng/rte_pcapng.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/pcapng/rte_pcapng.c b/lib/pcapng/rte_pcapng.c
index 80d08e1a3b..d8fd36799b 100644
--- a/lib/pcapng/rte_pcapng.c
+++ b/lib/pcapng/rte_pcapng.c
@@ -110,7 +110,8 @@ pcapng_add_option(struct pcapng_option *popt, uint16_t code,
{
popt->code = code;
popt->length = len;
- memcpy(popt->data, data, len);
+ if (len > 0)
+ memcpy(popt->data, data, len);
return (struct pcapng_option *)((uint8_t *)popt + pcapng_optlen(len));
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:13.451616314 +0100
+++ 0004-pcapng-add-memcpy-check.patch 2024-06-25 00:22:13.061183121 +0100
@@ -1 +1 @@
-From 06f69f8fdbd218ed7a7d664ee49bd27ee1641cdd Mon Sep 17 00:00:00 2001
+From 461739eed3b49b2106ec8c8074f04daaa00d4a95 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 06f69f8fdbd218ed7a7d664ee49bd27ee1641cdd ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index f74ec939a9..7254defce7 100644
+index 80d08e1a3b..d8fd36799b 100644
@@ -23 +24 @@
-@@ -128,7 +128,8 @@ pcapng_add_option(struct pcapng_option *popt, uint16_t code,
+@@ -110,7 +110,8 @@ pcapng_add_option(struct pcapng_option *popt, uint16_t code,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/virtio-user: add memcpy check' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (2 preceding siblings ...)
2024-06-24 23:57 ` patch 'pcapng: add memcpy check' " luca.boccassi
@ 2024-06-24 23:57 ` luca.boccassi
2024-06-24 23:57 ` patch 'eal/windows: install sched.h file' " luca.boccassi
` (75 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:57 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/7cc8737e523e7d68601dda1fe40aa3205cb0a8b9
Thanks.
Luca Boccassi
---
From 7cc8737e523e7d68601dda1fe40aa3205cb0a8b9 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Mon, 20 May 2024 18:01:04 -0700
Subject: [PATCH] net/virtio-user: add memcpy check
[ upstream commit 0ad961387e94a9ccfc1484a1d742d6f79eda9cd9 ]
If fortify is enabled, it will generate a warning if memcpy
src is NULL even if size is zero. This happens if the MP message
sync is called with no file descriptors.
Bugzilla ID: 1446
Fixes: 6a84c37e3975 ("net/virtio-user: add vhost-user adapter layer")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/virtio/virtio_user/vhost_user.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/virtio/virtio_user/vhost_user.c b/drivers/net/virtio/virtio_user/vhost_user.c
index 3c05ac9cc0..c10252506b 100644
--- a/drivers/net/virtio/virtio_user/vhost_user.c
+++ b/drivers/net/virtio/virtio_user/vhost_user.c
@@ -128,7 +128,8 @@ vhost_user_write(int fd, struct vhost_user_msg *msg, int *fds, int fd_num)
cmsg->cmsg_len = CMSG_LEN(fd_size);
cmsg->cmsg_level = SOL_SOCKET;
cmsg->cmsg_type = SCM_RIGHTS;
- memcpy(CMSG_DATA(cmsg), fds, fd_size);
+ if (fd_size > 0)
+ memcpy(CMSG_DATA(cmsg), fds, fd_size);
do {
r = sendmsg(fd, &msgh, 0);
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:13.587408350 +0100
+++ 0005-net-virtio-user-add-memcpy-check.patch 2024-06-25 00:22:13.065183203 +0100
@@ -1 +1 @@
-From 0ad961387e94a9ccfc1484a1d742d6f79eda9cd9 Mon Sep 17 00:00:00 2001
+From 7cc8737e523e7d68601dda1fe40aa3205cb0a8b9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0ad961387e94a9ccfc1484a1d742d6f79eda9cd9 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'eal/windows: install sched.h file' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (3 preceding siblings ...)
2024-06-24 23:57 ` patch 'net/virtio-user: " luca.boccassi
@ 2024-06-24 23:57 ` luca.boccassi
2024-06-24 23:57 ` patch 'latencystats: fix literal float suffix' " luca.boccassi
` (74 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:57 UTC (permalink / raw)
To: Tyler Retzlaff; +Cc: Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/9957ef4a31aa489fc58c0a6c0ce79f73a7f62379
Thanks.
Luca Boccassi
---
From 9957ef4a31aa489fc58c0a6c0ce79f73a7f62379 Mon Sep 17 00:00:00 2001
From: Tyler Retzlaff <roretzla@linux.microsoft.com>
Date: Tue, 12 Mar 2024 10:54:37 -0700
Subject: [PATCH] eal/windows: install sched.h file
[ upstream commit ad645a9317bc93c7e4921afa7bf33e1415b531cd ]
rte_os.h includes sched.h so install sched.h to allow DPDK installed to
DESTDIR to be usable.
Fixes: e8428a9d89f1 ("eal/windows: add some basic functions and macros")
Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
lib/eal/windows/include/meson.build | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/eal/windows/include/meson.build b/lib/eal/windows/include/meson.build
index 5fb1962ac7..e985a77d58 100644
--- a/lib/eal/windows/include/meson.build
+++ b/lib/eal/windows/include/meson.build
@@ -6,4 +6,5 @@ includes += include_directories('.')
headers += files(
'rte_os.h',
'rte_windows.h',
+ 'sched.h',
)
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:13.631020404 +0100
+++ 0006-eal-windows-install-sched.h-file.patch 2024-06-25 00:22:13.065183203 +0100
@@ -1 +1 @@
-From ad645a9317bc93c7e4921afa7bf33e1415b531cd Mon Sep 17 00:00:00 2001
+From 9957ef4a31aa489fc58c0a6c0ce79f73a7f62379 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ad645a9317bc93c7e4921afa7bf33e1415b531cd ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'latencystats: fix literal float suffix' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (4 preceding siblings ...)
2024-06-24 23:57 ` patch 'eal/windows: install sched.h file' " luca.boccassi
@ 2024-06-24 23:57 ` luca.boccassi
2024-06-24 23:57 ` patch 'net/nfp: fix representor port queue release' " luca.boccassi
` (73 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:57 UTC (permalink / raw)
To: Tyler Retzlaff; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/0257b6327a34cb112afbc349468a275aa839875d
Thanks.
Luca Boccassi
---
From 0257b6327a34cb112afbc349468a275aa839875d Mon Sep 17 00:00:00 2001
From: Tyler Retzlaff <roretzla@linux.microsoft.com>
Date: Mon, 15 Apr 2024 14:32:26 -0700
Subject: [PATCH] latencystats: fix literal float suffix
[ upstream commit 792cb874db647e31183ab6680922cd293dd5bfa6 ]
Add missing f suffix to floating point literal to avoid warning about
truncation from double to float.
Fixes: 5cd3cac9ed22 ("latency: added new library for latency stats")
Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
lib/latencystats/rte_latencystats.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/latencystats/rte_latencystats.c b/lib/latencystats/rte_latencystats.c
index 8985a377db..e47eac2cf8 100644
--- a/lib/latencystats/rte_latencystats.c
+++ b/lib/latencystats/rte_latencystats.c
@@ -164,7 +164,7 @@ calc_latency(uint16_t pid __rte_unused,
* a constant smoothing factor between 0 and 1. The value
* is used below for measuring average latency.
*/
- const float alpha = 0.2;
+ const float alpha = 0.2f;
now = rte_rdtsc();
for (i = 0; i < nb_pkts; i++) {
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:13.754169540 +0100
+++ 0007-latencystats-fix-literal-float-suffix.patch 2024-06-25 00:22:13.065183203 +0100
@@ -1 +1 @@
-From 792cb874db647e31183ab6680922cd293dd5bfa6 Mon Sep 17 00:00:00 2001
+From 0257b6327a34cb112afbc349468a275aa839875d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 792cb874db647e31183ab6680922cd293dd5bfa6 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 4ea9b0d75b..cae4b50878 100644
+index 8985a377db..e47eac2cf8 100644
@@ -21 +22 @@
-@@ -166,7 +166,7 @@ calc_latency(uint16_t pid __rte_unused,
+@@ -164,7 +164,7 @@ calc_latency(uint16_t pid __rte_unused,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/nfp: fix representor port queue release' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (5 preceding siblings ...)
2024-06-24 23:57 ` patch 'latencystats: fix literal float suffix' " luca.boccassi
@ 2024-06-24 23:57 ` luca.boccassi
2024-06-24 23:57 ` patch 'net/bonding: fix failover time of LACP with mode 4' " luca.boccassi
` (72 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:57 UTC (permalink / raw)
To: Long Wu; +Cc: Chaoyong He, Peng Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/541c30f3d18029161a14c356ba88a5c8d2d16b82
Thanks.
Luca Boccassi
---
From 541c30f3d18029161a14c356ba88a5c8d2d16b82 Mon Sep 17 00:00:00 2001
From: Long Wu <long.wu@corigine.com>
Date: Tue, 19 Mar 2024 15:07:54 +0800
Subject: [PATCH] net/nfp: fix representor port queue release
[ upstream commit 57f62be098be4c95964691183504c77e31797a42 ]
The PF representor port's queue is different from the VF/physical
representor port. So the release process in close port should
be different too.
Fixes: a256a1227dbe ("net/nfp: fix resource leak for exit of flower firmware")
Signed-off-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
.../net/nfp/flower/nfp_flower_representor.c | 69 ++++++++++++++-----
1 file changed, 50 insertions(+), 19 deletions(-)
diff --git a/drivers/net/nfp/flower/nfp_flower_representor.c b/drivers/net/nfp/flower/nfp_flower_representor.c
index 4b8b02321c..090c828c18 100644
--- a/drivers/net/nfp/flower/nfp_flower_representor.c
+++ b/drivers/net/nfp/flower/nfp_flower_representor.c
@@ -524,6 +524,54 @@ nfp_flower_repr_tx_burst(void *tx_queue,
return sent;
}
+static void
+nfp_flower_repr_free_queue(struct nfp_flower_representor *repr)
+{
+ uint16_t i;
+ struct rte_eth_dev *eth_dev = repr->eth_dev;
+
+ for (i = 0; i < eth_dev->data->nb_tx_queues; i++)
+ rte_free(eth_dev->data->tx_queues[i]);
+
+ for (i = 0; i < eth_dev->data->nb_rx_queues; i++)
+ rte_free(eth_dev->data->rx_queues[i]);
+}
+
+static void
+nfp_flower_pf_repr_close_queue(struct nfp_flower_representor *repr)
+{
+ struct rte_eth_dev *eth_dev = repr->eth_dev;
+
+ /*
+ * We assume that the DPDK application is stopping all the
+ * threads/queues before calling the device close function.
+ */
+ nfp_net_disable_queues(eth_dev);
+
+ /* Clear queues */
+ nfp_net_close_tx_queue(eth_dev);
+ nfp_net_close_rx_queue(eth_dev);
+}
+
+static void
+nfp_flower_repr_close_queue(struct nfp_flower_representor *repr)
+{
+ switch (repr->repr_type) {
+ case NFP_REPR_TYPE_PHYS_PORT:
+ nfp_flower_repr_free_queue(repr);
+ break;
+ case NFP_REPR_TYPE_PF:
+ nfp_flower_pf_repr_close_queue(repr);
+ break;
+ case NFP_REPR_TYPE_VF:
+ nfp_flower_repr_free_queue(repr);
+ break;
+ default:
+ PMD_DRV_LOG(ERR, "Unsupported repr port type.");
+ break;
+ }
+}
+
static int
nfp_flower_repr_uninit(struct rte_eth_dev *eth_dev)
{
@@ -581,8 +629,6 @@ nfp_flower_repr_dev_close(struct rte_eth_dev *dev)
uint16_t i;
struct nfp_net_hw *hw;
struct nfp_pf_dev *pf_dev;
- struct nfp_net_txq *this_tx_q;
- struct nfp_net_rxq *this_rx_q;
struct nfp_flower_representor *repr;
struct nfp_app_fw_flower *app_fw_flower;
@@ -594,26 +640,11 @@ nfp_flower_repr_dev_close(struct rte_eth_dev *dev)
hw = app_fw_flower->pf_hw;
pf_dev = hw->pf_dev;
- /*
- * We assume that the DPDK application is stopping all the
- * threads/queues before calling the device close function.
- */
- nfp_net_disable_queues(dev);
-
- /* Clear queues */
- for (i = 0; i < dev->data->nb_tx_queues; i++) {
- this_tx_q = dev->data->tx_queues[i];
- nfp_net_reset_tx_queue(this_tx_q);
- }
-
- for (i = 0; i < dev->data->nb_rx_queues; i++) {
- this_rx_q = dev->data->rx_queues[i];
- nfp_net_reset_rx_queue(this_rx_q);
- }
-
if (pf_dev->app_fw_id != NFP_APP_FW_FLOWER_NIC)
return -EINVAL;
+ nfp_flower_repr_close_queue(repr);
+
nfp_flower_repr_free(repr, repr->repr_type);
for (i = 0; i < MAX_FLOWER_VFS; i++) {
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:13.882323625 +0100
+++ 0008-net-nfp-fix-representor-port-queue-release.patch 2024-06-25 00:22:13.069183284 +0100
@@ -1 +1 @@
-From 57f62be098be4c95964691183504c77e31797a42 Mon Sep 17 00:00:00 2001
+From 541c30f3d18029161a14c356ba88a5c8d2d16b82 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 57f62be098be4c95964691183504c77e31797a42 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index b2c55879ca..d4c3c30682 100644
+index 4b8b02321c..090c828c18 100644
@@ -24 +25 @@
-@@ -305,6 +305,54 @@ nfp_flower_repr_tx_burst(void *tx_queue,
+@@ -524,6 +524,54 @@ nfp_flower_repr_tx_burst(void *tx_queue,
@@ -79 +80 @@
-@@ -362,8 +410,6 @@ nfp_flower_repr_dev_close(struct rte_eth_dev *dev)
+@@ -581,8 +629,6 @@ nfp_flower_repr_dev_close(struct rte_eth_dev *dev)
@@ -88 +89 @@
-@@ -375,26 +421,11 @@ nfp_flower_repr_dev_close(struct rte_eth_dev *dev)
+@@ -594,26 +640,11 @@ nfp_flower_repr_dev_close(struct rte_eth_dev *dev)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/bonding: fix failover time of LACP with mode 4' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (6 preceding siblings ...)
2024-06-24 23:57 ` patch 'net/nfp: fix representor port queue release' " luca.boccassi
@ 2024-06-24 23:57 ` luca.boccassi
2024-06-24 23:57 ` patch 'net/hns3: fix offload flag of IEEE 1588' " luca.boccassi
` (71 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:57 UTC (permalink / raw)
To: Gaoxiang Liu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6282bde96dc3f9d60c67eaaf4a340a20c3347829
Thanks.
Luca Boccassi
---
From 6282bde96dc3f9d60c67eaaf4a340a20c3347829 Mon Sep 17 00:00:00 2001
From: Gaoxiang Liu <liugaoxiang@huawei.com>
Date: Mon, 6 Jun 2022 22:34:45 +0800
Subject: [PATCH] net/bonding: fix failover time of LACP with mode 4
[ upstream commit a78a1ed8ba6ae7666d13fee1895badb8eb2abf5f ]
When the primary port of bond member with bond mode 4 linked down,
the system id of the other member ports changed.
It may cause some switches to renegotiate, and the process takes a few
seconds. It is not acceptable for any Telcos.
We need sub-second switch-over time like in Linux.
Set the MAC of the bond port to the member port's system to solve the
problem.
Bugzilla ID: 551
Fixes: 46fb43683679 ("bond: add mode 4")
Signed-off-by: Gaoxiang Liu <liugaoxiang@huawei.com>
---
drivers/net/bonding/rte_eth_bond_8023ad.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index 928dfca7af..2a81ab5bf3 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -865,7 +865,6 @@ bond_mode_8023ad_periodic_cb(void *arg)
struct bond_dev_private *internals = bond_dev->data->dev_private;
struct port *port;
struct rte_eth_link link_info;
- struct rte_ether_addr slave_addr;
struct rte_mbuf *lacp_pkt = NULL;
uint16_t slave_id;
uint16_t i;
@@ -892,7 +891,6 @@ bond_mode_8023ad_periodic_cb(void *arg)
key = 0;
}
- rte_eth_macaddr_get(slave_id, &slave_addr);
port = &bond_mode_8023ad_ports[slave_id];
key = rte_cpu_to_be_16(key);
@@ -904,8 +902,8 @@ bond_mode_8023ad_periodic_cb(void *arg)
SM_FLAG_SET(port, NTT);
}
- if (!rte_is_same_ether_addr(&port->actor.system, &slave_addr)) {
- rte_ether_addr_copy(&slave_addr, &port->actor.system);
+ if (!rte_is_same_ether_addr(&internals->mode4.mac_addr, &port->actor.system)) {
+ rte_ether_addr_copy(&internals->mode4.mac_addr, &port->actor.system);
if (port->aggregator_port_id == slave_id)
SM_FLAG_SET(port, NTT);
}
@@ -1171,21 +1169,20 @@ void
bond_mode_8023ad_mac_address_update(struct rte_eth_dev *bond_dev)
{
struct bond_dev_private *internals = bond_dev->data->dev_private;
- struct rte_ether_addr slave_addr;
struct port *slave, *agg_slave;
uint16_t slave_id, i, j;
bond_mode_8023ad_stop(bond_dev);
+ rte_eth_macaddr_get(internals->port_id, &internals->mode4.mac_addr);
for (i = 0; i < internals->active_slave_count; i++) {
slave_id = internals->active_slaves[i];
slave = &bond_mode_8023ad_ports[slave_id];
- rte_eth_macaddr_get(slave_id, &slave_addr);
- if (rte_is_same_ether_addr(&slave_addr, &slave->actor.system))
+ if (rte_is_same_ether_addr(&internals->mode4.mac_addr, &slave->actor.system))
continue;
- rte_ether_addr_copy(&slave_addr, &slave->actor.system);
+ rte_ether_addr_copy(&internals->mode4.mac_addr, &slave->actor.system);
/* Do nothing if this port is not an aggregator. In other case
* Set NTT flag on every port that use this aggregator. */
if (slave->aggregator_port_id != slave_id)
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:14.010325082 +0100
+++ 0009-net-bonding-fix-failover-time-of-LACP-with-mode-4.patch 2024-06-25 00:22:13.073183366 +0100
@@ -1 +1 @@
-From a78a1ed8ba6ae7666d13fee1895badb8eb2abf5f Mon Sep 17 00:00:00 2001
+From 6282bde96dc3f9d60c67eaaf4a340a20c3347829 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a78a1ed8ba6ae7666d13fee1895badb8eb2abf5f ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 79f1b3f1a0..06c21ebe6d 100644
+index 928dfca7af..2a81ab5bf3 100644
@@ -32 +33 @@
-- struct rte_ether_addr member_addr;
+- struct rte_ether_addr slave_addr;
@@ -34 +35 @@
- uint16_t member_id;
+ uint16_t slave_id;
@@ -40,2 +41,2 @@
-- rte_eth_macaddr_get(member_id, &member_addr);
- port = &bond_mode_8023ad_ports[member_id];
+- rte_eth_macaddr_get(slave_id, &slave_addr);
+ port = &bond_mode_8023ad_ports[slave_id];
@@ -48,2 +49,2 @@
-- if (!rte_is_same_ether_addr(&port->actor.system, &member_addr)) {
-- rte_ether_addr_copy(&member_addr, &port->actor.system);
+- if (!rte_is_same_ether_addr(&port->actor.system, &slave_addr)) {
+- rte_ether_addr_copy(&slave_addr, &port->actor.system);
@@ -52 +53 @@
- if (port->aggregator_port_id == member_id)
+ if (port->aggregator_port_id == slave_id)
@@ -55 +56 @@
-@@ -1173,21 +1171,20 @@ void
+@@ -1171,21 +1169,20 @@ void
@@ -59,3 +60,3 @@
-- struct rte_ether_addr member_addr;
- struct port *member, *agg_member;
- uint16_t member_id, i, j;
+- struct rte_ether_addr slave_addr;
+ struct port *slave, *agg_slave;
+ uint16_t slave_id, i, j;
@@ -66,4 +67,4 @@
- for (i = 0; i < internals->active_member_count; i++) {
- member_id = internals->active_members[i];
- member = &bond_mode_8023ad_ports[member_id];
-- rte_eth_macaddr_get(member_id, &member_addr);
+ for (i = 0; i < internals->active_slave_count; i++) {
+ slave_id = internals->active_slaves[i];
+ slave = &bond_mode_8023ad_ports[slave_id];
+- rte_eth_macaddr_get(slave_id, &slave_addr);
@@ -71,2 +72,2 @@
-- if (rte_is_same_ether_addr(&member_addr, &member->actor.system))
-+ if (rte_is_same_ether_addr(&internals->mode4.mac_addr, &member->actor.system))
+- if (rte_is_same_ether_addr(&slave_addr, &slave->actor.system))
++ if (rte_is_same_ether_addr(&internals->mode4.mac_addr, &slave->actor.system))
@@ -75,2 +76,2 @@
-- rte_ether_addr_copy(&member_addr, &member->actor.system);
-+ rte_ether_addr_copy(&internals->mode4.mac_addr, &member->actor.system);
+- rte_ether_addr_copy(&slave_addr, &slave->actor.system);
++ rte_ether_addr_copy(&internals->mode4.mac_addr, &slave->actor.system);
@@ -79 +80 @@
- if (member->aggregator_port_id != member_id)
+ if (slave->aggregator_port_id != slave_id)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/hns3: fix offload flag of IEEE 1588' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (7 preceding siblings ...)
2024-06-24 23:57 ` patch 'net/bonding: fix failover time of LACP with mode 4' " luca.boccassi
@ 2024-06-24 23:57 ` luca.boccassi
2024-06-24 23:57 ` patch 'net/hns3: fix Rx timestamp flag' " luca.boccassi
` (70 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:57 UTC (permalink / raw)
To: Dengdui Huang; +Cc: Jie Hai, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/419ac23f30616787391300ed67909f9b1cad9b32
Thanks.
Luca Boccassi
---
From 419ac23f30616787391300ed67909f9b1cad9b32 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Wed, 3 Apr 2024 18:16:19 +0800
Subject: [PATCH] net/hns3: fix offload flag of IEEE 1588
[ upstream commit bd8f90f0175914bc7df9ef2e9170a850faaa253b ]
Currently, the RTE_MBUF_F_RX_IEEE1588_TMST offload flag will
not be set when the scatter algorithm is used.
This patch fixes it.
Fixes: 4801f0403b58 ("net/hns3: fix IEEE 1588 PTP for scalar scattered Rx")
Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Signed-off-by: Jie Hai <haijie1@huawei.com>
---
drivers/net/hns3/hns3_rxtx.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index bbb3b305d1..b87655c953 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -2671,6 +2671,7 @@ hns3_recv_scattered_pkts(void *rx_queue,
continue;
}
+ first_seg->ol_flags = 0;
if (unlikely(bd_base_info & BIT(HNS3_RXD_TS_VLD_B)))
hns3_rx_ptp_timestamp_handle(rxq, first_seg, timestamp);
@@ -2700,7 +2701,7 @@ hns3_recv_scattered_pkts(void *rx_queue,
first_seg->port = rxq->port_id;
first_seg->hash.rss = rte_le_to_cpu_32(rxd.rx.rss_hash);
- first_seg->ol_flags = RTE_MBUF_F_RX_RSS_HASH;
+ first_seg->ol_flags |= RTE_MBUF_F_RX_RSS_HASH;
if (unlikely(bd_base_info & BIT(HNS3_RXD_LUM_B))) {
first_seg->hash.fdir.hi =
rte_le_to_cpu_16(rxd.rx.fd_id);
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:14.133677285 +0100
+++ 0010-net-hns3-fix-offload-flag-of-IEEE-1588.patch 2024-06-25 00:22:13.077183447 +0100
@@ -1 +1 @@
-From bd8f90f0175914bc7df9ef2e9170a850faaa253b Mon Sep 17 00:00:00 2001
+From 419ac23f30616787391300ed67909f9b1cad9b32 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bd8f90f0175914bc7df9ef2e9170a850faaa253b ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 73a388b2fe..e6d277ffad 100644
+index bbb3b305d1..b87655c953 100644
@@ -23 +24 @@
-@@ -2669,6 +2669,7 @@ hns3_recv_scattered_pkts(void *rx_queue,
+@@ -2671,6 +2671,7 @@ hns3_recv_scattered_pkts(void *rx_queue,
@@ -31 +32 @@
-@@ -2698,7 +2699,7 @@ hns3_recv_scattered_pkts(void *rx_queue,
+@@ -2700,7 +2701,7 @@ hns3_recv_scattered_pkts(void *rx_queue,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/hns3: fix Rx timestamp flag' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (8 preceding siblings ...)
2024-06-24 23:57 ` patch 'net/hns3: fix offload flag of IEEE 1588' " luca.boccassi
@ 2024-06-24 23:57 ` luca.boccassi
2024-06-24 23:57 ` patch 'net/hns3: fix double free for Rx/Tx queue' " luca.boccassi
` (69 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:57 UTC (permalink / raw)
To: Dengdui Huang; +Cc: Jie Hai, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/afd6de50ebd4bd2d41abe98bf0aa2a3c8146bb36
Thanks.
Luca Boccassi
---
From afd6de50ebd4bd2d41abe98bf0aa2a3c8146bb36 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Wed, 3 Apr 2024 18:16:20 +0800
Subject: [PATCH] net/hns3: fix Rx timestamp flag
[ upstream commit e7141041d3aa74ff49b703424f120a6e2c00dcb4 ]
The flag RTE_MBUF_F_RX_IEEE1588_PTP depends on the packet
type and does not need to be set when reading Rx timestamp.
Fixes: 38b539d96eb6 ("net/hns3: support IEEE 1588 PTP")
Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Signed-off-by: Jie Hai <haijie1@huawei.com>
---
drivers/net/hns3/hns3_rxtx.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index b87655c953..392df0bae5 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -2392,8 +2392,7 @@ hns3_rx_ptp_timestamp_handle(struct hns3_rx_queue *rxq, struct rte_mbuf *mbuf,
{
struct hns3_pf *pf = HNS3_DEV_PRIVATE_TO_PF(rxq->hns);
- mbuf->ol_flags |= RTE_MBUF_F_RX_IEEE1588_PTP |
- RTE_MBUF_F_RX_IEEE1588_TMST;
+ mbuf->ol_flags |= RTE_MBUF_F_RX_IEEE1588_TMST;
if (hns3_timestamp_rx_dynflag > 0) {
*RTE_MBUF_DYNFIELD(mbuf, hns3_timestamp_dynfield_offset,
rte_mbuf_timestamp_t *) = timestamp;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:14.211019811 +0100
+++ 0011-net-hns3-fix-Rx-timestamp-flag.patch 2024-06-25 00:22:13.081183529 +0100
@@ -1 +1 @@
-From e7141041d3aa74ff49b703424f120a6e2c00dcb4 Mon Sep 17 00:00:00 2001
+From afd6de50ebd4bd2d41abe98bf0aa2a3c8146bb36 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e7141041d3aa74ff49b703424f120a6e2c00dcb4 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index e6d277ffad..55311402fe 100644
+index b87655c953..392df0bae5 100644
@@ -22 +23 @@
-@@ -2389,8 +2389,7 @@ hns3_rx_ptp_timestamp_handle(struct hns3_rx_queue *rxq, struct rte_mbuf *mbuf,
+@@ -2392,8 +2392,7 @@ hns3_rx_ptp_timestamp_handle(struct hns3_rx_queue *rxq, struct rte_mbuf *mbuf,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/hns3: fix double free for Rx/Tx queue' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (9 preceding siblings ...)
2024-06-24 23:57 ` patch 'net/hns3: fix Rx timestamp flag' " luca.boccassi
@ 2024-06-24 23:57 ` luca.boccassi
2024-06-24 23:57 ` patch 'net/hns3: fix variable overflow' " luca.boccassi
` (68 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:57 UTC (permalink / raw)
To: Dengdui Huang; +Cc: Jie Hai, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/8ec7b95de7673fe8085ae92aa829a5e71b200211
Thanks.
Luca Boccassi
---
From 8ec7b95de7673fe8085ae92aa829a5e71b200211 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Wed, 3 Apr 2024 18:16:21 +0800
Subject: [PATCH] net/hns3: fix double free for Rx/Tx queue
[ upstream commit bbf6fcc0cc62031a26517608a471873339423d8c ]
The Pointers to some resources on the Rx/Tx queue need to be set to NULL
after free inside the hns3_rx/tx_queue_release(), as this function is
called from multiple threads (reset thread, device config thread, etc),
leading to double memory free error.
Fixes: bba636698316 ("net/hns3: support Rx/Tx and related operations")
Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Signed-off-by: Jie Hai <haijie1@huawei.com>
---
drivers/net/hns3/hns3_rxtx.c | 23 ++++++++++++++++++-----
1 file changed, 18 insertions(+), 5 deletions(-)
diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index 392df0bae5..c0479a44dc 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -86,9 +86,14 @@ hns3_rx_queue_release(void *queue)
struct hns3_rx_queue *rxq = queue;
if (rxq) {
hns3_rx_queue_release_mbufs(rxq);
- if (rxq->mz)
+ if (rxq->mz) {
rte_memzone_free(rxq->mz);
- rte_free(rxq->sw_ring);
+ rxq->mz = NULL;
+ }
+ if (rxq->sw_ring) {
+ rte_free(rxq->sw_ring);
+ rxq->sw_ring = NULL;
+ }
rte_free(rxq);
}
}
@@ -99,10 +104,18 @@ hns3_tx_queue_release(void *queue)
struct hns3_tx_queue *txq = queue;
if (txq) {
hns3_tx_queue_release_mbufs(txq);
- if (txq->mz)
+ if (txq->mz) {
rte_memzone_free(txq->mz);
- rte_free(txq->sw_ring);
- rte_free(txq->free);
+ txq->mz = NULL;
+ }
+ if (txq->sw_ring) {
+ rte_free(txq->sw_ring);
+ txq->sw_ring = NULL;
+ }
+ if (txq->free) {
+ rte_free(txq->free);
+ txq->free = NULL;
+ }
rte_free(txq);
}
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:14.280983267 +0100
+++ 0012-net-hns3-fix-double-free-for-Rx-Tx-queue.patch 2024-06-25 00:22:13.089183692 +0100
@@ -1 +1 @@
-From bbf6fcc0cc62031a26517608a471873339423d8c Mon Sep 17 00:00:00 2001
+From 8ec7b95de7673fe8085ae92aa829a5e71b200211 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bbf6fcc0cc62031a26517608a471873339423d8c ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 55311402fe..bf10da1928 100644
+index 392df0bae5..c0479a44dc 100644
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/hns3: fix variable overflow' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (10 preceding siblings ...)
2024-06-24 23:57 ` patch 'net/hns3: fix double free for Rx/Tx queue' " luca.boccassi
@ 2024-06-24 23:57 ` luca.boccassi
2024-06-24 23:58 ` patch 'net/hns3: disable SCTP verification tag for RSS hash input' " luca.boccassi
` (67 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:57 UTC (permalink / raw)
To: Dengdui Huang; +Cc: Jie Hai, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f8aabaa13ad5f0ebd8aca476d5500153aeb9faa0
Thanks.
Luca Boccassi
---
From f8aabaa13ad5f0ebd8aca476d5500153aeb9faa0 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Wed, 3 Apr 2024 18:16:22 +0800
Subject: [PATCH] net/hns3: fix variable overflow
[ upstream commit d7a0698ce704852cfb3b3b541107477d9b4bd2fd ]
The function strtoul() returns an unsigned long, which should
be received using the variable uint64_t.
Fixes: 2fc3e696a7f1 ("net/hns3: add runtime config for mailbox limit time")
Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Signed-off-by: Jie Hai <haijie1@huawei.com>
---
drivers/net/hns3/hns3_common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/hns3/hns3_common.c b/drivers/net/hns3/hns3_common.c
index 119c930b1a..c51af055d3 100644
--- a/drivers/net/hns3/hns3_common.c
+++ b/drivers/net/hns3/hns3_common.c
@@ -219,7 +219,7 @@ hns3_parse_dev_caps_mask(const char *key, const char *value, void *extra_args)
static int
hns3_parse_mbx_time_limit(const char *key, const char *value, void *extra_args)
{
- uint32_t val;
+ uint64_t val;
RTE_SET_USED(key);
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:14.349150622 +0100
+++ 0013-net-hns3-fix-variable-overflow.patch 2024-06-25 00:22:13.089183692 +0100
@@ -1 +1 @@
-From d7a0698ce704852cfb3b3b541107477d9b4bd2fd Mon Sep 17 00:00:00 2001
+From f8aabaa13ad5f0ebd8aca476d5500153aeb9faa0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d7a0698ce704852cfb3b3b541107477d9b4bd2fd ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 28c26b049c..5e6cdfdaa0 100644
+index 119c930b1a..c51af055d3 100644
@@ -22 +23 @@
-@@ -224,7 +224,7 @@ hns3_parse_dev_caps_mask(const char *key, const char *value, void *extra_args)
+@@ -219,7 +219,7 @@ hns3_parse_dev_caps_mask(const char *key, const char *value, void *extra_args)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/hns3: disable SCTP verification tag for RSS hash input' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (11 preceding siblings ...)
2024-06-24 23:57 ` patch 'net/hns3: fix variable overflow' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'net/af_packet: align Rx/Tx structs to cache line' " luca.boccassi
` (66 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Jie Hai; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/ac72e810412dc6e55ff861377573e9f3e090ba04
Thanks.
Luca Boccassi
---
From ac72e810412dc6e55ff861377573e9f3e090ba04 Mon Sep 17 00:00:00 2001
From: Jie Hai <haijie1@huawei.com>
Date: Wed, 3 Apr 2024 18:16:23 +0800
Subject: [PATCH] net/hns3: disable SCTP verification tag for RSS hash input
[ upstream commit bb1f4717636f5b7d27f4f2fe30469b69d8910bd0 ]
When the symmetric RSS algorithm is used, the same packet is
expected to be hashed to the same queue in the upstream and
downstream directions.
The problem is that it could map the packets in the same SCTP
connection to different NIC RX queues depending on the direction
of packets. This is because the verification Tag is used as the
RSS hash input for the SCTP packets, and the value depends on the
peer end of the SCTP connection and could not be symmetrically
used in the hardware-implemented RSS algorithm.
In addition, the ethdev framework doesn't support setting SCTP
V-tag as the RSS hash input. So disable it for all RSS hash
algorithms.
Signed-off-by: Jie Hai <haijie1@huawei.com>
---
| 6 ++----
| 6 ++----
2 files changed, 4 insertions(+), 8 deletions(-)
--git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c
index eeeca71a5c..ac88ca04ce 100644
--- a/drivers/net/hns3/hns3_rss.c
+++ b/drivers/net/hns3/hns3_rss.c
@@ -153,8 +153,7 @@ static const struct {
BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_IP_S) |
BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_IP_D) |
BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_S) |
- BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_D) |
- BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_VER),
+ BIT_ULL(HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_D),
HNS3_RSS_TUPLE_IPV4_SCTP_M },
/* IPV6-FRAG */
@@ -274,8 +273,7 @@ static const struct {
BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_IP_S) |
BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_IP_D) |
BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_D) |
- BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_S) |
- BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_VER),
+ BIT_ULL(HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_S),
HNS3_RSS_TUPLE_IPV6_SCTP_M },
};
--git a/drivers/net/hns3/hns3_rss.h b/drivers/net/hns3/hns3_rss.h
index 9d182a8025..0755760b45 100644
--- a/drivers/net/hns3/hns3_rss.h
+++ b/drivers/net/hns3/hns3_rss.h
@@ -49,7 +49,6 @@ enum hns3_tuple_field {
HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_S,
HNS3_RSS_FIELD_IPV4_SCTP_EN_IP_D,
HNS3_RSS_FIELD_IPV4_SCTP_EN_IP_S,
- HNS3_RSS_FIELD_IPV4_SCTP_EN_SCTP_VER,
/* IPV4 ENABLE FIELD */
HNS3_RSS_FIELD_IPV4_EN_NONFRAG_IP_D = 24,
@@ -74,7 +73,6 @@ enum hns3_tuple_field {
HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_S,
HNS3_RSS_FIELD_IPV6_SCTP_EN_IP_D,
HNS3_RSS_FIELD_IPV6_SCTP_EN_IP_S,
- HNS3_RSS_FIELD_IPV6_SCTP_EN_SCTP_VER,
/* IPV6 ENABLE FIELD */
HNS3_RSS_FIELD_IPV6_NONFRAG_IP_D = 56,
@@ -96,12 +94,12 @@ enum hns3_tuple_field {
#define HNS3_RSS_TUPLE_IPV4_TCP_M GENMASK(3, 0)
#define HNS3_RSS_TUPLE_IPV4_UDP_M GENMASK(11, 8)
-#define HNS3_RSS_TUPLE_IPV4_SCTP_M GENMASK(20, 16)
+#define HNS3_RSS_TUPLE_IPV4_SCTP_M GENMASK(19, 16)
#define HNS3_RSS_TUPLE_IPV4_NONF_M GENMASK(25, 24)
#define HNS3_RSS_TUPLE_IPV4_FLAG_M GENMASK(27, 26)
#define HNS3_RSS_TUPLE_IPV6_TCP_M GENMASK(35, 32)
#define HNS3_RSS_TUPLE_IPV6_UDP_M GENMASK(43, 40)
-#define HNS3_RSS_TUPLE_IPV6_SCTP_M GENMASK(52, 48)
+#define HNS3_RSS_TUPLE_IPV6_SCTP_M GENMASK(51, 48)
#define HNS3_RSS_TUPLE_IPV6_NONF_M GENMASK(57, 56)
#define HNS3_RSS_TUPLE_IPV6_FLAG_M GENMASK(59, 58)
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:14.411982104 +0100
+++ 0014-net-hns3-disable-SCTP-verification-tag-for-RSS-hash-.patch 2024-06-25 00:22:13.089183692 +0100
@@ -1 +1 @@
-From bb1f4717636f5b7d27f4f2fe30469b69d8910bd0 Mon Sep 17 00:00:00 2001
+From ac72e810412dc6e55ff861377573e9f3e090ba04 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bb1f4717636f5b7d27f4f2fe30469b69d8910bd0 ]
+
@@ -21,2 +22,0 @@
-Cc: stable@dpdk.org
-
@@ -30 +30 @@
-index 15feb26043..3eae4caf52 100644
+index eeeca71a5c..ac88ca04ce 100644
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/af_packet: align Rx/Tx structs to cache line' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (12 preceding siblings ...)
2024-06-24 23:58 ` patch 'net/hns3: disable SCTP verification tag for RSS hash input' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'doc: fix testpmd ring size command' " luca.boccassi
` (65 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Mattias Rönnblom
Cc: Morten Brørup, Stephen Hemminger, Tyler Retzlaff, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a7e4b44736fb43bf7a6d228df2fe7b6ca4ea7f36
Thanks.
Luca Boccassi
---
From a7e4b44736fb43bf7a6d228df2fe7b6ca4ea7f36 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= <mattias.ronnblom@ericsson.com>
Date: Fri, 26 Apr 2024 11:05:02 +0200
Subject: [PATCH] net/af_packet: align Rx/Tx structs to cache line
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit c7a2ce0c1b1bb526304f8875f68cab78f5a5d42c ]
Cache align Rx and Tx queue struct to avoid false sharing.
The RX struct happens to be 64 bytes on x86_64 already, so cache
alignment has no effect there, but it does on 32-bit ISAs.
The TX struct is 56 bytes on x86_64.
Both structs keep counters, and in the RX case they are updated even
for empty polls.
Fixes: 364e08f2bbc0 ("af_packet: add PMD for AF_PACKET-based virtual devices")
Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
drivers/net/af_packet/rte_eth_af_packet.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
index 397a32db58..6b7b16f348 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
@@ -6,6 +6,7 @@
* All rights reserved.
*/
+#include <rte_common.h>
#include <rte_string_fns.h>
#include <rte_mbuf.h>
#include <ethdev_driver.h>
@@ -39,7 +40,7 @@
#define DFLT_FRAME_SIZE (1 << 11)
#define DFLT_FRAME_COUNT (1 << 9)
-struct pkt_rx_queue {
+struct __rte_cache_aligned pkt_rx_queue {
int sockfd;
struct iovec *rd;
@@ -55,7 +56,7 @@ struct pkt_rx_queue {
volatile unsigned long rx_bytes;
};
-struct pkt_tx_queue {
+struct __rte_cache_aligned pkt_tx_queue {
int sockfd;
unsigned int frame_data_size;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:14.475409131 +0100
+++ 0015-net-af_packet-align-Rx-Tx-structs-to-cache-line.patch 2024-06-25 00:22:13.093183774 +0100
@@ -1 +1 @@
-From c7a2ce0c1b1bb526304f8875f68cab78f5a5d42c Mon Sep 17 00:00:00 2001
+From a7e4b44736fb43bf7a6d228df2fe7b6ca4ea7f36 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit c7a2ce0c1b1bb526304f8875f68cab78f5a5d42c ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'doc: fix testpmd ring size command' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (13 preceding siblings ...)
2024-06-24 23:58 ` patch 'net/af_packet: align Rx/Tx structs to cache line' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'net/af_xdp: fix port ID in Rx mbuf' " luca.boccassi
` (64 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Kevin Traynor; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/d00a311cfb26068fb30f44040f1e8430735d39d3
Thanks.
Luca Boccassi
---
From d00a311cfb26068fb30f44040f1e8430735d39d3 Mon Sep 17 00:00:00 2001
From: Kevin Traynor <ktraynor@redhat.com>
Date: Fri, 3 May 2024 09:51:29 +0100
Subject: [PATCH] doc: fix testpmd ring size command
[ upstream commit 7a30ea42fb6ef979768d39fc4e1dec7e2d9efe0d ]
The documentation is missing the 'config' word.
In app, 'help ports' shows the correct syntax:
port config (port_id) (rxq|txq) (queue_id) ring_size (value)
Fixes: 1a77cffa8143 ("app/testpmd: enable queue ring size configure")
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index 0037506a79..8e7d4f1b86 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -1995,7 +1995,7 @@ port config - queue ring size
Configure a rx/tx queue ring size::
- testpmd> port (port_id) (rxq|txq) (queue_id) ring_size (value)
+ testpmd> port config (port_id) (rxq|txq) (queue_id) ring_size (value)
Only take effect after command that (re-)start the port or command that setup specific queue.
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:14.539608971 +0100
+++ 0016-doc-fix-testpmd-ring-size-command.patch 2024-06-25 00:22:13.097183855 +0100
@@ -1 +1 @@
-From 7a30ea42fb6ef979768d39fc4e1dec7e2d9efe0d Mon Sep 17 00:00:00 2001
+From d00a311cfb26068fb30f44040f1e8430735d39d3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7a30ea42fb6ef979768d39fc4e1dec7e2d9efe0d ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 2fbf9220d8..ecd040504e 100644
+index 0037506a79..8e7d4f1b86 100644
@@ -25 +26 @@
-@@ -2032,7 +2032,7 @@ port config - queue ring size
+@@ -1995,7 +1995,7 @@ port config - queue ring size
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/af_xdp: fix port ID in Rx mbuf' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (14 preceding siblings ...)
2024-06-24 23:58 ` patch 'doc: fix testpmd ring size command' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'net/af_xdp: count mbuf allocation failures' " luca.boccassi
` (63 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Ciara Loftus; +Cc: Stephen Hemminger, Maryam Tahhan, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/20c39f6a1b472578edc5595d472c4e5416a584eb
Thanks.
Luca Boccassi
---
From 20c39f6a1b472578edc5595d472c4e5416a584eb Mon Sep 17 00:00:00 2001
From: Ciara Loftus <ciara.loftus@intel.com>
Date: Tue, 14 May 2024 08:41:52 +0000
Subject: [PATCH] net/af_xdp: fix port ID in Rx mbuf
[ upstream commit 9bab1d2667aec4942ae1d384671e5148960bd88f ]
Record the port id in the af_xdp rx queue structure and use it
to set the port id of the mbuf of a received packed.
Bugzilla ID: 1428
Fixes: f1debd77efaf ("net/af_xdp: introduce AF_XDP PMD")
Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Acked-by: Maryam Tahhan <mtahhan@redhat.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/af_xdp/rte_eth_af_xdp.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index 3c976dd6e0..b28418234d 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -112,6 +112,7 @@ struct pkt_rx_queue {
struct xsk_umem_info *umem;
struct xsk_socket *xsk;
struct rte_mempool *mb_pool;
+ uint16_t port;
struct rx_stats stats;
@@ -338,6 +339,7 @@ af_xdp_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
bufs[i]->data_off = offset - sizeof(struct rte_mbuf) -
rte_pktmbuf_priv_size(umem->mb_pool) -
umem->mb_pool->header_size;
+ bufs[i]->port = rxq->port;
rte_pktmbuf_pkt_len(bufs[i]) = len;
rte_pktmbuf_data_len(bufs[i]) = len;
@@ -404,6 +406,7 @@ af_xdp_rx_cp(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
rte_pktmbuf_data_len(mbufs[i]) = len;
rx_bytes += len;
bufs[i] = mbufs[i];
+ bufs[i]->port = rxq->port;
}
xsk_ring_cons__release(rx, nb_pkts);
@@ -1495,6 +1498,8 @@ eth_rx_queue_setup(struct rte_eth_dev *dev,
process_private->rxq_xsk_fds[rx_queue_id] = rxq->fds[0].fd;
+ rxq->port = dev->data->port_id;
+
dev->data->rx_queues[rx_queue_id] = rxq;
return 0;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:14.610814298 +0100
+++ 0017-net-af_xdp-fix-port-ID-in-Rx-mbuf.patch 2024-06-25 00:22:13.097183855 +0100
@@ -1 +1 @@
-From 9bab1d2667aec4942ae1d384671e5148960bd88f Mon Sep 17 00:00:00 2001
+From 20c39f6a1b472578edc5595d472c4e5416a584eb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9bab1d2667aec4942ae1d384671e5148960bd88f ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 2d6f64337e..0997543ee5 100644
+index 3c976dd6e0..b28418234d 100644
@@ -25 +26 @@
-@@ -133,6 +133,7 @@ struct pkt_rx_queue {
+@@ -112,6 +112,7 @@ struct pkt_rx_queue {
@@ -33 +34 @@
-@@ -368,6 +369,7 @@ af_xdp_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -338,6 +339,7 @@ af_xdp_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
@@ -41 +42 @@
-@@ -434,6 +436,7 @@ af_xdp_rx_cp(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -404,6 +406,7 @@ af_xdp_rx_cp(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
@@ -49 +50 @@
-@@ -1813,6 +1816,8 @@ eth_rx_queue_setup(struct rte_eth_dev *dev,
+@@ -1495,6 +1498,8 @@ eth_rx_queue_setup(struct rte_eth_dev *dev,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/af_xdp: count mbuf allocation failures' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (15 preceding siblings ...)
2024-06-24 23:58 ` patch 'net/af_xdp: fix port ID in Rx mbuf' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'net/af_xdp: fix stats reset' " luca.boccassi
` (62 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Ciara Loftus; +Cc: Stephen Hemminger, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/13ac24282065220a4c3dbed9cc961a6a9b728421
Thanks.
Luca Boccassi
---
From 13ac24282065220a4c3dbed9cc961a6a9b728421 Mon Sep 17 00:00:00 2001
From: Ciara Loftus <ciara.loftus@intel.com>
Date: Tue, 14 May 2024 08:41:53 +0000
Subject: [PATCH] net/af_xdp: count mbuf allocation failures
[ upstream commit f294405ab98594aa41269507dde95cc89bb20a61 ]
Failures to allocate mbufs in the receive path were not being
accounted for in the ethdev statistics. Fix this.
Bugzilla ID: 1429
Fixes: f1debd77efaf ("net/af_xdp: introduce AF_XDP PMD")
Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/af_xdp/rte_eth_af_xdp.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index b28418234d..544ce40693 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -290,6 +290,7 @@ af_xdp_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
unsigned long rx_bytes = 0;
int i;
struct rte_mbuf *fq_bufs[ETH_AF_XDP_RX_BATCH_SIZE];
+ struct rte_eth_dev *dev = &rte_eth_devices[rxq->port];
nb_pkts = xsk_ring_cons__peek(rx, nb_pkts, &idx_rx);
@@ -317,6 +318,8 @@ af_xdp_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
* xsk_ring_cons__peek
*/
rx->cached_cons -= nb_pkts;
+ dev->data->rx_mbuf_alloc_failed += nb_pkts;
+
return 0;
}
@@ -368,6 +371,7 @@ af_xdp_rx_cp(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
int i;
uint32_t free_thresh = fq->size >> 1;
struct rte_mbuf *mbufs[ETH_AF_XDP_RX_BATCH_SIZE];
+ struct rte_eth_dev *dev = &rte_eth_devices[rxq->port];
if (xsk_prod_nb_free(fq, free_thresh) >= free_thresh)
(void)reserve_fill_queue(umem, nb_pkts, NULL, fq);
@@ -386,6 +390,7 @@ af_xdp_rx_cp(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
* xsk_ring_cons__peek
*/
rx->cached_cons -= nb_pkts;
+ dev->data->rx_mbuf_alloc_failed += nb_pkts;
return 0;
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:14.676720415 +0100
+++ 0018-net-af_xdp-count-mbuf-allocation-failures.patch 2024-06-25 00:22:13.101183937 +0100
@@ -1 +1 @@
-From f294405ab98594aa41269507dde95cc89bb20a61 Mon Sep 17 00:00:00 2001
+From 13ac24282065220a4c3dbed9cc961a6a9b728421 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f294405ab98594aa41269507dde95cc89bb20a61 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 0997543ee5..0db761a204 100644
+index b28418234d..544ce40693 100644
@@ -24 +25 @@
-@@ -320,6 +320,7 @@ af_xdp_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -290,6 +290,7 @@ af_xdp_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
@@ -32 +33 @@
-@@ -347,6 +348,8 @@ af_xdp_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -317,6 +318,8 @@ af_xdp_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
@@ -41 +42 @@
-@@ -398,6 +401,7 @@ af_xdp_rx_cp(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -368,6 +371,7 @@ af_xdp_rx_cp(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
@@ -49 +50 @@
-@@ -416,6 +420,7 @@ af_xdp_rx_cp(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -386,6 +390,7 @@ af_xdp_rx_cp(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/af_xdp: fix stats reset' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (16 preceding siblings ...)
2024-06-24 23:58 ` patch 'net/af_xdp: count mbuf allocation failures' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'net/af_xdp: remove unused local statistic' " luca.boccassi
` (61 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Ciara Loftus; +Cc: Stephen Hemminger, Maryam Tahhan, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/9e8bcd1f55c9ccde6ffcb82591538ea8230a96d5
Thanks.
Luca Boccassi
---
From 9e8bcd1f55c9ccde6ffcb82591538ea8230a96d5 Mon Sep 17 00:00:00 2001
From: Ciara Loftus <ciara.loftus@intel.com>
Date: Tue, 14 May 2024 08:41:54 +0000
Subject: [PATCH] net/af_xdp: fix stats reset
[ upstream commit 3577b1ee97dcfe9ff1b9e050bed55f17c435a93d ]
The imissed statistic was not properly reset because it was
read directly from the kernel statistics. To fix this, take note
of the kernel statistic when the stats are reset and deduct this
value from the kernel statistic read during statistics get.
Bugzilla ID: 1430
Fixes: f1debd77efaf ("net/af_xdp: introduce AF_XDP PMD")
Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Acked-by: Maryam Tahhan <mtahhan@redhat.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/af_xdp/rte_eth_af_xdp.c | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index 544ce40693..df6ac7a4f2 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -105,6 +105,7 @@ struct rx_stats {
uint64_t rx_pkts;
uint64_t rx_bytes;
uint64_t rx_dropped;
+ uint64_t imissed_offset;
};
struct pkt_rx_queue {
@@ -862,7 +863,7 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
AF_XDP_LOG(ERR, "getsockopt() failed for XDP_STATISTICS.\n");
return -1;
}
- stats->imissed += xdp_stats.rx_dropped;
+ stats->imissed += xdp_stats.rx_dropped - rxq->stats.imissed_offset;
stats->opackets += stats->q_opackets[i];
stats->obytes += stats->q_obytes[i];
@@ -875,13 +876,25 @@ static int
eth_stats_reset(struct rte_eth_dev *dev)
{
struct pmd_internals *internals = dev->data->dev_private;
- int i;
+ struct pmd_process_private *process_private = dev->process_private;
+ struct xdp_statistics xdp_stats;
+ socklen_t optlen;
+ int i, ret, fd;
for (i = 0; i < internals->queue_cnt; i++) {
memset(&internals->rx_queues[i].stats, 0,
sizeof(struct rx_stats));
memset(&internals->tx_queues[i].stats, 0,
sizeof(struct tx_stats));
+ fd = process_private->rxq_xsk_fds[i];
+ optlen = sizeof(struct xdp_statistics);
+ ret = fd >= 0 ? getsockopt(fd, SOL_XDP, XDP_STATISTICS,
+ &xdp_stats, &optlen) : -1;
+ if (ret != 0) {
+ AF_XDP_LOG(ERR, "getsockopt() failed for XDP_STATISTICS.\n");
+ return -1;
+ }
+ internals->rx_queues[i].stats.imissed_offset = xdp_stats.rx_dropped;
}
return 0;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:14.742605431 +0100
+++ 0019-net-af_xdp-fix-stats-reset.patch 2024-06-25 00:22:13.101183937 +0100
@@ -1 +1 @@
-From 3577b1ee97dcfe9ff1b9e050bed55f17c435a93d Mon Sep 17 00:00:00 2001
+From 9e8bcd1f55c9ccde6ffcb82591538ea8230a96d5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3577b1ee97dcfe9ff1b9e050bed55f17c435a93d ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 0db761a204..25e67851f6 100644
+index 544ce40693..df6ac7a4f2 100644
@@ -27 +28 @@
-@@ -126,6 +126,7 @@ struct rx_stats {
+@@ -105,6 +105,7 @@ struct rx_stats {
@@ -35 +36 @@
-@@ -892,7 +893,7 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
+@@ -862,7 +863,7 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
@@ -44 +45 @@
-@@ -905,13 +906,25 @@ static int
+@@ -875,13 +876,25 @@ static int
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/af_xdp: remove unused local statistic' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (17 preceding siblings ...)
2024-06-24 23:58 ` patch 'net/af_xdp: fix stats reset' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'net/tap: fix file descriptor check in isolated flow' " luca.boccassi
` (60 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Ciara Loftus; +Cc: Stephen Hemminger, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/19c6df9ce8fdb63c39c779b4adbd3b0bb5a90b3f
Thanks.
Luca Boccassi
---
From 19c6df9ce8fdb63c39c779b4adbd3b0bb5a90b3f Mon Sep 17 00:00:00 2001
From: Ciara Loftus <ciara.loftus@intel.com>
Date: Tue, 14 May 2024 08:41:55 +0000
Subject: [PATCH] net/af_xdp: remove unused local statistic
[ upstream commit abdabad636a54660f4a260e1e9dc573900582bd4 ]
The rx_dropped statistic is never incremented so its existence
is pointless. Remove it.
Fixes: f1debd77efaf ("net/af_xdp: introduce AF_XDP PMD")
Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/af_xdp/rte_eth_af_xdp.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index df6ac7a4f2..343b4c40c9 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -104,7 +104,6 @@ struct xsk_umem_info {
struct rx_stats {
uint64_t rx_pkts;
uint64_t rx_bytes;
- uint64_t rx_dropped;
uint64_t imissed_offset;
};
@@ -854,7 +853,6 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
stats->ipackets += stats->q_ipackets[i];
stats->ibytes += stats->q_ibytes[i];
- stats->imissed += rxq->stats.rx_dropped;
stats->oerrors += txq->stats.tx_dropped;
fd = process_private->rxq_xsk_fds[i];
ret = fd >= 0 ? getsockopt(fd, SOL_XDP, XDP_STATISTICS,
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:14.807938029 +0100
+++ 0020-net-af_xdp-remove-unused-local-statistic.patch 2024-06-25 00:22:13.105184018 +0100
@@ -1 +1 @@
-From abdabad636a54660f4a260e1e9dc573900582bd4 Mon Sep 17 00:00:00 2001
+From 19c6df9ce8fdb63c39c779b4adbd3b0bb5a90b3f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit abdabad636a54660f4a260e1e9dc573900582bd4 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 25e67851f6..4b282adb03 100644
+index df6ac7a4f2..343b4c40c9 100644
@@ -23 +24 @@
-@@ -125,7 +125,6 @@ struct xsk_umem_info {
+@@ -104,7 +104,6 @@ struct xsk_umem_info {
@@ -31 +32 @@
-@@ -884,7 +883,6 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
+@@ -854,7 +853,6 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/tap: fix file descriptor check in isolated flow' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (18 preceding siblings ...)
2024-06-24 23:58 ` patch 'net/af_xdp: remove unused local statistic' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'net/axgbe: fix MDIO access for non-zero ports and CL45 PHYs' " luca.boccassi
` (59 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/2f9077766d3c0ab959a5bb9d896aceccf781527b
Thanks.
Luca Boccassi
---
From 2f9077766d3c0ab959a5bb9d896aceccf781527b Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 21 May 2024 13:12:46 -0700
Subject: [PATCH] net/tap: fix file descriptor check in isolated flow
[ upstream commit e9e6089a41c275f3dcd7491f4df903a284653bb9 ]
The check for receive queue FD in flow_isolate is incorrect.
If queue has not been setup then FD will be -1 not 0.
Fixes: f503d2694825 ("net/tap: support flow API isolated mode")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
drivers/net/tap/tap_flow.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/tap/tap_flow.c b/drivers/net/tap/tap_flow.c
index 741ef09fc6..7468c3f0ea 100644
--- a/drivers/net/tap/tap_flow.c
+++ b/drivers/net/tap/tap_flow.c
@@ -1595,7 +1595,7 @@ tap_flow_isolate(struct rte_eth_dev *dev,
* If netdevice is there, setup appropriate flow rules immediately.
* Otherwise it will be set when bringing up the netdevice (tun_alloc).
*/
- if (!process_private->rxq_fds[0])
+ if (process_private->rxq_fds[0] == -1)
return 0;
if (set) {
struct rte_flow *remote_flow;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:14.871775310 +0100
+++ 0021-net-tap-fix-file-descriptor-check-in-isolated-flow.patch 2024-06-25 00:22:13.105184018 +0100
@@ -1 +1 @@
-From e9e6089a41c275f3dcd7491f4df903a284653bb9 Mon Sep 17 00:00:00 2001
+From 2f9077766d3c0ab959a5bb9d896aceccf781527b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e9e6089a41c275f3dcd7491f4df903a284653bb9 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index fa50fe45d7..79cd6a12ca 100644
+index 741ef09fc6..7468c3f0ea 100644
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/axgbe: fix MDIO access for non-zero ports and CL45 PHYs' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (19 preceding siblings ...)
2024-06-24 23:58 ` patch 'net/tap: fix file descriptor check in isolated flow' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'net/axgbe: reset link when link never comes back' " luca.boccassi
` (58 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Venkat Kumar Ande; +Cc: Selwin Sebastian, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b43c908eb24790a7e1150471f8f662fd9576a009
Thanks.
Luca Boccassi
---
From b43c908eb24790a7e1150471f8f662fd9576a009 Mon Sep 17 00:00:00 2001
From: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Date: Tue, 4 Jun 2024 17:41:33 +0530
Subject: [PATCH] net/axgbe: fix MDIO access for non-zero ports and CL45 PHYs
[ upstream commit d06394d2641e3fdc0538a23354d9ff7c5aa9b277 ]
The XGBE supports performing MDIO operations using an MDIO command
request. The driver mistakenly uses the mdio port address as the
MDIO command request device address instead of the MDIO command
request port address. Additionally, the driver does not properly check
for and create a clause 45 MDIO command
Without the fix PHY device is not detected and can't be usable.
Check the supplied MDIO register to determine if the request is a clause
45 operation (MII_ADDR_C45). For a clause 45 operation, extract device
address and register number from the supplied MDIO register and use them
to set the MDIO command request device address and register number
fields. For a clause 22 operation, the MDIO request device address is
set to zero and the MDIO command request register number is set to the
supplied MDIO register. In either case, the supplied MDIO port address
is used as the MDIO command request port address.
Fixes: 4ac7516b8b39 ("net/axgbe: add phy init and related APIs")
Signed-off-by: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Acked-by: Selwin Sebastian <selwin.sebastian@amd.com>
---
drivers/net/axgbe/axgbe_common.h | 2 --
drivers/net/axgbe/axgbe_dev.c | 22 ++++++++++++++++------
2 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/drivers/net/axgbe/axgbe_common.h b/drivers/net/axgbe/axgbe_common.h
index a5d11c5832..51532fb34a 100644
--- a/drivers/net/axgbe/axgbe_common.h
+++ b/drivers/net/axgbe/axgbe_common.h
@@ -407,8 +407,6 @@
#define MAC_MDIOSCAR_PA_WIDTH 5
#define MAC_MDIOSCAR_RA_INDEX 0
#define MAC_MDIOSCAR_RA_WIDTH 16
-#define MAC_MDIOSCAR_REG_INDEX 0
-#define MAC_MDIOSCAR_REG_WIDTH 21
#define MAC_MDIOSCCDR_BUSY_INDEX 22
#define MAC_MDIOSCCDR_BUSY_WIDTH 1
#define MAC_MDIOSCCDR_CMD_INDEX 16
diff --git a/drivers/net/axgbe/axgbe_dev.c b/drivers/net/axgbe/axgbe_dev.c
index 6a7fddffca..3389954aa6 100644
--- a/drivers/net/axgbe/axgbe_dev.c
+++ b/drivers/net/axgbe/axgbe_dev.c
@@ -63,15 +63,27 @@ static int mdio_complete(struct axgbe_port *pdata)
return 0;
}
+static unsigned int axgbe_create_mdio_sca(int port, int reg)
+{
+ unsigned int mdio_sca, da;
+
+ da = (reg & MII_ADDR_C45) ? reg >> 16 : 0;
+
+ mdio_sca = 0;
+ AXGMAC_SET_BITS(mdio_sca, MAC_MDIOSCAR, RA, reg);
+ AXGMAC_SET_BITS(mdio_sca, MAC_MDIOSCAR, PA, port);
+ AXGMAC_SET_BITS(mdio_sca, MAC_MDIOSCAR, DA, da);
+
+ return mdio_sca;
+}
+
static int axgbe_write_ext_mii_regs(struct axgbe_port *pdata, int addr,
int reg, u16 val)
{
unsigned int mdio_sca, mdio_sccd;
uint64_t timeout;
- mdio_sca = 0;
- AXGMAC_SET_BITS(mdio_sca, MAC_MDIOSCAR, REG, reg);
- AXGMAC_SET_BITS(mdio_sca, MAC_MDIOSCAR, DA, addr);
+ mdio_sca = axgbe_create_mdio_sca(addr, reg);
AXGMAC_IOWRITE(pdata, MAC_MDIOSCAR, mdio_sca);
mdio_sccd = 0;
@@ -97,9 +109,7 @@ static int axgbe_read_ext_mii_regs(struct axgbe_port *pdata, int addr,
unsigned int mdio_sca, mdio_sccd;
uint64_t timeout;
- mdio_sca = 0;
- AXGMAC_SET_BITS(mdio_sca, MAC_MDIOSCAR, REG, reg);
- AXGMAC_SET_BITS(mdio_sca, MAC_MDIOSCAR, DA, addr);
+ mdio_sca = axgbe_create_mdio_sca(addr, reg);
AXGMAC_IOWRITE(pdata, MAC_MDIOSCAR, mdio_sca);
mdio_sccd = 0;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:15.002176787 +0100
+++ 0022-net-axgbe-fix-MDIO-access-for-non-zero-ports-and-CL4.patch 2024-06-25 00:22:13.105184018 +0100
@@ -1 +1 @@
-From d06394d2641e3fdc0538a23354d9ff7c5aa9b277 Mon Sep 17 00:00:00 2001
+From b43c908eb24790a7e1150471f8f662fd9576a009 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d06394d2641e3fdc0538a23354d9ff7c5aa9b277 ]
+
@@ -24 +25,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/axgbe: reset link when link never comes back' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (20 preceding siblings ...)
2024-06-24 23:58 ` patch 'net/axgbe: fix MDIO access for non-zero ports and CL45 PHYs' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'net/axgbe: fix fluctuations for 1G Bel Fuse SFP' " luca.boccassi
` (57 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Venkat Kumar Ande; +Cc: Selwin Sebastian, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/ad99680c1dbef9bb02191465926b3c4df8fdf0f2
Thanks.
Luca Boccassi
---
From ad99680c1dbef9bb02191465926b3c4df8fdf0f2 Mon Sep 17 00:00:00 2001
From: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Date: Tue, 4 Jun 2024 17:41:34 +0530
Subject: [PATCH] net/axgbe: reset link when link never comes back
[ upstream commit edf463256dd35803aaa11b0da704a0542ad20071 ]
Normally, auto negotiation and reconnect should be automatically done by
the hardware. But there seems to be an issue where auto negotiation has
to be restarted manually. This happens because of link training and so
even though still connected to the partner the link never "comes back".
This needs an auto-negotiation restart.
Without the fix the user will not see the link up status
Fixes: a5c7273771e8 ("net/axgbe: add phy programming APIs")
Signed-off-by: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Acked-by: Selwin Sebastian <selwin.sebastian@amd.com>
---
drivers/net/axgbe/axgbe_mdio.c | 2 +-
drivers/net/axgbe/axgbe_phy_impl.c | 7 +++++++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/net/axgbe/axgbe_mdio.c b/drivers/net/axgbe/axgbe_mdio.c
index 913ceada0d..b03bc471cb 100644
--- a/drivers/net/axgbe/axgbe_mdio.c
+++ b/drivers/net/axgbe/axgbe_mdio.c
@@ -1051,7 +1051,7 @@ static void axgbe_phy_status(struct axgbe_port *pdata)
&an_restart);
if (an_restart) {
axgbe_phy_config_aneg(pdata);
- return;
+ goto adjust_link;
}
if (pdata->phy.link) {
diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_phy_impl.c
index d97fbbfddd..87795c63c9 100644
--- a/drivers/net/axgbe/axgbe_phy_impl.c
+++ b/drivers/net/axgbe/axgbe_phy_impl.c
@@ -1697,6 +1697,13 @@ static int axgbe_phy_link_status(struct axgbe_port *pdata, int *an_restart)
if (reg & MDIO_STAT1_LSTATUS)
return 1;
+ if (pdata->phy.autoneg == AUTONEG_ENABLE &&
+ phy_data->port_mode == AXGBE_PORT_MODE_BACKPLANE) {
+ if (rte_bit_relaxed_get32(AXGBE_LINK_INIT, &pdata->dev_state)) {
+ *an_restart = 1;
+ }
+ }
+
/* No link, attempt a receiver reset cycle */
if (phy_data->rrc_count++) {
phy_data->rrc_count = 0;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:15.071800192 +0100
+++ 0023-net-axgbe-reset-link-when-link-never-comes-back.patch 2024-06-25 00:22:13.109184100 +0100
@@ -1 +1 @@
-From edf463256dd35803aaa11b0da704a0542ad20071 Mon Sep 17 00:00:00 2001
+From ad99680c1dbef9bb02191465926b3c4df8fdf0f2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit edf463256dd35803aaa11b0da704a0542ad20071 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -38 +39 @@
-index 44ff28517c..54fe9faae0 100644
+index d97fbbfddd..87795c63c9 100644
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/axgbe: fix fluctuations for 1G Bel Fuse SFP' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (21 preceding siblings ...)
2024-06-24 23:58 ` patch 'net/axgbe: reset link when link never comes back' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'net/axgbe: update DMA coherency values' " luca.boccassi
` (56 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Venkat Kumar Ande; +Cc: Selwin Sebastian, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/fac582ee7d5f145928b28a81795c3364c96343c5
Thanks.
Luca Boccassi
---
From fac582ee7d5f145928b28a81795c3364c96343c5 Mon Sep 17 00:00:00 2001
From: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Date: Tue, 4 Jun 2024 17:41:35 +0530
Subject: [PATCH] net/axgbe: fix fluctuations for 1G Bel Fuse SFP
[ upstream commit 3abfda0f7d58b2eef20cdf8e102825678b150421 ]
Frequent link up/down events can happen when a Bel Fuse SFP part is
connected to the amd-xgbe device. Try to avoid the frequent link
issues by resetting the PHY as documented in Bel Fuse SFP datasheet.
Without the fix user will see continuous port link up and down.
Fixes: a5c7273771e8 ("net/axgbe: add phy programming APIs")
Signed-off-by: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Acked-by: Selwin Sebastian <selwin.sebastian@amd.com>
---
drivers/net/axgbe/axgbe_phy_impl.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_phy_impl.c
index 87795c63c9..8f8845a1c5 100644
--- a/drivers/net/axgbe/axgbe_phy_impl.c
+++ b/drivers/net/axgbe/axgbe_phy_impl.c
@@ -578,6 +578,9 @@ static bool axgbe_phy_belfuse_parse_quirks(struct axgbe_port *pdata)
AXGBE_BEL_FUSE_VENDOR, strlen(AXGBE_BEL_FUSE_VENDOR)))
return false;
+ /* Reset PHY - wait for self-clearing reset bit to clear */
+ pdata->phy_if.phy_impl.reset(pdata);
+
if (!memcmp(&sfp_eeprom->base[AXGBE_SFP_BASE_VENDOR_PN],
AXGBE_BEL_FUSE_PARTNO, strlen(AXGBE_BEL_FUSE_PARTNO))) {
phy_data->sfp_base = AXGBE_SFP_BASE_1000_SX;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:15.125520152 +0100
+++ 0024-net-axgbe-fix-fluctuations-for-1G-Bel-Fuse-SFP.patch 2024-06-25 00:22:13.109184100 +0100
@@ -1 +1 @@
-From 3abfda0f7d58b2eef20cdf8e102825678b150421 Mon Sep 17 00:00:00 2001
+From fac582ee7d5f145928b28a81795c3364c96343c5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3abfda0f7d58b2eef20cdf8e102825678b150421 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 54fe9faae0..ee9dcbe3da 100644
+index 87795c63c9..8f8845a1c5 100644
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/axgbe: update DMA coherency values' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (22 preceding siblings ...)
2024-06-24 23:58 ` patch 'net/axgbe: fix fluctuations for 1G Bel Fuse SFP' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'net/axgbe: disable interrupts during device removal' " luca.boccassi
` (55 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Venkat Kumar Ande; +Cc: Selwin Sebastian, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6aad2db82c5f5e7c69e1efff79d3296002253e8e
Thanks.
Luca Boccassi
---
From 6aad2db82c5f5e7c69e1efff79d3296002253e8e Mon Sep 17 00:00:00 2001
From: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Date: Tue, 4 Jun 2024 17:41:36 +0530
Subject: [PATCH] net/axgbe: update DMA coherency values
[ upstream commit 4e6d9f193d4fe5639a856cdb2dd0aa4a8726fe99 ]
Based on the IOMMU configuration, the current cache control settings can
result in possible coherency issues. The hardware team has recommended
new settings for the PCI device path to eliminate the issue.
Without the fix the user will get incorrect data in TSO functionality
Fixes: 7c4158a5b592 ("net/axgbe: add DMA programming and start/stop")
Signed-off-by: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Acked-by: Selwin Sebastian <selwin.sebastian@amd.com>
---
drivers/net/axgbe/axgbe_dev.c | 20 +++++++++-----------
1 file changed, 9 insertions(+), 11 deletions(-)
diff --git a/drivers/net/axgbe/axgbe_dev.c b/drivers/net/axgbe/axgbe_dev.c
index 3389954aa6..9b0073eea6 100644
--- a/drivers/net/axgbe/axgbe_dev.c
+++ b/drivers/net/axgbe/axgbe_dev.c
@@ -647,23 +647,21 @@ static void axgbe_config_dma_cache(struct axgbe_port *pdata)
unsigned int arcache, awcache, arwcache;
arcache = 0;
- AXGMAC_SET_BITS(arcache, DMA_AXIARCR, DRC, 0x3);
+ AXGMAC_SET_BITS(arcache, DMA_AXIARCR, DRC, 0xf);
+ AXGMAC_SET_BITS(arcache, DMA_AXIARCR, TEC, 0xf);
+ AXGMAC_SET_BITS(arcache, DMA_AXIARCR, THC, 0xf);
AXGMAC_IOWRITE(pdata, DMA_AXIARCR, arcache);
awcache = 0;
- AXGMAC_SET_BITS(awcache, DMA_AXIAWCR, DWC, 0x3);
- AXGMAC_SET_BITS(awcache, DMA_AXIAWCR, RPC, 0x3);
- AXGMAC_SET_BITS(awcache, DMA_AXIAWCR, RPD, 0x1);
- AXGMAC_SET_BITS(awcache, DMA_AXIAWCR, RHC, 0x3);
- AXGMAC_SET_BITS(awcache, DMA_AXIAWCR, RHD, 0x1);
- AXGMAC_SET_BITS(awcache, DMA_AXIAWCR, RDC, 0x3);
- AXGMAC_SET_BITS(awcache, DMA_AXIAWCR, RDD, 0x1);
+ AXGMAC_SET_BITS(awcache, DMA_AXIAWCR, DWC, 0xf);
+ AXGMAC_SET_BITS(awcache, DMA_AXIAWCR, RPC, 0xf);
+ AXGMAC_SET_BITS(awcache, DMA_AXIAWCR, RHC, 0xf);
+ AXGMAC_SET_BITS(awcache, DMA_AXIAWCR, RDC, 0xf);
AXGMAC_IOWRITE(pdata, DMA_AXIAWCR, awcache);
arwcache = 0;
- AXGMAC_SET_BITS(arwcache, DMA_AXIAWRCR, TDWD, 0x1);
- AXGMAC_SET_BITS(arwcache, DMA_AXIAWRCR, TDWC, 0x3);
- AXGMAC_SET_BITS(arwcache, DMA_AXIAWRCR, RDRC, 0x3);
+ AXGMAC_SET_BITS(arwcache, DMA_AXIAWRCR, TDWC, 0xf);
+ AXGMAC_SET_BITS(arwcache, DMA_AXIAWRCR, RDRC, 0xf);
AXGMAC_IOWRITE(pdata, DMA_AXIAWRCR, arwcache);
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:15.176961043 +0100
+++ 0025-net-axgbe-update-DMA-coherency-values.patch 2024-06-25 00:22:13.113184181 +0100
@@ -1 +1 @@
-From 4e6d9f193d4fe5639a856cdb2dd0aa4a8726fe99 Mon Sep 17 00:00:00 2001
+From 6aad2db82c5f5e7c69e1efff79d3296002253e8e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4e6d9f193d4fe5639a856cdb2dd0aa4a8726fe99 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/axgbe: disable interrupts during device removal' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (23 preceding siblings ...)
2024-06-24 23:58 ` patch 'net/axgbe: update DMA coherency values' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'net/axgbe: disable RRC for yellow carp devices' " luca.boccassi
` (54 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Venkat Kumar Ande; +Cc: Selwin Sebastian, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b07fc265f973fc695348b01163ff3ba23dc5de7d
Thanks.
Luca Boccassi
---
From b07fc265f973fc695348b01163ff3ba23dc5de7d Mon Sep 17 00:00:00 2001
From: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Date: Tue, 4 Jun 2024 17:41:37 +0530
Subject: [PATCH] net/axgbe: disable interrupts during device removal
[ upstream commit 7b7288b08760204139085174ba00a2863dfdbbec ]
Hardware interrupts are enabled during the init, however, they are not
disabled during close.
Disable all hardware interrupts during close operation to avoid any
issues.
Fixes: 9e890103267e ("net/axgbe: add Rx/Tx setup")
Signed-off-by: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Acked-by: Selwin Sebastian <selwin.sebastian@amd.com>
---
drivers/net/axgbe/axgbe_ethdev.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c
index da48a3ac42..30440e9e1d 100644
--- a/drivers/net/axgbe/axgbe_ethdev.c
+++ b/drivers/net/axgbe/axgbe_ethdev.c
@@ -2361,12 +2361,14 @@ static int
axgbe_dev_close(struct rte_eth_dev *eth_dev)
{
struct rte_pci_device *pci_dev;
+ struct axgbe_port *pdata;
PMD_INIT_FUNC_TRACE();
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
return 0;
+ pdata = eth_dev->data->dev_private;
pci_dev = RTE_DEV_TO_PCI(eth_dev->device);
axgbe_dev_clear_queues(eth_dev);
@@ -2376,6 +2378,9 @@ axgbe_dev_close(struct rte_eth_dev *eth_dev)
axgbe_dev_interrupt_handler,
(void *)eth_dev);
+ /* Disable all interrupts in the hardware */
+ XP_IOWRITE(pdata, XP_INT_EN, 0x0);
+
return 0;
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:15.228850660 +0100
+++ 0026-net-axgbe-disable-interrupts-during-device-removal.patch 2024-06-25 00:22:13.113184181 +0100
@@ -1 +1 @@
-From 7b7288b08760204139085174ba00a2863dfdbbec Mon Sep 17 00:00:00 2001
+From b07fc265f973fc695348b01163ff3ba23dc5de7d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7b7288b08760204139085174ba00a2863dfdbbec ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index dd681f15a0..e5d8f7db02 100644
+index da48a3ac42..30440e9e1d 100644
@@ -25 +26 @@
-@@ -2411,12 +2411,14 @@ static int
+@@ -2361,12 +2361,14 @@ static int
@@ -40 +41 @@
-@@ -2426,6 +2428,9 @@ axgbe_dev_close(struct rte_eth_dev *eth_dev)
+@@ -2376,6 +2378,9 @@ axgbe_dev_close(struct rte_eth_dev *eth_dev)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/axgbe: disable RRC for yellow carp devices' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (24 preceding siblings ...)
2024-06-24 23:58 ` patch 'net/axgbe: disable interrupts during device removal' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'net/axgbe: enable PLL control for fixed PHY modes only' " luca.boccassi
` (53 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Venkat Kumar Ande; +Cc: Selwin Sebastian, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a1e4f462f35e4015d7f2de421d96fbd39ff42632
Thanks.
Luca Boccassi
---
From a1e4f462f35e4015d7f2de421d96fbd39ff42632 Mon Sep 17 00:00:00 2001
From: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Date: Tue, 4 Jun 2024 17:41:38 +0530
Subject: [PATCH] net/axgbe: disable RRC for yellow carp devices
[ upstream commit e82b0fe097da02eab8be924a28a0a4ca96bc3c69 ]
Link stability issues are noticed on Yellow carp platforms when Receiver
Reset Cycle is issued. Since the CDR workaround is disabled on these
platforms, the Receiver Reset Cycle is not needed.
So, avoid issuing rrc on Yellow carp platforms.
Without the fix the user will not get the link UP.
Fixes: a5c7273771e8 ("net/axgbe: add phy programming APIs")
Signed-off-by: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Acked-by: Selwin Sebastian <selwin.sebastian@amd.com>
---
drivers/net/axgbe/axgbe_ethdev.c | 5 +++++
drivers/net/axgbe/axgbe_ethdev.h | 1 +
drivers/net/axgbe/axgbe_phy_impl.c | 2 +-
3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c
index 30440e9e1d..2156b1d17a 100644
--- a/drivers/net/axgbe/axgbe_ethdev.c
+++ b/drivers/net/axgbe/axgbe_ethdev.c
@@ -205,6 +205,7 @@ static struct axgbe_version_data axgbe_v2a = {
.ecc_support = 1,
.i2c_support = 1,
.an_cdr_workaround = 1,
+ .enable_rrc = 1,
};
static struct axgbe_version_data axgbe_v2b = {
@@ -217,6 +218,7 @@ static struct axgbe_version_data axgbe_v2b = {
.ecc_support = 1,
.i2c_support = 1,
.an_cdr_workaround = 1,
+ .enable_rrc = 1,
};
static const struct rte_eth_desc_lim rx_desc_lim = {
@@ -2224,6 +2226,9 @@ eth_axgbe_dev_init(struct rte_eth_dev *eth_dev)
/* Yellow Carp devices do not need cdr workaround */
pdata->vdata->an_cdr_workaround = 0;
+
+ /* Yellow Carp devices do not need rrc */
+ pdata->vdata->enable_rrc = 0;
} else {
unknown_cpu = 1;
}
diff --git a/drivers/net/axgbe/axgbe_ethdev.h b/drivers/net/axgbe/axgbe_ethdev.h
index 7f19321d88..ae57aeaa00 100644
--- a/drivers/net/axgbe/axgbe_ethdev.h
+++ b/drivers/net/axgbe/axgbe_ethdev.h
@@ -463,6 +463,7 @@ struct axgbe_version_data {
unsigned int ecc_support;
unsigned int i2c_support;
unsigned int an_cdr_workaround;
+ unsigned int enable_rrc;
};
struct axgbe_mmc_stats {
diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_phy_impl.c
index 8f8845a1c5..46ee5f0617 100644
--- a/drivers/net/axgbe/axgbe_phy_impl.c
+++ b/drivers/net/axgbe/axgbe_phy_impl.c
@@ -1708,7 +1708,7 @@ static int axgbe_phy_link_status(struct axgbe_port *pdata, int *an_restart)
}
/* No link, attempt a receiver reset cycle */
- if (phy_data->rrc_count++) {
+ if (pdata->vdata->enable_rrc && phy_data->rrc_count++) {
phy_data->rrc_count = 0;
axgbe_phy_rrc(pdata);
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:15.281453298 +0100
+++ 0027-net-axgbe-disable-RRC-for-yellow-carp-devices.patch 2024-06-25 00:22:13.117184263 +0100
@@ -1 +1 @@
-From e82b0fe097da02eab8be924a28a0a4ca96bc3c69 Mon Sep 17 00:00:00 2001
+From a1e4f462f35e4015d7f2de421d96fbd39ff42632 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e82b0fe097da02eab8be924a28a0a4ca96bc3c69 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index e5d8f7db02..86c2ec64e0 100644
+index 30440e9e1d..2156b1d17a 100644
@@ -29 +30 @@
-@@ -208,6 +208,7 @@ static struct axgbe_version_data axgbe_v2a = {
+@@ -205,6 +205,7 @@ static struct axgbe_version_data axgbe_v2a = {
@@ -37 +38 @@
-@@ -220,6 +221,7 @@ static struct axgbe_version_data axgbe_v2b = {
+@@ -217,6 +218,7 @@ static struct axgbe_version_data axgbe_v2b = {
@@ -45 +46 @@
-@@ -2269,6 +2271,9 @@ eth_axgbe_dev_init(struct rte_eth_dev *eth_dev)
+@@ -2224,6 +2226,9 @@ eth_axgbe_dev_init(struct rte_eth_dev *eth_dev)
@@ -56 +57 @@
-index df5d63c493..f122dfd516 100644
+index 7f19321d88..ae57aeaa00 100644
@@ -68 +69 @@
-index ee9dcbe3da..f51830f800 100644
+index 8f8845a1c5..46ee5f0617 100644
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/axgbe: enable PLL control for fixed PHY modes only' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (25 preceding siblings ...)
2024-06-24 23:58 ` patch 'net/axgbe: disable RRC for yellow carp devices' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'net/axgbe: fix SFP codes check for DAC cables' " luca.boccassi
` (52 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Venkat Kumar Ande; +Cc: Selwin Sebastian, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/07b6c26ee2bbe092c60b96d2dc5d44e067fe1055
Thanks.
Luca Boccassi
---
From 07b6c26ee2bbe092c60b96d2dc5d44e067fe1055 Mon Sep 17 00:00:00 2001
From: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Date: Tue, 4 Jun 2024 17:41:39 +0530
Subject: [PATCH] net/axgbe: enable PLL control for fixed PHY modes only
[ upstream commit 1c68b393b8ba05b6ddb321e3632d45fc1021ed96 ]
PLL control setting is needed only in fixed PHY configuration to
fix the peer-peer issues. Without the PLL control setting, the link up
takes longer time in a fixed PHY configuration.
Without the fix the user will not get the link come UP.
Driver implements SW RRC for Autoneg On configuration, hence PLL control
setting is not needed for AN On configuration, and can be skipped.
Also, PLL re-initialization is not needed for PHY Power Off and RRC
commands. Otherwise, they lead to mailbox errors. Added the changes
accordingly.
Fixes: 09b0a36cc7ae ("net/axgbe: toggle PLL settings during rate change")
Signed-off-by: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Acked-by: Selwin Sebastian <selwin.sebastian@amd.com>
---
drivers/net/axgbe/axgbe_phy_impl.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_phy_impl.c
index 46ee5f0617..040176b8ef 100644
--- a/drivers/net/axgbe/axgbe_phy_impl.c
+++ b/drivers/net/axgbe/axgbe_phy_impl.c
@@ -1228,6 +1228,10 @@ static void axgbe_phy_rx_reset(struct axgbe_port *pdata)
static void axgbe_phy_pll_ctrl(struct axgbe_port *pdata, bool enable)
{
+ /* PLL_CTRL feature needs to be enabled for fixed PHY modes (Non-Autoneg) only */
+ if (pdata->phy.autoneg != AUTONEG_DISABLE)
+ return;
+
XMDIO_WRITE_BITS(pdata, MDIO_MMD_PMAPMD, MDIO_VEND2_PMA_MISC_CTRL0,
XGBE_PMA_PLL_CTRL_MASK,
enable ? XGBE_PMA_PLL_CTRL_SET
@@ -1272,8 +1276,9 @@ static void axgbe_phy_perform_ratechange(struct axgbe_port *pdata,
axgbe_phy_rx_reset(pdata);
reenable_pll:
- /* Re-enable the PLL control */
- axgbe_phy_pll_ctrl(pdata, true);
+ /* Enable PLL re-initialization, not needed for PHY Power Off and RRC cmds */
+ if (cmd != 0 && cmd != 5)
+ axgbe_phy_pll_ctrl(pdata, true);
PMD_DRV_LOG(NOTICE, "firmware mailbox command did not complete\n");
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:15.336087708 +0100
+++ 0028-net-axgbe-enable-PLL-control-for-fixed-PHY-modes-onl.patch 2024-06-25 00:22:13.117184263 +0100
@@ -1 +1 @@
-From 1c68b393b8ba05b6ddb321e3632d45fc1021ed96 Mon Sep 17 00:00:00 2001
+From 07b6c26ee2bbe092c60b96d2dc5d44e067fe1055 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1c68b393b8ba05b6ddb321e3632d45fc1021ed96 ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index f51830f800..bcefbf28f2 100644
+index 46ee5f0617..040176b8ef 100644
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/axgbe: fix SFP codes check for DAC cables' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (26 preceding siblings ...)
2024-06-24 23:58 ` patch 'net/axgbe: enable PLL control for fixed PHY modes only' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'net/axgbe: fix connection for SFP+ active " luca.boccassi
` (51 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Venkat Kumar Ande; +Cc: Selwin Sebastian, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/39527c017d64fc66cd911281f65ec93927adb6a2
Thanks.
Luca Boccassi
---
From 39527c017d64fc66cd911281f65ec93927adb6a2 Mon Sep 17 00:00:00 2001
From: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Date: Tue, 4 Jun 2024 17:41:40 +0530
Subject: [PATCH] net/axgbe: fix SFP codes check for DAC cables
[ upstream commit 4eefb1b16acaa69bd757057e0c54c58f11577ba3 ]
The current axgbe code assumes that offset 6 of EEPROM SFP DAC (passive)
cables is NULL. However, some cables (the 5 meter and 7 meter Molex
passive cables) have non-zero data at offset 6. Fix the logic by moving
the passive cable check above the active checks, so as not to be
improperly identified as an active cable. This will fix the issue for
any passive cable that advertises 1000Base-CX in offset 6.
Without the fix the user will not get link UP for few DAC cables.
Fixes: a5c7273771e8 ("net/axgbe: add phy programming APIs")
Signed-off-by: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Acked-by: Selwin Sebastian <selwin.sebastian@amd.com>
---
drivers/net/axgbe/axgbe_phy_impl.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_phy_impl.c
index 040176b8ef..9aadbefaba 100644
--- a/drivers/net/axgbe/axgbe_phy_impl.c
+++ b/drivers/net/axgbe/axgbe_phy_impl.c
@@ -625,7 +625,10 @@ static void axgbe_phy_sfp_parse_eeprom(struct axgbe_port *pdata)
}
/* Determine the type of SFP */
- if (sfp_base[AXGBE_SFP_BASE_10GBE_CC] & AXGBE_SFP_BASE_10GBE_CC_SR)
+ if (phy_data->sfp_cable == AXGBE_SFP_CABLE_PASSIVE &&
+ axgbe_phy_sfp_bit_rate(sfp_eeprom, AXGBE_SFP_SPEED_10000))
+ phy_data->sfp_base = AXGBE_SFP_BASE_10000_CR;
+ else if (sfp_base[AXGBE_SFP_BASE_10GBE_CC] & AXGBE_SFP_BASE_10GBE_CC_SR)
phy_data->sfp_base = AXGBE_SFP_BASE_10000_SR;
else if (sfp_base[AXGBE_SFP_BASE_10GBE_CC] & AXGBE_SFP_BASE_10GBE_CC_LR)
phy_data->sfp_base = AXGBE_SFP_BASE_10000_LR;
@@ -642,9 +645,6 @@ static void axgbe_phy_sfp_parse_eeprom(struct axgbe_port *pdata)
phy_data->sfp_base = AXGBE_SFP_BASE_1000_CX;
else if (sfp_base[AXGBE_SFP_BASE_1GBE_CC] & AXGBE_SFP_BASE_1GBE_CC_T)
phy_data->sfp_base = AXGBE_SFP_BASE_1000_T;
- else if ((phy_data->sfp_cable == AXGBE_SFP_CABLE_PASSIVE) &&
- axgbe_phy_sfp_bit_rate(sfp_eeprom, AXGBE_SFP_SPEED_10000))
- phy_data->sfp_base = AXGBE_SFP_BASE_10000_CR;
switch (phy_data->sfp_base) {
case AXGBE_SFP_BASE_1000_T:
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:15.388135617 +0100
+++ 0029-net-axgbe-fix-SFP-codes-check-for-DAC-cables.patch 2024-06-25 00:22:13.121184344 +0100
@@ -1 +1 @@
-From 4eefb1b16acaa69bd757057e0c54c58f11577ba3 Mon Sep 17 00:00:00 2001
+From 39527c017d64fc66cd911281f65ec93927adb6a2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4eefb1b16acaa69bd757057e0c54c58f11577ba3 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index bcefbf28f2..10196cae94 100644
+index 040176b8ef..9aadbefaba 100644
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/axgbe: fix connection for SFP+ active cables' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (27 preceding siblings ...)
2024-06-24 23:58 ` patch 'net/axgbe: fix SFP codes check for DAC cables' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'net/axgbe: check only minimum speed for " luca.boccassi
` (50 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Venkat Kumar Ande; +Cc: Selwin Sebastian, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/73e8b7893e102f3c4d01dd7b510b1c64e3e6171f
Thanks.
Luca Boccassi
---
From 73e8b7893e102f3c4d01dd7b510b1c64e3e6171f Mon Sep 17 00:00:00 2001
From: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Date: Tue, 4 Jun 2024 17:41:41 +0530
Subject: [PATCH] net/axgbe: fix connection for SFP+ active cables
[ upstream commit 4823ccdbbd887bb84339a4d35febd92292d07b97 ]
SFP+ active and passive cables are copper cables with fixed SFP+ end
connectors. Due to a misinterpretation of this, SFP+ active cables could
end up not being recognized, causing the driver to fail to establish a
connection.
Introduce a new enum in SFP+ cable types, XGBE_SFP_CABLE_FIBER, that is
the default cable type, and handle active and passive cables when they
are specifically detected.
Fixes: a5c7273771e8 ("net/axgbe: add phy programming APIs")
Signed-off-by: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Acked-by: Selwin Sebastian <selwin.sebastian@amd.com>
---
drivers/net/axgbe/axgbe_phy_impl.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_phy_impl.c
index 9aadbefaba..85b01bfa10 100644
--- a/drivers/net/axgbe/axgbe_phy_impl.c
+++ b/drivers/net/axgbe/axgbe_phy_impl.c
@@ -69,6 +69,7 @@ enum axgbe_sfp_cable {
AXGBE_SFP_CABLE_UNKNOWN = 0,
AXGBE_SFP_CABLE_ACTIVE,
AXGBE_SFP_CABLE_PASSIVE,
+ AXGBE_SFP_CABLE_FIBER,
};
enum axgbe_sfp_base {
@@ -616,16 +617,18 @@ static void axgbe_phy_sfp_parse_eeprom(struct axgbe_port *pdata)
axgbe_phy_sfp_parse_quirks(pdata);
- /* Assume ACTIVE cable unless told it is PASSIVE */
+ /* Assume FIBER cable unless told otherwise */
if (sfp_base[AXGBE_SFP_BASE_CABLE] & AXGBE_SFP_BASE_CABLE_PASSIVE) {
phy_data->sfp_cable = AXGBE_SFP_CABLE_PASSIVE;
phy_data->sfp_cable_len = sfp_base[AXGBE_SFP_BASE_CU_CABLE_LEN];
- } else {
+ } else if (sfp_base[AXGBE_SFP_BASE_CABLE] & AXGBE_SFP_BASE_CABLE_ACTIVE) {
phy_data->sfp_cable = AXGBE_SFP_CABLE_ACTIVE;
+ } else {
+ phy_data->sfp_cable = AXGBE_SFP_CABLE_FIBER;
}
/* Determine the type of SFP */
- if (phy_data->sfp_cable == AXGBE_SFP_CABLE_PASSIVE &&
+ if (phy_data->sfp_cable != AXGBE_SFP_CABLE_FIBER &&
axgbe_phy_sfp_bit_rate(sfp_eeprom, AXGBE_SFP_SPEED_10000))
phy_data->sfp_base = AXGBE_SFP_BASE_10000_CR;
else if (sfp_base[AXGBE_SFP_BASE_10GBE_CC] & AXGBE_SFP_BASE_10GBE_CC_SR)
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:15.440216439 +0100
+++ 0030-net-axgbe-fix-connection-for-SFP-active-cables.patch 2024-06-25 00:22:13.121184344 +0100
@@ -1 +1 @@
-From 4823ccdbbd887bb84339a4d35febd92292d07b97 Mon Sep 17 00:00:00 2001
+From 73e8b7893e102f3c4d01dd7b510b1c64e3e6171f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4823ccdbbd887bb84339a4d35febd92292d07b97 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 10196cae94..d9585a7404 100644
+index 9aadbefaba..85b01bfa10 100644
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/axgbe: check only minimum speed for cables' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (28 preceding siblings ...)
2024-06-24 23:58 ` patch 'net/axgbe: fix connection for SFP+ active " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'net/axgbe: fix Tx flow on 30H HW' " luca.boccassi
` (49 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Venkat Kumar Ande; +Cc: Selwin Sebastian, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/08c36b23fdd34beefd1421eb552b2c58c43ba52d
Thanks.
Luca Boccassi
---
From 08c36b23fdd34beefd1421eb552b2c58c43ba52d Mon Sep 17 00:00:00 2001
From: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Date: Tue, 4 Jun 2024 17:41:42 +0530
Subject: [PATCH] net/axgbe: check only minimum speed for cables
[ upstream commit b5587a39dc94ee0bd055b515cc8c060923ed69b9 ]
There are cables that exist that can support speeds in excess of 10GbE.
The driver, however, restricts the EEPROM advertised nominal bitrate to
a specific range, which can prevent usage of cables that can support,
for example, up to 25GbE.
Rather than checking that an active or passive cable supports a specific
range, only check for a minimum supported speed.
Fixes: a5c7273771e8 ("net/axgbe: add phy programming APIs")
Signed-off-by: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Acked-by: Selwin Sebastian <selwin.sebastian@amd.com>
---
drivers/net/axgbe/axgbe_phy_impl.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_phy_impl.c
index 85b01bfa10..12908d4e6f 100644
--- a/drivers/net/axgbe/axgbe_phy_impl.c
+++ b/drivers/net/axgbe/axgbe_phy_impl.c
@@ -117,9 +117,7 @@ enum axgbe_sfp_speed {
#define AXGBE_SFP_BASE_BR 12
#define AXGBE_SFP_BASE_BR_1GBE_MIN 0x0a
-#define AXGBE_SFP_BASE_BR_1GBE_MAX 0x0d
#define AXGBE_SFP_BASE_BR_10GBE_MIN 0x64
-#define AXGBE_SFP_BASE_BR_10GBE_MAX 0x68
#define AXGBE_SFP_BASE_CU_CABLE_LEN 18
@@ -536,25 +534,22 @@ static void axgbe_phy_sfp_phy_settings(struct axgbe_port *pdata)
static bool axgbe_phy_sfp_bit_rate(struct axgbe_sfp_eeprom *sfp_eeprom,
enum axgbe_sfp_speed sfp_speed)
{
- u8 *sfp_base, min, max;
+ u8 *sfp_base, min;
sfp_base = sfp_eeprom->base;
switch (sfp_speed) {
case AXGBE_SFP_SPEED_1000:
min = AXGBE_SFP_BASE_BR_1GBE_MIN;
- max = AXGBE_SFP_BASE_BR_1GBE_MAX;
break;
case AXGBE_SFP_SPEED_10000:
min = AXGBE_SFP_BASE_BR_10GBE_MIN;
- max = AXGBE_SFP_BASE_BR_10GBE_MAX;
break;
default:
return false;
}
- return ((sfp_base[AXGBE_SFP_BASE_BR] >= min) &&
- (sfp_base[AXGBE_SFP_BASE_BR] <= max));
+ return sfp_base[AXGBE_SFP_BASE_BR] >= min;
}
static void axgbe_phy_sfp_external_phy(struct axgbe_port *pdata)
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:15.492206733 +0100
+++ 0031-net-axgbe-check-only-minimum-speed-for-cables.patch 2024-06-25 00:22:13.125184426 +0100
@@ -1 +1 @@
-From b5587a39dc94ee0bd055b515cc8c060923ed69b9 Mon Sep 17 00:00:00 2001
+From 08c36b23fdd34beefd1421eb552b2c58c43ba52d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b5587a39dc94ee0bd055b515cc8c060923ed69b9 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index d9585a7404..b6a2a084aa 100644
+index 85b01bfa10..12908d4e6f 100644
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/axgbe: fix Tx flow on 30H HW' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (29 preceding siblings ...)
2024-06-24 23:58 ` patch 'net/axgbe: check only minimum speed for " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'net/axgbe: delay AN timeout during KR training' " luca.boccassi
` (48 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Venkat Kumar Ande; +Cc: Selwin Sebastian, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/59767090cb7af04ec5fbdc8a443cd3da13f0207c
Thanks.
Luca Boccassi
---
From 59767090cb7af04ec5fbdc8a443cd3da13f0207c Mon Sep 17 00:00:00 2001
From: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Date: Tue, 4 Jun 2024 17:41:43 +0530
Subject: [PATCH] net/axgbe: fix Tx flow on 30H HW
[ upstream commit b4b24f3e80f9b1bd2c56e1b56b8b8337748e15e6 ]
There is difference in the TX Flow Control registers (TFCR) between the
revisions of the hardware. The older revisions of hardware used to have
single register per queue. Whereas, the newer revision of hardware (from
ver 30H onwards) have one register per priority.
Without the fix the user will face problem in TX operation on new 30H HW
Fixes: 7c4158a5b592 ("net/axgbe: add DMA programming and start/stop")
Signed-off-by: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Acked-by: Selwin Sebastian <selwin.sebastian@amd.com>
---
drivers/net/axgbe/axgbe_dev.c | 25 +++++++++++++++----------
1 file changed, 15 insertions(+), 10 deletions(-)
diff --git a/drivers/net/axgbe/axgbe_dev.c b/drivers/net/axgbe/axgbe_dev.c
index 9b0073eea6..5233633a53 100644
--- a/drivers/net/axgbe/axgbe_dev.c
+++ b/drivers/net/axgbe/axgbe_dev.c
@@ -269,20 +269,28 @@ static int axgbe_set_speed(struct axgbe_port *pdata, int speed)
return 0;
}
+static unsigned int axgbe_get_fc_queue_count(struct axgbe_port *pdata)
+{
+ unsigned int max_q_count = AXGMAC_MAX_FLOW_CONTROL_QUEUES;
+
+ /* From MAC ver 30H the TFCR is per priority, instead of per queue */
+ if (AXGMAC_GET_BITS(pdata->hw_feat.version, MAC_VR, SNPSVER) >= 0x30)
+ return max_q_count;
+ else
+ return (RTE_MIN(pdata->tx_q_count, max_q_count));
+}
+
static int axgbe_disable_tx_flow_control(struct axgbe_port *pdata)
{
- unsigned int max_q_count, q_count;
unsigned int reg, reg_val;
- unsigned int i;
+ unsigned int i, q_count;
/* Clear MTL flow control */
for (i = 0; i < pdata->rx_q_count; i++)
AXGMAC_MTL_IOWRITE_BITS(pdata, i, MTL_Q_RQOMR, EHFC, 0);
/* Clear MAC flow control */
- max_q_count = AXGMAC_MAX_FLOW_CONTROL_QUEUES;
- q_count = RTE_MIN(pdata->tx_q_count,
- max_q_count);
+ q_count = axgbe_get_fc_queue_count(pdata);
reg = MAC_Q0TFCR;
for (i = 0; i < q_count; i++) {
reg_val = AXGMAC_IOREAD(pdata, reg);
@@ -297,9 +305,8 @@ static int axgbe_disable_tx_flow_control(struct axgbe_port *pdata)
static int axgbe_enable_tx_flow_control(struct axgbe_port *pdata)
{
- unsigned int max_q_count, q_count;
unsigned int reg, reg_val;
- unsigned int i;
+ unsigned int i, q_count;
/* Set MTL flow control */
for (i = 0; i < pdata->rx_q_count; i++) {
@@ -316,9 +323,7 @@ static int axgbe_enable_tx_flow_control(struct axgbe_port *pdata)
}
/* Set MAC flow control */
- max_q_count = AXGMAC_MAX_FLOW_CONTROL_QUEUES;
- q_count = RTE_MIN(pdata->tx_q_count,
- max_q_count);
+ q_count = axgbe_get_fc_queue_count(pdata);
reg = MAC_Q0TFCR;
for (i = 0; i < q_count; i++) {
reg_val = AXGMAC_IOREAD(pdata, reg);
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:15.544399094 +0100
+++ 0032-net-axgbe-fix-Tx-flow-on-30H-HW.patch 2024-06-25 00:22:13.125184426 +0100
@@ -1 +1 @@
-From b4b24f3e80f9b1bd2c56e1b56b8b8337748e15e6 Mon Sep 17 00:00:00 2001
+From 59767090cb7af04ec5fbdc8a443cd3da13f0207c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b4b24f3e80f9b1bd2c56e1b56b8b8337748e15e6 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/axgbe: delay AN timeout during KR training' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (30 preceding siblings ...)
2024-06-24 23:58 ` patch 'net/axgbe: fix Tx flow on 30H HW' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'net/axgbe: fix linkup in PHY status' " luca.boccassi
` (47 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Venkat Kumar Ande; +Cc: Selwin Sebastian, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e8615db99073af9bc4b4a1af9dbd1b051d2d54d8
Thanks.
Luca Boccassi
---
From e8615db99073af9bc4b4a1af9dbd1b051d2d54d8 Mon Sep 17 00:00:00 2001
From: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Date: Tue, 4 Jun 2024 17:41:44 +0530
Subject: [PATCH] net/axgbe: delay AN timeout during KR training
[ upstream commit 323e8c91a7c434915920fe8668ca5664b65ea198 ]
AN restart triggered during KR training not only aborts the KR training
process but also move the HW to unstable state. Driver has to wait up to
500ms or until the KR training is completed before restarting AN cycle.
Without the fix the user will face KR training failure issues.
Fixes: a5c7273771e8 ("net/axgbe: add phy programming APIs")
Signed-off-by: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Acked-by: Selwin Sebastian <selwin.sebastian@amd.com>
---
drivers/net/axgbe/axgbe_ethdev.h | 2 ++
drivers/net/axgbe/axgbe_mdio.c | 25 +++++++++++++++++++++++++
2 files changed, 27 insertions(+)
diff --git a/drivers/net/axgbe/axgbe_ethdev.h b/drivers/net/axgbe/axgbe_ethdev.h
index ae57aeaa00..b4bd56e239 100644
--- a/drivers/net/axgbe/axgbe_ethdev.h
+++ b/drivers/net/axgbe/axgbe_ethdev.h
@@ -111,6 +111,7 @@
/* Auto-negotiation */
#define AXGBE_AN_MS_TIMEOUT 500
#define AXGBE_LINK_TIMEOUT 5
+#define AXGBE_KR_TRAINING_WAIT_ITER 50
#define AXGBE_SGMII_AN_LINK_STATUS BIT(1)
#define AXGBE_SGMII_AN_LINK_SPEED (BIT(2) | BIT(3))
@@ -654,6 +655,7 @@ struct axgbe_port {
unsigned int parallel_detect;
unsigned int fec_ability;
unsigned long an_start;
+ unsigned long kr_start_time;
enum axgbe_an_mode an_mode;
/* I2C support */
diff --git a/drivers/net/axgbe/axgbe_mdio.c b/drivers/net/axgbe/axgbe_mdio.c
index b03bc471cb..e1a737cf62 100644
--- a/drivers/net/axgbe/axgbe_mdio.c
+++ b/drivers/net/axgbe/axgbe_mdio.c
@@ -357,6 +357,7 @@ static enum axgbe_an axgbe_an73_tx_training(struct axgbe_port *pdata,
reg |= AXGBE_KR_TRAINING_ENABLE;
reg |= AXGBE_KR_TRAINING_START;
XMDIO_WRITE(pdata, MDIO_MMD_PMAPMD, MDIO_PMA_10GBR_PMD_CTRL, reg);
+ pdata->kr_start_time = rte_get_timer_cycles();
PMD_DRV_LOG(DEBUG, "KR training initiated\n");
if (pdata->phy_if.phy_impl.kr_training_post)
@@ -487,6 +488,7 @@ static enum axgbe_an axgbe_an73_incompat_link(struct axgbe_port *pdata)
axgbe_an_disable(pdata);
axgbe_switch_mode(pdata);
+ pdata->an_result = AXGBE_AN_READY;
axgbe_an_restart(pdata);
return AXGBE_AN_INCOMPAT_LINK;
@@ -967,11 +969,34 @@ static void axgbe_check_link_timeout(struct axgbe_port *pdata)
{
unsigned long link_timeout;
unsigned long ticks;
+ unsigned long kr_time;
+ int wait;
link_timeout = pdata->link_check + (AXGBE_LINK_TIMEOUT *
2 * rte_get_timer_hz());
ticks = rte_get_timer_cycles();
if (time_after(ticks, link_timeout)) {
+ if ((axgbe_cur_mode(pdata) == AXGBE_MODE_KR) &&
+ pdata->phy.autoneg == AUTONEG_ENABLE) {
+ /* AN restart should not happen while KR training is in progress.
+ * The while loop ensures no AN restart during KR training,
+ * waits up to 500ms and AN restart is triggered only if KR
+ * training is failed.
+ */
+ wait = AXGBE_KR_TRAINING_WAIT_ITER;
+ while (wait--) {
+ kr_time = pdata->kr_start_time +
+ msecs_to_timer_cycles(AXGBE_AN_MS_TIMEOUT);
+ ticks = rte_get_timer_cycles();
+ if (time_after(ticks, kr_time))
+ break;
+ /* AN restart is not required, if AN result is COMPLETE */
+ if (pdata->an_result == AXGBE_AN_COMPLETE)
+ return;
+ rte_delay_us(10500);
+ }
+ }
+
PMD_DRV_LOG(NOTICE, "AN link timeout\n");
axgbe_phy_config_aneg(pdata);
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:15.595687630 +0100
+++ 0033-net-axgbe-delay-AN-timeout-during-KR-training.patch 2024-06-25 00:22:13.125184426 +0100
@@ -1 +1 @@
-From 323e8c91a7c434915920fe8668ca5664b65ea198 Mon Sep 17 00:00:00 2001
+From e8615db99073af9bc4b4a1af9dbd1b051d2d54d8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 323e8c91a7c434915920fe8668ca5664b65ea198 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index f122dfd516..d1fac667c2 100644
+index ae57aeaa00..b4bd56e239 100644
@@ -34 +35 @@
-@@ -661,6 +662,7 @@ struct axgbe_port {
+@@ -654,6 +655,7 @@ struct axgbe_port {
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/axgbe: fix linkup in PHY status' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (31 preceding siblings ...)
2024-06-24 23:58 ` patch 'net/axgbe: delay AN timeout during KR training' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'net/ice: fix check for outer UDP checksum offload' " luca.boccassi
` (46 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Venkat Kumar Ande; +Cc: Selwin Sebastian, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/ac5a8e2ab5732ba8872f34e2fbb199f10d067400
Thanks.
Luca Boccassi
---
From ac5a8e2ab5732ba8872f34e2fbb199f10d067400 Mon Sep 17 00:00:00 2001
From: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Date: Tue, 4 Jun 2024 17:41:45 +0530
Subject: [PATCH] net/axgbe: fix linkup in PHY status
[ upstream commit 50362d0e1f386563a026b314bd0a7eedcd188910 ]
In the event of a change in axgbe mode, the current auto-negotiation
needs to be reset and the AN cycle needs to be re-triggered. However,
the current code ignores the return value of axgbe_set_mode(), leading
to false information as the link is declared without checking the status
register.
Fix this by propagating the mode switch status information to
axgbe_phy_status().
Fixes: 102b6ec3d5c3 ("net/axgbe: support auto-negotiation for 1Gbps")
Signed-off-by: Venkat Kumar Ande <venkatkumar.ande@amd.com>
Acked-by: Selwin Sebastian <selwin.sebastian@amd.com>
---
drivers/net/axgbe/axgbe_mdio.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/drivers/net/axgbe/axgbe_mdio.c b/drivers/net/axgbe/axgbe_mdio.c
index e1a737cf62..d95a52659e 100644
--- a/drivers/net/axgbe/axgbe_mdio.c
+++ b/drivers/net/axgbe/axgbe_mdio.c
@@ -200,13 +200,14 @@ static void axgbe_switch_mode(struct axgbe_port *pdata)
axgbe_change_mode(pdata, pdata->phy_if.phy_impl.switch_mode(pdata));
}
-static void axgbe_set_mode(struct axgbe_port *pdata,
+static bool axgbe_set_mode(struct axgbe_port *pdata,
enum axgbe_mode mode)
{
if (mode == axgbe_cur_mode(pdata))
- return;
+ return false;
axgbe_change_mode(pdata, mode);
+ return true;
}
static bool axgbe_use_mode(struct axgbe_port *pdata,
@@ -1007,7 +1008,7 @@ static enum axgbe_mode axgbe_phy_status_aneg(struct axgbe_port *pdata)
return pdata->phy_if.phy_impl.an_outcome(pdata);
}
-static void axgbe_phy_status_result(struct axgbe_port *pdata)
+static bool axgbe_phy_status_result(struct axgbe_port *pdata)
{
enum axgbe_mode mode;
@@ -1041,7 +1042,10 @@ static void axgbe_phy_status_result(struct axgbe_port *pdata)
pdata->phy.duplex = DUPLEX_FULL;
- axgbe_set_mode(pdata, mode);
+ if (axgbe_set_mode(pdata, mode))
+ return true;
+ else
+ return false;
}
static int autoneg_time_out(unsigned long autoneg_start_time)
@@ -1108,7 +1112,10 @@ static void axgbe_phy_status(struct axgbe_port *pdata)
return;
}
}
- axgbe_phy_status_result(pdata);
+
+ if (axgbe_phy_status_result(pdata))
+ return;
+
if (rte_bit_relaxed_get32(AXGBE_LINK_INIT, &pdata->dev_state))
rte_bit_relaxed_clear32(AXGBE_LINK_INIT,
&pdata->dev_state);
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:15.647808194 +0100
+++ 0034-net-axgbe-fix-linkup-in-PHY-status.patch 2024-06-25 00:22:13.125184426 +0100
@@ -1 +1 @@
-From 50362d0e1f386563a026b314bd0a7eedcd188910 Mon Sep 17 00:00:00 2001
+From ac5a8e2ab5732ba8872f34e2fbb199f10d067400 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 50362d0e1f386563a026b314bd0a7eedcd188910 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ice: fix check for outer UDP checksum offload' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (32 preceding siblings ...)
2024-06-24 23:58 ` patch 'net/axgbe: fix linkup in PHY status' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'app/testpmd: fix outer IP " luca.boccassi
` (45 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: David Marchand
Cc: Bruce Richardson, Morten Brørup, Ali Alnubani, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e48c8875998c04dbc83065bbed8139b74a26a16c
Thanks.
Luca Boccassi
---
From e48c8875998c04dbc83065bbed8139b74a26a16c Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 18 Apr 2024 10:20:15 +0200
Subject: [PATCH] net/ice: fix check for outer UDP checksum offload
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit f4eb07f031c4a6a0055f3b2773e031cd8000206e ]
ICE_TX_CTX_EIPT_NONE == 0.
There is a good chance that !(anything & 0) is true :-).
While removing this noop check is doable, let's check that the
descriptor does contain a outer ip type.
Fixes: 2ed011776334 ("net/ice: fix outer UDP Tx checksum offload")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Tested-by: Ali Alnubani <alialnu@nvidia.com>
---
drivers/net/ice/ice_rxtx.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index 9a653cbc4a..f73065b81c 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -2733,9 +2733,9 @@ ice_parse_tunneling_params(uint64_t ol_flags,
* Calculate the tunneling UDP checksum.
* Shall be set only if L4TUNT = 01b and EIPT is not zero
*/
- if (!(*cd_tunneling & ICE_TX_CTX_EIPT_NONE) &&
- (*cd_tunneling & ICE_TXD_CTX_UDP_TUNNELING) &&
- (ol_flags & RTE_MBUF_F_TX_OUTER_UDP_CKSUM))
+ if ((*cd_tunneling & ICE_TXD_CTX_QW0_EIPT_M) &&
+ (*cd_tunneling & ICE_TXD_CTX_UDP_TUNNELING) &&
+ (ol_flags & RTE_MBUF_F_TX_OUTER_UDP_CKSUM))
*cd_tunneling |= ICE_TXD_CTX_QW0_L4T_CS_M;
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:15.698246281 +0100
+++ 0035-net-ice-fix-check-for-outer-UDP-checksum-offload.patch 2024-06-25 00:22:13.129184507 +0100
@@ -1 +1 @@
-From f4eb07f031c4a6a0055f3b2773e031cd8000206e Mon Sep 17 00:00:00 2001
+From e48c8875998c04dbc83065bbed8139b74a26a16c Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit f4eb07f031c4a6a0055f3b2773e031cd8000206e ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 95a2db3432..10babab231 100644
+index 9a653cbc4a..f73065b81c 100644
@@ -30 +31 @@
-@@ -2751,9 +2751,9 @@ ice_parse_tunneling_params(uint64_t ol_flags,
+@@ -2733,9 +2733,9 @@ ice_parse_tunneling_params(uint64_t ol_flags,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'app/testpmd: fix outer IP checksum offload' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (33 preceding siblings ...)
2024-06-24 23:58 ` patch 'net/ice: fix check for outer UDP checksum offload' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'net: fix outer UDP checksum in Intel prepare helper' " luca.boccassi
` (44 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: David Marchand; +Cc: Ferruh Yigit, Ali Alnubani, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/0c72bf4c1d8e1382545da4a2b55dfcaa632b0ce3
Thanks.
Luca Boccassi
---
From 0c72bf4c1d8e1382545da4a2b55dfcaa632b0ce3 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 18 Apr 2024 10:20:17 +0200
Subject: [PATCH] app/testpmd: fix outer IP checksum offload
[ upstream commit b9d859d8a671ec4516face2eba24434b955a9ac1 ]
Resetting the outer IP checksum to 0 is not something mandated by the
mbuf API and is done by rte_eth_tx_prepare(), or per driver if needed.
Fixes: 4fb7e803eb1a ("ethdev: add Tx preparation")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
Tested-by: Ali Alnubani <alialnu@nvidia.com>
---
app/test-pmd/csumonly.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index 6170728221..bfe1fc3ddc 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -574,15 +574,17 @@ process_outer_cksums(void *outer_l3_hdr, struct testpmd_offload_info *info,
uint64_t ol_flags = 0;
if (info->outer_ethertype == _htons(RTE_ETHER_TYPE_IPV4)) {
- ipv4_hdr->hdr_checksum = 0;
ol_flags |= RTE_MBUF_F_TX_OUTER_IPV4;
- if (tx_offloads & RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM)
+ if (tx_offloads & RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM) {
ol_flags |= RTE_MBUF_F_TX_OUTER_IP_CKSUM;
- else
+ } else {
+ ipv4_hdr->hdr_checksum = 0;
ipv4_hdr->hdr_checksum = rte_ipv4_cksum(ipv4_hdr);
- } else
+ }
+ } else {
ol_flags |= RTE_MBUF_F_TX_OUTER_IPV6;
+ }
if (info->outer_l4_proto != IPPROTO_UDP)
return ol_flags;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:15.769222946 +0100
+++ 0036-app-testpmd-fix-outer-IP-checksum-offload.patch 2024-06-25 00:22:13.129184507 +0100
@@ -1 +1 @@
-From b9d859d8a671ec4516face2eba24434b955a9ac1 Mon Sep 17 00:00:00 2001
+From 0c72bf4c1d8e1382545da4a2b55dfcaa632b0ce3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b9d859d8a671ec4516face2eba24434b955a9ac1 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 6711dda42e..f5125c2788 100644
+index 6170728221..bfe1fc3ddc 100644
@@ -23 +24 @@
-@@ -583,15 +583,17 @@ process_outer_cksums(void *outer_l3_hdr, struct testpmd_offload_info *info,
+@@ -574,15 +574,17 @@ process_outer_cksums(void *outer_l3_hdr, struct testpmd_offload_info *info,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net: fix outer UDP checksum in Intel prepare helper' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (34 preceding siblings ...)
2024-06-24 23:58 ` patch 'app/testpmd: fix outer IP " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'net/i40e: fix outer UDP checksum offload for X710' " luca.boccassi
` (43 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: David Marchand; +Cc: Ali Alnubani, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b5fc38d53c9b4f682e0dd433063db14faaa6ae63
Thanks.
Luca Boccassi
---
From b5fc38d53c9b4f682e0dd433063db14faaa6ae63 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 18 Apr 2024 10:20:18 +0200
Subject: [PATCH] net: fix outer UDP checksum in Intel prepare helper
[ upstream commit f876dbef080932dbeb1de075d7ca3cbe2ed6d7eb ]
Setting a pseudo header checksum in the outer UDP checksum is a Intel
(and some other vendors) requirement.
Applications (like OVS) requesting outer UDP checksum without doing this
extra setup have broken outer UDP checksums.
Move this specific setup from testpmd to the "common" helper
rte_net_intel_cksum_flags_prepare().
net/hns3 can then be adjusted.
Bugzilla ID: 1406
Fixes: d8e5e69f3a9b ("app/testpmd: add GTP parsing and Tx checksum offload")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Ali Alnubani <alialnu@nvidia.com>
---
app/test-pmd/csumonly.c | 11 +----
drivers/net/hns3/hns3_rxtx.c | 93 ++++++++++--------------------------
lib/net/rte_net.h | 17 ++++++-
3 files changed, 43 insertions(+), 78 deletions(-)
diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index bfe1fc3ddc..161bbd4e14 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -568,8 +568,6 @@ static uint64_t
process_outer_cksums(void *outer_l3_hdr, struct testpmd_offload_info *info,
uint64_t tx_offloads, int tso_enabled, struct rte_mbuf *m)
{
- struct rte_ipv4_hdr *ipv4_hdr = outer_l3_hdr;
- struct rte_ipv6_hdr *ipv6_hdr = outer_l3_hdr;
struct rte_udp_hdr *udp_hdr;
uint64_t ol_flags = 0;
@@ -579,6 +577,8 @@ process_outer_cksums(void *outer_l3_hdr, struct testpmd_offload_info *info,
if (tx_offloads & RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM) {
ol_flags |= RTE_MBUF_F_TX_OUTER_IP_CKSUM;
} else {
+ struct rte_ipv4_hdr *ipv4_hdr = outer_l3_hdr;
+
ipv4_hdr->hdr_checksum = 0;
ipv4_hdr->hdr_checksum = rte_ipv4_cksum(ipv4_hdr);
}
@@ -597,13 +597,6 @@ process_outer_cksums(void *outer_l3_hdr, struct testpmd_offload_info *info,
/* Skip SW outer UDP checksum generation if HW supports it */
if (tx_offloads & RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM) {
- if (info->outer_ethertype == _htons(RTE_ETHER_TYPE_IPV4))
- udp_hdr->dgram_cksum
- = rte_ipv4_phdr_cksum(ipv4_hdr, ol_flags);
- else
- udp_hdr->dgram_cksum
- = rte_ipv6_phdr_cksum(ipv6_hdr, ol_flags);
-
ol_flags |= RTE_MBUF_F_TX_OUTER_UDP_CKSUM;
return ol_flags;
}
diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index c0479a44dc..4343a3e4df 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -3627,58 +3627,6 @@ hns3_pkt_need_linearized(struct rte_mbuf *tx_pkts, uint32_t bd_num,
return false;
}
-static bool
-hns3_outer_ipv4_cksum_prepared(struct rte_mbuf *m, uint64_t ol_flags,
- uint32_t *l4_proto)
-{
- struct rte_ipv4_hdr *ipv4_hdr;
- ipv4_hdr = rte_pktmbuf_mtod_offset(m, struct rte_ipv4_hdr *,
- m->outer_l2_len);
- if (ol_flags & RTE_MBUF_F_TX_OUTER_IP_CKSUM)
- ipv4_hdr->hdr_checksum = 0;
- if (ol_flags & RTE_MBUF_F_TX_OUTER_UDP_CKSUM) {
- struct rte_udp_hdr *udp_hdr;
- /*
- * If OUTER_UDP_CKSUM is support, HW can calculate the pseudo
- * header for TSO packets
- */
- if (ol_flags & RTE_MBUF_F_TX_TCP_SEG)
- return true;
- udp_hdr = rte_pktmbuf_mtod_offset(m, struct rte_udp_hdr *,
- m->outer_l2_len + m->outer_l3_len);
- udp_hdr->dgram_cksum = rte_ipv4_phdr_cksum(ipv4_hdr, ol_flags);
-
- return true;
- }
- *l4_proto = ipv4_hdr->next_proto_id;
- return false;
-}
-
-static bool
-hns3_outer_ipv6_cksum_prepared(struct rte_mbuf *m, uint64_t ol_flags,
- uint32_t *l4_proto)
-{
- struct rte_ipv6_hdr *ipv6_hdr;
- ipv6_hdr = rte_pktmbuf_mtod_offset(m, struct rte_ipv6_hdr *,
- m->outer_l2_len);
- if (ol_flags & RTE_MBUF_F_TX_OUTER_UDP_CKSUM) {
- struct rte_udp_hdr *udp_hdr;
- /*
- * If OUTER_UDP_CKSUM is support, HW can calculate the pseudo
- * header for TSO packets
- */
- if (ol_flags & RTE_MBUF_F_TX_TCP_SEG)
- return true;
- udp_hdr = rte_pktmbuf_mtod_offset(m, struct rte_udp_hdr *,
- m->outer_l2_len + m->outer_l3_len);
- udp_hdr->dgram_cksum = rte_ipv6_phdr_cksum(ipv6_hdr, ol_flags);
-
- return true;
- }
- *l4_proto = ipv6_hdr->proto;
- return false;
-}
-
static void
hns3_outer_header_cksum_prepare(struct rte_mbuf *m)
{
@@ -3686,29 +3634,38 @@ hns3_outer_header_cksum_prepare(struct rte_mbuf *m)
uint32_t paylen, hdr_len, l4_proto;
struct rte_udp_hdr *udp_hdr;
- if (!(ol_flags & (RTE_MBUF_F_TX_OUTER_IPV4 | RTE_MBUF_F_TX_OUTER_IPV6)))
+ if (!(ol_flags & (RTE_MBUF_F_TX_OUTER_IPV4 | RTE_MBUF_F_TX_OUTER_IPV6)) &&
+ ((ol_flags & RTE_MBUF_F_TX_OUTER_UDP_CKSUM) ||
+ !(ol_flags & RTE_MBUF_F_TX_TCP_SEG)))
return;
if (ol_flags & RTE_MBUF_F_TX_OUTER_IPV4) {
- if (hns3_outer_ipv4_cksum_prepared(m, ol_flags, &l4_proto))
- return;
+ struct rte_ipv4_hdr *ipv4_hdr;
+
+ ipv4_hdr = rte_pktmbuf_mtod_offset(m, struct rte_ipv4_hdr *,
+ m->outer_l2_len);
+ l4_proto = ipv4_hdr->next_proto_id;
} else {
- if (hns3_outer_ipv6_cksum_prepared(m, ol_flags, &l4_proto))
- return;
+ struct rte_ipv6_hdr *ipv6_hdr;
+
+ ipv6_hdr = rte_pktmbuf_mtod_offset(m, struct rte_ipv6_hdr *,
+ m->outer_l2_len);
+ l4_proto = ipv6_hdr->proto;
}
+ if (l4_proto != IPPROTO_UDP)
+ return;
+
/* driver should ensure the outer udp cksum is 0 for TUNNEL TSO */
- if (l4_proto == IPPROTO_UDP && (ol_flags & RTE_MBUF_F_TX_TCP_SEG)) {
- hdr_len = m->l2_len + m->l3_len + m->l4_len;
- hdr_len += m->outer_l2_len + m->outer_l3_len;
- paylen = m->pkt_len - hdr_len;
- if (paylen <= m->tso_segsz)
- return;
- udp_hdr = rte_pktmbuf_mtod_offset(m, struct rte_udp_hdr *,
- m->outer_l2_len +
- m->outer_l3_len);
- udp_hdr->dgram_cksum = 0;
- }
+ hdr_len = m->l2_len + m->l3_len + m->l4_len;
+ hdr_len += m->outer_l2_len + m->outer_l3_len;
+ paylen = m->pkt_len - hdr_len;
+ if (paylen <= m->tso_segsz)
+ return;
+ udp_hdr = rte_pktmbuf_mtod_offset(m, struct rte_udp_hdr *,
+ m->outer_l2_len +
+ m->outer_l3_len);
+ udp_hdr->dgram_cksum = 0;
}
static int
diff --git a/lib/net/rte_net.h b/lib/net/rte_net.h
index 56611fc8f9..a94f6af717 100644
--- a/lib/net/rte_net.h
+++ b/lib/net/rte_net.h
@@ -121,7 +121,7 @@ rte_net_intel_cksum_flags_prepare(struct rte_mbuf *m, uint64_t ol_flags)
* no offloads are requested.
*/
if (!(ol_flags & (RTE_MBUF_F_TX_IP_CKSUM | RTE_MBUF_F_TX_L4_MASK | RTE_MBUF_F_TX_TCP_SEG |
- RTE_MBUF_F_TX_OUTER_IP_CKSUM)))
+ RTE_MBUF_F_TX_OUTER_IP_CKSUM | RTE_MBUF_F_TX_OUTER_UDP_CKSUM)))
return 0;
if (ol_flags & (RTE_MBUF_F_TX_OUTER_IPV4 | RTE_MBUF_F_TX_OUTER_IPV6)) {
@@ -135,6 +135,21 @@ rte_net_intel_cksum_flags_prepare(struct rte_mbuf *m, uint64_t ol_flags)
struct rte_ipv4_hdr *, m->outer_l2_len);
ipv4_hdr->hdr_checksum = 0;
}
+ if (ol_flags & RTE_MBUF_F_TX_OUTER_UDP_CKSUM) {
+ if (ol_flags & RTE_MBUF_F_TX_OUTER_IPV4) {
+ ipv4_hdr = rte_pktmbuf_mtod_offset(m, struct rte_ipv4_hdr *,
+ m->outer_l2_len);
+ udp_hdr = (struct rte_udp_hdr *)((char *)ipv4_hdr +
+ m->outer_l3_len);
+ udp_hdr->dgram_cksum = rte_ipv4_phdr_cksum(ipv4_hdr, m->ol_flags);
+ } else {
+ ipv6_hdr = rte_pktmbuf_mtod_offset(m, struct rte_ipv6_hdr *,
+ m->outer_l2_len);
+ udp_hdr = rte_pktmbuf_mtod_offset(m, struct rte_udp_hdr *,
+ m->outer_l2_len + m->outer_l3_len);
+ udp_hdr->dgram_cksum = rte_ipv6_phdr_cksum(ipv6_hdr, m->ol_flags);
+ }
+ }
}
/*
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:15.829676123 +0100
+++ 0037-net-fix-outer-UDP-checksum-in-Intel-prepare-helper.patch 2024-06-25 00:22:13.137184670 +0100
@@ -1 +1 @@
-From f876dbef080932dbeb1de075d7ca3cbe2ed6d7eb Mon Sep 17 00:00:00 2001
+From b5fc38d53c9b4f682e0dd433063db14faaa6ae63 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f876dbef080932dbeb1de075d7ca3cbe2ed6d7eb ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -25,2 +26,2 @@
- lib/net/rte_net.h | 18 ++++++-
- 3 files changed, 44 insertions(+), 78 deletions(-)
+ lib/net/rte_net.h | 17 ++++++-
+ 3 files changed, 43 insertions(+), 78 deletions(-)
@@ -29 +30 @@
-index f5125c2788..71add6ca47 100644
+index bfe1fc3ddc..161bbd4e14 100644
@@ -32 +33 @@
-@@ -577,8 +577,6 @@ static uint64_t
+@@ -568,8 +568,6 @@ static uint64_t
@@ -41 +42 @@
-@@ -588,6 +586,8 @@ process_outer_cksums(void *outer_l3_hdr, struct testpmd_offload_info *info,
+@@ -579,6 +577,8 @@ process_outer_cksums(void *outer_l3_hdr, struct testpmd_offload_info *info,
@@ -50 +51 @@
-@@ -608,13 +608,6 @@ process_outer_cksums(void *outer_l3_hdr, struct testpmd_offload_info *info,
+@@ -597,13 +597,6 @@ process_outer_cksums(void *outer_l3_hdr, struct testpmd_offload_info *info,
@@ -65 +66 @@
-index bf10da1928..59a95aba7c 100644
+index c0479a44dc..4343a3e4df 100644
@@ -68 +69 @@
-@@ -3629,58 +3629,6 @@ hns3_pkt_need_linearized(struct rte_mbuf *tx_pkts, uint32_t bd_num,
+@@ -3627,58 +3627,6 @@ hns3_pkt_need_linearized(struct rte_mbuf *tx_pkts, uint32_t bd_num,
@@ -127 +128 @@
-@@ -3688,29 +3636,38 @@ hns3_outer_header_cksum_prepare(struct rte_mbuf *m)
+@@ -3686,29 +3634,38 @@ hns3_outer_header_cksum_prepare(struct rte_mbuf *m)
@@ -183 +184 @@
-index ef3ff4c6fd..efd9d5f5ee 100644
+index 56611fc8f9..a94f6af717 100644
@@ -186 +187 @@
-@@ -121,7 +121,8 @@ rte_net_intel_cksum_flags_prepare(struct rte_mbuf *m, uint64_t ol_flags)
+@@ -121,7 +121,7 @@ rte_net_intel_cksum_flags_prepare(struct rte_mbuf *m, uint64_t ol_flags)
@@ -190,3 +191,2 @@
-- RTE_MBUF_F_TX_UDP_SEG | RTE_MBUF_F_TX_OUTER_IP_CKSUM)))
-+ RTE_MBUF_F_TX_UDP_SEG | RTE_MBUF_F_TX_OUTER_IP_CKSUM |
-+ RTE_MBUF_F_TX_OUTER_UDP_CKSUM)))
+- RTE_MBUF_F_TX_OUTER_IP_CKSUM)))
++ RTE_MBUF_F_TX_OUTER_IP_CKSUM | RTE_MBUF_F_TX_OUTER_UDP_CKSUM)))
@@ -196 +196 @@
-@@ -135,6 +136,21 @@ rte_net_intel_cksum_flags_prepare(struct rte_mbuf *m, uint64_t ol_flags)
+@@ -135,6 +135,21 @@ rte_net_intel_cksum_flags_prepare(struct rte_mbuf *m, uint64_t ol_flags)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/i40e: fix outer UDP checksum offload for X710' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (35 preceding siblings ...)
2024-06-24 23:58 ` patch 'net: fix outer UDP checksum in Intel prepare helper' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'net/iavf: remove outer UDP checksum offload for X710 VF' " luca.boccassi
` (42 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: David Marchand; +Cc: Jun Wang, Ali Alnubani, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/9d02109d19544e9834902cdf7964165e25cc75f2
Thanks.
Luca Boccassi
---
From 9d02109d19544e9834902cdf7964165e25cc75f2 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 18 Apr 2024 10:20:19 +0200
Subject: [PATCH] net/i40e: fix outer UDP checksum offload for X710
[ upstream commit 6b5e31f7fbd71675c8f3f6d8c0f74fd1f3a0dff5 ]
According to the X710 datasheet (and confirmed on the field..), X710
devices do not support outer checksum offload.
"""
8.4.4.2 Transmit L3 and L4 Integrity Offload
Tunneling UDP headers and GRE header are not offloaded while the
X710/XXV710/XL710 leaves their checksum field as is.
If a checksum is required, software should provide it as well as the inner
checksum value(s) that are required for the outer checksum.
"""
Fix Tx offload capabilities according to the hardware.
X722 may support such offload by setting I40E_TXD_CTX_QW0_L4T_CS_MASK.
Bugzilla ID: 1406
Fixes: 8cc79a1636cd ("net/i40e: fix forward outer IPv6 VXLAN")
Reported-by: Jun Wang <junwang01@cestc.cn>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Ali Alnubani <alialnu@nvidia.com>
---
.mailmap | 1 +
drivers/net/i40e/i40e_ethdev.c | 6 +++++-
drivers/net/i40e/i40e_rxtx.c | 9 +++++++++
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/.mailmap b/.mailmap
index 172e7f2692..8aca0a656e 100644
--- a/.mailmap
+++ b/.mailmap
@@ -686,6 +686,7 @@ Junjie Wan <wanjunjie@bytedance.com>
Jun Qiu <jun.qiu@jaguarmicro.com>
Jun W Zhou <junx.w.zhou@intel.com>
Junxiao Shi <git@mail1.yoursunny.com>
+Jun Wang <junwang01@cestc.cn>
Jun Yang <jun.yang@nxp.com>
Junyu Jiang <junyux.jiang@intel.com>
Juraj Linkeš <juraj.linkes@pantheon.tech>
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 0ff334745d..2049c32c4e 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -3721,8 +3721,12 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
RTE_ETH_TX_OFFLOAD_IPIP_TNL_TSO |
RTE_ETH_TX_OFFLOAD_GENEVE_TNL_TSO |
RTE_ETH_TX_OFFLOAD_MULTI_SEGS |
- RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM |
dev_info->tx_queue_offload_capa;
+ if (hw->mac.type == I40E_MAC_X722) {
+ dev_info->tx_offload_capa |=
+ RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM;
+ }
+
dev_info->dev_capa =
RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP |
RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP;
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index d96bbbb677..6522f2b810 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -295,6 +295,15 @@ i40e_parse_tunneling_params(uint64_t ol_flags,
*/
*cd_tunneling |= (tx_offload.l2_len >> 1) <<
I40E_TXD_CTX_QW0_NATLEN_SHIFT;
+
+ /**
+ * Calculate the tunneling UDP checksum (only supported with X722).
+ * Shall be set only if L4TUNT = 01b and EIPT is not zero
+ */
+ if ((*cd_tunneling & I40E_TXD_CTX_QW0_EXT_IP_MASK) &&
+ (*cd_tunneling & I40E_TXD_CTX_UDP_TUNNELING) &&
+ (ol_flags & RTE_MBUF_F_TX_OUTER_UDP_CKSUM))
+ *cd_tunneling |= I40E_TXD_CTX_QW0_L4T_CS_MASK;
}
static inline void
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:15.897075093 +0100
+++ 0038-net-i40e-fix-outer-UDP-checksum-offload-for-X710.patch 2024-06-25 00:22:13.153184996 +0100
@@ -1 +1 @@
-From 6b5e31f7fbd71675c8f3f6d8c0f74fd1f3a0dff5 Mon Sep 17 00:00:00 2001
+From 9d02109d19544e9834902cdf7964165e25cc75f2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6b5e31f7fbd71675c8f3f6d8c0f74fd1f3a0dff5 ]
+
@@ -24 +25,0 @@
-Cc: stable@dpdk.org
@@ -36 +37 @@
-index cb8d65bf0e..1aca379558 100644
+index 172e7f2692..8aca0a656e 100644
@@ -39 +40 @@
-@@ -720,6 +720,7 @@ Junjie Wan <wanjunjie@bytedance.com>
+@@ -686,6 +686,7 @@ Junjie Wan <wanjunjie@bytedance.com>
@@ -48 +49 @@
-index 801cc95607..c38515a758 100644
+index 0ff334745d..2049c32c4e 100644
@@ -51 +52 @@
-@@ -3862,8 +3862,12 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
+@@ -3721,8 +3721,12 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
@@ -66 +67 @@
-index 155f24377b..dc466ae371 100644
+index d96bbbb677..6522f2b810 100644
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/iavf: remove outer UDP checksum offload for X710 VF' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (36 preceding siblings ...)
2024-06-24 23:58 ` patch 'net/i40e: fix outer UDP checksum offload for X710' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'app/testpmd: fix lcore ID restriction' " luca.boccassi
` (41 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: David Marchand; +Cc: Ali Alnubani, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/fe02a92fcc01da0abe0429e8c6e0168c0df2d238
Thanks.
Luca Boccassi
---
From fe02a92fcc01da0abe0429e8c6e0168c0df2d238 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 18 Apr 2024 10:20:20 +0200
Subject: [PATCH] net/iavf: remove outer UDP checksum offload for X710 VF
[ upstream commit 032ba1580bc36f31e431cf8d14dd3dec0079fa9c ]
According to the X710 datasheet, X710 devices do not support outer
checksum offload.
"""
8.4.4.2 Transmit L3 and L4 Integrity Offload
Tunneling UDP headers and GRE header are not offloaded while the
X710/XXV710/XL710 leaves their checksum field as is.
If a checksum is required, software should provide it as well as the inner
checksum value(s) that are required for the outer checksum.
"""
Fix Tx offload capabilities depending on the VF type.
Bugzilla ID: 1406
Fixes: f7c8c36fdeb7 ("net/iavf: enable inner and outer Tx checksum offload")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Ali Alnubani <alialnu@nvidia.com>
---
drivers/net/iavf/iavf_ethdev.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index b244d45abb..b6c3cd425d 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -1140,7 +1140,6 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
RTE_ETH_TX_OFFLOAD_TCP_CKSUM |
RTE_ETH_TX_OFFLOAD_SCTP_CKSUM |
RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM |
- RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM |
RTE_ETH_TX_OFFLOAD_TCP_TSO |
RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO |
RTE_ETH_TX_OFFLOAD_GRE_TNL_TSO |
@@ -1149,6 +1148,10 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
RTE_ETH_TX_OFFLOAD_MULTI_SEGS |
RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE;
+ /* X710 does not support outer udp checksum */
+ if (adapter->hw.mac.type != IAVF_MAC_XL710)
+ dev_info->tx_offload_capa |= RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM;
+
if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_CRC)
dev_info->rx_offload_capa |= RTE_ETH_RX_OFFLOAD_KEEP_CRC;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:15.972408422 +0100
+++ 0039-net-iavf-remove-outer-UDP-checksum-offload-for-X710-.patch 2024-06-25 00:22:13.153184996 +0100
@@ -1 +1 @@
-From 032ba1580bc36f31e431cf8d14dd3dec0079fa9c Mon Sep 17 00:00:00 2001
+From fe02a92fcc01da0abe0429e8c6e0168c0df2d238 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 032ba1580bc36f31e431cf8d14dd3dec0079fa9c ]
+
@@ -22 +23,0 @@
-Cc: stable@dpdk.org
@@ -27,17 +28,3 @@
- doc/guides/nics/features/iavf.ini | 2 +-
- drivers/net/iavf/iavf_ethdev.c | 5 ++++-
- 2 files changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/doc/guides/nics/features/iavf.ini b/doc/guides/nics/features/iavf.ini
-index c59115ae15..ce9860e963 100644
---- a/doc/guides/nics/features/iavf.ini
-+++ b/doc/guides/nics/features/iavf.ini
-@@ -33,7 +33,7 @@ L3 checksum offload = Y
- L4 checksum offload = Y
- Timestamp offload = Y
- Inner L3 checksum = Y
--Inner L4 checksum = Y
-+Inner L4 checksum = P
- Packet type parsing = Y
- Rx descriptor status = Y
- Tx descriptor status = Y
+ drivers/net/iavf/iavf_ethdev.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
@@ -45 +32 @@
-index 245b3cd854..bbf915097e 100644
+index b244d45abb..b6c3cd425d 100644
@@ -48 +35 @@
-@@ -1174,7 +1174,6 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
+@@ -1140,7 +1140,6 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
@@ -56 +43 @@
-@@ -1183,6 +1182,10 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
+@@ -1149,6 +1148,10 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'app/testpmd: fix lcore ID restriction' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (37 preceding siblings ...)
2024-06-24 23:58 ` patch 'net/iavf: remove outer UDP checksum offload for X710 VF' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'hash: fix return code description in Doxygen' " luca.boccassi
` (40 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Sivaprasad Tummala; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a4a27aa3e0f8a870de14f33463180c3b9af4c8de
Thanks.
Luca Boccassi
---
From a4a27aa3e0f8a870de14f33463180c3b9af4c8de Mon Sep 17 00:00:00 2001
From: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
Date: Thu, 6 Jun 2024 11:27:46 +0000
Subject: [PATCH] app/testpmd: fix lcore ID restriction
[ upstream commit 2bf44dd14fa50fa95e090058ec83c2eb96b64ac5 ]
With modern CPUs, it is possible to have higher
CPU count thus we can have higher RTE_MAX_LCORES.
In testpmd application, the current config forwarding
cores option "--nb-cores" is hard limited to 255.
The patch fixes this constraint and also adjusts the lcore
data structure to 32-bit to align with rte lcore APIs.
Fixes: af75078fece3 ("first public release")
Signed-off-by: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
app/test-pmd/config.c | 4 ++--
app/test-pmd/parameters.c | 4 ++--
app/test-pmd/testpmd.h | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index dca5431b98..1a6d791129 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -4244,9 +4244,9 @@ fwd_stream_on_other_lcores(uint16_t domain_id, lcoreid_t src_lc,
continue;
printf("Shared Rx queue group %u queue %hu can't be scheduled on different cores:\n",
share_group, share_rxq);
- printf(" lcore %hhu Port %hu queue %hu\n",
+ printf(" lcore %u Port %hu queue %hu\n",
src_lc, src_port, src_rxq);
- printf(" lcore %hhu Port %hu queue %hu\n",
+ printf(" lcore %u Port %hu queue %hu\n",
lc_id, fs->rx_port, fs->rx_queue);
printf("Please use --nb-cores=%hu to limit number of forwarding cores\n",
nb_rxq);
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index 2d0a782ee0..d6f07df789 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -864,8 +864,8 @@ launch_args_parse(int argc, char** argv)
}
if (!strcmp(lgopts[opt_idx].name, "nb-cores")) {
n = atoi(optarg);
- if (n > 0 && n <= nb_lcores)
- nb_fwd_lcores = (uint8_t) n;
+ if (n > 0 && (lcoreid_t)n <= nb_lcores)
+ nb_fwd_lcores = (lcoreid_t) n;
else
rte_exit(EXIT_FAILURE,
"nb-cores should be > 0 and <= %d\n",
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 022210a7a9..f7f3587c83 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -84,7 +84,7 @@ extern volatile uint8_t f_quit;
/* Maximum number of pools supported per Rx queue */
#define MAX_MEMPOOL 8
-typedef uint8_t lcoreid_t;
+typedef uint32_t lcoreid_t;
typedef uint16_t portid_t;
typedef uint16_t queueid_t;
typedef uint16_t streamid_t;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:16.016814195 +0100
+++ 0040-app-testpmd-fix-lcore-ID-restriction.patch 2024-06-25 00:22:13.161185159 +0100
@@ -1 +1 @@
-From 2bf44dd14fa50fa95e090058ec83c2eb96b64ac5 Mon Sep 17 00:00:00 2001
+From a4a27aa3e0f8a870de14f33463180c3b9af4c8de Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2bf44dd14fa50fa95e090058ec83c2eb96b64ac5 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index f62ba90c87..66c3a68c1d 100644
+index dca5431b98..1a6d791129 100644
@@ -29 +30 @@
-@@ -4782,9 +4782,9 @@ fwd_stream_on_other_lcores(uint16_t domain_id, lcoreid_t src_lc,
+@@ -4244,9 +4244,9 @@ fwd_stream_on_other_lcores(uint16_t domain_id, lcoreid_t src_lc,
@@ -42 +43 @@
-index c13f7564bf..22364e09ab 100644
+index 2d0a782ee0..d6f07df789 100644
@@ -45,11 +46,11 @@
-@@ -1071,8 +1071,8 @@ launch_args_parse(int argc, char** argv)
- break;
- case TESTPMD_OPT_NB_CORES_NUM:
- n = atoi(optarg);
-- if (n > 0 && n <= nb_lcores)
-- nb_fwd_lcores = (uint8_t) n;
-+ if (n > 0 && (lcoreid_t)n <= nb_lcores)
-+ nb_fwd_lcores = (lcoreid_t) n;
- else
- rte_exit(EXIT_FAILURE,
- "nb-cores should be > 0 and <= %d\n",
+@@ -864,8 +864,8 @@ launch_args_parse(int argc, char** argv)
+ }
+ if (!strcmp(lgopts[opt_idx].name, "nb-cores")) {
+ n = atoi(optarg);
+- if (n > 0 && n <= nb_lcores)
+- nb_fwd_lcores = (uint8_t) n;
++ if (n > 0 && (lcoreid_t)n <= nb_lcores)
++ nb_fwd_lcores = (lcoreid_t) n;
+ else
+ rte_exit(EXIT_FAILURE,
+ "nb-cores should be > 0 and <= %d\n",
@@ -57 +58 @@
-index 0afae7d771..9facd7f281 100644
+index 022210a7a9..f7f3587c83 100644
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'hash: fix return code description in Doxygen' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (38 preceding siblings ...)
2024-06-24 23:58 ` patch 'app/testpmd: fix lcore ID restriction' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'hash: check name when creating a hash' " luca.boccassi
` (39 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Chenming Chang; +Cc: Stephen Hemminger, Vladimir Medvedkin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/07f2ecf7b3283f3637198795ff78d34ebf70c594
Thanks.
Luca Boccassi
---
From 07f2ecf7b3283f3637198795ff78d34ebf70c594 Mon Sep 17 00:00:00 2001
From: Chenming Chang <ccm@ccm.ink>
Date: Mon, 27 Jun 2022 21:11:21 +0800
Subject: [PATCH] hash: fix return code description in Doxygen
[ upstream commit 78a632e6b52c29c5f297001181e870750eee02a7 ]
The rte_hash lookup can return ZERO which is not a positive value.
Fixes: af75078fece3 ("first public release")
Signed-off-by: Chenming Chang <ccm@ccm.ink>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
.mailmap | 1 +
lib/hash/rte_hash.h | 16 ++++++++--------
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/.mailmap b/.mailmap
index 8aca0a656e..7e7c1a75cb 100644
--- a/.mailmap
+++ b/.mailmap
@@ -215,6 +215,7 @@ Cheng Liu <liucheng11@huawei.com>
Cheng Peng <cheng.peng5@zte.com.cn>
Chengwen Feng <fengchengwen@huawei.com>
Chenmin Sun <chenmin.sun@intel.com>
+Chenming Chang <ccm@ccm.ink>
Chenxu Di <chenxux.di@intel.com>
Cheryl Houser <chouser@vmware.com>
Chinh T Cao <chinh.t.cao@intel.com>
diff --git a/lib/hash/rte_hash.h b/lib/hash/rte_hash.h
index a399346d02..51611e392b 100644
--- a/lib/hash/rte_hash.h
+++ b/lib/hash/rte_hash.h
@@ -287,7 +287,7 @@ rte_hash_add_key_with_hash_data(const struct rte_hash *h, const void *key,
* @return
* - -EINVAL if the parameters are invalid.
* - -ENOSPC if there is no space in the hash for this key.
- * - A positive value that can be used by the caller as an offset into an
+ * - A non-negative value that can be used by the caller as an offset into an
* array of user data. This value is unique for this key. This
* unique key id may be larger than the user specified entry count
* when RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD flag is set.
@@ -311,7 +311,7 @@ rte_hash_add_key(const struct rte_hash *h, const void *key);
* @return
* - -EINVAL if the parameters are invalid.
* - -ENOSPC if there is no space in the hash for this key.
- * - A positive value that can be used by the caller as an offset into an
+ * - A non-negative value that can be used by the caller as an offset into an
* array of user data. This value is unique for this key. This
* unique key ID may be larger than the user specified entry count
* when RTE_HASH_EXTRA_FLAGS_MULTI_WRITER_ADD flag is set.
@@ -342,7 +342,7 @@ rte_hash_add_key_with_hash(const struct rte_hash *h, const void *key, hash_sig_t
* @return
* - -EINVAL if the parameters are invalid.
* - -ENOENT if the key is not found.
- * - A positive value that can be used by the caller as an offset into an
+ * - A non-negative value that can be used by the caller as an offset into an
* array of user data. This value is unique for this key, and is the same
* value that was returned when the key was added.
*/
@@ -374,7 +374,7 @@ rte_hash_del_key(const struct rte_hash *h, const void *key);
* @return
* - -EINVAL if the parameters are invalid.
* - -ENOENT if the key is not found.
- * - A positive value that can be used by the caller as an offset into an
+ * - A non-negative value that can be used by the caller as an offset into an
* array of user data. This value is unique for this key, and is the same
* value that was returned when the key was added.
*/
@@ -441,7 +441,7 @@ rte_hash_free_key_with_position(const struct rte_hash *h,
* @param data
* Output with pointer to data returned from the hash table.
* @return
- * - A positive value that can be used by the caller as an offset into an
+ * - A non-negative value that can be used by the caller as an offset into an
* array of user data. This value is unique for this key, and is the same
* value that was returned when the key was added.
* - -EINVAL if the parameters are invalid.
@@ -466,7 +466,7 @@ rte_hash_lookup_data(const struct rte_hash *h, const void *key, void **data);
* @param data
* Output with pointer to data returned from the hash table.
* @return
- * - A positive value that can be used by the caller as an offset into an
+ * - A non-negative value that can be used by the caller as an offset into an
* array of user data. This value is unique for this key, and is the same
* value that was returned when the key was added.
* - -EINVAL if the parameters are invalid.
@@ -489,7 +489,7 @@ rte_hash_lookup_with_hash_data(const struct rte_hash *h, const void *key,
* @return
* - -EINVAL if the parameters are invalid.
* - -ENOENT if the key is not found.
- * - A positive value that can be used by the caller as an offset into an
+ * - A non-negative value that can be used by the caller as an offset into an
* array of user data. This value is unique for this key, and is the same
* value that was returned when the key was added.
*/
@@ -511,7 +511,7 @@ rte_hash_lookup(const struct rte_hash *h, const void *key);
* @return
* - -EINVAL if the parameters are invalid.
* - -ENOENT if the key is not found.
- * - A positive value that can be used by the caller as an offset into an
+ * - A non-negative value that can be used by the caller as an offset into an
* array of user data. This value is unique for this key, and is the same
* value that was returned when the key was added.
*/
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:16.066778136 +0100
+++ 0041-hash-fix-return-code-description-in-Doxygen.patch 2024-06-25 00:22:13.165185241 +0100
@@ -1 +1 @@
-From 78a632e6b52c29c5f297001181e870750eee02a7 Mon Sep 17 00:00:00 2001
+From 07f2ecf7b3283f3637198795ff78d34ebf70c594 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 78a632e6b52c29c5f297001181e870750eee02a7 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 1aca379558..111dbb0ac3 100644
+index 8aca0a656e..7e7c1a75cb 100644
@@ -23 +24 @@
-@@ -228,6 +228,7 @@ Cheng Liu <liucheng11@huawei.com>
+@@ -215,6 +215,7 @@ Cheng Liu <liucheng11@huawei.com>
@@ -29 +29,0 @@
- Chenyu Huang <chenyux.huang@intel.com>
@@ -30,0 +31 @@
+ Chinh T Cao <chinh.t.cao@intel.com>
@@ -32 +33 @@
-index 7ecc021111..ba96521529 100644
+index a399346d02..51611e392b 100644
@@ -35 +36 @@
-@@ -286,7 +286,7 @@ rte_hash_add_key_with_hash_data(const struct rte_hash *h, const void *key,
+@@ -287,7 +287,7 @@ rte_hash_add_key_with_hash_data(const struct rte_hash *h, const void *key,
@@ -44 +45 @@
-@@ -310,7 +310,7 @@ rte_hash_add_key(const struct rte_hash *h, const void *key);
+@@ -311,7 +311,7 @@ rte_hash_add_key(const struct rte_hash *h, const void *key);
@@ -53 +54 @@
-@@ -341,7 +341,7 @@ rte_hash_add_key_with_hash(const struct rte_hash *h, const void *key, hash_sig_t
+@@ -342,7 +342,7 @@ rte_hash_add_key_with_hash(const struct rte_hash *h, const void *key, hash_sig_t
@@ -62 +63 @@
-@@ -373,7 +373,7 @@ rte_hash_del_key(const struct rte_hash *h, const void *key);
+@@ -374,7 +374,7 @@ rte_hash_del_key(const struct rte_hash *h, const void *key);
@@ -71 +72 @@
-@@ -440,7 +440,7 @@ rte_hash_free_key_with_position(const struct rte_hash *h,
+@@ -441,7 +441,7 @@ rte_hash_free_key_with_position(const struct rte_hash *h,
@@ -80 +81 @@
-@@ -465,7 +465,7 @@ rte_hash_lookup_data(const struct rte_hash *h, const void *key, void **data);
+@@ -466,7 +466,7 @@ rte_hash_lookup_data(const struct rte_hash *h, const void *key, void **data);
@@ -89 +90 @@
-@@ -488,7 +488,7 @@ rte_hash_lookup_with_hash_data(const struct rte_hash *h, const void *key,
+@@ -489,7 +489,7 @@ rte_hash_lookup_with_hash_data(const struct rte_hash *h, const void *key,
@@ -98 +99 @@
-@@ -510,7 +510,7 @@ rte_hash_lookup(const struct rte_hash *h, const void *key);
+@@ -511,7 +511,7 @@ rte_hash_lookup(const struct rte_hash *h, const void *key);
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'hash: check name when creating a hash' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (39 preceding siblings ...)
2024-06-24 23:58 ` patch 'hash: fix return code description in Doxygen' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'mempool: replace GCC pragma with cast' " luca.boccassi
` (38 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Conor Fogarty; +Cc: Vladimir Medvedkin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a28f53ce9a26ccb18f747b8388f821c615e1d2a9
Thanks.
Luca Boccassi
---
From a28f53ce9a26ccb18f747b8388f821c615e1d2a9 Mon Sep 17 00:00:00 2001
From: Conor Fogarty <conor.fogarty@intel.com>
Date: Thu, 6 Jul 2023 16:26:26 +0100
Subject: [PATCH] hash: check name when creating a hash
[ upstream commit 8f36e53317ecf8384461e4f692e46beaaf6c4d2f ]
Add NULL pointer check to params->name, which is later
copied into the hash datastructure. Without this check
the code segfaults on the strlcpy() of a NULL pointer.
Fixes: 48a399119619 ("hash: replace with cuckoo hash implementation")
Signed-off-by: Conor Fogarty <conor.fogarty@intel.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
lib/hash/rte_cuckoo_hash.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/hash/rte_cuckoo_hash.c b/lib/hash/rte_cuckoo_hash.c
index a08b5dd875..13c8337519 100644
--- a/lib/hash/rte_cuckoo_hash.c
+++ b/lib/hash/rte_cuckoo_hash.c
@@ -166,6 +166,7 @@ rte_hash_create(const struct rte_hash_parameters *params)
/* Check for valid parameters */
if ((params->entries > RTE_HASH_ENTRIES_MAX) ||
(params->entries < RTE_HASH_BUCKET_ENTRIES) ||
+ (params->name == NULL) ||
(params->key_len == 0)) {
rte_errno = EINVAL;
RTE_LOG(ERR, HASH, "rte_hash_create has invalid parameters\n");
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:16.110038637 +0100
+++ 0042-hash-check-name-when-creating-a-hash.patch 2024-06-25 00:22:13.165185241 +0100
@@ -1 +1 @@
-From 8f36e53317ecf8384461e4f692e46beaaf6c4d2f Mon Sep 17 00:00:00 2001
+From a28f53ce9a26ccb18f747b8388f821c615e1d2a9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8f36e53317ecf8384461e4f692e46beaaf6c4d2f ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index b31a3d973e..16c9c4c5c4 100644
+index a08b5dd875..13c8337519 100644
@@ -23 +24 @@
-@@ -173,6 +173,7 @@ rte_hash_create(const struct rte_hash_parameters *params)
+@@ -166,6 +166,7 @@ rte_hash_create(const struct rte_hash_parameters *params)
@@ -30 +31 @@
- HASH_LOG(ERR, "%s has invalid parameters", __func__);
+ RTE_LOG(ERR, HASH, "rte_hash_create has invalid parameters\n");
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'mempool: replace GCC pragma with cast' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (40 preceding siblings ...)
2024-06-24 23:58 ` patch 'hash: check name when creating a hash' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'vhost: fix build with GCC 13' " luca.boccassi
` (37 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Tyler Retzlaff, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/9cdf5aecb261e85cc3ae75eda57a34c7a201b3d5
Thanks.
Luca Boccassi
---
From 9cdf5aecb261e85cc3ae75eda57a34c7a201b3d5 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Mon, 1 Apr 2024 10:01:52 -0700
Subject: [PATCH] mempool: replace GCC pragma with cast
[ upstream commit 23dc03f67279f6ced3dafd2e4c76c1b67a0102dc ]
Building mempool with MSVC generates a warning
because of this pragma (same with clang when debug is enabled).
The issue the pragma was working around can be better solved
by using an additional cast.
Fixes: af75078fece3 ("first public release")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
lib/mempool/rte_mempool.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/lib/mempool/rte_mempool.c b/lib/mempool/rte_mempool.c
index 3de857abf5..258754cf67 100644
--- a/lib/mempool/rte_mempool.c
+++ b/lib/mempool/rte_mempool.c
@@ -1054,10 +1054,6 @@ rte_mempool_dump_cache(FILE *f, const struct rte_mempool *mp)
return count;
}
-#ifndef __INTEL_COMPILER
-#pragma GCC diagnostic ignored "-Wcast-qual"
-#endif
-
/* check and update cookies or panic (internal) */
void rte_mempool_check_cookies(const struct rte_mempool *mp,
void * const *obj_table_const, unsigned n, int free)
@@ -1072,7 +1068,7 @@ void rte_mempool_check_cookies(const struct rte_mempool *mp,
/* Force to drop the "const" attribute. This is done only when
* DEBUG is enabled */
- tmp = (void *) obj_table_const;
+ tmp = (void *)(uintptr_t)obj_table_const;
obj_table = tmp;
while (n--) {
@@ -1181,10 +1177,6 @@ mempool_audit_cookies(struct rte_mempool *mp)
#define mempool_audit_cookies(mp) do {} while(0)
#endif
-#ifndef __INTEL_COMPILER
-#pragma GCC diagnostic error "-Wcast-qual"
-#endif
-
/* check cookies before and after objects */
static void
mempool_audit_cache(const struct rte_mempool *mp)
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:16.153274784 +0100
+++ 0043-mempool-replace-GCC-pragma-with-cast.patch 2024-06-25 00:22:13.165185241 +0100
@@ -1 +1 @@
-From 23dc03f67279f6ced3dafd2e4c76c1b67a0102dc Mon Sep 17 00:00:00 2001
+From 9cdf5aecb261e85cc3ae75eda57a34c7a201b3d5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 23dc03f67279f6ced3dafd2e4c76c1b67a0102dc ]
+
@@ -20 +22 @@
-index 7a98441a87..ff67fe4181 100644
+index 3de857abf5..258754cf67 100644
@@ -23 +25 @@
-@@ -1056,10 +1056,6 @@ rte_mempool_dump_cache(FILE *f, const struct rte_mempool *mp)
+@@ -1054,10 +1054,6 @@ rte_mempool_dump_cache(FILE *f, const struct rte_mempool *mp)
@@ -34 +36 @@
-@@ -1074,7 +1070,7 @@ void rte_mempool_check_cookies(const struct rte_mempool *mp,
+@@ -1072,7 +1068,7 @@ void rte_mempool_check_cookies(const struct rte_mempool *mp,
@@ -43 +45 @@
-@@ -1183,10 +1179,6 @@ mempool_audit_cookies(struct rte_mempool *mp)
+@@ -1181,10 +1177,6 @@ mempool_audit_cookies(struct rte_mempool *mp)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'vhost: fix build with GCC 13' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (41 preceding siblings ...)
2024-06-24 23:58 ` patch 'mempool: replace GCC pragma with cast' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'vhost: cleanup resubmit info before inflight setup' " luca.boccassi
` (36 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Luca Vizzarro
Cc: Paul Szczepanek, Nick Connolly, Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6267610fffce83f71ac52256964bb737b1d6400c
Thanks.
Luca Boccassi
---
From 6267610fffce83f71ac52256964bb737b1d6400c Mon Sep 17 00:00:00 2001
From: Luca Vizzarro <luca.vizzarro@arm.com>
Date: Wed, 10 Apr 2024 16:21:01 +0100
Subject: [PATCH] vhost: fix build with GCC 13
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 8db1acabeea3fa4b0c673588cfff2b01e0ae9615 ]
This patch resolves a build error with GCC 13 and arm/aarch32 as
targets:
In function ‘mbuf_to_desc’,
inlined from ‘vhost_enqueue_async_packed’ at
../lib/vhost/virtio_net.c:1828:6,
inlined from ‘virtio_dev_rx_async_packed’ at
../lib/vhost/virtio_net.c:1842:6,
inlined from ‘virtio_dev_rx_async_submit_packed’ at
../lib/vhost/virtio_net.c:1900:7:
../lib/vhost/virtio_net.c:1159:18: error: ‘buf_vec[0].buf_addr’ may
be used uninitialized [-Werror=maybe-uninitialized]
1159 | buf_addr = buf_vec[vec_idx].buf_addr;
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
<snip>
../lib/vhost/virtio_net.c:1160:18: error: ‘buf_vec[0].buf_iova’ may
be used uninitialized [-Werror=maybe-uninitialized]
1160 | buf_iova = buf_vec[vec_idx].buf_iova;
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
<snip>
../lib/vhost/virtio_net.c:1161:35: error: ‘buf_vec[0].buf_len’ may
be used uninitialized [-Werror=maybe-uninitialized]
1161 | buf_len = buf_vec[vec_idx].buf_len;
| ~~~~~~~~~~~~~~~~^~~~~~~~
GCC complains about the possible runtime path where the while loop
which fills buf_vec (in vhost_enqueue_async_packed) is not run. As a
consequence it correctly thinks that buf_vec is not initialized while
being accessed anyways.
This scenario is actually very unlikely as the only way this can occur
is if size has overflowed to 0. Meaning that the total packet length
would be close to UINT64_MAX (or actually UINT32_MAX). At first glance,
the code suggests that this may never happen as the type of size has
been changed to 64-bit. For a 32-bit architecture such as arm
(e.g. armv7-a) and aarch32, this still happens because the operand types
(pkt->pkt_len and sizeof) are 32-bit wide, performing 32-bit arithmetic
first (where the overflow can happen) and widening to 64-bit later.
The proposed fix simply guarantees to the compiler that the scope which
fills buf_vec is accessed at least once, while not disrupting the actual
logic. This is based on the assumption that size will always be greater
than 0, as suggested by the sizeof, and the packet length will never be
as big as UINT32_MAX, and causing an overflow.
Fixes: 873e8dad6f49 ("vhost: support packed ring in async datapath")
Signed-off-by: Luca Vizzarro <luca.vizzarro@arm.com>
Reviewed-by: Paul Szczepanek <paul.szczepanek@arm.com>
Reviewed-by: Nick Connolly <nick.connolly@arm.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
.mailmap | 2 +-
lib/vhost/virtio_net.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/.mailmap b/.mailmap
index 7e7c1a75cb..1c0d974460 100644
--- a/.mailmap
+++ b/.mailmap
@@ -983,7 +983,7 @@ Nemanja Marjanovic <nemanja.marjanovic@intel.com>
Netanel Belgazal <netanel@amazon.com>
Netanel Gonen <netanelg@mellanox.com>
Niall Power <niall.power@intel.com>
-Nick Connolly <nick.connolly@mayadata.io>
+Nick Connolly <nick.connolly@arm.com> <nick.connolly@mayadata.io>
Nick Nunley <nicholas.d.nunley@intel.com>
Niclas Storm <niclas.storm@ericsson.com>
Nicolas Chautru <nicolas.chautru@intel.com>
diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c
index 3061275753..9f314f83c7 100644
--- a/lib/vhost/virtio_net.c
+++ b/lib/vhost/virtio_net.c
@@ -1796,7 +1796,7 @@ vhost_enqueue_async_packed(struct virtio_net *dev,
else
max_tries = 1;
- while (size > 0) {
+ do {
/*
* if we tried all available ring items, and still
* can't get enough buf, it means something abnormal
@@ -1823,7 +1823,7 @@ vhost_enqueue_async_packed(struct virtio_net *dev,
avail_idx += desc_count;
if (avail_idx >= vq->size)
avail_idx -= vq->size;
- }
+ } while (size > 0);
if (unlikely(mbuf_to_desc(dev, vq, pkt, buf_vec, nr_vec, *nr_buffers, true) < 0))
return -1;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:16.195109621 +0100
+++ 0044-vhost-fix-build-with-GCC-13.patch 2024-06-25 00:22:13.169185323 +0100
@@ -1 +1 @@
-From 8db1acabeea3fa4b0c673588cfff2b01e0ae9615 Mon Sep 17 00:00:00 2001
+From 6267610fffce83f71ac52256964bb737b1d6400c Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 8db1acabeea3fa4b0c673588cfff2b01e0ae9615 ]
+
@@ -55 +56,0 @@
-Cc: stable@dpdk.org
@@ -67 +68 @@
-index 111dbb0ac3..ed63605a15 100644
+index 7e7c1a75cb..1c0d974460 100644
@@ -70 +71,2 @@
-@@ -1030,7 +1030,7 @@ Netanel Belgazal <netanel@amazon.com>
+@@ -983,7 +983,7 @@ Nemanja Marjanovic <nemanja.marjanovic@intel.com>
+ Netanel Belgazal <netanel@amazon.com>
@@ -73 +74,0 @@
- Nicholas Pratte <npratte@iol.unh.edu>
@@ -80 +81 @@
-index b406b5d7d9..370402d849 100644
+index 3061275753..9f314f83c7 100644
@@ -83 +84 @@
-@@ -1935,7 +1935,7 @@ vhost_enqueue_async_packed(struct virtio_net *dev,
+@@ -1796,7 +1796,7 @@ vhost_enqueue_async_packed(struct virtio_net *dev,
@@ -92 +93 @@
-@@ -1962,7 +1962,7 @@ vhost_enqueue_async_packed(struct virtio_net *dev,
+@@ -1823,7 +1823,7 @@ vhost_enqueue_async_packed(struct virtio_net *dev,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'vhost: cleanup resubmit info before inflight setup' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (42 preceding siblings ...)
2024-06-24 23:58 ` patch 'vhost: fix build with GCC 13' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'net/virtio: fix MAC table update' " luca.boccassi
` (35 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Haoqian He; +Cc: Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/aff6953d46a68165eddc631154cb687e7f646cac
Thanks.
Luca Boccassi
---
From aff6953d46a68165eddc631154cb687e7f646cac Mon Sep 17 00:00:00 2001
From: Haoqian He <haoqian.he@smartx.com>
Date: Fri, 26 Apr 2024 07:09:46 -0400
Subject: [PATCH] vhost: cleanup resubmit info before inflight setup
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit e4a01eea66326c58593906e189b376605a0ec606 ]
This patch fixes a potential VM hang bug when the VM reboots after
vhost live recovery due to missing cleanup virtqueue resubmit info.
Specifically, if inflight IO that should be resubmitted during
the latest vhost reconnection has not been submitted yet while
VM rebooting, so GET_VRING_BASE would not wait for the inflight
IO, at this time the resubmit info has been. When the VM restarts,
SET_VRING_KICK will resubmit the inflight IO (If resubmit info
is not null, function set_vring_kick will return without updating
resubmit info).
It’s an error, any stale inflight IO should not be resubmitted
after the VM restart.
The solution is to clean up virtqueue resubmit info when function
set_inflight_fd before function set_vring_kick.
Fixes: ad0a4ae491fe ("vhost: checkout resubmit inflight information")
Signed-off-by: Haoqian He <haoqian.he@smartx.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
.mailmap | 1 +
lib/vhost/vhost_user.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/.mailmap b/.mailmap
index 1c0d974460..2724a689fd 100644
--- a/.mailmap
+++ b/.mailmap
@@ -473,6 +473,7 @@ Hanoch Haim <hhaim@cisco.com>
Hanumanth Pothula <hpothula@marvell.com>
Hao Chen <chenhao164@huawei.com>
Hao Wu <hao.wu@intel.com>
+Haoqian He <haoqian.he@smartx.com>
Hari Kumar Vemula <hari.kumarx.vemula@intel.com>
Harini Ramakrishnan <harini.ramakrishnan@microsoft.com>
Hariprasad Govindharajan <hariprasad.govindharajan@intel.com>
diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
index 66ab68fa56..8d7d04059c 100644
--- a/lib/vhost/vhost_user.c
+++ b/lib/vhost/vhost_user.c
@@ -1745,6 +1745,7 @@ vhost_user_set_inflight_fd(struct virtio_net **pdev,
if (!vq)
continue;
+ cleanup_vq_inflight(dev, vq);
if (vq_is_packed(dev)) {
vq->inflight_packed = addr;
vq->inflight_packed->desc_num = queue_size;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:16.241753554 +0100
+++ 0045-vhost-cleanup-resubmit-info-before-inflight-setup.patch 2024-06-25 00:22:13.173185404 +0100
@@ -1 +1 @@
-From e4a01eea66326c58593906e189b376605a0ec606 Mon Sep 17 00:00:00 2001
+From aff6953d46a68165eddc631154cb687e7f646cac Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit e4a01eea66326c58593906e189b376605a0ec606 ]
+
@@ -27 +28,0 @@
-Cc: stable@dpdk.org
@@ -37 +38 @@
-index ed63605a15..ff20619bfb 100644
+index 1c0d974460..2724a689fd 100644
@@ -40 +41 @@
-@@ -495,6 +495,7 @@ Hanoch Haim <hhaim@cisco.com>
+@@ -473,6 +473,7 @@ Hanoch Haim <hhaim@cisco.com>
@@ -42 +43 @@
- Hao Chen <chenh@yusur.tech> <chenhao164@huawei.com>
+ Hao Chen <chenhao164@huawei.com>
@@ -49 +50 @@
-index 414192500e..7c54afc5fb 100644
+index 66ab68fa56..8d7d04059c 100644
@@ -52 +53 @@
-@@ -1871,6 +1871,7 @@ vhost_user_set_inflight_fd(struct virtio_net **pdev,
+@@ -1745,6 +1745,7 @@ vhost_user_set_inflight_fd(struct virtio_net **pdev,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/virtio: fix MAC table update' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (43 preceding siblings ...)
2024-06-24 23:58 ` patch 'vhost: cleanup resubmit info before inflight setup' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'baseband/acc: fix memory barrier' " luca.boccassi
` (34 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Satha Rao; +Cc: Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/48fb2f00d848ab9e9dc5ef15f3e343034c5bcf94
Thanks.
Luca Boccassi
---
From 48fb2f00d848ab9e9dc5ef15f3e343034c5bcf94 Mon Sep 17 00:00:00 2001
From: Satha Rao <skoteshwar@marvell.com>
Date: Thu, 30 May 2024 13:40:39 -0400
Subject: [PATCH] net/virtio: fix MAC table update
[ upstream commit 7698e655516c54558a43b8aaed1bff69928d96fb ]
Don't send NULL MAC addresses in MAC table update.
Fixes: 1b306359e58c ("virtio: suport multiple MAC addresses")
Signed-off-by: Satha Rao <skoteshwar@marvell.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
drivers/net/virtio/virtio_ethdev.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 073bbf482d..1d9a168f92 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1320,6 +1320,8 @@ virtio_mac_addr_add(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr,
struct virtio_net_ctrl_mac *tbl
= rte_is_multicast_ether_addr(addr) ? mc : uc;
+ if (rte_is_zero_ether_addr(addr))
+ break;
memcpy(&tbl->macs[tbl->entries++], addr, RTE_ETHER_ADDR_LEN);
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:16.288104719 +0100
+++ 0046-net-virtio-fix-MAC-table-update.patch 2024-06-25 00:22:13.177185486 +0100
@@ -1 +1 @@
-From 7698e655516c54558a43b8aaed1bff69928d96fb Mon Sep 17 00:00:00 2001
+From 48fb2f00d848ab9e9dc5ef15f3e343034c5bcf94 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7698e655516c54558a43b8aaed1bff69928d96fb ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 517585740e..70d4839def 100644
+index 073bbf482d..1d9a168f92 100644
@@ -21 +22 @@
-@@ -913,6 +913,8 @@ virtio_mac_addr_add(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr,
+@@ -1320,6 +1320,8 @@ virtio_mac_addr_add(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'baseband/acc: fix memory barrier' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (44 preceding siblings ...)
2024-06-24 23:58 ` patch 'net/virtio: fix MAC table update' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'event/sw: fix warning from useless snprintf' " luca.boccassi
` (33 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Hernan Vargas; +Cc: Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/d47135efe7ed109c90c806899b4a6c7f022388b4
Thanks.
Luca Boccassi
---
From d47135efe7ed109c90c806899b4a6c7f022388b4 Mon Sep 17 00:00:00 2001
From: Hernan Vargas <hernan.vargas@intel.com>
Date: Thu, 2 May 2024 13:45:44 -0700
Subject: [PATCH] baseband/acc: fix memory barrier
[ upstream commit 0a200a3a29017f6b01a481776a571a75e03a32ce ]
Moving memory barrier so that dequeue thread can be in sync with enqueue
thread.
Fixes: 32e8b7ea35dd ("baseband/acc100: refactor to segregate common code")
Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
drivers/baseband/acc/acc_common.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/baseband/acc/acc_common.h b/drivers/baseband/acc/acc_common.h
index 9336d3fbcf..7ea3cc9a02 100644
--- a/drivers/baseband/acc/acc_common.h
+++ b/drivers/baseband/acc/acc_common.h
@@ -964,6 +964,9 @@ acc_dma_enqueue(struct acc_queue *q, uint16_t n,
req_elem_addr,
(void *)q->mmio_reg_enqueue);
+ q->aq_enqueued++;
+ q->sw_ring_head += enq_batch_size;
+
rte_wmb();
#ifdef RTE_BBDEV_OFFLOAD_COST
@@ -978,8 +981,6 @@ acc_dma_enqueue(struct acc_queue *q, uint16_t n,
rte_rdtsc_precise() - start_time;
#endif
- q->aq_enqueued++;
- q->sw_ring_head += enq_batch_size;
n -= enq_batch_size;
} while (n);
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:16.331479882 +0100
+++ 0047-baseband-acc-fix-memory-barrier.patch 2024-06-25 00:22:13.177185486 +0100
@@ -1 +1 @@
-From 0a200a3a29017f6b01a481776a571a75e03a32ce Mon Sep 17 00:00:00 2001
+From d47135efe7ed109c90c806899b4a6c7f022388b4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0a200a3a29017f6b01a481776a571a75e03a32ce ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index fddeb0737b..e249f37e38 100644
+index 9336d3fbcf..7ea3cc9a02 100644
@@ -22 +23 @@
-@@ -1112,6 +1112,9 @@ acc_dma_enqueue(struct acc_queue *q, uint16_t n,
+@@ -964,6 +964,9 @@ acc_dma_enqueue(struct acc_queue *q, uint16_t n,
@@ -31,4 +32,4 @@
- /* Start time measurement for enqueue function offload. */
-@@ -1122,8 +1125,6 @@ acc_dma_enqueue(struct acc_queue *q, uint16_t n,
-
- queue_stats->acc_offload_cycles += rte_rdtsc_precise() - start_time;
+ #ifdef RTE_BBDEV_OFFLOAD_COST
+@@ -978,8 +981,6 @@ acc_dma_enqueue(struct acc_queue *q, uint16_t n,
+ rte_rdtsc_precise() - start_time;
+ #endif
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'event/sw: fix warning from useless snprintf' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (45 preceding siblings ...)
2024-06-24 23:58 ` patch 'baseband/acc: fix memory barrier' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'eventdev/crypto: fix opaque field handling' " luca.boccassi
` (32 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Harry van Haaren, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/ae651a5adb9e83ccef322c2a1f125585ab4dde74
Thanks.
Luca Boccassi
---
From ae651a5adb9e83ccef322c2a1f125585ab4dde74 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 23 Apr 2024 20:45:40 -0700
Subject: [PATCH] event/sw: fix warning from useless snprintf
[ upstream commit 510e2b655b46d91d3cc189882e6392afdc0363ff ]
With GCC-14, this warning is generated:
drivers/event/sw/sw_evdev.c:263:3: warning:
snprintf' will always be truncated;
specified size is 12, but format string expands to at least 13
snprintf(buf, sizeof(buf), "sw%d_iq_%d_rob", dev_id, i);
^
Yet the whole printf to the buf is unnecessary. The type string argument
has never been implemented, and should just be NULL. Removing the
unnecessary snprintf, then means IQ_ROB_NAMESIZE can be removed.
Fixes: 5ffb2f142d95 ("event/sw: support event queues")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
---
drivers/event/sw/iq_chunk.h | 2 --
drivers/event/sw/sw_evdev.c | 5 +----
2 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/event/sw/iq_chunk.h b/drivers/event/sw/iq_chunk.h
index 31d013eab7..7820815c38 100644
--- a/drivers/event/sw/iq_chunk.h
+++ b/drivers/event/sw/iq_chunk.h
@@ -9,8 +9,6 @@
#include <stdbool.h>
#include <rte_eventdev.h>
-#define IQ_ROB_NAMESIZE 12
-
struct sw_queue_chunk {
struct rte_event events[SW_EVS_PER_Q_CHUNK];
struct sw_queue_chunk *next;
diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c
index 2a2763ee9b..09200c9188 100644
--- a/drivers/event/sw/sw_evdev.c
+++ b/drivers/event/sw/sw_evdev.c
@@ -228,9 +228,7 @@ qid_init(struct sw_evdev *sw, unsigned int idx, int type,
const struct rte_event_queue_conf *queue_conf)
{
unsigned int i;
- int dev_id = sw->data->dev_id;
int socket_id = sw->data->socket_id;
- char buf[IQ_ROB_NAMESIZE];
struct sw_qid *qid = &sw->qids[idx];
/* Initialize the FID structures to no pinning (-1), and zero packets */
@@ -260,8 +258,7 @@ qid_init(struct sw_evdev *sw, unsigned int idx, int type,
goto cleanup;
}
- snprintf(buf, sizeof(buf), "sw%d_iq_%d_rob", dev_id, i);
- qid->reorder_buffer = rte_zmalloc_socket(buf,
+ qid->reorder_buffer = rte_zmalloc_socket(NULL,
window_size * sizeof(qid->reorder_buffer[0]),
0, socket_id);
if (!qid->reorder_buffer) {
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:16.373261981 +0100
+++ 0048-event-sw-fix-warning-from-useless-snprintf.patch 2024-06-25 00:22:13.177185486 +0100
@@ -1 +1 @@
-From 510e2b655b46d91d3cc189882e6392afdc0363ff Mon Sep 17 00:00:00 2001
+From ae651a5adb9e83ccef322c2a1f125585ab4dde74 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 510e2b655b46d91d3cc189882e6392afdc0363ff ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 7a7a8782e6..e638142dbc 100644
+index 31d013eab7..7820815c38 100644
@@ -37 +38 @@
- struct __rte_cache_aligned sw_queue_chunk {
+ struct sw_queue_chunk {
@@ -41 +42 @@
-index 1c01b069fe..19a52afc7d 100644
+index 2a2763ee9b..09200c9188 100644
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'eventdev/crypto: fix opaque field handling' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (46 preceding siblings ...)
2024-06-24 23:58 ` patch 'event/sw: fix warning from useless snprintf' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'eal: fix logs for '--lcores'' " luca.boccassi
` (31 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Ganapati Kundapura; +Cc: Abhinandan Gujjar, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/55754590621b079ecf0d2f458309c42be4c0907a
Thanks.
Luca Boccassi
---
From 55754590621b079ecf0d2f458309c42be4c0907a Mon Sep 17 00:00:00 2001
From: Ganapati Kundapura <ganapati.kundapura@intel.com>
Date: Thu, 6 Jun 2024 08:48:00 -0500
Subject: [PATCH] eventdev/crypto: fix opaque field handling
[ upstream commit ad12d08f05db8323ac1fb655b75dcef69e536a04 ]
For session-less crypto operations, event info is contained in
crypto op metadata for each event which is restored in event
from the crypto op metadata response info.
For session based crypto operations, crypto op contains per session
based event info in crypto op metadata. If any PMD passes any
implementation specific data in "struct rte_event::impl_opaque"
on each event, it's not getting restored.
This patch stores "struct rte_event::impl_opaque" in mbuf dynamic
field before enqueueing to cryptodev and restores
"struct rte_event::impl_opaque" from mbuf dynamic field after
dequeueing crypto op from cryptodev for session based crypto operations.
Fixes: 7901eac3409a ("eventdev: add crypto adapter implementation")
Signed-off-by: Ganapati Kundapura <ganapati.kundapura@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
---
lib/eventdev/rte_event_crypto_adapter.c | 68 +++++++++++++++++++++++++
1 file changed, 68 insertions(+)
diff --git a/lib/eventdev/rte_event_crypto_adapter.c b/lib/eventdev/rte_event_crypto_adapter.c
index a25316a43a..258be0f339 100644
--- a/lib/eventdev/rte_event_crypto_adapter.c
+++ b/lib/eventdev/rte_event_crypto_adapter.c
@@ -131,6 +131,28 @@ static struct event_crypto_adapter **event_crypto_adapter;
} \
} while (0)
+#define ECA_DYNFIELD_NAME "eca_ev_opaque_data"
+/* Device-specific metadata field type */
+typedef uint8_t eca_dynfield_t;
+
+/* mbuf dynamic field offset for device-specific metadata */
+int eca_dynfield_offset = -1;
+
+static int
+eca_dynfield_register(void)
+{
+ static const struct rte_mbuf_dynfield eca_dynfield_desc = {
+ .name = ECA_DYNFIELD_NAME,
+ .size = sizeof(eca_dynfield_t),
+ .align = __alignof__(eca_dynfield_t),
+ .flags = 0,
+ };
+
+ eca_dynfield_offset =
+ rte_mbuf_dynfield_register(&eca_dynfield_desc);
+ return eca_dynfield_offset;
+}
+
static inline int
eca_valid_id(uint8_t id)
{
@@ -492,6 +514,25 @@ eca_enq_to_cryptodev(struct event_crypto_adapter *adapter, struct rte_event *ev,
crypto_op = ev[i].event_ptr;
if (crypto_op == NULL)
continue;
+
+ /** "struct rte_event::impl_opaque" field passed on from
+ * eventdev PMD could have different value per event.
+ * For session-based crypto operations retain
+ * "struct rte_event::impl_opaque" into mbuf dynamic field and
+ * restore it back after copying event information from
+ * session event metadata.
+ * For session-less, each crypto operation carries event
+ * metadata and retains "struct rte_event:impl_opaque"
+ * information to be passed back to eventdev PMD.
+ */
+ if (crypto_op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
+ struct rte_mbuf *mbuf = crypto_op->sym->m_src;
+
+ *RTE_MBUF_DYNFIELD(mbuf,
+ eca_dynfield_offset,
+ eca_dynfield_t *) = ev[i].impl_opaque;
+ }
+
m_data = rte_cryptodev_session_event_mdata_get(crypto_op);
if (m_data == NULL) {
rte_pktmbuf_free(crypto_op->sym->m_src);
@@ -658,6 +699,21 @@ eca_ops_enqueue_burst(struct event_crypto_adapter *adapter,
rte_memcpy(ev, &m_data->response_info, sizeof(*ev));
ev->event_ptr = ops[i];
+
+ /** Restore "struct rte_event::impl_opaque" from mbuf
+ * dynamic field for session based crypto operation.
+ * For session-less, each crypto operations carries event
+ * metadata and retains "struct rte_event::impl_opaque"
+ * information to be passed back to eventdev PMD.
+ */
+ if (ops[i]->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
+ struct rte_mbuf *mbuf = ops[i]->sym->m_src;
+
+ ev->impl_opaque = *RTE_MBUF_DYNFIELD(mbuf,
+ eca_dynfield_offset,
+ eca_dynfield_t *);
+ }
+
ev->event_type = RTE_EVENT_TYPE_CRYPTODEV;
if (adapter->implicit_release_disabled)
ev->op = RTE_EVENT_OP_FORWARD;
@@ -882,6 +938,18 @@ eca_init_service(struct event_crypto_adapter *adapter, uint8_t id)
adapter->max_nb = adapter_conf.max_nb;
adapter->event_port_id = adapter_conf.event_port_id;
+
+ /** Register for mbuf dyn field to store/restore
+ * "struct rte_event::impl_opaque"
+ */
+ eca_dynfield_offset = eca_dynfield_register();
+ if (eca_dynfield_offset < 0) {
+ RTE_EDEV_LOG_ERR("Failed to register eca mbuf dyn field");
+ eca_circular_buffer_free(&adapter->ebuf);
+ rte_free(adapter);
+ return -EINVAL;
+ }
+
adapter->service_inited = 1;
return ret;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:16.416677107 +0100
+++ 0049-eventdev-crypto-fix-opaque-field-handling.patch 2024-06-25 00:22:13.181185567 +0100
@@ -1 +1 @@
-From ad12d08f05db8323ac1fb655b75dcef69e536a04 Mon Sep 17 00:00:00 2001
+From 55754590621b079ecf0d2f458309c42be4c0907a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ad12d08f05db8323ac1fb655b75dcef69e536a04 ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index db1c7f3906..939ca1cad9 100644
+index a25316a43a..258be0f339 100644
@@ -33 +34 @@
-@@ -138,6 +138,28 @@ static struct event_crypto_adapter **event_crypto_adapter;
+@@ -131,6 +131,28 @@ static struct event_crypto_adapter **event_crypto_adapter;
@@ -50 +51 @@
-+ .align = alignof(eca_dynfield_t),
++ .align = __alignof__(eca_dynfield_t),
@@ -62 +63 @@
-@@ -491,6 +513,25 @@ eca_enq_to_cryptodev(struct event_crypto_adapter *adapter, struct rte_event *ev,
+@@ -492,6 +514,25 @@ eca_enq_to_cryptodev(struct event_crypto_adapter *adapter, struct rte_event *ev,
@@ -88 +89 @@
-@@ -657,6 +698,21 @@ eca_ops_enqueue_burst(struct event_crypto_adapter *adapter,
+@@ -658,6 +699,21 @@ eca_ops_enqueue_burst(struct event_crypto_adapter *adapter,
@@ -110,2 +111 @@
-@@ -895,6 +951,18 @@ eca_init_service(struct event_crypto_adapter *adapter, uint8_t id)
- }
+@@ -882,6 +938,18 @@ eca_init_service(struct event_crypto_adapter *adapter, uint8_t id)
@@ -113 +113,2 @@
- adapter->implicit_release_disabled = (uint8_t)impl_rel;
+ adapter->max_nb = adapter_conf.max_nb;
+ adapter->event_port_id = adapter_conf.event_port_id;
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'eal: fix logs for '--lcores'' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (47 preceding siblings ...)
2024-06-24 23:58 ` patch 'eventdev/crypto: fix opaque field handling' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'net/fm10k: fix cleanup during init failure' " luca.boccassi
` (30 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Kevin Traynor; +Cc: David Marchand, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/4c07a5e8c1fecea606b82944dd743943ac589e94
Thanks.
Luca Boccassi
---
From 4c07a5e8c1fecea606b82944dd743943ac589e94 Mon Sep 17 00:00:00 2001
From: Kevin Traynor <ktraynor@redhat.com>
Date: Thu, 13 Jun 2024 17:14:29 +0100
Subject: [PATCH] eal: fix logs for '--lcores'
[ upstream commit 0f241cc22e30de0dfd7487dcfd6acde220b5e168 ]
The argument is '--lcores' but it is being logged as '--lcore'
in several places.
e.g.
$ dpdk-testpmd -l 8,10,12 --lcores 8,10,12
EAL: Option --lcore is ignored, because (-l) is set!
Fix the spelling in logs and tests.
Fixes: 117eaa70584b ("eal: add error check for core options")
Fixes: 128ee4c26d87 ("app/test: add unit tests for --lcores option")
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
app/test/test_eal_flags.c | 2 +-
lib/eal/common/eal_common_options.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c
index d2b91e2075..f4740ee6e5 100644
--- a/app/test/test_eal_flags.c
+++ b/app/test/test_eal_flags.c
@@ -671,7 +671,7 @@ test_missing_c_flag(void)
launch_proc(argv26) == 0 || launch_proc(argv27) == 0 ||
launch_proc(argv28) == 0 || launch_proc(argv30) == 0) {
printf("Error - "
- "process ran without error with invalid --lcore flag\n");
+ "process ran without error with invalid --lcores flag\n");
return -1;
}
diff --git a/lib/eal/common/eal_common_options.c b/lib/eal/common/eal_common_options.c
index 18a50f7452..5312d03552 100644
--- a/lib/eal/common/eal_common_options.c
+++ b/lib/eal/common/eal_common_options.c
@@ -1686,7 +1686,7 @@ eal_parse_common_option(int opt, const char *optarg,
if (core_parsed) {
RTE_LOG(ERR, EAL, "Option -c is ignored, because (%s) is set!\n",
(core_parsed == LCORE_OPT_LST) ? "-l" :
- (core_parsed == LCORE_OPT_MAP) ? "--lcore" :
+ (core_parsed == LCORE_OPT_MAP) ? "--lcores" :
"-c");
return -1;
}
@@ -1719,7 +1719,7 @@ eal_parse_common_option(int opt, const char *optarg,
if (core_parsed) {
RTE_LOG(ERR, EAL, "Option -l is ignored, because (%s) is set!\n",
(core_parsed == LCORE_OPT_MSK) ? "-c" :
- (core_parsed == LCORE_OPT_MAP) ? "--lcore" :
+ (core_parsed == LCORE_OPT_MAP) ? "--lcores" :
"-l");
return -1;
}
@@ -1900,10 +1900,10 @@ eal_parse_common_option(int opt, const char *optarg,
}
if (core_parsed) {
- RTE_LOG(ERR, EAL, "Option --lcore is ignored, because (%s) is set!\n",
+ RTE_LOG(ERR, EAL, "Option --lcores is ignored, because (%s) is set!\n",
(core_parsed == LCORE_OPT_LST) ? "-l" :
(core_parsed == LCORE_OPT_MSK) ? "-c" :
- "--lcore");
+ "--lcores");
return -1;
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:16.458431083 +0100
+++ 0050-eal-fix-logs-for-lcores.patch 2024-06-25 00:22:13.181185567 +0100
@@ -1 +1 @@
-From 0f241cc22e30de0dfd7487dcfd6acde220b5e168 Mon Sep 17 00:00:00 2001
+From 4c07a5e8c1fecea606b82944dd743943ac589e94 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0f241cc22e30de0dfd7487dcfd6acde220b5e168 ]
+
@@ -26 +28 @@
-index 6cb4b06757..71d8dba731 100644
+index d2b91e2075..f4740ee6e5 100644
@@ -39 +41 @@
-index e541f07939..f1a5e329a5 100644
+index 18a50f7452..5312d03552 100644
@@ -42 +44 @@
-@@ -1687,7 +1687,7 @@ eal_parse_common_option(int opt, const char *optarg,
+@@ -1686,7 +1686,7 @@ eal_parse_common_option(int opt, const char *optarg,
@@ -44 +46 @@
- EAL_LOG(ERR, "Option -c is ignored, because (%s) is set!",
+ RTE_LOG(ERR, EAL, "Option -c is ignored, because (%s) is set!\n",
@@ -51 +53 @@
-@@ -1720,7 +1720,7 @@ eal_parse_common_option(int opt, const char *optarg,
+@@ -1719,7 +1719,7 @@ eal_parse_common_option(int opt, const char *optarg,
@@ -53 +55 @@
- EAL_LOG(ERR, "Option -l is ignored, because (%s) is set!",
+ RTE_LOG(ERR, EAL, "Option -l is ignored, because (%s) is set!\n",
@@ -60 +62 @@
-@@ -1901,10 +1901,10 @@ eal_parse_common_option(int opt, const char *optarg,
+@@ -1900,10 +1900,10 @@ eal_parse_common_option(int opt, const char *optarg,
@@ -64,2 +66,2 @@
-- EAL_LOG(ERR, "Option --lcore is ignored, because (%s) is set!",
-+ EAL_LOG(ERR, "Option --lcores is ignored, because (%s) is set!",
+- RTE_LOG(ERR, EAL, "Option --lcore is ignored, because (%s) is set!\n",
++ RTE_LOG(ERR, EAL, "Option --lcores is ignored, because (%s) is set!\n",
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/fm10k: fix cleanup during init failure' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (48 preceding siblings ...)
2024-06-24 23:58 ` patch 'eal: fix logs for '--lcores'' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'net/ixgbe: do not update link status in secondary process' " luca.boccassi
` (29 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Julien Meunier; +Cc: Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f461c249ff19a1744dea7c2ab117fa6872e1d606
Thanks.
Luca Boccassi
---
From f461c249ff19a1744dea7c2ab117fa6872e1d606 Mon Sep 17 00:00:00 2001
From: Julien Meunier <julien.meunier@nokia.com>
Date: Wed, 3 Apr 2024 13:55:41 +0200
Subject: [PATCH] net/fm10k: fix cleanup during init failure
[ upstream commit cd7f5da2e7d647863a3d6552b6787f413bbd05f2 ]
Cleanup was not done on this PMD if a error is seen during the init:
- possible memory leak due to a missing free
- interrupt handler was not disabled: if an IRQ is received after the
init, a SIGSEGV can be seen (private data stored in
rte_eth_devices[port_id] is pointing to NULL)
Fixes: a6061d9e7075 ("fm10k: register PF driver")
Fixes: 4c287332c39a ("fm10k: add PF and VF interrupt handling")
Signed-off-by: Julien Meunier <julien.meunier@nokia.com>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/fm10k/fm10k_ethdev.c | 39 +++++++++++++++++++++++++++-----
1 file changed, 33 insertions(+), 6 deletions(-)
diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index 8b83063f0a..a4e06a0cfa 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -3055,7 +3055,7 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
struct fm10k_hw *hw = FM10K_DEV_PRIVATE_TO_HW(dev->data->dev_private);
struct rte_pci_device *pdev = RTE_ETH_DEV_TO_PCI(dev);
struct rte_intr_handle *intr_handle = pdev->intr_handle;
- int diag, i;
+ int diag, i, ret;
struct fm10k_macvlan_filter_info *macvlan;
PMD_INIT_FUNC_TRACE();
@@ -3144,21 +3144,24 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
diag = fm10k_stats_reset(dev);
if (diag != 0) {
PMD_INIT_LOG(ERR, "Stats reset failed: %d", diag);
- return diag;
+ ret = diag;
+ goto err_stat;
}
/* Reset the hw */
diag = fm10k_reset_hw(hw);
if (diag != FM10K_SUCCESS) {
PMD_INIT_LOG(ERR, "Hardware reset failed: %d", diag);
- return -EIO;
+ ret = -EIO;
+ goto err_reset_hw;
}
/* Setup mailbox service */
diag = fm10k_setup_mbx_service(hw);
if (diag != FM10K_SUCCESS) {
PMD_INIT_LOG(ERR, "Failed to setup mailbox: %d", diag);
- return -EIO;
+ ret = -EIO;
+ goto err_mbx;
}
/*PF/VF has different interrupt handling mechanism */
@@ -3197,7 +3200,8 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
if (switch_ready == false) {
PMD_INIT_LOG(ERR, "switch is not ready");
- return -1;
+ ret = -1;
+ goto err_switch_ready;
}
}
@@ -3232,7 +3236,8 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
if (!hw->mac.default_vid) {
PMD_INIT_LOG(ERR, "default VID is not ready");
- return -1;
+ ret = -1;
+ goto err_vid;
}
}
@@ -3241,6 +3246,28 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
MAIN_VSI_POOL_NUMBER);
return 0;
+
+err_vid:
+err_switch_ready:
+ rte_intr_disable(intr_handle);
+
+ if (hw->mac.type == fm10k_mac_pf) {
+ fm10k_dev_disable_intr_pf(dev);
+ rte_intr_callback_unregister(intr_handle,
+ fm10k_dev_interrupt_handler_pf, (void *)dev);
+ } else {
+ fm10k_dev_disable_intr_vf(dev);
+ rte_intr_callback_unregister(intr_handle,
+ fm10k_dev_interrupt_handler_vf, (void *)dev);
+ }
+
+err_mbx:
+err_reset_hw:
+err_stat:
+ rte_free(dev->data->mac_addrs);
+ dev->data->mac_addrs = NULL;
+
+ return ret;
}
static int
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:16.503503953 +0100
+++ 0051-net-fm10k-fix-cleanup-during-init-failure.patch 2024-06-25 00:22:13.185185649 +0100
@@ -1 +1 @@
-From cd7f5da2e7d647863a3d6552b6787f413bbd05f2 Mon Sep 17 00:00:00 2001
+From f461c249ff19a1744dea7c2ab117fa6872e1d606 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cd7f5da2e7d647863a3d6552b6787f413bbd05f2 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index fa0d16277e..7b490bea17 100644
+index 8b83063f0a..a4e06a0cfa 100644
@@ -26 +27 @@
-@@ -3058,7 +3058,7 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
+@@ -3055,7 +3055,7 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
@@ -35 +36 @@
-@@ -3147,21 +3147,24 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
+@@ -3144,21 +3144,24 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
@@ -63 +64 @@
-@@ -3200,7 +3203,8 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
+@@ -3197,7 +3200,8 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
@@ -73 +74 @@
-@@ -3235,7 +3239,8 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
+@@ -3232,7 +3236,8 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
@@ -83 +84 @@
-@@ -3244,6 +3249,28 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
+@@ -3241,6 +3246,28 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ixgbe: do not update link status in secondary process' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (49 preceding siblings ...)
2024-06-24 23:58 ` patch 'net/fm10k: fix cleanup during init failure' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'net/ixgbe: do not create delayed interrupt handler twice' " luca.boccassi
` (28 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Jun Wang, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/23efe3ba7a60f0af5d654d49474a5dfc6f6dff0f
Thanks.
Luca Boccassi
---
From 23efe3ba7a60f0af5d654d49474a5dfc6f6dff0f Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 20 Mar 2024 10:33:04 -0700
Subject: [PATCH] net/ixgbe: do not update link status in secondary process
[ upstream commit 5ffd40b85febd2a80b88b4cfbf4e1dd7e5f059c5 ]
The code to update link status is not safe in secondary process.
If called from secondary it will crash, example from dumpcap:
ixgbe_dev_link_update_share()
ixgbe_dev_link_update()
rte_eth_link_get()
Fixes: af75078fece3 ("first public release")
Reported-by: Jun Wang <junwang01@cestc.cn>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/ixgbe/ixgbe_ethdev.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 9c0e0efb66..311a6828a0 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -4283,6 +4283,9 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
int wait = 1;
u32 esdp_reg;
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return -1;
+
memset(&link, 0, sizeof(link));
link.link_status = RTE_ETH_LINK_DOWN;
link.link_speed = RTE_ETH_SPEED_NUM_NONE;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:16.549761459 +0100
+++ 0052-net-ixgbe-do-not-update-link-status-in-secondary-pro.patch 2024-06-25 00:22:13.193185812 +0100
@@ -1 +1 @@
-From 5ffd40b85febd2a80b88b4cfbf4e1dd7e5f059c5 Mon Sep 17 00:00:00 2001
+From 23efe3ba7a60f0af5d654d49474a5dfc6f6dff0f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5ffd40b85febd2a80b88b4cfbf4e1dd7e5f059c5 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index bbdc996f31..a6916da0c5 100644
+index 9c0e0efb66..311a6828a0 100644
@@ -26 +27 @@
-@@ -4293,6 +4293,9 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
+@@ -4283,6 +4283,9 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ixgbe: do not create delayed interrupt handler twice' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (50 preceding siblings ...)
2024-06-24 23:58 ` patch 'net/ixgbe: do not update link status in secondary process' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'net/e1000/base: fix link power down' " luca.boccassi
` (27 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Edwin Brossette; +Cc: Anatoly Burakov, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b2e98edd71e3695d23c9f83840246099fb23f28d
Thanks.
Luca Boccassi
---
From b2e98edd71e3695d23c9f83840246099fb23f28d Mon Sep 17 00:00:00 2001
From: Edwin Brossette <edwin.brossette@6wind.com>
Date: Thu, 18 Apr 2024 15:53:07 +0200
Subject: [PATCH] net/ixgbe: do not create delayed interrupt handler twice
[ upstream commit 130ece79670d57760acd18c9671f91a4cd4e07a0 ]
Since link state may need some time to stabilize after a link state
change, we cannot update the link state right after one occurs. So link
state change interrupts (LSC) are handled after a delay. To do this, an
alarm to call a delayed handler is programmed. This delayed handler is
tasked with updating the link after a variable delay of one to four
seconds which should be enough time for the link state to become stable
again.
However, a problem can occur with some models of network cards. For
example, ixgbe_mac_X550EM_x may trigger this interrupt twice because
another interrupt signal is received on the General Purpose Interrupt
pin SPD0, which has the same interrupt handler. In such a case, the
delayed interrupt handler would be programmed to be executed twice.
Since we save the original interrupt mask value to restore it after the
delayed handler is done with its work, we end up overwriting its value
after the second alarm is programmed. Even worse: when restoring it the
first time, the saved original mask variable is reset to 0, so we end up
completely disabling all interrupts when trying to restore this mask
after the second time the delayed handler is executed.
Add a check on the interrupt mask value when programming the alarm for
the delayed handler. If the bit for LSC interrupts is unset, it means an
alarm was already programmed for the delayed handler. In this case, skip
the alarm creation.
Fixes: 9b667210700e ("net/ixgbe: fix blocked interrupts")
Signed-off-by: Edwin Brossette <edwin.brossette@6wind.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
drivers/net/ixgbe/ixgbe_ethdev.c | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 311a6828a0..9e1a65a50a 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -4660,14 +4660,20 @@ ixgbe_dev_interrupt_action(struct rte_eth_dev *dev)
timeout = IXGBE_LINK_DOWN_CHECK_TIMEOUT;
ixgbe_dev_link_status_print(dev);
- if (rte_eal_alarm_set(timeout * 1000,
- ixgbe_dev_interrupt_delayed_handler, (void *)dev) < 0)
- PMD_DRV_LOG(ERR, "Error setting alarm");
- else {
- /* remember original mask */
- intr->mask_original = intr->mask;
- /* only disable lsc interrupt */
- intr->mask &= ~IXGBE_EIMS_LSC;
+
+ /* Don't program delayed handler if LSC interrupt is disabled.
+ * It means one is already programmed.
+ */
+ if (intr->mask & IXGBE_EIMS_LSC) {
+ if (rte_eal_alarm_set(timeout * 1000,
+ ixgbe_dev_interrupt_delayed_handler, (void *)dev) < 0)
+ PMD_DRV_LOG(ERR, "Error setting alarm");
+ else {
+ /* remember original mask */
+ intr->mask_original = intr->mask;
+ /* only disable lsc interrupt */
+ intr->mask &= ~IXGBE_EIMS_LSC;
+ }
}
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:16.589954884 +0100
+++ 0053-net-ixgbe-do-not-create-delayed-interrupt-handler-tw.patch 2024-06-25 00:22:13.197185893 +0100
@@ -1 +1 @@
-From 130ece79670d57760acd18c9671f91a4cd4e07a0 Mon Sep 17 00:00:00 2001
+From b2e98edd71e3695d23c9f83840246099fb23f28d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 130ece79670d57760acd18c9671f91a4cd4e07a0 ]
+
@@ -33 +34,0 @@
-Cc: stable@dpdk.org
@@ -42 +43 @@
-index a6916da0c5..1f93be98ca 100644
+index 311a6828a0..9e1a65a50a 100644
@@ -45 +46 @@
-@@ -4672,14 +4672,20 @@ ixgbe_dev_interrupt_action(struct rte_eth_dev *dev)
+@@ -4660,14 +4660,20 @@ ixgbe_dev_interrupt_action(struct rte_eth_dev *dev)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/e1000/base: fix link power down' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (51 preceding siblings ...)
2024-06-24 23:58 ` patch 'net/ixgbe: do not create delayed interrupt handler twice' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'net/ixgbe/base: revert advertising for X550 2.5G/5G' " luca.boccassi
` (26 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Anatoly Burakov; +Cc: Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/229bdd77bb5a0b0740caca211792eaaa577bebd4
Thanks.
Luca Boccassi
---
From 229bdd77bb5a0b0740caca211792eaaa577bebd4 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Tue, 14 May 2024 16:17:16 +0100
Subject: [PATCH] net/e1000/base: fix link power down
[ upstream commit a8218d09e3aaae5307325ff4b2f92ed4a3c37a8c ]
Current code is a result of work to reduce duplication between various
device models. However, the logic that was replaced did not exactly
match the new logic, and as a result the link power down was not
working correctly for some NICs, and the link remained up even when
the interface is down.
Fix it to correctly power down the link under all circumstances that
were supported by old logic.
Fixes: 44dddd14059f ("net/e1000/base: remove duplicated codes")
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/e1000/base/e1000_base.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/e1000/base/e1000_base.c b/drivers/net/e1000/base/e1000_base.c
index ab73e1e59e..3ec32e7240 100644
--- a/drivers/net/e1000/base/e1000_base.c
+++ b/drivers/net/e1000/base/e1000_base.c
@@ -107,7 +107,7 @@ void e1000_power_down_phy_copper_base(struct e1000_hw *hw)
return;
/* If the management interface is not enabled, then power down */
- if (phy->ops.check_reset_block(hw))
+ if (!(e1000_enable_mng_pass_thru(hw) || phy->ops.check_reset_block(hw)))
e1000_power_down_phy_copper(hw);
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:16.628461719 +0100
+++ 0054-net-e1000-base-fix-link-power-down.patch 2024-06-25 00:22:13.197185893 +0100
@@ -1 +1 @@
-From a8218d09e3aaae5307325ff4b2f92ed4a3c37a8c Mon Sep 17 00:00:00 2001
+From 229bdd77bb5a0b0740caca211792eaaa577bebd4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a8218d09e3aaae5307325ff4b2f92ed4a3c37a8c ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ixgbe/base: revert advertising for X550 2.5G/5G' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (52 preceding siblings ...)
2024-06-24 23:58 ` patch 'net/e1000/base: fix link power down' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'net/ixgbe/base: fix 5G link speed reported on VF' " luca.boccassi
` (25 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Piotr Pietruszewski
Cc: Piotr Skajewski, Marek Mical, Jeff Kirsher, Alice Michael, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/5e73514050ef0367456e035b851ef83edf86676b
Thanks.
Luca Boccassi
---
From 5e73514050ef0367456e035b851ef83edf86676b Mon Sep 17 00:00:00 2001
From: Piotr Pietruszewski <piotr.pietruszewski@intel.com>
Date: Thu, 30 May 2024 12:13:34 +0100
Subject: [PATCH] net/ixgbe/base: revert advertising for X550 2.5G/5G
[ upstream commit 9ac063a739b00188281ba4ef5c6a0e43cc59a3b8 ]
The commit removing advertising 2.5G and 5G speeds from
ixgbe_get_copper_speeds_supported() was supposed to disable 2.5G and 5G
during the autonegotiation with default settings. However, that change
prevented OS-specific part of the driver from forcing these speeds at
user request.
This change reverts the commit and adds 2.5G and 5G as speeds supported
by the X550.
Fixes: 13de2444449e ("net/ixgbe/base: remove default advertising for x550 2.5G/5G")
Signed-off-by: Piotr Pietruszewski <piotr.pietruszewski@intel.com>
Reviewed-by: Piotr Skajewski <piotrx.skajewski@intel.com>
Reviewed-by: Marek Mical <marekx.mical@intel.com>
Reviewed-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Reviewed-by: Alice Michael <alice.michael@intel.com>
---
.mailmap | 1 +
drivers/net/ixgbe/base/ixgbe_phy.c | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/.mailmap b/.mailmap
index 2724a689fd..4cdd9f04d9 100644
--- a/.mailmap
+++ b/.mailmap
@@ -845,6 +845,7 @@ Marcin Wojtas <mw@semihalf.com>
Marcin Zapolski <marcinx.a.zapolski@intel.com>
Marco Varlese <mvarlese@suse.de>
Marc Sune <marcdevel@gmail.com> <marc.sune@bisdn.de>
+Marek Mical <marekx.mical@intel.com>
Maria Lingemark <maria.lingemark@ericsson.com>
Mario Carrillo <mario.alfredo.c.arevalo@intel.com>
Mário Kuka <kuka@cesnet.cz>
diff --git a/drivers/net/ixgbe/base/ixgbe_phy.c b/drivers/net/ixgbe/base/ixgbe_phy.c
index 74c5db16fa..3a8e603472 100644
--- a/drivers/net/ixgbe/base/ixgbe_phy.c
+++ b/drivers/net/ixgbe/base/ixgbe_phy.c
@@ -915,6 +915,10 @@ static s32 ixgbe_get_copper_speeds_supported(struct ixgbe_hw *hw)
hw->phy.speeds_supported |= IXGBE_LINK_SPEED_100_FULL;
switch (hw->mac.type) {
+ case ixgbe_mac_X550:
+ hw->phy.speeds_supported |= IXGBE_LINK_SPEED_2_5GB_FULL;
+ hw->phy.speeds_supported |= IXGBE_LINK_SPEED_5GB_FULL;
+ break;
case ixgbe_mac_X550EM_x:
case ixgbe_mac_X550EM_a:
hw->phy.speeds_supported &= ~IXGBE_LINK_SPEED_100_FULL;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:16.661860969 +0100
+++ 0055-net-ixgbe-base-revert-advertising-for-X550-2.5G-5G.patch 2024-06-25 00:22:13.201185974 +0100
@@ -1 +1 @@
-From 9ac063a739b00188281ba4ef5c6a0e43cc59a3b8 Mon Sep 17 00:00:00 2001
+From 5e73514050ef0367456e035b851ef83edf86676b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9ac063a739b00188281ba4ef5c6a0e43cc59a3b8 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index 075ea40f17..508d4eba24 100644
+index 2724a689fd..4cdd9f04d9 100644
@@ -32 +33 @@
-@@ -892,6 +892,7 @@ Marcin Wojtas <mw@semihalf.com>
+@@ -845,6 +845,7 @@ Marcin Wojtas <mw@semihalf.com>
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ixgbe/base: fix 5G link speed reported on VF' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (53 preceding siblings ...)
2024-06-24 23:58 ` patch 'net/ixgbe/base: revert advertising for X550 2.5G/5G' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'net/ixgbe/base: fix PHY ID for X550' " luca.boccassi
` (24 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Piotr Skajewski
Cc: Radoslaw Tyl, Slawomir Mrozowicz, Alice Michael, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/7b94a8b53e76bc9cdc14b5d423e3643318090e6a
Thanks.
Luca Boccassi
---
From 7b94a8b53e76bc9cdc14b5d423e3643318090e6a Mon Sep 17 00:00:00 2001
From: Piotr Skajewski <piotrx.skajewski@intel.com>
Date: Thu, 30 May 2024 12:13:35 +0100
Subject: [PATCH] net/ixgbe/base: fix 5G link speed reported on VF
[ upstream commit 9eb7fdbd47cf02068715a6e8bef767b0deea6f94 ]
When 5000 Base-T was set on PF the VF reported 100 Base-T. This patch
changes ixgbe_check_mac_link_vf function where there was an incorrect
conditional which checks using PF mac types, now it is correctly
using VF mac types.
Fixes: 12e20906905c ("net/ixgbe/base: include new speeds in VFLINK interpretation")
Signed-off-by: Piotr Skajewski <piotrx.skajewski@intel.com>
Reviewed-by: Radoslaw Tyl <radoslawx.tyl@intel.com>
Reviewed-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Reviewed-by: Alice Michael <alice.michael@intel.com>
---
.mailmap | 1 +
drivers/net/ixgbe/base/ixgbe_vf.c | 6 +++---
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/.mailmap b/.mailmap
index 4cdd9f04d9..e8953af6f0 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1112,6 +1112,7 @@ Quentin Armitage <quentin@armitage.org.uk>
Qun Wan <qun.wan@intel.com>
Radha Mohan Chintakuntla <radhac@marvell.com>
Radoslaw Biernacki <rad@semihalf.com> <radoslaw.biernacki@linaro.org>
+Radoslaw Tyl <radoslawx.tyl@intel.com>
Radu Bulie <radu-andrei.bulie@nxp.com>
Radu Nicolau <radu.nicolau@intel.com>
Rafael Ávila de Espíndola <espindola@scylladb.com>
diff --git a/drivers/net/ixgbe/base/ixgbe_vf.c b/drivers/net/ixgbe/base/ixgbe_vf.c
index 5e3ae1b519..11dbbe2a86 100644
--- a/drivers/net/ixgbe/base/ixgbe_vf.c
+++ b/drivers/net/ixgbe/base/ixgbe_vf.c
@@ -585,7 +585,7 @@ s32 ixgbe_check_mac_link_vf(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
switch (links_reg & IXGBE_LINKS_SPEED_82599) {
case IXGBE_LINKS_SPEED_10G_82599:
*speed = IXGBE_LINK_SPEED_10GB_FULL;
- if (hw->mac.type >= ixgbe_mac_X550) {
+ if (hw->mac.type >= ixgbe_mac_X550_vf) {
if (links_reg & IXGBE_LINKS_SPEED_NON_STD)
*speed = IXGBE_LINK_SPEED_2_5GB_FULL;
}
@@ -595,7 +595,7 @@ s32 ixgbe_check_mac_link_vf(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
break;
case IXGBE_LINKS_SPEED_100_82599:
*speed = IXGBE_LINK_SPEED_100_FULL;
- if (hw->mac.type == ixgbe_mac_X550) {
+ if (hw->mac.type == ixgbe_mac_X550_vf) {
if (links_reg & IXGBE_LINKS_SPEED_NON_STD)
*speed = IXGBE_LINK_SPEED_5GB_FULL;
}
@@ -603,7 +603,7 @@ s32 ixgbe_check_mac_link_vf(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
case IXGBE_LINKS_SPEED_10_X550EM_A:
*speed = IXGBE_LINK_SPEED_UNKNOWN;
/* Since Reserved in older MAC's */
- if (hw->mac.type >= ixgbe_mac_X550)
+ if (hw->mac.type >= ixgbe_mac_X550_vf)
*speed = IXGBE_LINK_SPEED_10_FULL;
break;
default:
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:16.698596890 +0100
+++ 0056-net-ixgbe-base-fix-5G-link-speed-reported-on-VF.patch 2024-06-25 00:22:13.205186057 +0100
@@ -1 +1 @@
-From 9eb7fdbd47cf02068715a6e8bef767b0deea6f94 Mon Sep 17 00:00:00 2001
+From 7b94a8b53e76bc9cdc14b5d423e3643318090e6a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9eb7fdbd47cf02068715a6e8bef767b0deea6f94 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 508d4eba24..be16cabd07 100644
+index 4cdd9f04d9..e8953af6f0 100644
@@ -27 +28 @@
-@@ -1173,6 +1173,7 @@ Quentin Armitage <quentin@armitage.org.uk>
+@@ -1112,6 +1112,7 @@ Quentin Armitage <quentin@armitage.org.uk>
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ixgbe/base: fix PHY ID for X550' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (54 preceding siblings ...)
2024-06-24 23:58 ` patch 'net/ixgbe/base: fix 5G link speed reported on VF' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'net/cnxk: fix RSS config' " luca.boccassi
` (23 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Radoslaw Tyl; +Cc: Piotr Skajewski, Alice Michael, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/8873f14545fb51cc67f25d38f0eb7d3c1c5cc24b
Thanks.
Luca Boccassi
---
From 8873f14545fb51cc67f25d38f0eb7d3c1c5cc24b Mon Sep 17 00:00:00 2001
From: Radoslaw Tyl <radoslawx.tyl@intel.com>
Date: Thu, 30 May 2024 12:13:36 +0100
Subject: [PATCH] net/ixgbe/base: fix PHY ID for X550
[ upstream commit a9f5a3bd4c179e54b5ca95b0ce191bf4f33d2add ]
Function ixgbe_get_phy_type_from_id() for X550_PHY_ID2 and
X550_PHY_ID3 always return ixgbe_phy_unknown instead of ixgbe_phy_aq
because phy ID's last 4 bits are always masked, and should not be
taken into account when selecting phy type.
This patch adds default PHY ID for X550 devices with mask on last 4
bits (0xFFFFFFF0), and fixes the switch statement to use it.
Fixes: 58ddc803e412 ("ixgbe/base: add new X550 PHY ids")
Signed-off-by: Radoslaw Tyl <radoslawx.tyl@intel.com>
Reviewed-by: Piotr Skajewski <piotrx.skajewski@intel.com>
Reviewed-by: Alice Michael <alice.michael@intel.com>
---
drivers/net/ixgbe/base/ixgbe_phy.c | 3 +--
drivers/net/ixgbe/base/ixgbe_type.h | 1 +
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ixgbe/base/ixgbe_phy.c b/drivers/net/ixgbe/base/ixgbe_phy.c
index 3a8e603472..56267bb00d 100644
--- a/drivers/net/ixgbe/base/ixgbe_phy.c
+++ b/drivers/net/ixgbe/base/ixgbe_phy.c
@@ -432,8 +432,7 @@ enum ixgbe_phy_type ixgbe_get_phy_type_from_id(u32 phy_id)
case TN1010_PHY_ID:
phy_type = ixgbe_phy_tn;
break;
- case X550_PHY_ID2:
- case X550_PHY_ID3:
+ case X550_PHY_ID:
case X540_PHY_ID:
phy_type = ixgbe_phy_aq;
break;
diff --git a/drivers/net/ixgbe/base/ixgbe_type.h b/drivers/net/ixgbe/base/ixgbe_type.h
index dc765f13c9..5973c60477 100644
--- a/drivers/net/ixgbe/base/ixgbe_type.h
+++ b/drivers/net/ixgbe/base/ixgbe_type.h
@@ -1663,6 +1663,7 @@ struct ixgbe_dmac_config {
#define TN1010_PHY_ID 0x00A19410
#define TNX_FW_REV 0xB
#define X540_PHY_ID 0x01540200
+#define X550_PHY_ID 0x01540220
#define X550_PHY_ID2 0x01540223
#define X550_PHY_ID3 0x01540221
#define X557_PHY_ID 0x01540240
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:16.733656108 +0100
+++ 0057-net-ixgbe-base-fix-PHY-ID-for-X550.patch 2024-06-25 00:22:13.209186138 +0100
@@ -1 +1 @@
-From a9f5a3bd4c179e54b5ca95b0ce191bf4f33d2add Mon Sep 17 00:00:00 2001
+From 8873f14545fb51cc67f25d38f0eb7d3c1c5cc24b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a9f5a3bd4c179e54b5ca95b0ce191bf4f33d2add ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -40 +41 @@
-index 35212a561b..f709681df2 100644
+index dc765f13c9..5973c60477 100644
@@ -43 +44 @@
-@@ -1664,6 +1664,7 @@ struct ixgbe_dmac_config {
+@@ -1663,6 +1663,7 @@ struct ixgbe_dmac_config {
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/cnxk: fix RSS config' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (55 preceding siblings ...)
2024-06-24 23:58 ` patch 'net/ixgbe/base: fix PHY ID for X550' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'net/cnxk: fix outbound security with higher packet burst' " luca.boccassi
` (22 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Sunil Kumar Kori; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/d1c48d821e1b78aeafc0921710bcb28702c3f137
Thanks.
Luca Boccassi
---
From d1c48d821e1b78aeafc0921710bcb28702c3f137 Mon Sep 17 00:00:00 2001
From: Sunil Kumar Kori <skori@marvell.com>
Date: Thu, 23 May 2024 20:23:21 +0530
Subject: [PATCH] net/cnxk: fix RSS config
[ upstream commit d3654d35176dcc6e5ebb7bab00c7fdd6b61fc1f0 ]
Currently user passed RSS configuration is ignored via
rte_eth_dev_configure() API. Instead default RSS setup
is done by driver.
Adding handling for user passed RSS configuration too
via rte_eth_dev_configure().
Fixes: b75e0aca84b0 ("net/cnxk: add device configuration operation")
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
---
drivers/net/cnxk/cnxk_ethdev.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/cnxk/cnxk_ethdev.c b/drivers/net/cnxk/cnxk_ethdev.c
index f9245258cb..56b26a9650 100644
--- a/drivers/net/cnxk/cnxk_ethdev.c
+++ b/drivers/net/cnxk/cnxk_ethdev.c
@@ -1334,6 +1334,13 @@ cnxk_nix_configure(struct rte_eth_dev *eth_dev)
goto free_nix_lf;
}
+ /* Overwrite default RSS setup if requested by user */
+ rc = cnxk_nix_rss_hash_update(eth_dev, &conf->rx_adv_conf.rss_conf);
+ if (rc) {
+ plt_err("Failed to configure rss rc=%d", rc);
+ goto free_nix_lf;
+ }
+
/* Init the default TM scheduler hierarchy */
rc = roc_nix_tm_init(nix);
if (rc) {
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:16.773206636 +0100
+++ 0058-net-cnxk-fix-RSS-config.patch 2024-06-25 00:22:13.209186138 +0100
@@ -1 +1 @@
-From d3654d35176dcc6e5ebb7bab00c7fdd6b61fc1f0 Mon Sep 17 00:00:00 2001
+From d1c48d821e1b78aeafc0921710bcb28702c3f137 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d3654d35176dcc6e5ebb7bab00c7fdd6b61fc1f0 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 6b37bd877f..95a3d8aaf9 100644
+index f9245258cb..56b26a9650 100644
@@ -25 +26 @@
-@@ -1384,6 +1384,13 @@ cnxk_nix_configure(struct rte_eth_dev *eth_dev)
+@@ -1334,6 +1334,13 @@ cnxk_nix_configure(struct rte_eth_dev *eth_dev)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/cnxk: fix outbound security with higher packet burst' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (56 preceding siblings ...)
2024-06-24 23:58 ` patch 'net/cnxk: fix RSS config' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'net/cnxk: fix promiscuous state after MAC change' " luca.boccassi
` (21 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Nithin Dabilpuram; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/d9d6771ebabe8fef3a5263a89ef81e44ff3806ca
Thanks.
Luca Boccassi
---
From d9d6771ebabe8fef3a5263a89ef81e44ff3806ca Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <ndabilpuram@marvell.com>
Date: Tue, 28 May 2024 12:35:19 +0530
Subject: [PATCH] net/cnxk: fix outbound security with higher packet burst
[ upstream commit 062f6f652445a283a186dc6c62c692ba7c91cc3c ]
Fix issue with outbound security path while handling mixed traffic i.e
both plain and inline outbound packets being present as part of burst
and burst size is > 32. The loop needs to be broken when
we don't have space for 4 packets in LMT lines for CPT considering
both the full LMT lines and partial LMT lines used.
Fixes: 55bfac717c72 ("net/cnxk: support Tx security offload on cn10k")
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
drivers/net/cnxk/cn10k_tx.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/cnxk/cn10k_tx.h b/drivers/net/cnxk/cn10k_tx.h
index 254ddf0536..e96030621b 100644
--- a/drivers/net/cnxk/cn10k_tx.h
+++ b/drivers/net/cnxk/cn10k_tx.h
@@ -1843,7 +1843,8 @@ again:
}
for (i = 0; i < burst; i += NIX_DESCS_PER_LOOP) {
- if (flags & NIX_TX_OFFLOAD_SECURITY_F && c_lnum + 2 > 16) {
+ if (flags & NIX_TX_OFFLOAD_SECURITY_F &&
+ (((int)((16 - c_lnum) << 1) - c_loff) < 4)) {
burst = i;
break;
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:16.807683374 +0100
+++ 0059-net-cnxk-fix-outbound-security-with-higher-packet-bu.patch 2024-06-25 00:22:13.213186220 +0100
@@ -1 +1 @@
-From 062f6f652445a283a186dc6c62c692ba7c91cc3c Mon Sep 17 00:00:00 2001
+From d9d6771ebabe8fef3a5263a89ef81e44ff3806ca Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 062f6f652445a283a186dc6c62c692ba7c91cc3c ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 5c4b9e559e..9ce41fe80f 100644
+index 254ddf0536..e96030621b 100644
@@ -24 +25 @@
-@@ -2272,7 +2272,8 @@ again:
+@@ -1843,7 +1843,8 @@ again:
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/cnxk: fix promiscuous state after MAC change' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (57 preceding siblings ...)
2024-06-24 23:58 ` patch 'net/cnxk: fix outbound security with higher packet burst' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'graph: fix ID collisions' " luca.boccassi
` (20 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Rahul Bhansali; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e0da7a253dbd6dac1cba895d81742a50313e44fc
Thanks.
Luca Boccassi
---
From e0da7a253dbd6dac1cba895d81742a50313e44fc Mon Sep 17 00:00:00 2001
From: Rahul Bhansali <rbhansali@marvell.com>
Date: Tue, 28 May 2024 14:02:46 +0530
Subject: [PATCH] net/cnxk: fix promiscuous state after MAC change
[ upstream commit 5f1bce00fddffc63e5634891df2b02859c010944 ]
If promiscuous mode is enabled and default MAC address is set
again then promiscuous mode gets disabled in hardware.
This change will restore promiscuous behavior after configuring
default MAC address.
Fixes: 5fe86db2a0dd ("net/cnxk: support MAC address set")
Signed-off-by: Rahul Bhansali <rbhansali@marvell.com>
---
drivers/net/cnxk/cnxk_ethdev_ops.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/cnxk/cnxk_ethdev_ops.c b/drivers/net/cnxk/cnxk_ethdev_ops.c
index be29b385a4..5fd39149cb 100644
--- a/drivers/net/cnxk/cnxk_ethdev_ops.c
+++ b/drivers/net/cnxk/cnxk_ethdev_ops.c
@@ -413,6 +413,13 @@ cnxk_nix_mac_addr_set(struct rte_eth_dev *eth_dev, struct rte_ether_addr *addr)
roc_nix_npc_mac_addr_set(nix, dev->mac_addr);
goto exit;
}
+
+ if (eth_dev->data->promiscuous) {
+ rc = roc_nix_mac_promisc_mode_enable(nix, true);
+ if (rc)
+ plt_err("Failed to setup promisc mode in mac, rc=%d(%s)", rc,
+ roc_error_msg_get(rc));
+ }
}
/* Update mac address to cnxk ethernet device */
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:16.843038050 +0100
+++ 0060-net-cnxk-fix-promiscuous-state-after-MAC-change.patch 2024-06-25 00:22:13.213186220 +0100
@@ -1 +1 @@
-From 5f1bce00fddffc63e5634891df2b02859c010944 Mon Sep 17 00:00:00 2001
+From e0da7a253dbd6dac1cba895d81742a50313e44fc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5f1bce00fddffc63e5634891df2b02859c010944 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index c8260fcb9c..b1093dd584 100644
+index be29b385a4..5fd39149cb 100644
@@ -24 +25 @@
-@@ -451,6 +451,13 @@ cnxk_nix_mac_addr_set(struct rte_eth_dev *eth_dev, struct rte_ether_addr *addr)
+@@ -413,6 +413,13 @@ cnxk_nix_mac_addr_set(struct rte_eth_dev *eth_dev, struct rte_ether_addr *addr)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'graph: fix ID collisions' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (58 preceding siblings ...)
2024-06-24 23:58 ` patch 'net/cnxk: fix promiscuous state after MAC change' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'bpf: disable on 32-bit x86' " luca.boccassi
` (19 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Robin Jarry; +Cc: Kiran Kumar K, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/145220677b0b20859be722c4cc6f90d882ce395d
Thanks.
Luca Boccassi
---
From 145220677b0b20859be722c4cc6f90d882ce395d Mon Sep 17 00:00:00 2001
From: Robin Jarry <rjarry@redhat.com>
Date: Tue, 18 Jun 2024 11:23:25 +0200
Subject: [PATCH] graph: fix ID collisions
[ upstream commit d5c8b6bb74a06051232cbbd92d25220606b280c0 ]
The graph id is determined based on a global variable that is
incremented every time a graph is created, and decremented every time
a graph is destroyed. This only works if graphs are destroyed in the
reverse order in which they have been created.
The following code produces duplicate graph IDs which can lead to
use-after-free bugs and other undefined behaviours:
a = rte_graph_create(...); // id=0 graph_id=1
b = rte_graph_create(...); // id=1 graph_id=2
rte_graph_destroy(a); // graph_id=1
c = rte_graph_create(...); // id=1 graph_id=2 (duplicate with b)
rte_graph_destroy(c); // frees memory still used by b
Remove the global counter. Make sure that the graph list is always
ordered by increasing graph ids. When creating a new graph, pick a free
id which is not allocated.
Update unit tests to ensure it works as expected.
Fixes: a91fecc19c5c ("graph: implement create and destroy")
Signed-off-by: Robin Jarry <rjarry@redhat.com>
Acked-by: Kiran Kumar K <kirankumark@marvell.com>
---
lib/graph/graph.c | 72 +++++++++++++++++++++++++++++++++++++++--------
1 file changed, 61 insertions(+), 11 deletions(-)
diff --git a/lib/graph/graph.c b/lib/graph/graph.c
index 3a617cc369..9027e62a26 100644
--- a/lib/graph/graph.c
+++ b/lib/graph/graph.c
@@ -18,11 +18,54 @@
static struct graph_head graph_list = STAILQ_HEAD_INITIALIZER(graph_list);
static rte_spinlock_t graph_lock = RTE_SPINLOCK_INITIALIZER;
-static rte_graph_t graph_id;
-
-#define GRAPH_ID_CHECK(id) ID_CHECK(id, graph_id)
/* Private functions */
+static struct graph *
+graph_from_id(rte_graph_t id)
+{
+ struct graph *graph;
+ STAILQ_FOREACH(graph, &graph_list, next) {
+ if (graph->id == id)
+ return graph;
+ }
+ rte_errno = EINVAL;
+ return NULL;
+}
+
+static rte_graph_t
+graph_next_free_id(void)
+{
+ struct graph *graph;
+ rte_graph_t id = 0;
+
+ STAILQ_FOREACH(graph, &graph_list, next) {
+ if (id < graph->id)
+ break;
+ id = graph->id + 1;
+ }
+
+ return id;
+}
+
+static void
+graph_insert_ordered(struct graph *graph)
+{
+ struct graph *after, *g;
+
+ after = NULL;
+ STAILQ_FOREACH(g, &graph_list, next) {
+ if (g->id < graph->id)
+ after = g;
+ else if (g->id > graph->id)
+ break;
+ }
+ if (after == NULL) {
+ STAILQ_INSERT_HEAD(&graph_list, graph, next);
+ } else {
+ STAILQ_INSERT_AFTER(&graph_list, after, graph, next);
+ }
+}
+
struct graph_head *
graph_list_head_get(void)
{
@@ -327,7 +370,7 @@ rte_graph_create(const char *name, struct rte_graph_param *prm)
graph->socket = prm->socket_id;
graph->src_node_count = src_node_count;
graph->node_count = graph_nodes_count(graph);
- graph->id = graph_id;
+ graph->id = graph_next_free_id();
/* Allocate the Graph fast path memory and populate the data */
if (graph_fp_mem_create(graph))
@@ -338,8 +381,7 @@ rte_graph_create(const char *name, struct rte_graph_param *prm)
goto graph_mem_destroy;
/* All good, Lets add the graph to the list */
- graph_id++;
- STAILQ_INSERT_TAIL(&graph_list, graph, next);
+ graph_insert_ordered(graph);
graph_spinlock_unlock();
return graph->id;
@@ -378,7 +420,6 @@ rte_graph_destroy(rte_graph_t id)
graph_cleanup(graph);
STAILQ_REMOVE(&graph_list, graph, graph, next);
free(graph);
- graph_id--;
goto done;
}
graph = tmp;
@@ -405,7 +446,8 @@ rte_graph_id_to_name(rte_graph_t id)
{
struct graph *graph;
- GRAPH_ID_CHECK(id);
+ if (graph_from_id(id) == NULL)
+ goto fail;
STAILQ_FOREACH(graph, &graph_list, next)
if (graph->id == id)
return graph->name;
@@ -422,7 +464,8 @@ rte_graph_node_get(rte_graph_t gid, uint32_t nid)
rte_graph_off_t off;
rte_node_t count;
- GRAPH_ID_CHECK(gid);
+ if (graph_from_id(gid) == NULL)
+ goto fail;
STAILQ_FOREACH(graph, &graph_list, next)
if (graph->id == gid) {
rte_graph_foreach_node(count, off, graph->graph,
@@ -547,7 +590,8 @@ graph_scan_dump(FILE *f, rte_graph_t id, bool all)
struct graph *graph;
RTE_VERIFY(f);
- GRAPH_ID_CHECK(id);
+ if (graph_from_id(id) == NULL)
+ goto fail;
STAILQ_FOREACH(graph, &graph_list, next) {
if (all == true) {
@@ -576,7 +620,13 @@ rte_graph_list_dump(FILE *f)
rte_graph_t
rte_graph_max_count(void)
{
- return graph_id;
+ struct graph *graph;
+ rte_graph_t count = 0;
+
+ STAILQ_FOREACH(graph, &graph_list, next)
+ count++;
+
+ return count;
}
RTE_LOG_REGISTER_DEFAULT(rte_graph_logtype, INFO);
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:16.877740054 +0100
+++ 0061-graph-fix-ID-collisions.patch 2024-06-25 00:22:13.213186220 +0100
@@ -1 +1 @@
-From d5c8b6bb74a06051232cbbd92d25220606b280c0 Mon Sep 17 00:00:00 2001
+From 145220677b0b20859be722c4cc6f90d882ce395d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d5c8b6bb74a06051232cbbd92d25220606b280c0 ]
+
@@ -27 +28,0 @@
-Cc: stable@dpdk.org
@@ -32,3 +33,2 @@
- app/test/test_graph.c | 72 ++++++++++++++++++++++++++++++++++++
- lib/graph/graph.c | 86 ++++++++++++++++++++++++++++++++++---------
- 2 files changed, 141 insertions(+), 17 deletions(-)
+ lib/graph/graph.c | 72 +++++++++++++++++++++++++++++++++++++++--------
+ 1 file changed, 61 insertions(+), 11 deletions(-)
@@ -36,90 +35,0 @@
-diff --git a/app/test/test_graph.c b/app/test/test_graph.c
-index b8409bc604..2840a25b13 100644
---- a/app/test/test_graph.c
-+++ b/app/test/test_graph.c
-@@ -696,6 +696,77 @@ test_graph_clone(void)
- return ret;
- }
-
-+static int
-+test_graph_id_collisions(void)
-+{
-+ static const char *node_patterns[] = {"test_node_source1", "test_node00"};
-+ struct rte_graph_param gconf = {
-+ .socket_id = SOCKET_ID_ANY,
-+ .nb_node_patterns = 2,
-+ .node_patterns = node_patterns,
-+ };
-+ rte_graph_t g1, g2, g3, g4;
-+
-+ g1 = rte_graph_create("worker1", &gconf);
-+ if (g1 == RTE_GRAPH_ID_INVALID) {
-+ printf("Graph 1 creation failed with error = %d\n", rte_errno);
-+ return -1;
-+ }
-+ g2 = rte_graph_create("worker2", &gconf);
-+ if (g2 == RTE_GRAPH_ID_INVALID) {
-+ printf("Graph 2 creation failed with error = %d\n", rte_errno);
-+ return -1;
-+ }
-+ g3 = rte_graph_create("worker3", &gconf);
-+ if (g3 == RTE_GRAPH_ID_INVALID) {
-+ printf("Graph 3 creation failed with error = %d\n", rte_errno);
-+ return -1;
-+ }
-+ if (g1 == g2 || g2 == g3 || g1 == g3) {
-+ printf("Graph ids should be different\n");
-+ return -1;
-+ }
-+ if (rte_graph_destroy(g2) < 0) {
-+ printf("Graph 2 suppression failed\n");
-+ return -1;
-+ }
-+ g4 = rte_graph_create("worker4", &gconf);
-+ if (g4 == RTE_GRAPH_ID_INVALID) {
-+ printf("Graph 4 creation failed with error = %d\n", rte_errno);
-+ return -1;
-+ }
-+ if (g1 == g3 || g1 == g4 || g3 == g4) {
-+ printf("Graph ids should be different\n");
-+ return -1;
-+ }
-+ g2 = rte_graph_clone(g1, "worker2", &gconf);
-+ if (g2 == RTE_GRAPH_ID_INVALID) {
-+ printf("Graph 4 creation failed with error = %d\n", rte_errno);
-+ return -1;
-+ }
-+ if (g1 == g2 || g1 == g3 || g1 == g4 || g2 == g3 || g2 == g4 || g3 == g4) {
-+ printf("Graph ids should be different\n");
-+ return -1;
-+ }
-+ if (rte_graph_destroy(g1) < 0) {
-+ printf("Graph 1 suppression failed\n");
-+ return -1;
-+ }
-+ if (rte_graph_destroy(g2) < 0) {
-+ printf("Graph 2 suppression failed\n");
-+ return -1;
-+ }
-+ if (rte_graph_destroy(g3) < 0) {
-+ printf("Graph 3 suppression failed\n");
-+ return -1;
-+ }
-+ if (rte_graph_destroy(g4) < 0) {
-+ printf("Graph 4 suppression failed\n");
-+ return -1;
-+ }
-+ return 0;
-+}
-+
- static int
- test_graph_model_mcore_dispatch_node_lcore_affinity_set(void)
- {
-@@ -977,6 +1048,7 @@ static struct unit_test_suite graph_testsuite = {
- TEST_CASE(test_lookup_functions),
- TEST_CASE(test_create_graph),
- TEST_CASE(test_graph_clone),
-+ TEST_CASE(test_graph_id_collisions),
- TEST_CASE(test_graph_model_mcore_dispatch_node_lcore_affinity_set),
- TEST_CASE(test_graph_model_mcore_dispatch_core_bind_unbind),
- TEST_CASE(test_graph_worker_model_set_get),
@@ -127 +37 @@
-index 26f0968a97..8ea2109645 100644
+index 3a617cc369..9027e62a26 100644
@@ -130 +40 @@
-@@ -19,11 +19,54 @@
+@@ -18,11 +18,54 @@
@@ -188,21 +98 @@
-@@ -279,7 +322,8 @@ rte_graph_model_mcore_dispatch_core_bind(rte_graph_t id, int lcore)
- {
- struct graph *graph;
-
-- GRAPH_ID_CHECK(id);
-+ if (graph_from_id(id) == NULL)
-+ goto fail;
- if (!rte_lcore_is_enabled(lcore))
- SET_ERR_JMP(ENOLINK, fail, "lcore %d not enabled", lcore);
-
-@@ -309,7 +353,8 @@ rte_graph_model_mcore_dispatch_core_unbind(rte_graph_t id)
- {
- struct graph *graph;
-
-- GRAPH_ID_CHECK(id);
-+ if (graph_from_id(id) == NULL)
-+ goto fail;
- STAILQ_FOREACH(graph, &graph_list, next)
- if (graph->id == id)
- break;
-@@ -406,7 +451,7 @@ rte_graph_create(const char *name, struct rte_graph_param *prm)
+@@ -327,7 +370,7 @@ rte_graph_create(const char *name, struct rte_graph_param *prm)
@@ -214,4 +104,4 @@
- graph->parent_id = RTE_GRAPH_ID_INVALID;
- graph->lcore_id = RTE_MAX_LCORE;
- graph->num_pkt_to_capture = prm->num_pkt_to_capture;
-@@ -422,8 +467,7 @@ rte_graph_create(const char *name, struct rte_graph_param *prm)
+
+ /* Allocate the Graph fast path memory and populate the data */
+ if (graph_fp_mem_create(graph))
+@@ -338,8 +381,7 @@ rte_graph_create(const char *name, struct rte_graph_param *prm)
@@ -227 +117 @@
-@@ -467,7 +511,6 @@ rte_graph_destroy(rte_graph_t id)
+@@ -378,7 +420,6 @@ rte_graph_destroy(rte_graph_t id)
@@ -235,30 +125 @@
-@@ -520,7 +563,7 @@ graph_clone(struct graph *parent_graph, const char *name, struct rte_graph_param
- graph->parent_id = parent_graph->id;
- graph->lcore_id = parent_graph->lcore_id;
- graph->socket = parent_graph->socket;
-- graph->id = graph_id;
-+ graph->id = graph_next_free_id();
-
- /* Allocate the Graph fast path memory and populate the data */
- if (graph_fp_mem_create(graph))
-@@ -539,8 +582,7 @@ graph_clone(struct graph *parent_graph, const char *name, struct rte_graph_param
- goto graph_mem_destroy;
-
- /* All good, Lets add the graph to the list */
-- graph_id++;
-- STAILQ_INSERT_TAIL(&graph_list, graph, next);
-+ graph_insert_ordered(graph);
-
- graph_spinlock_unlock();
- return graph->id;
-@@ -561,7 +603,8 @@ rte_graph_clone(rte_graph_t id, const char *name, struct rte_graph_param *prm)
- {
- struct graph *graph;
-
-- GRAPH_ID_CHECK(id);
-+ if (graph_from_id(id) == NULL)
-+ goto fail;
- STAILQ_FOREACH(graph, &graph_list, next)
- if (graph->id == id)
- return graph_clone(graph, name, prm);
-@@ -587,7 +630,8 @@ rte_graph_id_to_name(rte_graph_t id)
+@@ -405,7 +446,8 @@ rte_graph_id_to_name(rte_graph_t id)
@@ -274 +135 @@
-@@ -604,7 +648,8 @@ rte_graph_node_get(rte_graph_t gid, uint32_t nid)
+@@ -422,7 +464,8 @@ rte_graph_node_get(rte_graph_t gid, uint32_t nid)
@@ -284 +145 @@
-@@ -729,7 +774,8 @@ graph_scan_dump(FILE *f, rte_graph_t id, bool all)
+@@ -547,7 +590,8 @@ graph_scan_dump(FILE *f, rte_graph_t id, bool all)
@@ -294 +155 @@
-@@ -758,7 +804,13 @@ rte_graph_list_dump(FILE *f)
+@@ -576,7 +620,13 @@ rte_graph_list_dump(FILE *f)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'bpf: disable on 32-bit x86' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (59 preceding siblings ...)
2024-06-24 23:58 ` patch 'graph: fix ID collisions' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'hash: fix RCU reclamation size' " luca.boccassi
` (18 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Luca Boccassi; +Cc: Stephen Hemminger, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/1f65019c2d7ff5396cb18a4ceeba231c6607b881
Thanks.
Luca Boccassi
---
From 1f65019c2d7ff5396cb18a4ceeba231c6607b881 Mon Sep 17 00:00:00 2001
From: Luca Boccassi <bluca@debian.org>
Date: Thu, 25 Apr 2024 16:05:58 +0100
Subject: [PATCH] bpf: disable on 32-bit x86
[ upstream commit 4edbcc7b5313949083f7694847342b1a45659d6b ]
As per Intel, this is not supported, and the librte-bpf test fails on
32bit x86 kernels, so disable the library and the pmd.
Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
app/test/meson.build | 11 ++++++++---
drivers/net/af_xdp/meson.build | 6 ++++++
lib/bpf/meson.build | 6 ++++++
3 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/app/test/meson.build b/app/test/meson.build
index eee02cd8ff..09cbe5e620 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -15,7 +15,6 @@ test_sources = files(
'test_barrier.c',
'test_bitops.c',
'test_bitmap.c',
- 'test_bpf.c',
'test_byteorder.c',
'test_cksum.c',
'test_cksum_perf.c',
@@ -161,8 +160,6 @@ fast_tests = [
['acl_autotest', true, true],
['atomic_autotest', false, true],
['bitmap_autotest', true, true],
- ['bpf_autotest', true, true],
- ['bpf_convert_autotest', true, true],
['bitops_autotest', true, true],
['byteorder_autotest', true, true],
['cksum_autotest', true, true],
@@ -430,6 +427,14 @@ if dpdk_conf.has('RTE_HAS_LIBPCAP')
endif
endif
+if arch_subdir != 'x86' or dpdk_conf.get('RTE_ARCH_64')
+ test_sources += 'test_bpf.c'
+ fast_tests += [
+ ['bpf_autotest', true, true],
+ ['bpf_convert_autotest', true, true],
+ ]
+endif
+
if cc.has_argument('-Wno-format-truncation')
cflags += '-Wno-format-truncation'
endif
diff --git a/drivers/net/af_xdp/meson.build b/drivers/net/af_xdp/meson.build
index 979b914bb6..1182ce5325 100644
--- a/drivers/net/af_xdp/meson.build
+++ b/drivers/net/af_xdp/meson.build
@@ -7,6 +7,12 @@ if is_windows
subdir_done()
endif
+if arch_subdir == 'x86' and dpdk_conf.get('RTE_ARCH_32')
+ build = false
+ reason = 'not supported on 32-bit x86'
+ subdir_done()
+endif
+
sources = files('rte_eth_af_xdp.c')
libxdp_ver = '>=1.2.2'
diff --git a/lib/bpf/meson.build b/lib/bpf/meson.build
index cd739bb827..aa258a9061 100644
--- a/lib/bpf/meson.build
+++ b/lib/bpf/meson.build
@@ -7,6 +7,12 @@ if is_windows
subdir_done()
endif
+if arch_subdir == 'x86' and dpdk_conf.get('RTE_ARCH_32')
+ build = false
+ reason = 'not supported on 32-bit x86'
+ subdir_done()
+endif
+
sources = files('bpf.c',
'bpf_dump.c',
'bpf_exec.c',
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:16.912750848 +0100
+++ 0062-bpf-disable-on-32-bit-x86.patch 2024-06-25 00:22:13.217186301 +0100
@@ -1 +1 @@
-From 4edbcc7b5313949083f7694847342b1a45659d6b Mon Sep 17 00:00:00 2001
+From 1f65019c2d7ff5396cb18a4ceeba231c6607b881 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4edbcc7b5313949083f7694847342b1a45659d6b ]
+
@@ -9,2 +10,0 @@
-Cc: stable@dpdk.org
-
@@ -14,4 +14,4 @@
- doc/guides/rel_notes/release_24_07.rst | 5 +++++
- drivers/net/af_xdp/meson.build | 6 ++++++
- lib/bpf/meson.build | 6 ++++++
- 3 files changed, 17 insertions(+)
+ app/test/meson.build | 11 ++++++++---
+ drivers/net/af_xdp/meson.build | 6 ++++++
+ lib/bpf/meson.build | 6 ++++++
+ 3 files changed, 20 insertions(+), 3 deletions(-)
@@ -19,7 +19,24 @@
-diff --git a/doc/guides/rel_notes/release_24_07.rst b/doc/guides/rel_notes/release_24_07.rst
-index d4970cf6ec..1af7cb91a1 100644
---- a/doc/guides/rel_notes/release_24_07.rst
-+++ b/doc/guides/rel_notes/release_24_07.rst
-@@ -138,6 +138,11 @@ Removed Items
- Also, make sure to start the actual text at the margin.
- =======================================================
+diff --git a/app/test/meson.build b/app/test/meson.build
+index eee02cd8ff..09cbe5e620 100644
+--- a/app/test/meson.build
++++ b/app/test/meson.build
+@@ -15,7 +15,6 @@ test_sources = files(
+ 'test_barrier.c',
+ 'test_bitops.c',
+ 'test_bitmap.c',
+- 'test_bpf.c',
+ 'test_byteorder.c',
+ 'test_cksum.c',
+ 'test_cksum_perf.c',
+@@ -161,8 +160,6 @@ fast_tests = [
+ ['acl_autotest', true, true],
+ ['atomic_autotest', false, true],
+ ['bitmap_autotest', true, true],
+- ['bpf_autotest', true, true],
+- ['bpf_convert_autotest', true, true],
+ ['bitops_autotest', true, true],
+ ['byteorder_autotest', true, true],
+ ['cksum_autotest', true, true],
+@@ -430,6 +427,14 @@ if dpdk_conf.has('RTE_HAS_LIBPCAP')
+ endif
+ endif
@@ -27 +44,7 @@
-+* **Disabled the BPF library and net/af_xdp for 32-bit x86.**
++if arch_subdir != 'x86' or dpdk_conf.get('RTE_ARCH_64')
++ test_sources += 'test_bpf.c'
++ fast_tests += [
++ ['bpf_autotest', true, true],
++ ['bpf_convert_autotest', true, true],
++ ]
++endif
@@ -29,6 +52,3 @@
-+ BPF is not supported and the librte-bpf test fails on 32-bit x86 kernels.
-+ So disable the library and the pmd.
-+
-
- API Changes
- -----------
+ if cc.has_argument('-Wno-format-truncation')
+ cflags += '-Wno-format-truncation'
+ endif
@@ -36 +56 @@
-index 280bfa8f80..69d109ff46 100644
+index 979b914bb6..1182ce5325 100644
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'hash: fix RCU reclamation size' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (60 preceding siblings ...)
2024-06-24 23:58 ` patch 'bpf: disable on 32-bit x86' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'common/mlx5: fix unsigned/signed mismatch' " luca.boccassi
` (17 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Abdullah Ömer Yamaç; +Cc: Honnappa Nagarahalli, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/0ac140899be5dba341dc0438ada302b636fe2dce
Thanks.
Luca Boccassi
---
From 0ac140899be5dba341dc0438ada302b636fe2dce Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Abdullah=20=C3=96mer=20Yama=C3=A7?= <aomeryamac@gmail.com>
Date: Mon, 13 May 2024 16:35:53 +0000
Subject: [PATCH] hash: fix RCU reclamation size
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit d45a7eed07d6b024956d10af529fcdcdd798227f ]
Set the maximum reclamation size to user provided value.
Fixes: 769b2de7fb52 ("hash: implement RCU resources reclamation")
Signed-off-by: Abdullah Ömer Yamaç <aomeryamac@gmail.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
---
.mailmap | 2 +-
lib/hash/rte_cuckoo_hash.c | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/.mailmap b/.mailmap
index e8953af6f0..6a7e64e72d 100644
--- a/.mailmap
+++ b/.mailmap
@@ -2,7 +2,7 @@ Aakash Sasidharan <asasidharan@marvell.com>
Aaro Koskinen <aaro.koskinen@nsn.com>
Aaron Campbell <aaron@arbor.net>
Aaron Conole <aconole@redhat.com>
-Abdullah Ömer Yamaç <omer.yamac@ceng.metu.edu.tr>
+Abdullah Ömer Yamaç <omer.yamac@ceng.metu.edu.tr> <aomeryamac@gmail.com>
Abdullah Sevincer <abdullah.sevincer@intel.com>
Abed Kamaluddin <akamaluddin@marvell.com>
Abhijit Sinha <abhijit.sinha@intel.com>
diff --git a/lib/hash/rte_cuckoo_hash.c b/lib/hash/rte_cuckoo_hash.c
index 13c8337519..7da32f1d49 100644
--- a/lib/hash/rte_cuckoo_hash.c
+++ b/lib/hash/rte_cuckoo_hash.c
@@ -1543,6 +1543,7 @@ rte_hash_rcu_qsbr_add(struct rte_hash *h, struct rte_hash_rcu_config *cfg)
if (params.size == 0)
params.size = total_entries;
params.trigger_reclaim_limit = cfg->trigger_reclaim_limit;
+ params.max_reclaim_size = cfg->max_reclaim_size;
if (params.max_reclaim_size == 0)
params.max_reclaim_size = RTE_HASH_RCU_DQ_RECLAIM_MAX;
params.esize = sizeof(struct __rte_hash_rcu_dq_entry);
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:16.947801784 +0100
+++ 0063-hash-fix-RCU-reclamation-size.patch 2024-06-25 00:22:13.229186546 +0100
@@ -1 +1 @@
-From d45a7eed07d6b024956d10af529fcdcdd798227f Mon Sep 17 00:00:00 2001
+From 0ac140899be5dba341dc0438ada302b636fe2dce Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit d45a7eed07d6b024956d10af529fcdcdd798227f ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 3e73eec762..9013e15ea9 100644
+index e8953af6f0..6a7e64e72d 100644
@@ -33 +34 @@
- Abhijit Gangurde <abhijit.gangurde@amd.com>
+ Abhijit Sinha <abhijit.sinha@intel.com>
@@ -35 +36 @@
-index 16c9c4c5c4..265335f845 100644
+index 13c8337519..7da32f1d49 100644
@@ -38 +39 @@
-@@ -1558,6 +1558,7 @@ rte_hash_rcu_qsbr_add(struct rte_hash *h, struct rte_hash_rcu_config *cfg)
+@@ -1543,6 +1543,7 @@ rte_hash_rcu_qsbr_add(struct rte_hash *h, struct rte_hash_rcu_config *cfg)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'common/mlx5: fix unsigned/signed mismatch' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (61 preceding siblings ...)
2024-06-24 23:58 ` patch 'hash: fix RCU reclamation size' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'net/mlx5/hws: decrease log level for creation failure' " luca.boccassi
` (16 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Tyler Retzlaff; +Cc: Dariusz Sosnowski, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/17c527107800562b7a8f2bbbb5f78de78b7d2d65
Thanks.
Luca Boccassi
---
From 17c527107800562b7a8f2bbbb5f78de78b7d2d65 Mon Sep 17 00:00:00 2001
From: Tyler Retzlaff <roretzla@linux.microsoft.com>
Date: Mon, 15 Apr 2024 16:09:37 -0700
Subject: [PATCH] common/mlx5: fix unsigned/signed mismatch
[ upstream commit eec253d0a57d707306e4ac3128bc21f10bb8bc5f ]
Use unsigned int for 2 loop indexes that are being compared against an
unsigned int struct field to avoid signed/unsigned mismatch warning.
Fixes: 718d166e5504 ("net/mlx5: create advanced RxQ table via DevX")
Fixes: e1da60a8a6e9 ("common/mlx5: add DevX command to modify RQT")
Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
drivers/common/mlx5/mlx5_devx_cmds.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c
index c570323fa8..f44be4c230 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.c
+++ b/drivers/common/mlx5/mlx5_devx_cmds.c
@@ -1661,7 +1661,7 @@ mlx5_devx_cmd_create_rqt(void *ctx,
uint32_t out[MLX5_ST_SZ_DW(create_rqt_out)] = {0};
void *rqt_ctx;
struct mlx5_devx_obj *rqt = NULL;
- int i;
+ unsigned int i;
in = mlx5_malloc(MLX5_MEM_ZERO, inlen, 0, SOCKET_ID_ANY);
if (!in) {
@@ -1714,7 +1714,7 @@ mlx5_devx_cmd_modify_rqt(struct mlx5_devx_obj *rqt,
uint32_t out[MLX5_ST_SZ_DW(modify_rqt_out)] = {0};
uint32_t *in = mlx5_malloc(MLX5_MEM_ZERO, inlen, 0, SOCKET_ID_ANY);
void *rqt_ctx;
- int i;
+ unsigned int i;
int ret;
if (!in) {
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:16.984553137 +0100
+++ 0064-common-mlx5-fix-unsigned-signed-mismatch.patch 2024-06-25 00:22:13.229186546 +0100
@@ -1 +1 @@
-From eec253d0a57d707306e4ac3128bc21f10bb8bc5f Mon Sep 17 00:00:00 2001
+From 17c527107800562b7a8f2bbbb5f78de78b7d2d65 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit eec253d0a57d707306e4ac3128bc21f10bb8bc5f ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 9b7ababae7..9952733c90 100644
+index c570323fa8..f44be4c230 100644
@@ -23 +24 @@
-@@ -1816,7 +1816,7 @@ mlx5_devx_cmd_create_rqt(void *ctx,
+@@ -1661,7 +1661,7 @@ mlx5_devx_cmd_create_rqt(void *ctx,
@@ -32 +33 @@
-@@ -1869,7 +1869,7 @@ mlx5_devx_cmd_modify_rqt(struct mlx5_devx_obj *rqt,
+@@ -1714,7 +1714,7 @@ mlx5_devx_cmd_modify_rqt(struct mlx5_devx_obj *rqt,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/mlx5/hws: decrease log level for creation failure' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (62 preceding siblings ...)
2024-06-24 23:58 ` patch 'common/mlx5: fix unsigned/signed mismatch' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'common/mlx5: fix PRM structs' " luca.boccassi
` (15 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Erez Shitrit; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a05258399acb2c3262b612ab6e8e94f4363d93ca
Thanks.
Luca Boccassi
---
From a05258399acb2c3262b612ab6e8e94f4363d93ca Mon Sep 17 00:00:00 2001
From: Erez Shitrit <erezsh@nvidia.com>
Date: Mon, 6 May 2024 14:44:04 +0300
Subject: [PATCH] net/mlx5/hws: decrease log level for creation failure
[ upstream commit e014d5e2e49994fbc504a49814ed480a60c85d63 ]
When the user tries to create a matcher and if failed with specific
errno (E2BIG) the message will be in debug level and not in warning.
It is a part of a feature when the user re-try to insert a new matching
depends on that errno, no need the annoying message.
Fixes: c55c2bf35333 ("net/mlx5/hws: add definer layer")
Signed-off-by: Erez Shitrit <erezsh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/hws/mlx5dr_definer.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/mlx5/hws/mlx5dr_definer.c b/drivers/net/mlx5/hws/mlx5dr_definer.c
index d81d66523a..bc1decbec9 100644
--- a/drivers/net/mlx5/hws/mlx5dr_definer.c
+++ b/drivers/net/mlx5/hws/mlx5dr_definer.c
@@ -1842,7 +1842,7 @@ mlx5dr_definer_find_best_hl_fit(struct mlx5dr_context *ctx,
return 0;
}
- DR_LOG(ERR, "Unable to find supporting match/jumbo definer combination");
+ DR_LOG(DEBUG, "Unable to find supporting match/jumbo definer combination");
rte_errno = ENOTSUP;
return rte_errno;
}
@@ -1934,7 +1934,7 @@ int mlx5dr_definer_get(struct mlx5dr_context *ctx,
/* Convert items to hl and allocate the field copy array (fc) */
ret = mlx5dr_definer_conv_items_to_hl(ctx, mt, hl);
if (ret) {
- DR_LOG(ERR, "Failed to convert items to hl");
+ DR_LOG(DEBUG, "Failed to convert items to hl");
goto free_hl;
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:17.020521867 +0100
+++ 0065-net-mlx5-hws-decrease-log-level-for-creation-failure.patch 2024-06-25 00:22:13.233186627 +0100
@@ -1 +1 @@
-From e014d5e2e49994fbc504a49814ed480a60c85d63 Mon Sep 17 00:00:00 2001
+From a05258399acb2c3262b612ab6e8e94f4363d93ca Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e014d5e2e49994fbc504a49814ed480a60c85d63 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -17,3 +18,2 @@
- drivers/net/mlx5/hws/mlx5dr_definer.c | 6 +++---
- drivers/net/mlx5/hws/mlx5dr_matcher.c | 2 +-
- 2 files changed, 4 insertions(+), 4 deletions(-)
+ drivers/net/mlx5/hws/mlx5dr_definer.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
@@ -22 +22 @@
-index a0f95c6923..88be27dcbb 100644
+index d81d66523a..bc1decbec9 100644
@@ -25 +25 @@
-@@ -3539,7 +3539,7 @@ mlx5dr_definer_find_best_match_fit(struct mlx5dr_context *ctx,
+@@ -1842,7 +1842,7 @@ mlx5dr_definer_find_best_hl_fit(struct mlx5dr_context *ctx,
@@ -31 +31 @@
- rte_errno = E2BIG;
+ rte_errno = ENOTSUP;
@@ -34,25 +34,3 @@
-@@ -3694,7 +3694,7 @@ mlx5dr_definer_calc_layout(struct mlx5dr_matcher *matcher,
- /* Find the match definer layout for header layout match union */
- ret = mlx5dr_definer_find_best_match_fit(ctx, match_definer, match_hl);
- if (ret) {
-- DR_LOG(ERR, "Failed to create match definer from header layout");
-+ DR_LOG(DEBUG, "Failed to create match definer from header layout");
- goto free_fc;
- }
-
-@@ -4046,7 +4046,7 @@ int mlx5dr_definer_matcher_init(struct mlx5dr_context *ctx,
-
- ret = mlx5dr_definer_calc_layout(matcher, &match_layout, &range_layout);
- if (ret) {
-- DR_LOG(ERR, "Failed to calculate matcher definer layout");
-+ DR_LOG(DEBUG, "Failed to calculate matcher definer layout");
- return ret;
- }
-
-diff --git a/drivers/net/mlx5/hws/mlx5dr_matcher.c b/drivers/net/mlx5/hws/mlx5dr_matcher.c
-index aeff300467..c9f5e46d24 100644
---- a/drivers/net/mlx5/hws/mlx5dr_matcher.c
-+++ b/drivers/net/mlx5/hws/mlx5dr_matcher.c
-@@ -877,7 +877,7 @@ static int mlx5dr_matcher_bind_mt(struct mlx5dr_matcher *matcher)
- /* Calculate match, range and hash definers */
- ret = mlx5dr_definer_matcher_init(ctx, matcher);
+@@ -1934,7 +1934,7 @@ int mlx5dr_definer_get(struct mlx5dr_context *ctx,
+ /* Convert items to hl and allocate the field copy array (fc) */
+ ret = mlx5dr_definer_conv_items_to_hl(ctx, mt, hl);
@@ -60,3 +38,3 @@
-- DR_LOG(ERR, "Failed to set matcher templates with match definers");
-+ DR_LOG(DEBUG, "Failed to set matcher templates with match definers");
- return ret;
+- DR_LOG(ERR, "Failed to convert items to hl");
++ DR_LOG(DEBUG, "Failed to convert items to hl");
+ goto free_hl;
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'common/mlx5: fix PRM structs' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (63 preceding siblings ...)
2024-06-24 23:58 ` patch 'net/mlx5/hws: decrease log level for creation failure' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'net/mlx5/hws: fix function comment' " luca.boccassi
` (14 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Yevgeny Kliteynik; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/06de40842ef37ce6b557e3186d493b219be492e4
Thanks.
Luca Boccassi
---
From 06de40842ef37ce6b557e3186d493b219be492e4 Mon Sep 17 00:00:00 2001
From: Yevgeny Kliteynik <kliteyn@nvidia.com>
Date: Mon, 6 May 2024 14:44:05 +0300
Subject: [PATCH] common/mlx5: fix PRM structs
[ upstream commit 39b1cce562a4e1fa3137fd91a3b1dfed98f23db4 ]
Fix wrong reserved size and add helpful comment
Fixes: 365cdf5f8ce7 ("net/mlx5/hws: add command layer")
Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/common/mlx5/mlx5_prm.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h
index dab70b9469..f2cd353672 100644
--- a/drivers/common/mlx5/mlx5_prm.h
+++ b/drivers/common/mlx5/mlx5_prm.h
@@ -2116,8 +2116,8 @@ struct mlx5_ifc_cmd_hca_cap_2_bits {
u8 reserved_at_d0[0x3];
u8 log_conn_track_max_alloc[0x5];
u8 reserved_at_d8[0x3];
- u8 log_max_conn_track_offload[0x5];
- u8 reserved_at_e0[0x20]; /* End of DW7. */
+ u8 log_max_conn_track_offload[0x5]; /* End of DW7. */
+ u8 reserved_at_e0[0x20];
u8 reserved_at_100[0x60];
u8 reserved_at_160[0x3];
u8 hairpin_sq_wqe_bb_size[0x5];
@@ -3311,7 +3311,7 @@ struct mlx5_ifc_stc_ste_param_vport_bits {
u8 eswitch_owner_vhca_id[0x10];
u8 vport_number[0x10];
u8 eswitch_owner_vhca_id_valid[0x1];
- u8 reserved_at_21[0x59];
+ u8 reserved_at_21[0x5f];
};
union mlx5_ifc_stc_param_bits {
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:17.058542614 +0100
+++ 0066-common-mlx5-fix-PRM-structs.patch 2024-06-25 00:22:13.237186709 +0100
@@ -1 +1 @@
-From 39b1cce562a4e1fa3137fd91a3b1dfed98f23db4 Mon Sep 17 00:00:00 2001
+From 06de40842ef37ce6b557e3186d493b219be492e4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 39b1cce562a4e1fa3137fd91a3b1dfed98f23db4 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 2bbbc446fc..178a18a978 100644
+index dab70b9469..f2cd353672 100644
@@ -21 +22 @@
-@@ -2360,8 +2360,8 @@ struct mlx5_ifc_cmd_hca_cap_2_bits {
+@@ -2116,8 +2116,8 @@ struct mlx5_ifc_cmd_hca_cap_2_bits {
@@ -26 +27 @@
-- u8 cross_vhca_object_to_object_supported[0x20]; /* End of DW7. */
+- u8 reserved_at_e0[0x20]; /* End of DW7. */
@@ -28,5 +29,5 @@
-+ u8 cross_vhca_object_to_object_supported[0x20];
- u8 allowed_object_for_other_vhca_access_high[0x20];
- u8 allowed_object_for_other_vhca_access[0x20];
- u8 reserved_at_140[0x20];
-@@ -3655,7 +3655,7 @@ struct mlx5_ifc_stc_ste_param_vport_bits {
++ u8 reserved_at_e0[0x20];
+ u8 reserved_at_100[0x60];
+ u8 reserved_at_160[0x3];
+ u8 hairpin_sq_wqe_bb_size[0x5];
+@@ -3311,7 +3311,7 @@ struct mlx5_ifc_stc_ste_param_vport_bits {
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/mlx5/hws: fix function comment' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (64 preceding siblings ...)
2024-06-24 23:58 ` patch 'common/mlx5: fix PRM structs' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'net/mlx5/hws: fix spinlock release on context open' " luca.boccassi
` (13 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Yevgeny Kliteynik; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/ef9f7c1fd8bf43a5582e3aaca173da5c1c4bae56
Thanks.
Luca Boccassi
---
From ef9f7c1fd8bf43a5582e3aaca173da5c1c4bae56 Mon Sep 17 00:00:00 2001
From: Yevgeny Kliteynik <kliteyn@nvidia.com>
Date: Mon, 6 May 2024 14:44:06 +0300
Subject: [PATCH] net/mlx5/hws: fix function comment
[ upstream commit 735a47fb4ad305a7cc4a191d69afcc6d12763a5c ]
Remove comment that documents parameter that doesn't exist.
Fixes: 3eb748869d2d ("net/mlx5/hws: add send layer")
Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/hws/mlx5dr_send.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/mlx5/hws/mlx5dr_send.h b/drivers/net/mlx5/hws/mlx5dr_send.h
index 8d4769495d..28efd70c64 100644
--- a/drivers/net/mlx5/hws/mlx5dr_send.h
+++ b/drivers/net/mlx5/hws/mlx5dr_send.h
@@ -192,8 +192,6 @@ struct mlx5dr_send_ste_attr {
* value to write in CPU endian format.
* @param addr
* Address to write to.
- * @param lock
- * Address of the lock to use for that UAR access.
*/
static __rte_always_inline void
mlx5dr_uar_write64_relaxed(uint64_t val, void *addr)
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:17.096417144 +0100
+++ 0067-net-mlx5-hws-fix-function-comment.patch 2024-06-25 00:22:13.237186709 +0100
@@ -1 +1 @@
-From 735a47fb4ad305a7cc4a191d69afcc6d12763a5c Mon Sep 17 00:00:00 2001
+From ef9f7c1fd8bf43a5582e3aaca173da5c1c4bae56 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 735a47fb4ad305a7cc4a191d69afcc6d12763a5c ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 0c67a9e12d..c4f5a96f9c 100644
+index 8d4769495d..28efd70c64 100644
@@ -21 +22 @@
-@@ -203,8 +203,6 @@ struct mlx5dr_send_ste_attr {
+@@ -192,8 +192,6 @@ struct mlx5dr_send_ste_attr {
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/mlx5/hws: fix spinlock release on context open' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (65 preceding siblings ...)
2024-06-24 23:58 ` patch 'net/mlx5/hws: fix function comment' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'net/mlx5/hws: add template match none flag' " luca.boccassi
` (12 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Yevgeny Kliteynik; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/df1753ebe821021b54a0c3bddb33d6e20b72cdef
Thanks.
Luca Boccassi
---
From df1753ebe821021b54a0c3bddb33d6e20b72cdef Mon Sep 17 00:00:00 2001
From: Yevgeny Kliteynik <kliteyn@nvidia.com>
Date: Mon, 6 May 2024 14:44:10 +0300
Subject: [PATCH] net/mlx5/hws: fix spinlock release on context open
[ upstream commit 36ae32b64e607c788961ab48adf24ad1cdf38140 ]
Add missing spinlock destruction in error flow.
Fixes: b0290e56dd08 ("net/mlx5/hws: add context object")
Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/hws/mlx5dr_context.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/mlx5/hws/mlx5dr_context.c b/drivers/net/mlx5/hws/mlx5dr_context.c
index 76ada7bb7f..d1923a8e93 100644
--- a/drivers/net/mlx5/hws/mlx5dr_context.c
+++ b/drivers/net/mlx5/hws/mlx5dr_context.c
@@ -210,6 +210,7 @@ struct mlx5dr_context *mlx5dr_context_open(struct ibv_context *ibv_ctx,
free_caps:
simple_free(ctx->caps);
free_ctx:
+ pthread_spin_destroy(&ctx->ctrl_lock);
simple_free(ctx);
return NULL;
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:17.130184759 +0100
+++ 0068-net-mlx5-hws-fix-spinlock-release-on-context-open.patch 2024-06-25 00:22:13.237186709 +0100
@@ -1 +1 @@
-From 36ae32b64e607c788961ab48adf24ad1cdf38140 Mon Sep 17 00:00:00 2001
+From df1753ebe821021b54a0c3bddb33d6e20b72cdef Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 36ae32b64e607c788961ab48adf24ad1cdf38140 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 15d53c578a..7f120b3b1b 100644
+index 76ada7bb7f..d1923a8e93 100644
@@ -21 +22 @@
-@@ -263,6 +263,7 @@ struct mlx5dr_context *mlx5dr_context_open(struct ibv_context *ibv_ctx,
+@@ -210,6 +210,7 @@ struct mlx5dr_context *mlx5dr_context_open(struct ibv_context *ibv_ctx,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/mlx5/hws: add template match none flag' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (66 preceding siblings ...)
2024-06-24 23:58 ` patch 'net/mlx5/hws: fix spinlock release on context open' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'net/mlx5/hws: fix action template dump' " luca.boccassi
` (11 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Yevgeny Kliteynik; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/4a75ad8a7ea487f596c9d943e2c8b38290ab80fd
Thanks.
Luca Boccassi
---
From 4a75ad8a7ea487f596c9d943e2c8b38290ab80fd Mon Sep 17 00:00:00 2001
From: Yevgeny Kliteynik <kliteyn@nvidia.com>
Date: Mon, 6 May 2024 14:44:11 +0300
Subject: [PATCH] net/mlx5/hws: add template match none flag
[ upstream commit 2471994eedab4090cb73173d9986834b15e98aad ]
Instead of passing 0 as an enum parameter, define flag NONE.
This resolves the following code analysis error: "enumerated
type mixed with another type".
This value is currently used in tests only, and will later
be used in backward-compatible steering API.
Fixes: 5cadd74fbc08 ("net/mlx5: add HW steering low-level abstract stub")
Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/hws/mlx5dr.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/mlx5/hws/mlx5dr.h b/drivers/net/mlx5/hws/mlx5dr.h
index f8de27c615..d570810e95 100644
--- a/drivers/net/mlx5/hws/mlx5dr.h
+++ b/drivers/net/mlx5/hws/mlx5dr.h
@@ -81,6 +81,7 @@ enum mlx5dr_action_aso_ct_flags {
};
enum mlx5dr_match_template_flags {
+ MLX5DR_MATCH_TEMPLATE_FLAG_NONE = 0,
/* Allow relaxed matching by skipping derived dependent match fields. */
MLX5DR_MATCH_TEMPLATE_FLAG_RELAXED_MATCH = 1,
};
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:17.167257313 +0100
+++ 0069-net-mlx5-hws-add-template-match-none-flag.patch 2024-06-25 00:22:13.237186709 +0100
@@ -1 +1 @@
-From 2471994eedab4090cb73173d9986834b15e98aad Mon Sep 17 00:00:00 2001
+From 4a75ad8a7ea487f596c9d943e2c8b38290ab80fd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2471994eedab4090cb73173d9986834b15e98aad ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 36ecccf9ac..86cd4f1db5 100644
+index f8de27c615..d570810e95 100644
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/mlx5/hws: fix action template dump' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (67 preceding siblings ...)
2024-06-24 23:58 ` patch 'net/mlx5/hws: add template match none flag' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'net/mlx5: fix indexed pool with invalid index' " luca.boccassi
` (10 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Hamdan Igbaria; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/06af59ff2f1c0a192134a097b64fce2f7c231b68
Thanks.
Luca Boccassi
---
From 06af59ff2f1c0a192134a097b64fce2f7c231b68 Mon Sep 17 00:00:00 2001
From: Hamdan Igbaria <hamdani@nvidia.com>
Date: Mon, 6 May 2024 14:44:19 +0300
Subject: [PATCH] net/mlx5/hws: fix action template dump
[ upstream commit 98638051a93963bde144b85e7621ca30252de384 ]
The debug print of only_term param in the action template
was printed incorrectly.
Fixes: 78580cf4e796 ("net/mlx5/hws: add debug layer")
Signed-off-by: Hamdan Igbaria <hamdani@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/hws/mlx5dr_debug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/hws/mlx5dr_debug.c b/drivers/net/mlx5/hws/mlx5dr_debug.c
index 890a761c48..092a87921d 100644
--- a/drivers/net/mlx5/hws/mlx5dr_debug.c
+++ b/drivers/net/mlx5/hws/mlx5dr_debug.c
@@ -129,7 +129,7 @@ mlx5dr_debug_dump_matcher_action_template(FILE *f, struct mlx5dr_matcher *matche
MLX5DR_DEBUG_RES_TYPE_MATCHER_ACTION_TEMPLATE,
(uint64_t)(uintptr_t)at,
(uint64_t)(uintptr_t)matcher,
- at->only_term ? 0 : 1,
+ at->only_term,
is_root ? 0 : at->num_of_action_stes,
at->num_actions);
if (ret < 0) {
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:17.200184494 +0100
+++ 0070-net-mlx5-hws-fix-action-template-dump.patch 2024-06-25 00:22:13.241186790 +0100
@@ -1 +1 @@
-From 98638051a93963bde144b85e7621ca30252de384 Mon Sep 17 00:00:00 2001
+From 06af59ff2f1c0a192134a097b64fce2f7c231b68 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 98638051a93963bde144b85e7621ca30252de384 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 5ad4ca2da5..741a725842 100644
+index 890a761c48..092a87921d 100644
@@ -22 +23 @@
-@@ -153,7 +153,7 @@ mlx5dr_debug_dump_matcher_action_template(FILE *f, struct mlx5dr_matcher *matche
+@@ -129,7 +129,7 @@ mlx5dr_debug_dump_matcher_action_template(FILE *f, struct mlx5dr_matcher *matche
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/mlx5: fix indexed pool with invalid index' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (68 preceding siblings ...)
2024-06-24 23:58 ` patch 'net/mlx5/hws: fix action template dump' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'net/mlx5: fix hash Rx queue release in flow sample' " luca.boccassi
` (9 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Haifei Luo; +Cc: Suanming Mou, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a752b66a9a502642c47cb4d0f99efbbdc63e62a5
Thanks.
Luca Boccassi
---
From a752b66a9a502642c47cb4d0f99efbbdc63e62a5 Mon Sep 17 00:00:00 2001
From: Haifei Luo <haifeil@nvidia.com>
Date: Wed, 15 May 2024 12:36:53 +0300
Subject: [PATCH] net/mlx5: fix indexed pool with invalid index
[ upstream commit 16a7b5d14e3dfb4d3d385375b94bb2f360883cd6 ]
When _mlx5_ipool_get_cache is called, idx may be invalid and
the "trunk" is NULL in this case. Assert is not correct and add
checks that if trunk is NULL or not. Return NULL If trunk is NULL.
Fixes: 42f463395f8f ("net/mlx5: support indexed pool non-lcore operations")
Signed-off-by: Haifei Luo <haifeil@nvidia.com>
Acked-by: Suanming Mou <suanmingm@nvidia.com>
---
drivers/net/mlx5/mlx5_utils.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_utils.c b/drivers/net/mlx5/mlx5_utils.c
index b295702fd4..bbe07cd7a3 100644
--- a/drivers/net/mlx5/mlx5_utils.c
+++ b/drivers/net/mlx5/mlx5_utils.c
@@ -379,7 +379,8 @@ _mlx5_ipool_get_cache(struct mlx5_indexed_pool *pool, int cidx, uint32_t idx)
idx -= 1;
trunk_idx = mlx5_trunk_idx_get(pool, idx);
trunk = lc->trunks[trunk_idx];
- MLX5_ASSERT(trunk);
+ if (!trunk)
+ return NULL;
entry_idx = idx - mlx5_trunk_idx_offset_get(pool, trunk_idx);
return &trunk->data[entry_idx * pool->cfg.size];
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:17.232911179 +0100
+++ 0071-net-mlx5-fix-indexed-pool-with-invalid-index.patch 2024-06-25 00:22:13.241186790 +0100
@@ -1 +1 @@
-From 16a7b5d14e3dfb4d3d385375b94bb2f360883cd6 Mon Sep 17 00:00:00 2001
+From a752b66a9a502642c47cb4d0f99efbbdc63e62a5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 16a7b5d14e3dfb4d3d385375b94bb2f360883cd6 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index fc03cc054b..d52119f0be 100644
+index b295702fd4..bbe07cd7a3 100644
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/mlx5: fix hash Rx queue release in flow sample' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (69 preceding siblings ...)
2024-06-24 23:58 ` patch 'net/mlx5: fix indexed pool with invalid index' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:58 ` patch 'net/mlx5: fix flow template indirect action failure' " luca.boccassi
` (8 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Jiawei Wang; +Cc: Bing Zhao, Dariusz Sosnowski, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/c8ee47f1a628a73945e85d5b7eaaf290dfeebf3e
Thanks.
Luca Boccassi
---
From c8ee47f1a628a73945e85d5b7eaaf290dfeebf3e Mon Sep 17 00:00:00 2001
From: Jiawei Wang <jiaweiw@nvidia.com>
Date: Mon, 20 May 2024 18:07:09 +0300
Subject: [PATCH] net/mlx5: fix hash Rx queue release in flow sample
[ upstream commit cf3f6ba146abe613c811a281ceadf7b22ef82ab6 ]
While the queue/RSS action was added to sample action lists,
the Rx hash queue resource was allocated in the sample action
translation to create the sample DR action later.
While there's a failure in the flow creation, the Rx hash queue
resource of the sample action list was destroyed in the wrong place.
This patch adds the checking to release the Rx hash queue
resource after the sample action release, to avoid one more
extra release if there's a failure.
Fixes: ca5eb60ecd5b ("net/mlx5: fix resource release for mirror flow")
Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Reviewed-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 1069b84157..f8431386e0 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -14882,7 +14882,8 @@ error:
SILIST_FOREACH(priv->sh->ipool[MLX5_IPOOL_MLX5_FLOW], flow->dev_handles,
handle_idx, dh, next) {
/* hrxq is union, don't clear it if the flag is not set. */
- if (dh->fate_action == MLX5_FLOW_FATE_QUEUE && dh->rix_hrxq) {
+ if (dh->fate_action == MLX5_FLOW_FATE_QUEUE && dh->rix_hrxq &&
+ !dh->dvh.rix_sample && !dh->dvh.rix_dest_array) {
mlx5_hrxq_release(dev, dh->rix_hrxq);
dh->rix_hrxq = 0;
} else if (dh->fate_action == MLX5_FLOW_FATE_SHARED_RSS) {
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:17.266755069 +0100
+++ 0072-net-mlx5-fix-hash-Rx-queue-release-in-flow-sample.patch 2024-06-25 00:22:13.257187117 +0100
@@ -1 +1 @@
-From cf3f6ba146abe613c811a281ceadf7b22ef82ab6 Mon Sep 17 00:00:00 2001
+From c8ee47f1a628a73945e85d5b7eaaf290dfeebf3e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cf3f6ba146abe613c811a281ceadf7b22ef82ab6 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 04cb9291a8..7330e13787 100644
+index 1069b84157..f8431386e0 100644
@@ -31 +32 @@
-@@ -15668,7 +15668,8 @@ error:
+@@ -14882,7 +14882,8 @@ error:
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/mlx5: fix flow template indirect action failure' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (70 preceding siblings ...)
2024-06-24 23:58 ` patch 'net/mlx5: fix hash Rx queue release in flow sample' " luca.boccassi
@ 2024-06-24 23:58 ` luca.boccassi
2024-06-24 23:59 ` patch 'net/mlx5: break flow resource release loop' " luca.boccassi
` (7 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:58 UTC (permalink / raw)
To: Maayan Kashani; +Cc: Suanming Mou, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/42e1eb6a45859dbc9b51f80ef7344747dfbaef78
Thanks.
Luca Boccassi
---
From 42e1eb6a45859dbc9b51f80ef7344747dfbaef78 Mon Sep 17 00:00:00 2001
From: Maayan Kashani <mkashani@nvidia.com>
Date: Sun, 26 May 2024 16:22:44 +0300
Subject: [PATCH] net/mlx5: fix flow template indirect action failure
[ upstream commit b79ac509105a2cf9fce1734a6798632a0414cd1c ]
For indirect action type, on error case the function jumped to err
but returned zero cause rte_errno was not initialized before the jump.
It caused no error in table creation.
In case reaching an error, if rte_errno is not initialized,
it will be set to EINVAL.
Now table creation should fail if the translate of the action fails.
Added driver log warnings so it can be easy to track failure on shared
actions translate.
Fixes: 7ab3962d2d2b ("net/mlx5: add indirect HW steering action")
Signed-off-by: Maayan Kashani <mkashani@nvidia.com>
Acked-by: Suanming Mou <suanmingm@nvidia.com>
---
drivers/net/mlx5/mlx5_flow_hw.c | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index fd3e51bf0d..5333495a59 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -769,15 +769,19 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev,
if (!shared_rss || __flow_hw_act_data_shared_rss_append
(priv, acts,
(enum rte_flow_action_type)MLX5_RTE_FLOW_ACTION_TYPE_RSS,
- action_src, action_dst, idx, shared_rss))
+ action_src, action_dst, idx, shared_rss)) {
+ DRV_LOG(WARNING, "Indirect RSS action index %d translate failed", act_idx);
return -1;
+ }
break;
case MLX5_INDIRECT_ACTION_TYPE_COUNT:
if (__flow_hw_act_data_shared_cnt_append(priv, acts,
(enum rte_flow_action_type)
MLX5_RTE_FLOW_ACTION_TYPE_COUNT,
- action_src, action_dst, act_idx))
+ action_src, action_dst, act_idx)) {
+ DRV_LOG(WARNING, "Indirect count action translate failed");
return -1;
+ }
break;
case MLX5_INDIRECT_ACTION_TYPE_AGE:
/* Not supported, prevent by validate function. */
@@ -785,15 +789,19 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev,
break;
case MLX5_INDIRECT_ACTION_TYPE_CT:
if (flow_hw_ct_compile(dev, MLX5_HW_INV_QUEUE,
- idx, &acts->rule_acts[action_dst]))
+ idx, &acts->rule_acts[action_dst])) {
+ DRV_LOG(WARNING, "Indirect CT action translate failed");
return -1;
+ }
break;
case MLX5_INDIRECT_ACTION_TYPE_METER_MARK:
if (__flow_hw_act_data_shared_mtr_append(priv, acts,
(enum rte_flow_action_type)
MLX5_RTE_FLOW_ACTION_TYPE_METER_MARK,
- action_src, action_dst, idx))
+ action_src, action_dst, idx)) {
+ DRV_LOG(WARNING, "Indirect meter mark action translate failed");
return -1;
+ }
break;
default:
DRV_LOG(WARNING, "Unsupported shared action type:%d", type);
@@ -1758,6 +1766,9 @@ __flow_hw_actions_translate(struct rte_eth_dev *dev,
}
return 0;
err:
+ /* If rte_errno was not initialized and reached error state. */
+ if (!rte_errno)
+ rte_errno = EINVAL;
err = rte_errno;
__flow_hw_action_template_destroy(dev, acts);
return rte_flow_error_set(error, err,
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:17.314201284 +0100
+++ 0073-net-mlx5-fix-flow-template-indirect-action-failure.patch 2024-06-25 00:22:13.265187280 +0100
@@ -1 +1 @@
-From b79ac509105a2cf9fce1734a6798632a0414cd1c Mon Sep 17 00:00:00 2001
+From 42e1eb6a45859dbc9b51f80ef7344747dfbaef78 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b79ac509105a2cf9fce1734a6798632a0414cd1c ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index d9140dbf23..463f7b87a3 100644
+index fd3e51bf0d..5333495a59 100644
@@ -29 +30 @@
-@@ -1106,15 +1106,19 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev,
+@@ -769,15 +769,19 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev,
@@ -51 +52 @@
-@@ -1122,15 +1126,19 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev,
+@@ -785,15 +789,19 @@ flow_hw_shared_action_translate(struct rte_eth_dev *dev,
@@ -71,3 +72,3 @@
- case MLX5_INDIRECT_ACTION_TYPE_QUOTA:
- flow_hw_construct_quota(priv, &acts->rule_acts[action_dst], idx);
-@@ -2645,6 +2653,9 @@ __flow_hw_actions_translate(struct rte_eth_dev *dev,
+ default:
+ DRV_LOG(WARNING, "Unsupported shared action type:%d", type);
+@@ -1758,6 +1766,9 @@ __flow_hw_actions_translate(struct rte_eth_dev *dev,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/mlx5: break flow resource release loop' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (71 preceding siblings ...)
2024-06-24 23:58 ` patch 'net/mlx5: fix flow template indirect action failure' " luca.boccassi
@ 2024-06-24 23:59 ` luca.boccassi
2024-06-24 23:59 ` patch 'net/mlx5: fix access to flow template operations' " luca.boccassi
` (6 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:59 UTC (permalink / raw)
To: Alexander Kozyrev; +Cc: Dariusz Sosnowski, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/68b68c76e1f2f9112d5016c732a00e97a0e5460f
Thanks.
Luca Boccassi
---
From 68b68c76e1f2f9112d5016c732a00e97a0e5460f Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev@nvidia.com>
Date: Thu, 30 May 2024 00:46:32 +0300
Subject: [PATCH] net/mlx5: break flow resource release loop
[ upstream commit 4fcb7a05e38172aed60f87a6287bb2ee3d9828fd ]
There is a loop inside the flow_hw_resource_release() function
that tries to free all the template patterns and tables until they
are successfully released. But some of the tables may be still in use
in case of the ungraceful application termination. Which causes the
forever loop in the app on the exit. Don't wait for the tables release
and try them to free only once and proceed with the exit.
Fixes: d1559d66ed2d ("net/mlx5: add table management")
Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
drivers/net/mlx5/mlx5_flow_hw.c | 44 +++++++++++++++++++--------------
1 file changed, 26 insertions(+), 18 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index 5333495a59..c902b35f0b 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -3407,7 +3407,7 @@ flow_hw_table_destroy(struct rte_eth_dev *dev,
return rte_flow_error_set(error, EBUSY,
RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
NULL,
- "table in using");
+ "table is in use");
}
LIST_REMOVE(table, next);
for (i = 0; i < table->nb_item_templates; i++)
@@ -4660,7 +4660,7 @@ flow_hw_actions_template_destroy(struct rte_eth_dev *dev __rte_unused,
return rte_flow_error_set(error, EBUSY,
RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
NULL,
- "action template in using");
+ "action template is in use");
}
LIST_REMOVE(template, next);
if (template->tmpl)
@@ -5013,7 +5013,7 @@ flow_hw_pattern_template_destroy(struct rte_eth_dev *dev __rte_unused,
return rte_flow_error_set(error, EBUSY,
RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
NULL,
- "item template in using");
+ "item template is in use");
}
LIST_REMOVE(template, next);
claim_zero(mlx5dr_match_template_destroy(template->mt));
@@ -7458,9 +7458,9 @@ void
flow_hw_resource_release(struct rte_eth_dev *dev)
{
struct mlx5_priv *priv = dev->data->dev_private;
- struct rte_flow_template_table *tbl;
- struct rte_flow_pattern_template *it;
- struct rte_flow_actions_template *at;
+ struct rte_flow_template_table *tbl, *temp_tbl;
+ struct rte_flow_pattern_template *it, *temp_it;
+ struct rte_flow_actions_template *at, *temp_at;
uint32_t i;
if (!priv->dr_ctx)
@@ -7470,21 +7470,29 @@ flow_hw_resource_release(struct rte_eth_dev *dev)
flow_hw_cleanup_ctrl_fdb_tables(dev);
flow_hw_cleanup_tx_repr_tagging(dev);
flow_hw_cleanup_ctrl_rx_tables(dev);
- while (!LIST_EMPTY(&priv->flow_hw_tbl_ongo)) {
- tbl = LIST_FIRST(&priv->flow_hw_tbl_ongo);
- flow_hw_table_destroy(dev, tbl, NULL);
+ tbl = LIST_FIRST(&priv->flow_hw_tbl_ongo);
+ while (tbl) {
+ temp_tbl = LIST_NEXT(tbl, next);
+ claim_zero(flow_hw_table_destroy(dev, tbl, NULL));
+ tbl = temp_tbl;
}
- while (!LIST_EMPTY(&priv->flow_hw_tbl)) {
- tbl = LIST_FIRST(&priv->flow_hw_tbl);
- flow_hw_table_destroy(dev, tbl, NULL);
+ tbl = LIST_FIRST(&priv->flow_hw_tbl);
+ while (tbl) {
+ temp_tbl = LIST_NEXT(tbl, next);
+ claim_zero(flow_hw_table_destroy(dev, tbl, NULL));
+ tbl = temp_tbl;
}
- while (!LIST_EMPTY(&priv->flow_hw_itt)) {
- it = LIST_FIRST(&priv->flow_hw_itt);
- flow_hw_pattern_template_destroy(dev, it, NULL);
+ it = LIST_FIRST(&priv->flow_hw_itt);
+ while (it) {
+ temp_it = LIST_NEXT(it, next);
+ claim_zero(flow_hw_pattern_template_destroy(dev, it, NULL));
+ it = temp_it;
}
- while (!LIST_EMPTY(&priv->flow_hw_at)) {
- at = LIST_FIRST(&priv->flow_hw_at);
- flow_hw_actions_template_destroy(dev, at, NULL);
+ at = LIST_FIRST(&priv->flow_hw_at);
+ while (at) {
+ temp_at = LIST_NEXT(at, next);
+ claim_zero(flow_hw_actions_template_destroy(dev, at, NULL));
+ at = temp_at;
}
for (i = 0; i < MLX5_HW_ACTION_FLAG_MAX; i++) {
if (priv->hw_drop[i])
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:17.360608425 +0100
+++ 0074-net-mlx5-break-flow-resource-release-loop.patch 2024-06-25 00:22:13.273187443 +0100
@@ -1 +1 @@
-From 4fcb7a05e38172aed60f87a6287bb2ee3d9828fd Mon Sep 17 00:00:00 2001
+From 68b68c76e1f2f9112d5016c732a00e97a0e5460f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4fcb7a05e38172aed60f87a6287bb2ee3d9828fd ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -19,2 +20,2 @@
- drivers/net/mlx5/mlx5_flow_hw.c | 54 +++++++++++++++++++--------------
- 1 file changed, 32 insertions(+), 22 deletions(-)
+ drivers/net/mlx5/mlx5_flow_hw.c | 44 +++++++++++++++++++--------------
+ 1 file changed, 26 insertions(+), 18 deletions(-)
@@ -23 +24 @@
-index e8c06387f8..53c6cc5961 100644
+index 5333495a59..c902b35f0b 100644
@@ -26 +27 @@
-@@ -5062,7 +5062,7 @@ flow_hw_table_destroy(struct rte_eth_dev *dev,
+@@ -3407,7 +3407,7 @@ flow_hw_table_destroy(struct rte_eth_dev *dev,
@@ -30 +31 @@
-- "table in use");
+- "table in using");
@@ -35 +36 @@
-@@ -7362,7 +7362,7 @@ flow_hw_actions_template_destroy(struct rte_eth_dev *dev,
+@@ -4660,7 +4660,7 @@ flow_hw_actions_template_destroy(struct rte_eth_dev *dev __rte_unused,
@@ -42,3 +43,3 @@
- if (template->action_flags & flag)
- mlx5_free_srh_flex_parser(dev);
-@@ -7986,7 +7986,7 @@ flow_hw_pattern_template_destroy(struct rte_eth_dev *dev,
+ LIST_REMOVE(template, next);
+ if (template->tmpl)
+@@ -5013,7 +5013,7 @@ flow_hw_pattern_template_destroy(struct rte_eth_dev *dev __rte_unused,
@@ -51,3 +52,3 @@
- if (template->item_flags & (MLX5_FLOW_ITEM_OUTER_IPV6_ROUTING_EXT |
- MLX5_FLOW_ITEM_INNER_IPV6_ROUTING_EXT))
-@@ -10787,10 +10787,10 @@ void
+ LIST_REMOVE(template, next);
+ claim_zero(mlx5dr_match_template_destroy(template->mt));
+@@ -7458,9 +7458,9 @@ void
@@ -60 +60,0 @@
-- struct mlx5_flow_group *grp;
@@ -64 +63,0 @@
-+ struct mlx5_flow_group *grp, *temp_grp;
@@ -68 +67,2 @@
-@@ -10802,25 +10802,35 @@ flow_hw_resource_release(struct rte_eth_dev *dev)
+@@ -7470,21 +7470,29 @@ flow_hw_resource_release(struct rte_eth_dev *dev)
+ flow_hw_cleanup_ctrl_fdb_tables(dev);
@@ -71,10 +70,0 @@
- flow_hw_action_template_drop_release(dev);
-- while (!LIST_EMPTY(&priv->flow_hw_grp)) {
-- grp = LIST_FIRST(&priv->flow_hw_grp);
-- flow_hw_group_unset_miss_group(dev, grp, NULL);
-+ grp = LIST_FIRST(&priv->flow_hw_grp);
-+ while (grp) {
-+ temp_grp = LIST_NEXT(grp, next);
-+ claim_zero(flow_hw_group_unset_miss_group(dev, grp, NULL));
-+ grp = temp_grp;
- }
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/mlx5: fix access to flow template operations' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (72 preceding siblings ...)
2024-06-24 23:59 ` patch 'net/mlx5: break flow resource release loop' " luca.boccassi
@ 2024-06-24 23:59 ` luca.boccassi
2024-06-24 23:59 ` patch 'net/mlx5: support jump in meter hierarchy' " luca.boccassi
` (5 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:59 UTC (permalink / raw)
To: Gregory Etelson; +Cc: Dariusz Sosnowski, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/739bd81a4664d03fc0357dab0de07e87d8896f4a
Thanks.
Luca Boccassi
---
From 739bd81a4664d03fc0357dab0de07e87d8896f4a Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Sun, 2 Jun 2024 09:00:49 +0300
Subject: [PATCH] net/mlx5: fix access to flow template operations
[ upstream commit acbb57b25d30147d1fd0edf1e8314a0a3d3c38c9 ]
PMD activates HWS template API context during port configuration.
There was no validation that the HWS context was activated before
the PMD tried to process other template function calls.
The patch adds HWS context validation.
Fixes: b401400db24e ("net/mlx5: add port flow configuration")
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
drivers/net/mlx5/mlx5_flow_hw.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index c902b35f0b..45709c9fd2 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -56,6 +56,20 @@
#define MLX5_HW_VLAN_PUSH_VID_IDX 1
#define MLX5_HW_VLAN_PUSH_PCP_IDX 2
+static bool
+mlx5_hw_ctx_validate(const struct rte_eth_dev *dev, struct rte_flow_error *error)
+{
+ const struct mlx5_priv *priv = dev->data->dev_private;
+
+ if (!priv->dr_ctx) {
+ rte_flow_error_set(error, EINVAL,
+ RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
+ "non-template flow engine was not configured");
+ return false;
+ }
+ return true;
+}
+
static int flow_hw_flush_all_ctrl_flows(struct rte_eth_dev *dev);
static int flow_hw_translate_group(struct rte_eth_dev *dev,
const struct mlx5_flow_template_table_cfg *cfg,
@@ -3965,6 +3979,8 @@ mlx5_flow_hw_actions_validate(struct rte_eth_dev *dev,
bool actions_end = false;
int ret;
+ if (!mlx5_hw_ctx_validate(dev, error))
+ return -rte_errno;
/* FDB actions are only valid to proxy port. */
if (attr->transfer && (!priv->sh->config.dv_esw_en || !priv->master))
return rte_flow_error_set(error, EINVAL,
@@ -4717,6 +4733,8 @@ flow_hw_pattern_validate(struct rte_eth_dev *dev,
bool items_end = false;
uint32_t tag_bitmap = 0;
+ if (!mlx5_hw_ctx_validate(dev, error))
+ return -rte_errno;
if (!attr->ingress && !attr->egress && !attr->transfer)
return rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ATTR, NULL,
"at least one of the direction attributes"
@@ -7975,6 +7993,9 @@ flow_hw_action_handle_create(struct rte_eth_dev *dev, uint32_t queue,
bool push = true;
bool aso = false;
+ if (!mlx5_hw_ctx_validate(dev, error))
+ return NULL;
+
if (attr) {
MLX5_ASSERT(queue != MLX5_HW_INV_QUEUE);
if (unlikely(!priv->hw_q[queue].job_idx)) {
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:17.404405798 +0100
+++ 0075-net-mlx5-fix-access-to-flow-template-operations.patch 2024-06-25 00:22:13.281187606 +0100
@@ -1 +1 @@
-From acbb57b25d30147d1fd0edf1e8314a0a3d3c38c9 Mon Sep 17 00:00:00 2001
+From 739bd81a4664d03fc0357dab0de07e87d8896f4a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit acbb57b25d30147d1fd0edf1e8314a0a3d3c38c9 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -19,2 +20,2 @@
- drivers/net/mlx5/mlx5_flow_hw.c | 22 ++++++++++++++++++++++
- 1 file changed, 22 insertions(+)
+ drivers/net/mlx5/mlx5_flow_hw.c | 21 +++++++++++++++++++++
+ 1 file changed, 21 insertions(+)
@@ -23 +24 @@
-index 53c6cc5961..e97afb0c86 100644
+index c902b35f0b..45709c9fd2 100644
@@ -26,3 +27,3 @@
-@@ -206,6 +206,20 @@ mlx5_destroy_multi_pattern_segment(struct mlx5_multi_pattern_segment *segment);
- static __rte_always_inline enum mlx5_indirect_list_type
- flow_hw_inlist_type_get(const struct rte_flow_action *actions);
+@@ -56,6 +56,20 @@
+ #define MLX5_HW_VLAN_PUSH_VID_IDX 1
+ #define MLX5_HW_VLAN_PUSH_PCP_IDX 2
@@ -44,4 +45,5 @@
- static __rte_always_inline int
- mlx5_multi_pattern_reformat_to_index(enum mlx5dr_action_type type)
- {
-@@ -6399,6 +6413,8 @@ mlx5_flow_hw_actions_validate(struct rte_eth_dev *dev,
+ static int flow_hw_flush_all_ctrl_flows(struct rte_eth_dev *dev);
+ static int flow_hw_translate_group(struct rte_eth_dev *dev,
+ const struct mlx5_flow_template_table_cfg *cfg,
+@@ -3965,6 +3979,8 @@ mlx5_flow_hw_actions_validate(struct rte_eth_dev *dev,
+ bool actions_end = false;
@@ -49 +50,0 @@
- const struct rte_flow_action_ipv6_ext_remove *remove_data;
@@ -56 +57,2 @@
-@@ -7528,6 +7544,8 @@ flow_hw_pattern_validate(struct rte_eth_dev *dev,
+@@ -4717,6 +4733,8 @@ flow_hw_pattern_validate(struct rte_eth_dev *dev,
+ bool items_end = false;
@@ -58 +59,0 @@
- int ret;
@@ -65 +66,2 @@
-@@ -11259,6 +11277,8 @@ flow_hw_action_handle_create(struct rte_eth_dev *dev, uint32_t queue,
+@@ -7975,6 +7993,9 @@ flow_hw_action_handle_create(struct rte_eth_dev *dev, uint32_t queue,
+ bool push = true;
@@ -67,10 +68,0 @@
- bool force_job = action->type == RTE_FLOW_ACTION_TYPE_METER_MARK;
-
-+ if (!mlx5_hw_ctx_validate(dev, error))
-+ return NULL;
- if (attr || force_job) {
- job = flow_hw_action_job_init(priv, queue, NULL, user_data,
- NULL, MLX5_HW_Q_JOB_TYPE_CREATE,
-@@ -12541,6 +12561,8 @@ flow_hw_async_action_list_handle_create(struct rte_eth_dev *dev, uint32_t queue,
- }
- };
@@ -80,3 +72,4 @@
- if (!actions) {
- rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ACTION,
- NULL, "No action list");
++
+ if (attr) {
+ MLX5_ASSERT(queue != MLX5_HW_INV_QUEUE);
+ if (unlikely(!priv->hw_q[queue].job_idx)) {
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/mlx5: support jump in meter hierarchy' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (73 preceding siblings ...)
2024-06-24 23:59 ` patch 'net/mlx5: fix access to flow template operations' " luca.boccassi
@ 2024-06-24 23:59 ` luca.boccassi
2024-06-24 23:59 ` patch 'net/mlx5: fix crash on counter pool destroy' " luca.boccassi
` (4 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:59 UTC (permalink / raw)
To: Shun Hao; +Cc: Suanming Mou, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/aadaf7fe72821e2d27cbf4f95c25b909ededc49d
Thanks.
Luca Boccassi
---
From aadaf7fe72821e2d27cbf4f95c25b909ededc49d Mon Sep 17 00:00:00 2001
From: Shun Hao <shunh@nvidia.com>
Date: Tue, 4 Jun 2024 05:51:56 +0300
Subject: [PATCH] net/mlx5: support jump in meter hierarchy
[ upstream commit dc1d92a4f547f8af6eb9b8824257ab3fd8dfbc77 ]
Currently in meter hierarchy, only meter action is supported for green
and yellow policy flow.
This patch adds support of jump action for green or yellow policy flow.
Fixes: 96ca87da4f46 ("net/mlx5: validate yellow meter action")
Signed-off-by: Shun Hao <shunh@nvidia.com>
Acked-by: Suanming Mou <suanmingm@nvidia.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 36 ++++++++++++++++++---------------
1 file changed, 20 insertions(+), 16 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index f8431386e0..2bdca754bc 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -17173,7 +17173,7 @@ __flow_dv_create_policy_matcher(struct rte_eth_dev *dev,
static int
__flow_dv_create_domain_policy_rules(struct rte_eth_dev *dev,
struct mlx5_flow_meter_sub_policy *sub_policy,
- uint8_t egress, uint8_t transfer, bool match_src_port,
+ uint8_t egress, uint8_t transfer, bool *match_src_port,
struct mlx5_meter_policy_acts acts[RTE_COLORS])
{
struct mlx5_priv *priv = dev->data->dev_private;
@@ -17188,6 +17188,7 @@ __flow_dv_create_domain_policy_rules(struct rte_eth_dev *dev,
.reserved = 0,
};
int i;
+ uint16_t priority;
int ret = mlx5_flow_get_reg_id(dev, MLX5_MTR_COLOR, 0, &flow_err);
struct mlx5_sub_policy_color_rule *color_rule;
struct mlx5_sub_policy_color_rule *tmp_rules[RTE_COLORS] = {NULL};
@@ -17222,12 +17223,12 @@ __flow_dv_create_domain_policy_rules(struct rte_eth_dev *dev,
TAILQ_INSERT_TAIL(&sub_policy->color_rules[i],
color_rule, next_port);
color_rule->src_port = priv->representor_id;
- /* No use. */
- attr.priority = i;
+ priority = (match_src_port[i] == match_src_port[RTE_COLOR_GREEN]) ?
+ MLX5_MTR_POLICY_MATCHER_PRIO : (MLX5_MTR_POLICY_MATCHER_PRIO + 1);
/* Create matchers for colors. */
if (__flow_dv_create_policy_matcher(dev, color_reg_c_idx,
- MLX5_MTR_POLICY_MATCHER_PRIO, sub_policy,
- &attr, match_src_port, NULL,
+ priority, sub_policy,
+ &attr, match_src_port[i], NULL,
&color_rule->matcher, &flow_err)) {
DRV_LOG(ERR, "Failed to create color%u matcher.", i);
goto err_exit;
@@ -17237,7 +17238,7 @@ __flow_dv_create_domain_policy_rules(struct rte_eth_dev *dev,
color_reg_c_idx, (enum rte_color)i,
color_rule->matcher,
acts[i].actions_n, acts[i].dv_actions,
- match_src_port, NULL, &color_rule->rule,
+ match_src_port[i], NULL, &color_rule->rule,
&attr)) {
DRV_LOG(ERR, "Failed to create color%u rule.", i);
goto err_exit;
@@ -17285,7 +17286,7 @@ __flow_dv_create_policy_acts_rules(struct rte_eth_dev *dev,
uint8_t egress = (domain == MLX5_MTR_DOMAIN_EGRESS) ? 1 : 0;
uint8_t transfer = (domain == MLX5_MTR_DOMAIN_TRANSFER) ? 1 : 0;
bool mtr_first = egress || (transfer && priv->representor_id != UINT16_MAX);
- bool match_src_port = false;
+ bool match_src_port[RTE_COLORS] = {false};
int i;
/* If RSS or Queue, no previous actions / rules is created. */
@@ -17356,7 +17357,7 @@ __flow_dv_create_policy_acts_rules(struct rte_eth_dev *dev,
acts[i].dv_actions[acts[i].actions_n] =
port_action->action;
acts[i].actions_n++;
- match_src_port = true;
+ match_src_port[i] = true;
break;
case MLX5_FLOW_FATE_DROP:
case MLX5_FLOW_FATE_JUMP:
@@ -17408,7 +17409,7 @@ __flow_dv_create_policy_acts_rules(struct rte_eth_dev *dev,
acts[i].dv_actions[acts[i].actions_n++] =
tbl_data->jump.action;
if (mtr_policy->act_cnt[i].modify_hdr)
- match_src_port = !!transfer;
+ match_src_port[i] = !!transfer;
break;
default:
/*Queue action do nothing*/
@@ -17422,9 +17423,9 @@ __flow_dv_create_policy_acts_rules(struct rte_eth_dev *dev,
"Failed to create policy rules per domain.");
goto err_exit;
}
- if (match_src_port) {
- mtr_policy->match_port = match_src_port;
- mtr_policy->hierarchy_match_port = match_src_port;
+ if (match_src_port[RTE_COLOR_GREEN] || match_src_port[RTE_COLOR_YELLOW]) {
+ mtr_policy->match_port = 1;
+ mtr_policy->hierarchy_match_port = 1;
}
return 0;
err_exit:
@@ -17486,6 +17487,7 @@ __flow_dv_create_domain_def_policy(struct rte_eth_dev *dev, uint32_t domain)
uint8_t egress, transfer;
struct rte_flow_error error;
struct mlx5_meter_policy_acts acts[RTE_COLORS];
+ bool match_src_port[RTE_COLORS] = {false};
int ret;
egress = (domain == MLX5_MTR_DOMAIN_EGRESS) ? 1 : 0;
@@ -17561,7 +17563,7 @@ __flow_dv_create_domain_def_policy(struct rte_eth_dev *dev, uint32_t domain)
/* Create default policy rules. */
ret = __flow_dv_create_domain_policy_rules(dev,
&def_policy->sub_policy,
- egress, transfer, false, acts);
+ egress, transfer, match_src_port, acts);
if (ret) {
DRV_LOG(ERR, "Failed to create default policy rules.");
goto def_policy_error;
@@ -19142,11 +19144,13 @@ flow_dv_validate_mtr_policy_acts(struct rte_eth_dev *dev,
}
}
if (next_mtr && *policy_mode == MLX5_MTR_POLICY_MODE_ALL) {
- if (!(action_flags[RTE_COLOR_GREEN] & action_flags[RTE_COLOR_YELLOW] &
- MLX5_FLOW_ACTION_METER_WITH_TERMINATED_POLICY))
+ uint64_t hierarchy_type_flag =
+ MLX5_FLOW_ACTION_METER_WITH_TERMINATED_POLICY | MLX5_FLOW_ACTION_JUMP;
+ if (!(action_flags[RTE_COLOR_GREEN] & hierarchy_type_flag) ||
+ !(action_flags[RTE_COLOR_YELLOW] & hierarchy_type_flag))
return -rte_mtr_error_set(error, EINVAL, RTE_MTR_ERROR_TYPE_METER_POLICY,
NULL,
- "Meter hierarchy supports meter action only.");
+ "Unsupported action in meter hierarchy.");
}
/* If both colors have RSS, the attributes should be the same. */
if (flow_dv_mtr_policy_rss_compare(rss_color[RTE_COLOR_GREEN],
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:17.447954111 +0100
+++ 0076-net-mlx5-support-jump-in-meter-hierarchy.patch 2024-06-25 00:22:13.297187932 +0100
@@ -1 +1 @@
-From dc1d92a4f547f8af6eb9b8824257ab3fd8dfbc77 Mon Sep 17 00:00:00 2001
+From aadaf7fe72821e2d27cbf4f95c25b909ededc49d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit dc1d92a4f547f8af6eb9b8824257ab3fd8dfbc77 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 99abb2f2fb..220d92b1a7 100644
+index f8431386e0..2bdca754bc 100644
@@ -23 +24 @@
-@@ -17963,7 +17963,7 @@ __flow_dv_create_policy_matcher(struct rte_eth_dev *dev,
+@@ -17173,7 +17173,7 @@ __flow_dv_create_policy_matcher(struct rte_eth_dev *dev,
@@ -32 +33 @@
-@@ -17978,6 +17978,7 @@ __flow_dv_create_domain_policy_rules(struct rte_eth_dev *dev,
+@@ -17188,6 +17188,7 @@ __flow_dv_create_domain_policy_rules(struct rte_eth_dev *dev,
@@ -40 +41 @@
-@@ -18012,12 +18013,12 @@ __flow_dv_create_domain_policy_rules(struct rte_eth_dev *dev,
+@@ -17222,12 +17223,12 @@ __flow_dv_create_domain_policy_rules(struct rte_eth_dev *dev,
@@ -57 +58 @@
-@@ -18027,7 +18028,7 @@ __flow_dv_create_domain_policy_rules(struct rte_eth_dev *dev,
+@@ -17237,7 +17238,7 @@ __flow_dv_create_domain_policy_rules(struct rte_eth_dev *dev,
@@ -66 +67 @@
-@@ -18075,7 +18076,7 @@ __flow_dv_create_policy_acts_rules(struct rte_eth_dev *dev,
+@@ -17285,7 +17286,7 @@ __flow_dv_create_policy_acts_rules(struct rte_eth_dev *dev,
@@ -75 +76 @@
-@@ -18146,7 +18147,7 @@ __flow_dv_create_policy_acts_rules(struct rte_eth_dev *dev,
+@@ -17356,7 +17357,7 @@ __flow_dv_create_policy_acts_rules(struct rte_eth_dev *dev,
@@ -84 +85 @@
-@@ -18198,7 +18199,7 @@ __flow_dv_create_policy_acts_rules(struct rte_eth_dev *dev,
+@@ -17408,7 +17409,7 @@ __flow_dv_create_policy_acts_rules(struct rte_eth_dev *dev,
@@ -93 +94 @@
-@@ -18212,9 +18213,9 @@ __flow_dv_create_policy_acts_rules(struct rte_eth_dev *dev,
+@@ -17422,9 +17423,9 @@ __flow_dv_create_policy_acts_rules(struct rte_eth_dev *dev,
@@ -106 +107 @@
-@@ -18276,6 +18277,7 @@ __flow_dv_create_domain_def_policy(struct rte_eth_dev *dev, uint32_t domain)
+@@ -17486,6 +17487,7 @@ __flow_dv_create_domain_def_policy(struct rte_eth_dev *dev, uint32_t domain)
@@ -114 +115 @@
-@@ -18351,7 +18353,7 @@ __flow_dv_create_domain_def_policy(struct rte_eth_dev *dev, uint32_t domain)
+@@ -17561,7 +17563,7 @@ __flow_dv_create_domain_def_policy(struct rte_eth_dev *dev, uint32_t domain)
@@ -123 +124 @@
-@@ -19934,11 +19936,13 @@ flow_dv_validate_mtr_policy_acts(struct rte_eth_dev *dev,
+@@ -19142,11 +19144,13 @@ flow_dv_validate_mtr_policy_acts(struct rte_eth_dev *dev,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/mlx5: fix crash on counter pool destroy' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (74 preceding siblings ...)
2024-06-24 23:59 ` patch 'net/mlx5: support jump in meter hierarchy' " luca.boccassi
@ 2024-06-24 23:59 ` luca.boccassi
2024-06-24 23:59 ` patch 'test/crypto: fix enqueue/dequeue callback case' " luca.boccassi
` (3 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:59 UTC (permalink / raw)
To: Maayan Kashani; +Cc: Dariusz Sosnowski, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e12b4a47badb24b5b69c60fad22653aee3ee8869
Thanks.
Luca Boccassi
---
From e12b4a47badb24b5b69c60fad22653aee3ee8869 Mon Sep 17 00:00:00 2001
From: Maayan Kashani <mkashani@nvidia.com>
Date: Sun, 9 Jun 2024 14:01:02 +0300
Subject: [PATCH] net/mlx5: fix crash on counter pool destroy
[ upstream commit 3331d59551cdecd2db3a2064a7d6e4bf9396b849 ]
If the counter pool was not added to list,
and an error state was reached,
on attempt to destroy the counter pool,
segmentation fault was received during list remove action.
Added a check to verify the list is not empty before trying to
remove the cpool from the list.
Invalid state, leading to segfault,
can also be reached in the following scenario:
1. mlx5_hws_cnt_pool_init() does a zmalloc and initializes most
of the fields of cpool, but does not initialize the next field.
2. mlx5_hws_cnt_pool_dcs_alloc() attempts to bulk allocate flow counters.
If this fails, we skip straight to 4.
In HW, this can fail simply if FW doesn't support bulk flow
counter allocation.
3. Right before the goto error, we insert the cpool to the hws_cpool_list.
This is where the next field is initialized.
4. mlx5_hws_cnt_pool_destroy() assumes the cpool's next field
is initialized and SEGVs if not.
So, added a guard against cases where the entry was uninitialized
(checking le_prev field is not NULL).
Fixes: 6ac2104ac125 ("net/mlx5: fix counter query during port close")
Signed-off-by: Maayan Kashani <mkashani@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
drivers/net/mlx5/mlx5_hws_cnt.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_hws_cnt.c b/drivers/net/mlx5/mlx5_hws_cnt.c
index d4ef44d1a3..8415aa411f 100644
--- a/drivers/net/mlx5/mlx5_hws_cnt.c
+++ b/drivers/net/mlx5/mlx5_hws_cnt.c
@@ -717,7 +717,9 @@ mlx5_hws_cnt_pool_destroy(struct mlx5_dev_ctx_shared *sh,
* Maybe blocked for at most 200ms here.
*/
rte_spinlock_lock(&sh->cpool_lock);
- LIST_REMOVE(cpool, next);
+ /* Try to remove cpool before it was added to list caused segfault. */
+ if (!LIST_EMPTY(&sh->hws_cpool_list) && cpool->next.le_prev)
+ LIST_REMOVE(cpool, next);
rte_spinlock_unlock(&sh->cpool_lock);
if (--sh->cnt_svc->refcnt == 0)
mlx5_hws_cnt_svc_deinit(sh);
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:17.493745565 +0100
+++ 0077-net-mlx5-fix-crash-on-counter-pool-destroy.patch 2024-06-25 00:22:13.297187932 +0100
@@ -1 +1 @@
-From 3331d59551cdecd2db3a2064a7d6e4bf9396b849 Mon Sep 17 00:00:00 2001
+From e12b4a47badb24b5b69c60fad22653aee3ee8869 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3331d59551cdecd2db3a2064a7d6e4bf9396b849 ]
+
@@ -31 +32,0 @@
-Cc: stable@dpdk.org
@@ -40 +41 @@
-index 36d422bdfa..a46a4bd94e 100644
+index d4ef44d1a3..8415aa411f 100644
@@ -43 +44 @@
-@@ -718,7 +718,9 @@ mlx5_hws_cnt_pool_destroy(struct mlx5_dev_ctx_shared *sh,
+@@ -717,7 +717,9 @@ mlx5_hws_cnt_pool_destroy(struct mlx5_dev_ctx_shared *sh,
@@ -52,2 +53,2 @@
- if (cpool->cfg.host_cpool == NULL) {
- if (--sh->cnt_svc->refcnt == 0)
+ if (--sh->cnt_svc->refcnt == 0)
+ mlx5_hws_cnt_svc_deinit(sh);
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'test/crypto: fix enqueue/dequeue callback case' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (75 preceding siblings ...)
2024-06-24 23:59 ` patch 'net/mlx5: fix crash on counter pool destroy' " luca.boccassi
@ 2024-06-24 23:59 ` luca.boccassi
2024-06-24 23:59 ` patch 'telemetry: lower log level on socket error' " luca.boccassi
` (2 subsequent siblings)
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:59 UTC (permalink / raw)
To: Akhil Goyal; +Cc: Ganapati Kundapura, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/5cbc25e40f540b3518433c420f947ce3842a8cfe
Thanks.
Luca Boccassi
---
From 5cbc25e40f540b3518433c420f947ce3842a8cfe Mon Sep 17 00:00:00 2001
From: Akhil Goyal <gakhil@marvell.com>
Date: Fri, 24 May 2024 22:43:27 +0530
Subject: [PATCH] test/crypto: fix enqueue/dequeue callback case
[ upstream commit 4ad17a1c8fb336a182f2c1b62127d8871d45f804 ]
The enqueue/dequeue callback test cases were using the
test_null_burst_operation() for doing enqueue/dequeue.
But this function is only designed to be run for NULL PMD.
Hence for other PMDs, the callback was not getting called.
Now, separate processing thread is removed, instead NULL crypto
operation is created and processed so that callbacks are called.
Also added a check on a global static variable to verify
that the callback is actually called and fail the case if
it is not getting called.
Fixes: 5523a75af539 ("test/crypto: add case for enqueue/dequeue callbacks")
Signed-off-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Ganapati Kundapura <ganapati.kundapura@intel.com>
---
app/test/test_cryptodev.c | 106 ++++++++++++++++++++++++++++++++------
1 file changed, 89 insertions(+), 17 deletions(-)
diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index b75edb2f2b..96cd9ef7dc 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -194,6 +194,8 @@ post_process_raw_dp_op(void *user_data, uint32_t index __rte_unused,
static struct crypto_testsuite_params testsuite_params = { NULL };
struct crypto_testsuite_params *p_testsuite_params = &testsuite_params;
static struct crypto_unittest_params unittest_params;
+static bool enq_cb_called;
+static bool deq_cb_called;
void
process_sym_raw_dp_op(uint8_t dev_id, uint16_t qp_id,
@@ -12607,6 +12609,7 @@ test_enq_callback(uint16_t dev_id, uint16_t qp_id, struct rte_crypto_op **ops,
RTE_SET_USED(ops);
RTE_SET_USED(user_param);
+ enq_cb_called = true;
printf("crypto enqueue callback called\n");
return nb_ops;
}
@@ -12620,21 +12623,58 @@ test_deq_callback(uint16_t dev_id, uint16_t qp_id, struct rte_crypto_op **ops,
RTE_SET_USED(ops);
RTE_SET_USED(user_param);
+ deq_cb_called = true;
printf("crypto dequeue callback called\n");
return nb_ops;
}
/*
- * Thread using enqueue/dequeue callback with RCU.
+ * Process enqueue/dequeue NULL crypto request to verify callback with RCU.
*/
static int
-test_enqdeq_callback_thread(void *arg)
+test_enqdeq_callback_null_cipher(void)
{
- RTE_SET_USED(arg);
- /* DP thread calls rte_cryptodev_enqueue_burst()/
- * rte_cryptodev_dequeue_burst() and invokes callback.
- */
- test_null_burst_operation();
+ struct crypto_testsuite_params *ts_params = &testsuite_params;
+ struct crypto_unittest_params *ut_params = &unittest_params;
+
+ /* Setup Cipher Parameters */
+ ut_params->cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
+ ut_params->cipher_xform.next = &ut_params->auth_xform;
+
+ ut_params->cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_NULL;
+ ut_params->cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
+
+ /* Setup Auth Parameters */
+ ut_params->auth_xform.type = RTE_CRYPTO_SYM_XFORM_AUTH;
+ ut_params->auth_xform.next = NULL;
+
+ ut_params->auth_xform.auth.algo = RTE_CRYPTO_AUTH_NULL;
+ ut_params->auth_xform.auth.op = RTE_CRYPTO_AUTH_OP_GENERATE;
+
+ /* Create Crypto session */
+ ut_params->sess = rte_cryptodev_sym_session_create(ts_params->valid_devs[0],
+ &ut_params->auth_xform, ts_params->session_mpool);
+ TEST_ASSERT_NOT_NULL(ut_params->sess, "Session creation failed");
+
+ ut_params->op = rte_crypto_op_alloc(ts_params->op_mpool, RTE_CRYPTO_OP_TYPE_SYMMETRIC);
+ TEST_ASSERT_NOT_NULL(ut_params->op, "Failed to allocate symmetric crypto op");
+
+ /* Allocate mbuf */
+ ut_params->ibuf = rte_pktmbuf_alloc(ts_params->mbuf_pool);
+ TEST_ASSERT_NOT_NULL(ut_params->ibuf, "Failed to allocate mbuf");
+
+ /* Append some random data */
+ TEST_ASSERT_NOT_NULL(rte_pktmbuf_append(ut_params->ibuf, sizeof(unsigned int)),
+ "no room to append data");
+
+ rte_crypto_op_attach_sym_session(ut_params->op, ut_params->sess);
+
+ ut_params->op->sym->m_src = ut_params->ibuf;
+
+ /* Process crypto operation */
+ TEST_ASSERT_NOT_NULL(process_crypto_request(ts_params->valid_devs[0], ut_params->op),
+ "failed to process sym crypto op");
+
return 0;
}
@@ -12642,6 +12682,7 @@ static int
test_enq_callback_setup(void)
{
struct crypto_testsuite_params *ts_params = &testsuite_params;
+ struct rte_cryptodev_sym_capability_idx cap_idx;
struct rte_cryptodev_info dev_info;
struct rte_cryptodev_qp_conf qp_conf = {
.nb_descriptors = MAX_NUM_OPS_INFLIGHT
@@ -12649,6 +12690,19 @@ test_enq_callback_setup(void)
struct rte_cryptodev_cb *cb;
uint16_t qp_id = 0;
+ int j = 0;
+
+ /* Verify the crypto capabilities for which enqueue/dequeue is done. */
+ cap_idx.type = RTE_CRYPTO_SYM_XFORM_AUTH;
+ cap_idx.algo.auth = RTE_CRYPTO_AUTH_NULL;
+ if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0],
+ &cap_idx) == NULL)
+ return TEST_SKIPPED;
+ cap_idx.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
+ cap_idx.algo.cipher = RTE_CRYPTO_CIPHER_NULL;
+ if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0],
+ &cap_idx) == NULL)
+ return TEST_SKIPPED;
/* Stop the device in case it's started so it can be configured */
rte_cryptodev_stop(ts_params->valid_devs[0]);
@@ -12672,6 +12726,7 @@ test_enq_callback_setup(void)
qp_conf.nb_descriptors, qp_id,
ts_params->valid_devs[0]);
+ enq_cb_called = false;
/* Test with invalid crypto device */
cb = rte_cryptodev_add_enq_callback(RTE_CRYPTO_MAX_DEVS,
qp_id, test_enq_callback, NULL);
@@ -12704,12 +12759,11 @@ test_enq_callback_setup(void)
rte_cryptodev_start(ts_params->valid_devs[0]);
- /* Launch a thread */
- rte_eal_remote_launch(test_enqdeq_callback_thread, NULL,
- rte_get_next_lcore(-1, 1, 0));
+ TEST_ASSERT_SUCCESS(test_enqdeq_callback_null_cipher(), "Crypto Processing failed");
- /* Wait until reader exited. */
- rte_eal_mp_wait_lcore();
+ /* Wait until callback not called. */
+ while (!enq_cb_called && (j++ < 10))
+ rte_delay_ms(10);
/* Test with invalid crypto device */
TEST_ASSERT_FAIL(rte_cryptodev_remove_enq_callback(
@@ -12734,6 +12788,8 @@ test_enq_callback_setup(void)
"qp %u on cryptodev %u",
qp_id, ts_params->valid_devs[0]);
+ TEST_ASSERT(enq_cb_called == true, "Crypto enqueue callback not called");
+
return TEST_SUCCESS;
}
@@ -12741,6 +12797,7 @@ static int
test_deq_callback_setup(void)
{
struct crypto_testsuite_params *ts_params = &testsuite_params;
+ struct rte_cryptodev_sym_capability_idx cap_idx;
struct rte_cryptodev_info dev_info;
struct rte_cryptodev_qp_conf qp_conf = {
.nb_descriptors = MAX_NUM_OPS_INFLIGHT
@@ -12748,6 +12805,19 @@ test_deq_callback_setup(void)
struct rte_cryptodev_cb *cb;
uint16_t qp_id = 0;
+ int j = 0;
+
+ /* Verify the crypto capabilities for which enqueue/dequeue is done. */
+ cap_idx.type = RTE_CRYPTO_SYM_XFORM_AUTH;
+ cap_idx.algo.auth = RTE_CRYPTO_AUTH_NULL;
+ if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0],
+ &cap_idx) == NULL)
+ return TEST_SKIPPED;
+ cap_idx.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
+ cap_idx.algo.cipher = RTE_CRYPTO_CIPHER_NULL;
+ if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0],
+ &cap_idx) == NULL)
+ return TEST_SKIPPED;
/* Stop the device in case it's started so it can be configured */
rte_cryptodev_stop(ts_params->valid_devs[0]);
@@ -12771,6 +12841,7 @@ test_deq_callback_setup(void)
qp_conf.nb_descriptors, qp_id,
ts_params->valid_devs[0]);
+ deq_cb_called = false;
/* Test with invalid crypto device */
cb = rte_cryptodev_add_deq_callback(RTE_CRYPTO_MAX_DEVS,
qp_id, test_deq_callback, NULL);
@@ -12803,12 +12874,11 @@ test_deq_callback_setup(void)
rte_cryptodev_start(ts_params->valid_devs[0]);
- /* Launch a thread */
- rte_eal_remote_launch(test_enqdeq_callback_thread, NULL,
- rte_get_next_lcore(-1, 1, 0));
+ TEST_ASSERT_SUCCESS(test_enqdeq_callback_null_cipher(), "Crypto processing failed");
- /* Wait until reader exited. */
- rte_eal_mp_wait_lcore();
+ /* Wait until callback not called. */
+ while (!deq_cb_called && (j++ < 10))
+ rte_delay_ms(10);
/* Test with invalid crypto device */
TEST_ASSERT_FAIL(rte_cryptodev_remove_deq_callback(
@@ -12833,6 +12903,8 @@ test_deq_callback_setup(void)
"qp %u on cryptodev %u",
qp_id, ts_params->valid_devs[0]);
+ TEST_ASSERT(deq_cb_called == true, "Crypto dequeue callback not called");
+
return TEST_SUCCESS;
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:17.527652919 +0100
+++ 0078-test-crypto-fix-enqueue-dequeue-callback-case.patch 2024-06-25 00:22:13.309188176 +0100
@@ -1 +1 @@
-From 4ad17a1c8fb336a182f2c1b62127d8871d45f804 Mon Sep 17 00:00:00 2001
+From 5cbc25e40f540b3518433c420f947ce3842a8cfe Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4ad17a1c8fb336a182f2c1b62127d8871d45f804 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index f2d249f6b8..94438c587a 100644
+index b75edb2f2b..96cd9ef7dc 100644
@@ -29 +30 @@
-@@ -199,6 +199,8 @@ post_process_raw_dp_op(void *user_data, uint32_t index __rte_unused,
+@@ -194,6 +194,8 @@ post_process_raw_dp_op(void *user_data, uint32_t index __rte_unused,
@@ -36 +37 @@
- int
+ void
@@ -38 +39 @@
-@@ -14671,6 +14673,7 @@ test_enq_callback(uint16_t dev_id, uint16_t qp_id, struct rte_crypto_op **ops,
+@@ -12607,6 +12609,7 @@ test_enq_callback(uint16_t dev_id, uint16_t qp_id, struct rte_crypto_op **ops,
@@ -46 +47 @@
-@@ -14684,21 +14687,58 @@ test_deq_callback(uint16_t dev_id, uint16_t qp_id, struct rte_crypto_op **ops,
+@@ -12620,21 +12623,58 @@ test_deq_callback(uint16_t dev_id, uint16_t qp_id, struct rte_crypto_op **ops,
@@ -112 +113 @@
-@@ -14706,6 +14746,7 @@ static int
+@@ -12642,6 +12682,7 @@ static int
@@ -120 +121 @@
-@@ -14713,6 +14754,19 @@ test_enq_callback_setup(void)
+@@ -12649,6 +12690,19 @@ test_enq_callback_setup(void)
@@ -140 +141 @@
-@@ -14736,6 +14790,7 @@ test_enq_callback_setup(void)
+@@ -12672,6 +12726,7 @@ test_enq_callback_setup(void)
@@ -148 +149 @@
-@@ -14768,12 +14823,11 @@ test_enq_callback_setup(void)
+@@ -12704,12 +12759,11 @@ test_enq_callback_setup(void)
@@ -165 +166 @@
-@@ -14798,6 +14852,8 @@ test_enq_callback_setup(void)
+@@ -12734,6 +12788,8 @@ test_enq_callback_setup(void)
@@ -174 +175 @@
-@@ -14805,6 +14861,7 @@ static int
+@@ -12741,6 +12797,7 @@ static int
@@ -182 +183 @@
-@@ -14812,6 +14869,19 @@ test_deq_callback_setup(void)
+@@ -12748,6 +12805,19 @@ test_deq_callback_setup(void)
@@ -202 +203 @@
-@@ -14835,6 +14905,7 @@ test_deq_callback_setup(void)
+@@ -12771,6 +12841,7 @@ test_deq_callback_setup(void)
@@ -210 +211 @@
-@@ -14867,12 +14938,11 @@ test_deq_callback_setup(void)
+@@ -12803,12 +12874,11 @@ test_deq_callback_setup(void)
@@ -227 +228 @@
-@@ -14897,6 +14967,8 @@ test_deq_callback_setup(void)
+@@ -12833,6 +12903,8 @@ test_deq_callback_setup(void)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'telemetry: lower log level on socket error' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (76 preceding siblings ...)
2024-06-24 23:59 ` patch 'test/crypto: fix enqueue/dequeue callback case' " luca.boccassi
@ 2024-06-24 23:59 ` luca.boccassi
2024-06-24 23:59 ` patch 'bus/vdev: revert fix devargs in secondary process' " luca.boccassi
2024-06-24 23:59 ` patch 'doc: fix link to hugepage mapping from Linux guide' " luca.boccassi
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:59 UTC (permalink / raw)
To: David Marchand; +Cc: Christian Ehrhardt, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/1620b6d7177b48d01411482465939166026af214
Thanks.
Luca Boccassi
---
From 1620b6d7177b48d01411482465939166026af214 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 6 Jun 2024 14:26:54 +0200
Subject: [PATCH] telemetry: lower log level on socket error
[ upstream commit 80b7993ba1b45d8aad7c294a7aaf66f4cdf860a5 ]
When starting two DPDK programs using the same DPDK prefix (like for
example OVS and testpmd, both running as primary processes in
--in-memory mode), the first DPDK process of the two spews some error
log when the second starts:
TELEMETRY: Socket write base info to client failed
This is because telemetry init involves trying to connect on existing
sockets to check if it can take over an existing socket file.
On the other hand, this error log provides no helpful information.
Lower this log to debug level.
Fixes: e14bb5f10509 ("telemetry: fix connected clients count")
Reported-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
lib/telemetry/telemetry.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/telemetry/telemetry.c b/lib/telemetry/telemetry.c
index af5da11866..491c4d21dd 100644
--- a/lib/telemetry/telemetry.c
+++ b/lib/telemetry/telemetry.c
@@ -383,7 +383,7 @@ client_handler(void *sock_id)
"{\"version\":\"%s\",\"pid\":%d,\"max_output_len\":%d}",
telemetry_version, getpid(), MAX_OUTPUT_LEN);
if (write(s, info_str, strlen(info_str)) < 0) {
- TMTY_LOG(ERR, "Socket write base info to client failed");
+ TMTY_LOG(DEBUG, "Socket write base info to client failed");
goto exit;
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:17.574495288 +0100
+++ 0079-telemetry-lower-log-level-on-socket-error.patch 2024-06-25 00:22:13.309188176 +0100
@@ -1 +1 @@
-From 80b7993ba1b45d8aad7c294a7aaf66f4cdf860a5 Mon Sep 17 00:00:00 2001
+From 1620b6d7177b48d01411482465939166026af214 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 80b7993ba1b45d8aad7c294a7aaf66f4cdf860a5 ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index 1663bd8c68..509fae76ec 100644
+index af5da11866..491c4d21dd 100644
@@ -33 +34 @@
-@@ -382,7 +382,7 @@ client_handler(void *sock_id)
+@@ -383,7 +383,7 @@ client_handler(void *sock_id)
@@ -37,2 +38,2 @@
-- TMTY_LOG_LINE(ERR, "Socket write base info to client failed");
-+ TMTY_LOG_LINE(DEBUG, "Socket write base info to client failed");
+- TMTY_LOG(ERR, "Socket write base info to client failed");
++ TMTY_LOG(DEBUG, "Socket write base info to client failed");
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'bus/vdev: revert fix devargs in secondary process' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (77 preceding siblings ...)
2024-06-24 23:59 ` patch 'telemetry: lower log level on socket error' " luca.boccassi
@ 2024-06-24 23:59 ` luca.boccassi
2024-06-24 23:59 ` patch 'doc: fix link to hugepage mapping from Linux guide' " luca.boccassi
79 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:59 UTC (permalink / raw)
To: Mingjin Ye; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6a3050209505a7b82cc8f20591a54fab5cd86bc2
Thanks.
Luca Boccassi
---
From 6a3050209505a7b82cc8f20591a54fab5cd86bc2 Mon Sep 17 00:00:00 2001
From: Mingjin Ye <mingjinx.ye@intel.com>
Date: Thu, 14 Mar 2024 09:36:28 +0000
Subject: [PATCH] bus/vdev: revert fix devargs in secondary process
[ upstream commit 22ce39b3aadb109cbefabb91aad44c94e8c2a5e6 ]
The ASan tool detected a memory leak in the vdev driver
alloc_devargs. The previous commit was that when inserting
a vdev device, the primary process alloc devargs and the
secondary process looks for devargs. This causes the
device to not be created if the secondary process does
not initialise the vdev device. And, this is not the
root cause.
Therefore the following commit was reverted accordingly.
After restoring this commit, the memory leak still exists.
Bugzilla ID: 1450
Fixes: 6666628362c9 ("bus/vdev: fix devargs in secondary process")
Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com>
---
drivers/bus/vdev/vdev.c | 21 +--------------------
1 file changed, 1 insertion(+), 20 deletions(-)
diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
index 14cf856237..38d05a9fe9 100644
--- a/drivers/bus/vdev/vdev.c
+++ b/drivers/bus/vdev/vdev.c
@@ -263,22 +263,6 @@ alloc_devargs(const char *name, const char *args)
return devargs;
}
-static struct rte_devargs *
-vdev_devargs_lookup(const char *name)
-{
- struct rte_devargs *devargs;
- char dev_name[32];
-
- RTE_EAL_DEVARGS_FOREACH("vdev", devargs) {
- devargs->bus->parse(devargs->name, &dev_name);
- if (strcmp(dev_name, name) == 0) {
- VDEV_LOG(INFO, "devargs matched %s", dev_name);
- return devargs;
- }
- }
- return NULL;
-}
-
static int
insert_vdev(const char *name, const char *args,
struct rte_vdev_device **p_dev,
@@ -291,10 +275,7 @@ insert_vdev(const char *name, const char *args,
if (name == NULL)
return -EINVAL;
- if (rte_eal_process_type() == RTE_PROC_PRIMARY)
- devargs = alloc_devargs(name, args);
- else
- devargs = vdev_devargs_lookup(name);
+ devargs = alloc_devargs(name, args);
if (!devargs)
return -ENOMEM;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:17.610348157 +0100
+++ 0080-bus-vdev-revert-fix-devargs-in-secondary-process.patch 2024-06-25 00:22:13.313188258 +0100
@@ -1 +1 @@
-From 22ce39b3aadb109cbefabb91aad44c94e8c2a5e6 Mon Sep 17 00:00:00 2001
+From 6a3050209505a7b82cc8f20591a54fab5cd86bc2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 22ce39b3aadb109cbefabb91aad44c94e8c2a5e6 ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'doc: fix link to hugepage mapping from Linux guide' has been queued to stable release 22.11.6
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
` (78 preceding siblings ...)
2024-06-24 23:59 ` patch 'bus/vdev: revert fix devargs in secondary process' " luca.boccassi
@ 2024-06-24 23:59 ` luca.boccassi
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
79 siblings, 1 reply; 210+ messages in thread
From: luca.boccassi @ 2024-06-24 23:59 UTC (permalink / raw)
To: David Marchand; +Cc: Alessio Igor Bogani, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/1a055be1a3756b5bc4cc814e939c81985cd59289
Thanks.
Luca Boccassi
---
From 1a055be1a3756b5bc4cc814e939c81985cd59289 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Mon, 17 Jun 2024 16:29:08 +0200
Subject: [PATCH] doc: fix link to hugepage mapping from Linux guide
[ upstream commit a886540e5ab5b6e342b628180a9d9a5379847087 ]
As reported by Alessio, the link to the hugepage mapping page is broken.
Fixes: 979bb5d493fb ("doc: add more instructions for running as non-root")
Reported-by: Alessio Igor Bogani <alessio.bogani@elettra.eu>
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
.mailmap | 1 +
doc/guides/linux_gsg/enable_func.rst | 3 +--
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.mailmap b/.mailmap
index 6a7e64e72d..5941400f42 100644
--- a/.mailmap
+++ b/.mailmap
@@ -41,6 +41,7 @@ Aleksandr Miloshenko <a.miloshenko@f5.com>
Aleksey Baulin <aleksey.baulin@gmail.com>
Aleksey Katargin <gureedo@gmail.com>
Ales Musil <amusil@redhat.com>
+Alessio Igor Bogani <alessio.bogani@elettra.eu>
Alexander Bechikov <asb.tyum@gmail.com>
Alexander Belyakov <abelyako@gmail.com>
Alexander Chernavin <achernavin@netgate.com>
diff --git a/doc/guides/linux_gsg/enable_func.rst b/doc/guides/linux_gsg/enable_func.rst
index 2344d97403..5511640cb8 100644
--- a/doc/guides/linux_gsg/enable_func.rst
+++ b/doc/guides/linux_gsg/enable_func.rst
@@ -85,8 +85,7 @@ need to be adjusted in order to ensure normal DPDK operation:
The above limits can usually be adjusted by editing
``/etc/security/limits.conf`` file, and rebooting.
-See `Hugepage Mapping <hugepage_mapping>`_
-section to learn how these limits affect EAL.
+See :ref:`Hugepage Mapping <hugepage_mapping>` section to learn how these limits affect EAL.
Device Control
~~~~~~~~~~~~~~
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-06-25 00:22:17.646165163 +0100
+++ 0081-doc-fix-link-to-hugepage-mapping-from-Linux-guide.patch 2024-06-25 00:22:13.313188258 +0100
@@ -1 +1 @@
-From a886540e5ab5b6e342b628180a9d9a5379847087 Mon Sep 17 00:00:00 2001
+From 1a055be1a3756b5bc4cc814e939c81985cd59289 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a886540e5ab5b6e342b628180a9d9a5379847087 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 3a10392e74..f76037213d 100644
+index 6a7e64e72d..5941400f42 100644
@@ -22 +23 @@
-@@ -44,6 +44,7 @@ Aleksandr Miloshenko <a.miloshenko@f5.com>
+@@ -41,6 +41,7 @@ Aleksandr Miloshenko <a.miloshenko@f5.com>
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'config: fix warning for cross build with meson >= 1.3.0' has been queued to stable release 22.11.6
2024-06-24 23:59 ` patch 'doc: fix link to hugepage mapping from Linux guide' " luca.boccassi
@ 2024-07-15 15:25 ` luca.boccassi
2024-07-15 15:25 ` patch 'build: use builtin helper for python dependencies' " luca.boccassi
` (84 more replies)
0 siblings, 85 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:25 UTC (permalink / raw)
To: David Marchand; +Cc: Bruce Richardson, Ruifeng Wang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/09386932889cd7ed36c61ea2f615291f593dcadd
Thanks.
Luca Boccassi
---
From 09386932889cd7ed36c61ea2f615291f593dcadd Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Mon, 17 Jun 2024 17:05:18 +0200
Subject: [PATCH] config: fix warning for cross build with meson >= 1.3.0
[ upstream commit be4c001bd67864981103fa98c3375c601778852e ]
Starting meson 1.3.0, the pkgconfig variable is deprecated in favor of
pkg-config. Keep both variables as suggested in meson RN.
Link: https://mesonbuild.com/Release-notes-for-1-3-0.html#machine-files-pkgconfig-field-deprecated-and-replaced-by-pkgconfig
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
config/arm/arm32_armv8_linux_gcc | 1 +
config/arm/arm64_armada_linux_gcc | 1 +
config/arm/arm64_armv8_linux_clang_ubuntu | 1 +
config/arm/arm64_armv8_linux_gcc | 1 +
config/arm/arm64_bluefield_linux_gcc | 1 +
config/arm/arm64_centriq2400_linux_gcc | 1 +
config/arm/arm64_cn10k_linux_gcc | 1 +
config/arm/arm64_cn9k_linux_gcc | 1 +
config/arm/arm64_dpaa_linux_gcc | 1 +
config/arm/arm64_emag_linux_gcc | 1 +
config/arm/arm64_ft2000plus_linux_gcc | 1 +
config/arm/arm64_graviton2_linux_gcc | 1 +
config/arm/arm64_graviton3_linux_gcc | 1 +
config/arm/arm64_kunpeng920_linux_gcc | 1 +
config/arm/arm64_kunpeng930_linux_gcc | 1 +
config/arm/arm64_n1sdp_linux_gcc | 1 +
config/arm/arm64_n2_linux_gcc | 1 +
config/arm/arm64_stingray_linux_gcc | 1 +
config/arm/arm64_thunderx2_linux_gcc | 1 +
config/arm/arm64_thunderxt83_linux_gcc | 1 +
config/arm/arm64_thunderxt88_linux_gcc | 1 +
config/arm/arm64_tys2500_linux_gcc | 1 +
config/x86/cross-mingw | 1 +
23 files changed, 23 insertions(+)
diff --git a/config/arm/arm32_armv8_linux_gcc b/config/arm/arm32_armv8_linux_gcc
index 269a60ba19..abcb182b16 100644
--- a/config/arm/arm32_armv8_linux_gcc
+++ b/config/arm/arm32_armv8_linux_gcc
@@ -4,6 +4,7 @@ cpp = ['ccache', 'arm-linux-gnueabihf-g++']
ar = 'arm-linux-gnueabihf-gcc-ar'
strip = 'arm-linux-gnueabihf-strip'
pkgconfig = 'arm-linux-gnueabihf-pkg-config'
+pkg-config = 'arm-linux-gnueabihf-pkg-config'
pcap-config = ''
[host_machine]
diff --git a/config/arm/arm64_armada_linux_gcc b/config/arm/arm64_armada_linux_gcc
index 635b4946a3..8f36d895da 100644
--- a/config/arm/arm64_armada_linux_gcc
+++ b/config/arm/arm64_armada_linux_gcc
@@ -5,6 +5,7 @@ ar = 'aarch64-linux-gnu-ar'
as = 'aarch64-linux-gnu-as'
strip = 'aarch64-linux-gnu-strip'
pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
pcap-config = ''
[host_machine]
diff --git a/config/arm/arm64_armv8_linux_clang_ubuntu b/config/arm/arm64_armv8_linux_clang_ubuntu
index 86ae43937b..e34fabebe5 100644
--- a/config/arm/arm64_armv8_linux_clang_ubuntu
+++ b/config/arm/arm64_armv8_linux_clang_ubuntu
@@ -6,6 +6,7 @@ strip = 'llvm-strip'
llvm-config = 'llvm-config'
pcap-config = 'llvm-config'
pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
[host_machine]
system = 'linux'
diff --git a/config/arm/arm64_armv8_linux_gcc b/config/arm/arm64_armv8_linux_gcc
index 529694b49d..a9b136cf48 100644
--- a/config/arm/arm64_armv8_linux_gcc
+++ b/config/arm/arm64_armv8_linux_gcc
@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
ar = 'aarch64-linux-gnu-gcc-ar'
strip = 'aarch64-linux-gnu-strip'
pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
pcap-config = ''
[host_machine]
diff --git a/config/arm/arm64_bluefield_linux_gcc b/config/arm/arm64_bluefield_linux_gcc
index 1286227915..bcffb6534b 100644
--- a/config/arm/arm64_bluefield_linux_gcc
+++ b/config/arm/arm64_bluefield_linux_gcc
@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
ar = 'aarch64-linux-gnu-gcc-ar'
strip = 'aarch64-linux-gnu-strip'
pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
pcap-config = ''
[host_machine]
diff --git a/config/arm/arm64_centriq2400_linux_gcc b/config/arm/arm64_centriq2400_linux_gcc
index bc8737e072..33cb5ef675 100644
--- a/config/arm/arm64_centriq2400_linux_gcc
+++ b/config/arm/arm64_centriq2400_linux_gcc
@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
ar = 'aarch64-linux-gnu-gcc-ar'
strip = 'aarch64-linux-gnu-strip'
pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
pcap-config = ''
[host_machine]
diff --git a/config/arm/arm64_cn10k_linux_gcc b/config/arm/arm64_cn10k_linux_gcc
index 05d2d64cf2..586af83031 100644
--- a/config/arm/arm64_cn10k_linux_gcc
+++ b/config/arm/arm64_cn10k_linux_gcc
@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
ar = 'aarch64-linux-gnu-gcc-ar'
strip = 'aarch64-linux-gnu-strip'
pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
pcap-config = ''
[host_machine]
diff --git a/config/arm/arm64_cn9k_linux_gcc b/config/arm/arm64_cn9k_linux_gcc
index 7416454de0..7e77ee06ae 100644
--- a/config/arm/arm64_cn9k_linux_gcc
+++ b/config/arm/arm64_cn9k_linux_gcc
@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
ar = 'aarch64-linux-gnu-gcc-ar'
strip = 'aarch64-linux-gnu-strip'
pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
pcap-config = ''
[host_machine]
diff --git a/config/arm/arm64_dpaa_linux_gcc b/config/arm/arm64_dpaa_linux_gcc
index 8465b5097b..bf0eab18e2 100644
--- a/config/arm/arm64_dpaa_linux_gcc
+++ b/config/arm/arm64_dpaa_linux_gcc
@@ -5,6 +5,7 @@ ar = 'aarch64-linux-gnu-ar'
as = 'aarch64-linux-gnu-as'
strip = 'aarch64-linux-gnu-strip'
pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
pcap-config = ''
[host_machine]
diff --git a/config/arm/arm64_emag_linux_gcc b/config/arm/arm64_emag_linux_gcc
index 248169ed68..3e8c15f8a4 100644
--- a/config/arm/arm64_emag_linux_gcc
+++ b/config/arm/arm64_emag_linux_gcc
@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
ar = 'aarch64-linux-gnu-gcc-ar'
strip = 'aarch64-linux-gnu-strip'
pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
pcap-config = ''
[host_machine]
diff --git a/config/arm/arm64_ft2000plus_linux_gcc b/config/arm/arm64_ft2000plus_linux_gcc
index ae9f779056..4ecb251d3f 100644
--- a/config/arm/arm64_ft2000plus_linux_gcc
+++ b/config/arm/arm64_ft2000plus_linux_gcc
@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
ar = 'aarch64-linux-gnu-gcc-ar'
strip = 'aarch64-linux-gnu-strip'
pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
pcap-config = ''
[host_machine]
diff --git a/config/arm/arm64_graviton2_linux_gcc b/config/arm/arm64_graviton2_linux_gcc
index fdb298bb11..b5f681bc27 100644
--- a/config/arm/arm64_graviton2_linux_gcc
+++ b/config/arm/arm64_graviton2_linux_gcc
@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
ar = 'aarch64-linux-gnu-gcc-ar'
strip = 'aarch64-linux-gnu-strip'
pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
pcap-config = ''
[host_machine]
diff --git a/config/arm/arm64_graviton3_linux_gcc b/config/arm/arm64_graviton3_linux_gcc
index 19b422075d..77b5168836 100644
--- a/config/arm/arm64_graviton3_linux_gcc
+++ b/config/arm/arm64_graviton3_linux_gcc
@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
ar = 'aarch64-linux-gnu-gcc-ar'
strip = 'aarch64-linux-gnu-strip'
pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
pcap-config = ''
[host_machine]
diff --git a/config/arm/arm64_kunpeng920_linux_gcc b/config/arm/arm64_kunpeng920_linux_gcc
index 193fb48a61..6e7d8ac667 100644
--- a/config/arm/arm64_kunpeng920_linux_gcc
+++ b/config/arm/arm64_kunpeng920_linux_gcc
@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
ar = 'aarch64-linux-gnu-gcc-ar'
strip = 'aarch64-linux-gnu-strip'
pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
pcap-config = ''
[host_machine]
diff --git a/config/arm/arm64_kunpeng930_linux_gcc b/config/arm/arm64_kunpeng930_linux_gcc
index e4281ceb4f..61fe482a2e 100644
--- a/config/arm/arm64_kunpeng930_linux_gcc
+++ b/config/arm/arm64_kunpeng930_linux_gcc
@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
ar = 'aarch64-linux-gnu-gcc-ar'
strip = 'aarch64-linux-gnu-strip'
pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
pcap-config = ''
[host_machine]
diff --git a/config/arm/arm64_n1sdp_linux_gcc b/config/arm/arm64_n1sdp_linux_gcc
index 2806a4241b..c3c12098d8 100644
--- a/config/arm/arm64_n1sdp_linux_gcc
+++ b/config/arm/arm64_n1sdp_linux_gcc
@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
ar = 'aarch64-linux-gnu-gcc-ar'
strip = 'aarch64-linux-gnu-strip'
pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
pcap-config = ''
[host_machine]
diff --git a/config/arm/arm64_n2_linux_gcc b/config/arm/arm64_n2_linux_gcc
index 7404bd197b..89200861c4 100644
--- a/config/arm/arm64_n2_linux_gcc
+++ b/config/arm/arm64_n2_linux_gcc
@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
ar = 'aarch64-linux-gnu-gcc-ar'
strip = 'aarch64-linux-gnu-strip'
pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
pcap-config = ''
[host_machine]
diff --git a/config/arm/arm64_stingray_linux_gcc b/config/arm/arm64_stingray_linux_gcc
index 08148b5c3d..358f3b43d3 100644
--- a/config/arm/arm64_stingray_linux_gcc
+++ b/config/arm/arm64_stingray_linux_gcc
@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
ar = 'aarch64-linux-gnu-gcc-ar'
strip = 'aarch64-linux-gnu-strip'
pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
pcap-config = ''
[host_machine]
diff --git a/config/arm/arm64_thunderx2_linux_gcc b/config/arm/arm64_thunderx2_linux_gcc
index 32ae938e95..124a97da01 100644
--- a/config/arm/arm64_thunderx2_linux_gcc
+++ b/config/arm/arm64_thunderx2_linux_gcc
@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
ar = 'aarch64-linux-gnu-gcc-ar'
strip = 'aarch64-linux-gnu-strip'
pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
pcap-config = ''
[host_machine]
diff --git a/config/arm/arm64_thunderxt83_linux_gcc b/config/arm/arm64_thunderxt83_linux_gcc
index e9d9e62d44..433c3cb4e3 100644
--- a/config/arm/arm64_thunderxt83_linux_gcc
+++ b/config/arm/arm64_thunderxt83_linux_gcc
@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
ar = 'aarch64-linux-gnu-gcc-ar'
strip = 'aarch64-linux-gnu-strip'
pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
pcap-config = ''
[host_machine]
diff --git a/config/arm/arm64_thunderxt88_linux_gcc b/config/arm/arm64_thunderxt88_linux_gcc
index c6e5a5656a..81975aea14 100644
--- a/config/arm/arm64_thunderxt88_linux_gcc
+++ b/config/arm/arm64_thunderxt88_linux_gcc
@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
ar = 'aarch64-linux-gnu-gcc-ar'
strip = 'aarch64-linux-gnu-strip'
pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
pcap-config = ''
[host_machine]
diff --git a/config/arm/arm64_tys2500_linux_gcc b/config/arm/arm64_tys2500_linux_gcc
index fce85fb0d8..24e6539a15 100644
--- a/config/arm/arm64_tys2500_linux_gcc
+++ b/config/arm/arm64_tys2500_linux_gcc
@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
ar = 'aarch64-linux-gnu-gcc-ar'
strip = 'aarch64-linux-gnu-strip'
pkgconfig = 'aarch64-linux-gnu-pkg-config'
+pkg-config = 'aarch64-linux-gnu-pkg-config'
pcap-config = ''
[host_machine]
diff --git a/config/x86/cross-mingw b/config/x86/cross-mingw
index cddebda5b5..11597eaa26 100644
--- a/config/x86/cross-mingw
+++ b/config/x86/cross-mingw
@@ -5,6 +5,7 @@ ld = 'x86_64-w64-mingw32-ld'
ar = 'x86_64-w64-mingw32-ar'
strip = 'x86_64-w64-mingw32-strip'
pkgconfig = 'x86_64-w64-mingw32-pkg-config'
+pkg-config = 'x86_64-w64-mingw32-pkg-config'
objdump = 'x86_64-w64-mingw32-objdump'
[host_machine]
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:34.823083062 +0100
+++ 0001-config-fix-warning-for-cross-build-with-meson-1.3.0.patch 2024-07-15 16:19:34.428203474 +0100
@@ -1 +1 @@
-From be4c001bd67864981103fa98c3375c601778852e Mon Sep 17 00:00:00 2001
+From 09386932889cd7ed36c61ea2f615291f593dcadd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit be4c001bd67864981103fa98c3375c601778852e ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -17,2 +17,0 @@
- config/arm/arm64_altra_linux_gcc | 1 +
- config/arm/arm64_ampereone_linux_gcc | 1 +
@@ -22 +20,0 @@
- config/arm/arm64_bluefield3_linux_gcc | 1 +
@@ -24,2 +21,0 @@
- config/arm/arm64_capri_linux_gcc | 1 +
- config/arm/arm64_cdx_linux_gcc | 1 +
@@ -30 +25,0 @@
- config/arm/arm64_elba_linux_gcc | 1 +
@@ -33 +27,0 @@
- config/arm/arm64_grace_linux_gcc | 1 +
@@ -36,2 +29,0 @@
- config/arm/arm64_graviton4_linux_gcc | 1 +
- config/arm/arm64_hip10_linux_gcc | 1 +
@@ -42 +33,0 @@
- config/arm/arm64_odyssey_linux_gcc | 1 +
@@ -48 +38,0 @@
- config/arm/arm64_v2_linux_gcc | 1 +
@@ -50 +40 @@
- 34 files changed, 34 insertions(+)
+ 23 files changed, 23 insertions(+)
@@ -64,24 +53,0 @@
-diff --git a/config/arm/arm64_altra_linux_gcc b/config/arm/arm64_altra_linux_gcc
-index ce0667ebe2..769503d936 100644
---- a/config/arm/arm64_altra_linux_gcc
-+++ b/config/arm/arm64_altra_linux_gcc
-@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
- ar = 'aarch64-linux-gnu-gcc-ar'
- strip = 'aarch64-linux-gnu-strip'
- pkgconfig = 'aarch64-linux-gnu-pkg-config'
-+pkg-config = 'aarch64-linux-gnu-pkg-config'
- pcap-config = ''
-
- [host_machine]
-diff --git a/config/arm/arm64_ampereone_linux_gcc b/config/arm/arm64_ampereone_linux_gcc
-index 8964432a74..bb6acfc4cf 100644
---- a/config/arm/arm64_ampereone_linux_gcc
-+++ b/config/arm/arm64_ampereone_linux_gcc
-@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
- ar = 'aarch64-linux-gnu-gcc-ar'
- strip = 'aarch64-linux-gnu-strip'
- pkgconfig = 'aarch64-linux-gnu-pkg-config'
-+pkg-config = 'aarch64-linux-gnu-pkg-config'
- pcap-config = ''
-
- [host_machine]
@@ -124,12 +89,0 @@
-diff --git a/config/arm/arm64_bluefield3_linux_gcc b/config/arm/arm64_bluefield3_linux_gcc
-index 775cf5883d..d900e72a6d 100644
---- a/config/arm/arm64_bluefield3_linux_gcc
-+++ b/config/arm/arm64_bluefield3_linux_gcc
-@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
- ar = 'aarch64-linux-gnu-gcc-ar'
- strip = 'aarch64-linux-gnu-strip'
- pkgconfig = 'aarch64-linux-gnu-pkg-config'
-+pkg-config = 'aarch64-linux-gnu-pkg-config'
- pcap-config = ''
-
- [host_machine]
@@ -148,24 +101,0 @@
-diff --git a/config/arm/arm64_capri_linux_gcc b/config/arm/arm64_capri_linux_gcc
-index 1a6313e684..5099ec66a5 100644
---- a/config/arm/arm64_capri_linux_gcc
-+++ b/config/arm/arm64_capri_linux_gcc
-@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
- ar = 'aarch64-linux-gnu-gcc-ar'
- strip = 'aarch64-linux-gnu-strip'
- pkgconfig = 'aarch64-linux-gnu-pkg-config'
-+pkg-config = 'aarch64-linux-gnu-pkg-config'
- pcap-config = ''
-
- [host_machine]
-diff --git a/config/arm/arm64_cdx_linux_gcc b/config/arm/arm64_cdx_linux_gcc
-index 8e6d619dae..bf494b776e 100644
---- a/config/arm/arm64_cdx_linux_gcc
-+++ b/config/arm/arm64_cdx_linux_gcc
-@@ -5,6 +5,7 @@ ar = 'aarch64-linux-gnu-ar'
- as = 'aarch64-linux-gnu-as'
- strip = 'aarch64-linux-gnu-strip'
- pkgconfig = 'aarch64-linux-gnu-pkg-config'
-+pkg-config = 'aarch64-linux-gnu-pkg-config'
- pcap-config = ''
-
- [host_machine]
@@ -185 +115 @@
-index fa904af5d0..63fcca9cbe 100644
+index 05d2d64cf2..586af83031 100644
@@ -194 +123,0 @@
- cmake = 'cmake'
@@ -195,0 +125 @@
+ [host_machine]
@@ -197 +127 @@
-index 646ce4b5d3..fa4618e370 100644
+index 7416454de0..7e77ee06ae 100644
@@ -206 +135,0 @@
- cmake = 'cmake'
@@ -207,0 +137 @@
+ [host_machine]
@@ -220,12 +149,0 @@
-diff --git a/config/arm/arm64_elba_linux_gcc b/config/arm/arm64_elba_linux_gcc
-index 4d891bd5a7..624a821adb 100644
---- a/config/arm/arm64_elba_linux_gcc
-+++ b/config/arm/arm64_elba_linux_gcc
-@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
- ar = 'aarch64-linux-gnu-gcc-ar'
- strip = 'aarch64-linux-gnu-strip'
- pkgconfig = 'aarch64-linux-gnu-pkg-config'
-+pkg-config = 'aarch64-linux-gnu-pkg-config'
- pcap-config = ''
-
- [host_machine]
@@ -256,12 +173,0 @@
-diff --git a/config/arm/arm64_grace_linux_gcc b/config/arm/arm64_grace_linux_gcc
-index bde55b17a8..81e56674f6 100644
---- a/config/arm/arm64_grace_linux_gcc
-+++ b/config/arm/arm64_grace_linux_gcc
-@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
- ar = 'aarch64-linux-gnu-gcc-ar'
- strip = 'aarch64-linux-gnu-strip'
- pkgconfig = 'aarch64-linux-gnu-pkg-config'
-+pkg-config = 'aarch64-linux-gnu-pkg-config'
- pcap-config = ''
-
- [host_machine]
@@ -292,24 +197,0 @@
-diff --git a/config/arm/arm64_graviton4_linux_gcc b/config/arm/arm64_graviton4_linux_gcc
-index 839224bca7..3b674f7800 100644
---- a/config/arm/arm64_graviton4_linux_gcc
-+++ b/config/arm/arm64_graviton4_linux_gcc
-@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
- ar = 'aarch64-linux-gnu-gcc-ar'
- strip = 'aarch64-linux-gnu-strip'
- pkgconfig = 'aarch64-linux-gnu-pkg-config'
-+pkg-config = 'aarch64-linux-gnu-pkg-config'
- pcap-config = ''
-
- [host_machine]
-diff --git a/config/arm/arm64_hip10_linux_gcc b/config/arm/arm64_hip10_linux_gcc
-index 2943e4abbf..85bcd05887 100644
---- a/config/arm/arm64_hip10_linux_gcc
-+++ b/config/arm/arm64_hip10_linux_gcc
-@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
- ar = 'aarch64-linux-gnu-gcc-ar'
- strip = 'aarch64-linux-gnu-strip'
- pkgconfig = 'aarch64-linux-gnu-pkg-config'
-+pkg-config = 'aarch64-linux-gnu-pkg-config'
- pcap-config = ''
-
- [host_machine]
@@ -364,12 +245,0 @@
-diff --git a/config/arm/arm64_odyssey_linux_gcc b/config/arm/arm64_odyssey_linux_gcc
-index 532c708bde..9cd49b5717 100644
---- a/config/arm/arm64_odyssey_linux_gcc
-+++ b/config/arm/arm64_odyssey_linux_gcc
-@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-marvell-linux-gnu-g++']
- ar = 'aarch64-marvell-linux-gnu-gcc-ar'
- strip = 'aarch64-marvell-linux-gnu-strip'
- pkgconfig = 'aarch64-linux-gnu-pkg-config'
-+pkg-config = 'aarch64-linux-gnu-pkg-config'
-
- [host_machine]
- system = 'linux'
@@ -428,12 +297,0 @@
-@@ -4,6 +4,7 @@ cpp = ['ccache', 'aarch64-linux-gnu-g++']
- ar = 'aarch64-linux-gnu-gcc-ar'
- strip = 'aarch64-linux-gnu-strip'
- pkgconfig = 'aarch64-linux-gnu-pkg-config'
-+pkg-config = 'aarch64-linux-gnu-pkg-config'
- pcap-config = ''
-
- [host_machine]
-diff --git a/config/arm/arm64_v2_linux_gcc b/config/arm/arm64_v2_linux_gcc
-index 50d9be3da3..f27eeead66 100644
---- a/config/arm/arm64_v2_linux_gcc
-+++ b/config/arm/arm64_v2_linux_gcc
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'build: use builtin helper for python dependencies' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
@ 2024-07-15 15:25 ` luca.boccassi
2024-07-15 15:25 ` patch 'app/bbdev: fix interrupt tests' " luca.boccassi
` (83 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:25 UTC (permalink / raw)
To: Luca Boccassi; +Cc: Dmitry Kozlyuk, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/fcfe871790d34c1a3b4eaa5d3d3eed732b79def0
Thanks.
Luca Boccassi
---
From fcfe871790d34c1a3b4eaa5d3d3eed732b79def0 Mon Sep 17 00:00:00 2001
From: Luca Boccassi <bluca@debian.org>
Date: Sun, 23 Jun 2024 13:30:23 +0100
Subject: [PATCH] build: use builtin helper for python dependencies
[ upstream commit 9ab7baa5c14b1ba928c09bda4734827d6d367d6b ]
We now require Meson 0.53 or later, so we can use this feature introduced
in 0.51.
This also fixes a build failure on SUSE Leap 15.6 where the manual check
fails to detect the pyelftools module.
Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
buildtools/meson.build | 19 +++++--------------
1 file changed, 5 insertions(+), 14 deletions(-)
diff --git a/buildtools/meson.build b/buildtools/meson.build
index e1c600e40f..c4f6fe9271 100644
--- a/buildtools/meson.build
+++ b/buildtools/meson.build
@@ -6,7 +6,11 @@ check_symbols = find_program('check-symbols.sh')
ldflags_ibverbs_static = find_program('options-ibverbs-static.sh')
objdump = find_program('objdump', 'llvm-objdump')
-python3 = import('python').find_installation(required: false)
+python3_required_modules = []
+if host_machine.system() != 'windows'
+ python3_required_modules = ['elftools']
+endif
+python3 = import('python').find_installation('python3', required: false, modules: python3_required_modules)
if python3.found()
py3 = [python3]
else
@@ -39,16 +43,3 @@ else
pmdinfogen += 'elf'
endif
-# TODO: starting from Meson 0.51.0 use
-# python3 = import('python').find_installation('python',
-# modules : python3_required_modules)
-python3_required_modules = []
-if host_machine.system() != 'windows'
- python3_required_modules = ['elftools']
-endif
-foreach module : python3_required_modules
- script = 'import importlib.util; import sys; exit(importlib.util.find_spec("@0@") is None)'
- if run_command(py3, '-c', script.format(module), check: false).returncode() != 0
- error('missing python module: @0@'.format(module))
- endif
-endforeach
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:34.877654052 +0100
+++ 0002-build-use-builtin-helper-for-python-dependencies.patch 2024-07-15 16:19:34.432203559 +0100
@@ -1 +1 @@
-From 9ab7baa5c14b1ba928c09bda4734827d6d367d6b Mon Sep 17 00:00:00 2001
+From fcfe871790d34c1a3b4eaa5d3d3eed732b79def0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9ab7baa5c14b1ba928c09bda4734827d6d367d6b ]
+
@@ -11,2 +12,0 @@
-Cc: stable@dpdk.org
-
@@ -21 +21 @@
-index 72447b60a0..3adf34e1a8 100644
+index e1c600e40f..c4f6fe9271 100644
@@ -24,2 +24 @@
-@@ -5,7 +5,11 @@ pkgconf = find_program('pkg-config', 'pkgconf', required: false)
- check_symbols = find_program('check-symbols.sh')
+@@ -6,7 +6,11 @@ check_symbols = find_program('check-symbols.sh')
@@ -26,0 +26 @@
+ objdump = find_program('objdump', 'llvm-objdump')
@@ -37 +37 @@
-@@ -45,16 +49,3 @@ else
+@@ -39,16 +43,3 @@ else
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'app/bbdev: fix interrupt tests' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
2024-07-15 15:25 ` patch 'build: use builtin helper for python dependencies' " luca.boccassi
@ 2024-07-15 15:25 ` luca.boccassi
2024-07-15 15:25 ` patch 'dmadev: fix structure alignment' " luca.boccassi
` (82 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:25 UTC (permalink / raw)
To: Hernan Vargas; +Cc: Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/cdb1114156bfa7a8893904ad0368a312591428f0
Thanks.
Luca Boccassi
---
From cdb1114156bfa7a8893904ad0368a312591428f0 Mon Sep 17 00:00:00 2001
From: Hernan Vargas <hernan.vargas@intel.com>
Date: Mon, 24 Jun 2024 08:02:31 -0700
Subject: [PATCH] app/bbdev: fix interrupt tests
[ upstream commit fdcee665c5066cd1300d08b85d159ccabf9f3657 ]
Fix possible error with regards to setting the burst size from the
enqueue thread.
Fixes: b2e2aec3239e ("app/bbdev: enhance interrupt test")
Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
app/test-bbdev/test_bbdev_perf.c | 90 ++++++++++++++++----------------
1 file changed, 45 insertions(+), 45 deletions(-)
diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
index f77ebc4b47..66d14ff502 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -3125,6 +3125,15 @@ throughput_intr_lcore_ldpc_dec(void *arg)
if (unlikely(num_to_process - enqueued < num_to_enq))
num_to_enq = num_to_process - enqueued;
+ /* Write to thread burst_sz current number of enqueued
+ * descriptors. It ensures that proper number of
+ * descriptors will be dequeued in callback
+ * function - needed for last batch in case where
+ * the number of operations is not a multiple of
+ * burst size.
+ */
+ __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
+
enq = 0;
do {
enq += rte_bbdev_enqueue_ldpc_dec_ops(
@@ -3134,15 +3143,6 @@ throughput_intr_lcore_ldpc_dec(void *arg)
} while (unlikely(num_to_enq != enq));
enqueued += enq;
- /* Write to thread burst_sz current number of enqueued
- * descriptors. It ensures that proper number of
- * descriptors will be dequeued in callback
- * function - needed for last batch in case where
- * the number of operations is not a multiple of
- * burst size.
- */
- __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
-
/* Wait until processing of previous batch is
* completed
*/
@@ -3218,6 +3218,15 @@ throughput_intr_lcore_dec(void *arg)
if (unlikely(num_to_process - enqueued < num_to_enq))
num_to_enq = num_to_process - enqueued;
+ /* Write to thread burst_sz current number of enqueued
+ * descriptors. It ensures that proper number of
+ * descriptors will be dequeued in callback
+ * function - needed for last batch in case where
+ * the number of operations is not a multiple of
+ * burst size.
+ */
+ __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
+
enq = 0;
do {
enq += rte_bbdev_enqueue_dec_ops(tp->dev_id,
@@ -3226,15 +3235,6 @@ throughput_intr_lcore_dec(void *arg)
} while (unlikely(num_to_enq != enq));
enqueued += enq;
- /* Write to thread burst_sz current number of enqueued
- * descriptors. It ensures that proper number of
- * descriptors will be dequeued in callback
- * function - needed for last batch in case where
- * the number of operations is not a multiple of
- * burst size.
- */
- __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
-
/* Wait until processing of previous batch is
* completed
*/
@@ -3304,6 +3304,15 @@ throughput_intr_lcore_enc(void *arg)
if (unlikely(num_to_process - enqueued < num_to_enq))
num_to_enq = num_to_process - enqueued;
+ /* Write to thread burst_sz current number of enqueued
+ * descriptors. It ensures that proper number of
+ * descriptors will be dequeued in callback
+ * function - needed for last batch in case where
+ * the number of operations is not a multiple of
+ * burst size.
+ */
+ __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
+
enq = 0;
do {
enq += rte_bbdev_enqueue_enc_ops(tp->dev_id,
@@ -3312,15 +3321,6 @@ throughput_intr_lcore_enc(void *arg)
} while (unlikely(enq != num_to_enq));
enqueued += enq;
- /* Write to thread burst_sz current number of enqueued
- * descriptors. It ensures that proper number of
- * descriptors will be dequeued in callback
- * function - needed for last batch in case where
- * the number of operations is not a multiple of
- * burst size.
- */
- __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
-
/* Wait until processing of previous batch is
* completed
*/
@@ -3392,6 +3392,15 @@ throughput_intr_lcore_ldpc_enc(void *arg)
if (unlikely(num_to_process - enqueued < num_to_enq))
num_to_enq = num_to_process - enqueued;
+ /* Write to thread burst_sz current number of enqueued
+ * descriptors. It ensures that proper number of
+ * descriptors will be dequeued in callback
+ * function - needed for last batch in case where
+ * the number of operations is not a multiple of
+ * burst size.
+ */
+ __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
+
enq = 0;
do {
enq += rte_bbdev_enqueue_ldpc_enc_ops(
@@ -3401,15 +3410,6 @@ throughput_intr_lcore_ldpc_enc(void *arg)
} while (unlikely(enq != num_to_enq));
enqueued += enq;
- /* Write to thread burst_sz current number of enqueued
- * descriptors. It ensures that proper number of
- * descriptors will be dequeued in callback
- * function - needed for last batch in case where
- * the number of operations is not a multiple of
- * burst size.
- */
- __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
-
/* Wait until processing of previous batch is
* completed
*/
@@ -3480,6 +3480,15 @@ throughput_intr_lcore_fft(void *arg)
if (unlikely(num_to_process - enqueued < num_to_enq))
num_to_enq = num_to_process - enqueued;
+ /* Write to thread burst_sz current number of enqueued
+ * descriptors. It ensures that proper number of
+ * descriptors will be dequeued in callback
+ * function - needed for last batch in case where
+ * the number of operations is not a multiple of
+ * burst size.
+ */
+ __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
+
enq = 0;
do {
enq += rte_bbdev_enqueue_fft_ops(tp->dev_id,
@@ -3488,15 +3497,6 @@ throughput_intr_lcore_fft(void *arg)
} while (unlikely(enq != num_to_enq));
enqueued += enq;
- /* Write to thread burst_sz current number of enqueued
- * descriptors. It ensures that proper number of
- * descriptors will be dequeued in callback
- * function - needed for last batch in case where
- * the number of operations is not a multiple of
- * burst size.
- */
- __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
-
/* Wait until processing of previous batch is
* completed
*/
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:34.931310201 +0100
+++ 0003-app-bbdev-fix-interrupt-tests.patch 2024-07-15 16:19:34.440203731 +0100
@@ -1 +1 @@
-From fdcee665c5066cd1300d08b85d159ccabf9f3657 Mon Sep 17 00:00:00 2001
+From cdb1114156bfa7a8893904ad0368a312591428f0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fdcee665c5066cd1300d08b85d159ccabf9f3657 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -15,2 +16,2 @@
- app/test-bbdev/test_bbdev_perf.c | 120 +++++++++++++++----------------
- 1 file changed, 60 insertions(+), 60 deletions(-)
+ app/test-bbdev/test_bbdev_perf.c | 90 ++++++++++++++++----------------
+ 1 file changed, 45 insertions(+), 45 deletions(-)
@@ -19 +20 @@
-index 9841464922..20cd8df19b 100644
+index f77ebc4b47..66d14ff502 100644
@@ -22 +23 @@
-@@ -3419,6 +3419,16 @@ throughput_intr_lcore_ldpc_dec(void *arg)
+@@ -3125,6 +3125,15 @@ throughput_intr_lcore_ldpc_dec(void *arg)
@@ -33,2 +34 @@
-+ rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
-+ rte_memory_order_relaxed);
++ __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
@@ -39 +39 @@
-@@ -3428,16 +3438,6 @@ throughput_intr_lcore_ldpc_dec(void *arg)
+@@ -3134,15 +3143,6 @@ throughput_intr_lcore_ldpc_dec(void *arg)
@@ -50,2 +50 @@
-- rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
-- rte_memory_order_relaxed);
+- __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
@@ -56 +55 @@
-@@ -3514,6 +3514,16 @@ throughput_intr_lcore_dec(void *arg)
+@@ -3218,6 +3218,15 @@ throughput_intr_lcore_dec(void *arg)
@@ -67,2 +66 @@
-+ rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
-+ rte_memory_order_relaxed);
++ __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
@@ -73 +71 @@
-@@ -3522,16 +3532,6 @@ throughput_intr_lcore_dec(void *arg)
+@@ -3226,15 +3235,6 @@ throughput_intr_lcore_dec(void *arg)
@@ -84,2 +82 @@
-- rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
-- rte_memory_order_relaxed);
+- __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
@@ -90 +87 @@
-@@ -3603,6 +3603,16 @@ throughput_intr_lcore_enc(void *arg)
+@@ -3304,6 +3304,15 @@ throughput_intr_lcore_enc(void *arg)
@@ -101,2 +98 @@
-+ rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
-+ rte_memory_order_relaxed);
++ __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
@@ -107 +103 @@
-@@ -3611,16 +3621,6 @@ throughput_intr_lcore_enc(void *arg)
+@@ -3312,15 +3321,6 @@ throughput_intr_lcore_enc(void *arg)
@@ -118,2 +114 @@
-- rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
-- rte_memory_order_relaxed);
+- __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
@@ -124 +119 @@
-@@ -3694,6 +3694,16 @@ throughput_intr_lcore_ldpc_enc(void *arg)
+@@ -3392,6 +3392,15 @@ throughput_intr_lcore_ldpc_enc(void *arg)
@@ -135,2 +130 @@
-+ rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
-+ rte_memory_order_relaxed);
++ __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
@@ -141 +135 @@
-@@ -3703,16 +3713,6 @@ throughput_intr_lcore_ldpc_enc(void *arg)
+@@ -3401,15 +3410,6 @@ throughput_intr_lcore_ldpc_enc(void *arg)
@@ -152,2 +146 @@
-- rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
-- rte_memory_order_relaxed);
+- __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
@@ -158 +151 @@
-@@ -3786,6 +3786,16 @@ throughput_intr_lcore_fft(void *arg)
+@@ -3480,6 +3480,15 @@ throughput_intr_lcore_fft(void *arg)
@@ -169,2 +162 @@
-+ rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
-+ rte_memory_order_relaxed);
++ __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
@@ -175,35 +167 @@
-@@ -3794,16 +3804,6 @@ throughput_intr_lcore_fft(void *arg)
- } while (unlikely(enq != num_to_enq));
- enqueued += enq;
-
-- /* Write to thread burst_sz current number of enqueued
-- * descriptors. It ensures that proper number of
-- * descriptors will be dequeued in callback
-- * function - needed for last batch in case where
-- * the number of operations is not a multiple of
-- * burst size.
-- */
-- rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
-- rte_memory_order_relaxed);
--
- /* Wait until processing of previous batch is
- * completed
- */
-@@ -3872,6 +3872,16 @@ throughput_intr_lcore_mldts(void *arg)
- if (unlikely(num_to_process - enqueued < num_to_enq))
- num_to_enq = num_to_process - enqueued;
-
-+ /* Write to thread burst_sz current number of enqueued
-+ * descriptors. It ensures that proper number of
-+ * descriptors will be dequeued in callback
-+ * function - needed for last batch in case where
-+ * the number of operations is not a multiple of
-+ * burst size.
-+ */
-+ rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
-+ rte_memory_order_relaxed);
-+
- enq = 0;
- do {
- enq += rte_bbdev_enqueue_mldts_ops(tp->dev_id,
-@@ -3879,16 +3889,6 @@ throughput_intr_lcore_mldts(void *arg)
+@@ -3488,15 +3497,6 @@ throughput_intr_lcore_fft(void *arg)
@@ -220,2 +178 @@
-- rte_atomic_store_explicit(&tp->burst_sz, num_to_enq,
-- rte_memory_order_relaxed);
+- __atomic_store_n(&tp->burst_sz, num_to_enq, __ATOMIC_RELAXED);
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'dmadev: fix structure alignment' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
2024-07-15 15:25 ` patch 'build: use builtin helper for python dependencies' " luca.boccassi
2024-07-15 15:25 ` patch 'app/bbdev: fix interrupt tests' " luca.boccassi
@ 2024-07-15 15:25 ` luca.boccassi
2024-07-15 15:25 ` patch 'vdpa/sfc: remove dead code' " luca.boccassi
` (81 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:25 UTC (permalink / raw)
To: Wenwu Ma; +Cc: Chengwen Feng, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e35ccc8804b944595fa531f69b48c5f240dad59e
Thanks.
Luca Boccassi
---
From e35ccc8804b944595fa531f69b48c5f240dad59e Mon Sep 17 00:00:00 2001
From: Wenwu Ma <wenwux.ma@intel.com>
Date: Wed, 20 Mar 2024 15:23:32 +0800
Subject: [PATCH] dmadev: fix structure alignment
[ upstream commit c15902587b538ff02cfb0fbb4dd481f1503d936b ]
The structure rte_dma_dev needs to be aligned to the cache line, but
the return value of malloc may not be aligned to the cache line. When
we use memset to clear the rte_dma_dev object, it may cause a segmentation
fault in clang-x86-platform.
This is because clang uses the "vmovaps" assembly instruction for
memset, which requires that the operands (rte_dma_dev objects) must
aligned on a 16-byte boundary or a general-protection exception (#GP)
is generated.
Therefore, either additional memory is applied for re-alignment, or the
rte_dma_dev object does not require cache line alignment. The patch
chooses the former option to fix the issue.
Fixes: b36970f2e13e ("dmadev: introduce DMA device library")
Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
Reviewed-by: Chengwen Feng <fengchengwen@huawei.com>
---
lib/dmadev/rte_dmadev.c | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/lib/dmadev/rte_dmadev.c b/lib/dmadev/rte_dmadev.c
index b48b915edc..d94f85ea9a 100644
--- a/lib/dmadev/rte_dmadev.c
+++ b/lib/dmadev/rte_dmadev.c
@@ -157,15 +157,24 @@ static int
dma_dev_data_prepare(void)
{
size_t size;
+ void *ptr;
if (rte_dma_devices != NULL)
return 0;
- size = dma_devices_max * sizeof(struct rte_dma_dev);
- rte_dma_devices = malloc(size);
- if (rte_dma_devices == NULL)
+ /* The DMA device object is expected to align cacheline,
+ * but the return value of malloc may not be aligned to the cache line.
+ * Therefore, extra memory is applied for realignment.
+ * Note: posix_memalign/aligned_alloc are not used
+ * because not always available, depending on libc.
+ */
+ size = dma_devices_max * sizeof(struct rte_dma_dev) + RTE_CACHE_LINE_SIZE;
+ ptr = malloc(size);
+ if (ptr == NULL)
return -ENOMEM;
- memset(rte_dma_devices, 0, size);
+ memset(ptr, 0, size);
+
+ rte_dma_devices = RTE_PTR_ALIGN(ptr, RTE_CACHE_LINE_SIZE);
return 0;
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:34.992740818 +0100
+++ 0004-dmadev-fix-structure-alignment.patch 2024-07-15 16:19:34.440203731 +0100
@@ -1 +1 @@
-From c15902587b538ff02cfb0fbb4dd481f1503d936b Mon Sep 17 00:00:00 2001
+From e35ccc8804b944595fa531f69b48c5f240dad59e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c15902587b538ff02cfb0fbb4dd481f1503d936b ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index e64b279bac..845727210f 100644
+index b48b915edc..d94f85ea9a 100644
@@ -33 +34 @@
-@@ -159,15 +159,24 @@ static int
+@@ -157,15 +157,24 @@ static int
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'vdpa/sfc: remove dead code' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (2 preceding siblings ...)
2024-07-15 15:25 ` patch 'dmadev: fix structure alignment' " luca.boccassi
@ 2024-07-15 15:25 ` luca.boccassi
2024-07-15 15:25 ` patch 'mbuf: fix dynamic fields copy' " luca.boccassi
` (80 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:25 UTC (permalink / raw)
To: David Marchand; +Cc: Andrew Rybchenko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/2db5746bc8ff22b8c879e5516602cd82070f0681
Thanks.
Luca Boccassi
---
From 2db5746bc8ff22b8c879e5516602cd82070f0681 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 25 Jun 2024 14:24:09 +0200
Subject: [PATCH] vdpa/sfc: remove dead code
[ upstream commit 4ea22410ea9c0235db40313bb810582b25e845b3 ]
This is probably a copy/paste from the net/sfc driver.
sfc_logtype_driver is not a logtype variable from the sfc vDPA driver.
Remove it.
Fixes: 6dad9a7353d4 ("vdpa/sfc: support device initialization")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
drivers/vdpa/sfc/sfc_vdpa_hw.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/vdpa/sfc/sfc_vdpa_hw.c b/drivers/vdpa/sfc/sfc_vdpa_hw.c
index edb7e35c2c..7e43719f53 100644
--- a/drivers/vdpa/sfc/sfc_vdpa_hw.c
+++ b/drivers/vdpa/sfc/sfc_vdpa_hw.c
@@ -13,8 +13,6 @@
#include "sfc_vdpa.h"
#include "sfc_vdpa_ops.h"
-extern uint32_t sfc_logtype_driver;
-
#ifndef PAGE_SIZE
#define PAGE_SIZE (sysconf(_SC_PAGESIZE))
#endif
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:35.044354925 +0100
+++ 0005-vdpa-sfc-remove-dead-code.patch 2024-07-15 16:19:34.440203731 +0100
@@ -1 +1 @@
-From 4ea22410ea9c0235db40313bb810582b25e845b3 Mon Sep 17 00:00:00 2001
+From 2db5746bc8ff22b8c879e5516602cd82070f0681 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4ea22410ea9c0235db40313bb810582b25e845b3 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'mbuf: fix dynamic fields copy' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (3 preceding siblings ...)
2024-07-15 15:25 ` patch 'vdpa/sfc: remove dead code' " luca.boccassi
@ 2024-07-15 15:25 ` luca.boccassi
2024-07-15 15:25 ` patch 'bpf: fix MOV instruction evaluation' " luca.boccassi
` (79 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:25 UTC (permalink / raw)
To: Shijith Thotton; +Cc: Morten Brørup, Stephen Hemminger, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f172fd7567fa2b1f7c4825ddc6cbc33403f1b74c
Thanks.
Luca Boccassi
---
From f172fd7567fa2b1f7c4825ddc6cbc33403f1b74c Mon Sep 17 00:00:00 2001
From: Shijith Thotton <sthotton@marvell.com>
Date: Thu, 27 Jun 2024 13:27:56 +0530
Subject: [PATCH] mbuf: fix dynamic fields copy
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 95bea772528d316c969a170e6206f3b05ac39413 ]
Fixed rte_mbuf_dynfield_copy() API to copy dynamic fields from one mbuf
to another. When RTE_IOVA_AS_PA is not defined during the build, an
additional dynamic field (dynfield2) becomes available. This field
should be conditionally copied to ensure the complete duplication of
dynamic fields between mbufs. This patch fixes the same.
Bugzilla ID: 1472
Fixes: 03b57eb7ab9a ("mbuf: add second dynamic field member")
Signed-off-by: Shijith Thotton <sthotton@marvell.com>
Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/mbuf/rte_mbuf.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/mbuf/rte_mbuf.h b/lib/mbuf/rte_mbuf.h
index 3a82eb136d..a1b4c2b31d 100644
--- a/lib/mbuf/rte_mbuf.h
+++ b/lib/mbuf/rte_mbuf.h
@@ -1120,6 +1120,9 @@ rte_pktmbuf_attach_extbuf(struct rte_mbuf *m, void *buf_addr,
static inline void
rte_mbuf_dynfield_copy(struct rte_mbuf *mdst, const struct rte_mbuf *msrc)
{
+#if !RTE_IOVA_AS_PA
+ mdst->dynfield2 = msrc->dynfield2;
+#endif
memcpy(&mdst->dynfield1, msrc->dynfield1, sizeof(mdst->dynfield1));
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:35.093517065 +0100
+++ 0006-mbuf-fix-dynamic-fields-copy.patch 2024-07-15 16:19:34.444203816 +0100
@@ -1 +1 @@
-From 95bea772528d316c969a170e6206f3b05ac39413 Mon Sep 17 00:00:00 2001
+From f172fd7567fa2b1f7c4825ddc6cbc33403f1b74c Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 95bea772528d316c969a170e6206f3b05ac39413 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 4c4722e002..babe16c72c 100644
+index 3a82eb136d..a1b4c2b31d 100644
@@ -30 +31 @@
-@@ -1119,6 +1119,9 @@ rte_pktmbuf_attach_extbuf(struct rte_mbuf *m, void *buf_addr,
+@@ -1120,6 +1120,9 @@ rte_pktmbuf_attach_extbuf(struct rte_mbuf *m, void *buf_addr,
@@ -34 +35 @@
-+#if !RTE_IOVA_IN_MBUF
++#if !RTE_IOVA_AS_PA
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'bpf: fix MOV instruction evaluation' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (4 preceding siblings ...)
2024-07-15 15:25 ` patch 'mbuf: fix dynamic fields copy' " luca.boccassi
@ 2024-07-15 15:25 ` luca.boccassi
2024-07-15 15:25 ` patch 'bpf: fix load hangs with six IPv6 addresses' " luca.boccassi
` (78 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:25 UTC (permalink / raw)
To: Konstantin Ananyev; +Cc: Morten Brørup, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/d7a549306d92869a80230f51b51d1e7e36fccfad
Thanks.
Luca Boccassi
---
From d7a549306d92869a80230f51b51d1e7e36fccfad Mon Sep 17 00:00:00 2001
From: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Date: Thu, 27 Jun 2024 19:04:40 +0100
Subject: [PATCH] bpf: fix MOV instruction evaluation
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 3eef64655bfe3602f4e3235e2533932205f24569 ]
Verifier might left some register-state values uninitialized while
evaluating MOV instructions.
Add explicit initialization.
Fixes: 8021917293d0 ("bpf: add extra validation for input BPF program")
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
---
lib/bpf/bpf_validate.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/lib/bpf/bpf_validate.c b/lib/bpf/bpf_validate.c
index 61cbb42216..1bf91fa05b 100644
--- a/lib/bpf/bpf_validate.c
+++ b/lib/bpf/bpf_validate.c
@@ -636,14 +636,14 @@ eval_alu(struct bpf_verifier *bvf, const struct ebpf_insn *ins)
{
uint64_t msk;
uint32_t op;
- size_t opsz;
+ size_t opsz, sz;
const char *err;
struct bpf_eval_state *st;
struct bpf_reg_val *rd, rs;
- opsz = (BPF_CLASS(ins->code) == BPF_ALU) ?
+ sz = (BPF_CLASS(ins->code) == BPF_ALU) ?
sizeof(uint32_t) : sizeof(uint64_t);
- opsz = opsz * CHAR_BIT;
+ opsz = sz * CHAR_BIT;
msk = RTE_LEN2MASK(opsz, uint64_t);
st = bvf->evst;
@@ -652,8 +652,10 @@ eval_alu(struct bpf_verifier *bvf, const struct ebpf_insn *ins)
if (BPF_SRC(ins->code) == BPF_X) {
rs = st->rv[ins->src_reg];
eval_apply_mask(&rs, msk);
- } else
+ } else {
+ rs = (struct bpf_reg_val){.v = {.size = sz,},};
eval_fill_imm(&rs, msk, ins->imm);
+ }
eval_apply_mask(rd, msk);
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:35.145803899 +0100
+++ 0007-bpf-fix-MOV-instruction-evaluation.patch 2024-07-15 16:19:34.444203816 +0100
@@ -1 +1 @@
-From 3eef64655bfe3602f4e3235e2533932205f24569 Mon Sep 17 00:00:00 2001
+From d7a549306d92869a80230f51b51d1e7e36fccfad Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 3eef64655bfe3602f4e3235e2533932205f24569 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 79be5e917d..11344fff4d 100644
+index 61cbb42216..1bf91fa05b 100644
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'bpf: fix load hangs with six IPv6 addresses' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (5 preceding siblings ...)
2024-07-15 15:25 ` patch 'bpf: fix MOV instruction evaluation' " luca.boccassi
@ 2024-07-15 15:25 ` luca.boccassi
2024-07-15 15:25 ` patch 'telemetry: fix connection parameter parsing' " luca.boccassi
` (77 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:25 UTC (permalink / raw)
To: Konstantin Ananyev
Cc: Isaac Boukris, Morten Brørup, Stephen Hemminger, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e03493d52e9d59c40d1ccb31e27578be841d034e
Thanks.
Luca Boccassi
---
From e03493d52e9d59c40d1ccb31e27578be841d034e Mon Sep 17 00:00:00 2001
From: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Date: Thu, 27 Jun 2024 19:04:41 +0100
Subject: [PATCH] bpf: fix load hangs with six IPv6 addresses
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit a258eebdfb22f95a8a44d31b0eab639aed0a0c4b ]
As described in https://bugs.dpdk.org/show_bug.cgi?id=1465, converting
from following cBPF filter:
"host 1::1 or host 1::1 or host 1::1 or host 1::1 or
host 1::1 or host 1::1"
takes too long for BPF verifier to complete (up to 25 seconds).
Looking at it, I didn't find any actual functional bug.
In fact, it does what is expected: go through each possible path of
BPF program and evaluate register/stack state for each instruction.
The problem is that, for program with a lot of conditional branches,
number of possible paths starts to grow exponentially and such walk
becomes very excessive.
So to minimize number of evaluations, this patch implements heuristic
similar to what Linux kernel does: state pruning.
If from given instruction for given program state, we explore all possible
paths and for each of them reach bpf_exit() without any complaints and a
valid R0 value, then for that instruction this program state can be
marked as 'safe'.
When we later arrive at the same instruction with a state equivalent to
an earlier instruction 'safe' state, we can prune the search.
For now, only states for JCC targets are saved/examined.
Plus add few extra logging for DEBUG level.
Bugzilla ID: 1465
Fixes: 8021917293d0 ("bpf: add extra validation for input BPF program")
Reported-by: Isaac Boukris <iboukris@gmail.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/bpf/bpf_validate.c | 305 ++++++++++++++++++++++++++++++++++-------
1 file changed, 255 insertions(+), 50 deletions(-)
diff --git a/lib/bpf/bpf_validate.c b/lib/bpf/bpf_validate.c
index 1bf91fa05b..ae2dad46bb 100644
--- a/lib/bpf/bpf_validate.c
+++ b/lib/bpf/bpf_validate.c
@@ -29,10 +29,13 @@ struct bpf_reg_val {
};
struct bpf_eval_state {
+ SLIST_ENTRY(bpf_eval_state) next; /* for @safe list traversal */
struct bpf_reg_val rv[EBPF_REG_NUM];
struct bpf_reg_val sv[MAX_BPF_STACK_SIZE / sizeof(uint64_t)];
};
+SLIST_HEAD(bpf_evst_head, bpf_eval_state);
+
/* possible instruction node colour */
enum {
WHITE,
@@ -52,6 +55,9 @@ enum {
#define MAX_EDGES 2
+/* max number of 'safe' evaluated states to track per node */
+#define NODE_EVST_MAX 32
+
struct inst_node {
uint8_t colour;
uint8_t nb_edge:4;
@@ -59,7 +65,18 @@ struct inst_node {
uint8_t edge_type[MAX_EDGES];
uint32_t edge_dest[MAX_EDGES];
uint32_t prev_node;
- struct bpf_eval_state *evst;
+ struct {
+ struct bpf_eval_state *cur; /* save/restore for jcc targets */
+ struct bpf_eval_state *start;
+ struct bpf_evst_head safe; /* safe states for track/prune */
+ uint32_t nb_safe;
+ } evst;
+};
+
+struct evst_pool {
+ uint32_t num;
+ uint32_t cur;
+ struct bpf_eval_state *ent;
};
struct bpf_verifier {
@@ -73,11 +90,8 @@ struct bpf_verifier {
uint32_t edge_type[MAX_EDGE_TYPE];
struct bpf_eval_state *evst;
struct inst_node *evin;
- struct {
- uint32_t num;
- uint32_t cur;
- struct bpf_eval_state *ent;
- } evst_pool;
+ struct evst_pool evst_sr_pool; /* for evst save/restore */
+ struct evst_pool evst_tp_pool; /* for evst track/prune */
};
struct bpf_ins_check {
@@ -1085,7 +1099,7 @@ eval_jcc(struct bpf_verifier *bvf, const struct ebpf_insn *ins)
struct bpf_reg_val rvf, rvt;
tst = bvf->evst;
- fst = bvf->evin->evst;
+ fst = bvf->evin->evst.cur;
frd = fst->rv + ins->dst_reg;
trd = tst->rv + ins->dst_reg;
@@ -1814,8 +1828,8 @@ add_edge(struct bpf_verifier *bvf, struct inst_node *node, uint32_t nidx)
uint32_t ne;
if (nidx > bvf->prm->nb_ins) {
- RTE_BPF_LOG(ERR, "%s: program boundary violation at pc: %u, "
- "next pc: %u\n",
+ RTE_BPF_LOG(ERR,
+ "%s: program boundary violation at pc: %u, next pc: %u\n",
__func__, get_node_idx(bvf, node), nidx);
return -EINVAL;
}
@@ -2091,60 +2105,114 @@ validate(struct bpf_verifier *bvf)
* helper functions get/free eval states.
*/
static struct bpf_eval_state *
-pull_eval_state(struct bpf_verifier *bvf)
+pull_eval_state(struct evst_pool *pool)
{
uint32_t n;
- n = bvf->evst_pool.cur;
- if (n == bvf->evst_pool.num)
+ n = pool->cur;
+ if (n == pool->num)
return NULL;
- bvf->evst_pool.cur = n + 1;
- return bvf->evst_pool.ent + n;
+ pool->cur = n + 1;
+ return pool->ent + n;
}
static void
-push_eval_state(struct bpf_verifier *bvf)
+push_eval_state(struct evst_pool *pool)
{
- bvf->evst_pool.cur--;
+ RTE_ASSERT(pool->cur != 0);
+ pool->cur--;
}
static void
evst_pool_fini(struct bpf_verifier *bvf)
{
bvf->evst = NULL;
- free(bvf->evst_pool.ent);
- memset(&bvf->evst_pool, 0, sizeof(bvf->evst_pool));
+ free(bvf->evst_sr_pool.ent);
+ memset(&bvf->evst_sr_pool, 0, sizeof(bvf->evst_sr_pool));
+ memset(&bvf->evst_tp_pool, 0, sizeof(bvf->evst_tp_pool));
}
static int
evst_pool_init(struct bpf_verifier *bvf)
{
- uint32_t n;
+ uint32_t k, n;
- n = bvf->nb_jcc_nodes + 1;
+ /*
+ * We need nb_jcc_nodes + 1 for save_cur/restore_cur
+ * remaining ones will be used for state tracking/pruning.
+ */
+ k = bvf->nb_jcc_nodes + 1;
+ n = k * 3;
- bvf->evst_pool.ent = calloc(n, sizeof(bvf->evst_pool.ent[0]));
- if (bvf->evst_pool.ent == NULL)
+ bvf->evst_sr_pool.ent = calloc(n, sizeof(bvf->evst_sr_pool.ent[0]));
+ if (bvf->evst_sr_pool.ent == NULL)
return -ENOMEM;
- bvf->evst_pool.num = n;
- bvf->evst_pool.cur = 0;
+ bvf->evst_sr_pool.num = k;
+ bvf->evst_sr_pool.cur = 0;
- bvf->evst = pull_eval_state(bvf);
+ bvf->evst_tp_pool.ent = bvf->evst_sr_pool.ent + k;
+ bvf->evst_tp_pool.num = n - k;
+ bvf->evst_tp_pool.cur = 0;
+
+ bvf->evst = pull_eval_state(&bvf->evst_sr_pool);
return 0;
}
+/*
+ * try to allocate and initialise new eval state for given node.
+ * later if no errors will be encountered, this state will be accepted as
+ * one of the possible 'safe' states for that node.
+ */
+static void
+save_start_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
+{
+ RTE_ASSERT(node->evst.start == NULL);
+
+ /* limit number of states for one node with some reasonable value */
+ if (node->evst.nb_safe >= NODE_EVST_MAX)
+ return;
+
+ /* try to get new eval_state */
+ node->evst.start = pull_eval_state(&bvf->evst_tp_pool);
+
+ /* make a copy of current state */
+ if (node->evst.start != NULL) {
+ memcpy(node->evst.start, bvf->evst, sizeof(*node->evst.start));
+ SLIST_NEXT(node->evst.start, next) = NULL;
+ }
+}
+
+/*
+ * add @start state to the list of @safe states.
+ */
+static void
+save_safe_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
+{
+ if (node->evst.start == NULL)
+ return;
+
+ SLIST_INSERT_HEAD(&node->evst.safe, node->evst.start, next);
+ node->evst.nb_safe++;
+
+ RTE_BPF_LOG(DEBUG, "%s(bvf=%p,node=%u,state=%p): nb_safe=%u;\n",
+ __func__, bvf, get_node_idx(bvf, node), node->evst.start,
+ node->evst.nb_safe);
+
+ node->evst.start = NULL;
+}
+
/*
* Save current eval state.
*/
static int
-save_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
+save_cur_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
{
struct bpf_eval_state *st;
/* get new eval_state for this node */
- st = pull_eval_state(bvf);
+ st = pull_eval_state(&bvf->evst_sr_pool);
if (st == NULL) {
RTE_BPF_LOG(ERR,
"%s: internal error (out of space) at pc: %u\n",
@@ -2156,11 +2224,13 @@ save_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
memcpy(st, bvf->evst, sizeof(*st));
/* swap current state with new one */
- node->evst = bvf->evst;
+ RTE_ASSERT(node->evst.cur == NULL);
+ node->evst.cur = bvf->evst;
bvf->evst = st;
RTE_BPF_LOG(DEBUG, "%s(bvf=%p,node=%u) old/new states: %p/%p;\n",
- __func__, bvf, get_node_idx(bvf, node), node->evst, bvf->evst);
+ __func__, bvf, get_node_idx(bvf, node), node->evst.cur,
+ bvf->evst);
return 0;
}
@@ -2169,14 +2239,15 @@ save_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
* Restore previous eval state and mark current eval state as free.
*/
static void
-restore_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
+restore_cur_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
{
RTE_BPF_LOG(DEBUG, "%s(bvf=%p,node=%u) old/new states: %p/%p;\n",
- __func__, bvf, get_node_idx(bvf, node), bvf->evst, node->evst);
+ __func__, bvf, get_node_idx(bvf, node), bvf->evst,
+ node->evst.cur);
- bvf->evst = node->evst;
- node->evst = NULL;
- push_eval_state(bvf);
+ bvf->evst = node->evst.cur;
+ node->evst.cur = NULL;
+ push_eval_state(&bvf->evst_sr_pool);
}
static void
@@ -2193,26 +2264,124 @@ log_eval_state(const struct bpf_verifier *bvf, const struct ebpf_insn *ins,
rte_log(loglvl, rte_bpf_logtype,
"r%u={\n"
- "\tv={type=%u, size=%zu},\n"
+ "\tv={type=%u, size=%zu, buf_size=%zu},\n"
"\tmask=0x%" PRIx64 ",\n"
"\tu={min=0x%" PRIx64 ", max=0x%" PRIx64 "},\n"
"\ts={min=%" PRId64 ", max=%" PRId64 "},\n"
"};\n",
ins->dst_reg,
- rv->v.type, rv->v.size,
+ rv->v.type, rv->v.size, rv->v.buf_size,
rv->mask,
rv->u.min, rv->u.max,
rv->s.min, rv->s.max);
}
/*
- * Do second pass through CFG and try to evaluate instructions
- * via each possible path.
- * Right now evaluation functionality is quite limited.
- * Still need to add extra checks for:
- * - use/return uninitialized registers.
- * - use uninitialized data from the stack.
- * - memory boundaries violation.
+ * compare two evaluation states.
+ * returns zero if @lv is more conservative (safer) then @rv.
+ * returns non-zero value otherwise.
+ */
+static int
+cmp_reg_val_within(const struct bpf_reg_val *lv, const struct bpf_reg_val *rv)
+{
+ /* expect @v and @mask to be identical */
+ if (memcmp(&lv->v, &rv->v, sizeof(lv->v)) != 0 || lv->mask != rv->mask)
+ return -1;
+
+ /* exact match only for mbuf and stack pointers */
+ if (lv->v.type == RTE_BPF_ARG_PTR_MBUF ||
+ lv->v.type == BPF_ARG_PTR_STACK)
+ return -1;
+
+ if (lv->u.min <= rv->u.min && lv->u.max >= rv->u.max &&
+ lv->s.min <= rv->s.min && lv->s.max >= rv->s.max)
+ return 0;
+
+ return -1;
+}
+
+/*
+ * compare two evaluation states.
+ * returns zero if they are identical.
+ * returns positive value if @lv is more conservative (safer) then @rv.
+ * returns negative value otherwise.
+ */
+static int
+cmp_eval_state(const struct bpf_eval_state *lv, const struct bpf_eval_state *rv)
+{
+ int32_t rc;
+ uint32_t i, k;
+
+ /* for stack expect identical values */
+ rc = memcmp(lv->sv, rv->sv, sizeof(lv->sv));
+ if (rc != 0)
+ return -(2 * EBPF_REG_NUM);
+
+ k = 0;
+ /* check register values */
+ for (i = 0; i != RTE_DIM(lv->rv); i++) {
+ rc = memcmp(&lv->rv[i], &rv->rv[i], sizeof(lv->rv[i]));
+ if (rc != 0 && cmp_reg_val_within(&lv->rv[i], &rv->rv[i]) != 0)
+ return -(i + 1);
+ k += (rc != 0);
+ }
+
+ return k;
+}
+
+/*
+ * check did we already evaluated that path and can it be pruned that time.
+ */
+static int
+prune_eval_state(struct bpf_verifier *bvf, const struct inst_node *node,
+ struct inst_node *next)
+{
+ int32_t rc;
+ struct bpf_eval_state *safe;
+
+ rc = INT32_MIN;
+ SLIST_FOREACH(safe, &next->evst.safe, next) {
+ rc = cmp_eval_state(safe, bvf->evst);
+ if (rc >= 0)
+ break;
+ }
+
+ rc = (rc >= 0) ? 0 : -1;
+
+ /*
+ * current state doesn't match any safe states,
+ * so no prunning is possible right now,
+ * track current state for future references.
+ */
+ if (rc != 0)
+ save_start_eval_state(bvf, next);
+
+ RTE_BPF_LOG(DEBUG, "%s(bvf=%p,node=%u,next=%u) returns %d, "
+ "next->evst.start=%p, next->evst.nb_safe=%u\n",
+ __func__, bvf, get_node_idx(bvf, node),
+ get_node_idx(bvf, next), rc,
+ next->evst.start, next->evst.nb_safe);
+ return rc;
+}
+
+/* Do second pass through CFG and try to evaluate instructions
+ * via each possible path. The verifier will try all paths, tracking types of
+ * registers used as input to instructions, and updating resulting type via
+ * register state values. Plus for each register and possible stack value it
+ * tries to estimate possible max/min value.
+ * For conditional jumps, a stack is used to save evaluation state, so one
+ * path is explored while the state for the other path is pushed onto the stack.
+ * Then later, we backtrack to the first pushed instruction and repeat the cycle
+ * until the stack is empty and we're done.
+ * For program with many conditional branches walking through all possible path
+ * could be very excessive. So to minimize number of evaluations we use
+ * heuristic similar to what Linux kernel does - state pruning:
+ * If from given instruction for given program state we explore all possible
+ * paths and for each of them reach _exit() without any complaints and a valid
+ * R0 value, then for that instruction, that program state can be marked as
+ * 'safe'. When we later arrive at the same instruction with a state
+ * equivalent to an earlier instruction's 'safe' state, we can prune the search.
+ * For now, only states for JCC targets are saved/examined.
*/
static int
evaluate(struct bpf_verifier *bvf)
@@ -2223,6 +2392,13 @@ evaluate(struct bpf_verifier *bvf)
const struct ebpf_insn *ins;
struct inst_node *next, *node;
+ struct {
+ uint32_t nb_eval;
+ uint32_t nb_prune;
+ uint32_t nb_save;
+ uint32_t nb_restore;
+ } stats;
+
/* initial state of frame pointer */
static const struct bpf_reg_val rvfp = {
.v = {
@@ -2246,6 +2422,8 @@ evaluate(struct bpf_verifier *bvf)
next = node;
rc = 0;
+ memset(&stats, 0, sizeof(stats));
+
while (node != NULL && rc == 0) {
/*
@@ -2259,11 +2437,14 @@ evaluate(struct bpf_verifier *bvf)
op = ins[idx].code;
/* for jcc node make a copy of evaluation state */
- if (node->nb_edge > 1)
- rc |= save_eval_state(bvf, node);
+ if (node->nb_edge > 1) {
+ rc |= save_cur_eval_state(bvf, node);
+ stats.nb_save++;
+ }
if (ins_chk[op].eval != NULL && rc == 0) {
err = ins_chk[op].eval(bvf, ins + idx);
+ stats.nb_eval++;
if (err != NULL) {
RTE_BPF_LOG(ERR, "%s: %s at pc: %u\n",
__func__, err, idx);
@@ -2277,21 +2458,37 @@ evaluate(struct bpf_verifier *bvf)
/* proceed through CFG */
next = get_next_node(bvf, node);
+
if (next != NULL) {
/* proceed with next child */
if (node->cur_edge == node->nb_edge &&
- node->evst != NULL)
- restore_eval_state(bvf, node);
+ node->evst.cur != NULL) {
+ restore_cur_eval_state(bvf, node);
+ stats.nb_restore++;
+ }
- next->prev_node = get_node_idx(bvf, node);
- node = next;
+ /*
+ * for jcc targets: check did we already evaluated
+ * that path and can it's evaluation be skipped that
+ * time.
+ */
+ if (node->nb_edge > 1 && prune_eval_state(bvf, node,
+ next) == 0) {
+ next = NULL;
+ stats.nb_prune++;
+ } else {
+ next->prev_node = get_node_idx(bvf, node);
+ node = next;
+ }
} else {
/*
* finished with current node and all it's kids,
- * proceed with parent
+ * mark it's @start state as safe for future references,
+ * and proceed with parent.
*/
node->cur_edge = 0;
+ save_safe_eval_state(bvf, node);
node = get_prev_node(bvf, node);
/* finished */
@@ -2300,6 +2497,14 @@ evaluate(struct bpf_verifier *bvf)
}
}
+ RTE_BPF_LOG(DEBUG, "%s(%p) returns %d, stats:\n"
+ "node evaluations=%u;\n"
+ "state pruned=%u;\n"
+ "state saves=%u;\n"
+ "state restores=%u;\n",
+ __func__, bvf, rc,
+ stats.nb_eval, stats.nb_prune, stats.nb_save, stats.nb_restore);
+
return rc;
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:35.197489954 +0100
+++ 0008-bpf-fix-load-hangs-with-six-IPv6-addresses.patch 2024-07-15 16:19:34.448203901 +0100
@@ -1 +1 @@
-From a258eebdfb22f95a8a44d31b0eab639aed0a0c4b Mon Sep 17 00:00:00 2001
+From e03493d52e9d59c40d1ccb31e27578be841d034e Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit a258eebdfb22f95a8a44d31b0eab639aed0a0c4b ]
+
@@ -38 +39,0 @@
-Cc: stable@dpdk.org
@@ -49 +50 @@
-index 11344fff4d..4f47d6dc7b 100644
+index 1bf91fa05b..ae2dad46bb 100644
@@ -123,4 +124,4 @@
-- RTE_BPF_LOG_LINE(ERR, "%s: program boundary violation at pc: %u, "
-- "next pc: %u",
-+ RTE_BPF_LOG_LINE(ERR,
-+ "%s: program boundary violation at pc: %u, next pc: %u",
+- RTE_BPF_LOG(ERR, "%s: program boundary violation at pc: %u, "
+- "next pc: %u\n",
++ RTE_BPF_LOG(ERR,
++ "%s: program boundary violation at pc: %u, next pc: %u\n",
@@ -241 +242 @@
-+ RTE_BPF_LOG_LINE(DEBUG, "%s(bvf=%p,node=%u,state=%p): nb_safe=%u;",
++ RTE_BPF_LOG(DEBUG, "%s(bvf=%p,node=%u,state=%p): nb_safe=%u;\n",
@@ -261,2 +262,2 @@
- RTE_BPF_LOG_LINE(ERR,
- "%s: internal error (out of space) at pc: %u",
+ RTE_BPF_LOG(ERR,
+ "%s: internal error (out of space) at pc: %u\n",
@@ -272 +273 @@
- RTE_BPF_LOG_LINE(DEBUG, "%s(bvf=%p,node=%u) old/new states: %p/%p;",
+ RTE_BPF_LOG(DEBUG, "%s(bvf=%p,node=%u) old/new states: %p/%p;\n",
@@ -286 +287 @@
- RTE_BPF_LOG_LINE(DEBUG, "%s(bvf=%p,node=%u) old/new states: %p/%p;",
+ RTE_BPF_LOG(DEBUG, "%s(bvf=%p,node=%u) old/new states: %p/%p;\n",
@@ -300 +301 @@
-@@ -2193,26 +2264,124 @@ log_dbg_eval_state(const struct bpf_verifier *bvf, const struct ebpf_insn *ins,
+@@ -2193,26 +2264,124 @@ log_eval_state(const struct bpf_verifier *bvf, const struct ebpf_insn *ins,
@@ -302 +303 @@
- RTE_LOG(DEBUG, BPF,
+ rte_log(loglvl, rte_bpf_logtype,
@@ -405,2 +406,2 @@
-+ RTE_BPF_LOG_LINE(DEBUG, "%s(bvf=%p,node=%u,next=%u) returns %d, "
-+ "next->evst.start=%p, next->evst.nb_safe=%u",
++ RTE_BPF_LOG(DEBUG, "%s(bvf=%p,node=%u,next=%u) returns %d, "
++ "next->evst.start=%p, next->evst.nb_safe=%u\n",
@@ -472 +473 @@
- RTE_BPF_LOG_LINE(ERR, "%s: %s at pc: %u",
+ RTE_BPF_LOG(ERR, "%s: %s at pc: %u\n",
@@ -521 +522 @@
-+ RTE_LOG(DEBUG, BPF, "%s(%p) returns %d, stats:\n"
++ RTE_BPF_LOG(DEBUG, "%s(%p) returns %d, stats:\n"
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'telemetry: fix connection parameter parsing' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (6 preceding siblings ...)
2024-07-15 15:25 ` patch 'bpf: fix load hangs with six IPv6 addresses' " luca.boccassi
@ 2024-07-15 15:25 ` luca.boccassi
2024-07-15 15:25 ` patch 'baseband/la12xx: forbid secondary process' " luca.boccassi
` (76 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:25 UTC (permalink / raw)
To: Zhichao Zeng; +Cc: Song Jiale, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/63cc1ddb1b3feea8a9c7b7a76a0e562f32fe99e2
Thanks.
Luca Boccassi
---
From 63cc1ddb1b3feea8a9c7b7a76a0e562f32fe99e2 Mon Sep 17 00:00:00 2001
From: Zhichao Zeng <zhichaox.zeng@intel.com>
Date: Fri, 21 Jun 2024 10:40:37 +0800
Subject: [PATCH] telemetry: fix connection parameter parsing
[ upstream commit efdf81829076198189ba6ccbb2e5c50270f56992 ]
For calling memcpy when the source and destination addresses are the same,
there is a small probability that there will be a copy error issue in some
environments, resulting in a failure to connect.
This patch uses memmove instead of memcpy to avoid this issue.
Fixes: b80fe1805eee ("telemetry: introduce backward compatibility")
Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
Tested-by: Song Jiale <songx.jiale@intel.com>
---
lib/telemetry/telemetry_legacy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/telemetry/telemetry_legacy.c b/lib/telemetry/telemetry_legacy.c
index 4c1d1c353a..578230732c 100644
--- a/lib/telemetry/telemetry_legacy.c
+++ b/lib/telemetry/telemetry_legacy.c
@@ -94,7 +94,7 @@ register_client(const char *cmd __rte_unused, const char *params,
}
#ifndef RTE_EXEC_ENV_WINDOWS
strlcpy(data, strchr(params, ':'), sizeof(data));
- memcpy(data, &data[strlen(":\"")], strlen(data));
+ memmove(data, &data[strlen(":\"")], strlen(data));
if (!strchr(data, '\"')) {
fprintf(stderr, "Invalid client data\n");
return -1;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:35.250141450 +0100
+++ 0009-telemetry-fix-connection-parameter-parsing.patch 2024-07-15 16:19:34.448203901 +0100
@@ -1 +1 @@
-From efdf81829076198189ba6ccbb2e5c50270f56992 Mon Sep 17 00:00:00 2001
+From 63cc1ddb1b3feea8a9c7b7a76a0e562f32fe99e2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit efdf81829076198189ba6ccbb2e5c50270f56992 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'baseband/la12xx: forbid secondary process' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (7 preceding siblings ...)
2024-07-15 15:25 ` patch 'telemetry: fix connection parameter parsing' " luca.boccassi
@ 2024-07-15 15:25 ` luca.boccassi
2024-07-15 15:25 ` patch 'app/crypto-perf: remove redundant local variable' " luca.boccassi
` (75 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:25 UTC (permalink / raw)
To: Hemant Agrawal; +Cc: Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/cbe35e02f95454b3f698af10e41ee6d1fb95b903
Thanks.
Luca Boccassi
---
From cbe35e02f95454b3f698af10e41ee6d1fb95b903 Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Tue, 2 Jul 2024 11:39:21 +0530
Subject: [PATCH] baseband/la12xx: forbid secondary process
[ upstream commit 95547dc69119154c85abfa7e8523e83a7ac05c9e ]
The la12xx driver do not have any checks for secondary process
and it causes the system to try to initialize the driver, causing
segmentation faults.
LA12xx driver do not support multi-processing.
Return when not called from Primary process.
Fixes: f218a1f92017 ("baseband/la12xx: introduce NXP LA12xx driver")
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
drivers/baseband/la12xx/bbdev_la12xx.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/baseband/la12xx/bbdev_la12xx.c b/drivers/baseband/la12xx/bbdev_la12xx.c
index bb754a5395..1a56e73abd 100644
--- a/drivers/baseband/la12xx/bbdev_la12xx.c
+++ b/drivers/baseband/la12xx/bbdev_la12xx.c
@@ -1084,6 +1084,9 @@ la12xx_bbdev_remove(struct rte_vdev_device *vdev)
PMD_INIT_FUNC_TRACE();
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return 0;
+
if (vdev == NULL)
return -EINVAL;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:35.311188712 +0100
+++ 0010-baseband-la12xx-forbid-secondary-process.patch 2024-07-15 16:19:34.448203901 +0100
@@ -1 +1 @@
-From 95547dc69119154c85abfa7e8523e83a7ac05c9e Mon Sep 17 00:00:00 2001
+From cbe35e02f95454b3f698af10e41ee6d1fb95b903 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 95547dc69119154c85abfa7e8523e83a7ac05c9e ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'app/crypto-perf: remove redundant local variable' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (8 preceding siblings ...)
2024-07-15 15:25 ` patch 'baseband/la12xx: forbid secondary process' " luca.boccassi
@ 2024-07-15 15:25 ` luca.boccassi
2024-07-15 15:25 ` patch 'app/crypto-perf: fix result for asymmetric' " luca.boccassi
` (74 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:25 UTC (permalink / raw)
To: Gowrishankar Muthukrishnan; +Cc: Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/d581598df3592eedba82152da56b365b91713a71
Thanks.
Luca Boccassi
---
From d581598df3592eedba82152da56b365b91713a71 Mon Sep 17 00:00:00 2001
From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Date: Wed, 26 Jun 2024 14:17:41 +0530
Subject: [PATCH] app/crypto-perf: remove redundant local variable
[ upstream commit 766cac609427cc8ef0f6680a73c4dcd3ac4e2a0d ]
Remove redundant local variable used for asym session.
Fixes: a29bb2489886 ("cryptodev: hide asymmetric session structure")
Fixes: 2973dbf93b44 ("security: hide session structure")
Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
app/test-crypto-perf/cperf_ops.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/app/test-crypto-perf/cperf_ops.c b/app/test-crypto-perf/cperf_ops.c
index 93b9bfb240..6bbab3289e 100644
--- a/app/test-crypto-perf/cperf_ops.c
+++ b/app/test-crypto-perf/cperf_ops.c
@@ -21,7 +21,6 @@ cperf_set_ops_asym(struct rte_crypto_op **ops,
uint64_t *tsc_start __rte_unused)
{
uint16_t i;
- void *asym_sess = (void *)sess;
for (i = 0; i < nb_ops; i++) {
struct rte_crypto_asym_op *asym_op = ops[i]->asym;
@@ -31,7 +30,7 @@ cperf_set_ops_asym(struct rte_crypto_op **ops,
asym_op->modex.base.length = options->modex_data->base.len;
asym_op->modex.result.data = options->modex_data->result.data;
asym_op->modex.result.length = options->modex_data->result.len;
- rte_crypto_op_attach_asym_session(ops[i], asym_sess);
+ rte_crypto_op_attach_asym_session(ops[i], sess);
}
}
@@ -64,7 +63,6 @@ cperf_set_ops_security(struct rte_crypto_op **ops,
for (i = 0; i < nb_ops; i++) {
struct rte_crypto_sym_op *sym_op = ops[i]->sym;
- void *sec_sess = (void *)sess;
uint32_t buf_sz;
uint32_t *per_pkt_hfn = rte_crypto_op_ctod_offset(ops[i],
@@ -72,7 +70,7 @@ cperf_set_ops_security(struct rte_crypto_op **ops,
*per_pkt_hfn = options->pdcp_ses_hfn_en ? 0 : PDCP_DEFAULT_HFN;
ops[i]->status = RTE_CRYPTO_OP_STATUS_NOT_PROCESSED;
- rte_security_attach_session(ops[i], sec_sess);
+ rte_security_attach_session(ops[i], sess);
sym_op->m_src = (struct rte_mbuf *)((uint8_t *)ops[i] +
src_buf_offset);
@@ -129,7 +127,6 @@ cperf_set_ops_security_ipsec(struct rte_crypto_op **ops,
uint16_t iv_offset __rte_unused, uint32_t *imix_idx,
uint64_t *tsc_start)
{
- void *sec_sess = sess;
const uint32_t test_buffer_size = options->test_buffer_size;
const uint32_t headroom_sz = options->headroom_sz;
const uint32_t segment_sz = options->segment_sz;
@@ -143,7 +140,7 @@ cperf_set_ops_security_ipsec(struct rte_crypto_op **ops,
struct rte_mbuf *m = sym_op->m_src;
ops[i]->status = RTE_CRYPTO_OP_STATUS_NOT_PROCESSED;
- rte_security_attach_session(ops[i], sec_sess);
+ rte_security_attach_session(ops[i], sess);
sym_op->m_src = (struct rte_mbuf *)((uint8_t *)ops[i] +
src_buf_offset);
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:35.362937866 +0100
+++ 0011-app-crypto-perf-remove-redundant-local-variable.patch 2024-07-15 16:19:34.448203901 +0100
@@ -1 +1 @@
-From 766cac609427cc8ef0f6680a73c4dcd3ac4e2a0d Mon Sep 17 00:00:00 2001
+From d581598df3592eedba82152da56b365b91713a71 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 766cac609427cc8ef0f6680a73c4dcd3ac4e2a0d ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 4ca001b721..a802281a71 100644
+index 93b9bfb240..6bbab3289e 100644
@@ -39 +40 @@
-@@ -62,7 +61,6 @@ cperf_set_ops_security(struct rte_crypto_op **ops,
+@@ -64,7 +63,6 @@ cperf_set_ops_security(struct rte_crypto_op **ops,
@@ -47 +48 @@
-@@ -70,7 +68,7 @@ cperf_set_ops_security(struct rte_crypto_op **ops,
+@@ -72,7 +70,7 @@ cperf_set_ops_security(struct rte_crypto_op **ops,
@@ -56 +57 @@
-@@ -127,7 +125,6 @@ cperf_set_ops_security_ipsec(struct rte_crypto_op **ops,
+@@ -129,7 +127,6 @@ cperf_set_ops_security_ipsec(struct rte_crypto_op **ops,
@@ -62,4 +63,4 @@
- uint64_t tsc_start_temp, tsc_end_temp;
- uint16_t i = 0;
-@@ -140,7 +137,7 @@ cperf_set_ops_security_ipsec(struct rte_crypto_op **ops,
- uint32_t offset = test_buffer_size;
+ const uint32_t headroom_sz = options->headroom_sz;
+ const uint32_t segment_sz = options->segment_sz;
+@@ -143,7 +140,7 @@ cperf_set_ops_security_ipsec(struct rte_crypto_op **ops,
+ struct rte_mbuf *m = sym_op->m_src;
@@ -70,2 +71,2 @@
- sym_op->m_src = (struct rte_mbuf *)((uint8_t *)ops[i] + src_buf_offset);
- sym_op->m_src->pkt_len = test_buffer_size;
+ sym_op->m_src = (struct rte_mbuf *)((uint8_t *)ops[i] +
+ src_buf_offset);
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'app/crypto-perf: fix result for asymmetric' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (9 preceding siblings ...)
2024-07-15 15:25 ` patch 'app/crypto-perf: remove redundant local variable' " luca.boccassi
@ 2024-07-15 15:25 ` luca.boccassi
2024-07-15 15:25 ` patch 'crypto/cnxk: fix minimal input normalization' " luca.boccassi
` (73 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:25 UTC (permalink / raw)
To: Gowrishankar Muthukrishnan; +Cc: Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/528f8f36a88277ecdaee24c26447de59def3841d
Thanks.
Luca Boccassi
---
From 528f8f36a88277ecdaee24c26447de59def3841d Mon Sep 17 00:00:00 2001
From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Date: Wed, 26 Jun 2024 14:17:42 +0530
Subject: [PATCH] app/crypto-perf: fix result for asymmetric
[ upstream commit 022f9bf9d4571092be6bb98cea12efb1aa8fe0af ]
For asymmetric op, private test data should be stored after
rte_crypto_asym_op struct.
Fixes: a538d1d2d01e ("test/crypto-perf: extend asymmetric crypto throughput test")
Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
app/test-crypto-perf/cperf_test_common.c | 6 ++++--
app/test-crypto-perf/cperf_test_latency.c | 14 +++++++++++---
2 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/app/test-crypto-perf/cperf_test_common.c b/app/test-crypto-perf/cperf_test_common.c
index 94d39fb177..6b8ab65731 100644
--- a/app/test-crypto-perf/cperf_test_common.c
+++ b/app/test-crypto-perf/cperf_test_common.c
@@ -149,11 +149,11 @@ cperf_alloc_common_memory(const struct cperf_options *options,
int ret;
/* Calculate the object size */
- uint16_t crypto_op_size = sizeof(struct rte_crypto_op) +
- sizeof(struct rte_crypto_sym_op);
+ uint16_t crypto_op_size = sizeof(struct rte_crypto_op);
uint16_t crypto_op_private_size;
if (options->op_type == CPERF_ASYM_MODEX) {
+ crypto_op_size += sizeof(struct rte_crypto_asym_op);
snprintf(pool_name, RTE_MEMPOOL_NAMESIZE, "perf_asym_op_pool%u",
rte_socket_id());
*pool = rte_crypto_op_pool_create(
@@ -170,6 +170,8 @@ cperf_alloc_common_memory(const struct cperf_options *options,
return 0;
}
+ crypto_op_size += sizeof(struct rte_crypto_sym_op);
+
/*
* If doing AES-CCM, IV field needs to be 16 bytes long,
* and AAD field needs to be long enough to have 18 bytes,
diff --git a/app/test-crypto-perf/cperf_test_latency.c b/app/test-crypto-perf/cperf_test_latency.c
index 406e082e4e..1c5fca0a55 100644
--- a/app/test-crypto-perf/cperf_test_latency.c
+++ b/app/test-crypto-perf/cperf_test_latency.c
@@ -122,7 +122,11 @@ store_timestamp(struct rte_crypto_op *op, uint64_t timestamp)
{
struct priv_op_data *priv_data;
- priv_data = (struct priv_op_data *) (op->sym + 1);
+ if (op->type == RTE_CRYPTO_OP_TYPE_SYMMETRIC)
+ priv_data = (struct priv_op_data *) (op->sym + 1);
+ else
+ priv_data = (struct priv_op_data *) (op->asym + 1);
+
priv_data->result->status = op->status;
priv_data->result->tsc_end = timestamp;
}
@@ -250,9 +254,13 @@ cperf_latency_test_runner(void *arg)
ctx->res[tsc_idx].tsc_start = tsc_start;
/*
* Private data structure starts after the end of the
- * rte_crypto_sym_op structure.
+ * rte_crypto_sym_op (or rte_crypto_asym_op) structure.
*/
- priv_data = (struct priv_op_data *) (ops[i]->sym + 1);
+ if (ops[i]->type == RTE_CRYPTO_OP_TYPE_SYMMETRIC)
+ priv_data = (struct priv_op_data *) (ops[i]->sym + 1);
+ else
+ priv_data = (struct priv_op_data *) (ops[i]->asym + 1);
+
priv_data->result = (void *)&ctx->res[tsc_idx];
tsc_idx++;
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:35.413000464 +0100
+++ 0012-app-crypto-perf-fix-result-for-asymmetric.patch 2024-07-15 16:19:34.452203987 +0100
@@ -1 +1 @@
-From 022f9bf9d4571092be6bb98cea12efb1aa8fe0af Mon Sep 17 00:00:00 2001
+From 528f8f36a88277ecdaee24c26447de59def3841d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 022f9bf9d4571092be6bb98cea12efb1aa8fe0af ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -47 +48 @@
-index b8ad6bf4d4..376847e761 100644
+index 406e082e4e..1c5fca0a55 100644
@@ -63 +64 @@
-@@ -251,9 +255,13 @@ cperf_latency_test_runner(void *arg)
+@@ -250,9 +254,13 @@ cperf_latency_test_runner(void *arg)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'crypto/cnxk: fix minimal input normalization' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (10 preceding siblings ...)
2024-07-15 15:25 ` patch 'app/crypto-perf: fix result for asymmetric' " luca.boccassi
@ 2024-07-15 15:25 ` luca.boccassi
2024-07-15 15:25 ` patch 'cryptodev: fix build without crypto callbacks' " luca.boccassi
` (72 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:25 UTC (permalink / raw)
To: Gowrishankar Muthukrishnan; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/734137651508036d90198aa057d06b20186391f7
Thanks.
Luca Boccassi
---
From 734137651508036d90198aa057d06b20186391f7 Mon Sep 17 00:00:00 2001
From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Date: Wed, 26 Jun 2024 15:48:18 +0530
Subject: [PATCH] crypto/cnxk: fix minimal input normalization
[ upstream commit 42ebfb0380cfc5e7c82555648b2ce064a9f4a3ad ]
Fix modex to nomalize input only when MSW is zero.
Fixes: 5a3513caeb45 ("crypto/cnxk: add asymmetric session")
Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
---
drivers/crypto/cnxk/cnxk_ae.h | 30 +++++++++++++++++++++---------
1 file changed, 21 insertions(+), 9 deletions(-)
diff --git a/drivers/crypto/cnxk/cnxk_ae.h b/drivers/crypto/cnxk/cnxk_ae.h
index adf719da73..156bd2e94f 100644
--- a/drivers/crypto/cnxk/cnxk_ae.h
+++ b/drivers/crypto/cnxk/cnxk_ae.h
@@ -27,13 +27,22 @@ struct cnxk_ae_sess {
};
static __rte_always_inline void
-cnxk_ae_modex_param_normalize(uint8_t **data, size_t *len)
+cnxk_ae_modex_param_normalize(uint8_t **data, size_t *len, size_t max)
{
+ uint8_t msw_len = *len % 8;
+ uint64_t msw_val = 0;
size_t i;
- /* Strip leading NUL bytes */
- for (i = 0; i < *len; i++) {
- if ((*data)[i] != 0)
+ if (*len <= 8)
+ return;
+
+ memcpy(&msw_val, *data, msw_len);
+ if (msw_val != 0)
+ return;
+
+ for (i = msw_len; i < *len && (*len - i) < max; i += 8) {
+ memcpy(&msw_val, &(*data)[i], 8);
+ if (msw_val != 0)
break;
}
*data += i;
@@ -50,8 +59,8 @@ cnxk_ae_fill_modex_params(struct cnxk_ae_sess *sess,
uint8_t *exp = xform->modex.exponent.data;
uint8_t *mod = xform->modex.modulus.data;
- cnxk_ae_modex_param_normalize(&mod, &mod_len);
- cnxk_ae_modex_param_normalize(&exp, &exp_len);
+ cnxk_ae_modex_param_normalize(&mod, &mod_len, SIZE_MAX);
+ cnxk_ae_modex_param_normalize(&exp, &exp_len, mod_len);
if (unlikely(exp_len == 0 || mod_len == 0))
return -EINVAL;
@@ -240,7 +249,7 @@ cnxk_ae_modex_prep(struct rte_crypto_op *op, struct roc_ae_buf_ptr *meta_buf,
struct rte_crypto_mod_op_param mod_op;
uint64_t total_key_len;
union cpt_inst_w4 w4;
- uint32_t base_len;
+ size_t base_len;
uint32_t dlen;
uint8_t *dptr;
@@ -248,8 +257,11 @@ cnxk_ae_modex_prep(struct rte_crypto_op *op, struct roc_ae_buf_ptr *meta_buf,
base_len = mod_op.base.length;
if (unlikely(base_len > mod_len)) {
- op->status = RTE_CRYPTO_OP_STATUS_INVALID_ARGS;
- return -ENOTSUP;
+ cnxk_ae_modex_param_normalize(&mod_op.base.data, &base_len, mod_len);
+ if (base_len > mod_len) {
+ op->status = RTE_CRYPTO_OP_STATUS_INVALID_ARGS;
+ return -ENOTSUP;
+ }
}
total_key_len = mod_len + exp_len;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:35.462262863 +0100
+++ 0013-crypto-cnxk-fix-minimal-input-normalization.patch 2024-07-15 16:19:34.452203987 +0100
@@ -1 +1 @@
-From 42ebfb0380cfc5e7c82555648b2ce064a9f4a3ad Mon Sep 17 00:00:00 2001
+From 734137651508036d90198aa057d06b20186391f7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 42ebfb0380cfc5e7c82555648b2ce064a9f4a3ad ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
-index a843d6b5ef..ef9cb5eb91 100644
+index adf719da73..156bd2e94f 100644
@@ -20 +21 @@
-@@ -49,13 +49,22 @@ struct cnxk_ae_sess {
+@@ -27,13 +27,22 @@ struct cnxk_ae_sess {
@@ -47 +48 @@
-@@ -72,8 +81,8 @@ cnxk_ae_fill_modex_params(struct cnxk_ae_sess *sess,
+@@ -50,8 +59,8 @@ cnxk_ae_fill_modex_params(struct cnxk_ae_sess *sess,
@@ -58 +59 @@
-@@ -288,7 +297,7 @@ cnxk_ae_modex_prep(struct rte_crypto_op *op, struct roc_ae_buf_ptr *meta_buf,
+@@ -240,7 +249,7 @@ cnxk_ae_modex_prep(struct rte_crypto_op *op, struct roc_ae_buf_ptr *meta_buf,
@@ -67 +68 @@
-@@ -296,8 +305,11 @@ cnxk_ae_modex_prep(struct rte_crypto_op *op, struct roc_ae_buf_ptr *meta_buf,
+@@ -248,8 +257,11 @@ cnxk_ae_modex_prep(struct rte_crypto_op *op, struct roc_ae_buf_ptr *meta_buf,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'cryptodev: fix build without crypto callbacks' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (11 preceding siblings ...)
2024-07-15 15:25 ` patch 'crypto/cnxk: fix minimal input normalization' " luca.boccassi
@ 2024-07-15 15:25 ` luca.boccassi
2024-07-15 15:25 ` patch 'cryptodev: validate crypto callbacks from next node' " luca.boccassi
` (71 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:25 UTC (permalink / raw)
To: Ganapati Kundapura; +Cc: Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/ff0ffd5338b388ba7f4a362a16872a6ec2c1c2e7
Thanks.
Luca Boccassi
---
From ff0ffd5338b388ba7f4a362a16872a6ec2c1c2e7 Mon Sep 17 00:00:00 2001
From: Ganapati Kundapura <ganapati.kundapura@intel.com>
Date: Thu, 27 Jun 2024 05:06:25 -0500
Subject: [PATCH] cryptodev: fix build without crypto callbacks
[ upstream commit cfa443351ef581b7189467842ca102ab710cb7d2 ]
Crypto callbacks APIs are available in header files but when
the macro RTE_CRYPTO_CALLBACKS unset, test application need to
put #ifdef in its code.
The test application should be able to build and run, regardless
DPDK library is built with RTE_CRYPTO_CALLBACKS defined or not.
Added ENOTSUP from the beginning of the APIs implementation
if RTE_CRYPTO_CALLBACKS macro is unset/undefined.
Fixes: 1c3ffb95595e ("cryptodev: add enqueue and dequeue callbacks")
Fixes: 5523a75af539 ("test/crypto: add case for enqueue/dequeue callbacks")
Signed-off-by: Ganapati Kundapura <ganapati.kundapura@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
app/test/test_cryptodev.c | 12 ++++++++++++
lib/cryptodev/rte_cryptodev.c | 14 ++++++++++++++
2 files changed, 26 insertions(+)
diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 96cd9ef7dc..68c82771a1 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -12730,6 +12730,12 @@ test_enq_callback_setup(void)
/* Test with invalid crypto device */
cb = rte_cryptodev_add_enq_callback(RTE_CRYPTO_MAX_DEVS,
qp_id, test_enq_callback, NULL);
+ if (rte_errno == ENOTSUP) {
+ RTE_LOG(ERR, USER1, "%s line %d: "
+ "rte_cryptodev_add_enq_callback() "
+ "Not supported, skipped\n", __func__, __LINE__);
+ return TEST_SKIPPED;
+ }
TEST_ASSERT_NULL(cb, "Add callback on qp %u on "
"cryptodev %u did not fail",
qp_id, RTE_CRYPTO_MAX_DEVS);
@@ -12845,6 +12851,12 @@ test_deq_callback_setup(void)
/* Test with invalid crypto device */
cb = rte_cryptodev_add_deq_callback(RTE_CRYPTO_MAX_DEVS,
qp_id, test_deq_callback, NULL);
+ if (rte_errno == ENOTSUP) {
+ RTE_LOG(ERR, USER1, "%s line %d: "
+ "rte_cryptodev_add_deq_callback() "
+ "Not supported, skipped\n", __func__, __LINE__);
+ return TEST_SKIPPED;
+ }
TEST_ASSERT_NULL(cb, "Add callback on qp %u on "
"cryptodev %u did not fail",
qp_id, RTE_CRYPTO_MAX_DEVS);
diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
index d2b7e1c4cb..6c11881ab8 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -1407,6 +1407,10 @@ rte_cryptodev_add_enq_callback(uint8_t dev_id,
rte_cryptodev_callback_fn cb_fn,
void *cb_arg)
{
+#ifndef RTE_CRYPTO_CALLBACKS
+ rte_errno = ENOTSUP;
+ return NULL;
+#endif
struct rte_cryptodev *dev;
struct rte_cryptodev_cb_rcu *list;
struct rte_cryptodev_cb *cb, *tail;
@@ -1472,6 +1476,9 @@ rte_cryptodev_remove_enq_callback(uint8_t dev_id,
uint16_t qp_id,
struct rte_cryptodev_cb *cb)
{
+#ifndef RTE_CRYPTO_CALLBACKS
+ return -ENOTSUP;
+#endif
struct rte_cryptodev *dev;
struct rte_cryptodev_cb **prev_cb, *curr_cb;
struct rte_cryptodev_cb_rcu *list;
@@ -1545,6 +1552,10 @@ rte_cryptodev_add_deq_callback(uint8_t dev_id,
rte_cryptodev_callback_fn cb_fn,
void *cb_arg)
{
+#ifndef RTE_CRYPTO_CALLBACKS
+ rte_errno = ENOTSUP;
+ return NULL;
+#endif
struct rte_cryptodev *dev;
struct rte_cryptodev_cb_rcu *list;
struct rte_cryptodev_cb *cb, *tail;
@@ -1611,6 +1622,9 @@ rte_cryptodev_remove_deq_callback(uint8_t dev_id,
uint16_t qp_id,
struct rte_cryptodev_cb *cb)
{
+#ifndef RTE_CRYPTO_CALLBACKS
+ return -ENOTSUP;
+#endif
struct rte_cryptodev *dev;
struct rte_cryptodev_cb **prev_cb, *curr_cb;
struct rte_cryptodev_cb_rcu *list;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:35.512563961 +0100
+++ 0014-cryptodev-fix-build-without-crypto-callbacks.patch 2024-07-15 16:19:34.472204413 +0100
@@ -1 +1 @@
-From cfa443351ef581b7189467842ca102ab710cb7d2 Mon Sep 17 00:00:00 2001
+From ff0ffd5338b388ba7f4a362a16872a6ec2c1c2e7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cfa443351ef581b7189467842ca102ab710cb7d2 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 75f98b6744..6042db36a4 100644
+index 96cd9ef7dc..68c82771a1 100644
@@ -31 +32 @@
-@@ -14920,6 +14920,12 @@ test_enq_callback_setup(void)
+@@ -12730,6 +12730,12 @@ test_enq_callback_setup(void)
@@ -44 +45 @@
-@@ -15035,6 +15041,12 @@ test_deq_callback_setup(void)
+@@ -12845,6 +12851,12 @@ test_deq_callback_setup(void)
@@ -58 +59 @@
-index 886eb7adc4..682c9f49d0 100644
+index d2b7e1c4cb..6c11881ab8 100644
@@ -61 +62 @@
-@@ -1491,6 +1491,10 @@ rte_cryptodev_add_enq_callback(uint8_t dev_id,
+@@ -1407,6 +1407,10 @@ rte_cryptodev_add_enq_callback(uint8_t dev_id,
@@ -72 +73 @@
-@@ -1556,6 +1560,9 @@ rte_cryptodev_remove_enq_callback(uint8_t dev_id,
+@@ -1472,6 +1476,9 @@ rte_cryptodev_remove_enq_callback(uint8_t dev_id,
@@ -80,3 +81,3 @@
- RTE_ATOMIC(struct rte_cryptodev_cb *) *prev_cb;
- struct rte_cryptodev_cb *curr_cb;
-@@ -1630,6 +1637,10 @@ rte_cryptodev_add_deq_callback(uint8_t dev_id,
+ struct rte_cryptodev_cb **prev_cb, *curr_cb;
+ struct rte_cryptodev_cb_rcu *list;
+@@ -1545,6 +1552,10 @@ rte_cryptodev_add_deq_callback(uint8_t dev_id,
@@ -93 +94 @@
-@@ -1696,6 +1707,9 @@ rte_cryptodev_remove_deq_callback(uint8_t dev_id,
+@@ -1611,6 +1622,9 @@ rte_cryptodev_remove_deq_callback(uint8_t dev_id,
@@ -101,2 +102,2 @@
- RTE_ATOMIC(struct rte_cryptodev_cb *) *prev_cb;
- struct rte_cryptodev_cb *curr_cb;
+ struct rte_cryptodev_cb **prev_cb, *curr_cb;
+ struct rte_cryptodev_cb_rcu *list;
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'cryptodev: validate crypto callbacks from next node' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (12 preceding siblings ...)
2024-07-15 15:25 ` patch 'cryptodev: fix build without crypto callbacks' " luca.boccassi
@ 2024-07-15 15:25 ` luca.boccassi
2024-07-15 15:25 ` patch 'examples/fips_validation: fix dereference and out-of-bound' " luca.boccassi
` (70 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:25 UTC (permalink / raw)
To: Ganapati Kundapura; +Cc: Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/3d19e7d9eb6ee856cbd2f1e362056d80ef6151b5
Thanks.
Luca Boccassi
---
From 3d19e7d9eb6ee856cbd2f1e362056d80ef6151b5 Mon Sep 17 00:00:00 2001
From: Ganapati Kundapura <ganapati.kundapura@intel.com>
Date: Thu, 27 Jun 2024 05:06:26 -0500
Subject: [PATCH] cryptodev: validate crypto callbacks from next node
[ upstream commit e858d0c9612211ba43d6703cb7834697214a3fe1 ]
Crypto callbacks are invoked on checking from head node
which is always valid pointer.
This patch checks next node from the head node if callbacks
registered before invoking callbacks.
Fixes: 1c3ffb95595e ("cryptodev: add enqueue and dequeue callbacks")
Signed-off-by: Ganapati Kundapura <ganapati.kundapura@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
lib/cryptodev/rte_cryptodev.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/cryptodev/rte_cryptodev.h b/lib/cryptodev/rte_cryptodev.h
index f955d96e23..cef9f2b3cb 100644
--- a/lib/cryptodev/rte_cryptodev.h
+++ b/lib/cryptodev/rte_cryptodev.h
@@ -1851,7 +1851,7 @@ rte_cryptodev_dequeue_burst(uint8_t dev_id, uint16_t qp_id,
nb_ops = fp_ops->dequeue_burst(qp, ops, nb_ops);
#ifdef RTE_CRYPTO_CALLBACKS
- if (unlikely(fp_ops->qp.deq_cb != NULL)) {
+ if (unlikely(fp_ops->qp.deq_cb[qp_id].next != NULL)) {
struct rte_cryptodev_cb_rcu *list;
struct rte_cryptodev_cb *cb;
@@ -1918,7 +1918,7 @@ rte_cryptodev_enqueue_burst(uint8_t dev_id, uint16_t qp_id,
fp_ops = &rte_crypto_fp_ops[dev_id];
qp = fp_ops->qp.data[qp_id];
#ifdef RTE_CRYPTO_CALLBACKS
- if (unlikely(fp_ops->qp.enq_cb != NULL)) {
+ if (unlikely(fp_ops->qp.enq_cb[qp_id].next != NULL)) {
struct rte_cryptodev_cb_rcu *list;
struct rte_cryptodev_cb *cb;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:35.572331136 +0100
+++ 0015-cryptodev-validate-crypto-callbacks-from-next-node.patch 2024-07-15 16:19:34.472204413 +0100
@@ -1 +1 @@
-From e858d0c9612211ba43d6703cb7834697214a3fe1 Mon Sep 17 00:00:00 2001
+From 3d19e7d9eb6ee856cbd2f1e362056d80ef6151b5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e858d0c9612211ba43d6703cb7834697214a3fe1 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index c946f747fc..bec947f6d5 100644
+index f955d96e23..cef9f2b3cb 100644
@@ -25 +26 @@
-@@ -1910,7 +1910,7 @@ rte_cryptodev_dequeue_burst(uint8_t dev_id, uint16_t qp_id,
+@@ -1851,7 +1851,7 @@ rte_cryptodev_dequeue_burst(uint8_t dev_id, uint16_t qp_id,
@@ -34 +35 @@
-@@ -1977,7 +1977,7 @@ rte_cryptodev_enqueue_burst(uint8_t dev_id, uint16_t qp_id,
+@@ -1918,7 +1918,7 @@ rte_cryptodev_enqueue_burst(uint8_t dev_id, uint16_t qp_id,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'examples/fips_validation: fix dereference and out-of-bound' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (13 preceding siblings ...)
2024-07-15 15:25 ` patch 'cryptodev: validate crypto callbacks from next node' " luca.boccassi
@ 2024-07-15 15:25 ` luca.boccassi
2024-07-15 15:25 ` patch 'crypto/openssl: fix GCM and CCM thread unsafe contexts' " luca.boccassi
` (69 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:25 UTC (permalink / raw)
To: Gowrishankar Muthukrishnan; +Cc: Brian Dooley, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/7e6b9c068617106e9e0896894ba5b70356976ca9
Thanks.
Luca Boccassi
---
From 7e6b9c068617106e9e0896894ba5b70356976ca9 Mon Sep 17 00:00:00 2001
From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Date: Wed, 26 Jun 2024 15:56:23 +0530
Subject: [PATCH] examples/fips_validation: fix dereference and out-of-bound
[ upstream commit 57c10aaf3880fac5b2d0e1ddcfd8645e22b9f83c ]
Fix NULL dereference, out-of-bound, bad bit shift issues
reported by coverity scan.
Coverity issue: 384440, 384435, 384433, 384429
Fixes: 36128a67c27e ("examples/fips_validation: add asymmetric validation")
Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Brian Dooley <brian.dooley@intel.com>
---
examples/fips_validation/fips_validation_rsa.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/examples/fips_validation/fips_validation_rsa.c b/examples/fips_validation/fips_validation_rsa.c
index f675b51051..55f81860a0 100644
--- a/examples/fips_validation/fips_validation_rsa.c
+++ b/examples/fips_validation/fips_validation_rsa.c
@@ -328,6 +328,9 @@ parse_test_rsa_json_interim_writeback(struct fips_val *val)
if (prepare_vec_rsa() < 0)
return -1;
+ if (!vec.rsa.e.val)
+ return -1;
+
writeback_hex_str("", info.one_line_text, &vec.rsa.n);
obj = json_string(info.one_line_text);
json_object_set_new(json_info.json_write_group, "n", obj);
@@ -474,7 +477,7 @@ fips_test_randomize_message(struct fips_val *msg, struct fips_val *rand)
uint16_t rv_len;
if (!msg->val || !rand->val || rand->len > RV_BUF_LEN
- || msg->len > FIPS_TEST_JSON_BUF_LEN)
+ || msg->len > (FIPS_TEST_JSON_BUF_LEN - 1))
return -EINVAL;
memset(rv, 0, sizeof(rv));
@@ -503,7 +506,7 @@ fips_test_randomize_message(struct fips_val *msg, struct fips_val *rand)
m[i + j] ^= rv[j];
m[i + j] = ((uint8_t *)&rv_bitlen)[0];
- m[i + j + 1] = (((uint8_t *)&rv_bitlen)[1] >> 8) & 0xFF;
+ m[i + j + 1] = ((uint8_t *)&rv_bitlen)[1];
rte_free(msg->val);
msg->len = (rv_bitlen + m_bitlen + 16) / 8;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:35.615184763 +0100
+++ 0016-examples-fips_validation-fix-dereference-and-out-of-.patch 2024-07-15 16:19:34.476204499 +0100
@@ -1 +1 @@
-From 57c10aaf3880fac5b2d0e1ddcfd8645e22b9f83c Mon Sep 17 00:00:00 2001
+From 7e6b9c068617106e9e0896894ba5b70356976ca9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 57c10aaf3880fac5b2d0e1ddcfd8645e22b9f83c ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'crypto/openssl: fix GCM and CCM thread unsafe contexts' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (14 preceding siblings ...)
2024-07-15 15:25 ` patch 'examples/fips_validation: fix dereference and out-of-bound' " luca.boccassi
@ 2024-07-15 15:25 ` luca.boccassi
2024-07-15 15:25 ` patch 'crypto/openssl: optimize 3DES-CTR context init' " luca.boccassi
` (68 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:25 UTC (permalink / raw)
To: Jack Bond-Preston; +Cc: Kai Ji, Wathsala Vithanage, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/5154afdce867b5eca45e9239581dc2eca7b07777
Thanks.
Luca Boccassi
---
From 5154afdce867b5eca45e9239581dc2eca7b07777 Mon Sep 17 00:00:00 2001
From: Jack Bond-Preston <jack.bond-preston@foss.arm.com>
Date: Wed, 3 Jul 2024 13:45:47 +0000
Subject: [PATCH] crypto/openssl: fix GCM and CCM thread unsafe contexts
[ upstream commit 78d7765f0acbb23168b7b25e25d775bea22c48ab ]
Commit 67ab783b5d70 ("crypto/openssl: use local copy for session
contexts") introduced a fix for concurrency bugs which could occur when
using one OpenSSL PMD session across multiple cores simultaneously. The
solution was to clone the EVP contexts per-buffer to avoid them being
used concurrently.
However, part of commit 75adf1eae44f ("crypto/openssl: update HMAC
routine with 3.0 EVP API") reverted this fix, only for combined ops
(AES-GCM and AES-CCM).
Fix the concurrency issue by cloning EVP contexts per-buffer. An extra
workaround is required for OpenSSL versions which are >= 3.0.0, and
<= 3.2.0. This is because, prior to OpenSSL 3.2.0, EVP_CIPHER_CTX_copy()
is not implemented for AES-GCM or AES-CCM. When using these OpenSSL
versions, create and initialise the context from scratch, per-buffer.
Throughput performance uplift measurements for AES-GCM-128 encrypt on
Ampere Altra Max platform:
1 worker lcore
| buffer sz (B) | prev (Gbps) | optimised (Gbps) | uplift |
|-----------------+---------------+--------------------+----------|
| 64 | 2.60 | 1.31 | -49.5% |
| 256 | 7.69 | 4.45 | -42.1% |
| 1024 | 15.33 | 11.30 | -26.3% |
| 2048 | 18.74 | 15.37 | -18.0% |
| 4096 | 21.11 | 18.80 | -10.9% |
8 worker lcores
| buffer sz (B) | prev (Gbps) | optimised (Gbps) | uplift |
|-----------------+---------------+--------------------+----------|
| 64 | 19.94 | 2.83 | -85.8% |
| 256 | 58.84 | 11.00 | -81.3% |
| 1024 | 119.71 | 42.46 | -64.5% |
| 2048 | 147.69 | 80.91 | -45.2% |
| 4096 | 167.39 | 121.25 | -27.6% |
Fixes: 75adf1eae44f ("crypto/openssl: update HMAC routine with 3.0 EVP API")
Signed-off-by: Jack Bond-Preston <jack.bond-preston@foss.arm.com>
Acked-by: Kai Ji <kai.ji@intel.com>
Reviewed-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
---
drivers/crypto/openssl/rte_openssl_pmd.c | 84 ++++++++++++++++++------
1 file changed, 64 insertions(+), 20 deletions(-)
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 6ae31cb5cd..bf9a546f48 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -349,7 +349,8 @@ get_aead_algo(enum rte_crypto_aead_algorithm sess_algo, size_t keylen,
static int
openssl_set_sess_aead_enc_param(struct openssl_session *sess,
enum rte_crypto_aead_algorithm algo,
- uint8_t tag_len, const uint8_t *key)
+ uint8_t tag_len, const uint8_t *key,
+ EVP_CIPHER_CTX **ctx)
{
int iv_type = 0;
unsigned int do_ccm;
@@ -377,7 +378,7 @@ openssl_set_sess_aead_enc_param(struct openssl_session *sess,
}
sess->cipher.mode = OPENSSL_CIPHER_LIB;
- sess->cipher.ctx = EVP_CIPHER_CTX_new();
+ *ctx = EVP_CIPHER_CTX_new();
if (get_aead_algo(algo, sess->cipher.key.length,
&sess->cipher.evp_algo) != 0)
@@ -387,19 +388,19 @@ openssl_set_sess_aead_enc_param(struct openssl_session *sess,
sess->chain_order = OPENSSL_CHAIN_COMBINED;
- if (EVP_EncryptInit_ex(sess->cipher.ctx, sess->cipher.evp_algo,
+ if (EVP_EncryptInit_ex(*ctx, sess->cipher.evp_algo,
NULL, NULL, NULL) <= 0)
return -EINVAL;
- if (EVP_CIPHER_CTX_ctrl(sess->cipher.ctx, iv_type, sess->iv.length,
+ if (EVP_CIPHER_CTX_ctrl(*ctx, iv_type, sess->iv.length,
NULL) <= 0)
return -EINVAL;
if (do_ccm)
- EVP_CIPHER_CTX_ctrl(sess->cipher.ctx, EVP_CTRL_CCM_SET_TAG,
+ EVP_CIPHER_CTX_ctrl(*ctx, EVP_CTRL_CCM_SET_TAG,
tag_len, NULL);
- if (EVP_EncryptInit_ex(sess->cipher.ctx, NULL, NULL, key, NULL) <= 0)
+ if (EVP_EncryptInit_ex(*ctx, NULL, NULL, key, NULL) <= 0)
return -EINVAL;
return 0;
@@ -409,7 +410,8 @@ openssl_set_sess_aead_enc_param(struct openssl_session *sess,
static int
openssl_set_sess_aead_dec_param(struct openssl_session *sess,
enum rte_crypto_aead_algorithm algo,
- uint8_t tag_len, const uint8_t *key)
+ uint8_t tag_len, const uint8_t *key,
+ EVP_CIPHER_CTX **ctx)
{
int iv_type = 0;
unsigned int do_ccm = 0;
@@ -436,7 +438,7 @@ openssl_set_sess_aead_dec_param(struct openssl_session *sess,
}
sess->cipher.mode = OPENSSL_CIPHER_LIB;
- sess->cipher.ctx = EVP_CIPHER_CTX_new();
+ *ctx = EVP_CIPHER_CTX_new();
if (get_aead_algo(algo, sess->cipher.key.length,
&sess->cipher.evp_algo) != 0)
@@ -446,24 +448,54 @@ openssl_set_sess_aead_dec_param(struct openssl_session *sess,
sess->chain_order = OPENSSL_CHAIN_COMBINED;
- if (EVP_DecryptInit_ex(sess->cipher.ctx, sess->cipher.evp_algo,
+ if (EVP_DecryptInit_ex(*ctx, sess->cipher.evp_algo,
NULL, NULL, NULL) <= 0)
return -EINVAL;
- if (EVP_CIPHER_CTX_ctrl(sess->cipher.ctx, iv_type,
+ if (EVP_CIPHER_CTX_ctrl(*ctx, iv_type,
sess->iv.length, NULL) <= 0)
return -EINVAL;
if (do_ccm)
- EVP_CIPHER_CTX_ctrl(sess->cipher.ctx, EVP_CTRL_CCM_SET_TAG,
+ EVP_CIPHER_CTX_ctrl(*ctx, EVP_CTRL_CCM_SET_TAG,
tag_len, NULL);
- if (EVP_DecryptInit_ex(sess->cipher.ctx, NULL, NULL, key, NULL) <= 0)
+ if (EVP_DecryptInit_ex(*ctx, NULL, NULL, key, NULL) <= 0)
return -EINVAL;
return 0;
}
+static int openssl_aesni_ctx_clone(EVP_CIPHER_CTX **dest,
+ struct openssl_session *sess)
+{
+#if (OPENSSL_VERSION_NUMBER >= 0x30200000L)
+ *dest = EVP_CIPHER_CTX_dup(sess->ctx);
+ return 0;
+#elif (OPENSSL_VERSION_NUMBER >= 0x30000000L)
+ /* OpenSSL versions 3.0.0 <= V < 3.2.0 have no dupctx() implementation
+ * for AES-GCM and AES-CCM. In this case, we have to create new empty
+ * contexts and initialise, as we did the original context.
+ */
+ if (sess->auth.algo == RTE_CRYPTO_AUTH_AES_GMAC)
+ sess->aead_algo = RTE_CRYPTO_AEAD_AES_GCM;
+
+ if (sess->cipher.direction == RTE_CRYPTO_CIPHER_OP_ENCRYPT)
+ return openssl_set_sess_aead_enc_param(sess, sess->aead_algo,
+ sess->auth.digest_length, sess->cipher.key.data,
+ dest);
+ else
+ return openssl_set_sess_aead_dec_param(sess, sess->aead_algo,
+ sess->auth.digest_length, sess->cipher.key.data,
+ dest);
+#else
+ *dest = EVP_CIPHER_CTX_new();
+ if (EVP_CIPHER_CTX_copy(*dest, sess->cipher.ctx) != 1)
+ return -EINVAL;
+ return 0;
+#endif
+}
+
/** Set session cipher parameters */
static int
openssl_set_session_cipher_parameters(struct openssl_session *sess,
@@ -622,12 +654,14 @@ openssl_set_session_auth_parameters(struct openssl_session *sess,
return openssl_set_sess_aead_enc_param(sess,
RTE_CRYPTO_AEAD_AES_GCM,
xform->auth.digest_length,
- xform->auth.key.data);
+ xform->auth.key.data,
+ &sess->cipher.ctx);
else
return openssl_set_sess_aead_dec_param(sess,
RTE_CRYPTO_AEAD_AES_GCM,
xform->auth.digest_length,
- xform->auth.key.data);
+ xform->auth.key.data,
+ &sess->cipher.ctx);
break;
case RTE_CRYPTO_AUTH_MD5:
@@ -769,10 +803,12 @@ openssl_set_session_aead_parameters(struct openssl_session *sess,
/* Select cipher direction */
if (xform->aead.op == RTE_CRYPTO_AEAD_OP_ENCRYPT)
return openssl_set_sess_aead_enc_param(sess, xform->aead.algo,
- xform->aead.digest_length, xform->aead.key.data);
+ xform->aead.digest_length, xform->aead.key.data,
+ &sess->cipher.ctx);
else
return openssl_set_sess_aead_dec_param(sess, xform->aead.algo,
- xform->aead.digest_length, xform->aead.key.data);
+ xform->aead.digest_length, xform->aead.key.data,
+ &sess->cipher.ctx);
}
/** Parse crypto xform chain and set private session parameters */
@@ -1589,6 +1625,12 @@ process_openssl_combined_op
return;
}
+ EVP_CIPHER_CTX *ctx;
+ if (openssl_aesni_ctx_clone(&ctx, sess) != 0) {
+ op->status = RTE_CRYPTO_OP_STATUS_ERROR;
+ return;
+ }
+
iv = rte_crypto_op_ctod_offset(op, uint8_t *,
sess->iv.offset);
if (sess->auth.algo == RTE_CRYPTO_AUTH_AES_GMAC) {
@@ -1622,12 +1664,12 @@ process_openssl_combined_op
status = process_openssl_auth_encryption_gcm(
mbuf_src, offset, srclen,
aad, aadlen, iv,
- dst, tag, sess->cipher.ctx);
+ dst, tag, ctx);
else
status = process_openssl_auth_encryption_ccm(
mbuf_src, offset, srclen,
aad, aadlen, iv,
- dst, tag, taglen, sess->cipher.ctx);
+ dst, tag, taglen, ctx);
} else {
if (sess->auth.algo == RTE_CRYPTO_AUTH_AES_GMAC ||
@@ -1635,14 +1677,16 @@ process_openssl_combined_op
status = process_openssl_auth_decryption_gcm(
mbuf_src, offset, srclen,
aad, aadlen, iv,
- dst, tag, sess->cipher.ctx);
+ dst, tag, ctx);
else
status = process_openssl_auth_decryption_ccm(
mbuf_src, offset, srclen,
aad, aadlen, iv,
- dst, tag, taglen, sess->cipher.ctx);
+ dst, tag, taglen, ctx);
}
+ EVP_CIPHER_CTX_free(ctx);
+
if (status != 0) {
if (status == (-EFAULT) &&
sess->auth.operation ==
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:35.657083047 +0100
+++ 0017-crypto-openssl-fix-GCM-and-CCM-thread-unsafe-context.patch 2024-07-15 16:19:34.476204499 +0100
@@ -1 +1 @@
-From 78d7765f0acbb23168b7b25e25d775bea22c48ab Mon Sep 17 00:00:00 2001
+From 5154afdce867b5eca45e9239581dc2eca7b07777 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 78d7765f0acbb23168b7b25e25d775bea22c48ab ]
+
@@ -43 +44,0 @@
-Cc: stable@dpdk.org
@@ -53 +54 @@
-index e8cb09defc..3e547c2039 100644
+index 6ae31cb5cd..bf9a546f48 100644
@@ -56 +57 @@
-@@ -350,7 +350,8 @@ get_aead_algo(enum rte_crypto_aead_algorithm sess_algo, size_t keylen,
+@@ -349,7 +349,8 @@ get_aead_algo(enum rte_crypto_aead_algorithm sess_algo, size_t keylen,
@@ -66 +67 @@
-@@ -378,7 +379,7 @@ openssl_set_sess_aead_enc_param(struct openssl_session *sess,
+@@ -377,7 +378,7 @@ openssl_set_sess_aead_enc_param(struct openssl_session *sess,
@@ -75 +76 @@
-@@ -388,19 +389,19 @@ openssl_set_sess_aead_enc_param(struct openssl_session *sess,
+@@ -387,19 +388,19 @@ openssl_set_sess_aead_enc_param(struct openssl_session *sess,
@@ -99 +100 @@
-@@ -410,7 +411,8 @@ openssl_set_sess_aead_enc_param(struct openssl_session *sess,
+@@ -409,7 +410,8 @@ openssl_set_sess_aead_enc_param(struct openssl_session *sess,
@@ -109 +110 @@
-@@ -437,7 +439,7 @@ openssl_set_sess_aead_dec_param(struct openssl_session *sess,
+@@ -436,7 +438,7 @@ openssl_set_sess_aead_dec_param(struct openssl_session *sess,
@@ -118 +119 @@
-@@ -447,24 +449,54 @@ openssl_set_sess_aead_dec_param(struct openssl_session *sess,
+@@ -446,24 +448,54 @@ openssl_set_sess_aead_dec_param(struct openssl_session *sess,
@@ -177 +178 @@
-@@ -623,12 +655,14 @@ openssl_set_session_auth_parameters(struct openssl_session *sess,
+@@ -622,12 +654,14 @@ openssl_set_session_auth_parameters(struct openssl_session *sess,
@@ -194 +195 @@
-@@ -770,10 +804,12 @@ openssl_set_session_aead_parameters(struct openssl_session *sess,
+@@ -769,10 +803,12 @@ openssl_set_session_aead_parameters(struct openssl_session *sess,
@@ -209 +210 @@
-@@ -1590,6 +1626,12 @@ process_openssl_combined_op
+@@ -1589,6 +1625,12 @@ process_openssl_combined_op
@@ -222 +223 @@
-@@ -1623,12 +1665,12 @@ process_openssl_combined_op
+@@ -1622,12 +1664,12 @@ process_openssl_combined_op
@@ -237 +238 @@
-@@ -1636,14 +1678,16 @@ process_openssl_combined_op
+@@ -1635,14 +1677,16 @@ process_openssl_combined_op
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'crypto/openssl: optimize 3DES-CTR context init' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (15 preceding siblings ...)
2024-07-15 15:25 ` patch 'crypto/openssl: fix GCM and CCM thread unsafe contexts' " luca.boccassi
@ 2024-07-15 15:25 ` luca.boccassi
2024-07-15 15:25 ` patch 'crypto/openssl: make per-QP cipher context clones' " luca.boccassi
` (67 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:25 UTC (permalink / raw)
To: Jack Bond-Preston; +Cc: Kai Ji, Wathsala Vithanage, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/8e32c3a94a8b8d312acb1170ee601cafc7475f4f
Thanks.
Luca Boccassi
---
From 8e32c3a94a8b8d312acb1170ee601cafc7475f4f Mon Sep 17 00:00:00 2001
From: Jack Bond-Preston <jack.bond-preston@foss.arm.com>
Date: Wed, 3 Jul 2024 13:45:48 +0000
Subject: [PATCH] crypto/openssl: optimize 3DES-CTR context init
[ upstream commit 08917edd8b110f9819301ee4f9b152de7c79ddd4 ]
Currently the 3DES-CTR cipher context is initialised for every buffer,
setting the cipher implementation and key - even though for every
buffer in the session these values will be the same.
Change to initialising the cipher context once, before any buffers are
processed, instead.
Throughput performance uplift measurements for 3DES-CTR encrypt on
Ampere Altra Max platform:
1 worker lcore
| buffer sz (B) | prev (Gbps) | optimised (Gbps) | uplift |
|-----------------+---------------+--------------------+----------|
| 64 | 0.16 | 0.21 | 35.3% |
| 256 | 0.20 | 0.22 | 9.4% |
| 1024 | 0.22 | 0.23 | 2.3% |
| 2048 | 0.22 | 0.23 | 0.9% |
| 4096 | 0.22 | 0.23 | 0.9% |
8 worker lcores
| buffer sz (B) | prev (Gbps) | optimised (Gbps) | uplift |
|-----------------+---------------+--------------------+----------|
| 64 | 1.01 | 1.34 | 32.9% |
| 256 | 1.51 | 1.66 | 9.9% |
| 1024 | 1.72 | 1.77 | 2.6% |
| 2048 | 1.76 | 1.78 | 1.1% |
| 4096 | 1.79 | 1.80 | 0.6% |
Signed-off-by: Jack Bond-Preston <jack.bond-preston@foss.arm.com>
Acked-by: Kai Ji <kai.ji@intel.com>
Reviewed-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
---
drivers/crypto/openssl/rte_openssl_pmd.c | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index bf9a546f48..bfdcda8841 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -552,6 +552,15 @@ openssl_set_session_cipher_parameters(struct openssl_session *sess,
sess->cipher.key.length,
sess->cipher.key.data) != 0)
return -EINVAL;
+
+
+ /* We use 3DES encryption also for decryption.
+ * IV is not important for 3DES ECB.
+ */
+ if (EVP_EncryptInit_ex(sess->cipher.ctx, EVP_des_ede3_ecb(),
+ NULL, sess->cipher.key.data, NULL) != 1)
+ return -EINVAL;
+
break;
case RTE_CRYPTO_CIPHER_DES_CBC:
@@ -1171,8 +1180,7 @@ process_cipher_decrypt_err:
/** Process cipher des 3 ctr encryption, decryption algorithm */
static int
process_openssl_cipher_des3ctr(struct rte_mbuf *mbuf_src, uint8_t *dst,
- int offset, uint8_t *iv, uint8_t *key, int srclen,
- EVP_CIPHER_CTX *ctx)
+ int offset, uint8_t *iv, int srclen, EVP_CIPHER_CTX *ctx)
{
uint8_t ebuf[8], ctr[8];
int unused, n;
@@ -1190,12 +1198,6 @@ process_openssl_cipher_des3ctr(struct rte_mbuf *mbuf_src, uint8_t *dst,
src = rte_pktmbuf_mtod_offset(m, uint8_t *, offset);
l = rte_pktmbuf_data_len(m) - offset;
- /* We use 3DES encryption also for decryption.
- * IV is not important for 3DES ecb
- */
- if (EVP_EncryptInit_ex(ctx, EVP_des_ede3_ecb(), NULL, key, NULL) <= 0)
- goto process_cipher_des3ctr_err;
-
memcpy(ctr, iv, 8);
for (n = 0; n < srclen; n++) {
@@ -1739,8 +1741,7 @@ process_openssl_cipher_op
srclen, ctx_copy, inplace);
else
status = process_openssl_cipher_des3ctr(mbuf_src, dst,
- op->sym->cipher.data.offset, iv,
- sess->cipher.key.data, srclen,
+ op->sym->cipher.data.offset, iv, srclen,
ctx_copy);
EVP_CIPHER_CTX_free(ctx_copy);
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:35.700839877 +0100
+++ 0018-crypto-openssl-optimize-3DES-CTR-context-init.patch 2024-07-15 16:19:34.480204585 +0100
@@ -1 +1 @@
-From 08917edd8b110f9819301ee4f9b152de7c79ddd4 Mon Sep 17 00:00:00 2001
+From 8e32c3a94a8b8d312acb1170ee601cafc7475f4f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 08917edd8b110f9819301ee4f9b152de7c79ddd4 ]
+
@@ -33,2 +34,0 @@
-Cc: stable@dpdk.org
-
@@ -43 +43 @@
-index 3e547c2039..bd09d58d88 100644
+index bf9a546f48..bfdcda8841 100644
@@ -46 +46 @@
-@@ -553,6 +553,15 @@ openssl_set_session_cipher_parameters(struct openssl_session *sess,
+@@ -552,6 +552,15 @@ openssl_set_session_cipher_parameters(struct openssl_session *sess,
@@ -62 +62 @@
-@@ -1172,8 +1181,7 @@ process_cipher_decrypt_err:
+@@ -1171,8 +1180,7 @@ process_cipher_decrypt_err:
@@ -72 +72 @@
-@@ -1191,12 +1199,6 @@ process_openssl_cipher_des3ctr(struct rte_mbuf *mbuf_src, uint8_t *dst,
+@@ -1190,12 +1198,6 @@ process_openssl_cipher_des3ctr(struct rte_mbuf *mbuf_src, uint8_t *dst,
@@ -85 +85 @@
-@@ -1740,8 +1742,7 @@ process_openssl_cipher_op
+@@ -1739,8 +1741,7 @@ process_openssl_cipher_op
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'crypto/openssl: make per-QP cipher context clones' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (16 preceding siblings ...)
2024-07-15 15:25 ` patch 'crypto/openssl: optimize 3DES-CTR context init' " luca.boccassi
@ 2024-07-15 15:25 ` luca.boccassi
2024-07-15 15:25 ` patch 'crypto/openssl: make per-QP auth " luca.boccassi
` (66 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:25 UTC (permalink / raw)
To: Jack Bond-Preston; +Cc: Kai Ji, Wathsala Vithanage, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/26e1e90724f9ab34120d25bba9a3cc47c9234540
Thanks.
Luca Boccassi
---
From 26e1e90724f9ab34120d25bba9a3cc47c9234540 Mon Sep 17 00:00:00 2001
From: Jack Bond-Preston <jack.bond-preston@foss.arm.com>
Date: Wed, 3 Jul 2024 13:45:49 +0000
Subject: [PATCH] crypto/openssl: make per-QP cipher context clones
[ upstream commit b1d71126023521fe740ec473abfe5b295035b859 ]
Currently EVP_CIPHER_CTXs are allocated, copied to (from
openssl_session), and then freed for every cipher operation (ie. per
packet). This is very inefficient, and avoidable.
Make each openssl_session hold an array of pointers to per-queue-pair
cipher context copies. These are populated on first use by allocating a
new context and copying from the main context. These copies can then be
used in a thread-safe manner by different worker lcores simultaneously.
Consequently the cipher context allocation and copy only has to happen
once - the first time a given qp uses an openssl_session. This brings
about a large performance boost.
Throughput performance uplift measurements for AES-CBC-128 encrypt on
Ampere Altra Max platform:
1 worker lcore
| buffer sz (B) | prev (Gbps) | optimised (Gbps) | uplift |
|-----------------+---------------+--------------------+----------|
| 64 | 1.51 | 2.94 | 94.4% |
| 256 | 4.90 | 8.05 | 64.3% |
| 1024 | 11.07 | 14.21 | 28.3% |
| 2048 | 14.03 | 16.28 | 16.0% |
| 4096 | 16.20 | 17.59 | 8.6% |
8 worker lcores
| buffer sz (B) | prev (Gbps) | optimised (Gbps) | uplift |
|-----------------+---------------+--------------------+----------|
| 64 | 3.05 | 23.74 | 678.8% |
| 256 | 10.46 | 64.86 | 520.3% |
| 1024 | 40.97 | 113.80 | 177.7% |
| 2048 | 73.25 | 130.21 | 77.8% |
| 4096 | 103.89 | 140.62 | 35.4% |
Signed-off-by: Jack Bond-Preston <jack.bond-preston@foss.arm.com>
Acked-by: Kai Ji <kai.ji@intel.com>
Reviewed-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
---
drivers/crypto/openssl/openssl_pmd_private.h | 11 +-
drivers/crypto/openssl/rte_openssl_pmd.c | 105 ++++++++++++-------
drivers/crypto/openssl/rte_openssl_pmd_ops.c | 34 +++++-
3 files changed, 108 insertions(+), 42 deletions(-)
diff --git a/drivers/crypto/openssl/openssl_pmd_private.h b/drivers/crypto/openssl/openssl_pmd_private.h
index 4e224b040b..810b539f10 100644
--- a/drivers/crypto/openssl/openssl_pmd_private.h
+++ b/drivers/crypto/openssl/openssl_pmd_private.h
@@ -165,6 +165,14 @@ struct openssl_session {
/**< digest length */
} auth;
+ uint16_t ctx_copies_len;
+ /* < number of entries in ctx_copies */
+ EVP_CIPHER_CTX *qp_ctx[];
+ /**< Flexible array member of per-queue-pair pointers to copies of EVP
+ * context structure. Cipher contexts are not safe to use from multiple
+ * cores simultaneously, so maintaining these copies allows avoiding
+ * per-buffer copying into a temporary context.
+ */
} __rte_cache_aligned;
/** OPENSSL crypto private asymmetric session structure */
@@ -211,7 +219,8 @@ struct openssl_asym_session {
/** Set and validate OPENSSL crypto session parameters */
extern int
openssl_set_session_parameters(struct openssl_session *sess,
- const struct rte_crypto_sym_xform *xform);
+ const struct rte_crypto_sym_xform *xform,
+ uint16_t nb_queue_pairs);
/** Reset OPENSSL crypto session parameters */
extern void
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index bfdcda8841..62a179b6b6 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -466,13 +466,10 @@ openssl_set_sess_aead_dec_param(struct openssl_session *sess,
return 0;
}
+#if (OPENSSL_VERSION_NUMBER >= 0x30000000L && OPENSSL_VERSION_NUMBER < 0x30200000L)
static int openssl_aesni_ctx_clone(EVP_CIPHER_CTX **dest,
struct openssl_session *sess)
{
-#if (OPENSSL_VERSION_NUMBER >= 0x30200000L)
- *dest = EVP_CIPHER_CTX_dup(sess->ctx);
- return 0;
-#elif (OPENSSL_VERSION_NUMBER >= 0x30000000L)
/* OpenSSL versions 3.0.0 <= V < 3.2.0 have no dupctx() implementation
* for AES-GCM and AES-CCM. In this case, we have to create new empty
* contexts and initialise, as we did the original context.
@@ -488,13 +485,8 @@ static int openssl_aesni_ctx_clone(EVP_CIPHER_CTX **dest,
return openssl_set_sess_aead_dec_param(sess, sess->aead_algo,
sess->auth.digest_length, sess->cipher.key.data,
dest);
-#else
- *dest = EVP_CIPHER_CTX_new();
- if (EVP_CIPHER_CTX_copy(*dest, sess->cipher.ctx) != 1)
- return -EINVAL;
- return 0;
-#endif
}
+#endif
/** Set session cipher parameters */
static int
@@ -823,7 +815,8 @@ openssl_set_session_aead_parameters(struct openssl_session *sess,
/** Parse crypto xform chain and set private session parameters */
int
openssl_set_session_parameters(struct openssl_session *sess,
- const struct rte_crypto_sym_xform *xform)
+ const struct rte_crypto_sym_xform *xform,
+ uint16_t nb_queue_pairs)
{
const struct rte_crypto_sym_xform *cipher_xform = NULL;
const struct rte_crypto_sym_xform *auth_xform = NULL;
@@ -885,6 +878,12 @@ openssl_set_session_parameters(struct openssl_session *sess,
}
}
+ /*
+ * With only one queue pair, the array of copies is not needed.
+ * Otherwise, one entry per queue pair is required.
+ */
+ sess->ctx_copies_len = nb_queue_pairs > 1 ? nb_queue_pairs : 0;
+
return 0;
}
@@ -892,6 +891,13 @@ openssl_set_session_parameters(struct openssl_session *sess,
void
openssl_reset_session(struct openssl_session *sess)
{
+ for (uint16_t i = 0; i < sess->ctx_copies_len; i++) {
+ if (sess->qp_ctx[i] != NULL) {
+ EVP_CIPHER_CTX_free(sess->qp_ctx[i]);
+ sess->qp_ctx[i] = NULL;
+ }
+ }
+
EVP_CIPHER_CTX_free(sess->cipher.ctx);
if (sess->chain_order == OPENSSL_CHAIN_CIPHER_BPI)
@@ -958,7 +964,7 @@ get_session(struct openssl_qp *qp, struct rte_crypto_op *op)
sess = (struct openssl_session *)_sess->driver_priv_data;
if (unlikely(openssl_set_session_parameters(sess,
- op->sym->xform) != 0)) {
+ op->sym->xform, 1) != 0)) {
rte_mempool_put(qp->sess_mp, _sess);
sess = NULL;
}
@@ -1606,11 +1612,45 @@ process_auth_err:
# endif
/*----------------------------------------------------------------------------*/
+static inline EVP_CIPHER_CTX *
+get_local_cipher_ctx(struct openssl_session *sess, struct openssl_qp *qp)
+{
+ /* If the array is not being used, just return the main context. */
+ if (sess->ctx_copies_len == 0)
+ return sess->cipher.ctx;
+
+ EVP_CIPHER_CTX **lctx = &sess->qp_ctx[qp->id];
+
+ if (unlikely(*lctx == NULL)) {
+#if OPENSSL_VERSION_NUMBER >= 0x30200000L
+ /* EVP_CIPHER_CTX_dup() added in OSSL 3.2 */
+ *lctx = EVP_CIPHER_CTX_dup(sess->cipher.ctx);
+ return *lctx;
+#elif OPENSSL_VERSION_NUMBER >= 0x30000000L
+ if (sess->chain_order == OPENSSL_CHAIN_COMBINED) {
+ /* AESNI special-cased to use openssl_aesni_ctx_clone()
+ * to allow for working around lack of
+ * EVP_CIPHER_CTX_copy support for 3.0.0 <= OSSL Version
+ * < 3.2.0.
+ */
+ if (openssl_aesni_ctx_clone(lctx, sess) != 0)
+ *lctx = NULL;
+ return *lctx;
+ }
+#endif
+
+ *lctx = EVP_CIPHER_CTX_new();
+ EVP_CIPHER_CTX_copy(*lctx, sess->cipher.ctx);
+ }
+
+ return *lctx;
+}
+
/** Process auth/cipher combined operation */
static void
-process_openssl_combined_op
- (struct rte_crypto_op *op, struct openssl_session *sess,
- struct rte_mbuf *mbuf_src, struct rte_mbuf *mbuf_dst)
+process_openssl_combined_op(struct openssl_qp *qp, struct rte_crypto_op *op,
+ struct openssl_session *sess, struct rte_mbuf *mbuf_src,
+ struct rte_mbuf *mbuf_dst)
{
/* cipher */
uint8_t *dst = NULL, *iv, *tag, *aad;
@@ -1627,11 +1667,7 @@ process_openssl_combined_op
return;
}
- EVP_CIPHER_CTX *ctx;
- if (openssl_aesni_ctx_clone(&ctx, sess) != 0) {
- op->status = RTE_CRYPTO_OP_STATUS_ERROR;
- return;
- }
+ EVP_CIPHER_CTX *ctx = get_local_cipher_ctx(sess, qp);
iv = rte_crypto_op_ctod_offset(op, uint8_t *,
sess->iv.offset);
@@ -1687,8 +1723,6 @@ process_openssl_combined_op
dst, tag, taglen, ctx);
}
- EVP_CIPHER_CTX_free(ctx);
-
if (status != 0) {
if (status == (-EFAULT) &&
sess->auth.operation ==
@@ -1701,14 +1735,13 @@ process_openssl_combined_op
/** Process cipher operation */
static void
-process_openssl_cipher_op
- (struct rte_crypto_op *op, struct openssl_session *sess,
- struct rte_mbuf *mbuf_src, struct rte_mbuf *mbuf_dst)
+process_openssl_cipher_op(struct openssl_qp *qp, struct rte_crypto_op *op,
+ struct openssl_session *sess, struct rte_mbuf *mbuf_src,
+ struct rte_mbuf *mbuf_dst)
{
uint8_t *dst, *iv;
int srclen, status;
uint8_t inplace = (mbuf_src == mbuf_dst) ? 1 : 0;
- EVP_CIPHER_CTX *ctx_copy;
/*
* Segmented OOP destination buffer is not supported for encryption/
@@ -1727,24 +1760,22 @@ process_openssl_cipher_op
iv = rte_crypto_op_ctod_offset(op, uint8_t *,
sess->iv.offset);
- ctx_copy = EVP_CIPHER_CTX_new();
- EVP_CIPHER_CTX_copy(ctx_copy, sess->cipher.ctx);
+
+ EVP_CIPHER_CTX *ctx = get_local_cipher_ctx(sess, qp);
if (sess->cipher.mode == OPENSSL_CIPHER_LIB)
if (sess->cipher.direction == RTE_CRYPTO_CIPHER_OP_ENCRYPT)
status = process_openssl_cipher_encrypt(mbuf_src, dst,
op->sym->cipher.data.offset, iv,
- srclen, ctx_copy, inplace);
+ srclen, ctx, inplace);
else
status = process_openssl_cipher_decrypt(mbuf_src, dst,
op->sym->cipher.data.offset, iv,
- srclen, ctx_copy, inplace);
+ srclen, ctx, inplace);
else
status = process_openssl_cipher_des3ctr(mbuf_src, dst,
- op->sym->cipher.data.offset, iv, srclen,
- ctx_copy);
+ op->sym->cipher.data.offset, iv, srclen, ctx);
- EVP_CIPHER_CTX_free(ctx_copy);
if (status != 0)
op->status = RTE_CRYPTO_OP_STATUS_ERROR;
}
@@ -2910,13 +2941,13 @@ process_op(struct openssl_qp *qp, struct rte_crypto_op *op,
switch (sess->chain_order) {
case OPENSSL_CHAIN_ONLY_CIPHER:
- process_openssl_cipher_op(op, sess, msrc, mdst);
+ process_openssl_cipher_op(qp, op, sess, msrc, mdst);
break;
case OPENSSL_CHAIN_ONLY_AUTH:
process_openssl_auth_op(qp, op, sess, msrc, mdst);
break;
case OPENSSL_CHAIN_CIPHER_AUTH:
- process_openssl_cipher_op(op, sess, msrc, mdst);
+ process_openssl_cipher_op(qp, op, sess, msrc, mdst);
/* OOP */
if (msrc != mdst)
copy_plaintext(msrc, mdst, op);
@@ -2924,10 +2955,10 @@ process_op(struct openssl_qp *qp, struct rte_crypto_op *op,
break;
case OPENSSL_CHAIN_AUTH_CIPHER:
process_openssl_auth_op(qp, op, sess, msrc, mdst);
- process_openssl_cipher_op(op, sess, msrc, mdst);
+ process_openssl_cipher_op(qp, op, sess, msrc, mdst);
break;
case OPENSSL_CHAIN_COMBINED:
- process_openssl_combined_op(op, sess, msrc, mdst);
+ process_openssl_combined_op(qp, op, sess, msrc, mdst);
break;
case OPENSSL_CHAIN_CIPHER_BPI:
process_openssl_docsis_bpi_op(op, sess, msrc, mdst);
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index 24d6d48262..a448279029 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -777,9 +777,34 @@ qp_setup_cleanup:
/** Returns the size of the symmetric session structure */
static unsigned
-openssl_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
+openssl_pmd_sym_session_get_size(struct rte_cryptodev *dev)
{
- return sizeof(struct openssl_session);
+ /*
+ * For 0 qps, return the max size of the session - this is necessary if
+ * the user calls into this function to create the session mempool,
+ * without first configuring the number of qps for the cryptodev.
+ */
+ if (dev->data->nb_queue_pairs == 0) {
+ unsigned int max_nb_qps = ((struct openssl_private *)
+ dev->data->dev_private)->max_nb_qpairs;
+ return sizeof(struct openssl_session) +
+ (sizeof(void *) * max_nb_qps);
+ }
+
+ /*
+ * With only one queue pair, the thread safety of multiple context
+ * copies is not necessary, so don't allocate extra memory for the
+ * array.
+ */
+ if (dev->data->nb_queue_pairs == 1)
+ return sizeof(struct openssl_session);
+
+ /*
+ * Otherwise, the size of the flexible array member should be enough to
+ * fit pointers to per-qp contexts.
+ */
+ return sizeof(struct openssl_session) +
+ (sizeof(void *) * dev->data->nb_queue_pairs);
}
/** Returns the size of the asymmetric session structure */
@@ -791,7 +816,7 @@ openssl_pmd_asym_session_get_size(struct rte_cryptodev *dev __rte_unused)
/** Configure the session from a crypto xform chain */
static int
-openssl_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
+openssl_pmd_sym_session_configure(struct rte_cryptodev *dev,
struct rte_crypto_sym_xform *xform,
struct rte_cryptodev_sym_session *sess)
{
@@ -803,7 +828,8 @@ openssl_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
return -EINVAL;
}
- ret = openssl_set_session_parameters(sess_private_data, xform);
+ ret = openssl_set_session_parameters(sess_private_data, xform,
+ dev->data->nb_queue_pairs);
if (ret != 0) {
OPENSSL_LOG(ERR, "failed configure session parameters");
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:35.745313284 +0100
+++ 0019-crypto-openssl-make-per-QP-cipher-context-clones.patch 2024-07-15 16:19:34.488204755 +0100
@@ -1 +1 @@
-From b1d71126023521fe740ec473abfe5b295035b859 Mon Sep 17 00:00:00 2001
+From 26e1e90724f9ab34120d25bba9a3cc47c9234540 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b1d71126023521fe740ec473abfe5b295035b859 ]
+
@@ -38,2 +39,0 @@
-Cc: stable@dpdk.org
-
@@ -50 +50 @@
-index 0f038b218c..bad7dcf2f5 100644
+index 4e224b040b..810b539f10 100644
@@ -53 +53 @@
-@@ -166,6 +166,14 @@ struct __rte_cache_aligned openssl_session {
+@@ -165,6 +165,14 @@ struct openssl_session {
@@ -65 +65 @@
- };
+ } __rte_cache_aligned;
@@ -68 +68 @@
-@@ -217,7 +225,8 @@ struct __rte_cache_aligned openssl_asym_session {
+@@ -211,7 +219,8 @@ struct openssl_asym_session {
@@ -79 +79 @@
-index bd09d58d88..df44cc097e 100644
+index bfdcda8841..62a179b6b6 100644
@@ -82 +82 @@
-@@ -467,13 +467,10 @@ openssl_set_sess_aead_dec_param(struct openssl_session *sess,
+@@ -466,13 +466,10 @@ openssl_set_sess_aead_dec_param(struct openssl_session *sess,
@@ -97 +97 @@
-@@ -489,13 +486,8 @@ static int openssl_aesni_ctx_clone(EVP_CIPHER_CTX **dest,
+@@ -488,13 +485,8 @@ static int openssl_aesni_ctx_clone(EVP_CIPHER_CTX **dest,
@@ -112 +112 @@
-@@ -824,7 +816,8 @@ openssl_set_session_aead_parameters(struct openssl_session *sess,
+@@ -823,7 +815,8 @@ openssl_set_session_aead_parameters(struct openssl_session *sess,
@@ -122 +122 @@
-@@ -886,6 +879,12 @@ openssl_set_session_parameters(struct openssl_session *sess,
+@@ -885,6 +878,12 @@ openssl_set_session_parameters(struct openssl_session *sess,
@@ -135 +135 @@
-@@ -893,6 +892,13 @@ openssl_set_session_parameters(struct openssl_session *sess,
+@@ -892,6 +891,13 @@ openssl_set_session_parameters(struct openssl_session *sess,
@@ -149 +149 @@
-@@ -959,7 +965,7 @@ get_session(struct openssl_qp *qp, struct rte_crypto_op *op)
+@@ -958,7 +964,7 @@ get_session(struct openssl_qp *qp, struct rte_crypto_op *op)
@@ -158 +158 @@
-@@ -1607,11 +1613,45 @@ process_auth_err:
+@@ -1606,11 +1612,45 @@ process_auth_err:
@@ -207 +207 @@
-@@ -1628,11 +1668,7 @@ process_openssl_combined_op
+@@ -1627,11 +1667,7 @@ process_openssl_combined_op
@@ -220 +220 @@
-@@ -1688,8 +1724,6 @@ process_openssl_combined_op
+@@ -1687,8 +1723,6 @@ process_openssl_combined_op
@@ -229 +229 @@
-@@ -1702,14 +1736,13 @@ process_openssl_combined_op
+@@ -1701,14 +1735,13 @@ process_openssl_combined_op
@@ -247 +247 @@
-@@ -1728,24 +1761,22 @@ process_openssl_cipher_op
+@@ -1727,24 +1760,22 @@ process_openssl_cipher_op
@@ -277 +277 @@
-@@ -3150,13 +3181,13 @@ process_op(struct openssl_qp *qp, struct rte_crypto_op *op,
+@@ -2910,13 +2941,13 @@ process_op(struct openssl_qp *qp, struct rte_crypto_op *op,
@@ -293 +293 @@
-@@ -3164,10 +3195,10 @@ process_op(struct openssl_qp *qp, struct rte_crypto_op *op,
+@@ -2924,10 +2955,10 @@ process_op(struct openssl_qp *qp, struct rte_crypto_op *op,
@@ -307 +307 @@
-index b16baaa08f..4209c6ab6f 100644
+index 24d6d48262..a448279029 100644
@@ -310 +310 @@
-@@ -794,9 +794,34 @@ qp_setup_cleanup:
+@@ -777,9 +777,34 @@ qp_setup_cleanup:
@@ -347 +347 @@
-@@ -808,7 +833,7 @@ openssl_pmd_asym_session_get_size(struct rte_cryptodev *dev __rte_unused)
+@@ -791,7 +816,7 @@ openssl_pmd_asym_session_get_size(struct rte_cryptodev *dev __rte_unused)
@@ -356 +356 @@
-@@ -820,7 +845,8 @@ openssl_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
+@@ -803,7 +828,8 @@ openssl_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'crypto/openssl: make per-QP auth context clones' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (17 preceding siblings ...)
2024-07-15 15:25 ` patch 'crypto/openssl: make per-QP cipher context clones' " luca.boccassi
@ 2024-07-15 15:25 ` luca.boccassi
2024-07-15 15:25 ` patch 'crypto/openssl: set cipher padding once' " luca.boccassi
` (65 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:25 UTC (permalink / raw)
To: Jack Bond-Preston; +Cc: Kai Ji, Wathsala Vithanage, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/ccb65683980ca885fa3b85420fee2d2434a96834
Thanks.
Luca Boccassi
---
From ccb65683980ca885fa3b85420fee2d2434a96834 Mon Sep 17 00:00:00 2001
From: Jack Bond-Preston <jack.bond-preston@foss.arm.com>
Date: Wed, 3 Jul 2024 13:45:50 +0000
Subject: [PATCH] crypto/openssl: make per-QP auth context clones
[ upstream commit 17d5bc6135afdb38ddf02595bfa15aa5142d80b1 ]
Currently EVP auth ctxs (e.g. EVP_MD_CTX, EVP_MAC_CTX) are allocated,
copied to (from openssl_session), and then freed for every auth
operation (ie. per packet). This is very inefficient, and avoidable.
Make each openssl_session hold an array of structures, containing
pointers to per-queue-pair cipher and auth context copies. These are
populated on first use by allocating a new context and copying from the
main context. These copies can then be used in a thread-safe manner by
different worker lcores simultaneously. Consequently the auth context
allocation and copy only has to happen once - the first time a given qp
uses an openssl_session. This brings about a large performance boost.
Throughput performance uplift measurements for HMAC-SHA1 generate on
Ampere Altra Max platform:
1 worker lcore
| buffer sz (B) | prev (Gbps) | optimised (Gbps) | uplift |
|-----------------+---------------+--------------------+----------|
| 64 | 0.63 | 1.42 | 123.5% |
| 256 | 2.24 | 4.40 | 96.4% |
| 1024 | 6.15 | 9.26 | 50.6% |
| 2048 | 8.68 | 11.38 | 31.1% |
| 4096 | 10.92 | 12.84 | 17.6% |
8 worker lcores
| buffer sz (B) | prev (Gbps) | optimised (Gbps) | uplift |
|-----------------+---------------+--------------------+----------|
| 64 | 0.93 | 11.35 | 1122.5% |
| 256 | 3.70 | 35.30 | 853.7% |
| 1024 | 15.22 | 74.27 | 387.8% |
| 2048 | 30.20 | 91.08 | 201.6% |
| 4096 | 56.92 | 102.76 | 80.5% |
Signed-off-by: Jack Bond-Preston <jack.bond-preston@foss.arm.com>
Acked-by: Kai Ji <kai.ji@intel.com>
Reviewed-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
---
drivers/crypto/openssl/compat.h | 26 +++
drivers/crypto/openssl/openssl_pmd_private.h | 25 ++-
drivers/crypto/openssl/rte_openssl_pmd.c | 190 +++++++++++++++----
drivers/crypto/openssl/rte_openssl_pmd_ops.c | 7 +-
4 files changed, 200 insertions(+), 48 deletions(-)
diff --git a/drivers/crypto/openssl/compat.h b/drivers/crypto/openssl/compat.h
index 9f9167c4f1..e1814fea8c 100644
--- a/drivers/crypto/openssl/compat.h
+++ b/drivers/crypto/openssl/compat.h
@@ -5,6 +5,32 @@
#ifndef __RTA_COMPAT_H__
#define __RTA_COMPAT_H__
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
+static __rte_always_inline void
+free_hmac_ctx(EVP_MAC_CTX *ctx)
+{
+ EVP_MAC_CTX_free(ctx);
+}
+
+static __rte_always_inline void
+free_cmac_ctx(EVP_MAC_CTX *ctx)
+{
+ EVP_MAC_CTX_free(ctx);
+}
+#else
+static __rte_always_inline void
+free_hmac_ctx(HMAC_CTX *ctx)
+{
+ HMAC_CTX_free(ctx);
+}
+
+static __rte_always_inline void
+free_cmac_ctx(CMAC_CTX *ctx)
+{
+ CMAC_CTX_free(ctx);
+}
+#endif
+
#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
static __rte_always_inline int
diff --git a/drivers/crypto/openssl/openssl_pmd_private.h b/drivers/crypto/openssl/openssl_pmd_private.h
index 810b539f10..d67e39cddb 100644
--- a/drivers/crypto/openssl/openssl_pmd_private.h
+++ b/drivers/crypto/openssl/openssl_pmd_private.h
@@ -79,6 +79,20 @@ struct openssl_qp {
*/
} __rte_cache_aligned;
+struct evp_ctx_pair {
+ EVP_CIPHER_CTX *cipher;
+ union {
+ EVP_MD_CTX *auth;
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
+ EVP_MAC_CTX *hmac;
+ EVP_MAC_CTX *cmac;
+#else
+ HMAC_CTX *hmac;
+ CMAC_CTX *cmac;
+#endif
+ };
+};
+
/** OPENSSL crypto private session structure */
struct openssl_session {
enum openssl_chain_order chain_order;
@@ -167,11 +181,12 @@ struct openssl_session {
uint16_t ctx_copies_len;
/* < number of entries in ctx_copies */
- EVP_CIPHER_CTX *qp_ctx[];
- /**< Flexible array member of per-queue-pair pointers to copies of EVP
- * context structure. Cipher contexts are not safe to use from multiple
- * cores simultaneously, so maintaining these copies allows avoiding
- * per-buffer copying into a temporary context.
+ struct evp_ctx_pair qp_ctx[];
+ /**< Flexible array member of per-queue-pair structures, each containing
+ * pointers to copies of the cipher and auth EVP contexts. Cipher
+ * contexts are not safe to use from multiple cores simultaneously, so
+ * maintaining these copies allows avoiding per-buffer copying into a
+ * temporary context.
*/
} __rte_cache_aligned;
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 62a179b6b6..72db0fd40f 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -891,40 +891,45 @@ openssl_set_session_parameters(struct openssl_session *sess,
void
openssl_reset_session(struct openssl_session *sess)
{
+ /* Free all the qp_ctx entries. */
for (uint16_t i = 0; i < sess->ctx_copies_len; i++) {
- if (sess->qp_ctx[i] != NULL) {
- EVP_CIPHER_CTX_free(sess->qp_ctx[i]);
- sess->qp_ctx[i] = NULL;
+ if (sess->qp_ctx[i].cipher != NULL) {
+ EVP_CIPHER_CTX_free(sess->qp_ctx[i].cipher);
+ sess->qp_ctx[i].cipher = NULL;
+ }
+
+ switch (sess->auth.mode) {
+ case OPENSSL_AUTH_AS_AUTH:
+ EVP_MD_CTX_destroy(sess->qp_ctx[i].auth);
+ sess->qp_ctx[i].auth = NULL;
+ break;
+ case OPENSSL_AUTH_AS_HMAC:
+ free_hmac_ctx(sess->qp_ctx[i].hmac);
+ sess->qp_ctx[i].hmac = NULL;
+ break;
+ case OPENSSL_AUTH_AS_CMAC:
+ free_cmac_ctx(sess->qp_ctx[i].cmac);
+ sess->qp_ctx[i].cmac = NULL;
+ break;
}
}
EVP_CIPHER_CTX_free(sess->cipher.ctx);
+ switch (sess->auth.mode) {
+ case OPENSSL_AUTH_AS_AUTH:
+ EVP_MD_CTX_destroy(sess->auth.auth.ctx);
+ break;
+ case OPENSSL_AUTH_AS_HMAC:
+ free_hmac_ctx(sess->auth.hmac.ctx);
+ break;
+ case OPENSSL_AUTH_AS_CMAC:
+ free_cmac_ctx(sess->auth.cmac.ctx);
+ break;
+ }
+
if (sess->chain_order == OPENSSL_CHAIN_CIPHER_BPI)
EVP_CIPHER_CTX_free(sess->cipher.bpi_ctx);
-
- switch (sess->auth.mode) {
- case OPENSSL_AUTH_AS_AUTH:
- EVP_MD_CTX_destroy(sess->auth.auth.ctx);
- break;
- case OPENSSL_AUTH_AS_HMAC:
- EVP_PKEY_free(sess->auth.hmac.pkey);
-# if OPENSSL_VERSION_NUMBER >= 0x30000000L
- EVP_MAC_CTX_free(sess->auth.hmac.ctx);
-# else
- HMAC_CTX_free(sess->auth.hmac.ctx);
-# endif
- break;
- case OPENSSL_AUTH_AS_CMAC:
-# if OPENSSL_VERSION_NUMBER >= 0x30000000L
- EVP_MAC_CTX_free(sess->auth.cmac.ctx);
-# else
- CMAC_CTX_free(sess->auth.cmac.ctx);
-# endif
- break;
- default:
- break;
- }
}
/** Provide session for operation */
@@ -1470,6 +1475,9 @@ process_openssl_auth_mac(struct rte_mbuf *mbuf_src, uint8_t *dst, int offset,
if (m == 0)
goto process_auth_err;
+ if (EVP_MAC_init(ctx, NULL, 0, NULL) <= 0)
+ goto process_auth_err;
+
src = rte_pktmbuf_mtod_offset(m, uint8_t *, offset);
l = rte_pktmbuf_data_len(m) - offset;
@@ -1496,11 +1504,9 @@ process_auth_final:
if (EVP_MAC_final(ctx, dst, &dstlen, DIGEST_LENGTH_MAX) != 1)
goto process_auth_err;
- EVP_MAC_CTX_free(ctx);
return 0;
process_auth_err:
- EVP_MAC_CTX_free(ctx);
OPENSSL_LOG(ERR, "Process openssl auth failed");
return -EINVAL;
}
@@ -1619,7 +1625,7 @@ get_local_cipher_ctx(struct openssl_session *sess, struct openssl_qp *qp)
if (sess->ctx_copies_len == 0)
return sess->cipher.ctx;
- EVP_CIPHER_CTX **lctx = &sess->qp_ctx[qp->id];
+ EVP_CIPHER_CTX **lctx = &sess->qp_ctx[qp->id].cipher;
if (unlikely(*lctx == NULL)) {
#if OPENSSL_VERSION_NUMBER >= 0x30200000L
@@ -1646,6 +1652,112 @@ get_local_cipher_ctx(struct openssl_session *sess, struct openssl_qp *qp)
return *lctx;
}
+static inline EVP_MD_CTX *
+get_local_auth_ctx(struct openssl_session *sess, struct openssl_qp *qp)
+{
+ /* If the array is not being used, just return the main context. */
+ if (sess->ctx_copies_len == 0)
+ return sess->auth.auth.ctx;
+
+ EVP_MD_CTX **lctx = &sess->qp_ctx[qp->id].auth;
+
+ if (unlikely(*lctx == NULL)) {
+#if OPENSSL_VERSION_NUMBER >= 0x30100000L
+ /* EVP_MD_CTX_dup() added in OSSL 3.1 */
+ *lctx = EVP_MD_CTX_dup(sess->auth.auth.ctx);
+#else
+ *lctx = EVP_MD_CTX_new();
+ EVP_MD_CTX_copy(*lctx, sess->auth.auth.ctx);
+#endif
+ }
+
+ return *lctx;
+}
+
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
+static inline EVP_MAC_CTX *
+#else
+static inline HMAC_CTX *
+#endif
+get_local_hmac_ctx(struct openssl_session *sess, struct openssl_qp *qp)
+{
+#if (OPENSSL_VERSION_NUMBER >= 0x30000000L && OPENSSL_VERSION_NUMBER < 0x30003000L)
+ /* For OpenSSL versions 3.0.0 <= v < 3.0.3, re-initing of
+ * EVP_MAC_CTXs is broken, and doesn't actually reset their
+ * state. This was fixed in OSSL commit c9ddc5af5199 ("Avoid
+ * undefined behavior of provided macs on EVP_MAC
+ * reinitialization"). In cases where the fix is not present,
+ * fall back to duplicating the context every buffer as a
+ * workaround, at the cost of performance.
+ */
+ RTE_SET_USED(qp);
+ return EVP_MAC_CTX_dup(sess->auth.hmac.ctx);
+#else
+ if (sess->ctx_copies_len == 0)
+ return sess->auth.hmac.ctx;
+
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
+ EVP_MAC_CTX **lctx =
+#else
+ HMAC_CTX **lctx =
+#endif
+ &sess->qp_ctx[qp->id].hmac;
+
+ if (unlikely(*lctx == NULL)) {
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
+ *lctx = EVP_MAC_CTX_dup(sess->auth.hmac.ctx);
+#else
+ *lctx = HMAC_CTX_new();
+ HMAC_CTX_copy(*lctx, sess->auth.hmac.ctx);
+#endif
+ }
+
+ return *lctx;
+#endif
+}
+
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
+static inline EVP_MAC_CTX *
+#else
+static inline CMAC_CTX *
+#endif
+get_local_cmac_ctx(struct openssl_session *sess, struct openssl_qp *qp)
+{
+#if (OPENSSL_VERSION_NUMBER >= 0x30000000L && OPENSSL_VERSION_NUMBER < 0x30003000L)
+ /* For OpenSSL versions 3.0.0 <= v < 3.0.3, re-initing of
+ * EVP_MAC_CTXs is broken, and doesn't actually reset their
+ * state. This was fixed in OSSL commit c9ddc5af5199 ("Avoid
+ * undefined behavior of provided macs on EVP_MAC
+ * reinitialization"). In cases where the fix is not present,
+ * fall back to duplicating the context every buffer as a
+ * workaround, at the cost of performance.
+ */
+ RTE_SET_USED(qp);
+ return EVP_MAC_CTX_dup(sess->auth.cmac.ctx);
+#else
+ if (sess->ctx_copies_len == 0)
+ return sess->auth.cmac.ctx;
+
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
+ EVP_MAC_CTX **lctx =
+#else
+ CMAC_CTX **lctx =
+#endif
+ &sess->qp_ctx[qp->id].cmac;
+
+ if (unlikely(*lctx == NULL)) {
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
+ *lctx = EVP_MAC_CTX_dup(sess->auth.cmac.ctx);
+#else
+ *lctx = CMAC_CTX_new();
+ CMAC_CTX_copy(*lctx, sess->auth.cmac.ctx);
+#endif
+ }
+
+ return *lctx;
+#endif
+}
+
/** Process auth/cipher combined operation */
static void
process_openssl_combined_op(struct openssl_qp *qp, struct rte_crypto_op *op,
@@ -1894,42 +2006,40 @@ process_openssl_auth_op(struct openssl_qp *qp, struct rte_crypto_op *op,
switch (sess->auth.mode) {
case OPENSSL_AUTH_AS_AUTH:
- ctx_a = EVP_MD_CTX_create();
- EVP_MD_CTX_copy_ex(ctx_a, sess->auth.auth.ctx);
+ ctx_a = get_local_auth_ctx(sess, qp);
status = process_openssl_auth(mbuf_src, dst,
op->sym->auth.data.offset, NULL, NULL, srclen,
ctx_a, sess->auth.auth.evp_algo);
- EVP_MD_CTX_destroy(ctx_a);
break;
case OPENSSL_AUTH_AS_HMAC:
+ ctx_h = get_local_hmac_ctx(sess, qp);
# if OPENSSL_VERSION_NUMBER >= 0x30000000L
- ctx_h = EVP_MAC_CTX_dup(sess->auth.hmac.ctx);
status = process_openssl_auth_mac(mbuf_src, dst,
op->sym->auth.data.offset, srclen,
ctx_h);
# else
- ctx_h = HMAC_CTX_new();
- HMAC_CTX_copy(ctx_h, sess->auth.hmac.ctx);
status = process_openssl_auth_hmac(mbuf_src, dst,
op->sym->auth.data.offset, srclen,
ctx_h);
- HMAC_CTX_free(ctx_h);
# endif
+#if (OPENSSL_VERSION_NUMBER >= 0x30000000L && OPENSSL_VERSION_NUMBER < 0x30003000L)
+ EVP_MAC_CTX_free(ctx_h);
+#endif
break;
case OPENSSL_AUTH_AS_CMAC:
+ ctx_c = get_local_cmac_ctx(sess, qp);
# if OPENSSL_VERSION_NUMBER >= 0x30000000L
- ctx_c = EVP_MAC_CTX_dup(sess->auth.cmac.ctx);
status = process_openssl_auth_mac(mbuf_src, dst,
op->sym->auth.data.offset, srclen,
ctx_c);
# else
- ctx_c = CMAC_CTX_new();
- CMAC_CTX_copy(ctx_c, sess->auth.cmac.ctx);
status = process_openssl_auth_cmac(mbuf_src, dst,
op->sym->auth.data.offset, srclen,
ctx_c);
- CMAC_CTX_free(ctx_c);
# endif
+#if (OPENSSL_VERSION_NUMBER >= 0x30000000L && OPENSSL_VERSION_NUMBER < 0x30003000L)
+ EVP_MAC_CTX_free(ctx_c);
+#endif
break;
default:
status = -1;
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index a448279029..18a8095ba2 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -788,7 +788,7 @@ openssl_pmd_sym_session_get_size(struct rte_cryptodev *dev)
unsigned int max_nb_qps = ((struct openssl_private *)
dev->data->dev_private)->max_nb_qpairs;
return sizeof(struct openssl_session) +
- (sizeof(void *) * max_nb_qps);
+ (sizeof(struct evp_ctx_pair) * max_nb_qps);
}
/*
@@ -801,10 +801,11 @@ openssl_pmd_sym_session_get_size(struct rte_cryptodev *dev)
/*
* Otherwise, the size of the flexible array member should be enough to
- * fit pointers to per-qp contexts.
+ * fit pointers to per-qp contexts. This is twice the number of queue
+ * pairs, to allow for auth and cipher contexts.
*/
return sizeof(struct openssl_session) +
- (sizeof(void *) * dev->data->nb_queue_pairs);
+ (sizeof(struct evp_ctx_pair) * dev->data->nb_queue_pairs);
}
/** Returns the size of the asymmetric session structure */
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:35.790373889 +0100
+++ 0020-crypto-openssl-make-per-QP-auth-context-clones.patch 2024-07-15 16:19:34.492204841 +0100
@@ -1 +1 @@
-From 17d5bc6135afdb38ddf02595bfa15aa5142d80b1 Mon Sep 17 00:00:00 2001
+From ccb65683980ca885fa3b85420fee2d2434a96834 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 17d5bc6135afdb38ddf02595bfa15aa5142d80b1 ]
+
@@ -38,2 +39,0 @@
-Cc: stable@dpdk.org
-
@@ -88 +88 @@
-index bad7dcf2f5..a50e4d4918 100644
+index 810b539f10..d67e39cddb 100644
@@ -91 +91 @@
-@@ -80,6 +80,20 @@ struct __rte_cache_aligned openssl_qp {
+@@ -79,6 +79,20 @@ struct openssl_qp {
@@ -93 +93 @@
- };
+ } __rte_cache_aligned;
@@ -110 +110 @@
- struct __rte_cache_aligned openssl_session {
+ struct openssl_session {
@@ -112 +112 @@
-@@ -168,11 +182,12 @@ struct __rte_cache_aligned openssl_session {
+@@ -167,11 +181,12 @@ struct openssl_session {
@@ -128 +128 @@
- };
+ } __rte_cache_aligned;
@@ -131 +131 @@
-index df44cc097e..7e2e505222 100644
+index 62a179b6b6..72db0fd40f 100644
@@ -134 +134 @@
-@@ -892,40 +892,45 @@ openssl_set_session_parameters(struct openssl_session *sess,
+@@ -891,40 +891,45 @@ openssl_set_session_parameters(struct openssl_session *sess,
@@ -206 +206 @@
-@@ -1471,6 +1476,9 @@ process_openssl_auth_mac(struct rte_mbuf *mbuf_src, uint8_t *dst, int offset,
+@@ -1470,6 +1475,9 @@ process_openssl_auth_mac(struct rte_mbuf *mbuf_src, uint8_t *dst, int offset,
@@ -216 +216 @@
-@@ -1497,11 +1505,9 @@ process_auth_final:
+@@ -1496,11 +1504,9 @@ process_auth_final:
@@ -228 +228 @@
-@@ -1620,7 +1626,7 @@ get_local_cipher_ctx(struct openssl_session *sess, struct openssl_qp *qp)
+@@ -1619,7 +1625,7 @@ get_local_cipher_ctx(struct openssl_session *sess, struct openssl_qp *qp)
@@ -237 +237 @@
-@@ -1647,6 +1653,112 @@ get_local_cipher_ctx(struct openssl_session *sess, struct openssl_qp *qp)
+@@ -1646,6 +1652,112 @@ get_local_cipher_ctx(struct openssl_session *sess, struct openssl_qp *qp)
@@ -350 +350 @@
-@@ -1895,42 +2007,40 @@ process_openssl_auth_op(struct openssl_qp *qp, struct rte_crypto_op *op,
+@@ -1894,42 +2006,40 @@ process_openssl_auth_op(struct openssl_qp *qp, struct rte_crypto_op *op,
@@ -403 +403 @@
-index 4209c6ab6f..1bbb855a59 100644
+index a448279029..18a8095ba2 100644
@@ -406 +406 @@
-@@ -805,7 +805,7 @@ openssl_pmd_sym_session_get_size(struct rte_cryptodev *dev)
+@@ -788,7 +788,7 @@ openssl_pmd_sym_session_get_size(struct rte_cryptodev *dev)
@@ -415 +415 @@
-@@ -818,10 +818,11 @@ openssl_pmd_sym_session_get_size(struct rte_cryptodev *dev)
+@@ -801,10 +801,11 @@ openssl_pmd_sym_session_get_size(struct rte_cryptodev *dev)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'crypto/openssl: set cipher padding once' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (18 preceding siblings ...)
2024-07-15 15:25 ` patch 'crypto/openssl: make per-QP auth " luca.boccassi
@ 2024-07-15 15:25 ` luca.boccassi
2024-07-15 15:26 ` patch 'common/dpaax/caamflib: fix PDCP-SDAP watchdog error' " luca.boccassi
` (64 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:25 UTC (permalink / raw)
To: Jack Bond-Preston; +Cc: Kai Ji, Wathsala Vithanage, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/d0aee3876f98d0da3fb7f35eea208fc91c7a5cf2
Thanks.
Luca Boccassi
---
From d0aee3876f98d0da3fb7f35eea208fc91c7a5cf2 Mon Sep 17 00:00:00 2001
From: Jack Bond-Preston <jack.bond-preston@foss.arm.com>
Date: Wed, 3 Jul 2024 13:45:51 +0000
Subject: [PATCH] crypto/openssl: set cipher padding once
[ upstream commit d2bf59017315dc18eb6c9f2d7acd10dfb8d7758e ]
Setting the cipher padding has a noticeable performance footprint,
and it doesn't need to be done for every call to
process_openssl_cipher_{en,de}crypt(). Setting it causes OpenSSL to set
it on every future context re-init. Thus, for every buffer after the
first one, the padding is being set twice.
Instead, just set the cipher padding once - when configuring the session
parameters - avoiding the unnecessary double setting behaviour. This is
skipped for AEAD ciphers, where disabling padding is not necessary.
Throughput performance uplift measurements for AES-CBC-128 encrypt on
Ampere Altra Max platform:
1 worker lcore
| buffer sz (B) | prev (Gbps) | optimised (Gbps) | uplift |
|-----------------+---------------+--------------------+----------|
| 64 | 2.97 | 3.72 | 25.2% |
| 256 | 8.10 | 9.42 | 16.3% |
| 1024 | 14.22 | 15.18 | 6.8% |
| 2048 | 16.28 | 16.93 | 4.0% |
| 4096 | 17.58 | 17.97 | 2.2% |
8 worker lcores
| buffer sz (B) | prev (Gbps) | optimised (Gbps) | uplift |
|-----------------+---------------+--------------------+----------|
| 64 | 21.27 | 29.85 | 40.3% |
| 256 | 60.05 | 75.53 | 25.8% |
| 1024 | 110.11 | 121.56 | 10.4% |
| 2048 | 128.05 | 135.40 | 5.7% |
| 4096 | 139.45 | 143.76 | 3.1% |
Signed-off-by: Jack Bond-Preston <jack.bond-preston@foss.arm.com>
Acked-by: Kai Ji <kai.ji@intel.com>
Reviewed-by: Wathsala Vithanage <wathsala.vithanage@arm.com>
---
drivers/crypto/openssl/rte_openssl_pmd.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 72db0fd40f..9fc8194366 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -618,6 +618,8 @@ openssl_set_session_cipher_parameters(struct openssl_session *sess,
return -ENOTSUP;
}
+ EVP_CIPHER_CTX_set_padding(sess->cipher.ctx, 0);
+
return 0;
}
@@ -1123,8 +1125,6 @@ process_openssl_cipher_encrypt(struct rte_mbuf *mbuf_src, uint8_t *dst,
if (EVP_EncryptInit_ex(ctx, NULL, NULL, NULL, iv) <= 0)
goto process_cipher_encrypt_err;
- EVP_CIPHER_CTX_set_padding(ctx, 0);
-
if (process_openssl_encryption_update(mbuf_src, offset, &dst,
srclen, ctx, inplace))
goto process_cipher_encrypt_err;
@@ -1173,8 +1173,6 @@ process_openssl_cipher_decrypt(struct rte_mbuf *mbuf_src, uint8_t *dst,
if (EVP_DecryptInit_ex(ctx, NULL, NULL, NULL, iv) <= 0)
goto process_cipher_decrypt_err;
- EVP_CIPHER_CTX_set_padding(ctx, 0);
-
if (process_openssl_decryption_update(mbuf_src, offset, &dst,
srclen, ctx, inplace))
goto process_cipher_decrypt_err;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:35.836107340 +0100
+++ 0021-crypto-openssl-set-cipher-padding-once.patch 2024-07-15 16:19:34.492204841 +0100
@@ -1 +1 @@
-From d2bf59017315dc18eb6c9f2d7acd10dfb8d7758e Mon Sep 17 00:00:00 2001
+From d0aee3876f98d0da3fb7f35eea208fc91c7a5cf2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d2bf59017315dc18eb6c9f2d7acd10dfb8d7758e ]
+
@@ -36,2 +37,0 @@
-Cc: stable@dpdk.org
-
@@ -46 +46 @@
-index 7e2e505222..101111e85b 100644
+index 72db0fd40f..9fc8194366 100644
@@ -49 +49 @@
-@@ -619,6 +619,8 @@ openssl_set_session_cipher_parameters(struct openssl_session *sess,
+@@ -618,6 +618,8 @@ openssl_set_session_cipher_parameters(struct openssl_session *sess,
@@ -58 +58 @@
-@@ -1124,8 +1126,6 @@ process_openssl_cipher_encrypt(struct rte_mbuf *mbuf_src, uint8_t *dst,
+@@ -1123,8 +1125,6 @@ process_openssl_cipher_encrypt(struct rte_mbuf *mbuf_src, uint8_t *dst,
@@ -67 +67 @@
-@@ -1174,8 +1174,6 @@ process_openssl_cipher_decrypt(struct rte_mbuf *mbuf_src, uint8_t *dst,
+@@ -1173,8 +1173,6 @@ process_openssl_cipher_decrypt(struct rte_mbuf *mbuf_src, uint8_t *dst,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'common/dpaax/caamflib: fix PDCP-SDAP watchdog error' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (19 preceding siblings ...)
2024-07-15 15:25 ` patch 'crypto/openssl: set cipher padding once' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'common/dpaax/caamflib: fix PDCP AES-AES " luca.boccassi
` (63 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Gagandeep Singh; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/09ca25c2931d2860c9533d298230768dfee2a03a
Thanks.
Luca Boccassi
---
From 09ca25c2931d2860c9533d298230768dfee2a03a Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Wed, 3 Jul 2024 15:56:39 +0530
Subject: [PATCH] common/dpaax/caamflib: fix PDCP-SDAP watchdog error
[ upstream commit 6671e82e5c6b4858573f4dae665e7f2442913d93 ]
Adding a Jump instruction with CALM flag to ensure
previous processing has been completed.
Fixes: 3ba2e519eafa ("common/dpaax/caamflib: support PDCP-SDAP")
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
---
drivers/common/dpaax/caamflib/desc/sdap.h | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/common/dpaax/caamflib/desc/sdap.h b/drivers/common/dpaax/caamflib/desc/sdap.h
index b38c15a24f..d41bacf8f9 100644
--- a/drivers/common/dpaax/caamflib/desc/sdap.h
+++ b/drivers/common/dpaax/caamflib/desc/sdap.h
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: BSD-3-Clause
- * Copyright 2020-2022 NXP
+ * Copyright 2020-2023 NXP
*/
#ifndef __DESC_SDAP_H__
@@ -628,6 +628,10 @@ static inline int pdcp_sdap_insert_no_snoop_op(
/* Save the ICV generated */
MOVEB(p, CONTEXT1, 0, MATH3, 0, 4, WAITCOMP | IMMED);
+ /* conditional jump with calm added to ensure that the
+ * previous processing has been completed
+ */
+ JUMP(p, 1, LOCAL_JUMP, ALL_TRUE, CALM);
/* The CHA will be reused so we need to clear it */
LOAD(p, CLRW_RESET_CLS1_CHA |
CLRW_CLR_C1KEY |
@@ -718,6 +722,10 @@ static inline int pdcp_sdap_insert_no_snoop_op(
/* Save the ICV which is stalling in output FIFO to MATH3 */
MOVEB(p, OFIFO, 0, MATH3, 0, 4, IMMED);
+ /* conditional jump with calm added to ensure that the
+ * previous processing has been completed
+ */
+ JUMP(p, 1, LOCAL_JUMP, ALL_TRUE, CALM);
/* Reset class 1 CHA */
LOAD(p, CLRW_RESET_CLS1_CHA |
CLRW_CLR_C1KEY |
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:35.880050277 +0100
+++ 0022-common-dpaax-caamflib-fix-PDCP-SDAP-watchdog-error.patch 2024-07-15 16:19:34.496204926 +0100
@@ -1 +1 @@
-From 6671e82e5c6b4858573f4dae665e7f2442913d93 Mon Sep 17 00:00:00 2001
+From 09ca25c2931d2860c9533d298230768dfee2a03a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6671e82e5c6b4858573f4dae665e7f2442913d93 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'common/dpaax/caamflib: fix PDCP AES-AES watchdog error' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (20 preceding siblings ...)
2024-07-15 15:26 ` patch 'common/dpaax/caamflib: fix PDCP-SDAP watchdog error' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'crypto/dpaa_sec: fix IPsec descriptor' " luca.boccassi
` (62 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Varun Sethi; +Cc: Gagandeep Singh, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6182babbe7ba38a0da6482c5573a69513771faba
Thanks.
Luca Boccassi
---
From 6182babbe7ba38a0da6482c5573a69513771faba Mon Sep 17 00:00:00 2001
From: Varun Sethi <v.sethi@nxp.com>
Date: Wed, 3 Jul 2024 15:56:40 +0530
Subject: [PATCH] common/dpaax/caamflib: fix PDCP AES-AES watchdog error
[ upstream commit ed5ea9e3e7f30cb8d7b45035a40ab75efaa38584 ]
Adding a Jump instruction with CALM flag to ensure
previous processing has been completed.
Fixes: 8827d94398f1 ("crypto/dpaa2_sec/hw: support AES-AES 18-bit PDCP")
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Signed-off-by: Varun Sethi <v.sethi@nxp.com>
---
.mailmap | 1 +
drivers/common/dpaax/caamflib/desc/pdcp.h | 10 ++++++++++
2 files changed, 11 insertions(+)
diff --git a/.mailmap b/.mailmap
index 5941400f42..0798312a63 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1418,6 +1418,7 @@ Vadim Suraev <vadim.suraev@gmail.com>
Vakul Garg <vakul.garg@nxp.com>
Vamsi Attunuru <vattunuru@marvell.com>
Vanshika Shukla <vanshika.shukla@nxp.com>
+Varun Sethi <v.sethi@nxp.com>
Vasily Philipov <vasilyf@mellanox.com>
Veerasenareddy Burru <vburru@marvell.com>
Venkata Suresh Kumar P <venkata.suresh.kumar.p@intel.com>
diff --git a/drivers/common/dpaax/caamflib/desc/pdcp.h b/drivers/common/dpaax/caamflib/desc/pdcp.h
index 289ee2a7d5..070cad0147 100644
--- a/drivers/common/dpaax/caamflib/desc/pdcp.h
+++ b/drivers/common/dpaax/caamflib/desc/pdcp.h
@@ -1023,6 +1023,11 @@ pdcp_insert_uplane_aes_aes_op(struct program *p,
SEQFIFOLOAD(p, MSG1, 0, VLF | LAST1 | FLUSH1);
MOVEB(p, CONTEXT1, 0, MATH3, 0, 4, WAITCOMP | IMMED);
+ /* conditional jump with calm added to ensure that the
+ * previous processing has been completed
+ */
+ JUMP(p, 1, LOCAL_JUMP, ALL_TRUE, CALM);
+
LOAD(p, CLRW_RESET_CLS1_CHA |
CLRW_CLR_C1KEY |
CLRW_CLR_C1CTX |
@@ -1070,6 +1075,11 @@ pdcp_insert_uplane_aes_aes_op(struct program *p,
MOVEB(p, OFIFO, 0, MATH3, 0, 4, IMMED);
+ /* conditional jump with calm added to ensure that the
+ * previous processing has been completed
+ */
+ JUMP(p, 1, LOCAL_JUMP, ALL_TRUE, CALM);
+
LOAD(p, CLRW_RESET_CLS1_CHA |
CLRW_CLR_C1KEY |
CLRW_CLR_C1CTX |
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:35.923678443 +0100
+++ 0023-common-dpaax-caamflib-fix-PDCP-AES-AES-watchdog-erro.patch 2024-07-15 16:19:34.500205011 +0100
@@ -1 +1 @@
-From ed5ea9e3e7f30cb8d7b45035a40ab75efaa38584 Mon Sep 17 00:00:00 2001
+From 6182babbe7ba38a0da6482c5573a69513771faba Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ed5ea9e3e7f30cb8d7b45035a40ab75efaa38584 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 502791e0bc..74739ec9be 100644
+index 5941400f42..0798312a63 100644
@@ -23 +24,2 @@
-@@ -1503,6 +1503,7 @@ Vakul Garg <vakul.garg@nxp.com>
+@@ -1418,6 +1418,7 @@ Vadim Suraev <vadim.suraev@gmail.com>
+ Vakul Garg <vakul.garg@nxp.com>
@@ -25 +26,0 @@
- Vamsi Krishna Atluri <vamsi.atluri@amd.com>
@@ -32 +33 @@
-index 7d16c66d79..0ed9eec816 100644
+index 289ee2a7d5..070cad0147 100644
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'crypto/dpaa_sec: fix IPsec descriptor' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (21 preceding siblings ...)
2024-07-15 15:26 ` patch 'common/dpaax/caamflib: fix PDCP AES-AES " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'crypto/dpaa2_sec: fix event queue user context' " luca.boccassi
` (61 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Gagandeep Singh; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/ac47aa31a1b2330b2c3dc5de71850826e2cf26fe
Thanks.
Luca Boccassi
---
From ac47aa31a1b2330b2c3dc5de71850826e2cf26fe Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Wed, 3 Jul 2024 15:56:41 +0530
Subject: [PATCH] crypto/dpaa_sec: fix IPsec descriptor
[ upstream commit 046341575bd6e1210d6c12b595405ede41150da7 ]
During IPsec operations, driver code pre-check
whether KEYS can be inlined to limited size descriptor
or not and based on that it decides to copy the complete
KEY in descriptor or just give the memory pointer of
KEY in descriptor.
This pre-check code does not take care of padding required
for security engine to make the KEYs inline which results
in incorrect length descriptor for some algorithms.
This patch fixes this issue by updating the pre-check code
with proper padding size included for each supported
algorithm.
Fixes: 453b9593a3cf ("crypto/dpaax_sec: fix inline query for descriptors")
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
---
drivers/common/dpaax/caamflib/desc/ipsec.h | 68 ++++++++++++++++++++++
drivers/crypto/dpaa_sec/dpaa_sec.c | 4 +-
2 files changed, 70 insertions(+), 2 deletions(-)
diff --git a/drivers/common/dpaax/caamflib/desc/ipsec.h b/drivers/common/dpaax/caamflib/desc/ipsec.h
index 8ec6aac915..26bf52827e 100644
--- a/drivers/common/dpaax/caamflib/desc/ipsec.h
+++ b/drivers/common/dpaax/caamflib/desc/ipsec.h
@@ -726,6 +726,74 @@ static inline void __gen_auth_key(struct program *program,
authdata->key, authdata->key_type);
}
+/**
+ * rta_inline_ipsec_query() - Provide indications on which data items can be inlined
+ * and which shall be referenced in IPsec shared descriptor.
+ * @sd_base_len: Shared descriptor base length - bytes consumed by the commands,
+ * excluding the data items to be inlined (or corresponding
+ * pointer if an item is not inlined). Each cnstr_* function that
+ * generates descriptors should have a define mentioning
+ * corresponding length.
+ * @jd_len: Maximum length of the job descriptor(s) that will be used
+ * together with the shared descriptor.
+ * @data_len: Array of lengths of the data items trying to be inlined
+ * @inl_mask: 32bit mask with bit x = 1 if data item x can be inlined, 0
+ * otherwise.
+ * @count: Number of data items (size of @data_len array); must be <= 32
+ * @auth_algtype: Authentication algorithm type.
+ * @auth_index: Index value of data_len for authentication key length.
+ * -1 if authentication key length is not present in data_len.
+ *
+ * Return: 0 if data can be inlined / referenced, negative value if not. If 0,
+ * check @inl_mask for details.
+ */
+static inline int
+rta_inline_ipsec_query(unsigned int sd_base_len,
+ unsigned int jd_len,
+ unsigned int *data_len,
+ uint32_t *inl_mask,
+ unsigned int count,
+ uint32_t auth_algtype,
+ int32_t auth_index)
+{
+ uint32_t dkp_protid;
+
+ switch (auth_algtype & OP_PCL_IPSEC_AUTH_MASK) {
+ case OP_PCL_IPSEC_HMAC_MD5_96:
+ case OP_PCL_IPSEC_HMAC_MD5_128:
+ dkp_protid = OP_PCLID_DKP_MD5;
+ break;
+ case OP_PCL_IPSEC_HMAC_SHA1_96:
+ case OP_PCL_IPSEC_HMAC_SHA1_160:
+ dkp_protid = OP_PCLID_DKP_SHA1;
+ break;
+ case OP_PCL_IPSEC_HMAC_SHA2_256_128:
+ dkp_protid = OP_PCLID_DKP_SHA256;
+ break;
+ case OP_PCL_IPSEC_HMAC_SHA2_384_192:
+ dkp_protid = OP_PCLID_DKP_SHA384;
+ break;
+ case OP_PCL_IPSEC_HMAC_SHA2_512_256:
+ dkp_protid = OP_PCLID_DKP_SHA512;
+ break;
+ default:
+ return rta_inline_query(sd_base_len,
+ jd_len,
+ data_len,
+ inl_mask, count);
+ }
+
+ /* Updating the maximum supported inline key length */
+ if (auth_index != -1) {
+ if (split_key_len(dkp_protid) > data_len[auth_index])
+ data_len[auth_index] = split_key_len(dkp_protid);
+ }
+ return rta_inline_query(sd_base_len,
+ jd_len,
+ data_len,
+ inl_mask, count);
+}
+
/**
* cnstr_shdsc_ipsec_encap - IPSec ESP encapsulation protocol-level shared
* descriptor.
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 7807c83e54..8687e3e75e 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -398,10 +398,10 @@ dpaa_sec_prep_ipsec_cdb(dpaa_sec_session *ses)
cdb->sh_desc[0] = cipherdata.keylen;
cdb->sh_desc[1] = authdata.keylen;
- err = rta_inline_query(IPSEC_AUTH_VAR_AES_DEC_BASE_DESC_LEN,
+ err = rta_inline_ipsec_query(IPSEC_AUTH_VAR_AES_DEC_BASE_DESC_LEN,
DESC_JOB_IO_LEN,
(unsigned int *)cdb->sh_desc,
- &cdb->sh_desc[2], 2);
+ &cdb->sh_desc[2], 2, authdata.algtype, 1);
if (err < 0) {
DPAA_SEC_ERR("Crypto: Incorrect key lengths");
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:35.969416915 +0100
+++ 0024-crypto-dpaa_sec-fix-IPsec-descriptor.patch 2024-07-15 16:19:34.508205182 +0100
@@ -1 +1 @@
-From 046341575bd6e1210d6c12b595405ede41150da7 Mon Sep 17 00:00:00 2001
+From ac47aa31a1b2330b2c3dc5de71850826e2cf26fe Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 046341575bd6e1210d6c12b595405ede41150da7 ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
- drivers/common/dpaax/caamflib/desc/ipsec.h | 73 ++++++++++++++++++++++
+ drivers/common/dpaax/caamflib/desc/ipsec.h | 68 ++++++++++++++++++++++
@@ -26 +27 @@
- 2 files changed, 75 insertions(+), 2 deletions(-)
+ 2 files changed, 70 insertions(+), 2 deletions(-)
@@ -29 +30 @@
-index eff26f6f8b..b902873970 100644
+index 8ec6aac915..26bf52827e 100644
@@ -32 +33 @@
-@@ -728,6 +728,79 @@ static inline void __gen_auth_key(struct program *program,
+@@ -726,6 +726,74 @@ static inline void __gen_auth_key(struct program *program,
@@ -86,5 +86,0 @@
-+ case OP_PCL_IPSEC_HMAC_SHA2_224_96:
-+ case OP_PCL_IPSEC_HMAC_SHA2_224_112:
-+ case OP_PCL_IPSEC_HMAC_SHA2_224_224:
-+ dkp_protid = OP_PCLID_DKP_SHA224;
-+ break;
@@ -113 +109 @@
-index 7aa163330a..bf2a11a4d4 100644
+index 7807c83e54..8687e3e75e 100644
@@ -116 +112 @@
-@@ -395,10 +395,10 @@ dpaa_sec_prep_ipsec_cdb(dpaa_sec_session *ses)
+@@ -398,10 +398,10 @@ dpaa_sec_prep_ipsec_cdb(dpaa_sec_session *ses)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'crypto/dpaa2_sec: fix event queue user context' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (22 preceding siblings ...)
2024-07-15 15:26 ` patch 'crypto/dpaa_sec: fix IPsec descriptor' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'examples/ipsec-secgw: fix SA salt endianness' " luca.boccassi
` (60 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Jun Yang; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6530bf0f6de87a62a8056905dbbafbeb000d9b03
Thanks.
Luca Boccassi
---
From 6530bf0f6de87a62a8056905dbbafbeb000d9b03 Mon Sep 17 00:00:00 2001
From: Jun Yang <jun.yang@nxp.com>
Date: Wed, 3 Jul 2024 15:56:49 +0530
Subject: [PATCH] crypto/dpaa2_sec: fix event queue user context
[ upstream commit 70d3ba14391a33585a739421c6e7300bb50f53aa ]
Context configured should be aligned with context got in dq process.
Here the rx_vq is just the first element of qp which covers the issue.
Fixes: bffc7d561c81 ("crypto/dpaa2_sec: support event crypto adapter")
Signed-off-by: Jun Yang <jun.yang@nxp.com>
---
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index cf1339f266..eab7091251 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -4093,7 +4093,7 @@ dpaa2_sec_eventq_attach(const struct rte_cryptodev *dev,
cfg.dest_cfg.priority = priority;
cfg.options |= DPSECI_QUEUE_OPT_USER_CTX;
- cfg.user_ctx = (size_t)(qp);
+ cfg.user_ctx = (size_t)(&qp->rx_vq);
if (event->sched_type == RTE_SCHED_TYPE_ATOMIC) {
cfg.options |= DPSECI_QUEUE_OPT_ORDER_PRESERVATION;
cfg.order_preservation_en = 1;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:36.015463587 +0100
+++ 0025-crypto-dpaa2_sec-fix-event-queue-user-context.patch 2024-07-15 16:19:34.512205267 +0100
@@ -1 +1 @@
-From 70d3ba14391a33585a739421c6e7300bb50f53aa Mon Sep 17 00:00:00 2001
+From 6530bf0f6de87a62a8056905dbbafbeb000d9b03 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 70d3ba14391a33585a739421c6e7300bb50f53aa ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 07369a383f..c1f7181d55 100644
+index cf1339f266..eab7091251 100644
@@ -21 +22 @@
-@@ -4103,7 +4103,7 @@ dpaa2_sec_eventq_attach(const struct rte_cryptodev *dev,
+@@ -4093,7 +4093,7 @@ dpaa2_sec_eventq_attach(const struct rte_cryptodev *dev,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'examples/ipsec-secgw: fix SA salt endianness' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (23 preceding siblings ...)
2024-07-15 15:26 ` patch 'crypto/dpaa2_sec: fix event queue user context' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'fbarray: fix incorrect lookahead behavior' " luca.boccassi
` (59 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Shihong Wang; +Cc: Chaoyong He, Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e8f3418f6405784a614cb1d527bee20213770082
Thanks.
Luca Boccassi
---
From e8f3418f6405784a614cb1d527bee20213770082 Mon Sep 17 00:00:00 2001
From: Shihong Wang <shihong.wang@corigine.com>
Date: Thu, 14 Mar 2024 10:00:52 +0800
Subject: [PATCH] examples/ipsec-secgw: fix SA salt endianness
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit e6bfd9676109f904b4f263402e77105fdca8e67c ]
The SA salt of struct ipsec_sa is a CPU-endian u32 variable, but it’s
value is stored in an array of encryption or authentication keys
according to big-endian. So it maybe need to convert the endianness
order to ensure that the value assigned to the SA salt is CPU-endian.
Fixes: 50d75cae2a2c ("examples/ipsec-secgw: initialize SA salt")
Fixes: 9413c3901f31 ("examples/ipsec-secgw: support additional algorithms")
Fixes: 501e9c226adf ("examples/ipsec-secgw: add AEAD parameters")
Signed-off-by: Shihong Wang <shihong.wang@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
examples/ipsec-secgw/sa.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c
index 45cd29f18b..c7a655003f 100644
--- a/examples/ipsec-secgw/sa.c
+++ b/examples/ipsec-secgw/sa.c
@@ -373,6 +373,7 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
uint32_t ti; /*token index*/
uint32_t *ri /*rule index*/;
struct ipsec_sa_cnt *sa_cnt;
+ rte_be32_t salt; /*big-endian salt*/
uint32_t cipher_algo_p = 0;
uint32_t auth_algo_p = 0;
uint32_t aead_algo_p = 0;
@@ -507,8 +508,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
if (algo->algo == RTE_CRYPTO_CIPHER_AES_CTR) {
key_len -= 4;
rule->cipher_key_len = key_len;
- memcpy(&rule->salt,
- &rule->cipher_key[key_len], 4);
+ memcpy(&salt, &rule->cipher_key[key_len], 4);
+ rule->salt = rte_be_to_cpu_32(salt);
}
cipher_algo_p = 1;
@@ -572,8 +573,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
key_len -= 4;
rule->auth_key_len = key_len;
rule->iv_len = algo->iv_len;
- memcpy(&rule->salt,
- &rule->auth_key[key_len], 4);
+ memcpy(&salt, &rule->auth_key[key_len], 4);
+ rule->salt = rte_be_to_cpu_32(salt);
}
auth_algo_p = 1;
@@ -631,8 +632,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
key_len -= 4;
rule->cipher_key_len = key_len;
- memcpy(&rule->salt,
- &rule->cipher_key[key_len], 4);
+ memcpy(&salt, &rule->cipher_key[key_len], 4);
+ rule->salt = rte_be_to_cpu_32(salt);
aead_algo_p = 1;
continue;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:36.060115685 +0100
+++ 0026-examples-ipsec-secgw-fix-SA-salt-endianness.patch 2024-07-15 16:19:34.512205267 +0100
@@ -1 +1 @@
-From e6bfd9676109f904b4f263402e77105fdca8e67c Mon Sep 17 00:00:00 2001
+From e8f3418f6405784a614cb1d527bee20213770082 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit e6bfd9676109f904b4f263402e77105fdca8e67c ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index c4bac17cd7..8aa9aca739 100644
+index 45cd29f18b..c7a655003f 100644
@@ -30 +31 @@
-@@ -374,6 +374,7 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
+@@ -373,6 +373,7 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
@@ -38 +39 @@
-@@ -508,8 +509,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
+@@ -507,8 +508,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
@@ -49 +50 @@
-@@ -573,8 +574,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
+@@ -572,8 +573,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
@@ -60 +61 @@
-@@ -632,8 +633,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
+@@ -631,8 +632,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'fbarray: fix incorrect lookahead behavior' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (24 preceding siblings ...)
2024-07-15 15:26 ` patch 'examples/ipsec-secgw: fix SA salt endianness' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'fbarray: fix incorrect lookbehind " luca.boccassi
` (58 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Anatoly Burakov; +Cc: Vipin Padmam Ramesh, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e67654ca812a801dbb5665b36aeeedc1665336ee
Thanks.
Luca Boccassi
---
From e67654ca812a801dbb5665b36aeeedc1665336ee Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Mon, 8 Jul 2024 17:07:32 +0100
Subject: [PATCH] fbarray: fix incorrect lookahead behavior
[ upstream commit 8c03a149ce957b10d7792a2a78339496dd156e9f ]
Currently, whenever last bit of current index mask is set
(meaning, there is potentially a run starting at the end of the mask),
lookahead loop is entered.
In that loop, if the first bit of lookahead mask is not set,
the lookahead is stopped, and the current lookahead mask index is
assigned to current index mask.
However, because at that point we are inside a for-loop that increments
current index mask after each iteration, this results in erroneous mask
index increment.
Fix lookahead to avoid erroneous increment,
and add corresponding unit test.
Fixes: c44d09811b40 ("eal: add shared indexed file-backed array")
Signed-off-by: Vipin Padmam Ramesh <vipinp@vmware.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
.mailmap | 1 +
app/test/test_fbarray.c | 23 +++++++++++++++++++++++
lib/eal/common/eal_common_fbarray.c | 3 ++-
3 files changed, 26 insertions(+), 1 deletion(-)
diff --git a/.mailmap b/.mailmap
index 0798312a63..95826dac6c 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1448,6 +1448,7 @@ Vincent Jardin <vincent.jardin@6wind.com>
Vincent Li <vincent.mc.li@gmail.com>
Vincent S. Cojot <vcojot@redhat.com>
Vinh Tran <vinh.t.tran10@gmail.com>
+Vipin Padmam Ramesh <vipinp@vmware.com>
Vipin Varghese <vipin.varghese@amd.com> <vipin.varghese@intel.com>
Vipul Ashri <vipul.ashri@oracle.com>
Visa Hankala <visa@hankala.org>
diff --git a/app/test/test_fbarray.c b/app/test/test_fbarray.c
index a691bf4458..fff44816a1 100644
--- a/app/test/test_fbarray.c
+++ b/app/test/test_fbarray.c
@@ -103,6 +103,14 @@ static int empty_msk_test_setup(void)
return 0;
}
+static int lookahead_test_setup(void)
+{
+ /* set index 64 as used */
+ param.start = 64;
+ param.end = 64;
+ return init_array();
+}
+
static int test_invalid(void)
{
struct rte_fbarray dummy;
@@ -709,6 +717,20 @@ static int test_empty(void)
return TEST_SUCCESS;
}
+static int test_lookahead(void)
+{
+ int ret;
+
+ /* run regular test first */
+ ret = test_find();
+ if (ret != TEST_SUCCESS)
+ return ret;
+
+ /* test if we can find free chunk while not starting with 0 */
+ TEST_ASSERT_EQUAL(rte_fbarray_find_next_n_free(¶m.arr, 1, param.start),
+ param.start + 1, "Free chunk index is wrong\n");
+ return TEST_SUCCESS;
+}
static struct unit_test_suite fbarray_test_suite = {
.suite_name = "fbarray autotest",
@@ -723,6 +745,7 @@ static struct unit_test_suite fbarray_test_suite = {
TEST_CASE_ST(last_msk_test_setup, reset_array, test_find),
TEST_CASE_ST(full_msk_test_setup, reset_array, test_find),
TEST_CASE_ST(empty_msk_test_setup, reset_array, test_empty),
+ TEST_CASE_ST(lookahead_test_setup, reset_array, test_lookahead),
TEST_CASES_END()
}
};
diff --git a/lib/eal/common/eal_common_fbarray.c b/lib/eal/common/eal_common_fbarray.c
index 169e66e04b..842073ae1c 100644
--- a/lib/eal/common/eal_common_fbarray.c
+++ b/lib/eal/common/eal_common_fbarray.c
@@ -236,7 +236,8 @@ find_next_n(const struct rte_fbarray *arr, unsigned int start, unsigned int n,
* as well, so skip that on next iteration.
*/
ignore_msk = ~((1ULL << need) - 1);
- msk_idx = lookahead_idx;
+ /* outer loop will increment msk_idx so add 1 */
+ msk_idx = lookahead_idx - 1;
break;
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:36.102188106 +0100
+++ 0027-fbarray-fix-incorrect-lookahead-behavior.patch 2024-07-15 16:19:34.520205439 +0100
@@ -1 +1 @@
-From 8c03a149ce957b10d7792a2a78339496dd156e9f Mon Sep 17 00:00:00 2001
+From e67654ca812a801dbb5665b36aeeedc1665336ee Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8c03a149ce957b10d7792a2a78339496dd156e9f ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -31 +32 @@
-index 74739ec9be..085e5f0004 100644
+index 0798312a63..95826dac6c 100644
@@ -34 +35 @@
-@@ -1534,6 +1534,7 @@ Vincent Jardin <vincent.jardin@6wind.com>
+@@ -1448,6 +1448,7 @@ Vincent Jardin <vincent.jardin@6wind.com>
@@ -43 +44 @@
-index 26a51e2a3e..bf89b99e5b 100644
+index a691bf4458..fff44816a1 100644
@@ -91 +92 @@
-index 0fe5bcfe06..2680b34823 100644
+index 169e66e04b..842073ae1c 100644
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'fbarray: fix incorrect lookbehind behavior' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (25 preceding siblings ...)
2024-07-15 15:26 ` patch 'fbarray: fix incorrect lookahead behavior' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'fbarray: fix lookahead ignore mask handling' " luca.boccassi
` (57 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Anatoly Burakov; +Cc: Vipin Padmam Ramesh, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/8f3876f8666456adebafd3a60b3378a96019ba1b
Thanks.
Luca Boccassi
---
From 8f3876f8666456adebafd3a60b3378a96019ba1b Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Mon, 8 Jul 2024 17:07:33 +0100
Subject: [PATCH] fbarray: fix incorrect lookbehind behavior
[ upstream commit 8e3712928716a1deb8857c971865aa15dc436b04 ]
Currently, whenever first bit of current index mask is set
(meaning, there is potentially a run starting at the start of the mask),
lookbehind loop is entered.
In that loop, if the last bit of lookbehind mask is not set,
the lookbehind is stopped, and the current lookbehind mask index
is assigned to current index mask.
However, because at that point we are inside a while-loop that
decrements current index mask after each iteration,
this results in erroneous mask index decrement.
Fix lookbehind to avoid erroneous decrement, and add corresponding
unit test.
Fixes: e1ca5dc86226 ("fbarray: add reverse finding of chunk")
Signed-off-by: Vipin Padmam Ramesh <vipinp@vmware.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
app/test/test_fbarray.c | 24 ++++++++++++++++++++++++
lib/eal/common/eal_common_fbarray.c | 3 ++-
2 files changed, 26 insertions(+), 1 deletion(-)
diff --git a/app/test/test_fbarray.c b/app/test/test_fbarray.c
index fff44816a1..f448d4f196 100644
--- a/app/test/test_fbarray.c
+++ b/app/test/test_fbarray.c
@@ -111,6 +111,14 @@ static int lookahead_test_setup(void)
return init_array();
}
+static int lookbehind_test_setup(void)
+{
+ /* set index 63 as used */
+ param.start = 63;
+ param.end = 63;
+ return init_array();
+}
+
static int test_invalid(void)
{
struct rte_fbarray dummy;
@@ -732,6 +740,21 @@ static int test_lookahead(void)
return TEST_SUCCESS;
}
+static int test_lookbehind(void)
+{
+ int ret, free_len = 2;
+
+ /* run regular test first */
+ ret = test_find();
+ if (ret != TEST_SUCCESS)
+ return ret;
+
+ /* test if we can find free chunk while crossing mask boundary */
+ TEST_ASSERT_EQUAL(rte_fbarray_find_prev_n_free(¶m.arr, param.start + 1, free_len),
+ param.start - free_len, "Free chunk index is wrong\n");
+ return TEST_SUCCESS;
+}
+
static struct unit_test_suite fbarray_test_suite = {
.suite_name = "fbarray autotest",
.setup = autotest_setup,
@@ -746,6 +769,7 @@ static struct unit_test_suite fbarray_test_suite = {
TEST_CASE_ST(full_msk_test_setup, reset_array, test_find),
TEST_CASE_ST(empty_msk_test_setup, reset_array, test_empty),
TEST_CASE_ST(lookahead_test_setup, reset_array, test_lookahead),
+ TEST_CASE_ST(lookbehind_test_setup, reset_array, test_lookbehind),
TEST_CASES_END()
}
};
diff --git a/lib/eal/common/eal_common_fbarray.c b/lib/eal/common/eal_common_fbarray.c
index 842073ae1c..374103dc15 100644
--- a/lib/eal/common/eal_common_fbarray.c
+++ b/lib/eal/common/eal_common_fbarray.c
@@ -512,7 +512,8 @@ find_prev_n(const struct rte_fbarray *arr, unsigned int start, unsigned int n,
* as well, so skip that on next iteration.
*/
ignore_msk = UINT64_MAX << need;
- msk_idx = lookbehind_idx;
+ /* outer loop will decrement msk_idx so add 1 */
+ msk_idx = lookbehind_idx + 1;
break;
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:36.145663955 +0100
+++ 0028-fbarray-fix-incorrect-lookbehind-behavior.patch 2024-07-15 16:19:34.520205439 +0100
@@ -1 +1 @@
-From 8e3712928716a1deb8857c971865aa15dc436b04 Mon Sep 17 00:00:00 2001
+From 8f3876f8666456adebafd3a60b3378a96019ba1b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8e3712928716a1deb8857c971865aa15dc436b04 ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index bf89b99e5b..147d6e2a07 100644
+index fff44816a1..f448d4f196 100644
@@ -79 +80 @@
-index 2680b34823..b4f0b0b0c3 100644
+index 842073ae1c..374103dc15 100644
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'fbarray: fix lookahead ignore mask handling' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (26 preceding siblings ...)
2024-07-15 15:26 ` patch 'fbarray: fix incorrect lookbehind " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'fbarray: fix lookbehind " luca.boccassi
` (56 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Anatoly Burakov; +Cc: Vipin Padmam Ramesh, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/2050d2ea0146e2ffd93742eb9105e039e5f6eb1e
Thanks.
Luca Boccassi
---
From 2050d2ea0146e2ffd93742eb9105e039e5f6eb1e Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Mon, 8 Jul 2024 17:07:34 +0100
Subject: [PATCH] fbarray: fix lookahead ignore mask handling
[ upstream commit a344719c181aac28cb2ada0d2ddbfee8ad737a1a ]
When lookahead mask does not have its first bit set,
we can infer that we've lost our run.
However, currently, we set ignore mask to ignore `need` number of bits,
which is incorrect because while there is no *current* run
within those bits, we might still be able to start a new run
within those ignored bits later.
This issue is fixed by counting how many shifts it took to lose the run,
and this is the number of bits we should ignore
(+1 to skip one we stopped on).
Also, add unit tests to reproduce the problem.
Fixes: c44d09811b40 ("eal: add shared indexed file-backed array")
Signed-off-by: Vipin Padmam Ramesh <vipinp@vmware.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
app/test/test_fbarray.c | 28 ++++++++++++++++++++++++++++
lib/eal/common/eal_common_fbarray.c | 13 ++++++++++---
2 files changed, 38 insertions(+), 3 deletions(-)
diff --git a/app/test/test_fbarray.c b/app/test/test_fbarray.c
index f448d4f196..38a62cd456 100644
--- a/app/test/test_fbarray.c
+++ b/app/test/test_fbarray.c
@@ -755,6 +755,32 @@ static int test_lookbehind(void)
return TEST_SUCCESS;
}
+static int test_lookahead_mask(void)
+{
+ /*
+ * There is a certain type of lookahead behavior we want to test here,
+ * namely masking of bits that were scanned with lookahead but that we
+ * know do not match our criteria. This is achieved in following steps:
+ *
+ * 0. Look for a big enough chunk of free space (say, 62 elements)
+ * 1. Trigger lookahead by breaking a run somewhere inside mask 0
+ * (indices 0-63)
+ * 2. Fail lookahead by breaking the run somewhere inside mask 1
+ * (indices 64-127)
+ * 3. Ensure that we can still find free space in mask 1 afterwards
+ */
+
+ /* break run on first mask */
+ rte_fbarray_set_used(¶m.arr, 61);
+ /* break run on second mask */
+ rte_fbarray_set_used(¶m.arr, 70);
+
+ /* we expect to find free space at 71 */
+ TEST_ASSERT_EQUAL(rte_fbarray_find_next_n_free(¶m.arr, 0, 62),
+ 71, "Free chunk index is wrong\n");
+ return TEST_SUCCESS;
+}
+
static struct unit_test_suite fbarray_test_suite = {
.suite_name = "fbarray autotest",
.setup = autotest_setup,
@@ -770,6 +796,8 @@ static struct unit_test_suite fbarray_test_suite = {
TEST_CASE_ST(empty_msk_test_setup, reset_array, test_empty),
TEST_CASE_ST(lookahead_test_setup, reset_array, test_lookahead),
TEST_CASE_ST(lookbehind_test_setup, reset_array, test_lookbehind),
+ /* setup for these tests is more complex so do it in test func */
+ TEST_CASE_ST(NULL, reset_array, test_lookahead_mask),
TEST_CASES_END()
}
};
diff --git a/lib/eal/common/eal_common_fbarray.c b/lib/eal/common/eal_common_fbarray.c
index 374103dc15..1909615187 100644
--- a/lib/eal/common/eal_common_fbarray.c
+++ b/lib/eal/common/eal_common_fbarray.c
@@ -216,6 +216,8 @@ find_next_n(const struct rte_fbarray *arr, unsigned int start, unsigned int n,
for (lookahead_idx = msk_idx + 1; lookahead_idx < msk->n_masks;
lookahead_idx++) {
unsigned int s_idx, need;
+ uint64_t first_bit = 1;
+
lookahead_msk = msk->data[lookahead_idx];
/* if we're looking for free space, invert the mask */
@@ -225,17 +227,22 @@ find_next_n(const struct rte_fbarray *arr, unsigned int start, unsigned int n,
/* figure out how many consecutive bits we need here */
need = RTE_MIN(left, MASK_ALIGN);
- for (s_idx = 0; s_idx < need - 1; s_idx++)
+ /* count number of shifts we performed */
+ for (s_idx = 0; s_idx < need - 1; s_idx++) {
lookahead_msk &= lookahead_msk >> 1ULL;
+ /* did we lose the run yet? */
+ if ((lookahead_msk & first_bit) == 0)
+ break;
+ }
/* if first bit is not set, we've lost the run */
- if ((lookahead_msk & 1) == 0) {
+ if ((lookahead_msk & first_bit) == 0) {
/*
* we've scanned this far, so we know there are
* no runs in the space we've lookahead-scanned
* as well, so skip that on next iteration.
*/
- ignore_msk = ~((1ULL << need) - 1);
+ ignore_msk = ~((1ULL << (s_idx + 1)) - 1);
/* outer loop will increment msk_idx so add 1 */
msk_idx = lookahead_idx - 1;
break;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:36.189873104 +0100
+++ 0029-fbarray-fix-lookahead-ignore-mask-handling.patch 2024-07-15 16:19:34.524205524 +0100
@@ -1 +1 @@
-From a344719c181aac28cb2ada0d2ddbfee8ad737a1a Mon Sep 17 00:00:00 2001
+From 2050d2ea0146e2ffd93742eb9105e039e5f6eb1e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a344719c181aac28cb2ada0d2ddbfee8ad737a1a ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index 147d6e2a07..4b17ef6be3 100644
+index f448d4f196..38a62cd456 100644
@@ -75 +76 @@
-index b4f0b0b0c3..195f8394be 100644
+index 374103dc15..1909615187 100644
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'fbarray: fix lookbehind ignore mask handling' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (27 preceding siblings ...)
2024-07-15 15:26 ` patch 'fbarray: fix lookahead ignore mask handling' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'usertools/devbind: fix indentation' " luca.boccassi
` (55 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Anatoly Burakov; +Cc: Vipin Padmam Ramesh, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/58dd24b4666b3254b8acce9b7ae113d69c38d3a0
Thanks.
Luca Boccassi
---
From 58dd24b4666b3254b8acce9b7ae113d69c38d3a0 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Mon, 8 Jul 2024 17:07:35 +0100
Subject: [PATCH] fbarray: fix lookbehind ignore mask handling
[ upstream commit 0c6e2781578f37d0497c225acf68ce5ffe31bd8e ]
When lookahead mask does not have its last bit set,
we can infer that we've lost our run.
However, currently, we set ignore mask to ignore first `need` bits,
which is incorrect for two reasons: first, using `need` bits as
ignore bit count means we might miss opportunities to start a new run
within those bits, and more importantly when doing lookbehind,
we start looking from the top, so we should be ignoring *last* N bits,
not *first* N bits of the mask.
This issue is fixed by counting how many shifts it took to lose the run,
and this is the number of bits we should ignore from the top
(+1 to skip one we stopped on).
Also, add unit tests to reproduce the problem.
Fixes: e1ca5dc86226 ("fbarray: add reverse finding of chunk")
Signed-off-by: Vipin Padmam Ramesh <vipinp@vmware.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
app/test/test_fbarray.c | 27 +++++++++++++++++++++++++++
lib/eal/common/eal_common_fbarray.c | 9 +++++++--
2 files changed, 34 insertions(+), 2 deletions(-)
diff --git a/app/test/test_fbarray.c b/app/test/test_fbarray.c
index 38a62cd456..3be9e19e78 100644
--- a/app/test/test_fbarray.c
+++ b/app/test/test_fbarray.c
@@ -781,6 +781,32 @@ static int test_lookahead_mask(void)
return TEST_SUCCESS;
}
+static int test_lookbehind_mask(void)
+{
+ /*
+ * There is a certain type of lookbehind behavior we want to test here,
+ * namely masking of bits that were scanned with lookbehind but that we
+ * know do not match our criteria. This is achieved in two steps:
+ *
+ * 0. Look for a big enough chunk of free space (say, 62 elements)
+ * 1. Trigger lookbehind by breaking a run somewhere inside mask 2
+ * (indices 128-191)
+ * 2. Fail lookbehind by breaking the run somewhere inside mask 1
+ * (indices 64-127)
+ * 3. Ensure that we can still find free space in mask 1 afterwards
+ */
+
+ /* break run on mask 2 */
+ rte_fbarray_set_used(¶m.arr, 130);
+ /* break run on mask 1 */
+ rte_fbarray_set_used(¶m.arr, 70);
+
+ /* start from 190, we expect to find free space at 8 */
+ TEST_ASSERT_EQUAL(rte_fbarray_find_prev_n_free(¶m.arr, 190, 62),
+ 8, "Free chunk index is wrong\n");
+ return TEST_SUCCESS;
+}
+
static struct unit_test_suite fbarray_test_suite = {
.suite_name = "fbarray autotest",
.setup = autotest_setup,
@@ -798,6 +824,7 @@ static struct unit_test_suite fbarray_test_suite = {
TEST_CASE_ST(lookbehind_test_setup, reset_array, test_lookbehind),
/* setup for these tests is more complex so do it in test func */
TEST_CASE_ST(NULL, reset_array, test_lookahead_mask),
+ TEST_CASE_ST(NULL, reset_array, test_lookbehind_mask),
TEST_CASES_END()
}
};
diff --git a/lib/eal/common/eal_common_fbarray.c b/lib/eal/common/eal_common_fbarray.c
index 1909615187..34f51d8530 100644
--- a/lib/eal/common/eal_common_fbarray.c
+++ b/lib/eal/common/eal_common_fbarray.c
@@ -508,8 +508,13 @@ find_prev_n(const struct rte_fbarray *arr, unsigned int start, unsigned int n,
/* figure out how many consecutive bits we need here */
need = RTE_MIN(left, MASK_ALIGN);
- for (s_idx = 0; s_idx < need - 1; s_idx++)
+ /* count number of shifts we performed */
+ for (s_idx = 0; s_idx < need - 1; s_idx++) {
lookbehind_msk &= lookbehind_msk << 1ULL;
+ /* did we lose the run yet? */
+ if ((lookbehind_msk & last_bit) == 0)
+ break;
+ }
/* if last bit is not set, we've lost the run */
if ((lookbehind_msk & last_bit) == 0) {
@@ -518,7 +523,7 @@ find_prev_n(const struct rte_fbarray *arr, unsigned int start, unsigned int n,
* no runs in the space we've lookbehind-scanned
* as well, so skip that on next iteration.
*/
- ignore_msk = UINT64_MAX << need;
+ ignore_msk = ~(UINT64_MAX << (MASK_ALIGN - s_idx - 1));
/* outer loop will decrement msk_idx so add 1 */
msk_idx = lookbehind_idx + 1;
break;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:36.233590416 +0100
+++ 0030-fbarray-fix-lookbehind-ignore-mask-handling.patch 2024-07-15 16:19:34.528205609 +0100
@@ -1 +1 @@
-From 0c6e2781578f37d0497c225acf68ce5ffe31bd8e Mon Sep 17 00:00:00 2001
+From 58dd24b4666b3254b8acce9b7ae113d69c38d3a0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0c6e2781578f37d0497c225acf68ce5ffe31bd8e ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org
@@ -31 +32 @@
-index 4b17ef6be3..13c6691e50 100644
+index 38a62cd456..3be9e19e78 100644
@@ -76 +77 @@
-index 195f8394be..63d8b731f5 100644
+index 1909615187..34f51d8530 100644
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'usertools/devbind: fix indentation' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (28 preceding siblings ...)
2024-07-15 15:26 ` patch 'fbarray: fix lookbehind " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'eal/linux: lower log level on allocation attempt failure' " luca.boccassi
` (54 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Robin Jarry, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/49fc31bc8b1eee29c396b025088dca7a65cf663a
Thanks.
Luca Boccassi
---
From 49fc31bc8b1eee29c396b025088dca7a65cf663a Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Mon, 1 Jul 2024 10:45:44 -0700
Subject: [PATCH] usertools/devbind: fix indentation
[ upstream commit 04f14ad7e0a829354b58e0b2efcfd906e51327d9 ]
The python check tool (flake8) is picky about the indentation
of continuation lines, and dpdk-devbind was not following standard.
Error is:
E127 continuation line over-indented for visual indent
Fixes: 2ff801515e49 ("usertools/devbind: update octeontx2 DMA device")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Robin Jarry <rjarry@redhat.com>
---
usertools/dpdk-devbind.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py
index 4d9c1be666..d9aff74873 100755
--- a/usertools/dpdk-devbind.py
+++ b/usertools/dpdk-devbind.py
@@ -66,14 +66,14 @@ intel_ntb_icx = {'Class': '06', 'Vendor': '8086', 'Device': '347e',
'SVendor': None, 'SDevice': None}
cnxk_sso = {'Class': '08', 'Vendor': '177d', 'Device': 'a0f9,a0fa',
- 'SVendor': None, 'SDevice': None}
+ 'SVendor': None, 'SDevice': None}
cnxk_npa = {'Class': '08', 'Vendor': '177d', 'Device': 'a0fb,a0fc',
- 'SVendor': None, 'SDevice': None}
+ 'SVendor': None, 'SDevice': None}
cn9k_ree = {'Class': '08', 'Vendor': '177d', 'Device': 'a0f4',
- 'SVendor': None, 'SDevice': None}
+ 'SVendor': None, 'SDevice': None}
virtio_blk = {'Class': '01', 'Vendor': "1af4", 'Device': '1001,1042',
- 'SVendor': None, 'SDevice': None}
+ 'SVendor': None, 'SDevice': None}
network_devices = [network_class, cavium_pkx, avp_vnic, ifpga_class]
baseband_devices = [acceleration_class]
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:36.275415613 +0100
+++ 0031-usertools-devbind-fix-indentation.patch 2024-07-15 16:19:34.528205609 +0100
@@ -1 +1 @@
-From 04f14ad7e0a829354b58e0b2efcfd906e51327d9 Mon Sep 17 00:00:00 2001
+From 49fc31bc8b1eee29c396b025088dca7a65cf663a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 04f14ad7e0a829354b58e0b2efcfd906e51327d9 ]
+
@@ -17,2 +19,2 @@
- usertools/dpdk-devbind.py | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
+ usertools/dpdk-devbind.py | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
@@ -21 +23 @@
-index a278f5e7f3..5dc42d8fe2 100755
+index 4d9c1be666..d9aff74873 100755
@@ -24 +26 @@
-@@ -66,17 +66,17 @@ intel_ntb_icx = {'Class': '06', 'Vendor': '8086', 'Device': '347e',
+@@ -66,14 +66,14 @@ intel_ntb_icx = {'Class': '06', 'Vendor': '8086', 'Device': '347e',
@@ -40,4 +41,0 @@
-
- cnxk_ml = {'Class': '08', 'Vendor': '177d', 'Device': 'a092',
-- 'SVendor': None, 'SDevice': None}
-+ 'SVendor': None, 'SDevice': None}
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'eal/linux: lower log level on allocation attempt failure' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (29 preceding siblings ...)
2024-07-15 15:26 ` patch 'usertools/devbind: fix indentation' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'dma/idxd: fix setup with Ubuntu 24.04' " luca.boccassi
` (53 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: David Marchand; +Cc: Stephen Hemminger, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b929a370ef2064f97a3e37810f2331e552dde220
Thanks.
Luca Boccassi
---
From b929a370ef2064f97a3e37810f2331e552dde220 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 26 Jun 2024 16:51:42 +0200
Subject: [PATCH] eal/linux: lower log level on allocation attempt failure
[ upstream commit 8f4611d893b4eeffb942fffdadc4cde394e4c309 ]
On a ARM system with only 2MB hugepages configured, EAL emits an error
log with allocations larger than 512MB.
Example with testpmd:
$ dpdk-testpmd --in-memory --no-pci --log-level=*:debug -- -i
...
EAL: In-memory mode enabled, hugepages of size 33554432 bytes will be
allocated anonymously
EAL: No free 32768 kB hugepages reported on node 0
EAL: In-memory mode enabled, hugepages of size 65536 bytes will be
allocated anonymously
EAL: No free 64 kB hugepages reported on node 0
EAL: In-memory mode enabled, hugepages of size 1073741824 bytes will be
allocated anonymously
EAL: No free 1048576 kB hugepages reported on node 0
...
EAL: Detected memory type: socket_id:0 hugepage_sz:1073741824
EAL: Detected memory type: socket_id:0 hugepage_sz:33554432
EAL: Detected memory type: socket_id:0 hugepage_sz:2097152
EAL: Detected memory type: socket_id:0 hugepage_sz:65536
EAL: Creating 2 segment lists: n_segs:32 socket_id:0
hugepage_sz:1073741824
...
EAL: Creating 2 segment lists: n_segs:1024 socket_id:0
hugepage_sz:33554432
...
EAL: Creating 4 segment lists: n_segs:8192 socket_id:0
hugepage_sz:2097152
...
EAL: Creating 4 segment lists: n_segs:8192 socket_id:0
hugepage_sz:65536
...
EAL: Trying to obtain current memory policy.
EAL: Setting policy MPOL_PREFERRED for socket 0
EAL: alloc_seg(): mmap() failed: Cannot allocate memory
EAL: Ask a virtual area of 0x40000000 bytes
EAL: Virtual area found at 0x140000000 (size = 0x40000000)
EAL: attempted to allocate 2 segments, but only 0 were allocated
EAL: Restoring previous memory policy: 4
EAL: Trying to obtain current memory policy.
EAL: Setting policy MPOL_PREFERRED for socket 0
EAL: eal_memalloc_alloc_seg_bulk(): couldn't find suitable memseg_list
EAL: Restoring previous memory policy: 4
EAL: Trying to obtain current memory policy.
EAL: Setting policy MPOL_PREFERRED for socket 0
EAL: Restoring previous memory policy: 4
EAL: request: mp_malloc_sync
EAL: No shared files mode enabled, IPC is disabled
EAL: Heap on socket 0 was expanded by 1064MB
...
The reason is that the memzone allocation (~1GB large) would require
17017 (32kB) segments. However, as displayed in the early logs, a 32kB
memory segment list can only host 8192 segments (controlled by the build
option RTE_MAX_MEMSEG_PER_LIST).
This log message is misleading as there is no issue in the end: the
allocation succeeded with 2MB hugepages.
Fixes: 582bed1e1d1d ("mem: support mapping hugepages at runtime")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/eal/linux/eal_memalloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/eal/linux/eal_memalloc.c b/lib/eal/linux/eal_memalloc.c
index 9853ec78a2..b9fc83fe6a 100644
--- a/lib/eal/linux/eal_memalloc.c
+++ b/lib/eal/linux/eal_memalloc.c
@@ -1061,7 +1061,7 @@ eal_memalloc_alloc_seg_bulk(struct rte_memseg **ms, int n_segs, size_t page_sz,
/* memalloc is locked, so it's safe to use thread-unsafe version */
ret = rte_memseg_list_walk_thread_unsafe(alloc_seg_walk, &wa);
if (ret == 0) {
- RTE_LOG(ERR, EAL, "%s(): couldn't find suitable memseg_list\n",
+ RTE_LOG(DEBUG, EAL, "%s(): couldn't find suitable memseg_list\n",
__func__);
ret = -1;
} else if (ret > 0) {
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:36.321854357 +0100
+++ 0032-eal-linux-lower-log-level-on-allocation-attempt-fail.patch 2024-07-15 16:19:34.528205609 +0100
@@ -1 +1 @@
-From 8f4611d893b4eeffb942fffdadc4cde394e4c309 Mon Sep 17 00:00:00 2001
+From b929a370ef2064f97a3e37810f2331e552dde220 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8f4611d893b4eeffb942fffdadc4cde394e4c309 ]
+
@@ -66 +67,0 @@
-Cc: stable@dpdk.org
@@ -75 +76 @@
-index 0cc3295994..e354efc95d 100644
+index 9853ec78a2..b9fc83fe6a 100644
@@ -82,2 +83,2 @@
-- EAL_LOG(ERR, "%s(): couldn't find suitable memseg_list",
-+ EAL_LOG(DEBUG, "%s(): couldn't find suitable memseg_list",
+- RTE_LOG(ERR, EAL, "%s(): couldn't find suitable memseg_list\n",
++ RTE_LOG(DEBUG, EAL, "%s(): couldn't find suitable memseg_list\n",
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'dma/idxd: fix setup with Ubuntu 24.04' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (30 preceding siblings ...)
2024-07-15 15:26 ` patch 'eal/linux: lower log level on allocation attempt failure' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'app/testpmd: fix help string of BPF load command' " luca.boccassi
` (52 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Wenwu Ma; +Cc: Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/c74c897cfed45faaec981b9d31ee40b203aad7f4
Thanks.
Luca Boccassi
---
From c74c897cfed45faaec981b9d31ee40b203aad7f4 Mon Sep 17 00:00:00 2001
From: Wenwu Ma <wenwux.ma@intel.com>
Date: Fri, 28 Jun 2024 17:54:00 +0800
Subject: [PATCH] dma/idxd: fix setup with Ubuntu 24.04
[ upstream commit d569af3d4e8ef896591f4e50f7bd1c1274c86e15 ]
In Ubuntu 24.04 and with Linux kernel >= v6.7, DSA's workqueue has a
driver_name file in sysfs.
DPDK needs to write a correct value to this file when configuring a device
instance using the dpdk_idxd_cfg.py script, otherwise it will fail to be
configured, this patch fixes the issue.
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7af1e0aceeb3
Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/dma/idxd/dpdk_idxd_cfg.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/dma/idxd/dpdk_idxd_cfg.py b/drivers/dma/idxd/dpdk_idxd_cfg.py
index 41b4d13b9c..3f0de59e91 100755
--- a/drivers/dma/idxd/dpdk_idxd_cfg.py
+++ b/drivers/dma/idxd/dpdk_idxd_cfg.py
@@ -98,8 +98,10 @@ def configure_dsa(dsa_id, args):
"priority": 1,
"max_batch_size": 1024,
"size": int(max_work_queues_size / nb_queues)}
- wqcfg.update(parse_wq_opts(args.wq_option))
wq_dir = SysfsDir(os.path.join(dsa_dir.path, f"wq{dsa_id}.{q}"))
+ if os.path.exists(os.path.join(wq_dir.path, f"driver_name")):
+ wqcfg.update({"driver_name": "user"})
+ wqcfg.update(parse_wq_opts(args.wq_option))
wq_dir.write_values(wqcfg)
# enable device and then queues
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:36.364946782 +0100
+++ 0033-dma-idxd-fix-setup-with-Ubuntu-24.04.patch 2024-07-15 16:19:34.528205609 +0100
@@ -1 +1 @@
-From d569af3d4e8ef896591f4e50f7bd1c1274c86e15 Mon Sep 17 00:00:00 2001
+From c74c897cfed45faaec981b9d31ee40b203aad7f4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d569af3d4e8ef896591f4e50f7bd1c1274c86e15 ]
+
@@ -12,2 +13,0 @@
-Cc: stable@dpdk.org
-
@@ -22 +22 @@
-index c0c833ade9..5c9572b49d 100755
+index 41b4d13b9c..3f0de59e91 100755
@@ -25 +25 @@
-@@ -104,8 +104,10 @@ def configure_dsa(dsa_id, args):
+@@ -98,8 +98,10 @@ def configure_dsa(dsa_id, args):
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'app/testpmd: fix help string of BPF load command' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (31 preceding siblings ...)
2024-07-15 15:26 ` patch 'dma/idxd: fix setup with Ubuntu 24.04' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'bus/dpaa: fix bus scan for DMA devices' " luca.boccassi
` (51 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Chaoyong He; +Cc: Long Wu, Peng Zhang, Konstantin Ananyev, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e922a98a21a315f0a7eaa08207bcd5c66942defb
Thanks.
Luca Boccassi
---
From e922a98a21a315f0a7eaa08207bcd5c66942defb Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Mon, 24 Jun 2024 09:58:52 +0800
Subject: [PATCH] app/testpmd: fix help string of BPF load command
[ upstream commit 34890bfa6e11bae143064825c22755d842531e40 ]
Based on the logic of 'bpf_parse_flags()' and the 'bpf-load' section of
'testpmd_funcs.rst' document, the 'B' flag in the help string of
bpf-load command should be '-'.
Fixes: e977e4199a8d ("app/testpmd: add commands to load/unload BPF filters")
Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
---
app/test-pmd/bpf_cmd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test-pmd/bpf_cmd.c b/app/test-pmd/bpf_cmd.c
index 46f6b7d6d2..24d34f983e 100644
--- a/app/test-pmd/bpf_cmd.c
+++ b/app/test-pmd/bpf_cmd.c
@@ -139,7 +139,7 @@ static cmdline_parse_token_string_t cmd_load_bpf_prm =
cmdline_parse_inst_t cmd_operate_bpf_ld_parse = {
.f = cmd_operate_bpf_ld_parsed,
.data = NULL,
- .help_str = "bpf-load rx|tx <port> <queue> <J|M|B> <file_name>",
+ .help_str = "bpf-load rx|tx <port> <queue> <J|M|-> <file_name>",
.tokens = {
(void *)&cmd_load_bpf_start,
(void *)&cmd_load_bpf_dir,
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:36.407658167 +0100
+++ 0034-app-testpmd-fix-help-string-of-BPF-load-command.patch 2024-07-15 16:19:34.528205609 +0100
@@ -1 +1 @@
-From 34890bfa6e11bae143064825c22755d842531e40 Mon Sep 17 00:00:00 2001
+From e922a98a21a315f0a7eaa08207bcd5c66942defb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 34890bfa6e11bae143064825c22755d842531e40 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'bus/dpaa: fix bus scan for DMA devices' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (32 preceding siblings ...)
2024-07-15 15:26 ` patch 'app/testpmd: fix help string of BPF load command' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'bus/dpaa: fix memory leak in bus scan' " luca.boccassi
` (50 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Gagandeep Singh; +Cc: Vanshika Shukla, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b82122e2ab8e7baf6516e68a917399107d333b48
Thanks.
Luca Boccassi
---
From b82122e2ab8e7baf6516e68a917399107d333b48 Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Wed, 10 Jul 2024 14:25:27 +0530
Subject: [PATCH] bus/dpaa: fix bus scan for DMA devices
[ upstream commit bf62ec7f0c99e861b65f550191b98377ac9dd2f9 ]
If there is no sec device available, code is not scanning QDMA dev.
This patch fixes this problem by adding a goto statement instead
of return in case no sec device available.
Fixes: 583f3732974f ("dma/dpaa: introduce DPAA DMA driver skeleton")
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Signed-off-by: Vanshika Shukla <vanshika.shukla@nxp.com>
---
drivers/bus/dpaa/dpaa_bus.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
index a67f5c9ab5..0823553398 100644
--- a/drivers/bus/dpaa/dpaa_bus.c
+++ b/drivers/bus/dpaa/dpaa_bus.c
@@ -220,7 +220,7 @@ dpaa_create_device_list(void)
if (dpaa_sec_available()) {
DPAA_BUS_LOG(INFO, "DPAA SEC devices are not available");
- return 0;
+ goto qdma_dpaa;
}
/* Creating SEC Devices */
@@ -259,6 +259,7 @@ dpaa_create_device_list(void)
rte_dpaa_bus.device_count += i;
+qdma_dpaa:
/* Creating QDMA Device */
for (i = 0; i < RTE_DPAA_QDMA_DEVICES; i++) {
dev = calloc(1, sizeof(struct rte_dpaa_device));
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:36.449684955 +0100
+++ 0035-bus-dpaa-fix-bus-scan-for-DMA-devices.patch 2024-07-15 16:19:34.532205695 +0100
@@ -1 +1 @@
-From bf62ec7f0c99e861b65f550191b98377ac9dd2f9 Mon Sep 17 00:00:00 2001
+From b82122e2ab8e7baf6516e68a917399107d333b48 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bf62ec7f0c99e861b65f550191b98377ac9dd2f9 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 64b748626b..b8f41ec069 100644
+index a67f5c9ab5..0823553398 100644
@@ -23 +24 @@
-@@ -221,7 +221,7 @@ dpaa_create_device_list(void)
+@@ -220,7 +220,7 @@ dpaa_create_device_list(void)
@@ -32 +33 @@
-@@ -260,6 +260,7 @@ dpaa_create_device_list(void)
+@@ -259,6 +259,7 @@ dpaa_create_device_list(void)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'bus/dpaa: fix memory leak in bus scan' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (33 preceding siblings ...)
2024-07-15 15:26 ` patch 'bus/dpaa: fix bus scan for DMA devices' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'common/dpaax: fix IOVA table cleanup' " luca.boccassi
` (49 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Apeksha Gupta; +Cc: Vanshika Shukla, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/75332a8da8bfa24d03d24267470feeb38eab0eb8
Thanks.
Luca Boccassi
---
From 75332a8da8bfa24d03d24267470feeb38eab0eb8 Mon Sep 17 00:00:00 2001
From: Apeksha Gupta <apeksha.gupta@nxp.com>
Date: Wed, 10 Jul 2024 14:25:28 +0530
Subject: [PATCH] bus/dpaa: fix memory leak in bus scan
[ upstream commit de0833ffe31739fd40789b1580025bc849d8871f ]
Resource leak:
variable dev is going out of scope leaks the storage.
Coverity issue: 373703
Fixes: d61138d4f0e2 ("drivers: remove direct access to interrupt handle")
Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
Signed-off-by: Vanshika Shukla <vanshika.shukla@nxp.com>
---
drivers/bus/dpaa/dpaa_bus.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
index 0823553398..aaf2a5f43e 100644
--- a/drivers/bus/dpaa/dpaa_bus.c
+++ b/drivers/bus/dpaa/dpaa_bus.c
@@ -187,6 +187,7 @@ dpaa_create_device_list(void)
if (dev->intr_handle == NULL) {
DPAA_BUS_LOG(ERR, "Failed to allocate intr handle");
ret = -ENOMEM;
+ free(dev);
goto cleanup;
}
@@ -238,6 +239,7 @@ dpaa_create_device_list(void)
if (dev->intr_handle == NULL) {
DPAA_BUS_LOG(ERR, "Failed to allocate intr handle");
ret = -ENOMEM;
+ free(dev);
goto cleanup;
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:36.502998244 +0100
+++ 0036-bus-dpaa-fix-memory-leak-in-bus-scan.patch 2024-07-15 16:19:34.532205695 +0100
@@ -1 +1 @@
-From de0833ffe31739fd40789b1580025bc849d8871f Mon Sep 17 00:00:00 2001
+From 75332a8da8bfa24d03d24267470feeb38eab0eb8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit de0833ffe31739fd40789b1580025bc849d8871f ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index b8f41ec069..1f6997c77e 100644
+index 0823553398..aaf2a5f43e 100644
@@ -23 +24 @@
-@@ -188,6 +188,7 @@ dpaa_create_device_list(void)
+@@ -187,6 +187,7 @@ dpaa_create_device_list(void)
@@ -31 +32 @@
-@@ -239,6 +240,7 @@ dpaa_create_device_list(void)
+@@ -238,6 +239,7 @@ dpaa_create_device_list(void)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'common/dpaax: fix IOVA table cleanup' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (34 preceding siblings ...)
2024-07-15 15:26 ` patch 'bus/dpaa: fix memory leak in bus scan' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'common/dpaax: fix node array overrun' " luca.boccassi
` (48 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Gagandeep Singh; +Cc: Vanshika Shukla, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/041e6663bd8ed4da45cd30e24b96a7494c953c53
Thanks.
Luca Boccassi
---
From 041e6663bd8ed4da45cd30e24b96a7494c953c53 Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Wed, 10 Jul 2024 14:25:29 +0530
Subject: [PATCH] common/dpaax: fix IOVA table cleanup
[ upstream commit 3a3cdff440fe6b98b95f798caf7a4583a49ebe08 ]
Fixes incorrect structure free.
Fixes: 2f3d633aa593 ("common/dpaax: add library for PA/VA translation table")
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Signed-off-by: Vanshika Shukla <vanshika.shukla@nxp.com>
---
drivers/common/dpaax/dpaax_iova_table.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/common/dpaax/dpaax_iova_table.c b/drivers/common/dpaax/dpaax_iova_table.c
index 9daac4bc03..d2a78f4c19 100644
--- a/drivers/common/dpaax/dpaax_iova_table.c
+++ b/drivers/common/dpaax/dpaax_iova_table.c
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: BSD-3-Clause
- * Copyright 2018 NXP
+ * Copyright 2018-2023 NXP
*/
#include <rte_memory.h>
@@ -255,10 +255,7 @@ dpaax_iova_table_populate(void)
void
dpaax_iova_table_depopulate(void)
{
- if (dpaax_iova_table_p == NULL)
- return;
-
- rte_free(dpaax_iova_table_p->entries);
+ rte_free(dpaax_iova_table_p);
dpaax_iova_table_p = NULL;
DPAAX_DEBUG("IOVA Table cleaned");
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:36.547200055 +0100
+++ 0037-common-dpaax-fix-IOVA-table-cleanup.patch 2024-07-15 16:19:34.532205695 +0100
@@ -1 +1 @@
-From 3a3cdff440fe6b98b95f798caf7a4583a49ebe08 Mon Sep 17 00:00:00 2001
+From 041e6663bd8ed4da45cd30e24b96a7494c953c53 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3a3cdff440fe6b98b95f798caf7a4583a49ebe08 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'common/dpaax: fix node array overrun' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (35 preceding siblings ...)
2024-07-15 15:26 ` patch 'common/dpaax: fix IOVA table cleanup' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'bus/dpaa: remove redundant file descriptor check' " luca.boccassi
` (47 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Apeksha Gupta; +Cc: Vanshika Shukla, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/55950c7aa54f377fc6de2b3249b323506b96bbda
Thanks.
Luca Boccassi
---
From 55950c7aa54f377fc6de2b3249b323506b96bbda Mon Sep 17 00:00:00 2001
From: Apeksha Gupta <apeksha.gupta@nxp.com>
Date: Wed, 10 Jul 2024 14:25:30 +0530
Subject: [PATCH] common/dpaax: fix node array overrun
[ upstream commit fae5c5cf59b13efa1fe40d9dd75e0c8731dc46b1 ]
Out-of-bounds read, overrunning dynamic array nodes at offset
corresponding to index variable j.
Fixes: 2f3d633aa593 ("common/dpaax: add library for PA/VA translation table")
Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
Signed-off-by: Vanshika Shukla <vanshika.shukla@nxp.com>
---
drivers/common/dpaax/dpaax_iova_table.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/common/dpaax/dpaax_iova_table.c b/drivers/common/dpaax/dpaax_iova_table.c
index d2a78f4c19..860e702333 100644
--- a/drivers/common/dpaax/dpaax_iova_table.c
+++ b/drivers/common/dpaax/dpaax_iova_table.c
@@ -139,10 +139,12 @@ read_memory_node(unsigned int *count)
}
DPAAX_DEBUG("Device-tree memory node data:");
- do {
+
+ while (j > 0) {
+ --j;
DPAAX_DEBUG(" %08" PRIx64 " %08zu",
nodes[j].addr, nodes[j].len);
- } while (--j);
+ }
cleanup:
close(fd);
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:36.590856580 +0100
+++ 0038-common-dpaax-fix-node-array-overrun.patch 2024-07-15 16:19:34.532205695 +0100
@@ -1 +1 @@
-From fae5c5cf59b13efa1fe40d9dd75e0c8731dc46b1 Mon Sep 17 00:00:00 2001
+From 55950c7aa54f377fc6de2b3249b323506b96bbda Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fae5c5cf59b13efa1fe40d9dd75e0c8731dc46b1 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'bus/dpaa: remove redundant file descriptor check' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (36 preceding siblings ...)
2024-07-15 15:26 ` patch 'common/dpaax: fix node array overrun' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/dpaa: forbid MTU configuration for shared interface' " luca.boccassi
` (46 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Rohit Raj; +Cc: Vanshika Shukla, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b7594f8f156098c3e00f7f005f44758f770542f2
Thanks.
Luca Boccassi
---
From b7594f8f156098c3e00f7f005f44758f770542f2 Mon Sep 17 00:00:00 2001
From: Rohit Raj <rohit.raj@nxp.com>
Date: Wed, 10 Jul 2024 14:25:31 +0530
Subject: [PATCH] bus/dpaa: remove redundant file descriptor check
[ upstream commit 0ca2093f6b3608467bebe9caf27ce98671fb3381 ]
This patch removes the redundant file descriptor check.
Coverity issue: 425715
Fixes: 2f3d633aa593 ("common/dpaax: add library for PA/VA translation table")
Signed-off-by: Rohit Raj <rohit.raj@nxp.com>
Signed-off-by: Vanshika Shukla <vanshika.shukla@nxp.com>
---
drivers/bus/dpaa/base/qbman/process.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/bus/dpaa/base/qbman/process.c b/drivers/bus/dpaa/base/qbman/process.c
index 3504ec97db..3e4622f606 100644
--- a/drivers/bus/dpaa/base/qbman/process.c
+++ b/drivers/bus/dpaa/base/qbman/process.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
*
* Copyright 2011-2016 Freescale Semiconductor Inc.
- * Copyright 2017,2020 NXP
+ * Copyright 2017,2020,2022,2024 NXP
*
*/
#include <assert.h>
@@ -27,15 +27,16 @@ static int check_fd(void)
{
int ret;
- if (fd >= 0)
- return 0;
ret = pthread_mutex_lock(&fd_init_lock);
assert(!ret);
+
/* check again with the lock held */
if (fd < 0)
fd = open(PROCESS_PATH, O_RDWR);
+
ret = pthread_mutex_unlock(&fd_init_lock);
assert(!ret);
+
return (fd >= 0) ? 0 : -ENODEV;
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:36.635580126 +0100
+++ 0039-bus-dpaa-remove-redundant-file-descriptor-check.patch 2024-07-15 16:19:34.532205695 +0100
@@ -1 +1 @@
-From 0ca2093f6b3608467bebe9caf27ce98671fb3381 Mon Sep 17 00:00:00 2001
+From b7594f8f156098c3e00f7f005f44758f770542f2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0ca2093f6b3608467bebe9caf27ce98671fb3381 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 59e0d641ce..2d805c5bd9 100644
+index 3504ec97db..3e4622f606 100644
@@ -31 +32 @@
-@@ -28,15 +28,16 @@ static int check_fd(void)
+@@ -27,15 +27,16 @@ static int check_fd(void)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/dpaa: forbid MTU configuration for shared interface' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (37 preceding siblings ...)
2024-07-15 15:26 ` patch 'bus/dpaa: remove redundant file descriptor check' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/mlx5: fix start without duplicate flow patterns' " luca.boccassi
` (45 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Rohit Raj; +Cc: Vanshika Shukla, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/c1257d39c700b7bf9fe7c73a23e21adf64193ff7
Thanks.
Luca Boccassi
---
From c1257d39c700b7bf9fe7c73a23e21adf64193ff7 Mon Sep 17 00:00:00 2001
From: Rohit Raj <rohit.raj@nxp.com>
Date: Wed, 10 Jul 2024 14:25:33 +0530
Subject: [PATCH] net/dpaa: forbid MTU configuration for shared interface
[ upstream commit ee0fa7552a0af02e2151414aeec2ce4e12a2e806 ]
Since DPDK was able to configure mtu in VSP/Shared interface mode,
it was causing misconfiguration of the hw which further caused crashes.
This patch allows only kernel to config MTU in such cases.
Fixes: e4abd4ff183c ("net/dpaa: support virtual storage profile")
Signed-off-by: Rohit Raj <rohit.raj@nxp.com>
Signed-off-by: Vanshika Shukla <vanshika.shukla@nxp.com>
---
drivers/net/dpaa/dpaa_ethdev.c | 33 +++++++++++++++++++++++++++++++--
1 file changed, 31 insertions(+), 2 deletions(-)
diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index 779bdc5860..bcb28f33ee 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -14,6 +14,7 @@
#include <pthread.h>
#include <sys/types.h>
#include <sys/syscall.h>
+#include <sys/ioctl.h>
#include <rte_string_fns.h>
#include <rte_byteorder.h>
@@ -165,9 +166,15 @@ dpaa_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
uint32_t frame_size = mtu + RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN
+ VLAN_TAG_SIZE;
uint32_t buffsz = dev->data->min_rx_buf_size - RTE_PKTMBUF_HEADROOM;
+ struct fman_if *fif = dev->process_private;
PMD_INIT_FUNC_TRACE();
+ if (fif->is_shared_mac) {
+ DPAA_PMD_ERR("Cannot configure mtu from DPDK in VSP mode.");
+ return -ENOTSUP;
+ }
+
/*
* Refuse mtu that requires the support of scattered packets
* when this feature has not been enabled before.
@@ -206,7 +213,8 @@ dpaa_eth_dev_configure(struct rte_eth_dev *dev)
struct rte_intr_handle *intr_handle;
uint32_t max_rx_pktlen;
int speed, duplex;
- int ret, rx_status;
+ int ret, rx_status, socket_fd;
+ struct ifreq ifr;
PMD_INIT_FUNC_TRACE();
@@ -222,6 +230,26 @@ dpaa_eth_dev_configure(struct rte_eth_dev *dev)
dpaa_intf->name);
return -EHOSTDOWN;
}
+
+ socket_fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP);
+ if (socket_fd == -1) {
+ DPAA_PMD_ERR("Cannot open IF socket");
+ return -errno;
+ }
+
+ strncpy(ifr.ifr_name, dpaa_intf->name, IFNAMSIZ - 1);
+
+ if (ioctl(socket_fd, SIOCGIFMTU, &ifr) < 0) {
+ DPAA_PMD_ERR("Cannot get interface mtu");
+ close(socket_fd);
+ return -errno;
+ }
+
+ close(socket_fd);
+ DPAA_PMD_INFO("Using kernel configured mtu size(%u)",
+ ifr.ifr_mtu);
+
+ eth_conf->rxmode.mtu = ifr.ifr_mtu;
}
/* Rx offloads which are enabled by default */
@@ -249,7 +277,8 @@ dpaa_eth_dev_configure(struct rte_eth_dev *dev)
max_rx_pktlen = DPAA_MAX_RX_PKT_LEN;
}
- fman_if_set_maxfrm(dev->process_private, max_rx_pktlen);
+ if (!fif->is_shared_mac)
+ fman_if_set_maxfrm(dev->process_private, max_rx_pktlen);
if (rx_offloads & RTE_ETH_RX_OFFLOAD_SCATTER) {
DPAA_PMD_DEBUG("enabling scatter mode");
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:36.683813201 +0100
+++ 0040-net-dpaa-forbid-MTU-configuration-for-shared-interfa.patch 2024-07-15 16:19:34.536205780 +0100
@@ -1 +1 @@
-From ee0fa7552a0af02e2151414aeec2ce4e12a2e806 Mon Sep 17 00:00:00 2001
+From c1257d39c700b7bf9fe7c73a23e21adf64193ff7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ee0fa7552a0af02e2151414aeec2ce4e12a2e806 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 44bac67803..060b8c678f 100644
+index 779bdc5860..bcb28f33ee 100644
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/mlx5: fix start without duplicate flow patterns' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (38 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/dpaa: forbid MTU configuration for shared interface' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'fbarray: fix finding for unaligned length' " luca.boccassi
` (44 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Rongwei Liu; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/3a0b6d25c07b19625ef6d6821ff4f1cd34bf81ef
Thanks.
Luca Boccassi
---
From 3a0b6d25c07b19625ef6d6821ff4f1cd34bf81ef Mon Sep 17 00:00:00 2001
From: Rongwei Liu <rongweil@nvidia.com>
Date: Thu, 13 Jun 2024 15:45:28 +0300
Subject: [PATCH] net/mlx5: fix start without duplicate flow patterns
[ upstream commit 13b5713a627d313d4717923df4c37158b1cb4019 ]
When devargs "allow_duplicate_pattern=0" is specified, PMD won't
allow duplicated flows to be inserted and return EEXIST as rte_errno.
The queue/RSS split table is shared globally by all representors and
PMD didn't prepend port information into it, so all the following ports
tries to insert the same flows and cause PMD insertion failure.
Using the hash list to manage it can solve the issue.
Fixes: ddb68e47331e ("net/mlx5: add extended metadata mode for HWS")
Signed-off-by: Rongwei Liu <rongweil@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/linux/mlx5_os.c | 106 +++++++++++++++++--------------
drivers/net/mlx5/mlx5.c | 2 -
drivers/net/mlx5/mlx5.h | 4 +-
drivers/net/mlx5/mlx5_flow.c | 16 ++---
4 files changed, 67 insertions(+), 61 deletions(-)
diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index 8477e83917..bdb2f6fb59 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -455,15 +455,16 @@ __mlx5_discovery_misc5_cap(struct mlx5_priv *priv)
* Routine checks the reference counter and does actual
* resources creation/initialization only if counter is zero.
*
- * @param[in] priv
- * Pointer to the private device data structure.
+ * @param[in] eth_dev
+ * Pointer to the device.
*
* @return
* Zero on success, positive error code otherwise.
*/
static int
-mlx5_alloc_shared_dr(struct mlx5_priv *priv)
+mlx5_alloc_shared_dr(struct rte_eth_dev *eth_dev)
{
+ struct mlx5_priv *priv = eth_dev->data->dev_private;
struct mlx5_dev_ctx_shared *sh = priv->sh;
char s[MLX5_NAME_SIZE] __rte_unused;
int err;
@@ -575,6 +576,44 @@ mlx5_alloc_shared_dr(struct mlx5_priv *priv)
err = errno;
goto error;
}
+
+ if (sh->config.dv_flow_en == 1) {
+ /* Query availability of metadata reg_c's. */
+ if (!priv->sh->metadata_regc_check_flag) {
+ err = mlx5_flow_discover_mreg_c(eth_dev);
+ if (err < 0) {
+ err = -err;
+ goto error;
+ }
+ }
+ if (!mlx5_flow_ext_mreg_supported(eth_dev)) {
+ DRV_LOG(DEBUG,
+ "port %u extensive metadata register is not supported",
+ eth_dev->data->port_id);
+ if (sh->config.dv_xmeta_en != MLX5_XMETA_MODE_LEGACY) {
+ DRV_LOG(ERR, "metadata mode %u is not supported "
+ "(no metadata registers available)",
+ sh->config.dv_xmeta_en);
+ err = ENOTSUP;
+ goto error;
+ }
+ }
+ if (sh->config.dv_xmeta_en != MLX5_XMETA_MODE_LEGACY &&
+ mlx5_flow_ext_mreg_supported(eth_dev) && sh->dv_regc0_mask) {
+ sh->mreg_cp_tbl = mlx5_hlist_create(MLX5_FLOW_MREG_HNAME,
+ MLX5_FLOW_MREG_HTABLE_SZ,
+ false, true, eth_dev,
+ flow_dv_mreg_create_cb,
+ flow_dv_mreg_match_cb,
+ flow_dv_mreg_remove_cb,
+ flow_dv_mreg_clone_cb,
+ flow_dv_mreg_clone_free_cb);
+ if (!sh->mreg_cp_tbl) {
+ err = ENOMEM;
+ goto error;
+ }
+ }
+ }
#endif
if (!sh->tunnel_hub && sh->config.dv_miss_info)
err = mlx5_alloc_tunnel_hub(sh);
@@ -659,6 +698,10 @@ error:
mlx5_list_destroy(sh->dest_array_list);
sh->dest_array_list = NULL;
}
+ if (sh->mreg_cp_tbl) {
+ mlx5_hlist_destroy(sh->mreg_cp_tbl);
+ sh->mreg_cp_tbl = NULL;
+ }
return err;
}
@@ -751,6 +794,10 @@ mlx5_os_free_shared_dr(struct mlx5_priv *priv)
mlx5_list_destroy(sh->dest_array_list);
sh->dest_array_list = NULL;
}
+ if (sh->mreg_cp_tbl) {
+ mlx5_hlist_destroy(sh->mreg_cp_tbl);
+ sh->mreg_cp_tbl = NULL;
+ }
}
/**
@@ -1508,13 +1555,6 @@ err_secondary:
}
/* Create context for virtual machine VLAN workaround. */
priv->vmwa_context = mlx5_vlan_vmwa_init(eth_dev, spawn->ifindex);
- if (sh->config.dv_flow_en) {
- err = mlx5_alloc_shared_dr(priv);
- if (err)
- goto error;
- if (mlx5_flex_item_port_init(eth_dev) < 0)
- goto error;
- }
if (mlx5_devx_obj_ops_en(sh)) {
priv->obj_ops = devx_obj_ops;
mlx5_queue_counter_id_prepare(eth_dev);
@@ -1565,6 +1605,13 @@ err_secondary:
goto error;
}
rte_rwlock_init(&priv->ind_tbls_lock);
+ if (sh->config.dv_flow_en) {
+ err = mlx5_alloc_shared_dr(eth_dev);
+ if (err)
+ goto error;
+ if (mlx5_flex_item_port_init(eth_dev) < 0)
+ goto error;
+ }
if (priv->sh->config.dv_flow_en == 2) {
#ifdef HAVE_MLX5_HWS_SUPPORT
if (priv->sh->config.dv_esw_en) {
@@ -1648,43 +1695,6 @@ err_secondary:
err = -err;
goto error;
}
- /* Query availability of metadata reg_c's. */
- if (!priv->sh->metadata_regc_check_flag) {
- err = mlx5_flow_discover_mreg_c(eth_dev);
- if (err < 0) {
- err = -err;
- goto error;
- }
- }
- if (!mlx5_flow_ext_mreg_supported(eth_dev)) {
- DRV_LOG(DEBUG,
- "port %u extensive metadata register is not supported",
- eth_dev->data->port_id);
- if (sh->config.dv_xmeta_en != MLX5_XMETA_MODE_LEGACY) {
- DRV_LOG(ERR, "metadata mode %u is not supported "
- "(no metadata registers available)",
- sh->config.dv_xmeta_en);
- err = ENOTSUP;
- goto error;
- }
- }
- if (sh->config.dv_flow_en &&
- sh->config.dv_xmeta_en != MLX5_XMETA_MODE_LEGACY &&
- mlx5_flow_ext_mreg_supported(eth_dev) &&
- priv->sh->dv_regc0_mask) {
- priv->mreg_cp_tbl = mlx5_hlist_create(MLX5_FLOW_MREG_HNAME,
- MLX5_FLOW_MREG_HTABLE_SZ,
- false, true, eth_dev,
- flow_dv_mreg_create_cb,
- flow_dv_mreg_match_cb,
- flow_dv_mreg_remove_cb,
- flow_dv_mreg_clone_cb,
- flow_dv_mreg_clone_free_cb);
- if (!priv->mreg_cp_tbl) {
- err = ENOMEM;
- goto error;
- }
- }
rte_spinlock_init(&priv->shared_act_sl);
mlx5_flow_counter_mode_config(eth_dev);
mlx5_flow_drop_action_config(eth_dev);
@@ -1703,8 +1713,6 @@ error:
priv->sh->config.dv_esw_en)
flow_hw_destroy_vport_action(eth_dev);
#endif
- if (priv->mreg_cp_tbl)
- mlx5_hlist_destroy(priv->mreg_cp_tbl);
if (priv->sh)
mlx5_os_free_shared_dr(priv);
if (priv->nl_socket_route >= 0)
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 96e732950d..d66254740b 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -2090,8 +2090,6 @@ mlx5_dev_close(struct rte_eth_dev *dev)
mlx5_devx_cmd_destroy(priv->q_counters);
priv->q_counters = NULL;
}
- if (priv->mreg_cp_tbl)
- mlx5_hlist_destroy(priv->mreg_cp_tbl);
mlx5_mprq_free_mp(dev);
mlx5_os_free_shared_dr(priv);
#ifdef HAVE_MLX5_HWS_SUPPORT
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index ca0e9ee647..80dcaf96a3 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -1412,6 +1412,8 @@ struct mlx5_dev_ctx_shared {
struct mlx5_hlist *flow_tbls; /* SWS flow table. */
struct mlx5_hlist *groups; /* HWS flow group. */
};
+ struct mlx5_hlist *mreg_cp_tbl;
+ /* Hash table of Rx metadata register copy table. */
struct mlx5_flow_tunnel_hub *tunnel_hub;
/* Direct Rules tables for FDB, NIC TX+RX */
void *dr_drop_action; /* Pointer to DR drop action, any domain. */
@@ -1771,8 +1773,6 @@ struct mlx5_priv {
int nl_socket_rdma; /* Netlink socket (NETLINK_RDMA). */
int nl_socket_route; /* Netlink socket (NETLINK_ROUTE). */
struct mlx5_nl_vlan_vmwa_context *vmwa_context; /* VLAN WA context. */
- struct mlx5_hlist *mreg_cp_tbl;
- /* Hash table of Rx metadata register copy table. */
struct mlx5_mtr_config mtr_config; /* Meter configuration */
uint8_t mtr_sfx_reg; /* Meter prefix-suffix flow match REG_C. */
uint8_t mtr_color_reg; /* Meter color match REG_C. */
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 1e8d9ac978..a44ccea436 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -4871,8 +4871,8 @@ flow_mreg_add_copy_action(struct rte_eth_dev *dev, uint32_t mark_id,
};
/* Check if already registered. */
- MLX5_ASSERT(priv->mreg_cp_tbl);
- entry = mlx5_hlist_register(priv->mreg_cp_tbl, mark_id, &ctx);
+ MLX5_ASSERT(priv->sh->mreg_cp_tbl);
+ entry = mlx5_hlist_register(priv->sh->mreg_cp_tbl, mark_id, &ctx);
if (!entry)
return NULL;
return container_of(entry, struct mlx5_flow_mreg_copy_resource,
@@ -4911,10 +4911,10 @@ flow_mreg_del_copy_action(struct rte_eth_dev *dev,
return;
mcp_res = mlx5_ipool_get(priv->sh->ipool[MLX5_IPOOL_MCP],
flow->rix_mreg_copy);
- if (!mcp_res || !priv->mreg_cp_tbl)
+ if (!mcp_res || !priv->sh->mreg_cp_tbl)
return;
MLX5_ASSERT(mcp_res->rix_flow);
- mlx5_hlist_unregister(priv->mreg_cp_tbl, &mcp_res->hlist_ent);
+ mlx5_hlist_unregister(priv->sh->mreg_cp_tbl, &mcp_res->hlist_ent);
flow->rix_mreg_copy = 0;
}
@@ -4936,14 +4936,14 @@ flow_mreg_del_default_copy_action(struct rte_eth_dev *dev)
uint32_t mark_id;
/* Check if default flow is registered. */
- if (!priv->mreg_cp_tbl)
+ if (!priv->sh->mreg_cp_tbl)
return;
mark_id = MLX5_DEFAULT_COPY_ID;
ctx.data = &mark_id;
- entry = mlx5_hlist_lookup(priv->mreg_cp_tbl, mark_id, &ctx);
+ entry = mlx5_hlist_lookup(priv->sh->mreg_cp_tbl, mark_id, &ctx);
if (!entry)
return;
- mlx5_hlist_unregister(priv->mreg_cp_tbl, entry);
+ mlx5_hlist_unregister(priv->sh->mreg_cp_tbl, entry);
}
/**
@@ -4981,7 +4981,7 @@ flow_mreg_add_default_copy_action(struct rte_eth_dev *dev,
*/
mark_id = MLX5_DEFAULT_COPY_ID;
ctx.data = &mark_id;
- if (mlx5_hlist_lookup(priv->mreg_cp_tbl, mark_id, &ctx))
+ if (mlx5_hlist_lookup(priv->sh->mreg_cp_tbl, mark_id, &ctx))
return 0;
mcp_res = flow_mreg_add_copy_action(dev, mark_id, error);
if (!mcp_res)
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:36.730951647 +0100
+++ 0041-net-mlx5-fix-start-without-duplicate-flow-patterns.patch 2024-07-15 16:19:34.556206207 +0100
@@ -1 +1 @@
-From 13b5713a627d313d4717923df4c37158b1cb4019 Mon Sep 17 00:00:00 2001
+From 3a0b6d25c07b19625ef6d6821ff4f1cd34bf81ef Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 13b5713a627d313d4717923df4c37158b1cb4019 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 1753acd050..50f4810bff 100644
+index 8477e83917..bdb2f6fb59 100644
@@ -31 +32 @@
-@@ -467,15 +467,16 @@ __mlx5_discovery_misc5_cap(struct mlx5_priv *priv)
+@@ -455,15 +455,16 @@ __mlx5_discovery_misc5_cap(struct mlx5_priv *priv)
@@ -51 +52 @@
-@@ -590,6 +591,44 @@ mlx5_alloc_shared_dr(struct mlx5_priv *priv)
+@@ -575,6 +576,44 @@ mlx5_alloc_shared_dr(struct mlx5_priv *priv)
@@ -96 +97 @@
-@@ -674,6 +713,10 @@ error:
+@@ -659,6 +698,10 @@ error:
@@ -107 +108 @@
-@@ -771,6 +814,10 @@ mlx5_os_free_shared_dr(struct mlx5_priv *priv)
+@@ -751,6 +794,10 @@ mlx5_os_free_shared_dr(struct mlx5_priv *priv)
@@ -118 +119 @@
-@@ -1572,13 +1619,6 @@ err_secondary:
+@@ -1508,13 +1555,6 @@ err_secondary:
@@ -132 +133 @@
-@@ -1629,6 +1669,13 @@ err_secondary:
+@@ -1565,6 +1605,13 @@ err_secondary:
@@ -143,4 +144,4 @@
- if (sh->phdev->config.ipv6_tc_fallback == MLX5_IPV6_TC_UNKNOWN) {
- sh->phdev->config.ipv6_tc_fallback = MLX5_IPV6_TC_OK;
- if (!sh->cdev->config.hca_attr.modify_outer_ipv6_traffic_class ||
-@@ -1715,43 +1762,6 @@ err_secondary:
+ if (priv->sh->config.dv_flow_en == 2) {
+ #ifdef HAVE_MLX5_HWS_SUPPORT
+ if (priv->sh->config.dv_esw_en) {
+@@ -1648,43 +1695,6 @@ err_secondary:
@@ -190 +191 @@
-@@ -1770,8 +1780,6 @@ error:
+@@ -1703,8 +1713,6 @@ error:
@@ -200 +201 @@
-index 997b02c571..e482f7f0e5 100644
+index 96e732950d..d66254740b 100644
@@ -203 +204 @@
-@@ -2394,8 +2394,6 @@ mlx5_dev_close(struct rte_eth_dev *dev)
+@@ -2090,8 +2090,6 @@ mlx5_dev_close(struct rte_eth_dev *dev)
@@ -213 +214 @@
-index c9a3837bd2..bd149b43e5 100644
+index ca0e9ee647..80dcaf96a3 100644
@@ -216 +217 @@
-@@ -1542,6 +1542,8 @@ struct mlx5_dev_ctx_shared {
+@@ -1412,6 +1412,8 @@ struct mlx5_dev_ctx_shared {
@@ -225 +226 @@
-@@ -1968,8 +1970,6 @@ struct mlx5_priv {
+@@ -1771,8 +1773,6 @@ struct mlx5_priv {
@@ -233 +234 @@
- struct mlx5_legacy_flow_meters flow_meters; /* MTR list. */
+ uint8_t mtr_color_reg; /* Meter color match REG_C. */
@@ -235 +236 @@
-index daf0e41c6f..833db1f320 100644
+index 1e8d9ac978..a44ccea436 100644
@@ -238 +239 @@
-@@ -5201,8 +5201,8 @@ flow_mreg_add_copy_action(struct rte_eth_dev *dev, uint32_t mark_id,
+@@ -4871,8 +4871,8 @@ flow_mreg_add_copy_action(struct rte_eth_dev *dev, uint32_t mark_id,
@@ -249 +250 @@
-@@ -5241,10 +5241,10 @@ flow_mreg_del_copy_action(struct rte_eth_dev *dev,
+@@ -4911,10 +4911,10 @@ flow_mreg_del_copy_action(struct rte_eth_dev *dev,
@@ -262 +263 @@
-@@ -5266,14 +5266,14 @@ flow_mreg_del_default_copy_action(struct rte_eth_dev *dev)
+@@ -4936,14 +4936,14 @@ flow_mreg_del_default_copy_action(struct rte_eth_dev *dev)
@@ -280 +281 @@
-@@ -5311,7 +5311,7 @@ flow_mreg_add_default_copy_action(struct rte_eth_dev *dev,
+@@ -4981,7 +4981,7 @@ flow_mreg_add_default_copy_action(struct rte_eth_dev *dev,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'fbarray: fix finding for unaligned length' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (39 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/mlx5: fix start without duplicate flow patterns' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'buildtools: fix build with clang 17 and ASan' " luca.boccassi
` (43 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Anatoly Burakov; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/73a8315608a79ab9b721d5155e407cb4f6a0499a
Thanks.
Luca Boccassi
---
From 73a8315608a79ab9b721d5155e407cb4f6a0499a Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Wed, 10 Jul 2024 12:49:26 +0100
Subject: [PATCH] fbarray: fix finding for unaligned length
[ upstream commit a744665d2149ba8707621c1214c798f807ec398e ]
When array length is not aligned on a power of 2, we need to mask out the
unaligned bits from the mask whenever we reach the last mask.
However, when both ignore mask (e.g. due to starting at unaligned bit) and
last index ignore mask are specified, we combine them with an OR,
which is incorrect.
Fix it to combine them with AND instead,
and add a unit test covering this case.
The reverse function does not suffer from this issue
because it does not have to deal with array end,
and array beginning is always aligned.
Fixes: c44d09811b40 ("eal: add shared indexed file-backed array")
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
app/test/test_fbarray.c | 123 +++++++++++++++++++++-------
lib/eal/common/eal_common_fbarray.c | 2 +-
2 files changed, 94 insertions(+), 31 deletions(-)
diff --git a/app/test/test_fbarray.c b/app/test/test_fbarray.c
index 3be9e19e78..8a3a3d77ab 100644
--- a/app/test/test_fbarray.c
+++ b/app/test/test_fbarray.c
@@ -21,23 +21,41 @@ struct fbarray_testsuite_params {
};
static struct fbarray_testsuite_params param;
+static struct fbarray_testsuite_params unaligned;
#define FBARRAY_TEST_ARR_NAME "fbarray_autotest"
#define FBARRAY_TEST_LEN 256
+#define FBARRAY_UNALIGNED_TEST_ARR_NAME "fbarray_unaligned_autotest"
+#define FBARRAY_UNALIGNED_TEST_LEN 60
#define FBARRAY_TEST_ELT_SZ (sizeof(int))
static int autotest_setup(void)
{
- return rte_fbarray_init(¶m.arr, FBARRAY_TEST_ARR_NAME,
+ int ret;
+
+ ret = rte_fbarray_init(¶m.arr, FBARRAY_TEST_ARR_NAME,
FBARRAY_TEST_LEN, FBARRAY_TEST_ELT_SZ);
+ if (ret) {
+ printf("Failed to initialize test array\n");
+ return -1;
+ }
+ ret = rte_fbarray_init(&unaligned.arr, FBARRAY_UNALIGNED_TEST_ARR_NAME,
+ FBARRAY_UNALIGNED_TEST_LEN, FBARRAY_TEST_ELT_SZ);
+ if (ret) {
+ printf("Failed to initialize unaligned test array\n");
+ rte_fbarray_destroy(¶m.arr);
+ return -1;
+ }
+ return 0;
}
static void autotest_teardown(void)
{
rte_fbarray_destroy(¶m.arr);
+ rte_fbarray_destroy(&unaligned.arr);
}
-static int init_array(void)
+static int init_aligned(void)
{
int i;
for (i = param.start; i <= param.end; i++) {
@@ -47,11 +65,35 @@ static int init_array(void)
return 0;
}
-static void reset_array(void)
+static int init_unaligned(void)
+{
+ int i;
+ for (i = unaligned.start; i <= unaligned.end; i++) {
+ if (rte_fbarray_set_used(&unaligned.arr, i))
+ return -1;
+ }
+ return 0;
+}
+
+static void reset_aligned(void)
{
int i;
for (i = 0; i < FBARRAY_TEST_LEN; i++)
rte_fbarray_set_free(¶m.arr, i);
+ /* reset param as well */
+ param.start = -1;
+ param.end = -1;
+}
+
+static void reset_unaligned(void)
+{
+ int i;
+ for (i = 0; i < FBARRAY_UNALIGNED_TEST_LEN; i++)
+ rte_fbarray_set_free(&unaligned.arr, i);
+ /* reset param as well */
+ unaligned.start = -1;
+ unaligned.end = -1;
+
}
static int first_msk_test_setup(void)
@@ -59,7 +101,7 @@ static int first_msk_test_setup(void)
/* put all within first mask */
param.start = 3;
param.end = 10;
- return init_array();
+ return init_aligned();
}
static int cross_msk_test_setup(void)
@@ -67,7 +109,7 @@ static int cross_msk_test_setup(void)
/* put all within second and third mask */
param.start = 70;
param.end = 160;
- return init_array();
+ return init_aligned();
}
static int multi_msk_test_setup(void)
@@ -75,7 +117,7 @@ static int multi_msk_test_setup(void)
/* put all within first and last mask */
param.start = 3;
param.end = FBARRAY_TEST_LEN - 20;
- return init_array();
+ return init_aligned();
}
static int last_msk_test_setup(void)
@@ -83,7 +125,7 @@ static int last_msk_test_setup(void)
/* put all within last mask */
param.start = FBARRAY_TEST_LEN - 20;
param.end = FBARRAY_TEST_LEN - 1;
- return init_array();
+ return init_aligned();
}
static int full_msk_test_setup(void)
@@ -91,16 +133,7 @@ static int full_msk_test_setup(void)
/* fill entire mask */
param.start = 0;
param.end = FBARRAY_TEST_LEN - 1;
- return init_array();
-}
-
-static int empty_msk_test_setup(void)
-{
- /* do not fill anything in */
- reset_array();
- param.start = -1;
- param.end = -1;
- return 0;
+ return init_aligned();
}
static int lookahead_test_setup(void)
@@ -108,7 +141,7 @@ static int lookahead_test_setup(void)
/* set index 64 as used */
param.start = 64;
param.end = 64;
- return init_array();
+ return init_aligned();
}
static int lookbehind_test_setup(void)
@@ -116,7 +149,15 @@ static int lookbehind_test_setup(void)
/* set index 63 as used */
param.start = 63;
param.end = 63;
- return init_array();
+ return init_aligned();
+}
+
+static int unaligned_test_setup(void)
+{
+ unaligned.start = 0;
+ /* leave one free bit at the end */
+ unaligned.end = FBARRAY_UNALIGNED_TEST_LEN - 2;
+ return init_unaligned();
}
static int test_invalid(void)
@@ -470,7 +511,7 @@ static int test_basic(void)
if (check_free())
return TEST_FAILED;
- reset_array();
+ reset_aligned();
return TEST_SUCCESS;
}
@@ -713,6 +754,26 @@ static int test_find(void)
return TEST_SUCCESS;
}
+static int test_find_unaligned(void)
+{
+ TEST_ASSERT_EQUAL((int)unaligned.arr.count, unaligned.end - unaligned.start + 1,
+ "Wrong element count\n");
+ /* ensure space is free before start */
+ if (ensure_correct(&unaligned.arr, 0, unaligned.start - 1, false))
+ return TEST_FAILED;
+ /* ensure space is occupied where it's supposed to be */
+ if (ensure_correct(&unaligned.arr, unaligned.start, unaligned.end, true))
+ return TEST_FAILED;
+ /* ensure space after end is free as well */
+ if (ensure_correct(&unaligned.arr, unaligned.end + 1, FBARRAY_UNALIGNED_TEST_LEN - 1,
+ false))
+ return TEST_FAILED;
+ /* test if find_biggest API's work correctly */
+ if (test_biggest(&unaligned.arr, unaligned.start, unaligned.end))
+ return TEST_FAILED;
+ return TEST_SUCCESS;
+}
+
static int test_empty(void)
{
TEST_ASSERT_EQUAL((int)param.arr.count, 0, "Wrong element count\n");
@@ -814,17 +875,19 @@ static struct unit_test_suite fbarray_test_suite = {
.unit_test_cases = {
TEST_CASE(test_invalid),
TEST_CASE(test_basic),
- TEST_CASE_ST(first_msk_test_setup, reset_array, test_find),
- TEST_CASE_ST(cross_msk_test_setup, reset_array, test_find),
- TEST_CASE_ST(multi_msk_test_setup, reset_array, test_find),
- TEST_CASE_ST(last_msk_test_setup, reset_array, test_find),
- TEST_CASE_ST(full_msk_test_setup, reset_array, test_find),
- TEST_CASE_ST(empty_msk_test_setup, reset_array, test_empty),
- TEST_CASE_ST(lookahead_test_setup, reset_array, test_lookahead),
- TEST_CASE_ST(lookbehind_test_setup, reset_array, test_lookbehind),
+ TEST_CASE_ST(first_msk_test_setup, reset_aligned, test_find),
+ TEST_CASE_ST(cross_msk_test_setup, reset_aligned, test_find),
+ TEST_CASE_ST(multi_msk_test_setup, reset_aligned, test_find),
+ TEST_CASE_ST(last_msk_test_setup, reset_aligned, test_find),
+ TEST_CASE_ST(full_msk_test_setup, reset_aligned, test_find),
+ /* empty test does not need setup */
+ TEST_CASE_ST(NULL, reset_aligned, test_empty),
+ TEST_CASE_ST(lookahead_test_setup, reset_aligned, test_lookahead),
+ TEST_CASE_ST(lookbehind_test_setup, reset_aligned, test_lookbehind),
/* setup for these tests is more complex so do it in test func */
- TEST_CASE_ST(NULL, reset_array, test_lookahead_mask),
- TEST_CASE_ST(NULL, reset_array, test_lookbehind_mask),
+ TEST_CASE_ST(NULL, reset_aligned, test_lookahead_mask),
+ TEST_CASE_ST(NULL, reset_aligned, test_lookbehind_mask),
+ TEST_CASE_ST(unaligned_test_setup, reset_unaligned, test_find_unaligned),
TEST_CASES_END()
}
};
diff --git a/lib/eal/common/eal_common_fbarray.c b/lib/eal/common/eal_common_fbarray.c
index 34f51d8530..4b3b3904c7 100644
--- a/lib/eal/common/eal_common_fbarray.c
+++ b/lib/eal/common/eal_common_fbarray.c
@@ -173,7 +173,7 @@ find_next_n(const struct rte_fbarray *arr, unsigned int start, unsigned int n,
/* combine current ignore mask with last index ignore mask */
if (msk_idx == last)
- ignore_msk |= last_msk;
+ ignore_msk &= last_msk;
/* if we have an ignore mask, ignore once */
if (ignore_msk) {
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:36.791681237 +0100
+++ 0042-fbarray-fix-finding-for-unaligned-length.patch 2024-07-15 16:19:34.564206378 +0100
@@ -1 +1 @@
-From a744665d2149ba8707621c1214c798f807ec398e Mon Sep 17 00:00:00 2001
+From 73a8315608a79ab9b721d5155e407cb4f6a0499a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a744665d2149ba8707621c1214c798f807ec398e ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 13c6691e50..09f6907fb1 100644
+index 3be9e19e78..8a3a3d77ab 100644
@@ -259 +260 @@
-index 63d8b731f5..22b43073c6 100644
+index 34f51d8530..4b3b3904c7 100644
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'buildtools: fix build with clang 17 and ASan' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (40 preceding siblings ...)
2024-07-15 15:26 ` patch 'fbarray: fix finding for unaligned length' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/ice/base: fix pointer to variable outside scope' " luca.boccassi
` (42 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: David Marchand; +Cc: Ali Alnubani, Song Jiale, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f7dcc5e44f9a545a5e3edfaa15a2e03516dd25f1
Thanks.
Luca Boccassi
---
From f7dcc5e44f9a545a5e3edfaa15a2e03516dd25f1 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 11 Jul 2024 11:35:36 +0200
Subject: [PATCH] buildtools: fix build with clang 17 and ASan
[ upstream commit e1d8a879abac499a66801bb8238d59ba52f4fc6b ]
ASan included in clang 17 and later suffixes symbols.
$ nm build/drivers/libtmp_rte_net_null.a | grep this_pmd
0000000000000000 r this_pmd_name3
0000000000000000 n this_pmd_name3.f2cd16678ab09dba8fd23405d8d11fce
This breaks the detection of driver symbols in pmdinfogen which then
creates duplicate symbols "_pmd_info" in many drivers. Such duplicate
symbols trigger a link error.
$ grep -w _pmd_info build/drivers/rte_net_*.pmd.c
build/drivers/rte_net_af_packet.pmd.c:const char _pmd_info[]
__attribute__((used)) =
"PMD_INFO_STRING= {\"name\": \"\", \"pci_ids\": []}";
build/drivers/rte_net_null.pmd.c:const char _pmd_info[]
__attribute__((used)) =
"PMD_INFO_STRING= {\"name\": \"\", \"pci_ids\": []}";
A simple reproducer:
$ CC=clang meson setup build -Denable_apps=test-pmd -Ddisable_libs=* \
-Denable_drivers=net/null,net/af_packet -Dtests=false \
-Db_lundef=false -Db_sanitize=address
$ ninja -C build
Before this patch, the pmdinfogen script was relying on a symbol name
starting with this_pmd_name.
On the other hand, what this script needs is symbols whose names are
this_pmd_name ## __COUNTER__, see below an example for PCI driver
symbols (the same applies to other buses).
$ git grep -w RTE_PMD_EXPORT_NAME drivers/bus/pci/bus_pci_driver.h
drivers/bus/pci/bus_pci_driver.h:RTE_PMD_EXPORT_NAME(nm, __COUNTER__)
$ git grep -B1 this_pmd_name lib/eal/
lib/eal/include/rte_dev.h-#define RTE_PMD_EXPORT_NAME(name, idx) \
lib/eal/include/rte_dev.h:static const char
RTE_PMD_EXPORT_NAME_ARRAY(this_pmd_name, idx) \
$ git grep define.RTE_PMD_EXPORT_NAME_ARRAY lib/eal/include/rte_dev.h
lib/eal/include/rte_dev.h:#define
RTE_PMD_EXPORT_NAME_ARRAY(n, idx) n##idx[]
Adjust the symbol filter for both ELF and COFF implementations.
Bugzilla ID: 1466
Reported-by: Ali Alnubani <alialnu@nvidia.com>
Reported-by: Song Jiale <songx.jiale@intel.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Song Jiale <songx.jiale@intel.com>
---
buildtools/pmdinfogen.py | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/buildtools/pmdinfogen.py b/buildtools/pmdinfogen.py
index 2a44f17bda..dfb89500c0 100755
--- a/buildtools/pmdinfogen.py
+++ b/buildtools/pmdinfogen.py
@@ -6,6 +6,7 @@
import argparse
import ctypes
import json
+import re
import sys
import tempfile
@@ -66,11 +67,11 @@ class ELFImage:
return [symbol]
return None
- def find_by_prefix(self, prefix):
- prefix = prefix.encode("utf-8") if self._legacy_elftools else prefix
+ def find_by_pattern(self, pattern):
+ pattern = pattern.encode("utf-8") if self._legacy_elftools else pattern
for i in range(self._symtab.num_symbols()):
symbol = self._symtab.get_symbol(i)
- if symbol.name.startswith(prefix):
+ if re.match(pattern, symbol.name):
yield ELFSymbol(self._image, symbol)
@@ -97,9 +98,9 @@ class COFFImage:
def is_big_endian(self):
return False
- def find_by_prefix(self, prefix):
+ def find_by_pattern(self, pattern):
for symbol in self._image.symbols:
- if symbol.name.startswith(prefix):
+ if re.match(pattern, symbol.name):
yield COFFSymbol(self._image, symbol)
def find_by_name(self, name):
@@ -199,7 +200,7 @@ class Driver:
def load_drivers(image):
drivers = []
- for symbol in image.find_by_prefix("this_pmd_name"):
+ for symbol in image.find_by_pattern("^this_pmd_name[0-9]+$"):
drivers.append(Driver.load(image, symbol))
return drivers
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:36.833194817 +0100
+++ 0043-buildtools-fix-build-with-clang-17-and-ASan.patch 2024-07-15 16:19:34.564206378 +0100
@@ -1 +1 @@
-From e1d8a879abac499a66801bb8238d59ba52f4fc6b Mon Sep 17 00:00:00 2001
+From f7dcc5e44f9a545a5e3edfaa15a2e03516dd25f1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e1d8a879abac499a66801bb8238d59ba52f4fc6b ]
+
@@ -49 +50,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ice/base: fix pointer to variable outside scope' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (41 preceding siblings ...)
2024-07-15 15:26 ` patch 'buildtools: fix build with clang 17 and ASan' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/ice/base: fix memory leak in firmware version check' " luca.boccassi
` (41 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Stefan Wegrzyn; +Cc: Ian Stokes, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/7f57a7a2ce3ccdc1061b08d0df6a0a1d02784df1
Thanks.
Luca Boccassi
---
From 7f57a7a2ce3ccdc1061b08d0df6a0a1d02784df1 Mon Sep 17 00:00:00 2001
From: Stefan Wegrzyn <stefan.wegrzyn@intel.com>
Date: Tue, 25 Jun 2024 12:12:10 +0100
Subject: [PATCH] net/ice/base: fix pointer to variable outside scope
[ upstream commit 794adf885cbbc949b4a292ce98bc57d77ea77391 ]
Currently, the 'temp' variable is in smaller scope than 'first_teid_ptr'
which can point to it. This means on new loop iterations the memory
goes out of scope and we can end up with a dangling pointer.
Move 'temp' to outside of the loop to fix it.
Fixes: 254f19c8c061 ("net/ice/base: modify recursive way of adding nodes")
Signed-off-by: Stefan Wegrzyn <stefan.wegrzyn@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/ice/base/ice_sched.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c
index b16b27dcbf..d505c8d16c 100644
--- a/drivers/net/ice/base/ice_sched.c
+++ b/drivers/net/ice/base/ice_sched.c
@@ -1057,11 +1057,11 @@ ice_sched_add_nodes_to_layer(struct ice_port_info *pi,
u32 *first_teid_ptr = first_node_teid;
u16 new_num_nodes = num_nodes;
enum ice_status status = ICE_SUCCESS;
+ u32 temp;
*num_nodes_added = 0;
while (*num_nodes_added < num_nodes) {
u16 max_child_nodes, num_added = 0;
- u32 temp;
status = ice_sched_add_nodes_to_hw_layer(pi, tc_node, parent,
layer, new_num_nodes,
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:36.872273522 +0100
+++ 0044-net-ice-base-fix-pointer-to-variable-outside-scope.patch 2024-07-15 16:19:34.572206549 +0100
@@ -1 +1 @@
-From 794adf885cbbc949b4a292ce98bc57d77ea77391 Mon Sep 17 00:00:00 2001
+From 7f57a7a2ce3ccdc1061b08d0df6a0a1d02784df1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 794adf885cbbc949b4a292ce98bc57d77ea77391 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index d694bfd414..c9d70fb043 100644
+index b16b27dcbf..d505c8d16c 100644
@@ -25 +26 @@
-@@ -1069,11 +1069,11 @@ ice_sched_add_nodes_to_layer(struct ice_port_info *pi,
+@@ -1057,11 +1057,11 @@ ice_sched_add_nodes_to_layer(struct ice_port_info *pi,
@@ -28 +29 @@
- int status = 0;
+ enum ice_status status = ICE_SUCCESS;
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ice/base: fix memory leak in firmware version check' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (42 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/ice/base: fix pointer to variable outside scope' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/ice/base: fix sign extension' " luca.boccassi
` (40 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Eric Joyner; +Cc: Ian Stokes, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/64f49919dd07cb0b6d70c32703f0afb61de44139
Thanks.
Luca Boccassi
---
From 64f49919dd07cb0b6d70c32703f0afb61de44139 Mon Sep 17 00:00:00 2001
From: Eric Joyner <eric.joyner@intel.com>
Date: Tue, 25 Jun 2024 12:12:25 +0100
Subject: [PATCH] net/ice/base: fix memory leak in firmware version check
[ upstream commit 6b75956aacc081d56a36ab8f82c530832b288c01 ]
If ice_cfg_phy_fec() goes through case ICE_FEC_DIS_AUTO but the
underlying device firmware isn't the correct version, then the memory
used to hold the PHY capabilities output from the firmware isn't freed.
Fix this by making sure the memory is freed by jumping to the label that
frees the memory instead of returning from the version check
immediately.
Fixes: 4b6ede113f55 ("net/ice/base: support auto FEC with FEC disabled")
Signed-off-by: Eric Joyner <eric.joyner@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/ice/base/ice_common.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c
index a327a4b374..ac67411ebd 100644
--- a/drivers/net/ice/base/ice_common.c
+++ b/drivers/net/ice/base/ice_common.c
@@ -3803,8 +3803,10 @@ ice_cfg_phy_fec(struct ice_port_info *pi, struct ice_aqc_set_phy_cfg_data *cfg,
break;
case ICE_FEC_DIS_AUTO:
/* Set No FEC and auto FEC */
- if (!ice_fw_supports_fec_dis_auto(hw))
- return ICE_ERR_NOT_SUPPORTED;
+ if (!ice_fw_supports_fec_dis_auto(hw)) {
+ status = ICE_ERR_NOT_SUPPORTED;
+ goto out;
+ }
cfg->link_fec_opt |= ICE_AQC_PHY_FEC_DIS;
/* fall-through */
case ICE_FEC_AUTO:
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:36.916273769 +0100
+++ 0045-net-ice-base-fix-memory-leak-in-firmware-version-che.patch 2024-07-15 16:19:34.576206634 +0100
@@ -1 +1 @@
-From 6b75956aacc081d56a36ab8f82c530832b288c01 Mon Sep 17 00:00:00 2001
+From 64f49919dd07cb0b6d70c32703f0afb61de44139 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6b75956aacc081d56a36ab8f82c530832b288c01 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 3d787d2a29..ef6696cddf 100644
+index a327a4b374..ac67411ebd 100644
@@ -28 +29 @@
-@@ -3843,8 +3843,10 @@ ice_cfg_phy_fec(struct ice_port_info *pi, struct ice_aqc_set_phy_cfg_data *cfg,
+@@ -3803,8 +3803,10 @@ ice_cfg_phy_fec(struct ice_port_info *pi, struct ice_aqc_set_phy_cfg_data *cfg,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ice/base: fix sign extension' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (43 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/ice/base: fix memory leak in firmware version check' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/ice/base: fix size when allocating children arrays' " luca.boccassi
` (39 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Jesse Brandeburg; +Cc: Ian Stokes, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/7fdbc3da5bd6a7dac5e933fb70f2864ce108331e
Thanks.
Luca Boccassi
---
From 7fdbc3da5bd6a7dac5e933fb70f2864ce108331e Mon Sep 17 00:00:00 2001
From: Jesse Brandeburg <jesse.brandeburg@intel.com>
Date: Wed, 26 Jun 2024 12:41:03 +0100
Subject: [PATCH] net/ice/base: fix sign extension
[ upstream commit 4fe3f901f86243bf2dc5925e870030995f229888 ]
Fix a static analysis warning where if the 16-bit value in mask has the
high-bit set, it will be sign extended by the shift left (which converts
it to a signed integer). Avoid this by casting to a u32 to make sure the
conversion happens before the shift and that it stays unsigned.
Fixes: 9467486f179f ("net/ice/base: enable masking for RSS and FD field vectors")
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/ice/base/ice_flex_pipe.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ice/base/ice_flex_pipe.c b/drivers/net/ice/base/ice_flex_pipe.c
index b6bc0062a3..e1c5e00c91 100644
--- a/drivers/net/ice/base/ice_flex_pipe.c
+++ b/drivers/net/ice/base/ice_flex_pipe.c
@@ -1534,16 +1534,14 @@ ice_write_prof_mask_reg(struct ice_hw *hw, enum ice_block blk, u16 mask_idx,
switch (blk) {
case ICE_BLK_RSS:
offset = GLQF_HMASK(mask_idx);
- val = (idx << GLQF_HMASK_MSK_INDEX_S) &
- GLQF_HMASK_MSK_INDEX_M;
- val |= (mask << GLQF_HMASK_MASK_S) & GLQF_HMASK_MASK_M;
+ val = (idx << GLQF_HMASK_MSK_INDEX_S) & GLQF_HMASK_MSK_INDEX_M;
+ val |= ((u32)mask << GLQF_HMASK_MASK_S) & GLQF_HMASK_MASK_M;
break;
case ICE_BLK_FD:
offset = GLQF_FDMASK(mask_idx);
val = (idx << GLQF_FDMASK_MSK_INDEX_S) &
GLQF_FDMASK_MSK_INDEX_M;
- val |= (mask << GLQF_FDMASK_MASK_S) &
- GLQF_FDMASK_MASK_M;
+ val |= ((u32)mask << GLQF_FDMASK_MASK_S) & GLQF_FDMASK_MASK_M;
break;
default:
ice_debug(hw, ICE_DBG_PKG, "No profile masks for block %d\n",
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:36.964447872 +0100
+++ 0046-net-ice-base-fix-sign-extension.patch 2024-07-15 16:19:34.580206719 +0100
@@ -1 +1 @@
-From 4fe3f901f86243bf2dc5925e870030995f229888 Mon Sep 17 00:00:00 2001
+From 7fdbc3da5bd6a7dac5e933fb70f2864ce108331e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4fe3f901f86243bf2dc5925e870030995f229888 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index e06dbb0885..413b6f8ece 100644
+index b6bc0062a3..e1c5e00c91 100644
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ice/base: fix size when allocating children arrays' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (44 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/ice/base: fix sign extension' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/ice/base: fix GCS descriptor field offsets' " luca.boccassi
` (38 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Jacob Keller; +Cc: Ian Stokes, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f3701c8b98920a64c3774b5a250ba48512c1fda8
Thanks.
Luca Boccassi
---
From f3701c8b98920a64c3774b5a250ba48512c1fda8 Mon Sep 17 00:00:00 2001
From: Jacob Keller <jacob.e.keller@intel.com>
Date: Wed, 26 Jun 2024 12:41:08 +0100
Subject: [PATCH] net/ice/base: fix size when allocating children arrays
[ upstream commit 3072e5e2da9870d8cb119f15482eae9d9fb51e98 ]
The ice_sched_add_root_node() and ice_sched_add_node() functions have
comments to suppress Coverity warnings about a suspicious sizeof used
when allocating the children array of an struct ice_sched_node.
The size is calculated using the size of the scheduler node, which
overallocates the array by a significant amount.
Fix the code to correctly calculate the size by using *root->children
and *node->children respectively.
This saves some memory and allows us to drop the Coverity suppression
comments.
Fixes: 93e84b1bfc92 ("net/ice/base: add basic Tx scheduler")
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/ice/base/ice_sched.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c
index d505c8d16c..25bf3fca76 100644
--- a/drivers/net/ice/base/ice_sched.c
+++ b/drivers/net/ice/base/ice_sched.c
@@ -28,9 +28,8 @@ ice_sched_add_root_node(struct ice_port_info *pi,
if (!root)
return ICE_ERR_NO_MEMORY;
- /* coverity[suspicious_sizeof] */
root->children = (struct ice_sched_node **)
- ice_calloc(hw, hw->max_children[0], sizeof(*root));
+ ice_calloc(hw, hw->max_children[0], sizeof(*root->children));
if (!root->children) {
ice_free(hw, root);
return ICE_ERR_NO_MEMORY;
@@ -180,9 +179,9 @@ ice_sched_add_node(struct ice_port_info *pi, u8 layer,
if (!node)
return ICE_ERR_NO_MEMORY;
if (hw->max_children[layer]) {
- /* coverity[suspicious_sizeof] */
node->children = (struct ice_sched_node **)
- ice_calloc(hw, hw->max_children[layer], sizeof(*node));
+ ice_calloc(hw, hw->max_children[layer],
+ sizeof(*node->children));
if (!node->children) {
ice_free(hw, node);
return ICE_ERR_NO_MEMORY;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:37.009241692 +0100
+++ 0047-net-ice-base-fix-size-when-allocating-children-array.patch 2024-07-15 16:19:34.588206890 +0100
@@ -1 +1 @@
-From 3072e5e2da9870d8cb119f15482eae9d9fb51e98 Mon Sep 17 00:00:00 2001
+From f3701c8b98920a64c3774b5a250ba48512c1fda8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3072e5e2da9870d8cb119f15482eae9d9fb51e98 ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index c9d70fb043..74d57329da 100644
+index d505c8d16c..25bf3fca76 100644
@@ -44 +45 @@
-@@ -186,9 +185,9 @@ ice_sched_add_node(struct ice_port_info *pi, u8 layer,
+@@ -180,9 +179,9 @@ ice_sched_add_node(struct ice_port_info *pi, u8 layer,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ice/base: fix GCS descriptor field offsets' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (45 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/ice/base: fix size when allocating children arrays' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/ice/base: fix return type of bitmap hamming weight' " luca.boccassi
` (37 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Eric Joyner; +Cc: Ian Stokes, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/92938d56d0f7ea32972107db372ee83cb3037421
Thanks.
Luca Boccassi
---
From 92938d56d0f7ea32972107db372ee83cb3037421 Mon Sep 17 00:00:00 2001
From: Eric Joyner <eric.joyner@intel.com>
Date: Wed, 26 Jun 2024 12:41:09 +0100
Subject: [PATCH] net/ice/base: fix GCS descriptor field offsets
[ upstream commit 243ec291b1eba3ddf7554c9c80a173e9aee58b68 ]
Update the offsets, and remove the ICE_TX_GCS_DESC_ENA define since a
non-0 value used for the ICE_TX_GCS_DESC_TYPE field will enable GCS
offload; there is no dedicated bit to enable it anymore.
Fixes: c31095a0b20f ("net/ice/base: add GCO defines and GCO flex descriptor")
Signed-off-by: Eric Joyner <eric.joyner@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/ice/base/ice_lan_tx_rx.h | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ice/base/ice_lan_tx_rx.h b/drivers/net/ice/base/ice_lan_tx_rx.h
index be6d88f0ca..cd12d47d9b 100644
--- a/drivers/net/ice/base/ice_lan_tx_rx.h
+++ b/drivers/net/ice/base/ice_lan_tx_rx.h
@@ -1074,10 +1074,9 @@ struct ice_tx_ctx_desc {
__le64 qw1;
};
-#define ICE_TX_GSC_DESC_START 0 /* 7 BITS */
-#define ICE_TX_GSC_DESC_OFFSET 7 /* 4 BITS */
-#define ICE_TX_GSC_DESC_TYPE 11 /* 2 BITS */
-#define ICE_TX_GSC_DESC_ENA 13 /* 1 BIT */
+#define ICE_TX_GCS_DESC_START 0 /* 8 BITS */
+#define ICE_TX_GCS_DESC_OFFSET 8 /* 4 BITS */
+#define ICE_TX_GCS_DESC_TYPE 12 /* 3 BITS */
#define ICE_TXD_CTX_QW1_DTYPE_S 0
#define ICE_TXD_CTX_QW1_DTYPE_M (0xFUL << ICE_TXD_CTX_QW1_DTYPE_S)
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:37.064054551 +0100
+++ 0048-net-ice-base-fix-GCS-descriptor-field-offsets.patch 2024-07-15 16:19:34.588206890 +0100
@@ -1 +1 @@
-From 243ec291b1eba3ddf7554c9c80a173e9aee58b68 Mon Sep 17 00:00:00 2001
+From 92938d56d0f7ea32972107db372ee83cb3037421 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 243ec291b1eba3ddf7554c9c80a173e9aee58b68 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index d816df0ff6..39673e36f7 100644
+index be6d88f0ca..cd12d47d9b 100644
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ice/base: fix return type of bitmap hamming weight' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (46 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/ice/base: fix GCS descriptor field offsets' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/ice/base: fix check for existing switch rule' " luca.boccassi
` (36 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Chinh Cao; +Cc: Ian Stokes, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e31db1b871f0cc94a1120e560580c562d8089a23
Thanks.
Luca Boccassi
---
From e31db1b871f0cc94a1120e560580c562d8089a23 Mon Sep 17 00:00:00 2001
From: Chinh Cao <chinh.t.cao@intel.com>
Date: Wed, 26 Jun 2024 12:41:11 +0100
Subject: [PATCH] net/ice/base: fix return type of bitmap hamming weight
[ upstream commit 509c55f699d1e13f38abaaf85df7bd9b585f5b87 ]
"count" is the returned value, and in this function, value of "count"
and "bit" are the same, so there is no reason why these values should be
declared as different types, and for returned value data type to be
different.
Fixes: 6d288fa5f72b ("net/ice/base: introduce and use bitmap hamming weight API")
Signed-off-by: Chinh Cao <chinh.t.cao@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/ice/base/ice_bitops.h | 4 ++--
drivers/net/ice/base/ice_switch.c | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ice/base/ice_bitops.h b/drivers/net/ice/base/ice_bitops.h
index c4ae2b9c8e..81f9dadc07 100644
--- a/drivers/net/ice/base/ice_bitops.h
+++ b/drivers/net/ice/base/ice_bitops.h
@@ -411,10 +411,10 @@ ice_bitmap_set(ice_bitmap_t *dst, u16 pos, u16 num_bits)
* Note that this function assumes it is operating on a bitmap declared using
* ice_declare_bitmap.
*/
-static inline int
+static inline u16
ice_bitmap_hweight(ice_bitmap_t *bm, u16 size)
{
- int count = 0;
+ u16 count = 0;
u16 bit = 0;
while (size > (bit = ice_find_next_bit(bm, size, bit))) {
diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index a2581f404d..697b45ccf4 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -7124,7 +7124,7 @@ ice_find_free_recp_res_idx(struct ice_hw *hw, const ice_bitmap_t *profiles,
ice_xor_bitmap(free_idx, used_idx, possible_idx, ICE_MAX_FV_WORDS);
/* return number of free indexes */
- return (u16)ice_bitmap_hweight(free_idx, ICE_MAX_FV_WORDS);
+ return ice_bitmap_hweight(free_idx, ICE_MAX_FV_WORDS);
}
/**
@@ -7822,6 +7822,7 @@ ice_add_adv_recipe(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,
enum ice_status status = ICE_SUCCESS;
struct ice_sw_recipe *rm;
u8 i;
+ u16 cnt;
if (!ice_is_prof_rule(rinfo->tun_type) && !lkups_cnt)
return ICE_ERR_PARAM;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:37.113619586 +0100
+++ 0049-net-ice-base-fix-return-type-of-bitmap-hamming-weigh.patch 2024-07-15 16:19:34.600207147 +0100
@@ -1 +1 @@
-From 509c55f699d1e13f38abaaf85df7bd9b585f5b87 Mon Sep 17 00:00:00 2001
+From e31db1b871f0cc94a1120e560580c562d8089a23 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 509c55f699d1e13f38abaaf85df7bd9b585f5b87 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 3b71c1b7f5..5c17bcb674 100644
+index c4ae2b9c8e..81f9dadc07 100644
@@ -26 +27 @@
-@@ -418,10 +418,10 @@ ice_bitmap_set(ice_bitmap_t *dst, u16 pos, u16 num_bits)
+@@ -411,10 +411,10 @@ ice_bitmap_set(ice_bitmap_t *dst, u16 pos, u16 num_bits)
@@ -40 +41 @@
-index 711a6cfbbe..fa5bd94c58 100644
+index a2581f404d..697b45ccf4 100644
@@ -43 +44 @@
-@@ -7467,7 +7467,7 @@ ice_find_free_recp_res_idx(struct ice_hw *hw, const ice_bitmap_t *profiles,
+@@ -7124,7 +7124,7 @@ ice_find_free_recp_res_idx(struct ice_hw *hw, const ice_bitmap_t *profiles,
@@ -51,2 +52,3 @@
- static void ice_set_recipe_index(unsigned long idx, u8 *bitmap)
-@@ -8178,6 +8178,7 @@ ice_add_adv_recipe(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,
+ /**
+@@ -7822,6 +7822,7 @@ ice_add_adv_recipe(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,
+ enum ice_status status = ICE_SUCCESS;
@@ -55 +56,0 @@
- int status = ICE_SUCCESS;
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ice/base: fix check for existing switch rule' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (47 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/ice/base: fix return type of bitmap hamming weight' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/ice/base: fix potential TLV length overflow' " luca.boccassi
` (35 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Mateusz Pacuszka; +Cc: Ian Stokes, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/39696cfa70eccbd5a518dad057bbeb120ea4cc52
Thanks.
Luca Boccassi
---
From 39696cfa70eccbd5a518dad057bbeb120ea4cc52 Mon Sep 17 00:00:00 2001
From: Mateusz Pacuszka <mateuszx.pacuszka@intel.com>
Date: Wed, 26 Jun 2024 12:41:20 +0100
Subject: [PATCH] net/ice/base: fix check for existing switch rule
[ upstream commit 771db7d9466488135a2899f8809d6e61bc685ed5 ]
In case the rule already exists and another VSI wants to subscribe to
it, a new VSI list is being created and both VSIs are moved to it.
Currently, the check for already existing VSI with the same rule is done
based on fdw_id.hw_vsi_id, which applies only to LOOKUP_RX flag. Change
it to vsi_handle. This is software VSI ID, but it can be applied here,
because vsi_map itself is also based on it.
Additionally change return status in case the VSI already exists in the
VSI map to "Already exists". Such case should be handled by the caller.
Fixes: c7dd15931183 ("net/ice/base: add virtual switch code")
Signed-off-by: Mateusz Pacuszka <mateuszx.pacuszka@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/ice/base/ice_switch.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index 697b45ccf4..073c139c43 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -4339,7 +4339,7 @@ ice_add_update_vsi_list(struct ice_hw *hw,
u16 vsi_handle_arr[2];
/* A rule already exists with the new VSI being added */
- if (cur_fltr->fwd_id.hw_vsi_id == new_fltr->fwd_id.hw_vsi_id)
+ if (cur_fltr->vsi_handle == new_fltr->vsi_handle)
return ICE_ERR_ALREADY_EXISTS;
vsi_handle_arr[0] = cur_fltr->vsi_handle;
@@ -4387,7 +4387,7 @@ ice_add_update_vsi_list(struct ice_hw *hw,
/* A rule already exists with the new VSI being added */
if (ice_is_bit_set(m_entry->vsi_list_info->vsi_map, vsi_handle))
- return ICE_SUCCESS;
+ return ICE_ERR_ALREADY_EXISTS;
/* Update the previously created VSI list set with
* the new VSI ID passed in
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:37.164552888 +0100
+++ 0050-net-ice-base-fix-check-for-existing-switch-rule.patch 2024-07-15 16:19:34.608207317 +0100
@@ -1 +1 @@
-From 771db7d9466488135a2899f8809d6e61bc685ed5 Mon Sep 17 00:00:00 2001
+From 39696cfa70eccbd5a518dad057bbeb120ea4cc52 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 771db7d9466488135a2899f8809d6e61bc685ed5 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index fa5bd94c58..f8d98d8a9e 100644
+index 697b45ccf4..073c139c43 100644
@@ -30 +31 @@
-@@ -4624,7 +4624,7 @@ ice_add_update_vsi_list(struct ice_hw *hw,
+@@ -4339,7 +4339,7 @@ ice_add_update_vsi_list(struct ice_hw *hw,
@@ -39 +40 @@
-@@ -4672,7 +4672,7 @@ ice_add_update_vsi_list(struct ice_hw *hw,
+@@ -4387,7 +4387,7 @@ ice_add_update_vsi_list(struct ice_hw *hw,
@@ -43 +44 @@
-- return 0;
+- return ICE_SUCCESS;
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ice/base: fix potential TLV length overflow' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (48 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/ice/base: fix check for existing switch rule' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/ice/base: fix board type definition' " luca.boccassi
` (34 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Paul Greenwalt; +Cc: Dan Nowlin, Ian Stokes, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/ecb6c3285e65e5714c2febb650b21f00f8dbc9af
Thanks.
Luca Boccassi
---
From ecb6c3285e65e5714c2febb650b21f00f8dbc9af Mon Sep 17 00:00:00 2001
From: Paul Greenwalt <paul.greenwalt@intel.com>
Date: Wed, 26 Jun 2024 12:41:33 +0100
Subject: [PATCH] net/ice/base: fix potential TLV length overflow
[ upstream commit 2c5f6b43524e9dc6cc25c67a536ee6564ea71e09 ]
It's possible that an NVM with an invalid tlv_len could cause an integer
overflow of next_tlv which can result an infinite loop.
Fix this issue by changing next_tlv from u16 to u32 to prevent overflow.
Also check that tlv_len is valid and less than pfa_len.
Fix an issue with conversion from 'u32' to 'u16', possible loss
of data compile errors by making appropriate casts.
Fixes: 77a649999047 ("net/ice/base: move functions from common to NVM module")
Signed-off-by: Paul Greenwalt <paul.greenwalt@intel.com>
Signed-off-by: Dan Nowlin <dan.nowlin@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/ice/base/ice_nvm.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ice/base/ice_nvm.c b/drivers/net/ice/base/ice_nvm.c
index 6550dda557..bc1a74460c 100644
--- a/drivers/net/ice/base/ice_nvm.c
+++ b/drivers/net/ice/base/ice_nvm.c
@@ -474,7 +474,7 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
{
enum ice_status status;
u16 pfa_len, pfa_ptr;
- u16 next_tlv;
+ u32 next_tlv;
status = ice_read_sr_word(hw, ICE_SR_PFA_PTR, &pfa_ptr);
if (status != ICE_SUCCESS) {
@@ -490,25 +490,30 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
* of TLVs to find the requested one.
*/
next_tlv = pfa_ptr + 1;
- while (next_tlv < pfa_ptr + pfa_len) {
+ while (next_tlv < ((u32)pfa_ptr + pfa_len)) {
u16 tlv_sub_module_type;
u16 tlv_len;
/* Read TLV type */
- status = ice_read_sr_word(hw, next_tlv, &tlv_sub_module_type);
+ status = ice_read_sr_word(hw, (u16)next_tlv,
+ &tlv_sub_module_type);
if (status != ICE_SUCCESS) {
ice_debug(hw, ICE_DBG_INIT, "Failed to read TLV type.\n");
break;
}
/* Read TLV length */
- status = ice_read_sr_word(hw, next_tlv + 1, &tlv_len);
+ status = ice_read_sr_word(hw, (u16)(next_tlv + 1), &tlv_len);
if (status != ICE_SUCCESS) {
ice_debug(hw, ICE_DBG_INIT, "Failed to read TLV length.\n");
break;
}
+ if (tlv_len > pfa_len) {
+ ice_debug(hw, ICE_DBG_INIT, "Invalid TLV length.\n");
+ return ICE_ERR_INVAL_SIZE;
+ }
if (tlv_sub_module_type == module_type) {
if (tlv_len) {
- *module_tlv = next_tlv;
+ *module_tlv = (u16)next_tlv;
*module_tlv_len = tlv_len;
return ICE_SUCCESS;
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:37.212962316 +0100
+++ 0051-net-ice-base-fix-potential-TLV-length-overflow.patch 2024-07-15 16:19:34.612207403 +0100
@@ -1 +1 @@
-From 2c5f6b43524e9dc6cc25c67a536ee6564ea71e09 Mon Sep 17 00:00:00 2001
+From ecb6c3285e65e5714c2febb650b21f00f8dbc9af Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2c5f6b43524e9dc6cc25c67a536ee6564ea71e09 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 79b66fa70f..811bbc9bbc 100644
+index 6550dda557..bc1a74460c 100644
@@ -30,2 +31 @@
-@@ -472,7 +472,7 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
- u16 module_type)
+@@ -474,7 +474,7 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
@@ -32,0 +33 @@
+ enum ice_status status;
@@ -36 +36,0 @@
- int status;
@@ -39 +39,2 @@
-@@ -489,25 +489,30 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
+ if (status != ICE_SUCCESS) {
+@@ -490,25 +490,30 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len,
@@ -52 +53 @@
- if (status) {
+ if (status != ICE_SUCCESS) {
@@ -59 +60 @@
- if (status) {
+ if (status != ICE_SUCCESS) {
@@ -72 +73 @@
- return 0;
+ return ICE_SUCCESS;
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ice/base: fix board type definition' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (49 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/ice/base: fix potential TLV length overflow' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/ice/base: fix preparing PHY for timesync command' " luca.boccassi
` (33 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Waldemar Dworakowski; +Cc: Ian Stokes, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/8719d11e4bc983a71b4a9dd89681faaa9dff493d
Thanks.
Luca Boccassi
---
From 8719d11e4bc983a71b4a9dd89681faaa9dff493d Mon Sep 17 00:00:00 2001
From: Waldemar Dworakowski <waldemar.dworakowski@intel.com>
Date: Wed, 26 Jun 2024 12:41:38 +0100
Subject: [PATCH] net/ice/base: fix board type definition
[ upstream commit ee7419d85e4c55559002fdb57ec6dc4959155b2f ]
The new version is compliant with implementation and documentation.
Fixes: f4f79aa849b5 ("net/ice/base: add AQC get link topology handle support")
Signed-off-by: Waldemar Dworakowski <waldemar.dworakowski@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/ice/base/ice_adminq_cmd.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ice/base/ice_adminq_cmd.h b/drivers/net/ice/base/ice_adminq_cmd.h
index 93a3a6007f..534649802f 100644
--- a/drivers/net/ice/base/ice_adminq_cmd.h
+++ b/drivers/net/ice/base/ice_adminq_cmd.h
@@ -1702,8 +1702,8 @@ struct ice_aqc_link_topo_addr {
#define ICE_AQC_LINK_TOPO_HANDLE_M (0x3FF << ICE_AQC_LINK_TOPO_HANDLE_S)
/* Used to decode the handle field */
#define ICE_AQC_LINK_TOPO_HANDLE_BRD_TYPE_M BIT(9)
-#define ICE_AQC_LINK_TOPO_HANDLE_BRD_TYPE_LOM BIT(9)
-#define ICE_AQC_LINK_TOPO_HANDLE_BRD_TYPE_MEZZ 0
+#define ICE_AQC_LINK_TOPO_HANDLE_BRD_TYPE_LOM 0
+#define ICE_AQC_LINK_TOPO_HANDLE_BRD_TYPE_MEZZ BIT(9)
#define ICE_AQC_LINK_TOPO_HANDLE_NODE_S 0
/* In case of a Mezzanine type */
#define ICE_AQC_LINK_TOPO_HANDLE_MEZZ_NODE_M \
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:37.254153299 +0100
+++ 0052-net-ice-base-fix-board-type-definition.patch 2024-07-15 16:19:34.612207403 +0100
@@ -1 +1 @@
-From ee7419d85e4c55559002fdb57ec6dc4959155b2f Mon Sep 17 00:00:00 2001
+From 8719d11e4bc983a71b4a9dd89681faaa9dff493d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ee7419d85e4c55559002fdb57ec6dc4959155b2f ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index c431b82784..d90a5b0d34 100644
+index 93a3a6007f..534649802f 100644
@@ -22 +23 @@
-@@ -1746,8 +1746,8 @@ struct ice_aqc_link_topo_addr {
+@@ -1702,8 +1702,8 @@ struct ice_aqc_link_topo_addr {
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ice/base: fix preparing PHY for timesync command' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (50 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/ice/base: fix board type definition' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/ice/base: fix masking when reading context' " luca.boccassi
` (32 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Tomasz Wakula; +Cc: Ian Stokes, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/44cb540275af7023dc6f3f6c24c009ad8af5d429
Thanks.
Luca Boccassi
---
From 44cb540275af7023dc6f3f6c24c009ad8af5d429 Mon Sep 17 00:00:00 2001
From: Tomasz Wakula <tomaszx.wakula@intel.com>
Date: Wed, 26 Jun 2024 12:41:46 +0100
Subject: [PATCH] net/ice/base: fix preparing PHY for timesync command
[ upstream commit df44ba7a3c8e0dfa409b085d153f5473e60c9908 ]
When preparing a port for timesync command SW should provide Rx type,
which indicates the type for the Rx metadata in the ONPI interface.
According to the documentation, Rx type should always equal 0x18.
Fixes: 97f4f78bbd9f ("net/ice/base: add functions for device clock control")
Signed-off-by: Tomasz Wakula <tomaszx.wakula@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/ice/base/ice_ptp_hw.c | 4 ++--
drivers/net/ice/base/ice_ptp_hw.h | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ice/base/ice_ptp_hw.c b/drivers/net/ice/base/ice_ptp_hw.c
index a0b8af1b94..0f02d2fcbe 100644
--- a/drivers/net/ice/base/ice_ptp_hw.c
+++ b/drivers/net/ice/base/ice_ptp_hw.c
@@ -2839,8 +2839,8 @@ ice_ptp_one_port_cmd_e822(struct ice_hw *hw, u8 port, enum ice_ptp_tmr_cmd cmd,
val &= ~TS_CMD_MASK;
val |= cmd_val;
- status = ice_write_phy_reg_e822_lp(hw, port, P_REG_RX_TMR_CMD, val,
- lock_sbq);
+ status = ice_write_phy_reg_e822_lp(hw, port, P_REG_RX_TMR_CMD,
+ val | TS_CMD_RX_TYPE, lock_sbq);
if (status) {
ice_debug(hw, ICE_DBG_PTP, "Failed to write back RX_TMR_CMD, status %d\n",
status);
diff --git a/drivers/net/ice/base/ice_ptp_hw.h b/drivers/net/ice/base/ice_ptp_hw.h
index 09c236e7e0..c2a3e53103 100644
--- a/drivers/net/ice/base/ice_ptp_hw.h
+++ b/drivers/net/ice/base/ice_ptp_hw.h
@@ -295,6 +295,9 @@ enum ice_status ice_ptp_init_phy_cfg(struct ice_hw *hw);
#define TS_CMD_MASK_E810 0xFF
#define TS_CMD_MASK 0xF
#define SYNC_EXEC_CMD 0x3
+#define TS_CMD_RX_TYPE_S 0x4
+#define TS_CMD_RX_TYPE MAKEMASK(0x18, TS_CMD_RX_TYPE_S)
+
/* Macros to derive port low and high addresses on both quads */
#define P_Q0_L(a, p) ((((a) + (0x2000 * (p)))) & 0xFFFF)
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:37.304930915 +0100
+++ 0053-net-ice-base-fix-preparing-PHY-for-timesync-command.patch 2024-07-15 16:19:34.620207573 +0100
@@ -1 +1 @@
-From df44ba7a3c8e0dfa409b085d153f5473e60c9908 Mon Sep 17 00:00:00 2001
+From 44cb540275af7023dc6f3f6c24c009ad8af5d429 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit df44ba7a3c8e0dfa409b085d153f5473e60c9908 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 8ea4e77266..0c8c339022 100644
+index a0b8af1b94..0f02d2fcbe 100644
@@ -25,2 +26,3 @@
-@@ -3164,8 +3164,8 @@ ice_ptp_write_port_cmd_e822(struct ice_hw *hw, u8 port,
- }
+@@ -2839,8 +2839,8 @@ ice_ptp_one_port_cmd_e822(struct ice_hw *hw, u8 port, enum ice_ptp_tmr_cmd cmd,
+ val &= ~TS_CMD_MASK;
+ val |= cmd_val;
@@ -28,8 +30,7 @@
- /* Rx case */
-- err = ice_write_phy_reg_e822_lp(hw, port, P_REG_RX_TMR_CMD, val,
-- lock_sbq);
-+ err = ice_write_phy_reg_e822_lp(hw, port, P_REG_RX_TMR_CMD,
-+ val | TS_CMD_RX_TYPE, lock_sbq);
- if (err) {
- ice_debug(hw, ICE_DBG_PTP, "Failed to write back RX_TMR_CMD, err %d\n",
- err);
+- status = ice_write_phy_reg_e822_lp(hw, port, P_REG_RX_TMR_CMD, val,
+- lock_sbq);
++ status = ice_write_phy_reg_e822_lp(hw, port, P_REG_RX_TMR_CMD,
++ val | TS_CMD_RX_TYPE, lock_sbq);
+ if (status) {
+ ice_debug(hw, ICE_DBG_PTP, "Failed to write back RX_TMR_CMD, status %d\n",
+ status);
@@ -37 +38 @@
-index 4c63bba722..ff7719f16a 100644
+index 09c236e7e0..c2a3e53103 100644
@@ -40 +41 @@
-@@ -324,6 +324,9 @@ int ice_ptp_init_phy_cfg(struct ice_hw *hw);
+@@ -295,6 +295,9 @@ enum ice_status ice_ptp_init_phy_cfg(struct ice_hw *hw);
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ice/base: fix masking when reading context' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (51 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/ice/base: fix preparing PHY for timesync command' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'common/idpf: fix flex descriptor mask' " luca.boccassi
` (31 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Yahui Cao; +Cc: Ian Stokes, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e804d4471528425931bd578192ab115780a3ecd6
Thanks.
Luca Boccassi
---
From e804d4471528425931bd578192ab115780a3ecd6 Mon Sep 17 00:00:00 2001
From: Yahui Cao <yahui.cao@intel.com>
Date: Wed, 26 Jun 2024 12:42:14 +0100
Subject: [PATCH] net/ice/base: fix masking when reading context
[ upstream commit 045ff68c49244d998933ef74a719b96db0e43988 ]
No need to invert mask since we only reserve the masked bits instead of
clear them.
Fixes: a03c714bfe0b ("net/ice/base: add two helper functions")
Signed-off-by: Yahui Cao <yahui.cao@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/ice/base/ice_common.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c
index ac67411ebd..92a520daf2 100644
--- a/drivers/net/ice/base/ice_common.c
+++ b/drivers/net/ice/base/ice_common.c
@@ -4819,7 +4819,7 @@ ice_read_byte(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info)
ice_memcpy(&dest_byte, src, sizeof(dest_byte), ICE_DMA_TO_NONDMA);
- dest_byte &= ~(mask);
+ dest_byte &= mask;
dest_byte >>= shift_width;
@@ -4859,7 +4859,7 @@ ice_read_word(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info)
/* the data in the memory is stored as little endian so mask it
* correctly
*/
- src_word &= ~(CPU_TO_LE16(mask));
+ src_word &= CPU_TO_LE16(mask);
/* get the data back into host order before shifting */
dest_word = LE16_TO_CPU(src_word);
@@ -4910,7 +4910,7 @@ ice_read_dword(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info)
/* the data in the memory is stored as little endian so mask it
* correctly
*/
- src_dword &= ~(CPU_TO_LE32(mask));
+ src_dword &= CPU_TO_LE32(mask);
/* get the data back into host order before shifting */
dest_dword = LE32_TO_CPU(src_dword);
@@ -4961,7 +4961,7 @@ ice_read_qword(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info)
/* the data in the memory is stored as little endian so mask it
* correctly
*/
- src_qword &= ~(CPU_TO_LE64(mask));
+ src_qword &= CPU_TO_LE64(mask);
/* get the data back into host order before shifting */
dest_qword = LE64_TO_CPU(src_qword);
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:37.350738786 +0100
+++ 0054-net-ice-base-fix-masking-when-reading-context.patch 2024-07-15 16:19:34.624207659 +0100
@@ -1 +1 @@
-From 045ff68c49244d998933ef74a719b96db0e43988 Mon Sep 17 00:00:00 2001
+From e804d4471528425931bd578192ab115780a3ecd6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 045ff68c49244d998933ef74a719b96db0e43988 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index c14f66d55b..9a9c8f86e5 100644
+index ac67411ebd..92a520daf2 100644
@@ -23 +24 @@
-@@ -5014,7 +5014,7 @@ ice_read_byte(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info)
+@@ -4819,7 +4819,7 @@ ice_read_byte(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info)
@@ -25 +26 @@
- ice_memcpy(&dest_byte, src, sizeof(dest_byte), ICE_NONDMA_TO_NONDMA);
+ ice_memcpy(&dest_byte, src, sizeof(dest_byte), ICE_DMA_TO_NONDMA);
@@ -32 +33 @@
-@@ -5054,7 +5054,7 @@ ice_read_word(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info)
+@@ -4859,7 +4859,7 @@ ice_read_word(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info)
@@ -41 +42 @@
-@@ -5105,7 +5105,7 @@ ice_read_dword(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info)
+@@ -4910,7 +4910,7 @@ ice_read_dword(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info)
@@ -50 +51 @@
-@@ -5156,7 +5156,7 @@ ice_read_qword(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info)
+@@ -4961,7 +4961,7 @@ ice_read_qword(u8 *src_ctx, u8 *dest_ctx, struct ice_ctx_ele *ce_info)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'common/idpf: fix flex descriptor mask' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (52 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/ice/base: fix masking when reading context' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/ice: fix sizing of filter hash table' " luca.boccassi
` (30 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Soumyadeep Hore; +Cc: Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/d0f2f65e1f151fd8191d6d16c1ec3fe8c3524e4e
Thanks.
Luca Boccassi
---
From d0f2f65e1f151fd8191d6d16c1ec3fe8c3524e4e Mon Sep 17 00:00:00 2001
From: Soumyadeep Hore <soumyadeep.hore@intel.com>
Date: Mon, 24 Jun 2024 09:16:32 +0000
Subject: [PATCH] common/idpf: fix flex descriptor mask
[ upstream commit 757addd900598d5a42bfaad9992a305907022680 ]
Mask for VIRTCHNL2_RX_FLEX_DESC_ADV_FF1_M was defined wrongly
and this patch fixes it.
Fixes: fb4ac04e9bfa ("common/idpf: introduce common library")
Signed-off-by: Soumyadeep Hore <soumyadeep.hore@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/common/idpf/base/virtchnl2_lan_desc.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/common/idpf/base/virtchnl2_lan_desc.h b/drivers/common/idpf/base/virtchnl2_lan_desc.h
index b8cb22e474..14b897b777 100644
--- a/drivers/common/idpf/base/virtchnl2_lan_desc.h
+++ b/drivers/common/idpf/base/virtchnl2_lan_desc.h
@@ -110,7 +110,7 @@
BIT_ULL(VIRTCHNL2_RX_FLEX_DESC_ADV_SPH_S)
#define VIRTCHNL2_RX_FLEX_DESC_ADV_FF1_S 12
#define VIRTCHNL2_RX_FLEX_DESC_ADV_FF1_M \
- MAKEMASK(0x7UL, VIRTCHNL2_RX_FLEX_DESC_ADV_FF1_M)
+ MAKEMASK(0x7UL, VIRTCHNL2_RX_FLEX_DESC_ADV_FF1_S)
#define VIRTCHNL2_RX_FLEX_DESC_ADV_MISS_S 15
#define VIRTCHNL2_RX_FLEX_DESC_ADV_MISS_M \
BIT_ULL(VIRTCHNL2_RX_FLEX_DESC_ADV_MISS_S)
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:37.396574593 +0100
+++ 0055-common-idpf-fix-flex-descriptor-mask.patch 2024-07-15 16:19:34.624207659 +0100
@@ -1 +1 @@
-From 757addd900598d5a42bfaad9992a305907022680 Mon Sep 17 00:00:00 2001
+From d0f2f65e1f151fd8191d6d16c1ec3fe8c3524e4e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 757addd900598d5a42bfaad9992a305907022680 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index f632271788..9e04cf8628 100644
+index b8cb22e474..14b897b777 100644
@@ -22 +23 @@
-@@ -111,7 +111,7 @@
+@@ -110,7 +110,7 @@
@@ -26,2 +27,2 @@
-- IDPF_M(0x7UL, VIRTCHNL2_RX_FLEX_DESC_ADV_FF1_M)
-+ IDPF_M(0x7UL, VIRTCHNL2_RX_FLEX_DESC_ADV_FF1_S)
+- MAKEMASK(0x7UL, VIRTCHNL2_RX_FLEX_DESC_ADV_FF1_M)
++ MAKEMASK(0x7UL, VIRTCHNL2_RX_FLEX_DESC_ADV_FF1_S)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ice: fix sizing of filter hash table' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (53 preceding siblings ...)
2024-07-15 15:26 ` patch 'common/idpf: fix flex descriptor mask' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'app/testpmd: handle IEEE1588 init failure' " luca.boccassi
` (29 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Bruce Richardson; +Cc: David Marchand, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/4999f309fb5e219d331854190882883828968924
Thanks.
Luca Boccassi
---
From 4999f309fb5e219d331854190882883828968924 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Thu, 11 Jul 2024 17:57:28 +0100
Subject: [PATCH] net/ice: fix sizing of filter hash table
[ upstream commit 15800bfdac939e2056c76e7c634825bb682e334c ]
The hash table used for managing the filter rules in the ice driver was
dimensioned to a hard-coded 16k, which is insufficient for holding all
the filters supported by E830 HW.
Rather than using a hard-coded value which may need updates for new
hardware support, we can query the NIC max filter support from hardware
and scale the hash table size based on that value.
Fixes: 1a2fc1799f09 ("net/ice: reject duplicated flow for flow director")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
---
drivers/net/ice/ice_ethdev.h | 2 --
drivers/net/ice/ice_fdir_filter.c | 9 +++++++--
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ice/ice_ethdev.h b/drivers/net/ice/ice_ethdev.h
index bfc9140dba..9799cad394 100644
--- a/drivers/net/ice/ice_ethdev.h
+++ b/drivers/net/ice/ice_ethdev.h
@@ -351,8 +351,6 @@ struct ice_fdir_filter_conf {
u8 pkt_len;
};
-#define ICE_MAX_FDIR_FILTER_NUM (1024 * 16)
-
struct ice_fdir_fltr_pattern {
enum ice_fltr_ptype flow_type;
diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index 81e88c1dd8..7e97547d8b 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -377,12 +377,17 @@ ice_fdir_init_filter_list(struct ice_pf *pf)
{
struct rte_eth_dev *dev = &rte_eth_devices[pf->dev_data->port_id];
struct ice_fdir_info *fdir_info = &pf->fdir;
+ struct ice_hw *hw = &pf->adapter->hw;
char fdir_hash_name[RTE_HASH_NAMESIZE];
+ const uint32_t max_fd_filter_entries =
+ hw->func_caps.fd_fltr_guar + hw->func_caps.fd_fltr_best_effort;
+ /* dimension hash table as max filters + 12.5% to ensure a little headroom */
+ const uint32_t hash_table_entries = max_fd_filter_entries + (max_fd_filter_entries >> 3);
int ret;
struct rte_hash_parameters fdir_hash_params = {
.name = fdir_hash_name,
- .entries = ICE_MAX_FDIR_FILTER_NUM,
+ .entries = hash_table_entries,
.key_len = sizeof(struct ice_fdir_fltr_pattern),
.hash_func = rte_hash_crc,
.hash_func_init_val = 0,
@@ -400,7 +405,7 @@ ice_fdir_init_filter_list(struct ice_pf *pf)
}
fdir_info->hash_map = rte_zmalloc("ice_fdir_hash_map",
sizeof(*fdir_info->hash_map) *
- ICE_MAX_FDIR_FILTER_NUM,
+ hash_table_entries,
0);
if (!fdir_info->hash_map) {
PMD_INIT_LOG(ERR,
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:37.437382729 +0100
+++ 0056-net-ice-fix-sizing-of-filter-hash-table.patch 2024-07-15 16:19:34.628207744 +0100
@@ -1 +1 @@
-From 15800bfdac939e2056c76e7c634825bb682e334c Mon Sep 17 00:00:00 2001
+From 4999f309fb5e219d331854190882883828968924 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 15800bfdac939e2056c76e7c634825bb682e334c ]
+
@@ -24 +26 @@
-index d73faaed49..3ea9f37dc8 100644
+index bfc9140dba..9799cad394 100644
@@ -37 +39 @@
-index 0b7920ad44..edd8cc8f1a 100644
+index 81e88c1dd8..7e97547d8b 100644
@@ -40 +42 @@
-@@ -375,12 +375,17 @@ ice_fdir_init_filter_list(struct ice_pf *pf)
+@@ -377,12 +377,17 @@ ice_fdir_init_filter_list(struct ice_pf *pf)
@@ -59 +61 @@
-@@ -398,7 +403,7 @@ ice_fdir_init_filter_list(struct ice_pf *pf)
+@@ -400,7 +405,7 @@ ice_fdir_init_filter_list(struct ice_pf *pf)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'app/testpmd: handle IEEE1588 init failure' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (54 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/ice: fix sizing of filter hash table' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'doc: remove empty section from testpmd guide' " luca.boccassi
` (28 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Dengdui Huang; +Cc: Aman Singh, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/23e7802fa97b96123910544915d1ef8ef6b7135b
Thanks.
Luca Boccassi
---
From 23e7802fa97b96123910544915d1ef8ef6b7135b Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Sat, 30 Mar 2024 15:44:09 +0800
Subject: [PATCH] app/testpmd: handle IEEE1588 init failure
[ upstream commit 80071a1c8ed669298434c56efe4ca0839f2a970e ]
When the port's timestamping function failed to initialize
(for example, the device does not support PTP), the packets
received by the hardware do not contain the timestamp.
In this case, IEEE1588 packet forwarding should not start.
This patch fix it.
Plus, adding a failure message when failed to disable PTP.
Fixes: a78040c990cb ("app/testpmd: update forward engine beginning")
Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
---
app/test-pmd/ieee1588fwd.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/app/test-pmd/ieee1588fwd.c b/app/test-pmd/ieee1588fwd.c
index 896d5ef26a..8d9ce4d6ce 100644
--- a/app/test-pmd/ieee1588fwd.c
+++ b/app/test-pmd/ieee1588fwd.c
@@ -201,14 +201,23 @@ ieee1588_packet_fwd(struct fwd_stream *fs)
static int
port_ieee1588_fwd_begin(portid_t pi)
{
- rte_eth_timesync_enable(pi);
- return 0;
+ int ret;
+
+ ret = rte_eth_timesync_enable(pi);
+ if (ret)
+ printf("Port %u enable PTP failed, ret = %d\n", pi, ret);
+
+ return ret;
}
static void
port_ieee1588_fwd_end(portid_t pi)
{
- rte_eth_timesync_disable(pi);
+ int ret;
+
+ ret = rte_eth_timesync_disable(pi);
+ if (ret)
+ printf("Port %u disable PTP failed, ret = %d\n", pi, ret);
}
static void
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:37.479635703 +0100
+++ 0057-app-testpmd-handle-IEEE1588-init-failure.patch 2024-07-15 16:19:34.628207744 +0100
@@ -1 +1 @@
-From 80071a1c8ed669298434c56efe4ca0839f2a970e Mon Sep 17 00:00:00 2001
+From 23e7802fa97b96123910544915d1ef8ef6b7135b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 80071a1c8ed669298434c56efe4ca0839f2a970e ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 3371771751..afea7735c7 100644
+index 896d5ef26a..8d9ce4d6ce 100644
@@ -27 +28 @@
-@@ -197,14 +197,23 @@ ieee1588_packet_fwd(struct fwd_stream *fs)
+@@ -201,14 +201,23 @@ ieee1588_packet_fwd(struct fwd_stream *fs)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'doc: remove empty section from testpmd guide' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (55 preceding siblings ...)
2024-07-15 15:26 ` patch 'app/testpmd: handle IEEE1588 init failure' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'app/testpmd: fix parsing for connection tracking item' " luca.boccassi
` (27 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/4d92c686d67b29d796c2228b8b9bbd19f9519186
Thanks.
Luca Boccassi
---
From 4d92c686d67b29d796c2228b8b9bbd19f9519186 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Fri, 24 May 2024 18:02:09 +0200
Subject: [PATCH] doc: remove empty section from testpmd guide
[ upstream commit 06d8e7da01a7e3095e4ff7a6697693233173dc59 ]
When removing the documentation for the obsolete flow filtering,
the related section was kept almost empty.
It can be safely removed.
Fixes: 5007ac13189d ("ethdev: remove deprecated Flow Director configuration")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index 8e7d4f1b86..b46c574325 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -2843,14 +2843,6 @@ where:
* ``red`` enable 1, disable 0 marking IP ecn for yellow marked packets with ecn of 2'b01 or 2'b10
to ecn of 2'b11 when IP is caring TCP or SCTP
-Filter Functions
-----------------
-
-This section details the available filter functions that are available.
-
-Note these functions interface the deprecated legacy filtering framework,
-superseded by *rte_flow*. See `Flow rules management`_.
-
.. _testpmd_rte_flow:
Flow rules management
@@ -2860,10 +2852,6 @@ Control of the generic flow API (*rte_flow*) is fully exposed through the
``flow`` command (configuration, validation, creation, destruction, queries
and operation modes).
-Considering *rte_flow* overlaps with all `Filter Functions`_, using both
-features simultaneously may cause undefined side-effects and is therefore
-not recommended.
-
``flow`` syntax
~~~~~~~~~~~~~~~
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:37.520481799 +0100
+++ 0058-doc-remove-empty-section-from-testpmd-guide.patch 2024-07-15 16:19:34.632207830 +0100
@@ -1 +1 @@
-From 06d8e7da01a7e3095e4ff7a6697693233173dc59 Mon Sep 17 00:00:00 2001
+From 4d92c686d67b29d796c2228b8b9bbd19f9519186 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 06d8e7da01a7e3095e4ff7a6697693233173dc59 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 1de1420b94..c19b4f8958 100644
+index 8e7d4f1b86..b46c574325 100644
@@ -23,3 +24,3 @@
-@@ -2918,14 +2918,6 @@ for port 0 and queue 0::
-
- testpmd> set port cman config 0 0 obj queue mode red 10 100 1
+@@ -2843,14 +2843,6 @@ where:
+ * ``red`` enable 1, disable 0 marking IP ecn for yellow marked packets with ecn of 2'b01 or 2'b10
+ to ecn of 2'b11 when IP is caring TCP or SCTP
@@ -38 +39 @@
-@@ -2935,10 +2927,6 @@ Control of the generic flow API (*rte_flow*) is fully exposed through the
+@@ -2860,10 +2852,6 @@ Control of the generic flow API (*rte_flow*) is fully exposed through the
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'app/testpmd: fix parsing for connection tracking item' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (56 preceding siblings ...)
2024-07-15 15:26 ` patch 'doc: remove empty section from testpmd guide' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/txgbe: fix tunnel packet parsing' " luca.boccassi
` (26 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Maayan Kashani; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/40700232bad00df0fbc10bcf6138ae9f1dbb2386
Thanks.
Luca Boccassi
---
From 40700232bad00df0fbc10bcf6138ae9f1dbb2386 Mon Sep 17 00:00:00 2001
From: Maayan Kashani <mkashani@nvidia.com>
Date: Sun, 2 Jun 2024 13:23:26 +0300
Subject: [PATCH] app/testpmd: fix parsing for connection tracking item
[ upstream commit 944e5f43ffdb847c7a04edd8ae90baa899a8c697 ]
In command line translation there were missing fields for
connection tracking item, as a result this item was not parsed
and was missing from the items list received from test-pmd.
Fixes: 4d07cbefe3ba ("app/testpmd: add commands for conntrack")
Signed-off-by: Maayan Kashani <mkashani@nvidia.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
app/test-pmd/cmdline_flow.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 6970f90307..5d97625b05 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -4772,9 +4772,12 @@ static const struct token token_list[] = {
[ITEM_CONNTRACK] = {
.name = "conntrack",
.help = "conntrack state",
+ .priv = PRIV_ITEM(CONNTRACK,
+ sizeof(struct rte_flow_item_conntrack)),
.next = NEXT(NEXT_ENTRY(ITEM_NEXT), NEXT_ENTRY(COMMON_UNSIGNED),
item_param),
.args = ARGS(ARGS_ENTRY(struct rte_flow_item_conntrack, flags)),
+ .call = parse_vc,
},
[ITEM_PORT_REPRESENTOR] = {
.name = "port_representor",
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:37.565083798 +0100
+++ 0059-app-testpmd-fix-parsing-for-connection-tracking-item.patch 2024-07-15 16:19:34.644208086 +0100
@@ -1 +1 @@
-From 944e5f43ffdb847c7a04edd8ae90baa899a8c697 Mon Sep 17 00:00:00 2001
+From 40700232bad00df0fbc10bcf6138ae9f1dbb2386 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 944e5f43ffdb847c7a04edd8ae90baa899a8c697 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index aca3547c74..a76b44bf39 100644
+index 6970f90307..5d97625b05 100644
@@ -23 +24 @@
-@@ -5863,9 +5863,12 @@ static const struct token token_list[] = {
+@@ -4772,9 +4772,12 @@ static const struct token token_list[] = {
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/txgbe: fix tunnel packet parsing' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (57 preceding siblings ...)
2024-07-15 15:26 ` patch 'app/testpmd: fix parsing for connection tracking item' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/txgbe: fix flow filters in VT mode' " luca.boccassi
` (25 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Jiawen Wu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f0b14e140140412d16c5cdd8ee16138fefcb8ba9
Thanks.
Luca Boccassi
---
From f0b14e140140412d16c5cdd8ee16138fefcb8ba9 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:32 +0800
Subject: [PATCH] net/txgbe: fix tunnel packet parsing
[ upstream commit 60847e50b5280effa6e92a452bbb36fa7051db28 ]
The outer-ipv6 tunnel packet was parsed to the wrong packet type, remove
the default RTE_PTYPE_L2_ETHER and RTE_PTYPE_L3_IPV4 flags for tunnel
packets. And correct the calculation of tunnel length for GRE and GENEVE
packets.
Fixes: ca46fcd753b1 ("net/txgbe: support Tx with hardware offload")
Fixes: e5ece1f467aa ("net/txgbe: fix VXLAN-GPE packet checksum")
Fixes: 0e32d6edd479 ("net/txgbe: fix packet type to parse from offload flags")
Fixes: 5bbaf75ed6df ("net/txgbe: fix GRE tunnel packet checksum")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/txgbe/txgbe_rxtx.c | 71 ++++++++++++++++++----------------
1 file changed, 38 insertions(+), 33 deletions(-)
diff --git a/drivers/net/txgbe/txgbe_rxtx.c b/drivers/net/txgbe/txgbe_rxtx.c
index 24fc34d3c4..7c4c448d88 100644
--- a/drivers/net/txgbe/txgbe_rxtx.c
+++ b/drivers/net/txgbe/txgbe_rxtx.c
@@ -564,26 +564,17 @@ tx_desc_ol_flags_to_ptype(uint64_t oflags)
switch (oflags & RTE_MBUF_F_TX_TUNNEL_MASK) {
case RTE_MBUF_F_TX_TUNNEL_VXLAN:
case RTE_MBUF_F_TX_TUNNEL_VXLAN_GPE:
- ptype |= RTE_PTYPE_L2_ETHER |
- RTE_PTYPE_L3_IPV4 |
- RTE_PTYPE_TUNNEL_GRENAT;
+ ptype |= RTE_PTYPE_TUNNEL_GRENAT;
break;
case RTE_MBUF_F_TX_TUNNEL_GRE:
- ptype |= RTE_PTYPE_L2_ETHER |
- RTE_PTYPE_L3_IPV4 |
- RTE_PTYPE_TUNNEL_GRE;
+ ptype |= RTE_PTYPE_TUNNEL_GRE;
break;
case RTE_MBUF_F_TX_TUNNEL_GENEVE:
- ptype |= RTE_PTYPE_L2_ETHER |
- RTE_PTYPE_L3_IPV4 |
- RTE_PTYPE_TUNNEL_GENEVE;
- ptype |= RTE_PTYPE_INNER_L2_ETHER;
+ ptype |= RTE_PTYPE_TUNNEL_GENEVE;
break;
case RTE_MBUF_F_TX_TUNNEL_IPIP:
case RTE_MBUF_F_TX_TUNNEL_IP:
- ptype |= RTE_PTYPE_L2_ETHER |
- RTE_PTYPE_L3_IPV4 |
- RTE_PTYPE_TUNNEL_IP;
+ ptype |= RTE_PTYPE_TUNNEL_IP;
break;
}
@@ -667,11 +658,20 @@ txgbe_xmit_cleanup(struct txgbe_tx_queue *txq)
return 0;
}
+#define GRE_CHECKSUM_PRESENT 0x8000
+#define GRE_KEY_PRESENT 0x2000
+#define GRE_SEQUENCE_PRESENT 0x1000
+#define GRE_EXT_LEN 4
+#define GRE_SUPPORTED_FIELDS (GRE_CHECKSUM_PRESENT | GRE_KEY_PRESENT |\
+ GRE_SEQUENCE_PRESENT)
+
static inline uint8_t
txgbe_get_tun_len(struct rte_mbuf *mbuf)
{
struct txgbe_genevehdr genevehdr;
const struct txgbe_genevehdr *gh;
+ const struct txgbe_grehdr *grh;
+ struct txgbe_grehdr grehdr;
uint8_t tun_len;
switch (mbuf->ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK) {
@@ -684,11 +684,16 @@ txgbe_get_tun_len(struct rte_mbuf *mbuf)
+ sizeof(struct txgbe_vxlanhdr);
break;
case RTE_MBUF_F_TX_TUNNEL_GRE:
- tun_len = sizeof(struct txgbe_nvgrehdr);
- break;
- case RTE_MBUF_F_TX_TUNNEL_GENEVE:
- gh = rte_pktmbuf_read(mbuf,
+ tun_len = sizeof(struct txgbe_grehdr);
+ grh = rte_pktmbuf_read(mbuf,
mbuf->outer_l2_len + mbuf->outer_l3_len,
+ sizeof(grehdr), &grehdr);
+ if (grh->flags & rte_cpu_to_be_16(GRE_SUPPORTED_FIELDS))
+ tun_len += GRE_EXT_LEN;
+ break;
+ case RTE_MBUF_F_TX_TUNNEL_GENEVE:
+ gh = rte_pktmbuf_read(mbuf, mbuf->outer_l2_len +
+ mbuf->outer_l3_len + sizeof(struct txgbe_udphdr),
sizeof(genevehdr), &genevehdr);
tun_len = sizeof(struct txgbe_udphdr)
+ sizeof(struct txgbe_genevehdr)
@@ -702,27 +707,26 @@ txgbe_get_tun_len(struct rte_mbuf *mbuf)
}
static inline uint8_t
-txgbe_parse_tun_ptid(struct rte_mbuf *tx_pkt)
+txgbe_parse_tun_ptid(struct rte_mbuf *tx_pkt, uint8_t tun_len)
{
- uint64_t l2_vxlan, l2_vxlan_mac, l2_vxlan_mac_vlan;
- uint64_t l2_gre, l2_gre_mac, l2_gre_mac_vlan;
+ uint64_t inner_l2_len;
uint8_t ptid = 0;
- l2_vxlan = sizeof(struct txgbe_udphdr) + sizeof(struct txgbe_vxlanhdr);
- l2_vxlan_mac = l2_vxlan + sizeof(struct rte_ether_hdr);
- l2_vxlan_mac_vlan = l2_vxlan_mac + sizeof(struct rte_vlan_hdr);
+ inner_l2_len = tx_pkt->l2_len - tun_len;
- l2_gre = sizeof(struct txgbe_grehdr);
- l2_gre_mac = l2_gre + sizeof(struct rte_ether_hdr);
- l2_gre_mac_vlan = l2_gre_mac + sizeof(struct rte_vlan_hdr);
-
- if (tx_pkt->l2_len == l2_vxlan || tx_pkt->l2_len == l2_gre)
+ switch (inner_l2_len) {
+ case 0:
ptid = TXGBE_PTID_TUN_EIG;
- else if (tx_pkt->l2_len == l2_vxlan_mac || tx_pkt->l2_len == l2_gre_mac)
+ break;
+ case sizeof(struct rte_ether_hdr):
ptid = TXGBE_PTID_TUN_EIGM;
- else if (tx_pkt->l2_len == l2_vxlan_mac_vlan ||
- tx_pkt->l2_len == l2_gre_mac_vlan)
+ break;
+ case sizeof(struct rte_ether_hdr) + sizeof(struct rte_vlan_hdr):
ptid = TXGBE_PTID_TUN_EIGMV;
+ break;
+ default:
+ ptid = TXGBE_PTID_TUN_EI;
+ }
return ptid;
}
@@ -789,8 +793,6 @@ txgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
tx_ol_req = ol_flags & TXGBE_TX_OFFLOAD_MASK;
if (tx_ol_req) {
tx_offload.ptid = tx_desc_ol_flags_to_ptid(tx_ol_req);
- if (tx_offload.ptid & TXGBE_PTID_PKT_TUN)
- tx_offload.ptid |= txgbe_parse_tun_ptid(tx_pkt);
tx_offload.l2_len = tx_pkt->l2_len;
tx_offload.l3_len = tx_pkt->l3_len;
tx_offload.l4_len = tx_pkt->l4_len;
@@ -799,6 +801,9 @@ txgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
tx_offload.outer_l2_len = tx_pkt->outer_l2_len;
tx_offload.outer_l3_len = tx_pkt->outer_l3_len;
tx_offload.outer_tun_len = txgbe_get_tun_len(tx_pkt);
+ if (tx_offload.ptid & TXGBE_PTID_PKT_TUN)
+ tx_offload.ptid |= txgbe_parse_tun_ptid(tx_pkt,
+ tx_offload.outer_tun_len);
#ifdef RTE_LIB_SECURITY
if (use_ipsec) {
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:37.618150963 +0100
+++ 0060-net-txgbe-fix-tunnel-packet-parsing.patch 2024-07-15 16:19:34.648208171 +0100
@@ -1 +1 @@
-From 60847e50b5280effa6e92a452bbb36fa7051db28 Mon Sep 17 00:00:00 2001
+From f0b14e140140412d16c5cdd8ee16138fefcb8ba9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 60847e50b5280effa6e92a452bbb36fa7051db28 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 4b78e68a40..7731ad8491 100644
+index 24fc34d3c4..7c4c448d88 100644
@@ -26 +27 @@
-@@ -586,26 +586,17 @@ tx_desc_ol_flags_to_ptype(uint64_t oflags)
+@@ -564,26 +564,17 @@ tx_desc_ol_flags_to_ptype(uint64_t oflags)
@@ -57 +58 @@
-@@ -689,11 +680,20 @@ txgbe_xmit_cleanup(struct txgbe_tx_queue *txq)
+@@ -667,11 +658,20 @@ txgbe_xmit_cleanup(struct txgbe_tx_queue *txq)
@@ -78 +79 @@
-@@ -706,11 +706,16 @@ txgbe_get_tun_len(struct rte_mbuf *mbuf)
+@@ -684,11 +684,16 @@ txgbe_get_tun_len(struct rte_mbuf *mbuf)
@@ -99 +100 @@
-@@ -724,27 +729,26 @@ txgbe_get_tun_len(struct rte_mbuf *mbuf)
+@@ -702,27 +707,26 @@ txgbe_get_tun_len(struct rte_mbuf *mbuf)
@@ -140 +141 @@
-@@ -811,8 +815,6 @@ txgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -789,8 +793,6 @@ txgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
@@ -149 +150 @@
-@@ -821,6 +823,9 @@ txgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -799,6 +801,9 @@ txgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/txgbe: fix flow filters in VT mode' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (58 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/txgbe: fix tunnel packet parsing' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/txgbe: fix Tx hang on queue disable' " luca.boccassi
` (24 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Jiawen Wu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/500f540c7c667139c62853ec1b23e8fcbddc07b4
Thanks.
Luca Boccassi
---
From 500f540c7c667139c62853ec1b23e8fcbddc07b4 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:33 +0800
Subject: [PATCH] net/txgbe: fix flow filters in VT mode
[ upstream commit af8c90f424ff704578971fb07f5005d4615c9f3e ]
In virtualization mode, target pool should be determined for the
filters. For ether type filter, virtualization mode must be enabled
to filter broadcast/multicast packets due to hardware limitations.
Fixes: f8e2cfc7702b ("net/txgbe: support ethertype filter add and delete")
Fixes: 77a72b4d9dc0 ("net/txgbe: support ntuple filter add and delete")
Fixes: 983a4ef2265b ("net/txgbe: support syn filter add and delete")
Fixes: 08d61139be0a ("net/txgbe: support flow director filter add and delete")
Fixes: 9fdfed08a5e3 ("net/txgbe: restore RSS filter")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/txgbe/txgbe_ethdev.c | 24 +++++++++++++++++++++---
drivers/net/txgbe/txgbe_fdir.c | 3 +++
drivers/net/txgbe/txgbe_rxtx.c | 8 +++++++-
3 files changed, 31 insertions(+), 4 deletions(-)
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index 001f8c6473..30a2d6495a 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -3914,6 +3914,7 @@ txgbe_syn_filter_set(struct rte_eth_dev *dev,
struct txgbe_filter_info *filter_info = TXGBE_DEV_FILTER(dev);
uint32_t syn_info;
uint32_t synqf;
+ uint16_t queue;
if (filter->queue >= TXGBE_MAX_RX_QUEUE_NUM)
return -EINVAL;
@@ -3923,7 +3924,11 @@ txgbe_syn_filter_set(struct rte_eth_dev *dev,
if (add) {
if (syn_info & TXGBE_SYNCLS_ENA)
return -EINVAL;
- synqf = (uint32_t)TXGBE_SYNCLS_QPID(filter->queue);
+ if (RTE_ETH_DEV_SRIOV(dev).active)
+ queue = RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx + filter->queue;
+ else
+ queue = filter->queue;
+ synqf = (uint32_t)TXGBE_SYNCLS_QPID(queue);
synqf |= TXGBE_SYNCLS_ENA;
if (filter->hig_pri)
@@ -3992,7 +3997,10 @@ txgbe_inject_5tuple_filter(struct rte_eth_dev *dev,
wr32(hw, TXGBE_5TFPORT(i), sdpqf);
wr32(hw, TXGBE_5TFCTL0(i), ftqf);
- l34timir |= TXGBE_5TFCTL1_QP(filter->queue);
+ if (RTE_ETH_DEV_SRIOV(dev).active)
+ l34timir |= TXGBE_5TFCTL1_QP(RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx + filter->queue);
+ else
+ l34timir |= TXGBE_5TFCTL1_QP(filter->queue);
wr32(hw, TXGBE_5TFCTL1(i), l34timir);
}
@@ -4276,7 +4284,17 @@ txgbe_add_del_ethertype_filter(struct rte_eth_dev *dev,
if (add) {
etqf = TXGBE_ETFLT_ENA;
etqf |= TXGBE_ETFLT_ETID(filter->ether_type);
- etqs |= TXGBE_ETCLS_QPID(filter->queue);
+ if (RTE_ETH_DEV_SRIOV(dev).active) {
+ int pool, queue;
+
+ pool = RTE_ETH_DEV_SRIOV(dev).def_vmdq_idx;
+ queue = RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx + filter->queue;
+ etqf |= TXGBE_ETFLT_POOLENA;
+ etqf |= TXGBE_ETFLT_POOL(pool);
+ etqs |= TXGBE_ETCLS_QPID(queue);
+ } else {
+ etqs |= TXGBE_ETCLS_QPID(filter->queue);
+ }
etqs |= TXGBE_ETCLS_QENA;
ethertype_filter.ethertype = filter->ether_type;
diff --git a/drivers/net/txgbe/txgbe_fdir.c b/drivers/net/txgbe/txgbe_fdir.c
index a198b6781b..f627ab681d 100644
--- a/drivers/net/txgbe/txgbe_fdir.c
+++ b/drivers/net/txgbe/txgbe_fdir.c
@@ -844,6 +844,9 @@ txgbe_fdir_filter_program(struct rte_eth_dev *dev,
return -EINVAL;
}
+ if (RTE_ETH_DEV_SRIOV(dev).active)
+ queue = RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx + queue;
+
node = txgbe_fdir_filter_lookup(info, &rule->input);
if (node) {
if (!update) {
diff --git a/drivers/net/txgbe/txgbe_rxtx.c b/drivers/net/txgbe/txgbe_rxtx.c
index 7c4c448d88..910d232ab0 100644
--- a/drivers/net/txgbe/txgbe_rxtx.c
+++ b/drivers/net/txgbe/txgbe_rxtx.c
@@ -5074,6 +5074,7 @@ txgbe_config_rss_filter(struct rte_eth_dev *dev,
uint32_t reta;
uint16_t i;
uint16_t j;
+ uint16_t queue;
struct rte_eth_rss_conf rss_conf = {
.rss_key = conf->conf.key_len ?
(void *)(uintptr_t)conf->conf.key : NULL,
@@ -5106,7 +5107,12 @@ txgbe_config_rss_filter(struct rte_eth_dev *dev,
for (i = 0, j = 0; i < RTE_ETH_RSS_RETA_SIZE_128; i++, j++) {
if (j == conf->conf.queue_num)
j = 0;
- reta = (reta >> 8) | LS32(conf->conf.queue[j], 24, 0xFF);
+ if (RTE_ETH_DEV_SRIOV(dev).active)
+ queue = RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx +
+ conf->conf.queue[j];
+ else
+ queue = conf->conf.queue[j];
+ reta = (reta >> 8) | LS32(queue, 24, 0xFF);
if ((i & 3) == 3)
wr32at(hw, TXGBE_REG_RSSTBL, i >> 2, reta);
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:37.664337877 +0100
+++ 0061-net-txgbe-fix-flow-filters-in-VT-mode.patch 2024-07-15 16:19:34.656208342 +0100
@@ -1 +1 @@
-From af8c90f424ff704578971fb07f5005d4615c9f3e Mon Sep 17 00:00:00 2001
+From 500f540c7c667139c62853ec1b23e8fcbddc07b4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit af8c90f424ff704578971fb07f5005d4615c9f3e ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 6d11412616..fa68a5d2ca 100644
+index 001f8c6473..30a2d6495a 100644
@@ -28 +29 @@
-@@ -4011,6 +4011,7 @@ txgbe_syn_filter_set(struct rte_eth_dev *dev,
+@@ -3914,6 +3914,7 @@ txgbe_syn_filter_set(struct rte_eth_dev *dev,
@@ -36 +37 @@
-@@ -4020,7 +4021,11 @@ txgbe_syn_filter_set(struct rte_eth_dev *dev,
+@@ -3923,7 +3924,11 @@ txgbe_syn_filter_set(struct rte_eth_dev *dev,
@@ -49 +50 @@
-@@ -4089,7 +4094,10 @@ txgbe_inject_5tuple_filter(struct rte_eth_dev *dev,
+@@ -3992,7 +3997,10 @@ txgbe_inject_5tuple_filter(struct rte_eth_dev *dev,
@@ -61 +62 @@
-@@ -4373,7 +4381,17 @@ txgbe_add_del_ethertype_filter(struct rte_eth_dev *dev,
+@@ -4276,7 +4284,17 @@ txgbe_add_del_ethertype_filter(struct rte_eth_dev *dev,
@@ -95 +96 @@
-index 7731ad8491..35f80d73ac 100644
+index 7c4c448d88..910d232ab0 100644
@@ -98 +99 @@
-@@ -5160,6 +5160,7 @@ txgbe_config_rss_filter(struct rte_eth_dev *dev,
+@@ -5074,6 +5074,7 @@ txgbe_config_rss_filter(struct rte_eth_dev *dev,
@@ -106 +107 @@
-@@ -5192,7 +5193,12 @@ txgbe_config_rss_filter(struct rte_eth_dev *dev,
+@@ -5106,7 +5107,12 @@ txgbe_config_rss_filter(struct rte_eth_dev *dev,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/txgbe: fix Tx hang on queue disable' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (59 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/txgbe: fix flow filters in VT mode' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/txgbe: restrict configuration of VLAN strip offload' " luca.boccassi
` (23 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Jiawen Wu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a96f251defbcc1501cca4da1b7ed6a44137216c6
Thanks.
Luca Boccassi
---
From a96f251defbcc1501cca4da1b7ed6a44137216c6 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:34 +0800
Subject: [PATCH] net/txgbe: fix Tx hang on queue disable
[ upstream commit 8a31f4bbbbb73baf77297f00887f4b267feb7b8e ]
The problem of Tx hang also occurs on Wangxun 10Gb NICs, when stop
device under heavy traffic.
Refer to commit ac6c5e9af56a ("net/ngbe: fix Tx hang on queue disable")
Disable PCIe bus master to clear BME when stop hardware, and verify
there are no pending requests. Move disabling Tx queue after disabling
PCIe bus master to ensure that there are no packets left to cause Tx
hang.
Fixes: b1f596677d8e ("net/txgbe: support device start")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/txgbe/base/meson.build | 2 +-
drivers/net/txgbe/base/txgbe_hw.c | 60 +++++++++++++++++++++++-----
drivers/net/txgbe/base/txgbe_hw.h | 1 +
drivers/net/txgbe/base/txgbe_osdep.h | 1 +
drivers/net/txgbe/base/txgbe_regs.h | 3 ++
drivers/net/txgbe/base/txgbe_type.h | 1 +
drivers/net/txgbe/txgbe_ethdev.c | 7 ++++
7 files changed, 65 insertions(+), 10 deletions(-)
diff --git a/drivers/net/txgbe/base/meson.build b/drivers/net/txgbe/base/meson.build
index a81d6890fe..4cf90a394a 100644
--- a/drivers/net/txgbe/base/meson.build
+++ b/drivers/net/txgbe/base/meson.build
@@ -22,6 +22,6 @@ foreach flag: error_cflags
endforeach
base_lib = static_library('txgbe_base', sources,
- dependencies: [static_rte_eal, static_rte_net],
+ dependencies: [static_rte_eal, static_rte_net, static_rte_bus_pci],
c_args: c_args)
base_objs = base_lib.extract_all_objects(recursive: true)
diff --git a/drivers/net/txgbe/base/txgbe_hw.c b/drivers/net/txgbe/base/txgbe_hw.c
index de96549ae8..b59667f1d7 100644
--- a/drivers/net/txgbe/base/txgbe_hw.c
+++ b/drivers/net/txgbe/base/txgbe_hw.c
@@ -462,7 +462,7 @@ void txgbe_set_lan_id_multi_port(struct txgbe_hw *hw)
**/
s32 txgbe_stop_hw(struct txgbe_hw *hw)
{
- u32 reg_val;
+ s32 status = 0;
u16 i;
/*
@@ -484,16 +484,26 @@ s32 txgbe_stop_hw(struct txgbe_hw *hw)
wr32(hw, TXGBE_ICR(0), TXGBE_ICR_MASK);
wr32(hw, TXGBE_ICR(1), TXGBE_ICR_MASK);
+ wr32(hw, TXGBE_BMECTL, 0x3);
+
+ /* Disable the receive unit by stopping each queue */
+ for (i = 0; i < hw->mac.max_rx_queues; i++)
+ wr32(hw, TXGBE_RXCFG(i), 0);
+
+ /* flush all queues disables */
+ txgbe_flush(hw);
+ msec_delay(2);
+
+ /* Prevent the PCI-E bus from hanging by disabling PCI-E master
+ * access and verify no pending requests
+ */
+ status = txgbe_set_pcie_master(hw, false);
+ if (status)
+ return status;
+
/* Disable the transmit unit. Each queue must be disabled. */
for (i = 0; i < hw->mac.max_tx_queues; i++)
- wr32(hw, TXGBE_TXCFG(i), TXGBE_TXCFG_FLUSH);
-
- /* Disable the receive unit by stopping each queue */
- for (i = 0; i < hw->mac.max_rx_queues; i++) {
- reg_val = rd32(hw, TXGBE_RXCFG(i));
- reg_val &= ~TXGBE_RXCFG_ENA;
- wr32(hw, TXGBE_RXCFG(i), reg_val);
- }
+ wr32(hw, TXGBE_TXCFG(i), 0);
/* flush all queues disables */
txgbe_flush(hw);
@@ -1174,6 +1184,38 @@ out:
}
}
+s32 txgbe_set_pcie_master(struct txgbe_hw *hw, bool enable)
+{
+ struct rte_pci_device *pci_dev = (struct rte_pci_device *)hw->back;
+ s32 status = 0;
+ u32 i;
+
+ if (rte_pci_set_bus_master(pci_dev, enable) < 0) {
+ DEBUGOUT("Cannot configure PCI bus master.");
+ return -1;
+ }
+
+ if (enable)
+ goto out;
+
+ /* Exit if master requests are blocked */
+ if (!(rd32(hw, TXGBE_BMEPEND)))
+ goto out;
+
+ /* Poll for master request bit to clear */
+ for (i = 0; i < TXGBE_PCI_MASTER_DISABLE_TIMEOUT; i++) {
+ usec_delay(100);
+ if (!(rd32(hw, TXGBE_BMEPEND)))
+ goto out;
+ }
+
+ DEBUGOUT("PCIe transaction pending bit also did not clear.");
+ status = TXGBE_ERR_MASTER_REQUESTS_PENDING;
+
+out:
+ return status;
+}
+
/**
* txgbe_acquire_swfw_sync - Acquire SWFW semaphore
* @hw: pointer to hardware structure
diff --git a/drivers/net/txgbe/base/txgbe_hw.h b/drivers/net/txgbe/base/txgbe_hw.h
index 7031589f7c..4bf9da2d4c 100644
--- a/drivers/net/txgbe/base/txgbe_hw.h
+++ b/drivers/net/txgbe/base/txgbe_hw.h
@@ -40,6 +40,7 @@ s32 txgbe_setup_fc(struct txgbe_hw *hw);
s32 txgbe_validate_mac_addr(u8 *mac_addr);
s32 txgbe_acquire_swfw_sync(struct txgbe_hw *hw, u32 mask);
void txgbe_release_swfw_sync(struct txgbe_hw *hw, u32 mask);
+s32 txgbe_set_pcie_master(struct txgbe_hw *hw, bool enable);
s32 txgbe_get_san_mac_addr(struct txgbe_hw *hw, u8 *san_mac_addr);
s32 txgbe_set_san_mac_addr(struct txgbe_hw *hw, u8 *san_mac_addr);
diff --git a/drivers/net/txgbe/base/txgbe_osdep.h b/drivers/net/txgbe/base/txgbe_osdep.h
index b62c0b0824..0d9492c3cb 100644
--- a/drivers/net/txgbe/base/txgbe_osdep.h
+++ b/drivers/net/txgbe/base/txgbe_osdep.h
@@ -19,6 +19,7 @@
#include <rte_config.h>
#include <rte_io.h>
#include <rte_ether.h>
+#include <bus_pci_driver.h>
#include "../txgbe_logs.h"
diff --git a/drivers/net/txgbe/base/txgbe_regs.h b/drivers/net/txgbe/base/txgbe_regs.h
index 79290a7afe..86896d11dc 100644
--- a/drivers/net/txgbe/base/txgbe_regs.h
+++ b/drivers/net/txgbe/base/txgbe_regs.h
@@ -1236,6 +1236,9 @@ enum txgbe_5tuple_protocol {
#define TXGBE_TCPTMR 0x000170
#define TXGBE_ITRSEL 0x000180
+#define TXGBE_BMECTL 0x012020
+#define TXGBE_BMEPEND 0x000168
+
/* P2V Mailbox */
#define TXGBE_MBMEM(i) (0x005000 + 0x40 * (i)) /* 0-63 */
#define TXGBE_MBCTL(i) (0x000600 + 4 * (i)) /* 0-63 */
diff --git a/drivers/net/txgbe/base/txgbe_type.h b/drivers/net/txgbe/base/txgbe_type.h
index 75e839b7de..f52736cae9 100644
--- a/drivers/net/txgbe/base/txgbe_type.h
+++ b/drivers/net/txgbe/base/txgbe_type.h
@@ -29,6 +29,7 @@
#define TXGBE_FDIRCMD_CMD_POLL 10
#define TXGBE_VF_INIT_TIMEOUT 200 /* Number of retries to clear RSTI */
#define TXGBE_SPI_TIMEOUT 10000
+#define TXGBE_PCI_MASTER_DISABLE_TIMEOUT 800
#define TXGBE_ALIGN 128 /* as intel did */
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index 30a2d6495a..862cdc55cc 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -600,6 +600,7 @@ eth_txgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
hw->hw_addr = (void *)pci_dev->mem_resource[0].addr;
/* Vendor and Device ID need to be set before init of shared code */
+ hw->back = pci_dev;
hw->device_id = pci_dev->id.device_id;
hw->vendor_id = pci_dev->id.vendor_id;
if (pci_dev->id.subsystem_vendor_id == PCI_VENDOR_ID_WANGXUN) {
@@ -1704,6 +1705,8 @@ txgbe_dev_start(struct rte_eth_dev *dev)
hw->mac.get_link_status = true;
hw->dev_start = true;
+ txgbe_set_pcie_master(hw, true);
+
/* workaround for GPIO intr lost when mng_veto bit is set */
if (txgbe_check_reset_blocked(hw))
txgbe_reinit_gpio_intr(hw);
@@ -1966,6 +1969,8 @@ txgbe_dev_stop(struct rte_eth_dev *dev)
adapter->rss_reta_updated = 0;
wr32m(hw, TXGBE_LEDCTL, 0xFFFFFFFF, TXGBE_LEDCTL_SEL_MASK);
+ txgbe_set_pcie_master(hw, true);
+
hw->adapter_stopped = true;
dev->data->dev_started = 0;
hw->dev_start = false;
@@ -2048,6 +2053,8 @@ txgbe_dev_close(struct rte_eth_dev *dev)
txgbe_dev_free_queues(dev);
+ txgbe_set_pcie_master(hw, false);
+
/* reprogram the RAR[0] in case user changed it. */
txgbe_set_rar(hw, 0, hw->mac.addr, 0, true);
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:37.715791505 +0100
+++ 0062-net-txgbe-fix-Tx-hang-on-queue-disable.patch 2024-07-15 16:19:34.668208598 +0100
@@ -1 +1 @@
-From 8a31f4bbbbb73baf77297f00887f4b267feb7b8e Mon Sep 17 00:00:00 2001
+From a96f251defbcc1501cca4da1b7ed6a44137216c6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8a31f4bbbbb73baf77297f00887f4b267feb7b8e ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -43 +44 @@
-index d19fd0065d..7094551fee 100644
+index de96549ae8..b59667f1d7 100644
@@ -142 +143 @@
-index 4fce355000..62d16a6abb 100644
+index b62c0b0824..0d9492c3cb 100644
@@ -180 +181 @@
-index fa68a5d2ca..121dccb5eb 100644
+index 30a2d6495a..862cdc55cc 100644
@@ -183 +184 @@
-@@ -601,6 +601,7 @@ eth_txgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
+@@ -600,6 +600,7 @@ eth_txgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
@@ -191 +192 @@
-@@ -1717,6 +1718,8 @@ txgbe_dev_start(struct rte_eth_dev *dev)
+@@ -1704,6 +1705,8 @@ txgbe_dev_start(struct rte_eth_dev *dev)
@@ -200 +201 @@
-@@ -1980,6 +1983,8 @@ txgbe_dev_stop(struct rte_eth_dev *dev)
+@@ -1966,6 +1969,8 @@ txgbe_dev_stop(struct rte_eth_dev *dev)
@@ -209 +210 @@
-@@ -2062,6 +2067,8 @@ txgbe_dev_close(struct rte_eth_dev *dev)
+@@ -2048,6 +2053,8 @@ txgbe_dev_close(struct rte_eth_dev *dev)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/txgbe: restrict configuration of VLAN strip offload' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (60 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/txgbe: fix Tx hang on queue disable' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/txgbe: reconfigure more MAC Rx registers' " luca.boccassi
` (22 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Jiawen Wu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/7b6163ebfad77fd4f2ce33b7bbb32cfc34294b81
Thanks.
Luca Boccassi
---
From 7b6163ebfad77fd4f2ce33b7bbb32cfc34294b81 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:35 +0800
Subject: [PATCH] net/txgbe: restrict configuration of VLAN strip offload
[ upstream commit 66364efcf95884b97b71aaff697f8597a286f52e ]
There is a hardware limitation that Rx ring config register is not
writable when Rx ring is enabled, i.e. the TXGBE_RXCFG_ENA bit is set.
But disabling the ring when there is traffic will cause ring get stuck.
So restrict the configuration of VLAN strip offload only if device is
started.
Fixes: 220b0e49bc47 ("net/txgbe: support VLAN")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/txgbe/txgbe_ethdev.c | 49 +++++++++++++-------------------
1 file changed, 20 insertions(+), 29 deletions(-)
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index 862cdc55cc..def3202ce8 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -999,41 +999,25 @@ txgbe_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
}
static void
-txgbe_vlan_strip_queue_set(struct rte_eth_dev *dev, uint16_t queue, int on)
+txgbe_vlan_strip_q_set(struct rte_eth_dev *dev, uint16_t queue, int on)
{
- struct txgbe_hw *hw = TXGBE_DEV_HW(dev);
- struct txgbe_rx_queue *rxq;
- bool restart;
- uint32_t rxcfg, rxbal, rxbah;
-
if (on)
txgbe_vlan_hw_strip_enable(dev, queue);
else
txgbe_vlan_hw_strip_disable(dev, queue);
+}
- rxq = dev->data->rx_queues[queue];
- rxbal = rd32(hw, TXGBE_RXBAL(rxq->reg_idx));
- rxbah = rd32(hw, TXGBE_RXBAH(rxq->reg_idx));
- rxcfg = rd32(hw, TXGBE_RXCFG(rxq->reg_idx));
- if (rxq->offloads & RTE_ETH_RX_OFFLOAD_VLAN_STRIP) {
- restart = (rxcfg & TXGBE_RXCFG_ENA) &&
- !(rxcfg & TXGBE_RXCFG_VLAN);
- rxcfg |= TXGBE_RXCFG_VLAN;
- } else {
- restart = (rxcfg & TXGBE_RXCFG_ENA) &&
- (rxcfg & TXGBE_RXCFG_VLAN);
- rxcfg &= ~TXGBE_RXCFG_VLAN;
- }
- rxcfg &= ~TXGBE_RXCFG_ENA;
+static void
+txgbe_vlan_strip_queue_set(struct rte_eth_dev *dev, uint16_t queue, int on)
+{
+ struct txgbe_hw *hw = TXGBE_DEV_HW(dev);
- if (restart) {
- /* set vlan strip for ring */
- txgbe_dev_rx_queue_stop(dev, queue);
- wr32(hw, TXGBE_RXBAL(rxq->reg_idx), rxbal);
- wr32(hw, TXGBE_RXBAH(rxq->reg_idx), rxbah);
- wr32(hw, TXGBE_RXCFG(rxq->reg_idx), rxcfg);
- txgbe_dev_rx_queue_start(dev, queue);
+ if (!hw->adapter_stopped) {
+ PMD_DRV_LOG(ERR, "Please stop port first");
+ return;
}
+
+ txgbe_vlan_strip_q_set(dev, queue, on);
}
static int
@@ -1258,9 +1242,9 @@ txgbe_vlan_hw_strip_config(struct rte_eth_dev *dev)
rxq = dev->data->rx_queues[i];
if (rxq->offloads & RTE_ETH_RX_OFFLOAD_VLAN_STRIP)
- txgbe_vlan_strip_queue_set(dev, i, 1);
+ txgbe_vlan_strip_q_set(dev, i, 1);
else
- txgbe_vlan_strip_queue_set(dev, i, 0);
+ txgbe_vlan_strip_q_set(dev, i, 0);
}
}
@@ -1322,6 +1306,13 @@ txgbe_vlan_offload_config(struct rte_eth_dev *dev, int mask)
static int
txgbe_vlan_offload_set(struct rte_eth_dev *dev, int mask)
{
+ struct txgbe_hw *hw = TXGBE_DEV_HW(dev);
+
+ if (!hw->adapter_stopped && (mask & RTE_ETH_VLAN_STRIP_MASK)) {
+ PMD_DRV_LOG(ERR, "Please stop port first");
+ return -EPERM;
+ }
+
txgbe_config_vlan_strip_on_all_queues(dev, mask);
txgbe_vlan_offload_config(dev, mask);
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:37.768383592 +0100
+++ 0063-net-txgbe-restrict-configuration-of-VLAN-strip-offlo.patch 2024-07-15 16:19:34.672208684 +0100
@@ -1 +1 @@
-From 66364efcf95884b97b71aaff697f8597a286f52e Mon Sep 17 00:00:00 2001
+From 7b6163ebfad77fd4f2ce33b7bbb32cfc34294b81 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 66364efcf95884b97b71aaff697f8597a286f52e ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 121dccb5eb..a59d964a5b 100644
+index 862cdc55cc..def3202ce8 100644
@@ -24 +25 @@
-@@ -1000,41 +1000,25 @@ txgbe_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
+@@ -999,41 +999,25 @@ txgbe_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
@@ -77 +78 @@
-@@ -1259,9 +1243,9 @@ txgbe_vlan_hw_strip_config(struct rte_eth_dev *dev)
+@@ -1258,9 +1242,9 @@ txgbe_vlan_hw_strip_config(struct rte_eth_dev *dev)
@@ -89 +90 @@
-@@ -1323,6 +1307,13 @@ txgbe_vlan_offload_config(struct rte_eth_dev *dev, int mask)
+@@ -1322,6 +1306,13 @@ txgbe_vlan_offload_config(struct rte_eth_dev *dev, int mask)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/txgbe: reconfigure more MAC Rx registers' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (61 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/txgbe: restrict configuration of VLAN strip offload' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/txgbe: fix VF promiscuous and allmulticast' " luca.boccassi
` (21 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Jiawen Wu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/13909e4ba2cd08b6477e8b8d2f5f42c459e7215b
Thanks.
Luca Boccassi
---
From 13909e4ba2cd08b6477e8b8d2f5f42c459e7215b Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:36 +0800
Subject: [PATCH] net/txgbe: reconfigure more MAC Rx registers
[ upstream commit 3056288933f06afa72f8611ab7c4accdd01899fa ]
When link status changes, there is a probability that no more packets
can be received on the port, due to hardware defects. These MAC Rx
registers should be reconfigured to fix this problem.
Fixes: 950a6954df13 ("net/txgbe: reconfigure MAC Rx when link update")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/txgbe/base/txgbe_regs.h | 2 ++
drivers/net/txgbe/txgbe_ethdev.c | 8 +++++++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/net/txgbe/base/txgbe_regs.h b/drivers/net/txgbe/base/txgbe_regs.h
index 86896d11dc..a2984f1106 100644
--- a/drivers/net/txgbe/base/txgbe_regs.h
+++ b/drivers/net/txgbe/base/txgbe_regs.h
@@ -1022,6 +1022,8 @@ enum txgbe_5tuple_protocol {
#define TXGBE_MACRXFLT_CTL_PASS LS(3, 6, 0x3)
#define TXGBE_MACRXFLT_RXALL MS(31, 0x1)
+#define TXGBE_MAC_WDG_TIMEOUT 0x01100C
+
/******************************************************************************
* Statistic Registers
******************************************************************************/
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index def3202ce8..24e779c02c 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -2793,6 +2793,7 @@ txgbe_dev_link_update_share(struct rte_eth_dev *dev,
bool link_up;
int err;
int wait = 1;
+ u32 reg;
memset(&link, 0, sizeof(link));
link.link_status = RTE_ETH_LINK_DOWN;
@@ -2879,9 +2880,14 @@ txgbe_dev_link_update_share(struct rte_eth_dev *dev,
}
/* Re configure MAC RX */
- if (hw->mac.type == txgbe_mac_raptor)
+ if (hw->mac.type == txgbe_mac_raptor) {
+ reg = rd32(hw, TXGBE_MACRXCFG);
+ wr32(hw, TXGBE_MACRXCFG, reg);
wr32m(hw, TXGBE_MACRXFLT, TXGBE_MACRXFLT_PROMISC,
TXGBE_MACRXFLT_PROMISC);
+ reg = rd32(hw, TXGBE_MAC_WDG_TIMEOUT);
+ wr32(hw, TXGBE_MAC_WDG_TIMEOUT, reg);
+ }
return rte_eth_linkstatus_set(dev, &link);
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:37.813963967 +0100
+++ 0064-net-txgbe-reconfigure-more-MAC-Rx-registers.patch 2024-07-15 16:19:34.676208769 +0100
@@ -1 +1 @@
-From 3056288933f06afa72f8611ab7c4accdd01899fa Mon Sep 17 00:00:00 2001
+From 13909e4ba2cd08b6477e8b8d2f5f42c459e7215b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3056288933f06afa72f8611ab7c4accdd01899fa ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -33 +34 @@
-index a59d964a5b..699ff1c920 100644
+index def3202ce8..24e779c02c 100644
@@ -36 +37 @@
-@@ -2879,6 +2879,7 @@ txgbe_dev_link_update_share(struct rte_eth_dev *dev,
+@@ -2793,6 +2793,7 @@ txgbe_dev_link_update_share(struct rte_eth_dev *dev,
@@ -44 +45 @@
-@@ -2968,9 +2969,14 @@ txgbe_dev_link_update_share(struct rte_eth_dev *dev,
+@@ -2879,9 +2880,14 @@ txgbe_dev_link_update_share(struct rte_eth_dev *dev,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/txgbe: fix VF promiscuous and allmulticast' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (62 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/txgbe: reconfigure more MAC Rx registers' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/ngbe: add special config for YT8531SH-CA PHY' " luca.boccassi
` (20 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Jiawen Wu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/ee530d3ee42218d887a596d1f6df4fbff9074f13
Thanks.
Luca Boccassi
---
From ee530d3ee42218d887a596d1f6df4fbff9074f13 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:37 +0800
Subject: [PATCH] net/txgbe: fix VF promiscuous and allmulticast
[ upstream commit 055a51ff85112200706a07e99b92c9459774080a ]
The configuration of allmulti and promiscuous modes conflicts
together. For instance, if we enable promiscuous mode, then enable and
disable allmulti, then the promiscuous mode is wrongly disabled.
Fix this behavior by:
- doing nothing when we set/unset allmulti if promiscuous mode is on
- restorting the proper mode (none or allmulti) when we disable
promiscuous mode
Fixes: 29072d593fe4 ("net/txgbe: support VF promiscuous and allmulticast")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/txgbe/txgbe_ethdev_vf.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/net/txgbe/txgbe_ethdev_vf.c b/drivers/net/txgbe/txgbe_ethdev_vf.c
index f1341fbf7e..1d7f1dcd15 100644
--- a/drivers/net/txgbe/txgbe_ethdev_vf.c
+++ b/drivers/net/txgbe/txgbe_ethdev_vf.c
@@ -1201,9 +1201,13 @@ static int
txgbevf_dev_promiscuous_disable(struct rte_eth_dev *dev)
{
struct txgbe_hw *hw = TXGBE_DEV_HW(dev);
+ int mode = TXGBEVF_XCAST_MODE_NONE;
int ret;
- switch (hw->mac.update_xcast_mode(hw, TXGBEVF_XCAST_MODE_NONE)) {
+ if (dev->data->all_multicast)
+ mode = TXGBEVF_XCAST_MODE_ALLMULTI;
+
+ switch (hw->mac.update_xcast_mode(hw, mode)) {
case 0:
ret = 0;
break;
@@ -1224,6 +1228,9 @@ txgbevf_dev_allmulticast_enable(struct rte_eth_dev *dev)
struct txgbe_hw *hw = TXGBE_DEV_HW(dev);
int ret;
+ if (dev->data->promiscuous)
+ return 0;
+
switch (hw->mac.update_xcast_mode(hw, TXGBEVF_XCAST_MODE_ALLMULTI)) {
case 0:
ret = 0;
@@ -1245,6 +1252,9 @@ txgbevf_dev_allmulticast_disable(struct rte_eth_dev *dev)
struct txgbe_hw *hw = TXGBE_DEV_HW(dev);
int ret;
+ if (dev->data->promiscuous)
+ return 0;
+
switch (hw->mac.update_xcast_mode(hw, TXGBEVF_XCAST_MODE_MULTI)) {
case 0:
ret = 0;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:37.862151928 +0100
+++ 0065-net-txgbe-fix-VF-promiscuous-and-allmulticast.patch 2024-07-15 16:19:34.676208769 +0100
@@ -1 +1 @@
-From 055a51ff85112200706a07e99b92c9459774080a Mon Sep 17 00:00:00 2001
+From ee530d3ee42218d887a596d1f6df4fbff9074f13 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 055a51ff85112200706a07e99b92c9459774080a ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index ec40419289..6ac34058ab 100644
+index f1341fbf7e..1d7f1dcd15 100644
@@ -27 +28 @@
-@@ -1202,9 +1202,13 @@ static int
+@@ -1201,9 +1201,13 @@ static int
@@ -42 +43 @@
-@@ -1225,6 +1229,9 @@ txgbevf_dev_allmulticast_enable(struct rte_eth_dev *dev)
+@@ -1224,6 +1228,9 @@ txgbevf_dev_allmulticast_enable(struct rte_eth_dev *dev)
@@ -52 +53 @@
-@@ -1246,6 +1253,9 @@ txgbevf_dev_allmulticast_disable(struct rte_eth_dev *dev)
+@@ -1245,6 +1252,9 @@ txgbevf_dev_allmulticast_disable(struct rte_eth_dev *dev)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ngbe: add special config for YT8531SH-CA PHY' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (63 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/txgbe: fix VF promiscuous and allmulticast' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/ngbe: keep PHY power down while device probing' " luca.boccassi
` (19 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Jiawen Wu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/8b161ee9179e028aa632d53d9015add2eae79c87
Thanks.
Luca Boccassi
---
From 8b161ee9179e028aa632d53d9015add2eae79c87 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:38 +0800
Subject: [PATCH] net/ngbe: add special config for YT8531SH-CA PHY
[ upstream commit 79be49dd2d655f2f5e830f33115528276a994bae ]
YT8531SH-CA PHY will switch to SDS space automatically when UTP and
SDS media are not present, causing failure to link up. Add the special
configuration to fix it.
Fixes: 3d0af7066759 ("net/ngbe: setup PHY link")
Fixes: 1c44384fce76 ("net/ngbe: support custom PHY interfaces")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/ngbe/base/ngbe_phy_yt.c | 4 ++++
drivers/net/ngbe/base/ngbe_phy_yt.h | 2 ++
2 files changed, 6 insertions(+)
diff --git a/drivers/net/ngbe/base/ngbe_phy_yt.c b/drivers/net/ngbe/base/ngbe_phy_yt.c
index 754faadd6a..f6c979b1e7 100644
--- a/drivers/net/ngbe/base/ngbe_phy_yt.c
+++ b/drivers/net/ngbe/base/ngbe_phy_yt.c
@@ -290,6 +290,10 @@ skip_an:
value |= value_r4;
ngbe_write_phy_reg_mdi(hw, YT_ANA, 0, value);
+ /* config for yt8531sh-ca */
+ ngbe_write_phy_reg_ext_yt(hw, YT_SPEC_CONF, 0,
+ YT_SPEC_CONF_8531SH_CA);
+
/* software reset to make the above configuration
* take effect
*/
diff --git a/drivers/net/ngbe/base/ngbe_phy_yt.h b/drivers/net/ngbe/base/ngbe_phy_yt.h
index ddf992e79a..c45bec7ce7 100644
--- a/drivers/net/ngbe/base/ngbe_phy_yt.h
+++ b/drivers/net/ngbe/base/ngbe_phy_yt.h
@@ -32,6 +32,8 @@
#define YT_MISC 0xA006
#define YT_MISC_FIBER_PRIO MS16(8, 0x1) /* 0 for UTP */
#define YT_MISC_RESV MS16(0, 0x1)
+#define YT_SPEC_CONF 0xA023
+#define YT_SPEC_CONF_8531SH_CA 0x4031
/* SDS EXT */
#define YT_AUTO 0xA5
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:37.904117635 +0100
+++ 0066-net-ngbe-add-special-config-for-YT8531SH-CA-PHY.patch 2024-07-15 16:19:34.680208855 +0100
@@ -1 +1 @@
-From 79be49dd2d655f2f5e830f33115528276a994bae Mon Sep 17 00:00:00 2001
+From 8b161ee9179e028aa632d53d9015add2eae79c87 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 79be49dd2d655f2f5e830f33115528276a994bae ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index ea313cd9a5..a374b015fd 100644
+index 754faadd6a..f6c979b1e7 100644
@@ -24 +25 @@
-@@ -320,6 +320,10 @@ skip_an_fiber:
+@@ -290,6 +290,10 @@ skip_an:
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ngbe: keep PHY power down while device probing' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (64 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/ngbe: add special config for YT8531SH-CA PHY' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/txgbe: fix hotplug remove' " luca.boccassi
` (18 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Jiawen Wu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e8d10f45d668ab89068f902466b32b00396dd75e
Thanks.
Luca Boccassi
---
From e8d10f45d668ab89068f902466b32b00396dd75e Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:39 +0800
Subject: [PATCH] net/ngbe: keep PHY power down while device probing
[ upstream commit 01d94f0fb04cbb59e77b8b045616aeb11722bacf ]
The internal PHY will be set to default power down after LAN reset,
but the external PHY will not. To keep the PHY behavior consistent,
set PHY power down uniformly here.
Fixes: 708ebe7d0399 ("net/ngbe: fix external PHY power down")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/ngbe/base/ngbe_devids.h | 1 +
drivers/net/ngbe/base/ngbe_hw.c | 3 +++
2 files changed, 4 insertions(+)
diff --git a/drivers/net/ngbe/base/ngbe_devids.h b/drivers/net/ngbe/base/ngbe_devids.h
index 83eedf423e..e1efa62015 100644
--- a/drivers/net/ngbe/base/ngbe_devids.h
+++ b/drivers/net/ngbe/base/ngbe_devids.h
@@ -83,6 +83,7 @@
#define NGBE_YT8521S_SFP_GPIO 0x0062
#define NGBE_INTERNAL_YT8521S_SFP_GPIO 0x0064
#define NGBE_LY_YT8521S_SFP 0x0070
+#define NGBE_RGMII_FPGA 0x0080
#define NGBE_WOL_SUP 0x4000
#define NGBE_NCSI_SUP 0x8000
diff --git a/drivers/net/ngbe/base/ngbe_hw.c b/drivers/net/ngbe/base/ngbe_hw.c
index 27243d85c8..b9bb861adc 100644
--- a/drivers/net/ngbe/base/ngbe_hw.c
+++ b/drivers/net/ngbe/base/ngbe_hw.c
@@ -173,6 +173,9 @@ s32 ngbe_reset_hw_em(struct ngbe_hw *hw)
ngbe_reset_misc_em(hw);
hw->mac.clear_hw_cntrs(hw);
+ if (!((hw->sub_device_id & NGBE_OEM_MASK) == NGBE_RGMII_FPGA))
+ hw->phy.set_phy_power(hw, false);
+
msec_delay(50);
/* Store the permanent mac address */
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:37.947690814 +0100
+++ 0067-net-ngbe-keep-PHY-power-down-while-device-probing.patch 2024-07-15 16:19:34.680208855 +0100
@@ -1 +1 @@
-From 01d94f0fb04cbb59e77b8b045616aeb11722bacf Mon Sep 17 00:00:00 2001
+From e8d10f45d668ab89068f902466b32b00396dd75e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 01d94f0fb04cbb59e77b8b045616aeb11722bacf ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -32 +33 @@
-index 22ccdb0b7d..4dced0d328 100644
+index 27243d85c8..b9bb861adc 100644
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/txgbe: fix hotplug remove' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (65 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/ngbe: keep PHY power down while device probing' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/ngbe: " luca.boccassi
` (17 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Jiawen Wu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/4d4117d9d959b699ec43460e79b3c77c912884d3
Thanks.
Luca Boccassi
---
From 4d4117d9d959b699ec43460e79b3c77c912884d3 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:41 +0800
Subject: [PATCH] net/txgbe: fix hotplug remove
[ upstream commit 82ffdaf14d3b3a3391a873d2ef8ab33fa5c70e0f ]
This bug occurs in OpenvSwitch. After adding a port bound to vfio-pci
to ovs, detach it from ovs and then unbind it from vfio-pci(that is
hotplug) will cause operating system to get stuck.
Fixes: 7dc117068a7c ("net/txgbe: support probe and remove")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/txgbe/txgbe_ethdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index 24e779c02c..acfdb65eaf 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -963,7 +963,7 @@ static int eth_txgbe_pci_remove(struct rte_pci_device *pci_dev)
if (!ethdev)
return 0;
- return rte_eth_dev_destroy(ethdev, eth_txgbe_dev_uninit);
+ return rte_eth_dev_pci_generic_remove(pci_dev, eth_txgbe_dev_uninit);
}
static struct rte_pci_driver rte_txgbe_pmd = {
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:37.997423964 +0100
+++ 0068-net-txgbe-fix-hotplug-remove.patch 2024-07-15 16:19:34.684208940 +0100
@@ -1 +1 @@
-From 82ffdaf14d3b3a3391a873d2ef8ab33fa5c70e0f Mon Sep 17 00:00:00 2001
+From 4d4117d9d959b699ec43460e79b3c77c912884d3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 82ffdaf14d3b3a3391a873d2ef8ab33fa5c70e0f ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 699ff1c920..20fa0a5b05 100644
+index 24e779c02c..acfdb65eaf 100644
@@ -22 +23 @@
-@@ -964,7 +964,7 @@ static int eth_txgbe_pci_remove(struct rte_pci_device *pci_dev)
+@@ -963,7 +963,7 @@ static int eth_txgbe_pci_remove(struct rte_pci_device *pci_dev)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ngbe: fix hotplug remove' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (66 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/txgbe: fix hotplug remove' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/txgbe: fix MTU range' " luca.boccassi
` (16 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Jiawen Wu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/0ce675d4cfc603944e43a087cc23a6cf62148c3d
Thanks.
Luca Boccassi
---
From 0ce675d4cfc603944e43a087cc23a6cf62148c3d Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:42 +0800
Subject: [PATCH] net/ngbe: fix hotplug remove
[ upstream commit c602202c346663572043b408a27cb98e20f31886 ]
This bug occurs in OpenvSwitch. After adding a port bound to vfio-pci
to ovs, detach it from ovs and then unbind it from vfio-pci(that is
hotplug) will cause operating system to get stuck.
Fixes: 6ee7e574cd48 ("net/ngbe: support probe and remove")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/ngbe/ngbe_ethdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ngbe/ngbe_ethdev.c b/drivers/net/ngbe/ngbe_ethdev.c
index 08e14a05c9..edb3c73f8b 100644
--- a/drivers/net/ngbe/ngbe_ethdev.c
+++ b/drivers/net/ngbe/ngbe_ethdev.c
@@ -546,7 +546,7 @@ static int eth_ngbe_pci_remove(struct rte_pci_device *pci_dev)
if (ethdev == NULL)
return 0;
- return rte_eth_dev_destroy(ethdev, eth_ngbe_dev_uninit);
+ return rte_eth_dev_pci_generic_remove(pci_dev, eth_ngbe_dev_uninit);
}
static struct rte_pci_driver rte_ngbe_pmd = {
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:38.047855854 +0100
+++ 0069-net-ngbe-fix-hotplug-remove.patch 2024-07-15 16:19:34.688209025 +0100
@@ -1 +1 @@
-From c602202c346663572043b408a27cb98e20f31886 Mon Sep 17 00:00:00 2001
+From 0ce675d4cfc603944e43a087cc23a6cf62148c3d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c602202c346663572043b408a27cb98e20f31886 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 2a858b76d0..9d75e222c3 100644
+index 08e14a05c9..edb3c73f8b 100644
@@ -22 +23 @@
-@@ -547,7 +547,7 @@ static int eth_ngbe_pci_remove(struct rte_pci_device *pci_dev)
+@@ -546,7 +546,7 @@ static int eth_ngbe_pci_remove(struct rte_pci_device *pci_dev)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/txgbe: fix MTU range' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (67 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/ngbe: " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/ngbe: " luca.boccassi
` (15 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Jiawen Wu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/c5accd3813a437b0a68fa4a69bb3cb0fed1bf35e
Thanks.
Luca Boccassi
---
From c5accd3813a437b0a68fa4a69bb3cb0fed1bf35e Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:43 +0800
Subject: [PATCH] net/txgbe: fix MTU range
[ upstream commit af2a8b597cbb5cf8e3d53bf27c02c658d68cf6cf ]
The valid range of MTU is 68 to 9414. Set min_mtu and max_mtu in
dev_info.
Fixes: 3926214fd80d ("net/txgbe: support MTU set")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/txgbe/txgbe_ethdev.c | 12 +++++-------
drivers/net/txgbe/txgbe_ethdev.h | 2 +-
2 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index acfdb65eaf..d116bbd978 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -2655,7 +2655,9 @@ txgbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
dev_info->max_rx_queues = (uint16_t)hw->mac.max_rx_queues;
dev_info->max_tx_queues = (uint16_t)hw->mac.max_tx_queues;
dev_info->min_rx_bufsize = 1024;
- dev_info->max_rx_pktlen = 15872;
+ dev_info->max_rx_pktlen = TXGBE_MAX_MTU + TXGBE_ETH_OVERHEAD;
+ dev_info->min_mtu = RTE_ETHER_MIN_MTU;
+ dev_info->max_mtu = TXGBE_MAX_MTU;
dev_info->max_mac_addrs = hw->mac.num_rar_entries;
dev_info->max_hash_mac_addrs = TXGBE_VMDQ_NUM_UC_MAC;
dev_info->max_vfs = pci_dev->max_vfs;
@@ -3597,12 +3599,8 @@ txgbe_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
return -EINVAL;
}
- if (hw->mode)
- wr32m(hw, TXGBE_FRMSZ, TXGBE_FRMSZ_MAX_MASK,
- TXGBE_FRAME_SIZE_MAX);
- else
- wr32m(hw, TXGBE_FRMSZ, TXGBE_FRMSZ_MAX_MASK,
- TXGBE_FRMSZ_MAX(frame_size));
+ wr32m(hw, TXGBE_FRMSZ, TXGBE_FRMSZ_MAX_MASK,
+ TXGBE_FRMSZ_MAX(frame_size));
return 0;
}
diff --git a/drivers/net/txgbe/txgbe_ethdev.h b/drivers/net/txgbe/txgbe_ethdev.h
index 545ce4c9e1..4625236cb7 100644
--- a/drivers/net/txgbe/txgbe_ethdev.h
+++ b/drivers/net/txgbe/txgbe_ethdev.h
@@ -55,7 +55,7 @@
#define TXGBE_5TUPLE_MAX_PRI 7
#define TXGBE_5TUPLE_MIN_PRI 1
-
+#define TXGBE_MAX_MTU 9414
/* The overhead from MTU to max frame size. */
#define TXGBE_ETH_OVERHEAD (RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN)
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:38.095376025 +0100
+++ 0070-net-txgbe-fix-MTU-range.patch 2024-07-15 16:19:34.692209111 +0100
@@ -1 +1 @@
-From af2a8b597cbb5cf8e3d53bf27c02c658d68cf6cf Mon Sep 17 00:00:00 2001
+From c5accd3813a437b0a68fa4a69bb3cb0fed1bf35e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit af2a8b597cbb5cf8e3d53bf27c02c658d68cf6cf ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 20fa0a5b05..c2df5a314b 100644
+index acfdb65eaf..d116bbd978 100644
@@ -22 +23 @@
-@@ -2670,7 +2670,9 @@ txgbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
+@@ -2655,7 +2655,9 @@ txgbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
@@ -33 +34 @@
-@@ -3694,12 +3696,8 @@ txgbe_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
+@@ -3597,12 +3599,8 @@ txgbe_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
@@ -49 +50 @@
-index 050acd967f..f0f4ced5b0 100644
+index 545ce4c9e1..4625236cb7 100644
@@ -52 +53 @@
-@@ -56,7 +56,7 @@
+@@ -55,7 +55,7 @@
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ngbe: fix MTU range' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (68 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/txgbe: fix MTU range' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/txgbe: fix memory leaks' " luca.boccassi
` (14 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Jiawen Wu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a51a250cc5bdfae4479d6fc1a38a041877045811
Thanks.
Luca Boccassi
---
From a51a250cc5bdfae4479d6fc1a38a041877045811 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:44 +0800
Subject: [PATCH] net/ngbe: fix MTU range
[ upstream commit df2075eb681111637d5340c9abaf60e0aefab615 ]
The valid range of MTU is 68 to 9414. Set min_mtu and max_mtu in
dev_info.
Fixes: 07baabb6a51a ("net/ngbe: support MTU set")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/ngbe/ngbe_ethdev.c | 4 +++-
drivers/net/ngbe/ngbe_ethdev.h | 1 +
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ngbe/ngbe_ethdev.c b/drivers/net/ngbe/ngbe_ethdev.c
index edb3c73f8b..443bd9fef9 100644
--- a/drivers/net/ngbe/ngbe_ethdev.c
+++ b/drivers/net/ngbe/ngbe_ethdev.c
@@ -1811,7 +1811,9 @@ ngbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
dev_info->max_rx_queues = (uint16_t)hw->mac.max_rx_queues;
dev_info->max_tx_queues = (uint16_t)hw->mac.max_tx_queues;
dev_info->min_rx_bufsize = 1024;
- dev_info->max_rx_pktlen = 15872;
+ dev_info->max_rx_pktlen = NGBE_MAX_MTU + NGBE_ETH_OVERHEAD;
+ dev_info->min_mtu = RTE_ETHER_MIN_MTU;
+ dev_info->max_mtu = NGBE_MAX_MTU;
dev_info->max_mac_addrs = hw->mac.num_rar_entries;
dev_info->max_hash_mac_addrs = NGBE_VMDQ_NUM_UC_MAC;
dev_info->max_vfs = pci_dev->max_vfs;
diff --git a/drivers/net/ngbe/ngbe_ethdev.h b/drivers/net/ngbe/ngbe_ethdev.h
index bb96f6a5e7..d6c56dcce4 100644
--- a/drivers/net/ngbe/ngbe_ethdev.h
+++ b/drivers/net/ngbe/ngbe_ethdev.h
@@ -31,6 +31,7 @@
#define NGBE_QUEUE_ITR_INTERVAL_DEFAULT 500 /* 500us */
+#define NGBE_MAX_MTU 9414
/* The overhead from MTU to max frame size. */
#define NGBE_ETH_OVERHEAD (RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN)
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:38.145648524 +0100
+++ 0071-net-ngbe-fix-MTU-range.patch 2024-07-15 16:19:34.696209196 +0100
@@ -1 +1 @@
-From df2075eb681111637d5340c9abaf60e0aefab615 Mon Sep 17 00:00:00 2001
+From a51a250cc5bdfae4479d6fc1a38a041877045811 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit df2075eb681111637d5340c9abaf60e0aefab615 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 9d75e222c3..d7fc4bc70b 100644
+index edb3c73f8b..443bd9fef9 100644
@@ -22 +23 @@
-@@ -1818,7 +1818,9 @@ ngbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
+@@ -1811,7 +1811,9 @@ ngbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
@@ -34 +35 @@
-index c748bfbe4d..7af58a57ac 100644
+index bb96f6a5e7..d6c56dcce4 100644
@@ -37 +38 @@
-@@ -32,6 +32,7 @@
+@@ -31,6 +31,7 @@
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/txgbe: fix memory leaks' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (69 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/ngbe: " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/ngbe: " luca.boccassi
` (13 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Jiawen Wu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/c14e0d31df0b0503fa7ccaf3642c7a92a093b8d1
Thanks.
Luca Boccassi
---
From c14e0d31df0b0503fa7ccaf3642c7a92a093b8d1 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:45 +0800
Subject: [PATCH] net/txgbe: fix memory leaks
[ upstream commit 9a4abe8dfd85376b8ef35bf958332d837f4a3ee1 ]
Fix some memory leaks caused by not release resource in time.
Fixes: e1698e383c2a ("net/txgbe: add device init and uninit")
Fixes: 635c21354f9a ("net/txgbe: add flow director filter init and uninit")
Fixes: c13f84a71b2d ("net/txgbe: add L2 tunnel filter init and uninit")
Fixes: 3a123ba60a71 ("net/txgbe: support VF start and stop")
Fixes: 039b769f7c01 ("net/txgbe: support VF MAC address")
Fixes: 226bf98eda87 ("net/txgbe: add Rx and Tx queues setup and release")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/txgbe/txgbe_ethdev.c | 4 ++++
drivers/net/txgbe/txgbe_ethdev_vf.c | 7 ++++++-
drivers/net/txgbe/txgbe_rxtx.c | 5 +++++
drivers/net/txgbe/txgbe_rxtx.h | 2 ++
4 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index d116bbd978..a99178ff45 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -734,6 +734,8 @@ eth_txgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
PMD_INIT_LOG(ERR,
"Failed to allocate %d bytes needed to store MAC addresses",
RTE_ETHER_ADDR_LEN * TXGBE_VMDQ_NUM_UC_MAC);
+ rte_free(eth_dev->data->mac_addrs);
+ eth_dev->data->mac_addrs = NULL;
return -ENOMEM;
}
@@ -901,6 +903,7 @@ static int txgbe_fdir_filter_init(struct rte_eth_dev *eth_dev)
if (!fdir_info->hash_map) {
PMD_INIT_LOG(ERR,
"Failed to allocate memory for fdir hash map!");
+ rte_hash_free(fdir_info->hash_handle);
return -ENOMEM;
}
fdir_info->mask_added = FALSE;
@@ -936,6 +939,7 @@ static int txgbe_l2_tn_filter_init(struct rte_eth_dev *eth_dev)
if (!l2_tn_info->hash_map) {
PMD_INIT_LOG(ERR,
"Failed to allocate memory for L2 TN hash map!");
+ rte_hash_free(l2_tn_info->hash_handle);
return -ENOMEM;
}
l2_tn_info->e_tag_en = FALSE;
diff --git a/drivers/net/txgbe/txgbe_ethdev_vf.c b/drivers/net/txgbe/txgbe_ethdev_vf.c
index 1d7f1dcd15..b42c94adc1 100644
--- a/drivers/net/txgbe/txgbe_ethdev_vf.c
+++ b/drivers/net/txgbe/txgbe_ethdev_vf.c
@@ -295,6 +295,8 @@ eth_txgbevf_dev_init(struct rte_eth_dev *eth_dev)
err = hw->mac.start_hw(hw);
if (err) {
PMD_INIT_LOG(ERR, "VF Initialization Failure: %d", err);
+ rte_free(eth_dev->data->mac_addrs);
+ eth_dev->data->mac_addrs = NULL;
return -EIO;
}
@@ -670,8 +672,10 @@ txgbevf_dev_start(struct rte_eth_dev *dev)
* now only one vector is used for Rx queue
*/
intr_vector = 1;
- if (rte_intr_efd_enable(intr_handle, intr_vector))
+ if (rte_intr_efd_enable(intr_handle, intr_vector)) {
+ txgbe_dev_clear_queues(dev);
return -1;
+ }
}
if (rte_intr_dp_is_en(intr_handle)) {
@@ -679,6 +683,7 @@ txgbevf_dev_start(struct rte_eth_dev *dev)
dev->data->nb_rx_queues)) {
PMD_INIT_LOG(ERR, "Failed to allocate %d rx_queues"
" intr_vec", dev->data->nb_rx_queues);
+ txgbe_dev_clear_queues(dev);
return -ENOMEM;
}
}
diff --git a/drivers/net/txgbe/txgbe_rxtx.c b/drivers/net/txgbe/txgbe_rxtx.c
index 910d232ab0..b0ec1c96d7 100644
--- a/drivers/net/txgbe/txgbe_rxtx.c
+++ b/drivers/net/txgbe/txgbe_rxtx.c
@@ -2135,6 +2135,7 @@ txgbe_tx_queue_release(struct txgbe_tx_queue *txq)
if (txq != NULL && txq->ops != NULL) {
txq->ops->release_mbufs(txq);
txq->ops->free_swring(txq);
+ rte_memzone_free(txq->mz);
rte_free(txq);
}
}
@@ -2346,6 +2347,7 @@ txgbe_dev_tx_queue_setup(struct rte_eth_dev *dev,
return -ENOMEM;
}
+ txq->mz = tz;
txq->nb_tx_desc = nb_desc;
txq->tx_free_thresh = tx_free_thresh;
txq->pthresh = tx_conf->tx_thresh.pthresh;
@@ -2463,6 +2465,7 @@ txgbe_rx_queue_release(struct txgbe_rx_queue *rxq)
txgbe_rx_queue_release_mbufs(rxq);
rte_free(rxq->sw_ring);
rte_free(rxq->sw_sc_ring);
+ rte_memzone_free(rxq->mz);
rte_free(rxq);
}
}
@@ -2556,6 +2559,7 @@ txgbe_reset_rx_queue(struct txgbe_adapter *adapter, struct txgbe_rx_queue *rxq)
rxq->rx_free_trigger = (uint16_t)(rxq->rx_free_thresh - 1);
rxq->rx_tail = 0;
rxq->nb_rx_hold = 0;
+ rte_pktmbuf_free(rxq->pkt_first_seg);
rxq->pkt_first_seg = NULL;
rxq->pkt_last_seg = NULL;
}
@@ -2636,6 +2640,7 @@ txgbe_dev_rx_queue_setup(struct rte_eth_dev *dev,
return -ENOMEM;
}
+ rxq->mz = rz;
/*
* Zero init all the descriptors in the ring.
*/
diff --git a/drivers/net/txgbe/txgbe_rxtx.h b/drivers/net/txgbe/txgbe_rxtx.h
index 27d4c842c0..c579e1a9f2 100644
--- a/drivers/net/txgbe/txgbe_rxtx.h
+++ b/drivers/net/txgbe/txgbe_rxtx.h
@@ -314,6 +314,7 @@ struct txgbe_rx_queue {
struct rte_mbuf fake_mbuf;
/** hold packets to return to application */
struct rte_mbuf *rx_stage[RTE_PMD_TXGBE_RX_MAX_BURST * 2];
+ const struct rte_memzone *mz;
};
/**
@@ -402,6 +403,7 @@ struct txgbe_tx_queue {
uint8_t using_ipsec;
/**< indicates that IPsec TX feature is in use */
#endif
+ const struct rte_memzone *mz;
};
struct txgbe_txq_ops {
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:38.191775608 +0100
+++ 0072-net-txgbe-fix-memory-leaks.patch 2024-07-15 16:19:34.704209367 +0100
@@ -1 +1 @@
-From 9a4abe8dfd85376b8ef35bf958332d837f4a3ee1 Mon Sep 17 00:00:00 2001
+From c14e0d31df0b0503fa7ccaf3642c7a92a093b8d1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9a4abe8dfd85376b8ef35bf958332d837f4a3ee1 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index c2df5a314b..26cf7632c3 100644
+index d116bbd978..a99178ff45 100644
@@ -28 +29 @@
-@@ -735,6 +735,8 @@ eth_txgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
+@@ -734,6 +734,8 @@ eth_txgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
@@ -37 +38 @@
-@@ -902,6 +904,7 @@ static int txgbe_fdir_filter_init(struct rte_eth_dev *eth_dev)
+@@ -901,6 +903,7 @@ static int txgbe_fdir_filter_init(struct rte_eth_dev *eth_dev)
@@ -45 +46 @@
-@@ -937,6 +940,7 @@ static int txgbe_l2_tn_filter_init(struct rte_eth_dev *eth_dev)
+@@ -936,6 +939,7 @@ static int txgbe_l2_tn_filter_init(struct rte_eth_dev *eth_dev)
@@ -54 +55 @@
-index 6ac34058ab..87f76673d7 100644
+index 1d7f1dcd15..b42c94adc1 100644
@@ -66 +67 @@
-@@ -671,8 +673,10 @@ txgbevf_dev_start(struct rte_eth_dev *dev)
+@@ -670,8 +672,10 @@ txgbevf_dev_start(struct rte_eth_dev *dev)
@@ -78 +79 @@
-@@ -680,6 +684,7 @@ txgbevf_dev_start(struct rte_eth_dev *dev)
+@@ -679,6 +683,7 @@ txgbevf_dev_start(struct rte_eth_dev *dev)
@@ -87 +88 @@
-index 35f80d73ac..5bc0f8772f 100644
+index 910d232ab0..b0ec1c96d7 100644
@@ -90 +91 @@
-@@ -2157,6 +2157,7 @@ txgbe_tx_queue_release(struct txgbe_tx_queue *txq)
+@@ -2135,6 +2135,7 @@ txgbe_tx_queue_release(struct txgbe_tx_queue *txq)
@@ -98 +99 @@
-@@ -2376,6 +2377,7 @@ txgbe_dev_tx_queue_setup(struct rte_eth_dev *dev,
+@@ -2346,6 +2347,7 @@ txgbe_dev_tx_queue_setup(struct rte_eth_dev *dev,
@@ -106 +107 @@
-@@ -2499,6 +2501,7 @@ txgbe_rx_queue_release(struct txgbe_rx_queue *rxq)
+@@ -2463,6 +2465,7 @@ txgbe_rx_queue_release(struct txgbe_rx_queue *rxq)
@@ -114 +115 @@
-@@ -2592,6 +2595,7 @@ txgbe_reset_rx_queue(struct txgbe_adapter *adapter, struct txgbe_rx_queue *rxq)
+@@ -2556,6 +2559,7 @@ txgbe_reset_rx_queue(struct txgbe_adapter *adapter, struct txgbe_rx_queue *rxq)
@@ -121,2 +122,2 @@
-
-@@ -2677,6 +2681,7 @@ txgbe_dev_rx_queue_setup(struct rte_eth_dev *dev,
+ }
+@@ -2636,6 +2640,7 @@ txgbe_dev_rx_queue_setup(struct rte_eth_dev *dev,
@@ -131 +132 @@
-index 336f060633..9155eb1f70 100644
+index 27d4c842c0..c579e1a9f2 100644
@@ -134 +135 @@
-@@ -322,6 +322,7 @@ struct txgbe_rx_queue {
+@@ -314,6 +314,7 @@ struct txgbe_rx_queue {
@@ -142 +143 @@
-@@ -410,6 +411,7 @@ struct txgbe_tx_queue {
+@@ -402,6 +403,7 @@ struct txgbe_tx_queue {
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ngbe: fix memory leaks' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (70 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/txgbe: fix memory leaks' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/txgbe: fix Rx interrupt' " luca.boccassi
` (12 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Jiawen Wu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/bd6f2422df5e1232fff9ffacfcadf89b35ce6380
Thanks.
Luca Boccassi
---
From bd6f2422df5e1232fff9ffacfcadf89b35ce6380 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:46 +0800
Subject: [PATCH] net/ngbe: fix memory leaks
[ upstream commit fea7422f7a4ec2b4c406865629b5ebea699f6588 ]
Fix some memory leaks caused by not release resource in time.
Fixes: 43b7e5ea60ac ("net/ngbe: support Rx queue setup/release")
Fixes: a58e7c312c6b ("net/ngbe: support Tx queue setup/release")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/ngbe/ngbe_rxtx.c | 5 +++++
drivers/net/ngbe/ngbe_rxtx.h | 2 ++
2 files changed, 7 insertions(+)
diff --git a/drivers/net/ngbe/ngbe_rxtx.c b/drivers/net/ngbe/ngbe_rxtx.c
index 54a6f6a887..8490b08318 100644
--- a/drivers/net/ngbe/ngbe_rxtx.c
+++ b/drivers/net/ngbe/ngbe_rxtx.c
@@ -1791,6 +1791,7 @@ ngbe_tx_queue_release(struct ngbe_tx_queue *txq)
if (txq->ops != NULL) {
txq->ops->release_mbufs(txq);
txq->ops->free_swring(txq);
+ rte_memzone_free(txq->mz);
}
rte_free(txq);
}
@@ -1995,6 +1996,7 @@ ngbe_dev_tx_queue_setup(struct rte_eth_dev *dev,
return -ENOMEM;
}
+ txq->mz = tz;
txq->nb_tx_desc = nb_desc;
txq->tx_free_thresh = tx_free_thresh;
txq->pthresh = tx_conf->tx_thresh.pthresh;
@@ -2097,6 +2099,7 @@ ngbe_rx_queue_release(struct ngbe_rx_queue *rxq)
ngbe_rx_queue_release_mbufs(rxq);
rte_free(rxq->sw_ring);
rte_free(rxq->sw_sc_ring);
+ rte_memzone_free(rxq->mz);
rte_free(rxq);
}
}
@@ -2187,6 +2190,7 @@ ngbe_reset_rx_queue(struct ngbe_adapter *adapter, struct ngbe_rx_queue *rxq)
rxq->rx_free_trigger = (uint16_t)(rxq->rx_free_thresh - 1);
rxq->rx_tail = 0;
rxq->nb_rx_hold = 0;
+ rte_pktmbuf_free(rxq->pkt_first_seg);
rxq->pkt_first_seg = NULL;
rxq->pkt_last_seg = NULL;
}
@@ -2277,6 +2281,7 @@ ngbe_dev_rx_queue_setup(struct rte_eth_dev *dev,
return -ENOMEM;
}
+ rxq->mz = rz;
/*
* Zero init all the descriptors in the ring.
*/
diff --git a/drivers/net/ngbe/ngbe_rxtx.h b/drivers/net/ngbe/ngbe_rxtx.h
index 9130f9d0df..2914b9a756 100644
--- a/drivers/net/ngbe/ngbe_rxtx.h
+++ b/drivers/net/ngbe/ngbe_rxtx.h
@@ -276,6 +276,7 @@ struct ngbe_rx_queue {
struct rte_mbuf fake_mbuf;
/** hold packets to return to application */
struct rte_mbuf *rx_stage[RTE_PMD_NGBE_RX_MAX_BURST * 2];
+ const struct rte_memzone *mz;
};
/**
@@ -353,6 +354,7 @@ struct ngbe_tx_queue {
uint8_t tx_deferred_start; /**< not in global dev start */
const struct ngbe_txq_ops *ops; /**< txq ops */
+ const struct rte_memzone *mz;
};
struct ngbe_txq_ops {
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:38.250661800 +0100
+++ 0073-net-ngbe-fix-memory-leaks.patch 2024-07-15 16:19:34.708209452 +0100
@@ -1 +1 @@
-From fea7422f7a4ec2b4c406865629b5ebea699f6588 Mon Sep 17 00:00:00 2001
+From bd6f2422df5e1232fff9ffacfcadf89b35ce6380 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fea7422f7a4ec2b4c406865629b5ebea699f6588 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index c54c67f7ee..f3eb797d0c 100644
+index 54a6f6a887..8490b08318 100644
@@ -22 +23 @@
-@@ -1813,6 +1813,7 @@ ngbe_tx_queue_release(struct ngbe_tx_queue *txq)
+@@ -1791,6 +1791,7 @@ ngbe_tx_queue_release(struct ngbe_tx_queue *txq)
@@ -30 +31 @@
-@@ -2030,6 +2031,7 @@ ngbe_dev_tx_queue_setup(struct rte_eth_dev *dev,
+@@ -1995,6 +1996,7 @@ ngbe_dev_tx_queue_setup(struct rte_eth_dev *dev,
@@ -38 +39 @@
-@@ -2138,6 +2140,7 @@ ngbe_rx_queue_release(struct ngbe_rx_queue *rxq)
+@@ -2097,6 +2099,7 @@ ngbe_rx_queue_release(struct ngbe_rx_queue *rxq)
@@ -46 +47 @@
-@@ -2228,6 +2231,7 @@ ngbe_reset_rx_queue(struct ngbe_adapter *adapter, struct ngbe_rx_queue *rxq)
+@@ -2187,6 +2190,7 @@ ngbe_reset_rx_queue(struct ngbe_adapter *adapter, struct ngbe_rx_queue *rxq)
@@ -53,2 +54,2 @@
-
-@@ -2323,6 +2327,7 @@ ngbe_dev_rx_queue_setup(struct rte_eth_dev *dev,
+ }
+@@ -2277,6 +2281,7 @@ ngbe_dev_rx_queue_setup(struct rte_eth_dev *dev,
@@ -63 +64 @@
-index 41580ba0b9..7574db32d8 100644
+index 9130f9d0df..2914b9a756 100644
@@ -66 +67 @@
-@@ -291,6 +291,7 @@ struct ngbe_rx_queue {
+@@ -276,6 +276,7 @@ struct ngbe_rx_queue {
@@ -74 +75 @@
-@@ -373,6 +374,7 @@ struct ngbe_tx_queue {
+@@ -353,6 +354,7 @@ struct ngbe_tx_queue {
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/txgbe: fix Rx interrupt' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (71 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/ngbe: " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/vmxnet3: fix init logs' " luca.boccassi
` (11 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Jiawen Wu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/48d15a5ef2691310b599404a157456594299f118
Thanks.
Luca Boccassi
---
From 48d15a5ef2691310b599404a157456594299f118 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Tue, 18 Jun 2024 15:11:47 +0800
Subject: [PATCH] net/txgbe: fix Rx interrupt
[ upstream commit 37af8751f2726cd49881d2cf8089302893ea0f41 ]
Fix Rx interrupt enable failure.
Fixes: a5682d28f134 ("net/txgbe: support Rx interrupt")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/txgbe/txgbe_ethdev.c | 18 +++++++++---------
drivers/net/txgbe/txgbe_ethdev_vf.c | 2 +-
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index a99178ff45..2ed5ee683f 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -3755,13 +3755,13 @@ txgbe_dev_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id)
struct txgbe_hw *hw = TXGBE_DEV_HW(dev);
if (queue_id < 32) {
- mask = rd32(hw, TXGBE_IMS(0));
- mask &= (1 << queue_id);
- wr32(hw, TXGBE_IMS(0), mask);
+ mask = rd32(hw, TXGBE_IMC(0));
+ mask |= (1 << queue_id);
+ wr32(hw, TXGBE_IMC(0), mask);
} else if (queue_id < 64) {
- mask = rd32(hw, TXGBE_IMS(1));
- mask &= (1 << (queue_id - 32));
- wr32(hw, TXGBE_IMS(1), mask);
+ mask = rd32(hw, TXGBE_IMC(1));
+ mask |= (1 << (queue_id - 32));
+ wr32(hw, TXGBE_IMC(1), mask);
}
rte_intr_enable(intr_handle);
@@ -3776,11 +3776,11 @@ txgbe_dev_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id)
if (queue_id < 32) {
mask = rd32(hw, TXGBE_IMS(0));
- mask &= ~(1 << queue_id);
+ mask |= (1 << queue_id);
wr32(hw, TXGBE_IMS(0), mask);
} else if (queue_id < 64) {
mask = rd32(hw, TXGBE_IMS(1));
- mask &= ~(1 << (queue_id - 32));
+ mask |= (1 << (queue_id - 32));
wr32(hw, TXGBE_IMS(1), mask);
}
@@ -3814,7 +3814,7 @@ txgbe_set_ivar_map(struct txgbe_hw *hw, int8_t direction,
wr32(hw, TXGBE_IVARMISC, tmp);
} else {
/* rx or tx causes */
- /* Workaround for ICR lost */
+ msix_vector |= TXGBE_IVAR_VLD; /* Workaround for ICR lost */
idx = ((16 * (queue & 1)) + (8 * direction));
tmp = rd32(hw, TXGBE_IVAR(queue >> 1));
tmp &= ~(0xFF << idx);
diff --git a/drivers/net/txgbe/txgbe_ethdev_vf.c b/drivers/net/txgbe/txgbe_ethdev_vf.c
index b42c94adc1..92603fccc2 100644
--- a/drivers/net/txgbe/txgbe_ethdev_vf.c
+++ b/drivers/net/txgbe/txgbe_ethdev_vf.c
@@ -970,7 +970,7 @@ txgbevf_set_ivar_map(struct txgbe_hw *hw, int8_t direction,
wr32(hw, TXGBE_VFIVARMISC, tmp);
} else {
/* rx or tx cause */
- /* Workaround for ICR lost */
+ msix_vector |= TXGBE_VFIVAR_VLD; /* Workaround for ICR lost */
idx = ((16 * (queue & 1)) + (8 * direction));
tmp = rd32(hw, TXGBE_VFIVAR(queue >> 1));
tmp &= ~(0xFF << idx);
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:38.303649669 +0100
+++ 0074-net-txgbe-fix-Rx-interrupt.patch 2024-07-15 16:19:34.716209623 +0100
@@ -1 +1 @@
-From 37af8751f2726cd49881d2cf8089302893ea0f41 Mon Sep 17 00:00:00 2001
+From 48d15a5ef2691310b599404a157456594299f118 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 37af8751f2726cd49881d2cf8089302893ea0f41 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 26cf7632c3..700be8f83c 100644
+index a99178ff45..2ed5ee683f 100644
@@ -21 +22 @@
-@@ -3852,13 +3852,13 @@ txgbe_dev_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id)
+@@ -3755,13 +3755,13 @@ txgbe_dev_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id)
@@ -41 +42 @@
-@@ -3873,11 +3873,11 @@ txgbe_dev_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id)
+@@ -3776,11 +3776,11 @@ txgbe_dev_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id)
@@ -55 +56 @@
-@@ -3911,7 +3911,7 @@ txgbe_set_ivar_map(struct txgbe_hw *hw, int8_t direction,
+@@ -3814,7 +3814,7 @@ txgbe_set_ivar_map(struct txgbe_hw *hw, int8_t direction,
@@ -65 +66 @@
-index 87f76673d7..d075f9d232 100644
+index b42c94adc1..92603fccc2 100644
@@ -68 +69 @@
-@@ -971,7 +971,7 @@ txgbevf_set_ivar_map(struct txgbe_hw *hw, int8_t direction,
+@@ -970,7 +970,7 @@ txgbevf_set_ivar_map(struct txgbe_hw *hw, int8_t direction,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/vmxnet3: fix init logs' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (72 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/txgbe: fix Rx interrupt' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/nfp: fix IPv6 TTL and DSCP flow action' " luca.boccassi
` (10 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: David Marchand; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a91148a6fe4b4d54a0f3b56a82bcf947e1adc202
Thanks.
Luca Boccassi
---
From a91148a6fe4b4d54a0f3b56a82bcf947e1adc202 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 25 Jun 2024 14:22:52 +0200
Subject: [PATCH] net/vmxnet3: fix init logs
[ upstream commit e095395a416d33e45cb626bf8fbdee7a2ce355af ]
All logs for this driver are emitted under pmd.net.vmxnet3.driver while
two logtypes exist.
This issue comes from the conversion to dynamic logtypes change.
Redirect PMD_INIT_LOG to pmd.net.vmxnet3.init.
Fixes: 79daffdcb6ac ("net/vmxnet3: implement dynamic logging")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
drivers/net/vmxnet3/vmxnet3_logs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/vmxnet3/vmxnet3_logs.h b/drivers/net/vmxnet3/vmxnet3_logs.h
index 74154e3a1a..ae8542811a 100644
--- a/drivers/net/vmxnet3/vmxnet3_logs.h
+++ b/drivers/net/vmxnet3/vmxnet3_logs.h
@@ -7,7 +7,7 @@
extern int vmxnet3_logtype_init;
#define PMD_INIT_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, vmxnet3_logtype_driver, \
+ rte_log(RTE_LOG_ ## level, vmxnet3_logtype_init, \
"%s(): " fmt "\n", __func__, ## args)
#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:38.350789860 +0100
+++ 0075-net-vmxnet3-fix-init-logs.patch 2024-07-15 16:19:34.716209623 +0100
@@ -1 +1 @@
-From e095395a416d33e45cb626bf8fbdee7a2ce355af Mon Sep 17 00:00:00 2001
+From a91148a6fe4b4d54a0f3b56a82bcf947e1adc202 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e095395a416d33e45cb626bf8fbdee7a2ce355af ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index e2127988f6..5962325d62 100644
+index 74154e3a1a..ae8542811a 100644
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/nfp: fix IPv6 TTL and DSCP flow action' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (73 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/vmxnet3: fix init logs' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/nfp: fix allocation of switch domain' " luca.boccassi
` (9 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Chaoyong He; +Cc: Long Wu, Peng Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f4affbfda7292608bf4d2fa4b53d77a5fc3d6683
Thanks.
Luca Boccassi
---
From f4affbfda7292608bf4d2fa4b53d77a5fc3d6683 Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Wed, 19 Jun 2024 17:13:38 +0800
Subject: [PATCH] net/nfp: fix IPv6 TTL and DSCP flow action
[ upstream commit 76caca76bf62efb041642194adf47181f9fe1bc2 ]
The IPv6 TTL and DSCP flow action logic use 'ttl_tos_flag' wrongly,
actually it should use 'tc_hl_flag'.
Fixes: ac12e126c482 ("net/nfp: support TTL flow action")
Fixes: 3202b003bec1 ("net/nfp: support IPv6 DSCP flow action")
Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
drivers/net/nfp/nfp_flow.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c
index faa0eda325..2635ba4cea 100644
--- a/drivers/net/nfp/nfp_flow.c
+++ b/drivers/net/nfp/nfp_flow.c
@@ -3445,7 +3445,7 @@ nfp_flow_compile_action(struct nfp_flower_representor *representor,
ttl_tos_flag = true;
}
} else {
- nfp_flow_action_set_hl(position, action, ttl_tos_flag);
+ nfp_flow_action_set_hl(position, action, tc_hl_flag);
if (!tc_hl_flag) {
position += sizeof(struct nfp_fl_act_set_ipv6_tc_hl_fl);
tc_hl_flag = true;
@@ -3462,7 +3462,7 @@ nfp_flow_compile_action(struct nfp_flower_representor *representor,
break;
case RTE_FLOW_ACTION_TYPE_SET_IPV6_DSCP:
PMD_DRV_LOG(DEBUG, "Process RTE_FLOW_ACTION_TYPE_SET_IPV6_DSCP");
- nfp_flow_action_set_tc(position, action, ttl_tos_flag);
+ nfp_flow_action_set_tc(position, action, tc_hl_flag);
if (!tc_hl_flag) {
position += sizeof(struct nfp_fl_act_set_ipv6_tc_hl_fl);
tc_hl_flag = true;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:38.392360594 +0100
+++ 0076-net-nfp-fix-IPv6-TTL-and-DSCP-flow-action.patch 2024-07-15 16:19:34.720209709 +0100
@@ -1 +1 @@
-From 76caca76bf62efb041642194adf47181f9fe1bc2 Mon Sep 17 00:00:00 2001
+From f4affbfda7292608bf4d2fa4b53d77a5fc3d6683 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 76caca76bf62efb041642194adf47181f9fe1bc2 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
- drivers/net/nfp/flower/nfp_flower_flow.c | 4 ++--
+ drivers/net/nfp/nfp_flow.c | 4 ++--
@@ -20,5 +21,5 @@
-diff --git a/drivers/net/nfp/flower/nfp_flower_flow.c b/drivers/net/nfp/flower/nfp_flower_flow.c
-index bd77807db0..45a020b228 100644
---- a/drivers/net/nfp/flower/nfp_flower_flow.c
-+++ b/drivers/net/nfp/flower/nfp_flower_flow.c
-@@ -3833,7 +3833,7 @@ nfp_flow_compile_action(struct nfp_flower_representor *representor,
+diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c
+index faa0eda325..2635ba4cea 100644
+--- a/drivers/net/nfp/nfp_flow.c
++++ b/drivers/net/nfp/nfp_flow.c
+@@ -3445,7 +3445,7 @@ nfp_flow_compile_action(struct nfp_flower_representor *representor,
@@ -33 +34 @@
-@@ -3850,7 +3850,7 @@ nfp_flow_compile_action(struct nfp_flower_representor *representor,
+@@ -3462,7 +3462,7 @@ nfp_flow_compile_action(struct nfp_flower_representor *representor,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/nfp: fix allocation of switch domain' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (74 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/nfp: fix IPv6 TTL and DSCP flow action' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/ionic: fix mbuf double-free when emptying array' " luca.boccassi
` (8 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Chaoyong He; +Cc: Long Wu, Peng Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/087d968fc074cdd4d1177518c6fcd512d6d63db7
Thanks.
Luca Boccassi
---
From 087d968fc074cdd4d1177518c6fcd512d6d63db7 Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Wed, 19 Jun 2024 17:51:33 +0800
Subject: [PATCH] net/nfp: fix allocation of switch domain
[ upstream commit e393598fc2967284398fcdfee6c7a75d0ceb95db ]
The check of 'RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID' cause the following
call of 'rte_eth_switch_domain_alloc()' never trigger.
Fix this by just remove the check logic.
Fixes: e1124c4f8a45 ("net/nfp: add flower representor framework")
Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
drivers/net/nfp/flower/nfp_flower_representor.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/nfp/flower/nfp_flower_representor.c b/drivers/net/nfp/flower/nfp_flower_representor.c
index 090c828c18..b6e58d31ff 100644
--- a/drivers/net/nfp/flower/nfp_flower_representor.c
+++ b/drivers/net/nfp/flower/nfp_flower_representor.c
@@ -1047,10 +1047,9 @@ nfp_flower_repr_create(struct nfp_app_fw_flower *app_fw_flower)
pci_dev = pf_dev->pci_dev;
/* Allocate a switch domain for the flower app */
- if (app_fw_flower->switch_domain_id == RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID &&
- rte_eth_switch_domain_alloc(&app_fw_flower->switch_domain_id) != 0) {
+ ret = rte_eth_switch_domain_alloc(&app_fw_flower->switch_domain_id);
+ if (ret != 0)
PMD_INIT_LOG(WARNING, "failed to allocate switch domain for device");
- }
/* Now parse PCI device args passed for representor info */
if (pci_dev->device.devargs != NULL) {
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:38.441155274 +0100
+++ 0077-net-nfp-fix-allocation-of-switch-domain.patch 2024-07-15 16:19:34.720209709 +0100
@@ -1 +1 @@
-From e393598fc2967284398fcdfee6c7a75d0ceb95db Mon Sep 17 00:00:00 2001
+From 087d968fc074cdd4d1177518c6fcd512d6d63db7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e393598fc2967284398fcdfee6c7a75d0ceb95db ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 700957f945..e7550ce9ef 100644
+index 090c828c18..b6e58d31ff 100644
@@ -25 +26 @@
-@@ -907,10 +907,9 @@ nfp_flower_repr_create(struct nfp_app_fw_flower *app_fw_flower,
+@@ -1047,10 +1047,9 @@ nfp_flower_repr_create(struct nfp_app_fw_flower *app_fw_flower)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ionic: fix mbuf double-free when emptying array' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (75 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/nfp: fix allocation of switch domain' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/nfp: disable ctrl VNIC queues on close' " luca.boccassi
` (7 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Andrew Boyer; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/047aff2cf1715705748e3cc4b20b28e61340393a
Thanks.
Luca Boccassi
---
From 047aff2cf1715705748e3cc4b20b28e61340393a Mon Sep 17 00:00:00 2001
From: Andrew Boyer <andrew.boyer@amd.com>
Date: Mon, 1 Jul 2024 08:19:43 -0700
Subject: [PATCH] net/ionic: fix mbuf double-free when emptying array
[ upstream commit d46b9fa83f136beb0e6feedd0a7b3a228b0d8cd3 ]
The bulk-allocation array is used back to front, so we need to free
everything before the marker, not after it. Flip ionic_empty_array()
so that it frees from 0 to the provided index. Adjust the callers
as needed.
Fixes: 218afd825bca ("net/ionic: do bulk allocations of Rx mbufs")
Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
---
drivers/net/ionic/ionic_rxtx.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ionic/ionic_rxtx.c b/drivers/net/ionic/ionic_rxtx.c
index 2f1ca986b3..170d3b0802 100644
--- a/drivers/net/ionic/ionic_rxtx.c
+++ b/drivers/net/ionic/ionic_rxtx.c
@@ -26,38 +26,40 @@
#include "ionic_logs.h"
static void
-ionic_empty_array(void **array, uint32_t cnt, uint16_t idx)
+ionic_empty_array(void **array, uint32_t free_idx, uint32_t zero_idx)
{
uint32_t i;
- for (i = idx; i < cnt; i++)
+ for (i = 0; i < free_idx; i++)
if (array[i])
rte_pktmbuf_free_seg(array[i]);
- memset(array, 0, sizeof(void *) * cnt);
+ memset(array, 0, sizeof(void *) * zero_idx);
}
static void __rte_cold
ionic_tx_empty(struct ionic_tx_qcq *txq)
{
struct ionic_queue *q = &txq->qcq.q;
+ uint32_t info_len = q->num_descs * q->num_segs;
- ionic_empty_array(q->info, q->num_descs * q->num_segs, 0);
+ ionic_empty_array(q->info, info_len, info_len);
}
static void __rte_cold
ionic_rx_empty(struct ionic_rx_qcq *rxq)
{
struct ionic_queue *q = &rxq->qcq.q;
+ uint32_t info_len = q->num_descs * q->num_segs;
/*
* Walk the full info array so that the clean up includes any
* fragments that were left dangling for later reuse
*/
- ionic_empty_array(q->info, q->num_descs * q->num_segs, 0);
+ ionic_empty_array(q->info, info_len, info_len);
- ionic_empty_array((void **)rxq->mbs,
- IONIC_MBUF_BULK_ALLOC, rxq->mb_idx);
+ ionic_empty_array((void **)rxq->mbs, rxq->mb_idx,
+ IONIC_MBUF_BULK_ALLOC);
rxq->mb_idx = 0;
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:38.482283536 +0100
+++ 0078-net-ionic-fix-mbuf-double-free-when-emptying-array.patch 2024-07-15 16:19:34.720209709 +0100
@@ -1 +1 @@
-From d46b9fa83f136beb0e6feedd0a7b3a228b0d8cd3 Mon Sep 17 00:00:00 2001
+From 047aff2cf1715705748e3cc4b20b28e61340393a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d46b9fa83f136beb0e6feedd0a7b3a228b0d8cd3 ]
+
@@ -12 +13,0 @@
-CC: stable@dpdk.org
@@ -20 +21 @@
-index 923f517661..339b20f113 100644
+index 2f1ca986b3..170d3b0802 100644
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/nfp: disable ctrl VNIC queues on close' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (76 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/ionic: fix mbuf double-free when emptying array' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/ena: fix bad checksum handling' " luca.boccassi
` (6 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Peng Zhang; +Cc: Chaoyong He, Long Wu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/59adabd7873c3c17ad879823612ff22b72a238ef
Thanks.
Luca Boccassi
---
From 59adabd7873c3c17ad879823612ff22b72a238ef Mon Sep 17 00:00:00 2001
From: Peng Zhang <peng.zhang@corigine.com>
Date: Wed, 19 Jun 2024 17:58:09 +0800
Subject: [PATCH] net/nfp: disable ctrl VNIC queues on close
[ upstream commit 23a04fe2b8b7775aaa694bb1253c9072b74210fc ]
The logic forgot to disable the ctrl VNIC queues when representor
port close, and this will cause DPDK application restart fail if
not force reload the flower firmware.
Fix this by adding the missing logic to disable the ctrl VNIC
queues.
Fixes: 945441ebdb9c ("net/nfp: add flower ctrl VNIC")
Signed-off-by: Peng Zhang <peng.zhang@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
---
drivers/net/nfp/flower/nfp_flower.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/nfp/flower/nfp_flower.c b/drivers/net/nfp/flower/nfp_flower.c
index bc1df0d369..360345c50b 100644
--- a/drivers/net/nfp/flower/nfp_flower.c
+++ b/drivers/net/nfp/flower/nfp_flower.c
@@ -920,6 +920,8 @@ nfp_flower_cleanup_ctrl_vnic(struct nfp_net_hw *hw)
pci_name = strchr(app_fw_flower->pf_hw->pf_dev->pci_dev->name, ':') + 1;
+ nfp_net_disable_queues(eth_dev);
+
snprintf(ctrl_txring_name, sizeof(ctrl_txring_name), "%s_cttx_ring", pci_name);
for (i = 0; i < hw->max_tx_queues; i++) {
txq = eth_dev->data->tx_queues[i];
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:38.527030002 +0100
+++ 0079-net-nfp-disable-ctrl-VNIC-queues-on-close.patch 2024-07-15 16:19:34.724209794 +0100
@@ -1 +1 @@
-From 23a04fe2b8b7775aaa694bb1253c9072b74210fc Mon Sep 17 00:00:00 2001
+From 59adabd7873c3c17ad879823612ff22b72a238ef Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 23a04fe2b8b7775aaa694bb1253c9072b74210fc ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 0edebd574a..5caaf9d745 100644
+index bc1df0d369..360345c50b 100644
@@ -27 +28 @@
-@@ -533,6 +533,8 @@ nfp_flower_cleanup_ctrl_vnic(struct nfp_app_fw_flower *app_fw_flower,
+@@ -920,6 +920,8 @@ nfp_flower_cleanup_ctrl_vnic(struct nfp_net_hw *hw)
@@ -29 +30 @@
- pci_name = strchr(hw_priv->pf_dev->pci_dev->name, ':') + 1;
+ pci_name = strchr(app_fw_flower->pf_hw->pf_dev->pci_dev->name, ':') + 1;
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ena: fix bad checksum handling' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (77 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/nfp: disable ctrl VNIC queues on close' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:26 ` patch 'net/ena: fix return value check' " luca.boccassi
` (5 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Shai Brandes; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/33ddd1e51dfebd10c239b596556d8d3a2153cd4d
Thanks.
Luca Boccassi
---
From 33ddd1e51dfebd10c239b596556d8d3a2153cd4d Mon Sep 17 00:00:00 2001
From: Shai Brandes <shaibran@amazon.com>
Date: Tue, 2 Jul 2024 17:46:22 +0300
Subject: [PATCH] net/ena: fix bad checksum handling
[ upstream commit fa4bb7025255036fcff9556c637efa2627ac4af4 ]
Removed a workaround for a false L4 bad Rx csum
indication from the device. The workaround was to set it
as unknown so the application would check it instead.
The issue was fixed in the device, thus the driver bad csum
handling should be fixed in the PMD.
Fixes: b2d2f1cf89a6 ("net/ena: fix checksum flag for L4")
Signed-off-by: Shai Brandes <shaibran@amazon.com>
---
drivers/net/ena/ena_ethdev.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 29782a7fb6..2fcd74a0e0 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -595,13 +595,7 @@ static inline void ena_rx_mbuf_prepare(struct ena_ring *rx_ring,
} else {
if (unlikely(ena_rx_ctx->l4_csum_err)) {
++rx_stats->l4_csum_bad;
- /*
- * For the L4 Rx checksum offload the HW may indicate
- * bad checksum although it's valid. Because of that,
- * we're setting the UNKNOWN flag to let the app
- * re-verify the checksum.
- */
- ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN;
+ ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_BAD;
} else {
++rx_stats->l4_csum_good;
ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:38.568469863 +0100
+++ 0080-net-ena-fix-bad-checksum-handling.patch 2024-07-15 16:19:34.724209794 +0100
@@ -1 +1 @@
-From fa4bb7025255036fcff9556c637efa2627ac4af4 Mon Sep 17 00:00:00 2001
+From 33ddd1e51dfebd10c239b596556d8d3a2153cd4d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fa4bb7025255036fcff9556c637efa2627ac4af4 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 4e7171e629..b43b913903 100644
+index 29782a7fb6..2fcd74a0e0 100644
@@ -24 +25 @@
-@@ -674,13 +674,7 @@ static inline void ena_rx_mbuf_prepare(struct ena_ring *rx_ring,
+@@ -595,13 +595,7 @@ static inline void ena_rx_mbuf_prepare(struct ena_ring *rx_ring,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ena: fix return value check' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (78 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/ena: fix bad checksum handling' " luca.boccassi
@ 2024-07-15 15:26 ` luca.boccassi
2024-07-15 15:27 ` patch 'net/ena: fix checksum handling' " luca.boccassi
` (4 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:26 UTC (permalink / raw)
To: Shai Brandes; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/cf4bb6bffc2193d84dd26be22e1582b4218caf8f
Thanks.
Luca Boccassi
---
From cf4bb6bffc2193d84dd26be22e1582b4218caf8f Mon Sep 17 00:00:00 2001
From: Shai Brandes <shaibran@amazon.com>
Date: Tue, 2 Jul 2024 17:46:23 +0300
Subject: [PATCH] net/ena: fix return value check
[ upstream commit 8936b01a512a8e25a7369d282a17b9b09c55728b ]
Removed the sign inversion for when checking if
ena_com_set_host_attributes returns ENA_COM_UNSUPPORTED.
ENA_COM_UNSUPPORTED is defined as -EOPNOTSUPP, so the extra sign
inversion is wrong.
Fixes: 3adcba9a8987 ("net/ena: update HAL to the newer version")
Signed-off-by: Shai Brandes <shaibran@amazon.com>
---
drivers/net/ena/ena_ethdev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 2fcd74a0e0..881e2ecdaf 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -733,7 +733,7 @@ static void ena_config_host_info(struct ena_com_dev *ena_dev)
rc = ena_com_set_host_attributes(ena_dev);
if (rc) {
- if (rc == -ENA_COM_UNSUPPORTED)
+ if (rc == ENA_COM_UNSUPPORTED)
PMD_DRV_LOG(WARNING, "Cannot set host attributes\n");
else
PMD_DRV_LOG(ERR, "Cannot set host attributes\n");
@@ -773,7 +773,7 @@ static void ena_config_debug_area(struct ena_adapter *adapter)
rc = ena_com_set_host_attributes(&adapter->ena_dev);
if (rc) {
- if (rc == -ENA_COM_UNSUPPORTED)
+ if (rc == ENA_COM_UNSUPPORTED)
PMD_DRV_LOG(WARNING, "Cannot set host attributes\n");
else
PMD_DRV_LOG(ERR, "Cannot set host attributes\n");
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:38.612557630 +0100
+++ 0081-net-ena-fix-return-value-check.patch 2024-07-15 16:19:34.728209880 +0100
@@ -1 +1 @@
-From 8936b01a512a8e25a7369d282a17b9b09c55728b Mon Sep 17 00:00:00 2001
+From cf4bb6bffc2193d84dd26be22e1582b4218caf8f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8936b01a512a8e25a7369d282a17b9b09c55728b ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index b43b913903..67a1d86f9a 100644
+index 2fcd74a0e0..881e2ecdaf 100644
@@ -23 +24 @@
-@@ -812,7 +812,7 @@ static void ena_config_host_info(struct ena_com_dev *ena_dev)
+@@ -733,7 +733,7 @@ static void ena_config_host_info(struct ena_com_dev *ena_dev)
@@ -32 +33 @@
-@@ -856,7 +856,7 @@ static void ena_config_debug_area(struct ena_adapter *adapter)
+@@ -773,7 +773,7 @@ static void ena_config_debug_area(struct ena_adapter *adapter)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ena: fix checksum handling' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (79 preceding siblings ...)
2024-07-15 15:26 ` patch 'net/ena: fix return value check' " luca.boccassi
@ 2024-07-15 15:27 ` luca.boccassi
2024-07-15 15:27 ` patch 'net/nfp: forbid offload flow rules with empty action list' " luca.boccassi
` (3 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:27 UTC (permalink / raw)
To: Shai Brandes; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/18b7942cef2ec0c26c7999550d72f4558e456cd3
Thanks.
Luca Boccassi
---
From 18b7942cef2ec0c26c7999550d72f4558e456cd3 Mon Sep 17 00:00:00 2001
From: Shai Brandes <shaibran@amazon.com>
Date: Tue, 2 Jul 2024 17:46:24 +0300
Subject: [PATCH] net/ena: fix checksum handling
[ upstream commit f66055c7564050e55c7eab147d039bf01048829a ]
This change fixes an issue where a non tcp/udp packet can be indicated
to have an invalid csum. If the device erroneously tries to verify the
csum on a non tcp/udp packet it will result in false indication that
there is a csum error. This change make the driver ignore the
indication for csum error on such packets.
Fixes: 84daba9962b5 ("net/ena: add extra Rx checksum related xstats")
Signed-off-by: Shai Brandes <shaibran@amazon.com>
---
drivers/net/ena/ena_ethdev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 881e2ecdaf..e640bbae3d 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -590,7 +590,8 @@ static inline void ena_rx_mbuf_prepare(struct ena_ring *rx_ring,
packet_type |= RTE_PTYPE_L3_IPV6;
}
- if (!ena_rx_ctx->l4_csum_checked || ena_rx_ctx->frag) {
+ if (!ena_rx_ctx->l4_csum_checked || ena_rx_ctx->frag ||
+ !(packet_type & (RTE_PTYPE_L4_TCP | RTE_PTYPE_L4_UDP))) {
ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN;
} else {
if (unlikely(ena_rx_ctx->l4_csum_err)) {
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:38.656312875 +0100
+++ 0082-net-ena-fix-checksum-handling.patch 2024-07-15 16:19:34.732209965 +0100
@@ -1 +1 @@
-From f66055c7564050e55c7eab147d039bf01048829a Mon Sep 17 00:00:00 2001
+From 18b7942cef2ec0c26c7999550d72f4558e456cd3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f66055c7564050e55c7eab147d039bf01048829a ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 67a1d86f9a..a18c94df28 100644
+index 881e2ecdaf..e640bbae3d 100644
@@ -24 +25 @@
-@@ -669,7 +669,8 @@ static inline void ena_rx_mbuf_prepare(struct ena_ring *rx_ring,
+@@ -590,7 +590,8 @@ static inline void ena_rx_mbuf_prepare(struct ena_ring *rx_ring,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/nfp: forbid offload flow rules with empty action list' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (80 preceding siblings ...)
2024-07-15 15:27 ` patch 'net/ena: fix checksum handling' " luca.boccassi
@ 2024-07-15 15:27 ` luca.boccassi
2024-07-15 15:27 ` patch 'net/nfp: remove redundant function call' " luca.boccassi
` (2 subsequent siblings)
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:27 UTC (permalink / raw)
To: Chaoyong He; +Cc: Long Wu, Peng Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/59cee7032b7101cedd3e3b5eee8248f0cd9f1a20
Thanks.
Luca Boccassi
---
From 59cee7032b7101cedd3e3b5eee8248f0cd9f1a20 Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Mon, 24 Jun 2024 09:57:11 +0800
Subject: [PATCH] net/nfp: forbid offload flow rules with empty action list
[ upstream commit 78bbab16282a2b6b8b3983677b7b1a32543b909b ]
The original logic allow offload flow rules with empty action list, but
the matched packets will be drop by the flower firmware.
Fix this by forbidding offload this type flow rules.
Fixes: 4d946034bf9c ("net/nfp: support basic flow actions")
Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
drivers/net/nfp/nfp_flow.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c
index 2635ba4cea..17c091ffa0 100644
--- a/drivers/net/nfp/nfp_flow.c
+++ b/drivers/net/nfp/nfp_flow.c
@@ -3517,6 +3517,11 @@ nfp_flow_compile_action(struct nfp_flower_representor *representor,
total_actions++;
}
+ if (nfp_flow->install_flag && total_actions == 0) {
+ PMD_DRV_LOG(ERR, "The action list is empty");
+ return -ENOTSUP;
+ }
+
if (drop_flag)
nfp_flow_meta->shortcut = rte_cpu_to_be_32(NFP_FL_SC_ACT_DROP);
else if (total_actions > 1)
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:38.699568278 +0100
+++ 0083-net-nfp-forbid-offload-flow-rules-with-empty-action-.patch 2024-07-15 16:19:34.736210050 +0100
@@ -1 +1 @@
-From 78bbab16282a2b6b8b3983677b7b1a32543b909b Mon Sep 17 00:00:00 2001
+From 59cee7032b7101cedd3e3b5eee8248f0cd9f1a20 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 78bbab16282a2b6b8b3983677b7b1a32543b909b ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
- drivers/net/nfp/flower/nfp_flower_flow.c | 5 +++++
+ drivers/net/nfp/nfp_flow.c | 5 +++++
@@ -21,5 +22,5 @@
-diff --git a/drivers/net/nfp/flower/nfp_flower_flow.c b/drivers/net/nfp/flower/nfp_flower_flow.c
-index f6a520248b..cf2b919e7e 100644
---- a/drivers/net/nfp/flower/nfp_flower_flow.c
-+++ b/drivers/net/nfp/flower/nfp_flower_flow.c
-@@ -4803,6 +4803,11 @@ nfp_flow_compile_action(struct nfp_flower_representor *representor,
+diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c
+index 2635ba4cea..17c091ffa0 100644
+--- a/drivers/net/nfp/nfp_flow.c
++++ b/drivers/net/nfp/nfp_flow.c
+@@ -3517,6 +3517,11 @@ nfp_flow_compile_action(struct nfp_flower_representor *representor,
@@ -34,2 +35 @@
- nfp_flow_meta = nfp_flow->payload.meta;
- if (flag.drop_flag)
+ if (drop_flag)
@@ -36,0 +37 @@
+ else if (total_actions > 1)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/nfp: remove redundant function call' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (81 preceding siblings ...)
2024-07-15 15:27 ` patch 'net/nfp: forbid offload flow rules with empty action list' " luca.boccassi
@ 2024-07-15 15:27 ` luca.boccassi
2024-07-15 15:27 ` patch 'net/nfp: adapt reverse sequence card' " luca.boccassi
2024-07-15 15:27 ` patch 'net/nfp: fix disabling 32-bit build' " luca.boccassi
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:27 UTC (permalink / raw)
To: Chaoyong He; +Cc: Long Wu, Peng Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/0c73b671c88aaef8fabf1ce5622ab6ce2b9a42b5
Thanks.
Luca Boccassi
---
From 0c73b671c88aaef8fabf1ce5622ab6ce2b9a42b5 Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Mon, 24 Jun 2024 09:57:12 +0800
Subject: [PATCH] net/nfp: remove redundant function call
[ upstream commit d16a42f4a7cf2e73f0e2f7daa9bc64aa63e7bcd9 ]
Remove the redundancy call of 'rte_eth_copy_pci_info()' as the API
'rte_eth_dev_pci_allocate()' already done that.
Fixes: e1124c4f8a45 ("net/nfp: add flower representor framework")
Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
drivers/net/nfp/nfp_ethdev_vf.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/nfp/nfp_ethdev_vf.c b/drivers/net/nfp/nfp_ethdev_vf.c
index 435127604a..60e90cd5cb 100644
--- a/drivers/net/nfp/nfp_ethdev_vf.c
+++ b/drivers/net/nfp/nfp_ethdev_vf.c
@@ -320,8 +320,6 @@ nfp_netvf_init(struct rte_eth_dev *eth_dev)
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
return 0;
- rte_eth_copy_pci_info(eth_dev, pci_dev);
-
hw->device_id = pci_dev->id.device_id;
hw->vendor_id = pci_dev->id.vendor_id;
hw->subsystem_device_id = pci_dev->id.subsystem_device_id;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:38.745739001 +0100
+++ 0084-net-nfp-remove-redundant-function-call.patch 2024-07-15 16:19:34.736210050 +0100
@@ -1 +1 @@
-From d16a42f4a7cf2e73f0e2f7daa9bc64aa63e7bcd9 Mon Sep 17 00:00:00 2001
+From 0c73b671c88aaef8fabf1ce5622ab6ce2b9a42b5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d16a42f4a7cf2e73f0e2f7daa9bc64aa63e7bcd9 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index a422bcd057..e7c18fe90a 100644
+index 435127604a..60e90cd5cb 100644
@@ -23 +24 @@
-@@ -302,8 +302,6 @@ nfp_netvf_init(struct rte_eth_dev *eth_dev)
+@@ -320,8 +320,6 @@ nfp_netvf_init(struct rte_eth_dev *eth_dev)
@@ -29,3 +30,3 @@
- net_hw->eth_xstats_base = rte_malloc("rte_eth_xstat",
- sizeof(struct rte_eth_xstat) * nfp_net_xstats_size(eth_dev), 0);
- if (net_hw->eth_xstats_base == NULL) {
+ hw->device_id = pci_dev->id.device_id;
+ hw->vendor_id = pci_dev->id.vendor_id;
+ hw->subsystem_device_id = pci_dev->id.subsystem_device_id;
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/nfp: adapt reverse sequence card' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (82 preceding siblings ...)
2024-07-15 15:27 ` patch 'net/nfp: remove redundant function call' " luca.boccassi
@ 2024-07-15 15:27 ` luca.boccassi
2024-07-15 15:27 ` patch 'net/nfp: fix disabling 32-bit build' " luca.boccassi
84 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:27 UTC (permalink / raw)
To: Peng Zhang; +Cc: Chaoyong He, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f0e36f585baa5f80a93c3bc50a81c62fa657ffb8
Thanks.
Luca Boccassi
---
From f0e36f585baa5f80a93c3bc50a81c62fa657ffb8 Mon Sep 17 00:00:00 2001
From: Peng Zhang <peng.zhang@corigine.com>
Date: Mon, 24 Jun 2024 09:57:21 +0800
Subject: [PATCH] net/nfp: adapt reverse sequence card
[ upstream commit 497b94dc2c8795d31fa2020bcdb0cd62a156ccb0 ]
The NFP chip-wide port index is 'eth_port->index'.
In the normal card, it uses 'eth_port->eth_index', but because
'eth_port->eth_index' and 'eth_port->index' have the same value,
it doesn't have any problem.
But in the reverse sequence card, the value is different,
so it will lead the 'nfp_eth_config_start()' failed.
In this commit, fix this bug by using 'eth_port->index'.
Fixes: e1124c4f8a45 ("net/nfp: add flower representor framework")
Signed-off-by: Peng Zhang <peng.zhang@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
---
drivers/net/nfp/flower/nfp_flower_representor.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/nfp/flower/nfp_flower_representor.c b/drivers/net/nfp/flower/nfp_flower_representor.c
index b6e58d31ff..d5aed8791a 100644
--- a/drivers/net/nfp/flower/nfp_flower_representor.c
+++ b/drivers/net/nfp/flower/nfp_flower_representor.c
@@ -970,7 +970,7 @@ nfp_flower_repr_alloc(struct nfp_app_fw_flower *app_fw_flower)
eth_port = &nfp_eth_table->ports[i];
flower_repr.repr_type = NFP_REPR_TYPE_PHYS_PORT;
flower_repr.port_id = nfp_flower_get_phys_port_id(eth_port->index);
- flower_repr.nfp_idx = eth_port->eth_index;
+ flower_repr.nfp_idx = eth_port->index;
flower_repr.vf_id = i + 1;
/* Copy the real mac of the interface to the representor struct */
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:38.784601749 +0100
+++ 0085-net-nfp-adapt-reverse-sequence-card.patch 2024-07-15 16:19:34.740210136 +0100
@@ -1 +1 @@
-From 497b94dc2c8795d31fa2020bcdb0cd62a156ccb0 Mon Sep 17 00:00:00 2001
+From f0e36f585baa5f80a93c3bc50a81c62fa657ffb8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 497b94dc2c8795d31fa2020bcdb0cd62a156ccb0 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 086dbc58e3..b1589cf78c 100644
+index b6e58d31ff..d5aed8791a 100644
@@ -28,2 +29,2 @@
-@@ -845,7 +845,7 @@ nfp_flower_repr_alloc(struct nfp_app_fw_flower *app_fw_flower,
- eth_port = &nfp_eth_table->ports[id];
+@@ -970,7 +970,7 @@ nfp_flower_repr_alloc(struct nfp_app_fw_flower *app_fw_flower)
+ eth_port = &nfp_eth_table->ports[i];
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/nfp: fix disabling 32-bit build' has been queued to stable release 22.11.6
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
` (83 preceding siblings ...)
2024-07-15 15:27 ` patch 'net/nfp: adapt reverse sequence card' " luca.boccassi
@ 2024-07-15 15:27 ` luca.boccassi
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
84 siblings, 1 reply; 210+ messages in thread
From: luca.boccassi @ 2024-07-15 15:27 UTC (permalink / raw)
To: Long Wu; +Cc: Chaoyong He, Peng Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a0bb9efc615dd2753788826b1a6ad86024dd298e
Thanks.
Luca Boccassi
---
From a0bb9efc615dd2753788826b1a6ad86024dd298e Mon Sep 17 00:00:00 2001
From: Long Wu <long.wu@corigine.com>
Date: Tue, 9 Jul 2024 16:24:01 +0800
Subject: [PATCH] net/nfp: fix disabling 32-bit build
[ upstream commit c7c2199a6a7b3d9bc605bfee7e578d9b0a647e17 ]
NFP PMD only support compile on 64-bit linux OS, add exit logic in
other conditions.
Fixes: 8741a9074536 ("net/nfp: disable for 32-bit meson builds")
Signed-off-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
drivers/net/nfp/meson.build | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/nfp/meson.build b/drivers/net/nfp/meson.build
index 7416fd3706..bc3bc737a0 100644
--- a/drivers/net/nfp/meson.build
+++ b/drivers/net/nfp/meson.build
@@ -4,6 +4,7 @@
if not is_linux or not dpdk_conf.get('RTE_ARCH_64')
build = false
reason = 'only supported on 64-bit Linux'
+ subdir_done()
endif
sources = files(
'flower/nfp_flower.c',
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-15 16:19:38.825489437 +0100
+++ 0086-net-nfp-fix-disabling-32-bit-build.patch 2024-07-15 16:19:34.740210136 +0100
@@ -1 +1 @@
-From c7c2199a6a7b3d9bc605bfee7e578d9b0a647e17 Mon Sep 17 00:00:00 2001
+From a0bb9efc615dd2753788826b1a6ad86024dd298e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c7c2199a6a7b3d9bc605bfee7e578d9b0a647e17 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index d805644ec5..7216c8dff9 100644
+index 7416fd3706..bc3bc737a0 100644
@@ -29 +29,0 @@
-
@@ -30,0 +31 @@
+ 'flower/nfp_flower.c',
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'crypto/qat: fix GEN4 write' has been queued to stable release 22.11.6
2024-07-15 15:27 ` patch 'net/nfp: fix disabling 32-bit build' " luca.boccassi
@ 2024-07-24 11:32 ` luca.boccassi
2024-07-24 11:32 ` patch 'crypto/ipsec_mb: fix function comment' " luca.boccassi
` (38 more replies)
0 siblings, 39 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:32 UTC (permalink / raw)
To: Brian Dooley; +Cc: Arkadiusz Kusztal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e793a7063f95d32916301282a820ffb16933b25e
Thanks.
Luca Boccassi
---
From e793a7063f95d32916301282a820ffb16933b25e Mon Sep 17 00:00:00 2001
From: Brian Dooley <brian.dooley@intel.com>
Date: Fri, 12 Jul 2024 15:48:51 +0100
Subject: [PATCH] crypto/qat: fix GEN4 write
[ upstream commit c355c2d8e65f02fa9621249c9b2a111477230c89 ]
All generations of QAT use the same Gen1 raw datapath.
Gen4 needs a different WRITE function than other generations.
Added separation for configuration of raw ctx for Gen4 from
the Gen1 codepath.
Fixes: 85fec6fd9674 ("crypto/qat: unify raw data path functions")
Signed-off-by: Brian Dooley <brian.dooley@intel.com>
Acked-by: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
---
drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c | 121 ++++++++++++++++++-
drivers/crypto/qat/dev/qat_crypto_pmd_gens.h | 6 +
2 files changed, 123 insertions(+), 4 deletions(-)
diff --git a/drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c b/drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c
index b219a418ba..52218e5a0a 100644
--- a/drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c
+++ b/drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c
@@ -9,6 +9,7 @@
#include "qat_asym.h"
#include "qat_crypto.h"
#include "qat_crypto_pmd_gens.h"
+#include "adf_transport_access_macros_gen4vf.h"
static struct rte_cryptodev_capabilities qat_sym_crypto_caps_gen4[] = {
QAT_SYM_CIPHER_CAP(AES_CBC,
@@ -223,6 +224,78 @@ qat_sym_build_op_aead_gen4(void *in_op, struct qat_sym_session *ctx,
return 0;
}
+int
+qat_sym_dp_enqueue_done_gen4(void *qp_data, uint8_t *drv_ctx, uint32_t n)
+{
+ struct qat_qp *qp = qp_data;
+ struct qat_queue *tx_queue = &qp->tx_q;
+ struct qat_sym_dp_ctx *dp_ctx = (void *)drv_ctx;
+
+ if (unlikely(dp_ctx->cached_enqueue != n))
+ return -1;
+
+ qp->enqueued += n;
+ qp->stats.enqueued_count += n;
+
+ tx_queue->tail = dp_ctx->tail;
+
+ WRITE_CSR_RING_TAIL_GEN4VF(qp->mmap_bar_addr,
+ tx_queue->hw_bundle_number,
+ tx_queue->hw_queue_number, tx_queue->tail);
+
+ tx_queue->csr_tail = tx_queue->tail;
+ dp_ctx->cached_enqueue = 0;
+
+ return 0;
+}
+
+int
+qat_sym_dp_dequeue_done_gen4(void *qp_data, uint8_t *drv_ctx, uint32_t n)
+{
+ struct qat_qp *qp = qp_data;
+ struct qat_queue *rx_queue = &qp->rx_q;
+ struct qat_sym_dp_ctx *dp_ctx = (void *)drv_ctx;
+
+ if (unlikely(dp_ctx->cached_dequeue != n))
+ return -1;
+
+ rx_queue->head = dp_ctx->head;
+ rx_queue->nb_processed_responses += n;
+ qp->dequeued += n;
+ qp->stats.dequeued_count += n;
+ if (rx_queue->nb_processed_responses > QAT_CSR_HEAD_WRITE_THRESH) {
+ uint32_t old_head, new_head;
+ uint32_t max_head;
+
+ old_head = rx_queue->csr_head;
+ new_head = rx_queue->head;
+ max_head = qp->nb_descriptors * rx_queue->msg_size;
+
+ /* write out free descriptors */
+ void *cur_desc = (uint8_t *)rx_queue->base_addr + old_head;
+
+ if (new_head < old_head) {
+ memset(cur_desc, ADF_RING_EMPTY_SIG_BYTE,
+ max_head - old_head);
+ memset(rx_queue->base_addr, ADF_RING_EMPTY_SIG_BYTE,
+ new_head);
+ } else {
+ memset(cur_desc, ADF_RING_EMPTY_SIG_BYTE, new_head -
+ old_head);
+ }
+ rx_queue->nb_processed_responses = 0;
+ rx_queue->csr_head = new_head;
+
+ /* write current head to CSR */
+ WRITE_CSR_RING_HEAD_GEN4VF(qp->mmap_bar_addr,
+ rx_queue->hw_bundle_number, rx_queue->hw_queue_number,
+ new_head);
+ }
+
+ dp_ctx->cached_dequeue = 0;
+ return 0;
+}
+
static int
qat_sym_crypto_set_session_gen4(void *cdev, void *session)
{
@@ -383,11 +456,51 @@ qat_sym_configure_raw_dp_ctx_gen4(void *_raw_dp_ctx, void *_ctx)
{
struct rte_crypto_raw_dp_ctx *raw_dp_ctx = _raw_dp_ctx;
struct qat_sym_session *ctx = _ctx;
- int ret;
- ret = qat_sym_configure_raw_dp_ctx_gen1(_raw_dp_ctx, _ctx);
- if (ret < 0)
- return ret;
+ raw_dp_ctx->enqueue_done = qat_sym_dp_enqueue_done_gen4;
+ raw_dp_ctx->dequeue_burst = qat_sym_dp_dequeue_burst_gen1;
+ raw_dp_ctx->dequeue = qat_sym_dp_dequeue_single_gen1;
+ raw_dp_ctx->dequeue_done = qat_sym_dp_dequeue_done_gen4;
+
+ if ((ctx->qat_cmd == ICP_QAT_FW_LA_CMD_HASH_CIPHER ||
+ ctx->qat_cmd == ICP_QAT_FW_LA_CMD_CIPHER_HASH) &&
+ !ctx->is_gmac) {
+ /* AES-GCM or AES-CCM */
+ if (ctx->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_GALOIS_128 ||
+ ctx->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_GALOIS_64 ||
+ (ctx->qat_cipher_alg == ICP_QAT_HW_CIPHER_ALGO_AES128
+ && ctx->qat_mode == ICP_QAT_HW_CIPHER_CTR_MODE
+ && ctx->qat_hash_alg ==
+ ICP_QAT_HW_AUTH_ALGO_AES_CBC_MAC)) {
+ raw_dp_ctx->enqueue_burst =
+ qat_sym_dp_enqueue_aead_jobs_gen1;
+ raw_dp_ctx->enqueue =
+ qat_sym_dp_enqueue_single_aead_gen1;
+ } else {
+ raw_dp_ctx->enqueue_burst =
+ qat_sym_dp_enqueue_chain_jobs_gen1;
+ raw_dp_ctx->enqueue =
+ qat_sym_dp_enqueue_single_chain_gen1;
+ }
+ } else if (ctx->qat_cmd == ICP_QAT_FW_LA_CMD_AUTH || ctx->is_gmac) {
+ raw_dp_ctx->enqueue_burst = qat_sym_dp_enqueue_auth_jobs_gen1;
+ raw_dp_ctx->enqueue = qat_sym_dp_enqueue_single_auth_gen1;
+ } else if (ctx->qat_cmd == ICP_QAT_FW_LA_CMD_CIPHER) {
+ if (ctx->qat_mode == ICP_QAT_HW_CIPHER_AEAD_MODE ||
+ ctx->qat_cipher_alg ==
+ ICP_QAT_HW_CIPHER_ALGO_CHACHA20_POLY1305) {
+ raw_dp_ctx->enqueue_burst =
+ qat_sym_dp_enqueue_aead_jobs_gen1;
+ raw_dp_ctx->enqueue =
+ qat_sym_dp_enqueue_single_aead_gen1;
+ } else {
+ raw_dp_ctx->enqueue_burst =
+ qat_sym_dp_enqueue_cipher_jobs_gen1;
+ raw_dp_ctx->enqueue =
+ qat_sym_dp_enqueue_single_cipher_gen1;
+ }
+ } else
+ return -1;
if (ctx->is_single_pass && ctx->is_ucs) {
raw_dp_ctx->enqueue_burst = qat_sym_dp_enqueue_aead_jobs_gen4;
diff --git a/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h b/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
index 2b1b0eb717..1acb0c4985 100644
--- a/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
+++ b/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
@@ -927,6 +927,12 @@ qat_sym_dp_enqueue_done_gen1(void *qp_data, uint8_t *drv_ctx, uint32_t n);
int
qat_sym_dp_dequeue_done_gen1(void *qp_data, uint8_t *drv_ctx, uint32_t n);
+int
+qat_sym_dp_enqueue_done_gen4(void *qp_data, uint8_t *drv_ctx, uint32_t n);
+
+int
+qat_sym_dp_dequeue_done_gen4(void *qp_data, uint8_t *drv_ctx, uint32_t n);
+
int
qat_sym_configure_raw_dp_ctx_gen1(void *_raw_dp_ctx, void *_ctx);
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:20.924881196 +0100
+++ 0001-crypto-qat-fix-GEN4-write.patch 2024-07-24 12:29:20.623023153 +0100
@@ -1 +1 @@
-From c355c2d8e65f02fa9621249c9b2a111477230c89 Mon Sep 17 00:00:00 2001
+From e793a7063f95d32916301282a820ffb16933b25e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c355c2d8e65f02fa9621249c9b2a111477230c89 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 5e808a60bf..6a5d6e78b9 100644
+index b219a418ba..52218e5a0a 100644
@@ -31,3 +32,3 @@
-
- static struct rte_cryptodev_capabilities qat_sym_crypto_legacy_caps_gen4[] = {
-@@ -233,6 +234,78 @@ qat_sym_build_op_aead_gen4(void *in_op, struct qat_sym_session *ctx,
+ static struct rte_cryptodev_capabilities qat_sym_crypto_caps_gen4[] = {
+ QAT_SYM_CIPHER_CAP(AES_CBC,
+@@ -223,6 +224,78 @@ qat_sym_build_op_aead_gen4(void *in_op, struct qat_sym_session *ctx,
@@ -109 +110 @@
- int
+ static int
@@ -112 +113 @@
-@@ -390,11 +463,51 @@ qat_sym_configure_raw_dp_ctx_gen4(void *_raw_dp_ctx, void *_ctx)
+@@ -383,11 +456,51 @@ qat_sym_configure_raw_dp_ctx_gen4(void *_raw_dp_ctx, void *_ctx)
@@ -169 +170 @@
-index 1f5d2583c4..2c5816e696 100644
+index 2b1b0eb717..1acb0c4985 100644
@@ -172 +173 @@
-@@ -1040,6 +1040,12 @@ qat_sym_dp_enqueue_done_gen1(void *qp_data, uint8_t *drv_ctx, uint32_t n);
+@@ -927,6 +927,12 @@ qat_sym_dp_enqueue_done_gen1(void *qp_data, uint8_t *drv_ctx, uint32_t n);
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'crypto/ipsec_mb: fix function comment' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
@ 2024-07-24 11:32 ` luca.boccassi
2024-07-24 11:32 ` patch 'test/crypto: fix allocation " luca.boccassi
` (37 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:32 UTC (permalink / raw)
To: Joel Kavanagh; +Cc: Brian Dooley, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/8e373a7f33beb4139c9460e33d8d222942e6fef1
Thanks.
Luca Boccassi
---
From 8e373a7f33beb4139c9460e33d8d222942e6fef1 Mon Sep 17 00:00:00 2001
From: Joel Kavanagh <joel.kavanagh@intel.com>
Date: Wed, 17 Jul 2024 15:49:05 +0000
Subject: [PATCH] crypto/ipsec_mb: fix function comment
[ upstream commit 2615a7312153fac0bf2507248c28bc6e1b35289e ]
This patch fixes a typo in the log message for error allocation.
The typo incorrectly spelled 'allocating' as 'allocationg' in the
log message for error allocation.
Fixes: f9dfb59edbcc ("crypto/ipsec_mb: support remaining SGL")
Signed-off-by: Joel Kavanagh <joel.kavanagh@intel.com>
Acked-by: Brian Dooley <brian.dooley@intel.com>
---
.mailmap | 3 ++-
drivers/crypto/ipsec_mb/pmd_aesni_mb.c | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/.mailmap b/.mailmap
index 95826dac6c..9ee9365f8b 100644
--- a/.mailmap
+++ b/.mailmap
@@ -639,7 +639,8 @@ Jin Liu <jin.liu@corigine.com>
Jin Yu <jin.yu@intel.com>
Jiri Slaby <jslaby@suse.cz>
Job Abraham <job.abraham@intel.com>
-Jochen Behrens <jbehrens@vmware.com>
+Jochen Behrens <jochen.behrens@broadcom.com> <jbehrens@vmware.com>
+Joel Kavanagh <joel.kavanagh@intel.com>
Joey Xing <joey.xing@jaguarmicro.com>
Johan Faltstrom <johan.faltstrom@netinsight.net>
Johan Källström <johan.kallstrom@ericsson.com>
diff --git a/drivers/crypto/ipsec_mb/pmd_aesni_mb.c b/drivers/crypto/ipsec_mb/pmd_aesni_mb.c
index 02d419b587..46da01254b 100644
--- a/drivers/crypto/ipsec_mb/pmd_aesni_mb.c
+++ b/drivers/crypto/ipsec_mb/pmd_aesni_mb.c
@@ -1249,7 +1249,7 @@ imb_lib_support_sgl_algo(IMB_CIPHER_MODE alg)
*
* @return
* - 0 on success, the IMB_JOB will be filled
- * - -1 if invalid session or errors allocationg SGL linear buffer,
+ * - -1 if invalid session or errors allocating SGL linear buffer,
* IMB_JOB will not be filled
*/
static inline int
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:20.987858980 +0100
+++ 0002-crypto-ipsec_mb-fix-function-comment.patch 2024-07-24 12:29:20.631023314 +0100
@@ -1 +1 @@
-From 2615a7312153fac0bf2507248c28bc6e1b35289e Mon Sep 17 00:00:00 2001
+From 8e373a7f33beb4139c9460e33d8d222942e6fef1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2615a7312153fac0bf2507248c28bc6e1b35289e ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -16 +17 @@
- .mailmap | 1 +
+ .mailmap | 3 ++-
@@ -18 +19 @@
- 2 files changed, 2 insertions(+), 1 deletion(-)
+ 2 files changed, 3 insertions(+), 2 deletions(-)
@@ -21 +22 @@
-index 3f3f0442e5..a6088813cc 100644
+index 95826dac6c..9ee9365f8b 100644
@@ -24 +25,2 @@
-@@ -685,6 +685,7 @@ Jin Yu <jin.yu@intel.com>
+@@ -639,7 +639,8 @@ Jin Liu <jin.liu@corigine.com>
+ Jin Yu <jin.yu@intel.com>
@@ -27 +29,2 @@
- Jochen Behrens <jochen.behrens@broadcom.com> <jbehrens@vmware.com>
+-Jochen Behrens <jbehrens@vmware.com>
++Jochen Behrens <jochen.behrens@broadcom.com> <jbehrens@vmware.com>
@@ -33 +36 @@
-index d74946c180..ef4228bd38 100644
+index 02d419b587..46da01254b 100644
@@ -36 +39 @@
-@@ -1534,7 +1534,7 @@ aesni_mb_digest_appended_in_src(struct rte_crypto_op *op, IMB_JOB *job,
+@@ -1249,7 +1249,7 @@ imb_lib_support_sgl_algo(IMB_CIPHER_MODE alg)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'test/crypto: fix allocation comment' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
2024-07-24 11:32 ` patch 'crypto/ipsec_mb: fix function comment' " luca.boccassi
@ 2024-07-24 11:32 ` luca.boccassi
2024-07-24 11:32 ` patch 'crypto/qat: fix log message typo' " luca.boccassi
` (36 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:32 UTC (permalink / raw)
To: Joel Kavanagh; +Cc: Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/5a257288f85d01c4c199ca66c7da1bd8937f39ce
Thanks.
Luca Boccassi
---
From 5a257288f85d01c4c199ca66c7da1bd8937f39ce Mon Sep 17 00:00:00 2001
From: Joel Kavanagh <joel.kavanagh@intel.com>
Date: Wed, 17 Jul 2024 15:49:06 +0000
Subject: [PATCH] test/crypto: fix allocation comment
[ upstream commit 8020502dde70cabc7f65219d8f8db762b03b0e41 ]
This patch fixes a typo in the `test_cryptodev.c` file where "out-op" was
incorrectly used instead of "out-of-place" on three separate occasions.
Fixes: f3dbf94be60c ("app/test: check SGL on QAT")
Fixes: 43220096d66a ("test/crypto: add PDCP cases for scatter gather")
Signed-off-by: Joel Kavanagh <joel.kavanagh@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
app/test/test_cryptodev.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 68c82771a1..2069ccad3b 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -8616,7 +8616,7 @@ static int test_pdcp_proto(int i, int oop, enum rte_crypto_cipher_operation opc,
/* Out of place support */
if (oop) {
/*
- * For out-op-place we need to alloc another mbuf
+ * For out-of-place we need to alloc another mbuf
*/
ut_params->obuf = rte_pktmbuf_alloc(ts_params->mbuf_pool);
rte_pktmbuf_append(ut_params->obuf, output_vec_len);
@@ -8825,7 +8825,7 @@ test_pdcp_proto_SGL(int i, int oop,
/* Out of place support */
if (oop) {
/*
- * For out-op-place we need to alloc another mbuf
+ * For out-of-place we need to alloc another mbuf
*/
ut_params->obuf = rte_pktmbuf_alloc(ts_params->mbuf_pool);
rte_pktmbuf_append(ut_params->obuf, frag_size_oop);
@@ -14623,7 +14623,7 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
}
/*
- * For out-op-place we need to alloc another mbuf
+ * For out-of-place we need to alloc another mbuf
*/
if (oop) {
ut_params->obuf = rte_pktmbuf_alloc(ts_params->mbuf_pool);
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:21.062323515 +0100
+++ 0003-test-crypto-fix-allocation-comment.patch 2024-07-24 12:29:20.659023877 +0100
@@ -1 +1 @@
-From 8020502dde70cabc7f65219d8f8db762b03b0e41 Mon Sep 17 00:00:00 2001
+From 5a257288f85d01c4c199ca66c7da1bd8937f39ce Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8020502dde70cabc7f65219d8f8db762b03b0e41 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 6042db36a4..c846b26ed1 100644
+index 68c82771a1..2069ccad3b 100644
@@ -23 +24 @@
-@@ -9428,7 +9428,7 @@ static int test_pdcp_proto(int i, int oop, enum rte_crypto_cipher_operation opc,
+@@ -8616,7 +8616,7 @@ static int test_pdcp_proto(int i, int oop, enum rte_crypto_cipher_operation opc,
@@ -32 +33 @@
-@@ -9637,7 +9637,7 @@ test_pdcp_proto_SGL(int i, int oop,
+@@ -8825,7 +8825,7 @@ test_pdcp_proto_SGL(int i, int oop,
@@ -41 +42 @@
-@@ -16831,7 +16831,7 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
+@@ -14623,7 +14623,7 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'crypto/qat: fix log message typo' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
2024-07-24 11:32 ` patch 'crypto/ipsec_mb: fix function comment' " luca.boccassi
2024-07-24 11:32 ` patch 'test/crypto: fix allocation " luca.boccassi
@ 2024-07-24 11:32 ` luca.boccassi
2024-07-24 11:32 ` patch 'doc: fix typo in l2fwd-crypto guide' " luca.boccassi
` (35 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:32 UTC (permalink / raw)
To: Joel Kavanagh; +Cc: Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f4834455b224b08ae9d642323b3043f97cddec1d
Thanks.
Luca Boccassi
---
From f4834455b224b08ae9d642323b3043f97cddec1d Mon Sep 17 00:00:00 2001
From: Joel Kavanagh <joel.kavanagh@intel.com>
Date: Wed, 17 Jul 2024 15:49:07 +0000
Subject: [PATCH] crypto/qat: fix log message typo
[ upstream commit 8731420d9ad6087e4b3ebe3c2bfb26ee5c3c8826 ]
This patch fixes a typo in the log message for rte_security support.
The typo incorrectly spelled 'enabled' as 'ensabled' in the
log message indicating that rte_security support is enabled.
Fixes: fb3b9f492205 ("crypto/qat: rework burst data path")
Signed-off-by: Joel Kavanagh <joel.kavanagh@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
drivers/crypto/qat/qat_sym.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/qat/qat_sym.c b/drivers/crypto/qat/qat_sym.c
index 18f99089e8..f68d96f4f5 100644
--- a/drivers/crypto/qat/qat_sym.c
+++ b/drivers/crypto/qat/qat_sym.c
@@ -266,7 +266,7 @@ qat_sym_dev_create(struct qat_pci_device *qat_pci_dev,
}
cryptodev->feature_flags |= RTE_CRYPTODEV_FF_SECURITY;
- QAT_LOG(INFO, "Device %s rte_security support ensabled", name);
+ QAT_LOG(INFO, "Device %s rte_security support enabled", name);
} else {
QAT_LOG(INFO, "Device %s rte_security support disabled", name);
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:21.154394270 +0100
+++ 0004-crypto-qat-fix-log-message-typo.patch 2024-07-24 12:29:20.659023877 +0100
@@ -1 +1 @@
-From 8731420d9ad6087e4b3ebe3c2bfb26ee5c3c8826 Mon Sep 17 00:00:00 2001
+From f4834455b224b08ae9d642323b3043f97cddec1d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8731420d9ad6087e4b3ebe3c2bfb26ee5c3c8826 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index b41d1b1def..d979ae6489 100644
+index 18f99089e8..f68d96f4f5 100644
@@ -23 +24 @@
-@@ -291,7 +291,7 @@ qat_sym_dev_create(struct qat_pci_device *qat_pci_dev)
+@@ -266,7 +266,7 @@ qat_sym_dev_create(struct qat_pci_device *qat_pci_dev,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'doc: fix typo in l2fwd-crypto guide' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (2 preceding siblings ...)
2024-07-24 11:32 ` patch 'crypto/qat: fix log message typo' " luca.boccassi
@ 2024-07-24 11:32 ` luca.boccassi
2024-07-24 11:32 ` patch 'test/crypto: remove unused stats in setup' " luca.boccassi
` (34 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:32 UTC (permalink / raw)
To: Joel Kavanagh; +Cc: Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/ffc0a0f5d9ba1c59a0f0ab64eb97af14e0fc8d90
Thanks.
Luca Boccassi
---
From ffc0a0f5d9ba1c59a0f0ab64eb97af14e0fc8d90 Mon Sep 17 00:00:00 2001
From: Joel Kavanagh <joel.kavanagh@intel.com>
Date: Wed, 17 Jul 2024 15:49:08 +0000
Subject: [PATCH] doc: fix typo in l2fwd-crypto guide
[ upstream commit cf0556f4a11c1de87f94ed9ba0c14267cb034217 ]
This patch fixes a typo in the l2fwd-crypto documentation where
the l2fwd-crypt was changed to l2fwd-crypto.
Fixes: 7cacb0565539 ("doc: add generic build instructions for sample apps")
Signed-off-by: Joel Kavanagh <joel.kavanagh@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
doc/guides/sample_app_ug/l2_forward_crypto.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/guides/sample_app_ug/l2_forward_crypto.rst b/doc/guides/sample_app_ug/l2_forward_crypto.rst
index ce49eab96f..7ff304d05c 100644
--- a/doc/guides/sample_app_ug/l2_forward_crypto.rst
+++ b/doc/guides/sample_app_ug/l2_forward_crypto.rst
@@ -30,7 +30,7 @@ Compiling the Application
To compile the sample application see :doc:`compiling`.
-The application is located in the ``l2fwd-crypt`` sub-directory.
+The application is located in the ``l2fwd-crypto`` sub-directory.
Running the Application
-----------------------
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:21.217759525 +0100
+++ 0005-doc-fix-typo-in-l2fwd-crypto-guide.patch 2024-07-24 12:29:20.659023877 +0100
@@ -1 +1 @@
-From cf0556f4a11c1de87f94ed9ba0c14267cb034217 Mon Sep 17 00:00:00 2001
+From ffc0a0f5d9ba1c59a0f0ab64eb97af14e0fc8d90 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cf0556f4a11c1de87f94ed9ba0c14267cb034217 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'test/crypto: remove unused stats in setup' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (3 preceding siblings ...)
2024-07-24 11:32 ` patch 'doc: fix typo in l2fwd-crypto guide' " luca.boccassi
@ 2024-07-24 11:32 ` luca.boccassi
2024-07-24 11:32 ` patch 'test/crypto: fix asymmetric capability test' " luca.boccassi
` (33 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:32 UTC (permalink / raw)
To: Gowrishankar Muthukrishnan; +Cc: Anoob Joseph, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/5456b47a3a7b4208723f8664a8c6a80293b95723
Thanks.
Luca Boccassi
---
From 5456b47a3a7b4208723f8664a8c6a80293b95723 Mon Sep 17 00:00:00 2001
From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Date: Mon, 15 Jul 2024 19:06:10 +0530
Subject: [PATCH] test/crypto: remove unused stats in setup
[ upstream commit cda0736804e1803c0c7176fd0d81e42e50b2d010 ]
Remove unused stats in test setup.
Coverity issue: 373869
Fixes: 2c6dab9cd93d ("test/crypto: add RSA and Mod tests")
Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
---
app/test/test_cryptodev_asym.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c
index b3345c0a39..be104b4952 100644
--- a/app/test/test_cryptodev_asym.c
+++ b/app/test/test_cryptodev_asym.c
@@ -953,8 +953,6 @@ ut_setup_asym(void)
qp_id, ts_params->valid_devs[0]);
}
- rte_cryptodev_stats_reset(ts_params->valid_devs[0]);
-
/* Start the device */
TEST_ASSERT_SUCCESS(rte_cryptodev_start(ts_params->valid_devs[0]),
"Failed to start cryptodev %u",
@@ -967,9 +965,6 @@ static void
ut_teardown_asym(void)
{
struct crypto_testsuite_params_asym *ts_params = &testsuite_params;
- struct rte_cryptodev_stats stats;
-
- rte_cryptodev_stats_get(ts_params->valid_devs[0], &stats);
/* Stop the device */
rte_cryptodev_stop(ts_params->valid_devs[0]);
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:21.284365669 +0100
+++ 0006-test-crypto-remove-unused-stats-in-setup.patch 2024-07-24 12:29:20.663023958 +0100
@@ -1 +1 @@
-From cda0736804e1803c0c7176fd0d81e42e50b2d010 Mon Sep 17 00:00:00 2001
+From 5456b47a3a7b4208723f8664a8c6a80293b95723 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cda0736804e1803c0c7176fd0d81e42e50b2d010 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index ef926c6229..3802cf8022 100644
+index b3345c0a39..be104b4952 100644
@@ -22 +23 @@
-@@ -547,8 +547,6 @@ ut_setup_asym(void)
+@@ -953,8 +953,6 @@ ut_setup_asym(void)
@@ -31 +32 @@
-@@ -561,7 +559,6 @@ static void
+@@ -967,9 +965,6 @@ static void
@@ -36,8 +36,0 @@
- uint8_t dev_id = ts_params->valid_devs[0];
-
- if (self->sess != NULL)
-@@ -571,8 +568,6 @@ ut_teardown_asym(void)
- self->op = NULL;
- self->result_op = NULL;
-
-- rte_cryptodev_stats_get(ts_params->valid_devs[0], &stats);
@@ -44,0 +38,2 @@
+- rte_cryptodev_stats_get(ts_params->valid_devs[0], &stats);
+
@@ -47 +41,0 @@
- }
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'test/crypto: fix asymmetric capability test' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (4 preceding siblings ...)
2024-07-24 11:32 ` patch 'test/crypto: remove unused stats in setup' " luca.boccassi
@ 2024-07-24 11:32 ` luca.boccassi
2024-07-24 11:32 ` patch 'crypto/qat: fix placement of OOP offset' " luca.boccassi
` (32 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:32 UTC (permalink / raw)
To: Gowrishankar Muthukrishnan; +Cc: Anoob Joseph, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/327b33505c5d49c92847b5c9d8961749060540d8
Thanks.
Luca Boccassi
---
From 327b33505c5d49c92847b5c9d8961749060540d8 Mon Sep 17 00:00:00 2001
From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Date: Mon, 15 Jul 2024 19:07:25 +0530
Subject: [PATCH] test/crypto: fix asymmetric capability test
[ upstream commit 624ce7e33a793d8d6a4ac6b0b8e1c6f2bce7feb1 ]
Updated asymmetric capability test for below issues:
* Skip test if asymmetric crypto feature is not supported by device.
* Assert return value of RTE function to get asymmetric capability.
Coverity issue: 373365
Fixes: 2c6dab9cd93d ("test/crypto: add RSA and Mod tests")
Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
---
app/test/test_cryptodev_asym.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c
index be104b4952..4c86a2bcec 100644
--- a/app/test/test_cryptodev_asym.c
+++ b/app/test/test_cryptodev_asym.c
@@ -1023,7 +1023,7 @@ test_capability(void)
RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO)) {
RTE_LOG(INFO, USER1,
"Device doesn't support asymmetric. Test Skipped\n");
- return TEST_SUCCESS;
+ return TEST_SKIPPED;
}
/* print xform capability */
@@ -1038,6 +1038,7 @@ test_capability(void)
capa = rte_cryptodev_asym_capability_get(dev_id,
(const struct
rte_cryptodev_asym_capability_idx *) &idx);
+ TEST_ASSERT_NOT_NULL(capa, "Failed to get asymmetric capability");
print_asym_capa(capa);
}
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:21.355112267 +0100
+++ 0007-test-crypto-fix-asymmetric-capability-test.patch 2024-07-24 12:29:20.667024038 +0100
@@ -1 +1 @@
-From 624ce7e33a793d8d6a4ac6b0b8e1c6f2bce7feb1 Mon Sep 17 00:00:00 2001
+From 327b33505c5d49c92847b5c9d8961749060540d8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 624ce7e33a793d8d6a4ac6b0b8e1c6f2bce7feb1 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 3802cf8022..1d88832146 100644
+index be104b4952..4c86a2bcec 100644
@@ -24 +25 @@
-@@ -626,7 +626,7 @@ test_capability(void)
+@@ -1023,7 +1023,7 @@ test_capability(void)
@@ -33 +34 @@
-@@ -641,6 +641,7 @@ test_capability(void)
+@@ -1038,6 +1038,7 @@ test_capability(void)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'crypto/qat: fix placement of OOP offset' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (5 preceding siblings ...)
2024-07-24 11:32 ` patch 'test/crypto: fix asymmetric capability test' " luca.boccassi
@ 2024-07-24 11:32 ` luca.boccassi
2024-07-24 11:32 ` patch 'net/ice: fix memory leaks in raw pattern parsing' " luca.boccassi
` (31 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:32 UTC (permalink / raw)
To: Arkadiusz Kusztal; +Cc: Brian Dooley, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/68d0c242e461594db53f2a9918a59b6fb3f18c5f
Thanks.
Luca Boccassi
---
From 68d0c242e461594db53f2a9918a59b6fb3f18c5f Mon Sep 17 00:00:00 2001
From: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
Date: Thu, 4 Jul 2024 11:26:49 +0100
Subject: [PATCH] crypto/qat: fix placement of OOP offset
[ upstream commit 9f0a50dd2bc4acec586616bf5553de4711451991 ]
This patch fixes incorrect placement of OOP offset.
Data preceding crypto operation is not copied to the output
buffer, which is conformant to the API.
Fixes: a815a04cea05 ("crypto/qat: support symmetric build op request")
Signed-off-by: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Brian Dooley <brian.dooley@intel.com>
---
drivers/crypto/qat/dev/qat_crypto_pmd_gens.h | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h b/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
index 1acb0c4985..266ab74a01 100644
--- a/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
+++ b/drivers/crypto/qat/dev/qat_crypto_pmd_gens.h
@@ -375,7 +375,7 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
struct qat_sym_op_cookie *cookie)
{
union rte_crypto_sym_ofs ofs;
- uint32_t max_len = 0;
+ uint32_t max_len = 0, oop_offset = 0;
uint32_t cipher_len = 0, cipher_ofs = 0;
uint32_t auth_len = 0, auth_ofs = 0;
int is_oop = (op->sym->m_dst != NULL) &&
@@ -438,6 +438,16 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
max_len = RTE_MAX(cipher_ofs + cipher_len, auth_ofs + auth_len);
+ /* If OOP, we need to keep in mind that offset needs to start where
+ * cipher/auth starts, namely no offset on the smaller one
+ */
+ if (is_oop) {
+ oop_offset = RTE_MIN(auth_ofs, cipher_ofs);
+ auth_ofs -= oop_offset;
+ cipher_ofs -= oop_offset;
+ max_len -= oop_offset;
+ }
+
/* digest in buffer check. Needed only for wireless algos */
if (ret == 1) {
/* Handle digest-encrypted cases, i.e.
@@ -471,9 +481,7 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
max_len = RTE_MAX(max_len, auth_ofs + auth_len +
ctx->digest_length);
}
-
- /* Passing 0 as cipher & auth offsets are assigned into ofs later */
- n_src = rte_crypto_mbuf_to_vec(op->sym->m_src, 0, max_len,
+ n_src = rte_crypto_mbuf_to_vec(op->sym->m_src, oop_offset, max_len,
in_sgl->vec, QAT_SYM_SGL_MAX_NUMBER);
if (unlikely(n_src < 0 || n_src > op->sym->m_src->nb_segs)) {
op->status = RTE_CRYPTO_OP_STATUS_ERROR;
@@ -483,7 +491,7 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
if (unlikely((op->sym->m_dst != NULL) &&
(op->sym->m_dst != op->sym->m_src))) {
- int n_dst = rte_crypto_mbuf_to_vec(op->sym->m_dst, 0,
+ int n_dst = rte_crypto_mbuf_to_vec(op->sym->m_dst, oop_offset,
max_len, out_sgl->vec, QAT_SYM_SGL_MAX_NUMBER);
if (n_dst < 0 || n_dst > op->sym->m_dst->nb_segs) {
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:21.426236716 +0100
+++ 0008-crypto-qat-fix-placement-of-OOP-offset.patch 2024-07-24 12:29:20.671024119 +0100
@@ -1 +1 @@
-From 9f0a50dd2bc4acec586616bf5553de4711451991 Mon Sep 17 00:00:00 2001
+From 68d0c242e461594db53f2a9918a59b6fb3f18c5f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9f0a50dd2bc4acec586616bf5553de4711451991 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 2c5816e696..35c1888082 100644
+index 1acb0c4985..266ab74a01 100644
@@ -23 +24 @@
-@@ -399,7 +399,7 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
+@@ -375,7 +375,7 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
@@ -32 +33 @@
-@@ -473,6 +473,16 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
+@@ -438,6 +438,16 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
@@ -46,4 +47,4 @@
- /* digest in buffer check. Needed only for wireless algos
- * or combined cipher-crc operations
- */
-@@ -513,9 +523,7 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
+ /* digest in buffer check. Needed only for wireless algos */
+ if (ret == 1) {
+ /* Handle digest-encrypted cases, i.e.
+@@ -471,9 +481,7 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
@@ -60 +61 @@
-@@ -525,7 +533,7 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
+@@ -483,7 +491,7 @@ qat_sym_convert_op_to_vec_chain(struct rte_crypto_op *op,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ice: fix memory leaks in raw pattern parsing' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (6 preceding siblings ...)
2024-07-24 11:32 ` patch 'crypto/qat: fix placement of OOP offset' " luca.boccassi
@ 2024-07-24 11:32 ` luca.boccassi
2024-07-24 11:32 ` patch 'net/ice: fix return value for " luca.boccassi
` (30 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:32 UTC (permalink / raw)
To: Vladimir Medvedkin
Cc: Michael Theodore Stolarchuk, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/9928f1ec31182aba956b3d5e6f894eb7e97922b6
Thanks.
Luca Boccassi
---
From 9928f1ec31182aba956b3d5e6f894eb7e97922b6 Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Date: Mon, 22 Jul 2024 13:50:44 +0000
Subject: [PATCH] net/ice: fix memory leaks in raw pattern parsing
[ upstream commit 8044e1d19db3d0012bd1348cb4fcf542d31cd41a ]
This patch fixes possible memory leaks inside the
ice_hash_parse_raw_pattern() due to the lack of a call to rte_free() for
previously allocated pkt_buf and msk_buf.
Fixes: 1b9c68120a1c ("net/ice: enable protocol agnostic flow offloading in RSS")
Reported-by: Michael Theodore Stolarchuk <mike.stolarchuk@arista.com>
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
.mailmap | 1 +
drivers/net/ice/ice_hash.c | 22 ++++++++++++++--------
2 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/.mailmap b/.mailmap
index 9ee9365f8b..0398b858fb 100644
--- a/.mailmap
+++ b/.mailmap
@@ -915,6 +915,7 @@ Michael Santana <maicolgabriel@hotmail.com> <msantana@redhat.com>
Michael Savisko <michaelsav@nvidia.com>
Michael Shamis <michaelsh@marvell.com>
Michael S. Tsirkin <mst@redhat.com>
+Michael Theodore Stolarchuk <mike.stolarchuk@arista.com>
Michael Wildt <michael.wildt@broadcom.com>
Michal Berger <michallinuxstuff@gmail.com>
Michal Jastrzebski <michalx.k.jastrzebski@intel.com>
diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
index 52646e9408..6fcfc5fc4c 100644
--- a/drivers/net/ice/ice_hash.c
+++ b/drivers/net/ice/ice_hash.c
@@ -657,7 +657,7 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad,
uint8_t *pkt_buf, *msk_buf;
uint8_t tmp_val = 0;
uint8_t tmp_c = 0;
- int i, j;
+ int i, j, ret = 0;
if (ad->psr == NULL)
return -rte_errno;
@@ -677,8 +677,10 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad,
return -ENOMEM;
msk_buf = rte_zmalloc(NULL, pkt_len, 0);
- if (!msk_buf)
+ if (!msk_buf) {
+ rte_free(pkt_buf);
return -ENOMEM;
+ }
/* convert string to int array */
for (i = 0, j = 0; i < spec_len; i += 2, j++) {
@@ -715,18 +717,22 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad,
msk_buf[j] = tmp_val * 16 + tmp_c - '0';
}
- if (ice_parser_run(ad->psr, pkt_buf, pkt_len, &rslt))
- return -rte_errno;
+ ret = ice_parser_run(ad->psr, pkt_buf, pkt_len, &rslt);
+ if (ret)
+ goto free_mem;
- if (ice_parser_profile_init(&rslt, pkt_buf, msk_buf,
- pkt_len, ICE_BLK_RSS, true, &prof))
- return -rte_errno;
+ ret = ice_parser_profile_init(&rslt, pkt_buf, msk_buf,
+ pkt_len, ICE_BLK_RSS, true, &prof);
+ if (ret)
+ goto free_mem;
rte_memcpy(&meta->raw.prof, &prof, sizeof(prof));
+free_mem:
rte_free(pkt_buf);
rte_free(msk_buf);
- return 0;
+
+ return ret;
}
static void
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:21.494044552 +0100
+++ 0009-net-ice-fix-memory-leaks-in-raw-pattern-parsing.patch 2024-07-24 12:29:20.675024200 +0100
@@ -1 +1 @@
-From 8044e1d19db3d0012bd1348cb4fcf542d31cd41a Mon Sep 17 00:00:00 2001
+From 9928f1ec31182aba956b3d5e6f894eb7e97922b6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8044e1d19db3d0012bd1348cb4fcf542d31cd41a ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index a6088813cc..541ca895a4 100644
+index 9ee9365f8b..0398b858fb 100644
@@ -25 +26 @@
-@@ -978,6 +978,7 @@ Michael Santana <maicolgabriel@hotmail.com> <msantana@redhat.com>
+@@ -915,6 +915,7 @@ Michael Santana <maicolgabriel@hotmail.com> <msantana@redhat.com>
@@ -34 +35 @@
-index f923641533..6b3095e2c5 100644
+index 52646e9408..6fcfc5fc4c 100644
@@ -37 +38 @@
-@@ -650,7 +650,7 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad,
+@@ -657,7 +657,7 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad,
@@ -46 +47 @@
-@@ -670,8 +670,10 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad,
+@@ -677,8 +677,10 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad,
@@ -58 +59 @@
-@@ -708,18 +710,22 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad,
+@@ -715,18 +717,22 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ice: fix return value for raw pattern parsing' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (7 preceding siblings ...)
2024-07-24 11:32 ` patch 'net/ice: fix memory leaks in raw pattern parsing' " luca.boccassi
@ 2024-07-24 11:32 ` luca.boccassi
2024-07-24 11:32 ` patch 'net/mlx5: fix Arm build with GCC 9.1' " luca.boccassi
` (29 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:32 UTC (permalink / raw)
To: Vladimir Medvedkin; +Cc: Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e4447279159facfeb7f88155e79fd9210a950134
Thanks.
Luca Boccassi
---
From e4447279159facfeb7f88155e79fd9210a950134 Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Date: Mon, 22 Jul 2024 13:50:46 +0000
Subject: [PATCH] net/ice: fix return value for raw pattern parsing
[ upstream commit 4fe08bab4bc71f1c04854f764bae98927c2b6fe1 ]
If the parser was not initialized when calling ice_hash_parse_raw_pattern()
-rte_errno was returned. Replace returning rte_errno with ENOTSUP since
rte_errno is meaningless in the context of ice_hash_parse_raw_pattern().
Fixes: 1b9c68120a1c ("net/ice: enable protocol agnostic flow offloading in RSS")
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/ice/ice_hash.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
index 6fcfc5fc4c..94b104fb36 100644
--- a/drivers/net/ice/ice_hash.c
+++ b/drivers/net/ice/ice_hash.c
@@ -660,7 +660,7 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad,
int i, j, ret = 0;
if (ad->psr == NULL)
- return -rte_errno;
+ return -ENOTSUP;
raw_spec = item->spec;
raw_mask = item->mask;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:21.564495951 +0100
+++ 0010-net-ice-fix-return-value-for-raw-pattern-parsing.patch 2024-07-24 12:29:20.675024200 +0100
@@ -1 +1 @@
-From 4fe08bab4bc71f1c04854f764bae98927c2b6fe1 Mon Sep 17 00:00:00 2001
+From e4447279159facfeb7f88155e79fd9210a950134 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4fe08bab4bc71f1c04854f764bae98927c2b6fe1 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index aa76718313..b720e0f755 100644
+index 6fcfc5fc4c..94b104fb36 100644
@@ -23 +24 @@
-@@ -653,7 +653,7 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad,
+@@ -660,7 +660,7 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/mlx5: fix Arm build with GCC 9.1' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (8 preceding siblings ...)
2024-07-24 11:32 ` patch 'net/ice: fix return value for " luca.boccassi
@ 2024-07-24 11:32 ` luca.boccassi
2024-07-24 11:32 ` patch 'net/mlx5: fix MTU configuration' " luca.boccassi
` (28 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:32 UTC (permalink / raw)
To: Gregory Etelson; +Cc: Dariusz Sosnowski, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/48bfee9777abf382ea28a470fa2591de7096d5da
Thanks.
Luca Boccassi
---
From 48bfee9777abf382ea28a470fa2591de7096d5da Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Sun, 7 Jul 2024 12:57:23 +0300
Subject: [PATCH] net/mlx5: fix Arm build with GCC 9.1
[ upstream commit 42d6a9084f55281a70bece647803cddbeb8aaec8 ]
GCC has introduced a bugfix in 9.1 that changed GCC ABI in ARM setups
https://gcc.gnu.org/gcc-9/changes.html
```
On Arm targets (arm*-*-*), a bug in the implementation of the
procedure call standard (AAPCS) in the GCC 6, 7 and 8 releases
has been fixed a structure containing a bit-field based on a 64-bit
integral type and where no other element in a structure required
64-bit alignment could be passed incorrectly to functions.
This is an ABI change. If the option -Wpsabi is enabled
(on by default) the compiler will emit a diagnostic note for code
that might be affected.
```
This fixes the PMD compilation in the INTEGRITY flow item.
Fixes: 23b0a8b298b1 ("net/mlx5: fix integrity item validation and translation")
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 2bdca754bc..6521b5b230 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -6798,11 +6798,13 @@ flow_dv_validate_attributes(struct rte_eth_dev *dev,
}
static int
-validate_integrity_bits(const struct rte_flow_item_integrity *mask,
+validate_integrity_bits(const void *arg,
int64_t pattern_flags, uint64_t l3_flags,
uint64_t l4_flags, uint64_t ip4_flag,
struct rte_flow_error *error)
{
+ const struct rte_flow_item_integrity *mask = arg;
+
if (mask->l3_ok && !(pattern_flags & l3_flags))
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ITEM,
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:21.632613162 +0100
+++ 0011-net-mlx5-fix-Arm-build-with-GCC-9.1.patch 2024-07-24 12:29:20.711024924 +0100
@@ -1 +1 @@
-From 42d6a9084f55281a70bece647803cddbeb8aaec8 Mon Sep 17 00:00:00 2001
+From 48bfee9777abf382ea28a470fa2591de7096d5da Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 42d6a9084f55281a70bece647803cddbeb8aaec8 ]
+
@@ -22 +23,0 @@
-Cc: stable@dpdk.org
@@ -31 +32 @@
-index 8a0d58cb05..89057edbcf 100644
+index 2bdca754bc..6521b5b230 100644
@@ -34 +35 @@
-@@ -7396,11 +7396,13 @@ flow_dv_validate_attributes(struct rte_eth_dev *dev,
+@@ -6798,11 +6798,13 @@ flow_dv_validate_attributes(struct rte_eth_dev *dev,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/mlx5: fix MTU configuration' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (9 preceding siblings ...)
2024-07-24 11:32 ` patch 'net/mlx5: fix Arm build with GCC 9.1' " luca.boccassi
@ 2024-07-24 11:32 ` luca.boccassi
2024-07-24 11:32 ` patch 'net/mlx5/hws: fix deletion of action vport' " luca.boccassi
` (27 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:32 UTC (permalink / raw)
To: Dariusz Sosnowski; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/57ebce02cd957765c514593516ac3201225f1ed2
Thanks.
Luca Boccassi
---
From 57ebce02cd957765c514593516ac3201225f1ed2 Mon Sep 17 00:00:00 2001
From: Dariusz Sosnowski <dsosnowski@nvidia.com>
Date: Mon, 8 Jul 2024 12:59:31 +0200
Subject: [PATCH] net/mlx5: fix MTU configuration
[ upstream commit 10859ecf09c424c0f6a89379f0326a0c51f9cd2f ]
Apply provided MTU, derived from rte_eth_conf.rxmode.mtu,
on port configuration.
Bugzilla ID: 1483
Fixes: e60fbd5b24fc ("mlx5: add device configure/start/stop")
Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/mlx5_ethdev.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index 4a85415ff3..df7cd241a2 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -146,6 +146,12 @@ mlx5_dev_configure(struct rte_eth_dev *dev)
ret = mlx5_proc_priv_init(dev);
if (ret)
return ret;
+ ret = mlx5_dev_set_mtu(dev, dev->data->mtu);
+ if (ret) {
+ DRV_LOG(ERR, "port %u failed to set MTU to %u", dev->data->port_id,
+ dev->data->mtu);
+ return ret;
+ }
return 0;
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:21.731099588 +0100
+++ 0012-net-mlx5-fix-MTU-configuration.patch 2024-07-24 12:29:20.711024924 +0100
@@ -1 +1 @@
-From 10859ecf09c424c0f6a89379f0326a0c51f9cd2f Mon Sep 17 00:00:00 2001
+From 57ebce02cd957765c514593516ac3201225f1ed2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 10859ecf09c424c0f6a89379f0326a0c51f9cd2f ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 1b721cda5e..6a678d6dcc 100644
+index 4a85415ff3..df7cd241a2 100644
@@ -23 +24 @@
-@@ -154,6 +154,12 @@ mlx5_dev_configure(struct rte_eth_dev *dev)
+@@ -146,6 +146,12 @@ mlx5_dev_configure(struct rte_eth_dev *dev)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/mlx5/hws: fix deletion of action vport' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (10 preceding siblings ...)
2024-07-24 11:32 ` patch 'net/mlx5: fix MTU configuration' " luca.boccassi
@ 2024-07-24 11:32 ` luca.boccassi
2024-07-24 11:32 ` patch 'net/mlx5/hws: fix port ID on root item convert' " luca.boccassi
` (26 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:32 UTC (permalink / raw)
To: Erez Shitrit; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6da7724d9e8b102d16c24bf390e853c94dacbae4
Thanks.
Luca Boccassi
---
From 6da7724d9e8b102d16c24bf390e853c94dacbae4 Mon Sep 17 00:00:00 2001
From: Erez Shitrit <erezsh@nvidia.com>
Date: Tue, 9 Jul 2024 15:30:59 +0300
Subject: [PATCH] net/mlx5/hws: fix deletion of action vport
[ upstream commit 29cd96c98dd999756f43715c7f3e85c44044b115 ]
No more ignoring this action while destroying it.
Fixes: f8c8a6d8440d ("net/mlx5/hws: add action object")
Signed-off-by: Erez Shitrit <erezsh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/hws/mlx5dr_action.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/mlx5/hws/mlx5dr_action.c b/drivers/net/mlx5/hws/mlx5dr_action.c
index b0ae4e7693..4fb9a03d80 100644
--- a/drivers/net/mlx5/hws/mlx5dr_action.c
+++ b/drivers/net/mlx5/hws/mlx5dr_action.c
@@ -1593,6 +1593,7 @@ static void mlx5dr_action_destroy_hws(struct mlx5dr_action *action)
case MLX5DR_ACTION_TYP_ASO_METER:
case MLX5DR_ACTION_TYP_ASO_CT:
case MLX5DR_ACTION_TYP_PUSH_VLAN:
+ case MLX5DR_ACTION_TYP_VPORT:
mlx5dr_action_destroy_stcs(action);
break;
case MLX5DR_ACTION_TYP_POP_VLAN:
@@ -1614,6 +1615,9 @@ static void mlx5dr_action_destroy_hws(struct mlx5dr_action *action)
mlx5dr_action_destroy_stcs(action);
mlx5dr_cmd_destroy_obj(action->reformat.arg_obj);
break;
+ default:
+ DR_LOG(ERR, "Not supported action type: %d", action->type);
+ assert(false);
}
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:21.799867647 +0100
+++ 0013-net-mlx5-hws-fix-deletion-of-action-vport.patch 2024-07-24 12:29:20.715025005 +0100
@@ -1 +1 @@
-From 29cd96c98dd999756f43715c7f3e85c44044b115 Mon Sep 17 00:00:00 2001
+From 6da7724d9e8b102d16c24bf390e853c94dacbae4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 29cd96c98dd999756f43715c7f3e85c44044b115 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -15,2 +16 @@
- drivers/net/mlx5/hws/mlx5dr_cmd.c | 3 ++-
- 2 files changed, 6 insertions(+), 1 deletion(-)
+ 1 file changed, 4 insertions(+)
@@ -19 +19 @@
-index b90f18df8a..0d90280a7d 100644
+index b0ae4e7693..4fb9a03d80 100644
@@ -22 +22,2 @@
-@@ -2968,6 +2968,7 @@ static void mlx5dr_action_destroy_hws(struct mlx5dr_action *action)
+@@ -1593,6 +1593,7 @@ static void mlx5dr_action_destroy_hws(struct mlx5dr_action *action)
+ case MLX5DR_ACTION_TYP_ASO_METER:
@@ -25 +25,0 @@
- case MLX5DR_ACTION_TYP_REMOVE_HEADER:
@@ -29,4 +29,4 @@
- case MLX5DR_ACTION_TYP_DEST_ROOT:
-@@ -3027,6 +3028,9 @@ static void mlx5dr_action_destroy_hws(struct mlx5dr_action *action)
- break;
- case MLX5DR_ACTION_TYP_LAST:
+ case MLX5DR_ACTION_TYP_POP_VLAN:
+@@ -1614,6 +1615,9 @@ static void mlx5dr_action_destroy_hws(struct mlx5dr_action *action)
+ mlx5dr_action_destroy_stcs(action);
+ mlx5dr_cmd_destroy_obj(action->reformat.arg_obj);
@@ -40,14 +39,0 @@
-diff --git a/drivers/net/mlx5/hws/mlx5dr_cmd.c b/drivers/net/mlx5/hws/mlx5dr_cmd.c
-index 72fc9e3d91..a4f778a8a4 100644
---- a/drivers/net/mlx5/hws/mlx5dr_cmd.c
-+++ b/drivers/net/mlx5/hws/mlx5dr_cmd.c
-@@ -1033,7 +1033,8 @@ int mlx5dr_cmd_generate_wqe(struct ibv_context *ctx,
-
- ret = mlx5_glue->devx_general_cmd(ctx, in, sizeof(in), out, sizeof(out));
- if (ret) {
-- DR_LOG(ERR, "Failed to write GTA WQE using FW");
-+ DR_LOG(ERR, "Failed to write GTA WQE using FW (syndrome: %#x)",
-+ mlx5dr_cmd_get_syndrome(out));
- rte_errno = errno;
- return rte_errno;
- }
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/mlx5/hws: fix port ID on root item convert' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (11 preceding siblings ...)
2024-07-24 11:32 ` patch 'net/mlx5/hws: fix deletion of action vport' " luca.boccassi
@ 2024-07-24 11:32 ` luca.boccassi
2024-07-24 11:32 ` patch 'net/mlx5/hws: remove unused variable' " luca.boccassi
` (25 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:32 UTC (permalink / raw)
To: Alex Vesker; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/fdf5a81ff78917f9d3ffb713a1fb7deedb92dfdb
Thanks.
Luca Boccassi
---
From fdf5a81ff78917f9d3ffb713a1fb7deedb92dfdb Mon Sep 17 00:00:00 2001
From: Alex Vesker <valex@nvidia.com>
Date: Tue, 9 Jul 2024 15:31:00 +0300
Subject: [PATCH] net/mlx5/hws: fix port ID on root item convert
[ upstream commit befb138bdd924956375745cb1ae8fe3fd029902f ]
When calling item convert function we need to pass the port_id
in the attributes. This value should be passed not only for cases
that match on PORT related items, to resolve we will always pass it.
Fixes: 572fe9ef2f46 ("net/mlx5/hws: fix port ID for root table")
Signed-off-by: Alex Vesker <valex@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/hws/mlx5dr_matcher.c | 20 +++++---------------
drivers/net/mlx5/hws/mlx5dr_rule.c | 21 +++++----------------
2 files changed, 10 insertions(+), 31 deletions(-)
diff --git a/drivers/net/mlx5/hws/mlx5dr_matcher.c b/drivers/net/mlx5/hws/mlx5dr_matcher.c
index c54bf88e78..e89ebb657a 100644
--- a/drivers/net/mlx5/hws/mlx5dr_matcher.c
+++ b/drivers/net/mlx5/hws/mlx5dr_matcher.c
@@ -711,7 +711,6 @@ static int mlx5dr_matcher_init_root(struct mlx5dr_matcher *matcher)
struct mlx5dv_flow_match_parameters *mask;
struct mlx5_flow_attr flow_attr = {0};
struct rte_flow_error rte_error;
- struct rte_flow_item *item;
uint8_t match_criteria;
int ret;
@@ -740,20 +739,11 @@ static int mlx5dr_matcher_init_root(struct mlx5dr_matcher *matcher)
return rte_errno;
}
- /* We need the port id in case of matching representor */
- item = matcher->mt[0]->items;
- while (item->type != RTE_FLOW_ITEM_TYPE_END) {
- if (item->type == RTE_FLOW_ITEM_TYPE_PORT_REPRESENTOR ||
- item->type == RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT) {
- ret = flow_hw_get_port_id_from_ctx(ctx, &flow_attr.port_id);
- if (ret) {
- DR_LOG(ERR, "Failed to get port id for dev %s",
- ctx->ibv_ctx->device->name);
- rte_errno = EINVAL;
- return rte_errno;
- }
- }
- ++item;
+ ret = flow_hw_get_port_id_from_ctx(ctx, &flow_attr.port_id);
+ if (ret) {
+ DR_LOG(ERR, "Failed to get port id for dev %s", ctx->ibv_ctx->device->name);
+ rte_errno = EINVAL;
+ return rte_errno;
}
mask = simple_calloc(1, MLX5_ST_SZ_BYTES(fte_match_param) +
diff --git a/drivers/net/mlx5/hws/mlx5dr_rule.c b/drivers/net/mlx5/hws/mlx5dr_rule.c
index 885a2bcefe..00b6c49b88 100644
--- a/drivers/net/mlx5/hws/mlx5dr_rule.c
+++ b/drivers/net/mlx5/hws/mlx5dr_rule.c
@@ -382,26 +382,15 @@ static int mlx5dr_rule_create_root(struct mlx5dr_rule *rule,
struct mlx5dv_flow_match_parameters *value;
struct mlx5_flow_attr flow_attr = {0};
struct mlx5dv_flow_action_attr *attr;
- const struct rte_flow_item *cur_item;
struct rte_flow_error error;
uint8_t match_criteria;
int ret;
- /* We need the port id in case of matching representor */
- cur_item = items;
- while (cur_item->type != RTE_FLOW_ITEM_TYPE_END) {
- if (cur_item->type == RTE_FLOW_ITEM_TYPE_PORT_REPRESENTOR ||
- cur_item->type == RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT) {
- ret = flow_hw_get_port_id_from_ctx(rule->matcher->tbl->ctx,
- &flow_attr.port_id);
- if (ret) {
- DR_LOG(ERR, "Failed to get port id for dev %s",
- rule->matcher->tbl->ctx->ibv_ctx->device->name);
- rte_errno = EINVAL;
- return rte_errno;
- }
- }
- ++cur_item;
+ ret = flow_hw_get_port_id_from_ctx(ctx, &flow_attr.port_id);
+ if (ret) {
+ DR_LOG(ERR, "Failed to get port id for dev %s", ctx->ibv_ctx->device->name);
+ rte_errno = EINVAL;
+ return rte_errno;
}
attr = simple_calloc(num_actions, sizeof(*attr));
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:21.873226978 +0100
+++ 0014-net-mlx5-hws-fix-port-ID-on-root-item-convert.patch 2024-07-24 12:29:20.719025084 +0100
@@ -1 +1 @@
-From befb138bdd924956375745cb1ae8fe3fd029902f Mon Sep 17 00:00:00 2001
+From fdf5a81ff78917f9d3ffb713a1fb7deedb92dfdb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit befb138bdd924956375745cb1ae8fe3fd029902f ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -17,2 +18,2 @@
- drivers/net/mlx5/hws/mlx5dr_rule.c | 22 ++++++----------------
- 2 files changed, 11 insertions(+), 31 deletions(-)
+ drivers/net/mlx5/hws/mlx5dr_rule.c | 21 +++++----------------
+ 2 files changed, 10 insertions(+), 31 deletions(-)
@@ -21 +22 @@
-index 6a939eb031..dfa2cd435c 100644
+index c54bf88e78..e89ebb657a 100644
@@ -24 +25 @@
-@@ -1231,7 +1231,6 @@ static int mlx5dr_matcher_init_root(struct mlx5dr_matcher *matcher)
+@@ -711,7 +711,6 @@ static int mlx5dr_matcher_init_root(struct mlx5dr_matcher *matcher)
@@ -32 +33 @@
-@@ -1260,20 +1259,11 @@ static int mlx5dr_matcher_init_root(struct mlx5dr_matcher *matcher)
+@@ -740,20 +739,11 @@ static int mlx5dr_matcher_init_root(struct mlx5dr_matcher *matcher)
@@ -37 +38 @@
-- item = matcher->mt[0].items;
+- item = matcher->mt[0]->items;
@@ -59 +60 @@
-index 06d8e66f63..1edb7eac74 100644
+index 885a2bcefe..00b6c49b88 100644
@@ -62,5 +63 @@
-@@ -694,29 +694,19 @@ int mlx5dr_rule_create_root_no_comp(struct mlx5dr_rule *rule,
- struct mlx5dr_rule_action rule_actions[])
- {
- struct mlx5dv_flow_matcher *dv_matcher = rule->matcher->dv_matcher;
-+ struct mlx5dr_context *ctx = rule->matcher->tbl->ctx;
+@@ -382,26 +382,15 @@ static int mlx5dr_rule_create_root(struct mlx5dr_rule *rule,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/mlx5/hws: remove unused variable' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (12 preceding siblings ...)
2024-07-24 11:32 ` patch 'net/mlx5/hws: fix port ID on root item convert' " luca.boccassi
@ 2024-07-24 11:32 ` luca.boccassi
2024-07-24 11:32 ` patch 'net/mlx5: fix end condition of reading xstats' " luca.boccassi
` (24 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:32 UTC (permalink / raw)
To: Erez Shitrit; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/7aa564683c2f3bfbf0d2eeface8f52de58fcd9aa
Thanks.
Luca Boccassi
---
From 7aa564683c2f3bfbf0d2eeface8f52de58fcd9aa Mon Sep 17 00:00:00 2001
From: Erez Shitrit <erezsh@nvidia.com>
Date: Tue, 9 Jul 2024 15:31:01 +0300
Subject: [PATCH] net/mlx5/hws: remove unused variable
[ upstream commit 168f9cf3455ef0be63ba1593cd7b651d50b2043d ]
Removing a redundant variable.
Was there from day 1, not in use.
Fixes: f8c8a6d8440d ("net/mlx5/hws: add action object")
Signed-off-by: Erez Shitrit <erezsh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/hws/mlx5dr_pat_arg.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/mlx5/hws/mlx5dr_pat_arg.h b/drivers/net/mlx5/hws/mlx5dr_pat_arg.h
index d9353e9a3e..0a1257f98c 100644
--- a/drivers/net/mlx5/hws/mlx5dr_pat_arg.h
+++ b/drivers/net/mlx5/hws/mlx5dr_pat_arg.h
@@ -31,7 +31,6 @@ struct mlx5dr_pat_cached_pattern {
enum mlx5dr_action_type type;
struct {
struct mlx5dr_devx_obj *pattern_obj;
- struct dr_icm_chunk *chunk;
uint8_t *data;
uint16_t num_of_actions;
} mh_data;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:21.941170923 +0100
+++ 0015-net-mlx5-hws-remove-unused-variable.patch 2024-07-24 12:29:20.719025084 +0100
@@ -1 +1 @@
-From 168f9cf3455ef0be63ba1593cd7b651d50b2043d Mon Sep 17 00:00:00 2001
+From 7aa564683c2f3bfbf0d2eeface8f52de58fcd9aa Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 168f9cf3455ef0be63ba1593cd7b651d50b2043d ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index bbe313102f..c4e0cbc843 100644
+index d9353e9a3e..0a1257f98c 100644
@@ -22,2 +23,2 @@
-@@ -30,7 +30,6 @@ struct mlx5dr_pattern_cache {
- struct mlx5dr_pattern_cache_item {
+@@ -31,7 +31,6 @@ struct mlx5dr_pat_cached_pattern {
+ enum mlx5dr_action_type type;
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/mlx5: fix end condition of reading xstats' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (13 preceding siblings ...)
2024-07-24 11:32 ` patch 'net/mlx5/hws: remove unused variable' " luca.boccassi
@ 2024-07-24 11:32 ` luca.boccassi
2024-07-24 11:32 ` patch 'net/mlx5: fix uplink port probing in bonding mode' " luca.boccassi
` (23 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:32 UTC (permalink / raw)
To: Bing Zhao; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f06e1a4e4942098357ea2875b50edcd3a9beb382
Thanks.
Luca Boccassi
---
From f06e1a4e4942098357ea2875b50edcd3a9beb382 Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@nvidia.com>
Date: Wed, 17 Jul 2024 19:33:37 +0300
Subject: [PATCH] net/mlx5: fix end condition of reading xstats
[ upstream commit 1be61fe1333cd4a8a4bba6eb0d68780073fe3512 ]
The "mlx5_stats_n" in the "struct mlx5_xstats_ctrl" is the number of
device stats identified by PMD. Right now, the mapping of device
stats to the xstats is not compact. The "input index" of the device
stats would remain UINT16_MAX and be skipped when reading counters.
If some DPDK stats cannot be identified in the middle of the map, the
end condition should be bigger than the "mlx5_stats_n". Or else, some
counters would not be read and calculated.
Using the global const "xstats_n" as the end condition to traverse
the whole array in case some counters are missed. The "xstats_o_idx"
should be used instead of the iteration to check if the statistics
is an IB device counter.
In the meanwhile, adding another field to record the start index of
the IB counters to reduce the redundancy iterations.
Fixes: a687c3e658c2 ("net/mlx5: fix counters map in bonding mode")
Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/linux/mlx5_ethdev_os.c | 23 +++++++++++++----------
drivers/net/mlx5/mlx5.h | 5 +++++
2 files changed, 18 insertions(+), 10 deletions(-)
diff --git a/drivers/net/mlx5/linux/mlx5_ethdev_os.c b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
index 4f3e790c0b..1d999ef66b 100644
--- a/drivers/net/mlx5/linux/mlx5_ethdev_os.c
+++ b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
@@ -1292,6 +1292,7 @@ _mlx5_os_read_dev_counters(struct rte_eth_dev *dev, int pf, uint64_t *stats)
struct ethtool_stats *et_stats = (struct ethtool_stats *)et_stat_buf;
int ret;
uint16_t i_idx, o_idx;
+ uint32_t total_stats = xstats_n;
et_stats->cmd = ETHTOOL_GSTATS;
/* Pass the maximum value, the driver may ignore this. */
@@ -1309,19 +1310,19 @@ _mlx5_os_read_dev_counters(struct rte_eth_dev *dev, int pf, uint64_t *stats)
return ret;
}
if (pf <= 0) {
- for (i = 0; i != xstats_ctrl->mlx5_stats_n; i++) {
+ for (i = 0; i != total_stats; i++) {
i_idx = xstats_ctrl->dev_table_idx[i];
- if (i_idx == UINT16_MAX || xstats_ctrl->info[i].dev)
- continue;
o_idx = xstats_ctrl->xstats_o_idx[i];
+ if (i_idx == UINT16_MAX || xstats_ctrl->info[o_idx].dev)
+ continue;
stats[o_idx] += (uint64_t)et_stats->data[i_idx];
}
} else {
- for (i = 0; i != xstats_ctrl->mlx5_stats_n; i++) {
+ for (i = 0; i != total_stats; i++) {
i_idx = xstats_ctrl->dev_table_idx_2nd[i];
- if (i_idx == UINT16_MAX)
- continue;
o_idx = xstats_ctrl->xstats_o_idx_2nd[i];
+ if (i_idx == UINT16_MAX || xstats_ctrl->info[o_idx].dev)
+ continue;
stats[o_idx] += (uint64_t)et_stats->data[i_idx];
}
}
@@ -1364,11 +1365,11 @@ mlx5_os_read_dev_counters(struct rte_eth_dev *dev, bool bond_master, uint64_t *s
return ret;
}
/*
- * Read IB counters.
- * The counters are unique per IB device but not per net IF.
+ * Read IB dev counters.
+ * The counters are unique per IB device but not per netdev IF.
* In bonding mode, getting the stats name only from 1 port is enough.
*/
- for (i = 0; i != xstats_ctrl->mlx5_stats_n; i++) {
+ for (i = xstats_ctrl->dev_cnt_start; i < xstats_ctrl->mlx5_stats_n; i++) {
if (!xstats_ctrl->info[i].dev)
continue;
/* return last xstats counter if fail to read. */
@@ -1618,7 +1619,7 @@ static const struct mlx5_counter_ctrl mlx5_counters_init[] = {
},
};
-static const unsigned int xstats_n = RTE_DIM(mlx5_counters_init);
+const unsigned int xstats_n = RTE_DIM(mlx5_counters_init);
static int
mlx5_os_get_stats_strings(struct rte_eth_dev *dev, bool bond_master,
@@ -1664,6 +1665,7 @@ mlx5_os_get_stats_strings(struct rte_eth_dev *dev, bool bond_master,
}
if (!bond_master) {
/* Add dev counters, unique per IB device. */
+ xstats_ctrl->dev_cnt_start = xstats_ctrl->mlx5_stats_n;
for (j = 0; j != xstats_n; j++) {
if (mlx5_counters_init[j].dev) {
idx = xstats_ctrl->mlx5_stats_n++;
@@ -1705,6 +1707,7 @@ mlx5_os_get_stats_strings(struct rte_eth_dev *dev, bool bond_master,
}
}
/* Dev counters are always at the last now. */
+ xstats_ctrl->dev_cnt_start = xstats_ctrl->mlx5_stats_n;
for (j = 0; j != xstats_n; j++) {
if (mlx5_counters_init[j].dev) {
idx = xstats_ctrl->mlx5_stats_n++;
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 80dcaf96a3..5d826527b2 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -238,6 +238,8 @@ struct mlx5_xstats_ctrl {
uint16_t stats_n_2nd;
/* Number of device stats identified by PMD. */
uint16_t mlx5_stats_n;
+ /* First device counters index. */
+ uint16_t dev_cnt_start;
/* Index in the device counters table. */
uint16_t dev_table_idx[MLX5_MAX_XSTATS];
/* Index in the output table. */
@@ -252,6 +254,9 @@ struct mlx5_xstats_ctrl {
uint16_t xstats_o_idx_2nd[MLX5_MAX_XSTATS];
};
+/* xstats array size. */
+extern const unsigned int xstats_n;
+
struct mlx5_stats_ctrl {
/* Base for imissed counter. */
uint64_t imissed_base;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:22.008907585 +0100
+++ 0016-net-mlx5-fix-end-condition-of-reading-xstats.patch 2024-07-24 12:29:20.727025246 +0100
@@ -1 +1 @@
-From 1be61fe1333cd4a8a4bba6eb0d68780073fe3512 Mon Sep 17 00:00:00 2001
+From f06e1a4e4942098357ea2875b50edcd3a9beb382 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1be61fe1333cd4a8a4bba6eb0d68780073fe3512 ]
+
@@ -24 +25,0 @@
-Cc: stable@dpdk.org
@@ -34 +35 @@
-index 82f651f2f3..5d64984022 100644
+index 4f3e790c0b..1d999ef66b 100644
@@ -37 +38 @@
-@@ -1201,6 +1201,7 @@ _mlx5_os_read_dev_counters(struct rte_eth_dev *dev, int pf, uint64_t *stats)
+@@ -1292,6 +1292,7 @@ _mlx5_os_read_dev_counters(struct rte_eth_dev *dev, int pf, uint64_t *stats)
@@ -45 +46 @@
-@@ -1218,19 +1219,19 @@ _mlx5_os_read_dev_counters(struct rte_eth_dev *dev, int pf, uint64_t *stats)
+@@ -1309,19 +1310,19 @@ _mlx5_os_read_dev_counters(struct rte_eth_dev *dev, int pf, uint64_t *stats)
@@ -71 +72 @@
-@@ -1273,11 +1274,11 @@ mlx5_os_read_dev_counters(struct rte_eth_dev *dev, bool bond_master, uint64_t *s
+@@ -1364,11 +1365,11 @@ mlx5_os_read_dev_counters(struct rte_eth_dev *dev, bool bond_master, uint64_t *s
@@ -86 +87 @@
-@@ -1573,7 +1574,7 @@ static const struct mlx5_counter_ctrl mlx5_counters_init[] = {
+@@ -1618,7 +1619,7 @@ static const struct mlx5_counter_ctrl mlx5_counters_init[] = {
@@ -95 +96 @@
-@@ -1619,6 +1620,7 @@ mlx5_os_get_stats_strings(struct rte_eth_dev *dev, bool bond_master,
+@@ -1664,6 +1665,7 @@ mlx5_os_get_stats_strings(struct rte_eth_dev *dev, bool bond_master,
@@ -103 +104 @@
-@@ -1660,6 +1662,7 @@ mlx5_os_get_stats_strings(struct rte_eth_dev *dev, bool bond_master,
+@@ -1705,6 +1707,7 @@ mlx5_os_get_stats_strings(struct rte_eth_dev *dev, bool bond_master,
@@ -112 +113 @@
-index 75a1e170af..869aac032b 100644
+index 80dcaf96a3..5d826527b2 100644
@@ -115 +116 @@
-@@ -281,6 +281,8 @@ struct mlx5_xstats_ctrl {
+@@ -238,6 +238,8 @@ struct mlx5_xstats_ctrl {
@@ -124 +125 @@
-@@ -295,6 +297,9 @@ struct mlx5_xstats_ctrl {
+@@ -252,6 +254,9 @@ struct mlx5_xstats_ctrl {
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/mlx5: fix uplink port probing in bonding mode' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (14 preceding siblings ...)
2024-07-24 11:32 ` patch 'net/mlx5: fix end condition of reading xstats' " luca.boccassi
@ 2024-07-24 11:32 ` luca.boccassi
2024-07-24 11:32 ` patch 'common/mlx5: remove unneeded field when modify RQ table' " luca.boccassi
` (22 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:32 UTC (permalink / raw)
To: Bing Zhao; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/751fa44c5198aa210b58a6335450e06be3569051
Thanks.
Luca Boccassi
---
From 751fa44c5198aa210b58a6335450e06be3569051 Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@nvidia.com>
Date: Wed, 17 Jul 2024 19:35:41 +0300
Subject: [PATCH] net/mlx5: fix uplink port probing in bonding mode
[ upstream commit 39d4ec8f36192b9dafbad4994cbe37f7674c7190 ]
In the HW-LAG bonding mode, the representor port can be from both
slave PFs. When probing a representor (REP), the UPLINK (proxy) port
always needs to be probed firstly before any REP port.
In the current implementation, when probing a device with the
following format:
-a 0000:XX:00.0,dv_flow_en=N,representor=pf1vfy
Since the REP belongs to the 2nd PF in the bonding, the UPLINK would
not be added into the probing ports list.
1. In dv_flow_en=1 mode, the REP itself can be probed. But it didn't
obey the rules and the behaviors were inconsistent.
a. When probing the REP from 1st PFs, the UPLINK was also probed.
b. When detaching the UPLINK, all REPs were detached.
2. In dv_flow_en=2 mode, since some resources can only be allocated /
created on the proxy port, the probing would get a failure.
By removing the unneeded check of the bonding PF device index, the
UPLINK will always try to be probed with any format.
Fixes: 2e569a370395 ("net/mlx5: add VF LAG mode bonding device recognition")
Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/linux/mlx5_os.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index bdb2f6fb59..b88ae631d9 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -2170,8 +2170,7 @@ mlx5_os_pci_probe_pf(struct mlx5_common_device *cdev,
list[ns].info.master = 0;
list[ns].info.representor = 0;
}
- if (list[ns].info.port_name == bd)
- ns++;
+ ns++;
break;
case MLX5_PHYS_PORT_NAME_TYPE_PFHPF:
/* Fallthrough */
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:22.079860620 +0100
+++ 0017-net-mlx5-fix-uplink-port-probing-in-bonding-mode.patch 2024-07-24 12:29:20.731025327 +0100
@@ -1 +1 @@
-From 39d4ec8f36192b9dafbad4994cbe37f7674c7190 Mon Sep 17 00:00:00 2001
+From 751fa44c5198aa210b58a6335450e06be3569051 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 39d4ec8f36192b9dafbad4994cbe37f7674c7190 ]
+
@@ -29 +30,0 @@
-Cc: stable@dpdk.org
@@ -38 +39 @@
-index 5e950e9be1..11336c430b 100644
+index bdb2f6fb59..b88ae631d9 100644
@@ -41 +42 @@
-@@ -2473,8 +2473,7 @@ mlx5_os_pci_probe_pf(struct mlx5_common_device *cdev,
+@@ -2170,8 +2170,7 @@ mlx5_os_pci_probe_pf(struct mlx5_common_device *cdev,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'common/mlx5: remove unneeded field when modify RQ table' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (15 preceding siblings ...)
2024-07-24 11:32 ` patch 'net/mlx5: fix uplink port probing in bonding mode' " luca.boccassi
@ 2024-07-24 11:32 ` luca.boccassi
2024-07-24 11:32 ` patch 'net/mlx5: fix disabling E-Switch default flow rules' " luca.boccassi
` (21 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:32 UTC (permalink / raw)
To: Bing Zhao; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/d69a8b5eb2badb1c7998948c4b80a96f5312dd03
Thanks.
Luca Boccassi
---
From d69a8b5eb2badb1c7998948c4b80a96f5312dd03 Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@nvidia.com>
Date: Wed, 17 Jul 2024 19:37:19 +0300
Subject: [PATCH] common/mlx5: remove unneeded field when modify RQ table
[ upstream commit 463e5abe09362f1d20d0ec99b5969549d51167d6 ]
The attribute "rqt_max_size" of the RQT(RQ table) context is only
needed by when creating a new one. When modifying an old one, there
is no need to set this attribute.
The firmware usually ignored this unneeded field. When enabling some
extra check, an error will be returned to prevent the code from
continuing to run.
In the meanwhile, this field will always be set to the maximal one
fetched from the capability without any change. Removing the value
set and leave it to 0 will help to solve the potential failure.
Fixes: e1da60a8a6e9 ("common/mlx5: add DevX command to modify RQT")
Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/common/mlx5/mlx5_devx_cmds.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c
index f44be4c230..9a0fc3501d 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.c
+++ b/drivers/common/mlx5/mlx5_devx_cmds.c
@@ -1727,7 +1727,6 @@ mlx5_devx_cmd_modify_rqt(struct mlx5_devx_obj *rqt,
MLX5_SET64(modify_rqt_in, in, modify_bitmask, 0x1);
rqt_ctx = MLX5_ADDR_OF(modify_rqt_in, in, rqt_context);
MLX5_SET(rqtc, rqt_ctx, list_q_type, rqt_attr->rq_type);
- MLX5_SET(rqtc, rqt_ctx, rqt_max_size, rqt_attr->rqt_max_size);
MLX5_SET(rqtc, rqt_ctx, rqt_actual_size, rqt_attr->rqt_actual_size);
for (i = 0; i < rqt_attr->rqt_actual_size; i++)
MLX5_SET(rqtc, rqt_ctx, rq_num[i], rqt_attr->rq_list[i]);
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:22.150969008 +0100
+++ 0018-common-mlx5-remove-unneeded-field-when-modify-RQ-tab.patch 2024-07-24 12:29:20.735025406 +0100
@@ -1 +1 @@
-From 463e5abe09362f1d20d0ec99b5969549d51167d6 Mon Sep 17 00:00:00 2001
+From d69a8b5eb2badb1c7998948c4b80a96f5312dd03 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 463e5abe09362f1d20d0ec99b5969549d51167d6 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 8e12ac50de..9710dcedd3 100644
+index f44be4c230..9a0fc3501d 100644
@@ -31 +32 @@
-@@ -1914,7 +1914,6 @@ mlx5_devx_cmd_modify_rqt(struct mlx5_devx_obj *rqt,
+@@ -1727,7 +1727,6 @@ mlx5_devx_cmd_modify_rqt(struct mlx5_devx_obj *rqt,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/mlx5: fix disabling E-Switch default flow rules' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (16 preceding siblings ...)
2024-07-24 11:32 ` patch 'common/mlx5: remove unneeded field when modify RQ table' " luca.boccassi
@ 2024-07-24 11:32 ` luca.boccassi
2024-07-24 11:32 ` patch 'net/hns3: check Rx DMA address alignmnent' " luca.boccassi
` (20 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:32 UTC (permalink / raw)
To: Dariusz Sosnowski; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/5669dcea46cecc3719837f17b0c34b24647379b4
Thanks.
Luca Boccassi
---
From 5669dcea46cecc3719837f17b0c34b24647379b4 Mon Sep 17 00:00:00 2001
From: Dariusz Sosnowski <dsosnowski@nvidia.com>
Date: Thu, 18 Jul 2024 11:57:15 +0200
Subject: [PATCH] net/mlx5: fix disabling E-Switch default flow rules
[ upstream commit cf9a91c67b88071a03beb32a3ea9970e6ee00391 ]
`fdb_def_rule_en` devarg controls whether mlx5 PMD creates default
E-Switch flow rules for:
- Transferring traffic from wire, VFs and SFs to group 1 (default jump).
- Providing default behavior for application traffic (default SQ miss
flow rules).
With these flow rules, applications effectively create transfer flow
rules in group 1 and higher (application group is translated to one
higher) allowing for faster insertion on all groups and providing
ability to forward to VF, SF and wire on any group.
By default, these rules are created (`fdb_def_rule_en` == 1).
When these default flow rules are disabled (`fdb_def_rule_en` == 0)
with HW Steering flow engine (`dv_flow_en` == 2) only creation of
default jump rules was disabled. Also, necessary template table and
pattern/actions templates were created as well,
but they were never used.
SQ miss flow rules were still created.
This is a bug, because with `fdb_def_rule_en` == 0, application should
not expect any default E-Switch flow rules.
This patch fixes that by disabling all default E-Switch flow rules
creation and disabling creating templates for these flow rules,
when `fdb_def_rule_en` == 0.
If an application needs to run with these flow rules disabled,
and requires flow rules providing SQ miss flow rules functionality,
then application must explicitly create similar flow rules.
Fixes: 1939eb6f660c ("net/mlx5: support flow port action with HWS")
Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/mlx5_flow_hw.c | 142 ++++++++++++++++++--------------
drivers/net/mlx5/mlx5_trigger.c | 4 +-
drivers/net/mlx5/mlx5_txq.c | 13 ++-
3 files changed, 91 insertions(+), 68 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index 45709c9fd2..aa315c054d 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -6469,6 +6469,7 @@ flow_hw_create_ctrl_tables(struct rte_eth_dev *dev, struct rte_flow_error *error
struct mlx5_flow_hw_ctrl_fdb *hw_ctrl_fdb;
uint32_t xmeta = priv->sh->config.dv_xmeta_en;
uint32_t repr_matching = priv->sh->config.repr_matching;
+ uint32_t fdb_def_rule = priv->sh->config.fdb_def_rule;
MLX5_ASSERT(priv->hw_ctrl_fdb == NULL);
hw_ctrl_fdb = mlx5_malloc(MLX5_MEM_ZERO, sizeof(*hw_ctrl_fdb), 0, SOCKET_ID_ANY);
@@ -6479,70 +6480,79 @@ flow_hw_create_ctrl_tables(struct rte_eth_dev *dev, struct rte_flow_error *error
goto err;
}
priv->hw_ctrl_fdb = hw_ctrl_fdb;
- /* Create templates and table for default SQ miss flow rules - root table. */
- hw_ctrl_fdb->esw_mgr_items_tmpl = flow_hw_create_ctrl_esw_mgr_pattern_template(dev, error);
- if (!hw_ctrl_fdb->esw_mgr_items_tmpl) {
- DRV_LOG(ERR, "port %u failed to create E-Switch Manager item"
- " template for control flows", dev->data->port_id);
- goto err;
- }
- hw_ctrl_fdb->regc_jump_actions_tmpl = flow_hw_create_ctrl_regc_jump_actions_template
- (dev, error);
- if (!hw_ctrl_fdb->regc_jump_actions_tmpl) {
- DRV_LOG(ERR, "port %u failed to create REG_C set and jump action template"
- " for control flows", dev->data->port_id);
- goto err;
- }
- hw_ctrl_fdb->hw_esw_sq_miss_root_tbl = flow_hw_create_ctrl_sq_miss_root_table
- (dev, hw_ctrl_fdb->esw_mgr_items_tmpl, hw_ctrl_fdb->regc_jump_actions_tmpl,
- error);
- if (!hw_ctrl_fdb->hw_esw_sq_miss_root_tbl) {
- DRV_LOG(ERR, "port %u failed to create table for default sq miss (root table)"
- " for control flows", dev->data->port_id);
- goto err;
- }
- /* Create templates and table for default SQ miss flow rules - non-root table. */
- hw_ctrl_fdb->regc_sq_items_tmpl = flow_hw_create_ctrl_regc_sq_pattern_template(dev, error);
- if (!hw_ctrl_fdb->regc_sq_items_tmpl) {
- DRV_LOG(ERR, "port %u failed to create SQ item template for"
- " control flows", dev->data->port_id);
- goto err;
- }
- hw_ctrl_fdb->port_actions_tmpl = flow_hw_create_ctrl_port_actions_template(dev, error);
- if (!hw_ctrl_fdb->port_actions_tmpl) {
- DRV_LOG(ERR, "port %u failed to create port action template"
- " for control flows", dev->data->port_id);
- goto err;
- }
- hw_ctrl_fdb->hw_esw_sq_miss_tbl = flow_hw_create_ctrl_sq_miss_table
- (dev, hw_ctrl_fdb->regc_sq_items_tmpl, hw_ctrl_fdb->port_actions_tmpl,
- error);
- if (!hw_ctrl_fdb->hw_esw_sq_miss_tbl) {
- DRV_LOG(ERR, "port %u failed to create table for default sq miss (non-root table)"
- " for control flows", dev->data->port_id);
- goto err;
- }
- /* Create templates and table for default FDB jump flow rules. */
- hw_ctrl_fdb->port_items_tmpl = flow_hw_create_ctrl_port_pattern_template(dev, error);
- if (!hw_ctrl_fdb->port_items_tmpl) {
- DRV_LOG(ERR, "port %u failed to create SQ item template for"
- " control flows", dev->data->port_id);
- goto err;
- }
- hw_ctrl_fdb->jump_one_actions_tmpl = flow_hw_create_ctrl_jump_actions_template
- (dev, MLX5_HW_LOWEST_USABLE_GROUP, error);
- if (!hw_ctrl_fdb->jump_one_actions_tmpl) {
- DRV_LOG(ERR, "port %u failed to create jump action template"
- " for control flows", dev->data->port_id);
- goto err;
- }
- hw_ctrl_fdb->hw_esw_zero_tbl = flow_hw_create_ctrl_jump_table
- (dev, hw_ctrl_fdb->port_items_tmpl, hw_ctrl_fdb->jump_one_actions_tmpl,
- error);
- if (!hw_ctrl_fdb->hw_esw_zero_tbl) {
- DRV_LOG(ERR, "port %u failed to create table for default jump to group 1"
- " for control flows", dev->data->port_id);
- goto err;
+ if (fdb_def_rule) {
+ /* Create templates and table for default SQ miss flow rules - root table. */
+ hw_ctrl_fdb->esw_mgr_items_tmpl =
+ flow_hw_create_ctrl_esw_mgr_pattern_template(dev, error);
+ if (!hw_ctrl_fdb->esw_mgr_items_tmpl) {
+ DRV_LOG(ERR, "port %u failed to create E-Switch Manager item"
+ " template for control flows", dev->data->port_id);
+ goto err;
+ }
+ hw_ctrl_fdb->regc_jump_actions_tmpl =
+ flow_hw_create_ctrl_regc_jump_actions_template(dev, error);
+ if (!hw_ctrl_fdb->regc_jump_actions_tmpl) {
+ DRV_LOG(ERR, "port %u failed to create REG_C set and jump action template"
+ " for control flows", dev->data->port_id);
+ goto err;
+ }
+ hw_ctrl_fdb->hw_esw_sq_miss_root_tbl =
+ flow_hw_create_ctrl_sq_miss_root_table
+ (dev, hw_ctrl_fdb->esw_mgr_items_tmpl,
+ hw_ctrl_fdb->regc_jump_actions_tmpl, error);
+ if (!hw_ctrl_fdb->hw_esw_sq_miss_root_tbl) {
+ DRV_LOG(ERR, "port %u failed to create table for default sq miss (root table)"
+ " for control flows", dev->data->port_id);
+ goto err;
+ }
+ /* Create templates and table for default SQ miss flow rules - non-root table. */
+ hw_ctrl_fdb->regc_sq_items_tmpl =
+ flow_hw_create_ctrl_regc_sq_pattern_template(dev, error);
+ if (!hw_ctrl_fdb->regc_sq_items_tmpl) {
+ DRV_LOG(ERR, "port %u failed to create SQ item template for"
+ " control flows", dev->data->port_id);
+ goto err;
+ }
+ hw_ctrl_fdb->port_actions_tmpl =
+ flow_hw_create_ctrl_port_actions_template(dev, error);
+ if (!hw_ctrl_fdb->port_actions_tmpl) {
+ DRV_LOG(ERR, "port %u failed to create port action template"
+ " for control flows", dev->data->port_id);
+ goto err;
+ }
+ hw_ctrl_fdb->hw_esw_sq_miss_tbl =
+ flow_hw_create_ctrl_sq_miss_table
+ (dev, hw_ctrl_fdb->regc_sq_items_tmpl,
+ hw_ctrl_fdb->port_actions_tmpl, error);
+ if (!hw_ctrl_fdb->hw_esw_sq_miss_tbl) {
+ DRV_LOG(ERR, "port %u failed to create table for default sq miss (non-root table)"
+ " for control flows", dev->data->port_id);
+ goto err;
+ }
+ /* Create templates and table for default FDB jump flow rules. */
+ hw_ctrl_fdb->port_items_tmpl =
+ flow_hw_create_ctrl_port_pattern_template(dev, error);
+ if (!hw_ctrl_fdb->port_items_tmpl) {
+ DRV_LOG(ERR, "port %u failed to create SQ item template for"
+ " control flows", dev->data->port_id);
+ goto err;
+ }
+ hw_ctrl_fdb->jump_one_actions_tmpl =
+ flow_hw_create_ctrl_jump_actions_template
+ (dev, MLX5_HW_LOWEST_USABLE_GROUP, error);
+ if (!hw_ctrl_fdb->jump_one_actions_tmpl) {
+ DRV_LOG(ERR, "port %u failed to create jump action template"
+ " for control flows", dev->data->port_id);
+ goto err;
+ }
+ hw_ctrl_fdb->hw_esw_zero_tbl = flow_hw_create_ctrl_jump_table
+ (dev, hw_ctrl_fdb->port_items_tmpl,
+ hw_ctrl_fdb->jump_one_actions_tmpl, error);
+ if (!hw_ctrl_fdb->hw_esw_zero_tbl) {
+ DRV_LOG(ERR, "port %u failed to create table for default jump to group 1"
+ " for control flows", dev->data->port_id);
+ goto err;
+ }
}
/* Create templates and table for default Tx metadata copy flow rule. */
if (!repr_matching && xmeta == MLX5_XMETA_MODE_META32_HWS) {
@@ -9211,6 +9221,8 @@ mlx5_flow_hw_esw_destroy_sq_miss_flow(struct rte_eth_dev *dev, uint32_t sqn)
}
proxy_dev = &rte_eth_devices[proxy_port_id];
proxy_priv = proxy_dev->data->dev_private;
+ /* FDB default flow rules must be enabled. */
+ MLX5_ASSERT(proxy_priv->sh->config.fdb_def_rule);
if (!proxy_priv->dr_ctx)
return 0;
if (!proxy_priv->hw_ctrl_fdb ||
@@ -9275,6 +9287,8 @@ mlx5_flow_hw_esw_create_default_jump_flow(struct rte_eth_dev *dev)
}
proxy_dev = &rte_eth_devices[proxy_port_id];
proxy_priv = proxy_dev->data->dev_private;
+ /* FDB default flow rules must be enabled. */
+ MLX5_ASSERT(proxy_priv->sh->config.fdb_def_rule);
if (!proxy_priv->dr_ctx) {
DRV_LOG(DEBUG, "Transfer proxy port (port %u) of port %u must be configured "
"for HWS to create default FDB jump rule. Default rule will "
diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index dbf5719a7e..1cb0b56ae1 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -1498,7 +1498,9 @@ mlx5_traffic_enable_hws(struct rte_eth_dev *dev)
if (!txq)
continue;
queue = mlx5_txq_get_sqn(txq);
- if ((priv->representor || priv->master) && config->dv_esw_en) {
+ if ((priv->representor || priv->master) &&
+ config->dv_esw_en &&
+ config->fdb_def_rule) {
if (mlx5_flow_hw_esw_create_sq_miss_flow(dev, queue, false)) {
mlx5_txq_release(dev, i);
goto error;
diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index d617784dba..46badcd0cc 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -1311,11 +1311,18 @@ rte_pmd_mlx5_external_sq_enable(uint16_t port_id, uint32_t sq_num)
}
#ifdef HAVE_MLX5_HWS_SUPPORT
if (priv->sh->config.dv_flow_en == 2) {
- if (mlx5_flow_hw_esw_create_sq_miss_flow(dev, sq_num, true))
- return -rte_errno;
+ bool sq_miss_created = false;
+
+ if (priv->sh->config.fdb_def_rule) {
+ if (mlx5_flow_hw_esw_create_sq_miss_flow(dev, sq_num, true))
+ return -rte_errno;
+ sq_miss_created = true;
+ }
+
if (priv->sh->config.repr_matching &&
mlx5_flow_hw_tx_repr_matching_flow(dev, sq_num, true)) {
- mlx5_flow_hw_esw_destroy_sq_miss_flow(dev, sq_num);
+ if (sq_miss_created)
+ mlx5_flow_hw_esw_destroy_sq_miss_flow(dev, sq_num);
return -rte_errno;
}
return 0;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:22.222031805 +0100
+++ 0019-net-mlx5-fix-disabling-E-Switch-default-flow-rules.patch 2024-07-24 12:29:20.751025728 +0100
@@ -1 +1 @@
-From cf9a91c67b88071a03beb32a3ea9970e6ee00391 Mon Sep 17 00:00:00 2001
+From 5669dcea46cecc3719837f17b0c34b24647379b4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cf9a91c67b88071a03beb32a3ea9970e6ee00391 ]
+
@@ -37 +38,0 @@
-Cc: stable@dpdk.org
@@ -48 +49 @@
-index e7d8c251a0..fe7df7305f 100644
+index 45709c9fd2..aa315c054d 100644
@@ -51 +52 @@
-@@ -10580,6 +10580,7 @@ flow_hw_create_ctrl_tables(struct rte_eth_dev *dev, struct rte_flow_error *error
+@@ -6469,6 +6469,7 @@ flow_hw_create_ctrl_tables(struct rte_eth_dev *dev, struct rte_flow_error *error
@@ -59 +60 @@
-@@ -10590,70 +10591,79 @@ flow_hw_create_ctrl_tables(struct rte_eth_dev *dev, struct rte_flow_error *error
+@@ -6479,70 +6480,79 @@ flow_hw_create_ctrl_tables(struct rte_eth_dev *dev, struct rte_flow_error *error
@@ -203 +204 @@
-@@ -15383,6 +15393,8 @@ mlx5_flow_hw_esw_destroy_sq_miss_flow(struct rte_eth_dev *dev, uint32_t sqn)
+@@ -9211,6 +9221,8 @@ mlx5_flow_hw_esw_destroy_sq_miss_flow(struct rte_eth_dev *dev, uint32_t sqn)
@@ -212 +213 @@
-@@ -15447,6 +15459,8 @@ mlx5_flow_hw_esw_create_default_jump_flow(struct rte_eth_dev *dev)
+@@ -9275,6 +9287,8 @@ mlx5_flow_hw_esw_create_default_jump_flow(struct rte_eth_dev *dev)
@@ -222 +223 @@
-index 6fa7c01cd0..a65a460731 100644
+index dbf5719a7e..1cb0b56ae1 100644
@@ -225 +226 @@
-@@ -1504,7 +1504,9 @@ mlx5_traffic_enable_hws(struct rte_eth_dev *dev)
+@@ -1498,7 +1498,9 @@ mlx5_traffic_enable_hws(struct rte_eth_dev *dev)
@@ -237 +238 @@
-index 8eb1ae1f03..f05534e168 100644
+index d617784dba..46badcd0cc 100644
@@ -240 +241 @@
-@@ -1363,11 +1363,18 @@ rte_pmd_mlx5_external_sq_enable(uint16_t port_id, uint32_t sq_num)
+@@ -1311,11 +1311,18 @@ rte_pmd_mlx5_external_sq_enable(uint16_t port_id, uint32_t sq_num)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/hns3: check Rx DMA address alignmnent' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (17 preceding siblings ...)
2024-07-24 11:32 ` patch 'net/mlx5: fix disabling E-Switch default flow rules' " luca.boccassi
@ 2024-07-24 11:32 ` luca.boccassi
2024-07-24 11:32 ` patch 'net/ark: fix index arithmetic' " luca.boccassi
` (19 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:32 UTC (permalink / raw)
To: Chengwen Feng; +Cc: Jie Hai, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/1c9c96641a99c4becca1670a1b07e89dd432c887
Thanks.
Luca Boccassi
---
From 1c9c96641a99c4becca1670a1b07e89dd432c887 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Mon, 15 Jul 2024 10:04:39 +0800
Subject: [PATCH] net/hns3: check Rx DMA address alignmnent
[ upstream commit d14c995b775a9b5910c51c3ab3685b320736f3f6 ]
The network engine has Rx DMA address align requirement, if this
requirement is violated, the Rx function will be abnormal. The detail
requirement is:
1) For HIP08 platform, require 64-bytes alignment.
2) For later platform, require 128-bytes alignment.
The setup Rx DMA address exists both on the control and data plane, to
ensure performance, the alignment check is added only on the control
plane.
Fixes: bba636698316 ("net/hns3: support Rx/Tx and related operations")
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Jie Hai <haijie1@huawei.com>
---
drivers/net/hns3/hns3_ethdev.c | 2 ++
drivers/net/hns3/hns3_ethdev.h | 8 ++++++++
drivers/net/hns3/hns3_ethdev_vf.c | 2 ++
drivers/net/hns3/hns3_rxtx.c | 21 +++++++++++++++++++++
4 files changed, 33 insertions(+)
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 6672b80c21..2c32f48af6 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2742,6 +2742,7 @@ hns3_get_capability(struct hns3_hw *hw)
hw->rss_info.ipv6_sctp_offload_supported = false;
hw->udp_cksum_mode = HNS3_SPECIAL_PORT_SW_CKSUM_MODE;
pf->support_multi_tc_pause = false;
+ hw->rx_dma_addr_align = HNS3_RX_DMA_ADDR_ALIGN_64;
return 0;
}
@@ -2762,6 +2763,7 @@ hns3_get_capability(struct hns3_hw *hw)
hw->rss_info.ipv6_sctp_offload_supported = true;
hw->udp_cksum_mode = HNS3_SPECIAL_PORT_HW_CKSUM_MODE;
pf->support_multi_tc_pause = true;
+ hw->rx_dma_addr_align = HNS3_RX_DMA_ADDR_ALIGN_128;
return 0;
}
diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
index 9f95a523ec..1afe4c4ff7 100644
--- a/drivers/net/hns3/hns3_ethdev.h
+++ b/drivers/net/hns3/hns3_ethdev.h
@@ -485,6 +485,9 @@ struct hns3_queue_intr {
#define HNS3_PKTS_DROP_STATS_MODE1 0
#define HNS3_PKTS_DROP_STATS_MODE2 1
+#define HNS3_RX_DMA_ADDR_ALIGN_128 128
+#define HNS3_RX_DMA_ADDR_ALIGN_64 64
+
struct hns3_hw {
struct rte_eth_dev_data *data;
void *io_base;
@@ -552,6 +555,11 @@ struct hns3_hw {
* direction.
*/
uint8_t min_tx_pkt_len;
+ /*
+ * The required alignment of the DMA address of the RX buffer.
+ * See HNS3_RX_DMA_ADDR_ALIGN_XXX for available values.
+ */
+ uint16_t rx_dma_addr_align;
struct hns3_queue_intr intr;
/*
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 9e5d69f485..6d7654206b 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -788,6 +788,7 @@ hns3vf_get_capability(struct hns3_hw *hw)
hw->min_tx_pkt_len = HNS3_HIP08_MIN_TX_PKT_LEN;
hw->rss_info.ipv6_sctp_offload_supported = false;
hw->promisc_mode = HNS3_UNLIMIT_PROMISC_MODE;
+ hw->rx_dma_addr_align = HNS3_RX_DMA_ADDR_ALIGN_64;
return 0;
}
@@ -805,6 +806,7 @@ hns3vf_get_capability(struct hns3_hw *hw)
hw->drop_stats_mode = HNS3_PKTS_DROP_STATS_MODE2;
hw->rss_info.ipv6_sctp_offload_supported = true;
hw->promisc_mode = HNS3_LIMIT_PROMISC_MODE;
+ hw->rx_dma_addr_align = HNS3_RX_DMA_ADDR_ALIGN_128;
return 0;
}
diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index 4343a3e4df..16cb174f4d 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -273,12 +273,27 @@ hns3_free_all_queues(struct rte_eth_dev *dev)
hns3_free_tx_queues(dev);
}
+static int
+hns3_check_rx_dma_addr(struct hns3_hw *hw, uint64_t dma_addr)
+{
+ uint64_t rem;
+
+ rem = dma_addr & (hw->rx_dma_addr_align - 1);
+ if (rem > 0) {
+ hns3_err(hw, "The IO address of the beginning of the mbuf data "
+ "must be %u-byte aligned", hw->rx_dma_addr_align);
+ return -EINVAL;
+ }
+ return 0;
+}
+
static int
hns3_alloc_rx_queue_mbufs(struct hns3_hw *hw, struct hns3_rx_queue *rxq)
{
struct rte_mbuf *mbuf;
uint64_t dma_addr;
uint16_t i;
+ int ret;
for (i = 0; i < rxq->nb_rx_desc; i++) {
mbuf = rte_mbuf_raw_alloc(rxq->mb_pool);
@@ -299,6 +314,12 @@ hns3_alloc_rx_queue_mbufs(struct hns3_hw *hw, struct hns3_rx_queue *rxq)
dma_addr = rte_cpu_to_le_64(rte_mbuf_data_iova_default(mbuf));
rxq->rx_ring[i].addr = dma_addr;
rxq->rx_ring[i].rx.bd_base_info = 0;
+
+ ret = hns3_check_rx_dma_addr(hw, dma_addr);
+ if (ret != 0) {
+ hns3_rx_queue_release_mbufs(rxq);
+ return ret;
+ }
}
return 0;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:22.315438309 +0100
+++ 0020-net-hns3-check-Rx-DMA-address-alignmnent.patch 2024-07-24 12:29:20.767026050 +0100
@@ -1 +1 @@
-From d14c995b775a9b5910c51c3ab3685b320736f3f6 Mon Sep 17 00:00:00 2001
+From 1c9c96641a99c4becca1670a1b07e89dd432c887 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d14c995b775a9b5910c51c3ab3685b320736f3f6 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index 327f6fe908..ec1251cb7e 100644
+index 6672b80c21..2c32f48af6 100644
@@ -32 +33 @@
-@@ -2738,6 +2738,7 @@ hns3_get_capability(struct hns3_hw *hw)
+@@ -2742,6 +2742,7 @@ hns3_get_capability(struct hns3_hw *hw)
@@ -40 +41 @@
-@@ -2758,6 +2759,7 @@ hns3_get_capability(struct hns3_hw *hw)
+@@ -2762,6 +2763,7 @@ hns3_get_capability(struct hns3_hw *hw)
@@ -49 +50 @@
-index a6b652455b..799b61038a 100644
+index 9f95a523ec..1afe4c4ff7 100644
@@ -52 +53 @@
-@@ -487,6 +487,9 @@ struct hns3_queue_intr {
+@@ -485,6 +485,9 @@ struct hns3_queue_intr {
@@ -62 +63 @@
-@@ -554,6 +557,11 @@ struct hns3_hw {
+@@ -552,6 +555,11 @@ struct hns3_hw {
@@ -75 +76 @@
-index b83d5b9589..ea9225cd26 100644
+index 9e5d69f485..6d7654206b 100644
@@ -78 +79 @@
-@@ -707,6 +707,7 @@ hns3vf_get_capability(struct hns3_hw *hw)
+@@ -788,6 +788,7 @@ hns3vf_get_capability(struct hns3_hw *hw)
@@ -86 +87 @@
-@@ -724,6 +725,7 @@ hns3vf_get_capability(struct hns3_hw *hw)
+@@ -805,6 +806,7 @@ hns3vf_get_capability(struct hns3_hw *hw)
@@ -95 +96 @@
-index d7f9cff547..5941b966e0 100644
+index 4343a3e4df..16cb174f4d 100644
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ark: fix index arithmetic' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (18 preceding siblings ...)
2024-07-24 11:32 ` patch 'net/hns3: check Rx DMA address alignmnent' " luca.boccassi
@ 2024-07-24 11:32 ` luca.boccassi
2024-07-24 11:33 ` patch 'ethdev: fix GENEVE option item conversion' " luca.boccassi
` (18 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:32 UTC (permalink / raw)
To: Ed Czeck; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/becd25a54aa3ab2765856edd541a2ba78278ce65
Thanks.
Luca Boccassi
---
From becd25a54aa3ab2765856edd541a2ba78278ce65 Mon Sep 17 00:00:00 2001
From: Ed Czeck <ed.czeck@atomicrules.com>
Date: Wed, 17 Jul 2024 16:38:30 -0400
Subject: [PATCH] net/ark: fix index arithmetic
[ upstream commit 73c0e26c8ed9f59f867ff251fbb2a50c8dfa06c5 ]
Behavior for signed integer overflow is not defined which can causes
undesired behavior at values near max and min bounds.
The used of unsigned is defined as to use modulo arithmetic which is the
desired behavior.
This patch replaces int32_t with uint32_t except for necessary casts.
Fixes: 9ee9e0d3b85e ("net/ark: update to reflect FPGA updates")
Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
drivers/net/ark/ark_ethdev_tx.c | 24 +++++++++++++++---------
1 file changed, 15 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ark/ark_ethdev_tx.c b/drivers/net/ark/ark_ethdev_tx.c
index 4792754f19..8f1f90b1a4 100644
--- a/drivers/net/ark/ark_ethdev_tx.c
+++ b/drivers/net/ark/ark_ethdev_tx.c
@@ -39,8 +39,8 @@ struct ark_tx_queue {
uint32_t queue_mask;
/* 3 indexes to the paired data rings. */
- int32_t prod_index; /* where to put the next one */
- int32_t free_index; /* mbuf has been freed */
+ uint32_t prod_index; /* where to put the next one */
+ uint32_t free_index; /* mbuf has been freed */
/* The queue Id is used to identify the HW Q */
uint16_t phys_qid;
@@ -49,7 +49,7 @@ struct ark_tx_queue {
/* next cache line - fields written by device */
RTE_MARKER cacheline1 __rte_cache_min_aligned;
- volatile int32_t cons_index; /* hw is done, can be freed */
+ volatile uint32_t cons_index; /* hw is done, can be freed */
} __rte_cache_aligned;
/* Forward declarations */
@@ -108,7 +108,7 @@ eth_ark_xmit_pkts(void *vtxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
uint32_t user_meta[5];
int stat;
- int32_t prod_index_limit;
+ uint32_t prod_index_limit;
uint16_t nb;
uint8_t user_len = 0;
const uint32_t min_pkt_len = ARK_MIN_TX_PKTLEN;
@@ -123,8 +123,13 @@ eth_ark_xmit_pkts(void *vtxq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
/* leave 4 elements mpu data */
prod_index_limit = queue->queue_size + queue->free_index - 4;
+ /* Populate the buffer bringing prod_index up to or slightly beyond
+ * prod_index_limit. Prod_index will increment by 2 or more each
+ * iteration. Note: indexes are uint32_t, cast to (signed) int32_t
+ * to catch the slight overage case; e.g. (200 - 201)
+ */
for (nb = 0;
- (nb < nb_pkts) && (prod_index_limit - queue->prod_index) > 0;
+ (nb < nb_pkts) && (int32_t)(prod_index_limit - queue->prod_index) > 0;
++nb) {
mbuf = tx_pkts[nb];
@@ -194,13 +199,13 @@ eth_ark_tx_jumbo(struct ark_tx_queue *queue, struct rte_mbuf *mbuf,
uint32_t *user_meta, uint8_t meta_cnt)
{
struct rte_mbuf *next;
- int32_t free_queue_space;
+ uint32_t free_queue_space;
uint8_t flags = ARK_DDM_SOP;
free_queue_space = queue->queue_mask -
(queue->prod_index - queue->free_index);
/* We need up to 4 mbufs for first header and 2 for subsequent ones */
- if (unlikely(free_queue_space < (2 + (2 * mbuf->nb_segs))))
+ if (unlikely(free_queue_space < (2U + (2U * mbuf->nb_segs))))
return -1;
while (mbuf != NULL) {
@@ -392,10 +397,11 @@ free_completed_tx(struct ark_tx_queue *queue)
{
struct rte_mbuf *mbuf;
union ark_tx_meta *meta;
- int32_t top_index;
+ uint32_t top_index;
top_index = queue->cons_index; /* read once */
- while ((top_index - queue->free_index) > 0) {
+
+ while ((int32_t)(top_index - queue->free_index) > 0) {
meta = &queue->meta_q[queue->free_index & queue->queue_mask];
if (likely((meta->flags & ARK_DDM_SOP) != 0)) {
mbuf = queue->bufs[queue->free_index &
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:22.398679084 +0100
+++ 0021-net-ark-fix-index-arithmetic.patch 2024-07-24 12:29:20.771026131 +0100
@@ -1 +1 @@
-From 73c0e26c8ed9f59f867ff251fbb2a50c8dfa06c5 Mon Sep 17 00:00:00 2001
+From becd25a54aa3ab2765856edd541a2ba78278ce65 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 73c0e26c8ed9f59f867ff251fbb2a50c8dfa06c5 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 9c89c85f50..ca6cd297a1 100644
+index 4792754f19..8f1f90b1a4 100644
@@ -25 +26 @@
-@@ -39,8 +39,8 @@ struct __rte_cache_aligned ark_tx_queue {
+@@ -39,8 +39,8 @@ struct ark_tx_queue {
@@ -36 +37 @@
-@@ -49,7 +49,7 @@ struct __rte_cache_aligned ark_tx_queue {
+@@ -49,7 +49,7 @@ struct ark_tx_queue {
@@ -39 +40 @@
- alignas(RTE_CACHE_LINE_MIN_SIZE) RTE_MARKER cacheline1;
+ RTE_MARKER cacheline1 __rte_cache_min_aligned;
@@ -42 +43 @@
- };
+ } __rte_cache_aligned;
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'ethdev: fix GENEVE option item conversion' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (19 preceding siblings ...)
2024-07-24 11:32 ` patch 'net/ark: fix index arithmetic' " luca.boccassi
@ 2024-07-24 11:33 ` luca.boccassi
2024-07-24 11:33 ` patch 'app/testpmd: add postpone option to async flow destroy' " luca.boccassi
` (17 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:33 UTC (permalink / raw)
To: Michael Baum; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/c4f3e79ac58b870825f0db4a386034311995ecde
Thanks.
Luca Boccassi
---
From c4f3e79ac58b870825f0db4a386034311995ecde Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Mon, 15 Jul 2024 15:13:16 +0300
Subject: [PATCH] ethdev: fix GENEVE option item conversion
[ upstream commit 841a0445442de154441ac2b4700658a9eb83c986 ]
The "rte_flow_conv()" function, enables, among other things, to copy
item list.
For GENEVE option item, the function copies it without considering deep
copy. It copies the "data" pointer without copying the pointed values.
This patch adds deep copy for after regular copy.
Fixes: 2b4c72b4d10d ("ethdev: introduce GENEVE header TLV option item")
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
lib/ethdev/rte_flow.c | 29 +++++++++++++++++++++++++----
1 file changed, 25 insertions(+), 4 deletions(-)
diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c
index 2aa51f99ee..aa43b8034d 100644
--- a/lib/ethdev/rte_flow.c
+++ b/lib/ethdev/rte_flow.c
@@ -547,6 +547,7 @@ rte_flow_conv_item_spec(void *buf, const size_t size,
switch (item->type) {
union {
const struct rte_flow_item_raw *raw;
+ const struct rte_flow_item_geneve_opt *geneve_opt;
} spec;
union {
const struct rte_flow_item_raw *raw;
@@ -556,10 +557,13 @@ rte_flow_conv_item_spec(void *buf, const size_t size,
} mask;
union {
const struct rte_flow_item_raw *raw;
+ const struct rte_flow_item_geneve_opt *geneve_opt;
} src;
union {
struct rte_flow_item_raw *raw;
+ struct rte_flow_item_geneve_opt *geneve_opt;
} dst;
+ void *deep_src;
size_t tmp;
case RTE_FLOW_ITEM_TYPE_RAW:
@@ -588,13 +592,30 @@ rte_flow_conv_item_spec(void *buf, const size_t size,
tmp = last.raw->length & mask.raw->length;
if (tmp) {
off = RTE_ALIGN_CEIL(off, sizeof(*dst.raw->pattern));
- if (size >= off + tmp)
- dst.raw->pattern = rte_memcpy
- ((void *)((uintptr_t)dst.raw + off),
- src.raw->pattern, tmp);
+ if (size >= off + tmp) {
+ deep_src = (void *)((uintptr_t)dst.raw + off);
+ dst.raw->pattern = rte_memcpy(deep_src,
+ src.raw->pattern,
+ tmp);
+ }
off += tmp;
}
break;
+ case RTE_FLOW_ITEM_TYPE_GENEVE_OPT:
+ off = rte_flow_conv_copy(buf, data, size,
+ rte_flow_desc_item, item->type);
+ spec.geneve_opt = item->spec;
+ src.geneve_opt = data;
+ dst.geneve_opt = buf;
+ tmp = spec.geneve_opt->option_len << 2;
+ if (size > 0 && src.geneve_opt->data) {
+ deep_src = (void *)((uintptr_t)(dst.geneve_opt + 1));
+ dst.geneve_opt->data = rte_memcpy(deep_src,
+ src.geneve_opt->data,
+ tmp);
+ }
+ off += tmp;
+ break;
default:
off = rte_flow_conv_copy(buf, data, size,
rte_flow_desc_item, item->type);
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:22.464774480 +0100
+++ 0022-ethdev-fix-GENEVE-option-item-conversion.patch 2024-07-24 12:29:20.771026131 +0100
@@ -1 +1 @@
-From 841a0445442de154441ac2b4700658a9eb83c986 Mon Sep 17 00:00:00 2001
+From c4f3e79ac58b870825f0db4a386034311995ecde Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 841a0445442de154441ac2b4700658a9eb83c986 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index ca2f85c3fa..4076ae4ee1 100644
+index 2aa51f99ee..aa43b8034d 100644
@@ -27 +28 @@
-@@ -623,6 +623,7 @@ rte_flow_conv_item_spec(void *buf, const size_t size,
+@@ -547,6 +547,7 @@ rte_flow_conv_item_spec(void *buf, const size_t size,
@@ -35 +36 @@
-@@ -632,10 +633,13 @@ rte_flow_conv_item_spec(void *buf, const size_t size,
+@@ -556,10 +557,13 @@ rte_flow_conv_item_spec(void *buf, const size_t size,
@@ -49 +50 @@
-@@ -664,13 +668,30 @@ rte_flow_conv_item_spec(void *buf, const size_t size,
+@@ -588,13 +592,30 @@ rte_flow_conv_item_spec(void *buf, const size_t size,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'app/testpmd: add postpone option to async flow destroy' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (20 preceding siblings ...)
2024-07-24 11:33 ` patch 'ethdev: fix GENEVE option item conversion' " luca.boccassi
@ 2024-07-24 11:33 ` luca.boccassi
2024-07-24 11:33 ` patch 'ethdev: fix device init without socket-local memory' " luca.boccassi
` (16 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:33 UTC (permalink / raw)
To: Alexander Kozyrev; +Cc: Dariusz Sosnowski, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/9c7ae1bf6d950f6bc91f0868285d8aa71e568af5
Thanks.
Luca Boccassi
---
From 9c7ae1bf6d950f6bc91f0868285d8aa71e568af5 Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev@nvidia.com>
Date: Wed, 17 Jul 2024 17:19:54 +0300
Subject: [PATCH] app/testpmd: add postpone option to async flow destroy
[ upstream commit 8e74ca6d627ddd0b934609f8575f3bd66f04a0c5 ]
The postpone option is not available in the async flow destroy CLI.
Only flow creation can be postponed in the testpmd application.
Insert this option into the async flow destroy CLI before the rule ID.
Fixes: ecdc927b99f2 ("app/testpmd: add async flow create/destroy operations")
Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Reviewed-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
app/test-pmd/cmdline_flow.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 5d97625b05..698b4d9601 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -2980,7 +2980,7 @@ static const struct token token_list[] = {
[QUEUE_DESTROY] = {
.name = "destroy",
.help = "destroy a flow rule",
- .next = NEXT(NEXT_ENTRY(QUEUE_DESTROY_ID),
+ .next = NEXT(NEXT_ENTRY(QUEUE_DESTROY_POSTPONE),
NEXT_ENTRY(COMMON_QUEUE_ID)),
.args = ARGS(ARGS_ENTRY(struct buffer, queue)),
.call = parse_qo_destroy,
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:22.533917037 +0100
+++ 0023-app-testpmd-add-postpone-option-to-async-flow-destro.patch 2024-07-24 12:29:20.783026373 +0100
@@ -1 +1 @@
-From 8e74ca6d627ddd0b934609f8575f3bd66f04a0c5 Mon Sep 17 00:00:00 2001
+From 9c7ae1bf6d950f6bc91f0868285d8aa71e568af5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8e74ca6d627ddd0b934609f8575f3bd66f04a0c5 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index a76b44bf39..fb6a552863 100644
+index 5d97625b05..698b4d9601 100644
@@ -23 +24 @@
-@@ -3703,7 +3703,7 @@ static const struct token token_list[] = {
+@@ -2980,7 +2980,7 @@ static const struct token token_list[] = {
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'ethdev: fix device init without socket-local memory' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (21 preceding siblings ...)
2024-07-24 11:33 ` patch 'app/testpmd: add postpone option to async flow destroy' " luca.boccassi
@ 2024-07-24 11:33 ` luca.boccassi
2024-07-24 11:33 ` patch 'app/testpmd: fix build on signed comparison' " luca.boccassi
` (15 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:33 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Padraig Connolly, Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/1092b5655fd49e38ce26368b379b3ec081f082a4
Thanks.
Luca Boccassi
---
From 1092b5655fd49e38ce26368b379b3ec081f082a4 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Mon, 22 Jul 2024 11:02:28 +0100
Subject: [PATCH] ethdev: fix device init without socket-local memory
[ upstream commit ed34d87d9cfbae8b908159f60df2008e45e4c39f ]
When allocating memory for an ethdev, the rte_malloc_socket call used
only allocates memory on the NUMA node/socket local to the device. This
means that even if the user wanted to, they could never use a remote NIC
without also having memory on that NIC's socket.
For example, if we change examples/skeleton/basicfwd.c to have
SOCKET_ID_ANY as the socket_id parameter for Rx and Tx rings, we should
be able to run the app cross-numa e.g. as below, where the two PCI
devices are on socket 1, and core 1 is on socket 0:
./build/examples/dpdk-skeleton -l 1 --legacy-mem --socket-mem=1024,0 \
-a a8:00.0 -a b8:00.0
This fails however, with the error:
ETHDEV: failed to allocate private data
PCI_BUS: Requested device 0000:a8:00.0 cannot be used
We can remove this restriction by doing a fallback call to general
rte_malloc after a call to rte_malloc_socket fails. This should be safe
to do because the later ethdev calls to setup Rx/Tx queues all take a
socket_id parameter, which can be used by applications to enforce the
requirement for local-only memory for a device, if so desired. [If
device-local memory is present it will be used as before, while if not
present the rte_eth_dev_configure call will now pass, but the subsequent
queue setup calls requesting local memory will fail].
Fixes: e489007a411c ("ethdev: add generic create/destroy ethdev APIs")
Fixes: dcd5c8112bc3 ("ethdev: add PCI driver helpers")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Padraig Connolly <padraig.j.connolly@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
lib/ethdev/ethdev_driver.c | 20 +++++++++++++++-----
lib/ethdev/ethdev_pci.h | 20 +++++++++++++++++---
2 files changed, 32 insertions(+), 8 deletions(-)
diff --git a/lib/ethdev/ethdev_driver.c b/lib/ethdev/ethdev_driver.c
index 0387c7133d..867c5de3bb 100644
--- a/lib/ethdev/ethdev_driver.c
+++ b/lib/ethdev/ethdev_driver.c
@@ -275,15 +275,25 @@ rte_eth_dev_create(struct rte_device *device, const char *name,
return -ENODEV;
if (priv_data_size) {
+ /* try alloc private data on device-local node. */
ethdev->data->dev_private = rte_zmalloc_socket(
name, priv_data_size, RTE_CACHE_LINE_SIZE,
device->numa_node);
- if (!ethdev->data->dev_private) {
- RTE_ETHDEV_LOG(ERR,
- "failed to allocate private data\n");
- retval = -ENOMEM;
- goto probe_failed;
+ /* fall back to alloc on any socket on failure */
+ if (ethdev->data->dev_private == NULL) {
+ ethdev->data->dev_private = rte_zmalloc(name,
+ priv_data_size, RTE_CACHE_LINE_SIZE);
+
+ if (ethdev->data->dev_private == NULL) {
+ RTE_ETHDEV_LOG(ERR, "failed to allocate private data\n");
+ retval = -ENOMEM;
+ goto probe_failed;
+ }
+ /* got memory, but not local, so issue warning */
+ RTE_ETHDEV_LOG(WARNING,
+ "Private data for ethdev '%s' not allocated on local NUMA node %d\n",
+ device->name, device->numa_node);
}
}
} else {
diff --git a/lib/ethdev/ethdev_pci.h b/lib/ethdev/ethdev_pci.h
index ddb559aa95..fbe74fdefe 100644
--- a/lib/ethdev/ethdev_pci.h
+++ b/lib/ethdev/ethdev_pci.h
@@ -93,12 +93,26 @@ rte_eth_dev_pci_allocate(struct rte_pci_device *dev, size_t private_data_size)
return NULL;
if (private_data_size) {
+ /* Try and alloc the private-data structure on socket local to the device */
eth_dev->data->dev_private = rte_zmalloc_socket(name,
private_data_size, RTE_CACHE_LINE_SIZE,
dev->device.numa_node);
- if (!eth_dev->data->dev_private) {
- rte_eth_dev_release_port(eth_dev);
- return NULL;
+
+ /* if cannot allocate memory on the socket local to the device
+ * use rte_malloc to allocate memory on some other socket, if available.
+ */
+ if (eth_dev->data->dev_private == NULL) {
+ eth_dev->data->dev_private = rte_zmalloc(name,
+ private_data_size, RTE_CACHE_LINE_SIZE);
+
+ if (eth_dev->data->dev_private == NULL) {
+ rte_eth_dev_release_port(eth_dev);
+ return NULL;
+ }
+ /* got memory, but not local, so issue warning */
+ RTE_ETHDEV_LOG(WARNING,
+ "Private data for ethdev '%s' not allocated on local NUMA node %d\n",
+ dev->device.name, dev->device.numa_node);
}
}
} else {
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:22.619886438 +0100
+++ 0024-ethdev-fix-device-init-without-socket-local-memory.patch 2024-07-24 12:29:20.787026453 +0100
@@ -1 +1 @@
-From ed34d87d9cfbae8b908159f60df2008e45e4c39f Mon Sep 17 00:00:00 2001
+From 1092b5655fd49e38ce26368b379b3ec081f082a4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ed34d87d9cfbae8b908159f60df2008e45e4c39f ]
+
@@ -35 +36,0 @@
-Cc: stable@dpdk.org
@@ -46 +47 @@
-index f48c0eb8bc..c335a25a82 100644
+index 0387c7133d..867c5de3bb 100644
@@ -49 +50 @@
-@@ -303,15 +303,25 @@ rte_eth_dev_create(struct rte_device *device, const char *name,
+@@ -275,15 +275,25 @@ rte_eth_dev_create(struct rte_device *device, const char *name,
@@ -59,2 +60,2 @@
-- RTE_ETHDEV_LOG_LINE(ERR,
-- "failed to allocate private data");
+- RTE_ETHDEV_LOG(ERR,
+- "failed to allocate private data\n");
@@ -69 +70 @@
-+ RTE_ETHDEV_LOG_LINE(ERR, "failed to allocate private data");
++ RTE_ETHDEV_LOG(ERR, "failed to allocate private data\n");
@@ -74,2 +75,2 @@
-+ RTE_ETHDEV_LOG_LINE(WARNING,
-+ "Private data for ethdev '%s' not allocated on local NUMA node %d",
++ RTE_ETHDEV_LOG(WARNING,
++ "Private data for ethdev '%s' not allocated on local NUMA node %d\n",
@@ -81 +82 @@
-index 737fff1833..ec4f731270 100644
+index ddb559aa95..fbe74fdefe 100644
@@ -108,2 +109,2 @@
-+ RTE_ETHDEV_LOG_LINE(WARNING,
-+ "Private data for ethdev '%s' not allocated on local NUMA node %d",
++ RTE_ETHDEV_LOG(WARNING,
++ "Private data for ethdev '%s' not allocated on local NUMA node %d\n",
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'app/testpmd: fix build on signed comparison' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (22 preceding siblings ...)
2024-07-24 11:33 ` patch 'ethdev: fix device init without socket-local memory' " luca.boccassi
@ 2024-07-24 11:33 ` luca.boccassi
2024-07-24 11:33 ` patch 'bus/pci: fix UIO resource mapping in secondary process' " luca.boccassi
` (14 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:33 UTC (permalink / raw)
To: Ferruh Yigit; +Cc: Raslan Darawsheh, Ali Alnubani, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/99b0e4a22c4dd9cd718dc23e2c583bf4b2a21b3e
Thanks.
Luca Boccassi
---
From 99b0e4a22c4dd9cd718dc23e2c583bf4b2a21b3e Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@amd.com>
Date: Mon, 22 Jul 2024 03:52:29 -0700
Subject: [PATCH] app/testpmd: fix build on signed comparison
[ upstream commit 1f47f469aac68bc88be24e530b4267d03537de12 ]
Build error:
.../app/test-pmd/config.c: In function 'icmp_echo_config_setup':
.../app/test-pmd/config.c:5159:30:
error: comparison between signed and unsigned integer expressions
[-Werror=sign-compare]
if ((nb_txq * nb_fwd_ports) < nb_fwd_lcores)
^
All 'nb_txq', 'nb_fwd_ports' & 'nb_fwd_lcores' are unsigned variables,
but the warning is related to the integer promotion rules of C:
'nb_txq' -> uint16_t, promoted to 'int'
'nb_fwd_ports' -> uint16_t, promoted to 'int'
(nb_txq * nb_fwd_ports) -> result 'int'
nb_fwd_lcores -> 'uint32_t'
Ends up comparing 'int' vs 'uint32_t'.
Fixing by adding the casting back which was initially part of the patch.
Fixes: 2bf44dd14fa5 ("app/testpmd: fix lcore ID restriction")
Reported-by: Raslan Darawsheh <rasland@nvidia.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
Tested-by: Ali Alnubani <alialnu@nvidia.com>
---
app/test-pmd/config.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 1a6d791129..4ff0e72115 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -4618,7 +4618,7 @@ icmp_echo_config_setup(void)
lcoreid_t lc_id;
uint16_t sm_id;
- if ((nb_txq * nb_fwd_ports) < nb_fwd_lcores)
+ if ((lcoreid_t)(nb_txq * nb_fwd_ports) < nb_fwd_lcores)
cur_fwd_config.nb_fwd_lcores = (lcoreid_t)
(nb_txq * nb_fwd_ports);
else
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:22.694533464 +0100
+++ 0025-app-testpmd-fix-build-on-signed-comparison.patch 2024-07-24 12:29:20.795026614 +0100
@@ -1 +1 @@
-From 1f47f469aac68bc88be24e530b4267d03537de12 Mon Sep 17 00:00:00 2001
+From 99b0e4a22c4dd9cd718dc23e2c583bf4b2a21b3e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1f47f469aac68bc88be24e530b4267d03537de12 ]
+
@@ -24 +25,0 @@
-Cc: stable@dpdk.org
@@ -34 +35 @@
-index 66c3a68c1d..6f0beafa27 100644
+index 1a6d791129..4ff0e72115 100644
@@ -37 +38 @@
-@@ -5156,7 +5156,7 @@ icmp_echo_config_setup(void)
+@@ -4618,7 +4618,7 @@ icmp_echo_config_setup(void)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'bus/pci: fix UIO resource mapping in secondary process' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (23 preceding siblings ...)
2024-07-24 11:33 ` patch 'app/testpmd: fix build on signed comparison' " luca.boccassi
@ 2024-07-24 11:33 ` luca.boccassi
2024-07-24 11:33 ` patch 'bus/pci: fix FD " luca.boccassi
` (13 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:33 UTC (permalink / raw)
To: Zerun Fu
Cc: Chaoyong He, Long Wu, Peng Zhang, Anatoly Burakov, Chenbo Xia,
dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6bf6cd51846b6ac69b690a2ccf3b1fe7b838ce47
Thanks.
Luca Boccassi
---
From 6bf6cd51846b6ac69b690a2ccf3b1fe7b838ce47 Mon Sep 17 00:00:00 2001
From: Zerun Fu <zerun.fu@corigine.com>
Date: Tue, 2 Jul 2024 15:40:06 +0800
Subject: [PATCH] bus/pci: fix UIO resource mapping in secondary process
[ upstream commit 9e0a0e38ecaa7efaca9d349737d0a5ef9ca33a57 ]
For the primary process, the logic loops all BARs and will skip
the map of BAR with an invalid physical address (0), also will
assign 'uio_res->nb_maps' with the real mapped BARs number. But
for the secondary process, instead of loops all BARs, the logic
using the 'uio_res->nb_map' as index. If the device uses continuous
BARs there will be no problem, whereas if it uses discrete BARs,
it will lead to mapping errors.
Fix this problem by also loops all BARs and skip the map of BAR
with an invalid physical address in secondary process.
Fixes: 9b957f378abf ("pci: merge uio functions for linux and bsd")
Signed-off-by: Zerun Fu <zerun.fu@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Chenbo Xia <chenbox@nvidia.com>
---
drivers/bus/pci/pci_common_uio.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/drivers/bus/pci/pci_common_uio.c b/drivers/bus/pci/pci_common_uio.c
index 76c661f054..f44ccdf27c 100644
--- a/drivers/bus/pci/pci_common_uio.c
+++ b/drivers/bus/pci/pci_common_uio.c
@@ -26,7 +26,7 @@ EAL_REGISTER_TAILQ(rte_uio_tailq)
static int
pci_uio_map_secondary(struct rte_pci_device *dev)
{
- int fd, i, j;
+ int fd, i = 0, j, res_idx;
struct mapped_pci_resource *uio_res;
struct mapped_pci_res_list *uio_res_list =
RTE_TAILQ_CAST(rte_uio_tailq.head, mapped_pci_res_list);
@@ -37,7 +37,15 @@ pci_uio_map_secondary(struct rte_pci_device *dev)
if (rte_pci_addr_cmp(&uio_res->pci_addr, &dev->addr))
continue;
- for (i = 0; i != uio_res->nb_maps; i++) {
+ /* Map all BARs */
+ for (res_idx = 0; res_idx != PCI_MAX_RESOURCE; res_idx++) {
+ /* skip empty BAR */
+ if (dev->mem_resource[res_idx].phys_addr == 0)
+ continue;
+
+ if (i >= uio_res->nb_maps)
+ return -1;
+
/*
* open devname, to mmap it
*/
@@ -71,7 +79,9 @@ pci_uio_map_secondary(struct rte_pci_device *dev)
}
return -1;
}
- dev->mem_resource[i].addr = mapaddr;
+ dev->mem_resource[res_idx].addr = mapaddr;
+
+ i++;
}
return 0;
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:22.774974840 +0100
+++ 0026-bus-pci-fix-UIO-resource-mapping-in-secondary-proces.patch 2024-07-24 12:29:20.795026614 +0100
@@ -1 +1 @@
-From 9e0a0e38ecaa7efaca9d349737d0a5ef9ca33a57 Mon Sep 17 00:00:00 2001
+From 6bf6cd51846b6ac69b690a2ccf3b1fe7b838ce47 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9e0a0e38ecaa7efaca9d349737d0a5ef9ca33a57 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -31 +32 @@
-index ff1b02b6bd..65f72b7cc6 100644
+index 76c661f054..f44ccdf27c 100644
@@ -60 +61 @@
-@@ -70,7 +78,9 @@ pci_uio_map_secondary(struct rte_pci_device *dev)
+@@ -71,7 +79,9 @@ pci_uio_map_secondary(struct rte_pci_device *dev)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'bus/pci: fix FD in secondary process' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (24 preceding siblings ...)
2024-07-24 11:33 ` patch 'bus/pci: fix UIO resource mapping in secondary process' " luca.boccassi
@ 2024-07-24 11:33 ` luca.boccassi
2024-07-24 11:33 ` patch 'dma/hisilicon: remove support for HIP09 platform' " luca.boccassi
` (12 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:33 UTC (permalink / raw)
To: Zerun Fu
Cc: Chaoyong He, Long Wu, Peng Zhang, Anatoly Burakov, Chenbo Xia,
dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/635c7eaa5ee36df3fd2ad6cc727078b8a55cb209
Thanks.
Luca Boccassi
---
From 635c7eaa5ee36df3fd2ad6cc727078b8a55cb209 Mon Sep 17 00:00:00 2001
From: Zerun Fu <zerun.fu@corigine.com>
Date: Tue, 2 Jul 2024 15:40:07 +0800
Subject: [PATCH] bus/pci: fix FD in secondary process
[ upstream commit 847d78fb9530fff401bf167298aad22766a1f04a ]
In the previous logic the 'fd' was only saved in the primary process,
but for some devices this value is also used in the secondary logic.
For example, the call of 'rte_pci_find_ext_capability()' will fail in
the secondary process.
Fix this problem by getting and saving the value of 'fd' also in the
secondary process logic.
Fixes: 9b957f378abf ("pci: merge uio functions for linux and bsd")
Signed-off-by: Zerun Fu <zerun.fu@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Chenbo Xia <chenbox@nvidia.com>
---
drivers/bus/pci/linux/pci_uio.c | 5 ++++-
drivers/bus/pci/pci_common_uio.c | 34 ++++++++++++++++----------------
2 files changed, 21 insertions(+), 18 deletions(-)
diff --git a/drivers/bus/pci/linux/pci_uio.c b/drivers/bus/pci/linux/pci_uio.c
index d52125e49b..81a1ed6fa0 100644
--- a/drivers/bus/pci/linux/pci_uio.c
+++ b/drivers/bus/pci/linux/pci_uio.c
@@ -245,7 +245,7 @@ pci_uio_alloc_resource(struct rte_pci_device *dev,
}
snprintf(devname, sizeof(devname), "/dev/uio%u", uio_num);
- /* save fd if in primary process */
+ /* save fd */
fd = open(devname, O_RDWR);
if (fd < 0) {
RTE_LOG(ERR, EAL, "Cannot open %s: %s\n",
@@ -283,6 +283,9 @@ pci_uio_alloc_resource(struct rte_pci_device *dev,
}
}
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return 0;
+
/* allocate the mapping details for secondary processes*/
*uio_res = rte_zmalloc("UIO_RES", sizeof(**uio_res), 0);
if (*uio_res == NULL) {
diff --git a/drivers/bus/pci/pci_common_uio.c b/drivers/bus/pci/pci_common_uio.c
index f44ccdf27c..a06378b239 100644
--- a/drivers/bus/pci/pci_common_uio.c
+++ b/drivers/bus/pci/pci_common_uio.c
@@ -106,15 +106,15 @@ pci_uio_map_resource(struct rte_pci_device *dev)
if (rte_intr_dev_fd_set(dev->intr_handle, -1))
return -1;
- /* secondary processes - use already recorded details */
- if (rte_eal_process_type() != RTE_PROC_PRIMARY)
- return pci_uio_map_secondary(dev);
-
/* allocate uio resource */
ret = pci_uio_alloc_resource(dev, &uio_res);
if (ret)
return ret;
+ /* secondary processes - use already recorded details */
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return pci_uio_map_secondary(dev);
+
/* Map all BARs */
for (i = 0; i != PCI_MAX_RESOURCE; i++) {
/* skip empty BAR */
@@ -230,19 +230,7 @@ pci_uio_unmap_resource(struct rte_pci_device *dev)
if (uio_res == NULL)
return;
- /* secondary processes - just free maps */
- if (rte_eal_process_type() != RTE_PROC_PRIMARY)
- return pci_uio_unmap(uio_res);
-
- TAILQ_REMOVE(uio_res_list, uio_res, next);
-
- /* unmap all resources */
- pci_uio_unmap(uio_res);
-
- /* free uio resource */
- rte_free(uio_res);
-
- /* close fd if in primary process */
+ /* close fd */
if (rte_intr_fd_get(dev->intr_handle) >= 0)
close(rte_intr_fd_get(dev->intr_handle));
uio_cfg_fd = rte_intr_dev_fd_get(dev->intr_handle);
@@ -253,4 +241,16 @@ pci_uio_unmap_resource(struct rte_pci_device *dev)
rte_intr_fd_set(dev->intr_handle, -1);
rte_intr_type_set(dev->intr_handle, RTE_INTR_HANDLE_UNKNOWN);
+
+ /* secondary processes - just free maps */
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return pci_uio_unmap(uio_res);
+
+ TAILQ_REMOVE(uio_res_list, uio_res, next);
+
+ /* unmap all resources */
+ pci_uio_unmap(uio_res);
+
+ /* free uio resource */
+ rte_free(uio_res);
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:22.832583302 +0100
+++ 0027-bus-pci-fix-FD-in-secondary-process.patch 2024-07-24 12:29:20.795026614 +0100
@@ -1 +1 @@
-From 847d78fb9530fff401bf167298aad22766a1f04a Mon Sep 17 00:00:00 2001
+From 635c7eaa5ee36df3fd2ad6cc727078b8a55cb209 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 847d78fb9530fff401bf167298aad22766a1f04a ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index f7d990d33f..4c1d3327a9 100644
+index d52125e49b..81a1ed6fa0 100644
@@ -33 +34 @@
-@@ -234,7 +234,7 @@ pci_uio_alloc_resource(struct rte_pci_device *dev,
+@@ -245,7 +245,7 @@ pci_uio_alloc_resource(struct rte_pci_device *dev,
@@ -41,2 +42,2 @@
- PCI_LOG(ERR, "Cannot open %s: %s", devname, strerror(errno));
-@@ -270,6 +270,9 @@ pci_uio_alloc_resource(struct rte_pci_device *dev,
+ RTE_LOG(ERR, EAL, "Cannot open %s: %s\n",
+@@ -283,6 +283,9 @@ pci_uio_alloc_resource(struct rte_pci_device *dev,
@@ -53 +54 @@
-index 65f72b7cc6..30503bd23a 100644
+index f44ccdf27c..a06378b239 100644
@@ -56 +57 @@
-@@ -105,15 +105,15 @@ pci_uio_map_resource(struct rte_pci_device *dev)
+@@ -106,15 +106,15 @@ pci_uio_map_resource(struct rte_pci_device *dev)
@@ -76 +77 @@
-@@ -225,19 +225,7 @@ pci_uio_unmap_resource(struct rte_pci_device *dev)
+@@ -230,19 +230,7 @@ pci_uio_unmap_resource(struct rte_pci_device *dev)
@@ -97 +98 @@
-@@ -248,4 +236,16 @@ pci_uio_unmap_resource(struct rte_pci_device *dev)
+@@ -253,4 +241,16 @@ pci_uio_unmap_resource(struct rte_pci_device *dev)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'dma/hisilicon: remove support for HIP09 platform' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (25 preceding siblings ...)
2024-07-24 11:33 ` patch 'bus/pci: fix FD " luca.boccassi
@ 2024-07-24 11:33 ` luca.boccassi
2024-07-24 11:33 ` patch 'app/dumpcap: handle SIGTERM and SIGHUP' " luca.boccassi
` (11 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:33 UTC (permalink / raw)
To: Chengwen Feng; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/1b1337cc9316675d9cd4982d78d4abf5891c965f
Thanks.
Luca Boccassi
---
From 1b1337cc9316675d9cd4982d78d4abf5891c965f Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Thu, 4 Jul 2024 02:53:17 +0000
Subject: [PATCH] dma/hisilicon: remove support for HIP09 platform
[ upstream commit 2a3f42942a5f4df62108679ef44a34d21b4a2553 ]
The DMA for HIP09 is no longer available, so delete it.
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
doc/guides/dmadevs/hisilicon.rst | 1 -
drivers/dma/hisilicon/hisi_dmadev.c | 40 +----------------------------
drivers/dma/hisilicon/hisi_dmadev.h | 35 +------------------------
3 files changed, 2 insertions(+), 74 deletions(-)
diff --git a/doc/guides/dmadevs/hisilicon.rst b/doc/guides/dmadevs/hisilicon.rst
index 8c1f0f8886..974bc49376 100644
--- a/doc/guides/dmadevs/hisilicon.rst
+++ b/doc/guides/dmadevs/hisilicon.rst
@@ -13,7 +13,6 @@ Supported Kunpeng SoCs
----------------------
* Kunpeng 920
-* Kunpeng 930
Device Setup
diff --git a/drivers/dma/hisilicon/hisi_dmadev.c b/drivers/dma/hisilicon/hisi_dmadev.c
index 0e11ca14cc..4db3b0554c 100644
--- a/drivers/dma/hisilicon/hisi_dmadev.c
+++ b/drivers/dma/hisilicon/hisi_dmadev.c
@@ -39,8 +39,6 @@ hisi_dma_queue_base(struct hisi_dma_dev *hw)
{
if (hw->reg_layout == HISI_DMA_REG_LAYOUT_HIP08)
return HISI_DMA_HIP08_QUEUE_BASE;
- else if (hw->reg_layout == HISI_DMA_REG_LAYOUT_HIP09)
- return HISI_DMA_HIP09_QUEUE_BASE;
else
return 0;
}
@@ -216,25 +214,6 @@ hisi_dma_init_hw(struct hisi_dma_dev *hw)
HISI_DMA_HIP08_QUEUE_INT_MASK_M, true);
hisi_dma_update_queue_mbit(hw, HISI_DMA_QUEUE_INT_MASK_REG,
HISI_DMA_HIP08_QUEUE_INT_MASK_M, true);
- } else if (hw->reg_layout == HISI_DMA_REG_LAYOUT_HIP09) {
- hisi_dma_update_queue_mbit(hw, HISI_DMA_QUEUE_CTRL0_REG,
- HISI_DMA_HIP09_QUEUE_CTRL0_ERR_ABORT_M, false);
- hisi_dma_update_queue_mbit(hw, HISI_DMA_QUEUE_INT_STATUS_REG,
- HISI_DMA_HIP09_QUEUE_INT_MASK_M, true);
- hisi_dma_update_queue_mbit(hw, HISI_DMA_QUEUE_INT_MASK_REG,
- HISI_DMA_HIP09_QUEUE_INT_MASK_M, true);
- hisi_dma_update_queue_mbit(hw,
- HISI_DMA_HIP09_QUEUE_ERR_INT_STATUS_REG,
- HISI_DMA_HIP09_QUEUE_ERR_INT_MASK_M, true);
- hisi_dma_update_queue_mbit(hw,
- HISI_DMA_HIP09_QUEUE_ERR_INT_MASK_REG,
- HISI_DMA_HIP09_QUEUE_ERR_INT_MASK_M, true);
- hisi_dma_update_queue_bit(hw, HISI_DMA_QUEUE_CTRL1_REG,
- HISI_DMA_HIP09_QUEUE_CTRL1_VA_ENABLE_B, true);
- hisi_dma_update_bit(hw,
- HISI_DMA_HIP09_QUEUE_CFG_REG(hw->queue_id),
- HISI_DMA_HIP09_QUEUE_CFG_LINK_DOWN_MASK_B,
- true);
}
}
@@ -256,8 +235,6 @@ hisi_dma_reg_layout(uint8_t revision)
{
if (revision == HISI_DMA_REVISION_HIP08B)
return HISI_DMA_REG_LAYOUT_HIP08;
- else if (revision >= HISI_DMA_REVISION_HIP09A)
- return HISI_DMA_REG_LAYOUT_HIP09;
else
return HISI_DMA_REG_LAYOUT_INVALID;
}
@@ -328,14 +305,11 @@ hisi_dma_info_get(const struct rte_dma_dev *dev,
struct rte_dma_info *dev_info,
uint32_t info_sz)
{
- struct hisi_dma_dev *hw = dev->data->dev_private;
+ RTE_SET_USED(dev);
RTE_SET_USED(info_sz);
dev_info->dev_capa = RTE_DMA_CAPA_MEM_TO_MEM |
RTE_DMA_CAPA_OPS_COPY;
- if (hw->reg_layout == HISI_DMA_REG_LAYOUT_HIP09)
- dev_info->dev_capa |= RTE_DMA_CAPA_HANDLES_ERRORS;
-
dev_info->max_vchans = 1;
dev_info->max_desc = HISI_DMA_MAX_DESC_NUM;
dev_info->min_desc = HISI_DMA_MIN_DESC_NUM;
@@ -514,18 +488,6 @@ hisi_dma_dump_common(struct hisi_dma_dev *hw, FILE *f)
{ HISI_DMA_REG_LAYOUT_HIP08,
HISI_DMA_HIP08_DUMP_START_REG,
HISI_DMA_HIP08_DUMP_END_REG },
- { HISI_DMA_REG_LAYOUT_HIP09,
- HISI_DMA_HIP09_DUMP_REGION_A_START_REG,
- HISI_DMA_HIP09_DUMP_REGION_A_END_REG },
- { HISI_DMA_REG_LAYOUT_HIP09,
- HISI_DMA_HIP09_DUMP_REGION_B_START_REG,
- HISI_DMA_HIP09_DUMP_REGION_B_END_REG },
- { HISI_DMA_REG_LAYOUT_HIP09,
- HISI_DMA_HIP09_DUMP_REGION_C_START_REG,
- HISI_DMA_HIP09_DUMP_REGION_C_END_REG },
- { HISI_DMA_REG_LAYOUT_HIP09,
- HISI_DMA_HIP09_DUMP_REGION_D_START_REG,
- HISI_DMA_HIP09_DUMP_REGION_D_END_REG },
};
uint32_t i;
diff --git a/drivers/dma/hisilicon/hisi_dmadev.h b/drivers/dma/hisilicon/hisi_dmadev.h
index 5a17f9f69e..a57b5c759a 100644
--- a/drivers/dma/hisilicon/hisi_dmadev.h
+++ b/drivers/dma/hisilicon/hisi_dmadev.h
@@ -25,22 +25,14 @@
#define HISI_DMA_DEVICE_ID 0xA122
#define HISI_DMA_PCI_REVISION_ID_REG 0x08
#define HISI_DMA_REVISION_HIP08B 0x21
-#define HISI_DMA_REVISION_HIP09A 0x30
#define HISI_DMA_MAX_HW_QUEUES 4
#define HISI_DMA_MAX_DESC_NUM 8192
#define HISI_DMA_MIN_DESC_NUM 32
-/**
- * The HIP08B(HiSilicon IP08) and HIP09B(HiSilicon IP09) are DMA iEPs, they
- * have the same pci device id but different pci revision.
- * Unfortunately, they have different register layouts, so two layout
- * enumerations are defined.
- */
enum {
HISI_DMA_REG_LAYOUT_INVALID = 0,
- HISI_DMA_REG_LAYOUT_HIP08,
- HISI_DMA_REG_LAYOUT_HIP09
+ HISI_DMA_REG_LAYOUT_HIP08
};
/**
@@ -69,9 +61,6 @@ enum {
* length of queue-region. The global offset for a single queue register is
* calculated by:
* offset = queue-base + (queue-id * queue-region) + reg-offset-in-region.
- *
- * The first part of queue region is basically the same for HIP08 and HIP09
- * register layouts, therefore, HISI_QUEUE_* registers are defined for it.
*/
#define HISI_DMA_QUEUE_SQ_BASE_L_REG 0x0
#define HISI_DMA_QUEUE_SQ_BASE_H_REG 0x4
@@ -110,28 +99,6 @@ enum {
#define HISI_DMA_HIP08_DUMP_START_REG 0x2000
#define HISI_DMA_HIP08_DUMP_END_REG 0x2280
-/**
- * HiSilicon IP09 DMA register and field define:
- */
-#define HISI_DMA_HIP09_QUEUE_BASE 0x2000
-#define HISI_DMA_HIP09_QUEUE_CTRL0_ERR_ABORT_M GENMASK(31, 28)
-#define HISI_DMA_HIP09_QUEUE_CTRL1_VA_ENABLE_B 2
-#define HISI_DMA_HIP09_QUEUE_INT_MASK_M 0x1
-#define HISI_DMA_HIP09_QUEUE_ERR_INT_STATUS_REG 0x48
-#define HISI_DMA_HIP09_QUEUE_ERR_INT_MASK_REG 0x4C
-#define HISI_DMA_HIP09_QUEUE_ERR_INT_MASK_M GENMASK(18, 1)
-#define HISI_DMA_HIP09_QUEUE_CFG_REG(queue_id) (0x800 + \
- (queue_id) * 0x20)
-#define HISI_DMA_HIP09_QUEUE_CFG_LINK_DOWN_MASK_B 16
-#define HISI_DMA_HIP09_DUMP_REGION_A_START_REG 0x0
-#define HISI_DMA_HIP09_DUMP_REGION_A_END_REG 0x368
-#define HISI_DMA_HIP09_DUMP_REGION_B_START_REG 0x800
-#define HISI_DMA_HIP09_DUMP_REGION_B_END_REG 0xA08
-#define HISI_DMA_HIP09_DUMP_REGION_C_START_REG 0x1800
-#define HISI_DMA_HIP09_DUMP_REGION_C_END_REG 0x1A4C
-#define HISI_DMA_HIP09_DUMP_REGION_D_START_REG 0x1C00
-#define HISI_DMA_HIP09_DUMP_REGION_D_END_REG 0x1CC4
-
/**
* In fact, there are multiple states, but it need to pay attention to
* the following three states for the driver:
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:22.884110361 +0100
+++ 0028-dma-hisilicon-remove-support-for-HIP09-platform.patch 2024-07-24 12:29:20.799026695 +0100
@@ -1 +1 @@
-From 2a3f42942a5f4df62108679ef44a34d21b4a2553 Mon Sep 17 00:00:00 2001
+From 1b1337cc9316675d9cd4982d78d4abf5891c965f Mon Sep 17 00:00:00 2001
@@ -6 +6 @@
-The DMA for HIP09 is no longer available, so delete it.
+[ upstream commit 2a3f42942a5f4df62108679ef44a34d21b4a2553 ]
@@ -8 +8 @@
-Cc: stable@dpdk.org
+The DMA for HIP09 is no longer available, so delete it.
@@ -12,5 +12,4 @@
- doc/guides/dmadevs/hisilicon.rst | 1 -
- doc/guides/rel_notes/release_24_07.rst | 5 ++++
- drivers/dma/hisilicon/hisi_dmadev.c | 40 +-------------------------
- drivers/dma/hisilicon/hisi_dmadev.h | 35 +---------------------
- 4 files changed, 7 insertions(+), 74 deletions(-)
+ doc/guides/dmadevs/hisilicon.rst | 1 -
+ drivers/dma/hisilicon/hisi_dmadev.c | 40 +----------------------------
+ drivers/dma/hisilicon/hisi_dmadev.h | 35 +------------------------
+ 3 files changed, 2 insertions(+), 74 deletions(-)
@@ -30,16 +28,0 @@
-diff --git a/doc/guides/rel_notes/release_24_07.rst b/doc/guides/rel_notes/release_24_07.rst
-index 058609b0f3..eb2ed1a55f 100644
---- a/doc/guides/rel_notes/release_24_07.rst
-+++ b/doc/guides/rel_notes/release_24_07.rst
-@@ -204,6 +204,11 @@ Removed Items
- BPF is not supported and the librte-bpf test fails on 32-bit x86 kernels.
- So disable the library and the pmd.
-
-+* **Removed hisilicon DMA support for HIP09 platform.**
-+
-+ The DMA for HIP09 is no longer available,
-+ so the support is removed from hisilicon driver for HIP09 platform.
-+
-
- API Changes
- -----------
@@ -47 +30 @@
-index e96bc1d654..7cd6ebc1e0 100644
+index 0e11ca14cc..4db3b0554c 100644
@@ -94 +77 @@
-@@ -327,14 +304,11 @@ hisi_dma_info_get(const struct rte_dma_dev *dev,
+@@ -328,14 +305,11 @@ hisi_dma_info_get(const struct rte_dma_dev *dev,
@@ -110 +93 @@
-@@ -513,18 +487,6 @@ hisi_dma_dump_common(struct hisi_dma_dev *hw, FILE *f)
+@@ -514,18 +488,6 @@ hisi_dma_dump_common(struct hisi_dma_dev *hw, FILE *f)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'app/dumpcap: handle SIGTERM and SIGHUP' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (26 preceding siblings ...)
2024-07-24 11:33 ` patch 'dma/hisilicon: remove support for HIP09 platform' " luca.boccassi
@ 2024-07-24 11:33 ` luca.boccassi
2024-07-24 11:33 ` patch 'app/pdump: " luca.boccassi
` (10 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:33 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/7ecd214ddab65f29b6ea9bdcb6d9996836e47bd5
Thanks.
Luca Boccassi
---
From 7ecd214ddab65f29b6ea9bdcb6d9996836e47bd5 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 3 Jul 2024 08:45:43 -0700
Subject: [PATCH] app/dumpcap: handle SIGTERM and SIGHUP
[ upstream commit b04d11bdc672cf8afb7a544077303a941a6a2baa ]
If the dumpcap is killed it does not cleanup which leaves
the ring buffer and the memory pool behind.
Until resource are exhausted devices will continue to fill the ring.
Fix by having the application handle SIGTERM, SIGHUP, and SIGPIPE.
These are the same signals handled in same way by the wireshark
dumpcap application.
Fixes: cbb44143be74 ("app/dumpcap: add new packet capture application")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
app/dumpcap/main.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/app/dumpcap/main.c b/app/dumpcap/main.c
index 0039aa1975..81c9d7d2f1 100644
--- a/app/dumpcap/main.c
+++ b/app/dumpcap/main.c
@@ -805,6 +805,11 @@ int main(int argc, char **argv)
{
struct rte_ring *r;
struct rte_mempool *mp;
+ struct sigaction action = {
+ .sa_flags = SA_RESTART,
+ .sa_handler = signal_handler,
+ };
+ struct sigaction origaction;
dumpcap_out_t out;
char *p;
@@ -832,6 +837,14 @@ int main(int argc, char **argv)
if (TAILQ_EMPTY(&interfaces))
set_default_interface();
+ sigemptyset(&action.sa_mask);
+ sigaction(SIGTERM, &action, NULL);
+ sigaction(SIGINT, &action, NULL);
+ sigaction(SIGPIPE, &action, NULL);
+ sigaction(SIGHUP, NULL, &origaction);
+ if (origaction.sa_handler == SIG_DFL)
+ sigaction(SIGHUP, &action, NULL);
+
r = create_ring();
mp = create_mempool();
out = create_output();
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:22.934107800 +0100
+++ 0029-app-dumpcap-handle-SIGTERM-and-SIGHUP.patch 2024-07-24 12:29:20.799026695 +0100
@@ -1 +1 @@
-From b04d11bdc672cf8afb7a544077303a941a6a2baa Mon Sep 17 00:00:00 2001
+From 7ecd214ddab65f29b6ea9bdcb6d9996836e47bd5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b04d11bdc672cf8afb7a544077303a941a6a2baa ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -19,2 +20,2 @@
- app/dumpcap/main.c | 14 ++++++++++++--
- 1 file changed, 12 insertions(+), 2 deletions(-)
+ app/dumpcap/main.c | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
@@ -23 +24 @@
-index b25b95e2fc..ba91ca94d0 100644
+index 0039aa1975..81c9d7d2f1 100644
@@ -26 +27 @@
-@@ -936,6 +936,11 @@ int main(int argc, char **argv)
+@@ -805,6 +805,11 @@ int main(int argc, char **argv)
@@ -38,3 +39,3 @@
-@@ -961,8 +966,13 @@ int main(int argc, char **argv)
-
- compile_filters();
+@@ -832,6 +837,14 @@ int main(int argc, char **argv)
+ if (TAILQ_EMPTY(&interfaces))
+ set_default_interface();
@@ -42,2 +42,0 @@
-- signal(SIGINT, signal_handler);
-- signal(SIGPIPE, SIG_IGN);
@@ -51,3 +50,4 @@
-
- enable_primary_monitor();
-
++
+ r = create_ring();
+ mp = create_mempool();
+ out = create_output();
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'app/pdump: handle SIGTERM and SIGHUP' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (27 preceding siblings ...)
2024-07-24 11:33 ` patch 'app/dumpcap: handle SIGTERM and SIGHUP' " luca.boccassi
@ 2024-07-24 11:33 ` luca.boccassi
2024-07-24 11:33 ` patch 'malloc: fix multi-process wait condition handling' " luca.boccassi
` (9 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:33 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/8ea890172ead4d39327a6939114243270ae438c5
Thanks.
Luca Boccassi
---
From 8ea890172ead4d39327a6939114243270ae438c5 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 3 Jul 2024 08:45:44 -0700
Subject: [PATCH] app/pdump: handle SIGTERM and SIGHUP
[ upstream commit e1253df666fdc672bc378722db0da2ce3091a8dd ]
The pdump application will leak ring and memory pool if killed
by SIGTERM. Like dumpcap, the pdump process should cleanup
if process terminates due to being killed or hangup.
Fixes: caa7028276b8 ("app/pdump: add tool for packet capturing")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
app/pdump/main.c | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
diff --git a/app/pdump/main.c b/app/pdump/main.c
index 9ea8ed8943..6216d5454c 100644
--- a/app/pdump/main.c
+++ b/app/pdump/main.c
@@ -571,13 +571,9 @@ disable_primary_monitor(void)
}
static void
-signal_handler(int sig_num)
+signal_handler(int sig_num __rte_unused)
{
- if (sig_num == SIGINT) {
- printf("\n\nSignal %d received, preparing to exit...\n",
- sig_num);
- quit_signal = 1;
- }
+ quit_signal = 1;
}
static inline int
@@ -974,6 +970,11 @@ enable_primary_monitor(void)
int
main(int argc, char **argv)
{
+ struct sigaction action = {
+ .sa_flags = SA_RESTART,
+ .sa_handler = signal_handler,
+ };
+ struct sigaction origaction;
int diag;
int ret;
int i;
@@ -982,8 +983,14 @@ main(int argc, char **argv)
char mp_flag[] = "--proc-type=secondary";
char *argp[argc + 2];
- /* catch ctrl-c so we can print on exit */
- signal(SIGINT, signal_handler);
+ /* catch ctrl-c so we can cleanup on exit */
+ sigemptyset(&action.sa_mask);
+ sigaction(SIGTERM, &action, NULL);
+ sigaction(SIGINT, &action, NULL);
+ sigaction(SIGPIPE, &action, NULL);
+ sigaction(SIGHUP, NULL, &origaction);
+ if (origaction.sa_handler == SIG_DFL)
+ sigaction(SIGHUP, &action, NULL);
argp[0] = argv[0];
argp[1] = n_flag;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:22.974826851 +0100
+++ 0030-app-pdump-handle-SIGTERM-and-SIGHUP.patch 2024-07-24 12:29:20.803026775 +0100
@@ -1 +1 @@
-From e1253df666fdc672bc378722db0da2ce3091a8dd Mon Sep 17 00:00:00 2001
+From 8ea890172ead4d39327a6939114243270ae438c5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e1253df666fdc672bc378722db0da2ce3091a8dd ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -15,2 +16,2 @@
- app/pdump/main.c | 21 +++++++++++++++------
- 1 file changed, 15 insertions(+), 6 deletions(-)
+ app/pdump/main.c | 23 +++++++++++++++--------
+ 1 file changed, 15 insertions(+), 8 deletions(-)
@@ -19 +20 @@
-index 3bdbb8dc78..fa85859703 100644
+index 9ea8ed8943..6216d5454c 100644
@@ -22 +23 @@
-@@ -571,11 +571,9 @@ disable_primary_monitor(void)
+@@ -571,13 +571,9 @@ disable_primary_monitor(void)
@@ -29,0 +31,2 @@
+- printf("\n\nSignal %d received, preparing to exit...\n",
+- sig_num);
@@ -36 +39 @@
-@@ -975,6 +973,11 @@ enable_primary_monitor(void)
+@@ -974,6 +970,11 @@ enable_primary_monitor(void)
@@ -48 +51 @@
-@@ -983,8 +986,14 @@ main(int argc, char **argv)
+@@ -982,8 +983,14 @@ main(int argc, char **argv)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'malloc: fix multi-process wait condition handling' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (28 preceding siblings ...)
2024-07-24 11:33 ` patch 'app/pdump: " luca.boccassi
@ 2024-07-24 11:33 ` luca.boccassi
2024-07-24 11:33 ` patch 'bus/vdev: fix device reinitialization' " luca.boccassi
` (8 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:33 UTC (permalink / raw)
To: Anatoly Burakov; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/0a15aefcc66b8acf00c931f1d5c61a77caabe5ea
coverity's
Thanks.
Luca Boccassi
---
From 0a15aefcc66b8acf00c931f1d5c61a77caabe5ea Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Fri, 12 Jul 2024 12:41:35 +0100
Subject: [PATCH] malloc: fix multi-process wait condition handling
[ upstream commit 429219adab185909a8127e680d19f7628af62fb2 ]
From coverity's point of view, it is theoretically possible to have an
infinite wait on a wait condition because while we do check for timeout,
we do not check for whether the event we are waiting for has already
occurred by the time we get to the first cond_wait call (in this case,
it's state of memory request list entry's state being set to COMPLETE).
This can't really happen as the only time a wait condition is triggered
is when we are receiving a memory event (so the entry we are waiting on
cannot change before wait condition is triggered because it's protected
by a mutex), so either we receive an event and modify entry state, or we
exit wait on a timeout and do not care about request state. However, it's
better to keep coverity happy.
Coverity issue: 425709
Fixes: 07dcbfe0101f ("malloc: support multiprocess memory hotplug")
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
lib/eal/common/malloc_mp.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/eal/common/malloc_mp.c b/lib/eal/common/malloc_mp.c
index 7270c2ec90..c95c4635d1 100644
--- a/lib/eal/common/malloc_mp.c
+++ b/lib/eal/common/malloc_mp.c
@@ -755,7 +755,8 @@ request_to_primary(struct malloc_mp_req *user_req)
do {
ret = pthread_cond_timedwait(&entry->cond,
&mp_request_list.lock, &ts);
- } while (ret != 0 && ret != ETIMEDOUT);
+ } while ((ret != 0 && ret != ETIMEDOUT) &&
+ entry->state == REQ_STATE_ACTIVE);
if (entry->state != REQ_STATE_COMPLETE) {
RTE_LOG(ERR, EAL, "Request timed out\n");
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:23.013749866 +0100
+++ 0031-malloc-fix-multi-process-wait-condition-handling.patch 2024-07-24 12:29:20.803026775 +0100
@@ -1 +1 @@
-From 429219adab185909a8127e680d19f7628af62fb2 Mon Sep 17 00:00:00 2001
+From 0a15aefcc66b8acf00c931f1d5c61a77caabe5ea Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 429219adab185909a8127e680d19f7628af62fb2 ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index 2d39b0716f..9765277f5d 100644
+index 7270c2ec90..c95c4635d1 100644
@@ -32 +33 @@
-@@ -756,7 +756,8 @@ request_to_primary(struct malloc_mp_req *user_req)
+@@ -755,7 +755,8 @@ request_to_primary(struct malloc_mp_req *user_req)
@@ -41 +42 @@
- EAL_LOG(ERR, "Request timed out");
+ RTE_LOG(ERR, EAL, "Request timed out\n");
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'bus/vdev: fix device reinitialization' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (29 preceding siblings ...)
2024-07-24 11:33 ` patch 'malloc: fix multi-process wait condition handling' " luca.boccassi
@ 2024-07-24 11:33 ` luca.boccassi
2024-07-24 11:33 ` patch 'examples/l3fwd: fix crash in ACL mode for mixed traffic' " luca.boccassi
` (7 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:33 UTC (permalink / raw)
To: Mingjin Ye; +Cc: Anatoly Burakov, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/3682872558ec345a9762218eb8f117886bddaab4
Thanks.
Luca Boccassi
---
From 3682872558ec345a9762218eb8f117886bddaab4 Mon Sep 17 00:00:00 2001
From: Mingjin Ye <mingjinx.ye@intel.com>
Date: Tue, 16 Jul 2024 09:53:28 +0000
Subject: [PATCH] bus/vdev: fix device reinitialization
[ upstream commit 1bd1ab6fd010837773473d821f9284369b37264c ]
In secondary processes, insert_vdev() may be called multiple times on the
same device due to multi-process hot-plugging of the vdev bus and EAL
parameters to add the same vdev.
In this case, when rte_devargs_insert() is called, the devargs->name
reference will be invalidated because rte_devargs_insert() destroys the
just-allocated devargs and replaces the pointer from the devargs list.
As a result, the reference to devargs->name stored in dev->device.name
will be invalid.
This patch fixes the issue by setting the device name after calling
rte_devargs_insert().
Fixes: cdb068f031c6 ("bus/vdev: scan by multi-process channel")
Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
drivers/bus/vdev/vdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
index 38d05a9fe9..ec7abe7cda 100644
--- a/drivers/bus/vdev/vdev.c
+++ b/drivers/bus/vdev/vdev.c
@@ -288,7 +288,6 @@ insert_vdev(const char *name, const char *args,
dev->device.bus = &rte_vdev_bus;
dev->device.numa_node = SOCKET_ID_ANY;
- dev->device.name = devargs->name;
if (find_vdev(name)) {
/*
@@ -303,6 +302,7 @@ insert_vdev(const char *name, const char *args,
if (init)
rte_devargs_insert(&devargs);
dev->device.devargs = devargs;
+ dev->device.name = devargs->name;
TAILQ_INSERT_TAIL(&vdev_device_list, dev, next);
if (p_dev)
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:23.053065682 +0100
+++ 0032-bus-vdev-fix-device-reinitialization.patch 2024-07-24 12:29:20.803026775 +0100
@@ -1 +1 @@
-From 1bd1ab6fd010837773473d821f9284369b37264c Mon Sep 17 00:00:00 2001
+From 3682872558ec345a9762218eb8f117886bddaab4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1bd1ab6fd010837773473d821f9284369b37264c ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'examples/l3fwd: fix crash in ACL mode for mixed traffic' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (30 preceding siblings ...)
2024-07-24 11:33 ` patch 'bus/vdev: fix device reinitialization' " luca.boccassi
@ 2024-07-24 11:33 ` luca.boccassi
2024-07-24 11:33 ` patch 'examples/l3fwd: fix crash on multiple sockets' " luca.boccassi
` (6 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:33 UTC (permalink / raw)
To: Konstantin Ananyev; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/68b33da50ff2ca8bb79ae9ffaa4aebfff48420f2
Thanks.
Luca Boccassi
---
From 68b33da50ff2ca8bb79ae9ffaa4aebfff48420f2 Mon Sep 17 00:00:00 2001
From: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Date: Thu, 2 May 2024 16:28:15 +0100
Subject: [PATCH] examples/l3fwd: fix crash in ACL mode for mixed traffic
[ upstream commit 659ded8eb733315878857f82bc22f0b03be5ce71 ]
When running l3fwd in ACL mode, if we'll have mix of IPv4/IPv6 packets in
the same burst, it will most likely cause a crash.
The reason for that is that we split our burst of packets into 2 arrays -
one for ipv4, another for ipv6 for classify().
But then we try to send all packets as one burst again,
not taking into account that acl_search.res_ipv4[] will be set
only for ipv4 packets.
Same story for ipv6.
The fix is straightforward: use two already split arrays for TX.
Bugzilla ID: 1434
Fixes: 6de0ea50e9b9 ("examples/l3fwd: merge l3fwd-acl example")
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
---
examples/l3fwd/l3fwd_acl.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/examples/l3fwd/l3fwd_acl.c b/examples/l3fwd/l3fwd_acl.c
index 401692bcec..d9e4ae543f 100644
--- a/examples/l3fwd/l3fwd_acl.c
+++ b/examples/l3fwd/l3fwd_acl.c
@@ -1073,9 +1073,9 @@ acl_main_loop(__rte_unused void *dummy)
l3fwd_acl_send_packets(
qconf,
- pkts_burst,
+ acl_search.m_ipv4,
acl_search.res_ipv4,
- nb_rx);
+ acl_search.num_ipv4);
}
if (acl_search.num_ipv6) {
@@ -1088,9 +1088,9 @@ acl_main_loop(__rte_unused void *dummy)
l3fwd_acl_send_packets(
qconf,
- pkts_burst,
+ acl_search.m_ipv6,
acl_search.res_ipv6,
- nb_rx);
+ acl_search.num_ipv6);
}
}
}
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:23.093106556 +0100
+++ 0033-examples-l3fwd-fix-crash-in-ACL-mode-for-mixed-traff.patch 2024-07-24 12:29:20.807026855 +0100
@@ -1 +1 @@
-From 659ded8eb733315878857f82bc22f0b03be5ce71 Mon Sep 17 00:00:00 2001
+From 68b33da50ff2ca8bb79ae9ffaa4aebfff48420f2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 659ded8eb733315878857f82bc22f0b03be5ce71 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'examples/l3fwd: fix crash on multiple sockets' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (31 preceding siblings ...)
2024-07-24 11:33 ` patch 'examples/l3fwd: fix crash in ACL mode for mixed traffic' " luca.boccassi
@ 2024-07-24 11:33 ` luca.boccassi
2024-07-24 11:33 ` patch 'net/hns3: fix uninitialized variable in FEC query' " luca.boccassi
` (5 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:33 UTC (permalink / raw)
To: Kaiwen Deng; +Cc: Hongbo Li, Konstantin Ananyev, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b9b793c805de39df6ff9afd5963ffd37ba6f2a07
Thanks.
Luca Boccassi
---
From b9b793c805de39df6ff9afd5963ffd37ba6f2a07 Mon Sep 17 00:00:00 2001
From: Kaiwen Deng <kaiwenx.deng@intel.com>
Date: Wed, 3 Jul 2024 15:50:37 +0800
Subject: [PATCH] examples/l3fwd: fix crash on multiple sockets
[ upstream commit 0cf06d7d846523abd48307613d429830bfb45ac9 ]
Setting acl will clear the acl config of other sockets, which
will result in core dump.
This commit will no longer clear the acl config when setting acl.
Fixes: 6de0ea50e9b9 ("examples/l3fwd: merge l3fwd-acl example")
Signed-off-by: Kaiwen Deng <kaiwenx.deng@intel.com>
Tested-by: Hongbo Li <hongbox.li@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
---
examples/l3fwd/l3fwd_acl.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/examples/l3fwd/l3fwd_acl.c b/examples/l3fwd/l3fwd_acl.c
index d9e4ae543f..a1d87f4a40 100644
--- a/examples/l3fwd/l3fwd_acl.c
+++ b/examples/l3fwd/l3fwd_acl.c
@@ -962,8 +962,6 @@ setup_acl(const int socket_id)
acl_log("IPv6 ACL entries %u:\n", acl_num_ipv6);
dump_ipv6_rules((struct acl6_rule *)acl_base_ipv6, acl_num_ipv6, 1);
- memset(&acl_config, 0, sizeof(acl_config));
-
/* Check sockets a context should be created on */
if (socket_id >= NB_SOCKETS) {
acl_log("Socket %d is out "
@@ -973,6 +971,9 @@ setup_acl(const int socket_id)
return;
}
+ rte_acl_free(acl_config.acx_ipv4[socket_id]);
+ rte_acl_free(acl_config.acx_ipv6[socket_id]);
+
acl_config.acx_ipv4[socket_id] = app_acl_init(route_base_ipv4,
acl_base_ipv4, route_num_ipv4, acl_num_ipv4,
0, socket_id);
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:23.133220449 +0100
+++ 0034-examples-l3fwd-fix-crash-on-multiple-sockets.patch 2024-07-24 12:29:20.807026855 +0100
@@ -1 +1 @@
-From 0cf06d7d846523abd48307613d429830bfb45ac9 Mon Sep 17 00:00:00 2001
+From b9b793c805de39df6ff9afd5963ffd37ba6f2a07 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0cf06d7d846523abd48307613d429830bfb45ac9 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index ab8222c9db..2109ab0a8c 100644
+index d9e4ae543f..a1d87f4a40 100644
@@ -25 +26 @@
-@@ -950,8 +950,6 @@ setup_acl(const int socket_id)
+@@ -962,8 +962,6 @@ setup_acl(const int socket_id)
@@ -34 +35 @@
-@@ -961,6 +959,9 @@ setup_acl(const int socket_id)
+@@ -973,6 +971,9 @@ setup_acl(const int socket_id)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/hns3: fix uninitialized variable in FEC query' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (32 preceding siblings ...)
2024-07-24 11:33 ` patch 'examples/l3fwd: fix crash on multiple sockets' " luca.boccassi
@ 2024-07-24 11:33 ` luca.boccassi
2024-07-24 11:33 ` patch 'net/ice/base: fix temporary failures reading NVM' " luca.boccassi
` (4 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:33 UTC (permalink / raw)
To: Jie Hai; +Cc: Huisong Li, Chengwen Feng, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/4568f7b753c55954f947724496ab237dab9feaf9
Thanks.
Luca Boccassi
---
From 4568f7b753c55954f947724496ab237dab9feaf9 Mon Sep 17 00:00:00 2001
From: Jie Hai <haijie1@huawei.com>
Date: Tue, 23 Jul 2024 14:09:00 +0800
Subject: [PATCH] net/hns3: fix uninitialized variable in FEC query
[ upstream commit 7dfc8e69aa4286854a0ac893d3828eaffee20347 ]
This patch fixes uninitialized auto_state value when
querying FEC mode of device.
Bugzilla ID: 1498
Fixes: 9bf2ea8dbc65 ("net/hns3: support FEC")
Signed-off-by: Jie Hai <haijie1@huawei.com>
Acked-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
---
drivers/net/hns3/hns3_ethdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 2c32f48af6..0050d46ae7 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -6080,7 +6080,7 @@ hns3_fec_get_internal(struct hns3_hw *hw, uint32_t *fec_capa)
{
struct hns3_sfp_info_cmd *resp;
uint32_t tmp_fec_capa;
- uint8_t auto_state;
+ uint8_t auto_state = 0;
struct hns3_cmd_desc desc;
int ret;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:23.173870560 +0100
+++ 0035-net-hns3-fix-uninitialized-variable-in-FEC-query.patch 2024-07-24 12:29:20.815027016 +0100
@@ -1 +1 @@
-From 7dfc8e69aa4286854a0ac893d3828eaffee20347 Mon Sep 17 00:00:00 2001
+From 4568f7b753c55954f947724496ab237dab9feaf9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7dfc8e69aa4286854a0ac893d3828eaffee20347 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index ec1251cb7e..8b43d731ac 100644
+index 2c32f48af6..0050d46ae7 100644
@@ -24 +25 @@
-@@ -6046,7 +6046,7 @@ hns3_fec_get_internal(struct hns3_hw *hw, uint32_t *fec_capa)
+@@ -6080,7 +6080,7 @@ hns3_fec_get_internal(struct hns3_hw *hw, uint32_t *fec_capa)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'net/ice/base: fix temporary failures reading NVM' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (33 preceding siblings ...)
2024-07-24 11:33 ` patch 'net/hns3: fix uninitialized variable in FEC query' " luca.boccassi
@ 2024-07-24 11:33 ` luca.boccassi
2024-07-24 11:33 ` patch 'examples: fix queue ID restriction' " luca.boccassi
` (3 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:33 UTC (permalink / raw)
To: Zhichao Zeng; +Cc: Bruce Richardson, Song Jiale, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/15ac04a0680875a2798421672a3c327e86e84bb1
Thanks.
Luca Boccassi
---
From 15ac04a0680875a2798421672a3c327e86e84bb1 Mon Sep 17 00:00:00 2001
From: Zhichao Zeng <zhichaox.zeng@intel.com>
Date: Tue, 23 Jul 2024 14:19:15 +0800
Subject: [PATCH] net/ice/base: fix temporary failures reading NVM
[ upstream commit 04de5c7d40b24ef391bd5b51be23994a6cfdd867 ]
Reading NVM fails in some scenarios, so follow the approach taken by
kernel driver and add retries on read failures.
Fixes: 2516684aed7a ("net/ice/base: extract logic of flat NVM read to function")
Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Song Jiale <songx.jiale@intel.com>
---
drivers/net/ice/base/ice_nvm.c | 24 +++++++++++++++++++-----
1 file changed, 19 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ice/base/ice_nvm.c b/drivers/net/ice/base/ice_nvm.c
index bc1a74460c..6da52f4d58 100644
--- a/drivers/net/ice/base/ice_nvm.c
+++ b/drivers/net/ice/base/ice_nvm.c
@@ -72,6 +72,7 @@ ice_read_flat_nvm(struct ice_hw *hw, u32 offset, u32 *length, u8 *data,
enum ice_status status;
u32 inlen = *length;
u32 bytes_read = 0;
+ int retry_cnt = 0;
bool last_cmd;
ice_debug(hw, ICE_DBG_TRACE, "%s\n", __func__);
@@ -106,11 +107,24 @@ ice_read_flat_nvm(struct ice_hw *hw, u32 offset, u32 *length, u8 *data,
offset, (u16)read_size,
data + bytes_read, last_cmd,
read_shadow_ram, NULL);
- if (status)
- break;
-
- bytes_read += read_size;
- offset += read_size;
+ if (status) {
+ if (hw->adminq.sq_last_status != ICE_AQ_RC_EBUSY ||
+ retry_cnt > ICE_SQ_SEND_MAX_EXECUTE)
+ break;
+ ice_debug(hw, ICE_DBG_NVM,
+ "NVM read EBUSY error, retry %d\n",
+ retry_cnt + 1);
+ ice_release_nvm(hw);
+ msleep(ICE_SQ_SEND_DELAY_TIME_MS);
+ status = ice_acquire_nvm(hw, ICE_RES_READ);
+ if (status)
+ break;
+ retry_cnt++;
+ } else {
+ bytes_read += read_size;
+ offset += read_size;
+ retry_cnt = 0;
+ }
} while (!last_cmd);
*length = bytes_read;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:23.217366976 +0100
+++ 0036-net-ice-base-fix-temporary-failures-reading-NVM.patch 2024-07-24 12:29:20.815027016 +0100
@@ -1 +1 @@
-From 04de5c7d40b24ef391bd5b51be23994a6cfdd867 Mon Sep 17 00:00:00 2001
+From 15ac04a0680875a2798421672a3c327e86e84bb1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 04de5c7d40b24ef391bd5b51be23994a6cfdd867 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 528489929e..5e982de4b5 100644
+index bc1a74460c..6da52f4d58 100644
@@ -23,2 +24,2 @@
-@@ -71,6 +71,7 @@ ice_read_flat_nvm(struct ice_hw *hw, u32 offset, u32 *length, u8 *data,
- {
+@@ -72,6 +72,7 @@ ice_read_flat_nvm(struct ice_hw *hw, u32 offset, u32 *length, u8 *data,
+ enum ice_status status;
@@ -29 +29,0 @@
- int status;
@@ -30,0 +31 @@
+ ice_debug(hw, ICE_DBG_TRACE, "%s\n", __func__);
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'examples: fix queue ID restriction' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (34 preceding siblings ...)
2024-07-24 11:33 ` patch 'net/ice/base: fix temporary failures reading NVM' " luca.boccassi
@ 2024-07-24 11:33 ` luca.boccassi
2024-07-24 11:33 ` patch 'examples: fix lcore " luca.boccassi
` (2 subsequent siblings)
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:33 UTC (permalink / raw)
To: Sivaprasad Tummala
Cc: Konstantin Ananyev, Morten Brørup, Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/3b8becb93e229a66cbf859c3137a6a7803a20edc
Thanks.
Luca Boccassi
---
From 3b8becb93e229a66cbf859c3137a6a7803a20edc Mon Sep 17 00:00:00 2001
From: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
Date: Tue, 26 Mar 2024 13:55:40 +0100
Subject: [PATCH] examples: fix queue ID restriction
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit b23c5bd71aa5b428a404aa036b97fa7bb1a3c98a ]
Currently application supports Rx queue IDs up to 255
and max queues of 256 irrespective of device support.
This limits the number of active lcores to 256.
The patch fixes these constraints by increasing
the Rx queue IDs to support up to 65535.
Fixes: af75078fece3 ("first public release")
Fixes: f88e7c175a68 ("examples/l3fwd-power: add high/regular perf cores options")
Fixes: 08bd1a174461 ("examples/l3fwd-graph: add graph-based l3fwd skeleton")
Signed-off-by: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
examples/ipsec-secgw/ipsec-secgw.c | 19 ++++++-----
examples/ipsec-secgw/ipsec.h | 2 +-
examples/ipsec-secgw/ipsec_worker.c | 10 +++---
examples/l3fwd-graph/main.c | 19 +++++------
examples/l3fwd-power/main.c | 49 ++++++++++++++---------------
examples/l3fwd-power/main.h | 2 +-
examples/l3fwd-power/perf_core.c | 8 +++--
examples/l3fwd/l3fwd.h | 2 +-
examples/l3fwd/l3fwd_acl.c | 4 +--
examples/l3fwd/l3fwd_em.c | 4 +--
examples/l3fwd/l3fwd_event.h | 2 +-
examples/l3fwd/l3fwd_fib.c | 4 +--
examples/l3fwd/l3fwd_lpm.c | 5 ++-
examples/l3fwd/main.c | 24 +++++++-------
14 files changed, 76 insertions(+), 78 deletions(-)
diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index e4c3482411..8b0dfe76e7 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -220,7 +220,7 @@ static const char *cfgfile;
struct lcore_params {
uint16_t port_id;
- uint8_t queue_id;
+ uint16_t queue_id;
uint8_t lcore_id;
} __rte_cache_aligned;
@@ -695,8 +695,7 @@ ipsec_poll_mode_worker(void)
struct rte_mbuf *pkts[MAX_PKT_BURST];
uint32_t lcore_id;
uint64_t prev_tsc, diff_tsc, cur_tsc;
- uint16_t i, nb_rx, portid;
- uint8_t queueid;
+ uint16_t i, nb_rx, portid, queueid;
struct lcore_conf *qconf;
int32_t rc, socket_id;
const uint64_t drain_tsc = (rte_get_tsc_hz() + US_PER_S - 1)
@@ -743,7 +742,7 @@ ipsec_poll_mode_worker(void)
portid = rxql[i].port_id;
queueid = rxql[i].queue_id;
RTE_LOG(INFO, IPSEC,
- " -- lcoreid=%u portid=%u rxqueueid=%hhu\n",
+ " -- lcoreid=%u portid=%u rxqueueid=%" PRIu16 "\n",
lcore_id, portid, queueid);
}
@@ -788,8 +787,7 @@ int
check_flow_params(uint16_t fdir_portid, uint8_t fdir_qid)
{
uint16_t i;
- uint16_t portid;
- uint8_t queueid;
+ uint16_t portid, queueid;
for (i = 0; i < nb_lcore_params; ++i) {
portid = lcore_params_array[i].port_id;
@@ -851,7 +849,7 @@ check_poll_mode_params(struct eh_conf *eh_conf)
return 0;
}
-static uint8_t
+static uint16_t
get_port_nb_rx_queues(const uint16_t port)
{
int32_t queue = -1;
@@ -862,7 +860,7 @@ get_port_nb_rx_queues(const uint16_t port)
lcore_params[i].queue_id > queue)
queue = lcore_params[i].queue_id;
}
- return (uint8_t)(++queue);
+ return (uint16_t)(++queue);
}
static int32_t
@@ -1050,6 +1048,7 @@ parse_config(const char *q_arg)
char *str_fld[_NUM_FLD];
int32_t i;
uint32_t size;
+ uint32_t max_fld[_NUM_FLD] = {255, RTE_MAX_QUEUES_PER_PORT, 255};
nb_lcore_params = 0;
@@ -1070,7 +1069,7 @@ parse_config(const char *q_arg)
for (i = 0; i < _NUM_FLD; i++) {
errno = 0;
int_fld[i] = strtoul(str_fld[i], &end, 0);
- if (errno != 0 || end == str_fld[i] || int_fld[i] > 255)
+ if (errno != 0 || end == str_fld[i] || int_fld[i] > max_fld[i])
return -1;
}
if (nb_lcore_params >= MAX_LCORE_PARAMS) {
@@ -1081,7 +1080,7 @@ parse_config(const char *q_arg)
lcore_params_array[nb_lcore_params].port_id =
(uint8_t)int_fld[FLD_PORT];
lcore_params_array[nb_lcore_params].queue_id =
- (uint8_t)int_fld[FLD_QUEUE];
+ (uint16_t)int_fld[FLD_QUEUE];
lcore_params_array[nb_lcore_params].lcore_id =
(uint8_t)int_fld[FLD_LCORE];
++nb_lcore_params;
diff --git a/examples/ipsec-secgw/ipsec.h b/examples/ipsec-secgw/ipsec.h
index 2890e6e267..c764c9d7b8 100644
--- a/examples/ipsec-secgw/ipsec.h
+++ b/examples/ipsec-secgw/ipsec.h
@@ -285,7 +285,7 @@ struct cnt_blk {
struct lcore_rx_queue {
uint16_t port_id;
- uint8_t queue_id;
+ uint16_t queue_id;
struct rte_security_ctx *sec_ctx;
} __rte_cache_aligned;
diff --git a/examples/ipsec-secgw/ipsec_worker.c b/examples/ipsec-secgw/ipsec_worker.c
index 2f02946f86..7e4db87caf 100644
--- a/examples/ipsec-secgw/ipsec_worker.c
+++ b/examples/ipsec-secgw/ipsec_worker.c
@@ -1598,8 +1598,7 @@ ipsec_poll_mode_wrkr_inl_pr(void)
int32_t socket_id;
uint32_t lcore_id;
int32_t i, nb_rx;
- uint16_t portid;
- uint8_t queueid;
+ uint16_t portid, queueid;
prev_tsc = 0;
lcore_id = rte_lcore_id();
@@ -1633,7 +1632,7 @@ ipsec_poll_mode_wrkr_inl_pr(void)
portid = rxql[i].port_id;
queueid = rxql[i].queue_id;
RTE_LOG(INFO, IPSEC,
- " -- lcoreid=%u portid=%u rxqueueid=%hhu\n",
+ " -- lcoreid=%u portid=%u rxqueueid=%" PRIu16 "\n",
lcore_id, portid, queueid);
}
@@ -1729,8 +1728,7 @@ ipsec_poll_mode_wrkr_inl_pr_ss(void)
uint32_t i, nb_rx, j;
int32_t socket_id;
uint32_t lcore_id;
- uint16_t portid;
- uint8_t queueid;
+ uint16_t portid, queueid;
prev_tsc = 0;
lcore_id = rte_lcore_id();
@@ -1764,7 +1762,7 @@ ipsec_poll_mode_wrkr_inl_pr_ss(void)
portid = rxql[i].port_id;
queueid = rxql[i].queue_id;
RTE_LOG(INFO, IPSEC,
- " -- lcoreid=%u portid=%u rxqueueid=%hhu\n",
+ " -- lcoreid=%u portid=%u rxqueueid=%" PRIu16 "\n",
lcore_id, portid, queueid);
}
diff --git a/examples/l3fwd-graph/main.c b/examples/l3fwd-graph/main.c
index 6dcb6ee92b..f9ca0ff23b 100644
--- a/examples/l3fwd-graph/main.c
+++ b/examples/l3fwd-graph/main.c
@@ -78,7 +78,7 @@ static uint32_t enabled_port_mask;
struct lcore_rx_queue {
uint16_t port_id;
- uint8_t queue_id;
+ uint16_t queue_id;
char node_name[RTE_NODE_NAMESIZE];
};
@@ -96,7 +96,7 @@ static struct lcore_conf lcore_conf[RTE_MAX_LCORE];
struct lcore_params {
uint16_t port_id;
- uint8_t queue_id;
+ uint16_t queue_id;
uint8_t lcore_id;
} __rte_cache_aligned;
@@ -150,14 +150,14 @@ static struct ipv4_l3fwd_lpm_route ipv4_l3fwd_lpm_route_array[] = {
static int
check_lcore_params(void)
{
- uint8_t queue, lcore;
+ uint16_t queue, i;
int socketid;
- uint16_t i;
+ uint8_t lcore;
for (i = 0; i < nb_lcore_params; ++i) {
queue = lcore_params[i].queue_id;
if (queue >= MAX_RX_QUEUE_PER_PORT) {
- printf("Invalid queue number: %hhu\n", queue);
+ printf("Invalid queue number: %" PRIu16 "\n", queue);
return -1;
}
lcore = lcore_params[i].lcore_id;
@@ -202,7 +202,7 @@ check_port_config(void)
return 0;
}
-static uint8_t
+static uint16_t
get_port_n_rx_queues(const uint16_t port)
{
int queue = -1;
@@ -220,7 +220,7 @@ get_port_n_rx_queues(const uint16_t port)
}
}
- return (uint8_t)(++queue);
+ return (uint16_t)(++queue);
}
static int
@@ -356,7 +356,7 @@ parse_config(const char *q_arg)
lcore_params_array[nb_lcore_params].port_id =
(uint8_t)int_fld[FLD_PORT];
lcore_params_array[nb_lcore_params].queue_id =
- (uint8_t)int_fld[FLD_QUEUE];
+ (uint16_t)int_fld[FLD_QUEUE];
lcore_params_array[nb_lcore_params].lcore_id =
(uint8_t)int_fld[FLD_LCORE];
++nb_lcore_params;
@@ -746,7 +746,8 @@ main(int argc, char **argv)
"ethdev_tx-*",
"pkt_drop",
};
- uint8_t nb_rx_queue, queue, socketid;
+ uint8_t socketid;
+ uint16_t nb_rx_queue, queue;
struct rte_graph_param graph_conf;
struct rte_eth_dev_info dev_info;
uint32_t nb_ports, nb_conf = 0;
diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index fd3ade330f..9f60b784df 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -228,7 +228,7 @@ enum freq_scale_hint_t
struct lcore_rx_queue {
uint16_t port_id;
- uint8_t queue_id;
+ uint16_t queue_id;
enum freq_scale_hint_t freq_up_hint;
uint32_t zero_rx_packet_count;
uint32_t idle_hint;
@@ -860,7 +860,7 @@ sleep_until_rx_interrupt(int num, int lcore)
struct rte_epoll_event event[num];
int n, i;
uint16_t port_id;
- uint8_t queue_id;
+ uint16_t queue_id;
void *data;
if (status[lcore].wakeup) {
@@ -872,9 +872,9 @@ sleep_until_rx_interrupt(int num, int lcore)
n = rte_epoll_wait(RTE_EPOLL_PER_THREAD, event, num, 10);
for (i = 0; i < n; i++) {
data = event[i].epdata.data;
- port_id = ((uintptr_t)data) >> CHAR_BIT;
+ port_id = ((uintptr_t)data) >> (sizeof(uint16_t) * CHAR_BIT);
queue_id = ((uintptr_t)data) &
- RTE_LEN2MASK(CHAR_BIT, uint8_t);
+ RTE_LEN2MASK((sizeof(uint16_t) * CHAR_BIT), uint16_t);
RTE_LOG(INFO, L3FWD_POWER,
"lcore %u is waked up from rx interrupt on"
" port %d queue %d\n",
@@ -889,7 +889,7 @@ static void turn_on_off_intr(struct lcore_conf *qconf, bool on)
{
int i;
struct lcore_rx_queue *rx_queue;
- uint8_t queue_id;
+ uint16_t queue_id;
uint16_t port_id;
for (i = 0; i < qconf->n_rx_queue; ++i) {
@@ -909,7 +909,7 @@ static void turn_on_off_intr(struct lcore_conf *qconf, bool on)
static int event_register(struct lcore_conf *qconf)
{
struct lcore_rx_queue *rx_queue;
- uint8_t queueid;
+ uint16_t queueid;
uint16_t portid;
uint32_t data;
int ret;
@@ -919,7 +919,7 @@ static int event_register(struct lcore_conf *qconf)
rx_queue = &(qconf->rx_queue_list[i]);
portid = rx_queue->port_id;
queueid = rx_queue->queue_id;
- data = portid << CHAR_BIT | queueid;
+ data = portid << (sizeof(uint16_t) * CHAR_BIT) | queueid;
ret = rte_eth_dev_rx_intr_ctl_q(portid, queueid,
RTE_EPOLL_PER_THREAD,
@@ -939,8 +939,7 @@ static int main_intr_loop(__rte_unused void *dummy)
unsigned int lcore_id;
uint64_t prev_tsc, diff_tsc, cur_tsc;
int i, j, nb_rx;
- uint8_t queueid;
- uint16_t portid;
+ uint16_t portid, queueid;
struct lcore_conf *qconf;
struct lcore_rx_queue *rx_queue;
uint32_t lcore_rx_idle_count = 0;
@@ -968,7 +967,7 @@ static int main_intr_loop(__rte_unused void *dummy)
portid = qconf->rx_queue_list[i].port_id;
queueid = qconf->rx_queue_list[i].queue_id;
RTE_LOG(INFO, L3FWD_POWER,
- " -- lcoreid=%u portid=%u rxqueueid=%hhu\n",
+ " -- lcoreid=%u portid=%u rxqueueid=%" PRIu16 "\n",
lcore_id, portid, queueid);
}
@@ -1105,8 +1104,7 @@ main_telemetry_loop(__rte_unused void *dummy)
unsigned int lcore_id;
uint64_t prev_tsc, diff_tsc, cur_tsc, prev_tel_tsc;
int i, j, nb_rx;
- uint8_t queueid;
- uint16_t portid;
+ uint16_t portid, queueid;
struct lcore_conf *qconf;
struct lcore_rx_queue *rx_queue;
uint64_t ep_nep[2] = {0}, fp_nfp[2] = {0};
@@ -1136,7 +1134,7 @@ main_telemetry_loop(__rte_unused void *dummy)
portid = qconf->rx_queue_list[i].port_id;
queueid = qconf->rx_queue_list[i].queue_id;
RTE_LOG(INFO, L3FWD_POWER, " -- lcoreid=%u portid=%u "
- "rxqueueid=%hhu\n", lcore_id, portid, queueid);
+ "rxqueueid=%" PRIu16 "\n", lcore_id, portid, queueid);
}
while (!is_done()) {
@@ -1330,8 +1328,7 @@ main_legacy_loop(__rte_unused void *dummy)
uint64_t prev_tsc, diff_tsc, cur_tsc, tim_res_tsc, hz;
uint64_t prev_tsc_power = 0, cur_tsc_power, diff_tsc_power;
int i, j, nb_rx;
- uint8_t queueid;
- uint16_t portid;
+ uint16_t portid, queueid;
struct lcore_conf *qconf;
struct lcore_rx_queue *rx_queue;
enum freq_scale_hint_t lcore_scaleup_hint;
@@ -1359,7 +1356,7 @@ main_legacy_loop(__rte_unused void *dummy)
portid = qconf->rx_queue_list[i].port_id;
queueid = qconf->rx_queue_list[i].queue_id;
RTE_LOG(INFO, L3FWD_POWER, " -- lcoreid=%u portid=%u "
- "rxqueueid=%hhu\n", lcore_id, portid, queueid);
+ "rxqueueid=%" PRIu16 "\n", lcore_id, portid, queueid);
}
/* add into event wait list */
@@ -1524,14 +1521,14 @@ start_rx:
static int
check_lcore_params(void)
{
- uint8_t queue, lcore;
- uint16_t i;
+ uint16_t queue, i;
+ uint8_t lcore;
int socketid;
for (i = 0; i < nb_lcore_params; ++i) {
queue = lcore_params[i].queue_id;
if (queue >= MAX_RX_QUEUE_PER_PORT) {
- printf("invalid queue number: %hhu\n", queue);
+ printf("invalid queue number: %" PRIu16 "\n", queue);
return -1;
}
lcore = lcore_params[i].lcore_id;
@@ -1576,7 +1573,7 @@ check_port_config(void)
return 0;
}
-static uint8_t
+static uint16_t
get_port_n_rx_queues(const uint16_t port)
{
int queue = -1;
@@ -1587,7 +1584,7 @@ get_port_n_rx_queues(const uint16_t port)
lcore_params[i].queue_id > queue)
queue = lcore_params[i].queue_id;
}
- return (uint8_t)(++queue);
+ return (uint16_t)(++queue);
}
static int
@@ -1782,6 +1779,7 @@ parse_config(const char *q_arg)
char *str_fld[_NUM_FLD];
int i;
unsigned size;
+ unsigned int max_fld[_NUM_FLD] = {255, RTE_MAX_QUEUES_PER_PORT, 255};
nb_lcore_params = 0;
@@ -1801,8 +1799,7 @@ parse_config(const char *q_arg)
for (i = 0; i < _NUM_FLD; i++){
errno = 0;
int_fld[i] = strtoul(str_fld[i], &end, 0);
- if (errno != 0 || end == str_fld[i] || int_fld[i] >
- 255)
+ if (errno != 0 || end == str_fld[i] || int_fld[i] > max_fld[i])
return -1;
}
if (nb_lcore_params >= MAX_LCORE_PARAMS) {
@@ -1813,7 +1810,7 @@ parse_config(const char *q_arg)
lcore_params_array[nb_lcore_params].port_id =
(uint8_t)int_fld[FLD_PORT];
lcore_params_array[nb_lcore_params].queue_id =
- (uint8_t)int_fld[FLD_QUEUE];
+ (uint16_t)int_fld[FLD_QUEUE];
lcore_params_array[nb_lcore_params].lcore_id =
(uint8_t)int_fld[FLD_LCORE];
++nb_lcore_params;
@@ -2719,8 +2716,8 @@ main(int argc, char **argv)
uint64_t hz;
uint32_t n_tx_queue, nb_lcores;
uint32_t dev_rxq_num, dev_txq_num;
- uint8_t nb_rx_queue, queue, socketid;
- uint16_t portid;
+ uint8_t socketid;
+ uint16_t portid, nb_rx_queue, queue;
const char *ptr_strings[NUM_TELSTATS];
/* init EAL */
diff --git a/examples/l3fwd-power/main.h b/examples/l3fwd-power/main.h
index 258de98f5b..40b5194726 100644
--- a/examples/l3fwd-power/main.h
+++ b/examples/l3fwd-power/main.h
@@ -9,7 +9,7 @@
#define MAX_LCORE_PARAMS 1024
struct lcore_params {
uint16_t port_id;
- uint8_t queue_id;
+ uint16_t queue_id;
uint8_t lcore_id;
} __rte_cache_aligned;
diff --git a/examples/l3fwd-power/perf_core.c b/examples/l3fwd-power/perf_core.c
index 41ef6d0c9a..f34442b9d0 100644
--- a/examples/l3fwd-power/perf_core.c
+++ b/examples/l3fwd-power/perf_core.c
@@ -22,7 +22,7 @@ static uint16_t nb_hp_lcores;
struct perf_lcore_params {
uint16_t port_id;
- uint8_t queue_id;
+ uint16_t queue_id;
uint8_t high_perf;
uint8_t lcore_idx;
} __rte_cache_aligned;
@@ -132,6 +132,7 @@ parse_perf_config(const char *q_arg)
char *str_fld[_NUM_FLD];
int i;
unsigned int size;
+ unsigned int max_fld[_NUM_FLD] = {255, RTE_MAX_QUEUES_PER_PORT, 255, 255};
nb_prf_lc_prms = 0;
@@ -152,7 +153,8 @@ parse_perf_config(const char *q_arg)
for (i = 0; i < _NUM_FLD; i++) {
errno = 0;
int_fld[i] = strtoul(str_fld[i], &end, 0);
- if (errno != 0 || end == str_fld[i] || int_fld[i] > 255)
+ if (errno != 0 || end == str_fld[i] || int_fld[i] > max_fld[i])
+
return -1;
}
if (nb_prf_lc_prms >= MAX_LCORE_PARAMS) {
@@ -163,7 +165,7 @@ parse_perf_config(const char *q_arg)
prf_lc_prms[nb_prf_lc_prms].port_id =
(uint8_t)int_fld[FLD_PORT];
prf_lc_prms[nb_prf_lc_prms].queue_id =
- (uint8_t)int_fld[FLD_QUEUE];
+ (uint16_t)int_fld[FLD_QUEUE];
prf_lc_prms[nb_prf_lc_prms].high_perf =
!!(uint8_t)int_fld[FLD_LCORE_HP];
prf_lc_prms[nb_prf_lc_prms].lcore_idx =
diff --git a/examples/l3fwd/l3fwd.h b/examples/l3fwd/l3fwd.h
index b55855c932..e774623b57 100644
--- a/examples/l3fwd/l3fwd.h
+++ b/examples/l3fwd/l3fwd.h
@@ -74,7 +74,7 @@ struct mbuf_table {
struct lcore_rx_queue {
uint16_t port_id;
- uint8_t queue_id;
+ uint16_t queue_id;
} __rte_cache_aligned;
struct lcore_conf {
diff --git a/examples/l3fwd/l3fwd_acl.c b/examples/l3fwd/l3fwd_acl.c
index a1d87f4a40..31798ccb10 100644
--- a/examples/l3fwd/l3fwd_acl.c
+++ b/examples/l3fwd/l3fwd_acl.c
@@ -998,7 +998,7 @@ acl_main_loop(__rte_unused void *dummy)
uint64_t prev_tsc, diff_tsc, cur_tsc;
int i, nb_rx;
uint16_t portid;
- uint8_t queueid;
+ uint16_t queueid;
struct lcore_conf *qconf;
int socketid;
const uint64_t drain_tsc = (rte_get_tsc_hz() + US_PER_S - 1)
@@ -1021,7 +1021,7 @@ acl_main_loop(__rte_unused void *dummy)
portid = qconf->rx_queue_list[i].port_id;
queueid = qconf->rx_queue_list[i].queue_id;
RTE_LOG(INFO, L3FWD,
- " -- lcoreid=%u portid=%u rxqueueid=%hhu\n",
+ " -- lcoreid=%u portid=%u rxqueueid=%" PRIu16 "\n",
lcore_id, portid, queueid);
}
diff --git a/examples/l3fwd/l3fwd_em.c b/examples/l3fwd/l3fwd_em.c
index 35de31157e..e298fef523 100644
--- a/examples/l3fwd/l3fwd_em.c
+++ b/examples/l3fwd/l3fwd_em.c
@@ -584,7 +584,7 @@ em_main_loop(__rte_unused void *dummy)
unsigned lcore_id;
uint64_t prev_tsc, diff_tsc, cur_tsc;
int i, nb_rx;
- uint8_t queueid;
+ uint16_t queueid;
uint16_t portid;
struct lcore_conf *qconf;
const uint64_t drain_tsc = (rte_get_tsc_hz() + US_PER_S - 1) /
@@ -607,7 +607,7 @@ em_main_loop(__rte_unused void *dummy)
portid = qconf->rx_queue_list[i].port_id;
queueid = qconf->rx_queue_list[i].queue_id;
RTE_LOG(INFO, L3FWD,
- " -- lcoreid=%u portid=%u rxqueueid=%hhu\n",
+ " -- lcoreid=%u portid=%u rxqueueid=%" PRIu16 "\n",
lcore_id, portid, queueid);
}
diff --git a/examples/l3fwd/l3fwd_event.h b/examples/l3fwd/l3fwd_event.h
index e21817c36b..a7af23b8a0 100644
--- a/examples/l3fwd/l3fwd_event.h
+++ b/examples/l3fwd/l3fwd_event.h
@@ -76,8 +76,8 @@ struct l3fwd_event_resources {
uint8_t deq_depth;
uint8_t has_burst;
uint8_t enabled;
- uint8_t eth_rx_queues;
uint8_t vector_enabled;
+ uint16_t eth_rx_queues;
uint16_t vector_size;
uint64_t vector_tmo_ns;
};
diff --git a/examples/l3fwd/l3fwd_fib.c b/examples/l3fwd/l3fwd_fib.c
index 18398492ae..10fa121942 100644
--- a/examples/l3fwd/l3fwd_fib.c
+++ b/examples/l3fwd/l3fwd_fib.c
@@ -186,7 +186,7 @@ fib_main_loop(__rte_unused void *dummy)
uint64_t prev_tsc, diff_tsc, cur_tsc;
int i, nb_rx;
uint16_t portid;
- uint8_t queueid;
+ uint16_t queueid;
struct lcore_conf *qconf;
const uint64_t drain_tsc = (rte_get_tsc_hz() + US_PER_S - 1) /
US_PER_S * BURST_TX_DRAIN_US;
@@ -208,7 +208,7 @@ fib_main_loop(__rte_unused void *dummy)
portid = qconf->rx_queue_list[i].port_id;
queueid = qconf->rx_queue_list[i].queue_id;
RTE_LOG(INFO, L3FWD,
- " -- lcoreid=%u portid=%u rxqueueid=%hhu\n",
+ " -- lcoreid=%u portid=%u rxqueueid=%" PRIu16 "\n",
lcore_id, portid, queueid);
}
diff --git a/examples/l3fwd/l3fwd_lpm.c b/examples/l3fwd/l3fwd_lpm.c
index 5172979c72..54b059fe2a 100644
--- a/examples/l3fwd/l3fwd_lpm.c
+++ b/examples/l3fwd/l3fwd_lpm.c
@@ -148,8 +148,7 @@ lpm_main_loop(__rte_unused void *dummy)
unsigned lcore_id;
uint64_t prev_tsc, diff_tsc, cur_tsc;
int i, nb_rx;
- uint16_t portid;
- uint8_t queueid;
+ uint16_t portid, queueid;
struct lcore_conf *qconf;
const uint64_t drain_tsc = (rte_get_tsc_hz() + US_PER_S - 1) /
US_PER_S * BURST_TX_DRAIN_US;
@@ -171,7 +170,7 @@ lpm_main_loop(__rte_unused void *dummy)
portid = qconf->rx_queue_list[i].port_id;
queueid = qconf->rx_queue_list[i].queue_id;
RTE_LOG(INFO, L3FWD,
- " -- lcoreid=%u portid=%u rxqueueid=%hhu\n",
+ " -- lcoreid=%u portid=%u rxqueueid=%" PRIu16 "\n",
lcore_id, portid, queueid);
}
diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c
index 329427ae4f..b6b105d42b 100644
--- a/examples/l3fwd/main.c
+++ b/examples/l3fwd/main.c
@@ -96,7 +96,7 @@ struct parm_cfg parm_config;
struct lcore_params {
uint16_t port_id;
- uint8_t queue_id;
+ uint16_t queue_id;
uint8_t lcore_id;
} __rte_cache_aligned;
@@ -288,14 +288,14 @@ setup_l3fwd_lookup_tables(void)
static int
check_lcore_params(void)
{
- uint8_t queue, lcore;
- uint16_t i;
+ uint16_t queue, i;
+ uint8_t lcore;
int socketid;
for (i = 0; i < nb_lcore_params; ++i) {
queue = lcore_params[i].queue_id;
if (queue >= MAX_RX_QUEUE_PER_PORT) {
- printf("invalid queue number: %hhu\n", queue);
+ printf("invalid queue number: %" PRIu16 "\n", queue);
return -1;
}
lcore = lcore_params[i].lcore_id;
@@ -332,7 +332,7 @@ check_port_config(void)
return 0;
}
-static uint8_t
+static uint16_t
get_port_n_rx_queues(const uint16_t port)
{
int queue = -1;
@@ -348,7 +348,7 @@ get_port_n_rx_queues(const uint16_t port)
lcore_params[i].port_id);
}
}
- return (uint8_t)(++queue);
+ return (uint16_t)(++queue);
}
static int
@@ -492,6 +492,7 @@ parse_config(const char *q_arg)
char *str_fld[_NUM_FLD];
int i;
unsigned size;
+ uint16_t max_fld[_NUM_FLD] = {255, RTE_MAX_QUEUES_PER_PORT, 255};
nb_lcore_params = 0;
@@ -510,7 +511,7 @@ parse_config(const char *q_arg)
for (i = 0; i < _NUM_FLD; i++){
errno = 0;
int_fld[i] = strtoul(str_fld[i], &end, 0);
- if (errno != 0 || end == str_fld[i] || int_fld[i] > 255)
+ if (errno != 0 || end == str_fld[i] || int_fld[i] > max_fld[i])
return -1;
}
if (nb_lcore_params >= MAX_LCORE_PARAMS) {
@@ -521,7 +522,7 @@ parse_config(const char *q_arg)
lcore_params_array[nb_lcore_params].port_id =
(uint8_t)int_fld[FLD_PORT];
lcore_params_array[nb_lcore_params].queue_id =
- (uint8_t)int_fld[FLD_QUEUE];
+ (uint16_t)int_fld[FLD_QUEUE];
lcore_params_array[nb_lcore_params].lcore_id =
(uint8_t)int_fld[FLD_LCORE];
++nb_lcore_params;
@@ -619,7 +620,7 @@ parse_event_eth_rx_queues(const char *eth_rx_queues)
{
struct l3fwd_event_resources *evt_rsrc = l3fwd_get_eventdev_rsrc();
char *end = NULL;
- uint8_t num_eth_rx_queues;
+ uint16_t num_eth_rx_queues;
/* parse decimal string */
num_eth_rx_queues = strtoul(eth_rx_queues, &end, 10);
@@ -1169,7 +1170,8 @@ config_port_max_pkt_len(struct rte_eth_conf *conf,
static void
l3fwd_poll_resource_setup(void)
{
- uint8_t nb_rx_queue, queue, socketid;
+ uint8_t socketid;
+ uint16_t nb_rx_queue, queue;
struct rte_eth_dev_info dev_info;
uint32_t n_tx_queue, nb_lcores;
struct rte_eth_txconf *txconf;
@@ -1466,7 +1468,7 @@ main(int argc, char **argv)
struct lcore_conf *qconf;
uint16_t queueid, portid;
unsigned int lcore_id;
- uint8_t queue;
+ uint16_t queue;
int i, ret;
/* init EAL */
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:23.257571784 +0100
+++ 0037-examples-fix-queue-ID-restriction.patch 2024-07-24 12:29:20.835027419 +0100
@@ -1 +1 @@
-From b23c5bd71aa5b428a404aa036b97fa7bb1a3c98a Mon Sep 17 00:00:00 2001
+From 3b8becb93e229a66cbf859c3137a6a7803a20edc Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit b23c5bd71aa5b428a404aa036b97fa7bb1a3c98a ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -43 +44 @@
-index d7c18bea34..8292a262cd 100644
+index e4c3482411..8b0dfe76e7 100644
@@ -48 +49 @@
- struct __rte_cache_aligned lcore_params {
+ struct lcore_params {
@@ -53 +54 @@
- };
+ } __rte_cache_aligned;
@@ -129 +130 @@
-index 36b6164ab2..6f45fdb166 100644
+index 2890e6e267..c764c9d7b8 100644
@@ -134 +135 @@
- struct __rte_cache_aligned lcore_rx_queue {
+ struct lcore_rx_queue {
@@ -138,2 +139,2 @@
- void *sec_ctx;
- };
+ struct rte_security_ctx *sec_ctx;
+ } __rte_cache_aligned;
@@ -142 +143 @@
-index 8d122e8519..c9c43ebd2b 100644
+index 2f02946f86..7e4db87caf 100644
@@ -184 +185 @@
-index ec4d8c94c5..0866822e93 100644
+index 6dcb6ee92b..f9ca0ff23b 100644
@@ -187 +188 @@
-@@ -90,7 +90,7 @@ static int pcap_trace_enable;
+@@ -78,7 +78,7 @@ static uint32_t enabled_port_mask;
@@ -196 +197 @@
-@@ -110,7 +110,7 @@ static struct lcore_conf lcore_conf[RTE_MAX_LCORE];
+@@ -96,7 +96,7 @@ static struct lcore_conf lcore_conf[RTE_MAX_LCORE];
@@ -198 +199 @@
- struct __rte_cache_aligned lcore_params {
+ struct lcore_params {
@@ -203 +204 @@
- };
+ } __rte_cache_aligned;
@@ -205 +206 @@
-@@ -205,14 +205,14 @@ check_worker_model_params(void)
+@@ -150,14 +150,14 @@ static struct ipv4_l3fwd_lpm_route ipv4_l3fwd_lpm_route_array[] = {
@@ -223 +224 @@
-@@ -257,7 +257,7 @@ check_port_config(void)
+@@ -202,7 +202,7 @@ check_port_config(void)
@@ -232 +233 @@
-@@ -275,7 +275,7 @@ get_port_n_rx_queues(const uint16_t port)
+@@ -220,7 +220,7 @@ get_port_n_rx_queues(const uint16_t port)
@@ -241 +242 @@
-@@ -450,7 +450,7 @@ parse_config(const char *q_arg)
+@@ -356,7 +356,7 @@ parse_config(const char *q_arg)
@@ -250 +251 @@
-@@ -1011,7 +1011,8 @@ main(int argc, char **argv)
+@@ -746,7 +746,8 @@ main(int argc, char **argv)
@@ -261 +262 @@
-index fba11da7ca..74e906cb5d 100644
+index fd3ade330f..9f60b784df 100644
@@ -264 +265 @@
-@@ -214,7 +214,7 @@ enum freq_scale_hint_t
+@@ -228,7 +228,7 @@ enum freq_scale_hint_t
@@ -266 +267 @@
- struct __rte_cache_aligned lcore_rx_queue {
+ struct lcore_rx_queue {
@@ -273 +274 @@
-@@ -838,7 +838,7 @@ sleep_until_rx_interrupt(int num, int lcore)
+@@ -860,7 +860,7 @@ sleep_until_rx_interrupt(int num, int lcore)
@@ -282 +283 @@
-@@ -850,9 +850,9 @@ sleep_until_rx_interrupt(int num, int lcore)
+@@ -872,9 +872,9 @@ sleep_until_rx_interrupt(int num, int lcore)
@@ -294 +295 @@
-@@ -867,7 +867,7 @@ static void turn_on_off_intr(struct lcore_conf *qconf, bool on)
+@@ -889,7 +889,7 @@ static void turn_on_off_intr(struct lcore_conf *qconf, bool on)
@@ -303 +304 @@
-@@ -887,7 +887,7 @@ static void turn_on_off_intr(struct lcore_conf *qconf, bool on)
+@@ -909,7 +909,7 @@ static void turn_on_off_intr(struct lcore_conf *qconf, bool on)
@@ -312 +313 @@
-@@ -897,7 +897,7 @@ static int event_register(struct lcore_conf *qconf)
+@@ -919,7 +919,7 @@ static int event_register(struct lcore_conf *qconf)
@@ -321 +322 @@
-@@ -917,8 +917,7 @@ static int main_intr_loop(__rte_unused void *dummy)
+@@ -939,8 +939,7 @@ static int main_intr_loop(__rte_unused void *dummy)
@@ -331 +332 @@
-@@ -946,7 +945,7 @@ static int main_intr_loop(__rte_unused void *dummy)
+@@ -968,7 +967,7 @@ static int main_intr_loop(__rte_unused void *dummy)
@@ -340 +341 @@
-@@ -1083,8 +1082,7 @@ main_telemetry_loop(__rte_unused void *dummy)
+@@ -1105,8 +1104,7 @@ main_telemetry_loop(__rte_unused void *dummy)
@@ -350 +351 @@
-@@ -1114,7 +1112,7 @@ main_telemetry_loop(__rte_unused void *dummy)
+@@ -1136,7 +1134,7 @@ main_telemetry_loop(__rte_unused void *dummy)
@@ -359 +360 @@
-@@ -1205,8 +1203,7 @@ main_legacy_loop(__rte_unused void *dummy)
+@@ -1330,8 +1328,7 @@ main_legacy_loop(__rte_unused void *dummy)
@@ -369 +370 @@
-@@ -1234,7 +1231,7 @@ main_legacy_loop(__rte_unused void *dummy)
+@@ -1359,7 +1356,7 @@ main_legacy_loop(__rte_unused void *dummy)
@@ -378 +379 @@
-@@ -1399,14 +1396,14 @@ start_rx:
+@@ -1524,14 +1521,14 @@ start_rx:
@@ -396 +397 @@
-@@ -1451,7 +1448,7 @@ check_port_config(void)
+@@ -1576,7 +1573,7 @@ check_port_config(void)
@@ -405 +406 @@
-@@ -1462,7 +1459,7 @@ get_port_n_rx_queues(const uint16_t port)
+@@ -1587,7 +1584,7 @@ get_port_n_rx_queues(const uint16_t port)
@@ -414 +415 @@
-@@ -1661,6 +1658,7 @@ parse_config(const char *q_arg)
+@@ -1782,6 +1779,7 @@ parse_config(const char *q_arg)
@@ -422 +423 @@
-@@ -1680,8 +1678,7 @@ parse_config(const char *q_arg)
+@@ -1801,8 +1799,7 @@ parse_config(const char *q_arg)
@@ -432 +433 @@
-@@ -1692,7 +1689,7 @@ parse_config(const char *q_arg)
+@@ -1813,7 +1810,7 @@ parse_config(const char *q_arg)
@@ -441 +442 @@
-@@ -2501,8 +2498,8 @@ main(int argc, char **argv)
+@@ -2719,8 +2716,8 @@ main(int argc, char **argv)
@@ -453 +454 @@
-index e85e14bd9d..378f54794c 100644
+index 258de98f5b..40b5194726 100644
@@ -458 +459 @@
- struct __rte_cache_aligned lcore_params {
+ struct lcore_params {
@@ -463 +464 @@
- };
+ } __rte_cache_aligned;
@@ -466 +467 @@
-index c8fc69e6d3..77248889c0 100644
+index 41ef6d0c9a..f34442b9d0 100644
@@ -471 +472 @@
- struct __rte_cache_aligned perf_lcore_params {
+ struct perf_lcore_params {
@@ -477 +478 @@
- };
+ } __rte_cache_aligned;
@@ -506 +507 @@
-index f51da43319..93ce652d02 100644
+index b55855c932..e774623b57 100644
@@ -511 +512 @@
- struct __rte_cache_aligned lcore_rx_queue {
+ struct lcore_rx_queue {
@@ -515 +516 @@
- };
+ } __rte_cache_aligned;
@@ -517 +518 @@
- struct __rte_cache_aligned lcore_conf {
+ struct lcore_conf {
@@ -519 +520 @@
-index 2109ab0a8c..b635011ef7 100644
+index a1d87f4a40..31798ccb10 100644
@@ -522 +523 @@
-@@ -1061,7 +1061,7 @@ acl_main_loop(__rte_unused void *dummy)
+@@ -998,7 +998,7 @@ acl_main_loop(__rte_unused void *dummy)
@@ -531 +532 @@
-@@ -1084,7 +1084,7 @@ acl_main_loop(__rte_unused void *dummy)
+@@ -1021,7 +1021,7 @@ acl_main_loop(__rte_unused void *dummy)
@@ -541 +542 @@
-index d98e66ea2c..31a7e05e39 100644
+index 35de31157e..e298fef523 100644
@@ -544 +545 @@
-@@ -586,7 +586,7 @@ em_main_loop(__rte_unused void *dummy)
+@@ -584,7 +584,7 @@ em_main_loop(__rte_unused void *dummy)
@@ -553 +554 @@
-@@ -609,7 +609,7 @@ em_main_loop(__rte_unused void *dummy)
+@@ -607,7 +607,7 @@ em_main_loop(__rte_unused void *dummy)
@@ -563 +564 @@
-index 9aad358003..c6a4a89127 100644
+index e21817c36b..a7af23b8a0 100644
@@ -566 +567 @@
-@@ -78,8 +78,8 @@ struct l3fwd_event_resources {
+@@ -76,8 +76,8 @@ struct l3fwd_event_resources {
@@ -577 +578 @@
-index 6a21984415..f38b19af3f 100644
+index 18398492ae..10fa121942 100644
@@ -599 +600 @@
-index a484a33089..e8fd95aae9 100644
+index 5172979c72..54b059fe2a 100644
@@ -622 +623 @@
-index ad28ba9d2e..f5f5f1a7fb 100644
+index 329427ae4f..b6b105d42b 100644
@@ -625 +626 @@
-@@ -98,7 +98,7 @@ struct parm_cfg parm_config;
+@@ -96,7 +96,7 @@ struct parm_cfg parm_config;
@@ -627 +628 @@
- struct __rte_cache_aligned lcore_params {
+ struct lcore_params {
@@ -632 +633 @@
- };
+ } __rte_cache_aligned;
@@ -634 +635 @@
-@@ -292,14 +292,14 @@ setup_l3fwd_lookup_tables(void)
+@@ -288,14 +288,14 @@ setup_l3fwd_lookup_tables(void)
@@ -652 +653 @@
-@@ -336,7 +336,7 @@ check_port_config(void)
+@@ -332,7 +332,7 @@ check_port_config(void)
@@ -661 +662 @@
-@@ -352,7 +352,7 @@ get_port_n_rx_queues(const uint16_t port)
+@@ -348,7 +348,7 @@ get_port_n_rx_queues(const uint16_t port)
@@ -670 +671 @@
-@@ -500,6 +500,7 @@ parse_config(const char *q_arg)
+@@ -492,6 +492,7 @@ parse_config(const char *q_arg)
@@ -678 +679 @@
-@@ -518,7 +519,7 @@ parse_config(const char *q_arg)
+@@ -510,7 +511,7 @@ parse_config(const char *q_arg)
@@ -687 +688 @@
-@@ -529,7 +530,7 @@ parse_config(const char *q_arg)
+@@ -521,7 +522,7 @@ parse_config(const char *q_arg)
@@ -696 +697 @@
-@@ -630,7 +631,7 @@ parse_event_eth_rx_queues(const char *eth_rx_queues)
+@@ -619,7 +620,7 @@ parse_event_eth_rx_queues(const char *eth_rx_queues)
@@ -705 +706 @@
-@@ -1211,7 +1212,8 @@ config_port_max_pkt_len(struct rte_eth_conf *conf,
+@@ -1169,7 +1170,8 @@ config_port_max_pkt_len(struct rte_eth_conf *conf,
@@ -715 +716 @@
-@@ -1535,7 +1537,7 @@ main(int argc, char **argv)
+@@ -1466,7 +1468,7 @@ main(int argc, char **argv)
@@ -721 +722 @@
- int ret;
+ int i, ret;
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'examples: fix lcore ID restriction' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (35 preceding siblings ...)
2024-07-24 11:33 ` patch 'examples: fix queue ID restriction' " luca.boccassi
@ 2024-07-24 11:33 ` luca.boccassi
2024-07-24 11:33 ` patch 'examples: fix port " luca.boccassi
2024-07-24 11:33 ` patch 'doc: remove reference to mbuf pkt field' " luca.boccassi
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:33 UTC (permalink / raw)
To: Sivaprasad Tummala
Cc: Konstantin Ananyev, Morten Brørup, Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6a1313b34aa99ae7454e3dbe0aae605406f50e1f
Thanks.
Luca Boccassi
---
From 6a1313b34aa99ae7454e3dbe0aae605406f50e1f Mon Sep 17 00:00:00 2001
From: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
Date: Tue, 26 Mar 2024 13:55:44 +0100
Subject: [PATCH] examples: fix lcore ID restriction
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 4b978938168b219346775ff877ac31649a36cba7 ]
Currently the config option allows lcore IDs up to 255,
irrespective of RTE_MAX_LCORES and needs to be fixed.
The patch fixes these constraints by allowing all
lcore IDs up to RTE_MAX_LCORES.
Fixes: af75078fece3 ("first public release")
Fixes: f88e7c175a68 ("examples/l3fwd-power: add high/regular perf cores options")
Fixes: 08bd1a174461 ("examples/l3fwd-graph: add graph-based l3fwd skeleton")
Fixes: d299106e8e31 ("examples/ipsec-secgw: add IPsec sample application")
Fixes: 0e8f47491f09 ("examples/vm_power: add command to query CPU frequency")
Fixes: de3cfa2c9823 ("sched: initial import")
Signed-off-by: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
examples/ipsec-secgw/event_helper.h | 2 +-
examples/ipsec-secgw/ipsec-secgw.c | 21 ++++++++++++-------
examples/ipsec-secgw/ipsec.c | 2 +-
examples/ipsec-secgw/ipsec.h | 4 ++--
examples/l3fwd-graph/main.c | 14 ++++++-------
examples/l3fwd-power/main.c | 18 +++++++++-------
examples/l3fwd-power/main.h | 2 +-
examples/l3fwd-power/perf_core.c | 11 +++++++---
examples/l3fwd/main.c | 20 +++++++++++-------
examples/qos_sched/args.c | 6 +++---
.../guest_cli/vm_power_cli_guest.c | 4 ++--
11 files changed, 61 insertions(+), 43 deletions(-)
diff --git a/examples/ipsec-secgw/event_helper.h b/examples/ipsec-secgw/event_helper.h
index af5cfcf794..5c4e260e2c 100644
--- a/examples/ipsec-secgw/event_helper.h
+++ b/examples/ipsec-secgw/event_helper.h
@@ -102,7 +102,7 @@ struct eh_event_link_info {
/**< Event port ID */
uint8_t eventq_id;
/**< Event queue to be linked to the port */
- uint8_t lcore_id;
+ uint32_t lcore_id;
/**< Lcore to be polling on this port */
};
diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 8b0dfe76e7..cefea36b13 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -221,7 +221,7 @@ static const char *cfgfile;
struct lcore_params {
uint16_t port_id;
uint16_t queue_id;
- uint8_t lcore_id;
+ uint32_t lcore_id;
} __rte_cache_aligned;
static struct lcore_params lcore_params_array[MAX_LCORE_PARAMS];
@@ -807,7 +807,7 @@ check_flow_params(uint16_t fdir_portid, uint8_t fdir_qid)
static int32_t
check_poll_mode_params(struct eh_conf *eh_conf)
{
- uint8_t lcore;
+ uint32_t lcore;
uint16_t portid;
uint16_t i;
int32_t socket_id;
@@ -826,13 +826,13 @@ check_poll_mode_params(struct eh_conf *eh_conf)
for (i = 0; i < nb_lcore_params; ++i) {
lcore = lcore_params[i].lcore_id;
if (!rte_lcore_is_enabled(lcore)) {
- printf("error: lcore %hhu is not enabled in "
+ printf("error: lcore %u is not enabled in "
"lcore mask\n", lcore);
return -1;
}
socket_id = rte_lcore_to_socket_id(lcore);
if (socket_id != 0 && numa_on == 0) {
- printf("warning: lcore %hhu is on socket %d "
+ printf("warning: lcore %u is on socket %d "
"with numa off\n",
lcore, socket_id);
}
@@ -867,7 +867,7 @@ static int32_t
init_lcore_rx_queues(void)
{
uint16_t i, nb_rx_queue;
- uint8_t lcore;
+ uint32_t lcore;
for (i = 0; i < nb_lcore_params; ++i) {
lcore = lcore_params[i].lcore_id;
@@ -1048,7 +1048,11 @@ parse_config(const char *q_arg)
char *str_fld[_NUM_FLD];
int32_t i;
uint32_t size;
- uint32_t max_fld[_NUM_FLD] = {255, RTE_MAX_QUEUES_PER_PORT, 255};
+ uint32_t max_fld[_NUM_FLD] = {
+ 255,
+ RTE_MAX_QUEUES_PER_PORT,
+ RTE_MAX_LCORE
+ };
nb_lcore_params = 0;
@@ -1082,7 +1086,7 @@ parse_config(const char *q_arg)
lcore_params_array[nb_lcore_params].queue_id =
(uint16_t)int_fld[FLD_QUEUE];
lcore_params_array[nb_lcore_params].lcore_id =
- (uint8_t)int_fld[FLD_LCORE];
+ (uint32_t)int_fld[FLD_LCORE];
++nb_lcore_params;
}
lcore_params = lcore_params_array;
@@ -1881,7 +1885,8 @@ port_init(uint16_t portid, uint64_t req_rx_offloads, uint64_t req_tx_offloads,
struct rte_eth_dev_info dev_info;
struct rte_eth_txconf *txconf;
uint16_t nb_tx_queue, nb_rx_queue;
- uint16_t tx_queueid, rx_queueid, queue, lcore_id;
+ uint16_t tx_queueid, rx_queueid, queue;
+ uint32_t lcore_id;
int32_t ret, socket_id;
struct lcore_conf *qconf;
struct rte_ether_addr ethaddr;
diff --git a/examples/ipsec-secgw/ipsec.c b/examples/ipsec-secgw/ipsec.c
index 29cb3c4785..1df5065ed7 100644
--- a/examples/ipsec-secgw/ipsec.c
+++ b/examples/ipsec-secgw/ipsec.c
@@ -81,7 +81,7 @@ create_lookaside_session(struct ipsec_ctx *ipsec_ctx_lcore[],
continue;
/* Looking for cryptodev, which can handle this SA */
- key.lcore_id = (uint8_t)lcore_id;
+ key.lcore_id = lcore_id;
key.cipher_algo = (uint8_t)sa->cipher_algo;
key.auth_algo = (uint8_t)sa->auth_algo;
key.aead_algo = (uint8_t)sa->aead_algo;
diff --git a/examples/ipsec-secgw/ipsec.h b/examples/ipsec-secgw/ipsec.h
index c764c9d7b8..5217e28f8a 100644
--- a/examples/ipsec-secgw/ipsec.h
+++ b/examples/ipsec-secgw/ipsec.h
@@ -256,11 +256,11 @@ extern struct offloads tx_offloads;
* (hash key calculation reads 8 bytes if this struct is size 5 bytes).
*/
struct cdev_key {
- uint16_t lcore_id;
+ uint32_t lcore_id;
uint8_t cipher_algo;
uint8_t auth_algo;
uint8_t aead_algo;
- uint8_t padding[3]; /* padding to 8-byte size should be zeroed */
+ uint8_t padding; /* padding to 8-byte size should be zeroed */
};
struct socket_ctx {
diff --git a/examples/l3fwd-graph/main.c b/examples/l3fwd-graph/main.c
index f9ca0ff23b..563acce331 100644
--- a/examples/l3fwd-graph/main.c
+++ b/examples/l3fwd-graph/main.c
@@ -97,7 +97,7 @@ static struct lcore_conf lcore_conf[RTE_MAX_LCORE];
struct lcore_params {
uint16_t port_id;
uint16_t queue_id;
- uint8_t lcore_id;
+ uint32_t lcore_id;
} __rte_cache_aligned;
static struct lcore_params lcore_params_array[MAX_LCORE_PARAMS];
@@ -152,7 +152,7 @@ check_lcore_params(void)
{
uint16_t queue, i;
int socketid;
- uint8_t lcore;
+ uint32_t lcore;
for (i = 0; i < nb_lcore_params; ++i) {
queue = lcore_params[i].queue_id;
@@ -162,7 +162,7 @@ check_lcore_params(void)
}
lcore = lcore_params[i].lcore_id;
if (!rte_lcore_is_enabled(lcore)) {
- printf("Error: lcore %hhu is not enabled in lcore mask\n",
+ printf("Error: lcore %u is not enabled in lcore mask\n",
lcore);
return -1;
}
@@ -173,7 +173,7 @@ check_lcore_params(void)
}
socketid = rte_lcore_to_socket_id(lcore);
if ((socketid != 0) && (numa_on == 0)) {
- printf("Warning: lcore %hhu is on socket %d with numa off\n",
+ printf("Warning: lcore %u is on socket %d with numa off\n",
lcore, socketid);
}
}
@@ -227,7 +227,7 @@ static int
init_lcore_rx_queues(void)
{
uint16_t i, nb_rx_queue;
- uint8_t lcore;
+ uint32_t lcore;
for (i = 0; i < nb_lcore_params; ++i) {
lcore = lcore_params[i].lcore_id;
@@ -235,7 +235,7 @@ init_lcore_rx_queues(void)
if (nb_rx_queue >= MAX_RX_QUEUE_PER_LCORE) {
printf("Error: too many queues (%u) for lcore: %u\n",
(unsigned int)nb_rx_queue + 1,
- (unsigned int)lcore);
+ lcore);
return -1;
}
@@ -358,7 +358,7 @@ parse_config(const char *q_arg)
lcore_params_array[nb_lcore_params].queue_id =
(uint16_t)int_fld[FLD_QUEUE];
lcore_params_array[nb_lcore_params].lcore_id =
- (uint8_t)int_fld[FLD_LCORE];
+ (uint32_t)int_fld[FLD_LCORE];
++nb_lcore_params;
}
lcore_params = lcore_params_array;
diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index 9f60b784df..bab35d1839 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -1522,7 +1522,7 @@ static int
check_lcore_params(void)
{
uint16_t queue, i;
- uint8_t lcore;
+ uint32_t lcore;
int socketid;
for (i = 0; i < nb_lcore_params; ++i) {
@@ -1533,13 +1533,13 @@ check_lcore_params(void)
}
lcore = lcore_params[i].lcore_id;
if (!rte_lcore_is_enabled(lcore)) {
- printf("error: lcore %hhu is not enabled in lcore "
+ printf("error: lcore %u is not enabled in lcore "
"mask\n", lcore);
return -1;
}
if ((socketid = rte_lcore_to_socket_id(lcore) != 0) &&
(numa_on == 0)) {
- printf("warning: lcore %hhu is on socket %d with numa "
+ printf("warning: lcore %u is on socket %d with numa "
"off\n", lcore, socketid);
}
if (app_mode == APP_MODE_TELEMETRY && lcore == rte_lcore_id()) {
@@ -1591,14 +1591,14 @@ static int
init_lcore_rx_queues(void)
{
uint16_t i, nb_rx_queue;
- uint8_t lcore;
+ uint32_t lcore;
for (i = 0; i < nb_lcore_params; ++i) {
lcore = lcore_params[i].lcore_id;
nb_rx_queue = lcore_conf[lcore].n_rx_queue;
if (nb_rx_queue >= MAX_RX_QUEUE_PER_LCORE) {
printf("error: too many queues (%u) for lcore: %u\n",
- (unsigned)nb_rx_queue + 1, (unsigned)lcore);
+ (unsigned int)nb_rx_queue + 1, lcore);
return -1;
} else {
lcore_conf[lcore].rx_queue_list[nb_rx_queue].port_id =
@@ -1779,7 +1779,11 @@ parse_config(const char *q_arg)
char *str_fld[_NUM_FLD];
int i;
unsigned size;
- unsigned int max_fld[_NUM_FLD] = {255, RTE_MAX_QUEUES_PER_PORT, 255};
+ unsigned int max_fld[_NUM_FLD] = {
+ 255,
+ RTE_MAX_QUEUES_PER_PORT,
+ RTE_MAX_LCORE
+ };
nb_lcore_params = 0;
@@ -1812,7 +1816,7 @@ parse_config(const char *q_arg)
lcore_params_array[nb_lcore_params].queue_id =
(uint16_t)int_fld[FLD_QUEUE];
lcore_params_array[nb_lcore_params].lcore_id =
- (uint8_t)int_fld[FLD_LCORE];
+ (uint32_t)int_fld[FLD_LCORE];
++nb_lcore_params;
}
lcore_params = lcore_params_array;
diff --git a/examples/l3fwd-power/main.h b/examples/l3fwd-power/main.h
index 40b5194726..194bd82102 100644
--- a/examples/l3fwd-power/main.h
+++ b/examples/l3fwd-power/main.h
@@ -10,7 +10,7 @@
struct lcore_params {
uint16_t port_id;
uint16_t queue_id;
- uint8_t lcore_id;
+ uint32_t lcore_id;
} __rte_cache_aligned;
extern struct lcore_params *lcore_params;
diff --git a/examples/l3fwd-power/perf_core.c b/examples/l3fwd-power/perf_core.c
index f34442b9d0..fbd7864cb9 100644
--- a/examples/l3fwd-power/perf_core.c
+++ b/examples/l3fwd-power/perf_core.c
@@ -24,7 +24,7 @@ struct perf_lcore_params {
uint16_t port_id;
uint16_t queue_id;
uint8_t high_perf;
- uint8_t lcore_idx;
+ uint32_t lcore_idx;
} __rte_cache_aligned;
static struct perf_lcore_params prf_lc_prms[MAX_LCORE_PARAMS];
@@ -132,7 +132,12 @@ parse_perf_config(const char *q_arg)
char *str_fld[_NUM_FLD];
int i;
unsigned int size;
- unsigned int max_fld[_NUM_FLD] = {255, RTE_MAX_QUEUES_PER_PORT, 255, 255};
+ unsigned int max_fld[_NUM_FLD] = {
+ 255,
+ RTE_MAX_QUEUES_PER_PORT,
+ 255,
+ RTE_MAX_LCORE
+ };
nb_prf_lc_prms = 0;
@@ -169,7 +174,7 @@ parse_perf_config(const char *q_arg)
prf_lc_prms[nb_prf_lc_prms].high_perf =
!!(uint8_t)int_fld[FLD_LCORE_HP];
prf_lc_prms[nb_prf_lc_prms].lcore_idx =
- (uint8_t)int_fld[FLD_LCORE_IDX];
+ (uint32_t)int_fld[FLD_LCORE_IDX];
++nb_prf_lc_prms;
}
diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c
index b6b105d42b..dca1beabc8 100644
--- a/examples/l3fwd/main.c
+++ b/examples/l3fwd/main.c
@@ -97,7 +97,7 @@ struct parm_cfg parm_config;
struct lcore_params {
uint16_t port_id;
uint16_t queue_id;
- uint8_t lcore_id;
+ uint32_t lcore_id;
} __rte_cache_aligned;
static struct lcore_params lcore_params_array[MAX_LCORE_PARAMS];
@@ -289,7 +289,7 @@ static int
check_lcore_params(void)
{
uint16_t queue, i;
- uint8_t lcore;
+ uint32_t lcore;
int socketid;
for (i = 0; i < nb_lcore_params; ++i) {
@@ -300,12 +300,12 @@ check_lcore_params(void)
}
lcore = lcore_params[i].lcore_id;
if (!rte_lcore_is_enabled(lcore)) {
- printf("error: lcore %hhu is not enabled in lcore mask\n", lcore);
+ printf("error: lcore %u is not enabled in lcore mask\n", lcore);
return -1;
}
if ((socketid = rte_lcore_to_socket_id(lcore) != 0) &&
(numa_on == 0)) {
- printf("warning: lcore %hhu is on socket %d with numa off \n",
+ printf("warning: lcore %u is on socket %d with numa off\n",
lcore, socketid);
}
}
@@ -355,14 +355,14 @@ static int
init_lcore_rx_queues(void)
{
uint16_t i, nb_rx_queue;
- uint8_t lcore;
+ uint32_t lcore;
for (i = 0; i < nb_lcore_params; ++i) {
lcore = lcore_params[i].lcore_id;
nb_rx_queue = lcore_conf[lcore].n_rx_queue;
if (nb_rx_queue >= MAX_RX_QUEUE_PER_LCORE) {
printf("error: too many queues (%u) for lcore: %u\n",
- (unsigned)nb_rx_queue + 1, (unsigned)lcore);
+ (unsigned int)nb_rx_queue + 1, lcore);
return -1;
} else {
lcore_conf[lcore].rx_queue_list[nb_rx_queue].port_id =
@@ -492,7 +492,11 @@ parse_config(const char *q_arg)
char *str_fld[_NUM_FLD];
int i;
unsigned size;
- uint16_t max_fld[_NUM_FLD] = {255, RTE_MAX_QUEUES_PER_PORT, 255};
+ uint16_t max_fld[_NUM_FLD] = {
+ 255,
+ RTE_MAX_QUEUES_PER_PORT,
+ RTE_MAX_LCORE
+ };
nb_lcore_params = 0;
@@ -524,7 +528,7 @@ parse_config(const char *q_arg)
lcore_params_array[nb_lcore_params].queue_id =
(uint16_t)int_fld[FLD_QUEUE];
lcore_params_array[nb_lcore_params].lcore_id =
- (uint8_t)int_fld[FLD_LCORE];
+ (uint32_t)int_fld[FLD_LCORE];
++nb_lcore_params;
}
lcore_params = lcore_params_array;
diff --git a/examples/qos_sched/args.c b/examples/qos_sched/args.c
index bccbbe8207..fbdc738d77 100644
--- a/examples/qos_sched/args.c
+++ b/examples/qos_sched/args.c
@@ -222,10 +222,10 @@ app_parse_flow_conf(const char *conf_str)
pconf->rx_port = vals[0];
pconf->tx_port = vals[1];
- pconf->rx_core = (uint8_t)vals[2];
- pconf->wt_core = (uint8_t)vals[3];
+ pconf->rx_core = vals[2];
+ pconf->wt_core = vals[3];
if (ret == 5)
- pconf->tx_core = (uint8_t)vals[4];
+ pconf->tx_core = vals[4];
else
pconf->tx_core = pconf->wt_core;
diff --git a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
index 94bfbbaf78..5eddb47847 100644
--- a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
+++ b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
@@ -401,7 +401,7 @@ check_response_cmd(unsigned int lcore_id, int *result)
struct cmd_set_cpu_freq_result {
cmdline_fixed_string_t set_cpu_freq;
- uint8_t lcore_id;
+ uint32_t lcore_id;
cmdline_fixed_string_t cmd;
};
@@ -444,7 +444,7 @@ cmdline_parse_token_string_t cmd_set_cpu_freq =
set_cpu_freq, "set_cpu_freq");
cmdline_parse_token_num_t cmd_set_cpu_freq_core_num =
TOKEN_NUM_INITIALIZER(struct cmd_set_cpu_freq_result,
- lcore_id, RTE_UINT8);
+ lcore_id, RTE_UINT32);
cmdline_parse_token_string_t cmd_set_cpu_freq_cmd_cmd =
TOKEN_STRING_INITIALIZER(struct cmd_set_cpu_freq_result,
cmd, "up#down#min#max#enable_turbo#disable_turbo");
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:23.312203961 +0100
+++ 0038-examples-fix-lcore-ID-restriction.patch 2024-07-24 12:29:20.847027660 +0100
@@ -1 +1 @@
-From 4b978938168b219346775ff877ac31649a36cba7 Mon Sep 17 00:00:00 2001
+From 6a1313b34aa99ae7454e3dbe0aae605406f50e1f Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 4b978938168b219346775ff877ac31649a36cba7 ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org
@@ -42 +43 @@
-index dfb81bfcf1..be635685b4 100644
+index af5cfcf794..5c4e260e2c 100644
@@ -55 +56 @@
-index 8292a262cd..5a7e1b220f 100644
+index 8b0dfe76e7..cefea36b13 100644
@@ -59 +60 @@
- struct __rte_cache_aligned lcore_params {
+ struct lcore_params {
@@ -64 +65 @@
- };
+ } __rte_cache_aligned;
@@ -123 +124 @@
-@@ -1918,7 +1922,8 @@ port_init(uint16_t portid, uint64_t req_rx_offloads, uint64_t req_tx_offloads,
+@@ -1881,7 +1885,8 @@ port_init(uint16_t portid, uint64_t req_rx_offloads, uint64_t req_tx_offloads,
@@ -134 +135 @@
-index c321108119..b52b0ffc3d 100644
+index 29cb3c4785..1df5065ed7 100644
@@ -137 +138 @@
-@@ -259,7 +259,7 @@ create_lookaside_session(struct ipsec_ctx *ipsec_ctx_lcore[],
+@@ -81,7 +81,7 @@ create_lookaside_session(struct ipsec_ctx *ipsec_ctx_lcore[],
@@ -147 +148 @@
-index 6f45fdb166..a83fd2283b 100644
+index c764c9d7b8..5217e28f8a 100644
@@ -165 +166 @@
-index 0866822e93..4396e2bb3c 100644
+index f9ca0ff23b..563acce331 100644
@@ -168,2 +169,2 @@
-@@ -111,7 +111,7 @@ static struct lcore_conf lcore_conf[RTE_MAX_LCORE];
- struct __rte_cache_aligned lcore_params {
+@@ -97,7 +97,7 @@ static struct lcore_conf lcore_conf[RTE_MAX_LCORE];
+ struct lcore_params {
@@ -174 +175 @@
- };
+ } __rte_cache_aligned;
@@ -177 +178 @@
-@@ -207,7 +207,7 @@ check_lcore_params(void)
+@@ -152,7 +152,7 @@ check_lcore_params(void)
@@ -186 +187 @@
-@@ -217,7 +217,7 @@ check_lcore_params(void)
+@@ -162,7 +162,7 @@ check_lcore_params(void)
@@ -195 +196 @@
-@@ -228,7 +228,7 @@ check_lcore_params(void)
+@@ -173,7 +173,7 @@ check_lcore_params(void)
@@ -204 +205 @@
-@@ -282,7 +282,7 @@ static int
+@@ -227,7 +227,7 @@ static int
@@ -213 +214 @@
-@@ -290,7 +290,7 @@ init_lcore_rx_queues(void)
+@@ -235,7 +235,7 @@ init_lcore_rx_queues(void)
@@ -222 +223 @@
-@@ -452,7 +452,7 @@ parse_config(const char *q_arg)
+@@ -358,7 +358,7 @@ parse_config(const char *q_arg)
@@ -232 +233 @@
-index 74e906cb5d..2976058425 100644
+index 9f60b784df..bab35d1839 100644
@@ -235 +236 @@
-@@ -1397,7 +1397,7 @@ static int
+@@ -1522,7 +1522,7 @@ static int
@@ -244 +245 @@
-@@ -1408,13 +1408,13 @@ check_lcore_params(void)
+@@ -1533,13 +1533,13 @@ check_lcore_params(void)
@@ -260 +261 @@
-@@ -1466,14 +1466,14 @@ static int
+@@ -1591,14 +1591,14 @@ static int
@@ -277 +278 @@
-@@ -1658,7 +1658,11 @@ parse_config(const char *q_arg)
+@@ -1779,7 +1779,11 @@ parse_config(const char *q_arg)
@@ -290 +291 @@
-@@ -1691,7 +1695,7 @@ parse_config(const char *q_arg)
+@@ -1812,7 +1816,7 @@ parse_config(const char *q_arg)
@@ -300 +301 @@
-index 378f54794c..2461ab8da7 100644
+index 40b5194726..194bd82102 100644
@@ -304 +305 @@
- struct __rte_cache_aligned lcore_params {
+ struct lcore_params {
@@ -309 +310 @@
- };
+ } __rte_cache_aligned;
@@ -313 +314 @@
-index 77248889c0..a0112b57ff 100644
+index f34442b9d0..fbd7864cb9 100644
@@ -316 +317 @@
-@@ -24,7 +24,7 @@ struct __rte_cache_aligned perf_lcore_params {
+@@ -24,7 +24,7 @@ struct perf_lcore_params {
@@ -322 +323 @@
- };
+ } __rte_cache_aligned;
@@ -349 +350 @@
-index f5f5f1a7fb..ba7083d4f3 100644
+index b6b105d42b..dca1beabc8 100644
@@ -352,2 +353,2 @@
-@@ -99,7 +99,7 @@ struct parm_cfg parm_config;
- struct __rte_cache_aligned lcore_params {
+@@ -97,7 +97,7 @@ struct parm_cfg parm_config;
+ struct lcore_params {
@@ -358 +359 @@
- };
+ } __rte_cache_aligned;
@@ -361 +362 @@
-@@ -293,7 +293,7 @@ static int
+@@ -289,7 +289,7 @@ static int
@@ -370 +371 @@
-@@ -304,12 +304,12 @@ check_lcore_params(void)
+@@ -300,12 +300,12 @@ check_lcore_params(void)
@@ -385 +386 @@
-@@ -359,14 +359,14 @@ static int
+@@ -355,14 +355,14 @@ static int
@@ -402 +403 @@
-@@ -500,7 +500,11 @@ parse_config(const char *q_arg)
+@@ -492,7 +492,11 @@ parse_config(const char *q_arg)
@@ -415 +416 @@
-@@ -532,7 +536,7 @@ parse_config(const char *q_arg)
+@@ -524,7 +528,7 @@ parse_config(const char *q_arg)
@@ -425 +426 @@
-index 8d61d3e454..886542b3c1 100644
+index bccbbe8207..fbdc738d77 100644
@@ -428 +429 @@
-@@ -184,10 +184,10 @@ app_parse_flow_conf(const char *conf_str)
+@@ -222,10 +222,10 @@ app_parse_flow_conf(const char *conf_str)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'examples: fix port ID restriction' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (36 preceding siblings ...)
2024-07-24 11:33 ` patch 'examples: fix lcore " luca.boccassi
@ 2024-07-24 11:33 ` luca.boccassi
2024-07-24 11:33 ` patch 'doc: remove reference to mbuf pkt field' " luca.boccassi
38 siblings, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:33 UTC (permalink / raw)
To: Sivaprasad Tummala
Cc: Konstantin Ananyev, Morten Brørup, Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/28c93c22f7890e8b0adf17b50a2c4b3448c5f27a
Thanks.
Luca Boccassi
---
From 28c93c22f7890e8b0adf17b50a2c4b3448c5f27a Mon Sep 17 00:00:00 2001
From: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
Date: Tue, 26 Mar 2024 13:55:50 +0100
Subject: [PATCH] examples: fix port ID restriction
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 548de9091c85467bd8f05cecf6d32315869d1461 ]
Currently application supports port IDs up to 255
irrespective of RTE_MAX_ETHPORTS.
The patch fixes these constraints by allowing port
IDs up to RTE_MAX_ETHPORTS.
Fixes: af75078fece3 ("first public release")
Fixes: f88e7c175a68 ("examples/l3fwd-power: add high/regular perf cores options")
Fixes: 08bd1a174461 ("examples/l3fwd-graph: add graph-based l3fwd skeleton")
Fixes: d299106e8e31 ("examples/ipsec-secgw: add IPsec sample application")
Signed-off-by: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
examples/ipsec-secgw/ipsec-secgw.c | 4 ++--
examples/l3fwd-graph/main.c | 2 +-
examples/l3fwd-power/main.c | 4 ++--
examples/l3fwd-power/perf_core.c | 4 ++--
examples/l3fwd/main.c | 4 ++--
5 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index cefea36b13..9620d73fc8 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -1049,7 +1049,7 @@ parse_config(const char *q_arg)
int32_t i;
uint32_t size;
uint32_t max_fld[_NUM_FLD] = {
- 255,
+ RTE_MAX_ETHPORTS,
RTE_MAX_QUEUES_PER_PORT,
RTE_MAX_LCORE
};
@@ -1082,7 +1082,7 @@ parse_config(const char *q_arg)
return -1;
}
lcore_params_array[nb_lcore_params].port_id =
- (uint8_t)int_fld[FLD_PORT];
+ (uint16_t)int_fld[FLD_PORT];
lcore_params_array[nb_lcore_params].queue_id =
(uint16_t)int_fld[FLD_QUEUE];
lcore_params_array[nb_lcore_params].lcore_id =
diff --git a/examples/l3fwd-graph/main.c b/examples/l3fwd-graph/main.c
index 563acce331..ec4f156881 100644
--- a/examples/l3fwd-graph/main.c
+++ b/examples/l3fwd-graph/main.c
@@ -354,7 +354,7 @@ parse_config(const char *q_arg)
}
lcore_params_array[nb_lcore_params].port_id =
- (uint8_t)int_fld[FLD_PORT];
+ (uint16_t)int_fld[FLD_PORT];
lcore_params_array[nb_lcore_params].queue_id =
(uint16_t)int_fld[FLD_QUEUE];
lcore_params_array[nb_lcore_params].lcore_id =
diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index bab35d1839..1bcc61e777 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -1780,7 +1780,7 @@ parse_config(const char *q_arg)
int i;
unsigned size;
unsigned int max_fld[_NUM_FLD] = {
- 255,
+ RTE_MAX_ETHPORTS,
RTE_MAX_QUEUES_PER_PORT,
RTE_MAX_LCORE
};
@@ -1812,7 +1812,7 @@ parse_config(const char *q_arg)
return -1;
}
lcore_params_array[nb_lcore_params].port_id =
- (uint8_t)int_fld[FLD_PORT];
+ (uint16_t)int_fld[FLD_PORT];
lcore_params_array[nb_lcore_params].queue_id =
(uint16_t)int_fld[FLD_QUEUE];
lcore_params_array[nb_lcore_params].lcore_id =
diff --git a/examples/l3fwd-power/perf_core.c b/examples/l3fwd-power/perf_core.c
index fbd7864cb9..e4bdb62121 100644
--- a/examples/l3fwd-power/perf_core.c
+++ b/examples/l3fwd-power/perf_core.c
@@ -133,7 +133,7 @@ parse_perf_config(const char *q_arg)
int i;
unsigned int size;
unsigned int max_fld[_NUM_FLD] = {
- 255,
+ RTE_MAX_ETHPORTS,
RTE_MAX_QUEUES_PER_PORT,
255,
RTE_MAX_LCORE
@@ -168,7 +168,7 @@ parse_perf_config(const char *q_arg)
return -1;
}
prf_lc_prms[nb_prf_lc_prms].port_id =
- (uint8_t)int_fld[FLD_PORT];
+ (uint16_t)int_fld[FLD_PORT];
prf_lc_prms[nb_prf_lc_prms].queue_id =
(uint16_t)int_fld[FLD_QUEUE];
prf_lc_prms[nb_prf_lc_prms].high_perf =
diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c
index dca1beabc8..9201019711 100644
--- a/examples/l3fwd/main.c
+++ b/examples/l3fwd/main.c
@@ -493,7 +493,7 @@ parse_config(const char *q_arg)
int i;
unsigned size;
uint16_t max_fld[_NUM_FLD] = {
- 255,
+ RTE_MAX_ETHPORTS,
RTE_MAX_QUEUES_PER_PORT,
RTE_MAX_LCORE
};
@@ -524,7 +524,7 @@ parse_config(const char *q_arg)
return -1;
}
lcore_params_array[nb_lcore_params].port_id =
- (uint8_t)int_fld[FLD_PORT];
+ (uint16_t)int_fld[FLD_PORT];
lcore_params_array[nb_lcore_params].queue_id =
(uint16_t)int_fld[FLD_QUEUE];
lcore_params_array[nb_lcore_params].lcore_id =
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:23.360773176 +0100
+++ 0039-examples-fix-port-ID-restriction.patch 2024-07-24 12:29:20.859027902 +0100
@@ -1 +1 @@
-From 548de9091c85467bd8f05cecf6d32315869d1461 Mon Sep 17 00:00:00 2001
+From 28c93c22f7890e8b0adf17b50a2c4b3448c5f27a Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 548de9091c85467bd8f05cecf6d32315869d1461 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -34 +35 @@
-index 5a7e1b220f..e98ad2572e 100644
+index cefea36b13..9620d73fc8 100644
@@ -56 +57 @@
-index 4396e2bb3c..a13dc01138 100644
+index 563acce331..ec4f156881 100644
@@ -59 +60 @@
-@@ -448,7 +448,7 @@ parse_config(const char *q_arg)
+@@ -354,7 +354,7 @@ parse_config(const char *q_arg)
@@ -69 +70 @@
-index 2976058425..2bb6b092c3 100644
+index bab35d1839..1bcc61e777 100644
@@ -72 +73 @@
-@@ -1659,7 +1659,7 @@ parse_config(const char *q_arg)
+@@ -1780,7 +1780,7 @@ parse_config(const char *q_arg)
@@ -81 +82 @@
-@@ -1691,7 +1691,7 @@ parse_config(const char *q_arg)
+@@ -1812,7 +1812,7 @@ parse_config(const char *q_arg)
@@ -91 +92 @@
-index a0112b57ff..6c0f7ea213 100644
+index fbd7864cb9..e4bdb62121 100644
@@ -113 +114 @@
-index ba7083d4f3..01b763e5ba 100644
+index dca1beabc8..9201019711 100644
@@ -116 +117 @@
-@@ -501,7 +501,7 @@ parse_config(const char *q_arg)
+@@ -493,7 +493,7 @@ parse_config(const char *q_arg)
@@ -125 +126 @@
-@@ -532,7 +532,7 @@ parse_config(const char *q_arg)
+@@ -524,7 +524,7 @@ parse_config(const char *q_arg)
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'doc: remove reference to mbuf pkt field' has been queued to stable release 22.11.6
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
` (37 preceding siblings ...)
2024-07-24 11:33 ` patch 'examples: fix port " luca.boccassi
@ 2024-07-24 11:33 ` luca.boccassi
2024-07-29 23:33 ` patch 'examples/ipsec-secgw: revert SA salt endianness' " luca.boccassi
38 siblings, 1 reply; 210+ messages in thread
From: luca.boccassi @ 2024-07-24 11:33 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e22481034081e91d5a4dd181b228acf25970933b
Thanks.
Luca Boccassi
---
From e22481034081e91d5a4dd181b228acf25970933b Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 3 Jul 2024 18:09:23 -0700
Subject: [PATCH] doc: remove reference to mbuf pkt field
[ upstream commit d9d1be537ea777059711ac313019ecd94840daba ]
The pkt union in mbuf was removed way back in 2014 but there
still was one leftover in the mbuf figure.
Fixes: ea672a8b1655 ("mbuf: remove the rte_pktmbuf structure")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
doc/guides/prog_guide/img/mbuf1.svg | 2 +-
doc/guides/prog_guide/img/mbuf2.svg | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/doc/guides/prog_guide/img/mbuf1.svg b/doc/guides/prog_guide/img/mbuf1.svg
index a08bf3b6c0..111a874c00 100644
--- a/doc/guides/prog_guide/img/mbuf1.svg
+++ b/doc/guides/prog_guide/img/mbuf1.svg
@@ -487,7 +487,7 @@
sodipodi:role="line"
id="tspan5256"
x="59.842155"
- y="282.37683">m->pkt.next = NULL</tspan></text>
+ y="282.37683">m->next = NULL</tspan></text>
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
diff --git a/doc/guides/prog_guide/img/mbuf2.svg b/doc/guides/prog_guide/img/mbuf2.svg
index f6fdb54002..6a80cbc200 100644
--- a/doc/guides/prog_guide/img/mbuf2.svg
+++ b/doc/guides/prog_guide/img/mbuf2.svg
@@ -1074,7 +1074,7 @@
sodipodi:role="line"
id="tspan5256-8"
x="527.19458"
- y="628.45935">m->pkt.next = NULL</tspan></text>
+ y="628.45935">m->next = NULL</tspan></text>
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
@@ -1084,7 +1084,7 @@
sodipodi:role="line"
id="tspan5256-8-3"
x="330.50363"
- y="628.45935">m->pkt.next = mseg3</tspan></text>
+ y="628.45935">m->next = mseg3</tspan></text>
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
@@ -1094,7 +1094,7 @@
sodipodi:role="line"
id="tspan5256-8-3-4"
x="144.79388"
- y="628.45935">m->pkt.next = mseg2</tspan></text>
+ y="628.45935">m->next = mseg2</tspan></text>
<text
xml:space="preserve"
style="font-size:10px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-24 12:29:23.406138417 +0100
+++ 0040-doc-remove-reference-to-mbuf-pkt-field.patch 2024-07-24 12:29:20.859027902 +0100
@@ -1 +1 @@
-From d9d1be537ea777059711ac313019ecd94840daba Mon Sep 17 00:00:00 2001
+From e22481034081e91d5a4dd181b228acf25970933b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d9d1be537ea777059711ac313019ecd94840daba ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'examples/ipsec-secgw: revert SA salt endianness' has been queued to stable release 22.11.6
2024-07-24 11:33 ` patch 'doc: remove reference to mbuf pkt field' " luca.boccassi
@ 2024-07-29 23:33 ` luca.boccassi
2024-07-29 23:33 ` patch 'doc: fix mbuf flags' " luca.boccassi
2024-07-29 23:33 ` patch 'doc: add baseline mode in l3fwd-power guide' " luca.boccassi
0 siblings, 2 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-29 23:33 UTC (permalink / raw)
To: Vladimir Medvedkin; +Cc: Radu Nicolau, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/01/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/ff2d7af17a475be45fc4eb309134f2b12b37c5b7
Thanks.
Luca Boccassi
---
From ff2d7af17a475be45fc4eb309134f2b12b37c5b7 Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Date: Mon, 29 Jul 2024 12:57:54 +0000
Subject: [PATCH] examples/ipsec-secgw: revert SA salt endianness
[ upstream commit 7f9b2c926a5192440eaecf0cb80cc45ac8d9a0f2 ]
The previous commit swapped the bytes of SA salt which
led to incorrect work of the ipsec-secgw application.
This patch reverts the previous commit and changes
the type of the salt field in the ipsec_sa structure.
Fixes: e6bfd9676109 ("examples/ipsec-secgw: fix SA salt endianness")
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
---
examples/ipsec-secgw/ipsec.h | 2 +-
examples/ipsec-secgw/sa.c | 13 ++++++-------
2 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/examples/ipsec-secgw/ipsec.h b/examples/ipsec-secgw/ipsec.h
index 5217e28f8a..13694ee1e0 100644
--- a/examples/ipsec-secgw/ipsec.h
+++ b/examples/ipsec-secgw/ipsec.h
@@ -117,7 +117,7 @@ struct ipsec_sa {
uint32_t spi;
struct cdev_qp *cqp[RTE_MAX_LCORE];
uint64_t seq;
- uint32_t salt;
+ rte_be32_t salt;
uint32_t fallback_sessions;
enum rte_crypto_cipher_algorithm cipher_algo;
enum rte_crypto_auth_algorithm auth_algo;
diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c
index c7a655003f..45cd29f18b 100644
--- a/examples/ipsec-secgw/sa.c
+++ b/examples/ipsec-secgw/sa.c
@@ -373,7 +373,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
uint32_t ti; /*token index*/
uint32_t *ri /*rule index*/;
struct ipsec_sa_cnt *sa_cnt;
- rte_be32_t salt; /*big-endian salt*/
uint32_t cipher_algo_p = 0;
uint32_t auth_algo_p = 0;
uint32_t aead_algo_p = 0;
@@ -508,8 +507,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
if (algo->algo == RTE_CRYPTO_CIPHER_AES_CTR) {
key_len -= 4;
rule->cipher_key_len = key_len;
- memcpy(&salt, &rule->cipher_key[key_len], 4);
- rule->salt = rte_be_to_cpu_32(salt);
+ memcpy(&rule->salt,
+ &rule->cipher_key[key_len], 4);
}
cipher_algo_p = 1;
@@ -573,8 +572,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
key_len -= 4;
rule->auth_key_len = key_len;
rule->iv_len = algo->iv_len;
- memcpy(&salt, &rule->auth_key[key_len], 4);
- rule->salt = rte_be_to_cpu_32(salt);
+ memcpy(&rule->salt,
+ &rule->auth_key[key_len], 4);
}
auth_algo_p = 1;
@@ -632,8 +631,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
key_len -= 4;
rule->cipher_key_len = key_len;
- memcpy(&salt, &rule->cipher_key[key_len], 4);
- rule->salt = rte_be_to_cpu_32(salt);
+ memcpy(&rule->salt,
+ &rule->cipher_key[key_len], 4);
aead_algo_p = 1;
continue;
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-30 00:33:03.359903055 +0100
+++ 0001-examples-ipsec-secgw-revert-SA-salt-endianness.patch 2024-07-30 00:33:03.301030141 +0100
@@ -1 +1 @@
-From 7f9b2c926a5192440eaecf0cb80cc45ac8d9a0f2 Mon Sep 17 00:00:00 2001
+From ff2d7af17a475be45fc4eb309134f2b12b37c5b7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7f9b2c926a5192440eaecf0cb80cc45ac8d9a0f2 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index a83fd2283b..1fe6b97168 100644
+index 5217e28f8a..13694ee1e0 100644
@@ -25 +26 @@
-@@ -117,7 +117,7 @@ struct __rte_cache_aligned ipsec_sa {
+@@ -117,7 +117,7 @@ struct ipsec_sa {
@@ -35 +36 @@
-index 8aa9aca739..c4bac17cd7 100644
+index c7a655003f..45cd29f18b 100644
@@ -38 +39 @@
-@@ -374,7 +374,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
+@@ -373,7 +373,6 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
@@ -46 +47 @@
-@@ -509,8 +508,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
+@@ -508,8 +507,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
@@ -57 +58 @@
-@@ -574,8 +573,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
+@@ -573,8 +572,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
@@ -68 +69 @@
-@@ -633,8 +632,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
+@@ -632,8 +631,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'doc: fix mbuf flags' has been queued to stable release 22.11.6
2024-07-29 23:33 ` patch 'examples/ipsec-secgw: revert SA salt endianness' " luca.boccassi
@ 2024-07-29 23:33 ` luca.boccassi
2024-07-29 23:33 ` patch 'doc: add baseline mode in l3fwd-power guide' " luca.boccassi
1 sibling, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-29 23:33 UTC (permalink / raw)
To: Yingming Mao; +Cc: Shuo Li, dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/01/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b9c8076d92f67cf300f707d3e7fa3f30b207b221
Thanks.
Luca Boccassi
---
From b9c8076d92f67cf300f707d3e7fa3f30b207b221 Mon Sep 17 00:00:00 2001
From: Yingming Mao <maoyingming@baidu.com>
Date: Thu, 18 Apr 2024 14:20:25 +0800
Subject: [PATCH] doc: fix mbuf flags
[ upstream commit 1d9077d101b5c9ac2f841a82187ef5ced0fc7f43 ]
Fixes: 2542ad53d867 ("doc: add description of the offload API")
Fixes: ae2c2cb60635 ("net/cnxk: avoid command copy from Tx queue")
Signed-off-by: Yingming Mao <maoyingming@baidu.com>
Reviewed-by: Shuo Li <lishuo02@baidu.com>
---
.mailmap | 3 ++-
doc/guides/prog_guide/mbuf_lib.rst | 8 ++++----
drivers/net/cnxk/cn10k_tx.h | 2 +-
drivers/net/cnxk/cn9k_tx.h | 2 +-
4 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/.mailmap b/.mailmap
index 0398b858fb..b0d505e36d 100644
--- a/.mailmap
+++ b/.mailmap
@@ -830,7 +830,6 @@ Mandeep Rohilla <mrohilla@brocade.com>
Manish Chopra <manishc@marvell.com>
Manish Tomar <manish.tomar@nxp.com>
Mao Jiang <maox.jiang@intel.com>
-Mao YingMing <maoyingming@baidu.com>
Marcel Apfelbaum <marcel@redhat.com>
Marcel Cornu <marcel.d.cornu@intel.com>
Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
@@ -1271,6 +1270,7 @@ Shuanglin Wang <shuanglin.wang@broadcom.com>
Shuki Katzenelson <shuki@lightbitslabs.com>
Shun Hao <shunh@nvidia.com>
Shu Shen <shu.shen@radisys.com>
+Shuo Li <lishuo02@baidu.com>
Shweta Choudaha <shweta.choudaha@att.com>
Shyam Kumar Shrivastav <shrivastav.shyam@gmail.com>
Shy Shyman <shys@nvidia.com> <shys@mellanox.com>
@@ -1567,6 +1567,7 @@ Yi Lu <luyi68@live.com>
Yilun Xu <yilun.xu@intel.com>
Yinan Wang <yinan.wang@intel.com>
Ying A Wang <ying.a.wang@intel.com>
+Yingming Mao <maoyingming@baidu.com>
Yingya Han <yingyax.han@intel.com>
Yinjun Zhang <yinjun.zhang@corigine.com>
Yipeng Wang <yipeng1.wang@intel.com>
diff --git a/doc/guides/prog_guide/mbuf_lib.rst b/doc/guides/prog_guide/mbuf_lib.rst
index 049357c755..749f9c97a8 100644
--- a/doc/guides/prog_guide/mbuf_lib.rst
+++ b/doc/guides/prog_guide/mbuf_lib.rst
@@ -134,7 +134,7 @@ a vxlan-encapsulated tcp packet:
mb->l2_len = len(out_eth)
mb->l3_len = len(out_ip)
- mb->ol_flags |= RTE_MBUF_F_TX_IPV4 | RTE_MBUF_F_TX_IP_CSUM
+ mb->ol_flags |= RTE_MBUF_F_TX_IPV4 | RTE_MBUF_F_TX_IP_CKSUM
set out_ip checksum to 0 in the packet
This is supported on hardware advertising RTE_ETH_TX_OFFLOAD_IPV4_CKSUM.
@@ -143,7 +143,7 @@ a vxlan-encapsulated tcp packet:
mb->l2_len = len(out_eth)
mb->l3_len = len(out_ip)
- mb->ol_flags |= RTE_MBUF_F_TX_IPV4 | RTE_MBUF_F_TX_IP_CSUM | RTE_MBUF_F_TX_UDP_CKSUM
+ mb->ol_flags |= RTE_MBUF_F_TX_IPV4 | RTE_MBUF_F_TX_IP_CKSUM | RTE_MBUF_F_TX_UDP_CKSUM
set out_ip checksum to 0 in the packet
set out_udp checksum to pseudo header using rte_ipv4_phdr_cksum()
@@ -154,7 +154,7 @@ a vxlan-encapsulated tcp packet:
mb->l2_len = len(out_eth + out_ip + out_udp + vxlan + in_eth)
mb->l3_len = len(in_ip)
- mb->ol_flags |= RTE_MBUF_F_TX_IPV4 | RTE_MBUF_F_TX_IP_CSUM
+ mb->ol_flags |= RTE_MBUF_F_TX_IPV4 | RTE_MBUF_F_TX_IP_CKSUM
set in_ip checksum to 0 in the packet
This is similar to case 1), but l2_len is different. It is supported
@@ -165,7 +165,7 @@ a vxlan-encapsulated tcp packet:
mb->l2_len = len(out_eth + out_ip + out_udp + vxlan + in_eth)
mb->l3_len = len(in_ip)
- mb->ol_flags |= RTE_MBUF_F_TX_IPV4 | RTE_MBUF_F_TX_IP_CSUM | RTE_MBUF_F_TX_TCP_CKSUM
+ mb->ol_flags |= RTE_MBUF_F_TX_IPV4 | RTE_MBUF_F_TX_IP_CKSUM | RTE_MBUF_F_TX_TCP_CKSUM
set in_ip checksum to 0 in the packet
set in_tcp checksum to pseudo header using rte_ipv4_phdr_cksum()
diff --git a/drivers/net/cnxk/cn10k_tx.h b/drivers/net/cnxk/cn10k_tx.h
index e96030621b..cd9b1f225e 100644
--- a/drivers/net/cnxk/cn10k_tx.h
+++ b/drivers/net/cnxk/cn10k_tx.h
@@ -898,7 +898,7 @@ cn10k_nix_xmit_prepare_tstamp(struct cn10k_eth_txq *txq, uintptr_t lmt_addr,
struct nix_send_mem_s *send_mem;
send_mem = (struct nix_send_mem_s *)(lmt + off);
- /* Packets for which PKT_TX_IEEE1588_TMST is not set, tx tstamp
+ /* Packets for which RTE_MBUF_F_TX_IEEE1588_TMST is not set, Tx tstamp
* should not be recorded, hence changing the alg type to
* NIX_SENDMEMALG_SUB and also changing send mem addr field to
* next 8 bytes as it corrupts the actual Tx tstamp registered
diff --git a/drivers/net/cnxk/cn9k_tx.h b/drivers/net/cnxk/cn9k_tx.h
index 257f1ce1aa..33db781abe 100644
--- a/drivers/net/cnxk/cn9k_tx.h
+++ b/drivers/net/cnxk/cn9k_tx.h
@@ -355,7 +355,7 @@ cn9k_nix_xmit_prepare_tstamp(struct cn9k_eth_txq *txq, uint64_t *cmd,
send_mem = (struct nix_send_mem_s *)(cmd + off);
- /* Packets for which PKT_TX_IEEE1588_TMST is not set, tx tstamp
+ /* Packets for which RTE_MBUF_F_TX_IEEE1588_TMST is not set, Tx tstamp
* should not be recorded, hence changing the alg type to
* NIX_SENDMEMALG_SUB and also changing send mem addr field to
* next 8 bytes as it corrupts the actual Tx tstamp registered
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-30 00:33:03.408914046 +0100
+++ 0002-doc-fix-mbuf-flags.patch 2024-07-30 00:33:03.317030472 +0100
@@ -1 +1 @@
-From 1d9077d101b5c9ac2f841a82187ef5ced0fc7f43 Mon Sep 17 00:00:00 2001
+From b9c8076d92f67cf300f707d3e7fa3f30b207b221 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1d9077d101b5c9ac2f841a82187ef5ced0fc7f43 ]
+
@@ -8 +9,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 8aef1c59a4..4a508bafad 100644
+index 0398b858fb..b0d505e36d 100644
@@ -23,2 +24,2 @@
-@@ -893,7 +893,6 @@ Manish Chopra <manishc@marvell.com>
- Manish Kurup <manish.kurup@broadcom.com>
+@@ -830,7 +830,6 @@ Mandeep Rohilla <mrohilla@brocade.com>
+ Manish Chopra <manishc@marvell.com>
@@ -31 +32,2 @@
-@@ -1371,6 +1370,7 @@ Shuki Katzenelson <shuki@lightbitslabs.com>
+@@ -1271,6 +1270,7 @@ Shuanglin Wang <shuanglin.wang@broadcom.com>
+ Shuki Katzenelson <shuki@lightbitslabs.com>
@@ -34 +35,0 @@
- Shujing Dong <shujing.dong@corigine.com>
@@ -39 +40 @@
-@@ -1684,6 +1684,7 @@ Yi Lu <luyi68@live.com>
+@@ -1567,6 +1567,7 @@ Yi Lu <luyi68@live.com>
@@ -88 +89 @@
-index 84b08403c0..7d9b259a5f 100644
+index e96030621b..cd9b1f225e 100644
@@ -91 +92 @@
-@@ -1242,7 +1242,7 @@ cn10k_nix_xmit_prepare_tstamp(struct cn10k_eth_txq *txq, uintptr_t lmt_addr,
+@@ -898,7 +898,7 @@ cn10k_nix_xmit_prepare_tstamp(struct cn10k_eth_txq *txq, uintptr_t lmt_addr,
@@ -101 +102 @@
-index b56881c561..9370985864 100644
+index 257f1ce1aa..33db781abe 100644
@@ -104 +105 @@
-@@ -560,7 +560,7 @@ cn9k_nix_xmit_prepare_tstamp(struct cn9k_eth_txq *txq, uint64_t *cmd,
+@@ -355,7 +355,7 @@ cn9k_nix_xmit_prepare_tstamp(struct cn9k_eth_txq *txq, uint64_t *cmd,
^ permalink raw reply [flat|nested] 210+ messages in thread
* patch 'doc: add baseline mode in l3fwd-power guide' has been queued to stable release 22.11.6
2024-07-29 23:33 ` patch 'examples/ipsec-secgw: revert SA salt endianness' " luca.boccassi
2024-07-29 23:33 ` patch 'doc: fix mbuf flags' " luca.boccassi
@ 2024-07-29 23:33 ` luca.boccassi
1 sibling, 0 replies; 210+ messages in thread
From: luca.boccassi @ 2024-07-29 23:33 UTC (permalink / raw)
To: Karen Kelly; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 22.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/01/24. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/29857b82e41214504b88989265d077516cd5e985
Thanks.
Luca Boccassi
---
From 29857b82e41214504b88989265d077516cd5e985 Mon Sep 17 00:00:00 2001
From: Karen Kelly <karen.kelly@intel.com>
Date: Tue, 16 Apr 2024 15:20:35 +0200
Subject: [PATCH] doc: add baseline mode in l3fwd-power guide
[ upstream commit 40b46770b0fc5c39b4987067780a6e92e1b30ea8 ]
Updating PMD Power Management Mode section of the l3fwd-power
sample app to add baseline option as this was missing from the
original commit.
Fixes: a9ea60702ecb ("examples/l3fwd-power: add baseline PMD management mode")
Signed-off-by: Karen Kelly <karen.kelly@intel.com>
---
doc/guides/sample_app_ug/l3_forward_power_man.rst | 3 +++
1 file changed, 3 insertions(+)
diff --git a/doc/guides/sample_app_ug/l3_forward_power_man.rst b/doc/guides/sample_app_ug/l3_forward_power_man.rst
index fa3ef67c08..d2192eaa53 100644
--- a/doc/guides/sample_app_ug/l3_forward_power_man.rst
+++ b/doc/guides/sample_app_ug/l3_forward_power_man.rst
@@ -350,6 +350,9 @@ will use automatic PMD power management.
This mode is limited to one queue per core,
and has three available power management schemes:
+``baseline``
+ This mode will not enable any power saving features.
+
``monitor``
This will use ``rte_power_monitor()`` function to enter
a power-optimized state (subject to platform support).
--
2.39.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-30 00:33:03.465386984 +0100
+++ 0003-doc-add-baseline-mode-in-l3fwd-power-guide.patch 2024-07-30 00:33:03.317030472 +0100
@@ -1 +1 @@
-From 40b46770b0fc5c39b4987067780a6e92e1b30ea8 Mon Sep 17 00:00:00 2001
+From 29857b82e41214504b88989265d077516cd5e985 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 40b46770b0fc5c39b4987067780a6e92e1b30ea8 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 4a6f33bf4f..9c9684fea7 100644
+index fa3ef67c08..d2192eaa53 100644
@@ -22 +23 @@
-@@ -280,6 +280,9 @@ will use automatic PMD power management.
+@@ -350,6 +350,9 @@ will use automatic PMD power management.
^ permalink raw reply [flat|nested] 210+ messages in thread
end of thread, other threads:[~2024-07-29 23:33 UTC | newest]
Thread overview: 210+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' has been queued to stable release 22.11.6 luca.boccassi
2024-06-24 23:57 ` patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' " luca.boccassi
2024-06-24 23:57 ` patch 'eal/unix: support ZSTD compression for firmware' " luca.boccassi
2024-06-24 23:57 ` patch 'pcapng: add memcpy check' " luca.boccassi
2024-06-24 23:57 ` patch 'net/virtio-user: " luca.boccassi
2024-06-24 23:57 ` patch 'eal/windows: install sched.h file' " luca.boccassi
2024-06-24 23:57 ` patch 'latencystats: fix literal float suffix' " luca.boccassi
2024-06-24 23:57 ` patch 'net/nfp: fix representor port queue release' " luca.boccassi
2024-06-24 23:57 ` patch 'net/bonding: fix failover time of LACP with mode 4' " luca.boccassi
2024-06-24 23:57 ` patch 'net/hns3: fix offload flag of IEEE 1588' " luca.boccassi
2024-06-24 23:57 ` patch 'net/hns3: fix Rx timestamp flag' " luca.boccassi
2024-06-24 23:57 ` patch 'net/hns3: fix double free for Rx/Tx queue' " luca.boccassi
2024-06-24 23:57 ` patch 'net/hns3: fix variable overflow' " luca.boccassi
2024-06-24 23:58 ` patch 'net/hns3: disable SCTP verification tag for RSS hash input' " luca.boccassi
2024-06-24 23:58 ` patch 'net/af_packet: align Rx/Tx structs to cache line' " luca.boccassi
2024-06-24 23:58 ` patch 'doc: fix testpmd ring size command' " luca.boccassi
2024-06-24 23:58 ` patch 'net/af_xdp: fix port ID in Rx mbuf' " luca.boccassi
2024-06-24 23:58 ` patch 'net/af_xdp: count mbuf allocation failures' " luca.boccassi
2024-06-24 23:58 ` patch 'net/af_xdp: fix stats reset' " luca.boccassi
2024-06-24 23:58 ` patch 'net/af_xdp: remove unused local statistic' " luca.boccassi
2024-06-24 23:58 ` patch 'net/tap: fix file descriptor check in isolated flow' " luca.boccassi
2024-06-24 23:58 ` patch 'net/axgbe: fix MDIO access for non-zero ports and CL45 PHYs' " luca.boccassi
2024-06-24 23:58 ` patch 'net/axgbe: reset link when link never comes back' " luca.boccassi
2024-06-24 23:58 ` patch 'net/axgbe: fix fluctuations for 1G Bel Fuse SFP' " luca.boccassi
2024-06-24 23:58 ` patch 'net/axgbe: update DMA coherency values' " luca.boccassi
2024-06-24 23:58 ` patch 'net/axgbe: disable interrupts during device removal' " luca.boccassi
2024-06-24 23:58 ` patch 'net/axgbe: disable RRC for yellow carp devices' " luca.boccassi
2024-06-24 23:58 ` patch 'net/axgbe: enable PLL control for fixed PHY modes only' " luca.boccassi
2024-06-24 23:58 ` patch 'net/axgbe: fix SFP codes check for DAC cables' " luca.boccassi
2024-06-24 23:58 ` patch 'net/axgbe: fix connection for SFP+ active " luca.boccassi
2024-06-24 23:58 ` patch 'net/axgbe: check only minimum speed for " luca.boccassi
2024-06-24 23:58 ` patch 'net/axgbe: fix Tx flow on 30H HW' " luca.boccassi
2024-06-24 23:58 ` patch 'net/axgbe: delay AN timeout during KR training' " luca.boccassi
2024-06-24 23:58 ` patch 'net/axgbe: fix linkup in PHY status' " luca.boccassi
2024-06-24 23:58 ` patch 'net/ice: fix check for outer UDP checksum offload' " luca.boccassi
2024-06-24 23:58 ` patch 'app/testpmd: fix outer IP " luca.boccassi
2024-06-24 23:58 ` patch 'net: fix outer UDP checksum in Intel prepare helper' " luca.boccassi
2024-06-24 23:58 ` patch 'net/i40e: fix outer UDP checksum offload for X710' " luca.boccassi
2024-06-24 23:58 ` patch 'net/iavf: remove outer UDP checksum offload for X710 VF' " luca.boccassi
2024-06-24 23:58 ` patch 'app/testpmd: fix lcore ID restriction' " luca.boccassi
2024-06-24 23:58 ` patch 'hash: fix return code description in Doxygen' " luca.boccassi
2024-06-24 23:58 ` patch 'hash: check name when creating a hash' " luca.boccassi
2024-06-24 23:58 ` patch 'mempool: replace GCC pragma with cast' " luca.boccassi
2024-06-24 23:58 ` patch 'vhost: fix build with GCC 13' " luca.boccassi
2024-06-24 23:58 ` patch 'vhost: cleanup resubmit info before inflight setup' " luca.boccassi
2024-06-24 23:58 ` patch 'net/virtio: fix MAC table update' " luca.boccassi
2024-06-24 23:58 ` patch 'baseband/acc: fix memory barrier' " luca.boccassi
2024-06-24 23:58 ` patch 'event/sw: fix warning from useless snprintf' " luca.boccassi
2024-06-24 23:58 ` patch 'eventdev/crypto: fix opaque field handling' " luca.boccassi
2024-06-24 23:58 ` patch 'eal: fix logs for '--lcores'' " luca.boccassi
2024-06-24 23:58 ` patch 'net/fm10k: fix cleanup during init failure' " luca.boccassi
2024-06-24 23:58 ` patch 'net/ixgbe: do not update link status in secondary process' " luca.boccassi
2024-06-24 23:58 ` patch 'net/ixgbe: do not create delayed interrupt handler twice' " luca.boccassi
2024-06-24 23:58 ` patch 'net/e1000/base: fix link power down' " luca.boccassi
2024-06-24 23:58 ` patch 'net/ixgbe/base: revert advertising for X550 2.5G/5G' " luca.boccassi
2024-06-24 23:58 ` patch 'net/ixgbe/base: fix 5G link speed reported on VF' " luca.boccassi
2024-06-24 23:58 ` patch 'net/ixgbe/base: fix PHY ID for X550' " luca.boccassi
2024-06-24 23:58 ` patch 'net/cnxk: fix RSS config' " luca.boccassi
2024-06-24 23:58 ` patch 'net/cnxk: fix outbound security with higher packet burst' " luca.boccassi
2024-06-24 23:58 ` patch 'net/cnxk: fix promiscuous state after MAC change' " luca.boccassi
2024-06-24 23:58 ` patch 'graph: fix ID collisions' " luca.boccassi
2024-06-24 23:58 ` patch 'bpf: disable on 32-bit x86' " luca.boccassi
2024-06-24 23:58 ` patch 'hash: fix RCU reclamation size' " luca.boccassi
2024-06-24 23:58 ` patch 'common/mlx5: fix unsigned/signed mismatch' " luca.boccassi
2024-06-24 23:58 ` patch 'net/mlx5/hws: decrease log level for creation failure' " luca.boccassi
2024-06-24 23:58 ` patch 'common/mlx5: fix PRM structs' " luca.boccassi
2024-06-24 23:58 ` patch 'net/mlx5/hws: fix function comment' " luca.boccassi
2024-06-24 23:58 ` patch 'net/mlx5/hws: fix spinlock release on context open' " luca.boccassi
2024-06-24 23:58 ` patch 'net/mlx5/hws: add template match none flag' " luca.boccassi
2024-06-24 23:58 ` patch 'net/mlx5/hws: fix action template dump' " luca.boccassi
2024-06-24 23:58 ` patch 'net/mlx5: fix indexed pool with invalid index' " luca.boccassi
2024-06-24 23:58 ` patch 'net/mlx5: fix hash Rx queue release in flow sample' " luca.boccassi
2024-06-24 23:58 ` patch 'net/mlx5: fix flow template indirect action failure' " luca.boccassi
2024-06-24 23:59 ` patch 'net/mlx5: break flow resource release loop' " luca.boccassi
2024-06-24 23:59 ` patch 'net/mlx5: fix access to flow template operations' " luca.boccassi
2024-06-24 23:59 ` patch 'net/mlx5: support jump in meter hierarchy' " luca.boccassi
2024-06-24 23:59 ` patch 'net/mlx5: fix crash on counter pool destroy' " luca.boccassi
2024-06-24 23:59 ` patch 'test/crypto: fix enqueue/dequeue callback case' " luca.boccassi
2024-06-24 23:59 ` patch 'telemetry: lower log level on socket error' " luca.boccassi
2024-06-24 23:59 ` patch 'bus/vdev: revert fix devargs in secondary process' " luca.boccassi
2024-06-24 23:59 ` patch 'doc: fix link to hugepage mapping from Linux guide' " luca.boccassi
2024-07-15 15:25 ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
2024-07-15 15:25 ` patch 'build: use builtin helper for python dependencies' " luca.boccassi
2024-07-15 15:25 ` patch 'app/bbdev: fix interrupt tests' " luca.boccassi
2024-07-15 15:25 ` patch 'dmadev: fix structure alignment' " luca.boccassi
2024-07-15 15:25 ` patch 'vdpa/sfc: remove dead code' " luca.boccassi
2024-07-15 15:25 ` patch 'mbuf: fix dynamic fields copy' " luca.boccassi
2024-07-15 15:25 ` patch 'bpf: fix MOV instruction evaluation' " luca.boccassi
2024-07-15 15:25 ` patch 'bpf: fix load hangs with six IPv6 addresses' " luca.boccassi
2024-07-15 15:25 ` patch 'telemetry: fix connection parameter parsing' " luca.boccassi
2024-07-15 15:25 ` patch 'baseband/la12xx: forbid secondary process' " luca.boccassi
2024-07-15 15:25 ` patch 'app/crypto-perf: remove redundant local variable' " luca.boccassi
2024-07-15 15:25 ` patch 'app/crypto-perf: fix result for asymmetric' " luca.boccassi
2024-07-15 15:25 ` patch 'crypto/cnxk: fix minimal input normalization' " luca.boccassi
2024-07-15 15:25 ` patch 'cryptodev: fix build without crypto callbacks' " luca.boccassi
2024-07-15 15:25 ` patch 'cryptodev: validate crypto callbacks from next node' " luca.boccassi
2024-07-15 15:25 ` patch 'examples/fips_validation: fix dereference and out-of-bound' " luca.boccassi
2024-07-15 15:25 ` patch 'crypto/openssl: fix GCM and CCM thread unsafe contexts' " luca.boccassi
2024-07-15 15:25 ` patch 'crypto/openssl: optimize 3DES-CTR context init' " luca.boccassi
2024-07-15 15:25 ` patch 'crypto/openssl: make per-QP cipher context clones' " luca.boccassi
2024-07-15 15:25 ` patch 'crypto/openssl: make per-QP auth " luca.boccassi
2024-07-15 15:25 ` patch 'crypto/openssl: set cipher padding once' " luca.boccassi
2024-07-15 15:26 ` patch 'common/dpaax/caamflib: fix PDCP-SDAP watchdog error' " luca.boccassi
2024-07-15 15:26 ` patch 'common/dpaax/caamflib: fix PDCP AES-AES " luca.boccassi
2024-07-15 15:26 ` patch 'crypto/dpaa_sec: fix IPsec descriptor' " luca.boccassi
2024-07-15 15:26 ` patch 'crypto/dpaa2_sec: fix event queue user context' " luca.boccassi
2024-07-15 15:26 ` patch 'examples/ipsec-secgw: fix SA salt endianness' " luca.boccassi
2024-07-15 15:26 ` patch 'fbarray: fix incorrect lookahead behavior' " luca.boccassi
2024-07-15 15:26 ` patch 'fbarray: fix incorrect lookbehind " luca.boccassi
2024-07-15 15:26 ` patch 'fbarray: fix lookahead ignore mask handling' " luca.boccassi
2024-07-15 15:26 ` patch 'fbarray: fix lookbehind " luca.boccassi
2024-07-15 15:26 ` patch 'usertools/devbind: fix indentation' " luca.boccassi
2024-07-15 15:26 ` patch 'eal/linux: lower log level on allocation attempt failure' " luca.boccassi
2024-07-15 15:26 ` patch 'dma/idxd: fix setup with Ubuntu 24.04' " luca.boccassi
2024-07-15 15:26 ` patch 'app/testpmd: fix help string of BPF load command' " luca.boccassi
2024-07-15 15:26 ` patch 'bus/dpaa: fix bus scan for DMA devices' " luca.boccassi
2024-07-15 15:26 ` patch 'bus/dpaa: fix memory leak in bus scan' " luca.boccassi
2024-07-15 15:26 ` patch 'common/dpaax: fix IOVA table cleanup' " luca.boccassi
2024-07-15 15:26 ` patch 'common/dpaax: fix node array overrun' " luca.boccassi
2024-07-15 15:26 ` patch 'bus/dpaa: remove redundant file descriptor check' " luca.boccassi
2024-07-15 15:26 ` patch 'net/dpaa: forbid MTU configuration for shared interface' " luca.boccassi
2024-07-15 15:26 ` patch 'net/mlx5: fix start without duplicate flow patterns' " luca.boccassi
2024-07-15 15:26 ` patch 'fbarray: fix finding for unaligned length' " luca.boccassi
2024-07-15 15:26 ` patch 'buildtools: fix build with clang 17 and ASan' " luca.boccassi
2024-07-15 15:26 ` patch 'net/ice/base: fix pointer to variable outside scope' " luca.boccassi
2024-07-15 15:26 ` patch 'net/ice/base: fix memory leak in firmware version check' " luca.boccassi
2024-07-15 15:26 ` patch 'net/ice/base: fix sign extension' " luca.boccassi
2024-07-15 15:26 ` patch 'net/ice/base: fix size when allocating children arrays' " luca.boccassi
2024-07-15 15:26 ` patch 'net/ice/base: fix GCS descriptor field offsets' " luca.boccassi
2024-07-15 15:26 ` patch 'net/ice/base: fix return type of bitmap hamming weight' " luca.boccassi
2024-07-15 15:26 ` patch 'net/ice/base: fix check for existing switch rule' " luca.boccassi
2024-07-15 15:26 ` patch 'net/ice/base: fix potential TLV length overflow' " luca.boccassi
2024-07-15 15:26 ` patch 'net/ice/base: fix board type definition' " luca.boccassi
2024-07-15 15:26 ` patch 'net/ice/base: fix preparing PHY for timesync command' " luca.boccassi
2024-07-15 15:26 ` patch 'net/ice/base: fix masking when reading context' " luca.boccassi
2024-07-15 15:26 ` patch 'common/idpf: fix flex descriptor mask' " luca.boccassi
2024-07-15 15:26 ` patch 'net/ice: fix sizing of filter hash table' " luca.boccassi
2024-07-15 15:26 ` patch 'app/testpmd: handle IEEE1588 init failure' " luca.boccassi
2024-07-15 15:26 ` patch 'doc: remove empty section from testpmd guide' " luca.boccassi
2024-07-15 15:26 ` patch 'app/testpmd: fix parsing for connection tracking item' " luca.boccassi
2024-07-15 15:26 ` patch 'net/txgbe: fix tunnel packet parsing' " luca.boccassi
2024-07-15 15:26 ` patch 'net/txgbe: fix flow filters in VT mode' " luca.boccassi
2024-07-15 15:26 ` patch 'net/txgbe: fix Tx hang on queue disable' " luca.boccassi
2024-07-15 15:26 ` patch 'net/txgbe: restrict configuration of VLAN strip offload' " luca.boccassi
2024-07-15 15:26 ` patch 'net/txgbe: reconfigure more MAC Rx registers' " luca.boccassi
2024-07-15 15:26 ` patch 'net/txgbe: fix VF promiscuous and allmulticast' " luca.boccassi
2024-07-15 15:26 ` patch 'net/ngbe: add special config for YT8531SH-CA PHY' " luca.boccassi
2024-07-15 15:26 ` patch 'net/ngbe: keep PHY power down while device probing' " luca.boccassi
2024-07-15 15:26 ` patch 'net/txgbe: fix hotplug remove' " luca.boccassi
2024-07-15 15:26 ` patch 'net/ngbe: " luca.boccassi
2024-07-15 15:26 ` patch 'net/txgbe: fix MTU range' " luca.boccassi
2024-07-15 15:26 ` patch 'net/ngbe: " luca.boccassi
2024-07-15 15:26 ` patch 'net/txgbe: fix memory leaks' " luca.boccassi
2024-07-15 15:26 ` patch 'net/ngbe: " luca.boccassi
2024-07-15 15:26 ` patch 'net/txgbe: fix Rx interrupt' " luca.boccassi
2024-07-15 15:26 ` patch 'net/vmxnet3: fix init logs' " luca.boccassi
2024-07-15 15:26 ` patch 'net/nfp: fix IPv6 TTL and DSCP flow action' " luca.boccassi
2024-07-15 15:26 ` patch 'net/nfp: fix allocation of switch domain' " luca.boccassi
2024-07-15 15:26 ` patch 'net/ionic: fix mbuf double-free when emptying array' " luca.boccassi
2024-07-15 15:26 ` patch 'net/nfp: disable ctrl VNIC queues on close' " luca.boccassi
2024-07-15 15:26 ` patch 'net/ena: fix bad checksum handling' " luca.boccassi
2024-07-15 15:26 ` patch 'net/ena: fix return value check' " luca.boccassi
2024-07-15 15:27 ` patch 'net/ena: fix checksum handling' " luca.boccassi
2024-07-15 15:27 ` patch 'net/nfp: forbid offload flow rules with empty action list' " luca.boccassi
2024-07-15 15:27 ` patch 'net/nfp: remove redundant function call' " luca.boccassi
2024-07-15 15:27 ` patch 'net/nfp: adapt reverse sequence card' " luca.boccassi
2024-07-15 15:27 ` patch 'net/nfp: fix disabling 32-bit build' " luca.boccassi
2024-07-24 11:32 ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
2024-07-24 11:32 ` patch 'crypto/ipsec_mb: fix function comment' " luca.boccassi
2024-07-24 11:32 ` patch 'test/crypto: fix allocation " luca.boccassi
2024-07-24 11:32 ` patch 'crypto/qat: fix log message typo' " luca.boccassi
2024-07-24 11:32 ` patch 'doc: fix typo in l2fwd-crypto guide' " luca.boccassi
2024-07-24 11:32 ` patch 'test/crypto: remove unused stats in setup' " luca.boccassi
2024-07-24 11:32 ` patch 'test/crypto: fix asymmetric capability test' " luca.boccassi
2024-07-24 11:32 ` patch 'crypto/qat: fix placement of OOP offset' " luca.boccassi
2024-07-24 11:32 ` patch 'net/ice: fix memory leaks in raw pattern parsing' " luca.boccassi
2024-07-24 11:32 ` patch 'net/ice: fix return value for " luca.boccassi
2024-07-24 11:32 ` patch 'net/mlx5: fix Arm build with GCC 9.1' " luca.boccassi
2024-07-24 11:32 ` patch 'net/mlx5: fix MTU configuration' " luca.boccassi
2024-07-24 11:32 ` patch 'net/mlx5/hws: fix deletion of action vport' " luca.boccassi
2024-07-24 11:32 ` patch 'net/mlx5/hws: fix port ID on root item convert' " luca.boccassi
2024-07-24 11:32 ` patch 'net/mlx5/hws: remove unused variable' " luca.boccassi
2024-07-24 11:32 ` patch 'net/mlx5: fix end condition of reading xstats' " luca.boccassi
2024-07-24 11:32 ` patch 'net/mlx5: fix uplink port probing in bonding mode' " luca.boccassi
2024-07-24 11:32 ` patch 'common/mlx5: remove unneeded field when modify RQ table' " luca.boccassi
2024-07-24 11:32 ` patch 'net/mlx5: fix disabling E-Switch default flow rules' " luca.boccassi
2024-07-24 11:32 ` patch 'net/hns3: check Rx DMA address alignmnent' " luca.boccassi
2024-07-24 11:32 ` patch 'net/ark: fix index arithmetic' " luca.boccassi
2024-07-24 11:33 ` patch 'ethdev: fix GENEVE option item conversion' " luca.boccassi
2024-07-24 11:33 ` patch 'app/testpmd: add postpone option to async flow destroy' " luca.boccassi
2024-07-24 11:33 ` patch 'ethdev: fix device init without socket-local memory' " luca.boccassi
2024-07-24 11:33 ` patch 'app/testpmd: fix build on signed comparison' " luca.boccassi
2024-07-24 11:33 ` patch 'bus/pci: fix UIO resource mapping in secondary process' " luca.boccassi
2024-07-24 11:33 ` patch 'bus/pci: fix FD " luca.boccassi
2024-07-24 11:33 ` patch 'dma/hisilicon: remove support for HIP09 platform' " luca.boccassi
2024-07-24 11:33 ` patch 'app/dumpcap: handle SIGTERM and SIGHUP' " luca.boccassi
2024-07-24 11:33 ` patch 'app/pdump: " luca.boccassi
2024-07-24 11:33 ` patch 'malloc: fix multi-process wait condition handling' " luca.boccassi
2024-07-24 11:33 ` patch 'bus/vdev: fix device reinitialization' " luca.boccassi
2024-07-24 11:33 ` patch 'examples/l3fwd: fix crash in ACL mode for mixed traffic' " luca.boccassi
2024-07-24 11:33 ` patch 'examples/l3fwd: fix crash on multiple sockets' " luca.boccassi
2024-07-24 11:33 ` patch 'net/hns3: fix uninitialized variable in FEC query' " luca.boccassi
2024-07-24 11:33 ` patch 'net/ice/base: fix temporary failures reading NVM' " luca.boccassi
2024-07-24 11:33 ` patch 'examples: fix queue ID restriction' " luca.boccassi
2024-07-24 11:33 ` patch 'examples: fix lcore " luca.boccassi
2024-07-24 11:33 ` patch 'examples: fix port " luca.boccassi
2024-07-24 11:33 ` patch 'doc: remove reference to mbuf pkt field' " luca.boccassi
2024-07-29 23:33 ` patch 'examples/ipsec-secgw: revert SA salt endianness' " luca.boccassi
2024-07-29 23:33 ` patch 'doc: fix mbuf flags' " luca.boccassi
2024-07-29 23:33 ` patch 'doc: add baseline mode in l3fwd-power guide' " luca.boccassi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).