* patch 'doc: replace deprecated distutils version parsing' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'maintainers: update for stable branches' " Kevin Traynor
` (193 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: Jerin Jacob, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/b3122779a5d515380f174f6573be168e385ae95b
Thanks.
Kevin
---
From b3122779a5d515380f174f6573be168e385ae95b Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Tue, 11 Jan 2022 12:35:44 +0100
Subject: [PATCH] doc: replace deprecated distutils version parsing
[ upstream commit 2654ce5c56a4c17a649550ba89fd9003f21eab5b ]
When using Python 3.10, this warning appears:
DeprecationWarning: The distutils package is deprecated
and slated for removal in Python 3.12.
Use setuptools or check PEP 632 for potential alternatives
The PEP 632 recommends replacing "distutils.version" with "packaging".
Bugzilla ID: 914
Reported-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Tested-by: Jerin Jacob <jerinj@marvell.com>
---
buildtools/call-sphinx-build.py | 4 ++--
doc/guides/conf.py | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/buildtools/call-sphinx-build.py b/buildtools/call-sphinx-build.py
index 26b199220a..39a60d09fa 100755
--- a/buildtools/call-sphinx-build.py
+++ b/buildtools/call-sphinx-build.py
@@ -8,5 +8,5 @@ import os
from os.path import join
from subprocess import run, PIPE, STDOUT
-from distutils.version import StrictVersion
+from packaging.version import Version
# assign parameters to variables
@@ -20,5 +20,5 @@ ver = run([sphinx, '--version'], stdout=PIPE,
stderr=STDOUT).stdout.decode().split()[-1]
sphinx_cmd = [sphinx] + extra_args
-if StrictVersion(ver) >= StrictVersion('1.7'):
+if Version(ver) >= Version('1.7'):
sphinx_cmd += ['-j', 'auto']
diff --git a/doc/guides/conf.py b/doc/guides/conf.py
index 1743ce301f..a55ce38800 100644
--- a/doc/guides/conf.py
+++ b/doc/guides/conf.py
@@ -4,5 +4,5 @@
from docutils import nodes
-from distutils.version import LooseVersion
+from packaging.version import Version
from sphinx import __version__ as sphinx_version
from os import listdir
@@ -29,5 +29,5 @@ stop_on_error = ('-W' in argv)
project = 'Data Plane Development Kit'
html_logo = '../logo/DPDK_logo_vertical_rev_small.png'
-if LooseVersion(sphinx_version) >= LooseVersion('3.5'):
+if Version(sphinx_version) >= Version('3.5'):
html_permalinks = False
else:
@@ -428,5 +428,5 @@ def setup(app):
'Feature')
- if LooseVersion(sphinx_version) < LooseVersion('1.3.1'):
+ if Version(sphinx_version) < Version('1.3.1'):
print('Upgrade sphinx to version >= 1.3.1 for '
'improved Figure/Table number handling.',
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:44.757694178 +0000
+++ 0002-doc-replace-deprecated-distutils-version-parsing.patch 2022-02-21 15:22:44.033703995 +0000
@@ -1 +1 @@
-From 2654ce5c56a4c17a649550ba89fd9003f21eab5b Mon Sep 17 00:00:00 2001
+From b3122779a5d515380f174f6573be168e385ae95b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2654ce5c56a4c17a649550ba89fd9003f21eab5b ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'maintainers: update for stable branches' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
2022-02-21 15:33 ` patch 'doc: replace deprecated distutils version parsing' has been queued to stable release 21.11.1 Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'buildtools: fix AVX512 check for Python 3.5' " Kevin Traynor
` (192 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Kevin Traynor; +Cc: Luca Boccassi, Christian Ehrhardt, Xueming Li, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/3b511fdf21c0d9ee272a4e1e0072db097867fd01
Thanks.
Kevin
---
From 3b511fdf21c0d9ee272a4e1e0072db097867fd01 Mon Sep 17 00:00:00 2001
From: Kevin Traynor <ktraynor@redhat.com>
Date: Mon, 13 Dec 2021 16:48:57 +0000
Subject: [PATCH] maintainers: update for stable branches
[ upstream commit 4318cd2a4df1b05d252cdb05fb1e0a9dce378018 ]
Christian and Xueming are both already maintaining LTS releases.
Update the MAINTAINERS file to reflect this.
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
---
MAINTAINERS | 2 ++
1 file changed, 2 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 18d9edaf88..84d8e261d5 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -65,4 +65,6 @@ Stable Branches
M: Luca Boccassi <bluca@debian.org>
M: Kevin Traynor <ktraynor@redhat.com>
+M: Christian Ehrhardt <christian.ehrhardt@canonical.com>
+M: Xueming Li <xuemingl@nvidia.com>
T: git://dpdk.org/dpdk-stable
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:44.776111800 +0000
+++ 0003-maintainers-update-for-stable-branches.patch 2022-02-21 15:22:44.034703997 +0000
@@ -1 +1 @@
-From 4318cd2a4df1b05d252cdb05fb1e0a9dce378018 Mon Sep 17 00:00:00 2001
+From 3b511fdf21c0d9ee272a4e1e0072db097867fd01 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4318cd2a4df1b05d252cdb05fb1e0a9dce378018 ]
+
@@ -10,2 +11,0 @@
-Cc: stable@dpdk.org
-
@@ -18 +18 @@
-index 852595fe91..4dab6e3cec 100644
+index 18d9edaf88..84d8e261d5 100644
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'buildtools: fix AVX512 check for Python 3.5' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
2022-02-21 15:33 ` patch 'doc: replace deprecated distutils version parsing' has been queued to stable release 21.11.1 Kevin Traynor
2022-02-21 15:33 ` patch 'maintainers: update for stable branches' " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'doc: remove dependency on findutils on FreeBSD' " Kevin Traynor
` (191 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Lance Richardson; +Cc: Dmitry Kozlyuk, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/cb2e09a4dae26ea99938c6ef7f548a5e25163c39
Thanks.
Kevin
---
From cb2e09a4dae26ea99938c6ef7f548a5e25163c39 Mon Sep 17 00:00:00 2001
From: Lance Richardson <lance.richardson@broadcom.com>
Date: Mon, 3 Jan 2022 12:09:40 -0500
Subject: [PATCH] buildtools: fix AVX512 check for Python 3.5
[ upstream commit eefbfbf5ea6ee667c27463dfb91e478ccd6607c4 ]
Python 3.5 subprocess.run() does not have a capture_output
parameter (it is present only in 3.7 and up).
Capture output by using subprocess.PIPE for stdout instead.
Fixes: bb9cd91095b3 ("buildtools: make AVX512 check portable")
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
buildtools/binutils-avx512-check.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/buildtools/binutils-avx512-check.py b/buildtools/binutils-avx512-check.py
index 57392ecdc8..a0847a23d6 100644
--- a/buildtools/binutils-avx512-check.py
+++ b/buildtools/binutils-avx512-check.py
@@ -16,5 +16,5 @@ with tempfile.NamedTemporaryFile() as obj:
subprocess.run(cc + ['-c', '-xc', '-o', obj.name, '-'], input=src, check=True)
asm = subprocess.run([objdump, '-d', '--no-show-raw-insn', obj.name],
- capture_output=True, check=True).stdout.decode('utf-8')
+ stdout=subprocess.PIPE, check=True).stdout.decode('utf-8')
if gather_params not in asm:
print('vpgatherqq displacement error with as')
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:44.796199442 +0000
+++ 0004-buildtools-fix-AVX512-check-for-Python-3.5.patch 2022-02-21 15:22:44.034703997 +0000
@@ -1 +1 @@
-From eefbfbf5ea6ee667c27463dfb91e478ccd6607c4 Mon Sep 17 00:00:00 2001
+From cb2e09a4dae26ea99938c6ef7f548a5e25163c39 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit eefbfbf5ea6ee667c27463dfb91e478ccd6607c4 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'doc: remove dependency on findutils on FreeBSD' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (2 preceding siblings ...)
2022-02-21 15:33 ` patch 'buildtools: fix AVX512 check for Python 3.5' " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'bus/ifpga: remove useless check while browsing devices' " Kevin Traynor
` (190 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/c30f1ec97d4023ff71671615b13975846dba5edd
Thanks.
Kevin
---
From c30f1ec97d4023ff71671615b13975846dba5edd Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Wed, 22 Dec 2021 15:18:55 +0000
Subject: [PATCH] doc: remove dependency on findutils on FreeBSD
[ upstream commit fee17a1d290434f1b9f109d8a4bc575d9e61bb13 ]
Standard "find" on BSD does not support the "-printf" so gfind from
findutils package was used to enable full doc builds. We can remove this
extra dependency by using "sed" and "tr" to adjust the output from
regular find instead.
Fixes: 8260f4f98cfe ("mk: use script to generate examples.dox")
Fixes: 499fe9dfcfc7 ("doc: add dependency on examples for API doxygen")
Fixes: 897e55c8d27f ("doc: fix Doxygen examples build on FreeBSD")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
doc/api/generate_examples.sh | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/doc/api/generate_examples.sh b/doc/api/generate_examples.sh
index 3e08236596..48574563ca 100755
--- a/doc/api/generate_examples.sh
+++ b/doc/api/generate_examples.sh
@@ -7,20 +7,14 @@ API_EXAMPLES=$2
FIND=find
-if [ "$(uname)" = "FreeBSD" ] ; then
-# on FreeBSD, we need GNU find for "-printf" flag
- FIND=gfind
- if ! which -s $FIND ; then
- echo "Error: need '$FIND' on FreeBSD. Install 'findutils' pkg"
- exit 1
- fi
-fi
# generate a .d file including both C files and also build files, so we can
# detect both file changes and file additions/deletions
-echo "$API_EXAMPLES: $($FIND ${EXAMPLES_DIR} -type f \( -name '*.c' -o -name 'meson.build' \) -printf '%p ' )" > ${API_EXAMPLES}.d
+echo "$API_EXAMPLES: $($FIND ${EXAMPLES_DIR} -type f \( -name '*.c' -o -name 'meson.build' \) | tr '\n' ' ' )" > ${API_EXAMPLES}.d
exec > "${API_EXAMPLES}"
printf '/**\n'
printf '@page examples DPDK Example Programs\n\n'
-$FIND "${EXAMPLES_DIR}" -type f -name '*.c' -printf '@example examples/%P\n' | LC_ALL=C sort
+$FIND "${EXAMPLES_DIR}" -type f -name '*.c' |
+ sed "s|${EXAMPLES_DIR}|@example examples|" |
+ LC_ALL=C sort
printf '*/\n'
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:44.814197711 +0000
+++ 0005-doc-remove-dependency-on-findutils-on-FreeBSD.patch 2022-02-21 15:22:44.034703997 +0000
@@ -1 +1 @@
-From fee17a1d290434f1b9f109d8a4bc575d9e61bb13 Mon Sep 17 00:00:00 2001
+From c30f1ec97d4023ff71671615b13975846dba5edd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fee17a1d290434f1b9f109d8a4bc575d9e61bb13 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'bus/ifpga: remove useless check while browsing devices' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (3 preceding siblings ...)
2022-02-21 15:33 ` patch 'doc: remove dependency on findutils on FreeBSD' " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'dma/idxd: fix burst capacity calculation' " Kevin Traynor
` (189 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Maxime Gouin; +Cc: Olivier Matz, Kevin Traynor, Rosen Xu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/572305874ac4e3d6f6d4b992135ca0bb2cc52f71
Thanks.
Kevin
---
From 572305874ac4e3d6f6d4b992135ca0bb2cc52f71 Mon Sep 17 00:00:00 2001
From: Maxime Gouin <maxime.gouin@6wind.com>
Date: Wed, 5 Jan 2022 11:26:52 +0100
Subject: [PATCH] bus/ifpga: remove useless check while browsing devices
[ upstream commit 62c21c38a26e654bba09be147ea2d61c2e699a13 ]
reported by code analysis tool C++test (version 10.4):
/build/dpdk-20.11/drivers/bus/ifpga/ifpga_bus.c
67 Condition "afu_dev" is always evaluated to true
81 Condition "afu_dev" is always evaluated to true
The "for" loop already checks that afu_dev is not NULL.
Fixes: 05fa3d4a6539 ("bus/ifpga: add Intel FPGA bus library")
Signed-off-by: Maxime Gouin <maxime.gouin@6wind.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
---
drivers/bus/ifpga/ifpga_bus.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/bus/ifpga/ifpga_bus.c b/drivers/bus/ifpga/ifpga_bus.c
index cbc6809284..c5c8bbd572 100644
--- a/drivers/bus/ifpga/ifpga_bus.c
+++ b/drivers/bus/ifpga/ifpga_bus.c
@@ -65,6 +65,5 @@ ifpga_find_afu_dev(const struct rte_rawdev *rdev,
TAILQ_FOREACH(afu_dev, &ifpga_afu_dev_list, next) {
- if (afu_dev &&
- afu_dev->rawdev == rdev &&
+ if (afu_dev->rawdev == rdev &&
!ifpga_afu_id_cmp(&afu_dev->id, afu_id))
return afu_dev;
@@ -79,6 +78,5 @@ rte_ifpga_find_afu_by_name(const char *name)
TAILQ_FOREACH(afu_dev, &ifpga_afu_dev_list, next) {
- if (afu_dev &&
- !strcmp(afu_dev->device.name, name))
+ if (!strcmp(afu_dev->device.name, name))
return afu_dev;
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:44.833066499 +0000
+++ 0006-bus-ifpga-remove-useless-check-while-browsing-device.patch 2022-02-21 15:22:44.035703999 +0000
@@ -1 +1 @@
-From 62c21c38a26e654bba09be147ea2d61c2e699a13 Mon Sep 17 00:00:00 2001
+From 572305874ac4e3d6f6d4b992135ca0bb2cc52f71 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 62c21c38a26e654bba09be147ea2d61c2e699a13 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'dma/idxd: fix burst capacity calculation' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (4 preceding siblings ...)
2022-02-21 15:33 ` patch 'bus/ifpga: remove useless check while browsing devices' " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'dma/idxd: fix paths to driver sysfs directory' " Kevin Traynor
` (188 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Kevin Laatz, Jiayu Hu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/cb7d9a39cb58dae8792de670b60b31e942225ef6
Thanks.
Kevin
---
From cb7d9a39cb58dae8792de670b60b31e942225ef6 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Tue, 11 Jan 2022 13:41:02 +0000
Subject: [PATCH] dma/idxd: fix burst capacity calculation
[ upstream commit a2b43447e923a54a4d8293fae960fbe2dc3f641e ]
When the maximum burst size supported by HW is less than the available
ring space, incorrect capacity was returned when there was already some
jobs queued up for submission. This was because the capacity calculation
failed to subtract the number of already-enqueued jobs from the max
burst size. After subtraction is done, ensure that any negative values
(which should never occur if the user respects the reported limits), are
clamped to zero.
Fixes: 9459de4edc99 ("dma/idxd: add burst capacity")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
Tested-by: Jiayu Hu <jiayu.hu@intel.com>
---
drivers/dma/idxd/idxd_common.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/dma/idxd/idxd_common.c b/drivers/dma/idxd/idxd_common.c
index fc11b11337..4442d1cbbd 100644
--- a/drivers/dma/idxd/idxd_common.c
+++ b/drivers/dma/idxd/idxd_common.c
@@ -486,5 +486,7 @@ idxd_burst_capacity(const void *dev_private, uint16_t vchan __rte_unused)
used_space = write_idx - idxd->ids_returned;
- return RTE_MIN((idxd->desc_ring_mask - used_space), idxd->max_batch_size);
+ const int ret = RTE_MIN((idxd->desc_ring_mask - used_space),
+ (idxd->max_batch_size - idxd->batch_size));
+ return ret < 0 ? 0 : (uint16_t)ret;
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:44.852003793 +0000
+++ 0007-dma-idxd-fix-burst-capacity-calculation.patch 2022-02-21 15:22:44.035703999 +0000
@@ -1 +1 @@
-From a2b43447e923a54a4d8293fae960fbe2dc3f641e Mon Sep 17 00:00:00 2001
+From cb7d9a39cb58dae8792de670b60b31e942225ef6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a2b43447e923a54a4d8293fae960fbe2dc3f641e ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'dma/idxd: fix paths to driver sysfs directory' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (5 preceding siblings ...)
2022-02-21 15:33 ` patch 'dma/idxd: fix burst capacity calculation' " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'dma/idxd: fix wrap-around in burst capacity calculation' " Kevin Traynor
` (187 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Kevin Laatz, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/e0f7faeba14cda88599c8b363aa64ce30c5dbbf8
Thanks.
Kevin
---
From e0f7faeba14cda88599c8b363aa64ce30c5dbbf8 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Tue, 11 Jan 2022 13:41:03 +0000
Subject: [PATCH] dma/idxd: fix paths to driver sysfs directory
[ upstream commit 3277676319f61dbc14a38e5c9c79d97c59889855 ]
Recent kernel changes[1][2] mean that we cannot guarantee that the paths
in sysfs used for creating/binding a DSA or workqueue instance will be
as given in the utility script, since they are now "compatibility-mode
only". Update script to support both new paths and compatibility ones.
[1] https://lore.kernel.org/all/162637445139.744545.6008938867943724701.stgit@djiang5-desk3.ch.intel.com/
[2] https://lore.kernel.org/all/162637468705.744545.4399080971745974435.stgit@djiang5-desk3.ch.intel.com/
Fixes: 01863b9d2354 ("raw/ioat: include example configuration script")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
---
drivers/dma/idxd/dpdk_idxd_cfg.py | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/drivers/dma/idxd/dpdk_idxd_cfg.py b/drivers/dma/idxd/dpdk_idxd_cfg.py
index fcc27822ef..34537cb980 100755
--- a/drivers/dma/idxd/dpdk_idxd_cfg.py
+++ b/drivers/dma/idxd/dpdk_idxd_cfg.py
@@ -30,7 +30,15 @@ class SysfsDir:
+def get_drv_dir(dtype):
+ "Get the sysfs path for the driver, either 'idxd' or 'user'"
+ drv_dir = "/sys/bus/dsa/drivers/" + dtype
+ if not os.path.exists(drv_dir):
+ return "/sys/bus/dsa/drivers/dsa"
+ return drv_dir
+
+
def reset_device(dsa_id):
"Reset the DSA device and all its queues"
- drv_dir = SysfsDir("/sys/bus/dsa/drivers/dsa")
+ drv_dir = SysfsDir(get_drv_dir("idxd"))
drv_dir.write_values({"unbind": f"dsa{dsa_id}"})
@@ -59,5 +67,4 @@ def configure_dsa(dsa_id, queues, prefix):
"Configure the DSA instance with appropriate number of queues"
dsa_dir = SysfsDir(f"/sys/bus/dsa/devices/dsa{dsa_id}")
- drv_dir = SysfsDir("/sys/bus/dsa/drivers/dsa")
max_groups = dsa_dir.read_int("max_groups")
@@ -86,7 +93,10 @@ def configure_dsa(dsa_id, queues, prefix):
# enable device and then queues
- drv_dir.write_values({"bind": f"dsa{dsa_id}"})
+ idxd_dir = SysfsDir(get_drv_dir("idxd"))
+ idxd_dir.write_values({"bind": f"dsa{dsa_id}"})
+
+ user_dir = SysfsDir(get_drv_dir("user"))
for q in range(nb_queues):
- drv_dir.write_values({"bind": f"wq{dsa_id}.{q}"})
+ user_dir.write_values({"bind": f"wq{dsa_id}.{q}"})
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:44.870511455 +0000
+++ 0008-dma-idxd-fix-paths-to-driver-sysfs-directory.patch 2022-02-21 15:22:44.035703999 +0000
@@ -1 +1 @@
-From 3277676319f61dbc14a38e5c9c79d97c59889855 Mon Sep 17 00:00:00 2001
+From e0f7faeba14cda88599c8b363aa64ce30c5dbbf8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3277676319f61dbc14a38e5c9c79d97c59889855 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'dma/idxd: fix wrap-around in burst capacity calculation' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (6 preceding siblings ...)
2022-02-21 15:33 ` patch 'dma/idxd: fix paths to driver sysfs directory' " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'gpu/cuda: fix memory list cleanup' " Kevin Traynor
` (186 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Sunil Pai G, Kevin Laatz, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/8e8fe373c0e8b4842d7e1dc4a382edc280f9a03a
Thanks.
Kevin
---
From 8e8fe373c0e8b4842d7e1dc4a382edc280f9a03a Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Tue, 11 Jan 2022 13:41:04 +0000
Subject: [PATCH] dma/idxd: fix wrap-around in burst capacity calculation
[ upstream commit 63990aeb08f45f0acd435f67fd52a3736a493563 ]
The burst capacity calculation code assumes that the write and read
(i.e. ids_returned) values both wrap at the ring-size, but the read
value instead wraps as UINT16_MAX. Therefore, instead of just adding
ring-size to the write value in case the read is greater, we need to
just always mask the result to ensure a correct, in-range, value.
Fixes: 9459de4edc99 ("dma/idxd: add burst capacity")
Reported-by: Sunil Pai G <sunil.pai.g@intel.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Sunil Pai G <sunil.pai.g@intel.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
---
drivers/dma/idxd/idxd_common.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/dma/idxd/idxd_common.c b/drivers/dma/idxd/idxd_common.c
index 4442d1cbbd..ea6413cc7a 100644
--- a/drivers/dma/idxd/idxd_common.c
+++ b/drivers/dma/idxd/idxd_common.c
@@ -481,8 +481,6 @@ idxd_burst_capacity(const void *dev_private, uint16_t vchan __rte_unused)
return 0;
- /* For descriptors, check for wrap-around on write but not read */
- if (idxd->ids_returned > write_idx)
- write_idx += idxd->desc_ring_mask + 1;
- used_space = write_idx - idxd->ids_returned;
+ /* Subtract and mask to get in correct range */
+ used_space = (write_idx - idxd->ids_returned) & idxd->desc_ring_mask;
const int ret = RTE_MIN((idxd->desc_ring_mask - used_space),
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:44.889725852 +0000
+++ 0009-dma-idxd-fix-wrap-around-in-burst-capacity-calculati.patch 2022-02-21 15:22:44.036704001 +0000
@@ -1 +1 @@
-From 63990aeb08f45f0acd435f67fd52a3736a493563 Mon Sep 17 00:00:00 2001
+From 8e8fe373c0e8b4842d7e1dc4a382edc280f9a03a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 63990aeb08f45f0acd435f67fd52a3736a493563 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'gpu/cuda: fix memory list cleanup' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (7 preceding siblings ...)
2022-02-21 15:33 ` patch 'dma/idxd: fix wrap-around in burst capacity calculation' " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'config: add arch define for Arm' " Kevin Traynor
` (185 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Elena Agostini; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/a8dd54379d4454ea6e8c691a3a89e1cdf9e89fa6
Thanks.
Kevin
---
From a8dd54379d4454ea6e8c691a3a89e1cdf9e89fa6 Mon Sep 17 00:00:00 2001
From: Elena Agostini <eagostini@nvidia.com>
Date: Tue, 21 Dec 2021 20:50:42 +0000
Subject: [PATCH] gpu/cuda: fix memory list cleanup
[ upstream commit 98ddd04c6aa5b2953709f2707aeaba0461a9ef28 ]
Memory list cleanup (called by cuda_mem_free)
was not properly set the new head of the list
when deleting an entry.
Fixes: 1306a73b1958 ("gpu/cuda: introduce CUDA driver")
Signed-off-by: Elena Agostini <eagostini@nvidia.com>
---
drivers/gpu/cuda/cuda.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/cuda/cuda.c b/drivers/gpu/cuda/cuda.c
index 882df08e56..d3a7234a09 100644
--- a/drivers/gpu/cuda/cuda.c
+++ b/drivers/gpu/cuda/cuda.c
@@ -438,7 +438,9 @@ mem_list_del_item(cuda_ptr_key pk)
/* if key is in head */
- if (mem_alloc_list_cur->prev == NULL)
+ if (mem_alloc_list_cur->prev == NULL) {
mem_alloc_list_head = mem_alloc_list_cur->next;
- else {
+ if (mem_alloc_list_head != NULL)
+ mem_alloc_list_head->prev = NULL;
+ } else {
mem_alloc_list_cur->prev->next = mem_alloc_list_cur->next;
if (mem_alloc_list_cur->next != NULL)
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:44.908145107 +0000
+++ 0010-gpu-cuda-fix-memory-list-cleanup.patch 2022-02-21 15:22:44.036704001 +0000
@@ -1 +1 @@
-From 98ddd04c6aa5b2953709f2707aeaba0461a9ef28 Mon Sep 17 00:00:00 2001
+From a8dd54379d4454ea6e8c691a3a89e1cdf9e89fa6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 98ddd04c6aa5b2953709f2707aeaba0461a9ef28 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'config: add arch define for Arm' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (8 preceding siblings ...)
2022-02-21 15:33 ` patch 'gpu/cuda: fix memory list cleanup' " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'eal/linux: log hugepage create errors with filename' " Kevin Traynor
` (184 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Ruifeng Wang; +Cc: Stephen Hemminger, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/24e496918be688f08d0cb63327f011adc9ec6812
Thanks.
Kevin
---
From 24e496918be688f08d0cb63327f011adc9ec6812 Mon Sep 17 00:00:00 2001
From: Ruifeng Wang <ruifeng.wang@arm.com>
Date: Thu, 20 Jan 2022 10:38:00 +0800
Subject: [PATCH] config: add arch define for Arm
[ upstream commit 9cc217a28310d21fba56e5eceb740b4feb7e0949 ]
As per design document, RTE_ARCH is the name of the architecture.
However, the definition was missing on Arm with meson build.
It impacts applications that refers to this string.
Added for Arm builds.
Fixes: b1d48c41189a ("build: support ARM with meson")
Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
config/arm/meson.build | 3 +++
1 file changed, 3 insertions(+)
diff --git a/config/arm/meson.build b/config/arm/meson.build
index 213324d262..44b44b63a6 100644
--- a/config/arm/meson.build
+++ b/config/arm/meson.build
@@ -50,4 +50,5 @@ implementer_generic = {
['RTE_ARCH_STRICT_ALIGN', true],
['RTE_ARCH_ARMv8_AARCH32', true],
+ ['RTE_ARCH', 'armv8_aarch32'],
['RTE_CACHE_LINE_SIZE', 64]
]
@@ -433,4 +434,5 @@ if dpdk_conf.get('RTE_ARCH_32')
# armv7 build
dpdk_conf.set('RTE_ARCH_ARMv7', true)
+ dpdk_conf.set('RTE_ARCH', 'armv7')
# the minimum architecture supported, armv7-a, needs the following,
machine_args += '-mfpu=neon'
@@ -438,4 +440,5 @@ if dpdk_conf.get('RTE_ARCH_32')
else
# armv8 build
+ dpdk_conf.set('RTE_ARCH', 'armv8')
update_flags = true
soc_config = {}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:44.927668734 +0000
+++ 0011-config-add-arch-define-for-Arm.patch 2022-02-21 15:22:44.037704004 +0000
@@ -1 +1 @@
-From 9cc217a28310d21fba56e5eceb740b4feb7e0949 Mon Sep 17 00:00:00 2001
+From 24e496918be688f08d0cb63327f011adc9ec6812 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9cc217a28310d21fba56e5eceb740b4feb7e0949 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 16e808cdd5..c3a3f2faaf 100644
+index 213324d262..44b44b63a6 100644
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'eal/linux: log hugepage create errors with filename' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (9 preceding siblings ...)
2022-02-21 15:33 ` patch 'config: add arch define for Arm' " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'doc: fix dlb2 guide' " Kevin Traynor
` (183 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/19c6e95cd6dd1876f807836ffcd2f98c2110bb1b
Thanks.
Kevin
---
From 19c6e95cd6dd1876f807836ffcd2f98c2110bb1b Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 23 Dec 2021 11:21:58 -0800
Subject: [PATCH] eal/linux: log hugepage create errors with filename
[ upstream commit 8a5a91401dc23ddab1ddea3667a17a615a25077f ]
While debugging running DPDK service in a container, it is
useful to see which file creation failed. Don't hide this
failure with DEBUG.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
lib/eal/linux/eal_memalloc.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/eal/linux/eal_memalloc.c b/lib/eal/linux/eal_memalloc.c
index 337f2bc739..16b58d861b 100644
--- a/lib/eal/linux/eal_memalloc.c
+++ b/lib/eal/linux/eal_memalloc.c
@@ -309,6 +309,6 @@ get_seg_fd(char *path, int buflen, struct hugepage_info *hi,
fd = open(path, O_CREAT | O_RDWR, 0600);
if (fd < 0) {
- RTE_LOG(ERR, EAL, "%s(): open failed: %s\n",
- __func__, strerror(errno));
+ RTE_LOG(ERR, EAL, "%s(): open '%s' failed: %s\n",
+ __func__, path, strerror(errno));
return -1;
}
@@ -347,6 +347,6 @@ get_seg_fd(char *path, int buflen, struct hugepage_info *hi,
fd = open(path, O_CREAT | O_RDWR, 0600);
if (fd < 0) {
- RTE_LOG(DEBUG, EAL, "%s(): open failed: %s\n",
- __func__, strerror(errno));
+ RTE_LOG(ERR, EAL, "%s(): open '%s' failed: %s\n",
+ __func__, path, strerror(errno));
return -1;
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:44.946445113 +0000
+++ 0012-eal-linux-log-hugepage-create-errors-with-filename.patch 2022-02-21 15:22:44.038704006 +0000
@@ -1 +1 @@
-From 8a5a91401dc23ddab1ddea3667a17a615a25077f Mon Sep 17 00:00:00 2001
+From 19c6e95cd6dd1876f807836ffcd2f98c2110bb1b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8a5a91401dc23ddab1ddea3667a17a615a25077f ]
+
@@ -9,2 +10,0 @@
-
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'doc: fix dlb2 guide' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (10 preceding siblings ...)
2022-02-21 15:33 ` patch 'eal/linux: log hugepage create errors with filename' " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'eventdev/eth_rx: fix missing internal port checks' " Kevin Traynor
` (182 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Rashmi Shetty; +Cc: Timothy McDaniel, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/393d0580db79f9f210b5ed751982f476a9e9f066
Thanks.
Kevin
---
From 393d0580db79f9f210b5ed751982f476a9e9f066 Mon Sep 17 00:00:00 2001
From: Rashmi Shetty <rashmi.shetty@intel.com>
Date: Tue, 7 Dec 2021 17:01:51 -0600
Subject: [PATCH] doc: fix dlb2 guide
[ upstream commit 7fe2d346af2f3cae0e94347861cdfa412af39fc2 ]
Number of direct credits, atomic inflight and history list are
updated to DLB2.0 supported sizes. As DLB2.0 does not provide
dev arg to override the default per-queue atomic inflight
allocation, it is removed from the documentation.
Fixes: f3cad285bb88 ("event/dlb2: add infos get and configure")
Signed-off-by: Rashmi Shetty <rashmi.shetty@intel.com>
Reviewed-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
---
doc/guides/eventdevs/dlb2.rst | 19 ++++++-------------
1 file changed, 6 insertions(+), 13 deletions(-)
diff --git a/doc/guides/eventdevs/dlb2.rst b/doc/guides/eventdevs/dlb2.rst
index bce984ca08..bc53618b53 100644
--- a/doc/guides/eventdevs/dlb2.rst
+++ b/doc/guides/eventdevs/dlb2.rst
@@ -152,5 +152,5 @@ These pools' sizes are controlled by the nb_events_limit field in struct
rte_event_dev_config. The load-balanced pool is sized to contain
nb_events_limit credits, and the directed pool is sized to contain
-nb_events_limit/4 credits. The directed pool size can be overridden with the
+nb_events_limit/2 credits. The directed pool size can be overridden with the
num_dir_credits devargs argument, like so:
@@ -240,6 +240,6 @@ Due to this, workers should stop retrying after a time, release the events it
is attempting to enqueue, and dequeue more events. It is important that the
worker release the events and don't simply set them aside to retry the enqueue
-again later, because the port has limited history list size (by default, twice
-the port's dequeue_depth).
+again later, because the port has limited history list size (by default, same
+as port's dequeue_depth).
Priority
@@ -310,16 +310,9 @@ traffic behavior, event processing latency, potential for a worker to be
interrupted or otherwise delayed, etc.
-By default, the PMD allocates 16 buffer entries for each load-balanced queue,
-which provides an even division across all 128 queues but potentially wastes
+By default, the PMD allocates 64 buffer entries for each load-balanced queue,
+which provides an even division across all 32 queues but potentially wastes
buffer space (e.g. if not all queues are used, or aren't used for atomic
scheduling).
-The PMD provides a dev arg to override the default per-queue allocation. To
-increase per-queue atomic-inflight allocation to (for example) 64:
-
- .. code-block:: console
-
- --allow ea:00.0,atm_inflights=64
-
QID Depth Threshold
~~~~~~~~~~~~~~~~~~~
@@ -338,5 +331,5 @@ returned in the impl_opaque field of each received event.
The per qid threshold can be specified as part of the device args, and
-can be applied to all queue, a range of queues, or a single queue, as
+can be applied to all queues, a range of queues, or a single queue, as
shown below.
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:44.966313913 +0000
+++ 0013-doc-fix-dlb2-guide.patch 2022-02-21 15:22:44.038704006 +0000
@@ -1 +1 @@
-From 7fe2d346af2f3cae0e94347861cdfa412af39fc2 Mon Sep 17 00:00:00 2001
+From 393d0580db79f9f210b5ed751982f476a9e9f066 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7fe2d346af2f3cae0e94347861cdfa412af39fc2 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'eventdev/eth_rx: fix missing internal port checks' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (11 preceding siblings ...)
2022-02-21 15:33 ` patch 'doc: fix dlb2 guide' " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'examples/l3fwd: fix Rx burst size for event mode' " Kevin Traynor
` (181 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Pavan Nikhilesh; +Cc: Jay Jayatheerthan, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/8d0ffec0cfd281a4807e4017a9d950d3a992e9a3
Thanks.
Kevin
---
From 8d0ffec0cfd281a4807e4017a9d950d3a992e9a3 Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Mon, 13 Dec 2021 14:01:43 +0530
Subject: [PATCH] eventdev/eth_rx: fix missing internal port checks
[ upstream commit de3c3a2f20c7a944eb33991bd35fc6739645bb34 ]
When event delivery is through internal port, stats are maintained
by HW and we should avoid reading SW data structures for stats.
Fix missing internal port checks.
Fixes: 995b150c1ae1 ("eventdev/eth_rx: add queue stats API")
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com>
---
lib/eventdev/rte_event_eth_rx_adapter.c | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_event_eth_rx_adapter.c
index 3182b52c23..f946137b25 100644
--- a/lib/eventdev/rte_event_eth_rx_adapter.c
+++ b/lib/eventdev/rte_event_eth_rx_adapter.c
@@ -2985,13 +2985,15 @@ rte_event_eth_rx_adapter_queue_stats_get(uint8_t id,
}
- queue_info = &dev_info->rx_queue[rx_queue_id];
- event_buf = queue_info->event_buf;
- q_stats = queue_info->stats;
+ if (dev_info->internal_event_port == 0) {
+ queue_info = &dev_info->rx_queue[rx_queue_id];
+ event_buf = queue_info->event_buf;
+ q_stats = queue_info->stats;
- stats->rx_event_buf_count = event_buf->count;
- stats->rx_event_buf_size = event_buf->events_size;
- stats->rx_packets = q_stats->rx_packets;
- stats->rx_poll_count = q_stats->rx_poll_count;
- stats->rx_dropped = q_stats->rx_dropped;
+ stats->rx_event_buf_count = event_buf->count;
+ stats->rx_event_buf_size = event_buf->events_size;
+ stats->rx_packets = q_stats->rx_packets;
+ stats->rx_poll_count = q_stats->rx_poll_count;
+ stats->rx_dropped = q_stats->rx_dropped;
+ }
dev = &rte_eventdevs[rx_adapter->eventdev_id];
@@ -3087,6 +3089,8 @@ rte_event_eth_rx_adapter_queue_stats_reset(uint8_t id,
}
- queue_info = &dev_info->rx_queue[rx_queue_id];
- rxa_queue_stats_reset(queue_info);
+ if (dev_info->internal_event_port == 0) {
+ queue_info = &dev_info->rx_queue[rx_queue_id];
+ rxa_queue_stats_reset(queue_info);
+ }
dev = &rte_eventdevs[rx_adapter->eventdev_id];
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:44.984593231 +0000
+++ 0014-eventdev-eth_rx-fix-missing-internal-port-checks.patch 2022-02-21 15:22:44.040704010 +0000
@@ -1 +1 @@
-From de3c3a2f20c7a944eb33991bd35fc6739645bb34 Mon Sep 17 00:00:00 2001
+From 8d0ffec0cfd281a4807e4017a9d950d3a992e9a3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit de3c3a2f20c7a944eb33991bd35fc6739645bb34 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'examples/l3fwd: fix Rx burst size for event mode' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (12 preceding siblings ...)
2022-02-21 15:33 ` patch 'eventdev/eth_rx: fix missing internal port checks' " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'event/cnxk: fix QoS devargs parsing' " Kevin Traynor
` (180 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Nipun Gupta; +Cc: Sunil Kumar Kori, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/87646d04a138be3d6988dbd1bb463699395b9095
Thanks.
Kevin
---
From 87646d04a138be3d6988dbd1bb463699395b9095 Mon Sep 17 00:00:00 2001
From: Nipun Gupta <nipun.gupta@nxp.com>
Date: Tue, 11 Jan 2022 10:35:46 +0530
Subject: [PATCH] examples/l3fwd: fix Rx burst size for event mode
[ upstream commit 2e94304c8434968626cd39fd6afe393a905c7dd2 ]
While dequeuing the packets from the event device, burst size
is provided in the API. This was not getting properly
configured in the application. This patch correctly configures
the burst size.
Fixes: aaf58cb85b62 ("examples/l3fwd: add event port and queue setup")
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Sunil Kumar Kori <skori@marvell.com>
---
examples/l3fwd/l3fwd_event_internal_port.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/examples/l3fwd/l3fwd_event_internal_port.c b/examples/l3fwd/l3fwd_event_internal_port.c
index 1e8f46bc11..32cf657148 100644
--- a/examples/l3fwd/l3fwd_event_internal_port.c
+++ b/examples/l3fwd/l3fwd_event_internal_port.c
@@ -119,4 +119,6 @@ l3fwd_event_port_setup_internal_port(void)
RTE_EVENT_PORT_CFG_DISABLE_IMPL_REL;
+ evt_rsrc->deq_depth = def_p_conf.dequeue_depth;
+
for (event_p_id = 0; event_p_id < evt_rsrc->evp.nb_ports;
event_p_id++) {
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.005866443 +0000
+++ 0015-examples-l3fwd-fix-Rx-burst-size-for-event-mode.patch 2022-02-21 15:22:44.040704010 +0000
@@ -1 +1 @@
-From 2e94304c8434968626cd39fd6afe393a905c7dd2 Mon Sep 17 00:00:00 2001
+From 87646d04a138be3d6988dbd1bb463699395b9095 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2e94304c8434968626cd39fd6afe393a905c7dd2 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'event/cnxk: fix QoS devargs parsing' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (13 preceding siblings ...)
2022-02-21 15:33 ` patch 'examples/l3fwd: fix Rx burst size for event mode' " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'common/cnxk: add workaround for vWQE flush' " Kevin Traynor
` (179 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Pavan Nikhilesh; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/e3b9a8c32f508a0612c7af99c7b067c1685c05c6
Thanks.
Kevin
---
From e3b9a8c32f508a0612c7af99c7b067c1685c05c6 Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Tue, 14 Dec 2021 02:11:39 +0530
Subject: [PATCH] event/cnxk: fix QoS devargs parsing
[ upstream commit e21aa23bed1129cbe63ea621bfada4cc1ea55281 ]
Fix qos devargs parsing using incorrect datatype for the
structure elements.
Fixes: 38c2e3240ba8 ("event/cnxk: add option to control SSO HWGRP QoS")
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
drivers/event/cnxk/cnxk_eventdev.c | 2 +-
drivers/event/cnxk/cnxk_eventdev.h | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/event/cnxk/cnxk_eventdev.c b/drivers/event/cnxk/cnxk_eventdev.c
index f7a5026250..6ad4e23e2b 100644
--- a/drivers/event/cnxk/cnxk_eventdev.c
+++ b/drivers/event/cnxk/cnxk_eventdev.c
@@ -483,5 +483,5 @@ parse_queue_param(char *value, void *opaque)
{
struct cnxk_sso_qos queue_qos = {0};
- uint8_t *val = (uint8_t *)&queue_qos;
+ uint16_t *val = (uint16_t *)&queue_qos;
struct cnxk_sso_evdev *dev = opaque;
char *tok = strtok(value, "-");
diff --git a/drivers/event/cnxk/cnxk_eventdev.h b/drivers/event/cnxk/cnxk_eventdev.h
index 305c6a3b9e..4652b58a84 100644
--- a/drivers/event/cnxk/cnxk_eventdev.h
+++ b/drivers/event/cnxk/cnxk_eventdev.h
@@ -75,7 +75,7 @@ typedef void (*cnxk_sso_hws_flush_t)(void *ws, uint8_t queue_id, uintptr_t base,
struct cnxk_sso_qos {
uint16_t queue;
- uint8_t xaq_prcnt;
- uint8_t taq_prcnt;
- uint8_t iaq_prcnt;
+ uint16_t xaq_prcnt;
+ uint16_t taq_prcnt;
+ uint16_t iaq_prcnt;
};
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.024344190 +0000
+++ 0016-event-cnxk-fix-QoS-devargs-parsing.patch 2022-02-21 15:22:44.041704013 +0000
@@ -1 +1 @@
-From e21aa23bed1129cbe63ea621bfada4cc1ea55281 Mon Sep 17 00:00:00 2001
+From e3b9a8c32f508a0612c7af99c7b067c1685c05c6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e21aa23bed1129cbe63ea621bfada4cc1ea55281 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'common/cnxk: add workaround for vWQE flush' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (14 preceding siblings ...)
2022-02-21 15:33 ` patch 'event/cnxk: fix QoS devargs parsing' " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'common/cnxk: fix reset of fields' " Kevin Traynor
` (178 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Pavan Nikhilesh; +Cc: Jerin Jacob, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/7ee503d33f87a935ccf18c3382a6af9a12a2097f
Thanks.
Kevin
---
From 7ee503d33f87a935ccf18c3382a6af9a12a2097f Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Tue, 14 Dec 2021 02:24:23 +0530
Subject: [PATCH] common/cnxk: add workaround for vWQE flush
[ upstream commit e9d33faa8cf7449869588a88673b34bc0aaff657 ]
Due to an errata writing to vWQE flush register might hang NIX.
Add workaround for vWQE flush hang by waiting for the max
coalescing timeout to flush out any pending vWQEs.
Fixes: ee48f711f3b0 ("common/cnxk: support NIX inline inbound and outbound setup")
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
drivers/common/cnxk/roc_nix_inl.c | 3 +--
drivers/common/cnxk/roc_nix_inl_dev.c | 12 ++++++++++++
drivers/common/cnxk/roc_nix_inl_priv.h | 1 +
drivers/common/cnxk/roc_nix_priv.h | 1 +
drivers/common/cnxk/roc_nix_queue.c | 19 +++++++++++++++++--
5 files changed, 32 insertions(+), 4 deletions(-)
diff --git a/drivers/common/cnxk/roc_nix_inl.c b/drivers/common/cnxk/roc_nix_inl.c
index f0fc690417..e8981c4aa4 100644
--- a/drivers/common/cnxk/roc_nix_inl.c
+++ b/drivers/common/cnxk/roc_nix_inl.c
@@ -596,6 +596,5 @@ roc_nix_inl_dev_rq_put(struct roc_nix_rq *rq)
/* Flush NIX LF for CN10K */
- if (roc_model_is_cn10k())
- plt_write64(0, inl_dev->nix_base + NIX_LF_OP_VWQE_FLUSH);
+ nix_rq_vwqe_flush(rq, inl_dev->vwqe_interval);
return rc;
diff --git a/drivers/common/cnxk/roc_nix_inl_dev.c b/drivers/common/cnxk/roc_nix_inl_dev.c
index a0fe6ecd82..10912a6c93 100644
--- a/drivers/common/cnxk/roc_nix_inl_dev.c
+++ b/drivers/common/cnxk/roc_nix_inl_dev.c
@@ -347,4 +347,5 @@ nix_inl_nix_setup(struct nix_inl_dev *inl_dev)
struct nix_lf_alloc_rsp *rsp;
struct nix_lf_alloc_req *req;
+ struct nix_hw_info *hw_info;
size_t inb_sa_sz;
int i, rc = -ENOSPC;
@@ -383,4 +384,15 @@ nix_inl_nix_setup(struct nix_inl_dev *inl_dev)
inl_dev->cints = rsp->cints;
+ /* Get VWQE info if supported */
+ if (roc_model_is_cn10k()) {
+ mbox_alloc_msg_nix_get_hw_info(mbox);
+ rc = mbox_process_msg(mbox, (void *)&hw_info);
+ if (rc) {
+ plt_err("Failed to get HW info, rc=%d", rc);
+ goto lf_free;
+ }
+ inl_dev->vwqe_interval = hw_info->vwqe_delay;
+ }
+
/* Register nix interrupts */
rc = nix_inl_nix_register_irqs(inl_dev);
diff --git a/drivers/common/cnxk/roc_nix_inl_priv.h b/drivers/common/cnxk/roc_nix_inl_priv.h
index 3dc526f929..be53a3fa81 100644
--- a/drivers/common/cnxk/roc_nix_inl_priv.h
+++ b/drivers/common/cnxk/roc_nix_inl_priv.h
@@ -36,4 +36,5 @@ struct nix_inl_dev {
uint8_t lf_tx_stats;
uint8_t lf_rx_stats;
+ uint16_t vwqe_interval;
uint16_t cints;
uint16_t qints;
diff --git a/drivers/common/cnxk/roc_nix_priv.h b/drivers/common/cnxk/roc_nix_priv.h
index 04575af295..deb2a6ba11 100644
--- a/drivers/common/cnxk/roc_nix_priv.h
+++ b/drivers/common/cnxk/roc_nix_priv.h
@@ -378,4 +378,5 @@ int nix_rq_ena_dis(struct dev *dev, struct roc_nix_rq *rq, bool enable);
int nix_tm_bp_config_get(struct roc_nix *roc_nix, bool *is_enabled);
int nix_tm_bp_config_set(struct roc_nix *roc_nix, bool enable);
+void nix_rq_vwqe_flush(struct roc_nix_rq *rq, uint16_t vwqe_interval);
/*
diff --git a/drivers/common/cnxk/roc_nix_queue.c b/drivers/common/cnxk/roc_nix_queue.c
index c8c8401d81..d5f6813e69 100644
--- a/drivers/common/cnxk/roc_nix_queue.c
+++ b/drivers/common/cnxk/roc_nix_queue.c
@@ -29,4 +29,20 @@ nix_qsize_clampup(uint32_t val)
}
+void
+nix_rq_vwqe_flush(struct roc_nix_rq *rq, uint16_t vwqe_interval)
+{
+ uint64_t wait_ns;
+
+ if (!roc_model_is_cn10k())
+ return;
+ /* Due to HW errata writes to VWQE_FLUSH might hang, so instead
+ * wait for max vwqe timeout interval.
+ */
+ if (rq->vwqe_ena) {
+ wait_ns = rq->vwqe_wait_tmo * (vwqe_interval + 1) * 100;
+ plt_delay_us((wait_ns / 1E3) + 1);
+ }
+}
+
int
nix_rq_ena_dis(struct dev *dev, struct roc_nix_rq *rq, bool enable)
@@ -67,7 +83,6 @@ roc_nix_rq_ena_dis(struct roc_nix_rq *rq, bool enable)
rc = nix_rq_ena_dis(&nix->dev, rq, enable);
+ nix_rq_vwqe_flush(rq, nix->vwqe_interval);
- if (roc_model_is_cn10k())
- plt_write64(rq->qid, nix->base + NIX_LF_OP_VWQE_FLUSH);
return rc;
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.043767299 +0000
+++ 0017-common-cnxk-add-workaround-for-vWQE-flush.patch 2022-02-21 15:22:44.042704015 +0000
@@ -1 +1 @@
-From e9d33faa8cf7449869588a88673b34bc0aaff657 Mon Sep 17 00:00:00 2001
+From 7ee503d33f87a935ccf18c3382a6af9a12a2097f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e9d33faa8cf7449869588a88673b34bc0aaff657 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'common/cnxk: fix reset of fields' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (15 preceding siblings ...)
2022-02-21 15:33 ` patch 'common/cnxk: add workaround for vWQE flush' " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'crypto/cnxk: enable allocated queues only' " Kevin Traynor
` (177 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Anoob Joseph; +Cc: Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/de6b483f380cb3667a786d17b9cb50c7279dc35a
Thanks.
Kevin
---
From de6b483f380cb3667a786d17b9cb50c7279dc35a Mon Sep 17 00:00:00 2001
From: Anoob Joseph <anoobj@marvell.com>
Date: Fri, 17 Dec 2021 14:49:46 +0530
Subject: [PATCH] common/cnxk: fix reset of fields
[ upstream commit f7d904e065c3e82e6892d6b7ed765168c591f6f4 ]
Copy DF/DSCP fields would get set based on ipsec_xform in the code
preceding this. Setting it again would cause the options to be reset.
Fixes: 78d03027f2cc ("common/cnxk: add IPsec common code")
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
drivers/common/cnxk/cnxk_security.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/common/cnxk/cnxk_security.c b/drivers/common/cnxk/cnxk_security.c
index 30562b46e3..787138b059 100644
--- a/drivers/common/cnxk/cnxk_security.c
+++ b/drivers/common/cnxk/cnxk_security.c
@@ -445,8 +445,4 @@ cnxk_ot_ipsec_outb_sa_fill(struct roc_ot_ipsec_outb_sa *sa,
}
- /* Default options of DSCP and Flow label/DF */
- sa->w2.s.dscp_src = ROC_IE_OT_SA_COPY_FROM_SA;
- sa->w2.s.ipv4_df_src_or_ipv6_flw_lbl_src = ROC_IE_OT_SA_COPY_FROM_SA;
-
skip_tunnel_info:
/* ESN */
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.063479137 +0000
+++ 0018-common-cnxk-fix-reset-of-fields.patch 2022-02-21 15:22:44.043704017 +0000
@@ -1 +1 @@
-From f7d904e065c3e82e6892d6b7ed765168c591f6f4 Mon Sep 17 00:00:00 2001
+From de6b483f380cb3667a786d17b9cb50c7279dc35a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f7d904e065c3e82e6892d6b7ed765168c591f6f4 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'crypto/cnxk: enable allocated queues only' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (16 preceding siblings ...)
2022-02-21 15:33 ` patch 'common/cnxk: fix reset of fields' " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'crypto/cnxk: fix inflight count calculation' " Kevin Traynor
` (176 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Shijith Thotton; +Cc: Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/99d6741b6491a6eb777bcb9df55e9485eadda41f
Thanks.
Kevin
---
From 99d6741b6491a6eb777bcb9df55e9485eadda41f Mon Sep 17 00:00:00 2001
From: Shijith Thotton <sthotton@marvell.com>
Date: Fri, 17 Dec 2021 14:49:49 +0530
Subject: [PATCH] crypto/cnxk: enable allocated queues only
[ upstream commit 2ff2a87d8a49ba4ba9ff55fc29a0743d23f80b61 ]
Only enable/disable queue pairs that are allocated during cryptodev
start/stop.
Fixes: 52008104e9a6 ("crypto/cnxk: update instruction queue in start/stop")
Signed-off-by: Shijith Thotton <sthotton@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
drivers/crypto/cnxk/cnxk_cryptodev_ops.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/cnxk/cnxk_cryptodev_ops.c b/drivers/crypto/cnxk/cnxk_cryptodev_ops.c
index a2281fb8de..21ee09f962 100644
--- a/drivers/crypto/cnxk/cnxk_cryptodev_ops.c
+++ b/drivers/crypto/cnxk/cnxk_cryptodev_ops.c
@@ -101,6 +101,11 @@ cnxk_cpt_dev_start(struct rte_cryptodev *dev)
uint16_t qp_id;
- for (qp_id = 0; qp_id < nb_lf; qp_id++)
+ for (qp_id = 0; qp_id < nb_lf; qp_id++) {
+ /* Application may not setup all queue pair */
+ if (roc_cpt->lf[qp_id] == NULL)
+ continue;
+
roc_cpt_iq_enable(roc_cpt->lf[qp_id]);
+ }
return 0;
@@ -115,6 +120,10 @@ cnxk_cpt_dev_stop(struct rte_cryptodev *dev)
uint16_t qp_id;
- for (qp_id = 0; qp_id < nb_lf; qp_id++)
+ for (qp_id = 0; qp_id < nb_lf; qp_id++) {
+ if (roc_cpt->lf[qp_id] == NULL)
+ continue;
+
roc_cpt_iq_disable(roc_cpt->lf[qp_id]);
+ }
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.082541392 +0000
+++ 0019-crypto-cnxk-enable-allocated-queues-only.patch 2022-02-21 15:22:44.043704017 +0000
@@ -1 +1 @@
-From 2ff2a87d8a49ba4ba9ff55fc29a0743d23f80b61 Mon Sep 17 00:00:00 2001
+From 99d6741b6491a6eb777bcb9df55e9485eadda41f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2ff2a87d8a49ba4ba9ff55fc29a0743d23f80b61 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'crypto/cnxk: fix inflight count calculation' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (17 preceding siblings ...)
2022-02-21 15:33 ` patch 'crypto/cnxk: enable allocated queues only' " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'crypto/cnxk: fix extend tail " Kevin Traynor
` (175 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Anoob Joseph; +Cc: Kiran Kumar K, Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/5977020bc34fc3619f7e6f89cfbfbb97ab83dce8
Thanks.
Kevin
---
From 5977020bc34fc3619f7e6f89cfbfbb97ab83dce8 Mon Sep 17 00:00:00 2001
From: Anoob Joseph <anoobj@marvell.com>
Date: Fri, 17 Dec 2021 14:50:01 +0530
Subject: [PATCH] crypto/cnxk: fix inflight count calculation
[ upstream commit ec6ca0536e912d465a47d28ab90994d9ca576234 ]
Inflight count calculation is updated to cover wrap around cases where
head can become smaller than tail.
Fixes: fd390896f4a3 ("crypto/cnxk: allow different cores in pending queue")
Reported-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
drivers/crypto/cnxk/cnxk_cryptodev_ops.h | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/crypto/cnxk/cnxk_cryptodev_ops.h b/drivers/crypto/cnxk/cnxk_cryptodev_ops.h
index 0d363651ff..1d1b1fc94b 100644
--- a/drivers/crypto/cnxk/cnxk_cryptodev_ops.h
+++ b/drivers/crypto/cnxk/cnxk_cryptodev_ops.h
@@ -167,5 +167,9 @@ static __rte_always_inline uint64_t
pending_queue_infl_cnt(uint64_t head, uint64_t tail, const uint64_t mask)
{
- return (head - tail) & mask;
+ /*
+ * Mask is nb_desc - 1. Add nb_desc to head and mask to account for
+ * cases when tail > head, which happens during wrap around.
+ */
+ return ((head + mask + 1) - tail) & mask;
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.101680112 +0000
+++ 0020-crypto-cnxk-fix-inflight-count-calculation.patch 2022-02-21 15:22:44.044704019 +0000
@@ -1 +1 @@
-From ec6ca0536e912d465a47d28ab90994d9ca576234 Mon Sep 17 00:00:00 2001
+From 5977020bc34fc3619f7e6f89cfbfbb97ab83dce8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ec6ca0536e912d465a47d28ab90994d9ca576234 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index ca363bba3a..0336ae102e 100644
+index 0d363651ff..1d1b1fc94b 100644
@@ -23 +24 @@
-@@ -157,5 +157,9 @@ static __rte_always_inline uint64_t
+@@ -167,5 +167,9 @@ static __rte_always_inline uint64_t
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'crypto/cnxk: fix extend tail calculation' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (18 preceding siblings ...)
2022-02-21 15:33 ` patch 'crypto/cnxk: fix inflight count calculation' " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'crypto/ipsec_mb: fix queue setup null pointer dereference' " Kevin Traynor
` (174 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Anoob Joseph; +Cc: Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/7823f355816f9aa3824348ac3951cb8b3af3a4ad
Thanks.
Kevin
---
From 7823f355816f9aa3824348ac3951cb8b3af3a4ad Mon Sep 17 00:00:00 2001
From: Anoob Joseph <anoobj@marvell.com>
Date: Fri, 17 Dec 2021 14:50:05 +0530
Subject: [PATCH] crypto/cnxk: fix extend tail calculation
[ upstream commit c99f673f950ea082df4344348f8b5cae88f245a8 ]
If the packet size to be incremented after IPsec processing is less
than size of hdr (size incremented before submitting), then extend_tail
can become negative. Allow negative values for the variable.
Fixes: 67a87e89561c ("crypto/cnxk: add cn9k lookaside IPsec datapath")
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
drivers/crypto/cnxk/cn9k_ipsec_la_ops.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/cnxk/cn9k_ipsec_la_ops.h b/drivers/crypto/cnxk/cn9k_ipsec_la_ops.h
index 2dc8913feb..2b0261e057 100644
--- a/drivers/crypto/cnxk/cn9k_ipsec_la_ops.h
+++ b/drivers/crypto/cnxk/cn9k_ipsec_la_ops.h
@@ -78,7 +78,8 @@ process_outb_sa(struct rte_crypto_op *cop, struct cn9k_ipsec_sa *sa,
struct rte_crypto_sym_op *sym_op = cop->sym;
struct rte_mbuf *m_src = sym_op->m_src;
- uint32_t dlen, rlen, extend_tail;
struct roc_ie_on_outb_sa *out_sa;
struct roc_ie_on_outb_hdr *hdr;
+ uint32_t dlen, rlen;
+ int32_t extend_tail;
out_sa = &sa->out_sa;
@@ -89,5 +90,6 @@ process_outb_sa(struct rte_crypto_op *cop, struct cn9k_ipsec_sa *sa,
extend_tail = rlen - dlen;
if (unlikely(extend_tail > rte_pktmbuf_tailroom(m_src))) {
- plt_dp_err("Not enough tail room");
+ plt_dp_err("Not enough tail room (required: %d, available: %d",
+ extend_tail, rte_pktmbuf_tailroom(m_src));
return -ENOMEM;
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.120010134 +0000
+++ 0021-crypto-cnxk-fix-extend-tail-calculation.patch 2022-02-21 15:22:44.044704019 +0000
@@ -1 +1 @@
-From c99f673f950ea082df4344348f8b5cae88f245a8 Mon Sep 17 00:00:00 2001
+From 7823f355816f9aa3824348ac3951cb8b3af3a4ad Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c99f673f950ea082df4344348f8b5cae88f245a8 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'crypto/ipsec_mb: fix queue setup null pointer dereference' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (19 preceding siblings ...)
2022-02-21 15:33 ` patch 'crypto/cnxk: fix extend tail " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'crypto/ipsec_mb: fix queue cleanup " Kevin Traynor
` (173 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Ciara Power; +Cc: Fan Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/07ee507051541ff714ad08fe1adffeb9304b8f03
Thanks.
Kevin
---
From 07ee507051541ff714ad08fe1adffeb9304b8f03 Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Fri, 10 Dec 2021 14:09:50 +0000
Subject: [PATCH] crypto/ipsec_mb: fix queue setup null pointer dereference
[ upstream commit f51e40d1bf5efe7e659110613c63f1beb740d203 ]
When setting up a qp in a secondary process, the local qp pointer is set
to the stored device qp, configured by the primary process for that
device, but only if that device qp is not NULL.
If the device qp was not set up correctly by the primary process and has
a NULL value, the local qp variable stays at the default initialised
value, NULL. This causes a NULL pointer dereference later in the
function when using the qp value.
This is fixed by always setting the local qp to the value of the device
qp stored, and then checking if qp is NULL, returning an error if it is.
Coverity issue: 374382
Fixes: 72a169278a56 ("crypto/ipsec_mb: support multi-process")
Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
drivers/crypto/ipsec_mb/ipsec_mb_ops.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/ipsec_mb/ipsec_mb_ops.c b/drivers/crypto/ipsec_mb/ipsec_mb_ops.c
index 189262c4ad..6efa417d67 100644
--- a/drivers/crypto/ipsec_mb/ipsec_mb_ops.c
+++ b/drivers/crypto/ipsec_mb/ipsec_mb_ops.c
@@ -222,6 +222,9 @@ ipsec_mb_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
return -EINVAL;
#endif
- if (dev->data->queue_pairs[qp_id] != NULL)
- qp = dev->data->queue_pairs[qp_id];
+ qp = dev->data->queue_pairs[qp_id];
+ if (qp == NULL) {
+ IPSEC_MB_LOG(ERR, "Primary process hasn't configured device qp.");
+ return -EINVAL;
+ }
} else {
/* Free memory prior to re-allocation if needed. */
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.139168043 +0000
+++ 0022-crypto-ipsec_mb-fix-queue-setup-null-pointer-derefer.patch 2022-02-21 15:22:44.044704019 +0000
@@ -1 +1 @@
-From f51e40d1bf5efe7e659110613c63f1beb740d203 Mon Sep 17 00:00:00 2001
+From 07ee507051541ff714ad08fe1adffeb9304b8f03 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f51e40d1bf5efe7e659110613c63f1beb740d203 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'crypto/ipsec_mb: fix queue cleanup null pointer dereference' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (20 preceding siblings ...)
2022-02-21 15:33 ` patch 'crypto/ipsec_mb: fix queue setup null pointer dereference' " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'crypto/ipsec_mb: fix tainted data for session' " Kevin Traynor
` (172 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Ciara Power; +Cc: Fan Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/4b8475c98ed9114c5760a155b111462724314bc5
Thanks.
Kevin
---
From 4b8475c98ed9114c5760a155b111462724314bc5 Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Fri, 10 Dec 2021 14:09:51 +0000
Subject: [PATCH] crypto/ipsec_mb: fix queue cleanup null pointer dereference
[ upstream commit 581c39b1cb7d82d301a8ec6a16778bcf6ee11c7c ]
The qp was being used in the cleanup without checking if it was non NULL.
A check is now added to verify qp is non NULL before use.
Coverity issue: 374375
Fixes: c75542ae4200 ("crypto/ipsec_mb: introduce IPsec_mb framework")
Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
drivers/crypto/ipsec_mb/ipsec_mb_ops.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/ipsec_mb/ipsec_mb_ops.c b/drivers/crypto/ipsec_mb/ipsec_mb_ops.c
index 6efa417d67..1ebd23e8f0 100644
--- a/drivers/crypto/ipsec_mb/ipsec_mb_ops.c
+++ b/drivers/crypto/ipsec_mb/ipsec_mb_ops.c
@@ -286,4 +286,6 @@ ipsec_mb_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
qp_setup_cleanup:
+ if (qp == NULL)
+ return ret;
#if IMB_VERSION(1, 1, 0) > IMB_VERSION_NUM
if (qp->mb_mgr)
@@ -295,6 +297,5 @@ qp_setup_cleanup:
rte_memzone_free(qp->mb_mgr_mz);
#endif
- if (qp)
- rte_free(qp);
+ rte_free(qp);
return ret;
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.157391035 +0000
+++ 0023-crypto-ipsec_mb-fix-queue-cleanup-null-pointer-deref.patch 2022-02-21 15:22:44.044704019 +0000
@@ -1 +1 @@
-From 581c39b1cb7d82d301a8ec6a16778bcf6ee11c7c Mon Sep 17 00:00:00 2001
+From 4b8475c98ed9114c5760a155b111462724314bc5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 581c39b1cb7d82d301a8ec6a16778bcf6ee11c7c ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'crypto/ipsec_mb: fix tainted data for session' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (21 preceding siblings ...)
2022-02-21 15:33 ` patch 'crypto/ipsec_mb: fix queue cleanup " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'examples/ipsec-secgw: fix eventdev start sequence' " Kevin Traynor
` (171 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Ciara Power; +Cc: Fan Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/5831db3bab8267894558c1a74f4fb42747fba5e8
Thanks.
Kevin
---
From 5831db3bab8267894558c1a74f4fb42747fba5e8 Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Fri, 10 Dec 2021 14:09:52 +0000
Subject: [PATCH] crypto/ipsec_mb: fix tainted data for session
[ upstream commit 21bdbf24321de9f0336a0e6e0bc618a1e094aa4c ]
Downcasting a void * to struct aesni_gcm_session * caused the session
data to be treated as tainted.
Removing the void * temporary variable and adding a cast avoids this
issue.
Coverity issue: 374377
Fixes: 746825e5c0ea ("crypto/ipsec_mb: move aesni_gcm PMD")
Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
drivers/crypto/ipsec_mb/pmd_aesni_gcm.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/crypto/ipsec_mb/pmd_aesni_gcm.c b/drivers/crypto/ipsec_mb/pmd_aesni_gcm.c
index 2c203795ab..e5ad629fe5 100644
--- a/drivers/crypto/ipsec_mb/pmd_aesni_gcm.c
+++ b/drivers/crypto/ipsec_mb/pmd_aesni_gcm.c
@@ -714,17 +714,15 @@ aesni_gcm_process_bulk(struct rte_cryptodev *dev,
struct rte_crypto_sym_vec *vec)
{
- void *sess_priv;
struct aesni_gcm_session *s;
struct gcm_context_data gdata_ctx;
IMB_MGR *mb_mgr;
- sess_priv = get_sym_session_private_data(sess, dev->driver_id);
- if (unlikely(sess_priv == NULL)) {
+ s = (struct aesni_gcm_session *) get_sym_session_private_data(sess,
+ dev->driver_id);
+ if (unlikely(s == NULL)) {
aesni_gcm_fill_error_code(vec, EINVAL);
return 0;
}
- s = sess_priv;
-
/* get per-thread MB MGR, create one if needed */
mb_mgr = get_per_thread_mb_mgr();
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.176424548 +0000
+++ 0024-crypto-ipsec_mb-fix-tainted-data-for-session.patch 2022-02-21 15:22:44.045704022 +0000
@@ -1 +1 @@
-From 21bdbf24321de9f0336a0e6e0bc618a1e094aa4c Mon Sep 17 00:00:00 2001
+From 5831db3bab8267894558c1a74f4fb42747fba5e8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 21bdbf24321de9f0336a0e6e0bc618a1e094aa4c ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'examples/ipsec-secgw: fix eventdev start sequence' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (22 preceding siblings ...)
2022-02-21 15:33 ` patch 'crypto/ipsec_mb: fix tainted data for session' " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'examples/ipsec-secgw: fix default flow rule creation' " Kevin Traynor
` (170 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Nithin Dabilpuram; +Cc: Anoob Joseph, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/8c4f0e9e7375550cbe0ca2404a956bc063d904ee
Thanks.
Kevin
---
From 8c4f0e9e7375550cbe0ca2404a956bc063d904ee Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <ndabilpuram@marvell.com>
Date: Thu, 2 Dec 2021 18:00:36 +0530
Subject: [PATCH] examples/ipsec-secgw: fix eventdev start sequence
[ upstream commit 986c2c9e5696ea61e2e440702e21d28e7d8eaa5f ]
Start eventdev after complete initialization of event dev,
rx adapter and tx adapter.
Fixes: e0b0e55c8f15 ("examples/ipsec-secgw: add framework for event helper")
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
---
examples/ipsec-secgw/event_helper.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/examples/ipsec-secgw/event_helper.c b/examples/ipsec-secgw/event_helper.c
index 24b210add4..8947e41803 100644
--- a/examples/ipsec-secgw/event_helper.c
+++ b/examples/ipsec-secgw/event_helper.c
@@ -717,4 +717,14 @@ eh_initialize_eventdev(struct eventmode_conf *em_conf)
}
+ return 0;
+}
+
+static int
+eh_start_eventdev(struct eventmode_conf *em_conf)
+{
+ struct eventdev_params *eventdev_config;
+ int nb_eventdev = em_conf->nb_eventdev;
+ int i, ret;
+
/* Start event devices */
for (i = 0; i < nb_eventdev; i++) {
@@ -1689,4 +1699,11 @@ eh_devs_init(struct eh_conf *conf)
}
+ /* Start eventdev */
+ ret = eh_start_eventdev(em_conf);
+ if (ret < 0) {
+ EH_LOG_ERR("Failed to start event dev %d", ret);
+ return ret;
+ }
+
/* Start eth devices after setting up adapter */
RTE_ETH_FOREACH_DEV(port_id) {
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.194726235 +0000
+++ 0025-examples-ipsec-secgw-fix-eventdev-start-sequence.patch 2022-02-21 15:22:44.046704024 +0000
@@ -1 +1 @@
-From 986c2c9e5696ea61e2e440702e21d28e7d8eaa5f Mon Sep 17 00:00:00 2001
+From 8c4f0e9e7375550cbe0ca2404a956bc063d904ee Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 986c2c9e5696ea61e2e440702e21d28e7d8eaa5f ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'examples/ipsec-secgw: fix default flow rule creation' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (23 preceding siblings ...)
2022-02-21 15:33 ` patch 'examples/ipsec-secgw: fix eventdev start sequence' " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'devtools: fix comment detection in forbidden token check' " Kevin Traynor
` (169 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Nithin Dabilpuram; +Cc: Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/19aefaf2cbc92a4622fd06e32ed4db66b5912576
Thanks.
Kevin
---
From 19aefaf2cbc92a4622fd06e32ed4db66b5912576 Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <ndabilpuram@marvell.com>
Date: Fri, 17 Dec 2021 18:14:51 +0530
Subject: [PATCH] examples/ipsec-secgw: fix default flow rule creation
[ upstream commit b0c6a0f1ee962b1540aab44df94e0fd65a9def9b ]
Fix default flow rule to create after ethdev start to align
with rte_flow spec.
Fixes: 513f192b5fd4 ("examples/ipsec-secgw: add default flow for inline Rx")
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
examples/ipsec-secgw/ipsec-secgw.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 96916cd3c5..21abc0d251 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -3380,11 +3380,12 @@ main(int32_t argc, char **argv)
continue;
- /* Create flow before starting the device */
- create_default_ipsec_flow(portid, req_rx_offloads[portid]);
-
ret = rte_eth_dev_start(portid);
if (ret < 0)
rte_exit(EXIT_FAILURE, "rte_eth_dev_start: "
"err=%d, port=%d\n", ret, portid);
+
+ /* Create flow after starting the device */
+ create_default_ipsec_flow(portid, req_rx_offloads[portid]);
+
/*
* If enabled, put device in promiscuous mode.
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.214645757 +0000
+++ 0026-examples-ipsec-secgw-fix-default-flow-rule-creation.patch 2022-02-21 15:22:44.048704028 +0000
@@ -1 +1 @@
-From b0c6a0f1ee962b1540aab44df94e0fd65a9def9b Mon Sep 17 00:00:00 2001
+From 19aefaf2cbc92a4622fd06e32ed4db66b5912576 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b0c6a0f1ee962b1540aab44df94e0fd65a9def9b ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'devtools: fix comment detection in forbidden token check' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (24 preceding siblings ...)
2022-02-21 15:33 ` patch 'examples/ipsec-secgw: fix default flow rule creation' " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'dma/cnxk: fix installing internal headers' " Kevin Traynor
` (168 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: David Marchand; +Cc: Thomas Monjalon, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/bb6b3ec4e91a6a9472e9fb8fb8e2ed7d7c86f32e
Thanks.
Kevin
---
From bb6b3ec4e91a6a9472e9fb8fb8e2ed7d7c86f32e Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 27 Jan 2022 11:55:11 +0100
Subject: [PATCH] devtools: fix comment detection in forbidden token check
[ upstream commit fdcc8970bce23d476e7fabd18a82fb298725c511 ]
After a comment section was detected, passing to a new hunk was not seen
as ending the section and all subsequent hunks were ignored.
Fixes: 7413e7f2aeb3 ("devtools: alert on new calls to exit from libs")
Reported-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
devtools/check-forbidden-tokens.awk | 3 +++
1 file changed, 3 insertions(+)
diff --git a/devtools/check-forbidden-tokens.awk b/devtools/check-forbidden-tokens.awk
index 61ba707c9b..026844141c 100755
--- a/devtools/check-forbidden-tokens.awk
+++ b/devtools/check-forbidden-tokens.awk
@@ -21,4 +21,7 @@ BEGIN {
# checkpatches.pl
(in_file) {
+ if ($0 ~ "^@@") {
+ in_comment = 0
+ }
# comment start
if (index($0,comment_start) > 0) {
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.234751198 +0000
+++ 0027-devtools-fix-comment-detection-in-forbidden-token-ch.patch 2022-02-21 15:22:44.048704028 +0000
@@ -1 +1 @@
-From fdcc8970bce23d476e7fabd18a82fb298725c511 Mon Sep 17 00:00:00 2001
+From bb6b3ec4e91a6a9472e9fb8fb8e2ed7d7c86f32e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fdcc8970bce23d476e7fabd18a82fb298725c511 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'dma/cnxk: fix installing internal headers' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (25 preceding siblings ...)
2022-02-21 15:33 ` patch 'devtools: fix comment detection in forbidden token check' " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'net/mlx5: fix modify field MAC address offset' " Kevin Traynor
` (167 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Srikanth Yalavarthi; +Cc: Radha Mohan Chintakuntla, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/d021a2f9b77a15ede2326d6f4ecdad1f3507d47c
Thanks.
Kevin
---
From d021a2f9b77a15ede2326d6f4ecdad1f3507d47c Mon Sep 17 00:00:00 2001
From: Srikanth Yalavarthi <syalavarthi@marvell.com>
Date: Tue, 25 Jan 2022 21:49:34 -0800
Subject: [PATCH] dma/cnxk: fix installing internal headers
[ upstream commit d91998ff68fe23f351523235e5f37ec679de6b65 ]
DMA module internal header files are currently being installed to the
prefix directory. This patch updates DMA meson config file to exclude
internal headers during install stage.
Fixes: 53f6d7328bf4 ("dma/cnxk: create and initialize device on PCI probing")
Signed-off-by: Srikanth Yalavarthi <syalavarthi@marvell.com>
Acked-by: Radha Mohan Chintakuntla <radhac@marvell.com>
---
drivers/dma/cnxk/meson.build | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/dma/cnxk/meson.build b/drivers/dma/cnxk/meson.build
index 633e92a20d..d4be4ee860 100644
--- a/drivers/dma/cnxk/meson.build
+++ b/drivers/dma/cnxk/meson.build
@@ -4,3 +4,2 @@
deps += ['bus_pci', 'common_cnxk', 'dmadev']
sources = files('cnxk_dmadev.c')
-headers = files('cnxk_dmadev.h')
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.253622063 +0000
+++ 0028-dma-cnxk-fix-installing-internal-headers.patch 2022-02-21 15:22:44.048704028 +0000
@@ -1 +1 @@
-From d91998ff68fe23f351523235e5f37ec679de6b65 Mon Sep 17 00:00:00 2001
+From d021a2f9b77a15ede2326d6f4ecdad1f3507d47c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d91998ff68fe23f351523235e5f37ec679de6b65 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/mlx5: fix modify field MAC address offset' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (26 preceding siblings ...)
2022-02-21 15:33 ` patch 'dma/cnxk: fix installing internal headers' " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'common/mlx5: add minimum WQE size for striding RQ' " Kevin Traynor
` (166 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Viacheslav Ovsiienko; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/0422d795486a564a1256bd5223029f5e44ada8a2
Thanks.
Kevin
---
From 0422d795486a564a1256bd5223029f5e44ada8a2 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Fri, 26 Nov 2021 15:09:45 +0200
Subject: [PATCH] net/mlx5: fix modify field MAC address offset
[ upstream commit 252b5ae03685e3d4a0a184b7c6a603ea8837419b ]
The MAC addresses fields are 48 bit wide and are processed
by mlx5 PMD as two words. There the bug was introduced for
the offset, causing malfunction of MODIFY_FIELD action
with MAC address fields as source or destination and
with non zero field offset.
Fixes: 40c8fb1fd3b3 ("net/mlx5: update modify field action")
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 8022d7d11f..5d9fbffd0e 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1504,5 +1504,5 @@ mlx5_flow_field_id_to_modify_info
info[idx++] = (struct field_modify_info){2, 0,
MLX5_MODI_OUT_DMAC_15_0};
- info[idx] = (struct field_modify_info){4, 0,
+ info[idx] = (struct field_modify_info){4, off,
MLX5_MODI_OUT_DMAC_47_16};
}
@@ -1534,5 +1534,5 @@ mlx5_flow_field_id_to_modify_info
info[idx++] = (struct field_modify_info){2, 0,
MLX5_MODI_OUT_SMAC_15_0};
- info[idx] = (struct field_modify_info){4, 0,
+ info[idx] = (struct field_modify_info){4, off,
MLX5_MODI_OUT_SMAC_47_16};
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.271831165 +0000
+++ 0029-net-mlx5-fix-modify-field-MAC-address-offset.patch 2022-02-21 15:22:44.058704051 +0000
@@ -1 +1 @@
-From 252b5ae03685e3d4a0a184b7c6a603ea8837419b Mon Sep 17 00:00:00 2001
+From 0422d795486a564a1256bd5223029f5e44ada8a2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 252b5ae03685e3d4a0a184b7c6a603ea8837419b ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'common/mlx5: add minimum WQE size for striding RQ' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (27 preceding siblings ...)
2022-02-21 15:33 ` patch 'net/mlx5: fix modify field MAC address offset' " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'net/mlx5: improve stride parameter names' " Kevin Traynor
` (165 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Michael Baum; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/f873364dfe365f912edf67764fbe3f8473804761
Thanks.
Kevin
---
From f873364dfe365f912edf67764fbe3f8473804761 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Tue, 23 Nov 2021 20:38:03 +0200
Subject: [PATCH] common/mlx5: add minimum WQE size for striding RQ
[ upstream commit 10599cf83ebe768fe5ebe3e430c2a3c4250aafca ]
Some devices have a WQE size limit for striding RQ. On some newer
devices, this limitation is smaller and information on its size is
provided by the firmware.
This patch adds the attribute query from firmware: the minimum required
size of WQE buffer for striding RQ in granularity of Bytes.
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/common/mlx5/mlx5_devx_cmds.c | 16 ++++++++++++++++
drivers/common/mlx5/mlx5_devx_cmds.h | 1 +
drivers/common/mlx5/mlx5_prm.h | 11 +++++++++--
3 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c
index 7cd3d4fa98..2e807a0829 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.c
+++ b/drivers/common/mlx5/mlx5_devx_cmds.c
@@ -824,4 +824,5 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
uint32_t in[MLX5_ST_SZ_DW(query_hca_cap_in)] = {0};
uint32_t out[MLX5_ST_SZ_DW(query_hca_cap_out)] = {0};
+ bool hca_cap_2_sup;
uint64_t general_obj_types_supported = 0;
void *hcattr;
@@ -833,4 +834,5 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
if (!hcattr)
return rc;
+ hca_cap_2_sup = MLX5_GET(cmd_hca_cap, hcattr, hca_cap_2);
attr->max_wqe_sz_sq = MLX5_GET(cmd_hca_cap, hcattr, max_wqe_sz_sq);
attr->flow_counter_bulk_alloc_bitmap =
@@ -968,4 +970,18 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
MLX5_GENERAL_OBJ_TYPES_CAP_CONN_TRACK_OFFLOAD);
attr->rq_delay_drop = MLX5_GET(cmd_hca_cap, hcattr, rq_delay_drop);
+ if (hca_cap_2_sup) {
+ hcattr = mlx5_devx_get_hca_cap(ctx, in, out, &rc,
+ MLX5_GET_HCA_CAP_OP_MOD_GENERAL_DEVICE_2 |
+ MLX5_HCA_CAP_OPMOD_GET_CUR);
+ if (!hcattr) {
+ DRV_LOG(DEBUG,
+ "Failed to query DevX HCA capabilities 2.");
+ return rc;
+ }
+ attr->log_min_stride_wqe_sz = MLX5_GET(cmd_hca_cap_2, hcattr,
+ log_min_stride_wqe_sz);
+ }
+ if (attr->log_min_stride_wqe_sz == 0)
+ attr->log_min_stride_wqe_sz = MLX5_MPRQ_LOG_MIN_STRIDE_WQE_SIZE;
if (attr->qos.sup) {
hcattr = mlx5_devx_get_hca_cap(ctx, in, out, &rc,
diff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h
index d7f71646a3..37821b493e 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.h
+++ b/drivers/common/mlx5/mlx5_devx_cmds.h
@@ -252,4 +252,5 @@ struct mlx5_hca_attr {
uint32_t umr_modify_entity_size_disabled:1;
uint32_t umr_indirect_mkey_disabled:1;
+ uint32_t log_min_stride_wqe_sz:5;
uint16_t max_wqe_sz_sq;
};
diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h
index 982a53ffbe..495b63191a 100644
--- a/drivers/common/mlx5/mlx5_prm.h
+++ b/drivers/common/mlx5/mlx5_prm.h
@@ -265,4 +265,7 @@
#define MLX5_MAX_LOG_RQ_SEGS 5u
+/* Log 2 of the default size of a WQE for Multi-Packet RQ. */
+#define MLX5_MPRQ_LOG_MIN_STRIDE_WQE_SIZE 14U
+
/* The alignment needed for WQ buffer. */
#define MLX5_WQE_BUF_ALIGNMENT rte_mem_page_size()
@@ -1343,5 +1346,7 @@ enum {
struct mlx5_ifc_cmd_hca_cap_bits {
- u8 reserved_at_0[0x30];
+ u8 reserved_at_0[0x20];
+ u8 hca_cap_2[0x1];
+ u8 reserved_at_21[0xf];
u8 vhca_id[0x10];
u8 reserved_at_40[0x20];
@@ -1910,5 +1915,6 @@ struct mlx5_ifc_cmd_hca_cap_2_bits {
u8 max_reformat_remove_size[0x8];
u8 max_reformat_remove_offset[0x8]; /* End of DW6. */
- u8 aso_conntrack_reg_id[0x8];
+ u8 reserved_at_c0[0x3];
+ u8 log_min_stride_wqe_sz[0x5];
u8 reserved_at_c8[0x3];
u8 log_conn_track_granularity[0x5];
@@ -1923,4 +1929,5 @@ struct mlx5_ifc_cmd_hca_cap_2_bits {
union mlx5_ifc_hca_cap_union_bits {
struct mlx5_ifc_cmd_hca_cap_bits cmd_hca_cap;
+ struct mlx5_ifc_cmd_hca_cap_2_bits cmd_hca_cap_2;
struct mlx5_ifc_per_protocol_networking_offload_caps_bits
per_protocol_networking_offload_caps;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.302202732 +0000
+++ 0030-common-mlx5-add-minimum-WQE-size-for-striding-RQ.patch 2022-02-21 15:22:44.062704060 +0000
@@ -1 +1 @@
-From 10599cf83ebe768fe5ebe3e430c2a3c4250aafca Mon Sep 17 00:00:00 2001
+From f873364dfe365f912edf67764fbe3f8473804761 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 10599cf83ebe768fe5ebe3e430c2a3c4250aafca ]
+
@@ -12,2 +13,0 @@
-
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/mlx5: improve stride parameter names' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (28 preceding siblings ...)
2022-02-21 15:33 ` patch 'common/mlx5: add minimum WQE size for striding RQ' " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'net/mlx5: fix MPRQ stride devargs adjustment' " Kevin Traynor
` (164 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Michael Baum; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/c58aaabeded8ece2321743ca3dc42601804037a3
Thanks.
Kevin
---
From c58aaabeded8ece2321743ca3dc42601804037a3 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Tue, 23 Nov 2021 20:38:04 +0200
Subject: [PATCH] net/mlx5: improve stride parameter names
[ upstream commit 0947ed380febad9d6f794b6f4e9aa9137860a06e ]
In the striding RQ management there are two important parameters, the
size of the single stride in bytes and the number of strides.
Both the data-path structure and config structure keep the log of the
above parameters. However, in their names there is no mention that the
value is a log which may be misleading as if the fields represent the
values themselves.
This patch updates their names describing the values more accurately.
Fixes: ecb160456aed ("net/mlx5: add device parameter for MPRQ stride size")
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/linux/mlx5_os.c | 36 +++++-----
drivers/net/mlx5/linux/mlx5_verbs.c | 4 +-
drivers/net/mlx5/mlx5.c | 4 +-
drivers/net/mlx5/mlx5.h | 8 +--
drivers/net/mlx5/mlx5_defs.h | 4 +-
drivers/net/mlx5/mlx5_devx.c | 4 +-
drivers/net/mlx5/mlx5_rx.c | 22 +++---
drivers/net/mlx5/mlx5_rx.h | 12 ++--
drivers/net/mlx5/mlx5_rxq.c | 100 +++++++++++++++-------------
drivers/net/mlx5/mlx5_rxtx_vec.c | 8 +--
10 files changed, 104 insertions(+), 98 deletions(-)
diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index 36f0fbf04a..dd6c637564 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -1550,32 +1550,32 @@ err_secondary:
(config->hw_fcs_strip ? "" : "not "));
if (config->mprq.enabled && mprq) {
- if (config->mprq.stride_num_n &&
- (config->mprq.stride_num_n > mprq_max_stride_num_n ||
- config->mprq.stride_num_n < mprq_min_stride_num_n)) {
- config->mprq.stride_num_n =
- RTE_MIN(RTE_MAX(MLX5_MPRQ_STRIDE_NUM_N,
- mprq_min_stride_num_n),
- mprq_max_stride_num_n);
+ if (config->mprq.log_stride_num &&
+ (config->mprq.log_stride_num > mprq_max_stride_num_n ||
+ config->mprq.log_stride_num < mprq_min_stride_num_n)) {
+ config->mprq.log_stride_num =
+ RTE_MIN(RTE_MAX(MLX5_MPRQ_DEFAULT_LOG_STRIDE_NUM,
+ mprq_min_stride_num_n),
+ mprq_max_stride_num_n);
DRV_LOG(WARNING,
"the number of strides"
" for Multi-Packet RQ is out of range,"
" setting default value (%u)",
- 1 << config->mprq.stride_num_n);
+ 1 << config->mprq.log_stride_num);
}
- if (config->mprq.stride_size_n &&
- (config->mprq.stride_size_n > mprq_max_stride_size_n ||
- config->mprq.stride_size_n < mprq_min_stride_size_n)) {
- config->mprq.stride_size_n =
- RTE_MIN(RTE_MAX(MLX5_MPRQ_STRIDE_SIZE_N,
- mprq_min_stride_size_n),
- mprq_max_stride_size_n);
+ if (config->mprq.log_stride_size &&
+ (config->mprq.log_stride_size > mprq_max_stride_size_n ||
+ config->mprq.log_stride_size < mprq_min_stride_size_n)) {
+ config->mprq.log_stride_size =
+ RTE_MIN(RTE_MAX(MLX5_MPRQ_DEFAULT_LOG_STRIDE_SIZE,
+ mprq_min_stride_size_n),
+ mprq_max_stride_size_n);
DRV_LOG(WARNING,
"the size of a stride"
" for Multi-Packet RQ is out of range,"
" setting default value (%u)",
- 1 << config->mprq.stride_size_n);
+ 1 << config->mprq.log_stride_size);
}
- config->mprq.min_stride_size_n = mprq_min_stride_size_n;
- config->mprq.max_stride_size_n = mprq_max_stride_size_n;
+ config->mprq.log_min_stride_size = mprq_min_stride_size_n;
+ config->mprq.log_max_stride_size = mprq_max_stride_size_n;
} else if (config->mprq.enabled && !mprq) {
DRV_LOG(WARNING, "Multi-Packet RQ isn't supported");
diff --git a/drivers/net/mlx5/linux/mlx5_verbs.c b/drivers/net/mlx5/linux/mlx5_verbs.c
index 58556d2bf0..2b6eef44a7 100644
--- a/drivers/net/mlx5/linux/mlx5_verbs.c
+++ b/drivers/net/mlx5/linux/mlx5_verbs.c
@@ -273,6 +273,6 @@ mlx5_rxq_ibv_wq_create(struct mlx5_rxq_priv *rxq)
wq_attr.mlx5.comp_mask |= MLX5DV_WQ_INIT_ATTR_MASK_STRIDING_RQ;
*mprq_attr = (struct mlx5dv_striding_rq_init_attr){
- .single_stride_log_num_of_bytes = rxq_data->strd_sz_n,
- .single_wqe_log_num_of_strides = rxq_data->strd_num_n,
+ .single_stride_log_num_of_bytes = rxq_data->log_strd_sz,
+ .single_wqe_log_num_of_strides = rxq_data->log_strd_num,
.two_byte_shift_en = MLX5_MPRQ_TWO_BYTE_SHIFT,
};
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 8b4387d6b4..67eda41a60 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -1885,7 +1885,7 @@ mlx5_args_check(const char *key, const char *val, void *opaque)
config->mprq.enabled = !!tmp;
} else if (strcmp(MLX5_RX_MPRQ_LOG_STRIDE_NUM, key) == 0) {
- config->mprq.stride_num_n = tmp;
+ config->mprq.log_stride_num = tmp;
} else if (strcmp(MLX5_RX_MPRQ_LOG_STRIDE_SIZE, key) == 0) {
- config->mprq.stride_size_n = tmp;
+ config->mprq.log_stride_size = tmp;
} else if (strcmp(MLX5_RX_MPRQ_MAX_MEMCPY_LEN, key) == 0) {
config->mprq.max_memcpy_len = tmp;
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index b55f5816af..fa9af1db44 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -276,8 +276,8 @@ struct mlx5_dev_config {
struct {
unsigned int enabled:1; /* Whether MPRQ is enabled. */
- unsigned int stride_num_n; /* Number of strides. */
- unsigned int stride_size_n; /* Size of a stride. */
- unsigned int min_stride_size_n; /* Min size of a stride. */
- unsigned int max_stride_size_n; /* Max size of a stride. */
+ unsigned int log_stride_num; /* Log number of strides. */
+ unsigned int log_stride_size; /* Log size of a stride. */
+ unsigned int log_min_stride_size; /* Log min size of a stride.*/
+ unsigned int log_max_stride_size; /* Log max size of a stride.*/
unsigned int max_memcpy_len;
/* Maximum packet size to memcpy Rx packets. */
diff --git a/drivers/net/mlx5/mlx5_defs.h b/drivers/net/mlx5/mlx5_defs.h
index 258475ed2c..36b384fa08 100644
--- a/drivers/net/mlx5/mlx5_defs.h
+++ b/drivers/net/mlx5/mlx5_defs.h
@@ -114,8 +114,8 @@
/* Log 2 of the default number of strides per WQE for Multi-Packet RQ. */
-#define MLX5_MPRQ_STRIDE_NUM_N 6U
+#define MLX5_MPRQ_DEFAULT_LOG_STRIDE_NUM 6U
/* Log 2 of the default size of a stride per WQE for Multi-Packet RQ. */
-#define MLX5_MPRQ_STRIDE_SIZE_N 11U
+#define MLX5_MPRQ_DEFAULT_LOG_STRIDE_SIZE 11U
/* Two-byte shift is disabled for Multi-Packet RQ. */
diff --git a/drivers/net/mlx5/mlx5_devx.c b/drivers/net/mlx5/mlx5_devx.c
index 105c3d67f0..91243f684f 100644
--- a/drivers/net/mlx5/mlx5_devx.c
+++ b/drivers/net/mlx5/mlx5_devx.c
@@ -258,9 +258,9 @@ mlx5_rxq_create_devx_rq_resources(struct mlx5_rxq_priv *rxq)
*/
rq_attr.wq_attr.single_wqe_log_num_of_strides =
- rxq_data->strd_num_n -
+ rxq_data->log_strd_num -
MLX5_MIN_SINGLE_WQE_LOG_NUM_STRIDES;
/* Stride size = (2^single_stride_log_num_of_bytes)*64B. */
rq_attr.wq_attr.single_stride_log_num_of_bytes =
- rxq_data->strd_sz_n -
+ rxq_data->log_strd_sz -
MLX5_MIN_SINGLE_STRIDE_LOG_NUM_BYTES;
wqe_size = sizeof(struct mlx5_wqe_mprq);
diff --git a/drivers/net/mlx5/mlx5_rx.c b/drivers/net/mlx5/mlx5_rx.c
index c8d2f407c9..f388fcc313 100644
--- a/drivers/net/mlx5/mlx5_rx.c
+++ b/drivers/net/mlx5/mlx5_rx.c
@@ -74,5 +74,5 @@ rx_queue_count(struct mlx5_rxq_data *rxq)
const unsigned int sges_n = (1 << rxq->sges_n);
const unsigned int elts_n = (1 << rxq->elts_n);
- const unsigned int strd_n = (1 << rxq->strd_num_n);
+ const unsigned int strd_n = RTE_BIT32(rxq->log_strd_num);
const unsigned int cqe_cnt = cqe_n - 1;
unsigned int cq_ci, used;
@@ -168,6 +168,6 @@ mlx5_rxq_info_get(struct rte_eth_dev *dev, uint16_t rx_queue_id,
qinfo->scattered_rx = dev->data->scattered_rx;
qinfo->nb_desc = mlx5_rxq_mprq_enabled(rxq) ?
- (1 << rxq->elts_n) * (1 << rxq->strd_num_n) :
- (1 << rxq->elts_n);
+ RTE_BIT32(rxq->elts_n) * RTE_BIT32(rxq->log_strd_num) :
+ RTE_BIT32(rxq->elts_n);
}
@@ -355,8 +355,8 @@ mlx5_rxq_initialize(struct mlx5_rxq_data *rxq)
scat = &((volatile struct mlx5_wqe_mprq *)
rxq->wqes)[i].dseg;
- addr = (uintptr_t)mlx5_mprq_buf_addr(buf,
- 1 << rxq->strd_num_n);
- byte_count = (1 << rxq->strd_sz_n) *
- (1 << rxq->strd_num_n);
+ addr = (uintptr_t)mlx5_mprq_buf_addr
+ (buf, RTE_BIT32(rxq->log_strd_num));
+ byte_count = RTE_BIT32(rxq->log_strd_sz) *
+ RTE_BIT32(rxq->log_strd_num);
lkey = mlx5_rx_addr2mr(rxq, addr);
} else {
@@ -384,5 +384,5 @@ mlx5_rxq_initialize(struct mlx5_rxq_data *rxq)
};
rxq->elts_ci = mlx5_rxq_mprq_enabled(rxq) ?
- (wqe_n >> rxq->sges_n) * (1 << rxq->strd_num_n) : 0;
+ (wqe_n >> rxq->sges_n) * RTE_BIT32(rxq->log_strd_num) : 0;
/* Update doorbell counter. */
rxq->rq_ci = wqe_n >> rxq->sges_n;
@@ -413,5 +413,5 @@ mlx5_rx_err_handle(struct mlx5_rxq_data *rxq, uint8_t vec)
const uint16_t cqe_mask = cqe_n - 1;
const uint16_t wqe_n = 1 << rxq->elts_n;
- const uint16_t strd_n = 1 << rxq->strd_num_n;
+ const uint16_t strd_n = RTE_BIT32(rxq->log_strd_num);
struct mlx5_rxq_ctrl *rxq_ctrl =
container_of(rxq, struct mlx5_rxq_ctrl, rxq);
@@ -1046,6 +1046,6 @@ mlx5_rx_burst_mprq(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
{
struct mlx5_rxq_data *rxq = dpdk_rxq;
- const uint32_t strd_n = 1 << rxq->strd_num_n;
- const uint32_t strd_sz = 1 << rxq->strd_sz_n;
+ const uint32_t strd_n = RTE_BIT32(rxq->log_strd_num);
+ const uint32_t strd_sz = RTE_BIT32(rxq->log_strd_sz);
const uint32_t cq_mask = (1 << rxq->cqe_n) - 1;
const uint32_t wq_mask = (1 << rxq->elts_n) - 1;
diff --git a/drivers/net/mlx5/mlx5_rx.h b/drivers/net/mlx5/mlx5_rx.h
index f808bf288f..adb759c235 100644
--- a/drivers/net/mlx5/mlx5_rx.h
+++ b/drivers/net/mlx5/mlx5_rx.h
@@ -89,6 +89,6 @@ struct mlx5_rxq_data {
unsigned int rss_hash:1; /* RSS hash result is enabled. */
unsigned int mark:1; /* Marked flow available on the queue. */
- unsigned int strd_num_n:5; /* Log 2 of the number of stride. */
- unsigned int strd_sz_n:4; /* Log 2 of stride size. */
+ unsigned int log_strd_num:5; /* Log 2 of the number of stride. */
+ unsigned int log_strd_sz:4; /* Log 2 of stride size. */
unsigned int strd_shift_en:1; /* Enable 2bytes shift on a stride. */
unsigned int err_state:2; /* enum mlx5_rxq_err_state. */
@@ -402,5 +402,5 @@ static __rte_always_inline void
mprq_buf_replace(struct mlx5_rxq_data *rxq, uint16_t rq_idx)
{
- const uint32_t strd_n = 1 << rxq->strd_num_n;
+ const uint32_t strd_n = RTE_BIT32(rxq->log_strd_num);
struct mlx5_mprq_buf *rep = rxq->mprq_repl;
volatile struct mlx5_wqe_data_seg *wqe =
@@ -460,6 +460,6 @@ mprq_buf_to_pkt(struct mlx5_rxq_data *rxq, struct rte_mbuf *pkt, uint32_t len,
struct mlx5_mprq_buf *buf, uint16_t strd_idx, uint16_t strd_cnt)
{
- const uint32_t strd_n = 1 << rxq->strd_num_n;
- const uint16_t strd_sz = 1 << rxq->strd_sz_n;
+ const uint32_t strd_n = RTE_BIT32(rxq->log_strd_num);
+ const uint16_t strd_sz = RTE_BIT32(rxq->log_strd_sz);
const uint16_t strd_shift =
MLX5_MPRQ_STRIDE_SHIFT_BYTE * rxq->strd_shift_en;
@@ -606,5 +606,5 @@ static __rte_always_inline int
mlx5_rxq_mprq_enabled(struct mlx5_rxq_data *rxq)
{
- return rxq->strd_num_n > 0;
+ return rxq->log_strd_num > 0;
}
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index be5f4da1e5..f2247de488 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -68,5 +68,5 @@ mlx5_rxq_cqe_num(struct mlx5_rxq_data *rxq_data)
if (mlx5_rxq_mprq_enabled(rxq_data))
- cqe_n = wqe_n * (1 << rxq_data->strd_num_n) - 1;
+ cqe_n = wqe_n * RTE_BIT32(rxq_data->log_strd_num) - 1;
else
cqe_n = wqe_n - 1;
@@ -138,6 +138,7 @@ rxq_alloc_elts_sprq(struct mlx5_rxq_ctrl *rxq_ctrl)
const unsigned int sges_n = 1 << rxq_ctrl->rxq.sges_n;
unsigned int elts_n = mlx5_rxq_mprq_enabled(&rxq_ctrl->rxq) ?
- (1 << rxq_ctrl->rxq.elts_n) * (1 << rxq_ctrl->rxq.strd_num_n) :
- (1 << rxq_ctrl->rxq.elts_n);
+ RTE_BIT32(rxq_ctrl->rxq.elts_n) *
+ RTE_BIT32(rxq_ctrl->rxq.log_strd_num) :
+ RTE_BIT32(rxq_ctrl->rxq.elts_n);
unsigned int i;
int err;
@@ -294,6 +295,6 @@ rxq_free_elts_sprq(struct mlx5_rxq_ctrl *rxq_ctrl)
struct mlx5_rxq_data *rxq = &rxq_ctrl->rxq;
const uint16_t q_n = mlx5_rxq_mprq_enabled(&rxq_ctrl->rxq) ?
- (1 << rxq->elts_n) * (1 << rxq->strd_num_n) :
- (1 << rxq->elts_n);
+ RTE_BIT32(rxq->elts_n) * RTE_BIT32(rxq->log_strd_num) :
+ RTE_BIT32(rxq->elts_n);
const uint16_t q_mask = q_n - 1;
uint16_t elts_ci = mlx5_rxq_mprq_enabled(&rxq_ctrl->rxq) ?
@@ -1379,6 +1380,6 @@ mlx5_mprq_alloc_mp(struct rte_eth_dev *dev)
unsigned int obj_num;
unsigned int obj_size;
- unsigned int strd_num_n = 0;
- unsigned int strd_sz_n = 0;
+ unsigned int log_strd_num = 0;
+ unsigned int log_strd_sz = 0;
unsigned int i;
unsigned int n_ibv = 0;
@@ -1399,14 +1400,16 @@ mlx5_mprq_alloc_mp(struct rte_eth_dev *dev)
desc += 1 << rxq->elts_n;
/* Get the max number of strides. */
- if (strd_num_n < rxq->strd_num_n)
- strd_num_n = rxq->strd_num_n;
+ if (log_strd_num < rxq->log_strd_num)
+ log_strd_num = rxq->log_strd_num;
/* Get the max size of a stride. */
- if (strd_sz_n < rxq->strd_sz_n)
- strd_sz_n = rxq->strd_sz_n;
+ if (log_strd_sz < rxq->log_strd_sz)
+ log_strd_sz = rxq->log_strd_sz;
}
- MLX5_ASSERT(strd_num_n && strd_sz_n);
- buf_len = (1 << strd_num_n) * (1 << strd_sz_n);
- obj_size = sizeof(struct mlx5_mprq_buf) + buf_len + (1 << strd_num_n) *
- sizeof(struct rte_mbuf_ext_shared_info) + RTE_PKTMBUF_HEADROOM;
+ MLX5_ASSERT(log_strd_num && log_strd_sz);
+ buf_len = RTE_BIT32(log_strd_num) * RTE_BIT32(log_strd_sz);
+ obj_size = sizeof(struct mlx5_mprq_buf) + buf_len +
+ RTE_BIT32(log_strd_num) *
+ sizeof(struct rte_mbuf_ext_shared_info) +
+ RTE_PKTMBUF_HEADROOM;
/*
* Received packets can be either memcpy'd or externally referenced. In
@@ -1454,5 +1457,5 @@ mlx5_mprq_alloc_mp(struct rte_eth_dev *dev)
mp = rte_mempool_create(name, obj_num, obj_size, MLX5_MPRQ_MP_CACHE_SZ,
0, NULL, NULL, mlx5_mprq_buf_init,
- (void *)((uintptr_t)1 << strd_num_n),
+ (void *)((uintptr_t)1 << log_strd_num),
dev->device->numa_node, 0);
if (mp == NULL) {
@@ -1570,13 +1573,16 @@ mlx5_rxq_new(struct rte_eth_dev *dev, struct mlx5_rxq_priv *rxq,
const int mprq_en = mlx5_check_mprq_support(dev) > 0 && n_seg == 1 &&
!rx_seg[0].offset && !rx_seg[0].length;
- unsigned int mprq_stride_nums = config->mprq.stride_num_n ?
- config->mprq.stride_num_n : MLX5_MPRQ_STRIDE_NUM_N;
- unsigned int mprq_stride_size = non_scatter_min_mbuf_size <=
- (1U << config->mprq.max_stride_size_n) ?
- log2above(non_scatter_min_mbuf_size) : MLX5_MPRQ_STRIDE_SIZE_N;
- unsigned int mprq_stride_cap = (config->mprq.stride_num_n ?
- (1U << config->mprq.stride_num_n) : (1U << mprq_stride_nums)) *
- (config->mprq.stride_size_n ?
- (1U << config->mprq.stride_size_n) : (1U << mprq_stride_size));
+ unsigned int log_mprq_stride_nums = config->mprq.log_stride_num ?
+ config->mprq.log_stride_num : MLX5_MPRQ_DEFAULT_LOG_STRIDE_NUM;
+ unsigned int log_mprq_stride_size = non_scatter_min_mbuf_size <=
+ RTE_BIT32(config->mprq.log_max_stride_size) ?
+ log2above(non_scatter_min_mbuf_size) :
+ MLX5_MPRQ_DEFAULT_LOG_STRIDE_SIZE;
+ unsigned int mprq_stride_cap = (config->mprq.log_stride_num ?
+ RTE_BIT32(config->mprq.log_stride_num) :
+ RTE_BIT32(log_mprq_stride_nums)) *
+ (config->mprq.log_stride_size ?
+ RTE_BIT32(config->mprq.log_stride_size) :
+ RTE_BIT32(log_mprq_stride_size));
/*
* Always allocate extra slots, even if eventually
@@ -1590,5 +1596,5 @@ mlx5_rxq_new(struct rte_eth_dev *dev, struct mlx5_rxq_priv *rxq,
sizeof(*tmpl) + desc_n * sizeof(struct rte_mbuf *) +
(!!mprq_en) *
- (desc >> mprq_stride_nums) * sizeof(struct mlx5_mprq_buf *),
+ (desc >> log_mprq_stride_nums) * sizeof(struct mlx5_mprq_buf *),
0, socket);
if (!tmpl) {
@@ -1702,22 +1708,22 @@ mlx5_rxq_new(struct rte_eth_dev *dev, struct mlx5_rxq_priv *rxq,
* - The number of descs is more than the number of strides.
* - max_rx_pktlen plus overhead is less than the max size
- * of a stride or mprq_stride_size is specified by a user.
+ * of a stride or log_mprq_stride_size is specified by a user.
* Need to make sure that there are enough strides to encap
- * the maximum packet size in case mprq_stride_size is set.
+ * the maximum packet size in case log_mprq_stride_size is set.
* Otherwise, enable Rx scatter if necessary.
*/
- if (mprq_en && desc > (1U << mprq_stride_nums) &&
+ if (mprq_en && desc > RTE_BIT32(log_mprq_stride_nums) &&
(non_scatter_min_mbuf_size <=
- (1U << config->mprq.max_stride_size_n) ||
- (config->mprq.stride_size_n &&
+ RTE_BIT32(config->mprq.log_max_stride_size) ||
+ (config->mprq.log_stride_size &&
non_scatter_min_mbuf_size <= mprq_stride_cap))) {
/* TODO: Rx scatter isn't supported yet. */
tmpl->rxq.sges_n = 0;
/* Trim the number of descs needed. */
- desc >>= mprq_stride_nums;
- tmpl->rxq.strd_num_n = config->mprq.stride_num_n ?
- config->mprq.stride_num_n : mprq_stride_nums;
- tmpl->rxq.strd_sz_n = config->mprq.stride_size_n ?
- config->mprq.stride_size_n : mprq_stride_size;
+ desc >>= log_mprq_stride_nums;
+ tmpl->rxq.log_strd_num = config->mprq.log_stride_num ?
+ config->mprq.log_stride_num : log_mprq_stride_nums;
+ tmpl->rxq.log_strd_sz = config->mprq.log_stride_size ?
+ config->mprq.log_stride_size : log_mprq_stride_size;
tmpl->rxq.strd_shift_en = MLX5_MPRQ_TWO_BYTE_SHIFT;
tmpl->rxq.strd_scatter_en =
@@ -1726,11 +1732,11 @@ mlx5_rxq_new(struct rte_eth_dev *dev, struct mlx5_rxq_priv *rxq,
config->mprq.max_memcpy_len);
max_lro_size = RTE_MIN(max_rx_pktlen,
- (1u << tmpl->rxq.strd_num_n) *
- (1u << tmpl->rxq.strd_sz_n));
+ RTE_BIT32(tmpl->rxq.log_strd_num) *
+ RTE_BIT32(tmpl->rxq.log_strd_sz));
DRV_LOG(DEBUG,
"port %u Rx queue %u: Multi-Packet RQ is enabled"
" strd_num_n = %u, strd_sz_n = %u",
dev->data->port_id, idx,
- tmpl->rxq.strd_num_n, tmpl->rxq.strd_sz_n);
+ tmpl->rxq.log_strd_num, tmpl->rxq.log_strd_sz);
} else if (tmpl->rxq.rxseg_n == 1) {
MLX5_ASSERT(max_rx_pktlen <= first_mb_free_size);
@@ -1775,13 +1781,13 @@ mlx5_rxq_new(struct rte_eth_dev *dev, struct mlx5_rxq_priv *rxq,
dev->data->port_id, non_scatter_min_mbuf_size,
desc, priv->rxqs_n,
- config->mprq.stride_size_n ?
- (1U << config->mprq.stride_size_n) :
- (1U << mprq_stride_size),
- config->mprq.stride_num_n ?
- (1U << config->mprq.stride_num_n) :
- (1U << mprq_stride_nums),
+ config->mprq.log_stride_size ?
+ RTE_BIT32(config->mprq.log_stride_size) :
+ RTE_BIT32(log_mprq_stride_size),
+ config->mprq.log_stride_num ?
+ RTE_BIT32(config->mprq.log_stride_num) :
+ RTE_BIT32(log_mprq_stride_nums),
config->mprq.min_rxqs_num,
- (1U << config->mprq.min_stride_size_n),
- (1U << config->mprq.max_stride_size_n));
+ RTE_BIT32(config->mprq.log_min_stride_size),
+ RTE_BIT32(config->mprq.log_max_stride_size));
DRV_LOG(DEBUG, "port %u maximum number of segments per packet: %u",
dev->data->port_id, 1 << tmpl->rxq.sges_n);
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec.c b/drivers/net/mlx5/mlx5_rxtx_vec.c
index 6212ce8247..0e2eab068a 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec.c
+++ b/drivers/net/mlx5/mlx5_rxtx_vec.c
@@ -149,5 +149,5 @@ mlx5_rx_mprq_replenish_bulk_mbuf(struct mlx5_rxq_data *rxq)
{
const uint16_t wqe_n = 1 << rxq->elts_n;
- const uint32_t strd_n = 1 << rxq->strd_num_n;
+ const uint32_t strd_n = RTE_BIT32(rxq->log_strd_num);
const uint32_t elts_n = wqe_n * strd_n;
const uint32_t wqe_mask = elts_n - 1;
@@ -198,6 +198,6 @@ rxq_copy_mprq_mbuf_v(struct mlx5_rxq_data *rxq,
const uint16_t wqe_n = 1 << rxq->elts_n;
const uint16_t wqe_mask = wqe_n - 1;
- const uint16_t strd_sz = 1 << rxq->strd_sz_n;
- const uint32_t strd_n = 1 << rxq->strd_num_n;
+ const uint16_t strd_sz = RTE_BIT32(rxq->log_strd_sz);
+ const uint32_t strd_n = RTE_BIT32(rxq->log_strd_num);
const uint32_t elts_n = wqe_n * strd_n;
const uint32_t elts_mask = elts_n - 1;
@@ -429,5 +429,5 @@ rxq_burst_mprq_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts,
const uint16_t q_mask = q_n - 1;
const uint16_t wqe_n = 1 << rxq->elts_n;
- const uint32_t strd_n = 1 << rxq->strd_num_n;
+ const uint32_t strd_n = RTE_BIT32(rxq->log_strd_num);
const uint32_t elts_n = wqe_n * strd_n;
const uint32_t elts_mask = elts_n - 1;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.325112403 +0000
+++ 0031-net-mlx5-improve-stride-parameter-names.patch 2022-02-21 15:22:44.069704076 +0000
@@ -1 +1 @@
-From 0947ed380febad9d6f794b6f4e9aa9137860a06e Mon Sep 17 00:00:00 2001
+From c58aaabeded8ece2321743ca3dc42601804037a3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0947ed380febad9d6f794b6f4e9aa9137860a06e ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/mlx5: fix MPRQ stride devargs adjustment' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (29 preceding siblings ...)
2022-02-21 15:33 ` patch 'net/mlx5: improve stride parameter names' " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'common/cnxk: fix nibble parsing order when dumping MCAM' " Kevin Traynor
` (163 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Michael Baum; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/23b8e0a3372a9c77ca60920b658f6e12056a5c59
Thanks.
Kevin
---
From 23b8e0a3372a9c77ca60920b658f6e12056a5c59 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Tue, 23 Nov 2021 20:38:05 +0200
Subject: [PATCH] net/mlx5: fix MPRQ stride devargs adjustment
[ upstream commit 34776af600df4475799ad8004e76d0eb77c163ff ]
In Multi-Packet RQ creation, the user can choose the number of strides
and their size in bytes. The user updates it using specific devargs for
both of these parameters.
The above two parameters determine the size of the WQE which is actually
their product of multiplication.
If the user selects values that are not in the supported range, the PMD
changes them to default values. However, apart from the range
limitations for each parameter individually there is also a minimum
value on their multiplication. When the user selects values that their
multiplication are lower than minimum value, no adjustment is made and
the creation of the WQE fails.
This patch adds an adjustment in these cases as well. When the user
selects values whose multiplication is lower than the minimum, they are
replaced with the default values.
Fixes: ecb160456aed ("net/mlx5: add device parameter for MPRQ stride size")
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/linux/mlx5_os.c | 56 +++------
drivers/net/mlx5/mlx5.h | 4 +
drivers/net/mlx5/mlx5_rxq.c | 209 +++++++++++++++++++++----------
3 files changed, 159 insertions(+), 110 deletions(-)
diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index dd6c637564..aecdc5a68a 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -882,8 +882,4 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
unsigned int swp = 0;
unsigned int mprq = 0;
- unsigned int mprq_min_stride_size_n = 0;
- unsigned int mprq_max_stride_size_n = 0;
- unsigned int mprq_min_stride_num_n = 0;
- unsigned int mprq_max_stride_num_n = 0;
struct rte_ether_addr mac;
char name[RTE_ETH_NAME_MAX_LEN];
@@ -1040,13 +1036,15 @@ err_secondary:
DRV_LOG(DEBUG, "\tsupported_qpts: %d",
mprq_caps.supported_qpts);
+ DRV_LOG(DEBUG, "\tmin_stride_wqe_log_size: %d",
+ config->mprq.log_min_stride_wqe_size);
DRV_LOG(DEBUG, "device supports Multi-Packet RQ");
mprq = 1;
- mprq_min_stride_size_n =
+ config->mprq.log_min_stride_size =
mprq_caps.min_single_stride_log_num_of_bytes;
- mprq_max_stride_size_n =
+ config->mprq.log_max_stride_size =
mprq_caps.max_single_stride_log_num_of_bytes;
- mprq_min_stride_num_n =
+ config->mprq.log_min_stride_num =
mprq_caps.min_single_wqe_log_num_of_strides;
- mprq_max_stride_num_n =
+ config->mprq.log_max_stride_num =
mprq_caps.max_single_wqe_log_num_of_strides;
}
@@ -1549,34 +1547,5 @@ err_secondary:
DRV_LOG(DEBUG, "FCS stripping configuration is %ssupported",
(config->hw_fcs_strip ? "" : "not "));
- if (config->mprq.enabled && mprq) {
- if (config->mprq.log_stride_num &&
- (config->mprq.log_stride_num > mprq_max_stride_num_n ||
- config->mprq.log_stride_num < mprq_min_stride_num_n)) {
- config->mprq.log_stride_num =
- RTE_MIN(RTE_MAX(MLX5_MPRQ_DEFAULT_LOG_STRIDE_NUM,
- mprq_min_stride_num_n),
- mprq_max_stride_num_n);
- DRV_LOG(WARNING,
- "the number of strides"
- " for Multi-Packet RQ is out of range,"
- " setting default value (%u)",
- 1 << config->mprq.log_stride_num);
- }
- if (config->mprq.log_stride_size &&
- (config->mprq.log_stride_size > mprq_max_stride_size_n ||
- config->mprq.log_stride_size < mprq_min_stride_size_n)) {
- config->mprq.log_stride_size =
- RTE_MIN(RTE_MAX(MLX5_MPRQ_DEFAULT_LOG_STRIDE_SIZE,
- mprq_min_stride_size_n),
- mprq_max_stride_size_n);
- DRV_LOG(WARNING,
- "the size of a stride"
- " for Multi-Packet RQ is out of range,"
- " setting default value (%u)",
- 1 << config->mprq.log_stride_size);
- }
- config->mprq.log_min_stride_size = mprq_min_stride_size_n;
- config->mprq.log_max_stride_size = mprq_max_stride_size_n;
- } else if (config->mprq.enabled && !mprq) {
+ if (config->mprq.enabled && !mprq) {
DRV_LOG(WARNING, "Multi-Packet RQ isn't supported");
config->mprq.enabled = 0;
@@ -2069,5 +2038,6 @@ mlx5_device_bond_pci_match(const char *ibdev_name,
static void
-mlx5_os_config_default(struct mlx5_dev_config *config)
+mlx5_os_config_default(struct mlx5_dev_config *config,
+ struct mlx5_common_dev_config *cconf)
{
memset(config, 0, sizeof(*config));
@@ -2081,4 +2051,8 @@ mlx5_os_config_default(struct mlx5_dev_config *config)
config->mprq.max_memcpy_len = MLX5_MPRQ_MEMCPY_DEFAULT_LEN;
config->mprq.min_rxqs_num = MLX5_MPRQ_MIN_RXQS;
+ config->mprq.log_min_stride_wqe_size = cconf->devx ?
+ cconf->hca_attr.log_min_stride_wqe_sz :
+ MLX5_MPRQ_LOG_MIN_STRIDE_WQE_SIZE;
+ config->mprq.log_stride_num = MLX5_MPRQ_DEFAULT_LOG_STRIDE_NUM;
config->dv_esw_en = 1;
config->dv_flow_en = 1;
@@ -2497,5 +2471,5 @@ mlx5_os_pci_probe_pf(struct mlx5_common_device *cdev,
/* Default configuration. */
- mlx5_os_config_default(&dev_config);
+ mlx5_os_config_default(&dev_config, &cdev->config);
dev_config.vf = dev_config_vf;
list[i].eth_dev = mlx5_dev_spawn(cdev->dev, &list[i],
@@ -2667,5 +2641,5 @@ mlx5_os_auxiliary_probe(struct mlx5_common_device *cdev)
return ret;
/* Set default config data. */
- mlx5_os_config_default(&config);
+ mlx5_os_config_default(&config, &cdev->config);
config.sf = 1;
/* Init spawn data. */
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index fa9af1db44..9413e3397c 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -280,4 +280,8 @@ struct mlx5_dev_config {
unsigned int log_min_stride_size; /* Log min size of a stride.*/
unsigned int log_max_stride_size; /* Log max size of a stride.*/
+ unsigned int log_min_stride_num; /* Log min num of strides. */
+ unsigned int log_max_stride_num; /* Log max num of strides. */
+ unsigned int log_min_stride_wqe_size;
+ /* Log min WQE size, (size of single stride)*(num of strides).*/
unsigned int max_memcpy_len;
/* Maximum packet size to memcpy Rx packets. */
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index f2247de488..eda609dd78 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -1534,4 +1534,124 @@ mlx5_max_lro_msg_size_adjust(struct rte_eth_dev *dev, uint16_t idx,
}
+/**
+ * Prepare both size and number of stride for Multi-Packet RQ.
+ *
+ * @param dev
+ * Pointer to Ethernet device.
+ * @param idx
+ * RX queue index.
+ * @param desc
+ * Number of descriptors to configure in queue.
+ * @param rx_seg_en
+ * Indicator if Rx segment enables, if so Multi-Packet RQ doesn't enable.
+ * @param min_mbuf_size
+ * Non scatter min mbuf size, max_rx_pktlen plus overhead.
+ * @param actual_log_stride_num
+ * Log number of strides to configure for this queue.
+ * @param actual_log_stride_size
+ * Log stride size to configure for this queue.
+ *
+ * @return
+ * 0 if Multi-Packet RQ is supported, otherwise -1.
+ */
+static int
+mlx5_mprq_prepare(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
+ bool rx_seg_en, uint32_t min_mbuf_size,
+ uint32_t *actual_log_stride_num,
+ uint32_t *actual_log_stride_size)
+{
+ struct mlx5_priv *priv = dev->data->dev_private;
+ struct mlx5_dev_config *config = &priv->config;
+ uint32_t log_min_stride_num = config->mprq.log_min_stride_num;
+ uint32_t log_max_stride_num = config->mprq.log_max_stride_num;
+ uint32_t log_def_stride_num =
+ RTE_MIN(RTE_MAX(MLX5_MPRQ_DEFAULT_LOG_STRIDE_NUM,
+ log_min_stride_num),
+ log_max_stride_num);
+ uint32_t log_min_stride_size = config->mprq.log_min_stride_size;
+ uint32_t log_max_stride_size = config->mprq.log_max_stride_size;
+ uint32_t log_def_stride_size =
+ RTE_MIN(RTE_MAX(MLX5_MPRQ_DEFAULT_LOG_STRIDE_SIZE,
+ log_min_stride_size),
+ log_max_stride_size);
+ uint32_t log_stride_wqe_size;
+
+ if (mlx5_check_mprq_support(dev) != 1 || rx_seg_en)
+ goto unsupport;
+ /* Checks if chosen number of strides is in supported range. */
+ if (config->mprq.log_stride_num > log_max_stride_num ||
+ config->mprq.log_stride_num < log_min_stride_num) {
+ *actual_log_stride_num = log_def_stride_num;
+ DRV_LOG(WARNING,
+ "Port %u Rx queue %u number of strides for Multi-Packet RQ is out of range, setting default value (%u)",
+ dev->data->port_id, idx, RTE_BIT32(log_def_stride_num));
+ } else {
+ *actual_log_stride_num = config->mprq.log_stride_num;
+ }
+ if (config->mprq.log_stride_size) {
+ /* Checks if chosen size of stride is in supported range. */
+ if (config->mprq.log_stride_size > log_max_stride_size ||
+ config->mprq.log_stride_size < log_min_stride_size) {
+ *actual_log_stride_size = log_def_stride_size;
+ DRV_LOG(WARNING,
+ "Port %u Rx queue %u size of a stride for Multi-Packet RQ is out of range, setting default value (%u)",
+ dev->data->port_id, idx,
+ RTE_BIT32(log_def_stride_size));
+ } else {
+ *actual_log_stride_size = config->mprq.log_stride_size;
+ }
+ } else {
+ if (min_mbuf_size <= RTE_BIT32(log_max_stride_size))
+ *actual_log_stride_size = log2above(min_mbuf_size);
+ else
+ goto unsupport;
+ }
+ log_stride_wqe_size = *actual_log_stride_num + *actual_log_stride_size;
+ /* Check if WQE buffer size is supported by hardware. */
+ if (log_stride_wqe_size < config->mprq.log_min_stride_wqe_size) {
+ *actual_log_stride_num = log_def_stride_num;
+ *actual_log_stride_size = log_def_stride_size;
+ DRV_LOG(WARNING,
+ "Port %u Rx queue %u size of WQE buffer for Multi-Packet RQ is too small, setting default values (stride_num_n=%u, stride_size_n=%u)",
+ dev->data->port_id, idx, RTE_BIT32(log_def_stride_num),
+ RTE_BIT32(log_def_stride_size));
+ log_stride_wqe_size = log_def_stride_num + log_def_stride_size;
+ }
+ MLX5_ASSERT(log_stride_wqe_size < config->mprq.log_min_stride_wqe_size);
+ if (desc <= RTE_BIT32(*actual_log_stride_num))
+ goto unsupport;
+ if (min_mbuf_size > RTE_BIT32(log_stride_wqe_size)) {
+ DRV_LOG(WARNING, "Port %u Rx queue %u "
+ "Multi-Packet RQ is unsupported, WQE buffer size (%u) "
+ "is smaller than min mbuf size (%u)",
+ dev->data->port_id, idx, RTE_BIT32(log_stride_wqe_size),
+ min_mbuf_size);
+ goto unsupport;
+ }
+ DRV_LOG(DEBUG, "Port %u Rx queue %u "
+ "Multi-Packet RQ is enabled strd_num_n = %u, strd_sz_n = %u",
+ dev->data->port_id, idx, RTE_BIT32(*actual_log_stride_num),
+ RTE_BIT32(*actual_log_stride_size));
+ return 0;
+unsupport:
+ if (config->mprq.enabled)
+ DRV_LOG(WARNING,
+ "Port %u MPRQ is requested but cannot be enabled\n"
+ " (requested: pkt_sz = %u, desc_num = %u,"
+ " rxq_num = %u, stride_sz = %u, stride_num = %u\n"
+ " supported: min_rxqs_num = %u, min_buf_wqe_sz = %u"
+ " min_stride_sz = %u, max_stride_sz = %u).\n"
+ "Rx segment is %senable.",
+ dev->data->port_id, min_mbuf_size, desc, priv->rxqs_n,
+ RTE_BIT32(config->mprq.log_stride_size),
+ RTE_BIT32(config->mprq.log_stride_num),
+ config->mprq.min_rxqs_num,
+ RTE_BIT32(config->mprq.log_min_stride_wqe_size),
+ RTE_BIT32(config->mprq.log_min_stride_size),
+ RTE_BIT32(config->mprq.log_max_stride_size),
+ rx_seg_en ? "" : "not ");
+ return -1;
+}
+
/**
* Create a DPDK Rx queue.
@@ -1571,18 +1691,11 @@ mlx5_rxq_new(struct rte_eth_dev *dev, struct mlx5_rxq_priv *rxq,
unsigned int max_lro_size = 0;
unsigned int first_mb_free_size = mb_len - RTE_PKTMBUF_HEADROOM;
- const int mprq_en = mlx5_check_mprq_support(dev) > 0 && n_seg == 1 &&
- !rx_seg[0].offset && !rx_seg[0].length;
- unsigned int log_mprq_stride_nums = config->mprq.log_stride_num ?
- config->mprq.log_stride_num : MLX5_MPRQ_DEFAULT_LOG_STRIDE_NUM;
- unsigned int log_mprq_stride_size = non_scatter_min_mbuf_size <=
- RTE_BIT32(config->mprq.log_max_stride_size) ?
- log2above(non_scatter_min_mbuf_size) :
- MLX5_MPRQ_DEFAULT_LOG_STRIDE_SIZE;
- unsigned int mprq_stride_cap = (config->mprq.log_stride_num ?
- RTE_BIT32(config->mprq.log_stride_num) :
- RTE_BIT32(log_mprq_stride_nums)) *
- (config->mprq.log_stride_size ?
- RTE_BIT32(config->mprq.log_stride_size) :
- RTE_BIT32(log_mprq_stride_size));
+ uint32_t mprq_log_actual_stride_num = 0;
+ uint32_t mprq_log_actual_stride_size = 0;
+ bool rx_seg_en = n_seg != 1 || rx_seg[0].offset || rx_seg[0].length;
+ const int mprq_en = !mlx5_mprq_prepare(dev, idx, desc, rx_seg_en,
+ non_scatter_min_mbuf_size,
+ &mprq_log_actual_stride_num,
+ &mprq_log_actual_stride_size);
/*
* Always allocate extra slots, even if eventually
@@ -1590,12 +1703,14 @@ mlx5_rxq_new(struct rte_eth_dev *dev, struct mlx5_rxq_priv *rxq,
*/
uint16_t desc_n = desc + config->rx_vec_en * MLX5_VPMD_DESCS_PER_LOOP;
+ size_t alloc_size = sizeof(*tmpl) + desc_n * sizeof(struct rte_mbuf *);
const struct rte_eth_rxseg_split *qs_seg = rx_seg;
unsigned int tail_len;
- tmpl = mlx5_malloc(MLX5_MEM_RTE | MLX5_MEM_ZERO,
- sizeof(*tmpl) + desc_n * sizeof(struct rte_mbuf *) +
- (!!mprq_en) *
- (desc >> log_mprq_stride_nums) * sizeof(struct mlx5_mprq_buf *),
- 0, socket);
+ if (mprq_en) {
+ /* Trim the number of descs needed. */
+ desc >>= mprq_log_actual_stride_num;
+ alloc_size += desc * sizeof(struct mlx5_mprq_buf *);
+ }
+ tmpl = mlx5_malloc(MLX5_MEM_RTE | MLX5_MEM_ZERO, alloc_size, 0, socket);
if (!tmpl) {
rte_errno = ENOMEM;
@@ -1702,28 +1817,9 @@ mlx5_rxq_new(struct rte_eth_dev *dev, struct mlx5_rxq_priv *rxq,
if (dev->data->dev_conf.intr_conf.rxq)
tmpl->irq = 1;
- /*
- * This Rx queue can be configured as a Multi-Packet RQ if all of the
- * following conditions are met:
- * - MPRQ is enabled.
- * - The number of descs is more than the number of strides.
- * - max_rx_pktlen plus overhead is less than the max size
- * of a stride or log_mprq_stride_size is specified by a user.
- * Need to make sure that there are enough strides to encap
- * the maximum packet size in case log_mprq_stride_size is set.
- * Otherwise, enable Rx scatter if necessary.
- */
- if (mprq_en && desc > RTE_BIT32(log_mprq_stride_nums) &&
- (non_scatter_min_mbuf_size <=
- RTE_BIT32(config->mprq.log_max_stride_size) ||
- (config->mprq.log_stride_size &&
- non_scatter_min_mbuf_size <= mprq_stride_cap))) {
+ if (mprq_en) {
/* TODO: Rx scatter isn't supported yet. */
tmpl->rxq.sges_n = 0;
- /* Trim the number of descs needed. */
- desc >>= log_mprq_stride_nums;
- tmpl->rxq.log_strd_num = config->mprq.log_stride_num ?
- config->mprq.log_stride_num : log_mprq_stride_nums;
- tmpl->rxq.log_strd_sz = config->mprq.log_stride_size ?
- config->mprq.log_stride_size : log_mprq_stride_size;
+ tmpl->rxq.log_strd_num = mprq_log_actual_stride_num;
+ tmpl->rxq.log_strd_sz = mprq_log_actual_stride_size;
tmpl->rxq.strd_shift_en = MLX5_MPRQ_TWO_BYTE_SHIFT;
tmpl->rxq.strd_scatter_en =
@@ -1734,9 +1830,4 @@ mlx5_rxq_new(struct rte_eth_dev *dev, struct mlx5_rxq_priv *rxq,
RTE_BIT32(tmpl->rxq.log_strd_num) *
RTE_BIT32(tmpl->rxq.log_strd_sz));
- DRV_LOG(DEBUG,
- "port %u Rx queue %u: Multi-Packet RQ is enabled"
- " strd_num_n = %u, strd_sz_n = %u",
- dev->data->port_id, idx,
- tmpl->rxq.log_strd_num, tmpl->rxq.log_strd_sz);
} else if (tmpl->rxq.rxseg_n == 1) {
MLX5_ASSERT(max_rx_pktlen <= first_mb_free_size);
@@ -1772,22 +1863,4 @@ mlx5_rxq_new(struct rte_eth_dev *dev, struct mlx5_rxq_priv *rxq,
max_lro_size = max_rx_pktlen;
}
- if (config->mprq.enabled && !mlx5_rxq_mprq_enabled(&tmpl->rxq))
- DRV_LOG(WARNING,
- "port %u MPRQ is requested but cannot be enabled\n"
- " (requested: pkt_sz = %u, desc_num = %u,"
- " rxq_num = %u, stride_sz = %u, stride_num = %u\n"
- " supported: min_rxqs_num = %u,"
- " min_stride_sz = %u, max_stride_sz = %u).",
- dev->data->port_id, non_scatter_min_mbuf_size,
- desc, priv->rxqs_n,
- config->mprq.log_stride_size ?
- RTE_BIT32(config->mprq.log_stride_size) :
- RTE_BIT32(log_mprq_stride_size),
- config->mprq.log_stride_num ?
- RTE_BIT32(config->mprq.log_stride_num) :
- RTE_BIT32(log_mprq_stride_nums),
- config->mprq.min_rxqs_num,
- RTE_BIT32(config->mprq.log_min_stride_size),
- RTE_BIT32(config->mprq.log_max_stride_size));
DRV_LOG(DEBUG, "port %u maximum number of segments per packet: %u",
dev->data->port_id, 1 << tmpl->rxq.sges_n);
@@ -1847,15 +1920,13 @@ mlx5_rxq_new(struct rte_eth_dev *dev, struct mlx5_rxq_priv *rxq,
tmpl->rxq.crc_present ? "disabled" : "enabled",
tmpl->rxq.crc_present << 2);
- /* Save port ID. */
tmpl->rxq.rss_hash = !!priv->rss_conf.rss_hf &&
(!!(dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_RSS));
+ /* Save port ID. */
tmpl->rxq.port_id = dev->data->port_id;
tmpl->sh = priv->sh;
tmpl->rxq.mp = rx_seg[0].mp;
tmpl->rxq.elts_n = log2above(desc);
- tmpl->rxq.rq_repl_thresh =
- MLX5_VPMD_RXQ_RPLNSH_THRESH(desc_n);
- tmpl->rxq.elts =
- (struct rte_mbuf *(*)[desc_n])(tmpl + 1);
+ tmpl->rxq.rq_repl_thresh = MLX5_VPMD_RXQ_RPLNSH_THRESH(desc_n);
+ tmpl->rxq.elts = (struct rte_mbuf *(*)[desc_n])(tmpl + 1);
tmpl->rxq.mprq_bufs =
(struct mlx5_mprq_buf *(*)[desc])(*tmpl->rxq.elts + desc_n);
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.353017535 +0000
+++ 0032-net-mlx5-fix-MPRQ-stride-devargs-adjustment.patch 2022-02-21 15:22:44.072704082 +0000
@@ -1 +1 @@
-From 34776af600df4475799ad8004e76d0eb77c163ff Mon Sep 17 00:00:00 2001
+From 23b8e0a3372a9c77ca60920b658f6e12056a5c59 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 34776af600df4475799ad8004e76d0eb77c163ff ]
+
@@ -24 +25,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'common/cnxk: fix nibble parsing order when dumping MCAM' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (30 preceding siblings ...)
2022-02-21 15:33 ` patch 'net/mlx5: fix MPRQ stride devargs adjustment' " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'net/qede: fix redundant condition in debug code' " Kevin Traynor
` (162 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Satheesh Paul; +Cc: Jerin Jacob, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/9ff875ecff4db358371c856592c6b2fed6a18ef7
Thanks.
Kevin
---
From 9ff875ecff4db358371c856592c6b2fed6a18ef7 Mon Sep 17 00:00:00 2001
From: Satheesh Paul <psatheesh@marvell.com>
Date: Wed, 24 Nov 2021 13:25:27 +0530
Subject: [PATCH] common/cnxk: fix nibble parsing order when dumping MCAM
[ upstream commit 0ed49186793742b89a30c35f141d833501de5661 ]
Fix the order in which layer flags and layer type fields
are parsed when dumping the MCAM data.
Fixes: 9869c39918a0 ("common/cnxk: support flow entry dump")
Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
drivers/common/cnxk/roc_npc_mcam_dump.c | 40 ++++++++++++-------------
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/drivers/common/cnxk/roc_npc_mcam_dump.c b/drivers/common/cnxk/roc_npc_mcam_dump.c
index 19b4901a52..278056591e 100644
--- a/drivers/common/cnxk/roc_npc_mcam_dump.c
+++ b/drivers/common/cnxk/roc_npc_mcam_dump.c
@@ -160,4 +160,10 @@ npc_flow_print_parse_nibbles(FILE *file, struct roc_npc_flow *flow,
}
+ if (rx_parse->laflags) {
+ data = npc_get_nibbles(flow, 2, offset);
+ fprintf(file, "\tNPC_PARSE_NIBBLE_LA_FLAGS:%#02X\n", data);
+ offset += 8;
+ }
+
if (rx_parse->latype) {
data = npc_get_nibbles(flow, 1, offset);
@@ -167,7 +173,7 @@ npc_flow_print_parse_nibbles(FILE *file, struct roc_npc_flow *flow,
}
- if (rx_parse->laflags) {
+ if (rx_parse->lbflags) {
data = npc_get_nibbles(flow, 2, offset);
- fprintf(file, "\tNPC_PARSE_NIBBLE_LA_FLAGS:%#02X\n", data);
+ fprintf(file, "\tNPC_PARSE_NIBBLE_LB_FLAGS:%#02X\n", data);
offset += 8;
}
@@ -180,7 +186,7 @@ npc_flow_print_parse_nibbles(FILE *file, struct roc_npc_flow *flow,
}
- if (rx_parse->lbflags) {
+ if (rx_parse->lcflags) {
data = npc_get_nibbles(flow, 2, offset);
- fprintf(file, "\tNPC_PARSE_NIBBLE_LB_FLAGS:%#02X\n", data);
+ fprintf(file, "\tNPC_PARSE_NIBBLE_LC_FLAGS:%#02X\n", data);
offset += 8;
}
@@ -193,7 +199,7 @@ npc_flow_print_parse_nibbles(FILE *file, struct roc_npc_flow *flow,
}
- if (rx_parse->lcflags) {
+ if (rx_parse->ldflags) {
data = npc_get_nibbles(flow, 2, offset);
- fprintf(file, "\tNPC_PARSE_NIBBLE_LC_FLAGS:%#02X\n", data);
+ fprintf(file, "\tNPC_PARSE_NIBBLE_LD_FLAGS:%#02X\n", data);
offset += 8;
}
@@ -206,7 +212,7 @@ npc_flow_print_parse_nibbles(FILE *file, struct roc_npc_flow *flow,
}
- if (rx_parse->ldflags) {
+ if (rx_parse->leflags) {
data = npc_get_nibbles(flow, 2, offset);
- fprintf(file, "\tNPC_PARSE_NIBBLE_LD_FLAGS:%#02X\n", data);
+ fprintf(file, "\tNPC_PARSE_NIBBLE_LE_FLAGS:%#02X\n", data);
offset += 8;
}
@@ -219,7 +225,7 @@ npc_flow_print_parse_nibbles(FILE *file, struct roc_npc_flow *flow,
}
- if (rx_parse->leflags) {
+ if (rx_parse->lfflags) {
data = npc_get_nibbles(flow, 2, offset);
- fprintf(file, "\tNPC_PARSE_NIBBLE_LE_FLAGS:%#02X\n", data);
+ fprintf(file, "\tNPC_PARSE_NIBBLE_LF_FLAGS:%#02X\n", data);
offset += 8;
}
@@ -232,7 +238,7 @@ npc_flow_print_parse_nibbles(FILE *file, struct roc_npc_flow *flow,
}
- if (rx_parse->lfflags) {
+ if (rx_parse->lgflags) {
data = npc_get_nibbles(flow, 2, offset);
- fprintf(file, "\tNPC_PARSE_NIBBLE_LF_FLAGS:%#02X\n", data);
+ fprintf(file, "\tNPC_PARSE_NIBBLE_LG_FLAGS:%#02X\n", data);
offset += 8;
}
@@ -245,8 +251,7 @@ npc_flow_print_parse_nibbles(FILE *file, struct roc_npc_flow *flow,
}
- if (rx_parse->lgflags) {
+ if (rx_parse->lhflags) {
data = npc_get_nibbles(flow, 2, offset);
- fprintf(file, "\tNPC_PARSE_NIBBLE_LG_FLAGS:%#02X\n", data);
- offset += 8;
+ fprintf(file, "\tNPC_PARSE_NIBBLE_LH_FLAGS:%#02X\n", data);
}
@@ -257,9 +262,4 @@ npc_flow_print_parse_nibbles(FILE *file, struct roc_npc_flow *flow,
offset += 4;
}
-
- if (rx_parse->lhflags) {
- data = npc_get_nibbles(flow, 2, offset);
- fprintf(file, "\tNPC_PARSE_NIBBLE_LH_FLAGS:%#02X\n", data);
- }
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.376738170 +0000
+++ 0033-common-cnxk-fix-nibble-parsing-order-when-dumping-MC.patch 2022-02-21 15:22:44.073704085 +0000
@@ -1 +1 @@
-From 0ed49186793742b89a30c35f141d833501de5661 Mon Sep 17 00:00:00 2001
+From 9ff875ecff4db358371c856592c6b2fed6a18ef7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0ed49186793742b89a30c35f141d833501de5661 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/qede: fix redundant condition in debug code' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (31 preceding siblings ...)
2022-02-21 15:33 ` patch 'common/cnxk: fix nibble parsing order when dumping MCAM' " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'net/ice: fix pattern check for flow director parser' " Kevin Traynor
` (161 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Anatoly Burakov
Cc: Devendra Singh Rawat, Igor Russkikh, Rasesh Mody, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/f1339fd8ec6a7c575fb35f6ce2ccd3c5b853c507
Thanks.
Kevin
---
From f1339fd8ec6a7c575fb35f6ce2ccd3c5b853c507 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Tue, 30 Nov 2021 16:59:13 +0000
Subject: [PATCH] net/qede: fix redundant condition in debug code
[ upstream commit 6caee3fb5f7b45ca7a676d77f678cafc4984defa ]
Expression "a && 1" is equivalent to just "a", so fix the accidental
inclusion of a literal in code.
Fixes: ec55c118792b ("net/qede: add infrastructure for debug data collection")
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Devendra Singh Rawat <dsinghrawat@marvell.com>
Reviewed-by: Igor Russkikh <irusskikh@marvell.com>
Acked-by: Rasesh Mody <rmody@marvell.com>
---
drivers/net/qede/qede_debug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/qede/qede_debug.c b/drivers/net/qede/qede_debug.c
index af86bcc692..9383a6d677 100644
--- a/drivers/net/qede/qede_debug.c
+++ b/drivers/net/qede/qede_debug.c
@@ -3523,5 +3523,5 @@ static enum dbg_status qed_grc_dump(struct ecore_hwfn *p_hwfn,
/* Dump MCP HW Dump */
if (qed_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_MCP_HW_DUMP) &&
- !qed_grc_get_param(p_hwfn, DBG_GRC_PARAM_NO_MCP) && 1)
+ !qed_grc_get_param(p_hwfn, DBG_GRC_PARAM_NO_MCP))
offset += qed_grc_dump_mcp_hw_dump(p_hwfn,
p_ptt,
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.395194736 +0000
+++ 0034-net-qede-fix-redundant-condition-in-debug-code.patch 2022-02-21 15:22:44.077704094 +0000
@@ -1 +1 @@
-From 6caee3fb5f7b45ca7a676d77f678cafc4984defa Mon Sep 17 00:00:00 2001
+From f1339fd8ec6a7c575fb35f6ce2ccd3c5b853c507 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6caee3fb5f7b45ca7a676d77f678cafc4984defa ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/ice: fix pattern check for flow director parser' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (32 preceding siblings ...)
2022-02-21 15:33 ` patch 'net/qede: fix redundant condition in debug code' " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'net/ice: fix Tx checksum offload capability' " Kevin Traynor
` (160 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Junfeng Guo; +Cc: Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/a9ff22fc593d0d27d1286dae7c260e71976a8774
Thanks.
Kevin
---
From a9ff22fc593d0d27d1286dae7c260e71976a8774 Mon Sep 17 00:00:00 2001
From: Junfeng Guo <junfeng.guo@intel.com>
Date: Wed, 22 Dec 2021 16:11:38 +0800
Subject: [PATCH] net/ice: fix pattern check for flow director parser
[ upstream commit a631c98a96a20358d5cad00c605ebd71f8feeed8 ]
FDIR rules with masks are not supported in current code. Thus add
pattern check for IPv4/UDP/TCP/SCTP addr/port to terminate the FDIR
programming stage.
Fixes: 1b71ed2cdd5d ("net/ice: refactor flow pattern parser")
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/ice/ice_fdir_filter.c | 32 +++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index 13a2ac42df..287032a6a7 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -2038,4 +2038,12 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,
}
+ /* Mask for IPv4 src/dst addrs not supported */
+ if (!ipv4_mask->hdr.src_addr &&
+ ipv4_mask->hdr.src_addr != UINT32_MAX)
+ return -rte_errno;
+ if (!ipv4_mask->hdr.dst_addr &&
+ ipv4_mask->hdr.dst_addr != UINT32_MAX)
+ return -rte_errno;
+
if (ipv4_mask->hdr.dst_addr == UINT32_MAX)
*input_set |= ICE_INSET_IPV4_DST;
@@ -2179,4 +2187,12 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,
}
+ /* Mask for TCP src/dst ports not supported */
+ if (!tcp_mask->hdr.src_port &&
+ tcp_mask->hdr.src_port != UINT16_MAX)
+ return -rte_errno;
+ if (!tcp_mask->hdr.dst_port &&
+ tcp_mask->hdr.dst_port != UINT16_MAX)
+ return -rte_errno;
+
if (tcp_mask->hdr.src_port == UINT16_MAX)
*input_set |= ICE_INSET_TCP_SRC_PORT;
@@ -2218,4 +2234,12 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,
}
+ /* Mask for UDP src/dst ports not supported */
+ if (!udp_mask->hdr.src_port &&
+ udp_mask->hdr.src_port != UINT16_MAX)
+ return -rte_errno;
+ if (!udp_mask->hdr.dst_port &&
+ udp_mask->hdr.dst_port != UINT16_MAX)
+ return -rte_errno;
+
if (udp_mask->hdr.src_port == UINT16_MAX)
*input_set |= ICE_INSET_UDP_SRC_PORT;
@@ -2255,4 +2279,12 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,
}
+ /* Mask for SCTP src/dst ports not supported */
+ if (!sctp_mask->hdr.src_port &&
+ sctp_mask->hdr.src_port != UINT16_MAX)
+ return -rte_errno;
+ if (!sctp_mask->hdr.dst_port &&
+ sctp_mask->hdr.dst_port != UINT16_MAX)
+ return -rte_errno;
+
if (sctp_mask->hdr.src_port == UINT16_MAX)
*input_set |= ICE_INSET_SCTP_SRC_PORT;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.419297522 +0000
+++ 0035-net-ice-fix-pattern-check-for-flow-director-parser.patch 2022-02-21 15:22:44.078704096 +0000
@@ -1 +1 @@
-From a631c98a96a20358d5cad00c605ebd71f8feeed8 Mon Sep 17 00:00:00 2001
+From a9ff22fc593d0d27d1286dae7c260e71976a8774 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a631c98a96a20358d5cad00c605ebd71f8feeed8 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/ice: fix Tx checksum offload capability' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (33 preceding siblings ...)
2022-02-21 15:33 ` patch 'net/ice: fix pattern check for flow director parser' " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'net/iavf: remove git residue symbol' " Kevin Traynor
` (159 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Qi Zhang; +Cc: Qiming Yang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/3380c428a52be024398d13315cbb9689c8f9fbfe
Thanks.
Kevin
---
From 3380c428a52be024398d13315cbb9689c8f9fbfe Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Wed, 24 Nov 2021 09:09:28 +0800
Subject: [PATCH] net/ice: fix Tx checksum offload capability
[ upstream commit fd5ad5638ec0187334f0d717852e1d55aff3a0ea ]
Add missing capability for outer UDP Tx checksum.
Also fixed the feature list in ice_dcf.ini
Fixes: bf89db4409bb ("net/ice: complete device info get in DCF")
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
---
doc/guides/nics/features/ice_dcf.ini | 5 +++++
drivers/net/ice/ice_dcf_ethdev.c | 1 +
2 files changed, 6 insertions(+)
diff --git a/doc/guides/nics/features/ice_dcf.ini b/doc/guides/nics/features/ice_dcf.ini
index 4d6fb6d849..54073f0b88 100644
--- a/doc/guides/nics/features/ice_dcf.ini
+++ b/doc/guides/nics/features/ice_dcf.ini
@@ -4,4 +4,7 @@
; Refer to default.ini for the full list of available PMD features.
;
+; A feature with "P" indicates only be supported when non-vector path
+; is selected.
+;
[Features]
Queue start/stop = Y
@@ -11,4 +14,6 @@ CRC offload = Y
L3 checksum offload = P
L4 checksum offload = P
+Inner L3 checksum = P
+Inner L4 checksum = P
Basic stats = Y
Linux = Y
diff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c
index 164d834a18..a1f11c01d9 100644
--- a/drivers/net/ice/ice_dcf_ethdev.c
+++ b/drivers/net/ice/ice_dcf_ethdev.c
@@ -682,4 +682,5 @@ ice_dcf_dev_info_get(struct rte_eth_dev *dev,
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 |
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.439218615 +0000
+++ 0036-net-ice-fix-Tx-checksum-offload-capability.patch 2022-02-21 15:22:44.079704098 +0000
@@ -1 +1 @@
-From fd5ad5638ec0187334f0d717852e1d55aff3a0ea Mon Sep 17 00:00:00 2001
+From 3380c428a52be024398d13315cbb9689c8f9fbfe Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fd5ad5638ec0187334f0d717852e1d55aff3a0ea ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/iavf: remove git residue symbol' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (34 preceding siblings ...)
2022-02-21 15:33 ` patch 'net/ice: fix Tx checksum offload capability' " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'net/ice: track DCF state of PF' " Kevin Traynor
` (158 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Haiyue Wang; +Cc: Beilei Xing, Radu Nicolau, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/85e84c5930e20d1d9ea1e2df47c2be37301a05fc
Thanks.
Kevin
---
From 85e84c5930e20d1d9ea1e2df47c2be37301a05fc Mon Sep 17 00:00:00 2001
From: Haiyue Wang <haiyue.wang@intel.com>
Date: Thu, 16 Dec 2021 12:43:42 +0800
Subject: [PATCH] net/iavf: remove git residue symbol
[ upstream commit 9b8b48f43bc53f819315f38c8a78cbeac8fb09e5 ]
This extra symbol '+' should be added when patch was reapplied, and the
compiler treats it as unsigned type, so the code still runs well.
Fixes: 84108425054a ("net/iavf: support asynchronous virtual channel message")
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
---
drivers/net/iavf/iavf_vchnl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index 7602691649..169e1f2012 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -503,5 +503,5 @@ iavf_get_vf_resource(struct iavf_adapter *adapter)
VIRTCHNL_VF_LARGE_NUM_QPAIRS |
VIRTCHNL_VF_OFFLOAD_QOS |
-+ VIRTCHNL_VF_OFFLOAD_INLINE_IPSEC_CRYPTO;
+ VIRTCHNL_VF_OFFLOAD_INLINE_IPSEC_CRYPTO;
args.in_args = (uint8_t *)∩︀
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.458700226 +0000
+++ 0037-net-iavf-remove-git-residue-symbol.patch 2022-02-21 15:22:44.080704101 +0000
@@ -1 +1 @@
-From 9b8b48f43bc53f819315f38c8a78cbeac8fb09e5 Mon Sep 17 00:00:00 2001
+From 85e84c5930e20d1d9ea1e2df47c2be37301a05fc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9b8b48f43bc53f819315f38c8a78cbeac8fb09e5 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/ice: track DCF state of PF' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (35 preceding siblings ...)
2022-02-21 15:33 ` patch 'net/iavf: remove git residue symbol' " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'net/ice: fix Tx checksum offload' " Kevin Traynor
` (157 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Dapeng Yu; +Cc: Haiyue Wang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/76a729e7ed5e95e12f479a0b09c97783b9974a31
Thanks.
Kevin
---
From 76a729e7ed5e95e12f479a0b09c97783b9974a31 Mon Sep 17 00:00:00 2001
From: Dapeng Yu <dapengx.yu@intel.com>
Date: Wed, 24 Nov 2021 16:12:20 +0800
Subject: [PATCH] net/ice: track DCF state of PF
[ upstream commit 285f63fc6bb72a07594af9a7652f5bae3a95eb52 ]
When VF is reset, PF will change DCF state from ON to other state, if
flow creation, destroy, or redirect command is sent to DCF at this
time, it will fail.
This patch tracks DCF state and returns try-again error to caller when
DCF state is not ON.
Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
---
drivers/net/ice/ice_dcf_ethdev.c | 12 ++++++++
drivers/net/ice/ice_dcf_ethdev.h | 1 +
drivers/net/ice/ice_dcf_parent.c | 16 +++++++---
drivers/net/ice/ice_ethdev.h | 2 ++
drivers/net/ice/ice_generic_flow.c | 4 ++-
drivers/net/ice/ice_switch_filter.c | 45 +++++++++++++++++++++++++++--
6 files changed, 73 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c
index a1f11c01d9..59610e058f 100644
--- a/drivers/net/ice/ice_dcf_ethdev.c
+++ b/drivers/net/ice/ice_dcf_ethdev.c
@@ -958,4 +958,11 @@ ice_dcf_link_update(struct rte_eth_dev *dev,
}
+bool
+ice_dcf_adminq_need_retry(struct ice_adapter *ad)
+{
+ return ad->hw.dcf_enabled &&
+ !__atomic_load_n(&ad->dcf_state_on, __ATOMIC_RELAXED);
+}
+
/* Add UDP tunneling port */
static int
@@ -1107,4 +1114,5 @@ ice_dcf_dev_init(struct rte_eth_dev *eth_dev)
{
struct ice_dcf_adapter *adapter = eth_dev->data->dev_private;
+ struct ice_adapter *parent_adapter = &adapter->parent;
eth_dev->dev_ops = &ice_dcf_eth_dev_ops;
@@ -1118,7 +1126,11 @@ ice_dcf_dev_init(struct rte_eth_dev *eth_dev)
if (ice_dcf_init_hw(eth_dev, &adapter->real_hw) != 0) {
PMD_INIT_LOG(ERR, "Failed to init DCF hardware");
+ __atomic_store_n(&parent_adapter->dcf_state_on, false,
+ __ATOMIC_RELAXED);
return -1;
}
+ __atomic_store_n(&parent_adapter->dcf_state_on, true, __ATOMIC_RELAXED);
+
if (ice_dcf_init_parent_adapter(eth_dev) != 0) {
PMD_INIT_LOG(ERR, "Failed to init DCF parent adapter");
diff --git a/drivers/net/ice/ice_dcf_ethdev.h b/drivers/net/ice/ice_dcf_ethdev.h
index 8510e37119..11a1305038 100644
--- a/drivers/net/ice/ice_dcf_ethdev.h
+++ b/drivers/net/ice/ice_dcf_ethdev.h
@@ -65,4 +65,5 @@ int ice_dcf_vf_repr_uninit(struct rte_eth_dev *vf_rep_eth_dev);
int ice_dcf_vf_repr_init_vlan(struct rte_eth_dev *vf_rep_eth_dev);
void ice_dcf_vf_repr_stop_all(struct ice_dcf_adapter *dcf_adapter);
+bool ice_dcf_adminq_need_retry(struct ice_adapter *ad);
#endif /* _ICE_DCF_ETHDEV_H_ */
diff --git a/drivers/net/ice/ice_dcf_parent.c b/drivers/net/ice/ice_dcf_parent.c
index 1ff2c47172..0c8c2ed6c7 100644
--- a/drivers/net/ice/ice_dcf_parent.c
+++ b/drivers/net/ice/ice_dcf_parent.c
@@ -120,5 +120,7 @@ ice_dcf_vsi_update_service_handler(void *param)
struct ice_dcf_reset_event_param *reset_param = param;
struct ice_dcf_hw *hw = reset_param->dcf_hw;
- struct ice_dcf_adapter *adapter;
+ struct ice_dcf_adapter *adapter =
+ container_of(hw, struct ice_dcf_adapter, real_hw);
+ struct ice_adapter *parent_adapter = &adapter->parent;
pthread_detach(pthread_self());
@@ -128,9 +130,10 @@ ice_dcf_vsi_update_service_handler(void *param)
rte_spinlock_lock(&vsi_update_lock);
- adapter = container_of(hw, struct ice_dcf_adapter, real_hw);
-
- if (!ice_dcf_handle_vsi_update_event(hw))
+ if (!ice_dcf_handle_vsi_update_event(hw)) {
+ __atomic_store_n(&parent_adapter->dcf_state_on, true,
+ __ATOMIC_RELAXED);
ice_dcf_update_vf_vsi_map(&adapter->parent.hw,
hw->num_vfs, hw->vf_vsi_map);
+ }
if (reset_param->vfr && adapter->repr_infos) {
@@ -225,4 +228,7 @@ ice_dcf_handle_pf_event_msg(struct ice_dcf_hw *dcf_hw,
{
struct virtchnl_pf_event *pf_msg = (struct virtchnl_pf_event *)msg;
+ struct ice_dcf_adapter *adapter =
+ container_of(dcf_hw, struct ice_dcf_adapter, real_hw);
+ struct ice_adapter *parent_adapter = &adapter->parent;
if (msglen < sizeof(struct virtchnl_pf_event)) {
@@ -259,4 +265,6 @@ ice_dcf_handle_pf_event_msg(struct ice_dcf_hw *dcf_hw,
pf_msg->event_data.vf_vsi_map.vf_id,
pf_msg->event_data.vf_vsi_map.vsi_id);
+ __atomic_store_n(&parent_adapter->dcf_state_on, false,
+ __ATOMIC_RELAXED);
start_vsi_reset_thread(dcf_hw, true,
pf_msg->event_data.vf_vsi_map.vf_id);
diff --git a/drivers/net/ice/ice_ethdev.h b/drivers/net/ice/ice_ethdev.h
index 2e3e45f3d7..1242177b42 100644
--- a/drivers/net/ice/ice_ethdev.h
+++ b/drivers/net/ice/ice_ethdev.h
@@ -532,4 +532,6 @@ struct ice_adapter {
struct ice_fdir_prof_info fdir_prof_info[ICE_MAX_PTGS];
struct ice_rss_prof_info rss_prof_info[ICE_MAX_PTGS];
+ /* True if DCF state of the associated PF is on */
+ bool dcf_state_on;
#ifdef RTE_ARCH_X86
bool rx_use_avx2;
diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_generic_flow.c
index c673feb7a6..406a0a953f 100644
--- a/drivers/net/ice/ice_generic_flow.c
+++ b/drivers/net/ice/ice_generic_flow.c
@@ -2516,5 +2516,7 @@ ice_flow_flush(struct rte_eth_dev *dev,
if (ret) {
PMD_DRV_LOG(ERR, "Failed to flush flows");
- return -EINVAL;
+ if (ret != -EAGAIN)
+ ret = -EINVAL;
+ return ret;
}
}
diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c
index ed29c00d77..bd805d9606 100644
--- a/drivers/net/ice/ice_switch_filter.c
+++ b/drivers/net/ice/ice_switch_filter.c
@@ -401,4 +401,12 @@ ice_switch_create(struct ice_adapter *ad,
goto error;
}
+
+ if (ice_dcf_adminq_need_retry(ad)) {
+ rte_flow_error_set(error, EAGAIN,
+ RTE_FLOW_ERROR_TYPE_ITEM, NULL,
+ "DCF is not on");
+ goto error;
+ }
+
ret = ice_add_adv_rule(hw, list, lkups_cnt, rule_info, &rule_added);
if (!ret) {
@@ -424,5 +432,10 @@ ice_switch_create(struct ice_adapter *ad,
flow->rule = filter_conf_ptr;
} else {
- rte_flow_error_set(error, EINVAL,
+ if (ice_dcf_adminq_need_retry(ad))
+ ret = -EAGAIN;
+ else
+ ret = -EINVAL;
+
+ rte_flow_error_set(error, -ret,
RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
"switch filter create flow fail");
@@ -476,7 +489,19 @@ ice_switch_destroy(struct ice_adapter *ad,
}
+ if (ice_dcf_adminq_need_retry(ad)) {
+ rte_flow_error_set(error, EAGAIN,
+ RTE_FLOW_ERROR_TYPE_ITEM, NULL,
+ "DCF is not on");
+ return -rte_errno;
+ }
+
ret = ice_rem_adv_rule_by_id(hw, &filter_conf_ptr->sw_query_data);
if (ret) {
- rte_flow_error_set(error, EINVAL,
+ if (ice_dcf_adminq_need_retry(ad))
+ ret = -EAGAIN;
+ else
+ ret = -EINVAL;
+
+ rte_flow_error_set(error, -ret,
RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
"fail to destroy switch filter rule");
@@ -2017,4 +2042,10 @@ ice_switch_redirect(struct ice_adapter *ad,
rmv_rule:
+ if (ice_dcf_adminq_need_retry(ad)) {
+ PMD_DRV_LOG(WARNING, "DCF is not on");
+ ret = -EAGAIN;
+ goto out;
+ }
+
/* Remove the old rule */
ret = ice_rem_adv_rule(hw, lkups_ref, lkups_cnt, &rinfo);
@@ -2029,4 +2060,10 @@ rmv_rule:
add_rule:
+ if (ice_dcf_adminq_need_retry(ad)) {
+ PMD_DRV_LOG(WARNING, "DCF is not on");
+ ret = -EAGAIN;
+ goto out;
+ }
+
/* Update VSI context */
hw->vsi_ctx[rd->vsi_handle]->vsi_num = rd->new_vsi_num;
@@ -2048,4 +2085,8 @@ add_rule:
out:
+ if (ret == -EINVAL)
+ if (ice_dcf_adminq_need_retry(ad))
+ ret = -EAGAIN;
+
ice_free(hw, lkups_dp);
return ret;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.477849821 +0000
+++ 0038-net-ice-track-DCF-state-of-PF.patch 2022-02-21 15:22:44.083704107 +0000
@@ -1 +1 @@
-From 285f63fc6bb72a07594af9a7652f5bae3a95eb52 Mon Sep 17 00:00:00 2001
+From 76a729e7ed5e95e12f479a0b09c97783b9974a31 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 285f63fc6bb72a07594af9a7652f5bae3a95eb52 ]
+
@@ -12,2 +13,0 @@
-
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/ice: fix Tx checksum offload' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (36 preceding siblings ...)
2022-02-21 15:33 ` patch 'net/ice: track DCF state of PF' " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'net/ixgbe: add vector Rx parameter check' " Kevin Traynor
` (156 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Kevin Liu; +Cc: Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/1eef1cf7d317bb6608153840e8aa71c19bcca1f8
Thanks.
Kevin
---
From 1eef1cf7d317bb6608153840e8aa71c19bcca1f8 Mon Sep 17 00:00:00 2001
From: Kevin Liu <kevinx.liu@intel.com>
Date: Sun, 12 Dec 2021 14:35:20 +0000
Subject: [PATCH] net/ice: fix Tx checksum offload
[ upstream commit 58d212e3bc548fb6be0e343eccc921413acf2ff8 ]
The tunnel packets is missing some information after Tx forwarding.
In ice_txd_enable_offload, when set tunnel packet Tx checksum
offload enable, td_offset should be set with outer l2/l3 len instead
of inner l2/l3 len.
In ice_txd_enable_checksum, td_offset should also be set with outer
l3 len.
This patch fix the bug that the checksum engine can forward Ipv4/Ipv6
tunnel packets.
Fixes: 28f9002ab67f ("net/ice: add Tx AVX512 offload path")
Fixes: 17c7d0f9d6a4 ("net/ice: support basic Rx/Tx")
Signed-off-by: Kevin Liu <kevinx.liu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/ice/ice_rxtx.c | 41 ++++++++++++++-------
drivers/net/ice/ice_rxtx_vec_common.h | 52 +++++++++++++++++++--------
2 files changed, 66 insertions(+), 27 deletions(-)
diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index c80d86915e..ba40a0dc87 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -2491,16 +2491,33 @@ ice_txd_enable_checksum(uint64_t ol_flags,
/* Enable L3 checksum offloads */
- if (ol_flags & RTE_MBUF_F_TX_IP_CKSUM) {
- *td_cmd |= ICE_TX_DESC_CMD_IIPT_IPV4_CSUM;
- *td_offset |= (tx_offload.l3_len >> 2) <<
- ICE_TX_DESC_LEN_IPLEN_S;
- } else if (ol_flags & RTE_MBUF_F_TX_IPV4) {
- *td_cmd |= ICE_TX_DESC_CMD_IIPT_IPV4;
- *td_offset |= (tx_offload.l3_len >> 2) <<
- ICE_TX_DESC_LEN_IPLEN_S;
- } else if (ol_flags & RTE_MBUF_F_TX_IPV6) {
- *td_cmd |= ICE_TX_DESC_CMD_IIPT_IPV6;
- *td_offset |= (tx_offload.l3_len >> 2) <<
- ICE_TX_DESC_LEN_IPLEN_S;
+ /*Tunnel package usage outer len enable L3 checksum offload*/
+ if (ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK) {
+ if (ol_flags & RTE_MBUF_F_TX_IP_CKSUM) {
+ *td_cmd |= ICE_TX_DESC_CMD_IIPT_IPV4_CSUM;
+ *td_offset |= (tx_offload.outer_l3_len >> 2) <<
+ ICE_TX_DESC_LEN_IPLEN_S;
+ } else if (ol_flags & RTE_MBUF_F_TX_IPV4) {
+ *td_cmd |= ICE_TX_DESC_CMD_IIPT_IPV4;
+ *td_offset |= (tx_offload.outer_l3_len >> 2) <<
+ ICE_TX_DESC_LEN_IPLEN_S;
+ } else if (ol_flags & RTE_MBUF_F_TX_IPV6) {
+ *td_cmd |= ICE_TX_DESC_CMD_IIPT_IPV6;
+ *td_offset |= (tx_offload.outer_l3_len >> 2) <<
+ ICE_TX_DESC_LEN_IPLEN_S;
+ }
+ } else {
+ if (ol_flags & RTE_MBUF_F_TX_IP_CKSUM) {
+ *td_cmd |= ICE_TX_DESC_CMD_IIPT_IPV4_CSUM;
+ *td_offset |= (tx_offload.l3_len >> 2) <<
+ ICE_TX_DESC_LEN_IPLEN_S;
+ } else if (ol_flags & RTE_MBUF_F_TX_IPV4) {
+ *td_cmd |= ICE_TX_DESC_CMD_IIPT_IPV4;
+ *td_offset |= (tx_offload.l3_len >> 2) <<
+ ICE_TX_DESC_LEN_IPLEN_S;
+ } else if (ol_flags & RTE_MBUF_F_TX_IPV6) {
+ *td_cmd |= ICE_TX_DESC_CMD_IIPT_IPV6;
+ *td_offset |= (tx_offload.l3_len >> 2) <<
+ ICE_TX_DESC_LEN_IPLEN_S;
+ }
}
diff --git a/drivers/net/ice/ice_rxtx_vec_common.h b/drivers/net/ice/ice_rxtx_vec_common.h
index dfe60c81d9..8ff01046e1 100644
--- a/drivers/net/ice/ice_rxtx_vec_common.h
+++ b/drivers/net/ice/ice_rxtx_vec_common.h
@@ -365,21 +365,43 @@ ice_txd_enable_offload(struct rte_mbuf *tx_pkt,
/* Tx Checksum Offload */
- /* SET MACLEN */
- td_offset |= (tx_pkt->l2_len >> 1) <<
+ /*Tunnel package usage outer len enable L2/L3 checksum offload*/
+ if (ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK) {
+ /* SET MACLEN */
+ td_offset |= (tx_pkt->outer_l2_len >> 1) <<
ICE_TX_DESC_LEN_MACLEN_S;
- /* Enable L3 checksum offload */
- if (ol_flags & RTE_MBUF_F_TX_IP_CKSUM) {
- td_cmd |= ICE_TX_DESC_CMD_IIPT_IPV4_CSUM;
- td_offset |= (tx_pkt->l3_len >> 2) <<
- ICE_TX_DESC_LEN_IPLEN_S;
- } else if (ol_flags & RTE_MBUF_F_TX_IPV4) {
- td_cmd |= ICE_TX_DESC_CMD_IIPT_IPV4;
- td_offset |= (tx_pkt->l3_len >> 2) <<
- ICE_TX_DESC_LEN_IPLEN_S;
- } else if (ol_flags & RTE_MBUF_F_TX_IPV6) {
- td_cmd |= ICE_TX_DESC_CMD_IIPT_IPV6;
- td_offset |= (tx_pkt->l3_len >> 2) <<
- ICE_TX_DESC_LEN_IPLEN_S;
+ /* Enable L3 checksum offload */
+ if (ol_flags & RTE_MBUF_F_TX_IP_CKSUM) {
+ td_cmd |= ICE_TX_DESC_CMD_IIPT_IPV4_CSUM;
+ td_offset |= (tx_pkt->outer_l3_len >> 2) <<
+ ICE_TX_DESC_LEN_IPLEN_S;
+ } else if (ol_flags & RTE_MBUF_F_TX_IPV4) {
+ td_cmd |= ICE_TX_DESC_CMD_IIPT_IPV4;
+ td_offset |= (tx_pkt->outer_l3_len >> 2) <<
+ ICE_TX_DESC_LEN_IPLEN_S;
+ } else if (ol_flags & RTE_MBUF_F_TX_IPV6) {
+ td_cmd |= ICE_TX_DESC_CMD_IIPT_IPV6;
+ td_offset |= (tx_pkt->outer_l3_len >> 2) <<
+ ICE_TX_DESC_LEN_IPLEN_S;
+ }
+ } else {
+ /* SET MACLEN */
+ td_offset |= (tx_pkt->l2_len >> 1) <<
+ ICE_TX_DESC_LEN_MACLEN_S;
+
+ /* Enable L3 checksum offload */
+ if (ol_flags & RTE_MBUF_F_TX_IP_CKSUM) {
+ td_cmd |= ICE_TX_DESC_CMD_IIPT_IPV4_CSUM;
+ td_offset |= (tx_pkt->l3_len >> 2) <<
+ ICE_TX_DESC_LEN_IPLEN_S;
+ } else if (ol_flags & RTE_MBUF_F_TX_IPV4) {
+ td_cmd |= ICE_TX_DESC_CMD_IIPT_IPV4;
+ td_offset |= (tx_pkt->l3_len >> 2) <<
+ ICE_TX_DESC_LEN_IPLEN_S;
+ } else if (ol_flags & RTE_MBUF_F_TX_IPV6) {
+ td_cmd |= ICE_TX_DESC_CMD_IIPT_IPV6;
+ td_offset |= (tx_pkt->l3_len >> 2) <<
+ ICE_TX_DESC_LEN_IPLEN_S;
+ }
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.500047941 +0000
+++ 0039-net-ice-fix-Tx-checksum-offload.patch 2022-02-21 15:22:44.085704112 +0000
@@ -1 +1 @@
-From 58d212e3bc548fb6be0e343eccc921413acf2ff8 Mon Sep 17 00:00:00 2001
+From 1eef1cf7d317bb6608153840e8aa71c19bcca1f8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 58d212e3bc548fb6be0e343eccc921413acf2ff8 ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/ixgbe: add vector Rx parameter check' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (37 preceding siblings ...)
2022-02-21 15:33 ` patch 'net/ice: fix Tx checksum offload' " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'common/mlx5: fix error handling in multi-class probe' " Kevin Traynor
` (155 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Bin Zheng; +Cc: Leyi Rong, Haiyue Wang, Liang Ma, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/0832935bf59487e7f9db2f9f7b9df322d2919f2d
Thanks.
Kevin
---
From 0832935bf59487e7f9db2f9f7b9df322d2919f2d Mon Sep 17 00:00:00 2001
From: Bin Zheng <zhengbin.89740@bytedance.com>
Date: Fri, 10 Dec 2021 16:22:09 +0800
Subject: [PATCH] net/ixgbe: add vector Rx parameter check
[ upstream commit c59f93d9a1e09e21e27f5bde7d8632a4d0503582 ]
Under the circumstance that `rx_tail` wrap back to zero
and the advance speed of `rx_tail` is greater than `rxrearm_start`,
`rx_tail` will catch up with `rxrearm_start` and surpass it.
This may cause some mbufs be reused by application.
So we need to make some restrictions to ensure that
`rx_tail` will not exceed `rxrearm_start`.
e.g.
RDH: 972 RDT: 991 rxrearm_nb: 991 rxrearm_start: 992 rx_tail: 959
RDH: 1004 RDT: 1023 rxrearm_nb: 991 rxrearm_start: 0 rx_tail: 991
RDH: 12 RDT: 31 rxrearm_nb: 991 rxrearm_start: 32 rx_tail: 1023
RDH: 31 RDT: 63 rxrearm_nb: 960 rxrearm_start: 64 rx_tail: 0
RDH: 95 RDT: 95 rxrearm_nb: 1016 rxrearm_start: 96 rx_tail: 88
RDH: 95 RDT: 127 rxrearm_nb: 991 rxrearm_start: 128 rx_tail: 95
...
RDH: 908 RDT: 927 rxrearm_nb: 991 rxrearm_start: 928 rx_tail: 895
RDH: 940 RDT: 959 rxrearm_nb: 991 rxrearm_start: 960 rx_tail: 927
RDH: 980 RDT: 991 rxrearm_nb: 991 rxrearm_start: 992 rx_tail: 959
RDH: 991 RDT: 991 rxrearm_nb: 1026 rxrearm_start: 992 rx_tail: 994
when `rx_tail` catches up with `rxrearm_start`,
2(994 - 992) mbufs be reused by application !
Bugzilla ID: 882
Fixes: 5a3cca342417 ("net/ixgbe: fix vector Rx")
Signed-off-by: Bin Zheng <zhengbin.89740@bytedance.com>
Acked-by: Leyi Rong <leyi.rong@intel.com>
Reviewed-by: Haiyue Wang <haiyue.wang@intel.com>
Reviewed-by: Liang Ma <liangma@liangbit.com>
---
drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
index c56f76b368..bb34b27168 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
@@ -365,4 +365,15 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts,
uint16_t udp_p_flag = 0; /* Rx Descriptor UDP header present */
+ /*
+ * Under the circumstance that `rx_tail` wrap back to zero
+ * and the advance speed of `rx_tail` is greater than `rxrearm_start`,
+ * `rx_tail` will catch up with `rxrearm_start` and surpass it.
+ * This may cause some mbufs be reused by application.
+ *
+ * So we need to make some restrictions to ensure that
+ * `rx_tail` will not exceed `rxrearm_start`.
+ */
+ nb_pkts = RTE_MIN(nb_pkts, RTE_IXGBE_RXQ_REARM_THRESH);
+
/* nb_pkts has to be floor-aligned to RTE_IXGBE_DESCS_PER_LOOP */
nb_pkts = RTE_ALIGN_FLOOR(nb_pkts, RTE_IXGBE_DESCS_PER_LOOP);
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.521119992 +0000
+++ 0040-net-ixgbe-add-vector-Rx-parameter-check.patch 2022-02-21 15:22:44.086704114 +0000
@@ -1 +1 @@
-From c59f93d9a1e09e21e27f5bde7d8632a4d0503582 Mon Sep 17 00:00:00 2001
+From 0832935bf59487e7f9db2f9f7b9df322d2919f2d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c59f93d9a1e09e21e27f5bde7d8632a4d0503582 ]
+
@@ -33 +34,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'common/mlx5: fix error handling in multi-class probe' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (38 preceding siblings ...)
2022-02-21 15:33 ` patch 'net/ixgbe: add vector Rx parameter check' " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'net/mlx5: fix memory socket selection in ASO management' " Kevin Traynor
` (154 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Michael Baum; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/751bca90b1e70e868e4614cfe232440a9c77695f
Thanks.
Kevin
---
From 751bca90b1e70e868e4614cfe232440a9c77695f Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Thu, 25 Nov 2021 00:02:38 +0200
Subject: [PATCH] common/mlx5: fix error handling in multi-class probe
[ upstream commit 8928997a1388ba1b045a55732acced4baf00b21d ]
The common drivers_probe function calls in a loop to all probe functions
for classes requested by the user. After it manages to probe them all,
it updates this on the device in the "classes_loaded" field.
If one of them fails, all those probed to it are remove using the
drivers_remove function. However, this function only releases the
classes in the "classes_loaded" field on the given device and misses the
newly probed classes.
This patch removes the condition from the release function, and ensures
that the caller function sends a more accurate parameter.
Fixes: 8a41f4deccc3 ("common/mlx5: introduce layer for multiple class drivers")
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/common/mlx5/mlx5_common.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/common/mlx5/mlx5_common.c b/drivers/common/mlx5/mlx5_common.c
index cc13022150..22ff273819 100644
--- a/drivers/common/mlx5/mlx5_common.c
+++ b/drivers/common/mlx5/mlx5_common.c
@@ -617,5 +617,4 @@ drivers_remove(struct mlx5_common_device *cdev, uint32_t enabled_classes)
int ret = 0;
- enabled_classes &= cdev->classes_loaded;
while (enabled_classes) {
driver = driver_get(RTE_BIT64(i));
@@ -666,7 +665,9 @@ drivers_probe(struct mlx5_common_device *cdev, uint32_t user_classes)
return 0;
probe_err:
- /* Only unload drivers which are enabled which were enabled
- * in this probe instance.
+ /*
+ * Need to remove only drivers which were not probed before this probe
+ * instance, but have already been probed before this failure.
*/
+ enabled_classes &= ~cdev->classes_loaded;
drivers_remove(cdev, enabled_classes);
return ret;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.540290013 +0000
+++ 0041-common-mlx5-fix-error-handling-in-multi-class-probe.patch 2022-02-21 15:22:44.086704114 +0000
@@ -1 +1 @@
-From 8928997a1388ba1b045a55732acced4baf00b21d Mon Sep 17 00:00:00 2001
+From 751bca90b1e70e868e4614cfe232440a9c77695f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8928997a1388ba1b045a55732acced4baf00b21d ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/mlx5: fix memory socket selection in ASO management' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (39 preceding siblings ...)
2022-02-21 15:33 ` patch 'common/mlx5: fix error handling in multi-class probe' " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'common/mlx5: fix missing validation in devargs parsing' " Kevin Traynor
` (153 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Michael Baum; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/407b3ae746fe09e1c20292ba80a400c040985042
Thanks.
Kevin
---
From 407b3ae746fe09e1c20292ba80a400c040985042 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Wed, 8 Dec 2021 16:51:34 +0200
Subject: [PATCH] net/mlx5: fix memory socket selection in ASO management
[ upstream commit 147f6fb42bd7637b37a9180b0774275531c05f9b ]
In ASO objects creation (WQE, CQE and MR), socket number is given as
a parameter.
The selection was wrongly socket 0 hardcoded even if the user didn't
configure memory for this socket.
This patch replaces the selection to default socket (SOCKET_ID_ANY).
Fixes: f935ed4b645a ("net/mlx5: support flow hit action for aging")
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/mlx5_flow_aso.c | 117 +++++++++----------------------
1 file changed, 32 insertions(+), 85 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_aso.c b/drivers/net/mlx5/mlx5_flow_aso.c
index ddf4328dec..eb7fc43da3 100644
--- a/drivers/net/mlx5/mlx5_flow_aso.c
+++ b/drivers/net/mlx5/mlx5_flow_aso.c
@@ -14,48 +14,4 @@
#include "mlx5_flow.h"
-/**
- * Destroy Completion Queue used for ASO access.
- *
- * @param[in] cq
- * ASO CQ to destroy.
- */
-static void
-mlx5_aso_cq_destroy(struct mlx5_aso_cq *cq)
-{
- if (cq->cq_obj.cq)
- mlx5_devx_cq_destroy(&cq->cq_obj);
- memset(cq, 0, sizeof(*cq));
-}
-
-/**
- * Create Completion Queue used for ASO access.
- *
- * @param[in] ctx
- * Context returned from mlx5 open_device() glue function.
- * @param[in/out] cq
- * Pointer to CQ to create.
- * @param[in] log_desc_n
- * Log of number of descriptors in queue.
- * @param[in] socket
- * Socket to use for allocation.
- * @param[in] uar_page_id
- * UAR page ID to use.
- *
- * @return
- * 0 on success, a negative errno value otherwise and rte_errno is set.
- */
-static int
-mlx5_aso_cq_create(void *ctx, struct mlx5_aso_cq *cq, uint16_t log_desc_n,
- int socket, int uar_page_id)
-{
- struct mlx5_devx_cq_attr attr = {
- .uar_page_id = uar_page_id,
- };
-
- cq->log_desc_n = log_desc_n;
- cq->cq_ci = 0;
- return mlx5_devx_cq_create(ctx, &cq->cq_obj, log_desc_n, &attr, socket);
-}
-
/**
* Free MR resources.
@@ -85,6 +41,4 @@ mlx5_aso_dereg_mr(struct mlx5_common_device *cdev, struct mlx5_pmd_mr *mr)
* @param[in/out] mr
* Pointer to MR to create.
- * @param[in] socket
- * Socket to use for allocation.
*
* @return
@@ -93,11 +47,10 @@ mlx5_aso_dereg_mr(struct mlx5_common_device *cdev, struct mlx5_pmd_mr *mr)
static int
mlx5_aso_reg_mr(struct mlx5_common_device *cdev, size_t length,
- struct mlx5_pmd_mr *mr, int socket)
+ struct mlx5_pmd_mr *mr)
{
-
int ret;
mr->addr = mlx5_malloc(MLX5_MEM_RTE | MLX5_MEM_ZERO, length, 4096,
- socket);
+ SOCKET_ID_ANY);
if (!mr->addr) {
DRV_LOG(ERR, "Failed to create ASO bits mem for MR.");
@@ -123,5 +76,5 @@ mlx5_aso_destroy_sq(struct mlx5_aso_sq *sq)
{
mlx5_devx_sq_destroy(&sq->sq_obj);
- mlx5_aso_cq_destroy(&sq->cq);
+ mlx5_devx_cq_destroy(&sq->cq.cq_obj);
memset(sq, 0, sizeof(*sq));
}
@@ -227,18 +180,10 @@ mlx5_aso_ct_init_sq(struct mlx5_aso_sq *sq)
* Create Send Queue used for ASO access.
*
- * @param[in] ctx
- * Context returned from mlx5 open_device() glue function.
+ * @param[in] cdev
+ * Pointer to the mlx5 common device.
* @param[in/out] sq
* Pointer to SQ to create.
- * @param[in] socket
- * Socket to use for allocation.
* @param[in] uar
* User Access Region object.
- * @param[in] pdn
- * Protection Domain number to use.
- * @param[in] log_desc_n
- * Log of number of descriptors in queue.
- * @param[in] ts_format
- * timestamp format supported by the queue.
*
* @return
@@ -246,14 +191,18 @@ mlx5_aso_ct_init_sq(struct mlx5_aso_sq *sq)
*/
static int
-mlx5_aso_sq_create(void *ctx, struct mlx5_aso_sq *sq, int socket, void *uar,
- uint32_t pdn, uint16_t log_desc_n, uint32_t ts_format)
+mlx5_aso_sq_create(struct mlx5_common_device *cdev, struct mlx5_aso_sq *sq,
+ void *uar)
{
- struct mlx5_devx_create_sq_attr attr = {
+ struct mlx5_devx_cq_attr cq_attr = {
+ .uar_page_id = mlx5_os_get_devx_uar_page_id(uar),
+ };
+ struct mlx5_devx_create_sq_attr sq_attr = {
.user_index = 0xFFFF,
.wq_attr = (struct mlx5_devx_wq_attr){
- .pd = pdn,
+ .pd = cdev->pdn,
.uar_page = mlx5_os_get_devx_uar_page_id(uar),
},
- .ts_format = mlx5_ts_format_conv(ts_format),
+ .ts_format =
+ mlx5_ts_format_conv(cdev->config.hca_attr.sq_ts_format),
};
struct mlx5_devx_modify_sq_attr modify_attr = {
@@ -263,12 +212,16 @@ mlx5_aso_sq_create(void *ctx, struct mlx5_aso_sq *sq, int socket, void *uar,
int ret;
- if (mlx5_aso_cq_create(ctx, &sq->cq, log_desc_n, socket,
- mlx5_os_get_devx_uar_page_id(uar)))
+ if (mlx5_devx_cq_create(cdev->ctx, &sq->cq.cq_obj,
+ MLX5_ASO_QUEUE_LOG_DESC, &cq_attr,
+ SOCKET_ID_ANY))
goto error;
- sq->log_desc_n = log_desc_n;
- attr.cqn = sq->cq.cq_obj.cq->id;
+ sq->cq.cq_ci = 0;
+ sq->cq.log_desc_n = MLX5_ASO_QUEUE_LOG_DESC;
+ sq->log_desc_n = MLX5_ASO_QUEUE_LOG_DESC;
+ sq_attr.cqn = sq->cq.cq_obj.cq->id;
/* for mlx5_aso_wqe that is twice the size of mlx5_wqe */
- log_wqbb_n = log_desc_n + 1;
- ret = mlx5_devx_sq_create(ctx, &sq->sq_obj, log_wqbb_n, &attr, socket);
+ log_wqbb_n = sq->log_desc_n + 1;
+ ret = mlx5_devx_sq_create(cdev->ctx, &sq->sq_obj, log_wqbb_n, &sq_attr,
+ SOCKET_ID_ANY);
if (ret) {
DRV_LOG(ERR, "Can't create SQ object.");
@@ -314,10 +267,8 @@ mlx5_aso_queue_init(struct mlx5_dev_ctx_shared *sh,
case ASO_OPC_MOD_FLOW_HIT:
if (mlx5_aso_reg_mr(cdev, (MLX5_ASO_AGE_ACTIONS_PER_POOL / 8) *
- sq_desc_n, &sh->aso_age_mng->aso_sq.mr, 0))
+ sq_desc_n, &sh->aso_age_mng->aso_sq.mr))
return -1;
- if (mlx5_aso_sq_create(cdev->ctx, &sh->aso_age_mng->aso_sq, 0,
- sh->tx_uar.obj, cdev->pdn,
- MLX5_ASO_QUEUE_LOG_DESC,
- cdev->config.hca_attr.sq_ts_format)) {
+ if (mlx5_aso_sq_create(cdev, &sh->aso_age_mng->aso_sq,
+ sh->tx_uar.obj)) {
mlx5_aso_dereg_mr(cdev, &sh->aso_age_mng->aso_sq.mr);
return -1;
@@ -326,8 +277,6 @@ mlx5_aso_queue_init(struct mlx5_dev_ctx_shared *sh,
break;
case ASO_OPC_MOD_POLICER:
- if (mlx5_aso_sq_create(cdev->ctx, &sh->mtrmng->pools_mng.sq, 0,
- sh->tx_uar.obj, cdev->pdn,
- MLX5_ASO_QUEUE_LOG_DESC,
- cdev->config.hca_attr.sq_ts_format))
+ if (mlx5_aso_sq_create(cdev, &sh->mtrmng->pools_mng.sq,
+ sh->tx_uar.obj))
return -1;
mlx5_aso_mtr_init_sq(&sh->mtrmng->pools_mng.sq);
@@ -336,10 +285,8 @@ mlx5_aso_queue_init(struct mlx5_dev_ctx_shared *sh,
/* 64B per object for query. */
if (mlx5_aso_reg_mr(cdev, 64 * sq_desc_n,
- &sh->ct_mng->aso_sq.mr, 0))
+ &sh->ct_mng->aso_sq.mr))
return -1;
- if (mlx5_aso_sq_create(cdev->ctx, &sh->ct_mng->aso_sq, 0,
- sh->tx_uar.obj, cdev->pdn,
- MLX5_ASO_QUEUE_LOG_DESC,
- cdev->config.hca_attr.sq_ts_format)) {
+ if (mlx5_aso_sq_create(cdev, &sh->ct_mng->aso_sq,
+ sh->tx_uar.obj)) {
mlx5_aso_dereg_mr(cdev, &sh->ct_mng->aso_sq.mr);
return -1;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.559397290 +0000
+++ 0042-net-mlx5-fix-memory-socket-selection-in-ASO-manageme.patch 2022-02-21 15:22:44.087704116 +0000
@@ -1 +1 @@
-From 147f6fb42bd7637b37a9180b0774275531c05f9b Mon Sep 17 00:00:00 2001
+From 407b3ae746fe09e1c20292ba80a400c040985042 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 147f6fb42bd7637b37a9180b0774275531c05f9b ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'common/mlx5: fix missing validation in devargs parsing' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (40 preceding siblings ...)
2022-02-21 15:33 ` patch 'net/mlx5: fix memory socket selection in ASO management' " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'net/mlx5: fix assertion on flags set in packet mbuf' " Kevin Traynor
` (152 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Michael Baum; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/59f8d27b5f1522e88bae41e5d3d36cadeb5a9d20
Thanks.
Kevin
---
From 59f8d27b5f1522e88bae41e5d3d36cadeb5a9d20 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Thu, 16 Dec 2021 20:40:40 +0200
Subject: [PATCH] common/mlx5: fix missing validation in devargs parsing
[ upstream commit a1d59091a6b56ea8f22a9954b71070533d26d63a ]
The rte_kvargs_parse function parses the arguments
"key=value,key=value,..." string and return an allocated structure that
contains a key/value list.
It enables also to send a key without value and updates the values in
the following ways:
- "key=value,key,..." - value is updated as NULL.
- "key=value,key=,..." - value is updated as "" (empty string).
Mlx5 PMDs use this function to parse, but they don't support key without
value. They send the value as an argument to strtol function.
When strtol gets NULL as a parameter it cause a crash, when it gets ""
(empty string) it returns 0.
Adds a check that will prevent an argument in these formats, and returns
an error for it.
Fixes: 85209924039c ("common/mlx5: share memory related devargs")
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/common/mlx5/mlx5_common.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/common/mlx5/mlx5_common.c b/drivers/common/mlx5/mlx5_common.c
index 22ff273819..185db4d004 100644
--- a/drivers/common/mlx5/mlx5_common.c
+++ b/drivers/common/mlx5/mlx5_common.c
@@ -112,4 +112,9 @@ mlx5_common_args_check_handler(const char *key, const char *val, void *opaque)
signed long tmp;
+ if (val == NULL || *val == '\0') {
+ DRV_LOG(ERR, "Key %s is missing value.", key);
+ rte_errno = EINVAL;
+ return -rte_errno;
+ }
errno = 0;
tmp = strtol(val, NULL, 0);
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.578298081 +0000
+++ 0043-common-mlx5-fix-missing-validation-in-devargs-parsin.patch 2022-02-21 15:22:44.087704116 +0000
@@ -1 +1 @@
-From a1d59091a6b56ea8f22a9954b71070533d26d63a Mon Sep 17 00:00:00 2001
+From 59f8d27b5f1522e88bae41e5d3d36cadeb5a9d20 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a1d59091a6b56ea8f22a9954b71070533d26d63a ]
+
@@ -23 +24,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/mlx5: fix assertion on flags set in packet mbuf' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (41 preceding siblings ...)
2022-02-21 15:33 ` patch 'common/mlx5: fix missing validation in devargs parsing' " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'net/mlx5: fix RSS expansion with explicit next protocol' " Kevin Traynor
` (151 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Lior Margalit; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/032e27c0b27fa089a70abc502f84590768d90e58
Thanks.
Kevin
---
From 032e27c0b27fa089a70abc502f84590768d90e58 Mon Sep 17 00:00:00 2001
From: Lior Margalit <lmargalit@nvidia.com>
Date: Thu, 23 Dec 2021 10:15:41 +0200
Subject: [PATCH] net/mlx5: fix assertion on flags set in packet mbuf
[ upstream commit 0c7606b75be4f56a109f61f3cf2c7a819e760cd2 ]
Fixed the assertion on the flags set in pkt->ol_flags for vectorized
MPRQ. With vectorized MPRQ the CQs are processed before copying the
MPRQ bufs so the valid assertion is that the expected flag is set and
not that the pkt->ol_flags equlas this flag alone.
Fixes: 0f20acbf5eda ("net/mlx5: implement vectorized MPRQ burst")
Signed-off-by: Lior Margalit <lmargalit@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/mlx5_rx.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_rx.h b/drivers/net/mlx5/mlx5_rx.h
index adb759c235..c178f9a24b 100644
--- a/drivers/net/mlx5/mlx5_rx.h
+++ b/drivers/net/mlx5/mlx5_rx.h
@@ -544,5 +544,5 @@ mprq_buf_to_pkt(struct mlx5_rxq_data *rxq, struct rte_mbuf *pkt, uint32_t len,
/* Set mbuf head-room. */
SET_DATA_OFF(pkt, RTE_PKTMBUF_HEADROOM);
- MLX5_ASSERT(pkt->ol_flags == RTE_MBUF_F_EXTERNAL);
+ MLX5_ASSERT(pkt->ol_flags & RTE_MBUF_F_EXTERNAL);
MLX5_ASSERT(rte_pktmbuf_tailroom(pkt) >=
len - (hdrm_overlap > 0 ? hdrm_overlap : 0));
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.598420777 +0000
+++ 0044-net-mlx5-fix-assertion-on-flags-set-in-packet-mbuf.patch 2022-02-21 15:22:44.088704119 +0000
@@ -1 +1 @@
-From 0c7606b75be4f56a109f61f3cf2c7a819e760cd2 Mon Sep 17 00:00:00 2001
+From 032e27c0b27fa089a70abc502f84590768d90e58 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0c7606b75be4f56a109f61f3cf2c7a819e760cd2 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/mlx5: fix RSS expansion with explicit next protocol' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (42 preceding siblings ...)
2022-02-21 15:33 ` patch 'net/mlx5: fix assertion on flags set in packet mbuf' " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'net/mlx5: fix GRE protocol type translation for Verbs' " Kevin Traynor
` (150 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Gregory Etelson; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/d8d54171bd5e35b4a471a9be2f4a85a391f616c6
Thanks.
Kevin
---
From d8d54171bd5e35b4a471a9be2f4a85a391f616c6 Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Thu, 23 Dec 2021 15:08:17 +0200
Subject: [PATCH] net/mlx5: fix RSS expansion with explicit next protocol
[ upstream commit f3f1f576f43804b30f81deae967bc09aff7000df ]
The PMD RSS expansion scheme by default compiles flow rules for all
flow item types that may branch out from a stub supplied
by application.
For example,
ETH can lead to VLAN, IPv4 or IPv6.
IPv4 can lead to UDP, TCP, IPv4 or IPv6.
If application explicitly specified next protocol type, expansion must
use that option only and not create flows with other protocol types.
The PMD ignored explicit next protocol values in GRE and VXLAN-GPE.
The patch updates RSS expansion for GRE and VXLAN-GPE with explicit
next protocol settings.
Fixes: c7870bfe09dc ("ethdev: move RSS expansion code to mlx5 driver")
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/mlx5_flow.c | 217 +++++++++++++++++++----------------
1 file changed, 116 insertions(+), 101 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index b7cf4143d5..2cadf615ec 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -165,120 +165,134 @@ mlx5_flow_is_rss_expandable_item(const struct rte_flow_item *item)
}
+/**
+ * Network Service Header (NSH) and its next protocol values
+ * are described in RFC-8393.
+ */
+static enum rte_flow_item_type
+mlx5_nsh_proto_to_item_type(uint8_t proto_spec, uint8_t proto_mask)
+{
+ enum rte_flow_item_type type;
+
+ switch (proto_mask & proto_spec) {
+ case RTE_VXLAN_GPE_TYPE_IPV4:
+ type = RTE_FLOW_ITEM_TYPE_IPV4;
+ break;
+ case RTE_VXLAN_GPE_TYPE_IPV6:
+ type = RTE_VXLAN_GPE_TYPE_IPV6;
+ break;
+ case RTE_VXLAN_GPE_TYPE_ETH:
+ type = RTE_FLOW_ITEM_TYPE_ETH;
+ break;
+ default:
+ type = RTE_FLOW_ITEM_TYPE_END;
+ }
+ return type;
+}
+
+static enum rte_flow_item_type
+mlx5_inet_proto_to_item_type(uint8_t proto_spec, uint8_t proto_mask)
+{
+ enum rte_flow_item_type type;
+
+ switch (proto_mask & proto_spec) {
+ case IPPROTO_UDP:
+ type = RTE_FLOW_ITEM_TYPE_UDP;
+ break;
+ case IPPROTO_TCP:
+ type = RTE_FLOW_ITEM_TYPE_TCP;
+ break;
+ case IPPROTO_IP:
+ type = RTE_FLOW_ITEM_TYPE_IPV4;
+ break;
+ case IPPROTO_IPV6:
+ type = RTE_FLOW_ITEM_TYPE_IPV6;
+ break;
+ default:
+ type = RTE_FLOW_ITEM_TYPE_END;
+ }
+ return type;
+}
+
+static enum rte_flow_item_type
+mlx5_ethertype_to_item_type(rte_be16_t type_spec,
+ rte_be16_t type_mask, bool is_tunnel)
+{
+ enum rte_flow_item_type type;
+
+ switch (rte_be_to_cpu_16(type_spec & type_mask)) {
+ case RTE_ETHER_TYPE_TEB:
+ type = is_tunnel ?
+ RTE_FLOW_ITEM_TYPE_ETH : RTE_FLOW_ITEM_TYPE_END;
+ break;
+ case RTE_ETHER_TYPE_VLAN:
+ type = !is_tunnel ?
+ RTE_FLOW_ITEM_TYPE_VLAN : RTE_FLOW_ITEM_TYPE_END;
+ break;
+ case RTE_ETHER_TYPE_IPV4:
+ type = RTE_FLOW_ITEM_TYPE_IPV4;
+ break;
+ case RTE_ETHER_TYPE_IPV6:
+ type = RTE_FLOW_ITEM_TYPE_IPV6;
+ break;
+ default:
+ type = RTE_FLOW_ITEM_TYPE_END;
+ }
+ return type;
+}
+
static enum rte_flow_item_type
mlx5_flow_expand_rss_item_complete(const struct rte_flow_item *item)
{
- enum rte_flow_item_type ret = RTE_FLOW_ITEM_TYPE_VOID;
- uint16_t ether_type = 0;
- uint16_t ether_type_m;
- uint8_t ip_next_proto = 0;
- uint8_t ip_next_proto_m;
+#define MLX5_XSET_ITEM_MASK_SPEC(type, fld) \
+ do { \
+ const void *m = item->mask; \
+ const void *s = item->spec; \
+ mask = m ? \
+ ((const struct rte_flow_item_##type *)m)->fld : \
+ rte_flow_item_##type##_mask.fld; \
+ spec = ((const struct rte_flow_item_##type *)s)->fld; \
+ } while (0)
+
+ enum rte_flow_item_type ret;
+ uint16_t spec, mask;
if (item == NULL || item->spec == NULL)
- return ret;
+ return RTE_FLOW_ITEM_TYPE_VOID;
switch (item->type) {
case RTE_FLOW_ITEM_TYPE_ETH:
- if (item->mask)
- ether_type_m = ((const struct rte_flow_item_eth *)
- (item->mask))->type;
- else
- ether_type_m = rte_flow_item_eth_mask.type;
- if (ether_type_m != RTE_BE16(0xFFFF))
- break;
- ether_type = ((const struct rte_flow_item_eth *)
- (item->spec))->type;
- if (rte_be_to_cpu_16(ether_type) == RTE_ETHER_TYPE_IPV4)
- ret = RTE_FLOW_ITEM_TYPE_IPV4;
- else if (rte_be_to_cpu_16(ether_type) == RTE_ETHER_TYPE_IPV6)
- ret = RTE_FLOW_ITEM_TYPE_IPV6;
- else if (rte_be_to_cpu_16(ether_type) == RTE_ETHER_TYPE_VLAN)
- ret = RTE_FLOW_ITEM_TYPE_VLAN;
- else
- ret = RTE_FLOW_ITEM_TYPE_END;
+ MLX5_XSET_ITEM_MASK_SPEC(eth, type);
+ if (!mask)
+ return RTE_FLOW_ITEM_TYPE_VOID;
+ ret = mlx5_ethertype_to_item_type(spec, mask, false);
break;
case RTE_FLOW_ITEM_TYPE_VLAN:
- if (item->mask)
- ether_type_m = ((const struct rte_flow_item_vlan *)
- (item->mask))->inner_type;
- else
- ether_type_m = rte_flow_item_vlan_mask.inner_type;
- if (ether_type_m != RTE_BE16(0xFFFF))
- break;
- ether_type = ((const struct rte_flow_item_vlan *)
- (item->spec))->inner_type;
- if (rte_be_to_cpu_16(ether_type) == RTE_ETHER_TYPE_IPV4)
- ret = RTE_FLOW_ITEM_TYPE_IPV4;
- else if (rte_be_to_cpu_16(ether_type) == RTE_ETHER_TYPE_IPV6)
- ret = RTE_FLOW_ITEM_TYPE_IPV6;
- else if (rte_be_to_cpu_16(ether_type) == RTE_ETHER_TYPE_VLAN)
- ret = RTE_FLOW_ITEM_TYPE_VLAN;
- else
- ret = RTE_FLOW_ITEM_TYPE_END;
+ MLX5_XSET_ITEM_MASK_SPEC(vlan, inner_type);
+ if (!mask)
+ return RTE_FLOW_ITEM_TYPE_VOID;
+ ret = mlx5_ethertype_to_item_type(spec, mask, false);
break;
case RTE_FLOW_ITEM_TYPE_IPV4:
- if (item->mask)
- ip_next_proto_m = ((const struct rte_flow_item_ipv4 *)
- (item->mask))->hdr.next_proto_id;
- else
- ip_next_proto_m =
- rte_flow_item_ipv4_mask.hdr.next_proto_id;
- if (ip_next_proto_m != 0xFF)
- break;
- ip_next_proto = ((const struct rte_flow_item_ipv4 *)
- (item->spec))->hdr.next_proto_id;
- if (ip_next_proto == IPPROTO_UDP)
- ret = RTE_FLOW_ITEM_TYPE_UDP;
- else if (ip_next_proto == IPPROTO_TCP)
- ret = RTE_FLOW_ITEM_TYPE_TCP;
- else if (ip_next_proto == IPPROTO_IP)
- ret = RTE_FLOW_ITEM_TYPE_IPV4;
- else if (ip_next_proto == IPPROTO_IPV6)
- ret = RTE_FLOW_ITEM_TYPE_IPV6;
- else
- ret = RTE_FLOW_ITEM_TYPE_END;
+ MLX5_XSET_ITEM_MASK_SPEC(ipv4, hdr.next_proto_id);
+ if (!mask)
+ return RTE_FLOW_ITEM_TYPE_VOID;
+ ret = mlx5_inet_proto_to_item_type(spec, mask);
break;
case RTE_FLOW_ITEM_TYPE_IPV6:
- if (item->mask)
- ip_next_proto_m = ((const struct rte_flow_item_ipv6 *)
- (item->mask))->hdr.proto;
- else
- ip_next_proto_m =
- rte_flow_item_ipv6_mask.hdr.proto;
- if (ip_next_proto_m != 0xFF)
- break;
- ip_next_proto = ((const struct rte_flow_item_ipv6 *)
- (item->spec))->hdr.proto;
- if (ip_next_proto == IPPROTO_UDP)
- ret = RTE_FLOW_ITEM_TYPE_UDP;
- else if (ip_next_proto == IPPROTO_TCP)
- ret = RTE_FLOW_ITEM_TYPE_TCP;
- else if (ip_next_proto == IPPROTO_IP)
- ret = RTE_FLOW_ITEM_TYPE_IPV4;
- else if (ip_next_proto == IPPROTO_IPV6)
- ret = RTE_FLOW_ITEM_TYPE_IPV6;
- else
- ret = RTE_FLOW_ITEM_TYPE_END;
+ MLX5_XSET_ITEM_MASK_SPEC(ipv6, hdr.proto);
+ if (!mask)
+ return RTE_FLOW_ITEM_TYPE_VOID;
+ ret = mlx5_inet_proto_to_item_type(spec, mask);
break;
case RTE_FLOW_ITEM_TYPE_GENEVE:
- ether_type_m = item->mask ?
- ((const struct rte_flow_item_geneve *)
- (item->mask))->protocol :
- rte_flow_item_geneve_mask.protocol;
- ether_type = ((const struct rte_flow_item_geneve *)
- (item->spec))->protocol;
- ether_type_m = rte_be_to_cpu_16(ether_type_m);
- ether_type = rte_be_to_cpu_16(ether_type);
- switch (ether_type_m & ether_type) {
- case RTE_ETHER_TYPE_TEB:
- ret = RTE_FLOW_ITEM_TYPE_ETH;
- break;
- case RTE_ETHER_TYPE_IPV4:
- ret = RTE_FLOW_ITEM_TYPE_IPV4;
- break;
- case RTE_ETHER_TYPE_IPV6:
- ret = RTE_FLOW_ITEM_TYPE_IPV6;
- break;
- default:
- ret = RTE_FLOW_ITEM_TYPE_END;
- }
+ MLX5_XSET_ITEM_MASK_SPEC(geneve, protocol);
+ ret = mlx5_ethertype_to_item_type(spec, mask, true);
+ break;
+ case RTE_FLOW_ITEM_TYPE_GRE:
+ MLX5_XSET_ITEM_MASK_SPEC(gre, protocol);
+ ret = mlx5_ethertype_to_item_type(spec, mask, true);
+ break;
+ case RTE_FLOW_ITEM_TYPE_VXLAN_GPE:
+ MLX5_XSET_ITEM_MASK_SPEC(vxlan_gpe, protocol);
+ ret = mlx5_nsh_proto_to_item_type(spec, mask);
break;
default:
@@ -287,4 +301,5 @@ mlx5_flow_expand_rss_item_complete(const struct rte_flow_item *item)
}
return ret;
+#undef MLX5_XSET_ITEM_MASK_SPEC
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.616795045 +0000
+++ 0045-net-mlx5-fix-RSS-expansion-with-explicit-next-protoc.patch 2022-02-21 15:22:44.094704132 +0000
@@ -1 +1 @@
-From f3f1f576f43804b30f81deae967bc09aff7000df Mon Sep 17 00:00:00 2001
+From d8d54171bd5e35b4a471a9be2f4a85a391f616c6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f3f1f576f43804b30f81deae967bc09aff7000df ]
+
@@ -22 +23,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/mlx5: fix GRE protocol type translation for Verbs' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (43 preceding siblings ...)
2022-02-21 15:33 ` patch 'net/mlx5: fix RSS expansion with explicit next protocol' " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'net/mlx5: fix GCC uninitialized variable warning' " Kevin Traynor
` (149 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Gregory Etelson; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/379079d6ccf05d372f55e711ef194e4cb85fa4a6
Thanks.
Kevin
---
From 379079d6ccf05d372f55e711ef194e4cb85fa4a6 Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Thu, 23 Dec 2021 15:16:38 +0200
Subject: [PATCH] net/mlx5: fix GRE protocol type translation for Verbs
[ upstream commit 985b479267aa90394f1c219de120d23e96761789 ]
When application creates several flows to match on GRE tunnel without
explicitly specifying GRE protocol type value in flow rules, PMD will
translate that to zero mask.
RDMA-CORE cannot distinguish between different inner flow types and
produces identical matchers for each zero mask.
The patch extracts inner header type from flow rule and forces it in
GRE protocol type, if application did not specify any.
Fixes: 84c406e74524 ("net/mlx5: add flow translate function")
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/mlx5_flow.h | 14 +++++++++++
drivers/net/mlx5/mlx5_flow_dv.c | 14 -----------
drivers/net/mlx5/mlx5_flow_verbs.c | 37 ++++++++++++++++++++----------
3 files changed, 39 insertions(+), 26 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index 8c131d61ae..125d85899c 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -1451,4 +1451,18 @@ flow_aso_ct_get_by_idx(struct rte_eth_dev *dev, uint32_t own_idx)
}
+static inline uint16_t
+mlx5_translate_tunnel_etypes(uint64_t pattern_flags)
+{
+ if (pattern_flags & MLX5_FLOW_LAYER_INNER_L2)
+ return RTE_ETHER_TYPE_TEB;
+ else if (pattern_flags & MLX5_FLOW_LAYER_INNER_L3_IPV4)
+ return RTE_ETHER_TYPE_IPV4;
+ else if (pattern_flags & MLX5_FLOW_LAYER_INNER_L3_IPV6)
+ return RTE_ETHER_TYPE_IPV6;
+ else if (pattern_flags & MLX5_FLOW_LAYER_MPLS)
+ return RTE_ETHER_TYPE_MPLS;
+ return 0;
+}
+
int mlx5_flow_group_to_table(struct rte_eth_dev *dev,
const struct mlx5_flow_tunnel *tunnel,
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 5d9fbffd0e..0383976883 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -94,18 +94,4 @@ flow_dv_jump_tbl_resource_release(struct rte_eth_dev *dev,
uint32_t rix_jump);
-static inline uint16_t
-mlx5_translate_tunnel_etypes(uint64_t pattern_flags)
-{
- if (pattern_flags & MLX5_FLOW_LAYER_INNER_L2)
- return RTE_ETHER_TYPE_TEB;
- else if (pattern_flags & MLX5_FLOW_LAYER_INNER_L3_IPV4)
- return RTE_ETHER_TYPE_IPV4;
- else if (pattern_flags & MLX5_FLOW_LAYER_INNER_L3_IPV6)
- return RTE_ETHER_TYPE_IPV6;
- else if (pattern_flags & MLX5_FLOW_LAYER_MPLS)
- return RTE_ETHER_TYPE_MPLS;
- return 0;
-}
-
static int16_t
flow_dv_get_esw_manager_vport_id(struct rte_eth_dev *dev)
diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c b/drivers/net/mlx5/mlx5_flow_verbs.c
index 29cd694752..192a00d4fd 100644
--- a/drivers/net/mlx5/mlx5_flow_verbs.c
+++ b/drivers/net/mlx5/mlx5_flow_verbs.c
@@ -908,4 +908,5 @@ flow_verbs_translate_item_gre(struct mlx5_flow *dev_flow,
};
#else
+ static const struct rte_flow_item_gre empty_gre = {0,};
const struct rte_flow_item_gre *spec = item->spec;
const struct rte_flow_item_gre *mask = item->mask;
@@ -916,15 +917,27 @@ flow_verbs_translate_item_gre(struct mlx5_flow *dev_flow,
};
- if (!mask)
- mask = &rte_flow_item_gre_mask;
- if (spec) {
- tunnel.val.c_ks_res0_ver = spec->c_rsvd0_ver;
- tunnel.val.protocol = spec->protocol;
- tunnel.mask.c_ks_res0_ver = mask->c_rsvd0_ver;
- tunnel.mask.protocol = mask->protocol;
- /* Remove unwanted bits from values. */
- tunnel.val.c_ks_res0_ver &= tunnel.mask.c_ks_res0_ver;
+ if (!spec) {
+ spec = &empty_gre;
+ mask = &empty_gre;
+ } else {
+ if (!mask)
+ mask = &rte_flow_item_gre_mask;
+ }
+ tunnel.val.c_ks_res0_ver = spec->c_rsvd0_ver;
+ tunnel.val.protocol = spec->protocol;
+ tunnel.mask.c_ks_res0_ver = mask->c_rsvd0_ver;
+ tunnel.mask.protocol = mask->protocol;
+ /* Remove unwanted bits from values. */
+ tunnel.val.c_ks_res0_ver &= tunnel.mask.c_ks_res0_ver;
+ tunnel.val.key &= tunnel.mask.key;
+ if (tunnel.mask.protocol) {
tunnel.val.protocol &= tunnel.mask.protocol;
- tunnel.val.key &= tunnel.mask.key;
+ } else {
+ tunnel.val.protocol = mlx5_translate_tunnel_etypes(item_flags);
+ if (tunnel.val.protocol) {
+ tunnel.mask.protocol = 0xFFFF;
+ tunnel.val.protocol =
+ rte_cpu_to_be_16(tunnel.val.protocol);
+ }
}
#endif
@@ -1804,6 +1817,4 @@ flow_verbs_translate(struct rte_eth_dev *dev,
break;
case RTE_FLOW_ITEM_TYPE_GRE:
- flow_verbs_translate_item_gre(dev_flow, items,
- item_flags);
subpriority = MLX5_TUNNEL_PRIO_GET(rss_desc);
item_flags |= MLX5_FLOW_LAYER_GRE;
@@ -1821,4 +1832,6 @@ flow_verbs_translate(struct rte_eth_dev *dev,
}
}
+ if (item_flags & MLX5_FLOW_LAYER_GRE)
+ flow_verbs_translate_item_gre(dev_flow, items, item_flags);
dev_flow->handle->layers = item_flags;
/* Other members of attr will be ignored. */
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.642095794 +0000
+++ 0046-net-mlx5-fix-GRE-protocol-type-translation-for-Verbs.patch 2022-02-21 15:22:44.104704155 +0000
@@ -1 +1 @@
-From 985b479267aa90394f1c219de120d23e96761789 Mon Sep 17 00:00:00 2001
+From 379079d6ccf05d372f55e711ef194e4cb85fa4a6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 985b479267aa90394f1c219de120d23e96761789 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/mlx5: fix GCC uninitialized variable warning' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (44 preceding siblings ...)
2022-02-21 15:33 ` patch 'net/mlx5: fix GRE protocol type translation for Verbs' " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'net/mlx5: relax headroom assertion' " Kevin Traynor
` (148 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Dmitry Kozlyuk; +Cc: Stephen Hemminger, Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/ab06c7bf9bbd6276cdeebaf9e4c810823b1839f7
Thanks.
Kevin
---
From ab06c7bf9bbd6276cdeebaf9e4c810823b1839f7 Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Date: Tue, 28 Dec 2021 11:17:03 +0200
Subject: [PATCH] net/mlx5: fix GCC uninitialized variable warning
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit be8cda4932eb256caaca90090fe0c6d9c756f852 ]
When building with -Db_sanitize=thread, GCC gives a warning:
drivers/net/mlx5/mlx5_flow_meter.c: In function ‘mlx5_flow_meter_create’:
drivers/net/mlx5/mlx5_flow_meter.c:1170:33: warning: ‘legacy_fm’ may be
used uninitialized in this function [-Wmaybe-uninitialized]
This is a false-positive: legacy_fm is initialized and used
if and only if priv->sh->meter_aso_en is false.
Work around this by initializing legacy_fm to NULL.
Add an assertion before legacy_fm use in case the logic changes.
Fixes: 444320186393 ("net/mlx5: support meter creation with policy")
Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/mlx5_flow_meter.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_meter.c b/drivers/net/mlx5/mlx5_flow_meter.c
index 0e4e6ac3d5..0dc7fbfb32 100644
--- a/drivers/net/mlx5/mlx5_flow_meter.c
+++ b/drivers/net/mlx5/mlx5_flow_meter.c
@@ -1168,5 +1168,6 @@ mlx5_flow_meter_create(struct rte_eth_dev *dev, uint32_t meter_id,
struct mlx5_flow_meter_profile *fmp;
struct mlx5_flow_meter_info *fm;
- struct mlx5_legacy_flow_meter *legacy_fm;
+ /* GCC fails to infer legacy_fm is set when !priv->sh->meter_aso_en. */
+ struct mlx5_legacy_flow_meter *legacy_fm = NULL;
struct mlx5_flow_meter_policy *mtr_policy = NULL;
struct mlx5_indexed_pool_config flow_ipool_cfg = {
@@ -1274,6 +1275,8 @@ mlx5_flow_meter_create(struct rte_eth_dev *dev, uint32_t meter_id,
goto error;
/* Add to the flow meter list. */
- if (!priv->sh->meter_aso_en)
+ if (!priv->sh->meter_aso_en) {
+ MLX5_ASSERT(legacy_fm != NULL);
TAILQ_INSERT_TAIL(fms, legacy_fm, next);
+ }
/* Add to the flow meter list. */
fm->active_state = 1; /* Config meter starts as active. */
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.674203318 +0000
+++ 0047-net-mlx5-fix-GCC-uninitialized-variable-warning.patch 2022-02-21 15:22:44.105704157 +0000
@@ -1 +1 @@
-From be8cda4932eb256caaca90090fe0c6d9c756f852 Mon Sep 17 00:00:00 2001
+From ab06c7bf9bbd6276cdeebaf9e4c810823b1839f7 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit be8cda4932eb256caaca90090fe0c6d9c756f852 ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/mlx5: relax headroom assertion' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (45 preceding siblings ...)
2022-02-21 15:33 ` patch 'net/mlx5: fix GCC uninitialized variable warning' " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'net/bnxt: fix xstats names query overrun' " Kevin Traynor
` (147 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Dmitry Kozlyuk; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/9d1da3652a0e5469caf154e15f7fb3ecd027c830
Thanks.
Kevin
---
From 9d1da3652a0e5469caf154e15f7fb3ecd027c830 Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Date: Tue, 28 Dec 2021 11:20:43 +0200
Subject: [PATCH] net/mlx5: relax headroom assertion
[ upstream commit 637582afcc886fc53c1dc7a3686cc771abad2cfd ]
A debug assertion in Single-Packet Receive Queue (SPRQ) mode
required all Rx mbufs to have a 128 byte headroom,
based on the assumption that rte_pktmbuf_init() sets it.
However, rte_pktmbuf_init() may set a smaller headroom
if the dataroom is insufficient, e.g. this is a natural case
for split buffer segments. The headroom can also be larger.
Only check the headroom size when vectored Rx routines
are used because they rely on it. Relax the assertion
to require sufficient headroom size, not an exact one.
Fixes: a0a45e8af723 ("net/mlx5: configure Rx queue for buffer split")
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/mlx5_rxq.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index eda609dd78..ee07c610b9 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -141,4 +141,5 @@ rxq_alloc_elts_sprq(struct mlx5_rxq_ctrl *rxq_ctrl)
RTE_BIT32(rxq_ctrl->rxq.log_strd_num) :
RTE_BIT32(rxq_ctrl->rxq.elts_n);
+ bool has_vec_support = mlx5_rxq_check_vec_support(&rxq_ctrl->rxq) > 0;
unsigned int i;
int err;
@@ -162,6 +163,7 @@ rxq_alloc_elts_sprq(struct mlx5_rxq_ctrl *rxq_ctrl)
goto error;
}
- /* Headroom is reserved by rte_pktmbuf_alloc(). */
- MLX5_ASSERT(DATA_OFF(buf) == RTE_PKTMBUF_HEADROOM);
+ /* Only vectored Rx routines rely on headroom size. */
+ MLX5_ASSERT(!has_vec_support ||
+ DATA_OFF(buf) >= RTE_PKTMBUF_HEADROOM);
/* Buffer is supposed to be empty. */
MLX5_ASSERT(rte_pktmbuf_data_len(buf) == 0);
@@ -176,5 +178,5 @@ rxq_alloc_elts_sprq(struct mlx5_rxq_ctrl *rxq_ctrl)
}
/* If Rx vector is activated. */
- if (mlx5_rxq_check_vec_support(&rxq_ctrl->rxq) > 0) {
+ if (has_vec_support) {
struct mlx5_rxq_data *rxq = &rxq_ctrl->rxq;
struct rte_mbuf *mbuf_init = &rxq->fake_mbuf;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.693622761 +0000
+++ 0048-net-mlx5-relax-headroom-assertion.patch 2022-02-21 15:22:44.106704159 +0000
@@ -1 +1 @@
-From 637582afcc886fc53c1dc7a3686cc771abad2cfd Mon Sep 17 00:00:00 2001
+From 9d1da3652a0e5469caf154e15f7fb3ecd027c830 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 637582afcc886fc53c1dc7a3686cc771abad2cfd ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/bnxt: fix xstats names query overrun' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (46 preceding siblings ...)
2022-02-21 15:33 ` patch 'net/mlx5: relax headroom assertion' " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:33 ` patch 'net/bnxt: fix multicast address set' " Kevin Traynor
` (146 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Lance Richardson; +Cc: Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/c59f883c2407908e12a3dcc74ae90ed4635b6da5
Thanks.
Kevin
---
From c59f883c2407908e12a3dcc74ae90ed4635b6da5 Mon Sep 17 00:00:00 2001
From: Lance Richardson <lance.richardson@broadcom.com>
Date: Tue, 30 Nov 2021 09:42:26 -0500
Subject: [PATCH] net/bnxt: fix xstats names query overrun
[ upstream commit 8dcee14fbfca8c90cd09c88e0fda65819d82ded6 ]
When the xstats_names parameter to rte_eth_xstats_get_names()
is non-NULL and the size parameter is less than the required
number of entries, the driver must return the required size
without modifying (and over-running) the caller's xstats_names
array.
Update bnxt_dev_xstats_get_names_op() in accordance with this
requirement.
Fixes: bfb9c2260be2 ("net/bnxt: support xstats get/reset")
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_stats.c | 103 +++++++++++++++++-----------------
1 file changed, 51 insertions(+), 52 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_stats.c b/drivers/net/bnxt/bnxt_stats.c
index 991eafc644..197fd7c02b 100644
--- a/drivers/net/bnxt/bnxt_stats.c
+++ b/drivers/net/bnxt/bnxt_stats.c
@@ -847,5 +847,5 @@ int bnxt_flow_stats_cnt(struct bnxt *bp)
int bnxt_dev_xstats_get_names_op(struct rte_eth_dev *eth_dev,
struct rte_eth_xstat_name *xstats_names,
- __rte_unused unsigned int limit)
+ unsigned int size)
{
struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private;
@@ -863,62 +863,61 @@ int bnxt_dev_xstats_get_names_op(struct rte_eth_dev *eth_dev,
return rc;
- if (xstats_names != NULL) {
- count = 0;
-
- for (i = 0; i < RTE_DIM(bnxt_rx_stats_strings); i++) {
- strlcpy(xstats_names[count].name,
- bnxt_rx_stats_strings[i].name,
- sizeof(xstats_names[count].name));
- count++;
- }
-
- for (i = 0; i < RTE_DIM(bnxt_tx_stats_strings); i++) {
- strlcpy(xstats_names[count].name,
- bnxt_tx_stats_strings[i].name,
+ if (xstats_names == NULL || size < stat_cnt)
+ return stat_cnt;
+
+ for (i = 0; i < RTE_DIM(bnxt_rx_stats_strings); i++) {
+ strlcpy(xstats_names[count].name,
+ bnxt_rx_stats_strings[i].name,
+ sizeof(xstats_names[count].name));
+ count++;
+ }
+
+ for (i = 0; i < RTE_DIM(bnxt_tx_stats_strings); i++) {
+ strlcpy(xstats_names[count].name,
+ bnxt_tx_stats_strings[i].name,
+ sizeof(xstats_names[count].name));
+ count++;
+ }
+
+ for (i = 0; i < RTE_DIM(bnxt_func_stats_strings); i++) {
+ strlcpy(xstats_names[count].name,
+ bnxt_func_stats_strings[i].name,
+ sizeof(xstats_names[count].name));
+ count++;
+ }
+
+ for (i = 0; i < RTE_DIM(bnxt_rx_ext_stats_strings); i++) {
+ strlcpy(xstats_names[count].name,
+ bnxt_rx_ext_stats_strings[i].name,
+ sizeof(xstats_names[count].name));
+
+ count++;
+ }
+
+ for (i = 0; i < RTE_DIM(bnxt_tx_ext_stats_strings); i++) {
+ strlcpy(xstats_names[count].name,
+ bnxt_tx_ext_stats_strings[i].name,
+ sizeof(xstats_names[count].name));
+
+ count++;
+ }
+
+ if (bp->fw_cap & BNXT_FW_CAP_ADV_FLOW_COUNTERS &&
+ bp->fw_cap & BNXT_FW_CAP_ADV_FLOW_MGMT &&
+ BNXT_FLOW_XSTATS_EN(bp)) {
+ for (i = 0; i < bp->max_l2_ctx; i++) {
+ char buf[RTE_ETH_XSTATS_NAME_SIZE];
+
+ sprintf(buf, "flow_%d_bytes", i);
+ strlcpy(xstats_names[count].name, buf,
sizeof(xstats_names[count].name));
count++;
- }
- for (i = 0; i < RTE_DIM(bnxt_func_stats_strings); i++) {
- strlcpy(xstats_names[count].name,
- bnxt_func_stats_strings[i].name,
- sizeof(xstats_names[count].name));
- count++;
- }
-
- for (i = 0; i < RTE_DIM(bnxt_rx_ext_stats_strings); i++) {
- strlcpy(xstats_names[count].name,
- bnxt_rx_ext_stats_strings[i].name,
+ sprintf(buf, "flow_%d_packets", i);
+ strlcpy(xstats_names[count].name, buf,
sizeof(xstats_names[count].name));
count++;
}
-
- for (i = 0; i < RTE_DIM(bnxt_tx_ext_stats_strings); i++) {
- strlcpy(xstats_names[count].name,
- bnxt_tx_ext_stats_strings[i].name,
- sizeof(xstats_names[count].name));
-
- count++;
- }
-
- if (bp->fw_cap & BNXT_FW_CAP_ADV_FLOW_COUNTERS &&
- bp->fw_cap & BNXT_FW_CAP_ADV_FLOW_MGMT &&
- BNXT_FLOW_XSTATS_EN(bp)) {
- for (i = 0; i < bp->max_l2_ctx; i++) {
- char buf[RTE_ETH_XSTATS_NAME_SIZE];
-
- sprintf(buf, "flow_%d_bytes", i);
- strlcpy(xstats_names[count].name, buf,
- sizeof(xstats_names[count].name));
- count++;
-
- sprintf(buf, "flow_%d_packets", i);
- strlcpy(xstats_names[count].name, buf,
- sizeof(xstats_names[count].name));
-
- count++;
- }
- }
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.714455748 +0000
+++ 0049-net-bnxt-fix-xstats-names-query-overrun.patch 2022-02-21 15:22:44.107704162 +0000
@@ -1 +1 @@
-From 8dcee14fbfca8c90cd09c88e0fda65819d82ded6 Mon Sep 17 00:00:00 2001
+From c59f883c2407908e12a3dcc74ae90ed4635b6da5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8dcee14fbfca8c90cd09c88e0fda65819d82ded6 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/bnxt: fix multicast address set' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (47 preceding siblings ...)
2022-02-21 15:33 ` patch 'net/bnxt: fix xstats names query overrun' " Kevin Traynor
@ 2022-02-21 15:33 ` Kevin Traynor
2022-02-21 15:34 ` patch 'net/bnxt: fix multicast MAC restore during reset recovery' " Kevin Traynor
` (145 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:33 UTC (permalink / raw)
To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/5e35fae22237b5f9ab98d833288bcbfd68de097f
Thanks.
Kevin
---
From 5e35fae22237b5f9ab98d833288bcbfd68de097f Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Tue, 4 Jan 2022 14:08:07 +0530
Subject: [PATCH] net/bnxt: fix multicast address set
[ upstream commit 4dc9409e01b41a8cd8d53bcc38344666fd42a7c9 ]
Fix bnxt_dev_set_mc_addr_list_op.
Fix to cache the multicast mac addresses added to the port
to the driver private structure memory. Use this cached mc list
to program the FW.
This fixes an issue where multicast packets reception is
successful only if the multicast mac address of the packets
is the first one in the multicast address list of the port.
This is in preparation for another fix in the series.
Fixes: d69851df12b2 ("net/bnxt: support multicast filter and set MAC addr")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
drivers/net/bnxt/bnxt.h | 5 +++++
drivers/net/bnxt/bnxt_ethdev.c | 34 +++++++++++++++++++++++++---------
drivers/net/bnxt/bnxt_hwrm.c | 4 ++--
drivers/net/bnxt/bnxt_vnic.c | 7 +------
drivers/net/bnxt/bnxt_vnic.h | 4 ----
5 files changed, 33 insertions(+), 21 deletions(-)
diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 234161053f..521fcb7af3 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -892,4 +892,9 @@ struct bnxt {
struct bnxt_ring_stats *prev_rx_ring_stats;
struct bnxt_ring_stats *prev_tx_ring_stats;
+
+#define BNXT_MAX_MC_ADDRS 16
+ struct rte_ether_addr *mcast_addr_list;
+ rte_iova_t mc_list_dma_addr;
+ uint32_t nb_mc_addr;
};
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index f79f33ab4e..50ffa30577 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -2832,7 +2832,6 @@ bnxt_dev_set_mc_addr_list_op(struct rte_eth_dev *eth_dev,
{
struct bnxt *bp = eth_dev->data->dev_private;
- char *mc_addr_list = (char *)mc_addr_set;
struct bnxt_vnic_info *vnic;
- uint32_t off = 0, i = 0;
+ uint32_t i = 0;
int rc;
@@ -2843,4 +2842,6 @@ bnxt_dev_set_mc_addr_list_op(struct rte_eth_dev *eth_dev,
vnic = BNXT_GET_DEFAULT_VNIC(bp);
+ bp->nb_mc_addr = nb_mc_addr;
+
if (nb_mc_addr > BNXT_MAX_MC_ADDRS) {
vnic->flags |= BNXT_VNIC_INFO_ALLMULTI;
@@ -2850,12 +2851,8 @@ bnxt_dev_set_mc_addr_list_op(struct rte_eth_dev *eth_dev,
/* TODO Check for Duplicate mcast addresses */
vnic->flags &= ~BNXT_VNIC_INFO_ALLMULTI;
- for (i = 0; i < nb_mc_addr; i++) {
- memcpy(vnic->mc_list + off, &mc_addr_list[i],
- RTE_ETHER_ADDR_LEN);
- off += RTE_ETHER_ADDR_LEN;
- }
+ for (i = 0; i < nb_mc_addr; i++)
+ rte_ether_addr_copy(&mc_addr_set[i], &bp->mcast_addr_list[i]);
- vnic->mc_addr_cnt = i;
- if (vnic->mc_addr_cnt)
+ if (bp->nb_mc_addr)
vnic->flags |= BNXT_VNIC_INFO_MCAST;
else
@@ -5017,4 +5014,21 @@ static int bnxt_setup_mac_addr(struct rte_eth_dev *eth_dev)
memcpy(ð_dev->data->mac_addrs[0], bp->mac_addr, RTE_ETHER_ADDR_LEN);
+ /*
+ * Allocate memory to hold multicast mac addresses added.
+ * Used to restore them during reset recovery
+ */
+ bp->mcast_addr_list = rte_zmalloc("bnxt_mcast_addr_tbl",
+ sizeof(struct rte_ether_addr) *
+ BNXT_MAX_MC_ADDRS, 0);
+ if (bp->mcast_addr_list == NULL) {
+ PMD_DRV_LOG(ERR, "Failed to allocate multicast addr table\n");
+ return -ENOMEM;
+ }
+ bp->mc_list_dma_addr = rte_malloc_virt2iova(bp->mcast_addr_list);
+ if (bp->mc_list_dma_addr == RTE_BAD_IOVA) {
+ PMD_DRV_LOG(ERR, "Fail to map mcast_addr_list to physical memory\n");
+ return -ENOMEM;
+ }
+
return rc;
}
@@ -5917,4 +5931,6 @@ bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev)
bnxt_free_hwrm_resources(bp);
bnxt_free_error_recovery_info(bp);
+ rte_free(bp->mcast_addr_list);
+ bp->mcast_addr_list = NULL;
}
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 7bcf36c9cb..568f77a87e 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -507,6 +507,6 @@ int bnxt_hwrm_cfa_l2_set_rx_mask(struct bnxt *bp,
} else if (vnic->flags & BNXT_VNIC_INFO_MCAST) {
mask |= HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_MCAST;
- req.num_mc_entries = rte_cpu_to_le_32(vnic->mc_addr_cnt);
- req.mc_tbl_addr = rte_cpu_to_le_64(vnic->mc_list_dma_addr);
+ req.num_mc_entries = rte_cpu_to_le_32(bp->nb_mc_addr);
+ req.mc_tbl_addr = rte_cpu_to_le_64(bp->mc_list_dma_addr);
}
if (vlan_table) {
diff --git a/drivers/net/bnxt/bnxt_vnic.c b/drivers/net/bnxt/bnxt_vnic.c
index c63cf4b943..e05dc241dc 100644
--- a/drivers/net/bnxt/bnxt_vnic.c
+++ b/drivers/net/bnxt/bnxt_vnic.c
@@ -127,6 +127,5 @@ int bnxt_alloc_vnic_attributes(struct bnxt *bp)
rte_iova_t mz_phys_addr;
- entry_length = HW_HASH_KEY_SIZE +
- BNXT_MAX_MC_ADDRS * RTE_ETHER_ADDR_LEN;
+ entry_length = HW_HASH_KEY_SIZE;
if (BNXT_CHIP_P5(bp))
@@ -170,8 +169,4 @@ int bnxt_alloc_vnic_attributes(struct bnxt *bp)
vnic->rss_hash_key_dma_addr = vnic->rss_table_dma_addr +
rss_table_size;
- vnic->mc_list = (void *)((char *)vnic->rss_hash_key +
- HW_HASH_KEY_SIZE);
- vnic->mc_list_dma_addr = vnic->rss_hash_key_dma_addr +
- HW_HASH_KEY_SIZE;
bnxt_prandom_bytes(vnic->rss_hash_key, HW_HASH_KEY_SIZE);
}
diff --git a/drivers/net/bnxt/bnxt_vnic.h b/drivers/net/bnxt/bnxt_vnic.h
index 37b452f281..af3a2dd779 100644
--- a/drivers/net/bnxt/bnxt_vnic.h
+++ b/drivers/net/bnxt/bnxt_vnic.h
@@ -33,8 +33,4 @@ struct bnxt_vnic_info {
rte_iova_t rss_hash_key_dma_addr;
void *rss_hash_key;
- rte_iova_t mc_list_dma_addr;
- char *mc_list;
- uint32_t mc_addr_cnt;
-#define BNXT_MAX_MC_ADDRS 16
uint32_t flags;
#define BNXT_VNIC_INFO_PROMISC (1 << 0)
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.733251911 +0000
+++ 0050-net-bnxt-fix-multicast-address-set.patch 2022-02-21 15:22:44.113704175 +0000
@@ -1 +1 @@
-From 4dc9409e01b41a8cd8d53bcc38344666fd42a7c9 Mon Sep 17 00:00:00 2001
+From 5e35fae22237b5f9ab98d833288bcbfd68de097f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4dc9409e01b41a8cd8d53bcc38344666fd42a7c9 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/bnxt: fix multicast MAC restore during reset recovery' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (48 preceding siblings ...)
2022-02-21 15:33 ` patch 'net/bnxt: fix multicast address set' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'net/bnxt: fix queue stop operation' " Kevin Traynor
` (144 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/f4d1e64dec4b42c4aa18c241faea0f71d7f7e640
Thanks.
Kevin
---
From f4d1e64dec4b42c4aa18c241faea0f71d7f7e640 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Tue, 4 Jan 2022 14:08:08 +0530
Subject: [PATCH] net/bnxt: fix multicast MAC restore during reset recovery
[ upstream commit 04689bdb65adf1121321dda9052cb4063476a2d3 ]
During reset recovery, driver is not restoring the multicast
mac addresses. Added code to restore them during reset recovery.
Fixes: b02f1573cd07 ("net/bnxt: restore MAC filters during reset recovery")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 50ffa30577..bac96001a4 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -4262,4 +4262,16 @@ static int bnxt_restore_mac_filters(struct bnxt *bp)
}
+static int bnxt_restore_mcast_mac_filters(struct bnxt *bp)
+{
+ int ret = 0;
+
+ ret = bnxt_dev_set_mc_addr_list_op(bp->eth_dev, bp->mcast_addr_list,
+ bp->nb_mc_addr);
+ if (ret)
+ PMD_DRV_LOG(ERR, "Failed to restore multicast MAC addreeses\n");
+
+ return ret;
+}
+
static int bnxt_restore_filters(struct bnxt *bp)
{
@@ -4283,5 +4295,11 @@ static int bnxt_restore_filters(struct bnxt *bp)
ret = bnxt_restore_vlan_filters(bp);
- /* TODO restore other filters as well */
+ if (ret)
+ return ret;
+
+ ret = bnxt_restore_mcast_mac_filters(bp);
+ if (ret)
+ return ret;
+
return ret;
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.760686168 +0000
+++ 0051-net-bnxt-fix-multicast-MAC-restore-during-reset-reco.patch 2022-02-21 15:22:44.115704180 +0000
@@ -1 +1 @@
-From 04689bdb65adf1121321dda9052cb4063476a2d3 Mon Sep 17 00:00:00 2001
+From f4d1e64dec4b42c4aa18c241faea0f71d7f7e640 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 04689bdb65adf1121321dda9052cb4063476a2d3 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/bnxt: fix queue stop operation' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (49 preceding siblings ...)
2022-02-21 15:34 ` patch 'net/bnxt: fix multicast MAC restore during reset recovery' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'net/bnxt: restore RSS configuration after reset recovery' " Kevin Traynor
` (143 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, Lance Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/880ed791599d25090421fc6d41b204dd85edf6ae
Thanks.
Kevin
---
From 880ed791599d25090421fc6d41b204dd85edf6ae Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Tue, 4 Jan 2022 14:08:09 +0530
Subject: [PATCH] net/bnxt: fix queue stop operation
[ upstream commit 3e6fae2b65aa778dba5059ec0bc92102f05adc54 ]
When there are no active Rx queues(i.e when all queues have been
stopped), clear the RSS redirection table of the VNIC on Thor.
Fixes: 9b63c6fd70e3 ("net/bnxt: support Rx/Tx queue start/stop")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
---
drivers/net/bnxt/bnxt_hwrm.c | 23 +++++++++++++++++++++++
drivers/net/bnxt/bnxt_hwrm.h | 1 +
drivers/net/bnxt/bnxt_rxq.c | 3 +++
3 files changed, 27 insertions(+)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 568f77a87e..6093407986 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -6263,2 +6263,25 @@ int bnxt_hwrm_config_host_mtu(struct bnxt *bp)
return rc;
}
+
+int
+bnxt_vnic_rss_clear_p5(struct bnxt *bp, struct bnxt_vnic_info *vnic)
+{
+ struct hwrm_vnic_rss_cfg_output *resp = bp->hwrm_cmd_resp_addr;
+ struct hwrm_vnic_rss_cfg_input req = {0};
+ int nr_ctxs = vnic->num_lb_ctxts;
+ int i, rc = 0;
+
+ for (i = 0; i < nr_ctxs; i++) {
+ HWRM_PREP(&req, HWRM_VNIC_RSS_CFG, BNXT_USE_CHIMP_MB);
+
+ req.rss_ctx_idx = rte_cpu_to_le_16(vnic->fw_grp_ids[i]);
+ req.vnic_id = rte_cpu_to_le_16(vnic->fw_vnic_id);
+
+ rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);
+
+ HWRM_CHECK_RESULT();
+ HWRM_UNLOCK();
+ }
+
+ return rc;
+}
diff --git a/drivers/net/bnxt/bnxt_hwrm.h b/drivers/net/bnxt/bnxt_hwrm.h
index f8f0556201..8202455bf0 100644
--- a/drivers/net/bnxt/bnxt_hwrm.h
+++ b/drivers/net/bnxt/bnxt_hwrm.h
@@ -311,3 +311,4 @@ void bnxt_free_hwrm_tx_ring(struct bnxt *bp, int queue_index);
int bnxt_alloc_hwrm_tx_ring(struct bnxt *bp, int queue_index);
int bnxt_hwrm_config_host_mtu(struct bnxt *bp);
+int bnxt_vnic_rss_clear_p5(struct bnxt *bp, struct bnxt_vnic_info *vnic);
#endif
diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index 1456f8b54f..c9d99039ad 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -575,4 +575,7 @@ int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)
uint16_t saved_mru = vnic->mru;
+ /* clear RSS setting on vnic. */
+ bnxt_vnic_rss_clear_p5(bp, vnic);
+
vnic->mru = 0;
/* Reconfigure default receive ring and MRU. */
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.783220579 +0000
+++ 0052-net-bnxt-fix-queue-stop-operation.patch 2022-02-21 15:22:44.117704184 +0000
@@ -1 +1 @@
-From 3e6fae2b65aa778dba5059ec0bc92102f05adc54 Mon Sep 17 00:00:00 2001
+From 880ed791599d25090421fc6d41b204dd85edf6ae Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3e6fae2b65aa778dba5059ec0bc92102f05adc54 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/bnxt: restore RSS configuration after reset recovery' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (50 preceding siblings ...)
2022-02-21 15:34 ` patch 'net/bnxt: fix queue stop operation' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'net/bnxt: fix restoring VLAN filtering after " Kevin Traynor
` (142 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/56f92b77e7ec19822fa861a6e7a47ada6ff2a33a
Thanks.
Kevin
---
From 56f92b77e7ec19822fa861a6e7a47ada6ff2a33a Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Tue, 4 Jan 2022 14:08:10 +0530
Subject: [PATCH] net/bnxt: restore RSS configuration after reset recovery
[ upstream commit 9b4353bec3d17d241e511f7d6917417fd395c462 ]
During reset recovery, driver is not restoring the VNIC rss hash key.
It's generating a new random hash key which results in unexpected
RSS behavior after recovery. Fixed this by storing the VNIC RSS
configuration to a local struct and then applying the cached value
during the recovery.
Fixes: df6cd7c1f73a ("net/bnxt: handle reset notify async event from FW")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
drivers/net/bnxt/bnxt.h | 2 ++
drivers/net/bnxt/bnxt_ethdev.c | 35 ++++++++++++++++++++++++++++++----
drivers/net/bnxt/bnxt_rxq.c | 2 +-
drivers/net/bnxt/bnxt_vnic.c | 9 +++++++--
drivers/net/bnxt/bnxt_vnic.h | 2 +-
5 files changed, 42 insertions(+), 8 deletions(-)
diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 521fcb7af3..614ea57d87 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -897,4 +897,6 @@ struct bnxt {
rte_iova_t mc_list_dma_addr;
uint32_t nb_mc_addr;
+
+ struct rte_eth_rss_conf rss_conf; /* RSS configuration. */
};
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index bac96001a4..dcf2839215 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -369,5 +369,5 @@ static int bnxt_alloc_mem(struct bnxt *bp, bool reconfig)
goto alloc_mem_err;
- rc = bnxt_alloc_vnic_attributes(bp);
+ rc = bnxt_alloc_vnic_attributes(bp, reconfig);
if (rc)
goto alloc_mem_err;
@@ -1068,4 +1068,5 @@ static int bnxt_dev_configure_op(struct rte_eth_dev *eth_dev)
struct bnxt *bp = eth_dev->data->dev_private;
uint64_t rx_offloads = eth_dev->data->dev_conf.rxmode.offloads;
+ struct rte_eth_rss_conf *rss_conf = ð_dev->data->dev_conf.rx_adv_conf.rss_conf;
int rc;
@@ -1142,4 +1143,15 @@ static int bnxt_dev_configure_op(struct rte_eth_dev *eth_dev)
eth_dev->data->dev_conf.rxmode.offloads = rx_offloads;
+ /* application provides the hash key to program */
+ if (rss_conf->rss_key != NULL) {
+ if (rss_conf->rss_key_len != HW_HASH_KEY_SIZE)
+ PMD_DRV_LOG(WARNING, "port %u RSS key len must be %d bytes long",
+ eth_dev->data->port_id, HW_HASH_KEY_SIZE);
+ else
+ memcpy(bp->rss_conf.rss_key, rss_conf->rss_key, HW_HASH_KEY_SIZE);
+ }
+ bp->rss_conf.rss_key_len = HW_HASH_KEY_SIZE;
+ bp->rss_conf.rss_hf = rss_conf->rss_hf;
+
bnxt_mtu_set_op(eth_dev, eth_dev->data->mtu);
@@ -2127,7 +2139,4 @@ static int bnxt_rss_hash_update_op(struct rte_eth_dev *eth_dev,
bp->flags |= BNXT_FLAG_UPDATE_HASH;
- memcpy(ð_dev->data->dev_conf.rx_adv_conf.rss_conf,
- rss_conf,
- sizeof(*rss_conf));
/* Update the default RSS VNIC(s) */
@@ -2138,4 +2147,7 @@ static int bnxt_rss_hash_update_op(struct rte_eth_dev *eth_dev,
RTE_ETH_RSS_LEVEL(rss_conf->rss_hf));
+ /* Cache the hash function */
+ bp->rss_conf.rss_hf = rss_conf->rss_hf;
+
/*
* If hashkey is not specified, use the previously configured
@@ -2153,4 +2165,7 @@ static int bnxt_rss_hash_update_op(struct rte_eth_dev *eth_dev,
memcpy(vnic->rss_hash_key, rss_conf->rss_key, rss_conf->rss_key_len);
+ /* Cache the hash key */
+ memcpy(bp->rss_conf.rss_key, rss_conf->rss_key, HW_HASH_KEY_SIZE);
+
rss_config:
rc = bnxt_hwrm_vnic_rss_cfg(bp, vnic);
@@ -5305,4 +5320,14 @@ static int bnxt_init_resources(struct bnxt *bp, bool reconfig_dev)
}
+ if (!reconfig_dev) {
+ bp->rss_conf.rss_key = rte_zmalloc("bnxt_rss_key",
+ HW_HASH_KEY_SIZE, 0);
+ if (bp->rss_conf.rss_key == NULL) {
+ PMD_DRV_LOG(ERR, "port %u cannot allocate RSS hash key memory",
+ bp->eth_dev->data->port_id);
+ return -ENOMEM;
+ }
+ }
+
rc = bnxt_alloc_mem(bp, reconfig_dev);
if (rc)
@@ -5951,4 +5976,6 @@ bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev)
rte_free(bp->mcast_addr_list);
bp->mcast_addr_list = NULL;
+ rte_free(bp->rss_conf.rss_key);
+ bp->rss_conf.rss_key = NULL;
}
diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index c9d99039ad..9f1d1d4dba 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -149,5 +149,5 @@ skip_filter_allocation:
if (dev_conf->rxmode.mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) {
- struct rte_eth_rss_conf *rss = &dev_conf->rx_adv_conf.rss_conf;
+ struct rte_eth_rss_conf *rss = &bp->rss_conf;
if (bp->flags & BNXT_FLAG_UPDATE_HASH)
diff --git a/drivers/net/bnxt/bnxt_vnic.c b/drivers/net/bnxt/bnxt_vnic.c
index e05dc241dc..09d67ef885 100644
--- a/drivers/net/bnxt/bnxt_vnic.c
+++ b/drivers/net/bnxt/bnxt_vnic.c
@@ -115,5 +115,5 @@ void bnxt_free_vnic_attributes(struct bnxt *bp)
}
-int bnxt_alloc_vnic_attributes(struct bnxt *bp)
+int bnxt_alloc_vnic_attributes(struct bnxt *bp, bool reconfig)
{
struct bnxt_vnic_info *vnic;
@@ -169,5 +169,10 @@ int bnxt_alloc_vnic_attributes(struct bnxt *bp)
vnic->rss_hash_key_dma_addr = vnic->rss_table_dma_addr +
rss_table_size;
- bnxt_prandom_bytes(vnic->rss_hash_key, HW_HASH_KEY_SIZE);
+ if (!reconfig) {
+ bnxt_prandom_bytes(vnic->rss_hash_key, HW_HASH_KEY_SIZE);
+ memcpy(bp->rss_conf.rss_key, vnic->rss_hash_key, HW_HASH_KEY_SIZE);
+ } else {
+ memcpy(vnic->rss_hash_key, bp->rss_conf.rss_key, HW_HASH_KEY_SIZE);
+ }
}
diff --git a/drivers/net/bnxt/bnxt_vnic.h b/drivers/net/bnxt/bnxt_vnic.h
index af3a2dd779..25481fcbdd 100644
--- a/drivers/net/bnxt/bnxt_vnic.h
+++ b/drivers/net/bnxt/bnxt_vnic.h
@@ -61,5 +61,5 @@ struct bnxt_vnic_info *bnxt_alloc_vnic(struct bnxt *bp);
void bnxt_free_all_vnics(struct bnxt *bp);
void bnxt_free_vnic_attributes(struct bnxt *bp);
-int bnxt_alloc_vnic_attributes(struct bnxt *bp);
+int bnxt_alloc_vnic_attributes(struct bnxt *bp, bool reconfig);
void bnxt_free_vnic_mem(struct bnxt *bp);
int bnxt_alloc_vnic_mem(struct bnxt *bp);
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.806520568 +0000
+++ 0053-net-bnxt-restore-RSS-configuration-after-reset-recov.patch 2022-02-21 15:22:44.120704191 +0000
@@ -1 +1 @@
-From 9b4353bec3d17d241e511f7d6917417fd395c462 Mon Sep 17 00:00:00 2001
+From 56f92b77e7ec19822fa861a6e7a47ada6ff2a33a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9b4353bec3d17d241e511f7d6917417fd395c462 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/bnxt: fix restoring VLAN filtering after recovery' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (51 preceding siblings ...)
2022-02-21 15:34 ` patch 'net/bnxt: restore RSS configuration after reset recovery' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'net/bnxt: cap maximum number of unicast MAC addresses' " Kevin Traynor
` (141 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/a9ea24c80cdeda702fb194321015066be7dfadf7
Thanks.
Kevin
---
From a9ea24c80cdeda702fb194321015066be7dfadf7 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Tue, 4 Jan 2022 14:08:11 +0530
Subject: [PATCH] net/bnxt: fix restoring VLAN filtering after recovery
[ upstream commit 8717548934d89498b9c679221d9a24996034b128 ]
During port start, driver calls bnxt_vlan_offload_set_op()
to program VLAN Filter/VLAN Strip setting to the HW. This
in turns add the vlan filters.
This results in a failure when bnxt_restore_filters() invokes
bnxt_restore_vlan_filters() during the recovery as the vlans are
already programmed.
Fix to ignore the error(-EEXIST).
Fixes: 151c8240ac6a ("net/bnxt: restore VLAN filters during reset recovery")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index dcf2839215..99a7d35470 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -4309,6 +4309,7 @@ static int bnxt_restore_filters(struct bnxt *bp)
return ret;
+ /* if vlans are already programmed, this can fail with -EEXIST */
ret = bnxt_restore_vlan_filters(bp);
- if (ret)
+ if (ret && ret != -EEXIST)
return ret;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.829691881 +0000
+++ 0054-net-bnxt-fix-restoring-VLAN-filtering-after-recovery.patch 2022-02-21 15:22:44.122704195 +0000
@@ -1 +1 @@
-From 8717548934d89498b9c679221d9a24996034b128 Mon Sep 17 00:00:00 2001
+From a9ea24c80cdeda702fb194321015066be7dfadf7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8717548934d89498b9c679221d9a24996034b128 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/bnxt: cap maximum number of unicast MAC addresses' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (52 preceding siblings ...)
2022-02-21 15:34 ` patch 'net/bnxt: fix restoring VLAN filtering after " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'net/bnxt: set fast-path pointers only if recovery succeeds' " Kevin Traynor
` (140 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/6b7c0ce0ce9bc9339b36c37a5eb0056a319b9c05
Thanks.
Kevin
---
From 6b7c0ce0ce9bc9339b36c37a5eb0056a319b9c05 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Tue, 4 Jan 2022 14:08:12 +0530
Subject: [PATCH] net/bnxt: cap maximum number of unicast MAC addresses
[ upstream commit 604a6be6b6c70cafdf055129d7d141d84509ad90 ]
The Maximum number of receive mac addr is hard coded to 128
in the ethdev library(RTE_ETH_NUM_RECEIVE_MAC_ADDR).
But the bnxt devices support more than 128 unicast MAC filters
which could result in a segfault while user tries to add more
than 128 unicast MAC addresses to the port.
Fixes: a2033fda22ab ("net/bnxt: fix number of MAC addresses for VMDq")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 99a7d35470..82350a5008 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -955,5 +955,5 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
/* MAC Specifics */
- dev_info->max_mac_addrs = bp->max_l2_ctx;
+ dev_info->max_mac_addrs = RTE_MIN(bp->max_l2_ctx, RTE_ETH_NUM_RECEIVE_MAC_ADDR);
dev_info->max_hash_mac_addrs = 0;
@@ -5017,9 +5017,13 @@ static int bnxt_setup_mac_addr(struct rte_eth_dev *eth_dev)
{
struct bnxt *bp = eth_dev->data->dev_private;
+ size_t max_mac_addr = RTE_MIN(bp->max_l2_ctx, RTE_ETH_NUM_RECEIVE_MAC_ADDR);
int rc = 0;
+ if (bp->max_l2_ctx > RTE_ETH_NUM_RECEIVE_MAC_ADDR)
+ PMD_DRV_LOG(INFO, "Max number of MAC addrs supported is %d, but will be limited to %d\n",
+ bp->max_l2_ctx, RTE_ETH_NUM_RECEIVE_MAC_ADDR);
+
eth_dev->data->mac_addrs = rte_zmalloc("bnxt_mac_addr_tbl",
- RTE_ETHER_ADDR_LEN *
- bp->max_l2_ctx,
+ RTE_ETHER_ADDR_LEN * max_mac_addr,
0);
if (eth_dev->data->mac_addrs == NULL) {
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.852218472 +0000
+++ 0055-net-bnxt-cap-maximum-number-of-unicast-MAC-addresses.patch 2022-02-21 15:22:44.124704200 +0000
@@ -1 +1 @@
-From 604a6be6b6c70cafdf055129d7d141d84509ad90 Mon Sep 17 00:00:00 2001
+From 6b7c0ce0ce9bc9339b36c37a5eb0056a319b9c05 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 604a6be6b6c70cafdf055129d7d141d84509ad90 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/bnxt: set fast-path pointers only if recovery succeeds' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (53 preceding siblings ...)
2022-02-21 15:34 ` patch 'net/bnxt: cap maximum number of unicast MAC addresses' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'net/bnxt: add null check for mark table' " Kevin Traynor
` (139 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/a31a8b6a97468dd90387e992355772cb6068d189
Thanks.
Kevin
---
From a31a8b6a97468dd90387e992355772cb6068d189 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Tue, 4 Jan 2022 14:08:13 +0530
Subject: [PATCH] net/bnxt: set fast-path pointers only if recovery succeeds
[ upstream commit de3fef20b94a9a1e46ef5d274b38dcde1095487a ]
During reset recovery, fixed to set the fast-path pointers
only if recovery succeeds.
Fixes: 720b55ad278e ("net/bnxt: fix crash caused by error recovery")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 82350a5008..80de320970 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -4377,4 +4377,8 @@ static void bnxt_dev_recover(void *arg)
}
+ rc = bnxt_restore_filters(bp);
+ if (rc)
+ goto err_start;
+
rte_eth_fp_ops[bp->eth_dev->data->port_id].rx_pkt_burst =
bp->eth_dev->rx_pkt_burst;
@@ -4383,8 +4387,4 @@ static void bnxt_dev_recover(void *arg)
rte_mb();
- rc = bnxt_restore_filters(bp);
- if (rc)
- goto err_start;
-
PMD_DRV_LOG(INFO, "Port: %u Recovered from FW reset\n",
bp->eth_dev->data->port_id);
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.874355545 +0000
+++ 0056-net-bnxt-set-fast-path-pointers-only-if-recovery-suc.patch 2022-02-21 15:22:44.126704204 +0000
@@ -1 +1 @@
-From de3fef20b94a9a1e46ef5d274b38dcde1095487a Mon Sep 17 00:00:00 2001
+From a31a8b6a97468dd90387e992355772cb6068d189 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit de3fef20b94a9a1e46ef5d274b38dcde1095487a ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/bnxt: add null check for mark table' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (54 preceding siblings ...)
2022-02-21 15:34 ` patch 'net/bnxt: set fast-path pointers only if recovery succeeds' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'net/bnxt: fix flow create when RSS is disabled' " Kevin Traynor
` (138 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/6b722d7b3729a4cb3af2dd5356336b19e403b961
Thanks.
Kevin
---
From 6b722d7b3729a4cb3af2dd5356336b19e403b961 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Tue, 4 Jan 2022 14:08:15 +0530
Subject: [PATCH] net/bnxt: add null check for mark table
[ upstream commit 8a553bdf261f4e05a774d243bf0278ac1baf55c8 ]
During the port start, driver ignores mark table allocation failure.
This could cause a segfault due to NULL pointer dereference in
bnxt_set_mark_in_mbuf(). Fix this by checking the pointer validity
before accessing it.
Fixes: b87abb2e55cb ("net/bnxt: support marking packet")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
drivers/net/bnxt/bnxt_rxr.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index 44247d7200..9621809bd9 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -825,4 +825,7 @@ void bnxt_set_mark_in_mbuf(struct bnxt *bp,
uint32_t cfa_code = 0;
+ if (unlikely(bp->mark_table == NULL))
+ return;
+
cfa_code = rte_le_to_cpu_16(rxcmp1->cfa_code);
if (!cfa_code)
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.896400657 +0000
+++ 0057-net-bnxt-add-null-check-for-mark-table.patch 2022-02-21 15:22:44.126704204 +0000
@@ -1 +1 @@
-From 8a553bdf261f4e05a774d243bf0278ac1baf55c8 Mon Sep 17 00:00:00 2001
+From 6b722d7b3729a4cb3af2dd5356336b19e403b961 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8a553bdf261f4e05a774d243bf0278ac1baf55c8 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/bnxt: fix flow create when RSS is disabled' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (55 preceding siblings ...)
2022-02-21 15:34 ` patch 'net/bnxt: add null check for mark table' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'net/bnxt: get maximum supported multicast filters count' " Kevin Traynor
` (137 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/b0fe5e2fa9a0515c78532b097212497d61c5cc7e
Thanks.
Kevin
---
From b0fe5e2fa9a0515c78532b097212497d61c5cc7e Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Tue, 4 Jan 2022 14:08:16 +0530
Subject: [PATCH] net/bnxt: fix flow create when RSS is disabled
[ upstream commit 59119d49529e9e940297296167e0490f56b4bb66 ]
This patch reverts the commit "5d47d06b2c83".
Revert this commit as it caused a regression on legacy chips.
On newer chips we use TruFlow based flow creation instead of
HWRM based flow creation.
Fixes: 5d47d06b2c83 ("net/bnxt: modify VNIC accounting")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
drivers/net/bnxt/bnxt.h | 3 ---
drivers/net/bnxt/bnxt_ethdev.c | 18 ++++--------------
drivers/net/bnxt/bnxt_flow.c | 14 ++------------
drivers/net/bnxt/bnxt_hwrm.c | 32 --------------------------------
drivers/net/bnxt/bnxt_hwrm.h | 4 ----
5 files changed, 6 insertions(+), 65 deletions(-)
diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 614ea57d87..3df80f50db 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -696,7 +696,4 @@ struct bnxt {
#define BNXT_FLAG_DFLT_MAC_SET BIT(26)
#define BNXT_FLAG_GFID_ENABLE BIT(27)
-#define BNXT_FLAG_RFS_NEEDS_VNIC BIT(28)
-#define BNXT_FLAG_FLOW_CFA_RFS_RING_TBL_IDX_V2 BIT(29)
-#define BNXT_RFS_NEEDS_VNIC(bp) ((bp)->flags & BNXT_FLAG_RFS_NEEDS_VNIC)
#define BNXT_PF(bp) (!((bp)->flags & BNXT_FLAG_VF))
#define BNXT_VF(bp) ((bp)->flags & BNXT_FLAG_VF)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 80de320970..83fb3861c3 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -787,15 +787,9 @@ skip_cosq_cfg:
}
- /* default vnic 0 */
- rc = bnxt_setup_one_vnic(bp, 0);
- if (rc)
- goto err_out;
/* VNIC configuration */
- if (BNXT_RFS_NEEDS_VNIC(bp)) {
- for (i = 1; i < bp->nr_vnics; i++) {
- rc = bnxt_setup_one_vnic(bp, i);
- if (rc)
- goto err_out;
- }
+ for (i = 0; i < bp->nr_vnics; i++) {
+ rc = bnxt_setup_one_vnic(bp, i);
+ if (rc)
+ goto err_out;
}
@@ -5231,8 +5225,4 @@ static int bnxt_get_config(struct bnxt *bp)
return rc;
- rc = bnxt_hwrm_cfa_adv_flow_mgmt_qcaps(bp);
- if (rc)
- return rc;
-
bnxt_hwrm_port_mac_qcfg(bp);
diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
index d062be5525..f7c90c442f 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -1294,11 +1294,4 @@ start:
PMD_DRV_LOG(DEBUG, "Queue index %d\n", act_q->index);
- if (use_ntuple && !BNXT_RFS_NEEDS_VNIC(bp)) {
- filter->flags =
- HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_FLAGS_DEST_RFS_RING_IDX;
- filter->dst_id = act_q->index;
- goto skip_vnic_alloc;
- }
-
vnic_id = attr->group;
if (!vnic_id) {
@@ -1365,5 +1358,5 @@ use_vnic:
"Setting vnic ff_idx %d\n", vnic->ff_pool_idx);
filter->dst_id = vnic->fw_vnic_id;
-skip_vnic_alloc:
+
/* For ntuple filter, create the L2 filter with default VNIC.
* The user specified redirect queue will be set while creating
@@ -2064,8 +2057,5 @@ bnxt_flow_create(struct rte_eth_dev *dev,
}
- if (BNXT_RFS_NEEDS_VNIC(bp))
- vnic = find_matching_vnic(bp, filter);
- else
- vnic = BNXT_GET_DEFAULT_VNIC(bp);
+ vnic = find_matching_vnic(bp, filter);
done:
if (!ret || update_flow) {
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 6093407986..f90c22a9f7 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -6107,36 +6107,4 @@ int bnxt_hwrm_cfa_pair_free(struct bnxt *bp, struct bnxt_representor *rep_bp)
}
-int bnxt_hwrm_cfa_adv_flow_mgmt_qcaps(struct bnxt *bp)
-{
- struct hwrm_cfa_adv_flow_mgnt_qcaps_output *resp =
- bp->hwrm_cmd_resp_addr;
- struct hwrm_cfa_adv_flow_mgnt_qcaps_input req = {0};
- uint32_t flags = 0;
- int rc = 0;
-
- if (!(bp->fw_cap & BNXT_FW_CAP_ADV_FLOW_MGMT))
- return 0;
-
- if (!(BNXT_PF(bp) || BNXT_VF_IS_TRUSTED(bp))) {
- PMD_DRV_LOG(DEBUG,
- "Not a PF or trusted VF. Command not supported\n");
- return 0;
- }
-
- HWRM_PREP(&req, HWRM_CFA_ADV_FLOW_MGNT_QCAPS, BNXT_USE_CHIMP_MB);
- rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);
-
- HWRM_CHECK_RESULT();
- flags = rte_le_to_cpu_32(resp->flags);
- HWRM_UNLOCK();
-
- if (flags & HWRM_CFA_ADV_FLOW_MGNT_QCAPS_RFS_RING_TBL_IDX_V2_SUPPORTED)
- bp->flags |= BNXT_FLAG_FLOW_CFA_RFS_RING_TBL_IDX_V2;
- else
- bp->flags |= BNXT_FLAG_RFS_NEEDS_VNIC;
-
- return rc;
-}
-
int bnxt_hwrm_fw_echo_reply(struct bnxt *bp, uint32_t echo_req_data1,
uint32_t echo_req_data2)
diff --git a/drivers/net/bnxt/bnxt_hwrm.h b/drivers/net/bnxt/bnxt_hwrm.h
index 8202455bf0..21e1b7a499 100644
--- a/drivers/net/bnxt/bnxt_hwrm.h
+++ b/drivers/net/bnxt/bnxt_hwrm.h
@@ -59,7 +59,4 @@ struct hwrm_func_qstats_output;
HWRM_PORT_PHY_CFG_INPUT_ENABLES_AUTO_LINK_SPEED_MASK
-#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_RFS_RING_TBL_IDX_V2_SUPPORTED \
- HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_RFS_RING_TBL_IDX_V2_SUPPORTED
-
#define HWRM_SPEC_CODE_1_8_4 0x10804
#define HWRM_SPEC_CODE_1_9_0 0x10900
@@ -297,5 +294,4 @@ int bnxt_hwrm_cfa_pair_exists(struct bnxt *bp, struct bnxt_representor *rep_bp);
int bnxt_hwrm_cfa_pair_alloc(struct bnxt *bp, struct bnxt_representor *rep);
int bnxt_hwrm_cfa_pair_free(struct bnxt *bp, struct bnxt_representor *rep);
-int bnxt_hwrm_cfa_adv_flow_mgmt_qcaps(struct bnxt *bp);
int bnxt_hwrm_fw_echo_reply(struct bnxt *bp, uint32_t echo_req_data1,
uint32_t echo_req_data2);
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.915712426 +0000
+++ 0058-net-bnxt-fix-flow-create-when-RSS-is-disabled.patch 2022-02-21 15:22:44.133704220 +0000
@@ -1 +1 @@
-From 59119d49529e9e940297296167e0490f56b4bb66 Mon Sep 17 00:00:00 2001
+From b0fe5e2fa9a0515c78532b097212497d61c5cc7e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 59119d49529e9e940297296167e0490f56b4bb66 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -38 +39 @@
-index a5b960c246..00acdb7be6 100644
+index 80de320970..83fb3861c3 100644
@@ -61 +62 @@
-@@ -5233,8 +5227,4 @@ static int bnxt_get_config(struct bnxt *bp)
+@@ -5231,8 +5225,4 @@ static int bnxt_get_config(struct bnxt *bp)
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/bnxt: get maximum supported multicast filters count' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (56 preceding siblings ...)
2022-02-21 15:34 ` patch 'net/bnxt: fix flow create when RSS is disabled' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'net/bnxt: fix handling of VF configuration change' " Kevin Traynor
` (136 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/377a9a8197501f086bc537db195de84b2a0be5d5
Thanks.
Kevin
---
From 377a9a8197501f086bc537db195de84b2a0be5d5 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Tue, 4 Jan 2022 14:08:17 +0530
Subject: [PATCH] net/bnxt: get maximum supported multicast filters count
[ upstream commit bc9b2c20d29eea7cf1fbf098d69016bc4edb8c2e ]
The HWRM_FUNC_QCAPS response indicates the maximum number
of multicast filters that can be supported by this function
on the RX side.
Fixed to use this value instead of the hard coded value 16.
Fixes: d69851df12b2 ("net/bnxt: support multicast filter and set MAC addr")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
drivers/net/bnxt/bnxt.h | 3 ++-
drivers/net/bnxt/bnxt_hwrm.c | 2 ++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 3df80f50db..64866de319 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -890,8 +890,9 @@ struct bnxt {
struct bnxt_ring_stats *prev_tx_ring_stats;
-#define BNXT_MAX_MC_ADDRS 16
+#define BNXT_MAX_MC_ADDRS ((bp)->max_mcast_addr)
struct rte_ether_addr *mcast_addr_list;
rte_iova_t mc_list_dma_addr;
uint32_t nb_mc_addr;
+ uint32_t max_mcast_addr; /* maximum number of mcast filters supported */
struct rte_eth_rss_conf rss_conf; /* RSS configuration. */
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index f90c22a9f7..b8c0cf50ad 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -915,4 +915,6 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
bp->max_l2_ctx, bp->max_vnics);
bp->max_stat_ctx = rte_le_to_cpu_16(resp->max_stat_ctx);
+ bp->max_mcast_addr = rte_le_to_cpu_32(resp->max_mcast_filters);
+
if (BNXT_PF(bp)) {
bp->pf->total_vnics = rte_le_to_cpu_16(resp->max_vnics);
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.942900970 +0000
+++ 0059-net-bnxt-get-maximum-supported-multicast-filters-cou.patch 2022-02-21 15:22:44.135704225 +0000
@@ -1 +1 @@
-From bc9b2c20d29eea7cf1fbf098d69016bc4edb8c2e Mon Sep 17 00:00:00 2001
+From 377a9a8197501f086bc537db195de84b2a0be5d5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bc9b2c20d29eea7cf1fbf098d69016bc4edb8c2e ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/bnxt: fix handling of VF configuration change' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (57 preceding siblings ...)
2022-02-21 15:34 ` patch 'net/bnxt: get maximum supported multicast filters count' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'net/bnxt: fix ring teardown' " Kevin Traynor
` (135 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/f2c08d53a10b517ed5fd0a92146c770dd09a6938
Thanks.
Kevin
---
From f2c08d53a10b517ed5fd0a92146c770dd09a6938 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Tue, 4 Jan 2022 14:08:19 +0530
Subject: [PATCH] net/bnxt: fix handling of VF configuration change
[ upstream commit 6c63f3495e3563869461ec523d13cbb7fcf67d82 ]
When there is a change in the default VLAN of the VF,
FW sends the VF_CFG_CHANGE async event to the driver.
Upon receiving this async event, driver currently only queries
the FW using HWRM_FUNC_QCFG. But this is not enough.
Driver has to clean up the existing filter and recreate filters
so the FW can apply the default VLAN to the filter.
Fixes: 12213821a8a3 ("net/bnxt: register for more async events")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
drivers/net/bnxt/bnxt.h | 3 +++
drivers/net/bnxt/bnxt_cpr.c | 25 ++++++++++++++++++++++++-
drivers/net/bnxt/bnxt_ethdev.c | 5 +++--
3 files changed, 30 insertions(+), 3 deletions(-)
diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 64866de319..9c0dbc6af4 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -1069,4 +1069,7 @@ uint32_t bnxt_get_speed_capabilities(struct bnxt *bp);
int bnxt_flow_ops_get_op(struct rte_eth_dev *dev,
const struct rte_flow_ops **ops);
+int bnxt_dev_start_op(struct rte_eth_dev *eth_dev);
+int bnxt_dev_stop_op(struct rte_eth_dev *eth_dev);
+void bnxt_handle_vf_cfg_change(void *arg);
#endif
diff --git a/drivers/net/bnxt/bnxt_cpr.c b/drivers/net/bnxt/bnxt_cpr.c
index a43b22a8f8..e1dcf3ac2f 100644
--- a/drivers/net/bnxt/bnxt_cpr.c
+++ b/drivers/net/bnxt/bnxt_cpr.c
@@ -108,4 +108,24 @@ static void bnxt_handle_event_error_report(struct bnxt *bp,
}
+void bnxt_handle_vf_cfg_change(void *arg)
+{
+ struct bnxt *bp = arg;
+ struct rte_eth_dev *eth_dev = bp->eth_dev;
+ int rc;
+
+ /* Free and recreate filters with default VLAN */
+ if (eth_dev->data->dev_started) {
+ rc = bnxt_dev_stop_op(eth_dev);
+ if (rc != 0) {
+ PMD_DRV_LOG(ERR, "Failed to stop Port:%u\n", eth_dev->data->port_id);
+ return;
+ }
+
+ rc = bnxt_dev_start_op(eth_dev);
+ if (rc != 0)
+ PMD_DRV_LOG(ERR, "Failed to start Port:%u\n", eth_dev->data->port_id);
+ }
+}
+
/*
* Async event handling
@@ -139,6 +159,9 @@ void bnxt_handle_async_event(struct bnxt *bp,
break;
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_VF_CFG_CHANGE:
- PMD_DRV_LOG(INFO, "Async event: VF config changed\n");
+ PMD_DRV_LOG(INFO, "Port %u: VF config change async event\n", port_id);
+ PMD_DRV_LOG(INFO, "event: data1 %#x data2 %#x\n", data1, data2);
bnxt_hwrm_func_qcfg(bp, NULL);
+ if (BNXT_VF(bp))
+ rte_eal_alarm_set(1, bnxt_handle_vf_cfg_change, (void *)bp);
break;
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PORT_CONN_NOT_ALLOWED:
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 83fb3861c3..4dc9cd9598 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1532,5 +1532,5 @@ static int bnxt_dev_stop(struct rte_eth_dev *eth_dev)
/* Unload the driver, release resources */
-static int bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
+int bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
{
struct bnxt *bp = eth_dev->data->dev_private;
@@ -1548,5 +1548,5 @@ static int bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
}
-static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
+int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
{
struct bnxt *bp = eth_dev->data->dev_private;
@@ -1680,4 +1680,5 @@ static int bnxt_dev_close_op(struct rte_eth_dev *eth_dev)
rte_eal_alarm_cancel(bnxt_dev_recover, (void *)bp);
bnxt_cancel_fc_thread(bp);
+ rte_eal_alarm_cancel(bnxt_handle_vf_cfg_change, (void *)bp);
if (eth_dev->data->dev_started)
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.965975762 +0000
+++ 0060-net-bnxt-fix-handling-of-VF-configuration-change.patch 2022-02-21 15:22:44.139704234 +0000
@@ -1 +1 @@
-From 6c63f3495e3563869461ec523d13cbb7fcf67d82 Mon Sep 17 00:00:00 2001
+From f2c08d53a10b517ed5fd0a92146c770dd09a6938 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6c63f3495e3563869461ec523d13cbb7fcf67d82 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -39 +40 @@
-index 593eebfb9a..9b9285b799 100644
+index a43b22a8f8..e1dcf3ac2f 100644
@@ -79 +80 @@
-index cf3bd77035..999a9a5103 100644
+index 83fb3861c3..4dc9cd9598 100644
@@ -82 +83 @@
-@@ -1531,5 +1531,5 @@ static int bnxt_dev_stop(struct rte_eth_dev *eth_dev)
+@@ -1532,5 +1532,5 @@ static int bnxt_dev_stop(struct rte_eth_dev *eth_dev)
@@ -89 +90 @@
-@@ -1547,5 +1547,5 @@ static int bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
+@@ -1548,5 +1548,5 @@ static int bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
@@ -96 +97 @@
-@@ -1679,4 +1679,5 @@ static int bnxt_dev_close_op(struct rte_eth_dev *eth_dev)
+@@ -1680,4 +1680,5 @@ static int bnxt_dev_close_op(struct rte_eth_dev *eth_dev)
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/bnxt: fix ring teardown' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (58 preceding siblings ...)
2022-02-21 15:34 ` patch 'net/bnxt: fix handling of VF configuration change' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'net/bnxt: fix PAM4 mask setting' " Kevin Traynor
` (134 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: Somnath Kotur, Kalesh AP, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/6c57090c01f03337b1eb75ae8a9524396f04aff2
Thanks.
Kevin
---
From 6c57090c01f03337b1eb75ae8a9524396f04aff2 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Tue, 4 Jan 2022 14:08:20 +0530
Subject: [PATCH] net/bnxt: fix ring teardown
[ upstream commit 54c6aad567839d4c9f0faa52093a2ef7641f77c3 ]
Check for valid bit while scanning for hwrm_done completion
during ring teardown. Not checking the valid bit could cause a
ring overflow when we ring the doorbell.
Fixes: 4fb6ab3f866d ("net/bnxt: check flush status during ring free")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
---
drivers/net/bnxt/bnxt_rxr.c | 3 +++
drivers/net/bnxt/bnxt_txr.c | 3 +++
2 files changed, 6 insertions(+)
diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index 9621809bd9..b60c2470f3 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -1412,4 +1412,7 @@ int bnxt_flush_rx_cmp(struct bnxt_cp_ring_info *cpr)
rxcmp = (struct rx_pkt_cmpl *)&cpr->cp_desc_ring[cons];
+ if (!bnxt_cpr_cmp_valid(rxcmp, raw_cons, ring_mask + 1))
+ break;
+
if (CMP_TYPE(rxcmp) == CMPL_BASE_TYPE_HWRM_DONE)
return 1;
diff --git a/drivers/net/bnxt/bnxt_txr.c b/drivers/net/bnxt/bnxt_txr.c
index e2b7e40571..3b8f2382f9 100644
--- a/drivers/net/bnxt/bnxt_txr.c
+++ b/drivers/net/bnxt/bnxt_txr.c
@@ -603,4 +603,7 @@ int bnxt_flush_tx_cmp(struct bnxt_cp_ring_info *cpr)
txcmp = (struct tx_cmpl *)&cp_desc_ring[cons];
+ if (!bnxt_cpr_cmp_valid(txcmp, raw_cons, ring_mask + 1))
+ break;
+
opaque = rte_cpu_to_le_32(txcmp->opaque);
raw_cons = NEXT_RAW_CMP(raw_cons);
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:45.988318372 +0000
+++ 0061-net-bnxt-fix-ring-teardown.patch 2022-02-21 15:22:44.140704236 +0000
@@ -1 +1 @@
-From 54c6aad567839d4c9f0faa52093a2ef7641f77c3 Mon Sep 17 00:00:00 2001
+From 6c57090c01f03337b1eb75ae8a9524396f04aff2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 54c6aad567839d4c9f0faa52093a2ef7641f77c3 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/bnxt: fix PAM4 mask setting' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (59 preceding siblings ...)
2022-02-21 15:34 ` patch 'net/bnxt: fix ring teardown' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'net/bnxt: fix crash by validating pointer' " Kevin Traynor
` (133 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: Kalesh AP, Somnath Kotur, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/2e31b779e81830db62544e3520c5cbea69a71196
Thanks.
Kevin
---
From 2e31b779e81830db62544e3520c5cbea69a71196 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Tue, 4 Jan 2022 14:08:21 +0530
Subject: [PATCH] net/bnxt: fix PAM4 mask setting
[ upstream commit 2ca072791715726cbb645b8d6ca0eb9734910c6b ]
Set the PAM4 mask setting only when PAM4 signaling is enabled.
Setting it otherwise seems to result in link negotiation.
Also auto_pam4_link_speeds has been renamed to
auto_pam4_link_speed_mask to reflect its real usage.
Fixes: c23f9ded0391 ("net/bnxt: support 200G PAM4 link")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
drivers/net/bnxt/bnxt.h | 2 +-
drivers/net/bnxt/bnxt_hwrm.c | 25 +++++++++++++------------
2 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 9c0dbc6af4..433f1c80be 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -298,5 +298,5 @@ struct bnxt_link_info {
uint16_t force_pam4_link_speed;
uint16_t support_pam4_speeds;
- uint16_t auto_pam4_link_speeds;
+ uint16_t auto_pam4_link_speed_mask;
uint16_t support_pam4_auto_speeds;
uint8_t req_signal_mode;
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index b8c0cf50ad..5850e7e48b 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1437,14 +1437,15 @@ static int bnxt_hwrm_port_phy_cfg(struct bnxt *bp, struct bnxt_link_info *conf)
req.auto_mode =
HWRM_PORT_PHY_CFG_INPUT_AUTO_MODE_SPEED_MASK;
- req.auto_link_speed_mask =
- conf->auto_link_speed_mask;
- if (conf->auto_pam4_link_speeds) {
+ if (conf->auto_pam4_link_speed_mask &&
+ bp->link_info->link_signal_mode) {
enables |=
HWRM_PORT_PHY_CFG_IN_EN_AUTO_PAM4_LINK_SPD_MASK;
req.auto_link_pam4_speed_mask =
- conf->auto_pam4_link_speeds;
+ rte_cpu_to_le_16(conf->auto_pam4_link_speed_mask);
} else {
enables |=
HWRM_PORT_PHY_CFG_IN_EN_AUTO_LINK_SPEED_MASK;
+ req.auto_link_speed_mask =
+ rte_cpu_to_le_16(conf->auto_link_speed_mask);
}
}
@@ -1519,5 +1520,5 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp,
link_info->support_pam4_speeds =
rte_le_to_cpu_16(resp->support_pam4_speeds);
- link_info->auto_pam4_link_speeds =
+ link_info->auto_pam4_link_speed_mask =
rte_le_to_cpu_16(resp->auto_pam4_link_speed_mask);
link_info->module_status = resp->module_status;
@@ -1530,5 +1531,5 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp,
PMD_DRV_LOG(DEBUG, "Link Signal:%d,PAM::Auto:%x,Support:%x,Force:%x\n",
link_info->link_signal_mode,
- link_info->auto_pam4_link_speeds,
+ link_info->auto_pam4_link_speed_mask,
link_info->support_pam4_speeds,
link_info->force_pam4_link_speed);
@@ -3246,5 +3247,5 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up)
if (bp->link_info->auto_link_speed == 0 &&
bp->link_info->link_signal_mode &&
- bp->link_info->auto_pam4_link_speeds == 0)
+ bp->link_info->auto_pam4_link_speed_mask == 0)
autoneg = 0;
@@ -3259,6 +3260,6 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up)
bnxt_parse_eth_link_speed_mask(bp,
dev_conf->link_speeds);
- link_req.auto_pam4_link_speeds =
- bp->link_info->auto_pam4_link_speeds;
+ link_req.auto_pam4_link_speed_mask =
+ bp->link_info->auto_pam4_link_speed_mask;
} else {
if (bp->link_info->phy_type ==
@@ -3279,7 +3280,7 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up)
link_req.link_speed =
bp->link_info->force_pam4_link_speed;
- else if (bp->link_info->auto_pam4_link_speeds)
+ else if (bp->link_info->auto_pam4_link_speed_mask)
link_req.link_speed =
- bp->link_info->auto_pam4_link_speeds;
+ bp->link_info->auto_pam4_link_speed_mask;
else if (bp->link_info->support_pam4_speeds)
link_req.link_speed =
@@ -3293,5 +3294,5 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up)
*/
if (bp->link_info->auto_link_speed != 0 &&
- bp->link_info->auto_pam4_link_speeds == 0)
+ bp->link_info->auto_pam4_link_speed_mask == 0)
link_req.link_speed = bp->link_info->auto_link_speed;
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.008729709 +0000
+++ 0062-net-bnxt-fix-PAM4-mask-setting.patch 2022-02-21 15:22:44.142704240 +0000
@@ -1 +1 @@
-From 2ca072791715726cbb645b8d6ca0eb9734910c6b Mon Sep 17 00:00:00 2001
+From 2e31b779e81830db62544e3520c5cbea69a71196 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2ca072791715726cbb645b8d6ca0eb9734910c6b ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/bnxt: fix crash by validating pointer' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (60 preceding siblings ...)
2022-02-21 15:34 ` patch 'net/bnxt: fix PAM4 mask setting' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'net/bnxt: fix xstats query' " Kevin Traynor
` (132 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: Kalesh AP, Somnath Kotur, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/b74a60df81cdcf29eabb9596d4a000769d6b041e
Thanks.
Kevin
---
From b74a60df81cdcf29eabb9596d4a000769d6b041e Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Tue, 4 Jan 2022 14:08:22 +0530
Subject: [PATCH] net/bnxt: fix crash by validating pointer
[ upstream commit 79fc1c531e0ae8a1f750639c82f7272d3117a220 ]
Validate the pointers in rxq before accessing them.
Otherwise it can cause a segfault.
Fixes: 657c2a7f1dd4 ("net/bnxt: create aggregation rings when needed")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
drivers/net/bnxt/bnxt_rxq.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index 9f1d1d4dba..cd3bb1446f 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -215,5 +215,7 @@ void bnxt_rx_queue_release_mbufs(struct bnxt_rx_queue *rxq)
}
/* Free up mbufs in Agg ring */
- if (!bnxt_need_agg_ring(rxq->bp->eth_dev))
+ if (rxq->bp == NULL ||
+ rxq->bp->eth_dev == NULL ||
+ !bnxt_need_agg_ring(rxq->bp->eth_dev))
return;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.030714711 +0000
+++ 0063-net-bnxt-fix-crash-by-validating-pointer.patch 2022-02-21 15:22:44.143704243 +0000
@@ -1 +1 @@
-From 79fc1c531e0ae8a1f750639c82f7272d3117a220 Mon Sep 17 00:00:00 2001
+From b74a60df81cdcf29eabb9596d4a000769d6b041e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 79fc1c531e0ae8a1f750639c82f7272d3117a220 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/bnxt: fix xstats query' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (61 preceding siblings ...)
2022-02-21 15:34 ` patch 'net/bnxt: fix crash by validating pointer' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'net/bnxt: check VF representor pointer before access' " Kevin Traynor
` (131 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/2f9df1413c69ef2a5f8ff0f0889f9f735c0270d7
Thanks.
Kevin
---
From 2f9df1413c69ef2a5f8ff0f0889f9f735c0270d7 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Tue, 4 Jan 2022 14:08:23 +0530
Subject: [PATCH] net/bnxt: fix xstats query
[ upstream commit c05c22f9b8032c2974de7042ba8c38fb42ed7c82 ]
Fix incorrect memset in bnxt_dev_xstats_get_op.
In bnxt_dev_xstats_get_op(), the PMD is not zeroing the whole
buffer supplied by the application. This can end up passing
junk statistics values to the application when the FW does not
support extended stats on a function.
Fixed to call memset() with correct size.
Fixes: f55e12f33416 ("net/bnxt: support extended port counters")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
drivers/net/bnxt/bnxt_stats.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/bnxt/bnxt_stats.c b/drivers/net/bnxt/bnxt_stats.c
index 197fd7c02b..208aa5616d 100644
--- a/drivers/net/bnxt/bnxt_stats.c
+++ b/drivers/net/bnxt/bnxt_stats.c
@@ -742,5 +742,5 @@ int bnxt_dev_xstats_get_op(struct rte_eth_dev *eth_dev,
stat_size));
- memset(xstats, 0, sizeof(*xstats));
+ memset(xstats, 0, sizeof(*xstats) * n);
count = 0;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.050277378 +0000
+++ 0064-net-bnxt-fix-xstats-query.patch 2022-02-21 15:22:44.143704243 +0000
@@ -1 +1 @@
-From c05c22f9b8032c2974de7042ba8c38fb42ed7c82 Mon Sep 17 00:00:00 2001
+From 2f9df1413c69ef2a5f8ff0f0889f9f735c0270d7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c05c22f9b8032c2974de7042ba8c38fb42ed7c82 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/bnxt: check VF representor pointer before access' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (62 preceding siblings ...)
2022-02-21 15:34 ` patch 'net/bnxt: fix xstats query' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'net/cnxk: fix promiscuous mode in multicast enable flow' " Kevin Traynor
` (130 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: Kalesh AP, Somnath Kotur, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/26a3e3e7d3a455defed48d20bdb73814cee7801f
Thanks.
Kevin
---
From 26a3e3e7d3a455defed48d20bdb73814cee7801f Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Tue, 4 Jan 2022 14:08:24 +0530
Subject: [PATCH] net/bnxt: check VF representor pointer before access
[ upstream commit f30622542ccfe5e9ba31f67972e999c99e73385b ]
The PF or trusted VF Rx handler could invoke the VF representor's
Rx function without knowledge of the application cleaning up the
representor ports. Check if the vfr_bp pointer is valid before
accessing it.
Fixes: 6dc83230b43b ("net/bnxt: support port representor data path")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
drivers/net/bnxt/bnxt_reps.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_reps.c b/drivers/net/bnxt/bnxt_reps.c
index 22b76b72b9..a4ab64f511 100644
--- a/drivers/net/bnxt/bnxt_reps.c
+++ b/drivers/net/bnxt/bnxt_reps.c
@@ -36,14 +36,18 @@ uint16_t
bnxt_vfr_recv(uint16_t port_id, uint16_t queue_id, struct rte_mbuf *mbuf)
{
- struct rte_mbuf **prod_rx_buf;
+ struct bnxt_representor *vfr_bp = NULL;
struct bnxt_rx_ring_info *rep_rxr;
- struct bnxt_rx_queue *rep_rxq;
struct rte_eth_dev *vfr_eth_dev;
- struct bnxt_representor *vfr_bp;
+ struct rte_mbuf **prod_rx_buf;
+ struct bnxt_rx_queue *rep_rxq;
uint16_t mask;
uint8_t que;
vfr_eth_dev = &rte_eth_devices[port_id];
- vfr_bp = vfr_eth_dev->data->dev_private;
+ vfr_bp = vfr_eth_dev ? vfr_eth_dev->data->dev_private : NULL;
+
+ if (unlikely(vfr_bp == NULL))
+ return 1;
+
/* If rxq_id happens to be > nr_rings, use ring 0 */
que = queue_id < vfr_bp->rx_nr_rings ? queue_id : 0;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.069049616 +0000
+++ 0065-net-bnxt-check-VF-representor-pointer-before-access.patch 2022-02-21 15:22:44.144704245 +0000
@@ -1 +1 @@
-From f30622542ccfe5e9ba31f67972e999c99e73385b Mon Sep 17 00:00:00 2001
+From 26a3e3e7d3a455defed48d20bdb73814cee7801f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f30622542ccfe5e9ba31f67972e999c99e73385b ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index f24f5ef75f..5e140f0cdb 100644
+index 22b76b72b9..a4ab64f511 100644
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/cnxk: fix promiscuous mode in multicast enable flow' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (63 preceding siblings ...)
2022-02-21 15:34 ` patch 'net/bnxt: check VF representor pointer before access' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'net/bonding: fix offloading configuration' " Kevin Traynor
` (129 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Asaf Ravid; +Cc: Jerin Jacob, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/661587eaae533a6a394ee8cdbab84abf94e1baa4
Thanks.
Kevin
---
From 661587eaae533a6a394ee8cdbab84abf94e1baa4 Mon Sep 17 00:00:00 2001
From: Asaf Ravid <aravid@marvell.com>
Date: Wed, 1 Dec 2021 15:59:53 +0530
Subject: [PATCH] net/cnxk: fix promiscuous mode in multicast enable flow
[ upstream commit b922883be94bac9b5c72417349f2f5d25dade0bb ]
When multicast promiscuous was being enabled it caused the unicast
promiscuous to be disabled. This fix resolves this by setting
NIX_RX_MODE_PROMISC when eth_dev->data->promiscuous is set, regardless.
Fixes: 325d79c00a5a ("net/cnxk: support all multicast")
Signed-off-by: Asaf Ravid <aravid@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
drivers/common/cnxk/roc_nix_npc.c | 2 +-
drivers/net/cnxk/cnxk_ethdev_ops.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/common/cnxk/roc_nix_npc.c b/drivers/common/cnxk/roc_nix_npc.c
index c0666c87d5..ad8839dde8 100644
--- a/drivers/common/cnxk/roc_nix_npc.c
+++ b/drivers/common/cnxk/roc_nix_npc.c
@@ -97,5 +97,5 @@ roc_nix_npc_mcast_config(struct roc_nix *roc_nix, bool mcast_enable,
if (mcast_enable)
req->mode = NIX_RX_MODE_ALLMULTI;
- else if (prom_enable)
+ if (prom_enable)
req->mode = NIX_RX_MODE_PROMISC;
diff --git a/drivers/net/cnxk/cnxk_ethdev_ops.c b/drivers/net/cnxk/cnxk_ethdev_ops.c
index ce5f1f7240..34e4809650 100644
--- a/drivers/net/cnxk/cnxk_ethdev_ops.c
+++ b/drivers/net/cnxk/cnxk_ethdev_ops.c
@@ -518,5 +518,6 @@ cnxk_nix_allmulticast_enable(struct rte_eth_dev *eth_dev)
struct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);
- return roc_nix_npc_mcast_config(&dev->nix, true, false);
+ return roc_nix_npc_mcast_config(&dev->nix, true,
+ eth_dev->data->promiscuous);
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.088494257 +0000
+++ 0066-net-cnxk-fix-promiscuous-mode-in-multicast-enable-fl.patch 2022-02-21 15:22:44.145704247 +0000
@@ -1 +1 @@
-From b922883be94bac9b5c72417349f2f5d25dade0bb Mon Sep 17 00:00:00 2001
+From 661587eaae533a6a394ee8cdbab84abf94e1baa4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b922883be94bac9b5c72417349f2f5d25dade0bb ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/bonding: fix offloading configuration' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (64 preceding siblings ...)
2022-02-21 15:34 ` patch 'net/cnxk: fix promiscuous mode in multicast enable flow' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'app/testpmd: fix Tx scheduling interval' " Kevin Traynor
` (128 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Chengchang Tang; +Cc: Min Hu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/96b92d045ff682f181844c2e3fc877e9729f159e
Thanks.
Kevin
---
From 96b92d045ff682f181844c2e3fc877e9729f159e Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Tue, 9 Nov 2021 15:57:26 +0800
Subject: [PATCH] net/bonding: fix offloading configuration
[ upstream commit 57b156540f51a89214098e594494023e3820fa4f ]
Currently, part offloadings of the bonding device will not take effect
by using dev_configure(). Because the related configuration will not be
delivered to the slave devices in this way.
The offloading capability of the bonding device is the intersection of
the capability of all slave devices. Based on this, the following
functions are added to the bonding driver:
1. If a Tx offloading is within the capability of the bonding device
(i.e, all the slave devices support this Tx offloading), the enabling
status of the offloading of all slave devices depends on the
configuration of the bonding device.
2. For the Tx offloading that is not within the Tx offloading capability
of the bonding device, the enabling status of the offloading on the
slave devices is irrelevant to the bonding device configuration. And
it depends on the original configuration of the slave devices.
Fixes: e8b3e1a9b1bb ("net/bonding: switch to new offloading API")
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
drivers/net/bonding/rte_eth_bond_pmd.c | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 84f4900ee5..0f11a2f5a8 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1714,15 +1714,22 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev,
}
- if (bonded_eth_dev->data->dev_conf.rxmode.offloads &
- RTE_ETH_RX_OFFLOAD_VLAN_FILTER)
- slave_eth_dev->data->dev_conf.rxmode.offloads |=
- RTE_ETH_RX_OFFLOAD_VLAN_FILTER;
- else
- slave_eth_dev->data->dev_conf.rxmode.offloads &=
- ~RTE_ETH_RX_OFFLOAD_VLAN_FILTER;
-
slave_eth_dev->data->dev_conf.rxmode.mtu =
bonded_eth_dev->data->dev_conf.rxmode.mtu;
+ slave_eth_dev->data->dev_conf.txmode.offloads |=
+ bonded_eth_dev->data->dev_conf.txmode.offloads;
+
+ slave_eth_dev->data->dev_conf.txmode.offloads &=
+ (bonded_eth_dev->data->dev_conf.txmode.offloads |
+ ~internals->tx_offload_capa);
+
+ slave_eth_dev->data->dev_conf.rxmode.offloads |=
+ bonded_eth_dev->data->dev_conf.rxmode.offloads;
+
+ slave_eth_dev->data->dev_conf.rxmode.offloads &=
+ (bonded_eth_dev->data->dev_conf.rxmode.offloads |
+ ~internals->rx_offload_capa);
+
+
nb_rx_queues = bonded_eth_dev->data->nb_rx_queues;
nb_tx_queues = bonded_eth_dev->data->nb_tx_queues;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.107080438 +0000
+++ 0067-net-bonding-fix-offloading-configuration.patch 2022-02-21 15:22:44.147704252 +0000
@@ -1 +1 @@
-From 57b156540f51a89214098e594494023e3820fa4f Mon Sep 17 00:00:00 2001
+From 96b92d045ff682f181844c2e3fc877e9729f159e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 57b156540f51a89214098e594494023e3820fa4f ]
+
@@ -24 +25,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'app/testpmd: fix Tx scheduling interval' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (65 preceding siblings ...)
2022-02-21 15:34 ` patch 'net/bonding: fix offloading configuration' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'net/axgbe: use PCI root complex device to distinguish device' " Kevin Traynor
` (127 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Viacheslav Ovsiienko; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/bb1854bc690ec40310cfb964c7153904850d9b5f
Thanks.
Kevin
---
From bb1854bc690ec40310cfb964c7153904850d9b5f Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Tue, 23 Nov 2021 18:32:58 +0200
Subject: [PATCH] app/testpmd: fix Tx scheduling interval
[ upstream commit 9fac5ca8edaebd0f6206193277876fdebb6f3eb2 ]
The first "set txtimes" command parameter specifies the time
interval between scheduled send bursts for single queue. This
interval should be the same for all the forwarding ports.
It requires to maintain the timing related variables on per
queue basis instead of per core, as currently implemented.
This resulted in wrong burst intervals if two or more cores
were generating the scheduled traffic for two or more ports
in txonly mode.
This patch moves the timing variable to the fstream structure.
Only txonly forwarding mode with enabled send scheduling is
affected.
Fixes: 4940344dab1d ("app/testpmd: add Tx scheduling command")
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
app/test-pmd/testpmd.h | 1 +
app/test-pmd/txonly.c | 20 ++++++--------------
2 files changed, 7 insertions(+), 14 deletions(-)
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 2149ecd93a..9967825044 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -148,4 +148,5 @@ struct fwd_stream {
uint64_t rx_bad_outer_ip_csum;
/**< received packets having bad outer ip checksum */
+ uint64_t ts_skew; /**< TX scheduling timestamp */
#ifdef RTE_LIB_GRO
unsigned int gro_times; /**< GRO operation times */
diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c
index e8c0c7b926..fc039a622c 100644
--- a/app/test-pmd/txonly.c
+++ b/app/test-pmd/txonly.c
@@ -60,12 +60,8 @@ static struct rte_ipv4_hdr pkt_ip_hdr; /**< IP header of transmitted packets. */
RTE_DEFINE_PER_LCORE(uint8_t, _ip_var); /**< IP address variation */
static struct rte_udp_hdr pkt_udp_hdr; /**< UDP header of tx packets. */
-RTE_DEFINE_PER_LCORE(uint64_t, timestamp_qskew);
- /**< Timestamp offset per queue */
-RTE_DEFINE_PER_LCORE(uint32_t, timestamp_idone); /**< Timestamp init done. */
static uint64_t timestamp_mask; /**< Timestamp dynamic flag mask */
static int32_t timestamp_off; /**< Timestamp dynamic field offset */
static bool timestamp_enable; /**< Timestamp enable */
-static uint32_t timestamp_init_req; /**< Timestamp initialization request. */
static uint64_t timestamp_initial[RTE_MAX_ETHPORTS];
@@ -195,5 +191,5 @@ pkt_burst_prepare(struct rte_mbuf *pkt, struct rte_mempool *mbp,
struct rte_ether_hdr *eth_hdr, const uint16_t vlan_tci,
const uint16_t vlan_tci_outer, const uint64_t ol_flags,
- const uint16_t idx, const struct fwd_stream *fs)
+ const uint16_t idx, struct fwd_stream *fs)
{
struct rte_mbuf *pkt_segs[RTE_MAX_SEGS_PER_PKT];
@@ -263,9 +259,8 @@ pkt_burst_prepare(struct rte_mbuf *pkt, struct rte_mempool *mbp,
if (unlikely(timestamp_enable)) {
- uint64_t skew = RTE_PER_LCORE(timestamp_qskew);
+ uint64_t skew = fs->ts_skew;
struct tx_timestamp timestamp_mark;
- if (unlikely(timestamp_init_req !=
- RTE_PER_LCORE(timestamp_idone))) {
+ if (unlikely(!skew)) {
struct rte_eth_dev_info dev_info;
unsigned int txqs_n;
@@ -290,6 +285,5 @@ pkt_burst_prepare(struct rte_mbuf *pkt, struct rte_mempool *mbp,
skew = timestamp_initial[fs->tx_port] +
tx_pkt_times_inter + phase;
- RTE_PER_LCORE(timestamp_qskew) = skew;
- RTE_PER_LCORE(timestamp_idone) = timestamp_init_req;
+ fs->ts_skew = skew;
}
timestamp_mark.pkt_idx = rte_cpu_to_be_16(idx);
@@ -301,5 +295,5 @@ pkt_burst_prepare(struct rte_mbuf *pkt, struct rte_mempool *mbp,
*RTE_MBUF_DYNFIELD
(pkt, timestamp_off, uint64_t *) = skew;
- RTE_PER_LCORE(timestamp_qskew) = skew;
+ fs->ts_skew = skew;
timestamp_mark.ts = rte_cpu_to_be_64(skew);
} else if (tx_pkt_times_intra) {
@@ -308,5 +302,5 @@ pkt_burst_prepare(struct rte_mbuf *pkt, struct rte_mempool *mbp,
*RTE_MBUF_DYNFIELD
(pkt, timestamp_off, uint64_t *) = skew;
- RTE_PER_LCORE(timestamp_qskew) = skew;
+ fs->ts_skew = skew;
timestamp_mark.ts = rte_cpu_to_be_64(skew);
} else {
@@ -462,5 +456,4 @@ tx_only_begin(portid_t pi)
timestamp_mask = 0;
timestamp_off = -1;
- RTE_PER_LCORE(timestamp_qskew) = 0;
dynf = rte_mbuf_dynflag_lookup
(RTE_MBUF_DYNFLAG_TX_TIMESTAMP_NAME, NULL);
@@ -505,5 +498,4 @@ tx_only_begin(portid_t pi)
}
}
- timestamp_init_req++;
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.128451386 +0000
+++ 0068-app-testpmd-fix-Tx-scheduling-interval.patch 2022-02-21 15:22:44.148704254 +0000
@@ -1 +1 @@
-From 9fac5ca8edaebd0f6206193277876fdebb6f3eb2 Mon Sep 17 00:00:00 2001
+From bb1854bc690ec40310cfb964c7153904850d9b5f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9fac5ca8edaebd0f6206193277876fdebb6f3eb2 ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/axgbe: use PCI root complex device to distinguish device' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (66 preceding siblings ...)
2022-02-21 15:34 ` patch 'app/testpmd: fix Tx scheduling interval' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'net/af_xdp: fix build with -Wunused-function' " Kevin Traynor
` (126 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Chandubabu Namburu; +Cc: Selwin Sebastian, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/181ddedb1a1e9d58c9f1d6283bf234b4d3d9a041
Thanks.
Kevin
---
From 181ddedb1a1e9d58c9f1d6283bf234b4d3d9a041 Mon Sep 17 00:00:00 2001
From: Chandubabu Namburu <chandu@amd.com>
Date: Thu, 2 Dec 2021 16:10:34 +0000
Subject: [PATCH] net/axgbe: use PCI root complex device to distinguish device
[ upstream commit b0db927b5ebafac7b9aa1bacaad8d464fba7d5a6 ]
"bus/pci: optimize bus scan" broke axgbe on V1000/R1000.
RV root complex pci device does not have any kernel driver assigned
so it is removed from pci scan list which is used in
"net/axgbe: add a HW quirk for register definitions".
Get root complex device id directly from pci sysfs instead of
pci scan list.
Fixes: 991e0b1dbc4a ("net/axgbe: add a HW quirk for register definitions")
Signed-off-by: Chandubabu Namburu <chandu@amd.com>
Acked-by: Selwin Sebastian <selwin.sebastian@amd.com>
---
drivers/net/axgbe/axgbe_ethdev.c | 39 ++++++++++++++++----------------
1 file changed, 20 insertions(+), 19 deletions(-)
diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c
index 76e12d12f0..e9546469f3 100644
--- a/drivers/net/axgbe/axgbe_ethdev.c
+++ b/drivers/net/axgbe/axgbe_ethdev.c
@@ -11,4 +11,6 @@
#include "rte_time.h"
+#include "eal_filesystem.h"
+
static int eth_axgbe_dev_init(struct rte_eth_dev *eth_dev);
static int axgbe_dev_configure(struct rte_eth_dev *dev);
@@ -2118,26 +2120,25 @@ static void axgbe_default_config(struct axgbe_port *pdata)
}
-static int
-pci_device_cmp(const struct rte_device *dev, const void *_pci_id)
+/*
+ * Return PCI root complex device id on success else 0
+ */
+static uint16_t
+get_pci_rc_devid(void)
{
- const struct rte_pci_device *pdev = RTE_DEV_TO_PCI_CONST(dev);
- const struct rte_pci_id *pcid = _pci_id;
+ char pci_sysfs[PATH_MAX];
+ const struct rte_pci_addr pci_rc_addr = {0, 0, 0, 0};
+ unsigned long device_id;
- if (pdev->id.vendor_id == AMD_PCI_VENDOR_ID &&
- pdev->id.device_id == pcid->device_id)
+ snprintf(pci_sysfs, sizeof(pci_sysfs), "%s/" PCI_PRI_FMT "/device",
+ rte_pci_get_sysfs_path(), pci_rc_addr.domain,
+ pci_rc_addr.bus, pci_rc_addr.devid, pci_rc_addr.function);
+
+ /* get device id */
+ if (eal_parse_sysfs_value(pci_sysfs, &device_id) < 0) {
+ PMD_INIT_LOG(ERR, "Error in reading PCI sysfs\n");
return 0;
- return 1;
-}
+ }
-static bool
-pci_search_device(int device_id)
-{
- struct rte_bus *pci_bus;
- struct rte_pci_id dev_id;
-
- dev_id.device_id = device_id;
- pci_bus = rte_bus_find_by_name("pci");
- return (pci_bus != NULL) &&
- (pci_bus->find_device(NULL, pci_device_cmp, &dev_id) != NULL);
+ return (uint16_t)device_id;
}
@@ -2181,5 +2182,5 @@ eth_axgbe_dev_init(struct rte_eth_dev *eth_dev)
* Use root complex device ID to differentiate RV AXGBE vs SNOWY AXGBE
*/
- if (pci_search_device(AMD_PCI_RV_ROOT_COMPLEX_ID)) {
+ if ((get_pci_rc_devid()) == AMD_PCI_RV_ROOT_COMPLEX_ID) {
pdata->xpcs_window_def_reg = PCS_V2_RV_WINDOW_DEF;
pdata->xpcs_window_sel_reg = PCS_V2_RV_WINDOW_SELECT;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.147501762 +0000
+++ 0069-net-axgbe-use-PCI-root-complex-device-to-distinguish.patch 2022-02-21 15:22:44.149704256 +0000
@@ -1 +1 @@
-From b0db927b5ebafac7b9aa1bacaad8d464fba7d5a6 Mon Sep 17 00:00:00 2001
+From 181ddedb1a1e9d58c9f1d6283bf234b4d3d9a041 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b0db927b5ebafac7b9aa1bacaad8d464fba7d5a6 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/af_xdp: fix build with -Wunused-function' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (67 preceding siblings ...)
2022-02-21 15:34 ` patch 'net/axgbe: use PCI root complex device to distinguish device' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'net/bonding: fix mode type mismatch' " Kevin Traynor
` (125 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Ciara Loftus; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/40a4d0544bbea11e050163caf506a54fb2ef8cc9
Thanks.
Kevin
---
From 40a4d0544bbea11e050163caf506a54fb2ef8cc9 Mon Sep 17 00:00:00 2001
From: Ciara Loftus <ciara.loftus@intel.com>
Date: Thu, 9 Dec 2021 17:19:47 +0000
Subject: [PATCH] net/af_xdp: fix build with -Wunused-function
[ upstream commit af8d89a0c6d5cfd4d77ec1ec224e5a72996026df ]
The get_shared_umem function is only called when the kernel
flag XDP_UMEM_UNALIGNED_CHUNK_FLAG is defined. Move the
function implementation and associated helper so that it only
gets compiled when that flag is set.
Fixes: 74b46340e2d4 ("net/af_xdp: support shared UMEM")
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
drivers/net/af_xdp/rte_eth_af_xdp.c | 121 ++++++++++++++--------------
1 file changed, 60 insertions(+), 61 deletions(-)
diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index 96c2c9d939..b3ed704b36 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -698,65 +698,4 @@ find_internal_resource(struct pmd_internals *port_int)
}
-/* Check if the netdev,qid context already exists */
-static inline bool
-ctx_exists(struct pkt_rx_queue *rxq, const char *ifname,
- struct pkt_rx_queue *list_rxq, const char *list_ifname)
-{
- bool exists = false;
-
- if (rxq->xsk_queue_idx == list_rxq->xsk_queue_idx &&
- !strncmp(ifname, list_ifname, IFNAMSIZ)) {
- AF_XDP_LOG(ERR, "ctx %s,%i already exists, cannot share umem\n",
- ifname, rxq->xsk_queue_idx);
- exists = true;
- }
-
- return exists;
-}
-
-/* Get a pointer to an existing UMEM which overlays the rxq's mb_pool */
-static inline int
-get_shared_umem(struct pkt_rx_queue *rxq, const char *ifname,
- struct xsk_umem_info **umem)
-{
- struct internal_list *list;
- struct pmd_internals *internals;
- int i = 0, ret = 0;
- struct rte_mempool *mb_pool = rxq->mb_pool;
-
- if (mb_pool == NULL)
- return ret;
-
- pthread_mutex_lock(&internal_list_lock);
-
- TAILQ_FOREACH(list, &internal_list, next) {
- internals = list->eth_dev->data->dev_private;
- for (i = 0; i < internals->queue_cnt; i++) {
- struct pkt_rx_queue *list_rxq =
- &internals->rx_queues[i];
- if (rxq == list_rxq)
- continue;
- if (mb_pool == internals->rx_queues[i].mb_pool) {
- if (ctx_exists(rxq, ifname, list_rxq,
- internals->if_name)) {
- ret = -1;
- goto out;
- }
- if (__atomic_load_n(
- &internals->rx_queues[i].umem->refcnt,
- __ATOMIC_ACQUIRE)) {
- *umem = internals->rx_queues[i].umem;
- goto out;
- }
- }
- }
- }
-
-out:
- pthread_mutex_unlock(&internal_list_lock);
-
- return ret;
-}
-
static int
eth_dev_configure(struct rte_eth_dev *dev)
@@ -1014,4 +953,64 @@ static inline uintptr_t get_base_addr(struct rte_mempool *mp, uint64_t *align)
}
+/* Check if the netdev,qid context already exists */
+static inline bool
+ctx_exists(struct pkt_rx_queue *rxq, const char *ifname,
+ struct pkt_rx_queue *list_rxq, const char *list_ifname)
+{
+ bool exists = false;
+
+ if (rxq->xsk_queue_idx == list_rxq->xsk_queue_idx &&
+ !strncmp(ifname, list_ifname, IFNAMSIZ)) {
+ AF_XDP_LOG(ERR, "ctx %s,%i already exists, cannot share umem\n",
+ ifname, rxq->xsk_queue_idx);
+ exists = true;
+ }
+
+ return exists;
+}
+
+/* Get a pointer to an existing UMEM which overlays the rxq's mb_pool */
+static inline int
+get_shared_umem(struct pkt_rx_queue *rxq, const char *ifname,
+ struct xsk_umem_info **umem)
+{
+ struct internal_list *list;
+ struct pmd_internals *internals;
+ int i = 0, ret = 0;
+ struct rte_mempool *mb_pool = rxq->mb_pool;
+
+ if (mb_pool == NULL)
+ return ret;
+
+ pthread_mutex_lock(&internal_list_lock);
+
+ TAILQ_FOREACH(list, &internal_list, next) {
+ internals = list->eth_dev->data->dev_private;
+ for (i = 0; i < internals->queue_cnt; i++) {
+ struct pkt_rx_queue *list_rxq =
+ &internals->rx_queues[i];
+ if (rxq == list_rxq)
+ continue;
+ if (mb_pool == internals->rx_queues[i].mb_pool) {
+ if (ctx_exists(rxq, ifname, list_rxq,
+ internals->if_name)) {
+ ret = -1;
+ goto out;
+ }
+ if (__atomic_load_n(&internals->rx_queues[i].umem->refcnt,
+ __ATOMIC_ACQUIRE)) {
+ *umem = internals->rx_queues[i].umem;
+ goto out;
+ }
+ }
+ }
+ }
+
+out:
+ pthread_mutex_unlock(&internal_list_lock);
+
+ return ret;
+}
+
static struct
xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.167554258 +0000
+++ 0070-net-af_xdp-fix-build-with-Wunused-function.patch 2022-02-21 15:22:44.150704258 +0000
@@ -1 +1 @@
-From af8d89a0c6d5cfd4d77ec1ec224e5a72996026df Mon Sep 17 00:00:00 2001
+From 40a4d0544bbea11e050163caf506a54fb2ef8cc9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit af8d89a0c6d5cfd4d77ec1ec224e5a72996026df ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/bonding: fix mode type mismatch' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (68 preceding siblings ...)
2022-02-21 15:34 ` patch 'net/af_xdp: fix build with -Wunused-function' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'app/testpmd: fix dereference before null check' " Kevin Traynor
` (124 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Yunjian Wang; +Cc: Min Hu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/83774f8a67df75f671ac0918d21e1fcea1e93035
Thanks.
Kevin
---
From 83774f8a67df75f671ac0918d21e1fcea1e93035 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Fri, 10 Dec 2021 19:41:01 +0800
Subject: [PATCH] net/bonding: fix mode type mismatch
[ upstream commit cc5097b1e46ddee8df8d2210a67ec675f3807ba2 ]
There were some type-mismatch issues in bonding and fix them:
- Use %u to fix argument type mismatch in RTE_BOND_LOG.
- The internals->mode is of type uint8_t. But the function
parameter 'mode' is of type int. So change the mode type
from int to uint8_t.
Fixes: 2efb58cbab6e ("bond: new link bonding library")
Fixes: a45b288ef21a ("bond: support link status polling")
Fixes: 68451eb6698c ("net/bonding: call through EAL on create/free")
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
---
drivers/net/bonding/eth_bond_private.h | 2 +-
drivers/net/bonding/rte_eth_bond_api.c | 2 +-
drivers/net/bonding/rte_eth_bond_pmd.c | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/bonding/eth_bond_private.h b/drivers/net/bonding/eth_bond_private.h
index 9626b26d67..156335c425 100644
--- a/drivers/net/bonding/eth_bond_private.h
+++ b/drivers/net/bonding/eth_bond_private.h
@@ -241,5 +241,5 @@ slave_remove_mac_addresses(struct rte_eth_dev *bonded_eth_dev,
int
-bond_ethdev_mode_set(struct rte_eth_dev *eth_dev, int mode);
+bond_ethdev_mode_set(struct rte_eth_dev *eth_dev, uint8_t mode);
int
diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c
index 2d5cac6c51..8840d9e17b 100644
--- a/drivers/net/bonding/rte_eth_bond_api.c
+++ b/drivers/net/bonding/rte_eth_bond_api.c
@@ -669,5 +669,5 @@ __eth_bond_slave_remove_lock_free(uint16_t bonded_port_id,
if (slave_idx < 0) {
- RTE_BOND_LOG(ERR, "Couldn't find slave in port list, slave count %d",
+ RTE_BOND_LOG(ERR, "Couldn't find slave in port list, slave count %u",
internals->slave_count);
return -1;
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 0f11a2f5a8..9607141b39 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1555,5 +1555,5 @@ mac_address_slaves_update(struct rte_eth_dev *bonded_eth_dev)
int
-bond_ethdev_mode_set(struct rte_eth_dev *eth_dev, int mode)
+bond_ethdev_mode_set(struct rte_eth_dev *eth_dev, uint8_t mode)
{
struct bond_dev_private *internals;
@@ -3301,5 +3301,5 @@ bond_alloc(struct rte_vdev_device *dev, uint8_t mode)
bond_mode_8023ad_setup(eth_dev, NULL);
if (bond_ethdev_mode_set(eth_dev, mode)) {
- RTE_BOND_LOG(ERR, "Failed to set bonded device %d mode to %d",
+ RTE_BOND_LOG(ERR, "Failed to set bonded device %u mode to %u",
eth_dev->data->port_id, mode);
goto err;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.186872701 +0000
+++ 0071-net-bonding-fix-mode-type-mismatch.patch 2022-02-21 15:22:44.152704263 +0000
@@ -1 +1 @@
-From cc5097b1e46ddee8df8d2210a67ec675f3807ba2 Mon Sep 17 00:00:00 2001
+From 83774f8a67df75f671ac0918d21e1fcea1e93035 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cc5097b1e46ddee8df8d2210a67ec675f3807ba2 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'app/testpmd: fix dereference before null check' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (69 preceding siblings ...)
2022-02-21 15:34 ` patch 'net/bonding: fix mode type mismatch' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'app/testpmd: fix external buffer allocation' " Kevin Traynor
` (123 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Sean Morrissey; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/6d5f3984dcbf23d861c3d892c603472a53b92621
Thanks.
Kevin
---
From 6d5f3984dcbf23d861c3d892c603472a53b92621 Mon Sep 17 00:00:00 2001
From: Sean Morrissey <sean.morrissey@intel.com>
Date: Tue, 18 Jan 2022 10:53:09 +0000
Subject: [PATCH] app/testpmd: fix dereference before null check
[ upstream commit f924a8d3bb838bffbaf2c2d47bada952e45b475f ]
Assign 'left' variable only after null check on 'size'
as function returns if 'size' is null.
Coverity issue: 374381
Fixes: 169a9fed1f4c ("app/testpmd: fix hex string parser support for flow API")
Signed-off-by: Sean Morrissey <sean.morrissey@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
app/test-pmd/cmdline_flow.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 5c2bba48ad..bbaf18d76e 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -7703,6 +7703,6 @@ static int
parse_hex_string(const char *src, uint8_t *dst, uint32_t *size)
{
- uint32_t left = *size;
const uint8_t *head = dst;
+ uint32_t left;
/* Check input parameters */
@@ -7713,4 +7713,6 @@ parse_hex_string(const char *src, uint8_t *dst, uint32_t *size)
return -1;
+ left = *size;
+
/* Convert chars to bytes */
while (left) {
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.208436662 +0000
+++ 0072-app-testpmd-fix-dereference-before-null-check.patch 2022-02-21 15:22:44.157704274 +0000
@@ -1 +1 @@
-From f924a8d3bb838bffbaf2c2d47bada952e45b475f Mon Sep 17 00:00:00 2001
+From 6d5f3984dcbf23d861c3d892c603472a53b92621 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f924a8d3bb838bffbaf2c2d47bada952e45b475f ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'app/testpmd: fix external buffer allocation' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (70 preceding siblings ...)
2022-02-21 15:34 ` patch 'app/testpmd: fix dereference before null check' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'net/cxgbe: fix dangling pointer by mailbox access rework' " Kevin Traynor
` (122 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Dmitry Kozlyuk; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/ef94549efe574bddcc8d65a9ac66b4b4734d7ffe
Thanks.
Kevin
---
From ef94549efe574bddcc8d65a9ac66b4b4734d7ffe Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Date: Fri, 17 Dec 2021 11:58:16 +0200
Subject: [PATCH] app/testpmd: fix external buffer allocation
[ upstream commit 13b196425ce371a82fa8008fa46ce66861d4202b ]
External pinned buffer memory (--mp-alloc=xbuf)
was allocated as multiple IOVA-contiguous memzones
of 2M size and 2M alignment.
Due to the malloc overhead and the alignment requirement,
each 2M memzone consumed 4M of hugepage memory:
2M of usable memory + X of malloc overhead + (2M-X) padding.
The allocation often failed with 2M hugepages and IOVA-as-PA
if a PA-contiguous span of 2 hugepages could not be found.
Also, with any hugepage size and IOVA mode
memory consumption was almost 2x of the usable amount.
Alignment requirement of 2M for external buffers is redundant.
It was an attempt to ensure IOVA-contiguity
by forcing memzones to start at hugepage boundaries,
while 2M size intended to leave no unused space on the page.
As shown above, this in fact caused excessive memory consumption
and decreased the chance of a successful allocation.
RTE_MEMZONE_F_IOVA_CONTIG already ensures IOVA-contiguity.
Remove the alignment requirement.
Reduce the memzone size by the malloc overhead size (4 cache lines),
so that memory consumption for each memzone is
(2M-X) of usable memory + X of malloc overhead = 2M.
This also means that whenever there are free 2M hugepages,
an IOVA-contiguous memzone can always be allocated.
Fixes: 72512e1897b2 ("app/testpmd: add mempool with external data buffers")
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
app/test-pmd/testpmd.c | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 6c387bde84..e1da961311 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -85,5 +85,11 @@
#define EXTMEM_HEAP_NAME "extmem"
-#define EXTBUF_ZONE_SIZE RTE_PGSIZE_2M
+/*
+ * Zone size with the malloc overhead (max of debug and release variants)
+ * must fit into the smallest supported hugepage size (2M),
+ * so that an IOVA-contiguous zone of this size can always be allocated
+ * if there are free 2M hugepages.
+ */
+#define EXTBUF_ZONE_SIZE (RTE_PGSIZE_2M - 4 * RTE_CACHE_LINE_SIZE)
uint16_t verbose_level = 0; /**< Silent by default. */
@@ -1062,10 +1068,9 @@ setup_extbuf(uint32_t nb_mbufs, uint16_t mbuf_sz, unsigned int socket_id,
break;
}
- mz = rte_memzone_reserve_aligned(mz_name, EXTBUF_ZONE_SIZE,
- socket_id,
- RTE_MEMZONE_IOVA_CONTIG |
- RTE_MEMZONE_1GB |
- RTE_MEMZONE_SIZE_HINT_ONLY,
- EXTBUF_ZONE_SIZE);
+ mz = rte_memzone_reserve(mz_name, EXTBUF_ZONE_SIZE,
+ socket_id,
+ RTE_MEMZONE_IOVA_CONTIG |
+ RTE_MEMZONE_1GB |
+ RTE_MEMZONE_SIZE_HINT_ONLY);
if (mz == NULL) {
/*
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.232098310 +0000
+++ 0073-app-testpmd-fix-external-buffer-allocation.patch 2022-02-21 15:22:44.159704279 +0000
@@ -1 +1 @@
-From 13b196425ce371a82fa8008fa46ce66861d4202b Mon Sep 17 00:00:00 2001
+From ef94549efe574bddcc8d65a9ac66b4b4734d7ffe Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 13b196425ce371a82fa8008fa46ce66861d4202b ]
+
@@ -33 +34,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/cxgbe: fix dangling pointer by mailbox access rework' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (71 preceding siblings ...)
2022-02-21 15:34 ` patch 'app/testpmd: fix external buffer allocation' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'net/dpaa2: fix unregistering interrupt handler' " Kevin Traynor
` (121 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Rahul Lakkireddy; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/699c30f8534c136926df9b6fb5b97ed06c1f34a0
Thanks.
Kevin
---
From 699c30f8534c136926df9b6fb5b97ed06c1f34a0 Mon Sep 17 00:00:00 2001
From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Date: Thu, 20 Jan 2022 03:26:40 +0530
Subject: [PATCH] net/cxgbe: fix dangling pointer by mailbox access rework
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 19cafed99ac573662045424e559cee444c175b63 ]
Rework mailbox access serialization to dynamically allocate and
free mbox entry. Also remove unnecessary temp memory and macros.
Observed with: gcc-12.0 (GCC) 12.0.1 20220118 (experimental)
In file included from ../lib/eal/linux/include/rte_os.h:14,
from ../lib/eal/include/rte_common.h:28,
from ../lib/eal/include/rte_log.h:25,
from ../lib/ethdev/rte_ethdev.h:164,
from ../lib/ethdev/ethdev_driver.h:18,
from ../drivers/net/cxgbe/base/t4vf_hw.c:6:
In function ‘t4_os_atomic_add_tail’,
inlined from ‘t4vf_wr_mbox_core’ at
../drivers/net/cxgbe/base/t4vf_hw.c:115:2:
../drivers/net/cxgbe/base/adapter.h:742:9:
warning: storing the address of local variable ‘entry’ in
‘((struct mbox_list *)adapter)[96].tqh_last’ [-Wdangling-pointer=]
742 | TAILQ_INSERT_TAIL(head, entry, next);
| ^~~~~~~~~~~~~~~~~
../drivers/net/cxgbe/base/t4vf_hw.c: In function ‘t4vf_wr_mbox_core’:
../drivers/net/cxgbe/base/t4vf_hw.c:86:27: note: ‘entry’ declared here
86 | struct mbox_entry entry;
| ^~~~~
../drivers/net/cxgbe/base/t4vf_hw.c:86:27: note: ‘adapter’ declared here
Fixes: 3bd122eef2cc ("cxgbe/base: add hardware API for Chelsio T5 series adapters")
Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
---
drivers/net/cxgbe/base/adapter.h | 2 -
drivers/net/cxgbe/base/t4_hw.c | 83 ++++++++++++--------------------
drivers/net/cxgbe/base/t4vf_hw.c | 28 +++++++----
3 files changed, 49 insertions(+), 64 deletions(-)
diff --git a/drivers/net/cxgbe/base/adapter.h b/drivers/net/cxgbe/base/adapter.h
index 1c7c8afe16..97963422bf 100644
--- a/drivers/net/cxgbe/base/adapter.h
+++ b/drivers/net/cxgbe/base/adapter.h
@@ -292,6 +292,4 @@ struct sge {
};
-#define T4_OS_NEEDS_MBOX_LOCKING 1
-
/*
* OS Lock/List primitives for those interfaces in the Common Code which
diff --git a/drivers/net/cxgbe/base/t4_hw.c b/drivers/net/cxgbe/base/t4_hw.c
index cdcd7e5510..645833765a 100644
--- a/drivers/net/cxgbe/base/t4_hw.c
+++ b/drivers/net/cxgbe/base/t4_hw.c
@@ -264,15 +264,4 @@ static void fw_asrt(struct adapter *adap, u32 mbox_addr)
#define X_CIM_PF_NOACCESS 0xeeeeeeee
-/*
- * If the Host OS Driver needs locking arround accesses to the mailbox, this
- * can be turned on via the T4_OS_NEEDS_MBOX_LOCKING CPP define ...
- */
-/* makes single-statement usage a bit cleaner ... */
-#ifdef T4_OS_NEEDS_MBOX_LOCKING
-#define T4_OS_MBOX_LOCKING(x) x
-#else
-#define T4_OS_MBOX_LOCKING(x) do {} while (0)
-#endif
-
/**
* t4_wr_mbox_meat_timeout - send a command to FW through the given mailbox
@@ -315,26 +304,15 @@ int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox,
};
- u32 v;
- u64 res;
- int i, ms;
- unsigned int delay_idx;
- __be64 *temp = (__be64 *)malloc(size * sizeof(char));
- __be64 *p = temp;
u32 data_reg = PF_REG(mbox, A_CIM_PF_MAILBOX_DATA);
u32 ctl_reg = PF_REG(mbox, A_CIM_PF_MAILBOX_CTRL);
- u32 ctl;
- struct mbox_entry entry;
- u32 pcie_fw = 0;
+ struct mbox_entry *entry;
+ u32 v, ctl, pcie_fw = 0;
+ unsigned int delay_idx;
+ const __be64 *p;
+ int i, ms, ret;
+ u64 res;
- if (!temp)
- return -ENOMEM;
-
- if ((size & 15) || size > MBOX_LEN) {
- free(temp);
+ if ((size & 15) != 0 || size > MBOX_LEN)
return -EINVAL;
- }
-
- memset(p, 0, size);
- memcpy(p, (const __be64 *)cmd, size);
/*
@@ -346,5 +324,8 @@ int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox,
}
-#ifdef T4_OS_NEEDS_MBOX_LOCKING
+ entry = t4_os_alloc(sizeof(*entry));
+ if (entry == NULL)
+ return -ENOMEM;
+
/*
* Queue ourselves onto the mailbox access list. When our entry is at
@@ -353,5 +334,5 @@ int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox,
* EBUSY] ...
*/
- t4_os_atomic_add_tail(&entry, &adap->mbox_list, &adap->mbox_lock);
+ t4_os_atomic_add_tail(entry, &adap->mbox_list, &adap->mbox_lock);
delay_idx = 0;
@@ -368,9 +349,9 @@ int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox,
pcie_fw = t4_read_reg(adap, A_PCIE_FW);
if (i > 4 * timeout || (pcie_fw & F_PCIE_FW_ERR)) {
- t4_os_atomic_list_del(&entry, &adap->mbox_list,
+ t4_os_atomic_list_del(entry, &adap->mbox_list,
&adap->mbox_lock);
t4_report_fw_error(adap);
- free(temp);
- return (pcie_fw & F_PCIE_FW_ERR) ? -ENXIO : -EBUSY;
+ ret = ((pcie_fw & F_PCIE_FW_ERR) != 0) ? -ENXIO : -EBUSY;
+ goto out_free;
}
@@ -379,5 +360,5 @@ int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox,
* protocol.
*/
- if (t4_os_list_first_entry(&adap->mbox_list) == &entry)
+ if (t4_os_list_first_entry(&adap->mbox_list) == entry)
break;
@@ -394,5 +375,4 @@ int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox,
}
}
-#endif /* T4_OS_NEEDS_MBOX_LOCKING */
/*
@@ -411,10 +391,9 @@ int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox,
*/
if (v != X_MBOWNER_PL) {
- T4_OS_MBOX_LOCKING(t4_os_atomic_list_del(&entry,
- &adap->mbox_list,
- &adap->mbox_lock));
+ t4_os_atomic_list_del(entry, &adap->mbox_list,
+ &adap->mbox_lock);
t4_report_fw_error(adap);
- free(temp);
- return (v == X_MBOWNER_FW ? -EBUSY : -ETIMEDOUT);
+ ret = (v == X_MBOWNER_FW) ? -EBUSY : -ETIMEDOUT;
+ goto out_free;
}
@@ -442,5 +421,5 @@ int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox,
* Copy in the new mailbox command and send it on its way ...
*/
- for (i = 0; i < size; i += 8, p++)
+ for (i = 0, p = cmd; i < size; i += 8, p++)
t4_write_reg64(adap, data_reg + i, be64_to_cpu(*p));
@@ -513,9 +492,8 @@ int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox,
}
t4_write_reg(adap, ctl_reg, V_MBOWNER(X_MBOWNER_NONE));
- T4_OS_MBOX_LOCKING(
- t4_os_atomic_list_del(&entry, &adap->mbox_list,
- &adap->mbox_lock));
- free(temp);
- return -G_FW_CMD_RETVAL((int)res);
+ t4_os_atomic_list_del(entry, &adap->mbox_list,
+ &adap->mbox_lock);
+ ret = -G_FW_CMD_RETVAL((int)res);
+ goto out_free;
}
}
@@ -528,10 +506,11 @@ int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox,
dev_err(adap, "command %#x in mailbox %d timed out\n",
*(const u8 *)cmd, mbox);
- T4_OS_MBOX_LOCKING(t4_os_atomic_list_del(&entry,
- &adap->mbox_list,
- &adap->mbox_lock));
+ t4_os_atomic_list_del(entry, &adap->mbox_list, &adap->mbox_lock);
t4_report_fw_error(adap);
- free(temp);
- return (pcie_fw & F_PCIE_FW_ERR) ? -ENXIO : -ETIMEDOUT;
+ ret = ((pcie_fw & F_PCIE_FW_ERR) != 0) ? -ENXIO : -ETIMEDOUT;
+
+out_free:
+ t4_os_free(entry);
+ return ret;
}
diff --git a/drivers/net/cxgbe/base/t4vf_hw.c b/drivers/net/cxgbe/base/t4vf_hw.c
index 561d759dbc..7dbd4deb79 100644
--- a/drivers/net/cxgbe/base/t4vf_hw.c
+++ b/drivers/net/cxgbe/base/t4vf_hw.c
@@ -84,5 +84,5 @@ int t4vf_wr_mbox_core(struct adapter *adapter,
u32 mbox_ctl = T4VF_CIM_BASE_ADDR + A_CIM_VF_EXT_MAILBOX_CTRL;
__be64 cmd_rpl[MBOX_LEN / 8];
- struct mbox_entry entry;
+ struct mbox_entry *entry;
unsigned int delay_idx;
u32 v, mbox_data;
@@ -107,4 +107,8 @@ int t4vf_wr_mbox_core(struct adapter *adapter,
return -EINVAL;
+ entry = t4_os_alloc(sizeof(*entry));
+ if (entry == NULL)
+ return -ENOMEM;
+
/*
* Queue ourselves onto the mailbox access list. When our entry is at
@@ -113,5 +117,5 @@ int t4vf_wr_mbox_core(struct adapter *adapter,
* EBUSY] ...
*/
- t4_os_atomic_add_tail(&entry, &adapter->mbox_list, &adapter->mbox_lock);
+ t4_os_atomic_add_tail(entry, &adapter->mbox_list, &adapter->mbox_lock);
delay_idx = 0;
@@ -126,8 +130,8 @@ int t4vf_wr_mbox_core(struct adapter *adapter,
*/
if (i > (2 * FW_CMD_MAX_TIMEOUT)) {
- t4_os_atomic_list_del(&entry, &adapter->mbox_list,
+ t4_os_atomic_list_del(entry, &adapter->mbox_list,
&adapter->mbox_lock);
ret = -EBUSY;
- return ret;
+ goto out_free;
}
@@ -136,5 +140,5 @@ int t4vf_wr_mbox_core(struct adapter *adapter,
* protocol.
*/
- if (t4_os_list_first_entry(&adapter->mbox_list) == &entry)
+ if (t4_os_list_first_entry(&adapter->mbox_list) == entry)
break;
@@ -161,8 +165,8 @@ int t4vf_wr_mbox_core(struct adapter *adapter,
if (v != X_MBOWNER_PL) {
- t4_os_atomic_list_del(&entry, &adapter->mbox_list,
+ t4_os_atomic_list_del(entry, &adapter->mbox_list,
&adapter->mbox_lock);
ret = (v == X_MBOWNER_FW) ? -EBUSY : -ETIMEDOUT;
- return ret;
+ goto out_free;
}
@@ -225,5 +229,5 @@ int t4vf_wr_mbox_core(struct adapter *adapter,
t4_write_reg(adapter, mbox_ctl,
V_MBOWNER(X_MBOWNER_NONE));
- t4_os_atomic_list_del(&entry, &adapter->mbox_list,
+ t4_os_atomic_list_del(entry, &adapter->mbox_list,
&adapter->mbox_lock);
@@ -237,5 +241,6 @@ int t4vf_wr_mbox_core(struct adapter *adapter,
memcpy(rpl, cmd_rpl, size);
}
- return -((int)G_FW_CMD_RETVAL(v));
+ ret = -((int)G_FW_CMD_RETVAL(v));
+ goto out_free;
}
}
@@ -247,6 +252,9 @@ int t4vf_wr_mbox_core(struct adapter *adapter,
*(const u8 *)cmd);
dev_err(adapter, " Control = %#x\n", t4_read_reg(adapter, mbox_ctl));
- t4_os_atomic_list_del(&entry, &adapter->mbox_list, &adapter->mbox_lock);
+ t4_os_atomic_list_del(entry, &adapter->mbox_list, &adapter->mbox_lock);
ret = -ETIMEDOUT;
+
+out_free:
+ t4_os_free(entry);
return ret;
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.253703140 +0000
+++ 0074-net-cxgbe-fix-dangling-pointer-by-mailbox-access-rew.patch 2022-02-21 15:22:44.163704288 +0000
@@ -1 +1 @@
-From 19cafed99ac573662045424e559cee444c175b63 Mon Sep 17 00:00:00 2001
+From 699c30f8534c136926df9b6fb5b97ed06c1f34a0 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 19cafed99ac573662045424e559cee444c175b63 ]
+
@@ -35 +36,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/dpaa2: fix unregistering interrupt handler' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (72 preceding siblings ...)
2022-02-21 15:34 ` patch 'net/cxgbe: fix dangling pointer by mailbox access rework' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'net/dpaa2: fix timestamping for IEEE1588' " Kevin Traynor
` (120 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Vanshika Shukla; +Cc: Hemant Agrawal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/c96ea2bf1cdb43869203ce956cf55eb32d94ccdf
Thanks.
Kevin
---
From c96ea2bf1cdb43869203ce956cf55eb32d94ccdf Mon Sep 17 00:00:00 2001
From: Vanshika Shukla <vanshika.shukla@nxp.com>
Date: Mon, 3 Jan 2022 15:31:18 +0530
Subject: [PATCH] net/dpaa2: fix unregistering interrupt handler
[ upstream commit d192fd321c5eeaba77ef7aab179c447d151ac9cb ]
This patch fixes code that handles unregistering LSC
interrupt handler in dpaa2_dev_stop API.
Fixes: c5acbb5ea20e ("net/dpaa2: support link status event")
Signed-off-by: Vanshika Shukla <vanshika.shukla@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
drivers/net/dpaa2/dpaa2_ethdev.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 2b04f14168..87a8a6e55e 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -1253,5 +1253,10 @@ dpaa2_dev_stop(struct rte_eth_dev *dev)
int ret;
struct rte_eth_link link;
- struct rte_intr_handle *intr_handle = dev->intr_handle;
+ struct rte_device *rdev = dev->device;
+ struct rte_intr_handle *intr_handle;
+ struct rte_dpaa2_device *dpaa2_dev;
+
+ dpaa2_dev = container_of(rdev, struct rte_dpaa2_device, device);
+ intr_handle = dpaa2_dev->intr_handle;
PMD_INIT_FUNC_TRACE();
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.276614740 +0000
+++ 0075-net-dpaa2-fix-unregistering-interrupt-handler.patch 2022-02-21 15:22:44.165704292 +0000
@@ -1 +1 @@
-From d192fd321c5eeaba77ef7aab179c447d151ac9cb Mon Sep 17 00:00:00 2001
+From c96ea2bf1cdb43869203ce956cf55eb32d94ccdf Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d192fd321c5eeaba77ef7aab179c447d151ac9cb ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 383fd57983..37a6db4f01 100644
+index 2b04f14168..87a8a6e55e 100644
@@ -22 +23 @@
-@@ -1266,5 +1266,10 @@ dpaa2_dev_stop(struct rte_eth_dev *dev)
+@@ -1253,5 +1253,10 @@ dpaa2_dev_stop(struct rte_eth_dev *dev)
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/dpaa2: fix timestamping for IEEE1588' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (73 preceding siblings ...)
2022-02-21 15:34 ` patch 'net/dpaa2: fix unregistering interrupt handler' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'net/bnxt: restore dependency on kernel modules' " Kevin Traynor
` (119 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Vanshika Shukla; +Cc: Hemant Agrawal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/279f0d75c023b8c257f77ed7cb5a62773afdf29e
Thanks.
Kevin
---
From 279f0d75c023b8c257f77ed7cb5a62773afdf29e Mon Sep 17 00:00:00 2001
From: Vanshika Shukla <vanshika.shukla@nxp.com>
Date: Mon, 3 Jan 2022 15:31:19 +0530
Subject: [PATCH] net/dpaa2: fix timestamping for IEEE1588
[ upstream commit 90762e5cb8154bb437618f81488ac92a24455521 ]
The current implementation of DPAA2 driver code is such
that it records Rx and Tx timestamp for PTP without checking
if they are PTP packets or not. Packets for which
RTE_MBUF_F_RX_IEEE1588_TMST and RTE_MBUF_F_TX_IEEE1588_TMST
is not set, Rx and Tx timestamp should not be recorded.
This patch fixes this issue by checking if the required
flags are set in the mbuf before recording timestamps.
Also this change defines separate values for
DPAA2_TX_CONF_ENABLE and DPAA2_NO_PREFETCH_RX
Fixes: e806bf878c17 ("net/dpaa2: support timestamp")
Signed-off-by: Vanshika Shukla <vanshika.shukla@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
drivers/net/dpaa2/dpaa2_ethdev.h | 2 +-
drivers/net/dpaa2/dpaa2_ptp.c | 8 ++++---
drivers/net/dpaa2/dpaa2_rxtx.c | 39 +++++++++++++++++++++++++-------
3 files changed, 37 insertions(+), 12 deletions(-)
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.h b/drivers/net/dpaa2/dpaa2_ethdev.h
index e27239e256..fd4eabed4e 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.h
+++ b/drivers/net/dpaa2/dpaa2_ethdev.h
@@ -63,5 +63,5 @@
#define DPAA2_RX_TAILDROP_OFF 0x04
/* Tx confirmation enabled */
-#define DPAA2_TX_CONF_ENABLE 0x08
+#define DPAA2_TX_CONF_ENABLE 0x06
#define DPAA2_RSS_OFFLOAD_ALL ( \
diff --git a/drivers/net/dpaa2/dpaa2_ptp.c b/drivers/net/dpaa2/dpaa2_ptp.c
index 8d79e39244..3a4536dd69 100644
--- a/drivers/net/dpaa2/dpaa2_ptp.c
+++ b/drivers/net/dpaa2/dpaa2_ptp.c
@@ -112,8 +112,10 @@ int dpaa2_timesync_read_tx_timestamp(struct rte_eth_dev *dev,
struct dpaa2_dev_priv *priv = dev->data->dev_private;
- if (priv->next_tx_conf_queue)
- dpaa2_dev_tx_conf(priv->next_tx_conf_queue);
- else
+ if (priv->next_tx_conf_queue) {
+ while (!priv->tx_timestamp)
+ dpaa2_dev_tx_conf(priv->next_tx_conf_queue);
+ } else {
return -1;
+ }
*timestamp = rte_ns_to_timespec(priv->tx_timestamp);
diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c
index 90b971b4bf..9fb6c5f91d 100644
--- a/drivers/net/dpaa2/dpaa2_rxtx.c
+++ b/drivers/net/dpaa2/dpaa2_rxtx.c
@@ -141,6 +141,8 @@ dpaa2_dev_rx_parse_slow(struct rte_mbuf *mbuf,
#if defined(RTE_LIBRTE_IEEE1588)
- if (BIT_ISSET_AT_POS(annotation->word1, DPAA2_ETH_FAS_PTP))
+ if (BIT_ISSET_AT_POS(annotation->word1, DPAA2_ETH_FAS_PTP)) {
mbuf->ol_flags |= RTE_MBUF_F_RX_IEEE1588_PTP;
+ mbuf->ol_flags |= RTE_MBUF_F_RX_IEEE1588_TMST;
+ }
#endif
@@ -770,5 +772,8 @@ dpaa2_dev_prefetch_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
bufs[num_rx] = eth_fd_to_mbuf(fd, eth_data->port_id);
#if defined(RTE_LIBRTE_IEEE1588)
- priv->rx_timestamp = *dpaa2_timestamp_dynfield(bufs[num_rx]);
+ if (bufs[num_rx]->ol_flags & PKT_RX_IEEE1588_TMST) {
+ priv->rx_timestamp =
+ *dpaa2_timestamp_dynfield(bufs[num_rx]);
+ }
#endif
@@ -987,4 +992,11 @@ dpaa2_dev_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
eth_data->port_id);
+#if defined(RTE_LIBRTE_IEEE1588)
+ if (bufs[num_rx]->ol_flags & PKT_RX_IEEE1588_TMST) {
+ priv->rx_timestamp =
+ *dpaa2_timestamp_dynfield(bufs[num_rx]);
+ }
+#endif
+
if (eth_data->dev_conf.rxmode.offloads &
RTE_ETH_RX_OFFLOAD_VLAN_STRIP) {
@@ -1022,4 +1034,6 @@ uint16_t dpaa2_dev_tx_conf(void *queue)
struct dpaa2_dev_priv *priv = eth_data->dev_private;
struct dpaa2_annot_hdr *annotation;
+ void *v_addr;
+ struct rte_mbuf *mbuf;
#endif
@@ -1106,8 +1120,14 @@ uint16_t dpaa2_dev_tx_conf(void *queue)
num_pulled++;
#if defined(RTE_LIBRTE_IEEE1588)
- annotation = (struct dpaa2_annot_hdr *)((size_t)
- DPAA2_IOVA_TO_VADDR(DPAA2_GET_FD_ADDR(fd)) +
- DPAA2_FD_PTA_SIZE);
- priv->tx_timestamp = annotation->word2;
+ v_addr = DPAA2_IOVA_TO_VADDR(DPAA2_GET_FD_ADDR(fd));
+ mbuf = DPAA2_INLINE_MBUF_FROM_BUF(v_addr,
+ rte_dpaa2_bpid_info[DPAA2_GET_FD_BPID(fd)].meta_data_size);
+
+ if (mbuf->ol_flags & PKT_TX_IEEE1588_TMST) {
+ annotation = (struct dpaa2_annot_hdr *)((size_t)
+ DPAA2_IOVA_TO_VADDR(DPAA2_GET_FD_ADDR(fd)) +
+ DPAA2_FD_PTA_SIZE);
+ priv->tx_timestamp = annotation->word2;
+ }
#endif
} while (pending);
@@ -1185,6 +1205,9 @@ dpaa2_dev_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
* the timestamp
*/
- priv->next_tx_conf_queue = dpaa2_q->tx_conf_queue;
- dpaa2_dev_tx_conf(dpaa2_q->tx_conf_queue);
+ if ((*bufs)->ol_flags & PKT_TX_IEEE1588_TMST) {
+ priv->next_tx_conf_queue = dpaa2_q->tx_conf_queue;
+ dpaa2_dev_tx_conf(dpaa2_q->tx_conf_queue);
+ priv->tx_timestamp = 0;
+ }
#endif
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.297740475 +0000
+++ 0076-net-dpaa2-fix-timestamping-for-IEEE1588.patch 2022-02-21 15:22:44.166704294 +0000
@@ -1 +1 @@
-From 90762e5cb8154bb437618f81488ac92a24455521 Mon Sep 17 00:00:00 2001
+From 279f0d75c023b8c257f77ed7cb5a62773afdf29e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 90762e5cb8154bb437618f81488ac92a24455521 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/bnxt: restore dependency on kernel modules' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (74 preceding siblings ...)
2022-02-21 15:34 ` patch 'net/dpaa2: fix timestamping for IEEE1588' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'net/mlx5: fix maximum packet headers size for TSO' " Kevin Traynor
` (118 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
Cc: Geoffrey Le Gourriérec, Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/70211750cc7912d2760568fedfea82bb2ec5651f
Thanks.
Kevin
---
From 70211750cc7912d2760568fedfea82bb2ec5651f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Geoffrey=20Le=20Gourri=C3=A9rec?=
<geoffrey.le_gourrierec@6wind.com>
Date: Wed, 12 Jan 2022 14:41:52 +0100
Subject: [PATCH] net/bnxt: restore dependency on kernel modules
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 4d47569cc191b77c40c74e644c67549f18e9edf3 ]
During a large refactoring sweep for 21.11, a previous commit
removed the dependency the bnxt driver had on Linux virtual
bus drivers, such as vfio-pci. This breaks port detection.
This patch adds the kmod dependency back as it was.
Fixes: 295968d17407 ("ethdev: add namespace")
Signed-off-by: Geoffrey Le Gourriérec <geoffrey.le_gourrierec@6wind.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 4dc9cd9598..1d51865aac 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -6360,3 +6360,3 @@ RTE_LOG_REGISTER_SUFFIX(bnxt_logtype_driver, driver, NOTICE);
RTE_PMD_REGISTER_PCI(net_bnxt, bnxt_rte_pmd);
RTE_PMD_REGISTER_PCI_TABLE(net_bnxt, bnxt_pci_id_map);
-
+RTE_PMD_REGISTER_KMOD_DEP(net_bnxt, "* igb_uio | uio_pci_generic | vfio-pci");
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.317283957 +0000
+++ 0077-net-bnxt-restore-dependency-on-kernel-modules.patch 2022-02-21 15:22:44.170704303 +0000
@@ -1 +1 @@
-From 4d47569cc191b77c40c74e644c67549f18e9edf3 Mon Sep 17 00:00:00 2001
+From 70211750cc7912d2760568fedfea82bb2ec5651f Mon Sep 17 00:00:00 2001
@@ -9,0 +10,2 @@
+[ upstream commit 4d47569cc191b77c40c74e644c67549f18e9edf3 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 999a9a5103..22e015d5aa 100644
+index 4dc9cd9598..1d51865aac 100644
@@ -29 +30 @@
-@@ -6361,3 +6361,3 @@ RTE_LOG_REGISTER_SUFFIX(bnxt_logtype_driver, driver, NOTICE);
+@@ -6360,3 +6360,3 @@ RTE_LOG_REGISTER_SUFFIX(bnxt_logtype_driver, driver, NOTICE);
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/mlx5: fix maximum packet headers size for TSO' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (75 preceding siblings ...)
2022-02-21 15:34 ` patch 'net/bnxt: restore dependency on kernel modules' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'net/mlx5: fix MPRQ WQE size assertion' " Kevin Traynor
` (117 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Alexander Kozyrev; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/a9bc2a46c239d922a5d091ff38b7024645fdc6c0
Thanks.
Kevin
---
From a9bc2a46c239d922a5d091ff38b7024645fdc6c0 Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev@nvidia.com>
Date: Thu, 13 Jan 2022 16:32:29 +0200
Subject: [PATCH] net/mlx5: fix maximum packet headers size for TSO
[ upstream commit 9701034faab0f84ba42e1f5343afda5464b11ca3 ]
The maximum packet headers size for TSO is calculated as a sum of
Ethernet, VLAN, IPv6 and TCP headers (plus inner headers).
The rationale behind choosing IPv6 and TCP is their headers
are bigger than IPv4 and UDP respectively, giving us the maximum
possible headers size. But it is not true for L3 headers.
IPv4 header size (20 bytes) is smaller than IPv6 header size
(40 bytes) only in the default case. There are up to 10
optional header fields called Options in case IHL > 5.
This means that the maximum size of the IPv4 header is 60 bytes.
Choosing the wrong maximum packets headers size causes inability
to transmit multi-segment TSO packets with IPv4 Options present.
PMD check that it is possible to inline all the packet headers
and the packet headers size exceeds the expected maximum size.
The maximum packet headers size was set to 192 bytes before,
but its value has been reduced during Tx path refactor activity.
Restore the proper maximum packet headers size for TSO.
Fixes: 50724e1bba76 ("net/mlx5: update Tx definitions")
Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/mlx5_defs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_defs.h b/drivers/net/mlx5/mlx5_defs.h
index 36b384fa08..2d48fde010 100644
--- a/drivers/net/mlx5/mlx5_defs.h
+++ b/drivers/net/mlx5/mlx5_defs.h
@@ -51,5 +51,5 @@
/* Maximum Packet headers size (L2+L3+L4) for TSO. */
-#define MLX5_MAX_TSO_HEADER (128u + 34u)
+#define MLX5_MAX_TSO_HEADER 192U
/* Inline data size required by NICs. */
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.339994280 +0000
+++ 0078-net-mlx5-fix-maximum-packet-headers-size-for-TSO.patch 2022-02-21 15:22:44.170704303 +0000
@@ -1 +1 @@
-From 9701034faab0f84ba42e1f5343afda5464b11ca3 Mon Sep 17 00:00:00 2001
+From a9bc2a46c239d922a5d091ff38b7024645fdc6c0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9701034faab0f84ba42e1f5343afda5464b11ca3 ]
+
@@ -25 +26,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/mlx5: fix MPRQ WQE size assertion' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (76 preceding siblings ...)
2022-02-21 15:34 ` patch 'net/mlx5: fix maximum packet headers size for TSO' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'net/nfp: remove duplicated check when setting MAC address' " Kevin Traynor
` (116 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Alexander Kozyrev; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/85d9e45c32ee046eea992a0cf57d1c8efcc5a144
Thanks.
Kevin
---
From 85d9e45c32ee046eea992a0cf57d1c8efcc5a144 Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev@nvidia.com>
Date: Thu, 13 Jan 2022 16:36:09 +0200
Subject: [PATCH] net/mlx5: fix MPRQ WQE size assertion
[ upstream commit 728b6447e766fc0aaf59e888635d62d54e77a528 ]
Preparation of the stride size and the number of strides for
Multi-Packet RQ was updated recently to accommodate the hardware
limitation about minimum WQE size. The wrong assertion was
introduced to ensure this limitation is met. Assert that the
configured WQE size is not less than the minimum supported size.
Fixes: 34776af600df ("net/mlx5: fix MPRQ stride devargs adjustment")
Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/mlx5_rxq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index ee07c610b9..580d7ae868 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -1620,5 +1620,5 @@ mlx5_mprq_prepare(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
log_stride_wqe_size = log_def_stride_num + log_def_stride_size;
}
- MLX5_ASSERT(log_stride_wqe_size < config->mprq.log_min_stride_wqe_size);
+ MLX5_ASSERT(log_stride_wqe_size >= config->mprq.log_min_stride_wqe_size);
if (desc <= RTE_BIT32(*actual_log_stride_num))
goto unsupport;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.358195316 +0000
+++ 0079-net-mlx5-fix-MPRQ-WQE-size-assertion.patch 2022-02-21 15:22:44.171704306 +0000
@@ -1 +1 @@
-From 728b6447e766fc0aaf59e888635d62d54e77a528 Mon Sep 17 00:00:00 2001
+From 85d9e45c32ee046eea992a0cf57d1c8efcc5a144 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 728b6447e766fc0aaf59e888635d62d54e77a528 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/nfp: remove duplicated check when setting MAC address' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (77 preceding siblings ...)
2022-02-21 15:34 ` patch 'net/mlx5: fix MPRQ WQE size assertion' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'net/nfp: remove useless range checks' " Kevin Traynor
` (115 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Maxime Gouin; +Cc: Olivier Matz, Kevin Traynor, Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/23c2f685984482646e7abead5ea13ba099eec814
Thanks.
Kevin
---
From 23c2f685984482646e7abead5ea13ba099eec814 Mon Sep 17 00:00:00 2001
From: Maxime Gouin <maxime.gouin@6wind.com>
Date: Wed, 5 Jan 2022 11:32:02 +0100
Subject: [PATCH] net/nfp: remove duplicated check when setting MAC address
[ upstream commit 9e2cf57e2969a7248c1dbfb2e0c6d5c185b8addf ]
Reported by code analysis tool C++test (version 10.4):
> /build/dpdk-20.11/drivers/net/nfp/nfp_net.c
> 546 Conditions "(hw->ctrl &NFP_NET_CFG_CTRL_ENABLE) &&
!! (hw->cap &NFP_NET_CFG_C" is always evaluated to false
> 547 Condition "! (hw->cap &NFP_NET_CFG_C" is always evaluated to false
The previous "if" checks exactly the same condition. Removal of duplicate
code.
Fixes: 2fe669f4bcd2 ("net/nfp: support MAC address change")
Signed-off-by: Maxime Gouin <maxime.gouin@6wind.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
drivers/net/nfp/nfp_common.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/net/nfp/nfp_common.c b/drivers/net/nfp/nfp_common.c
index f8978e803a..b26770dbfb 100644
--- a/drivers/net/nfp/nfp_common.c
+++ b/drivers/net/nfp/nfp_common.c
@@ -281,8 +281,4 @@ nfp_set_mac_addr(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr)
}
- if ((hw->ctrl & NFP_NET_CFG_CTRL_ENABLE) &&
- !(hw->cap & NFP_NET_CFG_CTRL_LIVE_ADDR))
- return -EBUSY;
-
/* Writing new MAC to the specific port BAR address */
nfp_net_write_mac(hw, (uint8_t *)mac_addr);
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.378974795 +0000
+++ 0080-net-nfp-remove-duplicated-check-when-setting-MAC-add.patch 2022-02-21 15:22:44.172704308 +0000
@@ -1 +1 @@
-From 9e2cf57e2969a7248c1dbfb2e0c6d5c185b8addf Mon Sep 17 00:00:00 2001
+From 23c2f685984482646e7abead5ea13ba099eec814 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9e2cf57e2969a7248c1dbfb2e0c6d5c185b8addf ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/nfp: remove useless range checks' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (78 preceding siblings ...)
2022-02-21 15:34 ` patch 'net/nfp: remove duplicated check when setting MAC address' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'common/cnxk: fix shift offset for TL3 length disable' " Kevin Traynor
` (114 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Maxime Gouin; +Cc: Olivier Matz, Kevin Traynor, Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/41569f9debc999abc530b92542ca829b27fb8c8e
Thanks.
Kevin
---
From 41569f9debc999abc530b92542ca829b27fb8c8e Mon Sep 17 00:00:00 2001
From: Maxime Gouin <maxime.gouin@6wind.com>
Date: Wed, 5 Jan 2022 11:32:03 +0100
Subject: [PATCH] net/nfp: remove useless range checks
[ upstream commit a52c79642ab4296763189dd8efadbb679d32c9a0 ]
Reported by code analysis tool C++test (version 10.4):
> /build/dpdk-20.11/drivers/net/nfp/nfpcore/nfp_target.h
> 375 Condition "island < 1" is always evaluated to false
> 415 Condition "island < 1" is always evaluated to false
> 547 Condition "target < 0" is always evaluated to false
All of these conditions have the same error. They call
NFP_CPP_ID_ISLAND_of or NFP_CPP_ID_TARGET_of which return a uint8_t and
put the result in "island" or "target" which are integers. These
variables can only contain values between 0 and 255.
Fixes: c7e9729da6b5 ("net/nfp: support CPP")
Signed-off-by: Maxime Gouin <maxime.gouin@6wind.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
drivers/net/nfp/nfpcore/nfp_target.h | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/drivers/net/nfp/nfpcore/nfp_target.h b/drivers/net/nfp/nfpcore/nfp_target.h
index 2884a0034f..e8dcc9ad1e 100644
--- a/drivers/net/nfp/nfpcore/nfp_target.h
+++ b/drivers/net/nfp/nfpcore/nfp_target.h
@@ -38,5 +38,5 @@ static inline int
target_rw(uint32_t cpp_id, int pp, int start, int len)
{
- int island = NFP_CPP_ID_ISLAND_of(cpp_id);
+ uint8_t island = NFP_CPP_ID_ISLAND_of(cpp_id);
if (island && (island < start || island > (start + len)))
@@ -118,5 +118,5 @@ static inline int
nfp6000_nbi(uint32_t cpp_id, uint64_t address)
{
- int island = NFP_CPP_ID_ISLAND_of(cpp_id);
+ uint8_t island = NFP_CPP_ID_ISLAND_of(cpp_id);
uint64_t rel_addr = address & 0x3fFFFF;
@@ -282,5 +282,5 @@ nfp6000_mu(uint32_t cpp_id, uint64_t address)
{
int pp;
- int island = NFP_CPP_ID_ISLAND_of(cpp_id);
+ uint8_t island = NFP_CPP_ID_ISLAND_of(cpp_id);
if (island == 0) {
@@ -317,5 +317,5 @@ static inline int
nfp6000_ila(uint32_t cpp_id)
{
- int island = NFP_CPP_ID_ISLAND_of(cpp_id);
+ uint8_t island = NFP_CPP_ID_ISLAND_of(cpp_id);
if (island && (island < 48 || island > 51))
@@ -337,5 +337,5 @@ static inline int
nfp6000_pci(uint32_t cpp_id)
{
- int island = NFP_CPP_ID_ISLAND_of(cpp_id);
+ uint8_t island = NFP_CPP_ID_ISLAND_of(cpp_id);
if (island && (island < 4 || island > 7))
@@ -355,5 +355,5 @@ static inline int
nfp6000_crypto(uint32_t cpp_id)
{
- int island = NFP_CPP_ID_ISLAND_of(cpp_id);
+ uint8_t island = NFP_CPP_ID_ISLAND_of(cpp_id);
if (island && (island < 12 || island > 15))
@@ -371,7 +371,7 @@ static inline int
nfp6000_cap_xpb(uint32_t cpp_id)
{
- int island = NFP_CPP_ID_ISLAND_of(cpp_id);
+ uint8_t island = NFP_CPP_ID_ISLAND_of(cpp_id);
- if (island && (island < 1 || island > 63))
+ if (island > 63)
return NFP_ERRNO(EINVAL);
@@ -411,7 +411,7 @@ static inline int
nfp6000_cls(uint32_t cpp_id)
{
- int island = NFP_CPP_ID_ISLAND_of(cpp_id);
+ uint8_t island = NFP_CPP_ID_ISLAND_of(cpp_id);
- if (island && (island < 1 || island > 63))
+ if (island > 63)
return NFP_ERRNO(EINVAL);
@@ -541,9 +541,9 @@ nfp_target_cpp(uint32_t cpp_island_id, uint64_t cpp_island_address,
{
int err;
- int island = NFP_CPP_ID_ISLAND_of(cpp_island_id);
- int target = NFP_CPP_ID_TARGET_of(cpp_island_id);
+ uint8_t island = NFP_CPP_ID_ISLAND_of(cpp_island_id);
+ uint8_t target = NFP_CPP_ID_TARGET_of(cpp_island_id);
uint32_t imb;
- if (target < 0 || target >= 16)
+ if (target >= 16)
return NFP_ERRNO(EINVAL);
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.397899397 +0000
+++ 0081-net-nfp-remove-useless-range-checks.patch 2022-02-21 15:22:44.172704308 +0000
@@ -1 +1 @@
-From a52c79642ab4296763189dd8efadbb679d32c9a0 Mon Sep 17 00:00:00 2001
+From 41569f9debc999abc530b92542ca829b27fb8c8e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a52c79642ab4296763189dd8efadbb679d32c9a0 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'common/cnxk: fix shift offset for TL3 length disable' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (79 preceding siblings ...)
2022-02-21 15:34 ` patch 'net/nfp: remove useless range checks' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'common/cnxk: fix byte order of frag sizes and infos' " Kevin Traynor
` (113 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Nithin Dabilpuram; +Cc: Satha Rao, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/5deff57b9dcc77f043ef1b784be3b0d5b83de954
Thanks.
Kevin
---
From 5deff57b9dcc77f043ef1b784be3b0d5b83de954 Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <ndabilpuram@marvell.com>
Date: Fri, 21 Jan 2022 17:34:15 +0530
Subject: [PATCH] common/cnxk: fix shift offset for TL3 length disable
[ upstream commit 132dac7536e9bb2be9d9edabc1752dca7b25279a ]
Fix shift offset for length disable flag in NIXX_AF_TL3X_SHAPE
register to be 24 instead of zero similar to other level SHAPE
registers. Also mask unused bits in adjust value.
Fixes: 0885429c3028 ("common/cnxk: add NIX TM hierarchy enable/disable")
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Satha Rao <skoteshwar@marvell.com>
---
drivers/common/cnxk/roc_nix_tm_utils.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/common/cnxk/roc_nix_tm_utils.c b/drivers/common/cnxk/roc_nix_tm_utils.c
index 543adf9e56..9e80c2a5fe 100644
--- a/drivers/common/cnxk/roc_nix_tm_utils.c
+++ b/drivers/common/cnxk/roc_nix_tm_utils.c
@@ -643,4 +643,5 @@ nix_tm_shaper_reg_prep(struct nix_tm_node *node,
adjust = profile->pkt_len_adj;
+ adjust &= 0x1FF;
plt_tm_dbg("Shaper config node %s(%u) lvl %u id %u, "
"pir %" PRIu64 "(%" PRIu64 "B),"
@@ -709,5 +710,5 @@ nix_tm_shaper_reg_prep(struct nix_tm_node *node,
reg[k] = NIX_AF_TL3X_SHAPE(schq);
regval[k] = (adjust | (uint64_t)node->red_algo << 9 |
- (uint64_t)node->pkt_mode);
+ (uint64_t)node->pkt_mode << 24);
k++;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.417349619 +0000
+++ 0082-common-cnxk-fix-shift-offset-for-TL3-length-disable.patch 2022-02-21 15:22:44.173704310 +0000
@@ -1 +1 @@
-From 132dac7536e9bb2be9d9edabc1752dca7b25279a Mon Sep 17 00:00:00 2001
+From 5deff57b9dcc77f043ef1b784be3b0d5b83de954 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 132dac7536e9bb2be9d9edabc1752dca7b25279a ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'common/cnxk: fix byte order of frag sizes and infos' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (80 preceding siblings ...)
2022-02-21 15:34 ` patch 'common/cnxk: fix shift offset for TL3 length disable' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'common/cnxk: reset stale values on error debug registers' " Kevin Traynor
` (112 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Nithin Dabilpuram; +Cc: Vidya Sagar Velumuri, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/285183e606315bac5ec468e9249a21debb64b661
Thanks.
Kevin
---
From 285183e606315bac5ec468e9249a21debb64b661 Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <ndabilpuram@marvell.com>
Date: Fri, 21 Jan 2022 17:34:17 +0530
Subject: [PATCH] common/cnxk: fix byte order of frag sizes and infos
[ upstream commit 83e275519c06a3c495db043197f9a174ae10ced6 ]
Change the byte order of frag sizes and infos to match HW
implementation.
Fixes: 64a73ebd87bd ("common/cnxk: add CPT hardware definitions")
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
---
drivers/common/cnxk/hw/cpt.h | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/drivers/common/cnxk/hw/cpt.h b/drivers/common/cnxk/hw/cpt.h
index 919f8420f0..3ade4dc0c9 100644
--- a/drivers/common/cnxk/hw/cpt.h
+++ b/drivers/common/cnxk/hw/cpt.h
@@ -287,8 +287,9 @@ struct cpt_frag_info_s {
uint64_t u64;
struct {
- union cpt_frag_info f3;
- union cpt_frag_info f2;
- union cpt_frag_info f1;
+ /* CPT HW swaps each 8B word implicitly */
union cpt_frag_info f0;
+ union cpt_frag_info f1;
+ union cpt_frag_info f2;
+ union cpt_frag_info f3;
};
} w0;
@@ -298,8 +299,9 @@ struct cpt_frag_info_s {
uint64_t u64;
struct {
- uint16_t frag_size3;
- uint16_t frag_size2;
- uint16_t frag_size1;
+ /* CPT HW swaps each 8B word implicitly */
uint16_t frag_size0;
+ uint16_t frag_size1;
+ uint16_t frag_size2;
+ uint16_t frag_size3;
};
} w1;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.436498557 +0000
+++ 0083-common-cnxk-fix-byte-order-of-frag-sizes-and-infos.patch 2022-02-21 15:22:44.173704310 +0000
@@ -1 +1 @@
-From 83e275519c06a3c495db043197f9a174ae10ced6 Mon Sep 17 00:00:00 2001
+From 285183e606315bac5ec468e9249a21debb64b661 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 83e275519c06a3c495db043197f9a174ae10ced6 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 4d9c89697b..8fbba2c2a4 100644
+index 919f8420f0..3ade4dc0c9 100644
@@ -22 +23 @@
-@@ -302,8 +302,9 @@ struct cpt_frag_info_s {
+@@ -287,8 +287,9 @@ struct cpt_frag_info_s {
@@ -35 +36 @@
-@@ -313,8 +314,9 @@ struct cpt_frag_info_s {
+@@ -298,8 +299,9 @@ struct cpt_frag_info_s {
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'common/cnxk: reset stale values on error debug registers' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (81 preceding siblings ...)
2022-02-21 15:34 ` patch 'common/cnxk: fix byte order of frag sizes and infos' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'common/cnxk: always use single interrupt ID with NIX' " Kevin Traynor
` (111 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Harman Kalra; +Cc: Jerin Jacob, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/cfcdf00068b3c0740908af4ae1e5f7af8fc8a90e
Thanks.
Kevin
---
From cfcdf00068b3c0740908af4ae1e5f7af8fc8a90e Mon Sep 17 00:00:00 2001
From: Harman Kalra <hkalra@marvell.com>
Date: Fri, 21 Jan 2022 17:34:18 +0530
Subject: [PATCH] common/cnxk: reset stale values on error debug registers
[ upstream commit 9b7198ea6d2c9b141b92e11c296f156678e1a781 ]
LF's error debug registers like NIX_LF_SQ_OP_ERR_DBG,
NIX_LF_MNQ_ERR_DBG, NIX_LF_SEND_ERR_DBG captures debug
info for an error detected during LMT operation or meta
enqueue or after meta enqueue granted respectively. HW
sets a valid bit when info is captured and SW is expected
to clear this valid bit by writing 1, else these registers
will show stale values of first interrupt when occurred and
will never update with subsequent interrupts.
Fixes: f6d567b03d28 ("common/cnxk: support NIX IRQ")
Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
drivers/common/cnxk/roc_nix_irq.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/common/cnxk/roc_nix_irq.c b/drivers/common/cnxk/roc_nix_irq.c
index a5cd9d4b02..7dcd533ea9 100644
--- a/drivers/common/cnxk/roc_nix_irq.c
+++ b/drivers/common/cnxk/roc_nix_irq.c
@@ -203,7 +203,10 @@ nix_lf_sq_debug_reg(struct nix *nix, uint32_t off)
reg = plt_read64(nix->base + off);
- if (reg & BIT_ULL(44))
+ if (reg & BIT_ULL(44)) {
plt_err("SQ=%d err_code=0x%x", (int)((reg >> 8) & 0xfffff),
(uint8_t)(reg & 0xff));
+ /* Clear valid bit */
+ plt_write64(BIT_ULL(44), nix->base + off);
+ }
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.455044239 +0000
+++ 0084-common-cnxk-reset-stale-values-on-error-debug-regist.patch 2022-02-21 15:22:44.174704312 +0000
@@ -1 +1 @@
-From 9b7198ea6d2c9b141b92e11c296f156678e1a781 Mon Sep 17 00:00:00 2001
+From cfcdf00068b3c0740908af4ae1e5f7af8fc8a90e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9b7198ea6d2c9b141b92e11c296f156678e1a781 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'common/cnxk: always use single interrupt ID with NIX' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (82 preceding siblings ...)
2022-02-21 15:34 ` patch 'common/cnxk: reset stale values on error debug registers' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'common/cnxk: fix null pointer dereferences' " Kevin Traynor
` (110 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Harman Kalra; +Cc: Jerin Jacob, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/1349f9e56866ed4fff50b54167a6208d1210c5c6
Thanks.
Kevin
---
From 1349f9e56866ed4fff50b54167a6208d1210c5c6 Mon Sep 17 00:00:00 2001
From: Harman Kalra <hkalra@marvell.com>
Date: Fri, 21 Jan 2022 17:34:19 +0530
Subject: [PATCH] common/cnxk: always use single interrupt ID with NIX
[ upstream commit 89d3557c8de36a40266ddfbfbaa73adcda97c8f4 ]
An errata exists whereby, in certain cases NIX may use an
incorrect QINT_IDX for SQ interrupts. As a result, the
interrupt may not be delivered to software, or may not be
associated with the correct SQ.
When NIX uses an incorrect QINT_IDX :
1. NIX_LF_QINT(0..63)_CNT[COUNT] will be incremented for
incorrect QINT.
2. NIX_LF_QINT(0..63)_INT[INTR] will be set for incorrect
QINT.
Fixes: ae06070901ab ("common/cnxk: add NIX Tx queue management API")
Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
drivers/common/cnxk/roc_nix_queue.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/drivers/common/cnxk/roc_nix_queue.c b/drivers/common/cnxk/roc_nix_queue.c
index d5f6813e69..e631e10e04 100644
--- a/drivers/common/cnxk/roc_nix_queue.c
+++ b/drivers/common/cnxk/roc_nix_queue.c
@@ -696,5 +696,9 @@ sq_cn9k_init(struct nix *nix, struct roc_nix_sq *sq, uint32_t rr_quantum,
/* Many to one reduction */
- aq->sq.qint_idx = sq->qid % nix->qints;
+ /* Assigning QINT 0 to all the SQs, an errata exists where NIXTX can
+ * send incorrect QINT_IDX when reporting queue interrupt (QINT). This
+ * might result in software missing the interrupt.
+ */
+ aq->sq.qint_idx = 0;
}
@@ -795,6 +799,9 @@ sq_init(struct nix *nix, struct roc_nix_sq *sq, uint32_t rr_quantum,
aq->sq.sq_int_ena |= BIT(NIX_SQINT_MNQ_ERR);
- /* Many to one reduction */
- aq->sq.qint_idx = sq->qid % nix->qints;
+ /* Assigning QINT 0 to all the SQs, an errata exists where NIXTX can
+ * send incorrect QINT_IDX when reporting queue interrupt (QINT). This
+ * might result in software missing the interrupt.
+ */
+ aq->sq.qint_idx = 0;
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.474441547 +0000
+++ 0085-common-cnxk-always-use-single-interrupt-ID-with-NIX.patch 2022-02-21 15:22:44.174704312 +0000
@@ -1 +1 @@
-From 89d3557c8de36a40266ddfbfbaa73adcda97c8f4 Mon Sep 17 00:00:00 2001
+From 1349f9e56866ed4fff50b54167a6208d1210c5c6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 89d3557c8de36a40266ddfbfbaa73adcda97c8f4 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index ab578496d1..e8b42ed6be 100644
+index d5f6813e69..e631e10e04 100644
@@ -29 +30 @@
-@@ -706,5 +706,9 @@ sq_cn9k_init(struct nix *nix, struct roc_nix_sq *sq, uint32_t rr_quantum,
+@@ -696,5 +696,9 @@ sq_cn9k_init(struct nix *nix, struct roc_nix_sq *sq, uint32_t rr_quantum,
@@ -40 +41 @@
-@@ -805,6 +809,9 @@ sq_init(struct nix *nix, struct roc_nix_sq *sq, uint32_t rr_quantum,
+@@ -795,6 +799,9 @@ sq_init(struct nix *nix, struct roc_nix_sq *sq, uint32_t rr_quantum,
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'common/cnxk: fix null pointer dereferences' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (83 preceding siblings ...)
2022-02-21 15:34 ` patch 'common/cnxk: always use single interrupt ID with NIX' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'common/cnxk: fix uninitialized variables' " Kevin Traynor
` (109 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Nithin Dabilpuram; +Cc: Gowrishankar Muthukrishnan, Jerin Jacob, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/38f3a00894a1c056bf2b4e0e13395884c94fc65d
Thanks.
Kevin
---
From 38f3a00894a1c056bf2b4e0e13395884c94fc65d Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <ndabilpuram@marvell.com>
Date: Fri, 21 Jan 2022 17:34:20 +0530
Subject: [PATCH] common/cnxk: fix null pointer dereferences
[ upstream commit da718c1919bd49faa83ded38b0549500c7e77f91 ]
Fix null pointer dereference issues reported by
klockwork(static analysis tool).
Fixes: c045d2e5cbbc ("common/cnxk: add CPT configuration")
Fixes: 585bb3e538f9 ("common/cnxk: add VF support to base device class")
Fixes: 665ff1ccc2c4 ("common/cnxk: add base device class")
Fixes: da57d4589a6f ("common/cnxk: support NIX flow control")
Fixes: 218d022e1f3f ("common/cnxk: support NIX stats")
Fixes: 4efa6e82fe43 ("common/cnxk: support NIX extended stats")
Fixes: 0885429c3028 ("common/cnxk: add NIX TM hierarchy enable/disable")
Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
drivers/common/cnxk/roc_cpt.c | 3 ++
drivers/common/cnxk/roc_dev.c | 19 +++++++++
drivers/common/cnxk/roc_nix_debug.c | 6 +++
drivers/common/cnxk/roc_nix_fc.c | 12 ++++++
drivers/common/cnxk/roc_nix_queue.c | 61 +++++++++++++++++++++++++++--
drivers/common/cnxk/roc_nix_stats.c | 18 +++++++++
drivers/common/cnxk/roc_nix_tm.c | 6 +++
7 files changed, 121 insertions(+), 4 deletions(-)
diff --git a/drivers/common/cnxk/roc_cpt.c b/drivers/common/cnxk/roc_cpt.c
index 8f8e6d3821..84cc5f05d7 100644
--- a/drivers/common/cnxk/roc_cpt.c
+++ b/drivers/common/cnxk/roc_cpt.c
@@ -386,4 +386,7 @@ cpt_lfs_alloc(struct dev *dev, uint8_t eng_grpmsk, uint8_t blkaddr,
req = mbox_alloc_msg_cpt_lf_alloc(mbox);
+ if (!req)
+ return -ENOSPC;
+
req->nix_pf_func = 0;
if (inl_dev_sso && nix_inl_dev_pffunc_get())
diff --git a/drivers/common/cnxk/roc_dev.c b/drivers/common/cnxk/roc_dev.c
index 926a916e44..0ac50cab59 100644
--- a/drivers/common/cnxk/roc_dev.c
+++ b/drivers/common/cnxk/roc_dev.c
@@ -153,4 +153,9 @@ af_pf_wait_msg(struct dev *dev, uint16_t vf, int num_msg)
size = PLT_ALIGN(size, MBOX_MSG_ALIGN);
rsp = mbox_alloc_msg(&dev->mbox_vfpf, vf, size);
+ if (!rsp) {
+ plt_err("Failed to reserve VF%d message", vf);
+ continue;
+ }
+
mbox_rsp_init(msg->id, rsp);
@@ -237,4 +242,10 @@ vf_pf_process_msgs(struct dev *dev, uint16_t vf)
rsp = (struct ready_msg_rsp *)mbox_alloc_msg(
mbox, vf, sizeof(*rsp));
+ if (!rsp) {
+ plt_err("Failed to alloc VF%d READY message",
+ vf);
+ continue;
+ }
+
mbox_rsp_init(msg->id, rsp);
@@ -989,4 +1000,7 @@ dev_setup_shared_lmt_region(struct mbox *mbox, bool valid_iova, uint64_t iova)
req = mbox_alloc_msg_lmtst_tbl_setup(mbox);
+ if (!req)
+ return -ENOSPC;
+
/* This pcifunc is defined with primary pcifunc whose LMT address
* will be shared. If call contains valid IOVA, following pcifunc
@@ -1062,4 +1076,9 @@ dev_lmt_setup(struct dev *dev)
if (!dev->disable_shared_lmt) {
idev = idev_get_cfg();
+ if (!idev) {
+ errno = EFAULT;
+ goto free;
+ }
+
if (!__atomic_load_n(&idev->lmt_pf_func, __ATOMIC_ACQUIRE)) {
idev->lmt_base_addr = dev->lmt_base;
diff --git a/drivers/common/cnxk/roc_nix_debug.c b/drivers/common/cnxk/roc_nix_debug.c
index 266935a6c5..7dc54f3845 100644
--- a/drivers/common/cnxk/roc_nix_debug.c
+++ b/drivers/common/cnxk/roc_nix_debug.c
@@ -324,4 +324,7 @@ nix_q_ctx_get(struct dev *dev, uint8_t ctype, uint16_t qid, __io void **ctx_p)
aq = mbox_alloc_msg_nix_aq_enq(mbox);
+ if (!aq)
+ return -ENOSPC;
+
aq->qidx = qid;
aq->ctype = ctype;
@@ -342,4 +345,7 @@ nix_q_ctx_get(struct dev *dev, uint8_t ctype, uint16_t qid, __io void **ctx_p)
aq = mbox_alloc_msg_nix_cn10k_aq_enq(mbox);
+ if (!aq)
+ return -ENOSPC;
+
aq->qidx = qid;
aq->ctype = ctype;
diff --git a/drivers/common/cnxk/roc_nix_fc.c b/drivers/common/cnxk/roc_nix_fc.c
index ca29cd2bf9..d31137188e 100644
--- a/drivers/common/cnxk/roc_nix_fc.c
+++ b/drivers/common/cnxk/roc_nix_fc.c
@@ -114,4 +114,7 @@ nix_fc_cq_config_get(struct roc_nix *roc_nix, struct roc_nix_fc_cfg *fc_cfg)
aq = mbox_alloc_msg_nix_aq_enq(mbox);
+ if (!aq)
+ return -ENOSPC;
+
aq->qidx = fc_cfg->cq_cfg.rq;
aq->ctype = NIX_AQ_CTYPE_CQ;
@@ -121,4 +124,7 @@ nix_fc_cq_config_get(struct roc_nix *roc_nix, struct roc_nix_fc_cfg *fc_cfg)
aq = mbox_alloc_msg_nix_cn10k_aq_enq(mbox);
+ if (!aq)
+ return -ENOSPC;
+
aq->qidx = fc_cfg->cq_cfg.rq;
aq->ctype = NIX_AQ_CTYPE_CQ;
@@ -148,4 +154,7 @@ nix_fc_cq_config_set(struct roc_nix *roc_nix, struct roc_nix_fc_cfg *fc_cfg)
aq = mbox_alloc_msg_nix_aq_enq(mbox);
+ if (!aq)
+ return -ENOSPC;
+
aq->qidx = fc_cfg->cq_cfg.rq;
aq->ctype = NIX_AQ_CTYPE_CQ;
@@ -165,4 +174,7 @@ nix_fc_cq_config_set(struct roc_nix *roc_nix, struct roc_nix_fc_cfg *fc_cfg)
aq = mbox_alloc_msg_nix_cn10k_aq_enq(mbox);
+ if (!aq)
+ return -ENOSPC;
+
aq->qidx = fc_cfg->cq_cfg.rq;
aq->ctype = NIX_AQ_CTYPE_CQ;
diff --git a/drivers/common/cnxk/roc_nix_queue.c b/drivers/common/cnxk/roc_nix_queue.c
index e631e10e04..e79a2d63e2 100644
--- a/drivers/common/cnxk/roc_nix_queue.c
+++ b/drivers/common/cnxk/roc_nix_queue.c
@@ -55,4 +55,7 @@ nix_rq_ena_dis(struct dev *dev, struct roc_nix_rq *rq, bool enable)
aq = mbox_alloc_msg_nix_aq_enq(mbox);
+ if (!aq)
+ return -ENOSPC;
+
aq->qidx = rq->qid;
aq->ctype = NIX_AQ_CTYPE_RQ;
@@ -65,4 +68,7 @@ nix_rq_ena_dis(struct dev *dev, struct roc_nix_rq *rq, bool enable)
aq = mbox_alloc_msg_nix_cn10k_aq_enq(mbox);
+ if (!aq)
+ return -ENOSPC;
+
aq->qidx = rq->qid;
aq->ctype = NIX_AQ_CTYPE_RQ;
@@ -96,4 +102,7 @@ nix_rq_cn9k_cfg(struct dev *dev, struct roc_nix_rq *rq, uint16_t qints,
aq = mbox_alloc_msg_nix_aq_enq(mbox);
+ if (!aq)
+ return -ENOSPC;
+
aq->qidx = rq->qid;
aq->ctype = NIX_AQ_CTYPE_RQ;
@@ -211,4 +220,7 @@ nix_rq_cfg(struct dev *dev, struct roc_nix_rq *rq, uint16_t qints, bool cfg,
aq = mbox_alloc_msg_nix_cn10k_aq_enq(mbox);
+ if (!aq)
+ return -ENOSPC;
+
aq->qidx = rq->qid;
aq->ctype = NIX_AQ_CTYPE_RQ;
@@ -479,4 +491,7 @@ roc_nix_cq_init(struct roc_nix *roc_nix, struct roc_nix_cq *cq)
aq = mbox_alloc_msg_nix_aq_enq(mbox);
+ if (!aq)
+ return -ENOSPC;
+
aq->qidx = cq->qid;
aq->ctype = NIX_AQ_CTYPE_CQ;
@@ -487,4 +502,7 @@ roc_nix_cq_init(struct roc_nix *roc_nix, struct roc_nix_cq *cq)
aq = mbox_alloc_msg_nix_cn10k_aq_enq(mbox);
+ if (!aq)
+ return -ENOSPC;
+
aq->qidx = cq->qid;
aq->ctype = NIX_AQ_CTYPE_CQ;
@@ -563,4 +581,7 @@ roc_nix_cq_fini(struct roc_nix_cq *cq)
aq = mbox_alloc_msg_nix_aq_enq(mbox);
+ if (!aq)
+ return -ENOSPC;
+
aq->qidx = cq->qid;
aq->ctype = NIX_AQ_CTYPE_CQ;
@@ -574,4 +595,7 @@ roc_nix_cq_fini(struct roc_nix_cq *cq)
aq = mbox_alloc_msg_nix_cn10k_aq_enq(mbox);
+ if (!aq)
+ return -ENOSPC;
+
aq->qidx = cq->qid;
aq->ctype = NIX_AQ_CTYPE_CQ;
@@ -665,5 +689,5 @@ fail:
}
-static void
+static int
sq_cn9k_init(struct nix *nix, struct roc_nix_sq *sq, uint32_t rr_quantum,
uint16_t smq)
@@ -673,4 +697,7 @@ sq_cn9k_init(struct nix *nix, struct roc_nix_sq *sq, uint32_t rr_quantum,
aq = mbox_alloc_msg_nix_aq_enq(mbox);
+ if (!aq)
+ return -ENOSPC;
+
aq->qidx = sq->qid;
aq->ctype = NIX_AQ_CTYPE_SQ;
@@ -701,4 +728,5 @@ sq_cn9k_init(struct nix *nix, struct roc_nix_sq *sq, uint32_t rr_quantum,
*/
aq->sq.qint_idx = 0;
+ return 0;
}
@@ -714,4 +742,7 @@ sq_cn9k_fini(struct nix *nix, struct roc_nix_sq *sq)
aq = mbox_alloc_msg_nix_aq_enq(mbox);
+ if (!aq)
+ return -ENOSPC;
+
aq->qidx = sq->qid;
aq->ctype = NIX_AQ_CTYPE_SQ;
@@ -727,4 +758,7 @@ sq_cn9k_fini(struct nix *nix, struct roc_nix_sq *sq)
/* Disable sq */
aq = mbox_alloc_msg_nix_aq_enq(mbox);
+ if (!aq)
+ return -ENOSPC;
+
aq->qidx = sq->qid;
aq->ctype = NIX_AQ_CTYPE_SQ;
@@ -738,4 +772,7 @@ sq_cn9k_fini(struct nix *nix, struct roc_nix_sq *sq)
/* Read SQ and free sqb's */
aq = mbox_alloc_msg_nix_aq_enq(mbox);
+ if (!aq)
+ return -ENOSPC;
+
aq->qidx = sq->qid;
aq->ctype = NIX_AQ_CTYPE_SQ;
@@ -769,5 +806,5 @@ sq_cn9k_fini(struct nix *nix, struct roc_nix_sq *sq)
}
-static void
+static int
sq_init(struct nix *nix, struct roc_nix_sq *sq, uint32_t rr_quantum,
uint16_t smq)
@@ -777,4 +814,7 @@ sq_init(struct nix *nix, struct roc_nix_sq *sq, uint32_t rr_quantum,
aq = mbox_alloc_msg_nix_cn10k_aq_enq(mbox);
+ if (!aq)
+ return -ENOSPC;
+
aq->qidx = sq->qid;
aq->ctype = NIX_AQ_CTYPE_SQ;
@@ -804,4 +844,5 @@ sq_init(struct nix *nix, struct roc_nix_sq *sq, uint32_t rr_quantum,
*/
aq->sq.qint_idx = 0;
+ return 0;
}
@@ -817,4 +858,7 @@ sq_fini(struct nix *nix, struct roc_nix_sq *sq)
aq = mbox_alloc_msg_nix_cn10k_aq_enq(mbox);
+ if (!aq)
+ return -ENOSPC;
+
aq->qidx = sq->qid;
aq->ctype = NIX_AQ_CTYPE_SQ;
@@ -830,4 +874,7 @@ sq_fini(struct nix *nix, struct roc_nix_sq *sq)
/* Disable sq */
aq = mbox_alloc_msg_nix_cn10k_aq_enq(mbox);
+ if (!aq)
+ return -ENOSPC;
+
aq->qidx = sq->qid;
aq->ctype = NIX_AQ_CTYPE_SQ;
@@ -841,4 +888,7 @@ sq_fini(struct nix *nix, struct roc_nix_sq *sq)
/* Read SQ and free sqb's */
aq = mbox_alloc_msg_nix_cn10k_aq_enq(mbox);
+ if (!aq)
+ return -ENOSPC;
+
aq->qidx = sq->qid;
aq->ctype = NIX_AQ_CTYPE_SQ;
@@ -911,7 +961,10 @@ roc_nix_sq_init(struct roc_nix *roc_nix, struct roc_nix_sq *sq)
/* Init SQ context */
if (roc_model_is_cn9k())
- sq_cn9k_init(nix, sq, rr_quantum, smq);
+ rc = sq_cn9k_init(nix, sq, rr_quantum, smq);
else
- sq_init(nix, sq, rr_quantum, smq);
+ rc = sq_init(nix, sq, rr_quantum, smq);
+
+ if (rc)
+ goto nomem;
rc = mbox_process(mbox);
diff --git a/drivers/common/cnxk/roc_nix_stats.c b/drivers/common/cnxk/roc_nix_stats.c
index c50c8fa629..756111fb1c 100644
--- a/drivers/common/cnxk/roc_nix_stats.c
+++ b/drivers/common/cnxk/roc_nix_stats.c
@@ -125,4 +125,7 @@ nix_stat_rx_queue_reset(struct nix *nix, uint16_t qid)
aq = mbox_alloc_msg_nix_aq_enq(mbox);
+ if (!aq)
+ return -ENOSPC;
+
aq->qidx = qid;
aq->ctype = NIX_AQ_CTYPE_RQ;
@@ -144,4 +147,7 @@ nix_stat_rx_queue_reset(struct nix *nix, uint16_t qid)
aq = mbox_alloc_msg_nix_cn10k_aq_enq(mbox);
+ if (!aq)
+ return -ENOSPC;
+
aq->qidx = qid;
aq->ctype = NIX_AQ_CTYPE_RQ;
@@ -175,4 +181,7 @@ nix_stat_tx_queue_reset(struct nix *nix, uint16_t qid)
aq = mbox_alloc_msg_nix_aq_enq(mbox);
+ if (!aq)
+ return -ENOSPC;
+
aq->qidx = qid;
aq->ctype = NIX_AQ_CTYPE_SQ;
@@ -191,4 +200,7 @@ nix_stat_tx_queue_reset(struct nix *nix, uint16_t qid)
aq = mbox_alloc_msg_nix_cn10k_aq_enq(mbox);
+ if (!aq)
+ return -ENOSPC;
+
aq->qidx = qid;
aq->ctype = NIX_AQ_CTYPE_SQ;
@@ -296,4 +308,7 @@ roc_nix_xstats_get(struct roc_nix *roc_nix, struct roc_nix_xstat *xstats,
if (roc_model_is_cn9k()) {
req = mbox_alloc_msg_cgx_stats(mbox);
+ if (!req)
+ return -ENOSPC;
+
req->hdr.pcifunc = roc_nix_get_pf_func(roc_nix);
@@ -317,4 +332,7 @@ roc_nix_xstats_get(struct roc_nix *roc_nix, struct roc_nix_xstat *xstats,
} else {
req = mbox_alloc_msg_rpm_stats(mbox);
+ if (!req)
+ return -ENOSPC;
+
req->hdr.pcifunc = roc_nix_get_pf_func(roc_nix);
diff --git a/drivers/common/cnxk/roc_nix_tm.c b/drivers/common/cnxk/roc_nix_tm.c
index b3d8ebd3c2..21533b5cae 100644
--- a/drivers/common/cnxk/roc_nix_tm.c
+++ b/drivers/common/cnxk/roc_nix_tm.c
@@ -767,4 +767,7 @@ nix_tm_sq_sched_conf(struct nix *nix, struct nix_tm_node *node,
aq = mbox_alloc_msg_nix_aq_enq(mbox);
+ if (!aq)
+ return -ENOSPC;
+
aq->qidx = qid;
aq->ctype = NIX_AQ_CTYPE_SQ;
@@ -782,4 +785,7 @@ nix_tm_sq_sched_conf(struct nix *nix, struct nix_tm_node *node,
aq = mbox_alloc_msg_nix_cn10k_aq_enq(mbox);
+ if (!aq)
+ return -ENOSPC;
+
aq->qidx = qid;
aq->ctype = NIX_AQ_CTYPE_SQ;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.493345834 +0000
+++ 0086-common-cnxk-fix-null-pointer-dereferences.patch 2022-02-21 15:22:44.178704321 +0000
@@ -1 +1 @@
-From da718c1919bd49faa83ded38b0549500c7e77f91 Mon Sep 17 00:00:00 2001
+From 38f3a00894a1c056bf2b4e0e13395884c94fc65d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit da718c1919bd49faa83ded38b0549500c7e77f91 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -32 +33 @@
-index 1bc7a29ef9..3f3d28196b 100644
+index 8f8e6d3821..84cc5f05d7 100644
@@ -87 +88 @@
-index 5886650d6e..583e2e43c8 100644
+index 266935a6c5..7dc54f3845 100644
@@ -143 +144 @@
-index e8b42ed6be..a283d96a01 100644
+index e631e10e04..e79a2d63e2 100644
@@ -210 +211 @@
-@@ -675,5 +699,5 @@ fail:
+@@ -665,5 +689,5 @@ fail:
@@ -217 +218 @@
-@@ -683,4 +707,7 @@ sq_cn9k_init(struct nix *nix, struct roc_nix_sq *sq, uint32_t rr_quantum,
+@@ -673,4 +697,7 @@ sq_cn9k_init(struct nix *nix, struct roc_nix_sq *sq, uint32_t rr_quantum,
@@ -225 +226 @@
-@@ -711,4 +738,5 @@ sq_cn9k_init(struct nix *nix, struct roc_nix_sq *sq, uint32_t rr_quantum,
+@@ -701,4 +728,5 @@ sq_cn9k_init(struct nix *nix, struct roc_nix_sq *sq, uint32_t rr_quantum,
@@ -231 +232 @@
-@@ -724,4 +752,7 @@ sq_cn9k_fini(struct nix *nix, struct roc_nix_sq *sq)
+@@ -714,4 +742,7 @@ sq_cn9k_fini(struct nix *nix, struct roc_nix_sq *sq)
@@ -239 +240 @@
-@@ -737,4 +768,7 @@ sq_cn9k_fini(struct nix *nix, struct roc_nix_sq *sq)
+@@ -727,4 +758,7 @@ sq_cn9k_fini(struct nix *nix, struct roc_nix_sq *sq)
@@ -247 +248 @@
-@@ -748,4 +782,7 @@ sq_cn9k_fini(struct nix *nix, struct roc_nix_sq *sq)
+@@ -738,4 +772,7 @@ sq_cn9k_fini(struct nix *nix, struct roc_nix_sq *sq)
@@ -255 +256 @@
-@@ -779,5 +816,5 @@ sq_cn9k_fini(struct nix *nix, struct roc_nix_sq *sq)
+@@ -769,5 +806,5 @@ sq_cn9k_fini(struct nix *nix, struct roc_nix_sq *sq)
@@ -262 +263 @@
-@@ -787,4 +824,7 @@ sq_init(struct nix *nix, struct roc_nix_sq *sq, uint32_t rr_quantum,
+@@ -777,4 +814,7 @@ sq_init(struct nix *nix, struct roc_nix_sq *sq, uint32_t rr_quantum,
@@ -270 +271 @@
-@@ -814,4 +854,5 @@ sq_init(struct nix *nix, struct roc_nix_sq *sq, uint32_t rr_quantum,
+@@ -804,4 +844,5 @@ sq_init(struct nix *nix, struct roc_nix_sq *sq, uint32_t rr_quantum,
@@ -276 +277 @@
-@@ -827,4 +868,7 @@ sq_fini(struct nix *nix, struct roc_nix_sq *sq)
+@@ -817,4 +858,7 @@ sq_fini(struct nix *nix, struct roc_nix_sq *sq)
@@ -284 +285 @@
-@@ -840,4 +884,7 @@ sq_fini(struct nix *nix, struct roc_nix_sq *sq)
+@@ -830,4 +874,7 @@ sq_fini(struct nix *nix, struct roc_nix_sq *sq)
@@ -292 +293 @@
-@@ -851,4 +898,7 @@ sq_fini(struct nix *nix, struct roc_nix_sq *sq)
+@@ -841,4 +888,7 @@ sq_fini(struct nix *nix, struct roc_nix_sq *sq)
@@ -300 +301 @@
-@@ -921,7 +971,10 @@ roc_nix_sq_init(struct roc_nix *roc_nix, struct roc_nix_sq *sq)
+@@ -911,7 +961,10 @@ roc_nix_sq_init(struct roc_nix *roc_nix, struct roc_nix_sq *sq)
@@ -366 +367 @@
-index fe9e83fe1e..3b38cc087b 100644
+index b3d8ebd3c2..21533b5cae 100644
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'common/cnxk: fix uninitialized variables' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (84 preceding siblings ...)
2022-02-21 15:34 ` patch 'common/cnxk: fix null pointer dereferences' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'common/cnxk: fix error checking' " Kevin Traynor
` (108 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Nithin Dabilpuram; +Cc: Gowrishankar Muthukrishnan, Jerin Jacob, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/2253ed93c3baf5674c869f91f74ec033cceb85f4
Thanks.
Kevin
---
From 2253ed93c3baf5674c869f91f74ec033cceb85f4 Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <ndabilpuram@marvell.com>
Date: Fri, 21 Jan 2022 17:34:21 +0530
Subject: [PATCH] common/cnxk: fix uninitialized variables
[ upstream commit a3b4864251ea8c77de1bbb7e2a1a570a253ce339 ]
Fix uninitialized variable issues reported by
klockwork(static analysis tool).
Fixes: ed135040f0ab ("common/cnxk: add CPT LF configuration")
Fixes: 585bb3e538f9 ("common/cnxk: add VF support to base device class")
Fixes: 58debb813a8d ("common/cnxk: enable TM to listen on Rx pause frames")
Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
drivers/common/cnxk/roc_cpt.c | 4 ++--
drivers/common/cnxk/roc_dev.c | 2 +-
drivers/common/cnxk/roc_nix_tm.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/common/cnxk/roc_cpt.c b/drivers/common/cnxk/roc_cpt.c
index 84cc5f05d7..0e2dc45ad8 100644
--- a/drivers/common/cnxk/roc_cpt.c
+++ b/drivers/common/cnxk/roc_cpt.c
@@ -816,7 +816,7 @@ void
roc_cpt_iq_disable(struct roc_cpt_lf *lf)
{
+ volatile union cpt_lf_q_grp_ptr grp_ptr = {.u = 0x0};
+ volatile union cpt_lf_inprog lf_inprog = {.u = 0x0};
union cpt_lf_ctl lf_ctl = {.u = 0x0};
- union cpt_lf_q_grp_ptr grp_ptr;
- union cpt_lf_inprog lf_inprog;
int timeout = 20;
int cnt;
diff --git a/drivers/common/cnxk/roc_dev.c b/drivers/common/cnxk/roc_dev.c
index 0ac50cab59..9a869698c4 100644
--- a/drivers/common/cnxk/roc_dev.c
+++ b/drivers/common/cnxk/roc_dev.c
@@ -58,5 +58,5 @@ pf_af_sync_msg(struct dev *dev, struct mbox_msghdr **rsp)
struct mbox_dev *mdev = &mbox->dev[0];
- volatile uint64_t int_status;
+ volatile uint64_t int_status = 0;
struct mbox_msghdr *msghdr;
uint64_t off;
diff --git a/drivers/common/cnxk/roc_nix_tm.c b/drivers/common/cnxk/roc_nix_tm.c
index 21533b5cae..ebb27a3106 100644
--- a/drivers/common/cnxk/roc_nix_tm.c
+++ b/drivers/common/cnxk/roc_nix_tm.c
@@ -425,5 +425,5 @@ nix_tm_bp_config_get(struct roc_nix *roc_nix, bool *is_enabled)
if (req) {
req->num_regs = k;
- rc = mbox_process(mbox);
+ rc = mbox_process_msg(mbox, (void **)&rsp);
if (rc)
goto err;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.516205459 +0000
+++ 0087-common-cnxk-fix-uninitialized-variables.patch 2022-02-21 15:22:44.180704326 +0000
@@ -1 +1 @@
-From a3b4864251ea8c77de1bbb7e2a1a570a253ce339 Mon Sep 17 00:00:00 2001
+From 2253ed93c3baf5674c869f91f74ec033cceb85f4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a3b4864251ea8c77de1bbb7e2a1a570a253ce339 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 3f3d28196b..89877d1b28 100644
+index 84cc5f05d7..0e2dc45ad8 100644
@@ -27 +28 @@
-@@ -818,7 +818,7 @@ void
+@@ -816,7 +816,7 @@ void
@@ -49 +50 @@
-index 3b38cc087b..a0448bec61 100644
+index 21533b5cae..ebb27a3106 100644
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'common/cnxk: fix error checking' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (85 preceding siblings ...)
2022-02-21 15:34 ` patch 'common/cnxk: fix uninitialized variables' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'ethdev: fix Rx queue telemetry memory leak on failure' " Kevin Traynor
` (107 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Weiguo Li; +Cc: Jerin Jacob, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/3fd3c3b3b0a638976e4e92322787c82bd202d891
Thanks.
Kevin
---
From 3fd3c3b3b0a638976e4e92322787c82bd202d891 Mon Sep 17 00:00:00 2001
From: Weiguo Li <liwg06@foxmail.com>
Date: Sat, 22 Jan 2022 14:49:04 +0800
Subject: [PATCH] common/cnxk: fix error checking
[ upstream commit 5c382298c176b9810bffb64732b57b9c57c1c9d3 ]
Fixes: 804c108b039a ("common/cnxk: set BPHY IRQ handler")
Signed-off-by: Weiguo Li <liwg06@foxmail.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
drivers/common/cnxk/roc_bphy_irq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/common/cnxk/roc_bphy_irq.c b/drivers/common/cnxk/roc_bphy_irq.c
index f4e9b341af..f4954d2a28 100644
--- a/drivers/common/cnxk/roc_bphy_irq.c
+++ b/drivers/common/cnxk/roc_bphy_irq.c
@@ -260,5 +260,5 @@ roc_bphy_irq_handler_set(struct roc_bphy_irq_chip *chip, int irq_num,
CPU_ZERO(&intr_cpuset);
CPU_SET(curr_cpu, &intr_cpuset);
- retval = pthread_setaffinity_np(pthread_self(), sizeof(intr_cpuset),
+ rc = pthread_setaffinity_np(pthread_self(), sizeof(intr_cpuset),
&intr_cpuset);
if (rc < 0) {
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.536077839 +0000
+++ 0088-common-cnxk-fix-error-checking.patch 2022-02-21 15:22:44.181704328 +0000
@@ -1 +1 @@
-From 5c382298c176b9810bffb64732b57b9c57c1c9d3 Mon Sep 17 00:00:00 2001
+From 3fd3c3b3b0a638976e4e92322787c82bd202d891 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5c382298c176b9810bffb64732b57b9c57c1c9d3 ]
+
@@ -7 +8,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'ethdev: fix Rx queue telemetry memory leak on failure' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (86 preceding siblings ...)
2022-02-21 15:34 ` patch 'common/cnxk: fix error checking' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'net/sfc: validate queue span when parsing flow action RSS' " Kevin Traynor
` (106 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Yunjian Wang; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/c935f2719dd828b22c0b2cd40eec2d65074cda28
Thanks.
Kevin
---
From c935f2719dd828b22c0b2cd40eec2d65074cda28 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Sat, 8 Jan 2022 15:51:57 +0800
Subject: [PATCH] ethdev: fix Rx queue telemetry memory leak on failure
[ upstream commit 52b49ea06ffb2cfbef8fe9578149f1e2dba99e89 ]
In eth_dev_handle_port_info() allocated memory for rxq_state,
we should free it when error happens, otherwise it will lead
to memory leak.
Fixes: 58b43c1ddfd1 ("ethdev: add telemetry endpoint for device info")
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
lib/ethdev/rte_ethdev.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index a1d475a292..29e21ad580 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -6321,6 +6321,8 @@ eth_dev_handle_port_info(const char *cmd __rte_unused,
txq_state = rte_tel_data_alloc();
- if (!txq_state)
+ if (!txq_state) {
+ rte_tel_data_free(rxq_state);
return -ENOMEM;
+ }
rte_tel_data_start_dict(d);
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.555178033 +0000
+++ 0089-ethdev-fix-Rx-queue-telemetry-memory-leak-on-failure.patch 2022-02-21 15:22:44.184704335 +0000
@@ -1 +1 @@
-From 52b49ea06ffb2cfbef8fe9578149f1e2dba99e89 Mon Sep 17 00:00:00 2001
+From c935f2719dd828b22c0b2cd40eec2d65074cda28 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 52b49ea06ffb2cfbef8fe9578149f1e2dba99e89 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/sfc: validate queue span when parsing flow action RSS' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (87 preceding siblings ...)
2022-02-21 15:34 ` patch 'ethdev: fix Rx queue telemetry memory leak on failure' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'raw/ifpga/base: fix SPI transaction' " Kevin Traynor
` (105 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Ivan Malov; +Cc: Andrew Rybchenko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/4599a6179ab28eaa44e6a53b48463b6535f71be5
Thanks.
Kevin
---
From 4599a6179ab28eaa44e6a53b48463b6535f71be5 Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov@oktetlabs.ru>
Date: Tue, 11 Jan 2022 00:48:45 +0300
Subject: [PATCH] net/sfc: validate queue span when parsing flow action RSS
[ upstream commit 667151aec1ddf8669819ac39d3e86f40f815c213 ]
The current code silently shrinks the value if it exceeds
the supported maximum. Do not do that. Validate the value.
Fixes: d77d07391d4d ("net/sfc: support flow API RSS action")
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
drivers/net/sfc/sfc_flow.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/sfc/sfc_flow.c b/drivers/net/sfc/sfc_flow.c
index fc74c8035e..509fde4a86 100644
--- a/drivers/net/sfc/sfc_flow.c
+++ b/drivers/net/sfc/sfc_flow.c
@@ -1478,4 +1478,7 @@ sfc_flow_parse_rss(struct sfc_adapter *sa,
}
+ if (rxq_hw_index_max - rxq_hw_index_min + 1 > EFX_MAXRSS)
+ return -EINVAL;
+
switch (action_rss->func) {
case RTE_ETH_HASH_FUNCTION_DEFAULT:
@@ -1613,7 +1616,6 @@ sfc_flow_filter_insert(struct sfc_adapter *sa,
if (spec_filter->rss) {
- rss_spread = MIN(flow_rss->rxq_hw_index_max -
- flow_rss->rxq_hw_index_min + 1,
- EFX_MAXRSS);
+ rss_spread = flow_rss->rxq_hw_index_max -
+ flow_rss->rxq_hw_index_min + 1;
rss_hash_types = flow_rss->rss_hash_types;
rss_key = flow_rss->rss_key;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.576949033 +0000
+++ 0090-net-sfc-validate-queue-span-when-parsing-flow-action.patch 2022-02-21 15:22:44.185704337 +0000
@@ -1 +1 @@
-From 667151aec1ddf8669819ac39d3e86f40f815c213 Mon Sep 17 00:00:00 2001
+From 4599a6179ab28eaa44e6a53b48463b6535f71be5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 667151aec1ddf8669819ac39d3e86f40f815c213 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'raw/ifpga/base: fix SPI transaction' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (88 preceding siblings ...)
2022-02-21 15:34 ` patch 'net/sfc: validate queue span when parsing flow action RSS' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'net/ice: fix mbuf offload flag for Rx timestamp' " Kevin Traynor
` (104 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Tianfei Zhang; +Cc: Rosen Xu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/81597d6e200f45674919e12f179275573b721ebf
Thanks.
Kevin
---
From 81597d6e200f45674919e12f179275573b721ebf Mon Sep 17 00:00:00 2001
From: Tianfei Zhang <tianfei.zhang@intel.com>
Date: Tue, 18 Jan 2022 20:44:59 -0500
Subject: [PATCH] raw/ifpga/base: fix SPI transaction
[ upstream commit eacdd03c79f5d8adfa7d0dad1e75657dbaf4f788 ]
When EOP is detected, 2 more bytes should be received
(may be a SPI_PACKET_ESC before last valid byte) then
rx should be finished.
Fixes: 96ebfcf8125c ("raw/ifpga/base: add SPI and MAX10 device driver")
Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
---
drivers/raw/ifpga/base/opae_spi.c | 12 +
drivers/raw/ifpga/base/opae_spi.h | 4 +
drivers/raw/ifpga/base/opae_spi_transaction.c | 215 ++++++++++--------
3 files changed, 140 insertions(+), 91 deletions(-)
diff --git a/drivers/raw/ifpga/base/opae_spi.c b/drivers/raw/ifpga/base/opae_spi.c
index 9efeecb791..ca3d41fb92 100644
--- a/drivers/raw/ifpga/base/opae_spi.c
+++ b/drivers/raw/ifpga/base/opae_spi.c
@@ -240,4 +240,16 @@ int spi_command(struct altera_spi_device *dev, unsigned int chip_select,
}
+int spi_write(struct altera_spi_device *dev, unsigned int chip_select,
+ unsigned int wlen, void *wdata)
+{
+ return spi_command(dev, chip_select, wlen, wdata, 0, NULL);
+}
+
+int spi_read(struct altera_spi_device *dev, unsigned int chip_select,
+ unsigned int rlen, void *rdata)
+{
+ return spi_command(dev, chip_select, 0, NULL, rlen, rdata);
+}
+
struct altera_spi_device *altera_spi_alloc(void *base, int type)
{
diff --git a/drivers/raw/ifpga/base/opae_spi.h b/drivers/raw/ifpga/base/opae_spi.h
index af11656e4d..bcff67dd66 100644
--- a/drivers/raw/ifpga/base/opae_spi.h
+++ b/drivers/raw/ifpga/base/opae_spi.h
@@ -118,4 +118,8 @@ struct spi_tran_header {
};
+int spi_read(struct altera_spi_device *dev, unsigned int chip_select,
+ unsigned int rlen, void *rdata);
+int spi_write(struct altera_spi_device *dev, unsigned int chip_select,
+ unsigned int wlen, void *wdata);
int spi_command(struct altera_spi_device *dev, unsigned int chip_select,
unsigned int wlen, void *wdata, unsigned int rlen, void *rdata);
diff --git a/drivers/raw/ifpga/base/opae_spi_transaction.c b/drivers/raw/ifpga/base/opae_spi_transaction.c
index 006cdb4c1a..cd50d40629 100644
--- a/drivers/raw/ifpga/base/opae_spi_transaction.c
+++ b/drivers/raw/ifpga/base/opae_spi_transaction.c
@@ -41,5 +41,5 @@ static void print_buffer(const char *string, void *buffer, int len)
for (i = 0; i < len; i++)
- printf("%x ", *(p+i));
+ printf("%02x ", *(p+i));
printf("\n");
}
@@ -73,41 +73,4 @@ static void reorder_phy_data(u8 bits_per_word,
}
-enum {
- SPI_FOUND_SOP,
- SPI_FOUND_EOP,
- SPI_NOT_FOUND,
-};
-
-static int resp_find_sop_eop(unsigned char *resp, unsigned int len,
- int flags)
-{
- int ret = SPI_NOT_FOUND;
-
- unsigned char *b = resp;
-
- /* find SOP */
- if (flags != SPI_FOUND_SOP) {
- while (b < resp + len && *b != SPI_PACKET_SOP)
- b++;
-
- if (*b != SPI_PACKET_SOP)
- goto done;
-
- ret = SPI_FOUND_SOP;
- }
-
- /* find EOP */
- while (b < resp + len && *b != SPI_PACKET_EOP)
- b++;
-
- if (*b != SPI_PACKET_EOP)
- goto done;
-
- ret = SPI_FOUND_EOP;
-
-done:
- return ret;
-}
-
static void phy_tx_pad(unsigned char *phy_buf, unsigned int phy_buf_len,
unsigned int *aligned_len)
@@ -138,4 +101,102 @@ static void phy_tx_pad(unsigned char *phy_buf, unsigned int phy_buf_len,
}
+#define RX_ALL_IDLE_DATA (SPI_BYTE_IDLE << 24 | SPI_BYTE_IDLE << 16 | \
+ SPI_BYTE_IDLE << 8 | SPI_BYTE_IDLE)
+
+static bool all_idle_data(u8 *rxbuf)
+{
+ return *(u32 *)rxbuf == RX_ALL_IDLE_DATA;
+}
+
+static unsigned char *find_eop(u8 *rxbuf, u32 BPW)
+{
+ return memchr(rxbuf, SPI_PACKET_EOP, BPW);
+}
+
+static int do_spi_txrx(struct spi_transaction_dev *dev,
+ unsigned char *tx_buffer,
+ unsigned int tx_len, unsigned char *rx_buffer,
+ unsigned int rx_len,
+ unsigned int *actual_rx)
+{
+ unsigned int rx_cnt = 0;
+ int ret = 0;
+ unsigned int BPW = 4;
+ bool eop_found = false;
+ unsigned char *eop;
+ unsigned char *ptr;
+ unsigned char *rxbuf = rx_buffer;
+ int add_byte = 0;
+ unsigned long ticks;
+ unsigned long timeout;
+
+ /* send command */
+ ret = spi_write(dev->dev, dev->chipselect, tx_len, tx_buffer);
+ if (ret)
+ return -EBUSY;
+
+ timeout = rte_get_timer_cycles() +
+ msecs_to_timer_cycles(2000);
+
+ /* read out data */
+ while (rx_cnt < rx_len) {
+ ret = spi_read(dev->dev, dev->chipselect, BPW, rxbuf);
+ if (ret)
+ return -EBUSY;
+
+ /* skip all of invalid data */
+ if (!eop_found && all_idle_data(rxbuf)) {
+ ticks = rte_get_timer_cycles();
+ if (!time_after(ticks, timeout)) {
+ continue;
+ } else {
+ dev_err(dev, "read spi data timeout\n");
+ return -ETIMEDOUT;
+ }
+ }
+
+ rx_cnt += BPW;
+ if (!eop_found) {
+ /* EOP is found, we read 2 more bytes and exit. */
+ eop = find_eop(rxbuf, BPW);
+ if (eop) {
+ if ((BPW + rxbuf - eop) > 2) {
+ /*
+ * check if the last 2 bytes are already
+ * received in current word.
+ */
+ break;
+ } else if ((BPW + rxbuf - eop) == 2) {
+ /*
+ * skip if last byte is not SPI_BYTE_ESC
+ * or SPI_PACKET_ESC. this is the valid
+ * end of a response too.
+ */
+ ptr = eop + 1;
+
+ if (*ptr != SPI_BYTE_ESC &&
+ *ptr != SPI_PACKET_ESC)
+ break;
+
+ add_byte = 1;
+ } else {
+ add_byte = 2;
+ }
+
+ rx_len = min(rx_len,
+ IFPGA_ALIGN(rx_cnt +
+ add_byte, BPW));
+ eop_found = true;
+ }
+ }
+ rxbuf += BPW;
+ }
+
+ *actual_rx = rx_cnt;
+ print_buffer("found valid data:", rx_buffer, rx_cnt);
+
+ return ret;
+}
+
static int byte_to_core_convert(struct spi_transaction_dev *dev,
unsigned int send_len, unsigned char *send_data,
@@ -149,13 +210,7 @@ static int byte_to_core_convert(struct spi_transaction_dev *dev,
unsigned char *p;
unsigned char current_byte;
- unsigned char *tx_buffer;
unsigned int tx_len = 0;
- unsigned char *rx_buffer;
- unsigned int rx_len = 0;
- int retry = 0;
- int spi_flags;
- unsigned long timeout = msecs_to_timer_cycles(1000);
- unsigned long ticks;
unsigned int resp_max_len = 2 * resp_len;
+ unsigned int actual_rx;
print_buffer("before bytes:", send_data, send_len);
@@ -191,46 +246,13 @@ static int byte_to_core_convert(struct spi_transaction_dev *dev,
print_buffer("after order to spi:", send_packet, tx_len);
- /* call spi */
- tx_buffer = send_packet;
- rx_buffer = resp_packet;
- rx_len = resp_max_len;
- spi_flags = SPI_NOT_FOUND;
-
-read_again:
- ret = spi_command(dev->dev, dev->chipselect, tx_len, tx_buffer,
- rx_len, rx_buffer);
+ ret = do_spi_txrx(dev, send_packet, tx_len, resp_packet,
+ resp_max_len, &actual_rx);
if (ret)
- return -EBUSY;
-
- print_buffer("read from spi:", rx_buffer, rx_len);
-
- /* look for SOP firstly*/
- ret = resp_find_sop_eop(rx_buffer, rx_len - 1, spi_flags);
- if (ret != SPI_FOUND_EOP) {
- tx_buffer = NULL;
- tx_len = 0;
- ticks = rte_get_timer_cycles();
- if (time_after(ticks, timeout) &&
- retry++ > SPI_MAX_RETRY) {
- dev_err(NULL, "Have retry %d, found invalid packet data\n",
- retry);
- return -EBUSY;
- }
-
- if (ret == SPI_FOUND_SOP) {
- rx_buffer += rx_len;
- resp_max_len += rx_len;
- }
-
- spi_flags = ret;
- goto read_again;
- }
-
- print_buffer("found valid data:", resp_packet, resp_max_len);
+ return ret;
/* analyze response packet */
i = 0;
p = resp_data;
- while (i < resp_max_len) {
+ while (i < actual_rx) {
current_byte = resp_packet[i];
switch (current_byte) {
@@ -338,7 +360,11 @@ static int packet_to_byte_conver(struct spi_transaction_dev *dev,
switch (current_byte) {
- case SPI_PACKET_ESC:
- case SPI_PACKET_CHANNEL:
case SPI_PACKET_SOP:
+ dev_err(dev, "error on get SOP after SOP\n");
+ return -EINVAL;
+ case SPI_PACKET_CHANNEL:
+ i += 2;
+ break;
+ case SPI_PACKET_ESC:
i++;
current_byte = resp_packet[i];
@@ -349,21 +375,28 @@ static int packet_to_byte_conver(struct spi_transaction_dev *dev,
i++;
current_byte = resp_packet[i];
- if (current_byte == SPI_PACKET_ESC ||
- current_byte == SPI_PACKET_CHANNEL ||
- current_byte == SPI_PACKET_SOP) {
+ switch (current_byte) {
+ case SPI_PACKET_ESC:
i++;
current_byte = resp_packet[i];
*p++ = xor_20(current_byte);
- } else
+ break;
+ case SPI_PACKET_CHANNEL:
+ case SPI_PACKET_SOP:
+ case SPI_PACKET_EOP:
+ dev_err(dev, "error get SOP/EOP after EOP\n");
+ return -EINVAL;
+ default:
*p++ = current_byte;
- i = valid_resp_len;
- break;
+ break;
+ }
+ goto done;
+
default:
*p++ = current_byte;
i++;
}
-
}
+done:
*valid = p - resp_buf;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.597862258 +0000
+++ 0091-raw-ifpga-base-fix-SPI-transaction.patch 2022-02-21 15:22:44.186704340 +0000
@@ -1 +1 @@
-From eacdd03c79f5d8adfa7d0dad1e75657dbaf4f788 Mon Sep 17 00:00:00 2001
+From 81597d6e200f45674919e12f179275573b721ebf Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit eacdd03c79f5d8adfa7d0dad1e75657dbaf4f788 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/ice: fix mbuf offload flag for Rx timestamp' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (89 preceding siblings ...)
2022-02-21 15:34 ` patch 'raw/ifpga/base: fix SPI transaction' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'net/ice: fix link up when starting device' " Kevin Traynor
` (103 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Simei Su; +Cc: Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/b38f8855d6578c3d7ba49d64977e70cf35c426bc
Thanks.
Kevin
---
From b38f8855d6578c3d7ba49d64977e70cf35c426bc Mon Sep 17 00:00:00 2001
From: Simei Su <simei.su@intel.com>
Date: Thu, 20 Jan 2022 18:21:52 +0800
Subject: [PATCH] net/ice: fix mbuf offload flag for Rx timestamp
[ upstream commit f5ada3bcf12d551bc3a3c4c548d2fecf6bbc3ece ]
For received PTP packets, the flag "RTE_MBUF_F_RX_IEEE1588_TMST" has not
been set which leads to received PTP packet not timestamped by hardware
shown in testpmd/ieee1588 fwd.
Fixes: 646dcbe6c701 ("net/ice: support IEEE 1588 PTP")
Signed-off-by: Simei Su <simei.su@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/ice/ice_rxtx.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index ba40a0dc87..58700f1b92 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -1555,4 +1555,7 @@ ice_rxd_to_vlan_tci(struct rte_mbuf *mb, volatile union ice_rx_flex_desc *rxdp)
#error "PMD ICE: ICE_LOOK_AHEAD must be 8\n"
#endif
+
+#define ICE_PTP_TS_VALID 0x1
+
static inline int
ice_rx_scan_hw_ring(struct ice_rx_queue *rxq)
@@ -1635,4 +1638,8 @@ ice_rx_scan_hw_ring(struct ice_rx_queue *rxq)
mb->timesync = rxq->queue_id;
pkt_flags |= RTE_MBUF_F_RX_IEEE1588_PTP;
+ if (rxdp[j].wb.time_stamp_low &
+ ICE_PTP_TS_VALID)
+ pkt_flags |=
+ RTE_MBUF_F_RX_IEEE1588_TMST;
}
#endif
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.616800065 +0000
+++ 0092-net-ice-fix-mbuf-offload-flag-for-Rx-timestamp.patch 2022-02-21 15:22:44.188704344 +0000
@@ -1 +1 @@
-From f5ada3bcf12d551bc3a3c4c548d2fecf6bbc3ece Mon Sep 17 00:00:00 2001
+From b38f8855d6578c3d7ba49d64977e70cf35c426bc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f5ada3bcf12d551bc3a3c4c548d2fecf6bbc3ece ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/ice: fix link up when starting device' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (90 preceding siblings ...)
2022-02-21 15:34 ` patch 'net/ice: fix mbuf offload flag for Rx timestamp' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'raw/ifpga: fix thread closing' " Kevin Traynor
` (102 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Yunjian Wang; +Cc: Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/7c682d5c05d5c7e7ccc6f382d510b94fc9b2bf0b
Thanks.
Kevin
---
From 7c682d5c05d5c7e7ccc6f382d510b94fc9b2bf0b Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Tue, 25 Jan 2022 09:39:07 +0800
Subject: [PATCH] net/ice: fix link up when starting device
[ upstream commit 6c76b76dc64183eb2f24a52b90d4ff9feb4872f4 ]
Currently, there is a possibility that the link status is not correct
after set link up, the device ID is 159b. It would be fixed by calling
ice_link_update() while the parameter 'wait_to_complete' is true. It's
reasonable to wait for complete right after set link up as it is not
in an link status change interrupt handling scenario.
Fixes: cf911d90e366 ("net/ice: support link update")
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/ice/ice_ethdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index c9fd3de2bd..2ae25b16f6 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -3605,5 +3605,5 @@ ice_dev_start(struct rte_eth_dev *dev)
/* Call get_link_info aq command to enable/disable LSE */
- ice_link_update(dev, 0);
+ ice_link_update(dev, 1);
pf->adapter_stopped = false;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.638645571 +0000
+++ 0093-net-ice-fix-link-up-when-starting-device.patch 2022-02-21 15:22:44.191704351 +0000
@@ -1 +1 @@
-From 6c76b76dc64183eb2f24a52b90d4ff9feb4872f4 Mon Sep 17 00:00:00 2001
+From 7c682d5c05d5c7e7ccc6f382d510b94fc9b2bf0b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6c76b76dc64183eb2f24a52b90d4ff9feb4872f4 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 6d85e421cf..d01acb8797 100644
+index c9fd3de2bd..2ae25b16f6 100644
@@ -25 +26 @@
-@@ -3611,5 +3611,5 @@ ice_dev_start(struct rte_eth_dev *dev)
+@@ -3605,5 +3605,5 @@ ice_dev_start(struct rte_eth_dev *dev)
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'raw/ifpga: fix thread closing' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (91 preceding siblings ...)
2022-02-21 15:34 ` patch 'net/ice: fix link up when starting device' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'net/bnxt: fix check for autoneg enablement' " Kevin Traynor
` (101 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Tianfei Zhang; +Cc: Rosen Xu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/72db0cca691dcfd260f0fb3d901c141764f3ece7
Thanks.
Kevin
---
From 72db0cca691dcfd260f0fb3d901c141764f3ece7 Mon Sep 17 00:00:00 2001
From: Tianfei Zhang <tianfei.zhang@intel.com>
Date: Sun, 23 Jan 2022 22:50:05 -0500
Subject: [PATCH] raw/ifpga: fix thread closing
[ upstream commit 60e68d170b122d86c1c49cc51078db461542a26b ]
When we want to close a thread, we should set a flag to notify
thread handler function.
Fixes: 9c006c45d0c5 ("raw/ifpga: scan PCIe BDF device tree")
Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
---
drivers/raw/ifpga/ifpga_rawdev.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c
index 0eae0c9477..fdf3c23d2c 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.c
+++ b/drivers/raw/ifpga/ifpga_rawdev.c
@@ -498,5 +498,5 @@ ifpga_rawdev_gsd_handle(__rte_unused void *param)
#define MS 1000
- while (1) {
+ while (__atomic_load_n(&ifpga_monitor_start, __ATOMIC_RELAXED)) {
gsd_enable = 0;
for (i = 0; i < IFPGA_RAWDEV_NUM; i++) {
@@ -526,5 +526,5 @@ ifpga_monitor_start_func(void)
int ret;
- if (ifpga_monitor_start == 0) {
+ if (!__atomic_load_n(&ifpga_monitor_start, __ATOMIC_RELAXED)) {
ret = rte_ctrl_thread_create(&ifpga_monitor_start_thread,
"ifpga-monitor", NULL,
@@ -535,5 +535,5 @@ ifpga_monitor_start_func(void)
return -1;
}
- ifpga_monitor_start = 1;
+ __atomic_store_n(&ifpga_monitor_start, 1, __ATOMIC_RELAXED);
}
@@ -545,5 +545,7 @@ ifpga_monitor_stop_func(void)
int ret;
- if (ifpga_monitor_start == 1) {
+ if (__atomic_load_n(&ifpga_monitor_start, __ATOMIC_RELAXED)) {
+ __atomic_store_n(&ifpga_monitor_start, 0, __ATOMIC_RELAXED);
+
ret = pthread_cancel(ifpga_monitor_start_thread);
if (ret)
@@ -554,6 +556,4 @@ ifpga_monitor_stop_func(void)
IFPGA_RAWDEV_PMD_ERR("Can't join the thread");
- ifpga_monitor_start = 0;
-
return ret;
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.659929510 +0000
+++ 0094-raw-ifpga-fix-thread-closing.patch 2022-02-21 15:22:44.192704353 +0000
@@ -1 +1 @@
-From 60e68d170b122d86c1c49cc51078db461542a26b Mon Sep 17 00:00:00 2001
+From 72db0cca691dcfd260f0fb3d901c141764f3ece7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 60e68d170b122d86c1c49cc51078db461542a26b ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/bnxt: fix check for autoneg enablement' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (92 preceding siblings ...)
2022-02-21 15:34 ` patch 'raw/ifpga: fix thread closing' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'net/bnxt: handle ring cleanup in case of error' " Kevin Traynor
` (100 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/a04034b131dacaf01ab268590917d4ecfd0e8d01
Thanks.
Kevin
---
From a04034b131dacaf01ab268590917d4ecfd0e8d01 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Thu, 20 Jan 2022 14:42:25 +0530
Subject: [PATCH] net/bnxt: fix check for autoneg enablement
[ upstream commit 7b82c4de0d67719390674215d4580e20459f5b9b ]
HWRM_PORT_PHY_QCFG_OUTPUT response indicates the autoneg speed mask
supported by the FW. While enabling autoneg, driver should also check
the FW advertised PAM4 speeds supported in auto mode which is set
in the HWRM_PORT_PHY_QCFG_OUTPUT response.
Fixes: c23f9ded0391 ("net/bnxt: support 200G PAM4 link")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
drivers/net/bnxt/bnxt_hwrm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 5850e7e48b..5418fa1994 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -3254,5 +3254,6 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up)
link_req.phy_flags = HWRM_PORT_PHY_CFG_INPUT_FLAGS_RESET_PHY;
/* Autoneg can be done only when the FW allows. */
- if (autoneg == 1 && bp->link_info->support_auto_speeds) {
+ if (autoneg == 1 &&
+ (bp->link_info->support_auto_speeds || bp->link_info->support_pam4_auto_speeds)) {
link_req.phy_flags |=
HWRM_PORT_PHY_CFG_INPUT_FLAGS_RESTART_AUTONEG;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.679729353 +0000
+++ 0095-net-bnxt-fix-check-for-autoneg-enablement.patch 2022-02-21 15:22:44.195704360 +0000
@@ -1 +1 @@
-From 7b82c4de0d67719390674215d4580e20459f5b9b Mon Sep 17 00:00:00 2001
+From a04034b131dacaf01ab268590917d4ecfd0e8d01 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7b82c4de0d67719390674215d4580e20459f5b9b ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/bnxt: handle ring cleanup in case of error' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (93 preceding siblings ...)
2022-02-21 15:34 ` patch 'net/bnxt: fix check for autoneg enablement' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'net/bnxt: fix memzone allocation per VNIC' " Kevin Traynor
` (99 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/e44c18821c1fcf731f3ae7e369ff8c49524b1577
Thanks.
Kevin
---
From e44c18821c1fcf731f3ae7e369ff8c49524b1577 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Thu, 20 Jan 2022 14:42:26 +0530
Subject: [PATCH] net/bnxt: handle ring cleanup in case of error
[ upstream commit 75915b2b3c577ee5bb938c3f1ab6b51958c431a3 ]
In bnxt_alloc_mem(), after bnxt_alloc_async_ring_struct(),
any of the functions failure causes an error:
bnxt_hwrm_ring_free(): hwrm_ring_free nq failed. rc:1
Fix this by initializing ring->fw_ring_id to INVALID_HW_RING_ID
in bnxt_alloc_async_ring_struct().
Fixes: bd0a14c99f65 ("net/bnxt: use dedicated CPR for async events")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
drivers/net/bnxt/bnxt_ring.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/bnxt/bnxt_ring.c b/drivers/net/bnxt/bnxt_ring.c
index dc437f314e..5c6c27fed7 100644
--- a/drivers/net/bnxt/bnxt_ring.c
+++ b/drivers/net/bnxt/bnxt_ring.c
@@ -852,4 +852,5 @@ int bnxt_alloc_async_ring_struct(struct bnxt *bp)
ring->vmem_size = 0;
ring->vmem = NULL;
+ ring->fw_ring_id = INVALID_HW_RING_ID;
bp->async_cp_ring = cpr;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.701399666 +0000
+++ 0096-net-bnxt-handle-ring-cleanup-in-case-of-error.patch 2022-02-21 15:22:44.196704362 +0000
@@ -1 +1 @@
-From 75915b2b3c577ee5bb938c3f1ab6b51958c431a3 Mon Sep 17 00:00:00 2001
+From e44c18821c1fcf731f3ae7e369ff8c49524b1577 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 75915b2b3c577ee5bb938c3f1ab6b51958c431a3 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/bnxt: fix memzone allocation per VNIC' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (94 preceding siblings ...)
2022-02-21 15:34 ` patch 'net/bnxt: handle ring cleanup in case of error' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'net/bnxt: fix VF resource allocation strategy' " Kevin Traynor
` (98 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Kalesh AP; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/f70203b5c016243eed2724191f75a0175a6bf3e9
Thanks.
Kevin
---
From f70203b5c016243eed2724191f75a0175a6bf3e9 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Thu, 20 Jan 2022 14:42:27 +0530
Subject: [PATCH] net/bnxt: fix memzone allocation per VNIC
[ upstream commit 5b8b248c9679b9571f73a75e1905d7cef39e6c6e ]
In case of Thor RSS table size is too big. This could result in
memory allocation failure when the supported vnic count is high.
Instead of allocating the memzone for all VNICs in one shot,
allocate for each VNIC individually.
Also, fixed to free the memzone in the uninit path.
Fixes: 9738793f28ec ("net/bnxt: add VNIC functions and structs")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_vnic.c | 68 +++++++++++++++---------------------
drivers/net/bnxt/bnxt_vnic.h | 1 +
2 files changed, 30 insertions(+), 39 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_vnic.c b/drivers/net/bnxt/bnxt_vnic.c
index 09d67ef885..b3c03a2af5 100644
--- a/drivers/net/bnxt/bnxt_vnic.c
+++ b/drivers/net/bnxt/bnxt_vnic.c
@@ -99,16 +99,9 @@ void bnxt_free_vnic_attributes(struct bnxt *bp)
for (i = 0; i < bp->max_vnics; i++) {
vnic = &bp->vnic_info[i];
- if (vnic->rss_table) {
- /* 'Unreserve' the rss_table */
- /* N/A */
-
- vnic->rss_table = NULL;
- }
-
- if (vnic->rss_hash_key) {
- /* 'Unreserve' the rss_hash_key */
- /* N/A */
-
+ if (vnic->rss_mz != NULL) {
+ rte_memzone_free(vnic->rss_mz);
+ vnic->rss_mz = NULL;
vnic->rss_hash_key = NULL;
+ vnic->rss_table = NULL;
}
}
@@ -123,5 +116,4 @@ int bnxt_alloc_vnic_attributes(struct bnxt *bp, bool reconfig)
uint32_t entry_length;
size_t rss_table_size;
- uint16_t max_vnics;
int i;
rte_iova_t mz_phys_addr;
@@ -137,36 +129,34 @@ int bnxt_alloc_vnic_attributes(struct bnxt *bp, bool reconfig)
entry_length = RTE_CACHE_LINE_ROUNDUP(entry_length + rss_table_size);
- max_vnics = bp->max_vnics;
- snprintf(mz_name, RTE_MEMZONE_NAMESIZE,
- "bnxt_" PCI_PRI_FMT "_vnicattr", pdev->addr.domain,
- pdev->addr.bus, pdev->addr.devid, pdev->addr.function);
- mz_name[RTE_MEMZONE_NAMESIZE - 1] = 0;
- mz = rte_memzone_lookup(mz_name);
- if (!mz) {
- mz = rte_memzone_reserve(mz_name,
- entry_length * max_vnics,
- bp->eth_dev->device->numa_node,
- RTE_MEMZONE_2MB |
- RTE_MEMZONE_SIZE_HINT_ONLY |
- RTE_MEMZONE_IOVA_CONTIG);
- if (!mz)
- return -ENOMEM;
- }
- mz_phys_addr = mz->iova;
-
- for (i = 0; i < max_vnics; i++) {
+ for (i = 0; i < bp->max_vnics; i++) {
vnic = &bp->vnic_info[i];
+ snprintf(mz_name, RTE_MEMZONE_NAMESIZE,
+ "bnxt_" PCI_PRI_FMT "_vnicattr_%d", pdev->addr.domain,
+ pdev->addr.bus, pdev->addr.devid, pdev->addr.function, i);
+ mz_name[RTE_MEMZONE_NAMESIZE - 1] = 0;
+ mz = rte_memzone_lookup(mz_name);
+ if (mz == NULL) {
+ mz = rte_memzone_reserve(mz_name,
+ entry_length,
+ bp->eth_dev->device->numa_node,
+ RTE_MEMZONE_2MB |
+ RTE_MEMZONE_SIZE_HINT_ONLY |
+ RTE_MEMZONE_IOVA_CONTIG);
+ if (mz == NULL) {
+ PMD_DRV_LOG(ERR, "Cannot allocate bnxt vnic_attributes memory\n");
+ return -ENOMEM;
+ }
+ }
+ vnic->rss_mz = mz;
+ mz_phys_addr = mz->iova;
+
/* Allocate rss table and hash key */
- vnic->rss_table =
- (void *)((char *)mz->addr + (entry_length * i));
+ vnic->rss_table = (void *)((char *)mz->addr);
+ vnic->rss_table_dma_addr = mz_phys_addr;
memset(vnic->rss_table, -1, entry_length);
- vnic->rss_table_dma_addr = mz_phys_addr + (entry_length * i);
- vnic->rss_hash_key = (void *)((char *)vnic->rss_table +
- rss_table_size);
-
- vnic->rss_hash_key_dma_addr = vnic->rss_table_dma_addr +
- rss_table_size;
+ vnic->rss_hash_key = (void *)((char *)vnic->rss_table + rss_table_size);
+ vnic->rss_hash_key_dma_addr = vnic->rss_table_dma_addr + rss_table_size;
if (!reconfig) {
bnxt_prandom_bytes(vnic->rss_hash_key, HW_HASH_KEY_SIZE);
diff --git a/drivers/net/bnxt/bnxt_vnic.h b/drivers/net/bnxt/bnxt_vnic.h
index 25481fcbdd..9055b93c4b 100644
--- a/drivers/net/bnxt/bnxt_vnic.h
+++ b/drivers/net/bnxt/bnxt_vnic.h
@@ -29,4 +29,5 @@ struct bnxt_vnic_info {
uint16_t hash_type;
uint8_t hash_mode;
+ const struct rte_memzone *rss_mz;
rte_iova_t rss_table_dma_addr;
uint16_t *rss_table;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.721090127 +0000
+++ 0097-net-bnxt-fix-memzone-allocation-per-VNIC.patch 2022-02-21 15:22:44.196704362 +0000
@@ -1 +1 @@
-From 5b8b248c9679b9571f73a75e1905d7cef39e6c6e Mon Sep 17 00:00:00 2001
+From f70203b5c016243eed2724191f75a0175a6bf3e9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5b8b248c9679b9571f73a75e1905d7cef39e6c6e ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/bnxt: fix VF resource allocation strategy' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (95 preceding siblings ...)
2022-02-21 15:34 ` patch 'net/bnxt: fix memzone allocation per VNIC' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'raw/ifpga/base: fix port feature ID' " Kevin Traynor
` (97 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: Kalesh AP, Somnath Kotur, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/0f8f337740fb8d16c6566ac8d70761f786a6cf2e
Thanks.
Kevin
---
From 0f8f337740fb8d16c6566ac8d70761f786a6cf2e Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Thu, 20 Jan 2022 14:42:28 +0530
Subject: [PATCH] net/bnxt: fix VF resource allocation strategy
[ upstream commit 8496483099104c970720ae7baf5ab61aaa4611c7 ]
1. VFs need a notification queue to handle async messages.
But the current logic does not reserve a notification queue leading
to initialization failure in some cases.
2. With the current logic, DPDK PF driver reserves only one VNIC
to the VFs leading to initialization failure with more than 1 RXQs.
Added logic to distribute number of NQs and VNICs from the pool
across VFs and PF.
While reserving resources for the VFs, the strategy is to keep
both min & max values the same. This could result in a failure
when there isn't enough resources to satisfy the request.
Hence fixed to instruct the FW to not reserve all minimum
resources requested for the VF. The VF driver can request the FW
for the allocated resources during probe.
Fixes: b7778e8a1c00 ("net/bnxt: refactor to properly allocate resources for PF/VF")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
drivers/net/bnxt/bnxt_hwrm.c | 32 +++++++++++++++++---------------
drivers/net/bnxt/bnxt_hwrm.h | 2 ++
2 files changed, 19 insertions(+), 15 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 5418fa1994..b4aeec593e 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -903,13 +903,5 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
if (!BNXT_CHIP_P5(bp) && !bp->pdev->max_vfs)
bp->max_l2_ctx += bp->max_rx_em_flows;
- /* TODO: For now, do not support VMDq/RFS on VFs. */
- if (BNXT_PF(bp)) {
- if (bp->pf->max_vfs)
- bp->max_vnics = 1;
- else
- bp->max_vnics = rte_le_to_cpu_16(resp->max_vnics);
- } else {
- bp->max_vnics = 1;
- }
+ bp->max_vnics = rte_le_to_cpu_16(resp->max_vnics);
PMD_DRV_LOG(DEBUG, "Max l2_cntxts is %d vnics is %d\n",
bp->max_l2_ctx, bp->max_vnics);
@@ -3496,5 +3488,5 @@ static int bnxt_hwrm_pf_func_cfg(struct bnxt *bp,
} else if (BNXT_HAS_NQ(bp)) {
enables |= HWRM_FUNC_CFG_INPUT_ENABLES_NUM_MSIX;
- req.num_msix = rte_cpu_to_le_16(bp->max_nq_rings);
+ req.num_msix = rte_cpu_to_le_16(pf_resc->num_nq_rings);
}
@@ -3509,5 +3501,5 @@ static int bnxt_hwrm_pf_func_cfg(struct bnxt *bp,
req.num_rx_rings = rte_cpu_to_le_16(pf_resc->num_rx_rings);
req.num_l2_ctxs = rte_cpu_to_le_16(pf_resc->num_l2_ctxs);
- req.num_vnics = rte_cpu_to_le_16(bp->max_vnics);
+ req.num_vnics = rte_cpu_to_le_16(pf_resc->num_vnics);
req.fid = rte_cpu_to_le_16(0xffff);
req.enables = rte_cpu_to_le_32(enables);
@@ -3546,12 +3538,10 @@ bnxt_fill_vf_func_cfg_req_new(struct bnxt *bp,
req->max_l2_ctxs = rte_cpu_to_le_16(bp->max_l2_ctx / (num_vfs + 1));
req->min_l2_ctxs = req->max_l2_ctxs;
- /* TODO: For now, do not support VMDq/RFS on VFs. */
- req->max_vnics = rte_cpu_to_le_16(1);
+ req->max_vnics = rte_cpu_to_le_16(bp->max_vnics / (num_vfs + 1));
req->min_vnics = req->max_vnics;
req->max_hw_ring_grps = rte_cpu_to_le_16(bp->max_ring_grps /
(num_vfs + 1));
req->min_hw_ring_grps = req->max_hw_ring_grps;
- req->flags =
- rte_cpu_to_le_16(HWRM_FUNC_VF_RESOURCE_CFG_INPUT_FLAGS_MIN_GUARANTEED);
+ req->max_msix = rte_cpu_to_le_16(bp->max_nq_rings / (num_vfs + 1));
}
@@ -3613,4 +3603,6 @@ static int bnxt_update_max_resources(struct bnxt *bp,
bp->max_l2_ctx -= rte_le_to_cpu_16(resp->alloc_l2_ctx);
bp->max_ring_grps -= rte_le_to_cpu_16(resp->alloc_hw_ring_grps);
+ bp->max_nq_rings -= rte_le_to_cpu_16(resp->alloc_msix);
+ bp->max_vnics -= rte_le_to_cpu_16(resp->alloc_vnics);
HWRM_UNLOCK();
@@ -3686,4 +3678,6 @@ static int bnxt_query_pf_resources(struct bnxt *bp,
pf_resc->num_l2_ctxs = rte_le_to_cpu_16(resp->alloc_l2_ctx);
pf_resc->num_hw_ring_grps = rte_le_to_cpu_32(resp->alloc_hw_ring_grps);
+ pf_resc->num_nq_rings = rte_le_to_cpu_32(resp->alloc_msix);
+ pf_resc->num_vnics = rte_le_to_cpu_16(resp->alloc_vnics);
bp->pf->evb_mode = resp->evb_mode;
@@ -3706,4 +3700,6 @@ bnxt_calculate_pf_resources(struct bnxt *bp,
pf_resc->num_l2_ctxs = bp->max_l2_ctx;
pf_resc->num_hw_ring_grps = bp->max_ring_grps;
+ pf_resc->num_nq_rings = bp->max_nq_rings;
+ pf_resc->num_vnics = bp->max_vnics;
return;
@@ -3724,4 +3720,8 @@ bnxt_calculate_pf_resources(struct bnxt *bp,
pf_resc->num_hw_ring_grps = bp->max_ring_grps / (num_vfs + 1) +
bp->max_ring_grps % (num_vfs + 1);
+ pf_resc->num_nq_rings = bp->max_nq_rings / (num_vfs + 1) +
+ bp->max_nq_rings % (num_vfs + 1);
+ pf_resc->num_vnics = bp->max_vnics / (num_vfs + 1) +
+ bp->max_vnics % (num_vfs + 1);
}
@@ -3899,4 +3899,6 @@ bnxt_update_pf_resources(struct bnxt *bp,
bp->max_rx_rings = pf_resc->num_rx_rings;
bp->max_ring_grps = pf_resc->num_hw_ring_grps;
+ bp->max_nq_rings = pf_resc->num_nq_rings;
+ bp->max_vnics = pf_resc->num_vnics;
}
diff --git a/drivers/net/bnxt/bnxt_hwrm.h b/drivers/net/bnxt/bnxt_hwrm.h
index 21e1b7a499..63f8d8ceab 100644
--- a/drivers/net/bnxt/bnxt_hwrm.h
+++ b/drivers/net/bnxt/bnxt_hwrm.h
@@ -115,4 +115,6 @@ struct bnxt_pf_resource_info {
uint16_t num_cp_rings;
uint16_t num_l2_ctxs;
+ uint16_t num_nq_rings;
+ uint16_t num_vnics;
uint32_t num_hw_ring_grps;
};
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.739463626 +0000
+++ 0098-net-bnxt-fix-VF-resource-allocation-strategy.patch 2022-02-21 15:22:44.198704367 +0000
@@ -1 +1 @@
-From 8496483099104c970720ae7baf5ab61aaa4611c7 Mon Sep 17 00:00:00 2001
+From 0f8f337740fb8d16c6566ac8d70761f786a6cf2e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8496483099104c970720ae7baf5ab61aaa4611c7 ]
+
@@ -23 +24,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'raw/ifpga/base: fix port feature ID' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (96 preceding siblings ...)
2022-02-21 15:34 ` patch 'net/bnxt: fix VF resource allocation strategy' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'net/memif: remove unnecessary Rx interrupt stub' " Kevin Traynor
` (96 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Wei Huang; +Cc: Tianfei Zhang, Rosen Xu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/5de680a4947a43079cd4e51231fa0a7872ce5094
Thanks.
Kevin
---
From 5de680a4947a43079cd4e51231fa0a7872ce5094 Mon Sep 17 00:00:00 2001
From: Wei Huang <wei.huang@intel.com>
Date: Mon, 24 Jan 2022 21:30:47 -0500
Subject: [PATCH] raw/ifpga/base: fix port feature ID
[ upstream commit e55d8d4c12f30eaccf0912420881e027d7f295f3 ]
Fix ID value of port features to match the definition from hardware.
Fixes: 473c88f9b391 ("drivers/raw: remove rawdev from directory names")
Signed-off-by: Wei Huang <wei.huang@intel.com>
Acked-by: Tianfei Zhang <tianfei.zhang@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
---
drivers/raw/ifpga/base/ifpga_defines.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/raw/ifpga/base/ifpga_defines.h b/drivers/raw/ifpga/base/ifpga_defines.h
index dca1518a83..8f6203392b 100644
--- a/drivers/raw/ifpga/base/ifpga_defines.h
+++ b/drivers/raw/ifpga/base/ifpga_defines.h
@@ -94,7 +94,7 @@ enum fpga_id_type {
#define PORT_FEATURE_ID_HEADER FEATURE_ID_FIU_HEADER
#define PORT_FEATURE_ID_ERROR 0x10
-#define PORT_FEATURE_ID_UMSG 0x12
-#define PORT_FEATURE_ID_UINT 0x13
-#define PORT_FEATURE_ID_STP 0x14
+#define PORT_FEATURE_ID_UMSG 0x11
+#define PORT_FEATURE_ID_UINT 0x12
+#define PORT_FEATURE_ID_STP 0x13
#define PORT_FEATURE_ID_UAFU FEATURE_ID_AFU
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.762309194 +0000
+++ 0099-raw-ifpga-base-fix-port-feature-ID.patch 2022-02-21 15:22:44.199704369 +0000
@@ -1 +1 @@
-From e55d8d4c12f30eaccf0912420881e027d7f295f3 Mon Sep 17 00:00:00 2001
+From 5de680a4947a43079cd4e51231fa0a7872ce5094 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e55d8d4c12f30eaccf0912420881e027d7f295f3 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/memif: remove unnecessary Rx interrupt stub' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (97 preceding siblings ...)
2022-02-21 15:34 ` patch 'raw/ifpga/base: fix port feature ID' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'net/hns3: fix Rx/Tx functions update' " Kevin Traynor
` (95 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Morten Brørup, Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/581e547a6fb5b8bc874d0abc60c6d4feb97a8082
Thanks.
Kevin
---
From 581e547a6fb5b8bc874d0abc60c6d4feb97a8082 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Fri, 14 Jan 2022 12:46:44 -0800
Subject: [PATCH] net/memif: remove unnecessary Rx interrupt stub
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit d6dccbd76692c64cff79a821bc73069dc5b043e4 ]
The code in memif driver to stub out rx_irq_enable is unnecessary
and causes different error returns than other drivers.
The core ethdev code will return -ENOTSUP if the driver has
a null rx_queue_intr_enable callback.
Fixes: 09c7e63a71f9 ("net/memif: introduce memory interface PMD")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
drivers/net/memif/rte_eth_memif.c | 19 -------------------
1 file changed, 19 deletions(-)
diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
index 59cb5a82a2..d3459c5007 100644
--- a/drivers/net/memif/rte_eth_memif.c
+++ b/drivers/net/memif/rte_eth_memif.c
@@ -1501,21 +1501,4 @@ memif_stats_reset(struct rte_eth_dev *dev)
}
-static int
-memif_rx_queue_intr_enable(struct rte_eth_dev *dev __rte_unused,
- uint16_t qid __rte_unused)
-{
- MIF_LOG(WARNING, "Interrupt mode not supported.");
-
- return -1;
-}
-
-static int
-memif_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t qid __rte_unused)
-{
- struct pmd_internals *pmd __rte_unused = dev->data->dev_private;
-
- return 0;
-}
-
static const struct eth_dev_ops ops = {
.dev_start = memif_dev_start,
@@ -1528,6 +1511,4 @@ static const struct eth_dev_ops ops = {
.rx_queue_release = memif_rx_queue_release,
.tx_queue_release = memif_tx_queue_release,
- .rx_queue_intr_enable = memif_rx_queue_intr_enable,
- .rx_queue_intr_disable = memif_rx_queue_intr_disable,
.link_update = memif_link_update,
.stats_get = memif_stats_get,
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.781078889 +0000
+++ 0100-net-memif-remove-unnecessary-Rx-interrupt-stub.patch 2022-02-21 15:22:44.200704371 +0000
@@ -1 +1 @@
-From d6dccbd76692c64cff79a821bc73069dc5b043e4 Mon Sep 17 00:00:00 2001
+From 581e547a6fb5b8bc874d0abc60c6d4feb97a8082 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit d6dccbd76692c64cff79a821bc73069dc5b043e4 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/hns3: fix Rx/Tx functions update' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (98 preceding siblings ...)
2022-02-21 15:34 ` patch 'net/memif: remove unnecessary Rx interrupt stub' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'net/hns3: fix mailbox wait time' " Kevin Traynor
` (94 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Min Hu (Connor); +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/e073f410fb2679c059487fb6fd9dfb4a9256ef05
Thanks.
Kevin
---
From e073f410fb2679c059487fb6fd9dfb4a9256ef05 Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Mon, 17 Jan 2022 10:43:00 +0800
Subject: [PATCH] net/hns3: fix Rx/Tx functions update
[ upstream commit 96c33cfb06cf59b785439058190060bde120f030 ]
When fast path operation is introduced, the Rx/Tx function is done by
object 'rte_eth_fp_ops'. So 'rte_eth_fp_ops' should be updated if
'fast-path functions' need to be changed, such as PMD receive function,
prepare function and so on.
This patch fixed receiving packets bug when fast path operation is
introduced.
Fixes: bba636698316 ("net/hns3: support Rx/Tx and related operations")
Fixes: 168b7d79dada ("net/hns3: support set link up/down for PF")
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
drivers/net/hns3/hns3_mp.c | 7 ++-----
drivers/net/hns3/hns3_rxtx.c | 28 +++++++++++++++++++++++++++-
2 files changed, 29 insertions(+), 6 deletions(-)
diff --git a/drivers/net/hns3/hns3_mp.c b/drivers/net/hns3/hns3_mp.c
index 999b407f7d..e74ddea195 100644
--- a/drivers/net/hns3/hns3_mp.c
+++ b/drivers/net/hns3/hns3_mp.c
@@ -75,5 +75,4 @@ mp_secondary_handle(const struct rte_mp_msg *mp_msg, const void *peer)
const struct hns3_mp_param *param =
(const struct hns3_mp_param *)mp_msg->param;
- eth_tx_prep_t prep = NULL;
struct rte_eth_dev *dev;
int ret;
@@ -99,12 +98,10 @@ mp_secondary_handle(const struct rte_mp_msg *mp_msg, const void *peer)
PMD_INIT_LOG(INFO, "port %u starting Tx datapath",
dev->data->port_id);
- dev->tx_pkt_burst = hns3_get_tx_function(dev, &prep);
- dev->tx_pkt_prepare = prep;
+ hns3_start_tx_datapath(dev);
break;
case HNS3_MP_REQ_STOP_TX:
PMD_INIT_LOG(INFO, "port %u stopping Tx datapath",
dev->data->port_id);
- dev->tx_pkt_burst = hns3_dummy_rxtx_burst;
- dev->tx_pkt_prepare = NULL;
+ hns3_stop_tx_datapath(dev);
break;
default:
diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index d240e36e6a..c86aeb2366 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -4409,5 +4409,19 @@ hns3_trace_rxtx_function(struct rte_eth_dev *dev)
}
-void hns3_set_rxtx_function(struct rte_eth_dev *eth_dev)
+static void
+hns3_eth_dev_fp_ops_config(const struct rte_eth_dev *dev)
+{
+ struct rte_eth_fp_ops *fpo = rte_eth_fp_ops;
+ uint16_t port_id = dev->data->port_id;
+
+ fpo[port_id].rx_pkt_burst = dev->rx_pkt_burst;
+ fpo[port_id].tx_pkt_burst = dev->tx_pkt_burst;
+ fpo[port_id].tx_pkt_prepare = dev->tx_pkt_prepare;
+ fpo[port_id].rx_descriptor_status = dev->rx_descriptor_status;
+ fpo[port_id].tx_descriptor_status = dev->tx_descriptor_status;
+}
+
+void
+hns3_set_rxtx_function(struct rte_eth_dev *eth_dev)
{
struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);
@@ -4430,4 +4444,6 @@ void hns3_set_rxtx_function(struct rte_eth_dev *eth_dev)
eth_dev->tx_pkt_prepare = NULL;
}
+
+ hns3_eth_dev_fp_ops_config(eth_dev);
}
@@ -4730,4 +4746,9 @@ hns3_stop_tx_datapath(struct rte_eth_dev *dev)
dev->tx_pkt_burst = hns3_dummy_rxtx_burst;
dev->tx_pkt_prepare = NULL;
+ hns3_eth_dev_fp_ops_config(dev);
+
+ if (rte_eal_process_type() == RTE_PROC_SECONDARY)
+ return;
+
rte_wmb();
/* Disable tx datapath on secondary process. */
@@ -4744,4 +4765,9 @@ hns3_start_tx_datapath(struct rte_eth_dev *dev)
dev->tx_pkt_burst = hns3_get_tx_function(dev, &prep);
dev->tx_pkt_prepare = prep;
+ hns3_eth_dev_fp_ops_config(dev);
+
+ if (rte_eal_process_type() == RTE_PROC_SECONDARY)
+ return;
+
hns3_mp_req_start_tx(dev);
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.802188793 +0000
+++ 0101-net-hns3-fix-Rx-Tx-functions-update.patch 2022-02-21 15:22:44.202704376 +0000
@@ -1 +1 @@
-From 96c33cfb06cf59b785439058190060bde120f030 Mon Sep 17 00:00:00 2001
+From e073f410fb2679c059487fb6fd9dfb4a9256ef05 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 96c33cfb06cf59b785439058190060bde120f030 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/hns3: fix mailbox wait time' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (99 preceding siblings ...)
2022-02-21 15:34 ` patch 'net/hns3: fix Rx/Tx functions update' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'net/hns3: fix vector Rx/Tx when PTP enabled' " Kevin Traynor
` (93 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Huisong Li; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/9c10b251a11f4842109a1bb59ad08bd78d89831c
Thanks.
Kevin
---
From 9c10b251a11f4842109a1bb59ad08bd78d89831c Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Mon, 17 Jan 2022 10:43:01 +0800
Subject: [PATCH] net/hns3: fix mailbox wait time
[ upstream commit 5a2b22b40f3052a8898194fd8c235440ad1d85d8 ]
The mailbox wait time can be specified at runtime. But the variable that
controls this time are not initialized when the variable isn't designated
or is specified as an invalid value, which will fail to initialize device
in the case where no device is bound to initialize the device.
Fixes: 2fc3e696a7f1 ("net/hns3: add runtime config for mailbox limit time")
Signed-off-by: Huisong Li <lihuisong@huawei.com>
---
drivers/net/hns3/hns3_common.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/net/hns3/hns3_common.c b/drivers/net/hns3/hns3_common.c
index 0bb552ea3e..78158401f2 100644
--- a/drivers/net/hns3/hns3_common.c
+++ b/drivers/net/hns3/hns3_common.c
@@ -217,5 +217,5 @@ hns3_parse_mbx_time_limit(const char *key, const char *value, void *extra_args)
/*
* 500ms is empirical value in process of mailbox communication. If
- * the delay value is set to one lower thanthe empirical value, mailbox
+ * the delay value is set to one lower than the empirical value, mailbox
* communication may fail.
*/
@@ -237,4 +237,10 @@ hns3_parse_devargs(struct rte_eth_dev *dev)
struct rte_kvargs *kvlist;
+ /* Set default value of runtime config parameters. */
+ hns->rx_func_hint = HNS3_IO_FUNC_HINT_NONE;
+ hns->tx_func_hint = HNS3_IO_FUNC_HINT_NONE;
+ hns->dev_caps_mask = 0;
+ hns->mbx_time_limit_ms = HNS3_MBX_DEF_TIME_LIMIT_MS;
+
if (dev->device->devargs == NULL)
return;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.823343567 +0000
+++ 0102-net-hns3-fix-mailbox-wait-time.patch 2022-02-21 15:22:44.203704378 +0000
@@ -1 +1 @@
-From 5a2b22b40f3052a8898194fd8c235440ad1d85d8 Mon Sep 17 00:00:00 2001
+From 9c10b251a11f4842109a1bb59ad08bd78d89831c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5a2b22b40f3052a8898194fd8c235440ad1d85d8 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/hns3: fix vector Rx/Tx when PTP enabled' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (100 preceding siblings ...)
2022-02-21 15:34 ` patch 'net/hns3: fix mailbox wait time' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'net/bonding: fix RSS with early configure' " Kevin Traynor
` (92 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Min Hu (Connor); +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/6492c9875d0b337d8f338f8020356d195fcd04e4
Thanks.
Kevin
---
From 6492c9875d0b337d8f338f8020356d195fcd04e4 Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Mon, 17 Jan 2022 10:43:02 +0800
Subject: [PATCH] net/hns3: fix vector Rx/Tx when PTP enabled
[ upstream commit 3ca3dcd6510127162aaef359cf5b28684693da07 ]
If hardware supports IEEE 1588 PTP, PTP capability will be set.
Currently, vec and sve burst is unsupported when PTP capability is set.
For sake of Rx/Tx performance, IEEE 1588 PTP is not supported in sve or
vec burst mode. When enabling IEEE 1588 PTP, Rx/Tx burst mode should be
simple or common. Rx/Tx burst mode could be set like this, for example:
-a 0000:35:00.0,rx_func_hint=common,tx_func_hint=common
This patch supports vec and sve burst when PTP is disabled. And only
support simple or common burst When PTP is enabled.
Fixes: 38b539d96eb6 ("net/hns3: support IEEE 1588 PTP")
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
doc/guides/nics/hns3.rst | 5 +++++
drivers/net/hns3/hns3_ethdev.c | 8 +-------
drivers/net/hns3/hns3_ptp.c | 1 +
drivers/net/hns3/hns3_rxtx.c | 29 +++++++++++++++++------------
drivers/net/hns3/hns3_rxtx_vec.c | 20 ++++++++++++--------
5 files changed, 36 insertions(+), 27 deletions(-)
diff --git a/doc/guides/nics/hns3.rst b/doc/guides/nics/hns3.rst
index 5f68a10ecf..791c9cc2ed 100644
--- a/doc/guides/nics/hns3.rst
+++ b/doc/guides/nics/hns3.rst
@@ -291,4 +291,9 @@ by kernel mode hns3 ethdev driver. VF is not supported when PF is driven by
DPDK driver.
+For sake of Rx/Tx performance, IEEE 1588 is not supported when using vec or
+sve burst function. When enabling IEEE 1588, Rx/Tx burst mode should be
+simple or common. It is recommended that enable IEEE 1588 before ethdev
+start. In this way, the correct Rx/Tx burst function can be selected.
+
Build with ICC is not supported yet.
X86-32, Power8, ARMv7 and BSD are not supported yet.
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 3b897492d3..ef13d31d19 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -228,15 +228,9 @@ out:
}
-static bool
-hns3_is_1588_event_type(uint32_t event_type)
-{
- return (event_type == HNS3_VECTOR0_EVENT_PTP);
-}
-
static void
hns3_clear_event_cause(struct hns3_hw *hw, uint32_t event_type, uint32_t regclr)
{
if (event_type == HNS3_VECTOR0_EVENT_RST ||
- hns3_is_1588_event_type(event_type))
+ event_type == HNS3_VECTOR0_EVENT_PTP)
hns3_write_dev(hw, HNS3_MISC_RESET_STS_REG, regclr);
else if (event_type == HNS3_VECTOR0_EVENT_MBX)
diff --git a/drivers/net/hns3/hns3_ptp.c b/drivers/net/hns3/hns3_ptp.c
index 9a829d7011..1442241a4e 100644
--- a/drivers/net/hns3/hns3_ptp.c
+++ b/drivers/net/hns3/hns3_ptp.c
@@ -126,4 +126,5 @@ hns3_timesync_enable(struct rte_eth_dev *dev)
if (pf->ptp_enable)
return 0;
+ hns3_warn(hw, "note: please ensure Rx/Tx burst mode is simple or common when enabling PTP!");
rte_spinlock_lock(&hw->lock);
diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index c86aeb2366..c43131cac6 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -2389,12 +2389,12 @@ hns3_rx_alloc_buffer(struct hns3_rx_queue *rxq)
}
-static inline void
+static void
hns3_rx_ptp_timestamp_handle(struct hns3_rx_queue *rxq, struct rte_mbuf *mbuf,
- volatile struct hns3_desc *rxd)
+ uint64_t timestamp)
{
struct hns3_pf *pf = HNS3_DEV_PRIVATE_TO_PF(rxq->hns);
- uint64_t timestamp = rte_le_to_cpu_64(rxd->timestamp);
- mbuf->ol_flags |= RTE_MBUF_F_RX_IEEE1588_PTP | RTE_MBUF_F_RX_IEEE1588_TMST;
+ mbuf->ol_flags |= RTE_MBUF_F_RX_IEEE1588_PTP |
+ RTE_MBUF_F_RX_IEEE1588_TMST;
if (hns3_timestamp_rx_dynflag > 0) {
*RTE_MBUF_DYNFIELD(mbuf, hns3_timestamp_dynfield_offset,
@@ -2470,5 +2470,6 @@ hns3_recv_pkts_simple(void *rx_queue,
if (unlikely(bd_base_info & BIT(HNS3_RXD_TS_VLD_B)))
- hns3_rx_ptp_timestamp_handle(rxq, rxm, rxdp);
+ hns3_rx_ptp_timestamp_handle(rxq, rxm,
+ rte_le_to_cpu_64(rxdp->timestamp));
dma_addr = rte_mbuf_data_iova_default(nmb);
@@ -2541,4 +2542,5 @@ hns3_recv_scattered_pkts(void *rx_queue,
struct rte_eth_dev *dev;
uint32_t bd_base_info;
+ uint64_t timestamp;
uint32_t l234_info;
uint32_t gro_size;
@@ -2650,4 +2652,7 @@ hns3_recv_scattered_pkts(void *rx_queue,
rxe->mbuf = nmb;
+ if (unlikely(bd_base_info & BIT(HNS3_RXD_TS_VLD_B)))
+ timestamp = rte_le_to_cpu_64(rxdp->timestamp);
+
dma_addr = rte_cpu_to_le_64(rte_mbuf_data_iova_default(nmb));
rxdp->rx.bd_base_info = 0;
@@ -2672,5 +2677,5 @@ hns3_recv_scattered_pkts(void *rx_queue,
if (unlikely(bd_base_info & BIT(HNS3_RXD_TS_VLD_B)))
- hns3_rx_ptp_timestamp_handle(rxq, first_seg, rxdp);
+ hns3_rx_ptp_timestamp_handle(rxq, first_seg, timestamp);
/*
@@ -4045,5 +4050,5 @@ hns3_tx_setup_4bd(struct hns3_desc *txdp, struct rte_mbuf **pkts)
{
#define PER_LOOP_NUM 4
- const uint16_t bd_flag = BIT(HNS3_TXD_VLD_B) | BIT(HNS3_TXD_FE_B);
+ uint16_t bd_flag = BIT(HNS3_TXD_VLD_B) | BIT(HNS3_TXD_FE_B);
uint64_t dma_addr;
uint32_t i;
@@ -4056,4 +4061,6 @@ hns3_tx_setup_4bd(struct hns3_desc *txdp, struct rte_mbuf **pkts)
txdp->tx.type_cs_vlan_tso_len = 0;
txdp->tx.ol_type_vlan_len_msec = 0;
+ if (unlikely((*pkts)->ol_flags & RTE_MBUF_F_TX_IEEE1588_TMST))
+ bd_flag |= BIT(HNS3_TXD_TSYN_B);
txdp->tx.tp_fe_sc_vld_ra_ri = rte_cpu_to_le_16(bd_flag);
}
@@ -4063,5 +4070,5 @@ static inline void
hns3_tx_setup_1bd(struct hns3_desc *txdp, struct rte_mbuf **pkts)
{
- const uint16_t bd_flag = BIT(HNS3_TXD_VLD_B) | BIT(HNS3_TXD_FE_B);
+ uint16_t bd_flag = BIT(HNS3_TXD_VLD_B) | BIT(HNS3_TXD_FE_B);
uint64_t dma_addr;
@@ -4072,4 +4079,6 @@ hns3_tx_setup_1bd(struct hns3_desc *txdp, struct rte_mbuf **pkts)
txdp->tx.type_cs_vlan_tso_len = 0;
txdp->tx.ol_type_vlan_len_msec = 0;
+ if (unlikely((*pkts)->ol_flags & RTE_MBUF_F_TX_IEEE1588_TMST))
+ bd_flag |= BIT(HNS3_TXD_TSYN_B);
txdp->tx.tp_fe_sc_vld_ra_ri = rte_cpu_to_le_16(bd_flag);
}
@@ -4313,8 +4322,4 @@ hns3_tx_check_simple_support(struct rte_eth_dev *dev)
uint64_t offloads = dev->data->dev_conf.txmode.offloads;
- struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
- if (hns3_dev_get_support(hw, PTP))
- return false;
-
return (offloads == (offloads & RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE));
}
diff --git a/drivers/net/hns3/hns3_rxtx_vec.c b/drivers/net/hns3/hns3_rxtx_vec.c
index 455110361a..73f0ab6bc8 100644
--- a/drivers/net/hns3/hns3_rxtx_vec.c
+++ b/drivers/net/hns3/hns3_rxtx_vec.c
@@ -18,8 +18,6 @@ hns3_tx_check_vec_support(struct rte_eth_dev *dev)
{
struct rte_eth_txmode *txmode = &dev->data->dev_conf.txmode;
-
- struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
- if (hns3_dev_get_support(hw, PTP))
- return -ENOTSUP;
+ struct hns3_adapter *hns = dev->data->dev_private;
+ struct hns3_pf *pf = &hns->pf;
/* Only support RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE */
@@ -27,4 +25,8 @@ hns3_tx_check_vec_support(struct rte_eth_dev *dev)
return -ENOTSUP;
+ /* Vec is not supported when PTP enabled */
+ if (pf->ptp_enable)
+ return -ENOTSUP;
+
return 0;
}
@@ -233,8 +235,6 @@ hns3_rx_check_vec_support(struct rte_eth_dev *dev)
uint64_t offloads_mask = RTE_ETH_RX_OFFLOAD_TCP_LRO |
RTE_ETH_RX_OFFLOAD_VLAN;
-
- struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
- if (hns3_dev_get_support(hw, PTP))
- return -ENOTSUP;
+ struct hns3_adapter *hns = dev->data->dev_private;
+ struct hns3_pf *pf = &hns->pf;
if (dev->data->scattered_rx)
@@ -250,4 +250,8 @@ hns3_rx_check_vec_support(struct rte_eth_dev *dev)
return -ENOTSUP;
+ /* Vec is not supported when PTP enabled */
+ if (pf->ptp_enable)
+ return -ENOTSUP;
+
return 0;
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.843086725 +0000
+++ 0103-net-hns3-fix-vector-Rx-Tx-when-PTP-enabled.patch 2022-02-21 15:22:44.208704389 +0000
@@ -1 +1 @@
-From 3ca3dcd6510127162aaef359cf5b28684693da07 Mon Sep 17 00:00:00 2001
+From 6492c9875d0b337d8f338f8020356d195fcd04e4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3ca3dcd6510127162aaef359cf5b28684693da07 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/bonding: fix RSS with early configure' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (101 preceding siblings ...)
2022-02-21 15:34 ` patch 'net/hns3: fix vector Rx/Tx when PTP enabled' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'net/nfp: free HW ring memzone on queue release' " Kevin Traynor
` (91 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Yu Wenjun; +Cc: Min Hu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/961922eb71e253dfb1ed0a2fb8e2ad012df49672
Thanks.
Kevin
---
From 961922eb71e253dfb1ed0a2fb8e2ad012df49672 Mon Sep 17 00:00:00 2001
From: Yu Wenjun <yuwenjun@cmss.chinamobile.com>
Date: Tue, 18 Jan 2022 17:18:52 +0800
Subject: [PATCH] net/bonding: fix RSS with early configure
[ upstream commit 4986aea2b879fb242ae04880eb0ed958f40d199a ]
RSS don't work when bond_ethdev_configure called before
rte_eth_bond_slave_add.
This is because internals->rss_key_len is 0 in bond_ethdev_configure().
If internals->rss_key_len is 0, internals->rss_key can not be set
properly.
e.g.:
doesn't work (examples/bond/main.c):
rte_eth_bond_create()
rte_eth_dev_configure()
rte_eth_bond_slave_add()
rte_eth_dev_start()
works (testpmd):
rte_eth_bond_create()
rte_eth_bond_slave_add()
rte_eth_dev_configure()
rte_eth_dev_start()
Fixing by using 'default_rss_key' when 'internals->rss_key_len' is 0.
Fixes: 6b1a001ec546 ("net/bonding: fix RSS key length")
Signed-off-by: Yu Wenjun <yuwenjun@cmss.chinamobile.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
---
drivers/net/bonding/rte_eth_bond_pmd.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 9607141b39..c72fc64806 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -3512,4 +3512,9 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
struct rte_eth_rss_conf *rss_conf =
&dev->data->dev_conf.rx_adv_conf.rss_conf;
+
+ if (internals->rss_key_len == 0) {
+ internals->rss_key_len = sizeof(default_rss_key);
+ }
+
if (rss_conf->rss_key != NULL) {
if (internals->rss_key_len > rss_conf->rss_key_len) {
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.868743570 +0000
+++ 0104-net-bonding-fix-RSS-with-early-configure.patch 2022-02-21 15:22:44.210704394 +0000
@@ -1 +1 @@
-From 4986aea2b879fb242ae04880eb0ed958f40d199a Mon Sep 17 00:00:00 2001
+From 961922eb71e253dfb1ed0a2fb8e2ad012df49672 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4986aea2b879fb242ae04880eb0ed958f40d199a ]
+
@@ -29 +30,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/nfp: free HW ring memzone on queue release' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (102 preceding siblings ...)
2022-02-21 15:34 ` patch 'net/bonding: fix RSS with early configure' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'net/hns3: fix using enum as boolean' " Kevin Traynor
` (90 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Heinrich Kuhn; +Cc: Simon Horman, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/9d6db3c3ada99139dc50a8cf225123c11dd9f433
Thanks.
Kevin
---
From 9d6db3c3ada99139dc50a8cf225123c11dd9f433 Mon Sep 17 00:00:00 2001
From: Heinrich Kuhn <heinrich.kuhn@corigine.com>
Date: Wed, 19 Jan 2022 13:48:00 +0200
Subject: [PATCH] net/nfp: free HW ring memzone on queue release
[ upstream commit 15174c40b70dfa89c1d94ff93ae756fae8d471bc ]
During Rx/Tx queue setup, memory is reserved for the hardware rings.
This memory zone should subsequently be freed in the queue release
logic. This commit also adds a call to the release logic in the
dev_close() callback so that the ring memzone may be freed during port
close too.
Fixes: b812daadad0d ("nfp: add Rx and Tx")
Signed-off-by: Heinrich Kuhn <heinrich.kuhn@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
---
drivers/net/nfp/nfp_ethdev.c | 2 ++
drivers/net/nfp/nfp_ethdev_vf.c | 2 ++
drivers/net/nfp/nfp_rxtx.c | 2 ++
3 files changed, 6 insertions(+)
diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c
index 8e81cc498f..9166f65da3 100644
--- a/drivers/net/nfp/nfp_ethdev.c
+++ b/drivers/net/nfp/nfp_ethdev.c
@@ -303,4 +303,5 @@ nfp_net_close(struct rte_eth_dev *dev)
this_tx_q = (struct nfp_net_txq *)dev->data->tx_queues[i];
nfp_net_reset_tx_queue(this_tx_q);
+ nfp_net_tx_queue_release(dev, i);
}
@@ -308,4 +309,5 @@ nfp_net_close(struct rte_eth_dev *dev)
this_rx_q = (struct nfp_net_rxq *)dev->data->rx_queues[i];
nfp_net_reset_rx_queue(this_rx_q);
+ nfp_net_rx_queue_release(dev, i);
}
diff --git a/drivers/net/nfp/nfp_ethdev_vf.c b/drivers/net/nfp/nfp_ethdev_vf.c
index 303ef72b1b..0034d68ea6 100644
--- a/drivers/net/nfp/nfp_ethdev_vf.c
+++ b/drivers/net/nfp/nfp_ethdev_vf.c
@@ -220,4 +220,5 @@ nfp_netvf_close(struct rte_eth_dev *dev)
this_tx_q = (struct nfp_net_txq *)dev->data->tx_queues[i];
nfp_net_reset_tx_queue(this_tx_q);
+ nfp_net_tx_queue_release(dev, i);
}
@@ -225,4 +226,5 @@ nfp_netvf_close(struct rte_eth_dev *dev)
this_rx_q = (struct nfp_net_rxq *)dev->data->rx_queues[i];
nfp_net_reset_rx_queue(this_rx_q);
+ nfp_net_rx_queue_release(dev, i);
}
diff --git a/drivers/net/nfp/nfp_rxtx.c b/drivers/net/nfp/nfp_rxtx.c
index 0fe1415596..335a90b2c9 100644
--- a/drivers/net/nfp/nfp_rxtx.c
+++ b/drivers/net/nfp/nfp_rxtx.c
@@ -471,4 +471,5 @@ nfp_net_rx_queue_release(struct rte_eth_dev *dev, uint16_t queue_idx)
if (rxq) {
nfp_net_rx_queue_release_mbufs(rxq);
+ rte_eth_dma_zone_free(dev, "rx_ring", queue_idx);
rte_free(rxq->rxbufs);
rte_free(rxq);
@@ -661,4 +662,5 @@ nfp_net_tx_queue_release(struct rte_eth_dev *dev, uint16_t queue_idx)
if (txq) {
nfp_net_tx_queue_release_mbufs(txq);
+ rte_eth_dma_zone_free(dev, "tx_ring", queue_idx);
rte_free(txq->txbufs);
rte_free(txq);
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.890309100 +0000
+++ 0105-net-nfp-free-HW-ring-memzone-on-queue-release.patch 2022-02-21 15:22:44.212704398 +0000
@@ -1 +1 @@
-From 15174c40b70dfa89c1d94ff93ae756fae8d471bc Mon Sep 17 00:00:00 2001
+From 9d6db3c3ada99139dc50a8cf225123c11dd9f433 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 15174c40b70dfa89c1d94ff93ae756fae8d471bc ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/hns3: fix using enum as boolean' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (103 preceding siblings ...)
2022-02-21 15:34 ` patch 'net/nfp: free HW ring memzone on queue release' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'vdpa/mlx5: workaround queue stop with traffic' " Kevin Traynor
` (89 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Huisong Li; +Cc: Min Hu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/ad51b31a30d84486b6eaab7bc41ff4ff4e165518
Thanks.
Kevin
---
From ad51b31a30d84486b6eaab7bc41ff4ff4e165518 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Sat, 22 Jan 2022 09:51:29 +0800
Subject: [PATCH] net/hns3: fix using enum as boolean
[ upstream commit 67d0b17947d6936147f4cbfff6ff938884f14776 ]
The enum type variables cannot be used as bool variables. This patch
fixes for "with->func" in hns3_action_rss_same().
Fixes: eb158fc756a5 ("net/hns3: fix config when creating RSS rule after flush")
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
---
drivers/net/hns3/hns3_flow.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 0dbc3f6502..b19e5d37a9 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1252,5 +1252,6 @@ hns3_action_rss_same(const struct rte_flow_action_rss *comp,
func_is_same = false;
else
- func_is_same = with->func ? (comp->func == with->func) : true;
+ func_is_same = (with->func != RTE_ETH_HASH_FUNCTION_DEFAULT) ?
+ (comp->func == with->func) : true;
return (func_is_same &&
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.910215763 +0000
+++ 0106-net-hns3-fix-using-enum-as-boolean.patch 2022-02-21 15:22:44.213704400 +0000
@@ -1 +1 @@
-From 67d0b17947d6936147f4cbfff6ff938884f14776 Mon Sep 17 00:00:00 2001
+From ad51b31a30d84486b6eaab7bc41ff4ff4e165518 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 67d0b17947d6936147f4cbfff6ff938884f14776 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 5f2b279546..00084872ad 100644
+index 0dbc3f6502..b19e5d37a9 100644
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'vdpa/mlx5: workaround queue stop with traffic' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (104 preceding siblings ...)
2022-02-21 15:34 ` patch 'net/hns3: fix using enum as boolean' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'net/virtio: fix Tx queue 0 overriden by queue 128' " Kevin Traynor
` (88 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Matan Azrad; +Cc: Xueming Li, Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/f05bbce1851d34a86ad6c1b7577916d8c8ae7dcf
Thanks.
Kevin
---
From f05bbce1851d34a86ad6c1b7577916d8c8ae7dcf Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan@nvidia.com>
Date: Mon, 22 Nov 2021 15:12:35 +0200
Subject: [PATCH] vdpa/mlx5: workaround queue stop with traffic
[ upstream commit b5e51edfbe18ee30b8fed5efdb09f2ab4c8a05a0 ]
When the event thread polls traffic and a virtq is stopping, the FW loses
synchronization in the virtq indexes.
It causes LM failure on synchronization between the HOST indexes to
the GUEST indexes.
Unset the event thread before the queue stop in the LM process.
Fixes: 31b9c29c86af ("vdpa/mlx5: support close and config operations")
Signed-off-by: Matan Azrad <matan@nvidia.com>
Acked-by: Xueming Li <xuemingl@nvidia.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
drivers/vdpa/mlx5/mlx5_vdpa.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/vdpa/mlx5/mlx5_vdpa.c b/drivers/vdpa/mlx5/mlx5_vdpa.c
index b9e84dd9bf..8dfaba791d 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa.c
@@ -251,8 +251,8 @@ mlx5_vdpa_dev_close(int vid)
return -1;
}
- if (priv->configured)
- ret |= mlx5_vdpa_lm_log(priv);
mlx5_vdpa_err_event_unset(priv);
mlx5_vdpa_cqe_event_unset(priv);
+ if (priv->configured)
+ ret |= mlx5_vdpa_lm_log(priv);
mlx5_vdpa_steer_unset(priv);
mlx5_vdpa_virtqs_release(priv);
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.931057404 +0000
+++ 0107-vdpa-mlx5-workaround-queue-stop-with-traffic.patch 2022-02-21 15:22:44.213704400 +0000
@@ -1 +1 @@
-From b5e51edfbe18ee30b8fed5efdb09f2ab4c8a05a0 Mon Sep 17 00:00:00 2001
+From f05bbce1851d34a86ad6c1b7577916d8c8ae7dcf Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b5e51edfbe18ee30b8fed5efdb09f2ab4c8a05a0 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/virtio: fix Tx queue 0 overriden by queue 128' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (105 preceding siblings ...)
2022-02-21 15:34 ` patch 'vdpa/mlx5: workaround queue stop with traffic' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'vdpa/ifc: fix log info mismatch' " Kevin Traynor
` (87 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Xueming Li; +Cc: Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/7c58dbf159c20c07cf3ec81171801971dba6873c
Thanks.
Kevin
---
From 7c58dbf159c20c07cf3ec81171801971dba6873c Mon Sep 17 00:00:00 2001
From: Xueming Li <xuemingl@nvidia.com>
Date: Thu, 2 Dec 2021 21:50:45 +0800
Subject: [PATCH] net/virtio: fix Tx queue 0 overriden by queue 128
[ upstream commit 8a886e573af9d25be33e333e9f5cfb48ddd3646c ]
Both Rx queue and Tx queue are VirtQ in virtio, VQ index is 256 for Tx
queue 128. Uint8 type of TxQ VQ index overflows and overrides Tx queue 0
data.
This patch fixes VQ index type with uint16 type.
Fixes: c1f86306a026 ("virtio: add new driver")
Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
drivers/net/virtio/virtio_rxtx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
index b39dd92d1b..4795893ec7 100644
--- a/drivers/net/virtio/virtio_rxtx.c
+++ b/drivers/net/virtio/virtio_rxtx.c
@@ -815,5 +815,5 @@ virtio_dev_tx_queue_setup(struct rte_eth_dev *dev,
const struct rte_eth_txconf *tx_conf)
{
- uint8_t vq_idx = 2 * queue_idx + VTNET_SQ_TQ_QUEUE_IDX;
+ uint16_t vq_idx = 2 * queue_idx + VTNET_SQ_TQ_QUEUE_IDX;
struct virtio_hw *hw = dev->data->dev_private;
struct virtqueue *vq = hw->vqs[vq_idx];
@@ -859,5 +859,5 @@ virtio_dev_tx_queue_setup_finish(struct rte_eth_dev *dev,
uint16_t queue_idx)
{
- uint8_t vq_idx = 2 * queue_idx + VTNET_SQ_TQ_QUEUE_IDX;
+ uint16_t vq_idx = 2 * queue_idx + VTNET_SQ_TQ_QUEUE_IDX;
struct virtio_hw *hw = dev->data->dev_private;
struct virtqueue *vq = hw->vqs[vq_idx];
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.949982807 +0000
+++ 0108-net-virtio-fix-Tx-queue-0-overriden-by-queue-128.patch 2022-02-21 15:22:44.214704403 +0000
@@ -1 +1 @@
-From 8a886e573af9d25be33e333e9f5cfb48ddd3646c Mon Sep 17 00:00:00 2001
+From 7c58dbf159c20c07cf3ec81171801971dba6873c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8a886e573af9d25be33e333e9f5cfb48ddd3646c ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'vdpa/ifc: fix log info mismatch' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (106 preceding siblings ...)
2022-02-21 15:34 ` patch 'net/virtio: fix Tx queue 0 overriden by queue 128' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:34 ` patch 'net/virtio-user: fix resource leak on probing failure' " Kevin Traynor
` (86 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Andy Pei; +Cc: Chenbo Xia, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/efc7ea9dd77d2cb74ad14715617cd087e2c31329
Thanks.
Kevin
---
From efc7ea9dd77d2cb74ad14715617cd087e2c31329 Mon Sep 17 00:00:00 2001
From: Andy Pei <andy.pei@intel.com>
Date: Mon, 13 Dec 2021 15:00:40 +0800
Subject: [PATCH] vdpa/ifc: fix log info mismatch
[ upstream commit 527ec438eb31d4d821624f74d7dfd3b0bcc1c28e ]
Fix log info mismatch.
Fixes: a3f8150eac6d ("net/ifcvf: add ifcvf vDPA driver")
Signed-off-by: Andy Pei <andy.pei@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
drivers/vdpa/ifc/base/ifcvf.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/drivers/vdpa/ifc/base/ifcvf.c b/drivers/vdpa/ifc/base/ifcvf.c
index 721cb1da8a..d10c1fd6a4 100644
--- a/drivers/vdpa/ifc/base/ifcvf.c
+++ b/drivers/vdpa/ifc/base/ifcvf.c
@@ -95,10 +95,12 @@ next:
}
- DEBUGOUT("capability mapping:\ncommon cfg: %p\n"
- "notify base: %p\nisr cfg: %p\ndevice cfg: %p\n"
- "multiplier: %u\n",
- hw->common_cfg, hw->dev_cfg,
- hw->isr, hw->notify_base,
- hw->notify_off_multiplier);
+ DEBUGOUT("capability mapping:\n"
+ "common cfg: %p\n"
+ "notify base: %p\n"
+ "isr cfg: %p\n"
+ "device cfg: %p\n"
+ "multiplier: %u\n",
+ hw->common_cfg, hw->notify_base, hw->isr, hw->dev_cfg,
+ hw->notify_off_multiplier);
return 0;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.970209890 +0000
+++ 0109-vdpa-ifc-fix-log-info-mismatch.patch 2022-02-21 15:22:44.215704405 +0000
@@ -1 +1 @@
-From 527ec438eb31d4d821624f74d7dfd3b0bcc1c28e Mon Sep 17 00:00:00 2001
+From efc7ea9dd77d2cb74ad14715617cd087e2c31329 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 527ec438eb31d4d821624f74d7dfd3b0bcc1c28e ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/virtio-user: fix resource leak on probing failure' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (107 preceding siblings ...)
2022-02-21 15:34 ` patch 'vdpa/ifc: fix log info mismatch' " Kevin Traynor
@ 2022-02-21 15:34 ` Kevin Traynor
2022-02-21 15:35 ` patch 'net/virtio-user: check FD flags getting " Kevin Traynor
` (85 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:34 UTC (permalink / raw)
To: Harold Huang; +Cc: Chenbo Xia, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/4210bb89d806c0898c9594f52213af4069e8fb36
Thanks.
Kevin
---
From 4210bb89d806c0898c9594f52213af4069e8fb36 Mon Sep 17 00:00:00 2001
From: Harold Huang <baymaxhuang@gmail.com>
Date: Thu, 23 Dec 2021 12:42:37 +0800
Subject: [PATCH] net/virtio-user: fix resource leak on probing failure
[ upstream commit edca47a1d9e01cb6f9bd174cc1cbefce1af7fd37 ]
When eth_virtio_dev_init is failed, the registered virtio user memory
event cb is not released and the backend created tap device is not
destroyed. It would cause some residual tap device existed in the host
and creating a new vdev could be failed because the new virtio_user_dev
could use the same address pointer and register memory event cb to the
same address is not allowed.
Fixes: ca8326a94365 ("net/virtio_user: fix error management during init")
Signed-off-by: Harold Huang <baymaxhuang@gmail.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
drivers/net/virtio/virtio_user_ethdev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c
index 0271098f0d..16eca2f940 100644
--- a/drivers/net/virtio/virtio_user_ethdev.c
+++ b/drivers/net/virtio/virtio_user_ethdev.c
@@ -667,4 +667,5 @@ virtio_user_pmd_probe(struct rte_vdev_device *vdev)
if (eth_virtio_dev_init(eth_dev) < 0) {
PMD_INIT_LOG(ERR, "eth_virtio_dev_init fails");
+ virtio_user_dev_uninit(dev);
virtio_user_eth_dev_free(eth_dev);
goto end;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:46.988793410 +0000
+++ 0110-net-virtio-user-fix-resource-leak-on-probing-failure.patch 2022-02-21 15:22:44.215704405 +0000
@@ -1 +1 @@
-From edca47a1d9e01cb6f9bd174cc1cbefce1af7fd37 Mon Sep 17 00:00:00 2001
+From 4210bb89d806c0898c9594f52213af4069e8fb36 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit edca47a1d9e01cb6f9bd174cc1cbefce1af7fd37 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/virtio-user: check FD flags getting failure' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (108 preceding siblings ...)
2022-02-21 15:34 ` patch 'net/virtio-user: fix resource leak on probing failure' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'net/virtio: fix uninitialized RSS key' " Kevin Traynor
` (84 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Yunjian Wang; +Cc: Chenbo Xia, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/0d2ddde4191af057c9b822728dbf8592874367b5
Thanks.
Kevin
---
From 0d2ddde4191af057c9b822728dbf8592874367b5 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Sat, 8 Jan 2022 15:52:31 +0800
Subject: [PATCH] net/virtio-user: check FD flags getting failure
[ upstream commit 6abf10a21b293cb427ef21c59f490592717cb211 ]
The function fcntl() could return errors,
the return value need to be checked.
Fixes: 6a84c37e3975 ("net/virtio-user: add vhost-user adapter layer")
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
drivers/net/virtio/virtio_user/vhost_user.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/virtio/virtio_user/vhost_user.c b/drivers/net/virtio/virtio_user/vhost_user.c
index cc830a660f..0a39393c45 100644
--- a/drivers/net/virtio/virtio_user/vhost_user.c
+++ b/drivers/net/virtio/virtio_user/vhost_user.c
@@ -841,6 +841,8 @@ vhost_user_setup(struct virtio_user_dev *dev)
flag = fcntl(fd, F_GETFD);
- if (fcntl(fd, F_SETFD, flag | FD_CLOEXEC) < 0)
- PMD_DRV_LOG(WARNING, "fcntl failed, %s", strerror(errno));
+ if (flag == -1)
+ PMD_DRV_LOG(WARNING, "fcntl get fd failed, %s", strerror(errno));
+ else if (fcntl(fd, F_SETFD, flag | FD_CLOEXEC) < 0)
+ PMD_DRV_LOG(WARNING, "fcntl set fd failed, %s", strerror(errno));
memset(&un, 0, sizeof(un));
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.008201052 +0000
+++ 0111-net-virtio-user-check-FD-flags-getting-failure.patch 2022-02-21 15:22:44.216704407 +0000
@@ -1 +1 @@
-From 6abf10a21b293cb427ef21c59f490592717cb211 Mon Sep 17 00:00:00 2001
+From 0d2ddde4191af057c9b822728dbf8592874367b5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6abf10a21b293cb427ef21c59f490592717cb211 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/virtio: fix uninitialized RSS key' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (109 preceding siblings ...)
2022-02-21 15:35 ` patch 'net/virtio-user: check FD flags getting " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'common/mlx5: fix MR lookup for non-contiguous mempool' " Kevin Traynor
` (83 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Yunjian Wang; +Cc: Chenbo Xia, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/4c4c0cf459e56886b2ae58c0cc7d64c1b7032f57
Thanks.
Kevin
---
From 4c4c0cf459e56886b2ae58c0cc7d64c1b7032f57 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Sat, 8 Jan 2022 16:14:21 +0800
Subject: [PATCH] net/virtio: fix uninitialized RSS key
[ upstream commit 0f7438e6d4009a52482d6a662f440ab067e63c60 ]
This patch fixes an issue that uninitialized old_rss_key
is used for restoring the rss_key.
Coverity issue: 373866
Fixes: 0c9d66207054 ("net/virtio: support RSS")
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
drivers/net/virtio/virtio_ethdev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index b317649d7e..d180162abd 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -2029,5 +2029,6 @@ virtio_dev_rss_hash_update(struct rte_eth_dev *dev,
return 0;
restore_key:
- memcpy(hw->rss_key, old_rss_key, VIRTIO_NET_RSS_KEY_SIZE);
+ if (rss_conf->rss_key && rss_conf->rss_key_len)
+ memcpy(hw->rss_key, old_rss_key, VIRTIO_NET_RSS_KEY_SIZE);
restore_types:
hw->rss_hash_types = old_hash_types;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.026749357 +0000
+++ 0112-net-virtio-fix-uninitialized-RSS-key.patch 2022-02-21 15:22:44.217704410 +0000
@@ -1 +1 @@
-From 0f7438e6d4009a52482d6a662f440ab067e63c60 Mon Sep 17 00:00:00 2001
+From 4c4c0cf459e56886b2ae58c0cc7d64c1b7032f57 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0f7438e6d4009a52482d6a662f440ab067e63c60 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'common/mlx5: fix MR lookup for non-contiguous mempool' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (110 preceding siblings ...)
2022-02-21 15:35 ` patch 'net/virtio: fix uninitialized RSS key' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'net/mlx5: fix mark enabling for Rx' " Kevin Traynor
` (82 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Dmitry Kozlyuk; +Cc: Wang Yunjian, Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/d157628041950df5ed147c75272c9362c05e2fe9
Thanks.
Kevin
---
From d157628041950df5ed147c75272c9362c05e2fe9 Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Date: Fri, 14 Jan 2022 12:52:17 +0200
Subject: [PATCH] common/mlx5: fix MR lookup for non-contiguous mempool
[ upstream commit 2eb92b0fbbabcb1fb49d2006de7682cca80ebea7 ]
Memory region (MR) lookup by address inside mempool MRs
was not accounting for the upper bound of an MR.
For mempools covered by multiple MRs this could return
a wrong MR LKey, typically resulting in an unrecoverable
TxQ failure:
mlx5_net: Cannot change Tx QP state to INIT Invalid argument
Corresponding message from /var/log/dpdk_mlx5_port_X_txq_Y_index_Z*:
Unexpected CQE error syndrome 0x04 CQN = 128 SQN = 4848
wqe_counter = 0 wq_ci = 9 cq_ci = 122
This is likely to happen with --legacy-mem and IOVA-as-PA,
because EAL intentionally maps pages at non-adjacent PA
to non-adjacent VA in this mode, and MLX5 PMD works with VA.
Fixes: 690b2a88c2f7 ("common/mlx5: add mempool registration facilities")
Reported-by: Wang Yunjian <wangyunjian@huawei.com>
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Reviewed-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/common/mlx5/mlx5_common_mr.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/common/mlx5/mlx5_common_mr.c b/drivers/common/mlx5/mlx5_common_mr.c
index 1537b5d428..5f7e4f6734 100644
--- a/drivers/common/mlx5/mlx5_common_mr.c
+++ b/drivers/common/mlx5/mlx5_common_mr.c
@@ -1835,10 +1835,11 @@ mlx5_mempool_reg_addr2mr(struct mlx5_mempool_reg *mpr, uintptr_t addr,
for (i = 0; i < mpr->mrs_n; i++) {
const struct mlx5_pmd_mr *mr = &mpr->mrs[i].pmd_mr;
- uintptr_t mr_addr = (uintptr_t)mr->addr;
+ uintptr_t mr_start = (uintptr_t)mr->addr;
+ uintptr_t mr_end = mr_start + mr->len;
- if (mr_addr <= addr) {
+ if (mr_start <= addr && addr < mr_end) {
lkey = rte_cpu_to_be_32(mr->lkey);
- entry->start = mr_addr;
- entry->end = mr_addr + mr->len;
+ entry->start = mr_start;
+ entry->end = mr_end;
entry->lkey = lkey;
break;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.048057132 +0000
+++ 0113-common-mlx5-fix-MR-lookup-for-non-contiguous-mempool.patch 2022-02-21 15:22:44.218704412 +0000
@@ -1 +1 @@
-From 2eb92b0fbbabcb1fb49d2006de7682cca80ebea7 Mon Sep 17 00:00:00 2001
+From d157628041950df5ed147c75272c9362c05e2fe9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2eb92b0fbbabcb1fb49d2006de7682cca80ebea7 ]
+
@@ -24 +25,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/mlx5: fix mark enabling for Rx' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (111 preceding siblings ...)
2022-02-21 15:35 ` patch 'common/mlx5: fix MR lookup for non-contiguous mempool' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'common/mlx5: fix probing failure code' " Kevin Traynor
` (81 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Raja Zidane; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/99f5cd0dc3a0453b2572e2b56364618183e26ef5
Thanks.
Kevin
---
From 99f5cd0dc3a0453b2572e2b56364618183e26ef5 Mon Sep 17 00:00:00 2001
From: Raja Zidane <rzidane@nvidia.com>
Date: Sun, 16 Jan 2022 15:23:47 +0000
Subject: [PATCH] net/mlx5: fix mark enabling for Rx
[ upstream commit 082becbf1f35bda03a9ad80fcd7fe4afe3aea7be ]
To optimize datapath, the mlx5 pmd checked for mark action on flow
creation, and flagged possible destination rxqs (through queue/RSS
actions), then it enabled the mark action logic only for flagged rxqs.
Mark action didn't work if no queue/rss action was in the same flow,
even when the user use multi-group logic to manage the flows.
So, if mark action is performed in group X and the packet is moved to
group Y > X when the packet is forwarded to Rx queues, SW did not get
the mark ID to the mbuf.
Flag Rx datapath to report mark action for any queue when the driver
detects the first mark action after dev_start operation.
Fixes: 8e61555657b2 ("net/mlx5: fix shared RSS and mark actions combination")
Signed-off-by: Raja Zidane <rzidane@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/mlx5.h | 1 +
drivers/net/mlx5/mlx5_flow.c | 53 ++++++++++++++++--------------
drivers/net/mlx5/mlx5_flow.h | 2 +-
drivers/net/mlx5/mlx5_flow_dv.c | 14 +++++---
drivers/net/mlx5/mlx5_flow_verbs.c | 4 +--
drivers/net/mlx5/mlx5_rx.h | 1 -
6 files changed, 41 insertions(+), 34 deletions(-)
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 9413e3397c..737ad6895c 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -1414,4 +1414,5 @@ struct mlx5_priv {
unsigned int mtr_reg_share:1; /* Whether support meter REG_C share. */
unsigned int lb_used:1; /* Loopback queue is referred to. */
+ uint32_t mark_enabled:1; /* If mark action is enabled on rxqs. */
uint16_t domain_id; /* Switch domain identifier. */
uint16_t vport_id; /* Associated VF vport index (if any). */
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 2cadf615ec..d7cb1eb89b 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -1235,5 +1235,4 @@ flow_drv_rxq_flags_set(struct rte_eth_dev *dev,
{
struct mlx5_priv *priv = dev->data->dev_private;
- const int mark = dev_handle->mark;
const int tunnel = !!(dev_handle->layers & MLX5_FLOW_LAYER_TUNNEL);
struct mlx5_ind_table_obj *ind_tbl = NULL;
@@ -1270,13 +1269,4 @@ flow_drv_rxq_flags_set(struct rte_eth_dev *dev,
* from other port - not from local flows only.
*/
- if (priv->config.dv_flow_en &&
- priv->config.dv_xmeta_en != MLX5_XMETA_MODE_LEGACY &&
- mlx5_flow_ext_mreg_supported(dev)) {
- rxq_ctrl->rxq.mark = 1;
- rxq_ctrl->flow_mark_n = 1;
- } else if (mark) {
- rxq_ctrl->rxq.mark = 1;
- rxq_ctrl->flow_mark_n++;
- }
if (tunnel) {
unsigned int j;
@@ -1296,4 +1286,18 @@ flow_drv_rxq_flags_set(struct rte_eth_dev *dev,
}
+static void
+flow_rxq_mark_flag_set(struct rte_eth_dev *dev)
+{
+ struct mlx5_priv *priv = dev->data->dev_private;
+ struct mlx5_rxq_ctrl *rxq_ctrl;
+
+ if (priv->mark_enabled)
+ return;
+ LIST_FOREACH(rxq_ctrl, &priv->rxqsctrl, next) {
+ rxq_ctrl->rxq.mark = 1;
+ }
+ priv->mark_enabled = 1;
+}
+
/**
* Set the Rx queue flags (Mark/Flag and Tunnel Ptypes) for a flow
@@ -1310,5 +1314,9 @@ flow_rxq_flags_set(struct rte_eth_dev *dev, struct rte_flow *flow)
uint32_t handle_idx;
struct mlx5_flow_handle *dev_handle;
+ struct mlx5_flow_workspace *wks = mlx5_flow_get_thread_workspace();
+ MLX5_ASSERT(wks);
+ if (wks->mark)
+ flow_rxq_mark_flag_set(dev);
SILIST_FOREACH(priv->sh->ipool[MLX5_IPOOL_MLX5_FLOW], flow->dev_handles,
handle_idx, dev_handle, next)
@@ -1330,5 +1338,4 @@ flow_drv_rxq_flags_trim(struct rte_eth_dev *dev,
{
struct mlx5_priv *priv = dev->data->dev_private;
- const int mark = dev_handle->mark;
const int tunnel = !!(dev_handle->layers & MLX5_FLOW_LAYER_TUNNEL);
struct mlx5_ind_table_obj *ind_tbl = NULL;
@@ -1361,13 +1368,4 @@ flow_drv_rxq_flags_trim(struct rte_eth_dev *dev,
if (rxq_ctrl == NULL)
continue;
- if (priv->config.dv_flow_en &&
- priv->config.dv_xmeta_en != MLX5_XMETA_MODE_LEGACY &&
- mlx5_flow_ext_mreg_supported(dev)) {
- rxq_ctrl->rxq.mark = 1;
- rxq_ctrl->flow_mark_n = 1;
- } else if (mark) {
- rxq_ctrl->flow_mark_n--;
- rxq_ctrl->rxq.mark = !!rxq_ctrl->flow_mark_n;
- }
if (tunnel) {
unsigned int j;
@@ -1426,5 +1424,4 @@ flow_rxq_flags_clear(struct rte_eth_dev *dev)
if (rxq == NULL || rxq->ctrl == NULL)
continue;
- rxq->ctrl->flow_mark_n = 0;
rxq->ctrl->rxq.mark = 0;
for (j = 0; j != MLX5_FLOW_TUNNEL; ++j)
@@ -1432,4 +1429,5 @@ flow_rxq_flags_clear(struct rte_eth_dev *dev)
rxq->ctrl->rxq.tunnel = 0;
}
+ priv->mark_enabled = 0;
}
@@ -4812,4 +4810,5 @@ flow_create_split_inner(struct rte_eth_dev *dev,
{
struct mlx5_flow *dev_flow;
+ struct mlx5_flow_workspace *wks = mlx5_flow_get_thread_workspace();
dev_flow = flow_drv_prepare(dev, flow, attr, items, actions,
@@ -4830,6 +4829,8 @@ flow_create_split_inner(struct rte_eth_dev *dev,
if (flow_split_info->prefix_layers)
dev_flow->handle->layers = flow_split_info->prefix_layers;
- if (flow_split_info->prefix_mark)
- dev_flow->handle->mark = 1;
+ if (flow_split_info->prefix_mark) {
+ MLX5_ASSERT(wks);
+ wks->mark = 1;
+ }
if (sub_flow)
*sub_flow = dev_flow;
@@ -6144,5 +6145,5 @@ flow_create_split_meter(struct rte_eth_dev *dev,
flow_split_info->prefix_layers =
flow_get_prefix_layer_flags(dev_flow);
- flow_split_info->prefix_mark |= dev_flow->handle->mark;
+ flow_split_info->prefix_mark |= wks->mark;
flow_split_info->table_id = MLX5_MTR_TABLE_ID_SUFFIX;
}
@@ -6210,4 +6211,5 @@ flow_create_split_sample(struct rte_eth_dev *dev,
struct mlx5_flow_tbl_data_entry *sfx_tbl_data;
struct mlx5_flow_tbl_resource *sfx_tbl;
+ struct mlx5_flow_workspace *wks = mlx5_flow_get_thread_workspace();
#endif
size_t act_size;
@@ -6296,5 +6298,6 @@ flow_create_split_sample(struct rte_eth_dev *dev,
flow_split_info->prefix_layers =
flow_get_prefix_layer_flags(dev_flow);
- flow_split_info->prefix_mark |= dev_flow->handle->mark;
+ MLX5_ASSERT(wks);
+ flow_split_info->prefix_mark |= wks->mark;
/* Suffix group level already be scaled with factor, set
* MLX5_SCALE_FLOW_GROUP_BIT of skip_scale to 1 to avoid scale
diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index 125d85899c..7fec79afb3 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -698,5 +698,4 @@ struct mlx5_flow_handle {
uint32_t split_flow_id:27; /**< Sub flow unique match flow id. */
uint32_t is_meter_flow_id:1; /**< Indicate if flow_id is for meter. */
- uint32_t mark:1; /**< Metadata rxq mark flag. */
uint32_t fate_action:3; /**< Fate action type. */
uint32_t flex_item; /**< referenced Flex Item bitmask. */
@@ -1109,4 +1108,5 @@ struct mlx5_flow_workspace {
uint32_t skip_matcher_reg:1;
/* Indicates if need to skip matcher register in translate. */
+ uint32_t mark:1; /* Indicates if flow contains mark action. */
};
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 0383976883..18992b1e26 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -11647,5 +11647,5 @@ flow_dv_translate_action_sample(struct rte_eth_dev *dev,
(sub_actions->conf))->id);
- dev_flow->handle->mark = 1;
+ wks->mark = 1;
pre_rix = dev_flow->handle->dvh.rix_tag;
/* Save the mark resource before sample */
@@ -12807,5 +12807,5 @@ flow_dv_translate(struct rte_eth_dev *dev,
case RTE_FLOW_ACTION_TYPE_FLAG:
action_flags |= MLX5_FLOW_ACTION_FLAG;
- dev_flow->handle->mark = 1;
+ wks->mark = 1;
if (dev_conf->dv_xmeta_en != MLX5_XMETA_MODE_LEGACY) {
struct rte_flow_action_mark mark = {
@@ -12836,5 +12836,5 @@ flow_dv_translate(struct rte_eth_dev *dev,
case RTE_FLOW_ACTION_TYPE_MARK:
action_flags |= MLX5_FLOW_ACTION_MARK;
- dev_flow->handle->mark = 1;
+ wks->mark = 1;
if (dev_conf->dv_xmeta_en != MLX5_XMETA_MODE_LEGACY) {
const struct rte_flow_action_mark *mark =
@@ -15404,5 +15404,7 @@ __flow_dv_create_domain_policy_acts(struct rte_eth_dev *dev,
} mhdr_dummy;
struct mlx5_flow_dv_modify_hdr_resource *mhdr_res = &mhdr_dummy.res;
+ struct mlx5_flow_workspace *wks = mlx5_flow_get_thread_workspace();
+ MLX5_ASSERT(wks);
egress = (domain == MLX5_MTR_DOMAIN_EGRESS) ? 1 : 0;
transfer = (domain == MLX5_MTR_DOMAIN_TRANSFER) ? 1 : 0;
@@ -15442,5 +15444,5 @@ __flow_dv_create_domain_policy_acts(struct rte_eth_dev *dev,
"cannot create policy "
"mark action for this color");
- dev_flow.handle->mark = 1;
+ wks->mark = 1;
if (flow_dv_tag_resource_register(dev, tag_be,
&dev_flow, &flow_err))
@@ -16867,5 +16869,7 @@ __flow_dv_meter_get_rss_sub_policy(struct rte_eth_dev *dev,
uint32_t domain = MLX5_MTR_DOMAIN_INGRESS;
uint16_t sub_policy_num;
+ struct mlx5_flow_workspace *wks = mlx5_flow_get_thread_workspace();
+ MLX5_ASSERT(wks);
rte_spinlock_lock(&mtr_policy->sl);
for (i = 0; i < MLX5_MTR_RTE_COLORS; i++) {
@@ -16941,5 +16945,5 @@ __flow_dv_meter_get_rss_sub_policy(struct rte_eth_dev *dev,
memset(&dh, 0, sizeof(struct mlx5_flow_handle));
if (act_cnt->rix_mark)
- dh.mark = 1;
+ wks->mark = 1;
dh.fate_action = MLX5_FLOW_FATE_QUEUE;
dh.rix_hrxq = hrxq_idx[i];
diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c b/drivers/net/mlx5/mlx5_flow_verbs.c
index 192a00d4fd..90ccb9aaff 100644
--- a/drivers/net/mlx5/mlx5_flow_verbs.c
+++ b/drivers/net/mlx5/mlx5_flow_verbs.c
@@ -1694,10 +1694,10 @@ flow_verbs_translate(struct rte_eth_dev *dev,
flow_verbs_translate_action_flag(dev_flow, actions);
action_flags |= MLX5_FLOW_ACTION_FLAG;
- dev_flow->handle->mark = 1;
+ wks->mark = 1;
break;
case RTE_FLOW_ACTION_TYPE_MARK:
flow_verbs_translate_action_mark(dev_flow, actions);
action_flags |= MLX5_FLOW_ACTION_MARK;
- dev_flow->handle->mark = 1;
+ wks->mark = 1;
break;
case RTE_FLOW_ACTION_TYPE_DROP:
diff --git a/drivers/net/mlx5/mlx5_rx.h b/drivers/net/mlx5/mlx5_rx.h
index c178f9a24b..cb5d51340d 100644
--- a/drivers/net/mlx5/mlx5_rx.h
+++ b/drivers/net/mlx5/mlx5_rx.h
@@ -162,5 +162,4 @@ struct mlx5_rxq_ctrl {
unsigned int started:1; /* Whether (shared) RXQ has been started. */
unsigned int irq:1; /* Whether IRQ is enabled. */
- uint32_t flow_mark_n; /* Number of Mark/Flag flows using this Queue. */
uint32_t flow_tunnels_n[MLX5_FLOW_TUNNEL]; /* Tunnels counters. */
uint32_t wqn; /* WQ number. */
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.067081590 +0000
+++ 0114-net-mlx5-fix-mark-enabling-for-Rx.patch 2022-02-21 15:22:44.237704455 +0000
@@ -1 +1 @@
-From 082becbf1f35bda03a9ad80fcd7fe4afe3aea7be Mon Sep 17 00:00:00 2001
+From 99f5cd0dc3a0453b2572e2b56364618183e26ef5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 082becbf1f35bda03a9ad80fcd7fe4afe3aea7be ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'common/mlx5: fix probing failure code' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (112 preceding siblings ...)
2022-02-21 15:35 ` patch 'net/mlx5: fix mark enabling for Rx' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'net/mlx5: reject jump to root table' " Kevin Traynor
` (80 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Bing Zhao; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/bc3452d45d9e24820763ee0c16781b0ef2fa09ba
Thanks.
Kevin
---
From bc3452d45d9e24820763ee0c16781b0ef2fa09ba Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@nvidia.com>
Date: Mon, 17 Jan 2022 19:49:14 +0200
Subject: [PATCH] common/mlx5: fix probing failure code
[ upstream commit b4a4159d4e6323dd9ccd31d11cfe42bbc1e897f6 ]
While probing the device with unsupported class, the process should
fail because no appropriate driver was found. After traversing all
the drivers, an error value should be returned for the case.
In the previous implementation, zero value indicating probing success
was wrongly returned.
Fixes: ad435d320473 ("common/mlx5: add bus-agnostic layer")
Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/common/mlx5/mlx5_common.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/common/mlx5/mlx5_common.c b/drivers/common/mlx5/mlx5_common.c
index 185db4d004..47a541f5ef 100644
--- a/drivers/common/mlx5/mlx5_common.c
+++ b/drivers/common/mlx5/mlx5_common.c
@@ -645,5 +645,5 @@ drivers_probe(struct mlx5_common_device *cdev, uint32_t user_classes)
uint32_t enabled_classes = 0;
bool already_loaded;
- int ret;
+ int ret = -EINVAL;
TAILQ_FOREACH(driver, &drivers_list, next) {
@@ -667,6 +667,8 @@ drivers_probe(struct mlx5_common_device *cdev, uint32_t user_classes)
enabled_classes |= driver->drv_class;
}
- cdev->classes_loaded |= enabled_classes;
- return 0;
+ if (!ret) {
+ cdev->classes_loaded |= enabled_classes;
+ return 0;
+ }
probe_err:
/*
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.107665265 +0000
+++ 0115-common-mlx5-fix-probing-failure-code.patch 2022-02-21 15:22:44.237704455 +0000
@@ -1 +1 @@
-From b4a4159d4e6323dd9ccd31d11cfe42bbc1e897f6 Mon Sep 17 00:00:00 2001
+From bc3452d45d9e24820763ee0c16781b0ef2fa09ba Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b4a4159d4e6323dd9ccd31d11cfe42bbc1e897f6 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/mlx5: reject jump to root table' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (113 preceding siblings ...)
2022-02-21 15:35 ` patch 'common/mlx5: fix probing failure code' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'doc: update matching versions in ice guide' " Kevin Traynor
` (79 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Xiaoyu Min; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/37d27abc59d3c56577cb31877741c3d6255bedb1
Thanks.
Kevin
---
From 37d27abc59d3c56577cb31877741c3d6255bedb1 Mon Sep 17 00:00:00 2001
From: Xiaoyu Min <jackmin@nvidia.com>
Date: Tue, 18 Jan 2022 19:38:50 +0800
Subject: [PATCH] net/mlx5: reject jump to root table
[ upstream commit 87b26522f7ff65375fb1d773a7f93c70bf857b96 ]
Currently root table as destination is not supported.
The jump action which finally be translated to underlying root table in
rdma-core should be rejected.
Fixes: f78f747f41d0 ("net/mlx5: allow jump to group lower than current")
Signed-off-by: Xiaoyu Min <jackmin@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 18992b1e26..af90a7fd0a 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -4969,5 +4969,5 @@ flow_dv_validate_action_jump(struct rte_eth_dev *dev,
bool external, struct rte_flow_error *error)
{
- uint32_t target_group, table;
+ uint32_t target_group, table = 0;
int ret = 0;
struct flow_grp_info grp_info = {
@@ -5000,4 +5000,8 @@ flow_dv_validate_action_jump(struct rte_eth_dev *dev,
"target group must be other than"
" the current flow group");
+ if (table == 0)
+ return rte_flow_error_set(error, EINVAL,
+ RTE_FLOW_ERROR_TYPE_ACTION_CONF,
+ NULL, "root table shouldn't be destination");
return 0;
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.126863188 +0000
+++ 0116-net-mlx5-reject-jump-to-root-table.patch 2022-02-21 15:22:44.246704475 +0000
@@ -1 +1 @@
-From 87b26522f7ff65375fb1d773a7f93c70bf857b96 Mon Sep 17 00:00:00 2001
+From 37d27abc59d3c56577cb31877741c3d6255bedb1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 87b26522f7ff65375fb1d773a7f93c70bf857b96 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'doc: update matching versions in ice guide' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (114 preceding siblings ...)
2022-02-21 15:35 ` patch 'net/mlx5: reject jump to root table' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'pflock: fix header file installation' " Kevin Traynor
` (78 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Qi Zhang; +Cc: Junfeng Guo, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/86f7ed09aecd2299cc01fcfd55ab54ee8ab656a8
Thanks.
Kevin
---
From 86f7ed09aecd2299cc01fcfd55ab54ee8ab656a8 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Tue, 25 Jan 2022 09:26:11 +0800
Subject: [PATCH] doc: update matching versions in ice guide
[ upstream commit affa9de4747d3fc8b827a51211e9d3020f658574 ]
Add recommended matching list for ice PMD in DPDK 21.08 and DPDK 21.11.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Junfeng Guo <junfeng.guo@intel.com>
---
doc/guides/nics/ice.rst | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/doc/guides/nics/ice.rst b/doc/guides/nics/ice.rst
index f95fef8cf0..a1780c46c3 100644
--- a/doc/guides/nics/ice.rst
+++ b/doc/guides/nics/ice.rst
@@ -59,4 +59,8 @@ The detailed information can refer to chapter Tested Platforms/Tested NICs in re
| 21.05 | 1.6.5 | 1.3.26 | 1.3.30 | 1.3.6 | 3.0 |
+-----------+---------------+-----------------+-----------+--------------+-----------+
+ | 21.08 | 1.7.16 | 1.3.27 | 1.3.31 | 1.3.7 | 3.1 |
+ +-----------+---------------+-----------------+-----------+--------------+-----------+
+ | 21.11 | 1.7.16 | 1.3.27 | 1.3.31 | 1.3.7 | 3.1 |
+ +-----------+---------------+-----------------+-----------+--------------+-----------+
Pre-Installation Configuration
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.155420876 +0000
+++ 0117-doc-update-matching-versions-in-ice-guide.patch 2022-02-21 15:22:44.246704475 +0000
@@ -1 +1 @@
-From affa9de4747d3fc8b827a51211e9d3020f658574 Mon Sep 17 00:00:00 2001
+From 86f7ed09aecd2299cc01fcfd55ab54ee8ab656a8 Mon Sep 17 00:00:00 2001
@@ -6 +6 @@
-Add recommended matching list for ice PMD in DPDK 21.08 and DPDK 21.11.
+[ upstream commit affa9de4747d3fc8b827a51211e9d3020f658574 ]
@@ -8 +8 @@
-Cc: stable@dpdk.org
+Add recommended matching list for ice PMD in DPDK 21.08 and DPDK 21.11.
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'pflock: fix header file installation' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (115 preceding siblings ...)
2022-02-21 15:35 ` patch 'doc: update matching versions in ice guide' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'build: fix warnings when running external commands' " Kevin Traynor
` (77 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Martijn Bakker; +Cc: Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/1e770ae59941864df01f2006c4009038434f07d0
Thanks.
Kevin
---
From 1e770ae59941864df01f2006c4009038434f07d0 Mon Sep 17 00:00:00 2001
From: Martijn Bakker <gladdyu@gmail.com>
Date: Mon, 31 Jan 2022 22:48:21 +0000
Subject: [PATCH] pflock: fix header file installation
[ upstream commit 44f44d8298d55afa6ea37fc01c7ebd77d8e6f2e2 ]
The generic header file was missing
in the list of files to install.
Fixes: 9667d97c2507 ("pflock: add phase-fair reader writer locks")
Signed-off-by: Martijn Bakker <gladdyu@gmail.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
lib/eal/include/meson.build | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/eal/include/meson.build b/lib/eal/include/meson.build
index 86468d1a2b..9700494816 100644
--- a/lib/eal/include/meson.build
+++ b/lib/eal/include/meson.build
@@ -61,4 +61,5 @@ generic_headers = files(
'generic/rte_memcpy.h',
'generic/rte_pause.h',
+ 'generic/rte_pflock.h',
'generic/rte_power_intrinsics.h',
'generic/rte_prefetch.h',
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.174506774 +0000
+++ 0118-pflock-fix-header-file-installation.patch 2022-02-21 15:22:44.247704477 +0000
@@ -1 +1 @@
-From 44f44d8298d55afa6ea37fc01c7ebd77d8e6f2e2 Mon Sep 17 00:00:00 2001
+From 1e770ae59941864df01f2006c4009038434f07d0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 44f44d8298d55afa6ea37fc01c7ebd77d8e6f2e2 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'build: fix warnings when running external commands' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (116 preceding siblings ...)
2022-02-21 15:35 ` patch 'pflock: fix header file installation' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'build: remove deprecated Meson functions' " Kevin Traynor
` (76 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Jerin Jacob, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/aa8ad3e48c20f2f3645c718a885d3f76c06a20c9
Thanks.
Kevin
---
From aa8ad3e48c20f2f3645c718a885d3f76c06a20c9 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Thu, 20 Jan 2022 18:06:39 +0000
Subject: [PATCH] build: fix warnings when running external commands
[ upstream commit ecb904cc4596b33aa182e2a7c9edc3104ff981c3 ]
Meson 0.61.1 is giving warnings that the calls to run_command do not
always explicitly specify if the result is to be checked or not, i.e.
there is a missing "check" parameter. This is because the default
behaviour without the parameter is due to change in the future.
We can fix these warnings by explicitly adding into each call whether
the result should be checked by meson or not. This patch therefore
adds in "check: false" to each run_command call where the result is
being checked by the DPDK meson.build code afterwards, and adds in
"check: true" to any calls where the result is currently unchecked.
Bugzilla ID: 921
Reported-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Jerin Jacob <jerinj@marvell.com>
---
app/test/meson.build | 2 +-
buildtools/meson.build | 2 +-
config/arm/meson.build | 2 +-
config/meson.build | 5 +++--
config/x86/meson.build | 2 +-
drivers/common/mlx5/linux/meson.build | 2 +-
drivers/common/mlx5/windows/meson.build | 4 ++--
drivers/net/mlx4/meson.build | 2 +-
kernel/linux/kni/meson.build | 2 +-
kernel/linux/meson.build | 9 +++++----
meson.build | 2 +-
11 files changed, 18 insertions(+), 16 deletions(-)
diff --git a/app/test/meson.build b/app/test/meson.build
index 2b480adfba..f7ee8ebc57 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -493,5 +493,5 @@ dpdk_test = executable('dpdk-test',
install: true)
-has_hugepage = run_command('has-hugepage.sh').stdout().strip() != '0'
+has_hugepage = run_command('has-hugepage.sh', check: true).stdout().strip() != '0'
message('hugepage availability: @0@'.format(has_hugepage))
diff --git a/buildtools/meson.build b/buildtools/meson.build
index 22ea0ba375..400b88f251 100644
--- a/buildtools/meson.build
+++ b/buildtools/meson.build
@@ -46,5 +46,5 @@ 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)).returncode() != 0
+ if run_command(py3, '-c', script.format(module), check: false).returncode() != 0
error('missing python module: @0@'.format(module))
endif
diff --git a/config/arm/meson.build b/config/arm/meson.build
index 44b44b63a6..0c8570aabb 100644
--- a/config/arm/meson.build
+++ b/config/arm/meson.build
@@ -464,5 +464,5 @@ else
detect_vendor = find_program(join_paths(meson.current_source_dir(),
'armv8_machine.py'))
- cmd = run_command(detect_vendor.path())
+ cmd = run_command(detect_vendor.path(), check: false)
if cmd.returncode() == 0
cmd_output = cmd.stdout().to_lower().strip().split(' ')
diff --git a/config/meson.build b/config/meson.build
index 805d5d51d0..ee12318d4f 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -23,5 +23,6 @@ is_ms_linker = is_windows and (cc.get_id() == 'clang')
pver = meson.project_version().split('.')
major_version = '@0@.@1@'.format(pver.get(0), pver.get(1))
-abi_version = run_command(find_program('cat', 'more'), abi_version_file).stdout().strip()
+abi_version = run_command(find_program('cat', 'more'), abi_version_file,
+ check: true).stdout().strip()
# Libraries have the abi_version as the filename extension
@@ -335,5 +336,5 @@ if max_lcores == 'detect'
endif
# overwrite the default value with discovered values
- max_lcores = run_command(get_cpu_count_cmd).stdout().to_int()
+ max_lcores = run_command(get_cpu_count_cmd, check: true).stdout().to_int()
min_lcores = 2
# DPDK must be built for at least 2 cores
diff --git a/config/x86/meson.build b/config/x86/meson.build
index e25ed316f4..54345c4da3 100644
--- a/config/x86/meson.build
+++ b/config/x86/meson.build
@@ -5,5 +5,5 @@
binutils_ok = true
if is_linux or cc.get_id() == 'gcc'
- binutils_ok = run_command(binutils_avx512_check).returncode() == 0
+ binutils_ok = run_command(binutils_avx512_check, check: false).returncode() == 0
if not binutils_ok and cc.has_argument('-mno-avx512f')
machine_args += '-mno-avx512f'
diff --git a/drivers/common/mlx5/linux/meson.build b/drivers/common/mlx5/linux/meson.build
index 7909f23e21..4c7b53b9bd 100644
--- a/drivers/common/mlx5/linux/meson.build
+++ b/drivers/common/mlx5/linux/meson.build
@@ -37,5 +37,5 @@ endforeach
if static_ibverbs or dlopen_ibverbs
# Build without adding shared libs to Requires.private
- ibv_cflags = run_command(pkgconf, '--cflags', 'libibverbs').stdout()
+ ibv_cflags = run_command(pkgconf, '--cflags', 'libibverbs', check: true).stdout()
ext_deps += declare_dependency(compile_args: ibv_cflags.split())
endif
diff --git a/drivers/common/mlx5/windows/meson.build b/drivers/common/mlx5/windows/meson.build
index 980f76b11c..edbbaa9ae1 100644
--- a/drivers/common/mlx5/windows/meson.build
+++ b/drivers/common/mlx5/windows/meson.build
@@ -9,6 +9,6 @@ sources += files(
)
-res_lib = run_command(python3, '-c', 'import os; print(os.environ["DEVX_LIB_PATH"])')
-res_inc = run_command(python3, '-c', 'import os; print(os.environ["DEVX_INC_PATH"])')
+res_lib = run_command(python3, '-c', 'import os; print(os.environ["DEVX_LIB_PATH"])', check: false)
+res_inc = run_command(python3, '-c', 'import os; print(os.environ["DEVX_INC_PATH"])', check: false)
if (res_lib.returncode() != 0 or res_inc.returncode() != 0)
diff --git a/drivers/net/mlx4/meson.build b/drivers/net/mlx4/meson.build
index 99a30eab8f..a038c1ec1b 100644
--- a/drivers/net/mlx4/meson.build
+++ b/drivers/net/mlx4/meson.build
@@ -43,5 +43,5 @@ endforeach
if static_ibverbs or dlopen_ibverbs
# Build without adding shared libs to Requires.private
- ibv_cflags = run_command(pkgconf, '--cflags', 'libibverbs').stdout()
+ ibv_cflags = run_command(pkgconf, '--cflags', 'libibverbs', check:true).stdout()
ext_deps += declare_dependency(compile_args: ibv_cflags.split())
endif
diff --git a/kernel/linux/kni/meson.build b/kernel/linux/kni/meson.build
index c683fc7b36..dae8c37b37 100644
--- a/kernel/linux/kni/meson.build
+++ b/kernel/linux/kni/meson.build
@@ -6,5 +6,5 @@
kmod_cflags = ''
file_path = kernel_source_dir + '/include/linux/netdevice.h'
-run_cmd = run_command('grep', 'ndo_tx_timeout', file_path)
+run_cmd = run_command('grep', 'ndo_tx_timeout', file_path, check: false)
if run_cmd.stdout().contains('txqueue') == true
diff --git a/kernel/linux/meson.build b/kernel/linux/meson.build
index 0637452e95..d8fb20c1c3 100644
--- a/kernel/linux/meson.build
+++ b/kernel/linux/meson.build
@@ -12,5 +12,5 @@ cross_args = []
if not meson.is_cross_build()
# native build
- kernel_version = run_command('uname', '-r').stdout().strip()
+ kernel_version = run_command('uname', '-r', check: true).stdout().strip()
kernel_install_dir = '/lib/modules/' + kernel_version + '/extra/dpdk'
if kernel_build_dir == ''
@@ -25,5 +25,5 @@ if not meson.is_cross_build()
# test running make in kernel directory, using "make kernelversion"
make_returncode = run_command('make', '-sC', kernel_build_dir,
- 'kernelversion').returncode()
+ 'kernelversion', check: true).returncode()
if make_returncode != 0
# backward compatibility:
@@ -32,5 +32,5 @@ if not meson.is_cross_build()
kernel_build_dir = join_paths(kernel_build_dir, 'build')
make_returncode = run_command('make', '-sC', kernel_build_dir,
- 'kernelversion').returncode()
+ 'kernelversion', check: true).returncode()
endif
endif
@@ -55,5 +55,6 @@ endif
cross_compiler = find_program('c').path()
if cross_compiler.endswith('gcc')
- cross_prefix = run_command([py3, '-c', 'print("' + cross_compiler + '"[:-3])']).stdout().strip()
+ cross_prefix = run_command([py3, '-c', 'print("' + cross_compiler + '"[:-3])'],
+ check: true).stdout().strip()
elif cross_compiler.endswith('clang')
cross_prefix = ''
diff --git a/meson.build b/meson.build
index 12cb6e0e83..1223b79d74 100644
--- a/meson.build
+++ b/meson.build
@@ -6,5 +6,5 @@ project('DPDK', 'C',
# Fallback to "more" for Windows compatibility.
version: run_command(find_program('cat', 'more'),
- files('VERSION')).stdout().strip(),
+ files('VERSION'), check: true).stdout().strip(),
license: 'BSD',
default_options: ['buildtype=release', 'default_library=static'],
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.192525793 +0000
+++ 0119-build-fix-warnings-when-running-external-commands.patch 2022-02-21 15:22:44.249704482 +0000
@@ -1 +1 @@
-From ecb904cc4596b33aa182e2a7c9edc3104ff981c3 Mon Sep 17 00:00:00 2001
+From aa8ad3e48c20f2f3645c718a885d3f76c06a20c9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ecb904cc4596b33aa182e2a7c9edc3104ff981c3 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -38 +39 @@
-index 725a218f4a..5476c180ee 100644
+index 2b480adfba..f7ee8ebc57 100644
@@ -41 +42 @@
-@@ -458,5 +458,5 @@ dpdk_test = executable('dpdk-test',
+@@ -493,5 +493,5 @@ dpdk_test = executable('dpdk-test',
@@ -60 +61 @@
-index c3a3f2faaf..e102381af5 100644
+index 44b44b63a6..0c8570aabb 100644
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'build: remove deprecated Meson functions' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (117 preceding siblings ...)
2022-02-21 15:35 ` patch 'build: fix warnings when running external commands' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'doc: fix KNI PMD name typo' " Kevin Traynor
` (75 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Jerin Jacob, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/4f140c9a9a5ab5baabc6508de843852d959183db
Thanks.
Kevin
---
From 4f140c9a9a5ab5baabc6508de843852d959183db Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Mon, 24 Jan 2022 17:49:59 +0000
Subject: [PATCH] build: remove deprecated Meson functions
[ upstream commit e16b972b1afe2444346016175ae086d5bea54016 ]
Starting in meson 0.56, the functions meson.source_root() and
meson.build_root() are deprecated and to be replaced by the [more
descriptive] functions: project_source_root()/global_source_root() and
project_build_root()/global_build_root(). Unfortunately, these new
replacement functions were only added in 0.56 release too, so to use
them we would need version checks for old/new functions to remove the
deprecation warnings.
However, the functions "current_build_dir()" and "current_source_dir()"
remain unaffected by all this, so we can bypass the versioning problem,
by saving off these values to "dpdk_source_root" and "dpdk_build_root"
in the top-level meson.build file
Bugzilla ID: 926
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Jerin Jacob <jerinj@marvell.com>
---
doc/api/meson.build | 10 +++++-----
kernel/freebsd/meson.build | 4 ++--
kernel/linux/kni/meson.build | 8 ++++----
meson.build | 2 ++
4 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/doc/api/meson.build b/doc/api/meson.build
index 7e2b429ac8..5c25b92092 100644
--- a/doc/api/meson.build
+++ b/doc/api/meson.build
@@ -25,5 +25,5 @@ htmldir = join_paths(get_option('datadir'), 'doc', 'dpdk')
example = custom_target('examples.dox',
output: 'examples.dox',
- command: [generate_examples, join_paths(meson.source_root(), 'examples'), '@OUTPUT@'],
+ command: [generate_examples, join_paths(dpdk_source_root, 'examples'), '@OUTPUT@'],
depfile: 'examples.dox.d',
install: get_option('enable_docs'),
@@ -33,9 +33,9 @@ example = custom_target('examples.dox',
cdata = configuration_data()
cdata.set('VERSION', meson.project_version())
-cdata.set('API_EXAMPLES', join_paths(meson.build_root(), 'doc', 'api', 'examples.dox'))
-cdata.set('OUTPUT', join_paths(meson.build_root(), 'doc', 'api'))
+cdata.set('API_EXAMPLES', join_paths(dpdk_build_root, 'doc', 'api', 'examples.dox'))
+cdata.set('OUTPUT', join_paths(dpdk_build_root, 'doc', 'api'))
cdata.set('HTML_OUTPUT', 'html')
-cdata.set('TOPDIR', meson.source_root())
-cdata.set('STRIP_FROM_PATH', ' '.join([meson.source_root(), join_paths(meson.build_root(), 'doc', 'api')]))
+cdata.set('TOPDIR', dpdk_source_root)
+cdata.set('STRIP_FROM_PATH', ' '.join([dpdk_source_root, join_paths(dpdk_build_root, 'doc', 'api')]))
cdata.set('WARN_AS_ERROR', 'NO')
if get_option('werror')
diff --git a/kernel/freebsd/meson.build b/kernel/freebsd/meson.build
index bf5aa20a55..1f612711be 100644
--- a/kernel/freebsd/meson.build
+++ b/kernel/freebsd/meson.build
@@ -10,6 +10,6 @@ kmods = ['contigmem', 'nic_uio']
# files from the individual meson.build files, and then use a custom
# target to call make, passing in the values as env parameters.
-kmod_cflags = ['-I' + meson.build_root(),
- '-I' + join_paths(meson.source_root(), 'config'),
+kmod_cflags = ['-I' + dpdk_build_root,
+ '-I' + join_paths(dpdk_source_root, 'config'),
'-include rte_config.h']
diff --git a/kernel/linux/kni/meson.build b/kernel/linux/kni/meson.build
index dae8c37b37..4c90069e99 100644
--- a/kernel/linux/kni/meson.build
+++ b/kernel/linux/kni/meson.build
@@ -30,8 +30,8 @@ custom_target('rte_kni',
'src=' + meson.current_source_dir(),
' '.join(['MODULE_CFLAGS=', kmod_cflags,'-include '])
- + meson.source_root() + '/config/rte_config.h' +
- ' -I' + meson.source_root() + '/lib/eal/include' +
- ' -I' + meson.source_root() + '/lib/kni' +
- ' -I' + meson.build_root() +
+ + dpdk_source_root + '/config/rte_config.h' +
+ ' -I' + dpdk_source_root + '/lib/eal/include' +
+ ' -I' + dpdk_source_root + '/lib/kni' +
+ ' -I' + dpdk_build_root +
' -I' + meson.current_source_dir(),
'modules'] + cross_args,
diff --git a/meson.build b/meson.build
index 1223b79d74..21dc51f00d 100644
--- a/meson.build
+++ b/meson.build
@@ -28,4 +28,6 @@ endif
# set up some global vars for compiler, platform, configuration, etc.
cc = meson.get_compiler('c')
+dpdk_source_root = meson.current_source_dir()
+dpdk_build_root = meson.current_build_dir()
dpdk_conf = configuration_data()
dpdk_libraries = []
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.215009897 +0000
+++ 0120-build-remove-deprecated-Meson-functions.patch 2022-02-21 15:22:44.249704482 +0000
@@ -1 +1 @@
-From e16b972b1afe2444346016175ae086d5bea54016 Mon Sep 17 00:00:00 2001
+From 4f140c9a9a5ab5baabc6508de843852d959183db Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e16b972b1afe2444346016175ae086d5bea54016 ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -87 +88 @@
-index 3d97e96f38..937f6110c0 100644
+index 1223b79d74..21dc51f00d 100644
@@ -90 +91 @@
-@@ -32,4 +32,6 @@ endif
+@@ -28,4 +28,6 @@ endif
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'doc: fix KNI PMD name typo' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (118 preceding siblings ...)
2022-02-21 15:35 ` patch 'build: remove deprecated Meson functions' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'ring: fix error code when creating ring' " Kevin Traynor
` (74 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Haiyue Wang; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/63cb4ae54ff88fd9f6d512cb776c0a9a4ae3aa3f
Thanks.
Kevin
---
From 63cb4ae54ff88fd9f6d512cb776c0a9a4ae3aa3f Mon Sep 17 00:00:00 2001
From: Haiyue Wang <haiyue.wang@intel.com>
Date: Wed, 19 Jan 2022 20:26:14 +0800
Subject: [PATCH] doc: fix KNI PMD name typo
[ upstream commit 08c724b3276725549e4426f15be206d1b688795b ]
The KNI PMD name should be "net_kni".
Fixes: 75e2bc54c018 ("net/kni: add KNI PMD")
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
doc/guides/nics/kni.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/guides/nics/kni.rst b/doc/guides/nics/kni.rst
index 37c5411a32..2a23bb3f3b 100644
--- a/doc/guides/nics/kni.rst
+++ b/doc/guides/nics/kni.rst
@@ -34,5 +34,5 @@ Usage
EAL ``--vdev`` argument can be used to create KNI device instance, like::
- dpdk-testpmd --vdev=net_kni0 --vdev=net_kn1 -- -i
+ dpdk-testpmd --vdev=net_kni0 --vdev=net_kni1 -- -i
Above command will create ``kni0`` and ``kni1`` Linux network interfaces,
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.233612383 +0000
+++ 0121-doc-fix-KNI-PMD-name-typo.patch 2022-02-21 15:22:44.250704484 +0000
@@ -1 +1 @@
-From 08c724b3276725549e4426f15be206d1b688795b Mon Sep 17 00:00:00 2001
+From 63cb4ae54ff88fd9f6d512cb776c0a9a4ae3aa3f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 08c724b3276725549e4426f15be206d1b688795b ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'ring: fix error code when creating ring' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (119 preceding siblings ...)
2022-02-21 15:35 ` patch 'doc: fix KNI PMD name typo' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'ring: fix overflow in memory size calculation' " Kevin Traynor
` (73 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Yunjian Wang; +Cc: Nan Zhou, Konstantin Ananyev, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/8b45a1dea3cf6c20554736f7daa41a5e980703c0
Thanks.
Kevin
---
From 8b45a1dea3cf6c20554736f7daa41a5e980703c0 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Mon, 10 Jan 2022 17:23:03 +0800
Subject: [PATCH] ring: fix error code when creating ring
[ upstream commit 074717be3ef9e7a8868b5af078b0ca7b61bcc44b ]
The error value returned by rte_ring_create_elem() should be positive
integers. However, if the rte_ring_get_memsize_elem() function fails,
a negative number is returned and is directly used as the return value.
As a result, this will cause the external call to check the return
value to fail(like called by rte_mempool_create()).
Fixes: a182620042aa ("ring: get size in memory")
Reported-by: Nan Zhou <zhounan14@huawei.com>
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
lib/ring/rte_ring.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/ring/rte_ring.c b/lib/ring/rte_ring.c
index f17bd966be..185f9be798 100644
--- a/lib/ring/rte_ring.c
+++ b/lib/ring/rte_ring.c
@@ -268,5 +268,5 @@ rte_ring_create_elem(const char *name, unsigned int esize, unsigned int count,
ring_size = rte_ring_get_memsize_elem(esize, count);
if (ring_size < 0) {
- rte_errno = ring_size;
+ rte_errno = -ring_size;
return NULL;
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.252575184 +0000
+++ 0122-ring-fix-error-code-when-creating-ring.patch 2022-02-21 15:22:44.250704484 +0000
@@ -1 +1 @@
-From 074717be3ef9e7a8868b5af078b0ca7b61bcc44b Mon Sep 17 00:00:00 2001
+From 8b45a1dea3cf6c20554736f7daa41a5e980703c0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 074717be3ef9e7a8868b5af078b0ca7b61bcc44b ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'ring: fix overflow in memory size calculation' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (120 preceding siblings ...)
2022-02-21 15:35 ` patch 'ring: fix error code when creating ring' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'eal/windows: fix error code for not supported API' " Kevin Traynor
` (72 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Zhihong Wang
Cc: Liang Ma, Morten Brørup, Konstantin Ananyev, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/5a9f8c2ba46514fd230eb06fbe7832df9b0a4c27
Thanks.
Kevin
---
From 5a9f8c2ba46514fd230eb06fbe7832df9b0a4c27 Mon Sep 17 00:00:00 2001
From: Zhihong Wang <wangzhihong.wzh@bytedance.com>
Date: Tue, 14 Dec 2021 11:30:16 +0800
Subject: [PATCH] ring: fix overflow in memory size calculation
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 0e4dc6af06228c8504a5538512cb31ed7bf6cc23 ]
Parameters count and esize are both unsigned int, and their product can
legaly exceed unsigned int and lead to runtime access violation.
Fixes: cc4b218790f6 ("ring: support configurable element size")
Signed-off-by: Zhihong Wang <wangzhihong.wzh@bytedance.com>
Reviewed-by: Liang Ma <liangma@liangbit.com>
Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
lib/ring/rte_ring.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/ring/rte_ring.c b/lib/ring/rte_ring.c
index 185f9be798..6a94a038c4 100644
--- a/lib/ring/rte_ring.c
+++ b/lib/ring/rte_ring.c
@@ -76,5 +76,5 @@ rte_ring_get_memsize_elem(unsigned int esize, unsigned int count)
}
- sz = sizeof(struct rte_ring) + count * esize;
+ sz = sizeof(struct rte_ring) + (ssize_t)count * esize;
sz = RTE_ALIGN(sz, RTE_CACHE_LINE_SIZE);
return sz;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.271244875 +0000
+++ 0123-ring-fix-overflow-in-memory-size-calculation.patch 2022-02-21 15:22:44.250704484 +0000
@@ -1 +1 @@
-From 0e4dc6af06228c8504a5538512cb31ed7bf6cc23 Mon Sep 17 00:00:00 2001
+From 5a9f8c2ba46514fd230eb06fbe7832df9b0a4c27 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 0e4dc6af06228c8504a5538512cb31ed7bf6cc23 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'eal/windows: fix error code for not supported API' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (121 preceding siblings ...)
2022-02-21 15:35 ` patch 'ring: fix overflow in memory size calculation' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'test/mem: fix error check' " Kevin Traynor
` (71 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Jie Zhou; +Cc: Dmitry Kozlyuk, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/32cb4f09ff6bec3352ea021cbd99ea0d7692735a
Thanks.
Kevin
---
From 32cb4f09ff6bec3352ea021cbd99ea0d7692735a Mon Sep 17 00:00:00 2001
From: Jie Zhou <jizh@linux.microsoft.com>
Date: Tue, 25 Jan 2022 21:10:34 -0800
Subject: [PATCH] eal/windows: fix error code for not supported API
[ upstream commit 7e71c4dce375b8aa575dbdcda97936199a4136f3 ]
UT memory_autotest on Windows has 2 failed cases on EAL APIs
eal_memalloc_get_seg_fd and eal_memalloc_get_seg_fd_offset. These 2
APIs are not supported on Windows yet. Should return ENOTSUP such that
in test_memory.c these 2 ENOTSUP cases will not be marked as failures,
same as other ENOTSUP cases.
Fixes: 2a5d547a4a9b ("eal/windows: implement basic memory management")
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
lib/eal/windows/eal_memalloc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/eal/windows/eal_memalloc.c b/lib/eal/windows/eal_memalloc.c
index 55d6dcc71c..aa7589b81d 100644
--- a/lib/eal/windows/eal_memalloc.c
+++ b/lib/eal/windows/eal_memalloc.c
@@ -18,5 +18,5 @@ eal_memalloc_get_seg_fd(int list_idx, int seg_idx)
RTE_SET_USED(seg_idx);
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
@@ -29,5 +29,5 @@ eal_memalloc_get_seg_fd_offset(int list_idx, int seg_idx, size_t *offset)
RTE_SET_USED(offset);
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
@@ -429,5 +429,5 @@ eal_memalloc_sync_with_primary(void)
/* No multi-process support. */
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.289317287 +0000
+++ 0124-eal-windows-fix-error-code-for-not-supported-API.patch 2022-02-21 15:22:44.251704486 +0000
@@ -1 +1 @@
-From 7e71c4dce375b8aa575dbdcda97936199a4136f3 Mon Sep 17 00:00:00 2001
+From 32cb4f09ff6bec3352ea021cbd99ea0d7692735a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7e71c4dce375b8aa575dbdcda97936199a4136f3 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'test/mem: fix error check' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (122 preceding siblings ...)
2022-02-21 15:35 ` patch 'eal/windows: fix error code for not supported API' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'net/enic: fix dereference before null " Kevin Traynor
` (70 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Jie Zhou; +Cc: Dmitry Kozlyuk, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/57b2aa02656c314787dcd818684661825108f95b
Thanks.
Kevin
---
From 57b2aa02656c314787dcd818684661825108f95b Mon Sep 17 00:00:00 2001
From: Jie Zhou <jizh@linux.microsoft.com>
Date: Tue, 25 Jan 2022 21:10:36 -0800
Subject: [PATCH] test/mem: fix error check
[ upstream commit 068cdfae1fc19a491fc68723997ca89a92501736 ]
Fix incorrect errno variable used in memory autotest.
Use rte_errno instead.
Fixes: 086d426406bd ("test/mem: fix memory autotests on FreeBSD")
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
app/test/test_memory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test/test_memory.c b/app/test/test_memory.c
index dbf6871e71..140ac3f3cf 100644
--- a/app/test/test_memory.c
+++ b/app/test/test_memory.c
@@ -64,5 +64,5 @@ check_seg_fds(const struct rte_memseg_list *msl, const struct rte_memseg *ms,
ret = rte_memseg_get_fd_offset_thread_unsafe(ms, &offset);
if (ret < 0) {
- if (errno == ENOTSUP)
+ if (rte_errno == ENOTSUP)
return 1;
return -1;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.309157463 +0000
+++ 0125-test-mem-fix-error-check.patch 2022-02-21 15:22:44.251704486 +0000
@@ -1 +1 @@
-From 068cdfae1fc19a491fc68723997ca89a92501736 Mon Sep 17 00:00:00 2001
+From 57b2aa02656c314787dcd818684661825108f95b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 068cdfae1fc19a491fc68723997ca89a92501736 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/enic: fix dereference before null check' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (123 preceding siblings ...)
2022-02-21 15:35 ` patch 'test/mem: fix error check' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'net/dpaa2: fix null pointer dereference' " Kevin Traynor
` (69 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Weiguo Li; +Cc: John Daley, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/90386f428c9006dfde5c9e0983ad7bdfa3950c5a
Thanks.
Kevin
---
From 90386f428c9006dfde5c9e0983ad7bdfa3950c5a Mon Sep 17 00:00:00 2001
From: Weiguo Li <liwg06@foxmail.com>
Date: Tue, 25 Jan 2022 20:00:49 +0800
Subject: [PATCH] net/enic: fix dereference before null check
[ upstream commit a5f42986968a0699e070c56f1033aee5f90d2c12 ]
Move memcpy to 'ah->key' after 'ah' null check
Fixes: bb66d562aefc ("net/enic: share flow actions with same signature")
Signed-off-by: Weiguo Li <liwg06@foxmail.com>
Reviewed-by: John Daley <johndale@cisco.com>
---
drivers/net/enic/enic_fm_flow.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/enic/enic_fm_flow.c b/drivers/net/enic/enic_fm_flow.c
index bef842d460..ab73cd8530 100644
--- a/drivers/net/enic/enic_fm_flow.c
+++ b/drivers/net/enic/enic_fm_flow.c
@@ -2373,9 +2373,9 @@ enic_action_handle_get(struct enic_flowman *fm, struct fm_action *action_in,
ah = calloc(1, sizeof(*ah));
- memcpy(&ah->key, action_in, sizeof(struct fm_action));
if (ah == NULL)
return rte_flow_error_set(error, ENOMEM,
RTE_FLOW_ERROR_TYPE_HANDLE,
NULL, "enic: calloc(fm-action)");
+ memcpy(&ah->key, action_in, sizeof(struct fm_action));
args[0] = FM_ACTION_ALLOC;
args[1] = fm->cmd.pa;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.327272253 +0000
+++ 0126-net-enic-fix-dereference-before-null-check.patch 2022-02-21 15:22:44.253704491 +0000
@@ -1 +1 @@
-From a5f42986968a0699e070c56f1033aee5f90d2c12 Mon Sep 17 00:00:00 2001
+From 90386f428c9006dfde5c9e0983ad7bdfa3950c5a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a5f42986968a0699e070c56f1033aee5f90d2c12 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index bf04d714d0..d8718d17ef 100644
+index bef842d460..ab73cd8530 100644
@@ -21 +22 @@
-@@ -2522,9 +2522,9 @@ enic_action_handle_get(struct enic_flowman *fm, struct fm_action *action_in,
+@@ -2373,9 +2373,9 @@ enic_action_handle_get(struct enic_flowman *fm, struct fm_action *action_in,
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/dpaa2: fix null pointer dereference' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (124 preceding siblings ...)
2022-02-21 15:35 ` patch 'net/enic: fix dereference before null " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'net/bonding: fix MTU set for slaves' " Kevin Traynor
` (68 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Weiguo Li; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/9ac1343c4de9c2b4f093ab163b1a739d76dcaccf
Thanks.
Kevin
---
From 9ac1343c4de9c2b4f093ab163b1a739d76dcaccf Mon Sep 17 00:00:00 2001
From: Weiguo Li <liwg06@foxmail.com>
Date: Tue, 25 Jan 2022 22:23:48 +0800
Subject: [PATCH] net/dpaa2: fix null pointer dereference
[ upstream commit 29e5519dab554407f9d375abb40fdb57f8d445db ]
Check for memory allocation failure is added to avoid null
pointer dereference.
Fixes: 4690a6114ff6 ("net/dpaa2: enable error queues optionally")
Signed-off-by: Weiguo Li <liwg06@foxmail.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
drivers/net/dpaa2/dpaa2_ethdev.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 87a8a6e55e..b875139689 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -396,4 +396,6 @@ dpaa2_alloc_rx_tx_queues(struct rte_eth_dev *dev)
priv->rx_err_vq = rte_zmalloc("dpni_rx_err",
sizeof(struct dpaa2_queue), 0);
+ if (!priv->rx_err_vq)
+ goto fail;
dpaa2_q = (struct dpaa2_queue *)priv->rx_err_vq;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.348633247 +0000
+++ 0127-net-dpaa2-fix-null-pointer-dereference.patch 2022-02-21 15:22:44.255704495 +0000
@@ -1 +1 @@
-From 29e5519dab554407f9d375abb40fdb57f8d445db Mon Sep 17 00:00:00 2001
+From 9ac1343c4de9c2b4f093ab163b1a739d76dcaccf Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 29e5519dab554407f9d375abb40fdb57f8d445db ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 09105f049e..379daec5f4 100644
+index 87a8a6e55e..b875139689 100644
@@ -22 +23 @@
-@@ -400,4 +400,6 @@ dpaa2_alloc_rx_tx_queues(struct rte_eth_dev *dev)
+@@ -396,4 +396,6 @@ dpaa2_alloc_rx_tx_queues(struct rte_eth_dev *dev)
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/bonding: fix MTU set for slaves' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (125 preceding siblings ...)
2022-02-21 15:35 ` patch 'net/dpaa2: fix null pointer dereference' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'net/hns3: fix max packet size rollback in PF' " Kevin Traynor
` (67 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Ferruh Yigit; +Cc: Yu Jiang, Min Hu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/2c27da1e514f9a1b3d033880c8601639242253c5
Thanks.
Kevin
---
From 2c27da1e514f9a1b3d033880c8601639242253c5 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Wed, 26 Jan 2022 13:10:37 +0000
Subject: [PATCH] net/bonding: fix MTU set for slaves
[ upstream commit 20a53b1927da67f62366752ae2d737cb4ded9b6e ]
ethdev requires device to be configured before setting MTU.
In bonding PMD, while configuring slaves, bonding first sets MTU later
configures them, which causes failure if slaves are not configured in
advance.
Fixing by changing the order in slave configure as requested in ethdev
layer, configure first and set MTU later.
Bugzilla ID: 864
Fixes: b26bee10ee37 ("ethdev: forbid MTU set before device configure")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tested-by: Yu Jiang <yux.jiang@intel.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
---
drivers/net/bonding/rte_eth_bond_pmd.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index c72fc64806..e5abe90e07 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1742,12 +1742,4 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev,
}
- errval = rte_eth_dev_set_mtu(slave_eth_dev->data->port_id,
- bonded_eth_dev->data->mtu);
- if (errval != 0 && errval != -ENOTSUP) {
- RTE_BOND_LOG(ERR, "rte_eth_dev_set_mtu: port %u, err (%d)",
- slave_eth_dev->data->port_id, errval);
- return errval;
- }
-
/* Configure device */
errval = rte_eth_dev_configure(slave_eth_dev->data->port_id,
@@ -1760,4 +1752,12 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev,
}
+ errval = rte_eth_dev_set_mtu(slave_eth_dev->data->port_id,
+ bonded_eth_dev->data->mtu);
+ if (errval != 0 && errval != -ENOTSUP) {
+ RTE_BOND_LOG(ERR, "rte_eth_dev_set_mtu: port %u, err (%d)",
+ slave_eth_dev->data->port_id, errval);
+ return errval;
+ }
+
/* Setup Rx Queues */
for (q_id = 0; q_id < bonded_eth_dev->data->nb_rx_queues; q_id++) {
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.368271262 +0000
+++ 0128-net-bonding-fix-MTU-set-for-slaves.patch 2022-02-21 15:22:44.256704497 +0000
@@ -1 +1 @@
-From 20a53b1927da67f62366752ae2d737cb4ded9b6e Mon Sep 17 00:00:00 2001
+From 2c27da1e514f9a1b3d033880c8601639242253c5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 20a53b1927da67f62366752ae2d737cb4ded9b6e ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/hns3: fix max packet size rollback in PF' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (126 preceding siblings ...)
2022-02-21 15:35 ` patch 'net/bonding: fix MTU set for slaves' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'net/hns3: fix RSS key with null' " Kevin Traynor
` (66 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Huisong Li; +Cc: Min Hu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/d7033074e07b4bdf22ecf82a42ccde6a13f93f49
Thanks.
Kevin
---
From d7033074e07b4bdf22ecf82a42ccde6a13f93f49 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Fri, 28 Jan 2022 10:07:03 +0800
Subject: [PATCH] net/hns3: fix max packet size rollback in PF
[ upstream commit e8f1f783d1cd61faf12658df64726bca88b7ff63 ]
HNS3 PF driver use the hns->pf.mps to restore the MTU when a reset
occurs.
If user fails to configure the MTU, the MPS of PF may not be restored to
the original value.
Fixes: 25fb790f7868 ("net/hns3: fix HW buffer size on MTU update")
Fixes: 1f5ca0b460cd ("net/hns3: support some device operations")
Fixes: d51867db65c1 ("net/hns3: add initialization")
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
drivers/net/hns3/hns3_ethdev.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index ef13d31d19..ac0c1fb5ec 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2088,5 +2088,4 @@ hns3_config_mtu(struct hns3_hw *hw, uint16_t mps)
{
struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);
- uint16_t original_mps = hns->pf.mps;
int err;
int ret;
@@ -2098,5 +2097,4 @@ hns3_config_mtu(struct hns3_hw *hw, uint16_t mps)
}
- hns->pf.mps = mps;
ret = hns3_buffer_alloc(hw);
if (ret) {
@@ -2105,13 +2103,12 @@ hns3_config_mtu(struct hns3_hw *hw, uint16_t mps)
}
+ hns->pf.mps = mps;
+
return 0;
rollback:
- err = hns3_set_mac_mtu(hw, original_mps);
- if (err) {
+ err = hns3_set_mac_mtu(hw, hns->pf.mps);
+ if (err)
hns3_err(hw, "fail to rollback MTU, err = %d", err);
- return ret;
- }
- hns->pf.mps = original_mps;
return ret;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.389918256 +0000
+++ 0129-net-hns3-fix-max-packet-size-rollback-in-PF.patch 2022-02-21 15:22:44.259704504 +0000
@@ -1 +1 @@
-From e8f1f783d1cd61faf12658df64726bca88b7ff63 Mon Sep 17 00:00:00 2001
+From d7033074e07b4bdf22ecf82a42ccde6a13f93f49 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e8f1f783d1cd61faf12658df64726bca88b7ff63 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index a5114662d2..73bf209717 100644
+index ef13d31d19..ac0c1fb5ec 100644
@@ -26 +27 @@
-@@ -2076,5 +2076,4 @@ hns3_config_mtu(struct hns3_hw *hw, uint16_t mps)
+@@ -2088,5 +2088,4 @@ hns3_config_mtu(struct hns3_hw *hw, uint16_t mps)
@@ -32 +33 @@
-@@ -2086,5 +2085,4 @@ hns3_config_mtu(struct hns3_hw *hw, uint16_t mps)
+@@ -2098,5 +2097,4 @@ hns3_config_mtu(struct hns3_hw *hw, uint16_t mps)
@@ -38 +39 @@
-@@ -2093,13 +2091,12 @@ hns3_config_mtu(struct hns3_hw *hw, uint16_t mps)
+@@ -2105,13 +2103,12 @@ hns3_config_mtu(struct hns3_hw *hw, uint16_t mps)
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/hns3: fix RSS key with null' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (127 preceding siblings ...)
2022-02-21 15:35 ` patch 'net/hns3: fix max packet size rollback in PF' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'net/hns3: fix insecure way to query MAC statistics' " Kevin Traynor
` (65 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Lijun Ou; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/9b1f69f9069a92f3b307d3a0e3424d9be6a5e813
Thanks.
Kevin
---
From 9b1f69f9069a92f3b307d3a0e3424d9be6a5e813 Mon Sep 17 00:00:00 2001
From: Lijun Ou <oulijun@huawei.com>
Date: Fri, 28 Jan 2022 10:07:04 +0800
Subject: [PATCH] net/hns3: fix RSS key with null
[ upstream commit e995c91dcc426e83d4d0d6681b8d3dc0d313c655 ]
Since the patch '1848b117' has initialized the variable 'key' in
'struct rte_flow_action_rss' with 'NULL', the PMD will use the
default RSS key when create the first RSS rule with NULL RSS key.
Then, if create a repeated RSS rule with the above, it will not
identify duplicate rules and return an error message.
To solve the preceding problem, determine whether the current RSS keys
are the same based on whether the length of key_len of rss is 0.
Fixes: 1848b117cca1 ("app/testpmd: fix RSS key for flow API RSS rule")
Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
drivers/net/hns3/hns3_flow.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index b19e5d37a9..5fc80480ba 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1239,4 +1239,5 @@ hns3_action_rss_same(const struct rte_flow_action_rss *comp,
const struct rte_flow_action_rss *with)
{
+ bool rss_key_is_same;
bool func_is_same;
@@ -1255,9 +1256,14 @@ hns3_action_rss_same(const struct rte_flow_action_rss *comp,
(comp->func == with->func) : true;
- return (func_is_same &&
+ if (with->key_len == 0 || with->key == NULL)
+ rss_key_is_same = 1;
+ else
+ rss_key_is_same = comp->key_len == with->key_len &&
+ !memcmp(comp->key, with->key, with->key_len);
+
+ return (func_is_same && rss_key_is_same &&
comp->types == (with->types & HNS3_ETH_RSS_SUPPORT) &&
- comp->level == with->level && comp->key_len == with->key_len &&
+ comp->level == with->level &&
comp->queue_num == with->queue_num &&
- !memcmp(comp->key, with->key, with->key_len) &&
!memcmp(comp->queue, with->queue,
sizeof(*with->queue) * with->queue_num));
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.412038335 +0000
+++ 0130-net-hns3-fix-RSS-key-with-null.patch 2022-02-21 15:22:44.261704509 +0000
@@ -1 +1 @@
-From e995c91dcc426e83d4d0d6681b8d3dc0d313c655 Mon Sep 17 00:00:00 2001
+From 9b1f69f9069a92f3b307d3a0e3424d9be6a5e813 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e995c91dcc426e83d4d0d6681b8d3dc0d313c655 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 56ef6f57b2..aba07aaa6f 100644
+index b19e5d37a9..5fc80480ba 100644
@@ -27 +28 @@
-@@ -1287,4 +1287,5 @@ hns3_action_rss_same(const struct rte_flow_action_rss *comp,
+@@ -1239,4 +1239,5 @@ hns3_action_rss_same(const struct rte_flow_action_rss *comp,
@@ -33 +34 @@
-@@ -1303,9 +1304,14 @@ hns3_action_rss_same(const struct rte_flow_action_rss *comp,
+@@ -1255,9 +1256,14 @@ hns3_action_rss_same(const struct rte_flow_action_rss *comp,
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/hns3: fix insecure way to query MAC statistics' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (128 preceding siblings ...)
2022-02-21 15:35 ` patch 'net/hns3: fix RSS key with null' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'net/hns3: fix double decrement of secondary count' " Kevin Traynor
` (64 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Huisong Li; +Cc: Min Hu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/10342b22ae8f0d8f6b7971aa3e88a28562fd77ea
Thanks.
Kevin
---
From 10342b22ae8f0d8f6b7971aa3e88a28562fd77ea Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Fri, 28 Jan 2022 10:07:05 +0800
Subject: [PATCH] net/hns3: fix insecure way to query MAC statistics
[ upstream commit 6ee07e3cb589145d0f0826f918fd44eb3e160a08 ]
The query way of MAC statistics in HNS3 PF driver is as following:
1) get MAC statistics register number and calculate descriptor number.
2) use above descriptor number to send command to firmware to query all
MAC statistics and copy to hns3_mac_stats struct in driver.
The preceding way does not verify the validity of the number of obtained
register, which may cause memory out-of-bounds.
Fixes: 8839c5e202f3 ("net/hns3: support device stats")
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
drivers/net/hns3/hns3_ethdev.c | 4 ++
drivers/net/hns3/hns3_ethdev.h | 1 +
drivers/net/hns3/hns3_stats.c | 120 ++++++++++++++++-----------------
drivers/net/hns3/hns3_stats.h | 11 ++-
4 files changed, 67 insertions(+), 69 deletions(-)
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index ac0c1fb5ec..209ec75eac 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2759,4 +2759,8 @@ hns3_get_capability(struct hns3_hw *hw)
hw->revision = revision;
+ ret = hns3_query_mac_stats_reg_num(hw);
+ if (ret)
+ return ret;
+
if (revision < PCI_REVISION_ID_HIP09_A) {
hns3_set_default_dev_specifications(hw);
diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
index 153e67337f..0e12d054e4 100644
--- a/drivers/net/hns3/hns3_ethdev.h
+++ b/drivers/net/hns3/hns3_ethdev.h
@@ -503,4 +503,5 @@ struct hns3_hw {
/* Include Mac stats | Rx stats | Tx stats */
struct hns3_mac_stats mac_stats;
+ uint32_t mac_stats_reg_num;
struct hns3_rx_missed_stats imissed_stats;
uint64_t oerror_stats;
diff --git a/drivers/net/hns3/hns3_stats.c b/drivers/net/hns3/hns3_stats.c
index 606b72509a..806720faff 100644
--- a/drivers/net/hns3/hns3_stats.c
+++ b/drivers/net/hns3/hns3_stats.c
@@ -308,22 +308,19 @@ static const struct hns3_xstats_name_offset hns3_imissed_stats_strings[] = {
static void hns3_tqp_stats_clear(struct hns3_hw *hw);
-/*
- * Query all the MAC statistics data of Network ICL command ,opcode id: 0x0034.
- * This command is used before send 'query_mac_stat command', the descriptor
- * number of 'query_mac_stat command' must match with reg_num in this command.
- * @praram hw
- * Pointer to structure hns3_hw.
- * @return
- * 0 on success.
- */
static int
-hns3_update_mac_stats(struct hns3_hw *hw, const uint32_t desc_num)
+hns3_update_mac_stats(struct hns3_hw *hw)
{
+#define HNS3_MAC_STATS_REG_NUM_PER_DESC 4
+
uint64_t *data = (uint64_t *)(&hw->mac_stats);
struct hns3_cmd_desc *desc;
+ uint32_t stats_iterms;
uint64_t *desc_data;
- uint16_t i, k, n;
+ uint32_t desc_num;
+ uint16_t i;
int ret;
+ /* The first desc has a 64-bit header, so need to consider it. */
+ desc_num = hw->mac_stats_reg_num / HNS3_MAC_STATS_REG_NUM_PER_DESC + 1;
desc = rte_malloc("hns3_mac_desc",
desc_num * sizeof(struct hns3_cmd_desc), 0);
@@ -341,19 +338,15 @@ hns3_update_mac_stats(struct hns3_hw *hw, const uint32_t desc_num)
}
- for (i = 0; i < desc_num; i++) {
- /* For special opcode 0034, only the first desc has the head */
- if (i == 0) {
- desc_data = (uint64_t *)(&desc[i].data[0]);
- n = HNS3_RD_FIRST_STATS_NUM;
- } else {
- desc_data = (uint64_t *)(&desc[i]);
- n = HNS3_RD_OTHER_STATS_NUM;
- }
-
- for (k = 0; k < n; k++) {
- *data += rte_le_to_cpu_64(*desc_data);
- data++;
- desc_data++;
- }
+ stats_iterms = RTE_MIN(sizeof(hw->mac_stats) / sizeof(uint64_t),
+ hw->mac_stats_reg_num);
+ desc_data = (uint64_t *)(&desc[0].data[0]);
+ for (i = 0; i < stats_iterms; i++) {
+ /*
+ * Data memory is continuous and only the first descriptor has a
+ * header in this command.
+ */
+ *data += rte_le_to_cpu_64(*desc_data);
+ data++;
+ desc_data++;
}
rte_free(desc);
@@ -362,42 +355,52 @@ hns3_update_mac_stats(struct hns3_hw *hw, const uint32_t desc_num)
}
-/*
- * Query Mac stat reg num command ,opcode id: 0x0033.
- * This command is used before send 'query_mac_stat command', the descriptor
- * number of 'query_mac_stat command' must match with reg_num in this command.
- * @praram rte_stats
- * Pointer to structure rte_eth_stats.
- * @return
- * 0 on success.
- */
static int
-hns3_mac_query_reg_num(struct rte_eth_dev *dev, uint32_t *desc_num)
+hns3_mac_query_reg_num(struct hns3_hw *hw, uint32_t *reg_num)
{
- struct hns3_adapter *hns = dev->data->dev_private;
- struct hns3_hw *hw = &hns->hw;
+#define HNS3_MAC_STATS_RSV_REG_NUM_ON_HIP08_B 3
struct hns3_cmd_desc desc;
- uint32_t *desc_data;
- uint32_t reg_num;
int ret;
hns3_cmd_setup_basic_desc(&desc, HNS3_OPC_QUERY_MAC_REG_NUM, true);
ret = hns3_cmd_send(hw, &desc, 1);
+ if (ret) {
+ hns3_err(hw, "failed to query MAC statistic reg number, ret = %d",
+ ret);
+ return ret;
+ }
+
+ /* The number of MAC statistics registers are provided by firmware. */
+ *reg_num = rte_le_to_cpu_32(desc.data[0]);
+ if (*reg_num == 0) {
+ hns3_err(hw, "MAC statistic reg number is invalid!");
+ return -ENODATA;
+ }
+
+ /*
+ * If driver doesn't request the firmware to report more MAC statistics
+ * iterms and the total number of MAC statistics registers by using new
+ * method, firmware will only reports the number of valid statistics
+ * registers. However, structure hns3_mac_stats in driver contains valid
+ * and reserved statistics iterms. In this case, the total register
+ * number must be added to three reserved statistics registers.
+ */
+ *reg_num += HNS3_MAC_STATS_RSV_REG_NUM_ON_HIP08_B;
+
+ return 0;
+}
+
+int
+hns3_query_mac_stats_reg_num(struct hns3_hw *hw)
+{
+ uint32_t mac_stats_reg_num = 0;
+ int ret;
+
+ ret = hns3_mac_query_reg_num(hw, &mac_stats_reg_num);
if (ret)
return ret;
- /*
- * The num of MAC statistics registers that are provided by IMP in this
- * version.
- */
- desc_data = (uint32_t *)(&desc.data[0]);
- reg_num = rte_le_to_cpu_32(*desc_data);
-
- /*
- * The descriptor number of 'query_additional_mac_stat command' is
- * '1 + (reg_num-3)/4 + ((reg_num-3)%4 !=0)';
- * This value is 83 in this version
- */
- *desc_num = 1 + ((reg_num - 3) >> 2) +
- (uint32_t)(((reg_num - 3) & 0x3) ? 1 : 0);
+ hw->mac_stats_reg_num = mac_stats_reg_num;
+ if (hw->mac_stats_reg_num > sizeof(hw->mac_stats) / sizeof(uint64_t))
+ hns3_warn(hw, "MAC stats reg number from firmware is greater than stats iterms in driver.");
return 0;
@@ -409,13 +412,6 @@ hns3_query_update_mac_stats(struct rte_eth_dev *dev)
struct hns3_adapter *hns = dev->data->dev_private;
struct hns3_hw *hw = &hns->hw;
- uint32_t desc_num;
- int ret;
- ret = hns3_mac_query_reg_num(dev, &desc_num);
- if (ret == 0)
- ret = hns3_update_mac_stats(hw, desc_num);
- else
- hns3_err(hw, "Query mac reg num fail : %d", ret);
- return ret;
+ return hns3_update_mac_stats(hw);
}
diff --git a/drivers/net/hns3/hns3_stats.h b/drivers/net/hns3/hns3_stats.h
index d1230f94cb..c81d351082 100644
--- a/drivers/net/hns3/hns3_stats.h
+++ b/drivers/net/hns3/hns3_stats.h
@@ -6,9 +6,4 @@
#define _HNS3_STATS_H_
-/* stats macro */
-#define HNS3_MAC_CMD_NUM 21
-#define HNS3_RD_FIRST_STATS_NUM 2
-#define HNS3_RD_OTHER_STATS_NUM 4
-
/* TQP stats */
struct hns3_tqp_stats {
@@ -23,4 +18,5 @@ struct hns3_mac_stats {
uint64_t mac_tx_mac_pause_num;
uint64_t mac_rx_mac_pause_num;
+ uint64_t rsv0;
uint64_t mac_tx_pfc_pri0_pkt_num;
uint64_t mac_tx_pfc_pri1_pkt_num;
@@ -59,5 +55,5 @@ struct hns3_mac_stats {
uint64_t mac_tx_2048_4095_oct_pkt_num;
uint64_t mac_tx_4096_8191_oct_pkt_num;
- uint64_t rsv0;
+ uint64_t rsv1;
uint64_t mac_tx_8192_9216_oct_pkt_num;
uint64_t mac_tx_9217_12287_oct_pkt_num;
@@ -86,5 +82,5 @@ struct hns3_mac_stats {
uint64_t mac_rx_2048_4095_oct_pkt_num;
uint64_t mac_rx_4096_8191_oct_pkt_num;
- uint64_t rsv1;
+ uint64_t rsv2;
uint64_t mac_rx_8192_9216_oct_pkt_num;
uint64_t mac_rx_9217_12287_oct_pkt_num;
@@ -169,4 +165,5 @@ int hns3_tqp_stats_init(struct hns3_hw *hw);
void hns3_tqp_stats_uninit(struct hns3_hw *hw);
int hns3_update_imissed_stats(struct hns3_hw *hw, bool is_clear);
+int hns3_query_mac_stats_reg_num(struct hns3_hw *hw);
#endif /* _HNS3_STATS_H_ */
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.432275095 +0000
+++ 0131-net-hns3-fix-insecure-way-to-query-MAC-statistics.patch 2022-02-21 15:22:44.267704522 +0000
@@ -1 +1 @@
-From 6ee07e3cb589145d0f0826f918fd44eb3e160a08 Mon Sep 17 00:00:00 2001
+From 10342b22ae8f0d8f6b7971aa3e88a28562fd77ea Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6ee07e3cb589145d0f0826f918fd44eb3e160a08 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 73bf209717..57f1572340 100644
+index ac0c1fb5ec..209ec75eac 100644
@@ -30,2 +31,2 @@
-@@ -2734,4 +2734,8 @@ hns3_get_capability(struct hns3_hw *hw)
- return ret;
+@@ -2759,4 +2759,8 @@ hns3_get_capability(struct hns3_hw *hw)
+ hw->revision = revision;
@@ -37 +38 @@
- if (hw->revision < PCI_REVISION_ID_HIP09_A) {
+ if (revision < PCI_REVISION_ID_HIP09_A) {
@@ -40 +41 @@
-index cf6380ebb2..ef028a7b2c 100644
+index 153e67337f..0e12d054e4 100644
@@ -43 +44 @@
-@@ -501,4 +501,5 @@ struct hns3_hw {
+@@ -503,4 +503,5 @@ struct hns3_hw {
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/hns3: fix double decrement of secondary count' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (129 preceding siblings ...)
2022-02-21 15:35 ` patch 'net/hns3: fix insecure way to query MAC statistics' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'net/hns3: fix operating queue when TCAM table is invalid' " Kevin Traynor
` (63 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Huisong Li; +Cc: Min Hu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/2b7587ea997fd4fd76d6d9d33e5ac564858a3b37
Thanks.
Kevin
---
From 2b7587ea997fd4fd76d6d9d33e5ac564858a3b37 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Fri, 28 Jan 2022 10:07:06 +0800
Subject: [PATCH] net/hns3: fix double decrement of secondary count
[ upstream commit c687877595ed7e287f3634d23736ff6400ad25af ]
The "secondary_cnt" indicates the number of secondary processes on an
Ethernet device. But the variable is double subtracted when detach the
device in secondary processes.
Fixes: ff6dc76e40b8 ("net/hns3: refactor multi-process initialization")
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
drivers/net/hns3/hns3_ethdev_vf.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 5015fe0d5f..62675ed7d7 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -2473,5 +2473,4 @@ hns3vf_dev_uninit(struct rte_eth_dev *eth_dev)
if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
- __atomic_fetch_sub(&hw->secondary_cnt, 1, __ATOMIC_RELAXED);
hns3_mp_uninit(eth_dev);
return 0;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.455583738 +0000
+++ 0132-net-hns3-fix-double-decrement-of-secondary-count.patch 2022-02-21 15:22:44.268704524 +0000
@@ -1 +1 @@
-From c687877595ed7e287f3634d23736ff6400ad25af Mon Sep 17 00:00:00 2001
+From 2b7587ea997fd4fd76d6d9d33e5ac564858a3b37 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c687877595ed7e287f3634d23736ff6400ad25af ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 1af2e07e81..dab1130dad 100644
+index 5015fe0d5f..62675ed7d7 100644
@@ -23 +24 @@
-@@ -2400,5 +2400,4 @@ hns3vf_dev_uninit(struct rte_eth_dev *eth_dev)
+@@ -2473,5 +2473,4 @@ hns3vf_dev_uninit(struct rte_eth_dev *eth_dev)
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/hns3: fix operating queue when TCAM table is invalid' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (130 preceding siblings ...)
2022-02-21 15:35 ` patch 'net/hns3: fix double decrement of secondary count' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'net/hns3: delete duplicated RSS type' " Kevin Traynor
` (62 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Huisong Li; +Cc: Min Hu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/2ae91ac6603c2230f7bae0890096e90d23f1d896
Thanks.
Kevin
---
From 2ae91ac6603c2230f7bae0890096e90d23f1d896 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Fri, 28 Jan 2022 10:07:07 +0800
Subject: [PATCH] net/hns3: fix operating queue when TCAM table is invalid
[ upstream commit eae97230dc2ab9553cdb335ab9b287a18a1b0c97 ]
Reset queues will query the TCAM table. The table is cleared after global
or imp reset. Currently, PF driver first resets Rx/Tx queues and then
restore the table during the reset recovery process, which will fail to
query the table and trigger a RAS error.
Fixes: fa29fe45a7b4 ("net/hns3: support queue start and stop")
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
drivers/net/hns3/hns3_ethdev.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 209ec75eac..2de1325d4b 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -4406,4 +4406,8 @@ hns3_init_hardware(struct hns3_adapter *hns)
int ret;
+ /*
+ * All queue-related HW operations must be performed after the TCAM
+ * table is configured.
+ */
ret = hns3_map_tqp(hw);
if (ret) {
@@ -5575,4 +5579,10 @@ hns3_reinit_dev(struct hns3_adapter *hns)
}
+ ret = hns3_init_hardware(hns);
+ if (ret) {
+ hns3_err(hw, "Failed to init hardware: %d", ret);
+ return ret;
+ }
+
ret = hns3_reset_all_tqps(hns);
if (ret) {
@@ -5581,10 +5591,4 @@ hns3_reinit_dev(struct hns3_adapter *hns)
}
- ret = hns3_init_hardware(hns);
- if (ret) {
- hns3_err(hw, "Failed to init hardware: %d", ret);
- return ret;
- }
-
ret = hns3_enable_hw_error_intr(hns, true);
if (ret) {
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.475939167 +0000
+++ 0133-net-hns3-fix-operating-queue-when-TCAM-table-is-inva.patch 2022-02-21 15:22:44.272704533 +0000
@@ -1 +1 @@
-From eae97230dc2ab9553cdb335ab9b287a18a1b0c97 Mon Sep 17 00:00:00 2001
+From 2ae91ac6603c2230f7bae0890096e90d23f1d896 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit eae97230dc2ab9553cdb335ab9b287a18a1b0c97 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 57f1572340..2641b6f79b 100644
+index 209ec75eac..2de1325d4b 100644
@@ -24 +25 @@
-@@ -4379,4 +4379,8 @@ hns3_init_hardware(struct hns3_adapter *hns)
+@@ -4406,4 +4406,8 @@ hns3_init_hardware(struct hns3_adapter *hns)
@@ -33 +34 @@
-@@ -5548,4 +5552,10 @@ hns3_reinit_dev(struct hns3_adapter *hns)
+@@ -5575,4 +5579,10 @@ hns3_reinit_dev(struct hns3_adapter *hns)
@@ -44 +45 @@
-@@ -5554,10 +5564,4 @@ hns3_reinit_dev(struct hns3_adapter *hns)
+@@ -5581,10 +5591,4 @@ hns3_reinit_dev(struct hns3_adapter *hns)
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/hns3: delete duplicated RSS type' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (131 preceding siblings ...)
2022-02-21 15:35 ` patch 'net/hns3: fix operating queue when TCAM table is invalid' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'net/ixgbe: check filter init failure' " Kevin Traynor
` (61 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Chengwen Feng; +Cc: Min Hu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/e72696baa48c06efd5edc383a0f7340fbd0dbdd6
Thanks.
Kevin
---
From e72696baa48c06efd5edc383a0f7340fbd0dbdd6 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 28 Jan 2022 10:07:08 +0800
Subject: [PATCH] net/hns3: delete duplicated RSS type
[ upstream commit 2fe781865875b83c9028678d76e12392a2fb39c3 ]
The hns3_set_rss_types hold two IPV4_TCP items, this patch deletes
duplicate item.
Fixes: 806f1d5ab0e3 ("net/hns3: set RSS hash type input configuration")
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
| 4 ----
1 file changed, 4 deletions(-)
--git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c
index 3a4b699ae2..1782d63883 100644
--- a/drivers/net/hns3/hns3_rss.c
+++ b/drivers/net/hns3/hns3_rss.c
@@ -153,8 +153,4 @@ static const struct {
BIT_ULL(HNS3_RSS_FIELD_IPV4_TCP_EN_TCP_S) |
BIT_ULL(HNS3_RSS_FIELD_IPV4_TCP_EN_TCP_D) },
- { RTE_ETH_RSS_NONFRAG_IPV4_TCP, BIT_ULL(HNS3_RSS_FIELD_IPV4_TCP_EN_IP_S) |
- BIT_ULL(HNS3_RSS_FIELD_IPV4_TCP_EN_IP_D) |
- BIT_ULL(HNS3_RSS_FIELD_IPV4_TCP_EN_TCP_S) |
- BIT_ULL(HNS3_RSS_FIELD_IPV4_TCP_EN_TCP_D) },
{ RTE_ETH_RSS_NONFRAG_IPV4_UDP, BIT_ULL(HNS3_RSS_FIELD_IPV4_UDP_EN_IP_S) |
BIT_ULL(HNS3_RSS_FIELD_IPV4_UDP_EN_IP_D) |
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.497734917 +0000
+++ 0134-net-hns3-delete-duplicated-RSS-type.patch 2022-02-21 15:22:44.273704536 +0000
@@ -1 +1 @@
-From 2fe781865875b83c9028678d76e12392a2fb39c3 Mon Sep 17 00:00:00 2001
+From e72696baa48c06efd5edc383a0f7340fbd0dbdd6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2fe781865875b83c9028678d76e12392a2fb39c3 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/ixgbe: check filter init failure' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (132 preceding siblings ...)
2022-02-21 15:35 ` patch 'net/hns3: delete duplicated RSS type' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'net/bonding: fix promiscuous and allmulticast state' " Kevin Traynor
` (60 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Yunjian Wang; +Cc: Haiyue Wang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/30dcde846730dd6d000da7b02f7b00a3071bb5ca
Thanks.
Kevin
---
From 30dcde846730dd6d000da7b02f7b00a3071bb5ca Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Fri, 24 Dec 2021 19:26:38 +0800
Subject: [PATCH] net/ixgbe: check filter init failure
[ upstream commit 8c1e5c658c24553d5f813adc8afed8910e6f5194 ]
The function ixgbe_fdir_filter_init() and ixgbe_l2_tn_filter_init()
could return errors, the return value need to be checked and returned.
Fixes: 080e3c0ee989 ("net/ixgbe: store flow director filter")
Fixes: d0c0c416ef1f ("net/ixgbe: store L2 tunnel filter")
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
---
drivers/net/ixgbe/ixgbe_ethdev.c | 32 +++++++++++++++++++++++---------
1 file changed, 23 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index c8f0460440..2f4ebb4e59 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -1224,11 +1224,6 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
/* initialize PF if max_vfs not zero */
ret = ixgbe_pf_host_init(eth_dev);
- if (ret) {
- rte_free(eth_dev->data->mac_addrs);
- eth_dev->data->mac_addrs = NULL;
- rte_free(eth_dev->data->hash_mac_addrs);
- eth_dev->data->hash_mac_addrs = NULL;
- return ret;
- }
+ if (ret)
+ goto err_pf_host_init;
ctrl_ext = IXGBE_READ_REG(hw, IXGBE_CTRL_EXT);
@@ -1269,8 +1264,12 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
/* initialize flow director filter list & hash */
- ixgbe_fdir_filter_init(eth_dev);
+ ret = ixgbe_fdir_filter_init(eth_dev);
+ if (ret)
+ goto err_fdir_filter_init;
/* initialize l2 tunnel filter list & hash */
- ixgbe_l2_tn_filter_init(eth_dev);
+ ret = ixgbe_l2_tn_filter_init(eth_dev);
+ if (ret)
+ goto err_l2_tn_filter_init;
/* initialize flow filter lists */
@@ -1284,4 +1283,19 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
return 0;
+
+err_l2_tn_filter_init:
+ ixgbe_fdir_filter_uninit(eth_dev);
+err_fdir_filter_init:
+ ixgbe_disable_intr(hw);
+ rte_intr_disable(intr_handle);
+ rte_intr_callback_unregister(intr_handle,
+ ixgbe_dev_interrupt_handler, eth_dev);
+ ixgbe_pf_host_uninit(eth_dev);
+err_pf_host_init:
+ rte_free(eth_dev->data->mac_addrs);
+ eth_dev->data->mac_addrs = NULL;
+ rte_free(eth_dev->data->hash_mac_addrs);
+ eth_dev->data->hash_mac_addrs = NULL;
+ return ret;
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.517222824 +0000
+++ 0135-net-ixgbe-check-filter-init-failure.patch 2022-02-21 15:22:44.277704545 +0000
@@ -1 +1 @@
-From 8c1e5c658c24553d5f813adc8afed8910e6f5194 Mon Sep 17 00:00:00 2001
+From 30dcde846730dd6d000da7b02f7b00a3071bb5ca Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8c1e5c658c24553d5f813adc8afed8910e6f5194 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/bonding: fix promiscuous and allmulticast state' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (133 preceding siblings ...)
2022-02-21 15:35 ` patch 'net/ixgbe: check filter init failure' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'net/bonding: fix reference count on mbufs' " Kevin Traynor
` (59 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Min Hu (Connor); +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/26f2cc6490458d89864a35b6416ea450e79c1f78
Thanks.
Kevin
---
From 26f2cc6490458d89864a35b6416ea450e79c1f78 Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Fri, 28 Jan 2022 10:25:32 +0800
Subject: [PATCH] net/bonding: fix promiscuous and allmulticast state
[ upstream commit ac5341f5f9bab7b87b1a71761c40d204a7e6ab86 ]
Currently, promiscuous or allmulticast state of bonding port will not be
passed to the new primary slave when active/standby switch-over. It
causes bugs in some scenario.
For example, promiscuous state of bonding port is off now, primary slave
(called A) is off but secondary slave(called B) is on.
Then active/standby switch-over, promiscuous state of the bonding port
is off, but the new primary slave turns to be B and its promiscuous
state is still on.
It is not consistent with bonding port. And this patch will fix it.
Fixes: 2efb58cbab6e ("bond: new link bonding library")
Fixes: 68218b87c184 ("net/bonding: prefer allmulti to promiscuous for LACP")
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
drivers/net/bonding/rte_eth_bond_pmd.c | 70 ++++++++++++++++++++++++++
1 file changed, 70 insertions(+)
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index e5abe90e07..d2fcfad676 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -2692,4 +2692,37 @@ bond_ethdev_promiscuous_disable(struct rte_eth_dev *dev)
}
+static int
+bond_ethdev_promiscuous_update(struct rte_eth_dev *dev)
+{
+ struct bond_dev_private *internals = dev->data->dev_private;
+ uint16_t port_id = internals->current_primary_port;
+
+ switch (internals->mode) {
+ case BONDING_MODE_ROUND_ROBIN:
+ case BONDING_MODE_BALANCE:
+ case BONDING_MODE_BROADCAST:
+ case BONDING_MODE_8023AD:
+ /* As promiscuous mode is propagated to all slaves for these
+ * mode, no need to update for bonding device.
+ */
+ break;
+ case BONDING_MODE_ACTIVE_BACKUP:
+ case BONDING_MODE_TLB:
+ case BONDING_MODE_ALB:
+ default:
+ /* As promiscuous mode is propagated only to primary slave
+ * for these mode. When active/standby switchover, promiscuous
+ * mode should be set to new primary slave according to bonding
+ * device.
+ */
+ if (rte_eth_promiscuous_get(internals->port_id) == 1)
+ rte_eth_promiscuous_enable(port_id);
+ else
+ rte_eth_promiscuous_disable(port_id);
+ }
+
+ return 0;
+}
+
static int
bond_ethdev_allmulticast_enable(struct rte_eth_dev *eth_dev)
@@ -2805,4 +2838,37 @@ bond_ethdev_allmulticast_disable(struct rte_eth_dev *eth_dev)
}
+static int
+bond_ethdev_allmulticast_update(struct rte_eth_dev *dev)
+{
+ struct bond_dev_private *internals = dev->data->dev_private;
+ uint16_t port_id = internals->current_primary_port;
+
+ switch (internals->mode) {
+ case BONDING_MODE_ROUND_ROBIN:
+ case BONDING_MODE_BALANCE:
+ case BONDING_MODE_BROADCAST:
+ case BONDING_MODE_8023AD:
+ /* As allmulticast mode is propagated to all slaves for these
+ * mode, no need to update for bonding device.
+ */
+ break;
+ case BONDING_MODE_ACTIVE_BACKUP:
+ case BONDING_MODE_TLB:
+ case BONDING_MODE_ALB:
+ default:
+ /* As allmulticast mode is propagated only to primary slave
+ * for these mode. When active/standby switchover, allmulticast
+ * mode should be set to new primary slave according to bonding
+ * device.
+ */
+ if (rte_eth_allmulticast_get(internals->port_id) == 1)
+ rte_eth_allmulticast_enable(port_id);
+ else
+ rte_eth_allmulticast_disable(port_id);
+ }
+
+ return 0;
+}
+
static void
bond_ethdev_delayed_lsc_propagation(void *arg)
@@ -2894,4 +2960,6 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,
mac_address_slaves_update(bonded_eth_dev);
+ bond_ethdev_promiscuous_update(bonded_eth_dev);
+ bond_ethdev_allmulticast_update(bonded_eth_dev);
}
@@ -2923,4 +2991,6 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,
internals->current_primary_port = internals->primary_port;
mac_address_slaves_update(bonded_eth_dev);
+ bond_ethdev_promiscuous_update(bonded_eth_dev);
+ bond_ethdev_allmulticast_update(bonded_eth_dev);
}
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.540496631 +0000
+++ 0136-net-bonding-fix-promiscuous-and-allmulticast-state.patch 2022-02-21 15:22:44.278704547 +0000
@@ -1 +1 @@
-From ac5341f5f9bab7b87b1a71761c40d204a7e6ab86 Mon Sep 17 00:00:00 2001
+From 26f2cc6490458d89864a35b6416ea450e79c1f78 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ac5341f5f9bab7b87b1a71761c40d204a7e6ab86 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/bonding: fix reference count on mbufs' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (134 preceding siblings ...)
2022-02-21 15:35 ` patch 'net/bonding: fix promiscuous and allmulticast state' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'app/testpmd: fix bonding mode set' " Kevin Traynor
` (58 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Min Hu (Connor); +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/7b71bc2d00f8fcddd22ea80422ad1ee49ff83397
Thanks.
Kevin
---
From 7b71bc2d00f8fcddd22ea80422ad1ee49ff83397 Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Fri, 28 Jan 2022 10:25:33 +0800
Subject: [PATCH] net/bonding: fix reference count on mbufs
[ upstream commit 814e79f3afad8c45c6922617f26292af3221ae2b ]
In bonding Tx broadcast mode, Packets should be sent by every slave,
but only one mbuf exits. The solution is to increment reference count
on mbufs, but it ignores multi segments.
This patch fixed it by adding reference for every segment in multi
segments Tx scenario.
Fixes: 2efb58cbab6e ("bond: new link bonding library")
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
drivers/net/bonding/rte_eth_bond_pmd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index d2fcfad676..bfa931098e 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1319,5 +1319,5 @@ bond_ethdev_tx_burst_broadcast(void *queue, struct rte_mbuf **bufs,
/* Increment reference count on mbufs */
for (i = 0; i < nb_pkts; i++)
- rte_mbuf_refcnt_update(bufs[i], num_of_slaves - 1);
+ rte_pktmbuf_refcnt_update(bufs[i], num_of_slaves - 1);
/* Transmit burst on each active slave */
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.561420491 +0000
+++ 0137-net-bonding-fix-reference-count-on-mbufs.patch 2022-02-21 15:22:44.279704549 +0000
@@ -1 +1 @@
-From 814e79f3afad8c45c6922617f26292af3221ae2b Mon Sep 17 00:00:00 2001
+From 7b71bc2d00f8fcddd22ea80422ad1ee49ff83397 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 814e79f3afad8c45c6922617f26292af3221ae2b ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'app/testpmd: fix bonding mode set' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (135 preceding siblings ...)
2022-02-21 15:35 ` patch 'net/bonding: fix reference count on mbufs' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'ethdev: add internal function to device struct from name' " Kevin Traynor
` (57 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Min Hu (Connor); +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/605d1de0d3a4ca8d99d66c1cb6af831556ccc904
Thanks.
Kevin
---
From 605d1de0d3a4ca8d99d66c1cb6af831556ccc904 Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Fri, 28 Jan 2022 10:35:19 +0800
Subject: [PATCH] app/testpmd: fix bonding mode set
[ upstream commit 39ddd5d1895e72ba2bc974eddbc12a3135639ed1 ]
when start testpmd, and type command like this, it will lead to
Segmentation fault, like:
testpmd> create bonded device 4 0
testpmd> add bonding slave 0 2
testpmd> add bonding slave 1 2
testpmd> port start 2
testpmd> set bonding mode 0 2
testpmd> quit
Stopping port 0...
Stopping ports...
...
Bye...
Segmentation fault
The reason to the bug is that rte timer do not be cancelled when quit.
That is, in 'bond_ethdev_start', resources are allocated according to
different bonding mode. In 'bond_ethdev_stop', resources are free by
the corresponding mode.
For example, 'bond_ethdev_start' start bond_mode_8023ad_ext_periodic_cb
timer for bonding mode 4. and 'bond_ethdev_stop' cancel the timer only
when the current bonding mode is 4. If the bonding mode is changed,
and directly quit the process, the timer will still on, and freed memory
will be accessed, then segmentation fault.
'bonding mode' changed means resources changed, reallocate resources for
different mode should be done, that is, device should be restarted.
Fixes: 2950a769315e ("bond: testpmd support")
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
app/test-pmd/cmdline.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index e626b1c7d9..16ad4be005 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -5916,4 +5916,17 @@ static void cmd_set_bonding_mode_parsed(void *parsed_result,
struct cmd_set_bonding_mode_result *res = parsed_result;
portid_t port_id = res->port_id;
+ struct rte_port *port = &ports[port_id];
+
+ /*
+ * Bonding mode changed means resources of device changed, like whether
+ * started rte timer or not. Device should be restarted when resources
+ * of device changed.
+ */
+ if (port->port_status != RTE_PORT_STOPPED) {
+ fprintf(stderr,
+ "\t Error: Can't set bonding mode when port %d is not stopped\n",
+ port_id);
+ return;
+ }
/* Set the bonding mode for the relevant port. */
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.581722491 +0000
+++ 0138-app-testpmd-fix-bonding-mode-set.patch 2022-02-21 15:22:44.290704574 +0000
@@ -1 +1 @@
-From 39ddd5d1895e72ba2bc974eddbc12a3135639ed1 Mon Sep 17 00:00:00 2001
+From 605d1de0d3a4ca8d99d66c1cb6af831556ccc904 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 39ddd5d1895e72ba2bc974eddbc12a3135639ed1 ]
+
@@ -36 +37,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'ethdev: add internal function to device struct from name' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (136 preceding siblings ...)
2022-02-21 15:35 ` patch 'app/testpmd: fix bonding mode set' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'net/tap: fix to populate FDs in secondary process' " Kevin Traynor
` (56 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Kumara Parameshwaran; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/721d0bbd1668d2a4b617a4a4de0b93dd60283d58
Thanks.
Kevin
---
From 721d0bbd1668d2a4b617a4a4de0b93dd60283d58 Mon Sep 17 00:00:00 2001
From: Kumara Parameshwaran <kparameshwar@vmware.com>
Date: Mon, 31 Jan 2022 20:02:33 +0530
Subject: [PATCH] ethdev: add internal function to device struct from name
[ upstream commit 961fb4029b8c52c0e8230d34993c354d70e10e14 ]
The PMDs would need a function to access the rte_eth_devices
without accessing the global rte_eth_device array.
Signed-off-by: Kumara Parameshwaran <kparameshwar@vmware.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
lib/ethdev/ethdev_driver.h | 18 ++++++++++++++++++
lib/ethdev/rte_ethdev.c | 11 +++++++++++
lib/ethdev/version.map | 1 +
3 files changed, 30 insertions(+)
diff --git a/lib/ethdev/ethdev_driver.h b/lib/ethdev/ethdev_driver.h
index d95605a355..0dac55f9c8 100644
--- a/lib/ethdev/ethdev_driver.h
+++ b/lib/ethdev/ethdev_driver.h
@@ -1630,4 +1630,22 @@ rte_eth_hairpin_queue_peer_bind(uint16_t cur_port, uint16_t cur_queue,
uint32_t direction);
+/**
+ * @internal
+ * Get rte_eth_dev from device name. The device name should be specified
+ * as below:
+ * - PCIe address (Domain:Bus:Device.Function), for example 0000:2:00.0
+ * - SoC device name, for example fsl-gmac0
+ * - vdev dpdk name, for example net_[pcap0|null0|tap0]
+ *
+ * @param name
+ * PCI address or name of the device
+ * @return
+ * - rte_eth_dev if successful
+ * - NULL on failure
+ */
+__rte_internal
+struct rte_eth_dev*
+rte_eth_dev_get_by_name(const char *name);
+
/**
* @internal
diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index 29e21ad580..917a320afa 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -895,4 +895,15 @@ rte_eth_dev_get_port_by_name(const char *name, uint16_t *port_id)
}
+struct rte_eth_dev *
+rte_eth_dev_get_by_name(const char *name)
+{
+ uint16_t pid;
+
+ if (rte_eth_dev_get_port_by_name(name, &pid))
+ return NULL;
+
+ return &rte_eth_devices[pid];
+}
+
static int
eth_err(uint16_t port_id, int ret)
diff --git a/lib/ethdev/version.map b/lib/ethdev/version.map
index c2fb0669a4..1f7359c846 100644
--- a/lib/ethdev/version.map
+++ b/lib/ethdev/version.map
@@ -268,4 +268,5 @@ INTERNAL {
rte_eth_dev_create;
rte_eth_dev_destroy;
+ rte_eth_dev_get_by_name;
rte_eth_dev_is_rx_hairpin_queue;
rte_eth_dev_is_tx_hairpin_queue;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.611834978 +0000
+++ 0139-ethdev-add-internal-function-to-device-struct-from-n.patch 2022-02-21 15:22:44.293704581 +0000
@@ -1 +1 @@
-From 961fb4029b8c52c0e8230d34993c354d70e10e14 Mon Sep 17 00:00:00 2001
+From 721d0bbd1668d2a4b617a4a4de0b93dd60283d58 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 961fb4029b8c52c0e8230d34993c354d70e10e14 ]
+
@@ -8,2 +9,0 @@
-
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/tap: fix to populate FDs in secondary process' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (137 preceding siblings ...)
2022-02-21 15:35 ` patch 'ethdev: add internal function to device struct from name' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'app/testpmd: fix stack overflow for EEPROM display' " Kevin Traynor
` (55 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Kumara Parameshwaran; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/ac180f4d2662503ecd18a2e94689a229104d3d61
Thanks.
Kevin
---
From ac180f4d2662503ecd18a2e94689a229104d3d61 Mon Sep 17 00:00:00 2001
From: Kumara Parameshwaran <kparameshwar@vmware.com>
Date: Mon, 31 Jan 2022 20:02:34 +0530
Subject: [PATCH] net/tap: fix to populate FDs in secondary process
[ upstream commit c36ce7099c2187926cd62cff7ebd479823554929 ]
When a tap device is hotplugged to primary process which in turn
adds the device to all secondary process, the secondary process
does a tap_mp_attach_queues, but the fds are not populated in
the primary during the probe they are populated during the queue_setup,
added a fix to sync the queues during rte_eth_dev_start
Fixes: 4852aa8f6e21 ("drivers/net: enable hotplug on secondary process")
Signed-off-by: Kumara Parameshwaran <kparameshwar@vmware.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
drivers/net/tap/rte_eth_tap.c | 80 +++++++++++++++++++++++++++++++++++
1 file changed, 80 insertions(+)
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 5bb472f1a6..b0c09956de 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -68,4 +68,5 @@
/* IPC key for queue fds sync */
#define TAP_MP_KEY "tap_mp_sync_queues"
+#define TAP_MP_REQ_START_RXTX "tap_mp_req_start_rxtx"
#define TAP_IOV_DEFAULT_MAX 1024
@@ -881,4 +882,39 @@ tap_link_set_up(struct rte_eth_dev *dev)
}
+static int
+tap_mp_req_on_rxtx(struct rte_eth_dev *dev)
+{
+ struct rte_mp_msg msg;
+ struct ipc_queues *request_param = (struct ipc_queues *)msg.param;
+ int err;
+ int fd_iterator = 0;
+ struct pmd_process_private *process_private = dev->process_private;
+ int i;
+
+ memset(&msg, 0, sizeof(msg));
+ strlcpy(msg.name, TAP_MP_REQ_START_RXTX, sizeof(msg.name));
+ strlcpy(request_param->port_name, dev->data->name, sizeof(request_param->port_name));
+ msg.len_param = sizeof(*request_param);
+ for (i = 0; i < dev->data->nb_tx_queues; i++) {
+ msg.fds[fd_iterator++] = process_private->txq_fds[i];
+ msg.num_fds++;
+ request_param->txq_count++;
+ }
+ for (i = 0; i < dev->data->nb_rx_queues; i++) {
+ msg.fds[fd_iterator++] = process_private->rxq_fds[i];
+ msg.num_fds++;
+ request_param->rxq_count++;
+ }
+
+ err = rte_mp_sendmsg(&msg);
+ if (err < 0) {
+ TAP_LOG(ERR, "Failed to send start req to secondary %d",
+ rte_errno);
+ return -1;
+ }
+
+ return 0;
+}
+
static int
tap_dev_start(struct rte_eth_dev *dev)
@@ -886,4 +922,7 @@ tap_dev_start(struct rte_eth_dev *dev)
int err, i;
+ if (rte_eal_process_type() == RTE_PROC_PRIMARY)
+ tap_mp_req_on_rxtx(dev);
+
err = tap_intr_handle_set(dev, 1);
if (err)
@@ -902,4 +941,32 @@ tap_dev_start(struct rte_eth_dev *dev)
}
+static int
+tap_mp_req_start_rxtx(const struct rte_mp_msg *request, __rte_unused const void *peer)
+{
+ struct rte_eth_dev *dev;
+ const struct ipc_queues *request_param =
+ (const struct ipc_queues *)request->param;
+ int fd_iterator;
+ int queue;
+ struct pmd_process_private *process_private;
+
+ dev = rte_eth_dev_get_by_name(request_param->port_name);
+ if (!dev) {
+ TAP_LOG(ERR, "Failed to get dev for %s",
+ request_param->port_name);
+ return -1;
+ }
+ process_private = dev->process_private;
+ fd_iterator = 0;
+ TAP_LOG(DEBUG, "tap_attach rx_q:%d tx_q:%d\n", request_param->rxq_count,
+ request_param->txq_count);
+ for (queue = 0; queue < request_param->txq_count; queue++)
+ process_private->txq_fds[queue] = request->fds[fd_iterator++];
+ for (queue = 0; queue < request_param->rxq_count; queue++)
+ process_private->rxq_fds[queue] = request->fds[fd_iterator++];
+
+ return 0;
+}
+
/* This function gets called when the current port gets stopped.
*/
@@ -1085,4 +1152,7 @@ tap_dev_close(struct rte_eth_dev *dev)
if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
rte_free(dev->process_private);
+ if (tap_devices_count == 1)
+ rte_mp_action_unregister(TAP_MP_REQ_START_RXTX);
+ tap_devices_count--;
return 0;
}
@@ -2446,4 +2516,14 @@ rte_pmd_tap_probe(struct rte_vdev_device *dev)
if (ret != 0)
return -1;
+
+ if (!tap_devices_count) {
+ ret = rte_mp_action_register(TAP_MP_REQ_START_RXTX, tap_mp_req_start_rxtx);
+ if (ret < 0 && rte_errno != ENOTSUP) {
+ TAP_LOG(ERR, "tap: Failed to register IPC callback: %s",
+ strerror(rte_errno));
+ return -1;
+ }
+ }
+ tap_devices_count++;
rte_eth_dev_probing_finish(eth_dev);
return 0;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.635759931 +0000
+++ 0140-net-tap-fix-to-populate-FDs-in-secondary-process.patch 2022-02-21 15:22:44.295704585 +0000
@@ -1 +1 @@
-From c36ce7099c2187926cd62cff7ebd479823554929 Mon Sep 17 00:00:00 2001
+From ac180f4d2662503ecd18a2e94689a229104d3d61 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c36ce7099c2187926cd62cff7ebd479823554929 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 02eb311e09..111037de65 100644
+index 5bb472f1a6..b0c09956de 100644
@@ -112 +113 @@
-@@ -1093,4 +1160,7 @@ tap_dev_close(struct rte_eth_dev *dev)
+@@ -1085,4 +1152,7 @@ tap_dev_close(struct rte_eth_dev *dev)
@@ -120 +121 @@
-@@ -2454,4 +2524,14 @@ rte_pmd_tap_probe(struct rte_vdev_device *dev)
+@@ -2446,4 +2516,14 @@ rte_pmd_tap_probe(struct rte_vdev_device *dev)
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'app/testpmd: fix stack overflow for EEPROM display' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (138 preceding siblings ...)
2022-02-21 15:35 ` patch 'net/tap: fix to populate FDs in secondary process' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'net/sfc: fix lock releases' " Kevin Traynor
` (54 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Steve Yang; +Cc: Aman Singh, Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/ce413e192290e23ffc98ee1561c154516e789fb1
Thanks.
Kevin
---
From ce413e192290e23ffc98ee1561c154516e789fb1 Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Thu, 20 Jan 2022 02:59:31 +0000
Subject: [PATCH] app/testpmd: fix stack overflow for EEPROM display
[ upstream commit ff6db8829678396d2d10b3c29744d36149608982 ]
When the size of EEPROM exceeds the default thread stack size(8MB),
e.g.: 10MB size, it will crash due to stack overflow.
Allocate the data of EPPROM information on the heap.
Fixes: 6b67721dee2a ("app/testpmd: add EEPROM command")
Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
app/test-pmd/config.c | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 1722d6c8f8..e812f57151 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -913,8 +913,13 @@ port_eeprom_display(portid_t port_id)
}
- char buf[len_eeprom];
einfo.offset = 0;
einfo.length = len_eeprom;
- einfo.data = buf;
+ einfo.data = calloc(1, len_eeprom);
+ if (!einfo.data) {
+ fprintf(stderr,
+ "Allocation of port %u eeprom data failed\n",
+ port_id);
+ return;
+ }
ret = rte_eth_dev_get_eeprom(port_id, &einfo);
@@ -934,8 +939,10 @@ port_eeprom_display(portid_t port_id)
break;
}
+ free(einfo.data);
return;
}
rte_hexdump(stdout, "hexdump", einfo.data, einfo.length);
printf("Finish -- Port: %d EEPROM length: %d bytes\n", port_id, len_eeprom);
+ free(einfo.data);
}
@@ -973,8 +980,13 @@ port_module_eeprom_display(portid_t port_id)
}
- char buf[minfo.eeprom_len];
einfo.offset = 0;
einfo.length = minfo.eeprom_len;
- einfo.data = buf;
+ einfo.data = calloc(1, minfo.eeprom_len);
+ if (!einfo.data) {
+ fprintf(stderr,
+ "Allocation of port %u eeprom data failed\n",
+ port_id);
+ return;
+ }
ret = rte_eth_dev_get_module_eeprom(port_id, &einfo);
@@ -995,4 +1007,5 @@ port_module_eeprom_display(portid_t port_id)
break;
}
+ free(einfo.data);
return;
}
@@ -1000,4 +1013,5 @@ port_module_eeprom_display(portid_t port_id)
rte_hexdump(stdout, "hexdump", einfo.data, einfo.length);
printf("Finish -- Port: %d MODULE EEPROM length: %d bytes\n", port_id, einfo.length);
+ free(einfo.data);
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.655336336 +0000
+++ 0141-app-testpmd-fix-stack-overflow-for-EEPROM-display.patch 2022-02-21 15:22:44.297704590 +0000
@@ -1 +1 @@
-From ff6db8829678396d2d10b3c29744d36149608982 Mon Sep 17 00:00:00 2001
+From ce413e192290e23ffc98ee1561c154516e789fb1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ff6db8829678396d2d10b3c29744d36149608982 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/sfc: fix lock releases' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (139 preceding siblings ...)
2022-02-21 15:35 ` patch 'app/testpmd: fix stack overflow for EEPROM display' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'vhost: fix guest to host physical address mapping' " Kevin Traynor
` (53 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Ivan Malov; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/eaf935f63c42ebd8dcf63b999ae7c0f48c3b2d53
Thanks.
Kevin
---
From eaf935f63c42ebd8dcf63b999ae7c0f48c3b2d53 Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov@oktetlabs.ru>
Date: Mon, 7 Feb 2022 14:15:59 +0300
Subject: [PATCH] net/sfc: fix lock releases
[ upstream commit 1542d303a7c0127a7748881f7cb689983614ee43 ]
Fixes: 155583abe63c ("net/sfc: implement representor queue setup and release")
Fixes: 75f080fdf74a ("net/sfc: implement port representor start and stop")
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
drivers/net/sfc/sfc_repr_proxy.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/sfc/sfc_repr_proxy.c b/drivers/net/sfc/sfc_repr_proxy.c
index 535b07ea52..8660d419a3 100644
--- a/drivers/net/sfc/sfc_repr_proxy.c
+++ b/drivers/net/sfc/sfc_repr_proxy.c
@@ -1414,4 +1414,5 @@ sfc_repr_proxy_add_rxq(uint16_t pf_port_id, uint16_t repr_id,
if (port == NULL) {
sfc_err(sa, "%s() failed: no such port", __func__);
+ sfc_put_adapter(sa);
return ENOENT;
}
@@ -1452,4 +1453,5 @@ sfc_repr_proxy_del_rxq(uint16_t pf_port_id, uint16_t repr_id,
if (port == NULL) {
sfc_err(sa, "%s() failed: no such port", __func__);
+ sfc_put_adapter(sa);
return;
}
@@ -1485,4 +1487,5 @@ sfc_repr_proxy_add_txq(uint16_t pf_port_id, uint16_t repr_id,
if (port == NULL) {
sfc_err(sa, "%s() failed: no such port", __func__);
+ sfc_put_adapter(sa);
return ENOENT;
}
@@ -1517,4 +1520,5 @@ sfc_repr_proxy_del_txq(uint16_t pf_port_id, uint16_t repr_id,
if (port == NULL) {
sfc_err(sa, "%s() failed: no such port", __func__);
+ sfc_put_adapter(sa);
return;
}
@@ -1615,4 +1619,5 @@ sfc_repr_proxy_stop_repr(uint16_t pf_port_id, uint16_t repr_id)
if (port == NULL) {
sfc_err(sa, "%s() failed: no such port", __func__);
+ sfc_put_adapter(sa);
return ENOENT;
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.677270047 +0000
+++ 0142-net-sfc-fix-lock-releases.patch 2022-02-21 15:22:44.298704592 +0000
@@ -1 +1 @@
-From 1542d303a7c0127a7748881f7cb689983614ee43 Mon Sep 17 00:00:00 2001
+From eaf935f63c42ebd8dcf63b999ae7c0f48c3b2d53 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1542d303a7c0127a7748881f7cb689983614ee43 ]
+
@@ -8 +9,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'vhost: fix guest to host physical address mapping' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (140 preceding siblings ...)
2022-02-21 15:35 ` patch 'net/sfc: fix lock releases' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'net/virtio: fix slots number when indirect feature on' " Kevin Traynor
` (52 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Yuan Wang; +Cc: Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/160769f6486d584468ebcf4d50abf1ee9d4378ab
Thanks.
Kevin
---
From 160769f6486d584468ebcf4d50abf1ee9d4378ab Mon Sep 17 00:00:00 2001
From: Yuan Wang <yuanx.wang@intel.com>
Date: Mon, 17 Jan 2022 16:20:27 +0000
Subject: [PATCH] vhost: fix guest to host physical address mapping
[ upstream commit 8b764f460f168505b9335bdbd0e0fead8edbc188 ]
Async copy fails when looking up hpa in the gpa to hpa mapping table.
This happens because the gpa is matched exactly in the merged
mapping table, and the merge loses the mapping entries.
A new range comparison method is introduced to solve this issue.
Fixes: 6563cf92380a ("vhost: fix async copy on multi-page buffers")
Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
lib/vhost/vhost.h | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/lib/vhost/vhost.h b/lib/vhost/vhost.h
index 7085e0885c..b3f0c1d07c 100644
--- a/lib/vhost/vhost.h
+++ b/lib/vhost/vhost.h
@@ -588,4 +588,18 @@ static __rte_always_inline int guest_page_addrcmp(const void *p1,
}
+static __rte_always_inline int guest_page_rangecmp(const void *p1, const void *p2)
+{
+ const struct guest_page *page1 = (const struct guest_page *)p1;
+ const struct guest_page *page2 = (const struct guest_page *)p2;
+
+ if (page1->guest_phys_addr >= page2->guest_phys_addr) {
+ if (page1->guest_phys_addr < page2->guest_phys_addr + page2->size)
+ return 0;
+ else
+ return 1;
+ } else
+ return -1;
+}
+
static __rte_always_inline rte_iova_t
gpa_to_first_hpa(struct virtio_net *dev, uint64_t gpa,
@@ -598,7 +612,7 @@ gpa_to_first_hpa(struct virtio_net *dev, uint64_t gpa,
*hpa_size = gpa_size;
if (dev->nr_guest_pages >= VHOST_BINARY_SEARCH_THRESH) {
- key.guest_phys_addr = gpa & ~(dev->guest_pages[0].size - 1);
+ key.guest_phys_addr = gpa;
page = bsearch(&key, dev->guest_pages, dev->nr_guest_pages,
- sizeof(struct guest_page), guest_page_addrcmp);
+ sizeof(struct guest_page), guest_page_rangecmp);
if (page) {
if (gpa + gpa_size <=
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.696029239 +0000
+++ 0143-vhost-fix-guest-to-host-physical-address-mapping.patch 2022-02-21 15:22:44.298704592 +0000
@@ -1 +1 @@
-From 8b764f460f168505b9335bdbd0e0fead8edbc188 Mon Sep 17 00:00:00 2001
+From 160769f6486d584468ebcf4d50abf1ee9d4378ab Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8b764f460f168505b9335bdbd0e0fead8edbc188 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/virtio: fix slots number when indirect feature on' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (141 preceding siblings ...)
2022-02-21 15:35 ` patch 'vhost: fix guest to host physical address mapping' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'regex/mlx5: fix memory allocation check' " Kevin Traynor
` (51 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Marvin Liu; +Cc: Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/72487940d1f219ab26b6e81cf00d9cb7fa97994e
Thanks.
Kevin
---
From 72487940d1f219ab26b6e81cf00d9cb7fa97994e Mon Sep 17 00:00:00 2001
From: Marvin Liu <yong.liu@intel.com>
Date: Thu, 20 Jan 2022 20:22:18 +0800
Subject: [PATCH] net/virtio: fix slots number when indirect feature on
[ upstream commit 787091b9d5f614ae35ab8cfb7718f6ccb64f1f3c ]
Virtio driver only occupies one slot for enqueuing chained mbufs when
indirect feature is on. Required slots calculation should depend on
indirect feature status at the end.
Fixes: 0eaf7fc2fe8e ("net/virtio: separate AVX Rx/Tx")
Signed-off-by: Marvin Liu <yong.liu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
drivers/net/virtio/virtio_rxtx_packed.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/virtio/virtio_rxtx_packed.h b/drivers/net/virtio/virtio_rxtx_packed.h
index d5c259a1f6..536112983c 100644
--- a/drivers/net/virtio/virtio_rxtx_packed.h
+++ b/drivers/net/virtio/virtio_rxtx_packed.h
@@ -126,5 +126,4 @@ virtqueue_enqueue_single_packed_vec(struct virtnet_tx *txvq,
* default => number of segments + 1
*/
- slots = use_indirect ? 1 : (txm->nb_segs + !can_push);
can_push = rte_mbuf_refcnt_read(txm) == 1 &&
RTE_MBUF_DIRECT(txm) &&
@@ -132,5 +131,5 @@ virtqueue_enqueue_single_packed_vec(struct virtnet_tx *txvq,
rte_pktmbuf_headroom(txm) >= hdr_size;
- slots = txm->nb_segs + !can_push;
+ slots = use_indirect ? 1 : (txm->nb_segs + !can_push);
need = slots - vq->vq_free_cnt;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.715725172 +0000
+++ 0144-net-virtio-fix-slots-number-when-indirect-feature-on.patch 2022-02-21 15:22:44.299704594 +0000
@@ -1 +1 @@
-From 787091b9d5f614ae35ab8cfb7718f6ccb64f1f3c Mon Sep 17 00:00:00 2001
+From 72487940d1f219ab26b6e81cf00d9cb7fa97994e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 787091b9d5f614ae35ab8cfb7718f6ccb64f1f3c ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'regex/mlx5: fix memory allocation check' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (142 preceding siblings ...)
2022-02-21 15:35 ` patch 'net/virtio: fix slots number when indirect feature on' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'stack: fix stubs header export' " Kevin Traynor
` (50 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Weiguo Li; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/6b06137c98e342a5447fc022a4454baac14792c4
Thanks.
Kevin
---
From 6b06137c98e342a5447fc022a4454baac14792c4 Mon Sep 17 00:00:00 2001
From: Weiguo Li <liwg06@foxmail.com>
Date: Tue, 25 Jan 2022 19:51:41 +0800
Subject: [PATCH] regex/mlx5: fix memory allocation check
[ upstream commit 60e9028a8e7e034bcfc7054b12c39f1f2ee2513c ]
The wrong field was checked after allocation.
Fixes: e3dbbf718ebc ("regex/mlx5: support configuration")
Signed-off-by: Weiguo Li <liwg06@foxmail.com>
---
drivers/regex/mlx5/mlx5_rxp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regex/mlx5/mlx5_rxp.c b/drivers/regex/mlx5/mlx5_rxp.c
index 5ead3ca341..51b6e71376 100644
--- a/drivers/regex/mlx5/mlx5_rxp.c
+++ b/drivers/regex/mlx5/mlx5_rxp.c
@@ -149,5 +149,5 @@ mlx5_regex_configure(struct rte_regexdev *dev,
priv->qps = rte_zmalloc(NULL, sizeof(struct mlx5_regex_qp) *
priv->nb_queues, 0);
- if (!priv->nb_queues) {
+ if (!priv->qps) {
DRV_LOG(ERR, "can't allocate qps memory");
rte_errno = ENOMEM;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.734055027 +0000
+++ 0145-regex-mlx5-fix-memory-allocation-check.patch 2022-02-21 15:22:44.299704594 +0000
@@ -1 +1 @@
-From 60e9028a8e7e034bcfc7054b12c39f1f2ee2513c Mon Sep 17 00:00:00 2001
+From 6b06137c98e342a5447fc022a4454baac14792c4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 60e9028a8e7e034bcfc7054b12c39f1f2ee2513c ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'stack: fix stubs header export' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (143 preceding siblings ...)
2022-02-21 15:35 ` patch 'regex/mlx5: fix memory allocation check' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'config/arm: add values for native armv7' " Kevin Traynor
` (49 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: David Marchand; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/02a96ad251d21264882df5405cbecc0b60d62831
Thanks.
Kevin
---
From 02a96ad251d21264882df5405cbecc0b60d62831 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 10 Feb 2022 09:55:43 +0100
Subject: [PATCH] stack: fix stubs header export
[ upstream commit 8adf5f528bf3321feeae2231007ebae162032739 ]
The stubs header is included as part of rte_stack.h for architectures
other than x86_64 and aarch64 (i.e. x86 32 bits and ppc).
Note: chkincs won't catch this issue since it checks headers from within
the source directory.
Fixes: 7911ba0473e0 ("stack: enable lock-free implementation for aarch64")
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
lib/stack/meson.build | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/stack/meson.build b/lib/stack/meson.build
index 2f53f49677..18177a742f 100644
--- a/lib/stack/meson.build
+++ b/lib/stack/meson.build
@@ -10,3 +10,4 @@ indirect_headers += files(
'rte_stack_lf_generic.h',
'rte_stack_lf_c11.h',
+ 'rte_stack_lf_stubs.h',
)
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.753016851 +0000
+++ 0146-stack-fix-stubs-header-export.patch 2022-02-21 15:22:44.299704594 +0000
@@ -1 +1 @@
-From 8adf5f528bf3321feeae2231007ebae162032739 Mon Sep 17 00:00:00 2001
+From 02a96ad251d21264882df5405cbecc0b60d62831 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8adf5f528bf3321feeae2231007ebae162032739 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'config/arm: add values for native armv7' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (144 preceding siblings ...)
2022-02-21 15:35 ` patch 'stack: fix stubs header export' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'eal: fix C++ include' " Kevin Traynor
` (48 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Juraj Linkeš; +Cc: Ruifeng Wang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/72334ceaf11cc8a691d04d34e7198a53181005f5
Thanks.
Kevin
---
From 72334ceaf11cc8a691d04d34e7198a53181005f5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Juraj=20Linke=C5=A1?= <juraj.linkes@pantheon.tech>
Date: Tue, 25 Jan 2022 11:08:28 +0100
Subject: [PATCH] config/arm: add values for native armv7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 4efec50c7a56a0c9f683b5ccf4db289ca01b600b ]
Armv7 native build fails with this error:
../config/meson.build:364:1: ERROR: Problem encountered:
Number of CPU cores not specified.
This is because RTE_MAX_LCORE is not set. We also need to set
RTE_MAX_NUMA_NODES in armv7 native builds.
Fixes: 8ef09fdc506b ("build: add optional NUMA and CPU counts detection")
Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
config/arm/meson.build | 2 ++
1 file changed, 2 insertions(+)
diff --git a/config/arm/meson.build b/config/arm/meson.build
index 0c8570aabb..b3bd4b9133 100644
--- a/config/arm/meson.build
+++ b/config/arm/meson.build
@@ -435,4 +435,6 @@ if dpdk_conf.get('RTE_ARCH_32')
dpdk_conf.set('RTE_ARCH_ARMv7', true)
dpdk_conf.set('RTE_ARCH', 'armv7')
+ dpdk_conf.set('RTE_MAX_LCORE', 128)
+ dpdk_conf.set('RTE_MAX_NUMA_NODES', 1)
# the minimum architecture supported, armv7-a, needs the following,
machine_args += '-mfpu=neon'
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.771257274 +0000
+++ 0147-config-arm-add-values-for-native-armv7.patch 2022-02-21 15:22:44.300704597 +0000
@@ -1 +1 @@
-From 4efec50c7a56a0c9f683b5ccf4db289ca01b600b Mon Sep 17 00:00:00 2001
+From 72334ceaf11cc8a691d04d34e7198a53181005f5 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 4efec50c7a56a0c9f683b5ccf4db289ca01b600b ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index e102381af5..dd5e2f38d4 100644
+index 0c8570aabb..b3bd4b9133 100644
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'eal: fix C++ include' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (145 preceding siblings ...)
2022-02-21 15:35 ` patch 'config/arm: add values for native armv7' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'eventdev: " Kevin Traynor
` (47 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/1fdfd87f14eb4063ce5c13d83a4b8399346a5610
Thanks.
Kevin
---
From 1fdfd87f14eb4063ce5c13d83a4b8399346a5610 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Thu, 10 Feb 2022 15:42:33 +0000
Subject: [PATCH] eal: fix C++ include
[ upstream commit 59144f6edd884bfc392143b60bf4d0f082053784 ]
C++ files could not include some headers because:
* "new" is a keyword in C++, so can't be a variable name
* there is no automatic casting to/from void *
Fixes: 184104fc6121 ("ticketlock: introduce fair ticket based locking")
Fixes: 032a7e5499a0 ("trace: implement provider payload")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
lib/eal/include/generic/rte_ticketlock.h | 14 +++++++-------
lib/eal/include/rte_trace_point.h | 2 +-
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/lib/eal/include/generic/rte_ticketlock.h b/lib/eal/include/generic/rte_ticketlock.h
index c1b8808f51..693c67b517 100644
--- a/lib/eal/include/generic/rte_ticketlock.h
+++ b/lib/eal/include/generic/rte_ticketlock.h
@@ -92,11 +92,11 @@ static inline int
rte_ticketlock_trylock(rte_ticketlock_t *tl)
{
- rte_ticketlock_t old, new;
- old.tickets = __atomic_load_n(&tl->tickets, __ATOMIC_RELAXED);
- new.tickets = old.tickets;
- new.s.next++;
- if (old.s.next == old.s.current) {
- if (__atomic_compare_exchange_n(&tl->tickets, &old.tickets,
- new.tickets, 0, __ATOMIC_ACQUIRE, __ATOMIC_RELAXED))
+ rte_ticketlock_t oldl, newl;
+ oldl.tickets = __atomic_load_n(&tl->tickets, __ATOMIC_RELAXED);
+ newl.tickets = oldl.tickets;
+ newl.s.next++;
+ if (oldl.s.next == oldl.s.current) {
+ if (__atomic_compare_exchange_n(&tl->tickets, &oldl.tickets,
+ newl.tickets, 0, __ATOMIC_ACQUIRE, __ATOMIC_RELAXED))
return 1;
}
diff --git a/lib/eal/include/rte_trace_point.h b/lib/eal/include/rte_trace_point.h
index e226f073f7..0f8700974f 100644
--- a/lib/eal/include/rte_trace_point.h
+++ b/lib/eal/include/rte_trace_point.h
@@ -371,5 +371,5 @@ do { \
if (unlikely(in == NULL)) \
return; \
- rte_strscpy(mem, in, __RTE_TRACE_EMIT_STRING_LEN_MAX); \
+ rte_strscpy((char *)mem, in, __RTE_TRACE_EMIT_STRING_LEN_MAX); \
mem = RTE_PTR_ADD(mem, __RTE_TRACE_EMIT_STRING_LEN_MAX); \
} while (0)
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.789642933 +0000
+++ 0148-eal-fix-C-include.patch 2022-02-21 15:22:44.300704597 +0000
@@ -1 +1 @@
-From 59144f6edd884bfc392143b60bf4d0f082053784 Mon Sep 17 00:00:00 2001
+From 1fdfd87f14eb4063ce5c13d83a4b8399346a5610 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 59144f6edd884bfc392143b60bf4d0f082053784 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'eventdev: fix C++ include' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (146 preceding siblings ...)
2022-02-21 15:35 ` patch 'eal: fix C++ include' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'graph: " Kevin Traynor
` (46 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Jerin Jacob, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/3668e548281723fefea3f0fbabf8805033ec4555
Thanks.
Kevin
---
From 3668e548281723fefea3f0fbabf8805033ec4555 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Thu, 10 Feb 2022 15:42:34 +0000
Subject: [PATCH] eventdev: fix C++ include
[ upstream commit 153e7d88133cf30e6a042e92dcc6a8a0acfe7a62 ]
The eventdev headers had issues when used from C++
* Missing closing "}" for the extern "C" block
* No automatic casting to/from void *
Fixes: a6562f6d6f8e ("eventdev: introduce event timer adapter")
Fixes: 32e326869ed6 ("eventdev: add tracepoints")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
lib/eventdev/rte_event_timer_adapter.h | 4 ++++
lib/eventdev/rte_eventdev.h | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/lib/eventdev/rte_event_timer_adapter.h b/lib/eventdev/rte_event_timer_adapter.h
index 1551741820..e68d02da72 100644
--- a/lib/eventdev/rte_event_timer_adapter.h
+++ b/lib/eventdev/rte_event_timer_adapter.h
@@ -679,3 +679,7 @@ rte_event_timer_cancel_burst(const struct rte_event_timer_adapter *adapter,
}
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __RTE_EVENT_TIMER_ADAPTER_H__ */
diff --git a/lib/eventdev/rte_eventdev.h b/lib/eventdev/rte_eventdev.h
index eef47d8acc..25fb7c89dd 100644
--- a/lib/eventdev/rte_eventdev.h
+++ b/lib/eventdev/rte_eventdev.h
@@ -1806,5 +1806,5 @@ __rte_event_enqueue_burst(uint8_t dev_id, uint8_t port_id,
}
#endif
- rte_eventdev_trace_enq_burst(dev_id, port_id, ev, nb_events, fn);
+ rte_eventdev_trace_enq_burst(dev_id, port_id, ev, nb_events, (void *)fn);
/*
* Allow zero cost non burst mode routine invocation if application
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.809131620 +0000
+++ 0149-eventdev-fix-C-include.patch 2022-02-21 15:22:44.302704601 +0000
@@ -1 +1 @@
-From 153e7d88133cf30e6a042e92dcc6a8a0acfe7a62 Mon Sep 17 00:00:00 2001
+From 3668e548281723fefea3f0fbabf8805033ec4555 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 153e7d88133cf30e6a042e92dcc6a8a0acfe7a62 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'graph: fix C++ include' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (147 preceding siblings ...)
2022-02-21 15:35 ` patch 'eventdev: " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'ipsec: " Kevin Traynor
` (45 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Jerin Jacob, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/4f328f8e2b3ab46b0d7111e412ca067e78f84829
Thanks.
Kevin
---
From 4f328f8e2b3ab46b0d7111e412ca067e78f84829 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Thu, 10 Feb 2022 15:42:35 +0000
Subject: [PATCH] graph: fix C++ include
[ upstream commit ca6732316c23e158da10b0e3a7b2eaab9d3e1368 ]
C++ does not have automatic casting to/from void pointers, so need
explicit cast if header is to be included in C++ code
Fixes: 40d4f51403ec ("graph: implement fastpath routines")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
lib/graph/rte_graph_worker.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/graph/rte_graph_worker.h b/lib/graph/rte_graph_worker.h
index eef77f732a..0c0b9c095a 100644
--- a/lib/graph/rte_graph_worker.h
+++ b/lib/graph/rte_graph_worker.h
@@ -156,5 +156,5 @@ rte_graph_walk(struct rte_graph *graph)
*/
while (likely(head != graph->tail)) {
- node = RTE_PTR_ADD(graph, cir_start[(int32_t)head++]);
+ node = (struct rte_node *)RTE_PTR_ADD(graph, cir_start[(int32_t)head++]);
RTE_ASSERT(node->fence == RTE_GRAPH_FENCE);
objs = node->objs;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.829044963 +0000
+++ 0150-graph-fix-C-include.patch 2022-02-21 15:22:44.302704601 +0000
@@ -1 +1 @@
-From ca6732316c23e158da10b0e3a7b2eaab9d3e1368 Mon Sep 17 00:00:00 2001
+From 4f328f8e2b3ab46b0d7111e412ca067e78f84829 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ca6732316c23e158da10b0e3a7b2eaab9d3e1368 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'ipsec: fix C++ include' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (148 preceding siblings ...)
2022-02-21 15:35 ` patch 'graph: " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'table: " Kevin Traynor
` (44 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Konstantin Ananyev, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/91b9d6cd34aba0db5ddbee1fbf17682d4b3f95d6
Thanks.
Kevin
---
From 91b9d6cd34aba0db5ddbee1fbf17682d4b3f95d6 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Thu, 10 Feb 2022 15:42:36 +0000
Subject: [PATCH] ipsec: fix C++ include
[ upstream commit e82470e22528ad7c0277aa94ecbc6b97f3bdb4c2 ]
C++ does not have automatic casting to/from void pointers, so need
explicit cast if header is to be included in C++ code
Fixes: f901d9c82688 ("ipsec: add helpers to group completed crypto-ops")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
lib/ipsec/rte_ipsec_group.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/ipsec/rte_ipsec_group.h b/lib/ipsec/rte_ipsec_group.h
index 60ab297710..62c2bd7217 100644
--- a/lib/ipsec/rte_ipsec_group.h
+++ b/lib/ipsec/rte_ipsec_group.h
@@ -50,8 +50,8 @@ rte_ipsec_ses_from_crypto(const struct rte_crypto_op *cop)
if (cop->sess_type == RTE_CRYPTO_OP_SECURITY_SESSION) {
ss = cop->sym[0].sec_session;
- return (void *)(uintptr_t)ss->opaque_data;
+ return (struct rte_ipsec_session *)(uintptr_t)ss->opaque_data;
} else if (cop->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
cs = cop->sym[0].session;
- return (void *)(uintptr_t)cs->opaque_data;
+ return (struct rte_ipsec_session *)(uintptr_t)cs->opaque_data;
}
return NULL;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.848502228 +0000
+++ 0151-ipsec-fix-C-include.patch 2022-02-21 15:22:44.303704603 +0000
@@ -1 +1 @@
-From e82470e22528ad7c0277aa94ecbc6b97f3bdb4c2 Mon Sep 17 00:00:00 2001
+From 91b9d6cd34aba0db5ddbee1fbf17682d4b3f95d6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e82470e22528ad7c0277aa94ecbc6b97f3bdb4c2 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'table: fix C++ include' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (149 preceding siblings ...)
2022-02-21 15:35 ` patch 'ipsec: " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'vhost: " Kevin Traynor
` (43 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/6afaa0f3d797c141b3f8a33fefbfaaad79641dfe
Thanks.
Kevin
---
From 6afaa0f3d797c141b3f8a33fefbfaaad79641dfe Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Thu, 10 Feb 2022 15:42:37 +0000
Subject: [PATCH] table: fix C++ include
[ upstream commit 097ea8e274440919433cd932ec7a1b2f3956180b ]
Since C++ doesn't support automatic casting from void * to other types,
we need to explicitly add the casts to any header files in DPDK.
Fixes: ea7be0a0386e ("lib/librte_table: add hash function headers")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
lib/table/rte_table_hash_func.h | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/lib/table/rte_table_hash_func.h b/lib/table/rte_table_hash_func.h
index c4c35cc06a..a962ec2f68 100644
--- a/lib/table/rte_table_hash_func.h
+++ b/lib/table/rte_table_hash_func.h
@@ -59,6 +59,6 @@ rte_table_hash_crc_key8(void *key, void *mask, __rte_unused uint32_t key_size,
uint64_t seed)
{
- uint64_t *k = key;
- uint64_t *m = mask;
+ uint64_t *k = (uint64_t *)key;
+ uint64_t *m = (uint64_t *)mask;
uint64_t crc0;
@@ -73,6 +73,6 @@ rte_table_hash_crc_key16(void *key, void *mask, __rte_unused uint32_t key_size,
uint64_t seed)
{
- uint64_t *k = key;
- uint64_t *m = mask;
+ uint64_t *k = (uint64_t *)key;
+ uint64_t *m = (uint64_t *)mask;
uint64_t k0, crc0, crc1;
@@ -92,6 +92,6 @@ rte_table_hash_crc_key24(void *key, void *mask, __rte_unused uint32_t key_size,
uint64_t seed)
{
- uint64_t *k = key;
- uint64_t *m = mask;
+ uint64_t *k = (uint64_t *)key;
+ uint64_t *m = (uint64_t *)mask;
uint64_t k0, k2, crc0, crc1;
@@ -114,6 +114,6 @@ rte_table_hash_crc_key32(void *key, void *mask, __rte_unused uint32_t key_size,
uint64_t seed)
{
- uint64_t *k = key;
- uint64_t *m = mask;
+ uint64_t *k = (uint64_t *)key;
+ uint64_t *m = (uint64_t *)mask;
uint64_t k0, k2, crc0, crc1, crc2, crc3;
@@ -140,6 +140,6 @@ rte_table_hash_crc_key40(void *key, void *mask, __rte_unused uint32_t key_size,
uint64_t seed)
{
- uint64_t *k = key;
- uint64_t *m = mask;
+ uint64_t *k = (uint64_t *)key;
+ uint64_t *m = (uint64_t *)mask;
uint64_t k0, k2, crc0, crc1, crc2, crc3;
@@ -166,6 +166,6 @@ rte_table_hash_crc_key48(void *key, void *mask, __rte_unused uint32_t key_size,
uint64_t seed)
{
- uint64_t *k = key;
- uint64_t *m = mask;
+ uint64_t *k = (uint64_t *)key;
+ uint64_t *m = (uint64_t *)mask;
uint64_t k0, k2, k5, crc0, crc1, crc2, crc3;
@@ -193,6 +193,6 @@ rte_table_hash_crc_key56(void *key, void *mask, __rte_unused uint32_t key_size,
uint64_t seed)
{
- uint64_t *k = key;
- uint64_t *m = mask;
+ uint64_t *k = (uint64_t *)key;
+ uint64_t *m = (uint64_t *)mask;
uint64_t k0, k2, k5, crc0, crc1, crc2, crc3, crc4, crc5;
@@ -223,6 +223,6 @@ rte_table_hash_crc_key64(void *key, void *mask, __rte_unused uint32_t key_size,
uint64_t seed)
{
- uint64_t *k = key;
- uint64_t *m = mask;
+ uint64_t *k = (uint64_t *)key;
+ uint64_t *m = (uint64_t *)mask;
uint64_t k0, k2, k5, crc0, crc1, crc2, crc3, crc4, crc5;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.866517902 +0000
+++ 0152-table-fix-C-include.patch 2022-02-21 15:22:44.303704603 +0000
@@ -1 +1 @@
-From 097ea8e274440919433cd932ec7a1b2f3956180b Mon Sep 17 00:00:00 2001
+From 6afaa0f3d797c141b3f8a33fefbfaaad79641dfe Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 097ea8e274440919433cd932ec7a1b2f3956180b ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'vhost: fix C++ include' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (150 preceding siblings ...)
2022-02-21 15:35 ` patch 'table: " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'mem: check allocation in dynamic hugepage init' " Kevin Traynor
` (42 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/c59904ed037588d2b513b37675a322120b82e273
Thanks.
Kevin
---
From c59904ed037588d2b513b37675a322120b82e273 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Thu, 10 Feb 2022 15:42:38 +0000
Subject: [PATCH] vhost: fix C++ include
[ upstream commit 1d1126ad436e8c7c015fb3f67ad3af05c3b397d5 ]
The virtio kernel header includes are already noted as being
incompatible with C++. We can ensure that the header is safe for
inclusion in C++ code by not including those headers during C++ builds.
While not ideal, this does ensure that all DPDK headers can be included
in C++ code without errors.
Fixes: f8904d563691 ("vhost: fix header for strict compilation flags")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
lib/vhost/rte_vhost.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/vhost/rte_vhost.h b/lib/vhost/rte_vhost.h
index b454c05868..2acb31df2d 100644
--- a/lib/vhost/rte_vhost.h
+++ b/lib/vhost/rte_vhost.h
@@ -22,8 +22,10 @@ extern "C" {
#endif
+#ifndef __cplusplus
/* These are not C++-aware. */
#include <linux/vhost.h>
#include <linux/virtio_ring.h>
#include <linux/virtio_net.h>
+#endif
#define RTE_VHOST_USER_CLIENT (1ULL << 0)
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.885512984 +0000
+++ 0153-vhost-fix-C-include.patch 2022-02-21 15:22:44.303704603 +0000
@@ -1 +1 @@
-From 1d1126ad436e8c7c015fb3f67ad3af05c3b397d5 Mon Sep 17 00:00:00 2001
+From c59904ed037588d2b513b37675a322120b82e273 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1d1126ad436e8c7c015fb3f67ad3af05c3b397d5 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'mem: check allocation in dynamic hugepage init' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (151 preceding siblings ...)
2022-02-21 15:35 ` patch 'vhost: " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'app/fib: fix division by zero' " Kevin Traynor
` (41 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Yunjian Wang; +Cc: David Marchand, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/1058b2c36938b2b6f865d810cd8f9ef3d3011fbb
Thanks.
Kevin
---
From 1058b2c36938b2b6f865d810cd8f9ef3d3011fbb Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Tue, 14 Dec 2021 21:30:25 +0800
Subject: [PATCH] mem: check allocation in dynamic hugepage init
[ upstream commit 5f69ebbd85300a197bbe9e6a630642352f5aba39 ]
The function malloc() could return NULL, the return value
need to be checked.
Fixes: 6f63858e55e6 ("mem: prevent preallocated pages from being freed")
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
lib/eal/common/eal_common_dynmem.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lib/eal/common/eal_common_dynmem.c b/lib/eal/common/eal_common_dynmem.c
index 7c5437ddfa..c1e1889f5c 100644
--- a/lib/eal/common/eal_common_dynmem.c
+++ b/lib/eal/common/eal_common_dynmem.c
@@ -305,4 +305,8 @@ eal_dynmem_hugepage_init(void)
pages = malloc(sizeof(*pages) * needed);
+ if (pages == NULL) {
+ RTE_LOG(ERR, EAL, "Failed to malloc pages\n");
+ return -1;
+ }
/* do not request exact number of pages */
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.904276193 +0000
+++ 0154-mem-check-allocation-in-dynamic-hugepage-init.patch 2022-02-21 15:22:44.304704606 +0000
@@ -1 +1 @@
-From 5f69ebbd85300a197bbe9e6a630642352f5aba39 Mon Sep 17 00:00:00 2001
+From 1058b2c36938b2b6f865d810cd8f9ef3d3011fbb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5f69ebbd85300a197bbe9e6a630642352f5aba39 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'app/fib: fix division by zero' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (152 preceding siblings ...)
2022-02-21 15:35 ` patch 'mem: check allocation in dynamic hugepage init' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'test/mbuf: fix mbuf data content check' " Kevin Traynor
` (40 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Vladimir Medvedkin; +Cc: Kevin Traynor, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/472f790f95a44cf13259dfdc1f44cf5259e1773b
Thanks.
Kevin
---
From 472f790f95a44cf13259dfdc1f44cf5259e1773b Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Date: Thu, 27 Jan 2022 18:08:53 +0000
Subject: [PATCH] app/fib: fix division by zero
[ upstream commit a01070dac90b76f735e3c8805c3b78357b078518 ]
This patch fixes the division by 0, which occurs if the number of
routes is less than 10.
Can be triggered by passing -n argument with value < 10:
./dpdk-test-fib -- -n 9
...
Floating point exception (core dumped)
Fixes: 103809d032cd ("app/test-fib: add test application for FIB")
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
---
app/test-fib/main.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/app/test-fib/main.c b/app/test-fib/main.c
index 622703dce8..830c32cc44 100644
--- a/app/test-fib/main.c
+++ b/app/test-fib/main.c
@@ -712,4 +712,8 @@ parse_opts(int argc, char **argv)
rte_exit(-EINVAL, "Invalid option -n\n");
}
+
+ if (config.nb_routes < config.print_fract)
+ config.print_fract = config.nb_routes;
+
break;
case 'd':
@@ -1243,4 +1247,8 @@ main(int argc, char **argv)
while (fgets(line, sizeof(line), fr) != NULL)
config.nb_routes++;
+
+ if (config.nb_routes < config.print_fract)
+ config.print_fract = config.nb_routes;
+
rewind(fr);
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.923319273 +0000
+++ 0155-app-fib-fix-division-by-zero.patch 2022-02-21 15:22:44.305704608 +0000
@@ -1 +1 @@
-From a01070dac90b76f735e3c8805c3b78357b078518 Mon Sep 17 00:00:00 2001
+From 472f790f95a44cf13259dfdc1f44cf5259e1773b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a01070dac90b76f735e3c8805c3b78357b078518 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'test/mbuf: fix mbuf data content check' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (153 preceding siblings ...)
2022-02-21 15:35 ` patch 'app/fib: fix division by zero' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'ipc: end multiprocess thread during cleanup' " Kevin Traynor
` (39 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: David Marchand; +Cc: Olivier Matz, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/6e1bc26cdebb761b8152a58e1b566812498e494c
Thanks.
Kevin
---
From 6e1bc26cdebb761b8152a58e1b566812498e494c Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 3 Feb 2022 10:39:12 +0100
Subject: [PATCH] test/mbuf: fix mbuf data content check
[ upstream commit 985571b6b41ec49552b3d91c20060236c7c0fecb ]
When allocating a mbuf, its data content is most of the time zero'd but
nothing ensures this. This is especially wrong when building with
RTE_MALLOC_DEBUG, where data is poisoned to 0x6b on free.
This test reserves MBUF_TEST_DATA_LEN2 bytes in the mbuf data segment,
and sets this data to 0xcc.
Calling strlen(), the test may try to read more than MBUF_TEST_DATA_LEN2
which has been noticed when memory had been poisoned.
The mbuf data content is checked right after, so we can simply remove
strlen().
Fixes: 7b295dceea07 ("test/mbuf: add unit test cases")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
app/test/test_mbuf.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c
index f54d1d7c00..2a037a12da 100644
--- a/app/test/test_mbuf.c
+++ b/app/test/test_mbuf.c
@@ -2032,6 +2032,4 @@ test_pktmbuf_read_from_offset(struct rte_mempool *pktmbuf_pool)
if (data_copy == NULL)
GOTO_FAIL("%s: Error in reading packet data!\n", __func__);
- if (strlen(data_copy) != MBUF_TEST_DATA_LEN2 - 5)
- GOTO_FAIL("%s: Incorrect data length!\n", __func__);
for (off = 0; off < MBUF_TEST_DATA_LEN2 - 5; off++) {
if (data_copy[off] != (char)0xcc)
@@ -2055,6 +2053,4 @@ test_pktmbuf_read_from_offset(struct rte_mempool *pktmbuf_pool)
if (data_copy == NULL)
GOTO_FAIL("%s: Error in reading packet data!\n", __func__);
- if (strlen(data_copy) != MBUF_TEST_DATA_LEN2)
- GOTO_FAIL("%s: Corrupted data content!\n", __func__);
for (off = 0; off < MBUF_TEST_DATA_LEN2; off++) {
if (data_copy[off] != (char)0xcc)
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.942207110 +0000
+++ 0156-test-mbuf-fix-mbuf-data-content-check.patch 2022-02-21 15:22:44.306704610 +0000
@@ -1 +1 @@
-From 985571b6b41ec49552b3d91c20060236c7c0fecb Mon Sep 17 00:00:00 2001
+From 6e1bc26cdebb761b8152a58e1b566812498e494c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 985571b6b41ec49552b3d91c20060236c7c0fecb ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index f762befb69..d37aefd2e9 100644
+index f54d1d7c00..2a037a12da 100644
@@ -31 +32 @@
-@@ -2043,6 +2043,4 @@ test_pktmbuf_read_from_offset(struct rte_mempool *pktmbuf_pool)
+@@ -2032,6 +2032,4 @@ test_pktmbuf_read_from_offset(struct rte_mempool *pktmbuf_pool)
@@ -38 +39 @@
-@@ -2066,6 +2064,4 @@ test_pktmbuf_read_from_offset(struct rte_mempool *pktmbuf_pool)
+@@ -2055,6 +2053,4 @@ test_pktmbuf_read_from_offset(struct rte_mempool *pktmbuf_pool)
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'ipc: end multiprocess thread during cleanup' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (154 preceding siblings ...)
2022-02-21 15:35 ` patch 'test/mbuf: fix mbuf data content check' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'vfio: cleanup the multiprocess sync handle' " Kevin Traynor
` (38 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Anatoly Burakov, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/c32322e508b9b26944be05cffe5407e60b88416e
Thanks.
Kevin
---
From c32322e508b9b26944be05cffe5407e60b88416e Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Sat, 13 Nov 2021 09:22:54 -0800
Subject: [PATCH] ipc: end multiprocess thread during cleanup
[ upstream commit 6e858b4d9244cf53505589673755ab18ac2a4a83 ]
When rte_eal_cleanup is called, all control threads should exit.
For the mp thread, this best handled by closing the mp_socket
and letting the thread see that.
This also fixes potential problems where the mp_socket gets
another hard error, and the thread runs away repeating itself
by reading the same error.
Fixes: 85d6815fa6d0 ("eal: close multi-process socket during cleanup")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
lib/eal/common/eal_common_proc.c | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/lib/eal/common/eal_common_proc.c b/lib/eal/common/eal_common_proc.c
index ebd0f6673b..b33d58ea0a 100644
--- a/lib/eal/common/eal_common_proc.c
+++ b/lib/eal/common/eal_common_proc.c
@@ -283,6 +283,15 @@ read_msg(struct mp_msg_internal *m, struct sockaddr_un *s)
msgh.msg_controllen = sizeof(control);
+retry:
msglen = recvmsg(mp_fd, &msgh, 0);
+
+ /* zero length message means socket was closed */
+ if (msglen == 0)
+ return 0;
+
if (msglen < 0) {
+ if (errno == EINTR)
+ goto retry;
+
RTE_LOG(ERR, EAL, "recvmsg failed, %s\n", strerror(errno));
return -1;
@@ -312,5 +321,5 @@ read_msg(struct mp_msg_internal *m, struct sockaddr_un *s)
return -1;
}
- return 0;
+ return msglen;
}
@@ -386,6 +395,11 @@ mp_handle(void *arg __rte_unused)
while (mp_fd >= 0) {
- if (read_msg(&msg, &sa) == 0)
- process_msg(&msg, &sa);
+ int ret;
+
+ ret = read_msg(&msg, &sa);
+ if (ret <= 0)
+ break;
+
+ process_msg(&msg, &sa);
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.962920211 +0000
+++ 0157-ipc-end-multiprocess-thread-during-cleanup.patch 2022-02-21 15:22:44.307704612 +0000
@@ -1 +1 @@
-From 6e858b4d9244cf53505589673755ab18ac2a4a83 Mon Sep 17 00:00:00 2001
+From c32322e508b9b26944be05cffe5407e60b88416e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6e858b4d9244cf53505589673755ab18ac2a4a83 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'vfio: cleanup the multiprocess sync handle' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (155 preceding siblings ...)
2022-02-21 15:35 ` patch 'ipc: end multiprocess thread during cleanup' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'config: align mempool elements to 128 bytes on CN10K' " Kevin Traynor
` (37 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Anatoly Burakov, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/e183e43e2b4690e133829c7d6fd21fad502fd8aa
Thanks.
Kevin
---
From e183e43e2b4690e133829c7d6fd21fad502fd8aa Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Sat, 13 Nov 2021 09:22:55 -0800
Subject: [PATCH] vfio: cleanup the multiprocess sync handle
[ upstream commit 6412941ae8d183ead5720f06cd2616f7c523f6a8 ]
When rte_eal_cleanup is called the rte_mp_action for VFIO
should be freed.
Fixes: edf73dd33072 ("ipc: handle unsupported IPC in action register")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
lib/eal/linux/eal.c | 4 ++++
lib/eal/linux/eal_vfio.h | 1 +
lib/eal/linux/eal_vfio_mp_sync.c | 8 ++++++++
3 files changed, 13 insertions(+)
diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c
index 60b4924838..504287c7ec 100644
--- a/lib/eal/linux/eal.c
+++ b/lib/eal/linux/eal.c
@@ -1363,5 +1363,9 @@ rte_eal_cleanup(void)
if (rte_eal_process_type() == RTE_PROC_PRIMARY)
rte_memseg_walk(mark_freeable, NULL);
+
rte_service_finalize();
+#ifdef VFIO_PRESENT
+ vfio_mp_sync_cleanup();
+#endif
rte_mp_channel_cleanup();
/* after this point, any DPDK pointers will become dangling */
diff --git a/lib/eal/linux/eal_vfio.h b/lib/eal/linux/eal_vfio.h
index c5d5f70548..bba5c7afa5 100644
--- a/lib/eal/linux/eal_vfio.h
+++ b/lib/eal/linux/eal_vfio.h
@@ -134,4 +134,5 @@ vfio_has_supported_extensions(int vfio_container_fd);
int vfio_mp_sync_setup(void);
+void vfio_mp_sync_cleanup(void);
#define EAL_VFIO_MP "eal_vfio_mp_sync"
diff --git a/lib/eal/linux/eal_vfio_mp_sync.c b/lib/eal/linux/eal_vfio_mp_sync.c
index a2accfab3a..d12bbaee64 100644
--- a/lib/eal/linux/eal_vfio_mp_sync.c
+++ b/lib/eal/linux/eal_vfio_mp_sync.c
@@ -121,3 +121,11 @@ vfio_mp_sync_setup(void)
}
+void
+vfio_mp_sync_cleanup(void)
+{
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return;
+
+ rte_mp_action_unregister(EAL_VFIO_MP);
+}
#endif
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:47.981728577 +0000
+++ 0158-vfio-cleanup-the-multiprocess-sync-handle.patch 2022-02-21 15:22:44.308704615 +0000
@@ -1 +1 @@
-From 6412941ae8d183ead5720f06cd2616f7c523f6a8 Mon Sep 17 00:00:00 2001
+From e183e43e2b4690e133829c7d6fd21fad502fd8aa Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6412941ae8d183ead5720f06cd2616f7c523f6a8 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index fad062a2dd..d77cd871be 100644
+index 60b4924838..504287c7ec 100644
@@ -24,2 +25,2 @@
-@@ -1277,5 +1277,9 @@ rte_eal_cleanup(void)
- internal_conf->hugepage_file.unlink_existing)
+@@ -1363,5 +1363,9 @@ rte_eal_cleanup(void)
+ if (rte_eal_process_type() == RTE_PROC_PRIMARY)
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'config: align mempool elements to 128 bytes on CN10K' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (156 preceding siblings ...)
2022-02-21 15:35 ` patch 'vfio: cleanup the multiprocess sync handle' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'net/memif: remove pointer deference before null check' " Kevin Traynor
` (36 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Pavan Nikhilesh; +Cc: Ruifeng Wang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/273bacf2a8aebdeadb488c0c7517f12ee9e4d2a1
Thanks.
Kevin
---
From 273bacf2a8aebdeadb488c0c7517f12ee9e4d2a1 Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Mon, 13 Dec 2021 16:36:14 +0530
Subject: [PATCH] config: align mempool elements to 128 bytes on CN10K
[ upstream commit 3e97fa671dee32ea2689eb18f868d9086613cc1b ]
Mempool elements are by default aligned to CACHELINE_SIZE.
In CN10K cacheline size is 64B but the RoC requires buffers to be
aligned to 128B.
Set RTE_MEMPOOL_ALIGN to 128 to force mempool buffers to be aligned
128 bytes.
Fixes: 1b4c86a721c9 ("config/arm: add Marvell CN10K")
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
config/arm/meson.build | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/config/arm/meson.build b/config/arm/meson.build
index b3bd4b9133..89a3bf4213 100644
--- a/config/arm/meson.build
+++ b/config/arm/meson.build
@@ -278,5 +278,6 @@ soc_cn10k = {
'flags': [
['RTE_MAX_LCORE', 24],
- ['RTE_MAX_NUMA_NODES', 1]
+ ['RTE_MAX_NUMA_NODES', 1],
+ ['RTE_MEMPOOL_ALIGN', 128]
],
'part_number': '0xd49',
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:48.001032648 +0000
+++ 0159-config-align-mempool-elements-to-128-bytes-on-CN10K.patch 2022-02-21 15:22:44.309704617 +0000
@@ -1 +1 @@
-From 3e97fa671dee32ea2689eb18f868d9086613cc1b Mon Sep 17 00:00:00 2001
+From 273bacf2a8aebdeadb488c0c7517f12ee9e4d2a1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3e97fa671dee32ea2689eb18f868d9086613cc1b ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index dd5e2f38d4..48b88a84f2 100644
+index b3bd4b9133..89a3bf4213 100644
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/memif: remove pointer deference before null check' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (157 preceding siblings ...)
2022-02-21 15:35 ` patch 'config: align mempool elements to 128 bytes on CN10K' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'net: fix L2TPv2 common header' " Kevin Traynor
` (35 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Weiguo Li; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/d594afc7926fb5d2b2502152f400b22e30aa93e8
Thanks.
Kevin
---
From d594afc7926fb5d2b2502152f400b22e30aa93e8 Mon Sep 17 00:00:00 2001
From: Weiguo Li <liwg06@foxmail.com>
Date: Wed, 9 Feb 2022 15:39:34 +0800
Subject: [PATCH] net/memif: remove pointer deference before null check
[ upstream commit b6c0f464affcf0ec6fcf0a26e517692dc08244f4 ]
There are duplicates of assignment here, the one before null check
may cause a null pointer deference, so remove the previous one.
Fixes: 09c7e63a71f9 ("net/memif: introduce memory interface PMD")
Signed-off-by: Weiguo Li <liwg06@foxmail.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
drivers/net/memif/memif_socket.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/memif/memif_socket.c b/drivers/net/memif/memif_socket.c
index 42f48a68a1..7886644412 100644
--- a/drivers/net/memif/memif_socket.c
+++ b/drivers/net/memif/memif_socket.c
@@ -403,9 +403,8 @@ memif_msg_enq_init(struct rte_eth_dev *dev)
struct pmd_internals *pmd = dev->data->dev_private;
struct memif_msg_queue_elt *e = memif_msg_enq(pmd->cc);
- memif_msg_init_t *i = &e->msg.init;
+ memif_msg_init_t *i;
if (e == NULL)
return -1;
-
i = &e->msg.init;
e->msg.type = MEMIF_MSG_TYPE_INIT;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:48.019865600 +0000
+++ 0160-net-memif-remove-pointer-deference-before-null-check.patch 2022-02-21 15:22:44.310704619 +0000
@@ -1 +1 @@
-From b6c0f464affcf0ec6fcf0a26e517692dc08244f4 Mon Sep 17 00:00:00 2001
+From d594afc7926fb5d2b2502152f400b22e30aa93e8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b6c0f464affcf0ec6fcf0a26e517692dc08244f4 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net: fix L2TPv2 common header' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (158 preceding siblings ...)
2022-02-21 15:35 ` patch 'net/memif: remove pointer deference before null check' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'ethdev: remove unnecessary null check' " Kevin Traynor
` (34 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Jie Wang; +Cc: Ori Kam, Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/851b597291901044f72d4150887ab1449dc59e8a
Thanks.
Kevin
---
From 851b597291901044f72d4150887ab1449dc59e8a Mon Sep 17 00:00:00 2001
From: Jie Wang <jie1x.wang@intel.com>
Date: Wed, 9 Feb 2022 17:38:53 +0800
Subject: [PATCH] net: fix L2TPv2 common header
[ upstream commit 9747f6955b01005bb19e8dfacd64c4bb92dbd07e ]
The fields of L2TPv2 common header were reversed in big endian and
little endian.
This patch fixes this error to ensure L2TPv2 can be parsed correctly.
For L2TP reference:
https://datatracker.ietf.org/doc/html/rfc2661#section-3.1
Fixes: 3a929df1f286 ("ethdev: support L2TPv2 and PPP procotol")
Signed-off-by: Jie Wang <jie1x.wang@intel.com>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
lib/net/rte_l2tpv2.h | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/lib/net/rte_l2tpv2.h b/lib/net/rte_l2tpv2.h
index 938a993b48..1f3ad3f03c 100644
--- a/lib/net/rte_l2tpv2.h
+++ b/lib/net/rte_l2tpv2.h
@@ -90,23 +90,23 @@ struct rte_l2tpv2_common_hdr {
struct {
#if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
- uint16_t t:1; /**< message Type */
- uint16_t l:1; /**< length option bit */
- uint16_t res1:2; /**< reserved */
- uint16_t s:1; /**< ns/nr option bit */
- uint16_t res2:1; /**< reserved */
- uint16_t o:1; /**< offset option bit */
- uint16_t p:1; /**< priority option bit */
- uint16_t res3:4; /**< reserved */
uint16_t ver:4; /**< protocol version */
+ uint16_t res3:4; /**< reserved */
+ uint16_t p:1; /**< priority option bit */
+ uint16_t o:1; /**< offset option bit */
+ uint16_t res2:1; /**< reserved */
+ uint16_t s:1; /**< ns/nr option bit */
+ uint16_t res1:2; /**< reserved */
+ uint16_t l:1; /**< length option bit */
+ uint16_t t:1; /**< message Type */
#elif RTE_BYTE_ORDER == RTE_BIG_ENDIAN
- uint16_t ver:4; /**< protocol version */
- uint16_t res3:4; /**< reserved */
- uint16_t p:1; /**< priority option bit */
- uint16_t o:1; /**< offset option bit */
- uint16_t res2:1; /**< reserved */
- uint16_t s:1; /**< ns/nr option bit */
- uint16_t res1:2; /**< reserved */
- uint16_t l:1; /**< length option bit */
uint16_t t:1; /**< message Type */
+ uint16_t l:1; /**< length option bit */
+ uint16_t res1:2; /**< reserved */
+ uint16_t s:1; /**< ns/nr option bit */
+ uint16_t res2:1; /**< reserved */
+ uint16_t o:1; /**< offset option bit */
+ uint16_t p:1; /**< priority option bit */
+ uint16_t res3:4; /**< reserved */
+ uint16_t ver:4; /**< protocol version */
#endif
};
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:48.038467585 +0000
+++ 0161-net-fix-L2TPv2-common-header.patch 2022-02-21 15:22:44.310704619 +0000
@@ -1 +1 @@
-From 9747f6955b01005bb19e8dfacd64c4bb92dbd07e Mon Sep 17 00:00:00 2001
+From 851b597291901044f72d4150887ab1449dc59e8a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9747f6955b01005bb19e8dfacd64c4bb92dbd07e ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'ethdev: remove unnecessary null check' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (159 preceding siblings ...)
2022-02-21 15:35 ` patch 'net: fix L2TPv2 common header' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'net/sfc: do not push fast free offload to default TxQ config' " Kevin Traynor
` (33 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Yunjian Wang; +Cc: Stephen Hemminger, Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/6fdd1953b012a425dff6dffdc6e48db3b9bd4fac
Thanks.
Kevin
---
From 6fdd1953b012a425dff6dffdc6e48db3b9bd4fac Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Wed, 9 Feb 2022 20:24:10 +0800
Subject: [PATCH] ethdev: remove unnecessary null check
[ upstream commit 8b8dd4451da45ce0419521d7e29fe246a5278251 ]
This NULL check is unnecessary, 'eth_dev' is never NULL.
Fixes: 58b43c1ddfd1 ("ethdev: add telemetry endpoint for device info")
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
lib/ethdev/rte_ethdev.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index 917a320afa..e59958e6f5 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -6324,6 +6324,4 @@ eth_dev_handle_port_info(const char *cmd __rte_unused,
eth_dev = &rte_eth_devices[port_id];
- if (!eth_dev)
- return -EINVAL;
rxq_state = rte_tel_data_alloc();
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:48.057513605 +0000
+++ 0162-ethdev-remove-unnecessary-null-check.patch 2022-02-21 15:22:44.313704626 +0000
@@ -1 +1 @@
-From 8b8dd4451da45ce0419521d7e29fe246a5278251 Mon Sep 17 00:00:00 2001
+From 6fdd1953b012a425dff6dffdc6e48db3b9bd4fac Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8b8dd4451da45ce0419521d7e29fe246a5278251 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 3755a31795..155978c233 100644
+index 917a320afa..e59958e6f5 100644
@@ -22 +23 @@
-@@ -6466,6 +6466,4 @@ eth_dev_handle_port_info(const char *cmd __rte_unused,
+@@ -6324,6 +6324,4 @@ eth_dev_handle_port_info(const char *cmd __rte_unused,
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/sfc: do not push fast free offload to default TxQ config' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (160 preceding siblings ...)
2022-02-21 15:35 ` patch 'ethdev: remove unnecessary null check' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'net/sfc: demand Tx fast free offload on EF10 simple datapath' " Kevin Traynor
` (32 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Ivan Malov; +Cc: Andrew Rybchenko, Andy Moreton, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/915b0b0b9fb3eb0e1f233a3dab2cf3bf999a0f46
Thanks.
Kevin
---
From 915b0b0b9fb3eb0e1f233a3dab2cf3bf999a0f46 Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov@oktetlabs.ru>
Date: Wed, 9 Feb 2022 02:26:47 +0300
Subject: [PATCH] net/sfc: do not push fast free offload to default TxQ config
[ upstream commit f67615ea626e23e61b71d27f894fe9a4ef716df3 ]
Doing so is wrong since fast free is an adapter-wide offload.
Technically, the offending commit (see "Fixes" tag) does not
induce failures, however, such started to occur after commit
a4996bd89c42 ("ethdev: new Rx/Tx offloads API") had shown up,
because of the strict offload validation in the generic code.
Fixes: c78d280e88ef ("net/sfc: convert to new Tx offload API")
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
---
drivers/net/sfc/sfc_ethdev.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index d4210b63dd..184f6e7c67 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -95,5 +95,4 @@ sfc_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
struct sfc_rss *rss = &sas->rss;
struct sfc_mae *mae = &sa->mae;
- uint64_t txq_offloads_def = 0;
sfc_log_init(sa, "entry");
@@ -147,9 +146,4 @@ sfc_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
dev_info->tx_queue_offload_capa;
- if (dev_info->tx_offload_capa & RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE)
- txq_offloads_def |= RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE;
-
- dev_info->default_txconf.offloads |= txq_offloads_def;
-
if (rss->context_type != EFX_RX_SCALE_UNAVAILABLE) {
uint64_t rte_hf = 0;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:48.079229622 +0000
+++ 0163-net-sfc-do-not-push-fast-free-offload-to-default-TxQ.patch 2022-02-21 15:22:44.315704630 +0000
@@ -1 +1 @@
-From f67615ea626e23e61b71d27f894fe9a4ef716df3 Mon Sep 17 00:00:00 2001
+From 915b0b0b9fb3eb0e1f233a3dab2cf3bf999a0f46 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f67615ea626e23e61b71d27f894fe9a4ef716df3 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index abf7b8d287..b04a05bd9f 100644
+index d4210b63dd..184f6e7c67 100644
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/sfc: demand Tx fast free offload on EF10 simple datapath' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (161 preceding siblings ...)
2022-02-21 15:35 ` patch 'net/sfc: do not push fast free offload to default TxQ config' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'net/iavf: fix null pointer dereference' " Kevin Traynor
` (31 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Ivan Malov; +Cc: Andrew Rybchenko, Andy Moreton, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/b832a197fa479f429d869f94b6999b561c6616c6
Thanks.
Kevin
---
From b832a197fa479f429d869f94b6999b561c6616c6 Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov@oktetlabs.ru>
Date: Wed, 9 Feb 2022 02:26:48 +0300
Subject: [PATCH] net/sfc: demand Tx fast free offload on EF10 simple datapath
[ upstream commit 24a491bb882a3269b9b4e2754e1d5b43d83b9821 ]
Enforce this offload as it is immutable on the said datapath.
Fixes: c78d280e88ef ("net/sfc: convert to new Tx offload API")
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
---
drivers/net/sfc/sfc_tx.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/net/sfc/sfc_tx.c b/drivers/net/sfc/sfc_tx.c
index cd927cf2f7..f376f24f7b 100644
--- a/drivers/net/sfc/sfc_tx.c
+++ b/drivers/net/sfc/sfc_tx.c
@@ -309,4 +309,5 @@ static int
sfc_tx_check_mode(struct sfc_adapter *sa, const struct rte_eth_txmode *txmode)
{
+ uint64_t dev_tx_offload_cap = sfc_tx_get_dev_offload_caps(sa);
int rc = 0;
@@ -320,4 +321,11 @@ sfc_tx_check_mode(struct sfc_adapter *sa, const struct rte_eth_txmode *txmode)
}
+ if ((dev_tx_offload_cap & RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE) != 0 &&
+ (txmode->offloads & RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE) == 0) {
+ sfc_err(sa, "There is no FAST_FREE flag in the attempted Tx mode configuration");
+ sfc_err(sa, "FAST_FREE is always active as per the current Tx datapath variant");
+ rc = EINVAL;
+ }
+
/*
* These features are claimed to be i40e-specific,
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:48.100226569 +0000
+++ 0164-net-sfc-demand-Tx-fast-free-offload-on-EF10-simple-d.patch 2022-02-21 15:22:44.316704633 +0000
@@ -1 +1 @@
-From 24a491bb882a3269b9b4e2754e1d5b43d83b9821 Mon Sep 17 00:00:00 2001
+From b832a197fa479f429d869f94b6999b561c6616c6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 24a491bb882a3269b9b4e2754e1d5b43d83b9821 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/iavf: fix null pointer dereference' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (162 preceding siblings ...)
2022-02-21 15:35 ` patch 'net/sfc: demand Tx fast free offload on EF10 simple datapath' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'net/iavf: count continuous DD bits for Arm' " Kevin Traynor
` (30 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Weiguo Li; +Cc: Radu Nicolau, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/f746bb72bac435c1cc81beb2e2fd444ece918db4
Thanks.
Kevin
---
From f746bb72bac435c1cc81beb2e2fd444ece918db4 Mon Sep 17 00:00:00 2001
From: Weiguo Li <liwg06@foxmail.com>
Date: Fri, 28 Jan 2022 17:43:15 +0800
Subject: [PATCH] net/iavf: fix null pointer dereference
[ upstream commit 1b72049dc2d3b024b8026f57001a98ea1f80e5a7 ]
Check for memory allocation failure is added to avoid null
pointer dereference.
Fixes: 6bc987ecb860 ("net/iavf: support IPsec inline crypto")
Signed-off-by: Weiguo Li <liwg06@foxmail.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
---
drivers/net/iavf/iavf_ipsec_crypto.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/iavf/iavf_ipsec_crypto.c b/drivers/net/iavf/iavf_ipsec_crypto.c
index adf101ab8a..6ac1b213db 100644
--- a/drivers/net/iavf/iavf_ipsec_crypto.c
+++ b/drivers/net/iavf/iavf_ipsec_crypto.c
@@ -1353,4 +1353,6 @@ iavf_ipsec_crypto_set_security_capabililites(struct iavf_security_ctx
sizeof(struct rte_cryptodev_capabilities) *
(number_of_capabilities + 1), 0);
+ if (!capabilities)
+ return -ENOMEM;
capabilities[number_of_capabilities].op = RTE_CRYPTO_OP_TYPE_UNDEFINED;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:48.119178762 +0000
+++ 0165-net-iavf-fix-null-pointer-dereference.patch 2022-02-21 15:22:44.317704635 +0000
@@ -1 +1 @@
-From 1b72049dc2d3b024b8026f57001a98ea1f80e5a7 Mon Sep 17 00:00:00 2001
+From f746bb72bac435c1cc81beb2e2fd444ece918db4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1b72049dc2d3b024b8026f57001a98ea1f80e5a7 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/iavf: count continuous DD bits for Arm' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (163 preceding siblings ...)
2022-02-21 15:35 ` patch 'net/iavf: fix null pointer dereference' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'net/iavf: count continuous DD bits for Arm in flex Rx' " Kevin Traynor
` (29 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Kathleen Capella; +Cc: Honnappa Nagarahalli, Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/68522027e305f1199758c7e644ba063ef4ff763d
Thanks.
Kevin
---
From 68522027e305f1199758c7e644ba063ef4ff763d Mon Sep 17 00:00:00 2001
From: Kathleen Capella <kathleen.capella@arm.com>
Date: Sat, 5 Feb 2022 00:26:29 +0000
Subject: [PATCH] net/iavf: count continuous DD bits for Arm
[ upstream commit 3d88d5e401f6d04882415866012a98bced0c3cb8 ]
On Arm platforms, reading of descriptors may be re-ordered causing the
status of DD bits to be discontinuous. Add logic to only process
continuous descriptors by checking DD bits.
Fixes: 1060591eada5 ("net/avf: enable bulk allocate Rx")
Signed-off-by: Kathleen Capella <kathleen.capella@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/iavf/iavf_rxtx.c | 26 ++++++++++++++++++++++----
1 file changed, 22 insertions(+), 4 deletions(-)
diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index 59623ac820..4fc1bf5e78 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -1899,5 +1899,5 @@ iavf_rx_scan_hw_ring(struct iavf_rx_queue *rxq)
uint64_t qword1;
uint32_t rx_status;
- int32_t s[IAVF_LOOK_AHEAD], nb_dd;
+ int32_t s[IAVF_LOOK_AHEAD], var, nb_dd;
int32_t i, j, nb_rx = 0;
uint64_t pkt_flags;
@@ -1930,7 +1930,25 @@ iavf_rx_scan_hw_ring(struct iavf_rx_queue *rxq)
rte_smp_rmb();
- /* Compute how many status bits were set */
- for (j = 0, nb_dd = 0; j < IAVF_LOOK_AHEAD; j++)
- nb_dd += s[j] & (1 << IAVF_RX_DESC_STATUS_DD_SHIFT);
+ /* Compute how many contiguous DD bits were set */
+ for (j = 0, nb_dd = 0; j < IAVF_LOOK_AHEAD; j++) {
+ var = s[j] & (1 << IAVF_RX_DESC_STATUS_DD_SHIFT);
+#ifdef RTE_ARCH_ARM
+ /* For Arm platforms, count only contiguous descriptors
+ * whose DD bit is set to 1. On Arm platforms, reads of
+ * descriptors can be reordered. Since the CPU may
+ * be reading the descriptors as the NIC updates them
+ * in memory, it is possbile that the DD bit for a
+ * descriptor earlier in the queue is read as not set
+ * while the DD bit for a descriptor later in the queue
+ * is read as set.
+ */
+ if (var)
+ nb_dd += 1;
+ else
+ break;
+#else
+ nb_dd += var;
+#endif
+ }
nb_rx += nb_dd;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:48.139456937 +0000
+++ 0166-net-iavf-count-continuous-DD-bits-for-Arm.patch 2022-02-21 15:22:44.319704639 +0000
@@ -1 +1 @@
-From 3d88d5e401f6d04882415866012a98bced0c3cb8 Mon Sep 17 00:00:00 2001
+From 68522027e305f1199758c7e644ba063ef4ff763d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3d88d5e401f6d04882415866012a98bced0c3cb8 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 7158938643..f07d886821 100644
+index 59623ac820..4fc1bf5e78 100644
@@ -24 +25 @@
-@@ -1898,5 +1898,5 @@ iavf_rx_scan_hw_ring(struct iavf_rx_queue *rxq)
+@@ -1899,5 +1899,5 @@ iavf_rx_scan_hw_ring(struct iavf_rx_queue *rxq)
@@ -31 +32 @@
-@@ -1929,7 +1929,25 @@ iavf_rx_scan_hw_ring(struct iavf_rx_queue *rxq)
+@@ -1930,7 +1930,25 @@ iavf_rx_scan_hw_ring(struct iavf_rx_queue *rxq)
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/iavf: count continuous DD bits for Arm in flex Rx' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (164 preceding siblings ...)
2022-02-21 15:35 ` patch 'net/iavf: count continuous DD bits for Arm' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'net/ice/base: add profile validation on switch filter' " Kevin Traynor
` (28 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Kathleen Capella; +Cc: Honnappa Nagarahalli, Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/5dc74f1348eadcf83df42b1ed81ed2510ad57d78
Thanks.
Kevin
---
From 5dc74f1348eadcf83df42b1ed81ed2510ad57d78 Mon Sep 17 00:00:00 2001
From: Kathleen Capella <kathleen.capella@arm.com>
Date: Sat, 5 Feb 2022 00:26:30 +0000
Subject: [PATCH] net/iavf: count continuous DD bits for Arm in flex Rx
[ upstream commit 32e38011fc35625efdd74dc83edf7e53c54ef13e ]
On Arm platforms, reading of descriptors may be re-ordered causing the
status of DD bits to be discontinuous. Add logic to only process
continuous descriptors by checking DD bits.
Fixes: b8b4c54ef9b0 ("net/iavf: support flexible Rx descriptor in normal path")
Signed-off-by: Kathleen Capella <kathleen.capella@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/iavf/iavf_rxtx.c | 26 ++++++++++++++++++++++----
1 file changed, 22 insertions(+), 4 deletions(-)
diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index 4fc1bf5e78..ba272bb211 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -1820,5 +1820,5 @@ iavf_rx_scan_hw_ring_flex_rxd(struct iavf_rx_queue *rxq)
uint16_t stat_err0;
uint16_t pkt_len;
- int32_t s[IAVF_LOOK_AHEAD], nb_dd;
+ int32_t s[IAVF_LOOK_AHEAD], var, nb_dd;
int32_t i, j, nb_rx = 0;
uint64_t pkt_flags;
@@ -1845,7 +1845,25 @@ iavf_rx_scan_hw_ring_flex_rxd(struct iavf_rx_queue *rxq)
rte_smp_rmb();
- /* Compute how many status bits were set */
- for (j = 0, nb_dd = 0; j < IAVF_LOOK_AHEAD; j++)
- nb_dd += s[j] & (1 << IAVF_RX_FLEX_DESC_STATUS0_DD_S);
+ /* Compute how many contiguous DD bits were set */
+ for (j = 0, nb_dd = 0; j < IAVF_LOOK_AHEAD; j++) {
+ var = s[j] & (1 << IAVF_RX_FLEX_DESC_STATUS0_DD_S);
+#ifdef RTE_ARCH_ARM
+ /* For Arm platforms, count only contiguous descriptors
+ * whose DD bit is set to 1. On Arm platforms, reads of
+ * descriptors can be reordered. Since the CPU may
+ * be reading the descriptors as the NIC updates them
+ * in memory, it is possbile that the DD bit for a
+ * descriptor earlier in the queue is read as not set
+ * while the DD bit for a descriptor later in the queue
+ * is read as set.
+ */
+ if (var)
+ nb_dd += 1;
+ else
+ break;
+#else
+ nb_dd += var;
+#endif
+ }
nb_rx += nb_dd;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:48.159859480 +0000
+++ 0167-net-iavf-count-continuous-DD-bits-for-Arm-in-flex-Rx.patch 2022-02-21 15:22:44.321704644 +0000
@@ -1 +1 @@
-From 32e38011fc35625efdd74dc83edf7e53c54ef13e Mon Sep 17 00:00:00 2001
+From 5dc74f1348eadcf83df42b1ed81ed2510ad57d78 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 32e38011fc35625efdd74dc83edf7e53c54ef13e ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index f07d886821..41244055e5 100644
+index 4fc1bf5e78..ba272bb211 100644
@@ -24 +25 @@
-@@ -1819,5 +1819,5 @@ iavf_rx_scan_hw_ring_flex_rxd(struct iavf_rx_queue *rxq)
+@@ -1820,5 +1820,5 @@ iavf_rx_scan_hw_ring_flex_rxd(struct iavf_rx_queue *rxq)
@@ -31 +32 @@
-@@ -1844,7 +1844,25 @@ iavf_rx_scan_hw_ring_flex_rxd(struct iavf_rx_queue *rxq)
+@@ -1845,7 +1845,25 @@ iavf_rx_scan_hw_ring_flex_rxd(struct iavf_rx_queue *rxq)
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/ice/base: add profile validation on switch filter' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (165 preceding siblings ...)
2022-02-21 15:35 ` patch 'net/iavf: count continuous DD bits for Arm in flex Rx' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'net/ice: fix pattern check in flow director' " Kevin Traynor
` (27 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Yuying Zhang; +Cc: Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/d422a9cdae995635b9d8a826d08d6e12f5ecd30e
Thanks.
Kevin
---
From d422a9cdae995635b9d8a826d08d6e12f5ecd30e Mon Sep 17 00:00:00 2001
From: Yuying Zhang <yuying.zhang@intel.com>
Date: Wed, 26 Jan 2022 15:57:09 +0000
Subject: [PATCH] net/ice/base: add profile validation on switch filter
[ upstream commit a62f095049900b8148a739ad0a86fbfc32429326 ]
Profile type was determined without validation when getting
switch field vector bitmap. It caused error when associating
profile id with given recipe if no lookup elements were given.
Add profile validation to check if the profile is existing
before getting bitmap.
Fixes: 55744222e6e2 ("net/ice/base: associate recipes by profile type")
Signed-off-by: Yuying Zhang <yuying.zhang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/ice/base/ice_flex_pipe.c | 11 +++++------
drivers/net/ice/base/ice_flex_type.h | 1 +
drivers/net/ice/base/ice_protocol_type.h | 1 +
drivers/net/ice/base/ice_switch.c | 1 +
4 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ice/base/ice_flex_pipe.c b/drivers/net/ice/base/ice_flex_pipe.c
index 395787806b..f6a29f87c5 100644
--- a/drivers/net/ice/base/ice_flex_pipe.c
+++ b/drivers/net/ice/base/ice_flex_pipe.c
@@ -1786,6 +1786,10 @@ ice_get_sw_prof_type(struct ice_hw *hw, struct ice_fv *fv)
{
u16 i;
+ bool valid_prof = false;
for (i = 0; i < hw->blk[ICE_BLK_SW].es.fvw; i++) {
+ if (fv->ew[i].off != ICE_NAN_OFFSET)
+ valid_prof = true;
+
/* UDP tunnel will have UDP_OF protocol ID and VNI offset */
if (fv->ew[i].prot_id == (u8)ICE_PROT_UDP_OF &&
@@ -1802,5 +1806,5 @@ ice_get_sw_prof_type(struct ice_hw *hw, struct ice_fv *fv)
}
- return ICE_PROF_NON_TUN;
+ return valid_prof ? ICE_PROF_NON_TUN : ICE_PROF_INVALID;
}
@@ -1819,9 +1823,4 @@ ice_get_sw_fv_bitmap(struct ice_hw *hw, enum ice_prof_type req_profs,
struct ice_fv *fv;
- if (req_profs == ICE_PROF_ALL) {
- ice_bitmap_set(bm, 0, ICE_MAX_NUM_PROFILES);
- return;
- }
-
ice_memset(&state, 0, sizeof(state), ICE_NONDMA_MEM);
ice_zero_bitmap(bm, ICE_MAX_NUM_PROFILES);
diff --git a/drivers/net/ice/base/ice_flex_type.h b/drivers/net/ice/base/ice_flex_type.h
index 59eeca0a30..09a02fe9ac 100644
--- a/drivers/net/ice/base/ice_flex_type.h
+++ b/drivers/net/ice/base/ice_flex_type.h
@@ -1004,4 +1004,5 @@ struct ice_chs_chg {
enum ice_prof_type {
+ ICE_PROF_INVALID = 0x0,
ICE_PROF_NON_TUN = 0x1,
ICE_PROF_TUN_UDP = 0x2,
diff --git a/drivers/net/ice/base/ice_protocol_type.h b/drivers/net/ice/base/ice_protocol_type.h
index cef8354f77..0e6e5990be 100644
--- a/drivers/net/ice/base/ice_protocol_type.h
+++ b/drivers/net/ice/base/ice_protocol_type.h
@@ -192,4 +192,5 @@ enum ice_prot_id {
#define ICE_VNI_OFFSET 12 /* offset of VNI from ICE_PROT_UDP_OF */
+#define ICE_NAN_OFFSET 511
#define ICE_MAC_OFOS_HW 1
#define ICE_MAC_IL_HW 4
diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index 1fee790c25..d4cc664ad7 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -7780,4 +7780,5 @@ bool ice_is_prof_rule(enum ice_sw_tunnel_type type)
{
switch (type) {
+ case ICE_SW_TUN_AND_NON_TUN:
case ICE_SW_TUN_PROFID_IPV6_ESP:
case ICE_SW_TUN_PROFID_IPV6_AH:
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:48.181130904 +0000
+++ 0168-net-ice-base-add-profile-validation-on-switch-filter.patch 2022-02-21 15:22:44.329704662 +0000
@@ -1 +1 @@
-From a62f095049900b8148a739ad0a86fbfc32429326 Mon Sep 17 00:00:00 2001
+From d422a9cdae995635b9d8a826d08d6e12f5ecd30e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a62f095049900b8148a739ad0a86fbfc32429326 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/ice: fix pattern check in flow director' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (166 preceding siblings ...)
2022-02-21 15:35 ` patch 'net/ice/base: add profile validation on switch filter' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:35 ` patch 'net/ice: fix build with 16-byte Rx descriptor' " Kevin Traynor
` (26 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Junfeng Guo; +Cc: Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/607d564355fe58b63e8d285a47f4e68866f1a792
Thanks.
Kevin
---
From 607d564355fe58b63e8d285a47f4e68866f1a792 Mon Sep 17 00:00:00 2001
From: Junfeng Guo <junfeng.guo@intel.com>
Date: Tue, 8 Feb 2022 15:09:25 +0800
Subject: [PATCH] net/ice: fix pattern check in flow director
[ upstream commit 01b8739f476dbccc18d66f60bff3df91804ef634 ]
Mask for IPv4/UDP/TCP/SCTP addr/port are not supported in current
code. Thus we need to check each pattern mask. Only zero-mask and
full-mask are allowed to pass the pattern parse, otherwise will
return failure.
Fixes: a631c98a96a2 ("net/ice: fix pattern check for flow director parser")
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/ice/ice_fdir_filter.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index 287032a6a7..ff1cee1195 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -2039,8 +2039,8 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,
/* Mask for IPv4 src/dst addrs not supported */
- if (!ipv4_mask->hdr.src_addr &&
+ if (ipv4_mask->hdr.src_addr &&
ipv4_mask->hdr.src_addr != UINT32_MAX)
return -rte_errno;
- if (!ipv4_mask->hdr.dst_addr &&
+ if (ipv4_mask->hdr.dst_addr &&
ipv4_mask->hdr.dst_addr != UINT32_MAX)
return -rte_errno;
@@ -2188,8 +2188,8 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,
/* Mask for TCP src/dst ports not supported */
- if (!tcp_mask->hdr.src_port &&
+ if (tcp_mask->hdr.src_port &&
tcp_mask->hdr.src_port != UINT16_MAX)
return -rte_errno;
- if (!tcp_mask->hdr.dst_port &&
+ if (tcp_mask->hdr.dst_port &&
tcp_mask->hdr.dst_port != UINT16_MAX)
return -rte_errno;
@@ -2235,8 +2235,8 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,
/* Mask for UDP src/dst ports not supported */
- if (!udp_mask->hdr.src_port &&
+ if (udp_mask->hdr.src_port &&
udp_mask->hdr.src_port != UINT16_MAX)
return -rte_errno;
- if (!udp_mask->hdr.dst_port &&
+ if (udp_mask->hdr.dst_port &&
udp_mask->hdr.dst_port != UINT16_MAX)
return -rte_errno;
@@ -2280,8 +2280,8 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,
/* Mask for SCTP src/dst ports not supported */
- if (!sctp_mask->hdr.src_port &&
+ if (sctp_mask->hdr.src_port &&
sctp_mask->hdr.src_port != UINT16_MAX)
return -rte_errno;
- if (!sctp_mask->hdr.dst_port &&
+ if (sctp_mask->hdr.dst_port &&
sctp_mask->hdr.dst_port != UINT16_MAX)
return -rte_errno;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:48.209955542 +0000
+++ 0169-net-ice-fix-pattern-check-in-flow-director.patch 2022-02-21 15:22:44.331704667 +0000
@@ -1 +1 @@
-From 01b8739f476dbccc18d66f60bff3df91804ef634 Mon Sep 17 00:00:00 2001
+From 607d564355fe58b63e8d285a47f4e68866f1a792 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 01b8739f476dbccc18d66f60bff3df91804ef634 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index b8728fb1be..7954c6d8ea 100644
+index 287032a6a7..ff1cee1195 100644
@@ -24 +25 @@
-@@ -2037,8 +2037,8 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,
+@@ -2039,8 +2039,8 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,
@@ -35 +36 @@
-@@ -2186,8 +2186,8 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,
+@@ -2188,8 +2188,8 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,
@@ -46 +47 @@
-@@ -2233,8 +2233,8 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,
+@@ -2235,8 +2235,8 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,
@@ -57 +58 @@
-@@ -2278,8 +2278,8 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,
+@@ -2280,8 +2280,8 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/ice: fix build with 16-byte Rx descriptor' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (167 preceding siblings ...)
2022-02-21 15:35 ` patch 'net/ice: fix pattern check in flow director' " Kevin Traynor
@ 2022-02-21 15:35 ` Kevin Traynor
2022-02-21 15:36 ` patch 'vdpa/sfc: fix null dereference during config' " Kevin Traynor
` (25 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:35 UTC (permalink / raw)
To: Yiding Zhou; +Cc: Wei Ling, Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/7537c996186093f0b8fe5673bc1b1d72681178f0
Thanks.
Kevin
---
From 7537c996186093f0b8fe5673bc1b1d72681178f0 Mon Sep 17 00:00:00 2001
From: Yiding Zhou <yidingx.zhou@intel.com>
Date: Tue, 8 Feb 2022 15:42:19 +0000
Subject: [PATCH] net/ice: fix build with 16-byte Rx descriptor
[ upstream commit 94005e4640a7d1e10e9b6b89e9a31890c578192f ]
gcc will report error "unused parameter 'rxq'" when the macro
RTE_LIBRTE_ICE_16BYTE_RX_DESC is defined. use RTE_SET_USED to avoid it
Fixes: 7a340b0b4e03 ("net/ice: refactor Rx FlexiMD handling")
Signed-off-by: Yiding Zhou <yidingx.zhou@intel.com>
Tested-by: Wei Ling <weix.ling@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/ice/ice_rxtx.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index 58700f1b92..4f218bcd0d 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -164,4 +164,6 @@ ice_rxd_to_pkt_fields_by_comms_aux_v1(struct ice_rx_queue *rxq,
}
}
+#else
+ RTE_SET_USED(rxq);
#endif
}
@@ -202,4 +204,6 @@ ice_rxd_to_pkt_fields_by_comms_aux_v2(struct ice_rx_queue *rxq,
}
}
+#else
+ RTE_SET_USED(rxq);
#endif
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:48.229954959 +0000
+++ 0170-net-ice-fix-build-with-16-byte-Rx-descriptor.patch 2022-02-21 15:22:44.333704671 +0000
@@ -1 +1 @@
-From 94005e4640a7d1e10e9b6b89e9a31890c578192f Mon Sep 17 00:00:00 2001
+From 7537c996186093f0b8fe5673bc1b1d72681178f0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 94005e4640a7d1e10e9b6b89e9a31890c578192f ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'vdpa/sfc: fix null dereference during config' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (168 preceding siblings ...)
2022-02-21 15:35 ` patch 'net/ice: fix build with 16-byte Rx descriptor' " Kevin Traynor
@ 2022-02-21 15:36 ` Kevin Traynor
2022-02-21 15:36 ` patch 'vdpa/sfc: fix null dereference during removal' " Kevin Traynor
` (24 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:36 UTC (permalink / raw)
To: Weiguo Li; +Cc: Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/5dfd488d82175f3ef522bb0bb0c1961fb45d3219
Thanks.
Kevin
---
From 5dfd488d82175f3ef522bb0bb0c1961fb45d3219 Mon Sep 17 00:00:00 2001
From: Weiguo Li <liwg06@foxmail.com>
Date: Sun, 30 Jan 2022 02:07:30 +0800
Subject: [PATCH] vdpa/sfc: fix null dereference during config
[ upstream commit d8875804e00b37a80efc6e1c97ac57f8ac2c7d91 ]
Fixes: b11961363b4a ("vdpa/sfc: support device configure and close")
Signed-off-by: Weiguo Li <liwg06@foxmail.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
drivers/vdpa/sfc/sfc_vdpa_ops.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/vdpa/sfc/sfc_vdpa_ops.c b/drivers/vdpa/sfc/sfc_vdpa_ops.c
index c4ce4474ef..b3d9b6cd56 100644
--- a/drivers/vdpa/sfc/sfc_vdpa_ops.c
+++ b/drivers/vdpa/sfc/sfc_vdpa_ops.c
@@ -612,5 +612,5 @@ sfc_vdpa_dev_config(int vid)
ops_data = sfc_vdpa_get_data_by_dev(vdpa_dev);
if (ops_data == NULL) {
- sfc_vdpa_err(ops_data->dev_handle,
+ SFC_VDPA_GENERIC_LOG(ERR,
"invalid vDPA device : %p, vid : %d",
vdpa_dev, vid);
@@ -667,5 +667,5 @@ sfc_vdpa_dev_close(int vid)
ops_data = sfc_vdpa_get_data_by_dev(vdpa_dev);
if (ops_data == NULL) {
- sfc_vdpa_err(ops_data->dev_handle,
+ SFC_VDPA_GENERIC_LOG(ERR,
"invalid vDPA device : %p, vid : %d",
vdpa_dev, vid);
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:48.250937299 +0000
+++ 0171-vdpa-sfc-fix-null-dereference-during-config.patch 2022-02-21 15:22:44.334704673 +0000
@@ -1 +1 @@
-From d8875804e00b37a80efc6e1c97ac57f8ac2c7d91 Mon Sep 17 00:00:00 2001
+From 5dfd488d82175f3ef522bb0bb0c1961fb45d3219 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d8875804e00b37a80efc6e1c97ac57f8ac2c7d91 ]
+
@@ -7 +8,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'vdpa/sfc: fix null dereference during removal' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (169 preceding siblings ...)
2022-02-21 15:36 ` patch 'vdpa/sfc: fix null dereference during config' " Kevin Traynor
@ 2022-02-21 15:36 ` Kevin Traynor
2022-02-21 15:36 ` patch 'net/mlx5: fix metadata endianness in modify field action' " Kevin Traynor
` (23 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:36 UTC (permalink / raw)
To: Weiguo Li; +Cc: Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/8f821b11356db2d496b09a2540e623ef6938c993
Thanks.
Kevin
---
From 8f821b11356db2d496b09a2540e623ef6938c993 Mon Sep 17 00:00:00 2001
From: Weiguo Li <liwg06@foxmail.com>
Date: Sun, 30 Jan 2022 01:30:12 +0800
Subject: [PATCH] vdpa/sfc: fix null dereference during removal
[ upstream commit 500640b328c2ce623715ca8ec013e7a8ff922428 ]
When sva is null, sfc_vdpa_info(sva, ...) will cause a null
dereference. Use SFC_VDPA_GENERIC_LOG() to avoid that.
See macros sfc_vdpa_info and SFC_VDPA_GENERIC_LOG
defined in drivers/vdpa/sfc/sfc_vdpa_log.h for detail.
Fixes: 5e7596ba7cb3 ("vdpa/sfc: introduce Xilinx vDPA driver")
Signed-off-by: Weiguo Li <liwg06@foxmail.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
drivers/vdpa/sfc/sfc_vdpa.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/vdpa/sfc/sfc_vdpa.c b/drivers/vdpa/sfc/sfc_vdpa.c
index fccdd8c687..53f598facc 100644
--- a/drivers/vdpa/sfc/sfc_vdpa.c
+++ b/drivers/vdpa/sfc/sfc_vdpa.c
@@ -329,5 +329,6 @@ sfc_vdpa_pci_remove(struct rte_pci_device *pci_dev)
sva = sfc_vdpa_get_adapter_by_dev(pci_dev);
if (sva == NULL) {
- sfc_vdpa_info(sva, "invalid device: %s", pci_dev->name);
+ SFC_VDPA_GENERIC_LOG(INFO,
+ "Invalid device: %s.", pci_dev->name);
return -1;
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:48.270061424 +0000
+++ 0172-vdpa-sfc-fix-null-dereference-during-removal.patch 2022-02-21 15:22:44.334704673 +0000
@@ -1 +1 @@
-From 500640b328c2ce623715ca8ec013e7a8ff922428 Mon Sep 17 00:00:00 2001
+From 8f821b11356db2d496b09a2540e623ef6938c993 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 500640b328c2ce623715ca8ec013e7a8ff922428 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/mlx5: fix metadata endianness in modify field action' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (170 preceding siblings ...)
2022-02-21 15:36 ` patch 'vdpa/sfc: fix null dereference during removal' " Kevin Traynor
@ 2022-02-21 15:36 ` Kevin Traynor
2022-02-21 15:36 ` patch 'net/mlx5: fix committed bucket size' " Kevin Traynor
` (22 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:36 UTC (permalink / raw)
To: Viacheslav Ovsiienko; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/c9a140e15bcc47c0b00f0e3ca6912c34449ae736
Thanks.
Kevin
---
From c9a140e15bcc47c0b00f0e3ca6912c34449ae736 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Thu, 3 Feb 2022 10:46:51 +0200
Subject: [PATCH] net/mlx5: fix metadata endianness in modify field action
[ upstream commit ced4900cdec2a957cf7def05dfb076c089a32e66 ]
As modify field action immediate source parameter the metadata
should follow the CPU endianness (according to SET_META action
structure format), and mlx5 PMD wrongly handled the immediate
parameter metadata buffer as big-endian, resulting in wrong
metadata set action with incorrect endianness.
Fixes: 40c8fb1fd3b3 ("net/mlx5: update modify field action")
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index af90a7fd0a..10ef2af06a 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1868,5 +1868,5 @@ flow_dv_convert_action_modify_field
{0, 0, 0} };
uint32_t mask[MLX5_ACT_MAX_MOD_FIELDS] = {0, 0, 0, 0, 0};
- uint32_t type;
+ uint32_t type, meta = 0;
uint32_t shift = 0;
@@ -1881,4 +1881,9 @@ flow_dv_convert_action_modify_field
(void *)(uintptr_t)conf->src.pvalue :
(void *)(uintptr_t)&conf->src.value;
+ if (conf->dst.field == RTE_FLOW_FIELD_META) {
+ meta = *(const unaligned_uint32_t *)item.spec;
+ meta = rte_cpu_to_be_32(meta);
+ item.spec = &meta;
+ }
} else {
type = MLX5_MODIFICATION_TYPE_COPY;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:48.288522390 +0000
+++ 0173-net-mlx5-fix-metadata-endianness-in-modify-field-act.patch 2022-02-21 15:22:44.344704696 +0000
@@ -1 +1 @@
-From ced4900cdec2a957cf7def05dfb076c089a32e66 Mon Sep 17 00:00:00 2001
+From c9a140e15bcc47c0b00f0e3ca6912c34449ae736 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ced4900cdec2a957cf7def05dfb076c089a32e66 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/mlx5: fix committed bucket size' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (171 preceding siblings ...)
2022-02-21 15:36 ` patch 'net/mlx5: fix metadata endianness in modify field action' " Kevin Traynor
@ 2022-02-21 15:36 ` Kevin Traynor
2022-02-21 15:36 ` patch 'net/mlx5: fix meter capabilities reporting' " Kevin Traynor
` (21 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:36 UTC (permalink / raw)
To: Alexander Kozyrev; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/6022babd1dad53fae4b9ddf9d6038e983cf5559c
Thanks.
Kevin
---
From 6022babd1dad53fae4b9ddf9d6038e983cf5559c Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev@nvidia.com>
Date: Mon, 7 Feb 2022 15:28:40 +0200
Subject: [PATCH] net/mlx5: fix committed bucket size
[ upstream commit 21fdeab422e0edabc6b738f7a0c56dec7e9c374e ]
Committed Bucket Size calculation tries to fit into 8-bit wide
mantissa field by setting 256 as a maximum value for it.
To compensate for this increase in the mantissa value the exponent
value has to be reduced by 8. But it gives a negative exponent
value for CBS less than 128. And negative exponent value is not
supported by the NIC. Adjust CSB calculation only for values
bigger than 128 to allow both small and big bucket sizes.
Fixes: 3bd26b23cefc ("net/mlx5: support meter profile operations")
Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/mlx5_flow_meter.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_meter.c b/drivers/net/mlx5/mlx5_flow_meter.c
index 0dc7fbfb32..d0f8bcd100 100644
--- a/drivers/net/mlx5/mlx5_flow_meter.c
+++ b/drivers/net/mlx5/mlx5_flow_meter.c
@@ -296,6 +296,8 @@ mlx5_flow_meter_xbs_man_exp_calc(uint64_t xbs, uint8_t *man, uint8_t *exp)
/* xbs = xbs_mantissa * 2^xbs_exponent */
_man = frexp(xbs, &_exp);
- _man = _man * pow(2, MLX5_MAN_WIDTH);
- _exp = _exp - MLX5_MAN_WIDTH;
+ if (_exp >= MLX5_MAN_WIDTH) {
+ _man = _man * pow(2, MLX5_MAN_WIDTH);
+ _exp = _exp - MLX5_MAN_WIDTH;
+ }
*man = (uint8_t)ceil(_man);
*exp = _exp;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:48.318767656 +0000
+++ 0174-net-mlx5-fix-committed-bucket-size.patch 2022-02-21 15:22:44.346704700 +0000
@@ -1 +1 @@
-From 21fdeab422e0edabc6b738f7a0c56dec7e9c374e Mon Sep 17 00:00:00 2001
+From 6022babd1dad53fae4b9ddf9d6038e983cf5559c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 21fdeab422e0edabc6b738f7a0c56dec7e9c374e ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/mlx5: fix meter capabilities reporting' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (172 preceding siblings ...)
2022-02-21 15:36 ` patch 'net/mlx5: fix committed bucket size' " Kevin Traynor
@ 2022-02-21 15:36 ` Kevin Traynor
2022-02-21 15:36 ` patch 'net/mlx5: fix inline length for multi-segment TSO' " Kevin Traynor
` (20 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:36 UTC (permalink / raw)
To: Alexander Kozyrev; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/3831da6c7b464a23aa7a2f39ba248bd61ee4f46a
Thanks.
Kevin
---
From 3831da6c7b464a23aa7a2f39ba248bd61ee4f46a Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev@nvidia.com>
Date: Mon, 7 Feb 2022 15:29:41 +0200
Subject: [PATCH] net/mlx5: fix meter capabilities reporting
[ upstream commit eb11edd9dbe0b0c18c60cef03472e48075ca0f7c ]
Meter capabilities reporting is not up to date.
Mellanox NICs support RFC2698 and RFC4115 as well as RFC2697.
Add these marker operations to the capabilities list.
Fixes: 6bc327b94fe8 ("net/mlx5: fill meter capabilities using DevX")
Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/mlx5_flow_meter.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_flow_meter.c b/drivers/net/mlx5/mlx5_flow_meter.c
index d0f8bcd100..4f5de5e422 100644
--- a/drivers/net/mlx5/mlx5_flow_meter.c
+++ b/drivers/net/mlx5/mlx5_flow_meter.c
@@ -440,9 +440,12 @@ mlx5_flow_mtr_cap_get(struct rte_eth_dev *dev,
cap->n_max = 1 << (qattr->log_max_num_meter_aso + 1);
cap->srtcm_rfc2697_packet_mode_supported = 1;
+ cap->trtcm_rfc2698_packet_mode_supported = 1;
+ cap->trtcm_rfc4115_packet_mode_supported = 1;
} else {
cap->n_max = 1 << qattr->log_max_flow_meter;
- cap->srtcm_rfc2697_packet_mode_supported = 0;
}
cap->srtcm_rfc2697_byte_mode_supported = 1;
+ cap->trtcm_rfc2698_byte_mode_supported = 1;
+ cap->trtcm_rfc4115_byte_mode_supported = 1;
cap->n_shared_max = cap->n_max;
cap->identical = 1;
@@ -452,5 +455,8 @@ mlx5_flow_mtr_cap_get(struct rte_eth_dev *dev,
cap->chaining_n_mtrs_per_flow_max = 1; /* Chaining is not supported. */
cap->meter_srtcm_rfc2697_n_max = qattr->flow_meter_old ? cap->n_max : 0;
+ cap->meter_trtcm_rfc2698_n_max = qattr->flow_meter_old ? cap->n_max : 0;
+ cap->meter_trtcm_rfc4115_n_max = qattr->flow_meter_old ? cap->n_max : 0;
cap->meter_rate_max = 1ULL << 40; /* 1 Tera tokens per sec. */
+ cap->meter_policy_n_max = cap->n_max;
cap->stats_mask = RTE_MTR_STATS_N_BYTES_DROPPED |
RTE_MTR_STATS_N_PKTS_DROPPED;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:48.339071710 +0000
+++ 0175-net-mlx5-fix-meter-capabilities-reporting.patch 2022-02-21 15:22:44.346704700 +0000
@@ -1 +1 @@
-From eb11edd9dbe0b0c18c60cef03472e48075ca0f7c Mon Sep 17 00:00:00 2001
+From 3831da6c7b464a23aa7a2f39ba248bd61ee4f46a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit eb11edd9dbe0b0c18c60cef03472e48075ca0f7c ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/mlx5: fix inline length for multi-segment TSO' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (173 preceding siblings ...)
2022-02-21 15:36 ` patch 'net/mlx5: fix meter capabilities reporting' " Kevin Traynor
@ 2022-02-21 15:36 ` Kevin Traynor
2022-02-21 15:36 ` patch 'net/bnxt: set HW coalescing parameters' " Kevin Traynor
` (19 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:36 UTC (permalink / raw)
To: Dariusz Sosnowski; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/6c8ff52958f1aa307e35c319d907017075d0c9af
Thanks.
Kevin
---
From 6c8ff52958f1aa307e35c319d907017075d0c9af Mon Sep 17 00:00:00 2001
From: Dariusz Sosnowski <dsosnowski@nvidia.com>
Date: Mon, 7 Feb 2022 17:48:56 +0200
Subject: [PATCH] net/mlx5: fix inline length for multi-segment TSO
[ upstream commit 864678e420f00225572be476559a087bfecaafbf ]
This patch removes a redundant assert in mlx5_tx_packet_multi_tso().
That assert assured that the amount of bytes requested to be inlined
is greater than or equal to the minimum amount of bytes required
to be inlined. This requirement is either derived from the NIC
inlining mode or configured through devargs. When using TSO this
requirement can be disregarded, because on all NICs it is satisfied by
TSO inlining requirements, since TSO requires L2, L3, and L4 headers to
be inlined.
Fixes: 18a1c20044c0 ("net/mlx5: implement Tx burst template")
Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/mlx5_tx.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_tx.h b/drivers/net/mlx5/mlx5_tx.h
index 099e72935a..398cadfeaa 100644
--- a/drivers/net/mlx5/mlx5_tx.h
+++ b/drivers/net/mlx5/mlx5_tx.h
@@ -1711,5 +1711,4 @@ mlx5_tx_packet_multi_tso(struct mlx5_txq_data *__rte_restrict txq,
inlen > (dlen + vlan)))
return MLX5_TXCMP_CODE_ERROR;
- MLX5_ASSERT(inlen >= txq->inlen_mode);
/*
* Check whether there are enough free WQEBBs:
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:48.358306456 +0000
+++ 0176-net-mlx5-fix-inline-length-for-multi-segment-TSO.patch 2022-02-21 15:22:44.348704705 +0000
@@ -1 +1 @@
-From 864678e420f00225572be476559a087bfecaafbf Mon Sep 17 00:00:00 2001
+From 6c8ff52958f1aa307e35c319d907017075d0c9af Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 864678e420f00225572be476559a087bfecaafbf ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/bnxt: set HW coalescing parameters' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (174 preceding siblings ...)
2022-02-21 15:36 ` patch 'net/mlx5: fix inline length for multi-segment TSO' " Kevin Traynor
@ 2022-02-21 15:36 ` Kevin Traynor
2022-02-21 15:36 ` patch 'net/bnxt: fix ring calculation for representors' " Kevin Traynor
` (18 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:36 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: Somnath Kotur, Kalesh AP, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/e53da2ffbe012a647812bd8c954c53c2950eb7af
Thanks.
Kevin
---
From e53da2ffbe012a647812bd8c954c53c2950eb7af Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Tue, 1 Feb 2022 14:38:01 -0800
Subject: [PATCH] net/bnxt: set HW coalescing parameters
[ upstream commit 5b9b3d590452cc4068418fa7dc8f3595422bdbda ]
Set coalescing parameters correctly for Rx completion rings.
This is not being done for the Rx completion rings currently.
Fixes: 657c2a7f1dd4 ("net/bnxt: create aggregation rings when needed")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
---
drivers/net/bnxt/bnxt_ring.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/bnxt/bnxt_ring.c b/drivers/net/bnxt/bnxt_ring.c
index 5c6c27fed7..4cdbb177d9 100644
--- a/drivers/net/bnxt/bnxt_ring.c
+++ b/drivers/net/bnxt/bnxt_ring.c
@@ -753,4 +753,6 @@ int bnxt_alloc_hwrm_rings(struct bnxt *bp)
if (rc)
goto err_out;
+ bnxt_hwrm_set_ring_coal(bp, &coal,
+ rxq->cp_ring->cp_ring_struct->fw_ring_id);
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:48.379771714 +0000
+++ 0177-net-bnxt-set-HW-coalescing-parameters.patch 2022-02-21 15:22:44.349704707 +0000
@@ -1 +1 @@
-From 5b9b3d590452cc4068418fa7dc8f3595422bdbda Mon Sep 17 00:00:00 2001
+From e53da2ffbe012a647812bd8c954c53c2950eb7af Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5b9b3d590452cc4068418fa7dc8f3595422bdbda ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/bnxt: fix ring calculation for representors' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (175 preceding siblings ...)
2022-02-21 15:36 ` patch 'net/bnxt: set HW coalescing parameters' " Kevin Traynor
@ 2022-02-21 15:36 ` Kevin Traynor
2022-02-21 15:36 ` patch 'net/ngbe: fix Rx by initializing packet buffer early' " Kevin Traynor
` (17 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:36 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: Somnath Kotur, Kalesh AP, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/863d7879427e6d05fcf13a2dac832c6bc6cca9b8
Thanks.
Kevin
---
From 863d7879427e6d05fcf13a2dac832c6bc6cca9b8 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Wed, 26 Jan 2022 10:13:26 -0800
Subject: [PATCH] net/bnxt: fix ring calculation for representors
[ upstream commit 59e62818877aa45c0066743470192c317670678c ]
Currently the Tx and Rx ring count for representors is fixed.
It does not consider the number of rings created for the parent
function. And that can cause issues not only during initialization
but while running traffic.
Instead check the number of rings created for the parent function
while configuring the ring resources for representors.
In some cases VF rep ring init may happen before the parent function's
rings have been setup. And this can cause representor ring count to be
configured as 0. In such cases, initialize the VF representor
ring count to 8.
Fixes: 322bd6e70272 ("net/bnxt: add port representor infrastructure")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
---
drivers/net/bnxt/bnxt.h | 2 +-
drivers/net/bnxt/bnxt_reps.c | 21 ++++++++++++---------
2 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 433f1c80be..0cbb58b2cf 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -832,5 +832,5 @@ struct bnxt {
uint16_t max_rx_rings;
#define MAX_STINGRAY_RINGS 236U
-#define BNXT_MAX_VF_REP_RINGS 8
+#define BNXT_MAX_VF_REP_RINGS 8U
uint16_t max_nq_rings;
diff --git a/drivers/net/bnxt/bnxt_reps.c b/drivers/net/bnxt/bnxt_reps.c
index a4ab64f511..b77cdeae96 100644
--- a/drivers/net/bnxt/bnxt_reps.c
+++ b/drivers/net/bnxt/bnxt_reps.c
@@ -550,5 +550,8 @@ int bnxt_rep_dev_info_get_op(struct rte_eth_dev *eth_dev,
dev_info->max_hash_mac_addrs = 0;
- max_rx_rings = BNXT_MAX_VF_REP_RINGS;
+ max_rx_rings = parent_bp->rx_nr_rings ?
+ RTE_MIN(parent_bp->rx_nr_rings, BNXT_MAX_VF_REP_RINGS) :
+ BNXT_MAX_VF_REP_RINGS;
+
/* For the sake of symmetry, max_rx_queues = max_tx_queues */
dev_info->max_rx_queues = max_rx_rings;
@@ -631,8 +634,8 @@ int bnxt_rep_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
int rc = 0;
- if (queue_idx >= BNXT_MAX_VF_REP_RINGS) {
+ if (queue_idx >= rep_bp->rx_nr_rings) {
PMD_DRV_LOG(ERR,
"Cannot create Rx ring %d. %d rings available\n",
- queue_idx, BNXT_MAX_VF_REP_RINGS);
+ queue_idx, rep_bp->rx_nr_rings);
return -EINVAL;
}
@@ -731,8 +734,8 @@ int bnxt_rep_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
struct bnxt_vf_rep_tx_queue *vfr_txq;
- if (queue_idx >= BNXT_MAX_VF_REP_RINGS) {
+ if (queue_idx >= rep_bp->rx_nr_rings) {
PMD_DRV_LOG(ERR,
"Cannot create Tx rings %d. %d rings available\n",
- queue_idx, BNXT_MAX_VF_REP_RINGS);
+ queue_idx, rep_bp->rx_nr_rings);
return -EINVAL;
}
@@ -807,8 +810,8 @@ int bnxt_rep_stats_get_op(struct rte_eth_dev *eth_dev,
{
struct bnxt_representor *rep_bp = eth_dev->data->dev_private;
- int i;
+ unsigned int i;
memset(stats, 0, sizeof(*stats));
- for (i = 0; i < BNXT_MAX_VF_REP_RINGS; i++) {
+ for (i = 0; i < rep_bp->rx_nr_rings; i++) {
stats->obytes += rep_bp->tx_bytes[i];
stats->opackets += rep_bp->tx_pkts[i];
@@ -830,7 +833,7 @@ int bnxt_rep_stats_reset_op(struct rte_eth_dev *eth_dev)
{
struct bnxt_representor *rep_bp = eth_dev->data->dev_private;
- int i;
+ unsigned int i;
- for (i = 0; i < BNXT_MAX_VF_REP_RINGS; i++) {
+ for (i = 0; i < rep_bp->rx_nr_rings; i++) {
rep_bp->tx_pkts[i] = 0;
rep_bp->tx_bytes[i] = 0;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:48.398393126 +0000
+++ 0178-net-bnxt-fix-ring-calculation-for-representors.patch 2022-02-21 15:22:44.350704709 +0000
@@ -1 +1 @@
-From 59e62818877aa45c0066743470192c317670678c Mon Sep 17 00:00:00 2001
+From 863d7879427e6d05fcf13a2dac832c6bc6cca9b8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 59e62818877aa45c0066743470192c317670678c ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -40 +41 @@
-index 5e140f0cdb..e773932681 100644
+index a4ab64f511..b77cdeae96 100644
@@ -43 +44 @@
-@@ -549,5 +549,8 @@ int bnxt_rep_dev_info_get_op(struct rte_eth_dev *eth_dev,
+@@ -550,5 +550,8 @@ int bnxt_rep_dev_info_get_op(struct rte_eth_dev *eth_dev,
@@ -53 +54 @@
-@@ -630,8 +633,8 @@ int bnxt_rep_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
+@@ -631,8 +634,8 @@ int bnxt_rep_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
@@ -64 +65 @@
-@@ -730,8 +733,8 @@ int bnxt_rep_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
+@@ -731,8 +734,8 @@ int bnxt_rep_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
@@ -75 +76 @@
-@@ -806,8 +809,8 @@ int bnxt_rep_stats_get_op(struct rte_eth_dev *eth_dev,
+@@ -807,8 +810,8 @@ int bnxt_rep_stats_get_op(struct rte_eth_dev *eth_dev,
@@ -86 +87 @@
-@@ -829,7 +832,7 @@ int bnxt_rep_stats_reset_op(struct rte_eth_dev *eth_dev)
+@@ -830,7 +833,7 @@ int bnxt_rep_stats_reset_op(struct rte_eth_dev *eth_dev)
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/ngbe: fix Rx by initializing packet buffer early' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (176 preceding siblings ...)
2022-02-21 15:36 ` patch 'net/bnxt: fix ring calculation for representors' " Kevin Traynor
@ 2022-02-21 15:36 ` Kevin Traynor
2022-02-21 15:36 ` patch 'net/ngbe: fix missed link interrupt' " Kevin Traynor
` (16 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:36 UTC (permalink / raw)
To: Jiawen Wu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/cacbd7e4f7b4563fd62f4dd0c3ecdd1ea20bc2e8
Thanks.
Kevin
---
From cacbd7e4f7b4563fd62f4dd0c3ecdd1ea20bc2e8 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Wed, 9 Feb 2022 18:42:02 +0800
Subject: [PATCH] net/ngbe: fix Rx by initializing packet buffer early
[ upstream commit ccdeca8e98afa33721a70b90cb208472c39d3c77 ]
Initialize Rx packet buffer before starting RxTx, ensure to receive
packets.
Fixes: 62fc35e63d0e ("net/ngbe: support Rx queue start/stop")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/ngbe/base/ngbe_dummy.h | 4 ++++
drivers/net/ngbe/base/ngbe_hw.c | 27 +++++++++++++++++++++++++++
drivers/net/ngbe/base/ngbe_hw.h | 2 ++
drivers/net/ngbe/base/ngbe_type.h | 7 +++++++
drivers/net/ngbe/ngbe_ethdev.c | 1 +
5 files changed, 41 insertions(+)
diff --git a/drivers/net/ngbe/base/ngbe_dummy.h b/drivers/net/ngbe/base/ngbe_dummy.h
index 61b0d82bfb..d74c9f7b54 100644
--- a/drivers/net/ngbe/base/ngbe_dummy.h
+++ b/drivers/net/ngbe/base/ngbe_dummy.h
@@ -115,4 +115,7 @@ static inline s32 ngbe_mac_get_link_capabilities_dummy(struct ngbe_hw *TUP0,
return NGBE_ERR_OPS_DUMMY;
}
+static inline void ngbe_setup_pba_dummy(struct ngbe_hw *TUP0)
+{
+}
static inline s32 ngbe_mac_led_on_dummy(struct ngbe_hw *TUP0, u32 TUP1)
{
@@ -299,4 +302,5 @@ static inline void ngbe_init_ops_dummy(struct ngbe_hw *hw)
hw->mac.check_link = ngbe_mac_check_link_dummy;
hw->mac.get_link_capabilities = ngbe_mac_get_link_capabilities_dummy;
+ hw->mac.setup_pba = ngbe_setup_pba_dummy;
hw->mac.led_on = ngbe_mac_led_on_dummy;
hw->mac.led_off = ngbe_mac_led_off_dummy;
diff --git a/drivers/net/ngbe/base/ngbe_hw.c b/drivers/net/ngbe/base/ngbe_hw.c
index 0716357725..0b22ea0fb3 100644
--- a/drivers/net/ngbe/base/ngbe_hw.c
+++ b/drivers/net/ngbe/base/ngbe_hw.c
@@ -1610,4 +1610,28 @@ void ngbe_set_mac_anti_spoofing(struct ngbe_hw *hw, bool enable, int vf)
}
+/**
+ * ngbe_set_pba - Initialize Rx packet buffer
+ * @hw: pointer to hardware structure
+ * @headroom: reserve n KB of headroom
+ **/
+void ngbe_set_pba(struct ngbe_hw *hw)
+{
+ u32 rxpktsize = hw->mac.rx_pb_size;
+ u32 txpktsize, txpbthresh;
+
+ /* Reserve 256 KB of headroom */
+ rxpktsize -= 256;
+
+ rxpktsize <<= 10;
+ wr32(hw, NGBE_PBRXSIZE, rxpktsize);
+
+ /* Only support an equally distributed Tx packet buffer strategy. */
+ txpktsize = NGBE_PBTXSIZE_MAX;
+ txpbthresh = (txpktsize / 1024) - NGBE_TXPKT_SIZE_MAX;
+
+ wr32(hw, NGBE_PBTXSIZE, txpktsize);
+ wr32(hw, NGBE_PBTXDMATH, txpbthresh);
+}
+
/**
* ngbe_set_vlan_anti_spoofing - Enable/Disable VLAN anti-spoofing
@@ -1908,4 +1932,6 @@ s32 ngbe_init_ops_pf(struct ngbe_hw *hw)
mac->setup_link = ngbe_setup_mac_link_em;
+ mac->setup_pba = ngbe_set_pba;
+
/* Manageability interface */
mac->init_thermal_sensor_thresh = ngbe_init_thermal_sensor_thresh;
@@ -1929,4 +1955,5 @@ s32 ngbe_init_ops_pf(struct ngbe_hw *hw)
mac->vft_size = NGBE_EM_VFT_TBL_SIZE;
mac->num_rar_entries = NGBE_EM_RAR_ENTRIES;
+ mac->rx_pb_size = NGBE_EM_RX_PB_SIZE;
mac->max_rx_queues = NGBE_EM_MAX_RX_QUEUES;
mac->max_tx_queues = NGBE_EM_MAX_TX_QUEUES;
diff --git a/drivers/net/ngbe/base/ngbe_hw.h b/drivers/net/ngbe/base/ngbe_hw.h
index ad7e8fc2d9..b32cf87ff4 100644
--- a/drivers/net/ngbe/base/ngbe_hw.h
+++ b/drivers/net/ngbe/base/ngbe_hw.h
@@ -14,4 +14,5 @@
#define NGBE_EM_MC_TBL_SIZE 32
#define NGBE_EM_VFT_TBL_SIZE 128
+#define NGBE_EM_RX_PB_SIZE 42 /*KB*/
s32 ngbe_init_hw(struct ngbe_hw *hw);
@@ -45,4 +46,5 @@ s32 ngbe_update_mc_addr_list(struct ngbe_hw *hw, u8 *mc_addr_list,
s32 ngbe_disable_sec_rx_path(struct ngbe_hw *hw);
s32 ngbe_enable_sec_rx_path(struct ngbe_hw *hw);
+void ngbe_set_pba(struct ngbe_hw *hw);
s32 ngbe_setup_fc_em(struct ngbe_hw *hw);
diff --git a/drivers/net/ngbe/base/ngbe_type.h b/drivers/net/ngbe/base/ngbe_type.h
index 12847b7272..269e087d50 100644
--- a/drivers/net/ngbe/base/ngbe_type.h
+++ b/drivers/net/ngbe/base/ngbe_type.h
@@ -12,4 +12,7 @@
#define NGBE_FRAME_SIZE_DFT (1522) /* Default frame size, +FCS */
#define NGBE_NUM_POOL (32)
+#define NGBE_PBRXSIZE_MAX 0x00080000 /* 512KB Packet Buffer */
+#define NGBE_PBTXSIZE_MAX 0x00005000 /* 20KB Packet Buffer */
+#define NGBE_TXPKT_SIZE_MAX 0xA /* Max Tx Packet size */
#define NGBE_MAX_QP (8)
#define NGBE_MAX_UTA 128
@@ -270,4 +273,7 @@ struct ngbe_mac_info {
u32 *speed, bool *autoneg);
+ /* Packet Buffer manipulation */
+ void (*setup_pba)(struct ngbe_hw *hw);
+
/* LED */
s32 (*led_on)(struct ngbe_hw *hw, u32 index);
@@ -312,4 +318,5 @@ struct ngbe_mac_info {
u32 vft_size;
u32 num_rar_entries;
+ u32 rx_pb_size;
u32 max_tx_queues;
u32 max_rx_queues;
diff --git a/drivers/net/ngbe/ngbe_ethdev.c b/drivers/net/ngbe/ngbe_ethdev.c
index 0d66c32551..180489ce38 100644
--- a/drivers/net/ngbe/ngbe_ethdev.c
+++ b/drivers/net/ngbe/ngbe_ethdev.c
@@ -1005,4 +1005,5 @@ ngbe_dev_start(struct rte_eth_dev *dev)
}
+ hw->mac.setup_pba(hw);
ngbe_configure_port(dev);
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:48.418091256 +0000
+++ 0179-net-ngbe-fix-Rx-by-initializing-packet-buffer-early.patch 2022-02-21 15:22:44.353704716 +0000
@@ -1 +1 @@
-From ccdeca8e98afa33721a70b90cb208472c39d3c77 Mon Sep 17 00:00:00 2001
+From cacbd7e4f7b4563fd62f4dd0c3ecdd1ea20bc2e8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ccdeca8e98afa33721a70b90cb208472c39d3c77 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/ngbe: fix missed link interrupt' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (177 preceding siblings ...)
2022-02-21 15:36 ` patch 'net/ngbe: fix Rx by initializing packet buffer early' " Kevin Traynor
@ 2022-02-21 15:36 ` Kevin Traynor
2022-02-21 15:36 ` patch 'net/ngbe: fix Tx hang on queue disable' " Kevin Traynor
` (15 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:36 UTC (permalink / raw)
To: Jiawen Wu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/3698c17f425d80d0c3694f0f4996cb57e459c485
Thanks.
Kevin
---
From 3698c17f425d80d0c3694f0f4996cb57e459c485 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Wed, 9 Feb 2022 18:42:03 +0800
Subject: [PATCH] net/ngbe: fix missed link interrupt
[ upstream commit 0360c23f648116b3101795e551b60fbba881247a ]
When the port is started and stopped continuously and quickly, one
interrupt cannot be handled in time, which will cause subsequent
interrupts to be lost, so that link status will cannot be updated.
Fixes: b9246b8fa280 ("net/ngbe: support link update")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/ngbe/ngbe_ethdev.c | 119 +++++++++++----------------------
drivers/net/ngbe/ngbe_ethdev.h | 1 +
2 files changed, 41 insertions(+), 79 deletions(-)
diff --git a/drivers/net/ngbe/ngbe_ethdev.c b/drivers/net/ngbe/ngbe_ethdev.c
index 180489ce38..8e31234442 100644
--- a/drivers/net/ngbe/ngbe_ethdev.c
+++ b/drivers/net/ngbe/ngbe_ethdev.c
@@ -90,5 +90,4 @@ static int ngbe_dev_misc_interrupt_setup(struct rte_eth_dev *dev);
static int ngbe_dev_rxq_interrupt_setup(struct rte_eth_dev *dev);
static void ngbe_dev_interrupt_handler(void *param);
-static void ngbe_dev_interrupt_delayed_handler(void *param);
static void ngbe_configure_msix(struct rte_eth_dev *dev);
@@ -944,4 +943,7 @@ ngbe_dev_start(struct rte_eth_dev *dev)
PMD_INIT_FUNC_TRACE();
+ /* Stop the link setup handler before resetting the HW. */
+ rte_eal_alarm_cancel(ngbe_dev_setup_link_alarm_handler, dev);
+
/* disable uio/vfio intr/eventfd mapping */
rte_intr_disable(intr_handle);
@@ -1133,4 +1135,6 @@ ngbe_dev_stop(struct rte_eth_dev *dev)
PMD_INIT_FUNC_TRACE();
+ rte_eal_alarm_cancel(ngbe_dev_setup_link_alarm_handler, dev);
+
if ((hw->sub_system_id & NGBE_OEM_MASK) == NGBE_LY_M88E1512_SFP ||
(hw->sub_system_id & NGBE_OEM_MASK) == NGBE_LY_YT8521S_SFP) {
@@ -1802,4 +1806,22 @@ ngbe_dev_supported_ptypes_get(struct rte_eth_dev *dev)
}
+void
+ngbe_dev_setup_link_alarm_handler(void *param)
+{
+ struct rte_eth_dev *dev = (struct rte_eth_dev *)param;
+ struct ngbe_hw *hw = ngbe_dev_hw(dev);
+ struct ngbe_interrupt *intr = ngbe_dev_intr(dev);
+ u32 speed;
+ bool autoneg = false;
+
+ speed = hw->phy.autoneg_advertised;
+ if (!speed)
+ hw->mac.get_link_capabilities(hw, &speed, &autoneg);
+
+ hw->mac.setup_link(hw, speed, true);
+
+ intr->flags &= ~NGBE_FLAG_NEED_LINK_CONFIG;
+}
+
/* return 0 means link status changed, -1 means not changed */
int
@@ -1839,6 +1861,14 @@ ngbe_dev_link_update_share(struct rte_eth_dev *dev,
}
- if (!link_up)
+ if (!link_up) {
+ if (hw->phy.media_type == ngbe_media_type_fiber &&
+ hw->phy.type != ngbe_phy_mvl_sfi) {
+ intr->flags |= NGBE_FLAG_NEED_LINK_CONFIG;
+ rte_eal_alarm_set(10,
+ ngbe_dev_setup_link_alarm_handler, dev);
+ }
+
return rte_eth_linkstatus_set(dev, &link);
+ }
intr->flags &= ~NGBE_FLAG_NEED_LINK_CONFIG;
@@ -2063,7 +2093,4 @@ ngbe_dev_interrupt_get_status(struct rte_eth_dev *dev)
struct ngbe_interrupt *intr = ngbe_dev_intr(dev);
- /* clear all cause mask */
- ngbe_disable_intr(hw);
-
/* read-on-clear nic registers here */
eicr = ((u32 *)hw->isb_mem)[NGBE_ISB_MISC];
@@ -2085,4 +2112,6 @@ ngbe_dev_interrupt_get_status(struct rte_eth_dev *dev)
intr->flags |= NGBE_FLAG_NEED_LINK_UPDATE;
+ ((u32 *)hw->isb_mem)[NGBE_ISB_MISC] = 0;
+
return 0;
}
@@ -2137,5 +2166,4 @@ ngbe_dev_interrupt_action(struct rte_eth_dev *dev)
{
struct ngbe_interrupt *intr = ngbe_dev_intr(dev);
- int64_t timeout;
PMD_DRV_LOG(DEBUG, "intr action type %d", intr->flags);
@@ -2152,83 +2180,16 @@ ngbe_dev_interrupt_action(struct rte_eth_dev *dev)
rte_eth_linkstatus_get(dev, &link);
- ngbe_dev_link_update(dev, 0);
-
- /* likely to up */
- if (link.link_status != RTE_ETH_LINK_UP)
- /* handle it 1 sec later, wait it being stable */
- timeout = NGBE_LINK_UP_CHECK_TIMEOUT;
- /* likely to down */
- else
- /* handle it 4 sec later, wait it being stable */
- timeout = NGBE_LINK_DOWN_CHECK_TIMEOUT;
-
- ngbe_dev_link_status_print(dev);
- if (rte_eal_alarm_set(timeout * 1000,
- ngbe_dev_interrupt_delayed_handler,
- (void *)dev) < 0) {
- PMD_DRV_LOG(ERR, "Error setting alarm");
- } else {
- /* remember original mask */
- intr->mask_misc_orig = intr->mask_misc;
- /* only disable lsc interrupt */
- intr->mask_misc &= ~NGBE_ICRMISC_PHY;
-
- intr->mask_orig = intr->mask;
- /* only disable all misc interrupts */
- intr->mask &= ~(1ULL << NGBE_MISC_VEC_ID);
- }
- }
-
- PMD_DRV_LOG(DEBUG, "enable intr immediately");
- ngbe_enable_intr(dev);
-
- return 0;
-}
-
-/**
- * Interrupt handler which shall be registered for alarm callback for delayed
- * handling specific interrupt to wait for the stable nic state. As the
- * NIC interrupt state is not stable for ngbe after link is just down,
- * it needs to wait 4 seconds to get the stable status.
- *
- * @param param
- * The address of parameter (struct rte_eth_dev *) registered before.
- */
-static void
-ngbe_dev_interrupt_delayed_handler(void *param)
-{
- struct rte_eth_dev *dev = (struct rte_eth_dev *)param;
- struct ngbe_interrupt *intr = ngbe_dev_intr(dev);
- struct ngbe_hw *hw = ngbe_dev_hw(dev);
- uint32_t eicr;
-
- ngbe_disable_intr(hw);
-
- eicr = ((u32 *)hw->isb_mem)[NGBE_ISB_MISC];
- if (eicr & NGBE_ICRMISC_VFMBX)
- ngbe_pf_mbx_process(dev);
-
- if (intr->flags & NGBE_FLAG_NEED_LINK_UPDATE) {
ngbe_dev_link_update(dev, 0);
intr->flags &= ~NGBE_FLAG_NEED_LINK_UPDATE;
ngbe_dev_link_status_print(dev);
- rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC,
- NULL);
+ if (dev->data->dev_link.link_speed != link.link_speed)
+ rte_eth_dev_callback_process(dev,
+ RTE_ETH_EVENT_INTR_LSC, NULL);
}
- if (intr->flags & NGBE_FLAG_MACSEC) {
- rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_MACSEC,
- NULL);
- intr->flags &= ~NGBE_FLAG_MACSEC;
- }
-
- /* restore original mask */
- intr->mask_misc = intr->mask_misc_orig;
- intr->mask_misc_orig = 0;
- intr->mask = intr->mask_orig;
- intr->mask_orig = 0;
-
- PMD_DRV_LOG(DEBUG, "enable intr in delayed handler S[%08x]", eicr);
+ PMD_DRV_LOG(DEBUG, "enable intr immediately");
ngbe_enable_intr(dev);
+
+ return 0;
}
diff --git a/drivers/net/ngbe/ngbe_ethdev.h b/drivers/net/ngbe/ngbe_ethdev.h
index bb96f6a5e7..8d500fd38c 100644
--- a/drivers/net/ngbe/ngbe_ethdev.h
+++ b/drivers/net/ngbe/ngbe_ethdev.h
@@ -342,4 +342,5 @@ void ngbe_vlan_hw_strip_bitmap_set(struct rte_eth_dev *dev,
void ngbe_config_vlan_strip_on_all_queues(struct rte_eth_dev *dev,
int mask);
+void ngbe_dev_setup_link_alarm_handler(void *param);
void ngbe_read_stats_registers(struct ngbe_hw *hw,
struct ngbe_hw_stats *hw_stats);
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:48.440338631 +0000
+++ 0180-net-ngbe-fix-missed-link-interrupt.patch 2022-02-21 15:22:44.355704721 +0000
@@ -1 +1 @@
-From 0360c23f648116b3101795e551b60fbba881247a Mon Sep 17 00:00:00 2001
+From 3698c17f425d80d0c3694f0f4996cb57e459c485 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0360c23f648116b3101795e551b60fbba881247a ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/ngbe: fix Tx hang on queue disable' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (178 preceding siblings ...)
2022-02-21 15:36 ` patch 'net/ngbe: fix missed link interrupt' " Kevin Traynor
@ 2022-02-21 15:36 ` Kevin Traynor
2022-02-21 15:36 ` patch 'net/ngbe: fix packet statistics' " Kevin Traynor
` (14 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:36 UTC (permalink / raw)
To: Jiawen Wu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/b9c20ea8f087834d6e5518bb28f5b188f50a9bbb
Thanks.
Kevin
---
From b9c20ea8f087834d6e5518bb28f5b188f50a9bbb Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Wed, 9 Feb 2022 18:42:04 +0800
Subject: [PATCH] net/ngbe: fix Tx hang on queue disable
[ upstream commit ac6c5e9af56a741479b8361014bec124aed4ab28 ]
Add commands requesting firmware to enable or disable PCIe bus master.
Disable PCIe master access 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: 78710873c2f3 ("net/ngbe: add HW initialization")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/ngbe/base/ngbe_hw.c | 76 +++++++++++++++++++++++++++----
drivers/net/ngbe/base/ngbe_hw.h | 1 +
drivers/net/ngbe/base/ngbe_mng.c | 57 +++++++++++++++++++++++
drivers/net/ngbe/base/ngbe_mng.h | 21 +++++++++
drivers/net/ngbe/base/ngbe_regs.h | 3 ++
drivers/net/ngbe/base/ngbe_type.h | 3 ++
drivers/net/ngbe/ngbe_ethdev.c | 7 ++-
7 files changed, 158 insertions(+), 10 deletions(-)
diff --git a/drivers/net/ngbe/base/ngbe_hw.c b/drivers/net/ngbe/base/ngbe_hw.c
index 0b22ea0fb3..782fd71d29 100644
--- a/drivers/net/ngbe/base/ngbe_hw.c
+++ b/drivers/net/ngbe/base/ngbe_hw.c
@@ -351,6 +351,6 @@ void ngbe_set_lan_id_multi_port(struct ngbe_hw *hw)
s32 ngbe_stop_hw(struct ngbe_hw *hw)
{
- u32 reg_val;
u16 i;
+ s32 status = 0;
DEBUGFUNC("ngbe_stop_hw");
@@ -373,14 +373,25 @@ s32 ngbe_stop_hw(struct ngbe_hw *hw)
wr32(hw, NGBE_ICR(0), NGBE_ICR_MASK);
+ wr32(hw, NGBE_BMECTL, 0x3);
+
+ /* Disable the receive unit by stopping each queue */
+ for (i = 0; i < hw->mac.max_rx_queues; i++)
+ wr32(hw, NGBE_RXCFG(i), 0);
+
+ /* flush all queues disables */
+ ngbe_flush(hw);
+ msec_delay(2);
+
+ /*
+ * Prevent the PCI-E bus from hanging by disabling PCI-E master
+ * access and verify no pending requests
+ */
+ status = ngbe_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, NGBE_TXCFG(i), NGBE_TXCFG_FLUSH);
-
- /* Disable the receive unit by stopping each queue */
- for (i = 0; i < hw->mac.max_rx_queues; i++) {
- reg_val = rd32(hw, NGBE_RXCFG(i));
- reg_val &= ~NGBE_RXCFG_ENA;
- wr32(hw, NGBE_RXCFG(i), reg_val);
- }
+ wr32(hw, NGBE_TXCFG(i), 0);
/* flush all queues disables */
@@ -1077,4 +1088,51 @@ out:
}
+/**
+ * ngbe_set_pcie_master - Disable or Enable PCI-express master access
+ * @hw: pointer to hardware structure
+ *
+ * Disables PCI-Express master access and verifies there are no pending
+ * requests. NGBE_ERR_MASTER_REQUESTS_PENDING is returned if master disable
+ * bit hasn't caused the master requests to be disabled, else 0
+ * is returned signifying master requests disabled.
+ **/
+s32 ngbe_set_pcie_master(struct ngbe_hw *hw, bool enable)
+{
+ s32 status = 0;
+ u16 addr = 0x04;
+ u32 data, i;
+
+ DEBUGFUNC("ngbe_set_pcie_master");
+
+ ngbe_hic_pcie_read(hw, addr, &data, 4);
+ if (enable)
+ data |= 0x04;
+ else
+ data &= ~0x04;
+
+ ngbe_hic_pcie_write(hw, addr, &data, 4);
+
+ if (enable)
+ goto out;
+
+ /* Exit if master requests are blocked */
+ if (!(rd32(hw, NGBE_BMEPEND)) ||
+ NGBE_REMOVED(hw->hw_addr))
+ goto out;
+
+ /* Poll for master request bit to clear */
+ for (i = 0; i < NGBE_PCI_MASTER_DISABLE_TIMEOUT; i++) {
+ usec_delay(100);
+ if (!(rd32(hw, NGBE_BMEPEND)))
+ goto out;
+ }
+
+ DEBUGOUT("PCIe transaction pending bit also did not clear.\n");
+ status = NGBE_ERR_MASTER_REQUESTS_PENDING;
+
+out:
+ return status;
+}
+
/**
* ngbe_acquire_swfw_sync - Acquire SWFW semaphore
diff --git a/drivers/net/ngbe/base/ngbe_hw.h b/drivers/net/ngbe/base/ngbe_hw.h
index b32cf87ff4..7e0e23b195 100644
--- a/drivers/net/ngbe/base/ngbe_hw.h
+++ b/drivers/net/ngbe/base/ngbe_hw.h
@@ -55,4 +55,5 @@ s32 ngbe_validate_mac_addr(u8 *mac_addr);
s32 ngbe_acquire_swfw_sync(struct ngbe_hw *hw, u32 mask);
void ngbe_release_swfw_sync(struct ngbe_hw *hw, u32 mask);
+s32 ngbe_set_pcie_master(struct ngbe_hw *hw, bool enable);
s32 ngbe_set_vmdq(struct ngbe_hw *hw, u32 rar, u32 vmdq);
diff --git a/drivers/net/ngbe/base/ngbe_mng.c b/drivers/net/ngbe/base/ngbe_mng.c
index a3dd8093ce..68e06e2c24 100644
--- a/drivers/net/ngbe/base/ngbe_mng.c
+++ b/drivers/net/ngbe/base/ngbe_mng.c
@@ -244,4 +244,61 @@ s32 ngbe_hic_sr_write(struct ngbe_hw *hw, u32 addr, u8 *buf, int len)
}
+s32 ngbe_hic_pcie_read(struct ngbe_hw *hw, u16 addr, u32 *buf, int len)
+{
+ struct ngbe_hic_read_pcie command;
+ u32 value = 0;
+ int err, i = 0;
+
+ if (len > NGBE_PMMBX_DATA_SIZE)
+ return NGBE_ERR_HOST_INTERFACE_COMMAND;
+
+ memset(&command, 0, sizeof(command));
+ command.hdr.cmd = FW_PCIE_READ_CMD;
+ command.hdr.buf_len = sizeof(command) - sizeof(command.hdr);
+ command.hdr.checksum = FW_DEFAULT_CHECKSUM;
+ command.lan_id = hw->bus.lan_id;
+ command.addr = addr;
+
+ err = ngbe_host_interface_command(hw, (u32 *)&command,
+ sizeof(command), NGBE_HI_COMMAND_TIMEOUT, false);
+ if (err)
+ return err;
+
+ while (i < (len >> 2)) {
+ value = rd32a(hw, NGBE_MNGMBX, FW_PCIE_BUSMASTER_OFFSET + i);
+ ((u32 *)buf)[i] = value;
+ i++;
+ }
+
+ return 0;
+}
+
+s32 ngbe_hic_pcie_write(struct ngbe_hw *hw, u16 addr, u32 *buf, int len)
+{
+ struct ngbe_hic_write_pcie command;
+ u32 value = 0;
+ int err, i = 0;
+
+ while (i < (len >> 2)) {
+ value = ((u32 *)buf)[i];
+ i++;
+ }
+
+ memset(&command, 0, sizeof(command));
+ command.hdr.cmd = FW_PCIE_WRITE_CMD;
+ command.hdr.buf_len = sizeof(command) - sizeof(command.hdr);
+ command.hdr.checksum = FW_DEFAULT_CHECKSUM;
+ command.lan_id = hw->bus.lan_id;
+ command.addr = addr;
+ command.data = value;
+
+ err = ngbe_host_interface_command(hw, (u32 *)&command,
+ sizeof(command), NGBE_HI_COMMAND_TIMEOUT, false);
+ if (err)
+ return err;
+
+ return 0;
+}
+
s32 ngbe_hic_check_cap(struct ngbe_hw *hw)
{
diff --git a/drivers/net/ngbe/base/ngbe_mng.h b/drivers/net/ngbe/base/ngbe_mng.h
index e3d0309cbc..321338a051 100644
--- a/drivers/net/ngbe/base/ngbe_mng.h
+++ b/drivers/net/ngbe/base/ngbe_mng.h
@@ -21,4 +21,7 @@
#define FW_WRITE_SHADOW_RAM_CMD 0x33
#define FW_WRITE_SHADOW_RAM_LEN 0xA /* 8 plus 1 WORD to write */
+#define FW_PCIE_READ_CMD 0xEC
+#define FW_PCIE_WRITE_CMD 0xED
+#define FW_PCIE_BUSMASTER_OFFSET 2
#define FW_DEFAULT_CHECKSUM 0xFF /* checksum always 0xFF */
#define FW_NVM_DATA_OFFSET 3
@@ -77,6 +80,24 @@ struct ngbe_hic_write_shadow_ram {
};
+struct ngbe_hic_read_pcie {
+ struct ngbe_hic_hdr hdr;
+ u8 lan_id;
+ u8 rsvd;
+ u16 addr;
+ u32 data;
+};
+
+struct ngbe_hic_write_pcie {
+ struct ngbe_hic_hdr hdr;
+ u8 lan_id;
+ u8 rsvd;
+ u16 addr;
+ u32 data;
+};
+
s32 ngbe_hic_sr_read(struct ngbe_hw *hw, u32 addr, u8 *buf, int len);
s32 ngbe_hic_sr_write(struct ngbe_hw *hw, u32 addr, u8 *buf, int len);
+s32 ngbe_hic_pcie_read(struct ngbe_hw *hw, u16 addr, u32 *buf, int len);
+s32 ngbe_hic_pcie_write(struct ngbe_hw *hw, u16 addr, u32 *buf, int len);
s32 ngbe_hic_check_cap(struct ngbe_hw *hw);
diff --git a/drivers/net/ngbe/base/ngbe_regs.h b/drivers/net/ngbe/base/ngbe_regs.h
index 872b008c46..e84bfdf88a 100644
--- a/drivers/net/ngbe/base/ngbe_regs.h
+++ b/drivers/net/ngbe/base/ngbe_regs.h
@@ -867,4 +867,7 @@ enum ngbe_5tuple_protocol {
******************************************************************************/
/* Interrupt */
+#define NGBE_BMECTL 0x012020
+#define NGBE_BMECTL_VFDRP MS(1, 0x1)
+#define NGBE_BMECTL_PFDRP MS(0, 0x1)
#define NGBE_ICRMISC 0x000100
#define NGBE_ICRMISC_MASK MS(8, 0xFFFFFF)
diff --git a/drivers/net/ngbe/base/ngbe_type.h b/drivers/net/ngbe/base/ngbe_type.h
index 269e087d50..4c995e7397 100644
--- a/drivers/net/ngbe/base/ngbe_type.h
+++ b/drivers/net/ngbe/base/ngbe_type.h
@@ -18,4 +18,7 @@
#define NGBE_MAX_UTA 128
+#define NGBE_PCI_MASTER_DISABLE_TIMEOUT 800
+
+
#define NGBE_ALIGN 128 /* as intel did */
#define NGBE_ISB_SIZE 16
diff --git a/drivers/net/ngbe/ngbe_ethdev.c b/drivers/net/ngbe/ngbe_ethdev.c
index 8e31234442..30c9e68579 100644
--- a/drivers/net/ngbe/ngbe_ethdev.c
+++ b/drivers/net/ngbe/ngbe_ethdev.c
@@ -951,5 +951,4 @@ ngbe_dev_start(struct rte_eth_dev *dev)
/* stop adapter */
hw->adapter_stopped = 0;
- ngbe_stop_hw(hw);
/* reinitialize adapter, this calls reset and start */
@@ -962,4 +961,6 @@ ngbe_dev_start(struct rte_eth_dev *dev)
hw->mac.get_link_status = true;
+ ngbe_set_pcie_master(hw, true);
+
/* configure PF module if SRIOV enabled */
ngbe_pf_host_configure(dev);
@@ -1175,4 +1176,6 @@ ngbe_dev_stop(struct rte_eth_dev *dev)
rte_intr_vec_list_free(intr_handle);
+ ngbe_set_pcie_master(hw, true);
+
adapter->rss_reta_updated = 0;
@@ -1203,4 +1206,6 @@ ngbe_dev_close(struct rte_eth_dev *dev)
ngbe_dev_free_queues(dev);
+ ngbe_set_pcie_master(hw, false);
+
/* reprogram the RAR[0] in case user changed it. */
ngbe_set_rar(hw, 0, hw->mac.addr, 0, true);
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:48.460985206 +0000
+++ 0181-net-ngbe-fix-Tx-hang-on-queue-disable.patch 2022-02-21 15:22:44.357704725 +0000
@@ -1 +1 @@
-From ac6c5e9af56a741479b8361014bec124aed4ab28 Mon Sep 17 00:00:00 2001
+From b9c20ea8f087834d6e5518bb28f5b188f50a9bbb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ac6c5e9af56a741479b8361014bec124aed4ab28 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/ngbe: fix packet statistics' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (179 preceding siblings ...)
2022-02-21 15:36 ` patch 'net/ngbe: fix Tx hang on queue disable' " Kevin Traynor
@ 2022-02-21 15:36 ` Kevin Traynor
2022-02-21 15:36 ` patch 'net/txgbe: fix link up and down' " Kevin Traynor
` (13 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:36 UTC (permalink / raw)
To: Jiawen Wu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/59691181a3441269bafbbfabeeb1d4d4b5e2de1a
Thanks.
Kevin
---
From 59691181a3441269bafbbfabeeb1d4d4b5e2de1a Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Wed, 9 Feb 2022 18:42:05 +0800
Subject: [PATCH] net/ngbe: fix packet statistics
[ upstream commit 5c305e4058014f11e5898091b3a050bef2a02b34 ]
Fix specific length packet statistics caused by wrong register addresses.
Fixes: ed5f3bd3373e ("net/ngbe: define registers")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/ngbe/base/ngbe_regs.h | 48 +++++++++++++++----------------
1 file changed, 24 insertions(+), 24 deletions(-)
diff --git a/drivers/net/ngbe/base/ngbe_regs.h b/drivers/net/ngbe/base/ngbe_regs.h
index e84bfdf88a..6432ad8736 100644
--- a/drivers/net/ngbe/base/ngbe_regs.h
+++ b/drivers/net/ngbe/base/ngbe_regs.h
@@ -786,28 +786,28 @@ enum ngbe_5tuple_protocol {
#define NGBE_MACRXERRLENL 0x011978
#define NGBE_MACRXERRLENH 0x01197C
-#define NGBE_MACRX1TO64L 0x001940
-#define NGBE_MACRX1TO64H 0x001944
-#define NGBE_MACRX65TO127L 0x001948
-#define NGBE_MACRX65TO127H 0x00194C
-#define NGBE_MACRX128TO255L 0x001950
-#define NGBE_MACRX128TO255H 0x001954
-#define NGBE_MACRX256TO511L 0x001958
-#define NGBE_MACRX256TO511H 0x00195C
-#define NGBE_MACRX512TO1023L 0x001960
-#define NGBE_MACRX512TO1023H 0x001964
-#define NGBE_MACRX1024TOMAXL 0x001968
-#define NGBE_MACRX1024TOMAXH 0x00196C
-#define NGBE_MACTX1TO64L 0x001834
-#define NGBE_MACTX1TO64H 0x001838
-#define NGBE_MACTX65TO127L 0x00183C
-#define NGBE_MACTX65TO127H 0x001840
-#define NGBE_MACTX128TO255L 0x001844
-#define NGBE_MACTX128TO255H 0x001848
-#define NGBE_MACTX256TO511L 0x00184C
-#define NGBE_MACTX256TO511H 0x001850
-#define NGBE_MACTX512TO1023L 0x001854
-#define NGBE_MACTX512TO1023H 0x001858
-#define NGBE_MACTX1024TOMAXL 0x00185C
-#define NGBE_MACTX1024TOMAXH 0x001860
+#define NGBE_MACRX1TO64L 0x011940
+#define NGBE_MACRX1TO64H 0x011944
+#define NGBE_MACRX65TO127L 0x011948
+#define NGBE_MACRX65TO127H 0x01194C
+#define NGBE_MACRX128TO255L 0x011950
+#define NGBE_MACRX128TO255H 0x011954
+#define NGBE_MACRX256TO511L 0x011958
+#define NGBE_MACRX256TO511H 0x01195C
+#define NGBE_MACRX512TO1023L 0x011960
+#define NGBE_MACRX512TO1023H 0x011964
+#define NGBE_MACRX1024TOMAXL 0x011968
+#define NGBE_MACRX1024TOMAXH 0x01196C
+#define NGBE_MACTX1TO64L 0x011834
+#define NGBE_MACTX1TO64H 0x011838
+#define NGBE_MACTX65TO127L 0x01183C
+#define NGBE_MACTX65TO127H 0x011840
+#define NGBE_MACTX128TO255L 0x011844
+#define NGBE_MACTX128TO255H 0x011848
+#define NGBE_MACTX256TO511L 0x01184C
+#define NGBE_MACTX256TO511H 0x011850
+#define NGBE_MACTX512TO1023L 0x011854
+#define NGBE_MACTX512TO1023H 0x011858
+#define NGBE_MACTX1024TOMAXL 0x01185C
+#define NGBE_MACTX1024TOMAXH 0x011860
#define NGBE_MACRXUNDERSIZE 0x011938
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:48.483793376 +0000
+++ 0182-net-ngbe-fix-packet-statistics.patch 2022-02-21 15:22:44.358704728 +0000
@@ -1 +1 @@
-From 5c305e4058014f11e5898091b3a050bef2a02b34 Mon Sep 17 00:00:00 2001
+From 59691181a3441269bafbbfabeeb1d4d4b5e2de1a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5c305e4058014f11e5898091b3a050bef2a02b34 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/txgbe: fix link up and down' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (180 preceding siblings ...)
2022-02-21 15:36 ` patch 'net/ngbe: fix packet statistics' " Kevin Traynor
@ 2022-02-21 15:36 ` Kevin Traynor
2022-02-21 15:36 ` patch 'net/txgbe: fix KR auto-negotiation' " Kevin Traynor
` (12 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:36 UTC (permalink / raw)
To: Jiawen Wu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/42960ce4089d65aec41400db7c73a333a62e4c22
Thanks.
Kevin
---
From 42960ce4089d65aec41400db7c73a333a62e4c22 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Wed, 9 Feb 2022 18:42:12 +0800
Subject: [PATCH] net/txgbe: fix link up and down
[ upstream commit 2e1ecb460db92bc9dcd2350ed48dfe0b504f380f ]
Add hw->dev_start status in the flow of setting link up/down, to avoid
obtaining link status inconsistent with the settings.
Fixes: 12a653eb53e1 ("net/txgbe: fix link status when device stopped")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/txgbe/txgbe_ethdev.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index ac4d4e08f4..e2fcf87fe7 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -1938,4 +1938,5 @@ txgbe_dev_set_link_up(struct rte_eth_dev *dev)
/* Turn on the laser */
hw->mac.enable_tx_laser(hw);
+ hw->dev_start = true;
txgbe_dev_link_update(dev, 0);
}
@@ -1958,4 +1959,5 @@ txgbe_dev_set_link_down(struct rte_eth_dev *dev)
/* Turn off the laser */
hw->mac.disable_tx_laser(hw);
+ hw->dev_start = false;
txgbe_dev_link_update(dev, 0);
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:48.503443377 +0000
+++ 0183-net-txgbe-fix-link-up-and-down.patch 2022-02-21 15:22:44.362704737 +0000
@@ -1 +1 @@
-From 2e1ecb460db92bc9dcd2350ed48dfe0b504f380f Mon Sep 17 00:00:00 2001
+From 42960ce4089d65aec41400db7c73a333a62e4c22 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2e1ecb460db92bc9dcd2350ed48dfe0b504f380f ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index b756ea5e6c..7b42285b9e 100644
+index ac4d4e08f4..e2fcf87fe7 100644
@@ -21 +22 @@
-@@ -1934,4 +1934,5 @@ txgbe_dev_set_link_up(struct rte_eth_dev *dev)
+@@ -1938,4 +1938,5 @@ txgbe_dev_set_link_up(struct rte_eth_dev *dev)
@@ -27 +28 @@
-@@ -1954,4 +1955,5 @@ txgbe_dev_set_link_down(struct rte_eth_dev *dev)
+@@ -1958,4 +1959,5 @@ txgbe_dev_set_link_down(struct rte_eth_dev *dev)
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'net/txgbe: fix KR auto-negotiation' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (181 preceding siblings ...)
2022-02-21 15:36 ` patch 'net/txgbe: fix link up and down' " Kevin Traynor
@ 2022-02-21 15:36 ` Kevin Traynor
2022-02-21 15:36 ` patch 'examples/ipsec-secgw: fix offload flag used for TSO IPv6' " Kevin Traynor
` (11 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:36 UTC (permalink / raw)
To: Jiawen Wu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/abfad6b59cc47b1365b7c87df4717e349cf7549b
Thanks.
Kevin
---
From abfad6b59cc47b1365b7c87df4717e349cf7549b Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Wed, 9 Feb 2022 18:42:13 +0800
Subject: [PATCH] net/txgbe: fix KR auto-negotiation
[ upstream commit 238170abe7e41c75bbf77897eb84f637fb8936fd ]
Fix failure to enter auto-negotiation mode on some firmware versions for
KR NICs.
Fixes: f611dada1af8 ("net/txgbe: update link setup process of backplane NICs")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/txgbe/base/txgbe_phy.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/txgbe/base/txgbe_phy.c b/drivers/net/txgbe/base/txgbe_phy.c
index 3f5229ecc2..3fb929f37a 100644
--- a/drivers/net/txgbe/base/txgbe_phy.c
+++ b/drivers/net/txgbe/base/txgbe_phy.c
@@ -1456,4 +1456,8 @@ txgbe_set_link_to_kr(struct txgbe_hw *hw, bool autoneg)
wr32_epcs(hw, SR_AN_CTRL, 0);
wr32_epcs(hw, VR_AN_KR_MODE_CL, 0);
+ } else {
+ value = rd32_epcs(hw, TXGBE_PHY_TX_EQ_CTL1);
+ value &= ~(1 << 6);
+ wr32_epcs(hw, TXGBE_PHY_TX_EQ_CTL1, value);
}
if (hw->devarg.present == 1) {
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:48.524799612 +0000
+++ 0184-net-txgbe-fix-KR-auto-negotiation.patch 2022-02-21 15:22:44.363704739 +0000
@@ -1 +1 @@
-From 238170abe7e41c75bbf77897eb84f637fb8936fd Mon Sep 17 00:00:00 2001
+From abfad6b59cc47b1365b7c87df4717e349cf7549b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 238170abe7e41c75bbf77897eb84f637fb8936fd ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'examples/ipsec-secgw: fix offload flag used for TSO IPv6' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (182 preceding siblings ...)
2022-02-21 15:36 ` patch 'net/txgbe: fix KR auto-negotiation' " Kevin Traynor
@ 2022-02-21 15:36 ` Kevin Traynor
2022-02-21 15:36 ` patch 'test/crypto: fix out-of-place SGL in raw datapath' " Kevin Traynor
` (10 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:36 UTC (permalink / raw)
To: Radu Nicolau; +Cc: Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/4d5d4d7abc423cc6e4f79d2b0ea12f455ae8389d
Thanks.
Kevin
---
From 4d5d4d7abc423cc6e4f79d2b0ea12f455ae8389d Mon Sep 17 00:00:00 2001
From: Radu Nicolau <radu.nicolau@intel.com>
Date: Thu, 25 Nov 2021 13:03:54 +0000
Subject: [PATCH] examples/ipsec-secgw: fix offload flag used for TSO IPv6
[ upstream commit dfb0708e1a675fc7b2dd161e50397730507d5cff ]
RTE_MBUF_F_TX_OUTER_IP_CKSUM should not be set for IPv6 packets.
Fixes: a7f32947a316 ("examples/ipsec-secgw: support TCP TSO")
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
examples/ipsec-secgw/ipsec_process.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/examples/ipsec-secgw/ipsec_process.c b/examples/ipsec-secgw/ipsec_process.c
index 3fc4b3a84f..285e9c7f4c 100644
--- a/examples/ipsec-secgw/ipsec_process.c
+++ b/examples/ipsec-secgw/ipsec_process.c
@@ -233,6 +233,8 @@ prep_process_group(void *sa, struct rte_mbuf *mb[], uint32_t cnt)
mb[j]->outer_l2_len = mb[j]->l2_len;
mb[j]->ol_flags |=
- (RTE_MBUF_F_TX_OUTER_IP_CKSUM |
- RTE_MBUF_F_TX_TUNNEL_ESP);
+ RTE_MBUF_F_TX_TUNNEL_ESP;
+ if (RTE_ETH_IS_IPV4_HDR(ptype))
+ mb[j]->ol_flags |=
+ RTE_MBUF_F_TX_OUTER_IP_CKSUM;
}
mb[j]->l4_len = sizeof(struct rte_tcp_hdr);
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:48.544889625 +0000
+++ 0185-examples-ipsec-secgw-fix-offload-flag-used-for-TSO-I.patch 2022-02-21 15:22:44.363704739 +0000
@@ -1 +1 @@
-From dfb0708e1a675fc7b2dd161e50397730507d5cff Mon Sep 17 00:00:00 2001
+From 4d5d4d7abc423cc6e4f79d2b0ea12f455ae8389d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit dfb0708e1a675fc7b2dd161e50397730507d5cff ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'test/crypto: fix out-of-place SGL in raw datapath' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (183 preceding siblings ...)
2022-02-21 15:36 ` patch 'examples/ipsec-secgw: fix offload flag used for TSO IPv6' " Kevin Traynor
@ 2022-02-21 15:36 ` Kevin Traynor
2022-02-21 15:36 ` patch 'crypto/ipsec_mb: fix premature dereference' " Kevin Traynor
` (9 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:36 UTC (permalink / raw)
To: Kai Ji; +Cc: Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/98ece68514f878ca3f59af43e2c9ead871f02d0a
Thanks.
Kevin
---
From 98ece68514f878ca3f59af43e2c9ead871f02d0a Mon Sep 17 00:00:00 2001
From: Kai Ji <kai.ji@intel.com>
Date: Fri, 7 Jan 2022 15:06:04 +0000
Subject: [PATCH] test/crypto: fix out-of-place SGL in raw datapath
[ upstream commit 845ec48ce0640360f5f794428543d00ba5cd5c2d ]
Fix out of place scatter gather list in sym raw datapath unit test.
Fixes: cd8166c28cd1 ("test/crypto: add raw API test for dpaax")
Signed-off-by: Kai Ji <kai.ji@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
app/test/test_cryptodev.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 6c949605b8..16431efc88 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -210,4 +210,5 @@ process_sym_raw_dp_op(uint8_t dev_id, uint16_t qp_id,
struct crypto_unittest_params *ut_params = &unittest_params;
int is_sgl = sop->m_src->nb_segs > 1;
+ int is_oop = 0;
ctx_service_size = rte_cryptodev_get_raw_dp_ctx_size(dev_id);
@@ -248,4 +249,7 @@ process_sym_raw_dp_op(uint8_t dev_id, uint16_t qp_id,
ofs.raw = 0;
+ if ((sop->m_dst != NULL) && (sop->m_dst != sop->m_src))
+ is_oop = 1;
+
if (is_cipher && is_auth) {
cipher_offset = sop->cipher.data.offset;
@@ -278,4 +282,6 @@ process_sym_raw_dp_op(uint8_t dev_id, uint16_t qp_id,
uint32_t remaining_off = auth_offset + auth_len;
struct rte_mbuf *sgl_buf = sop->m_src;
+ if (is_oop)
+ sgl_buf = sop->m_dst;
while (remaining_off >= rte_pktmbuf_data_len(sgl_buf)
@@ -294,5 +300,6 @@ process_sym_raw_dp_op(uint8_t dev_id, uint16_t qp_id,
if ((auth_offset + auth_len < cipher_offset + cipher_len) &&
(digest.iova == auth_end_iova) && is_sgl)
- max_len = RTE_MAX(max_len, auth_offset + auth_len +
+ max_len = RTE_MAX(max_len,
+ auth_offset + auth_len +
ut_params->auth_xform.auth.digest_length);
@@ -357,5 +364,5 @@ process_sym_raw_dp_op(uint8_t dev_id, uint16_t qp_id,
sgl.num = n;
/* Out of place */
- if (sop->m_dst != NULL) {
+ if (is_oop) {
dest_sgl.vec = dest_data_vec;
vec.dest_sgl = &dest_sgl;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:48.563506836 +0000
+++ 0186-test-crypto-fix-out-of-place-SGL-in-raw-datapath.patch 2022-02-21 15:22:44.373704761 +0000
@@ -1 +1 @@
-From 845ec48ce0640360f5f794428543d00ba5cd5c2d Mon Sep 17 00:00:00 2001
+From 98ece68514f878ca3f59af43e2c9ead871f02d0a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 845ec48ce0640360f5f794428543d00ba5cd5c2d ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 8842e19d3d..a63c199964 100644
+index 6c949605b8..16431efc88 100644
@@ -21 +22 @@
-@@ -212,4 +212,5 @@ process_sym_raw_dp_op(uint8_t dev_id, uint16_t qp_id,
+@@ -210,4 +210,5 @@ process_sym_raw_dp_op(uint8_t dev_id, uint16_t qp_id,
@@ -27 +28 @@
-@@ -250,4 +251,7 @@ process_sym_raw_dp_op(uint8_t dev_id, uint16_t qp_id,
+@@ -248,4 +249,7 @@ process_sym_raw_dp_op(uint8_t dev_id, uint16_t qp_id,
@@ -35 +36 @@
-@@ -280,4 +284,6 @@ process_sym_raw_dp_op(uint8_t dev_id, uint16_t qp_id,
+@@ -278,4 +282,6 @@ process_sym_raw_dp_op(uint8_t dev_id, uint16_t qp_id,
@@ -42 +43 @@
-@@ -296,5 +302,6 @@ process_sym_raw_dp_op(uint8_t dev_id, uint16_t qp_id,
+@@ -294,5 +300,6 @@ process_sym_raw_dp_op(uint8_t dev_id, uint16_t qp_id,
@@ -50 +51 @@
-@@ -359,5 +366,5 @@ process_sym_raw_dp_op(uint8_t dev_id, uint16_t qp_id,
+@@ -357,5 +364,5 @@ process_sym_raw_dp_op(uint8_t dev_id, uint16_t qp_id,
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'crypto/ipsec_mb: fix premature dereference' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (184 preceding siblings ...)
2022-02-21 15:36 ` patch 'test/crypto: fix out-of-place SGL in raw datapath' " Kevin Traynor
@ 2022-02-21 15:36 ` Kevin Traynor
2022-02-21 15:36 ` patch 'crypto/ipsec_mb: fix buffer overrun' " Kevin Traynor
` (8 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:36 UTC (permalink / raw)
To: Piotr Bronowski; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/13aab9f4938569a1f9283d74e6bf7acdcad4290b
Thanks.
Kevin
---
From 13aab9f4938569a1f9283d74e6bf7acdcad4290b Mon Sep 17 00:00:00 2001
From: Piotr Bronowski <piotrx.bronowski@intel.com>
Date: Sun, 16 Jan 2022 19:40:43 +0000
Subject: [PATCH] crypto/ipsec_mb: fix premature dereference
[ upstream commit 8c60a04985e7fbee288e780c8d50373d3e1ec678 ]
This patch removes coverity defect CID 374380:
Null pointer dereferences (REVERSE_INULL)
Coverity issue: CID 374380
Fixes: 918fd2f1466b ("crypto/ipsec_mb: move aesni_mb PMD")
Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com>
---
drivers/crypto/ipsec_mb/ipsec_mb_private.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/ipsec_mb/ipsec_mb_private.h b/drivers/crypto/ipsec_mb/ipsec_mb_private.h
index 866722d6f4..e53101acf1 100644
--- a/drivers/crypto/ipsec_mb/ipsec_mb_private.h
+++ b/drivers/crypto/ipsec_mb/ipsec_mb_private.h
@@ -192,6 +192,4 @@ ipsec_mb_parse_xform(const struct rte_crypto_sym_xform *xform,
const struct rte_crypto_sym_xform **aead_xform)
{
- const struct rte_crypto_sym_xform *next = xform->next;
-
if (xform == NULL) {
*mode = IPSEC_MB_OP_NOT_SUPPORTED;
@@ -199,4 +197,6 @@ ipsec_mb_parse_xform(const struct rte_crypto_sym_xform *xform,
}
+ const struct rte_crypto_sym_xform *next = xform->next;
+
if (xform->type == RTE_CRYPTO_SYM_XFORM_CIPHER) {
if (next == NULL) {
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:48.591718834 +0000
+++ 0187-crypto-ipsec_mb-fix-premature-dereference.patch 2022-02-21 15:22:44.374704764 +0000
@@ -1 +1 @@
-From 8c60a04985e7fbee288e780c8d50373d3e1ec678 Mon Sep 17 00:00:00 2001
+From 13aab9f4938569a1f9283d74e6bf7acdcad4290b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8c60a04985e7fbee288e780c8d50373d3e1ec678 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'crypto/ipsec_mb: fix buffer overrun' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (185 preceding siblings ...)
2022-02-21 15:36 ` patch 'crypto/ipsec_mb: fix premature dereference' " Kevin Traynor
@ 2022-02-21 15:36 ` Kevin Traynor
2022-02-21 15:36 ` patch 'crypto/qat: fix GEN4 AEAD job in raw data path' " Kevin Traynor
` (7 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:36 UTC (permalink / raw)
To: Pablo de Lara; +Cc: Ciara Power, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/98ec92641b262818a0df3833050de871efb91acf
Thanks.
Kevin
---
From 98ec92641b262818a0df3833050de871efb91acf Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Thu, 20 Jan 2022 17:04:55 +0000
Subject: [PATCH] crypto/ipsec_mb: fix buffer overrun
[ upstream commit 4582f79c7bd06ff99c0b82b6995c37edda156fea ]
Memory for ZUC cipher/auth key in session had to be expanded to 32 bytes,
instead of 16 bytes, when adding ZUC-256 support.
However, impact is low as this memory is part of a union
with bigger size than 32 bytes.
Coverity issue: 374374
Coverity issue: 374379
Fixes: 8c835018de84 ("crypto/ipsec_mb: support ZUC-256 for aesni_mb")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
---
drivers/crypto/ipsec_mb/pmd_aesni_mb_priv.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/ipsec_mb/pmd_aesni_mb_priv.h b/drivers/crypto/ipsec_mb/pmd_aesni_mb_priv.h
index d37cc787a0..d177961ea5 100644
--- a/drivers/crypto/ipsec_mb/pmd_aesni_mb_priv.h
+++ b/drivers/crypto/ipsec_mb/pmd_aesni_mb_priv.h
@@ -849,5 +849,5 @@ struct aesni_mb_session {
struct gcm_key_data gcm_key;
/* *< Expanded GCM key */
- uint8_t zuc_cipher_key[16];
+ uint8_t zuc_cipher_key[32];
/* *< ZUC cipher key */
snow3g_key_schedule_t pKeySched_snow3g_cipher;
@@ -894,5 +894,5 @@ struct aesni_mb_session {
} cmac;
/* *< Expanded XCBC authentication keys */
- uint8_t zuc_auth_key[16];
+ uint8_t zuc_auth_key[32];
/* *< ZUC authentication key */
snow3g_key_schedule_t pKeySched_snow3g_auth;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:48.610151030 +0000
+++ 0188-crypto-ipsec_mb-fix-buffer-overrun.patch 2022-02-21 15:22:44.374704764 +0000
@@ -1 +1 @@
-From 4582f79c7bd06ff99c0b82b6995c37edda156fea Mon Sep 17 00:00:00 2001
+From 98ec92641b262818a0df3833050de871efb91acf Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4582f79c7bd06ff99c0b82b6995c37edda156fea ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'crypto/qat: fix GEN4 AEAD job in raw data path' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (186 preceding siblings ...)
2022-02-21 15:36 ` patch 'crypto/ipsec_mb: fix buffer overrun' " Kevin Traynor
@ 2022-02-21 15:36 ` Kevin Traynor
2022-02-21 15:36 ` patch 'compress/octeontx: fix null pointer dereference' " Kevin Traynor
` (6 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:36 UTC (permalink / raw)
To: Kai Ji; +Cc: Fan Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/6f9d8df3d1bc4abbf43ab298b4935fd499f11ab8
Thanks.
Kevin
---
From 6f9d8df3d1bc4abbf43ab298b4935fd499f11ab8 Mon Sep 17 00:00:00 2001
From: Kai Ji <kai.ji@intel.com>
Date: Fri, 21 Jan 2022 10:38:30 +0000
Subject: [PATCH] crypto/qat: fix GEN4 AEAD job in raw data path
[ upstream commit 3cb8f5347735eead44945ff5dbbdaf1069475d82 ]
This patch fix the cipher params configuration in AEAD job if
QAT GEN4 unified cipher slice(UCS) enabled.
Fixes: 328d690d2f60 ("crypto/qat: update raw data path")
Signed-off-by: Kai Ji <kai.ji@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
drivers/crypto/qat/qat_sym_hw_dp.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/qat/qat_sym_hw_dp.c b/drivers/crypto/qat/qat_sym_hw_dp.c
index 12825e448b..792ad2b213 100644
--- a/drivers/crypto/qat/qat_sym_hw_dp.c
+++ b/drivers/crypto/qat/qat_sym_hw_dp.c
@@ -534,6 +534,18 @@ enqueue_one_aead_job(struct qat_sym_session *ctx,
if (ctx->is_single_pass) {
enqueue_one_cipher_job(ctx, req, iv, ofs, data_len);
- cipher_param->spc_aad_addr = aad->iova;
- cipher_param->spc_auth_res_addr = digest->iova;
+
+ if (ctx->is_ucs) {
+ /* QAT GEN4 uses single pass to treat AEAD as cipher
+ * operation
+ */
+ struct icp_qat_fw_la_cipher_20_req_params *cipher_param_20 =
+ (void *)&req->serv_specif_rqpars;
+ cipher_param_20->spc_aad_addr = aad->iova;
+ cipher_param_20->spc_auth_res_addr = digest->iova;
+ } else {
+ cipher_param->spc_aad_addr = aad->iova;
+ cipher_param->spc_auth_res_addr = digest->iova;
+ }
+
return;
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:48.629185160 +0000
+++ 0189-crypto-qat-fix-GEN4-AEAD-job-in-raw-data-path.patch 2022-02-21 15:22:44.375704766 +0000
@@ -1 +1 @@
-From 3cb8f5347735eead44945ff5dbbdaf1069475d82 Mon Sep 17 00:00:00 2001
+From 6f9d8df3d1bc4abbf43ab298b4935fd499f11ab8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3cb8f5347735eead44945ff5dbbdaf1069475d82 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'compress/octeontx: fix null pointer dereference' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (187 preceding siblings ...)
2022-02-21 15:36 ` patch 'crypto/qat: fix GEN4 AEAD job in raw data path' " Kevin Traynor
@ 2022-02-21 15:36 ` Kevin Traynor
2022-02-21 15:36 ` patch 'crypto/cnxk: fix update of number of descriptors' " Kevin Traynor
` (5 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:36 UTC (permalink / raw)
To: Weiguo Li; +Cc: Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/2630bff5a411a24e143255b58c570aae7f5370eb
Thanks.
Kevin
---
From 2630bff5a411a24e143255b58c570aae7f5370eb Mon Sep 17 00:00:00 2001
From: Weiguo Li <liwg06@foxmail.com>
Date: Tue, 25 Jan 2022 22:33:15 +0800
Subject: [PATCH] compress/octeontx: fix null pointer dereference
[ upstream commit b072930fb10a0471d69db5de341ea87a0d1561cc ]
Check for memory allocation failure is added to avoid null
pointer dereference.
Fixes: c378f084d6e3 ("compress/octeontx: add device setup ops")
Signed-off-by: Weiguo Li <liwg06@foxmail.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
drivers/compress/octeontx/otx_zip_pmd.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/compress/octeontx/otx_zip_pmd.c b/drivers/compress/octeontx/otx_zip_pmd.c
index dd62285b86..1b6178f661 100644
--- a/drivers/compress/octeontx/otx_zip_pmd.c
+++ b/drivers/compress/octeontx/otx_zip_pmd.c
@@ -393,4 +393,6 @@ zip_pmd_qp_setup(struct rte_compressdev *dev, uint16_t qp_id,
name = rte_malloc(NULL, RTE_COMPRESSDEV_NAME_MAX_LEN, 0);
+ if (name == NULL)
+ return (-ENOMEM);
snprintf(name, RTE_COMPRESSDEV_NAME_MAX_LEN,
"zip_pmd_%u_qp_%u",
@@ -400,6 +402,8 @@ zip_pmd_qp_setup(struct rte_compressdev *dev, uint16_t qp_id,
qp = rte_zmalloc_socket(name, sizeof(*qp),
RTE_CACHE_LINE_SIZE, socket_id);
- if (qp == NULL)
+ if (qp == NULL) {
+ rte_free(name);
return (-ENOMEM);
+ }
qp->name = name;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:48.647994232 +0000
+++ 0190-compress-octeontx-fix-null-pointer-dereference.patch 2022-02-21 15:22:44.375704766 +0000
@@ -1 +1 @@
-From b072930fb10a0471d69db5de341ea87a0d1561cc Mon Sep 17 00:00:00 2001
+From 2630bff5a411a24e143255b58c570aae7f5370eb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b072930fb10a0471d69db5de341ea87a0d1561cc ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 26cdce60a8..f9b8f7a1ec 100644
+index dd62285b86..1b6178f661 100644
@@ -22 +23 @@
-@@ -392,4 +392,6 @@ zip_pmd_qp_setup(struct rte_compressdev *dev, uint16_t qp_id,
+@@ -393,4 +393,6 @@ zip_pmd_qp_setup(struct rte_compressdev *dev, uint16_t qp_id,
@@ -29 +30 @@
-@@ -399,6 +401,8 @@ zip_pmd_qp_setup(struct rte_compressdev *dev, uint16_t qp_id,
+@@ -400,6 +402,8 @@ zip_pmd_qp_setup(struct rte_compressdev *dev, uint16_t qp_id,
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'crypto/cnxk: fix update of number of descriptors' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (188 preceding siblings ...)
2022-02-21 15:36 ` patch 'compress/octeontx: fix null pointer dereference' " Kevin Traynor
@ 2022-02-21 15:36 ` Kevin Traynor
2022-02-21 15:36 ` patch 'crypto/dpaax_sec: fix auth/cipher xform chain checks' " Kevin Traynor
` (4 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:36 UTC (permalink / raw)
To: Anoob Joseph; +Cc: Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/0fd24703c6d04c8a465ca5e41c7c0e48cb8d2cf2
Thanks.
Kevin
---
From 0fd24703c6d04c8a465ca5e41c7c0e48cb8d2cf2 Mon Sep 17 00:00:00 2001
From: Anoob Joseph <anoobj@marvell.com>
Date: Mon, 31 Jan 2022 18:00:29 +0530
Subject: [PATCH] crypto/cnxk: fix update of number of descriptors
[ upstream commit a45f37334b8db6b1f2678e84d6529663e7252219 ]
Pending queue also need to be adjusted while updating the number of
descriptors.
Fixes: a455fd869cd7 ("common/cnxk: align CPT queue depth to power of 2")
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
drivers/common/cnxk/roc_cpt.c | 3 ---
drivers/crypto/cnxk/cnxk_cryptodev_ops.c | 8 ++++++--
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/common/cnxk/roc_cpt.c b/drivers/common/cnxk/roc_cpt.c
index 0e2dc45ad8..6179df2f1f 100644
--- a/drivers/common/cnxk/roc_cpt.c
+++ b/drivers/common/cnxk/roc_cpt.c
@@ -572,7 +572,4 @@ cpt_lf_init(struct roc_cpt_lf *lf)
lf->nb_desc = CPT_LF_DEFAULT_NB_DESC;
- /* Update nb_desc to next power of 2 to aid in pending queue checks */
- lf->nb_desc = plt_align32pow2(lf->nb_desc);
-
/* Allocate memory for instruction queue for CPT LF. */
iq_mem = plt_zmalloc(cpt_lf_iq_mem_calc(lf->nb_desc), ROC_ALIGN);
diff --git a/drivers/crypto/cnxk/cnxk_cryptodev_ops.c b/drivers/crypto/cnxk/cnxk_cryptodev_ops.c
index 21ee09f962..0d99c891d9 100644
--- a/drivers/crypto/cnxk/cnxk_cryptodev_ops.c
+++ b/drivers/crypto/cnxk/cnxk_cryptodev_ops.c
@@ -362,4 +362,5 @@ cnxk_cpt_queue_pair_setup(struct rte_cryptodev *dev, uint16_t qp_id,
struct rte_pci_device *pci_dev;
struct cnxk_cpt_qp *qp;
+ uint32_t nb_desc;
int ret;
@@ -374,5 +375,8 @@ cnxk_cpt_queue_pair_setup(struct rte_cryptodev *dev, uint16_t qp_id,
}
- qp = cnxk_cpt_qp_create(dev, qp_id, conf->nb_descriptors);
+ /* Update nb_desc to next power of 2 to aid in pending queue checks */
+ nb_desc = plt_align32pow2(conf->nb_descriptors);
+
+ qp = cnxk_cpt_qp_create(dev, qp_id, nb_desc);
if (qp == NULL) {
plt_err("Could not create queue pair %d", qp_id);
@@ -381,5 +385,5 @@ cnxk_cpt_queue_pair_setup(struct rte_cryptodev *dev, uint16_t qp_id,
qp->lf.lf_id = qp_id;
- qp->lf.nb_desc = conf->nb_descriptors;
+ qp->lf.nb_desc = nb_desc;
ret = roc_cpt_lf_init(roc_cpt, &qp->lf);
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:48.666331963 +0000
+++ 0191-crypto-cnxk-fix-update-of-number-of-descriptors.patch 2022-02-21 15:22:44.376704768 +0000
@@ -1 +1 @@
-From a45f37334b8db6b1f2678e84d6529663e7252219 Mon Sep 17 00:00:00 2001
+From 0fd24703c6d04c8a465ca5e41c7c0e48cb8d2cf2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a45f37334b8db6b1f2678e84d6529663e7252219 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 89877d1b28..b3a3649fff 100644
+index 0e2dc45ad8..6179df2f1f 100644
@@ -32 +33 @@
-index 67a2d9b08e..a5fb68da02 100644
+index 21ee09f962..0d99c891d9 100644
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'crypto/dpaax_sec: fix auth/cipher xform chain checks' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (189 preceding siblings ...)
2022-02-21 15:36 ` patch 'crypto/cnxk: fix update of number of descriptors' " Kevin Traynor
@ 2022-02-21 15:36 ` Kevin Traynor
2022-02-21 15:36 ` patch 'raw/ntb: clear all valid doorbell bits on init' " Kevin Traynor
` (3 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:36 UTC (permalink / raw)
To: Hemant Agrawal; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/0627e93c26d18553a9e19816aa965c2606278c96
Thanks.
Kevin
---
From 0627e93c26d18553a9e19816aa965c2606278c96 Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Thu, 10 Feb 2022 16:28:50 +0530
Subject: [PATCH] crypto/dpaax_sec: fix auth/cipher xform chain checks
[ upstream commit 99cc26f6652caa2c779fd169cadd62a1c365d52f ]
This patch add more checks on next type for PDCP cases.
Fixes: 45e019608f31 ("crypto/dpaa2_sec: support integrity only PDCP")
Fixes: a1173d55598c ("crypto/dpaa_sec: support PDCP offload")
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 6 ++++--
drivers/crypto/dpaa_sec/dpaa_sec.c | 6 ++++--
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index a5b052375d..5b5c4f3639 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -3139,5 +3139,6 @@ dpaa2_sec_set_pdcp_session(struct rte_cryptodev *dev,
if (xform->type == RTE_CRYPTO_SYM_XFORM_CIPHER) {
cipher_xform = &xform->cipher;
- if (xform->next != NULL) {
+ if (xform->next != NULL &&
+ xform->next->type == RTE_CRYPTO_SYM_XFORM_AUTH) {
session->ext_params.aead_ctxt.auth_cipher_text = true;
auth_xform = &xform->next->auth;
@@ -3145,5 +3146,6 @@ dpaa2_sec_set_pdcp_session(struct rte_cryptodev *dev,
} else if (xform->type == RTE_CRYPTO_SYM_XFORM_AUTH) {
auth_xform = &xform->auth;
- if (xform->next != NULL) {
+ if (xform->next != NULL &&
+ xform->next->type == RTE_CRYPTO_SYM_XFORM_CIPHER) {
session->ext_params.aead_ctxt.auth_cipher_text = false;
cipher_xform = &xform->next->cipher;
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index f20acdd123..98bc495c35 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -2987,9 +2987,11 @@ dpaa_sec_set_pdcp_session(struct rte_cryptodev *dev,
if (xform->type == RTE_CRYPTO_SYM_XFORM_CIPHER) {
cipher_xform = &xform->cipher;
- if (xform->next != NULL)
+ if (xform->next != NULL &&
+ xform->next->type == RTE_CRYPTO_SYM_XFORM_AUTH)
auth_xform = &xform->next->auth;
} else if (xform->type == RTE_CRYPTO_SYM_XFORM_AUTH) {
auth_xform = &xform->auth;
- if (xform->next != NULL)
+ if (xform->next != NULL &&
+ xform->next->type == RTE_CRYPTO_SYM_XFORM_CIPHER)
cipher_xform = &xform->next->cipher;
} else {
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:48.782731023 +0000
+++ 0192-crypto-dpaax_sec-fix-auth-cipher-xform-chain-checks.patch 2022-02-21 15:22:44.381704779 +0000
@@ -1 +1 @@
-From 99cc26f6652caa2c779fd169cadd62a1c365d52f Mon Sep 17 00:00:00 2001
+From 0627e93c26d18553a9e19816aa965c2606278c96 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 99cc26f6652caa2c779fd169cadd62a1c365d52f ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 444e1f0043..cb8aaf6446 100644
+index a5b052375d..5b5c4f3639 100644
@@ -22 +23 @@
-@@ -3232,5 +3232,6 @@ dpaa2_sec_set_pdcp_session(struct rte_cryptodev *dev,
+@@ -3139,5 +3139,6 @@ dpaa2_sec_set_pdcp_session(struct rte_cryptodev *dev,
@@ -30 +31 @@
-@@ -3238,5 +3239,6 @@ dpaa2_sec_set_pdcp_session(struct rte_cryptodev *dev,
+@@ -3145,5 +3146,6 @@ dpaa2_sec_set_pdcp_session(struct rte_cryptodev *dev,
@@ -39 +40 @@
-index 1137b142e9..75e437f696 100644
+index f20acdd123..98bc495c35 100644
@@ -42 +43 @@
-@@ -2985,9 +2985,11 @@ dpaa_sec_set_pdcp_session(struct rte_cryptodev *dev,
+@@ -2987,9 +2987,11 @@ dpaa_sec_set_pdcp_session(struct rte_cryptodev *dev,
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'raw/ntb: clear all valid doorbell bits on init' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (190 preceding siblings ...)
2022-02-21 15:36 ` patch 'crypto/dpaax_sec: fix auth/cipher xform chain checks' " Kevin Traynor
@ 2022-02-21 15:36 ` Kevin Traynor
2022-02-21 15:36 ` patch 'pipeline: fix annotation checks' " Kevin Traynor
` (2 subsequent siblings)
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:36 UTC (permalink / raw)
To: Junfeng Guo; +Cc: Jingjing Wu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/13ddcf9dee6d72e6b61529c8254a717a01e086bb
Thanks.
Kevin
---
From 13ddcf9dee6d72e6b61529c8254a717a01e086bb Mon Sep 17 00:00:00 2001
From: Junfeng Guo <junfeng.guo@intel.com>
Date: Thu, 10 Feb 2022 15:06:34 +0800
Subject: [PATCH] raw/ntb: clear all valid doorbell bits on init
[ upstream commit 3bc814fc555d8c7d1c7c63e1e831e9c34679837f ]
Before registering the doorbell interrupt handler callback function,
all the valid doorbell bits within the NTB private data struct should
be cleared to avoid the confusion of the handshake timing sequence
diagram when setting up the NTB connection in back-to-back mode.
Fixes: 62012a76811e ("raw/ntb: add handshake process")
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
---
drivers/raw/ntb/ntb.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/raw/ntb/ntb.c b/drivers/raw/ntb/ntb.c
index 46ac02e5ab..f5e773c53b 100644
--- a/drivers/raw/ntb/ntb.c
+++ b/drivers/raw/ntb/ntb.c
@@ -1399,4 +1399,8 @@ ntb_init_hw(struct rte_rawdev *dev, struct rte_pci_device *pci_dev)
/* Init doorbell. */
hw->db_valid_mask = RTE_LEN2MASK(hw->db_cnt, uint64_t);
+ /* Clear all valid doorbell bits before registering intr handler */
+ if (hw->ntb_ops->db_clear == NULL)
+ return -ENOTSUP;
+ (*hw->ntb_ops->db_clear)(dev, hw->db_valid_mask);
intr_handle = pci_dev->intr_handle;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:48.828802136 +0000
+++ 0193-raw-ntb-clear-all-valid-doorbell-bits-on-init.patch 2022-02-21 15:22:44.382704782 +0000
@@ -1 +1 @@
-From 3bc814fc555d8c7d1c7c63e1e831e9c34679837f Mon Sep 17 00:00:00 2001
+From 13ddcf9dee6d72e6b61529c8254a717a01e086bb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3bc814fc555d8c7d1c7c63e1e831e9c34679837f ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'pipeline: fix annotation checks' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (191 preceding siblings ...)
2022-02-21 15:36 ` patch 'raw/ntb: clear all valid doorbell bits on init' " Kevin Traynor
@ 2022-02-21 15:36 ` Kevin Traynor
2022-02-21 15:36 ` patch 'pipeline: fix table state memory allocation' " Kevin Traynor
2022-02-21 15:36 ` patch 'eventdev/eth_tx: fix queue add error code' " Kevin Traynor
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:36 UTC (permalink / raw)
To: Cristian Dumitrescu; +Cc: Yogesh Jangra, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/1e8aa23aba7140b1e5425cadc6e35b58fa9d4b93
Thanks.
Kevin
---
From 1e8aa23aba7140b1e5425cadc6e35b58fa9d4b93 Mon Sep 17 00:00:00 2001
From: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Date: Fri, 3 Dec 2021 14:31:04 +0000
Subject: [PATCH] pipeline: fix annotation checks
[ upstream commit 8f8f6c14489ff78c6a4050a5001413b96ca32554 ]
The checks for the table-only and default-only annotations were
incorrect, as they were using the pipeline action ID instead of the
table action ID for retrieving the table action info. These checks are
now corrected and pushed into the internal table_entry_check()
function.
Fixes: cd79e0205824 ("pipeline: support action annotations")
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Yogesh Jangra <yogesh.jangra@intel.com>
---
lib/pipeline/rte_swx_ctl.c | 24 ++++++++++++++++++------
1 file changed, 18 insertions(+), 6 deletions(-)
diff --git a/lib/pipeline/rte_swx_ctl.c b/lib/pipeline/rte_swx_ctl.c
index 1c908e3e3f..8e29d58cec 100644
--- a/lib/pipeline/rte_swx_ctl.c
+++ b/lib/pipeline/rte_swx_ctl.c
@@ -373,10 +373,14 @@ table_entry_check(struct rte_swx_ctl_pipeline *ctl,
if (data_check) {
struct action *a;
+ struct rte_swx_ctl_table_action_info *tai;
uint32_t i;
/* action_id. */
- for (i = 0; i < table->info.n_actions; i++)
- if (entry->action_id == table->actions[i].action_id)
+ for (i = 0; i < table->info.n_actions; i++) {
+ tai = &table->actions[i];
+
+ if (entry->action_id == tai->action_id)
break;
+ }
CHECK(i < table->info.n_actions, EINVAL);
@@ -385,4 +389,16 @@ table_entry_check(struct rte_swx_ctl_pipeline *ctl,
a = &ctl->actions[entry->action_id];
CHECK(!(a->data_size && !entry->action_data), EINVAL);
+
+ /* When both key_check and data_check are true, we are interested in both the entry
+ * key and data, which means the operation is _regular_ table entry add.
+ */
+ if (key_check && !tai->action_is_for_table_entries)
+ return -EINVAL;
+
+ /* When key_check is false while data_check is true, we are only interested in the
+ * entry data, which means the operation is _default_ table entry add.
+ */
+ if (!key_check && !tai->action_is_for_default_entry)
+ return -EINVAL;
}
@@ -1447,6 +1463,4 @@ rte_swx_ctl_pipeline_table_entry_add(struct rte_swx_ctl_pipeline *ctl,
CHECK(!table_entry_check(ctl, table_id, entry, 1, 1), EINVAL);
- CHECK(table->actions[entry->action_id].action_is_for_table_entries, EINVAL);
-
new_entry = table_entry_duplicate(ctl, table_id, entry, 1, 1);
CHECK(new_entry, ENOMEM);
@@ -1654,6 +1668,4 @@ rte_swx_ctl_pipeline_table_default_entry_add(struct rte_swx_ctl_pipeline *ctl,
CHECK(!table_entry_check(ctl, table_id, entry, 0, 1), EINVAL);
- CHECK(table->actions[entry->action_id].action_is_for_default_entry, EINVAL);
-
new_entry = table_entry_duplicate(ctl, table_id, entry, 0, 1);
CHECK(new_entry, ENOMEM);
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:48.856202905 +0000
+++ 0194-pipeline-fix-annotation-checks.patch 2022-02-21 15:22:44.383704784 +0000
@@ -1 +1 @@
-From 8f8f6c14489ff78c6a4050a5001413b96ca32554 Mon Sep 17 00:00:00 2001
+From 1e8aa23aba7140b1e5425cadc6e35b58fa9d4b93 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8f8f6c14489ff78c6a4050a5001413b96ca32554 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'pipeline: fix table state memory allocation' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (192 preceding siblings ...)
2022-02-21 15:36 ` patch 'pipeline: fix annotation checks' " Kevin Traynor
@ 2022-02-21 15:36 ` Kevin Traynor
2022-02-21 15:36 ` patch 'eventdev/eth_tx: fix queue add error code' " Kevin Traynor
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:36 UTC (permalink / raw)
To: Cristian Dumitrescu
Cc: Harshad Narayane, Kamalakannan R, Venkata Suresh Kumar P, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/adfebc59b50ee65e2f0d4a75574ac3bc62e46317
Thanks.
Kevin
---
From adfebc59b50ee65e2f0d4a75574ac3bc62e46317 Mon Sep 17 00:00:00 2001
From: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Date: Thu, 10 Feb 2022 19:45:08 +0000
Subject: [PATCH] pipeline: fix table state memory allocation
[ upstream commit eb3e2c11830e4d75ff5dff20cfa70599a1613f71 ]
The regular tables, selector tables and learner tables are all sharing
the table state array. The locations in this array were computed
incorrectly, leading to memory corruption issues.
Fixes: 4f59d3726147 ("pipeline: support learner tables")
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Harshad Narayane <harshad.suresh.narayane@intel.com>
Signed-off-by: Kamalakannan R <kamalakannan.r@intel.com>
Signed-off-by: Venkata Suresh Kumar P <venkata.suresh.kumar.p@intel.com>
---
lib/pipeline/rte_swx_ctl.c | 28 +++++++++++++++++-----------
lib/pipeline/rte_swx_pipeline.c | 2 +-
2 files changed, 18 insertions(+), 12 deletions(-)
diff --git a/lib/pipeline/rte_swx_ctl.c b/lib/pipeline/rte_swx_ctl.c
index 8e29d58cec..f52ccffd75 100644
--- a/lib/pipeline/rte_swx_ctl.c
+++ b/lib/pipeline/rte_swx_ctl.c
@@ -1022,5 +1022,5 @@ static void
table_state_free(struct rte_swx_ctl_pipeline *ctl)
{
- uint32_t i;
+ uint32_t table_base_index, selector_base_index, learner_base_index, i;
if (!ctl->ts_next)
@@ -1028,7 +1028,8 @@ table_state_free(struct rte_swx_ctl_pipeline *ctl)
/* For each table, free its table state. */
+ table_base_index = 0;
for (i = 0; i < ctl->info.n_tables; i++) {
struct table *table = &ctl->tables[i];
- struct rte_swx_table_state *ts = &ctl->ts_next[i];
+ struct rte_swx_table_state *ts = &ctl->ts_next[table_base_index + i];
/* Default action data. */
@@ -1041,6 +1042,7 @@ table_state_free(struct rte_swx_ctl_pipeline *ctl)
/* For each selector table, free its table state. */
+ selector_base_index = ctl->info.n_tables;
for (i = 0; i < ctl->info.n_selectors; i++) {
- struct rte_swx_table_state *ts = &ctl->ts_next[i];
+ struct rte_swx_table_state *ts = &ctl->ts_next[selector_base_index + i];
/* Table object. */
@@ -1050,6 +1052,7 @@ table_state_free(struct rte_swx_ctl_pipeline *ctl)
/* For each learner table, free its table state. */
+ learner_base_index = ctl->info.n_tables + ctl->info.n_selectors;
for (i = 0; i < ctl->info.n_learners; i++) {
- struct rte_swx_table_state *ts = &ctl->ts_next[i];
+ struct rte_swx_table_state *ts = &ctl->ts_next[learner_base_index + i];
/* Default action data. */
@@ -1064,8 +1067,8 @@ static int
table_state_create(struct rte_swx_ctl_pipeline *ctl)
{
+ uint32_t table_base_index, selector_base_index, learner_base_index, i;
int status = 0;
- uint32_t i;
- ctl->ts_next = calloc(ctl->info.n_tables + ctl->info.n_selectors,
+ ctl->ts_next = calloc(ctl->info.n_tables + ctl->info.n_selectors + ctl->info.n_learners,
sizeof(struct rte_swx_table_state));
if (!ctl->ts_next) {
@@ -1075,8 +1078,9 @@ table_state_create(struct rte_swx_ctl_pipeline *ctl)
/* Tables. */
+ table_base_index = 0;
for (i = 0; i < ctl->info.n_tables; i++) {
struct table *table = &ctl->tables[i];
- struct rte_swx_table_state *ts = &ctl->ts[i];
- struct rte_swx_table_state *ts_next = &ctl->ts_next[i];
+ struct rte_swx_table_state *ts = &ctl->ts[table_base_index + i];
+ struct rte_swx_table_state *ts_next = &ctl->ts_next[table_base_index + i];
/* Table object. */
@@ -1111,7 +1115,8 @@ table_state_create(struct rte_swx_ctl_pipeline *ctl)
/* Selector tables. */
+ selector_base_index = ctl->info.n_tables;
for (i = 0; i < ctl->info.n_selectors; i++) {
struct selector *s = &ctl->selectors[i];
- struct rte_swx_table_state *ts_next = &ctl->ts_next[ctl->info.n_tables + i];
+ struct rte_swx_table_state *ts_next = &ctl->ts_next[selector_base_index + i];
/* Table object. */
@@ -1124,8 +1129,9 @@ table_state_create(struct rte_swx_ctl_pipeline *ctl)
/* Learner tables. */
+ learner_base_index = ctl->info.n_tables + ctl->info.n_selectors;
for (i = 0; i < ctl->info.n_learners; i++) {
struct learner *l = &ctl->learners[i];
- struct rte_swx_table_state *ts = &ctl->ts[i];
- struct rte_swx_table_state *ts_next = &ctl->ts_next[i];
+ struct rte_swx_table_state *ts = &ctl->ts[learner_base_index + i];
+ struct rte_swx_table_state *ts_next = &ctl->ts_next[learner_base_index + i];
/* Table object: duplicate from the current table state. */
diff --git a/lib/pipeline/rte_swx_pipeline.c b/lib/pipeline/rte_swx_pipeline.c
index 2145ca0a42..8d5073cf19 100644
--- a/lib/pipeline/rte_swx_pipeline.c
+++ b/lib/pipeline/rte_swx_pipeline.c
@@ -8532,5 +8532,5 @@ table_state_build(struct rte_swx_pipeline *p)
struct learner *l;
- p->table_state = calloc(p->n_tables + p->n_selectors,
+ p->table_state = calloc(p->n_tables + p->n_selectors + p->n_learners,
sizeof(struct rte_swx_table_state));
CHECK(p->table_state, ENOMEM);
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:48.884407351 +0000
+++ 0195-pipeline-fix-table-state-memory-allocation.patch 2022-02-21 15:22:44.391704802 +0000
@@ -1 +1 @@
-From eb3e2c11830e4d75ff5dff20cfa70599a1613f71 Mon Sep 17 00:00:00 2001
+From adfebc59b50ee65e2f0d4a75574ac3bc62e46317 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit eb3e2c11830e4d75ff5dff20cfa70599a1613f71 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -107 +108 @@
-index 1a50c4bb72..f404ff1596 100644
+index 2145ca0a42..8d5073cf19 100644
@@ -110 +111 @@
-@@ -8568,5 +8568,5 @@ table_state_build(struct rte_swx_pipeline *p)
+@@ -8532,5 +8532,5 @@ table_state_build(struct rte_swx_pipeline *p)
^ permalink raw reply [flat|nested] 195+ messages in thread
* patch 'eventdev/eth_tx: fix queue add error code' has been queued to stable release 21.11.1
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
` (193 preceding siblings ...)
2022-02-21 15:36 ` patch 'pipeline: fix table state memory allocation' " Kevin Traynor
@ 2022-02-21 15:36 ` Kevin Traynor
194 siblings, 0 replies; 195+ messages in thread
From: Kevin Traynor @ 2022-02-21 15:36 UTC (permalink / raw)
To: Naga Harish K S V; +Cc: Jay Jayatheerthan, dpdk stable
Hi,
FYI, your patch has been queued to stable release 21.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/692ae335d6040a91682057543a927903f57d0fb4
Thanks.
Kevin
---
From 692ae335d6040a91682057543a927903f57d0fb4 Mon Sep 17 00:00:00 2001
From: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Date: Tue, 8 Feb 2022 23:31:51 -0600
Subject: [PATCH] eventdev/eth_tx: fix queue add error code
[ upstream commit bd0a32d14b87661c39130d73ab4323247b80f864 ]
The internal function txa_service_queue_add() is returning 0
in case of error, correct this logic to return a negative value
to indicate failure.
Fixes: a3bbf2e09756 ("eventdev: add eth Tx adapter implementation")
Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com>
---
lib/eventdev/rte_event_eth_tx_adapter.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/lib/eventdev/rte_event_eth_tx_adapter.c b/lib/eventdev/rte_event_eth_tx_adapter.c
index c17f33f098..1b304f0a73 100644
--- a/lib/eventdev/rte_event_eth_tx_adapter.c
+++ b/lib/eventdev/rte_event_eth_tx_adapter.c
@@ -807,8 +807,6 @@ txa_service_queue_add(uint8_t id,
rte_spinlock_lock(&txa->tx_lock);
- if (txa_service_is_queue_added(txa, eth_dev, tx_queue_id)) {
- rte_spinlock_unlock(&txa->tx_lock);
- return 0;
- }
+ if (txa_service_is_queue_added(txa, eth_dev, tx_queue_id))
+ goto ret_unlock;
ret = txa_service_queue_array_alloc(txa, eth_dev->data->port_id);
@@ -822,4 +820,6 @@ txa_service_queue_add(uint8_t id,
tdi = &txa->txa_ethdev[eth_dev->data->port_id];
tqi = txa_service_queue(txa, eth_dev->data->port_id, tx_queue_id);
+ if (tqi == NULL)
+ goto err_unlock;
txa_retry = &tqi->txa_retry;
@@ -837,4 +837,8 @@ txa_service_queue_add(uint8_t id,
txa->nb_queues++;
+ret_unlock:
+ rte_spinlock_unlock(&txa->tx_lock);
+ return 0;
+
err_unlock:
if (txa->nb_queues == 0) {
@@ -845,5 +849,5 @@ err_unlock:
rte_spinlock_unlock(&txa->tx_lock);
- return 0;
+ return -1;
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-21 15:22:48.921050971 +0000
+++ 0196-eventdev-eth_tx-fix-queue-add-error-code.patch 2022-02-21 15:22:44.391704802 +0000
@@ -1 +1 @@
-From bd0a32d14b87661c39130d73ab4323247b80f864 Mon Sep 17 00:00:00 2001
+From 692ae335d6040a91682057543a927903f57d0fb4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bd0a32d14b87661c39130d73ab4323247b80f864 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 195+ messages in thread
end of thread, other threads:[~2022-02-21 15:43 UTC | newest]
Thread overview: 195+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20220221153625.152324-1-ktraynor@redhat.com>
2022-02-21 15:33 ` patch 'doc: replace deprecated distutils version parsing' has been queued to stable release 21.11.1 Kevin Traynor
2022-02-21 15:33 ` patch 'maintainers: update for stable branches' " Kevin Traynor
2022-02-21 15:33 ` patch 'buildtools: fix AVX512 check for Python 3.5' " Kevin Traynor
2022-02-21 15:33 ` patch 'doc: remove dependency on findutils on FreeBSD' " Kevin Traynor
2022-02-21 15:33 ` patch 'bus/ifpga: remove useless check while browsing devices' " Kevin Traynor
2022-02-21 15:33 ` patch 'dma/idxd: fix burst capacity calculation' " Kevin Traynor
2022-02-21 15:33 ` patch 'dma/idxd: fix paths to driver sysfs directory' " Kevin Traynor
2022-02-21 15:33 ` patch 'dma/idxd: fix wrap-around in burst capacity calculation' " Kevin Traynor
2022-02-21 15:33 ` patch 'gpu/cuda: fix memory list cleanup' " Kevin Traynor
2022-02-21 15:33 ` patch 'config: add arch define for Arm' " Kevin Traynor
2022-02-21 15:33 ` patch 'eal/linux: log hugepage create errors with filename' " Kevin Traynor
2022-02-21 15:33 ` patch 'doc: fix dlb2 guide' " Kevin Traynor
2022-02-21 15:33 ` patch 'eventdev/eth_rx: fix missing internal port checks' " Kevin Traynor
2022-02-21 15:33 ` patch 'examples/l3fwd: fix Rx burst size for event mode' " Kevin Traynor
2022-02-21 15:33 ` patch 'event/cnxk: fix QoS devargs parsing' " Kevin Traynor
2022-02-21 15:33 ` patch 'common/cnxk: add workaround for vWQE flush' " Kevin Traynor
2022-02-21 15:33 ` patch 'common/cnxk: fix reset of fields' " Kevin Traynor
2022-02-21 15:33 ` patch 'crypto/cnxk: enable allocated queues only' " Kevin Traynor
2022-02-21 15:33 ` patch 'crypto/cnxk: fix inflight count calculation' " Kevin Traynor
2022-02-21 15:33 ` patch 'crypto/cnxk: fix extend tail " Kevin Traynor
2022-02-21 15:33 ` patch 'crypto/ipsec_mb: fix queue setup null pointer dereference' " Kevin Traynor
2022-02-21 15:33 ` patch 'crypto/ipsec_mb: fix queue cleanup " Kevin Traynor
2022-02-21 15:33 ` patch 'crypto/ipsec_mb: fix tainted data for session' " Kevin Traynor
2022-02-21 15:33 ` patch 'examples/ipsec-secgw: fix eventdev start sequence' " Kevin Traynor
2022-02-21 15:33 ` patch 'examples/ipsec-secgw: fix default flow rule creation' " Kevin Traynor
2022-02-21 15:33 ` patch 'devtools: fix comment detection in forbidden token check' " Kevin Traynor
2022-02-21 15:33 ` patch 'dma/cnxk: fix installing internal headers' " Kevin Traynor
2022-02-21 15:33 ` patch 'net/mlx5: fix modify field MAC address offset' " Kevin Traynor
2022-02-21 15:33 ` patch 'common/mlx5: add minimum WQE size for striding RQ' " Kevin Traynor
2022-02-21 15:33 ` patch 'net/mlx5: improve stride parameter names' " Kevin Traynor
2022-02-21 15:33 ` patch 'net/mlx5: fix MPRQ stride devargs adjustment' " Kevin Traynor
2022-02-21 15:33 ` patch 'common/cnxk: fix nibble parsing order when dumping MCAM' " Kevin Traynor
2022-02-21 15:33 ` patch 'net/qede: fix redundant condition in debug code' " Kevin Traynor
2022-02-21 15:33 ` patch 'net/ice: fix pattern check for flow director parser' " Kevin Traynor
2022-02-21 15:33 ` patch 'net/ice: fix Tx checksum offload capability' " Kevin Traynor
2022-02-21 15:33 ` patch 'net/iavf: remove git residue symbol' " Kevin Traynor
2022-02-21 15:33 ` patch 'net/ice: track DCF state of PF' " Kevin Traynor
2022-02-21 15:33 ` patch 'net/ice: fix Tx checksum offload' " Kevin Traynor
2022-02-21 15:33 ` patch 'net/ixgbe: add vector Rx parameter check' " Kevin Traynor
2022-02-21 15:33 ` patch 'common/mlx5: fix error handling in multi-class probe' " Kevin Traynor
2022-02-21 15:33 ` patch 'net/mlx5: fix memory socket selection in ASO management' " Kevin Traynor
2022-02-21 15:33 ` patch 'common/mlx5: fix missing validation in devargs parsing' " Kevin Traynor
2022-02-21 15:33 ` patch 'net/mlx5: fix assertion on flags set in packet mbuf' " Kevin Traynor
2022-02-21 15:33 ` patch 'net/mlx5: fix RSS expansion with explicit next protocol' " Kevin Traynor
2022-02-21 15:33 ` patch 'net/mlx5: fix GRE protocol type translation for Verbs' " Kevin Traynor
2022-02-21 15:33 ` patch 'net/mlx5: fix GCC uninitialized variable warning' " Kevin Traynor
2022-02-21 15:33 ` patch 'net/mlx5: relax headroom assertion' " Kevin Traynor
2022-02-21 15:33 ` patch 'net/bnxt: fix xstats names query overrun' " Kevin Traynor
2022-02-21 15:33 ` patch 'net/bnxt: fix multicast address set' " Kevin Traynor
2022-02-21 15:34 ` patch 'net/bnxt: fix multicast MAC restore during reset recovery' " Kevin Traynor
2022-02-21 15:34 ` patch 'net/bnxt: fix queue stop operation' " Kevin Traynor
2022-02-21 15:34 ` patch 'net/bnxt: restore RSS configuration after reset recovery' " Kevin Traynor
2022-02-21 15:34 ` patch 'net/bnxt: fix restoring VLAN filtering after " Kevin Traynor
2022-02-21 15:34 ` patch 'net/bnxt: cap maximum number of unicast MAC addresses' " Kevin Traynor
2022-02-21 15:34 ` patch 'net/bnxt: set fast-path pointers only if recovery succeeds' " Kevin Traynor
2022-02-21 15:34 ` patch 'net/bnxt: add null check for mark table' " Kevin Traynor
2022-02-21 15:34 ` patch 'net/bnxt: fix flow create when RSS is disabled' " Kevin Traynor
2022-02-21 15:34 ` patch 'net/bnxt: get maximum supported multicast filters count' " Kevin Traynor
2022-02-21 15:34 ` patch 'net/bnxt: fix handling of VF configuration change' " Kevin Traynor
2022-02-21 15:34 ` patch 'net/bnxt: fix ring teardown' " Kevin Traynor
2022-02-21 15:34 ` patch 'net/bnxt: fix PAM4 mask setting' " Kevin Traynor
2022-02-21 15:34 ` patch 'net/bnxt: fix crash by validating pointer' " Kevin Traynor
2022-02-21 15:34 ` patch 'net/bnxt: fix xstats query' " Kevin Traynor
2022-02-21 15:34 ` patch 'net/bnxt: check VF representor pointer before access' " Kevin Traynor
2022-02-21 15:34 ` patch 'net/cnxk: fix promiscuous mode in multicast enable flow' " Kevin Traynor
2022-02-21 15:34 ` patch 'net/bonding: fix offloading configuration' " Kevin Traynor
2022-02-21 15:34 ` patch 'app/testpmd: fix Tx scheduling interval' " Kevin Traynor
2022-02-21 15:34 ` patch 'net/axgbe: use PCI root complex device to distinguish device' " Kevin Traynor
2022-02-21 15:34 ` patch 'net/af_xdp: fix build with -Wunused-function' " Kevin Traynor
2022-02-21 15:34 ` patch 'net/bonding: fix mode type mismatch' " Kevin Traynor
2022-02-21 15:34 ` patch 'app/testpmd: fix dereference before null check' " Kevin Traynor
2022-02-21 15:34 ` patch 'app/testpmd: fix external buffer allocation' " Kevin Traynor
2022-02-21 15:34 ` patch 'net/cxgbe: fix dangling pointer by mailbox access rework' " Kevin Traynor
2022-02-21 15:34 ` patch 'net/dpaa2: fix unregistering interrupt handler' " Kevin Traynor
2022-02-21 15:34 ` patch 'net/dpaa2: fix timestamping for IEEE1588' " Kevin Traynor
2022-02-21 15:34 ` patch 'net/bnxt: restore dependency on kernel modules' " Kevin Traynor
2022-02-21 15:34 ` patch 'net/mlx5: fix maximum packet headers size for TSO' " Kevin Traynor
2022-02-21 15:34 ` patch 'net/mlx5: fix MPRQ WQE size assertion' " Kevin Traynor
2022-02-21 15:34 ` patch 'net/nfp: remove duplicated check when setting MAC address' " Kevin Traynor
2022-02-21 15:34 ` patch 'net/nfp: remove useless range checks' " Kevin Traynor
2022-02-21 15:34 ` patch 'common/cnxk: fix shift offset for TL3 length disable' " Kevin Traynor
2022-02-21 15:34 ` patch 'common/cnxk: fix byte order of frag sizes and infos' " Kevin Traynor
2022-02-21 15:34 ` patch 'common/cnxk: reset stale values on error debug registers' " Kevin Traynor
2022-02-21 15:34 ` patch 'common/cnxk: always use single interrupt ID with NIX' " Kevin Traynor
2022-02-21 15:34 ` patch 'common/cnxk: fix null pointer dereferences' " Kevin Traynor
2022-02-21 15:34 ` patch 'common/cnxk: fix uninitialized variables' " Kevin Traynor
2022-02-21 15:34 ` patch 'common/cnxk: fix error checking' " Kevin Traynor
2022-02-21 15:34 ` patch 'ethdev: fix Rx queue telemetry memory leak on failure' " Kevin Traynor
2022-02-21 15:34 ` patch 'net/sfc: validate queue span when parsing flow action RSS' " Kevin Traynor
2022-02-21 15:34 ` patch 'raw/ifpga/base: fix SPI transaction' " Kevin Traynor
2022-02-21 15:34 ` patch 'net/ice: fix mbuf offload flag for Rx timestamp' " Kevin Traynor
2022-02-21 15:34 ` patch 'net/ice: fix link up when starting device' " Kevin Traynor
2022-02-21 15:34 ` patch 'raw/ifpga: fix thread closing' " Kevin Traynor
2022-02-21 15:34 ` patch 'net/bnxt: fix check for autoneg enablement' " Kevin Traynor
2022-02-21 15:34 ` patch 'net/bnxt: handle ring cleanup in case of error' " Kevin Traynor
2022-02-21 15:34 ` patch 'net/bnxt: fix memzone allocation per VNIC' " Kevin Traynor
2022-02-21 15:34 ` patch 'net/bnxt: fix VF resource allocation strategy' " Kevin Traynor
2022-02-21 15:34 ` patch 'raw/ifpga/base: fix port feature ID' " Kevin Traynor
2022-02-21 15:34 ` patch 'net/memif: remove unnecessary Rx interrupt stub' " Kevin Traynor
2022-02-21 15:34 ` patch 'net/hns3: fix Rx/Tx functions update' " Kevin Traynor
2022-02-21 15:34 ` patch 'net/hns3: fix mailbox wait time' " Kevin Traynor
2022-02-21 15:34 ` patch 'net/hns3: fix vector Rx/Tx when PTP enabled' " Kevin Traynor
2022-02-21 15:34 ` patch 'net/bonding: fix RSS with early configure' " Kevin Traynor
2022-02-21 15:34 ` patch 'net/nfp: free HW ring memzone on queue release' " Kevin Traynor
2022-02-21 15:34 ` patch 'net/hns3: fix using enum as boolean' " Kevin Traynor
2022-02-21 15:34 ` patch 'vdpa/mlx5: workaround queue stop with traffic' " Kevin Traynor
2022-02-21 15:34 ` patch 'net/virtio: fix Tx queue 0 overriden by queue 128' " Kevin Traynor
2022-02-21 15:34 ` patch 'vdpa/ifc: fix log info mismatch' " Kevin Traynor
2022-02-21 15:34 ` patch 'net/virtio-user: fix resource leak on probing failure' " Kevin Traynor
2022-02-21 15:35 ` patch 'net/virtio-user: check FD flags getting " Kevin Traynor
2022-02-21 15:35 ` patch 'net/virtio: fix uninitialized RSS key' " Kevin Traynor
2022-02-21 15:35 ` patch 'common/mlx5: fix MR lookup for non-contiguous mempool' " Kevin Traynor
2022-02-21 15:35 ` patch 'net/mlx5: fix mark enabling for Rx' " Kevin Traynor
2022-02-21 15:35 ` patch 'common/mlx5: fix probing failure code' " Kevin Traynor
2022-02-21 15:35 ` patch 'net/mlx5: reject jump to root table' " Kevin Traynor
2022-02-21 15:35 ` patch 'doc: update matching versions in ice guide' " Kevin Traynor
2022-02-21 15:35 ` patch 'pflock: fix header file installation' " Kevin Traynor
2022-02-21 15:35 ` patch 'build: fix warnings when running external commands' " Kevin Traynor
2022-02-21 15:35 ` patch 'build: remove deprecated Meson functions' " Kevin Traynor
2022-02-21 15:35 ` patch 'doc: fix KNI PMD name typo' " Kevin Traynor
2022-02-21 15:35 ` patch 'ring: fix error code when creating ring' " Kevin Traynor
2022-02-21 15:35 ` patch 'ring: fix overflow in memory size calculation' " Kevin Traynor
2022-02-21 15:35 ` patch 'eal/windows: fix error code for not supported API' " Kevin Traynor
2022-02-21 15:35 ` patch 'test/mem: fix error check' " Kevin Traynor
2022-02-21 15:35 ` patch 'net/enic: fix dereference before null " Kevin Traynor
2022-02-21 15:35 ` patch 'net/dpaa2: fix null pointer dereference' " Kevin Traynor
2022-02-21 15:35 ` patch 'net/bonding: fix MTU set for slaves' " Kevin Traynor
2022-02-21 15:35 ` patch 'net/hns3: fix max packet size rollback in PF' " Kevin Traynor
2022-02-21 15:35 ` patch 'net/hns3: fix RSS key with null' " Kevin Traynor
2022-02-21 15:35 ` patch 'net/hns3: fix insecure way to query MAC statistics' " Kevin Traynor
2022-02-21 15:35 ` patch 'net/hns3: fix double decrement of secondary count' " Kevin Traynor
2022-02-21 15:35 ` patch 'net/hns3: fix operating queue when TCAM table is invalid' " Kevin Traynor
2022-02-21 15:35 ` patch 'net/hns3: delete duplicated RSS type' " Kevin Traynor
2022-02-21 15:35 ` patch 'net/ixgbe: check filter init failure' " Kevin Traynor
2022-02-21 15:35 ` patch 'net/bonding: fix promiscuous and allmulticast state' " Kevin Traynor
2022-02-21 15:35 ` patch 'net/bonding: fix reference count on mbufs' " Kevin Traynor
2022-02-21 15:35 ` patch 'app/testpmd: fix bonding mode set' " Kevin Traynor
2022-02-21 15:35 ` patch 'ethdev: add internal function to device struct from name' " Kevin Traynor
2022-02-21 15:35 ` patch 'net/tap: fix to populate FDs in secondary process' " Kevin Traynor
2022-02-21 15:35 ` patch 'app/testpmd: fix stack overflow for EEPROM display' " Kevin Traynor
2022-02-21 15:35 ` patch 'net/sfc: fix lock releases' " Kevin Traynor
2022-02-21 15:35 ` patch 'vhost: fix guest to host physical address mapping' " Kevin Traynor
2022-02-21 15:35 ` patch 'net/virtio: fix slots number when indirect feature on' " Kevin Traynor
2022-02-21 15:35 ` patch 'regex/mlx5: fix memory allocation check' " Kevin Traynor
2022-02-21 15:35 ` patch 'stack: fix stubs header export' " Kevin Traynor
2022-02-21 15:35 ` patch 'config/arm: add values for native armv7' " Kevin Traynor
2022-02-21 15:35 ` patch 'eal: fix C++ include' " Kevin Traynor
2022-02-21 15:35 ` patch 'eventdev: " Kevin Traynor
2022-02-21 15:35 ` patch 'graph: " Kevin Traynor
2022-02-21 15:35 ` patch 'ipsec: " Kevin Traynor
2022-02-21 15:35 ` patch 'table: " Kevin Traynor
2022-02-21 15:35 ` patch 'vhost: " Kevin Traynor
2022-02-21 15:35 ` patch 'mem: check allocation in dynamic hugepage init' " Kevin Traynor
2022-02-21 15:35 ` patch 'app/fib: fix division by zero' " Kevin Traynor
2022-02-21 15:35 ` patch 'test/mbuf: fix mbuf data content check' " Kevin Traynor
2022-02-21 15:35 ` patch 'ipc: end multiprocess thread during cleanup' " Kevin Traynor
2022-02-21 15:35 ` patch 'vfio: cleanup the multiprocess sync handle' " Kevin Traynor
2022-02-21 15:35 ` patch 'config: align mempool elements to 128 bytes on CN10K' " Kevin Traynor
2022-02-21 15:35 ` patch 'net/memif: remove pointer deference before null check' " Kevin Traynor
2022-02-21 15:35 ` patch 'net: fix L2TPv2 common header' " Kevin Traynor
2022-02-21 15:35 ` patch 'ethdev: remove unnecessary null check' " Kevin Traynor
2022-02-21 15:35 ` patch 'net/sfc: do not push fast free offload to default TxQ config' " Kevin Traynor
2022-02-21 15:35 ` patch 'net/sfc: demand Tx fast free offload on EF10 simple datapath' " Kevin Traynor
2022-02-21 15:35 ` patch 'net/iavf: fix null pointer dereference' " Kevin Traynor
2022-02-21 15:35 ` patch 'net/iavf: count continuous DD bits for Arm' " Kevin Traynor
2022-02-21 15:35 ` patch 'net/iavf: count continuous DD bits for Arm in flex Rx' " Kevin Traynor
2022-02-21 15:35 ` patch 'net/ice/base: add profile validation on switch filter' " Kevin Traynor
2022-02-21 15:35 ` patch 'net/ice: fix pattern check in flow director' " Kevin Traynor
2022-02-21 15:35 ` patch 'net/ice: fix build with 16-byte Rx descriptor' " Kevin Traynor
2022-02-21 15:36 ` patch 'vdpa/sfc: fix null dereference during config' " Kevin Traynor
2022-02-21 15:36 ` patch 'vdpa/sfc: fix null dereference during removal' " Kevin Traynor
2022-02-21 15:36 ` patch 'net/mlx5: fix metadata endianness in modify field action' " Kevin Traynor
2022-02-21 15:36 ` patch 'net/mlx5: fix committed bucket size' " Kevin Traynor
2022-02-21 15:36 ` patch 'net/mlx5: fix meter capabilities reporting' " Kevin Traynor
2022-02-21 15:36 ` patch 'net/mlx5: fix inline length for multi-segment TSO' " Kevin Traynor
2022-02-21 15:36 ` patch 'net/bnxt: set HW coalescing parameters' " Kevin Traynor
2022-02-21 15:36 ` patch 'net/bnxt: fix ring calculation for representors' " Kevin Traynor
2022-02-21 15:36 ` patch 'net/ngbe: fix Rx by initializing packet buffer early' " Kevin Traynor
2022-02-21 15:36 ` patch 'net/ngbe: fix missed link interrupt' " Kevin Traynor
2022-02-21 15:36 ` patch 'net/ngbe: fix Tx hang on queue disable' " Kevin Traynor
2022-02-21 15:36 ` patch 'net/ngbe: fix packet statistics' " Kevin Traynor
2022-02-21 15:36 ` patch 'net/txgbe: fix link up and down' " Kevin Traynor
2022-02-21 15:36 ` patch 'net/txgbe: fix KR auto-negotiation' " Kevin Traynor
2022-02-21 15:36 ` patch 'examples/ipsec-secgw: fix offload flag used for TSO IPv6' " Kevin Traynor
2022-02-21 15:36 ` patch 'test/crypto: fix out-of-place SGL in raw datapath' " Kevin Traynor
2022-02-21 15:36 ` patch 'crypto/ipsec_mb: fix premature dereference' " Kevin Traynor
2022-02-21 15:36 ` patch 'crypto/ipsec_mb: fix buffer overrun' " Kevin Traynor
2022-02-21 15:36 ` patch 'crypto/qat: fix GEN4 AEAD job in raw data path' " Kevin Traynor
2022-02-21 15:36 ` patch 'compress/octeontx: fix null pointer dereference' " Kevin Traynor
2022-02-21 15:36 ` patch 'crypto/cnxk: fix update of number of descriptors' " Kevin Traynor
2022-02-21 15:36 ` patch 'crypto/dpaax_sec: fix auth/cipher xform chain checks' " Kevin Traynor
2022-02-21 15:36 ` patch 'raw/ntb: clear all valid doorbell bits on init' " Kevin Traynor
2022-02-21 15:36 ` patch 'pipeline: fix annotation checks' " Kevin Traynor
2022-02-21 15:36 ` patch 'pipeline: fix table state memory allocation' " Kevin Traynor
2022-02-21 15:36 ` patch 'eventdev/eth_tx: fix queue add error code' " Kevin Traynor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).