* patch 'doc: replace deprecated distutils version parsing' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
@ 2022-02-18 12:37 ` luca.boccassi
2022-02-18 12:37 ` patch 'maintainers: update for stable branches' " luca.boccassi
` (121 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:37 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: Jerin Jacob, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/269489433cd49b15aeaba475c9f836c04dd6084f
Thanks.
Luca Boccassi
---
From 269489433cd49b15aeaba475c9f836c04dd6084f 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
@@ -7,7 +7,7 @@ import sys
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
(sphinx, version, src, dst, *extra_args) = sys.argv[1:]
@@ -19,7 +19,7 @@ os.environ['DPDK_VERSION'] = version
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']
# find all the files sphinx will process so we can write them as dependencies
diff --git a/doc/guides/conf.py b/doc/guides/conf.py
index 894d81ca75..8379c53d7c 100644
--- a/doc/guides/conf.py
+++ b/doc/guides/conf.py
@@ -3,7 +3,7 @@
# Copyright(c) 2010-2015 Intel Corporation
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
from os import environ
@@ -28,7 +28,7 @@ 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:
html_add_permalinks = ""
@@ -385,7 +385,7 @@ def setup(app):
'Features availability in bbdev drivers',
'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.',
file=stderr)
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:38.331715563 +0000
+++ 0002-doc-replace-deprecated-distutils-version-parsing.patch 2022-02-18 12:37:37.498787632 +0000
@@ -1 +1 @@
-From 2654ce5c56a4c17a649550ba89fd9003f21eab5b Mon Sep 17 00:00:00 2001
+From 269489433cd49b15aeaba475c9f836c04dd6084f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2654ce5c56a4c17a649550ba89fd9003f21eab5b ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -47 +48 @@
-index 1743ce301f..a55ce38800 100644
+index 894d81ca75..8379c53d7c 100644
@@ -68,2 +69,2 @@
-@@ -427,7 +427,7 @@ def setup(app):
- 'Features availability for Timer adapters',
+@@ -385,7 +385,7 @@ def setup(app):
+ 'Features availability in bbdev drivers',
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'maintainers: update for stable branches' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
2022-02-18 12:37 ` patch 'doc: replace deprecated distutils version parsing' has been queued to stable release 20.11.5 luca.boccassi
@ 2022-02-18 12:37 ` luca.boccassi
2022-02-18 12:37 ` patch 'doc: remove dependency on findutils on FreeBSD' " luca.boccassi
` (120 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:37 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 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/cf1a7f66a96af0eb46a116b8bd090e39d27161fa
Thanks.
Luca Boccassi
---
From cf1a7f66a96af0eb46a116b8bd090e39d27161fa 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 dcde2ab5e1..ee763f8fb2 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -64,6 +64,8 @@ T: git://dpdk.org/next/dpdk-next-eventdev
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
Security Issues
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:38.364122956 +0000
+++ 0003-maintainers-update-for-stable-branches.patch 2022-02-18 12:37:37.498787632 +0000
@@ -1 +1 @@
-From 4318cd2a4df1b05d252cdb05fb1e0a9dce378018 Mon Sep 17 00:00:00 2001
+From cf1a7f66a96af0eb46a116b8bd090e39d27161fa 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 dcde2ab5e1..ee763f8fb2 100644
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'doc: remove dependency on findutils on FreeBSD' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
2022-02-18 12:37 ` patch 'doc: replace deprecated distutils version parsing' has been queued to stable release 20.11.5 luca.boccassi
2022-02-18 12:37 ` patch 'maintainers: update for stable branches' " luca.boccassi
@ 2022-02-18 12:37 ` luca.boccassi
2022-02-18 12:37 ` patch 'bus/ifpga: remove useless check while browsing devices' " luca.boccassi
` (119 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:37 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/7c66f7f67964d422899e4cb914265a0bae14667e
Thanks.
Luca Boccassi
---
From 7c66f7f67964d422899e4cb914265a0bae14667e 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
@@ -6,21 +6,15 @@ EXAMPLES_DIR=$1
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.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:38.395484117 +0000
+++ 0004-doc-remove-dependency-on-findutils-on-FreeBSD.patch 2022-02-18 12:37:37.498787632 +0000
@@ -1 +1 @@
-From fee17a1d290434f1b9f109d8a4bc575d9e61bb13 Mon Sep 17 00:00:00 2001
+From 7c66f7f67964d422899e4cb914265a0bae14667e 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] 228+ messages in thread
* patch 'bus/ifpga: remove useless check while browsing devices' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (2 preceding siblings ...)
2022-02-18 12:37 ` patch 'doc: remove dependency on findutils on FreeBSD' " luca.boccassi
@ 2022-02-18 12:37 ` luca.boccassi
2022-02-18 12:37 ` patch 'dma/idxd: fix paths to driver sysfs directory' " luca.boccassi
` (118 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:37 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 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/4548934a6d392544736c38de8dd314e96a0bb5d7
Thanks.
Luca Boccassi
---
From 4548934a6d392544736c38de8dd314e96a0bb5d7 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 bb8b3dcfb9..56e58e04a1 100644
--- a/drivers/bus/ifpga/ifpga_bus.c
+++ b/drivers/bus/ifpga/ifpga_bus.c
@@ -64,8 +64,7 @@ ifpga_find_afu_dev(const struct rte_rawdev *rdev,
struct rte_afu_device *afu_dev = NULL;
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;
}
@@ -78,8 +77,7 @@ rte_ifpga_find_afu_by_name(const char *name)
struct rte_afu_device *afu_dev = NULL;
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;
}
return NULL;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:38.427311751 +0000
+++ 0005-bus-ifpga-remove-useless-check-while-browsing-device.patch 2022-02-18 12:37:37.498787632 +0000
@@ -1 +1 @@
-From 62c21c38a26e654bba09be147ea2d61c2e699a13 Mon Sep 17 00:00:00 2001
+From 4548934a6d392544736c38de8dd314e96a0bb5d7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 62c21c38a26e654bba09be147ea2d61c2e699a13 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index cbc6809284..c5c8bbd572 100644
+index bb8b3dcfb9..56e58e04a1 100644
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'dma/idxd: fix paths to driver sysfs directory' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (3 preceding siblings ...)
2022-02-18 12:37 ` patch 'bus/ifpga: remove useless check while browsing devices' " luca.boccassi
@ 2022-02-18 12:37 ` luca.boccassi
2022-02-18 12:37 ` patch 'eal/linux: log hugepage create errors with filename' " luca.boccassi
` (117 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:37 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Kevin Laatz, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/0602aa0fd4cb91b55146a8922d04bba4cc666758
Thanks.
Luca Boccassi
---
From 0602aa0fd4cb91b55146a8922d04bba4cc666758 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/raw/ioat/dpdk_idxd_cfg.py | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/drivers/raw/ioat/dpdk_idxd_cfg.py b/drivers/raw/ioat/dpdk_idxd_cfg.py
index fdb636498c..e999a27d45 100755
--- a/drivers/raw/ioat/dpdk_idxd_cfg.py
+++ b/drivers/raw/ioat/dpdk_idxd_cfg.py
@@ -29,10 +29,17 @@ class SysfsDir:
f.write(str(contents))
+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 configure_dsa(dsa_id, queues):
"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")
max_engines = dsa_dir.read_int("max_engines")
@@ -59,9 +66,12 @@ def configure_dsa(dsa_id, queues):
"size": int(max_work_queues_size / nb_queues)})
# 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}"})
def main(args):
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:38.458604070 +0000
+++ 0006-dma-idxd-fix-paths-to-driver-sysfs-directory.patch 2022-02-18 12:37:37.502787721 +0000
@@ -1 +1 @@
-From 3277676319f61dbc14a38e5c9c79d97c59889855 Mon Sep 17 00:00:00 2001
+From 0602aa0fd4cb91b55146a8922d04bba4cc666758 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3277676319f61dbc14a38e5c9c79d97c59889855 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -20,2 +21,2 @@
- drivers/dma/idxd/dpdk_idxd_cfg.py | 18 ++++++++++++++----
- 1 file changed, 14 insertions(+), 4 deletions(-)
+ drivers/raw/ioat/dpdk_idxd_cfg.py | 16 +++++++++++++---
+ 1 file changed, 13 insertions(+), 3 deletions(-)
@@ -23,5 +24,5 @@
-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
-@@ -29,9 +29,17 @@ class SysfsDir:
+diff --git a/drivers/raw/ioat/dpdk_idxd_cfg.py b/drivers/raw/ioat/dpdk_idxd_cfg.py
+index fdb636498c..e999a27d45 100755
+--- a/drivers/raw/ioat/dpdk_idxd_cfg.py
++++ b/drivers/raw/ioat/dpdk_idxd_cfg.py
+@@ -29,10 +29,17 @@ class SysfsDir:
@@ -39,9 +40 @@
- 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}"})
-
-
-@@ -58,7 +66,6 @@ def get_dsa_id(pci):
- def configure_dsa(dsa_id, queues, prefix):
+ def configure_dsa(dsa_id, queues):
@@ -54 +47 @@
-@@ -85,9 +92,12 @@ def configure_dsa(dsa_id, queues, prefix):
+@@ -59,9 +66,12 @@ def configure_dsa(dsa_id, queues):
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'eal/linux: log hugepage create errors with filename' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (4 preceding siblings ...)
2022-02-18 12:37 ` patch 'dma/idxd: fix paths to driver sysfs directory' " luca.boccassi
@ 2022-02-18 12:37 ` luca.boccassi
2022-02-18 12:37 ` patch 'doc: fix dlb2 guide' " luca.boccassi
` (116 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:37 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/eb5a21b54a56616dff895ba2b9fa9f61cf76e1af
Thanks.
Luca Boccassi
---
From eb5a21b54a56616dff895ba2b9fa9f61cf76e1af 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/librte_eal/linux/eal_memalloc.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/librte_eal/linux/eal_memalloc.c b/lib/librte_eal/linux/eal_memalloc.c
index fa73468285..93e21f1321 100644
--- a/lib/librte_eal/linux/eal_memalloc.c
+++ b/lib/librte_eal/linux/eal_memalloc.c
@@ -308,8 +308,8 @@ get_seg_fd(char *path, int buflen, struct hugepage_info *hi,
if (fd < 0) {
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;
}
/* take out a read lock and keep it indefinitely */
@@ -346,8 +346,8 @@ 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;
}
/* take out a read lock */
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:38.489585320 +0000
+++ 0007-eal-linux-log-hugepage-create-errors-with-filename.patch 2022-02-18 12:37:37.502787721 +0000
@@ -1 +1 @@
-From 8a5a91401dc23ddab1ddea3667a17a615a25077f Mon Sep 17 00:00:00 2001
+From eb5a21b54a56616dff895ba2b9fa9f61cf76e1af Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8a5a91401dc23ddab1ddea3667a17a615a25077f ]
+
@@ -10,2 +11,0 @@
-Cc: stable@dpdk.org
-
@@ -15 +15 @@
- lib/eal/linux/eal_memalloc.c | 8 ++++----
+ lib/librte_eal/linux/eal_memalloc.c | 8 ++++----
@@ -18,4 +18,4 @@
-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
+diff --git a/lib/librte_eal/linux/eal_memalloc.c b/lib/librte_eal/linux/eal_memalloc.c
+index fa73468285..93e21f1321 100644
+--- a/lib/librte_eal/linux/eal_memalloc.c
++++ b/lib/librte_eal/linux/eal_memalloc.c
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'doc: fix dlb2 guide' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (5 preceding siblings ...)
2022-02-18 12:37 ` patch 'eal/linux: log hugepage create errors with filename' " luca.boccassi
@ 2022-02-18 12:37 ` luca.boccassi
2022-02-18 12:37 ` patch 'examples/l3fwd: fix Rx burst size for event mode' " luca.boccassi
` (115 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:37 UTC (permalink / raw)
To: Rashmi Shetty; +Cc: Timothy McDaniel, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6bfaf85e5bcd99e4225fe1f721cec27c5c4120c3
Thanks.
Luca Boccassi
---
From 6bfaf85e5bcd99e4225fe1f721cec27c5c4120c3 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 1223219cf7..834e2242a9 100644
--- a/doc/guides/eventdevs/dlb2.rst
+++ b/doc/guides/eventdevs/dlb2.rst
@@ -178,7 +178,7 @@ A DLB2 eventdev contains one load-balanced and one directed credit pool. 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:
.. code-block:: console
@@ -266,8 +266,8 @@ queue A.
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
~~~~~~~~
@@ -330,18 +330,11 @@ scheduled. The likelihood of this case depends on the eventdev configuration,
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
~~~~~~~~~~~~~~~~~~~
@@ -358,7 +351,7 @@ Per queue threshold metrics are tracked in the DLB2 xstats, and are also
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.
.. code-block:: console
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:38.521402437 +0000
+++ 0008-doc-fix-dlb2-guide.patch 2022-02-18 12:37:37.502787721 +0000
@@ -1 +1 @@
-From 7fe2d346af2f3cae0e94347861cdfa412af39fc2 Mon Sep 17 00:00:00 2001
+From 6bfaf85e5bcd99e4225fe1f721cec27c5c4120c3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7fe2d346af2f3cae0e94347861cdfa412af39fc2 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index bce984ca08..bc53618b53 100644
+index 1223219cf7..834e2242a9 100644
@@ -24,2 +25,2 @@
-@@ -151,7 +151,7 @@ load-balanced queues, and directed credits are used for directed queues.
- These pools' sizes are controlled by the nb_events_limit field in struct
+@@ -178,7 +178,7 @@ A DLB2 eventdev contains one load-balanced and one directed credit pool. These
+ pools' sizes are controlled by the nb_events_limit field in struct
@@ -33 +34 @@
-@@ -239,8 +239,8 @@ queue A.
+@@ -266,8 +266,8 @@ queue A.
@@ -44 +45 @@
-@@ -309,18 +309,11 @@ scheduled. The likelihood of this case depends on the eventdev configuration,
+@@ -330,18 +330,11 @@ scheduled. The likelihood of this case depends on the eventdev configuration,
@@ -65 +66 @@
-@@ -337,7 +330,7 @@ Per queue threshold metrics are tracked in the DLB xstats, and are also
+@@ -358,7 +351,7 @@ Per queue threshold metrics are tracked in the DLB2 xstats, and are also
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'examples/l3fwd: fix Rx burst size for event mode' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (6 preceding siblings ...)
2022-02-18 12:37 ` patch 'doc: fix dlb2 guide' " luca.boccassi
@ 2022-02-18 12:37 ` luca.boccassi
2022-02-18 12:37 ` patch 'examples/ipsec-secgw: fix eventdev start sequence' " luca.boccassi
` (114 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:37 UTC (permalink / raw)
To: Nipun Gupta; +Cc: Sunil Kumar Kori, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/19524c9cb136ab9e94f986975fdc93cef50edd17
Thanks.
Luca Boccassi
---
From 19524c9cb136ab9e94f986975fdc93cef50edd17 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 9916a7f556..49512ab1aa 100644
--- a/examples/l3fwd/l3fwd_event_internal_port.c
+++ b/examples/l3fwd/l3fwd_event_internal_port.c
@@ -118,6 +118,8 @@ l3fwd_event_port_setup_internal_port(void)
event_p_conf.event_port_cfg |=
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++) {
ret = rte_event_port_setup(event_d_id, event_p_id,
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:38.552528499 +0000
+++ 0009-examples-l3fwd-fix-Rx-burst-size-for-event-mode.patch 2022-02-18 12:37:37.506787811 +0000
@@ -1 +1 @@
-From 2e94304c8434968626cd39fd6afe393a905c7dd2 Mon Sep 17 00:00:00 2001
+From 19524c9cb136ab9e94f986975fdc93cef50edd17 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2e94304c8434968626cd39fd6afe393a905c7dd2 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 1e8f46bc11..32cf657148 100644
+index 9916a7f556..49512ab1aa 100644
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'examples/ipsec-secgw: fix eventdev start sequence' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (7 preceding siblings ...)
2022-02-18 12:37 ` patch 'examples/l3fwd: fix Rx burst size for event mode' " luca.boccassi
@ 2022-02-18 12:37 ` luca.boccassi
2022-02-18 12:37 ` patch 'examples/ipsec-secgw: fix default flow rule creation' " luca.boccassi
` (113 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:37 UTC (permalink / raw)
To: Nithin Dabilpuram; +Cc: Anoob Joseph, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/dff4380aaeb1d84c6f6da07068f5c00f73e517d0
Thanks.
Luca Boccassi
---
From dff4380aaeb1d84c6f6da07068f5c00f73e517d0 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 10707545b8..eb4640572d 100644
--- a/examples/ipsec-secgw/event_helper.c
+++ b/examples/ipsec-secgw/event_helper.c
@@ -712,6 +712,16 @@ 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++) {
@@ -1612,6 +1622,13 @@ eh_devs_init(struct eh_conf *conf)
return ret;
}
+ /* 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.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:38.583044309 +0000
+++ 0010-examples-ipsec-secgw-fix-eventdev-start-sequence.patch 2022-02-18 12:37:37.506787811 +0000
@@ -1 +1 @@
-From 986c2c9e5696ea61e2e440702e21d28e7d8eaa5f Mon Sep 17 00:00:00 2001
+From dff4380aaeb1d84c6f6da07068f5c00f73e517d0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 986c2c9e5696ea61e2e440702e21d28e7d8eaa5f ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 24b210add4..8947e41803 100644
+index 10707545b8..eb4640572d 100644
@@ -22 +23 @@
-@@ -716,6 +716,16 @@ eh_initialize_eventdev(struct eventmode_conf *em_conf)
+@@ -712,6 +712,16 @@ eh_initialize_eventdev(struct eventmode_conf *em_conf)
@@ -39 +40 @@
-@@ -1688,6 +1698,13 @@ eh_devs_init(struct eh_conf *conf)
+@@ -1612,6 +1622,13 @@ eh_devs_init(struct eh_conf *conf)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'examples/ipsec-secgw: fix default flow rule creation' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (8 preceding siblings ...)
2022-02-18 12:37 ` patch 'examples/ipsec-secgw: fix eventdev start sequence' " luca.boccassi
@ 2022-02-18 12:37 ` luca.boccassi
2022-02-18 12:37 ` patch 'devtools: fix comment detection in forbidden token check' " luca.boccassi
` (112 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:37 UTC (permalink / raw)
To: Nithin Dabilpuram; +Cc: Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/33a5d155d0dab0058ff020a2b88f07b3b28ac4b4
Thanks.
Luca Boccassi
---
From 33a5d155d0dab0058ff020a2b88f07b3b28ac4b4 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 573f6303d4..8d244318e0 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -2931,13 +2931,14 @@ main(int32_t argc, char **argv)
if ((enabled_port_mask & (1 << portid)) == 0)
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.
* This allows IO forwarding mode to forward packets
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:38.614601386 +0000
+++ 0011-examples-ipsec-secgw-fix-default-flow-rule-creation.patch 2022-02-18 12:37:37.510787900 +0000
@@ -1 +1 @@
-From b0c6a0f1ee962b1540aab44df94e0fd65a9def9b Mon Sep 17 00:00:00 2001
+From 33a5d155d0dab0058ff020a2b88f07b3b28ac4b4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b0c6a0f1ee962b1540aab44df94e0fd65a9def9b ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 96916cd3c5..21abc0d251 100644
+index 573f6303d4..8d244318e0 100644
@@ -22 +23 @@
-@@ -3379,13 +3379,14 @@ main(int32_t argc, char **argv)
+@@ -2931,13 +2931,14 @@ main(int32_t argc, char **argv)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'devtools: fix comment detection in forbidden token check' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (9 preceding siblings ...)
2022-02-18 12:37 ` patch 'examples/ipsec-secgw: fix default flow rule creation' " luca.boccassi
@ 2022-02-18 12:37 ` luca.boccassi
2022-02-18 12:37 ` patch 'net/qede: fix redundant condition in debug code' " luca.boccassi
` (111 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:37 UTC (permalink / raw)
To: David Marchand; +Cc: Thomas Monjalon, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/4ee719c72ea69336a8d9b6688e8a5536b87bc3a9
Thanks.
Luca Boccassi
---
From 4ee719c72ea69336a8d9b6688e8a5536b87bc3a9 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
@@ -20,6 +20,9 @@ BEGIN {
# state machine assumes the comments structure is enforced by
# checkpatches.pl
(in_file) {
+ if ($0 ~ "^@@") {
+ in_comment = 0
+ }
# comment start
if (index($0,comment_start) > 0) {
in_comment = 1
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:38.648154419 +0000
+++ 0012-devtools-fix-comment-detection-in-forbidden-token-ch.patch 2022-02-18 12:37:37.510787900 +0000
@@ -1 +1 @@
-From fdcc8970bce23d476e7fabd18a82fb298725c511 Mon Sep 17 00:00:00 2001
+From 4ee719c72ea69336a8d9b6688e8a5536b87bc3a9 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] 228+ messages in thread
* patch 'net/qede: fix redundant condition in debug code' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (10 preceding siblings ...)
2022-02-18 12:37 ` patch 'devtools: fix comment detection in forbidden token check' " luca.boccassi
@ 2022-02-18 12:37 ` luca.boccassi
2022-02-18 12:37 ` patch 'net/ice: fix Tx checksum offload capability' " luca.boccassi
` (110 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:37 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 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/793c8206207f54ebaf20c96945edf248c6c503c6
Thanks.
Luca Boccassi
---
From 793c8206207f54ebaf20c96945edf248c6c503c6 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
@@ -3522,7 +3522,7 @@ 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,
dump_buf + offset, dump);
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:38.678817892 +0000
+++ 0013-net-qede-fix-redundant-condition-in-debug-code.patch 2022-02-18 12:37:37.518788079 +0000
@@ -1 +1 @@
-From 6caee3fb5f7b45ca7a676d77f678cafc4984defa Mon Sep 17 00:00:00 2001
+From 793c8206207f54ebaf20c96945edf248c6c503c6 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] 228+ messages in thread
* patch 'net/ice: fix Tx checksum offload capability' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (11 preceding siblings ...)
2022-02-18 12:37 ` patch 'net/qede: fix redundant condition in debug code' " luca.boccassi
@ 2022-02-18 12:37 ` luca.boccassi
2022-02-18 12:37 ` patch 'net/ice: track DCF state of PF' " luca.boccassi
` (109 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:37 UTC (permalink / raw)
To: Qi Zhang; +Cc: Qiming Yang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f7b02e11272cc1b1b624d62035ebcbc696edf17a
Thanks.
Luca Boccassi
---
From f7b02e11272cc1b1b624d62035ebcbc696edf17a 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 e2b5659090..ac3c83c8e7 100644
--- a/doc/guides/nics/features/ice_dcf.ini
+++ b/doc/guides/nics/features/ice_dcf.ini
@@ -3,6 +3,9 @@
;
; 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
Jumbo frame = Y
@@ -12,6 +15,8 @@ Flow API = Y
CRC offload = Y
L3 checksum offload = P
L4 checksum offload = P
+Inner L3 checksum = P
+Inner L4 checksum = P
Basic stats = Y
Linux UIO = Y
Linux VFIO = Y
diff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c
index b1ae5c9872..a90dff9a46 100644
--- a/drivers/net/ice/ice_dcf_ethdev.c
+++ b/drivers/net/ice/ice_dcf_ethdev.c
@@ -670,6 +670,7 @@ ice_dcf_dev_info_get(struct rte_eth_dev *dev,
DEV_TX_OFFLOAD_TCP_CKSUM |
DEV_TX_OFFLOAD_SCTP_CKSUM |
DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM |
+ DEV_TX_OFFLOAD_OUTER_UDP_CKSUM |
DEV_TX_OFFLOAD_TCP_TSO |
DEV_TX_OFFLOAD_VXLAN_TNL_TSO |
DEV_TX_OFFLOAD_GRE_TNL_TSO |
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:38.716776132 +0000
+++ 0014-net-ice-fix-Tx-checksum-offload-capability.patch 2022-02-18 12:37:37.518788079 +0000
@@ -1 +1 @@
-From fd5ad5638ec0187334f0d717852e1d55aff3a0ea Mon Sep 17 00:00:00 2001
+From f7b02e11272cc1b1b624d62035ebcbc696edf17a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fd5ad5638ec0187334f0d717852e1d55aff3a0ea ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 4d6fb6d849..54073f0b88 100644
+index e2b5659090..ac3c83c8e7 100644
@@ -32,2 +33,2 @@
- Scattered Rx = Y
-@@ -10,6 +13,8 @@ RSS hash = P
+ Jumbo frame = Y
+@@ -12,6 +15,8 @@ Flow API = Y
@@ -40,2 +41,2 @@
- Linux = Y
- x86-32 = Y
+ Linux UIO = Y
+ Linux VFIO = Y
@@ -43 +44 @@
-index 164d834a18..a1f11c01d9 100644
+index b1ae5c9872..a90dff9a46 100644
@@ -46,8 +47,8 @@
-@@ -681,6 +681,7 @@ ice_dcf_dev_info_get(struct rte_eth_dev *dev,
- RTE_ETH_TX_OFFLOAD_TCP_CKSUM |
- RTE_ETH_TX_OFFLOAD_SCTP_CKSUM |
- RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM |
-+ RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM |
- RTE_ETH_TX_OFFLOAD_TCP_TSO |
- RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO |
- RTE_ETH_TX_OFFLOAD_GRE_TNL_TSO |
+@@ -670,6 +670,7 @@ ice_dcf_dev_info_get(struct rte_eth_dev *dev,
+ DEV_TX_OFFLOAD_TCP_CKSUM |
+ DEV_TX_OFFLOAD_SCTP_CKSUM |
+ DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM |
++ DEV_TX_OFFLOAD_OUTER_UDP_CKSUM |
+ DEV_TX_OFFLOAD_TCP_TSO |
+ DEV_TX_OFFLOAD_VXLAN_TNL_TSO |
+ DEV_TX_OFFLOAD_GRE_TNL_TSO |
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/ice: track DCF state of PF' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (12 preceding siblings ...)
2022-02-18 12:37 ` patch 'net/ice: fix Tx checksum offload capability' " luca.boccassi
@ 2022-02-18 12:37 ` luca.boccassi
2022-02-18 12:37 ` patch 'net/ice: fix Tx checksum offload' " luca.boccassi
` (108 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:37 UTC (permalink / raw)
To: Dapeng Yu; +Cc: Haiyue Wang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/8577641fca0ff858c9ffe16c6d5801ea9fbff55c
Thanks.
Luca Boccassi
---
From 8577641fca0ff858c9ffe16c6d5801ea9fbff55c 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 | 10 +++++++
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, 71 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c
index a90dff9a46..1793d8cbd3 100644
--- a/drivers/net/ice/ice_dcf_ethdev.c
+++ b/drivers/net/ice/ice_dcf_ethdev.c
@@ -870,6 +870,13 @@ ice_dcf_dev_close(struct rte_eth_dev *dev)
return 0;
}
+bool
+ice_dcf_adminq_need_retry(struct ice_adapter *ad)
+{
+ return ad->hw.dcf_enabled &&
+ !__atomic_load_n(&ad->dcf_state_on, __ATOMIC_RELAXED);
+}
+
static int
ice_dcf_link_update(__rte_unused struct rte_eth_dev *dev,
__rte_unused int wait_to_complete)
@@ -905,6 +912,7 @@ static int
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;
eth_dev->rx_pkt_burst = ice_dcf_recv_pkts;
@@ -916,9 +924,13 @@ ice_dcf_dev_init(struct rte_eth_dev *eth_dev)
adapter->real_hw.vc_event_msg_cb = ice_dcf_handle_pf_event_msg;
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");
ice_dcf_uninit_hw(eth_dev, &adapter->real_hw);
diff --git a/drivers/net/ice/ice_dcf_ethdev.h b/drivers/net/ice/ice_dcf_ethdev.h
index b54528beae..0d25ff315e 100644
--- a/drivers/net/ice/ice_dcf_ethdev.h
+++ b/drivers/net/ice/ice_dcf_ethdev.h
@@ -26,5 +26,6 @@ void ice_dcf_handle_pf_event_msg(struct ice_dcf_hw *dcf_hw,
uint8_t *msg, uint16_t msglen);
int ice_dcf_init_parent_adapter(struct rte_eth_dev *eth_dev);
void ice_dcf_uninit_parent_adapter(struct rte_eth_dev *eth_dev);
+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 903e4db616..ad94953932 100644
--- a/drivers/net/ice/ice_dcf_parent.c
+++ b/drivers/net/ice/ice_dcf_parent.c
@@ -111,6 +111,9 @@ static void*
ice_dcf_vsi_update_service_handler(void *param)
{
struct ice_dcf_hw *hw = param;
+ 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());
usleep(ICE_DCF_VSI_UPDATE_SERVICE_INTERVAL);
@@ -122,6 +125,8 @@ ice_dcf_vsi_update_service_handler(void *param)
struct ice_dcf_adapter *dcf_ad =
container_of(hw, struct ice_dcf_adapter, real_hw);
+ __atomic_store_n(&parent_adapter->dcf_state_on, true,
+ __ATOMIC_RELAXED);
ice_dcf_update_vf_vsi_map(&dcf_ad->parent.hw,
hw->num_vfs, hw->vf_vsi_map);
}
@@ -137,6 +142,9 @@ ice_dcf_handle_pf_event_msg(struct ice_dcf_hw *dcf_hw,
{
struct virtchnl_pf_event *pf_msg = (struct virtchnl_pf_event *)msg;
pthread_t thread;
+ 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)) {
PMD_DRV_LOG(DEBUG, "Invalid event message length : %u", msglen);
@@ -161,6 +169,8 @@ ice_dcf_handle_pf_event_msg(struct ice_dcf_hw *dcf_hw,
pf_msg->event_data.vf_vsi_map.vsi_id);
pthread_create(&thread, NULL,
ice_dcf_vsi_update_service_handler, dcf_hw);
+ __atomic_store_n(&parent_adapter->dcf_state_on, false,
+ __ATOMIC_RELAXED);
break;
default:
PMD_DRV_LOG(ERR, "Unknown event received %u", pf_msg->event);
diff --git a/drivers/net/ice/ice_ethdev.h b/drivers/net/ice/ice_ethdev.h
index b3e518fcbc..fd81ede8a1 100644
--- a/drivers/net/ice/ice_ethdev.h
+++ b/drivers/net/ice/ice_ethdev.h
@@ -478,6 +478,8 @@ struct ice_adapter {
struct ice_devargs devargs;
enum ice_pkg_type active_pkg_type; /* loaded ddp package type */
uint16_t fdir_ref_cnt;
+ /* True if DCF state of the associated PF is on */
+ bool dcf_state_on;
#ifdef RTE_ARCH_X86
bool rx_use_avx2;
bool rx_use_avx512;
diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_generic_flow.c
index ca401c7703..311fd7d162 100644
--- a/drivers/net/ice/ice_generic_flow.c
+++ b/drivers/net/ice/ice_generic_flow.c
@@ -2323,7 +2323,9 @@ ice_flow_flush(struct rte_eth_dev *dev,
ret = ice_flow_destroy(dev, p_flow, error);
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 f41a57acf4..ea5ced60a7 100644
--- a/drivers/net/ice/ice_switch_filter.c
+++ b/drivers/net/ice/ice_switch_filter.c
@@ -438,6 +438,14 @@ ice_switch_create(struct ice_adapter *ad,
"lookup list should not be NULL");
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) {
filter_conf_ptr = rte_zmalloc("ice_switch_filter",
@@ -461,7 +469,12 @@ 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");
goto error;
@@ -513,9 +526,21 @@ ice_switch_destroy(struct ice_adapter *ad,
return -rte_errno;
}
+ 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");
return -rte_errno;
@@ -1904,6 +1929,12 @@ 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);
if (ret) {
@@ -1916,6 +1947,12 @@ 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;
@@ -1935,6 +1972,10 @@ add_rule:
}
out:
+ if (ret == -EINVAL)
+ if (ice_dcf_adminq_need_retry(ad))
+ ret = -EAGAIN;
+
ice_free(hw, lkups_dp);
return ret;
}
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:38.748849154 +0000
+++ 0015-net-ice-track-DCF-state-of-PF.patch 2022-02-18 12:37:37.526788258 +0000
@@ -1 +1 @@
-From 285f63fc6bb72a07594af9a7652f5bae3a95eb52 Mon Sep 17 00:00:00 2001
+From 8577641fca0ff858c9ffe16c6d5801ea9fbff55c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 285f63fc6bb72a07594af9a7652f5bae3a95eb52 ]
+
@@ -13,2 +14,0 @@
-Cc: stable@dpdk.org
-
@@ -20 +20 @@
- drivers/net/ice/ice_dcf_parent.c | 16 +++++++---
+ drivers/net/ice/ice_dcf_parent.c | 10 +++++++
@@ -24 +24 @@
- 6 files changed, 73 insertions(+), 7 deletions(-)
+ 6 files changed, 71 insertions(+), 3 deletions(-)
@@ -27 +27 @@
-index a1f11c01d9..59610e058f 100644
+index a90dff9a46..1793d8cbd3 100644
@@ -30,2 +30,2 @@
-@@ -957,6 +957,13 @@ ice_dcf_link_update(struct rte_eth_dev *dev,
- return rte_eth_linkstatus_set(dev, &new_link);
+@@ -870,6 +870,13 @@ ice_dcf_dev_close(struct rte_eth_dev *dev)
+ return 0;
@@ -41 +40,0 @@
- /* Add UDP tunneling port */
@@ -43,2 +42,3 @@
- ice_dcf_dev_udp_tunnel_port_add(struct rte_eth_dev *dev,
-@@ -1106,6 +1113,7 @@ static int
+ ice_dcf_link_update(__rte_unused struct rte_eth_dev *dev,
+ __rte_unused int wait_to_complete)
+@@ -905,6 +912,7 @@ static int
@@ -52 +52 @@
-@@ -1117,9 +1125,13 @@ ice_dcf_dev_init(struct rte_eth_dev *eth_dev)
+@@ -916,9 +924,13 @@ ice_dcf_dev_init(struct rte_eth_dev *eth_dev)
@@ -67 +67 @@
-index 8510e37119..11a1305038 100644
+index b54528beae..0d25ff315e 100644
@@ -70,4 +70,4 @@
-@@ -64,5 +64,6 @@ int ice_dcf_vf_repr_init(struct rte_eth_dev *vf_rep_eth_dev, void *init_param);
- 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);
+@@ -26,5 +26,6 @@ void ice_dcf_handle_pf_event_msg(struct ice_dcf_hw *dcf_hw,
+ uint8_t *msg, uint16_t msglen);
+ int ice_dcf_init_parent_adapter(struct rte_eth_dev *eth_dev);
+ void ice_dcf_uninit_parent_adapter(struct rte_eth_dev *eth_dev);
@@ -78 +78 @@
-index 1ff2c47172..0c8c2ed6c7 100644
+index 903e4db616..ad94953932 100644
@@ -81 +81,2 @@
-@@ -119,7 +119,9 @@ ice_dcf_vsi_update_service_handler(void *param)
+@@ -111,6 +111,9 @@ static void*
+ ice_dcf_vsi_update_service_handler(void *param)
@@ -83,3 +84 @@
- 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_hw *hw = param;
@@ -90,0 +90,4 @@
+ usleep(ICE_DCF_VSI_UPDATE_SERVICE_INTERVAL);
+@@ -122,6 +125,8 @@ ice_dcf_vsi_update_service_handler(void *param)
+ struct ice_dcf_adapter *dcf_ad =
+ container_of(hw, struct ice_dcf_adapter, real_hw);
@@ -92,8 +94,0 @@
-@@ -127,11 +129,12 @@ 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)) {
@@ -102 +97 @@
- ice_dcf_update_vf_vsi_map(&adapter->parent.hw,
+ ice_dcf_update_vf_vsi_map(&dcf_ad->parent.hw,
@@ -104,6 +99,2 @@
-+ }
-
- if (reset_param->vfr && adapter->repr_infos) {
- struct rte_eth_dev *vf_rep_eth_dev =
-@@ -224,6 +227,9 @@ ice_dcf_handle_pf_event_msg(struct ice_dcf_hw *dcf_hw,
- uint8_t *msg, uint16_t msglen)
+ }
+@@ -137,6 +142,9 @@ ice_dcf_handle_pf_event_msg(struct ice_dcf_hw *dcf_hw,
@@ -111,0 +103 @@
+ pthread_t thread;
@@ -118,3 +110 @@
-@@ -258,6 +264,8 @@ ice_dcf_handle_pf_event_msg(struct ice_dcf_hw *dcf_hw,
- PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_DCF_VSI_MAP_UPDATE event : VF%u with VSI num %u",
- pf_msg->event_data.vf_vsi_map.vf_id,
+@@ -161,6 +169,8 @@ ice_dcf_handle_pf_event_msg(struct ice_dcf_hw *dcf_hw,
@@ -121,0 +112,2 @@
+ pthread_create(&thread, NULL,
+ ice_dcf_vsi_update_service_handler, dcf_hw);
@@ -124,2 +115,0 @@
- start_vsi_reset_thread(dcf_hw, true,
- pf_msg->event_data.vf_vsi_map.vf_id);
@@ -126,0 +117,2 @@
+ default:
+ PMD_DRV_LOG(ERR, "Unknown event received %u", pf_msg->event);
@@ -128 +120 @@
-index 2e3e45f3d7..1242177b42 100644
+index b3e518fcbc..fd81ede8a1 100644
@@ -131,4 +123,4 @@
-@@ -531,6 +531,8 @@ struct ice_adapter {
- uint64_t time_hw;
- struct ice_fdir_prof_info fdir_prof_info[ICE_MAX_PTGS];
- struct ice_rss_prof_info rss_prof_info[ICE_MAX_PTGS];
+@@ -478,6 +478,8 @@ struct ice_adapter {
+ struct ice_devargs devargs;
+ enum ice_pkg_type active_pkg_type; /* loaded ddp package type */
+ uint16_t fdir_ref_cnt;
@@ -141 +133 @@
-index c673feb7a6..406a0a953f 100644
+index ca401c7703..311fd7d162 100644
@@ -144 +136 @@
-@@ -2515,7 +2515,9 @@ ice_flow_flush(struct rte_eth_dev *dev,
+@@ -2323,7 +2323,9 @@ ice_flow_flush(struct rte_eth_dev *dev,
@@ -156 +148 @@
-index ed29c00d77..bd805d9606 100644
+index f41a57acf4..ea5ced60a7 100644
@@ -159 +151 @@
-@@ -400,6 +400,14 @@ ice_switch_create(struct ice_adapter *ad,
+@@ -438,6 +438,14 @@ ice_switch_create(struct ice_adapter *ad,
@@ -174 +166 @@
-@@ -423,7 +431,12 @@ ice_switch_create(struct ice_adapter *ad,
+@@ -461,7 +469,12 @@ ice_switch_create(struct ice_adapter *ad,
@@ -188 +180 @@
-@@ -475,9 +488,21 @@ ice_switch_destroy(struct ice_adapter *ad,
+@@ -513,9 +526,21 @@ ice_switch_destroy(struct ice_adapter *ad,
@@ -211 +203 @@
-@@ -2016,6 +2041,12 @@ ice_switch_redirect(struct ice_adapter *ad,
+@@ -1904,6 +1929,12 @@ ice_switch_redirect(struct ice_adapter *ad,
@@ -224 +216 @@
-@@ -2028,6 +2059,12 @@ rmv_rule:
+@@ -1916,6 +1947,12 @@ rmv_rule:
@@ -237 +229 @@
-@@ -2047,6 +2084,10 @@ add_rule:
+@@ -1935,6 +1972,10 @@ add_rule:
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/ice: fix Tx checksum offload' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (13 preceding siblings ...)
2022-02-18 12:37 ` patch 'net/ice: track DCF state of PF' " luca.boccassi
@ 2022-02-18 12:37 ` luca.boccassi
2022-02-18 12:37 ` patch 'net/ixgbe: add vector Rx parameter check' " luca.boccassi
` (107 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:37 UTC (permalink / raw)
To: Kevin Liu; +Cc: Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a02fbcde752bbf618b6429636f4cfcc6c59e8427
Thanks.
Luca Boccassi
---
From a02fbcde752bbf618b6429636f4cfcc6c59e8427 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 +++++++++++++++++++++++++++-----------
1 file changed, 29 insertions(+), 12 deletions(-)
diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index 12db9ca95e..1fc2bec5d5 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -2350,18 +2350,35 @@ ice_txd_enable_checksum(uint64_t ol_flags,
<< ICE_TX_DESC_LEN_MACLEN_S;
/* Enable L3 checksum offloads */
- if (ol_flags & PKT_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 & PKT_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 & PKT_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 & PKT_TX_TUNNEL_MASK) {
+ if (ol_flags & PKT_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 & PKT_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 & PKT_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 & PKT_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 & PKT_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 & PKT_TX_IPV6) {
+ *td_cmd |= ICE_TX_DESC_CMD_IIPT_IPV6;
+ *td_offset |= (tx_offload.l3_len >> 2) <<
+ ICE_TX_DESC_LEN_IPLEN_S;
+ }
}
if (ol_flags & PKT_TX_TCP_SEG) {
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:38.785709490 +0000
+++ 0016-net-ice-fix-Tx-checksum-offload.patch 2022-02-18 12:37:37.530788346 +0000
@@ -1 +1 @@
-From 58d212e3bc548fb6be0e343eccc921413acf2ff8 Mon Sep 17 00:00:00 2001
+From a02fbcde752bbf618b6429636f4cfcc6c59e8427 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 58d212e3bc548fb6be0e343eccc921413acf2ff8 ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -25,3 +26,2 @@
- drivers/net/ice/ice_rxtx.c | 41 ++++++++++++++-------
- drivers/net/ice/ice_rxtx_vec_common.h | 52 +++++++++++++++++++--------
- 2 files changed, 66 insertions(+), 27 deletions(-)
+ drivers/net/ice/ice_rxtx.c | 41 +++++++++++++++++++++++++++-----------
+ 1 file changed, 29 insertions(+), 12 deletions(-)
@@ -30 +30 @@
-index c80d86915e..ba40a0dc87 100644
+index 12db9ca95e..1fc2bec5d5 100644
@@ -33 +33 @@
-@@ -2490,18 +2490,35 @@ ice_txd_enable_checksum(uint64_t ol_flags,
+@@ -2350,18 +2350,35 @@ ice_txd_enable_checksum(uint64_t ol_flags,
@@ -37 +37 @@
-- if (ol_flags & RTE_MBUF_F_TX_IP_CKSUM) {
+- if (ol_flags & PKT_TX_IP_CKSUM) {
@@ -41 +41 @@
-- } else if (ol_flags & RTE_MBUF_F_TX_IPV4) {
+- } else if (ol_flags & PKT_TX_IPV4) {
@@ -45 +45 @@
-- } else if (ol_flags & RTE_MBUF_F_TX_IPV6) {
+- } else if (ol_flags & PKT_TX_IPV6) {
@@ -50,2 +50,2 @@
-+ if (ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK) {
-+ if (ol_flags & RTE_MBUF_F_TX_IP_CKSUM) {
++ if (ol_flags & PKT_TX_TUNNEL_MASK) {
++ if (ol_flags & PKT_TX_IP_CKSUM) {
@@ -55 +55 @@
-+ } else if (ol_flags & RTE_MBUF_F_TX_IPV4) {
++ } else if (ol_flags & PKT_TX_IPV4) {
@@ -59 +59 @@
-+ } else if (ol_flags & RTE_MBUF_F_TX_IPV6) {
++ } else if (ol_flags & PKT_TX_IPV6) {
@@ -65 +65 @@
-+ if (ol_flags & RTE_MBUF_F_TX_IP_CKSUM) {
++ if (ol_flags & PKT_TX_IP_CKSUM) {
@@ -69 +69 @@
-+ } else if (ol_flags & RTE_MBUF_F_TX_IPV4) {
++ } else if (ol_flags & PKT_TX_IPV4) {
@@ -73 +73 @@
-+ } else if (ol_flags & RTE_MBUF_F_TX_IPV6) {
++ } else if (ol_flags & PKT_TX_IPV6) {
@@ -80,66 +80 @@
- if (ol_flags & RTE_MBUF_F_TX_TCP_SEG) {
-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
-@@ -364,23 +364,45 @@ ice_txd_enable_offload(struct rte_mbuf *tx_pkt,
- uint32_t td_offset = 0;
-
- /* 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;
-+ }
- }
-
- /* Enable L4 checksum offloads */
+ if (ol_flags & PKT_TX_TCP_SEG) {
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/ixgbe: add vector Rx parameter check' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (14 preceding siblings ...)
2022-02-18 12:37 ` patch 'net/ice: fix Tx checksum offload' " luca.boccassi
@ 2022-02-18 12:37 ` luca.boccassi
2022-02-18 12:37 ` patch 'net/mlx5: fix assertion on flags set in packet mbuf' " luca.boccassi
` (106 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:37 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 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/24e61aa014cb153f49a435bd8e29191a705441e4
Thanks.
Luca Boccassi
---
From 24e61aa014cb153f49a435bd8e29191a705441e4 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 1a235fab62..37a1718926 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
@@ -364,6 +364,17 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts,
uint8_t vlan_flags;
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.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:38.820491134 +0000
+++ 0017-net-ixgbe-add-vector-Rx-parameter-check.patch 2022-02-18 12:37:37.530788346 +0000
@@ -1 +1 @@
-From c59f93d9a1e09e21e27f5bde7d8632a4d0503582 Mon Sep 17 00:00:00 2001
+From 24e61aa014cb153f49a435bd8e29191a705441e4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c59f93d9a1e09e21e27f5bde7d8632a4d0503582 ]
+
@@ -33 +34,0 @@
-Cc: stable@dpdk.org
@@ -44 +45 @@
-index c56f76b368..bb34b27168 100644
+index 1a235fab62..37a1718926 100644
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/mlx5: fix assertion on flags set in packet mbuf' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (15 preceding siblings ...)
2022-02-18 12:37 ` patch 'net/ixgbe: add vector Rx parameter check' " luca.boccassi
@ 2022-02-18 12:37 ` luca.boccassi
2022-02-18 12:37 ` patch 'net/mlx5: fix RSS expansion with explicit next protocol' " luca.boccassi
` (105 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:37 UTC (permalink / raw)
To: Lior Margalit; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/1c64873e8d9c9260ac7d9e2705a77ff862e493f7
Thanks.
Luca Boccassi
---
From 1c64873e8d9c9260ac7d9e2705a77ff862e493f7 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_rxtx.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
index b2a891c8f6..630ab1d989 100644
--- a/drivers/net/mlx5/mlx5_rxtx.h
+++ b/drivers/net/mlx5/mlx5_rxtx.h
@@ -890,7 +890,7 @@ mprq_buf_to_pkt(struct mlx5_rxq_data *rxq, struct rte_mbuf *pkt, uint32_t len,
buf_len, shinfo);
/* Set mbuf head-room. */
SET_DATA_OFF(pkt, RTE_PKTMBUF_HEADROOM);
- MLX5_ASSERT(pkt->ol_flags == EXT_ATTACHED_MBUF);
+ MLX5_ASSERT(pkt->ol_flags & EXT_ATTACHED_MBUF);
MLX5_ASSERT(rte_pktmbuf_tailroom(pkt) >=
len - (hdrm_overlap > 0 ? hdrm_overlap : 0));
DATA_LEN(pkt) = len;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:38.851713514 +0000
+++ 0018-net-mlx5-fix-assertion-on-flags-set-in-packet-mbuf.patch 2022-02-18 12:37:37.534788436 +0000
@@ -1 +1 @@
-From 0c7606b75be4f56a109f61f3cf2c7a819e760cd2 Mon Sep 17 00:00:00 2001
+From 1c64873e8d9c9260ac7d9e2705a77ff862e493f7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0c7606b75be4f56a109f61f3cf2c7a819e760cd2 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
- drivers/net/mlx5/mlx5_rx.h | 2 +-
+ drivers/net/mlx5/mlx5_rxtx.h | 2 +-
@@ -20,5 +21,5 @@
-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
-@@ -543,7 +543,7 @@ mprq_buf_to_pkt(struct mlx5_rxq_data *rxq, struct rte_mbuf *pkt, uint32_t len,
+diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
+index b2a891c8f6..630ab1d989 100644
+--- a/drivers/net/mlx5/mlx5_rxtx.h
++++ b/drivers/net/mlx5/mlx5_rxtx.h
+@@ -890,7 +890,7 @@ mprq_buf_to_pkt(struct mlx5_rxq_data *rxq, struct rte_mbuf *pkt, uint32_t len,
@@ -28,2 +29,2 @@
-- MLX5_ASSERT(pkt->ol_flags == RTE_MBUF_F_EXTERNAL);
-+ MLX5_ASSERT(pkt->ol_flags & RTE_MBUF_F_EXTERNAL);
+- MLX5_ASSERT(pkt->ol_flags == EXT_ATTACHED_MBUF);
++ MLX5_ASSERT(pkt->ol_flags & EXT_ATTACHED_MBUF);
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/mlx5: fix RSS expansion with explicit next protocol' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (16 preceding siblings ...)
2022-02-18 12:37 ` patch 'net/mlx5: fix assertion on flags set in packet mbuf' " luca.boccassi
@ 2022-02-18 12:37 ` luca.boccassi
2022-02-18 12:37 ` patch 'net/mlx5: fix GRE protocol type translation for Verbs' " luca.boccassi
` (104 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:37 UTC (permalink / raw)
To: Gregory Etelson; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a5edf8517584e9cf74e4041ead4c3d34a800d565
Thanks.
Luca Boccassi
---
From a5edf8517584e9cf74e4041ead4c3d34a800d565 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 aaa5f89d43..080731ca04 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -164,128 +164,143 @@ mlx5_flow_is_rss_expandable_item(const struct rte_flow_item *item)
return false;
}
+/**
+ * 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:
ret = RTE_FLOW_ITEM_TYPE_VOID;
break;
}
return ret;
+#undef MLX5_XSET_ITEM_MASK_SPEC
}
static const int *
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:38.882944664 +0000
+++ 0019-net-mlx5-fix-RSS-expansion-with-explicit-next-protoc.patch 2022-02-18 12:37:37.542788614 +0000
@@ -1 +1 @@
-From f3f1f576f43804b30f81deae967bc09aff7000df Mon Sep 17 00:00:00 2001
+From a5edf8517584e9cf74e4041ead4c3d34a800d565 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f3f1f576f43804b30f81deae967bc09aff7000df ]
+
@@ -22 +23,0 @@
-Cc: stable@dpdk.org
@@ -31 +32 @@
-index b7cf4143d5..2cadf615ec 100644
+index aaa5f89d43..080731ca04 100644
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/mlx5: fix GRE protocol type translation for Verbs' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (17 preceding siblings ...)
2022-02-18 12:37 ` patch 'net/mlx5: fix RSS expansion with explicit next protocol' " luca.boccassi
@ 2022-02-18 12:37 ` luca.boccassi
2022-02-18 12:37 ` patch 'net/mlx5: relax headroom assertion' " luca.boccassi
` (103 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:37 UTC (permalink / raw)
To: Gregory Etelson; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/0374774e882a3a724cb39aac839adf2f483ab478
Thanks.
Luca Boccassi
---
From 0374774e882a3a724cb39aac839adf2f483ab478 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 7d42edaacc..ed5f94a9a0 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -1287,6 +1287,20 @@ tunnel_use_standard_attr_group_translate
return verdict;
}
+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,
uint32_t group, uint32_t *table,
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 57d8d79286..c134e24c0e 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -84,20 +84,6 @@ flow_dv_port_id_action_resource_release(struct rte_eth_dev *dev,
static void
flow_dv_shared_rss_action_release(struct rte_eth_dev *dev, uint32_t srss);
-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;
-}
-
/**
* Initialize flow attributes structure according to flow items' types.
*
diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c b/drivers/net/mlx5/mlx5_flow_verbs.c
index afe973019b..9c2fc1b25e 100644
--- a/drivers/net/mlx5/mlx5_flow_verbs.c
+++ b/drivers/net/mlx5/mlx5_flow_verbs.c
@@ -960,6 +960,7 @@ flow_verbs_translate_item_gre(struct mlx5_flow *dev_flow,
.size = size,
};
#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;
unsigned int size = sizeof(struct ibv_flow_spec_gre);
@@ -968,17 +969,29 @@ flow_verbs_translate_item_gre(struct mlx5_flow *dev_flow,
.size = size,
};
- 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
if (item_flags & MLX5_FLOW_LAYER_OUTER_L3_IPV4)
@@ -1846,8 +1859,6 @@ flow_verbs_translate(struct rte_eth_dev *dev,
item_flags |= MLX5_FLOW_LAYER_VXLAN_GPE;
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;
break;
@@ -1863,6 +1874,8 @@ flow_verbs_translate(struct rte_eth_dev *dev,
NULL, "item not supported");
}
}
+ 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. */
dev_flow->verbs.attr.priority =
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:38.923842047 +0000
+++ 0020-net-mlx5-fix-GRE-protocol-type-translation-for-Verbs.patch 2022-02-18 12:37:37.554788882 +0000
@@ -1 +1 @@
-From 985b479267aa90394f1c219de120d23e96761789 Mon Sep 17 00:00:00 2001
+From 0374774e882a3a724cb39aac839adf2f483ab478 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 985b479267aa90394f1c219de120d23e96761789 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 8c131d61ae..125d85899c 100644
+index 7d42edaacc..ed5f94a9a0 100644
@@ -30,2 +31,2 @@
-@@ -1450,6 +1450,20 @@ flow_aso_ct_get_by_idx(struct rte_eth_dev *dev, uint32_t own_idx)
- return ct;
+@@ -1287,6 +1287,20 @@ tunnel_use_standard_attr_group_translate
+ return verdict;
@@ -52 +53 @@
-index 5d9fbffd0e..0383976883 100644
+index 57d8d79286..c134e24c0e 100644
@@ -55,3 +56,3 @@
-@@ -93,20 +93,6 @@ static int
- flow_dv_jump_tbl_resource_release(struct rte_eth_dev *dev,
- uint32_t rix_jump);
+@@ -84,20 +84,6 @@ flow_dv_port_id_action_resource_release(struct rte_eth_dev *dev,
+ static void
+ flow_dv_shared_rss_action_release(struct rte_eth_dev *dev, uint32_t srss);
@@ -73,3 +74,3 @@
- static int16_t
- flow_dv_get_esw_manager_vport_id(struct rte_eth_dev *dev)
- {
+ /**
+ * Initialize flow attributes structure according to flow items' types.
+ *
@@ -77 +78 @@
-index 29cd694752..192a00d4fd 100644
+index afe973019b..9c2fc1b25e 100644
@@ -80 +81 @@
-@@ -907,6 +907,7 @@ flow_verbs_translate_item_gre(struct mlx5_flow *dev_flow,
+@@ -960,6 +960,7 @@ flow_verbs_translate_item_gre(struct mlx5_flow *dev_flow,
@@ -88 +89 @@
-@@ -915,17 +916,29 @@ flow_verbs_translate_item_gre(struct mlx5_flow *dev_flow,
+@@ -968,17 +969,29 @@ flow_verbs_translate_item_gre(struct mlx5_flow *dev_flow,
@@ -128 +129 @@
-@@ -1803,8 +1816,6 @@ flow_verbs_translate(struct rte_eth_dev *dev,
+@@ -1846,8 +1859,6 @@ flow_verbs_translate(struct rte_eth_dev *dev,
@@ -137 +138 @@
-@@ -1820,6 +1831,8 @@ flow_verbs_translate(struct rte_eth_dev *dev,
+@@ -1863,6 +1874,8 @@ flow_verbs_translate(struct rte_eth_dev *dev,
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/mlx5: relax headroom assertion' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (18 preceding siblings ...)
2022-02-18 12:37 ` patch 'net/mlx5: fix GRE protocol type translation for Verbs' " luca.boccassi
@ 2022-02-18 12:37 ` luca.boccassi
2022-02-18 12:37 ` patch 'net/bnxt: fix xstats names query overrun' " luca.boccassi
` (102 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:37 UTC (permalink / raw)
To: Dmitry Kozlyuk; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/66aa6f946717b3391a7aafe04a9909f4f248a465
Thanks.
Luca Boccassi
---
From 66aa6f946717b3391a7aafe04a9909f4f248a465 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 e4dfb82822..d7e5d194e3 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -207,6 +207,7 @@ rxq_alloc_elts_sprq(struct mlx5_rxq_ctrl *rxq_ctrl)
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);
+ bool has_vec_support = mlx5_rxq_check_vec_support(&rxq_ctrl->rxq) > 0;
unsigned int i;
int err;
@@ -222,8 +223,9 @@ rxq_alloc_elts_sprq(struct mlx5_rxq_ctrl *rxq_ctrl)
rte_errno = ENOMEM;
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);
MLX5_ASSERT(rte_pktmbuf_pkt_len(buf) == 0);
@@ -236,7 +238,7 @@ rxq_alloc_elts_sprq(struct mlx5_rxq_ctrl *rxq_ctrl)
(*rxq_ctrl->rxq.elts)[i] = buf;
}
/* 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;
struct rte_pktmbuf_pool_private *priv =
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:38.972455641 +0000
+++ 0021-net-mlx5-relax-headroom-assertion.patch 2022-02-18 12:37:37.558788972 +0000
@@ -1 +1 @@
-From 637582afcc886fc53c1dc7a3686cc771abad2cfd Mon Sep 17 00:00:00 2001
+From 66aa6f946717b3391a7aafe04a9909f4f248a465 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 637582afcc886fc53c1dc7a3686cc771abad2cfd ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index eda609dd78..ee07c610b9 100644
+index e4dfb82822..d7e5d194e3 100644
@@ -29,4 +30,4 @@
-@@ -140,6 +140,7 @@ rxq_alloc_elts_sprq(struct mlx5_rxq_ctrl *rxq_ctrl)
- RTE_BIT32(rxq_ctrl->rxq.elts_n) *
- RTE_BIT32(rxq_ctrl->rxq.log_strd_num) :
- RTE_BIT32(rxq_ctrl->rxq.elts_n);
+@@ -207,6 +207,7 @@ rxq_alloc_elts_sprq(struct mlx5_rxq_ctrl *rxq_ctrl)
+ 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);
@@ -37 +38 @@
-@@ -161,8 +162,9 @@ rxq_alloc_elts_sprq(struct mlx5_rxq_ctrl *rxq_ctrl)
+@@ -222,8 +223,9 @@ rxq_alloc_elts_sprq(struct mlx5_rxq_ctrl *rxq_ctrl)
@@ -49 +50 @@
-@@ -175,7 +177,7 @@ rxq_alloc_elts_sprq(struct mlx5_rxq_ctrl *rxq_ctrl)
+@@ -236,7 +238,7 @@ rxq_alloc_elts_sprq(struct mlx5_rxq_ctrl *rxq_ctrl)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/bnxt: fix xstats names query overrun' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (19 preceding siblings ...)
2022-02-18 12:37 ` patch 'net/mlx5: relax headroom assertion' " luca.boccassi
@ 2022-02-18 12:37 ` luca.boccassi
2022-02-18 12:37 ` patch 'net/bnxt: fix multicast address set' " luca.boccassi
` (101 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:37 UTC (permalink / raw)
To: Lance Richardson; +Cc: Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e2c9b9902d30d697c673d93678ee8586e5427a79
Thanks.
Luca Boccassi
---
From e2c9b9902d30d697c673d93678ee8586e5427a79 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 47dcf40893..a35461677c 100644
--- a/drivers/net/bnxt/bnxt_stats.c
+++ b/drivers/net/bnxt/bnxt_stats.c
@@ -840,7 +840,7 @@ 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;
const unsigned int stat_cnt = RTE_DIM(bnxt_rx_stats_strings) +
@@ -856,64 +856,63 @@ int bnxt_dev_xstats_get_names_op(struct rte_eth_dev *eth_dev,
if (rc)
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++;
- }
- }
}
return stat_cnt;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:39.007120044 +0000
+++ 0022-net-bnxt-fix-xstats-names-query-overrun.patch 2022-02-18 12:37:37.558788972 +0000
@@ -1 +1 @@
-From 8dcee14fbfca8c90cd09c88e0fda65819d82ded6 Mon Sep 17 00:00:00 2001
+From e2c9b9902d30d697c673d93678ee8586e5427a79 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8dcee14fbfca8c90cd09c88e0fda65819d82ded6 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 991eafc644..197fd7c02b 100644
+index 47dcf40893..a35461677c 100644
@@ -28 +29 @@
-@@ -846,7 +846,7 @@ int bnxt_flow_stats_cnt(struct bnxt *bp)
+@@ -840,7 +840,7 @@ int bnxt_flow_stats_cnt(struct bnxt *bp)
@@ -37 +38 @@
-@@ -862,64 +862,63 @@ int bnxt_dev_xstats_get_names_op(struct rte_eth_dev *eth_dev,
+@@ -856,64 +856,63 @@ int bnxt_dev_xstats_get_names_op(struct rte_eth_dev *eth_dev,
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/bnxt: fix multicast address set' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (20 preceding siblings ...)
2022-02-18 12:37 ` patch 'net/bnxt: fix xstats names query overrun' " luca.boccassi
@ 2022-02-18 12:37 ` luca.boccassi
2022-02-18 12:37 ` patch 'net/bnxt: fix multicast MAC restore during reset recovery' " luca.boccassi
` (100 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:37 UTC (permalink / raw)
To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/5ee96222abf74f19cd6f447ba1e844a9d069db05
Thanks.
Luca Boccassi
---
From 5ee96222abf74f19cd6f447ba1e844a9d069db05 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 9a54305dde..823a764191 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -854,6 +854,11 @@ struct bnxt {
uint16_t tx_cfa_action;
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;
};
static
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index e67e83ea7a..f0b678fc97 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -2771,9 +2771,8 @@ bnxt_dev_set_mc_addr_list_op(struct rte_eth_dev *eth_dev,
uint32_t nb_mc_addr)
{
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;
rc = is_bnxt_in_error(bp);
@@ -2782,6 +2781,8 @@ 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;
goto allmulti;
@@ -2789,14 +2790,10 @@ 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
vnic->flags &= ~BNXT_VNIC_INFO_MCAST;
@@ -4780,6 +4777,23 @@ static int bnxt_setup_mac_addr(struct rte_eth_dev *eth_dev)
/* Copy the permanent MAC from the FUNC_QCAPS response */
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;
}
@@ -5818,6 +5832,8 @@ bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev)
if (!reconfig_dev) {
bnxt_free_hwrm_resources(bp);
bnxt_free_error_recovery_info(bp);
+ rte_free(bp->mcast_addr_list);
+ bp->mcast_addr_list = NULL;
}
bnxt_uninit_ctx_mem(bp);
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 0248f7d34d..6a3f710d2e 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -391,8 +391,8 @@ int bnxt_hwrm_cfa_l2_set_rx_mask(struct bnxt *bp,
mask |= HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_ALL_MCAST;
} 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) {
if (!(mask & HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_VLAN_NONVLAN))
diff --git a/drivers/net/bnxt/bnxt_vnic.c b/drivers/net/bnxt/bnxt_vnic.c
index 40cad0fd67..53db277ead 100644
--- a/drivers/net/bnxt/bnxt_vnic.c
+++ b/drivers/net/bnxt/bnxt_vnic.c
@@ -126,8 +126,7 @@ int bnxt_alloc_vnic_attributes(struct bnxt *bp)
int i;
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_THOR(bp))
rss_table_size = BNXT_RSS_TBL_SIZE_THOR *
@@ -169,10 +168,6 @@ 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 07c7aeac0d..b5bba81fcf 100644
--- a/drivers/net/bnxt/bnxt_vnic.h
+++ b/drivers/net/bnxt/bnxt_vnic.h
@@ -32,10 +32,6 @@ struct bnxt_vnic_info {
uint16_t *rss_table;
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)
#define BNXT_VNIC_INFO_ALLMULTI (1 << 1)
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:39.039607870 +0000
+++ 0023-net-bnxt-fix-multicast-address-set.patch 2022-02-18 12:37:37.570789240 +0000
@@ -1 +1 @@
-From 4dc9409e01b41a8cd8d53bcc38344666fd42a7c9 Mon Sep 17 00:00:00 2001
+From 5ee96222abf74f19cd6f447ba1e844a9d069db05 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4dc9409e01b41a8cd8d53bcc38344666fd42a7c9 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -32 +33 @@
-index 234161053f..521fcb7af3 100644
+index 9a54305dde..823a764191 100644
@@ -35 +36 @@
-@@ -891,6 +891,11 @@ struct bnxt {
+@@ -854,6 +854,11 @@ struct bnxt {
@@ -48 +49 @@
-index f79f33ab4e..50ffa30577 100644
+index e67e83ea7a..f0b678fc97 100644
@@ -51 +52 @@
-@@ -2831,9 +2831,8 @@ bnxt_dev_set_mc_addr_list_op(struct rte_eth_dev *eth_dev,
+@@ -2771,9 +2771,8 @@ bnxt_dev_set_mc_addr_list_op(struct rte_eth_dev *eth_dev,
@@ -62 +63 @@
-@@ -2842,6 +2841,8 @@ bnxt_dev_set_mc_addr_list_op(struct rte_eth_dev *eth_dev,
+@@ -2782,6 +2781,8 @@ bnxt_dev_set_mc_addr_list_op(struct rte_eth_dev *eth_dev,
@@ -71 +72 @@
-@@ -2849,14 +2850,10 @@ bnxt_dev_set_mc_addr_list_op(struct rte_eth_dev *eth_dev,
+@@ -2789,14 +2790,10 @@ bnxt_dev_set_mc_addr_list_op(struct rte_eth_dev *eth_dev,
@@ -89 +90 @@
-@@ -5016,6 +5013,23 @@ static int bnxt_setup_mac_addr(struct rte_eth_dev *eth_dev)
+@@ -4780,6 +4777,23 @@ static int bnxt_setup_mac_addr(struct rte_eth_dev *eth_dev)
@@ -113 +114 @@
-@@ -5916,6 +5930,8 @@ bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev)
+@@ -5818,6 +5832,8 @@ bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev)
@@ -123 +124 @@
-index 7bcf36c9cb..568f77a87e 100644
+index 0248f7d34d..6a3f710d2e 100644
@@ -126 +127 @@
-@@ -506,8 +506,8 @@ int bnxt_hwrm_cfa_l2_set_rx_mask(struct bnxt *bp,
+@@ -391,8 +391,8 @@ int bnxt_hwrm_cfa_l2_set_rx_mask(struct bnxt *bp,
@@ -138 +139 @@
-index c63cf4b943..e05dc241dc 100644
+index 40cad0fd67..53db277ead 100644
@@ -149,2 +150,2 @@
- if (BNXT_CHIP_P5(bp))
- rss_table_size = BNXT_RSS_TBL_SIZE_P5 *
+ if (BNXT_CHIP_THOR(bp))
+ rss_table_size = BNXT_RSS_TBL_SIZE_THOR *
@@ -163 +164 @@
-index 37b452f281..af3a2dd779 100644
+index 07c7aeac0d..b5bba81fcf 100644
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/bnxt: fix multicast MAC restore during reset recovery' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (21 preceding siblings ...)
2022-02-18 12:37 ` patch 'net/bnxt: fix multicast address set' " luca.boccassi
@ 2022-02-18 12:37 ` luca.boccassi
2022-02-18 12:37 ` patch 'net/bnxt: fix queue stop operation' " luca.boccassi
` (99 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:37 UTC (permalink / raw)
To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/3ea46b608a05d7bd8ea3472cd29ea1a9fe25fd3a
Thanks.
Luca Boccassi
---
From 3ea46b608a05d7bd8ea3472cd29ea1a9fe25fd3a 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 f0b678fc97..6c224583c6 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -4065,6 +4065,18 @@ static int bnxt_restore_mac_filters(struct bnxt *bp)
return 0;
}
+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)
{
struct rte_eth_dev *dev = bp->eth_dev;
@@ -4086,7 +4098,13 @@ static int bnxt_restore_filters(struct bnxt *bp)
return ret;
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.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:39.083097207 +0000
+++ 0024-net-bnxt-fix-multicast-MAC-restore-during-reset-reco.patch 2022-02-18 12:37:37.574789329 +0000
@@ -1 +1 @@
-From 04689bdb65adf1121321dda9052cb4063476a2d3 Mon Sep 17 00:00:00 2001
+From 3ea46b608a05d7bd8ea3472cd29ea1a9fe25fd3a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 04689bdb65adf1121321dda9052cb4063476a2d3 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 50ffa30577..bac96001a4 100644
+index f0b678fc97..6c224583c6 100644
@@ -23 +24 @@
-@@ -4261,6 +4261,18 @@ static int bnxt_restore_mac_filters(struct bnxt *bp)
+@@ -4065,6 +4065,18 @@ static int bnxt_restore_mac_filters(struct bnxt *bp)
@@ -42 +43 @@
-@@ -4282,7 +4294,13 @@ static int bnxt_restore_filters(struct bnxt *bp)
+@@ -4086,7 +4098,13 @@ static int bnxt_restore_filters(struct bnxt *bp)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/bnxt: fix queue stop operation' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (22 preceding siblings ...)
2022-02-18 12:37 ` patch 'net/bnxt: fix multicast MAC restore during reset recovery' " luca.boccassi
@ 2022-02-18 12:37 ` luca.boccassi
2022-02-18 12:37 ` patch 'net/bnxt: restore RSS configuration after reset recovery' " luca.boccassi
` (98 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:37 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 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/c612a4bbf3a2dbf2283eefccda3596c704f8476e
Thanks.
Luca Boccassi
---
From c612a4bbf3a2dbf2283eefccda3596c704f8476e 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 6a3f710d2e..e6571e3ba7 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -5961,3 +5961,26 @@ int bnxt_hwrm_poll_ver_get(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 934a2056b8..926f32df05 100644
--- a/drivers/net/bnxt/bnxt_hwrm.h
+++ b/drivers/net/bnxt/bnxt_hwrm.h
@@ -297,4 +297,5 @@ int bnxt_hwrm_poll_ver_get(struct bnxt *bp);
int bnxt_hwrm_ring_stats(struct bnxt *bp, uint32_t cid, int idx,
struct bnxt_ring_stats *stats, bool rx);
int bnxt_hwrm_rx_ring_reset(struct bnxt *bp, int queue_index);
+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 a2feb525c4..aa73bd25e1 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -546,6 +546,9 @@ int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)
if (active_queue_cnt == 0) {
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. */
bnxt_hwrm_vnic_cfg(bp, vnic);
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:39.119172284 +0000
+++ 0025-net-bnxt-fix-queue-stop-operation.patch 2022-02-18 12:37:37.582789508 +0000
@@ -1 +1 @@
-From 3e6fae2b65aa778dba5059ec0bc92102f05adc54 Mon Sep 17 00:00:00 2001
+From c612a4bbf3a2dbf2283eefccda3596c704f8476e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3e6fae2b65aa778dba5059ec0bc92102f05adc54 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 568f77a87e..6093407986 100644
+index 6a3f710d2e..e6571e3ba7 100644
@@ -26 +27 @@
-@@ -6262,3 +6262,26 @@ int bnxt_hwrm_config_host_mtu(struct bnxt *bp)
+@@ -5961,3 +5961,26 @@ int bnxt_hwrm_poll_ver_get(struct bnxt *bp)
@@ -54 +55 @@
-index f8f0556201..8202455bf0 100644
+index 934a2056b8..926f32df05 100644
@@ -57,4 +58,4 @@
-@@ -310,4 +310,5 @@ int bnxt_hwrm_stat_ctx_alloc(struct bnxt *bp, struct bnxt_cp_ring_info *cpr);
- 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);
+@@ -297,4 +297,5 @@ int bnxt_hwrm_poll_ver_get(struct bnxt *bp);
+ int bnxt_hwrm_ring_stats(struct bnxt *bp, uint32_t cid, int idx,
+ struct bnxt_ring_stats *stats, bool rx);
+ int bnxt_hwrm_rx_ring_reset(struct bnxt *bp, int queue_index);
@@ -64 +65 @@
-index 1456f8b54f..c9d99039ad 100644
+index a2feb525c4..aa73bd25e1 100644
@@ -67 +68 @@
-@@ -574,6 +574,9 @@ int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)
+@@ -546,6 +546,9 @@ int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/bnxt: restore RSS configuration after reset recovery' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (23 preceding siblings ...)
2022-02-18 12:37 ` patch 'net/bnxt: fix queue stop operation' " luca.boccassi
@ 2022-02-18 12:37 ` luca.boccassi
2022-02-18 12:37 ` patch 'net/bnxt: fix restoring VLAN filtering after " luca.boccassi
` (97 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:37 UTC (permalink / raw)
To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/7275db81e80e36759e092cdf368833dcc6d3c4e0
Thanks.
Luca Boccassi
---
From 7275db81e80e36759e092cdf368833dcc6d3c4e0 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 | 36 ++++++++++++++++++++++++++++++----
drivers/net/bnxt/bnxt_rxq.c | 2 +-
drivers/net/bnxt/bnxt_vnic.c | 9 +++++++--
drivers/net/bnxt/bnxt_vnic.h | 2 +-
5 files changed, 43 insertions(+), 8 deletions(-)
diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 823a764191..b37b338349 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -859,6 +859,8 @@ struct bnxt {
struct rte_ether_addr *mcast_addr_list;
rte_iova_t mc_list_dma_addr;
uint32_t nb_mc_addr;
+
+ struct rte_eth_rss_conf rss_conf; /* RSS configuration. */
};
static
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 6c224583c6..0c00f25f5b 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -379,7 +379,7 @@ static int bnxt_alloc_mem(struct bnxt *bp, bool reconfig)
if (rc)
goto alloc_mem_err;
- rc = bnxt_alloc_vnic_attributes(bp);
+ rc = bnxt_alloc_vnic_attributes(bp, reconfig);
if (rc)
goto alloc_mem_err;
@@ -1074,6 +1074,7 @@ 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;
bp->rx_queues = (void *)eth_dev->data->rx_queues;
@@ -1155,6 +1156,18 @@ static int bnxt_dev_configure_op(struct rte_eth_dev *eth_dev)
BNXT_NUM_VLANS;
bnxt_mtu_set_op(eth_dev, eth_dev->data->mtu);
}
+
+ /* 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;
+
return 0;
resource_error:
@@ -2066,9 +2079,6 @@ 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) */
vnic = BNXT_GET_DEFAULT_VNIC(bp);
@@ -2077,6 +2087,9 @@ static int bnxt_rss_hash_update_op(struct rte_eth_dev *eth_dev,
bnxt_rte_to_hwrm_hash_level(bp, rss_conf->rss_hf,
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
* hashkey
@@ -2092,6 +2105,9 @@ 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);
return rc;
@@ -5201,6 +5217,16 @@ 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)
return rc;
@@ -5852,6 +5878,8 @@ bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev)
bnxt_free_error_recovery_info(bp);
rte_free(bp->mcast_addr_list);
bp->mcast_addr_list = NULL;
+ rte_free(bp->rss_conf.rss_key);
+ bp->rss_conf.rss_key = NULL;
}
bnxt_uninit_ctx_mem(bp);
diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index aa73bd25e1..e057393b2b 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -137,7 +137,7 @@ skip_filter_allocation:
bp->rx_num_qs_per_vnic = nb_q_per_grp;
if (dev_conf->rxmode.mq_mode & 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)
bp->flags &= ~BNXT_FLAG_UPDATE_HASH;
diff --git a/drivers/net/bnxt/bnxt_vnic.c b/drivers/net/bnxt/bnxt_vnic.c
index 53db277ead..f18e672dca 100644
--- a/drivers/net/bnxt/bnxt_vnic.c
+++ b/drivers/net/bnxt/bnxt_vnic.c
@@ -114,7 +114,7 @@ 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;
struct rte_pci_device *pdev = bp->pdev;
@@ -168,7 +168,12 @@ 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);
+ }
}
return 0;
diff --git a/drivers/net/bnxt/bnxt_vnic.h b/drivers/net/bnxt/bnxt_vnic.h
index b5bba81fcf..785db8f0cd 100644
--- a/drivers/net/bnxt/bnxt_vnic.h
+++ b/drivers/net/bnxt/bnxt_vnic.h
@@ -60,7 +60,7 @@ int bnxt_free_vnic(struct bnxt *bp, struct bnxt_vnic_info *vnic,
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);
int bnxt_vnic_grp_alloc(struct bnxt *bp, struct bnxt_vnic_info *vnic);
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:39.155907409 +0000
+++ 0026-net-bnxt-restore-RSS-configuration-after-reset-recov.patch 2022-02-18 12:37:37.586789597 +0000
@@ -1 +1 @@
-From 9b4353bec3d17d241e511f7d6917417fd395c462 Mon Sep 17 00:00:00 2001
+From 7275db81e80e36759e092cdf368833dcc6d3c4e0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9b4353bec3d17d241e511f7d6917417fd395c462 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
- drivers/net/bnxt/bnxt_ethdev.c | 35 ++++++++++++++++++++++++++++++----
+ drivers/net/bnxt/bnxt_ethdev.c | 36 ++++++++++++++++++++++++++++++----
@@ -24 +25 @@
- 5 files changed, 42 insertions(+), 8 deletions(-)
+ 5 files changed, 43 insertions(+), 8 deletions(-)
@@ -27 +28 @@
-index 521fcb7af3..614ea57d87 100644
+index 823a764191..b37b338349 100644
@@ -30 +31 @@
-@@ -896,6 +896,8 @@ struct bnxt {
+@@ -859,6 +859,8 @@ struct bnxt {
@@ -40 +41 @@
-index bac96001a4..dcf2839215 100644
+index 6c224583c6..0c00f25f5b 100644
@@ -43 +44 @@
-@@ -368,7 +368,7 @@ static int bnxt_alloc_mem(struct bnxt *bp, bool reconfig)
+@@ -379,7 +379,7 @@ static int bnxt_alloc_mem(struct bnxt *bp, bool reconfig)
@@ -52 +53 @@
-@@ -1067,6 +1067,7 @@ static int bnxt_dev_configure_op(struct rte_eth_dev *eth_dev)
+@@ -1074,6 +1074,7 @@ static int bnxt_dev_configure_op(struct rte_eth_dev *eth_dev)
@@ -60,4 +61,5 @@
-@@ -1141,6 +1142,17 @@ static int bnxt_dev_configure_op(struct rte_eth_dev *eth_dev)
- rx_offloads |= RTE_ETH_RX_OFFLOAD_RSS_HASH;
- eth_dev->data->dev_conf.rxmode.offloads = rx_offloads;
-
+@@ -1155,6 +1156,18 @@ static int bnxt_dev_configure_op(struct rte_eth_dev *eth_dev)
+ BNXT_NUM_VLANS;
+ bnxt_mtu_set_op(eth_dev, eth_dev->data->mtu);
+ }
++
@@ -75,2 +76,0 @@
- bnxt_mtu_set_op(eth_dev, eth_dev->data->mtu);
-
@@ -78 +78,3 @@
-@@ -2126,9 +2138,6 @@ static int bnxt_rss_hash_update_op(struct rte_eth_dev *eth_dev,
+
+ resource_error:
+@@ -2066,9 +2079,6 @@ static int bnxt_rss_hash_update_op(struct rte_eth_dev *eth_dev,
@@ -88 +90 @@
-@@ -2137,6 +2146,9 @@ static int bnxt_rss_hash_update_op(struct rte_eth_dev *eth_dev,
+@@ -2077,6 +2087,9 @@ static int bnxt_rss_hash_update_op(struct rte_eth_dev *eth_dev,
@@ -90 +92 @@
- RTE_ETH_RSS_LEVEL(rss_conf->rss_hf));
+ ETH_RSS_LEVEL(rss_conf->rss_hf));
@@ -98 +100 @@
-@@ -2152,6 +2164,9 @@ static int bnxt_rss_hash_update_op(struct rte_eth_dev *eth_dev,
+@@ -2092,6 +2105,9 @@ static int bnxt_rss_hash_update_op(struct rte_eth_dev *eth_dev,
@@ -108 +110 @@
-@@ -5304,6 +5319,16 @@ static int bnxt_init_resources(struct bnxt *bp, bool reconfig_dev)
+@@ -5201,6 +5217,16 @@ static int bnxt_init_resources(struct bnxt *bp, bool reconfig_dev)
@@ -125 +127 @@
-@@ -5950,6 +5975,8 @@ bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev)
+@@ -5852,6 +5878,8 @@ bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev)
@@ -135 +137 @@
-index c9d99039ad..9f1d1d4dba 100644
+index aa73bd25e1..e057393b2b 100644
@@ -138 +140 @@
-@@ -148,7 +148,7 @@ skip_filter_allocation:
+@@ -137,7 +137,7 @@ skip_filter_allocation:
@@ -141 +143 @@
- if (dev_conf->rxmode.mq_mode & RTE_ETH_MQ_RX_RSS_FLAG) {
+ if (dev_conf->rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG) {
@@ -148 +150 @@
-index e05dc241dc..09d67ef885 100644
+index 53db277ead..f18e672dca 100644
@@ -175 +177 @@
-index af3a2dd779..25481fcbdd 100644
+index b5bba81fcf..785db8f0cd 100644
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/bnxt: fix restoring VLAN filtering after recovery' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (24 preceding siblings ...)
2022-02-18 12:37 ` patch 'net/bnxt: restore RSS configuration after reset recovery' " luca.boccassi
@ 2022-02-18 12:37 ` luca.boccassi
2022-02-18 12:37 ` patch 'net/bnxt: cap maximum number of unicast MAC addresses' " luca.boccassi
` (96 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:37 UTC (permalink / raw)
To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/fa8cc81989ee756f18d9b3f99aa35b9fb930c18d
Thanks.
Luca Boccassi
---
From fa8cc81989ee756f18d9b3f99aa35b9fb930c18d 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 0c00f25f5b..0168481663 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -4113,8 +4113,9 @@ static int bnxt_restore_filters(struct bnxt *bp)
if (ret)
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;
ret = bnxt_restore_mcast_mac_filters(bp);
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:39.193101191 +0000
+++ 0027-net-bnxt-fix-restoring-VLAN-filtering-after-recovery.patch 2022-02-18 12:37:37.594789776 +0000
@@ -1 +1 @@
-From 8717548934d89498b9c679221d9a24996034b128 Mon Sep 17 00:00:00 2001
+From fa8cc81989ee756f18d9b3f99aa35b9fb930c18d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8717548934d89498b9c679221d9a24996034b128 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index dcf2839215..99a7d35470 100644
+index 0c00f25f5b..0168481663 100644
@@ -30 +31 @@
-@@ -4308,8 +4308,9 @@ static int bnxt_restore_filters(struct bnxt *bp)
+@@ -4113,8 +4113,9 @@ static int bnxt_restore_filters(struct bnxt *bp)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/bnxt: cap maximum number of unicast MAC addresses' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (25 preceding siblings ...)
2022-02-18 12:37 ` patch 'net/bnxt: fix restoring VLAN filtering after " luca.boccassi
@ 2022-02-18 12:37 ` luca.boccassi
2022-02-18 12:37 ` patch 'net/bnxt: add null check for mark table' " luca.boccassi
` (95 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:37 UTC (permalink / raw)
To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/5889a24544457b11abaccd66f24fc28c0bdbe872
Thanks.
Luca Boccassi
---
From 5889a24544457b11abaccd66f24fc28c0bdbe872 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 0168481663..cc9cf6c0ea 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -964,7 +964,7 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
return rc;
/* 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;
/* PF/VF specifics */
@@ -4781,11 +4781,15 @@ static int bnxt_alloc_stats_mem(struct bnxt *bp)
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) {
PMD_DRV_LOG(ERR, "Failed to alloc MAC addr tbl\n");
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:39.228919121 +0000
+++ 0028-net-bnxt-cap-maximum-number-of-unicast-MAC-addresses.patch 2022-02-18 12:37:37.598789865 +0000
@@ -1 +1 @@
-From 604a6be6b6c70cafdf055129d7d141d84509ad90 Mon Sep 17 00:00:00 2001
+From 5889a24544457b11abaccd66f24fc28c0bdbe872 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 604a6be6b6c70cafdf055129d7d141d84509ad90 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 99a7d35470..82350a5008 100644
+index 0168481663..cc9cf6c0ea 100644
@@ -26 +27 @@
-@@ -954,7 +954,7 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
+@@ -964,7 +964,7 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
@@ -35 +36 @@
-@@ -5016,11 +5016,15 @@ static int bnxt_alloc_stats_mem(struct bnxt *bp)
+@@ -4781,11 +4781,15 @@ static int bnxt_alloc_stats_mem(struct bnxt *bp)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/bnxt: add null check for mark table' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (26 preceding siblings ...)
2022-02-18 12:37 ` patch 'net/bnxt: cap maximum number of unicast MAC addresses' " luca.boccassi
@ 2022-02-18 12:37 ` luca.boccassi
2022-02-18 12:37 ` patch 'net/bnxt: get maximum supported multicast filters count' " luca.boccassi
` (94 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:37 UTC (permalink / raw)
To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/893c784eef7036066057d3886c53ef66279a1c4c
Thanks.
Luca Boccassi
---
From 893c784eef7036066057d3886c53ef66279a1c4c 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 43cb8057da..f923b35ce2 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -760,6 +760,9 @@ 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)
return;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:39.264424973 +0000
+++ 0029-net-bnxt-add-null-check-for-mark-table.patch 2022-02-18 12:37:37.598789865 +0000
@@ -1 +1 @@
-From 8a553bdf261f4e05a774d243bf0278ac1baf55c8 Mon Sep 17 00:00:00 2001
+From 893c784eef7036066057d3886c53ef66279a1c4c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8a553bdf261f4e05a774d243bf0278ac1baf55c8 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 44247d7200..9621809bd9 100644
+index 43cb8057da..f923b35ce2 100644
@@ -25 +26 @@
-@@ -824,6 +824,9 @@ void bnxt_set_mark_in_mbuf(struct bnxt *bp,
+@@ -760,6 +760,9 @@ void bnxt_set_mark_in_mbuf(struct bnxt *bp,
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/bnxt: get maximum supported multicast filters count' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (27 preceding siblings ...)
2022-02-18 12:37 ` patch 'net/bnxt: add null check for mark table' " luca.boccassi
@ 2022-02-18 12:37 ` luca.boccassi
2022-02-18 12:38 ` patch 'net/bnxt: fix handling of VF configuration change' " luca.boccassi
` (93 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:37 UTC (permalink / raw)
To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/ef80ca417e15ef77e7d8532d2d2300ef55bb3616
Thanks.
Luca Boccassi
---
From ef80ca417e15ef77e7d8532d2d2300ef55bb3616 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 b37b338349..5f5bad0f1b 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -855,10 +855,11 @@ struct bnxt {
struct bnxt_ring_stats *prev_rx_ring_stats;
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 e6571e3ba7..225bcf0881 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -799,6 +799,8 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
PMD_DRV_LOG(DEBUG, "Max l2_cntxts is %d vnics is %d\n",
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);
if (flags & HWRM_FUNC_QCAPS_OUTPUT_FLAGS_PTP_SUPPORTED) {
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:39.296198479 +0000
+++ 0030-net-bnxt-get-maximum-supported-multicast-filters-cou.patch 2022-02-18 12:37:37.606790044 +0000
@@ -1 +1 @@
-From bc9b2c20d29eea7cf1fbf098d69016bc4edb8c2e Mon Sep 17 00:00:00 2001
+From ef80ca417e15ef77e7d8532d2d2300ef55bb3616 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bc9b2c20d29eea7cf1fbf098d69016bc4edb8c2e ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 3df80f50db..64866de319 100644
+index b37b338349..5f5bad0f1b 100644
@@ -27 +28 @@
-@@ -889,10 +889,11 @@ struct bnxt {
+@@ -855,10 +855,11 @@ struct bnxt {
@@ -41 +42 @@
-index f90c22a9f7..b8c0cf50ad 100644
+index e6571e3ba7..225bcf0881 100644
@@ -44 +45 @@
-@@ -914,6 +914,8 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
+@@ -799,6 +799,8 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/bnxt: fix handling of VF configuration change' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (28 preceding siblings ...)
2022-02-18 12:37 ` patch 'net/bnxt: get maximum supported multicast filters count' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'net/bnxt: fix PAM4 mask setting' " luca.boccassi
` (92 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/766d7701ba0b7e9fc7722d6e8172b91cb83c09d1
Thanks.
Luca Boccassi
---
From 766d7701ba0b7e9fc7722d6e8172b91cb83c09d1 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 | 22 ++++++++++++++++++++++
drivers/net/bnxt/bnxt_ethdev.c | 13 +++++++------
3 files changed, 32 insertions(+), 6 deletions(-)
diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 5f5bad0f1b..51044d6241 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -1026,6 +1026,9 @@ void bnxt_flow_cnt_alarm_cb(void *arg);
int bnxt_flow_stats_req(struct bnxt *bp);
int bnxt_flow_stats_cnt(struct bnxt *bp);
uint32_t bnxt_get_speed_capabilities(struct bnxt *bp);
+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);
int
bnxt_filter_ctrl_op(struct rte_eth_dev *dev,
diff --git a/drivers/net/bnxt/bnxt_cpr.c b/drivers/net/bnxt/bnxt_cpr.c
index 7bfda01b2c..50c18ee6fc 100644
--- a/drivers/net/bnxt/bnxt_cpr.c
+++ b/drivers/net/bnxt/bnxt_cpr.c
@@ -91,6 +91,26 @@ bnxt_process_default_vnic_change(struct bnxt *bp,
bnxt_rep_dev_start_op(eth_dev);
}
+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
*/
@@ -118,6 +138,8 @@ void bnxt_handle_async_event(struct bnxt *bp,
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_VF_CFG_CHANGE:
PMD_DRV_LOG(INFO, "Async event: VF config changed\n");
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:
PMD_DRV_LOG(INFO, "Port conn async event\n");
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index cc9cf6c0ea..5fd159e2db 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -964,7 +964,7 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
return rc;
/* MAC Specifics */
- dev_info->max_mac_addrs = RTE_MIN(bp->max_l2_ctx, RTE_ETH_NUM_RECEIVE_MAC_ADDR);
+ dev_info->max_mac_addrs = RTE_MIN(bp->max_l2_ctx, ETH_NUM_RECEIVE_MAC_ADDR);
dev_info->max_hash_mac_addrs = 0;
/* PF/VF specifics */
@@ -1432,7 +1432,7 @@ static int bnxt_ptp_start(struct bnxt *bp)
}
/* 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;
struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
@@ -1504,7 +1504,7 @@ static int bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
return 0;
}
-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;
uint64_t rx_offloads = eth_dev->data->dev_conf.rxmode.offloads;
@@ -1626,6 +1626,7 @@ static int bnxt_dev_close_op(struct rte_eth_dev *eth_dev)
rte_eal_alarm_cancel(bnxt_dev_reset_and_resume, (void *)bp);
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)
ret = bnxt_dev_stop_op(eth_dev);
@@ -4781,12 +4782,12 @@ static int bnxt_alloc_stats_mem(struct bnxt *bp)
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);
+ size_t max_mac_addr = RTE_MIN(bp->max_l2_ctx, ETH_NUM_RECEIVE_MAC_ADDR);
int rc = 0;
- if (bp->max_l2_ctx > RTE_ETH_NUM_RECEIVE_MAC_ADDR)
+ if (bp->max_l2_ctx > 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);
+ bp->max_l2_ctx, ETH_NUM_RECEIVE_MAC_ADDR);
eth_dev->data->mac_addrs = rte_zmalloc("bnxt_mac_addr_tbl",
RTE_ETHER_ADDR_LEN * max_mac_addr,
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:39.332922015 +0000
+++ 0031-net-bnxt-fix-handling-of-VF-configuration-change.patch 2022-02-18 12:37:37.610790133 +0000
@@ -1 +1 @@
-From 6c63f3495e3563869461ec523d13cbb7fcf67d82 Mon Sep 17 00:00:00 2001
+From 766d7701ba0b7e9fc7722d6e8172b91cb83c09d1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6c63f3495e3563869461ec523d13cbb7fcf67d82 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -22,3 +23,3 @@
- drivers/net/bnxt/bnxt_cpr.c | 25 ++++++++++++++++++++++++-
- drivers/net/bnxt/bnxt_ethdev.c | 5 +++--
- 3 files changed, 30 insertions(+), 3 deletions(-)
+ drivers/net/bnxt/bnxt_cpr.c | 22 ++++++++++++++++++++++
+ drivers/net/bnxt/bnxt_ethdev.c | 13 +++++++------
+ 3 files changed, 32 insertions(+), 6 deletions(-)
@@ -27 +28 @@
-index 64866de319..9c0dbc6af4 100644
+index 5f5bad0f1b..51044d6241 100644
@@ -30 +31,3 @@
-@@ -1068,5 +1068,8 @@ int bnxt_flow_stats_cnt(struct bnxt *bp);
+@@ -1026,6 +1026,9 @@ void bnxt_flow_cnt_alarm_cb(void *arg);
+ int bnxt_flow_stats_req(struct bnxt *bp);
+ int bnxt_flow_stats_cnt(struct bnxt *bp);
@@ -32,2 +34,0 @@
- int bnxt_flow_ops_get_op(struct rte_eth_dev *dev,
- const struct rte_flow_ops **ops);
@@ -38 +39,2 @@
- #endif
+ int
+ bnxt_filter_ctrl_op(struct rte_eth_dev *dev,
@@ -40 +42 @@
-index 593eebfb9a..9b9285b799 100644
+index 7bfda01b2c..50c18ee6fc 100644
@@ -43,2 +45,2 @@
-@@ -107,6 +107,26 @@ static void bnxt_handle_event_error_report(struct bnxt *bp,
- }
+@@ -91,6 +91,26 @@ bnxt_process_default_vnic_change(struct bnxt *bp,
+ bnxt_rep_dev_start_op(eth_dev);
@@ -70,3 +72 @@
-@@ -138,8 +158,11 @@ void bnxt_handle_async_event(struct bnxt *bp,
- PMD_DRV_LOG(INFO, "Async event: PF driver unloaded\n");
- break;
+@@ -118,6 +138,8 @@ void bnxt_handle_async_event(struct bnxt *bp,
@@ -74,3 +74 @@
-- 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);
+ PMD_DRV_LOG(INFO, "Async event: VF config changed\n");
@@ -84 +82 @@
-index cf3bd77035..999a9a5103 100644
+index cc9cf6c0ea..5fd159e2db 100644
@@ -87 +85,10 @@
-@@ -1530,7 +1530,7 @@ static int bnxt_dev_stop(struct rte_eth_dev *eth_dev)
+@@ -964,7 +964,7 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
+ return rc;
+
+ /* MAC Specifics */
+- dev_info->max_mac_addrs = RTE_MIN(bp->max_l2_ctx, RTE_ETH_NUM_RECEIVE_MAC_ADDR);
++ dev_info->max_mac_addrs = RTE_MIN(bp->max_l2_ctx, ETH_NUM_RECEIVE_MAC_ADDR);
+ dev_info->max_hash_mac_addrs = 0;
+
+ /* PF/VF specifics */
+@@ -1432,7 +1432,7 @@ static int bnxt_ptp_start(struct bnxt *bp)
@@ -95,3 +102,3 @@
-
-@@ -1546,7 +1546,7 @@ static int bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
- return bnxt_dev_stop(eth_dev);
+ struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
+@@ -1504,7 +1504,7 @@ static int bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
+ return 0;
@@ -105 +112 @@
-@@ -1678,6 +1678,7 @@ static int bnxt_dev_close_op(struct rte_eth_dev *eth_dev)
+@@ -1626,6 +1626,7 @@ static int bnxt_dev_close_op(struct rte_eth_dev *eth_dev)
@@ -112 +119,17 @@
- ret = bnxt_dev_stop(eth_dev);
+ ret = bnxt_dev_stop_op(eth_dev);
+@@ -4781,12 +4782,12 @@ static int bnxt_alloc_stats_mem(struct bnxt *bp)
+ 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);
++ size_t max_mac_addr = RTE_MIN(bp->max_l2_ctx, ETH_NUM_RECEIVE_MAC_ADDR);
+ int rc = 0;
+
+- if (bp->max_l2_ctx > RTE_ETH_NUM_RECEIVE_MAC_ADDR)
++ if (bp->max_l2_ctx > 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);
++ bp->max_l2_ctx, ETH_NUM_RECEIVE_MAC_ADDR);
+
+ eth_dev->data->mac_addrs = rte_zmalloc("bnxt_mac_addr_tbl",
+ RTE_ETHER_ADDR_LEN * max_mac_addr,
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/bnxt: fix PAM4 mask setting' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (29 preceding siblings ...)
2022-02-18 12:38 ` patch 'net/bnxt: fix handling of VF configuration change' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'net/bnxt: fix xstats query' " luca.boccassi
` (91 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: Kalesh AP, Somnath Kotur, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/52d79e82448b7b3fcec65a2184450f147ebd3b28
Thanks.
Luca Boccassi
---
From 52d79e82448b7b3fcec65a2184450f147ebd3b28 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 51044d6241..b1ed54dd35 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -299,7 +299,7 @@ struct bnxt_link_info {
uint8_t link_signal_mode;
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 225bcf0881..4dd98e6cad 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1303,16 +1303,17 @@ static int bnxt_hwrm_port_phy_cfg(struct bnxt *bp, struct bnxt_link_info *conf)
!(conf->phy_flags & HWRM_PORT_PHY_CFG_INPUT_FLAGS_FORCE)) {
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);
}
}
if (conf->auto_link_speed &&
@@ -1385,7 +1386,7 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp,
rte_le_to_cpu_16(resp->force_pam4_link_speed);
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);
HWRM_UNLOCK();
@@ -1395,7 +1396,7 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp,
link_info->support_speeds, link_info->force_link_speed);
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);
return rc;
@@ -3137,7 +3138,7 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up)
/* No auto speeds and no auto_pam4_link. Disable autoneg */
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;
speed = bnxt_parse_eth_link_speed(dev_conf->link_speeds,
@@ -3150,8 +3151,8 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up)
link_req.auto_link_speed_mask =
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 ==
HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASET ||
@@ -3170,9 +3171,9 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up)
else if (bp->link_info->force_pam4_link_speed)
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 =
bp->link_info->support_pam4_speeds;
@@ -3184,7 +3185,7 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up)
* zero. Use the auto_link_speed.
*/
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;
}
link_req.duplex = bnxt_parse_eth_link_duplex(dev_conf->link_speeds);
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:39.369987405 +0000
+++ 0032-net-bnxt-fix-PAM4-mask-setting.patch 2022-02-18 12:37:37.618790312 +0000
@@ -1 +1 @@
-From 2ca072791715726cbb645b8d6ca0eb9734910c6b Mon Sep 17 00:00:00 2001
+From 52d79e82448b7b3fcec65a2184450f147ebd3b28 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2ca072791715726cbb645b8d6ca0eb9734910c6b ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 9c0dbc6af4..433f1c80be 100644
+index 51044d6241..b1ed54dd35 100644
@@ -26 +27 @@
-@@ -297,7 +297,7 @@ struct bnxt_link_info {
+@@ -299,7 +299,7 @@ struct bnxt_link_info {
@@ -34 +35 @@
- uint8_t module_status;
+ };
@@ -36 +37 @@
-index b8c0cf50ad..5850e7e48b 100644
+index 225bcf0881..4dd98e6cad 100644
@@ -39 +40 @@
-@@ -1436,16 +1436,17 @@ static int bnxt_hwrm_port_phy_cfg(struct bnxt *bp, struct bnxt_link_info *conf)
+@@ -1303,16 +1303,17 @@ static int bnxt_hwrm_port_phy_cfg(struct bnxt *bp, struct bnxt_link_info *conf)
@@ -61 +62 @@
-@@ -1518,7 +1519,7 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp,
+@@ -1385,7 +1386,7 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp,
@@ -68 +68,0 @@
- link_info->module_status = resp->module_status;
@@ -70 +70,2 @@
-@@ -1529,7 +1530,7 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp,
+
+@@ -1395,7 +1396,7 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp,
@@ -79 +80 @@
-@@ -3245,7 +3246,7 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up)
+@@ -3137,7 +3138,7 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up)
@@ -88 +89 @@
-@@ -3258,8 +3259,8 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up)
+@@ -3150,8 +3151,8 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up)
@@ -99 +100 @@
-@@ -3278,9 +3279,9 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up)
+@@ -3170,9 +3171,9 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up)
@@ -111 +112 @@
-@@ -3292,7 +3293,7 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up)
+@@ -3184,7 +3185,7 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/bnxt: fix xstats query' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (30 preceding siblings ...)
2022-02-18 12:38 ` patch 'net/bnxt: fix PAM4 mask setting' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'net/bnxt: check VF representor pointer before access' " luca.boccassi
` (90 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/31080d4c6216c9f8abfe6107235324a878c01eb2
Thanks.
Luca Boccassi
---
From 31080d4c6216c9f8abfe6107235324a878c01eb2 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 a35461677c..41997fcaa5 100644
--- a/drivers/net/bnxt/bnxt_stats.c
+++ b/drivers/net/bnxt/bnxt_stats.c
@@ -735,7 +735,7 @@ int bnxt_dev_xstats_get_op(struct rte_eth_dev *eth_dev,
(bp->fw_tx_port_stats_ext_size /
stat_size));
- memset(xstats, 0, sizeof(*xstats));
+ memset(xstats, 0, sizeof(*xstats) * n);
count = 0;
for (i = 0; i < RTE_DIM(bnxt_rx_stats_strings); i++) {
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:39.406020210 +0000
+++ 0033-net-bnxt-fix-xstats-query.patch 2022-02-18 12:37:37.618790312 +0000
@@ -1 +1 @@
-From c05c22f9b8032c2974de7042ba8c38fb42ed7c82 Mon Sep 17 00:00:00 2001
+From 31080d4c6216c9f8abfe6107235324a878c01eb2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c05c22f9b8032c2974de7042ba8c38fb42ed7c82 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 197fd7c02b..208aa5616d 100644
+index a35461677c..41997fcaa5 100644
@@ -27 +28 @@
-@@ -741,7 +741,7 @@ int bnxt_dev_xstats_get_op(struct rte_eth_dev *eth_dev,
+@@ -735,7 +735,7 @@ int bnxt_dev_xstats_get_op(struct rte_eth_dev *eth_dev,
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/bnxt: check VF representor pointer before access' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (31 preceding siblings ...)
2022-02-18 12:38 ` patch 'net/bnxt: fix xstats query' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'net/bonding: fix offloading configuration' " luca.boccassi
` (89 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: Kalesh AP, Somnath Kotur, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e93a5f44791de38dd652eeb8d5d6984188dcb3b7
Thanks.
Luca Boccassi
---
From e93a5f44791de38dd652eeb8d5d6984188dcb3b7 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 b9b0f62c9c..db780c3d2c 100644
--- a/drivers/net/bnxt/bnxt_reps.c
+++ b/drivers/net/bnxt/bnxt_reps.c
@@ -35,16 +35,20 @@ static const struct eth_dev_ops bnxt_rep_dev_ops = {
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;
rep_rxq = vfr_bp->rx_queues[que];
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:39.438341054 +0000
+++ 0034-net-bnxt-check-VF-representor-pointer-before-access.patch 2022-02-18 12:37:37.618790312 +0000
@@ -1 +1 @@
-From f30622542ccfe5e9ba31f67972e999c99e73385b Mon Sep 17 00:00:00 2001
+From e93a5f44791de38dd652eeb8d5d6984188dcb3b7 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 b9b0f62c9c..db780c3d2c 100644
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/bonding: fix offloading configuration' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (32 preceding siblings ...)
2022-02-18 12:38 ` patch 'net/bnxt: check VF representor pointer before access' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'app/testpmd: fix Tx scheduling interval' " luca.boccassi
` (88 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Chengchang Tang; +Cc: Min Hu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/8d0afb3f68968e0421f4fd819102a9b5189a4835
Thanks.
Luca Boccassi
---
From 8d0afb3f68968e0421f4fd819102a9b5189a4835 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 | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 44b2e684d2..e38d55f0d7 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1717,13 +1717,20 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev,
bonded_eth_dev->data->dev_conf.rxmode.mq_mode;
}
- if (bonded_eth_dev->data->dev_conf.rxmode.offloads &
- DEV_RX_OFFLOAD_VLAN_FILTER)
- slave_eth_dev->data->dev_conf.rxmode.offloads |=
- DEV_RX_OFFLOAD_VLAN_FILTER;
- else
- slave_eth_dev->data->dev_conf.rxmode.offloads &=
- ~DEV_RX_OFFLOAD_VLAN_FILTER;
+ 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.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:39.468928293 +0000
+++ 0035-net-bonding-fix-offloading-configuration.patch 2022-02-18 12:37:37.622790401 +0000
@@ -1 +1 @@
-From 57b156540f51a89214098e594494023e3820fa4f Mon Sep 17 00:00:00 2001
+From 8d0afb3f68968e0421f4fd819102a9b5189a4835 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 57b156540f51a89214098e594494023e3820fa4f ]
+
@@ -24 +25,0 @@
-Cc: stable@dpdk.org
@@ -29,2 +30,2 @@
- drivers/net/bonding/rte_eth_bond_pmd.c | 23 +++++++++++++++--------
- 1 file changed, 15 insertions(+), 8 deletions(-)
+ drivers/net/bonding/rte_eth_bond_pmd.c | 21 ++++++++++++++-------
+ 1 file changed, 14 insertions(+), 7 deletions(-)
@@ -33 +34 @@
-index 84f4900ee5..0f11a2f5a8 100644
+index 44b2e684d2..e38d55f0d7 100644
@@ -36 +37 @@
-@@ -1713,17 +1713,24 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev,
+@@ -1717,13 +1717,20 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev,
@@ -41 +42 @@
-- RTE_ETH_RX_OFFLOAD_VLAN_FILTER)
+- DEV_RX_OFFLOAD_VLAN_FILTER)
@@ -43 +44 @@
-- RTE_ETH_RX_OFFLOAD_VLAN_FILTER;
+- DEV_RX_OFFLOAD_VLAN_FILTER;
@@ -46,5 +47 @@
-- ~RTE_ETH_RX_OFFLOAD_VLAN_FILTER;
--
- slave_eth_dev->data->dev_conf.rxmode.mtu =
- bonded_eth_dev->data->dev_conf.rxmode.mtu;
-
+- ~DEV_RX_OFFLOAD_VLAN_FILTER;
@@ -65 +62 @@
-+
+
@@ -68 +64,0 @@
-
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'app/testpmd: fix Tx scheduling interval' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (33 preceding siblings ...)
2022-02-18 12:38 ` patch 'net/bonding: fix offloading configuration' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'net/axgbe: use PCI root complex device to distinguish device' " luca.boccassi
` (87 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Viacheslav Ovsiienko; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a26506bce105af8f8ebc8f720a3b558d4c208689
Thanks.
Luca Boccassi
---
From a26506bce105af8f8ebc8f720a3b558d4c208689 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 43e49a8069..2d4dc05332 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -137,6 +137,7 @@ struct fwd_stream {
uint64_t rx_bad_l4_csum ; /**< received packets has bad l4 checksum */
uint64_t rx_bad_outer_l4_csum;
/**< received packets has bad outer l4 checksum */
+ uint64_t ts_skew; /**< TX scheduling timestamp */
unsigned int gro_times; /**< GRO operation times */
uint64_t core_cycles; /**< used for RX and TX processing */
struct pkt_burst_stats rx_burst_stats;
diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c
index 8e242e801b..9f5087d215 100644
--- a/app/test-pmd/txonly.c
+++ b/app/test-pmd/txonly.c
@@ -60,14 +60,10 @@ uint32_t tx_ip_dst_addr = (198U << 24) | (18 << 16) | (0 << 8) | 2;
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];
static void
@@ -195,7 +191,7 @@ static inline bool
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];
struct rte_mbuf *pkt_seg;
@@ -263,11 +259,10 @@ pkt_burst_prepare(struct rte_mbuf *pkt, struct rte_mempool *mbp,
update_pkt_header(pkt, pkt_len);
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 (!skew) {
struct rte_eth_dev *dev = &rte_eth_devices[fs->tx_port];
unsigned int txqs_n = dev->data->nb_tx_queues;
uint64_t phase = tx_pkt_times_inter * fs->tx_queue /
@@ -278,8 +273,7 @@ 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);
timestamp_mark.queue_idx = rte_cpu_to_be_16(fs->tx_queue);
@@ -289,14 +283,14 @@ pkt_burst_prepare(struct rte_mbuf *pkt, struct rte_mempool *mbp,
pkt->ol_flags |= timestamp_mask;
*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) {
skew += tx_pkt_times_intra;
pkt->ol_flags |= timestamp_mask;
*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 {
timestamp_mark.ts = RTE_BE64(0);
@@ -450,7 +444,6 @@ tx_only_begin(portid_t pi)
timestamp_enable = false;
timestamp_mask = 0;
timestamp_off = -1;
- RTE_PER_LCORE(timestamp_qskew) = 0;
dynf = rte_mbuf_dynflag_lookup
(RTE_MBUF_DYNFLAG_TX_TIMESTAMP_NAME, NULL);
if (dynf >= 0)
@@ -493,7 +486,6 @@ tx_only_begin(portid_t pi)
return -EINVAL;
}
}
- timestamp_init_req++;
}
/* Make sure all settings are visible on forwarding cores.*/
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:39.501766816 +0000
+++ 0036-app-testpmd-fix-Tx-scheduling-interval.patch 2022-02-18 12:37:37.626790491 +0000
@@ -1 +1 @@
-From 9fac5ca8edaebd0f6206193277876fdebb6f3eb2 Mon Sep 17 00:00:00 2001
+From a26506bce105af8f8ebc8f720a3b558d4c208689 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9fac5ca8edaebd0f6206193277876fdebb6f3eb2 ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index 2149ecd93a..9967825044 100644
+index 43e49a8069..2d4dc05332 100644
@@ -33 +34,3 @@
-@@ -147,6 +147,7 @@ struct fwd_stream {
+@@ -137,6 +137,7 @@ struct fwd_stream {
+ uint64_t rx_bad_l4_csum ; /**< received packets has bad l4 checksum */
+ uint64_t rx_bad_outer_l4_csum;
@@ -35,2 +37,0 @@
- uint64_t rx_bad_outer_ip_csum;
- /**< received packets having bad outer ip checksum */
@@ -38 +38,0 @@
- #ifdef RTE_LIB_GRO
@@ -40 +40,2 @@
- #endif
+ uint64_t core_cycles; /**< used for RX and TX processing */
+ struct pkt_burst_stats rx_burst_stats;
@@ -42 +43 @@
-index e8c0c7b926..fc039a622c 100644
+index 8e242e801b..9f5087d215 100644
@@ -45 +46 @@
-@@ -59,14 +59,10 @@ uint32_t tx_ip_dst_addr = (198U << 24) | (18 << 16) | (0 << 8) | 2;
+@@ -60,14 +60,10 @@ uint32_t tx_ip_dst_addr = (198U << 24) | (18 << 16) | (0 << 8) | 2;
@@ -60 +61 @@
-@@ -194,7 +190,7 @@ static inline bool
+@@ -195,7 +191,7 @@ static inline bool
@@ -69 +70 @@
-@@ -262,11 +258,10 @@ pkt_burst_prepare(struct rte_mbuf *pkt, struct rte_mempool *mbp,
+@@ -263,11 +259,10 @@ pkt_burst_prepare(struct rte_mbuf *pkt, struct rte_mempool *mbp,
@@ -79,5 +80,5 @@
-+ if (unlikely(!skew)) {
- struct rte_eth_dev_info dev_info;
- unsigned int txqs_n;
- uint64_t phase;
-@@ -289,8 +284,7 @@ pkt_burst_prepare(struct rte_mbuf *pkt, struct rte_mempool *mbp,
++ if (!skew) {
+ struct rte_eth_dev *dev = &rte_eth_devices[fs->tx_port];
+ unsigned int txqs_n = dev->data->nb_tx_queues;
+ uint64_t phase = tx_pkt_times_inter * fs->tx_queue /
+@@ -278,8 +273,7 @@ pkt_burst_prepare(struct rte_mbuf *pkt, struct rte_mempool *mbp,
@@ -93 +94 @@
-@@ -300,14 +294,14 @@ pkt_burst_prepare(struct rte_mbuf *pkt, struct rte_mempool *mbp,
+@@ -289,14 +283,14 @@ pkt_burst_prepare(struct rte_mbuf *pkt, struct rte_mempool *mbp,
@@ -110 +111 @@
-@@ -461,7 +455,6 @@ tx_only_begin(portid_t pi)
+@@ -450,7 +444,6 @@ tx_only_begin(portid_t pi)
@@ -118 +119 @@
-@@ -504,7 +497,6 @@ tx_only_begin(portid_t pi)
+@@ -493,7 +486,6 @@ tx_only_begin(portid_t pi)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/axgbe: use PCI root complex device to distinguish device' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (34 preceding siblings ...)
2022-02-18 12:38 ` patch 'app/testpmd: fix Tx scheduling interval' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'net/af_xdp: fix build with -Wunused-function' " luca.boccassi
` (86 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Chandubabu Namburu; +Cc: Selwin Sebastian, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a5018b1aa636999e8b7cf3c1f9e06113e7a28714
Thanks.
Luca Boccassi
---
From a5018b1aa636999e8b7cf3c1f9e06113e7a28714 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 9932d725ef..6e63d7673b 100644
--- a/drivers/net/axgbe/axgbe_ethdev.c
+++ b/drivers/net/axgbe/axgbe_ethdev.c
@@ -10,6 +10,8 @@
#include "axgbe_regs.h"
#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);
static int axgbe_dev_start(struct rte_eth_dev *dev);
@@ -1923,28 +1925,27 @@ static void axgbe_default_config(struct axgbe_port *pdata)
pdata->power_down = 0;
}
-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;
}
/*
@@ -1986,7 +1987,7 @@ 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;
} else {
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:39.534177636 +0000
+++ 0037-net-axgbe-use-PCI-root-complex-device-to-distinguish.patch 2022-02-18 12:37:37.626790491 +0000
@@ -1 +1 @@
-From b0db927b5ebafac7b9aa1bacaad8d464fba7d5a6 Mon Sep 17 00:00:00 2001
+From a5018b1aa636999e8b7cf3c1f9e06113e7a28714 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b0db927b5ebafac7b9aa1bacaad8d464fba7d5a6 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 76e12d12f0..e9546469f3 100644
+index 9932d725ef..6e63d7673b 100644
@@ -36 +37 @@
-@@ -2117,28 +2119,27 @@ static void axgbe_default_config(struct axgbe_port *pdata)
+@@ -1923,28 +1925,27 @@ static void axgbe_default_config(struct axgbe_port *pdata)
@@ -82 +83 @@
-@@ -2180,7 +2181,7 @@ eth_axgbe_dev_init(struct rte_eth_dev *eth_dev)
+@@ -1986,7 +1987,7 @@ eth_axgbe_dev_init(struct rte_eth_dev *eth_dev)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/af_xdp: fix build with -Wunused-function' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (35 preceding siblings ...)
2022-02-18 12:38 ` patch 'net/axgbe: use PCI root complex device to distinguish device' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'net/bonding: fix mode type mismatch' " luca.boccassi
` (85 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Ciara Loftus; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/8b6401daed4fb3a55af88ee0d9969cb4fe2ac64c
Thanks.
Luca Boccassi
---
From 8b6401daed4fb3a55af88ee0d9969cb4fe2ac64c 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 3e2e621993..a8f50b14e3 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -633,67 +633,6 @@ find_internal_resource(struct pmd_internals *port_int)
return list;
}
-/* 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)
{
@@ -920,6 +859,66 @@ static inline uintptr_t get_base_addr(struct rte_mempool *mp, uint64_t *align)
return aligned_addr;
}
+/* 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,
struct pkt_rx_queue *rxq)
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:39.567588174 +0000
+++ 0038-net-af_xdp-fix-build-with-Wunused-function.patch 2022-02-18 12:37:37.630790580 +0000
@@ -1 +1 @@
-From af8d89a0c6d5cfd4d77ec1ec224e5a72996026df Mon Sep 17 00:00:00 2001
+From 8b6401daed4fb3a55af88ee0d9969cb4fe2ac64c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit af8d89a0c6d5cfd4d77ec1ec224e5a72996026df ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 96c2c9d939..b3ed704b36 100644
+index 3e2e621993..a8f50b14e3 100644
@@ -24 +25 @@
-@@ -697,67 +697,6 @@ find_internal_resource(struct pmd_internals *port_int)
+@@ -633,67 +633,6 @@ find_internal_resource(struct pmd_internals *port_int)
@@ -92 +93 @@
-@@ -1013,6 +952,66 @@ static inline uintptr_t get_base_addr(struct rte_mempool *mp, uint64_t *align)
+@@ -920,6 +859,66 @@ static inline uintptr_t get_base_addr(struct rte_mempool *mp, uint64_t *align)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/bonding: fix mode type mismatch' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (36 preceding siblings ...)
2022-02-18 12:38 ` patch 'net/af_xdp: fix build with -Wunused-function' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'app/testpmd: fix dereference before null check' " luca.boccassi
` (84 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Yunjian Wang; +Cc: Min Hu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/239f57b000c566dce6d1b840b7efa1e2d9b7d743
Thanks.
Luca Boccassi
---
From 239f57b000c566dce6d1b840b7efa1e2d9b7d743 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 50501ba963..d7a7646194 100644
--- a/drivers/net/bonding/eth_bond_private.h
+++ b/drivers/net/bonding/eth_bond_private.h
@@ -240,7 +240,7 @@ slave_remove_mac_addresses(struct rte_eth_dev *bonded_eth_dev,
uint16_t slave_port_id);
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
slave_configure(struct rte_eth_dev *bonded_eth_dev,
diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c
index c2b0a15567..2f8d003cb0 100644
--- a/drivers/net/bonding/rte_eth_bond_api.c
+++ b/drivers/net/bonding/rte_eth_bond_api.c
@@ -668,7 +668,7 @@ __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 e38d55f0d7..be92a5e15a 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1558,7 +1558,7 @@ 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;
@@ -3300,7 +3300,7 @@ bond_alloc(struct rte_vdev_device *dev, uint8_t mode)
/* Set mode 4 default configuration */
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.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:39.600534060 +0000
+++ 0039-net-bonding-fix-mode-type-mismatch.patch 2022-02-18 12:37:37.634790670 +0000
@@ -1 +1 @@
-From cc5097b1e46ddee8df8d2210a67ec675f3807ba2 Mon Sep 17 00:00:00 2001
+From 239f57b000c566dce6d1b840b7efa1e2d9b7d743 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cc5097b1e46ddee8df8d2210a67ec675f3807ba2 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 9626b26d67..156335c425 100644
+index 50501ba963..d7a7646194 100644
@@ -39 +40 @@
-index 2d5cac6c51..8840d9e17b 100644
+index c2b0a15567..2f8d003cb0 100644
@@ -52 +53 @@
-index 0f11a2f5a8..9607141b39 100644
+index e38d55f0d7..be92a5e15a 100644
@@ -55 +56 @@
-@@ -1554,7 +1554,7 @@ mac_address_slaves_update(struct rte_eth_dev *bonded_eth_dev)
+@@ -1558,7 +1558,7 @@ mac_address_slaves_update(struct rte_eth_dev *bonded_eth_dev)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'app/testpmd: fix dereference before null check' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (37 preceding siblings ...)
2022-02-18 12:38 ` patch 'net/bonding: fix mode type mismatch' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'app/testpmd: fix external buffer allocation' " luca.boccassi
` (83 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Sean Morrissey; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a2f86fa32fc49cd5fb8b2163b13dec38d6a5a195
Thanks.
Luca Boccassi
---
From a2f86fa32fc49cd5fb8b2163b13dec38d6a5a195 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 b932d096c4..c80be57bfe 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -6411,8 +6411,8 @@ error:
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 */
if ((src == NULL) ||
@@ -6421,6 +6421,8 @@ parse_hex_string(const char *src, uint8_t *dst, uint32_t *size)
(*size == 0))
return -1;
+ left = *size;
+
/* Convert chars to bytes */
while (left) {
char tmp[3], *end = tmp;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:39.635231631 +0000
+++ 0040-app-testpmd-fix-dereference-before-null-check.patch 2022-02-18 12:37:37.638790759 +0000
@@ -1 +1 @@
-From f924a8d3bb838bffbaf2c2d47bada952e45b475f Mon Sep 17 00:00:00 2001
+From a2f86fa32fc49cd5fb8b2163b13dec38d6a5a195 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f924a8d3bb838bffbaf2c2d47bada952e45b475f ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 5c2bba48ad..bbaf18d76e 100644
+index b932d096c4..c80be57bfe 100644
@@ -23 +24 @@
-@@ -7702,8 +7702,8 @@ error:
+@@ -6411,8 +6411,8 @@ error:
@@ -33 +34 @@
-@@ -7712,6 +7712,8 @@ parse_hex_string(const char *src, uint8_t *dst, uint32_t *size)
+@@ -6421,6 +6421,8 @@ parse_hex_string(const char *src, uint8_t *dst, uint32_t *size)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'app/testpmd: fix external buffer allocation' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (38 preceding siblings ...)
2022-02-18 12:38 ` patch 'app/testpmd: fix dereference before null check' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'net/cxgbe: fix dangling pointer by mailbox access rework' " luca.boccassi
` (82 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Dmitry Kozlyuk; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a5f8244a5f867f9dc4b816d978af7e9babdf597f
Thanks.
Luca Boccassi
---
From a5f8244a5f867f9dc4b816d978af7e9babdf597f 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 697e79b2fc..7e4b96d442 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -78,7 +78,13 @@
#endif
#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. */
int testpmd_logtype; /**< Log type for testpmd logs */
@@ -926,12 +932,11 @@ setup_extbuf(uint32_t nb_mbufs, uint16_t mbuf_sz, unsigned int socket_id,
ext_num = 0;
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) {
/*
* The caller exits on external buffer creation
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:39.675115810 +0000
+++ 0041-app-testpmd-fix-external-buffer-allocation.patch 2022-02-18 12:37:37.642790848 +0000
@@ -1 +1 @@
-From 13b196425ce371a82fa8008fa46ce66861d4202b Mon Sep 17 00:00:00 2001
+From a5f8244a5f867f9dc4b816d978af7e9babdf597f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 13b196425ce371a82fa8008fa46ce66861d4202b ]
+
@@ -33 +34,0 @@
-Cc: stable@dpdk.org
@@ -42 +43 @@
-index 6c387bde84..e1da961311 100644
+index 697e79b2fc..7e4b96d442 100644
@@ -45 +46 @@
-@@ -84,7 +84,13 @@
+@@ -78,7 +78,13 @@
@@ -60 +61 @@
-@@ -1061,12 +1067,11 @@ setup_extbuf(uint32_t nb_mbufs, uint16_t mbuf_sz, unsigned int socket_id,
+@@ -926,12 +932,11 @@ setup_extbuf(uint32_t nb_mbufs, uint16_t mbuf_sz, unsigned int socket_id,
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/cxgbe: fix dangling pointer by mailbox access rework' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (39 preceding siblings ...)
2022-02-18 12:38 ` patch 'app/testpmd: fix external buffer allocation' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'net/dpaa2: fix unregistering interrupt handler' " luca.boccassi
` (81 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Rahul Lakkireddy; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b5b90b6ea320c8e7bdd486c288f89cee647920bf
Thanks.
Luca Boccassi
---
From b5b90b6ea320c8e7bdd486c288f89cee647920bf 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 6ff009a5f6..5de41110eb 100644
--- a/drivers/net/cxgbe/base/adapter.h
+++ b/drivers/net/cxgbe/base/adapter.h
@@ -297,8 +297,6 @@ struct sge {
u32 fl_starve_thres; /* Free List starvation threshold */
};
-#define T4_OS_NEEDS_MBOX_LOCKING 1
-
/*
* OS Lock/List primitives for those interfaces in the Common Code which
* need this.
diff --git a/drivers/net/cxgbe/base/t4_hw.c b/drivers/net/cxgbe/base/t4_hw.c
index 9217956b42..aa839cc1d3 100644
--- a/drivers/net/cxgbe/base/t4_hw.c
+++ b/drivers/net/cxgbe/base/t4_hw.c
@@ -264,17 +264,6 @@ 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
* @adap: the adapter
@@ -315,28 +304,17 @@ int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox,
1, 1, 3, 5, 10, 10, 20, 50, 100
};
- 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);
/*
* If we have a negative timeout, that implies that we can't sleep.
@@ -346,14 +324,17 @@ int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox,
timeout = -timeout;
}
-#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
* the front of the list, we have rights to access the mailbox. So we
* wait [for a while] till we're at the front [or bail out with an
* 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;
ms = delay[0];
@@ -368,18 +349,18 @@ 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;
}
/*
* If we're at the head, break out and start the mailbox
* protocol.
*/
- if (t4_os_list_first_entry(&adap->mbox_list) == &entry)
+ if (t4_os_list_first_entry(&adap->mbox_list) == entry)
break;
/*
@@ -394,7 +375,6 @@ int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox,
rte_delay_ms(ms);
}
}
-#endif /* T4_OS_NEEDS_MBOX_LOCKING */
/*
* Attempt to gain access to the mailbox.
@@ -411,12 +391,11 @@ int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox,
* mailbox atomic access list and report the error to our caller.
*/
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,7 +421,7 @@ 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));
CXGBE_DEBUG_MBOX(adap, "%s: mbox %u: %016llx %016llx %016llx %016llx "
@@ -513,11 +492,10 @@ int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox,
get_mbox_rpl(adap, rpl, size / 8, data_reg);
}
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,12 +506,13 @@ 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;
}
int t4_wr_mbox_meat(struct adapter *adap, int mbox, const void *cmd, int size,
diff --git a/drivers/net/cxgbe/base/t4vf_hw.c b/drivers/net/cxgbe/base/t4vf_hw.c
index 649bacfb25..7e323d9b66 100644
--- a/drivers/net/cxgbe/base/t4vf_hw.c
+++ b/drivers/net/cxgbe/base/t4vf_hw.c
@@ -83,7 +83,7 @@ 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;
const __be64 *p;
@@ -106,13 +106,17 @@ int t4vf_wr_mbox_core(struct adapter *adapter,
size > NUM_CIM_VF_MAILBOX_DATA_INSTANCES * 4)
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
* the front of the list, we have rights to access the mailbox. So we
* wait [for a while] till we're at the front [or bail out with an
* 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;
ms = delay[0];
@@ -125,17 +129,17 @@ int t4vf_wr_mbox_core(struct adapter *adapter,
* contend on access to the mailbox ...
*/
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;
}
/*
* If we're at the head, break out and start the mailbox
* protocol.
*/
- if (t4_os_list_first_entry(&adapter->mbox_list) == &entry)
+ if (t4_os_list_first_entry(&adapter->mbox_list) == entry)
break;
/*
@@ -160,10 +164,10 @@ int t4vf_wr_mbox_core(struct adapter *adapter,
v = G_MBOWNER(t4_read_reg(adapter, mbox_ctl));
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;
}
/*
@@ -224,7 +228,7 @@ int t4vf_wr_mbox_core(struct adapter *adapter,
get_mbox_rpl(adapter, cmd_rpl, size / 8, mbox_data);
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);
/* return value in high-order host-endian word */
@@ -236,7 +240,8 @@ int t4vf_wr_mbox_core(struct adapter *adapter,
& F_FW_CMD_REQUEST) == 0);
memcpy(rpl, cmd_rpl, size);
}
- return -((int)G_FW_CMD_RETVAL(v));
+ ret = -((int)G_FW_CMD_RETVAL(v));
+ goto out_free;
}
}
@@ -246,8 +251,11 @@ int t4vf_wr_mbox_core(struct adapter *adapter,
dev_err(adapter, "command %#x timed out\n",
*(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.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:39.709625492 +0000
+++ 0042-net-cxgbe-fix-dangling-pointer-by-mailbox-access-rew.patch 2022-02-18 12:37:37.650791026 +0000
@@ -1 +1 @@
-From 19cafed99ac573662045424e559cee444c175b63 Mon Sep 17 00:00:00 2001
+From b5b90b6ea320c8e7bdd486c288f89cee647920bf Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 19cafed99ac573662045424e559cee444c175b63 ]
+
@@ -35 +36,0 @@
-Cc: stable@dpdk.org
@@ -46 +47 @@
-index 1c7c8afe16..97963422bf 100644
+index 6ff009a5f6..5de41110eb 100644
@@ -49 +50 @@
-@@ -291,8 +291,6 @@ struct sge {
+@@ -297,8 +297,6 @@ struct sge {
@@ -59 +60 @@
-index cdcd7e5510..645833765a 100644
+index 9217956b42..aa839cc1d3 100644
@@ -62 +63 @@
-@@ -263,17 +263,6 @@ static void fw_asrt(struct adapter *adap, u32 mbox_addr)
+@@ -264,17 +264,6 @@ static void fw_asrt(struct adapter *adap, u32 mbox_addr)
@@ -80 +81 @@
-@@ -314,28 +303,17 @@ int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox,
+@@ -315,28 +304,17 @@ int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox,
@@ -116 +117 @@
-@@ -345,14 +323,17 @@ int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox,
+@@ -346,14 +324,17 @@ int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox,
@@ -136 +137 @@
-@@ -367,18 +348,18 @@ int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox,
+@@ -368,18 +349,18 @@ int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox,
@@ -159 +160 @@
-@@ -393,7 +374,6 @@ int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox,
+@@ -394,7 +375,6 @@ int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox,
@@ -167 +168 @@
-@@ -410,12 +390,11 @@ int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox,
+@@ -411,12 +391,11 @@ int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox,
@@ -184 +185 @@
-@@ -441,7 +420,7 @@ int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox,
+@@ -442,7 +421,7 @@ int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox,
@@ -193 +194 @@
-@@ -512,11 +491,10 @@ int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox,
+@@ -513,11 +492,10 @@ int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox,
@@ -209 +210 @@
-@@ -527,12 +505,13 @@ int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox,
+@@ -528,12 +506,13 @@ int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox,
@@ -229 +230 @@
-index 561d759dbc..7dbd4deb79 100644
+index 649bacfb25..7e323d9b66 100644
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/dpaa2: fix unregistering interrupt handler' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (40 preceding siblings ...)
2022-02-18 12:38 ` patch 'net/cxgbe: fix dangling pointer by mailbox access rework' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'net/dpaa2: fix timestamping for IEEE1588' " luca.boccassi
` (80 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Vanshika Shukla; +Cc: Hemant Agrawal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/bab9d520cbd7eb962be10cd22a042c59c3e37afd
Thanks.
Luca Boccassi
---
From bab9d520cbd7eb962be10cd22a042c59c3e37afd 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 e98d79db77..2b43cfce4e 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -1213,7 +1213,12 @@ dpaa2_dev_stop(struct rte_eth_dev *dev)
struct fsl_mc_io *dpni = (struct fsl_mc_io *)dev->process_private;
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.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:39.747034986 +0000
+++ 0043-net-dpaa2-fix-unregistering-interrupt-handler.patch 2022-02-18 12:37:37.654791116 +0000
@@ -1 +1 @@
-From d192fd321c5eeaba77ef7aab179c447d151ac9cb Mon Sep 17 00:00:00 2001
+From bab9d520cbd7eb962be10cd22a042c59c3e37afd 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 e98d79db77..2b43cfce4e 100644
@@ -22 +23 @@
-@@ -1265,7 +1265,12 @@ dpaa2_dev_stop(struct rte_eth_dev *dev)
+@@ -1213,7 +1213,12 @@ dpaa2_dev_stop(struct rte_eth_dev *dev)
@@ -32 +33 @@
-+ intr_handle = dpaa2_dev->intr_handle;
++ intr_handle = &dpaa2_dev->intr_handle;
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/dpaa2: fix timestamping for IEEE1588' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (41 preceding siblings ...)
2022-02-18 12:38 ` patch 'net/dpaa2: fix unregistering interrupt handler' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'net/mlx5: fix maximum packet headers size for TSO' " luca.boccassi
` (79 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Vanshika Shukla; +Cc: Hemant Agrawal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/1d10966a22caf15f3b61e986becbeccdb2f03b33
Thanks.
Luca Boccassi
---
From 1d10966a22caf15f3b61e986becbeccdb2f03b33 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, 38 insertions(+), 11 deletions(-)
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.h b/drivers/net/dpaa2/dpaa2_ethdev.h
index 0a8a4599c2..203d03d272 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.h
+++ b/drivers/net/dpaa2/dpaa2_ethdev.h
@@ -59,6 +59,8 @@
/* Disable RX tail drop, default is enable */
#define DPAA2_RX_TAILDROP_OFF 0x04
+/* Tx confirmation enabled */
+#define DPAA2_TX_CONF_ENABLE 0x06
#define DPAA2_RSS_OFFLOAD_ALL ( \
ETH_RSS_L2_PAYLOAD | \
diff --git a/drivers/net/dpaa2/dpaa2_ptp.c b/drivers/net/dpaa2/dpaa2_ptp.c
index 899dd5d442..26a037acd4 100644
--- a/drivers/net/dpaa2/dpaa2_ptp.c
+++ b/drivers/net/dpaa2/dpaa2_ptp.c
@@ -111,10 +111,12 @@ 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);
return 0;
diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c
index 06f01dfc08..ecd004f9fa 100644
--- a/drivers/net/dpaa2/dpaa2_rxtx.c
+++ b/drivers/net/dpaa2/dpaa2_rxtx.c
@@ -139,8 +139,10 @@ dpaa2_dev_rx_parse_slow(struct rte_mbuf *mbuf,
annotation->word3, annotation->word4);
#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 |= PKT_RX_IEEE1588_PTP;
+ mbuf->ol_flags |= PKT_RX_IEEE1588_TMST;
+ }
#endif
if (BIT_ISSET_AT_POS(annotation->word3, L2_VLAN_1_PRESENT)) {
@@ -640,7 +642,10 @@ dpaa2_dev_prefetch_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
else
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
if (eth_data->dev_conf.rxmode.offloads &
@@ -853,6 +858,13 @@ dpaa2_dev_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)
+ 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 &
DEV_RX_OFFLOAD_VLAN_STRIP) {
rte_vlan_strip(bufs[num_rx]);
@@ -888,6 +900,8 @@ uint16_t dpaa2_dev_tx_conf(void *queue)
struct rte_eth_dev_data *eth_data = dpaa2_q->eth_data;
struct dpaa2_dev_priv *priv = eth_data->dev_private;
struct dpaa2_annot_hdr *annotation;
+ void *v_addr;
+ struct rte_mbuf *mbuf;
#endif
if (unlikely(!DPAA2_PER_LCORE_DPIO)) {
@@ -972,10 +986,16 @@ uint16_t dpaa2_dev_tx_conf(void *queue)
num_tx_conf++;
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);
@@ -1050,8 +1070,11 @@ dpaa2_dev_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
* corresponding to last packet transmitted for reading
* 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
/*Prepare enqueue descriptor*/
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:39.780297289 +0000
+++ 0044-net-dpaa2-fix-timestamping-for-IEEE1588.patch 2022-02-18 12:37:37.654791116 +0000
@@ -1 +1 @@
-From 90762e5cb8154bb437618f81488ac92a24455521 Mon Sep 17 00:00:00 2001
+From 1d10966a22caf15f3b61e986becbeccdb2f03b33 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 90762e5cb8154bb437618f81488ac92a24455521 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
- drivers/net/dpaa2/dpaa2_ethdev.h | 2 +-
+ drivers/net/dpaa2/dpaa2_ethdev.h | 2 ++
@@ -27 +28 @@
- 3 files changed, 37 insertions(+), 12 deletions(-)
+ 3 files changed, 38 insertions(+), 11 deletions(-)
@@ -30 +31 @@
-index e27239e256..fd4eabed4e 100644
+index 0a8a4599c2..203d03d272 100644
@@ -33 +34,2 @@
-@@ -62,7 +62,7 @@
+@@ -59,6 +59,8 @@
+
@@ -36,2 +38 @@
- /* Tx confirmation enabled */
--#define DPAA2_TX_CONF_ENABLE 0x08
++/* Tx confirmation enabled */
@@ -41 +42 @@
- RTE_ETH_RSS_L2_PAYLOAD | \
+ ETH_RSS_L2_PAYLOAD | \
@@ -43 +44 @@
-index 8d79e39244..3a4536dd69 100644
+index 899dd5d442..26a037acd4 100644
@@ -63 +64 @@
-index 90b971b4bf..9fb6c5f91d 100644
+index 06f01dfc08..ecd004f9fa 100644
@@ -66 +67 @@
-@@ -140,8 +140,10 @@ dpaa2_dev_rx_parse_slow(struct rte_mbuf *mbuf,
+@@ -139,8 +139,10 @@ dpaa2_dev_rx_parse_slow(struct rte_mbuf *mbuf,
@@ -72,2 +73,2 @@
- mbuf->ol_flags |= RTE_MBUF_F_RX_IEEE1588_PTP;
-+ mbuf->ol_flags |= RTE_MBUF_F_RX_IEEE1588_TMST;
+ mbuf->ol_flags |= PKT_RX_IEEE1588_PTP;
++ mbuf->ol_flags |= PKT_RX_IEEE1588_TMST;
@@ -78 +79 @@
-@@ -769,7 +771,10 @@ dpaa2_dev_prefetch_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -640,7 +642,10 @@ dpaa2_dev_prefetch_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
@@ -90 +91 @@
-@@ -986,6 +991,13 @@ dpaa2_dev_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -853,6 +858,13 @@ dpaa2_dev_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
@@ -102 +103 @@
- RTE_ETH_RX_OFFLOAD_VLAN_STRIP) {
+ DEV_RX_OFFLOAD_VLAN_STRIP) {
@@ -104 +105 @@
-@@ -1021,6 +1033,8 @@ uint16_t dpaa2_dev_tx_conf(void *queue)
+@@ -888,6 +900,8 @@ uint16_t dpaa2_dev_tx_conf(void *queue)
@@ -113 +114 @@
-@@ -1105,10 +1119,16 @@ uint16_t dpaa2_dev_tx_conf(void *queue)
+@@ -972,10 +986,16 @@ uint16_t dpaa2_dev_tx_conf(void *queue)
@@ -134 +135 @@
-@@ -1184,8 +1204,11 @@ dpaa2_dev_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -1050,8 +1070,11 @@ dpaa2_dev_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/mlx5: fix maximum packet headers size for TSO' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (42 preceding siblings ...)
2022-02-18 12:38 ` patch 'net/dpaa2: fix timestamping for IEEE1588' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'net/nfp: remove duplicated check when setting MAC address' " luca.boccassi
` (78 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Alexander Kozyrev; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f06710409fe86576476b94e40b86348ed4ff241c
Thanks.
Luca Boccassi
---
From f06710409fe86576476b94e40b86348ed4ff241c 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 aa55db3750..db6f128f62 100644
--- a/drivers/net/mlx5/mlx5_defs.h
+++ b/drivers/net/mlx5/mlx5_defs.h
@@ -59,7 +59,7 @@
#define MLX5_MAX_XSTATS 32
/* 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. */
#define MLX5_INLINE_HSIZE_NONE 0
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:39.813506739 +0000
+++ 0045-net-mlx5-fix-maximum-packet-headers-size-for-TSO.patch 2022-02-18 12:37:37.658791205 +0000
@@ -1 +1 @@
-From 9701034faab0f84ba42e1f5343afda5464b11ca3 Mon Sep 17 00:00:00 2001
+From f06710409fe86576476b94e40b86348ed4ff241c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9701034faab0f84ba42e1f5343afda5464b11ca3 ]
+
@@ -25 +26,0 @@
-Cc: stable@dpdk.org
@@ -34 +35 @@
-index 36b384fa08..2d48fde010 100644
+index aa55db3750..db6f128f62 100644
@@ -37 +38 @@
-@@ -50,7 +50,7 @@
+@@ -59,7 +59,7 @@
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/nfp: remove duplicated check when setting MAC address' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (43 preceding siblings ...)
2022-02-18 12:38 ` patch 'net/mlx5: fix maximum packet headers size for TSO' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'net/nfp: remove useless range checks' " luca.boccassi
` (77 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 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 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e977e8ef8e6f381758c3e5859a4709f349c997e3
Thanks.
Luca Boccassi
---
From e977e8ef8e6f381758c3e5859a4709f349c997e3 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_net.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index deea3de910..df3b7711dc 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -543,10 +543,6 @@ nfp_set_mac_addr(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr)
return -EBUSY;
}
- 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.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:39.845350802 +0000
+++ 0046-net-nfp-remove-duplicated-check-when-setting-MAC-add.patch 2022-02-18 12:37:37.662791295 +0000
@@ -1 +1 @@
-From 9e2cf57e2969a7248c1dbfb2e0c6d5c185b8addf Mon Sep 17 00:00:00 2001
+From e977e8ef8e6f381758c3e5859a4709f349c997e3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9e2cf57e2969a7248c1dbfb2e0c6d5c185b8addf ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
- drivers/net/nfp/nfp_common.c | 4 ----
+ drivers/net/nfp/nfp_net.c | 4 ----
@@ -27,5 +28,5 @@
-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
-@@ -280,10 +280,6 @@ nfp_set_mac_addr(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr)
+diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
+index deea3de910..df3b7711dc 100644
+--- a/drivers/net/nfp/nfp_net.c
++++ b/drivers/net/nfp/nfp_net.c
+@@ -543,10 +543,6 @@ nfp_set_mac_addr(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/nfp: remove useless range checks' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (44 preceding siblings ...)
2022-02-18 12:38 ` patch 'net/nfp: remove duplicated check when setting MAC address' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'net/sfc: validate queue span when parsing flow action RSS' " luca.boccassi
` (76 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 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 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/238f205dd5c574ec8583dc95b753eebbd5e0af70
Thanks.
Luca Boccassi
---
From 238f205dd5c574ec8583dc95b753eebbd5e0af70 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
@@ -37,7 +37,7 @@ pushpull_width(int pp)
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)))
return NFP_ERRNO(EINVAL);
@@ -117,7 +117,7 @@ nfp6000_nbi_ppc(uint32_t cpp_id)
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;
if (island && (island < 8 || island > 9))
@@ -281,7 +281,7 @@ static inline int
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) {
if (address < 0x2000000000ULL)
@@ -316,7 +316,7 @@ nfp6000_mu(uint32_t cpp_id, uint64_t address)
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))
return NFP_ERRNO(EINVAL);
@@ -336,7 +336,7 @@ nfp6000_ila(uint32_t cpp_id)
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))
return NFP_ERRNO(EINVAL);
@@ -354,7 +354,7 @@ nfp6000_pci(uint32_t cpp_id)
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))
return NFP_ERRNO(EINVAL);
@@ -370,9 +370,9 @@ nfp6000_crypto(uint32_t cpp_id)
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);
switch (cpp_id & NFP_CPP_ID(0, ~0, ~0)) {
@@ -410,9 +410,9 @@ nfp6000_cap_xpb(uint32_t cpp_id)
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);
switch (cpp_id & NFP_CPP_ID(0, ~0, ~0)) {
@@ -540,11 +540,11 @@ nfp_target_cpp(uint32_t cpp_island_id, uint64_t cpp_island_address,
const uint32_t *imb_table)
{
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);
if (island == 0) {
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:39.877005113 +0000
+++ 0047-net-nfp-remove-useless-range-checks.patch 2022-02-18 12:37:37.662791295 +0000
@@ -1 +1 @@
-From a52c79642ab4296763189dd8efadbb679d32c9a0 Mon Sep 17 00:00:00 2001
+From 238f205dd5c574ec8583dc95b753eebbd5e0af70 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] 228+ messages in thread
* patch 'net/sfc: validate queue span when parsing flow action RSS' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (45 preceding siblings ...)
2022-02-18 12:38 ` patch 'net/nfp: remove useless range checks' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'raw/ifpga/base: fix SPI transaction' " luca.boccassi
` (75 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Ivan Malov; +Cc: Andrew Rybchenko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/ff474dde7be5daddb43e9bc53f03919b7ed094d8
Thanks.
Luca Boccassi
---
From ff474dde7be5daddb43e9bc53f03919b7ed094d8 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 4321045d1a..95d1d7cd78 100644
--- a/drivers/net/sfc/sfc_flow.c
+++ b/drivers/net/sfc/sfc_flow.c
@@ -1382,6 +1382,9 @@ sfc_flow_parse_rss(struct sfc_adapter *sa,
rxq_hw_index_max = rxq->hw_index;
}
+ if (rxq_hw_index_max - rxq_hw_index_min + 1 > EFX_MAXRSS)
+ return -EINVAL;
+
switch (action_rss->func) {
case RTE_ETH_HASH_FUNCTION_DEFAULT:
case RTE_ETH_HASH_FUNCTION_TOEPLITZ:
@@ -1516,9 +1519,8 @@ sfc_flow_filter_insert(struct sfc_adapter *sa,
uint8_t *rss_key;
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;
} else {
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:39.908166669 +0000
+++ 0048-net-sfc-validate-queue-span-when-parsing-flow-action.patch 2022-02-18 12:37:37.662791295 +0000
@@ -1 +1 @@
-From 667151aec1ddf8669819ac39d3e86f40f815c213 Mon Sep 17 00:00:00 2001
+From ff474dde7be5daddb43e9bc53f03919b7ed094d8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 667151aec1ddf8669819ac39d3e86f40f815c213 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index fc74c8035e..509fde4a86 100644
+index 4321045d1a..95d1d7cd78 100644
@@ -22 +23 @@
-@@ -1477,6 +1477,9 @@ sfc_flow_parse_rss(struct sfc_adapter *sa,
+@@ -1382,6 +1382,9 @@ sfc_flow_parse_rss(struct sfc_adapter *sa,
@@ -32 +33 @@
-@@ -1612,9 +1615,8 @@ sfc_flow_filter_insert(struct sfc_adapter *sa,
+@@ -1516,9 +1519,8 @@ sfc_flow_filter_insert(struct sfc_adapter *sa,
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'raw/ifpga/base: fix SPI transaction' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (46 preceding siblings ...)
2022-02-18 12:38 ` patch 'net/sfc: validate queue span when parsing flow action RSS' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'net/ice: fix link up when starting device' " luca.boccassi
` (74 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Tianfei Zhang; +Cc: Rosen Xu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/06665489e6c1c43d086d65dcadd8ff64ed423b4b
Thanks.
Luca Boccassi
---
From 06665489e6c1c43d086d65dcadd8ff64ed423b4b 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
@@ -239,6 +239,18 @@ int spi_command(struct altera_spi_device *dev, unsigned int chip_select,
return 0;
}
+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)
{
struct altera_spi_device *spi_dev =
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
@@ -117,6 +117,10 @@ struct spi_tran_header {
u32 addr;
};
+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);
void spi_cs_deactivate(struct altera_spi_device *dev);
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
@@ -40,7 +40,7 @@ static void print_buffer(const char *string, void *buffer, int len)
printf("%s print buffer, len=%d\n", string, len);
for (i = 0; i < len; i++)
- printf("%x ", *(p+i));
+ printf("%02x ", *(p+i));
printf("\n");
}
#else
@@ -72,43 +72,6 @@ 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)
{
@@ -137,6 +100,104 @@ static void phy_tx_pad(unsigned char *phy_buf, unsigned int phy_buf_len,
*p++ = SPI_BYTE_IDLE;
}
+#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,
unsigned int resp_len, unsigned char *resp_data,
@@ -148,15 +209,9 @@ static int byte_to_core_convert(struct spi_transaction_dev *dev,
unsigned char *resp_packet = dev->buffer->bytes_resp;
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);
@@ -190,48 +245,15 @@ 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) {
case SPI_BYTE_IDLE:
@@ -337,9 +359,13 @@ static int packet_to_byte_conver(struct spi_transaction_dev *dev,
current_byte = resp_packet[i];
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];
*p++ = xor_20(current_byte);
@@ -348,23 +374,30 @@ static int packet_to_byte_conver(struct spi_transaction_dev *dev,
case SPI_PACKET_EOP:
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;
print_buffer("after packet:", resp_buf, *valid);
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:39.942290867 +0000
+++ 0049-raw-ifpga-base-fix-SPI-transaction.patch 2022-02-18 12:37:37.666791384 +0000
@@ -1 +1 @@
-From eacdd03c79f5d8adfa7d0dad1e75657dbaf4f788 Mon Sep 17 00:00:00 2001
+From 06665489e6c1c43d086d65dcadd8ff64ed423b4b 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] 228+ messages in thread
* patch 'net/ice: fix link up when starting device' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (47 preceding siblings ...)
2022-02-18 12:38 ` patch 'raw/ifpga/base: fix SPI transaction' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'raw/ifpga: fix thread closing' " luca.boccassi
` (73 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Yunjian Wang; +Cc: Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/ab9cde2e7239186fa75441db1881d6198d977042
Thanks.
Luca Boccassi
---
From ab9cde2e7239186fa75441db1881d6198d977042 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 2c63877ad6..6fb623de70 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -3569,7 +3569,7 @@ ice_dev_start(struct rte_eth_dev *dev)
ice_dev_set_link_up(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.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:39.974156646 +0000
+++ 0050-net-ice-fix-link-up-when-starting-device.patch 2022-02-18 12:37:37.670791473 +0000
@@ -1 +1 @@
-From 6c76b76dc64183eb2f24a52b90d4ff9feb4872f4 Mon Sep 17 00:00:00 2001
+From ab9cde2e7239186fa75441db1881d6198d977042 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 2c63877ad6..6fb623de70 100644
@@ -25 +26 @@
-@@ -3610,7 +3610,7 @@ ice_dev_start(struct rte_eth_dev *dev)
+@@ -3569,7 +3569,7 @@ ice_dev_start(struct rte_eth_dev *dev)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'raw/ifpga: fix thread closing' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (48 preceding siblings ...)
2022-02-18 12:38 ` patch 'net/ice: fix link up when starting device' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'net/bnxt: fix check for autoneg enablement' " luca.boccassi
` (72 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Tianfei Zhang; +Cc: Rosen Xu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f05952e7bfe65f8be8f4611da54229ade0e0a310
Thanks.
Luca Boccassi
---
From f05952e7bfe65f8be8f4611da54229ade0e0a310 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 0b0b1be00f..d421d14d68 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.c
+++ b/drivers/raw/ifpga/ifpga_rawdev.c
@@ -497,7 +497,7 @@ ifpga_rawdev_gsd_handle(__rte_unused void *param)
int gsd_enable, ret;
#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++) {
ifpga_rdev = &ifpga_rawdevices[i];
@@ -525,7 +525,7 @@ ifpga_monitor_start_func(void)
{
int ret;
- if (ifpga_monitor_start == 0) {
+ if (!__atomic_load_n(&ifpga_monitor_start, __ATOMIC_RELAXED)) {
ret = pthread_create(&ifpga_monitor_start_thread,
NULL,
ifpga_rawdev_gsd_handle, NULL);
@@ -534,7 +534,7 @@ ifpga_monitor_start_func(void)
"Fail to create ifpga monitor thread");
return -1;
}
- ifpga_monitor_start = 1;
+ __atomic_store_n(&ifpga_monitor_start, 1, __ATOMIC_RELAXED);
}
return 0;
@@ -544,7 +544,9 @@ 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)
IFPGA_RAWDEV_PMD_ERR("Can't cancel the thread");
@@ -553,8 +555,6 @@ ifpga_monitor_stop_func(void)
if (ret)
IFPGA_RAWDEV_PMD_ERR("Can't join the thread");
- ifpga_monitor_start = 0;
-
return ret;
}
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:40.010052003 +0000
+++ 0051-raw-ifpga-fix-thread-closing.patch 2022-02-18 12:37:37.674791563 +0000
@@ -1 +1 @@
-From 60e68d170b122d86c1c49cc51078db461542a26b Mon Sep 17 00:00:00 2001
+From f05952e7bfe65f8be8f4611da54229ade0e0a310 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 60e68d170b122d86c1c49cc51078db461542a26b ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 0eae0c9477..fdf3c23d2c 100644
+index 0b0b1be00f..d421d14d68 100644
@@ -37,3 +38,3 @@
- ret = rte_ctrl_thread_create(&ifpga_monitor_start_thread,
- "ifpga-monitor", NULL,
- ifpga_rawdev_gsd_handle, NULL);
+ ret = pthread_create(&ifpga_monitor_start_thread,
+ NULL,
+ ifpga_rawdev_gsd_handle, NULL);
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/bnxt: fix check for autoneg enablement' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (49 preceding siblings ...)
2022-02-18 12:38 ` patch 'raw/ifpga: fix thread closing' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'net/bnxt: handle ring cleanup in case of error' " luca.boccassi
` (71 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e7f6c7629a40074eb4e04db3393af7453e12af1c
Thanks.
Luca Boccassi
---
From e7f6c7629a40074eb4e04db3393af7453e12af1c 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 4dd98e6cad..7cdafde88b 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -3145,7 +3145,8 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up)
bp->link_info->link_signal_mode);
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;
link_req.auto_link_speed_mask =
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:40.042076384 +0000
+++ 0052-net-bnxt-fix-check-for-autoneg-enablement.patch 2022-02-18 12:37:37.678791652 +0000
@@ -1 +1 @@
-From 7b82c4de0d67719390674215d4580e20459f5b9b Mon Sep 17 00:00:00 2001
+From e7f6c7629a40074eb4e04db3393af7453e12af1c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7b82c4de0d67719390674215d4580e20459f5b9b ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 5850e7e48b..5418fa1994 100644
+index 4dd98e6cad..7cdafde88b 100644
@@ -25 +26 @@
-@@ -3253,7 +3253,8 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up)
+@@ -3145,7 +3145,8 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/bnxt: handle ring cleanup in case of error' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (50 preceding siblings ...)
2022-02-18 12:38 ` patch 'net/bnxt: fix check for autoneg enablement' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'net/bnxt: fix memzone allocation per VNIC' " luca.boccassi
` (70 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/7ee6d43e5e5ab91fb4b21ae393e3fc2245a47405
Thanks.
Luca Boccassi
---
From 7ee6d43e5e5ab91fb4b21ae393e3fc2245a47405 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 4cfa818616..53ce63f07b 100644
--- a/drivers/net/bnxt/bnxt_ring.c
+++ b/drivers/net/bnxt/bnxt_ring.c
@@ -869,6 +869,7 @@ int bnxt_alloc_async_ring_struct(struct bnxt *bp)
ring->ring_mask = ring->ring_size - 1;
ring->vmem_size = 0;
ring->vmem = NULL;
+ ring->fw_ring_id = INVALID_HW_RING_ID;
bp->async_cp_ring = cpr;
cpr->cp_ring_struct = ring;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:40.078696308 +0000
+++ 0053-net-bnxt-handle-ring-cleanup-in-case-of-error.patch 2022-02-18 12:37:37.678791652 +0000
@@ -1 +1 @@
-From 75915b2b3c577ee5bb938c3f1ab6b51958c431a3 Mon Sep 17 00:00:00 2001
+From 7ee6d43e5e5ab91fb4b21ae393e3fc2245a47405 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 75915b2b3c577ee5bb938c3f1ab6b51958c431a3 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index dc437f314e..5c6c27fed7 100644
+index 4cfa818616..53ce63f07b 100644
@@ -28 +29 @@
-@@ -851,6 +851,7 @@ int bnxt_alloc_async_ring_struct(struct bnxt *bp)
+@@ -869,6 +869,7 @@ int bnxt_alloc_async_ring_struct(struct bnxt *bp)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/bnxt: fix memzone allocation per VNIC' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (51 preceding siblings ...)
2022-02-18 12:38 ` patch 'net/bnxt: handle ring cleanup in case of error' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'net/bnxt: fix VF resource allocation strategy' " luca.boccassi
` (69 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Kalesh AP; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/3e0a066400aa784eb77a79294d8f371129dac21d
Thanks.
Luca Boccassi
---
From 3e0a066400aa784eb77a79294d8f371129dac21d 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 f18e672dca..fd425e5d83 100644
--- a/drivers/net/bnxt/bnxt_vnic.c
+++ b/drivers/net/bnxt/bnxt_vnic.c
@@ -98,18 +98,11 @@ 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;
}
}
}
@@ -122,7 +115,6 @@ int bnxt_alloc_vnic_attributes(struct bnxt *bp, bool reconfig)
char mz_name[RTE_MEMZONE_NAMESIZE];
uint32_t entry_length;
size_t rss_table_size;
- uint16_t max_vnics;
int i;
rte_iova_t mz_phys_addr;
@@ -136,38 +128,36 @@ 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);
memcpy(bp->rss_conf.rss_key, 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 785db8f0cd..c07fd52b21 100644
--- a/drivers/net/bnxt/bnxt_vnic.h
+++ b/drivers/net/bnxt/bnxt_vnic.h
@@ -28,6 +28,7 @@ struct bnxt_vnic_info {
uint16_t mru;
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;
rte_iova_t rss_hash_key_dma_addr;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:40.110503191 +0000
+++ 0054-net-bnxt-fix-memzone-allocation-per-VNIC.patch 2022-02-18 12:37:37.678791652 +0000
@@ -1 +1 @@
-From 5b8b248c9679b9571f73a75e1905d7cef39e6c6e Mon Sep 17 00:00:00 2001
+From 3e0a066400aa784eb77a79294d8f371129dac21d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5b8b248c9679b9571f73a75e1905d7cef39e6c6e ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 09d67ef885..b3c03a2af5 100644
+index f18e672dca..fd425e5d83 100644
@@ -124 +125 @@
-index 25481fcbdd..9055b93c4b 100644
+index 785db8f0cd..c07fd52b21 100644
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/bnxt: fix VF resource allocation strategy' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (52 preceding siblings ...)
2022-02-18 12:38 ` patch 'net/bnxt: fix memzone allocation per VNIC' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'raw/ifpga/base: fix port feature ID' " luca.boccassi
` (68 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: Kalesh AP, Somnath Kotur, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/edea3f39ddcb60bc4856759dd526d9a42f2f8925
Thanks.
Luca Boccassi
---
From edea3f39ddcb60bc4856759dd526d9a42f2f8925 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 7cdafde88b..9f61d8d037 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -787,15 +787,7 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
bp->max_l2_ctx = rte_le_to_cpu_16(resp->max_l2_ctxs);
if (!BNXT_CHIP_THOR(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);
bp->max_stat_ctx = rte_le_to_cpu_16(resp->max_stat_ctx);
@@ -3375,7 +3367,7 @@ static int bnxt_hwrm_pf_func_cfg(struct bnxt *bp,
rte_cpu_to_le_16(pf_resc->num_hw_ring_grps);
} 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);
}
req.flags = rte_cpu_to_le_32(bp->pf->func_cfg_flags);
@@ -3387,7 +3379,7 @@ static int bnxt_hwrm_pf_func_cfg(struct bnxt *bp,
req.num_tx_rings = rte_cpu_to_le_16(pf_resc->num_tx_rings);
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);
@@ -3424,14 +3416,12 @@ bnxt_fill_vf_func_cfg_req_new(struct bnxt *bp,
req->min_rx_rings = req->max_rx_rings;
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));
}
static void
@@ -3491,6 +3481,8 @@ static int bnxt_update_max_resources(struct bnxt *bp,
bp->max_rx_rings -= rte_le_to_cpu_16(resp->alloc_rx_rings);
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();
@@ -3564,6 +3556,8 @@ static int bnxt_query_pf_resources(struct bnxt *bp,
pf_resc->num_rx_rings = rte_le_to_cpu_16(resp->alloc_rx_rings);
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;
HWRM_UNLOCK();
@@ -3584,6 +3578,8 @@ bnxt_calculate_pf_resources(struct bnxt *bp,
pf_resc->num_rx_rings = bp->max_rx_rings;
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;
}
@@ -3602,6 +3598,10 @@ bnxt_calculate_pf_resources(struct bnxt *bp,
bp->max_l2_ctx % (num_vfs + 1);
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);
}
int bnxt_hwrm_allocate_pf_only(struct bnxt *bp)
@@ -3777,6 +3777,8 @@ bnxt_update_pf_resources(struct bnxt *bp,
bp->max_tx_rings = pf_resc->num_tx_rings;
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;
}
static int32_t
diff --git a/drivers/net/bnxt/bnxt_hwrm.h b/drivers/net/bnxt/bnxt_hwrm.h
index 926f32df05..d36defbc70 100644
--- a/drivers/net/bnxt/bnxt_hwrm.h
+++ b/drivers/net/bnxt/bnxt_hwrm.h
@@ -113,6 +113,8 @@ struct bnxt_pf_resource_info {
uint16_t num_rx_rings;
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.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:40.142091040 +0000
+++ 0055-net-bnxt-fix-VF-resource-allocation-strategy.patch 2022-02-18 12:37:37.686791831 +0000
@@ -1 +1 @@
-From 8496483099104c970720ae7baf5ab61aaa4611c7 Mon Sep 17 00:00:00 2001
+From edea3f39ddcb60bc4856759dd526d9a42f2f8925 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8496483099104c970720ae7baf5ab61aaa4611c7 ]
+
@@ -23 +24,0 @@
-Cc: stable@dpdk.org
@@ -34 +35 @@
-index 5418fa1994..b4aeec593e 100644
+index 7cdafde88b..9f61d8d037 100644
@@ -37 +38 @@
-@@ -902,15 +902,7 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
+@@ -787,15 +787,7 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
@@ -39 +40 @@
- if (!BNXT_CHIP_P5(bp) && !bp->pdev->max_vfs)
+ if (!BNXT_CHIP_THOR(bp) && !bp->pdev->max_vfs)
@@ -54 +55 @@
-@@ -3495,7 +3487,7 @@ static int bnxt_hwrm_pf_func_cfg(struct bnxt *bp,
+@@ -3375,7 +3367,7 @@ static int bnxt_hwrm_pf_func_cfg(struct bnxt *bp,
@@ -63 +64 @@
-@@ -3508,7 +3500,7 @@ static int bnxt_hwrm_pf_func_cfg(struct bnxt *bp,
+@@ -3387,7 +3379,7 @@ static int bnxt_hwrm_pf_func_cfg(struct bnxt *bp,
@@ -72 +73 @@
-@@ -3545,14 +3537,12 @@ bnxt_fill_vf_func_cfg_req_new(struct bnxt *bp,
+@@ -3424,14 +3416,12 @@ bnxt_fill_vf_func_cfg_req_new(struct bnxt *bp,
@@ -89 +90 @@
-@@ -3612,6 +3602,8 @@ static int bnxt_update_max_resources(struct bnxt *bp,
+@@ -3491,6 +3481,8 @@ static int bnxt_update_max_resources(struct bnxt *bp,
@@ -98 +99 @@
-@@ -3685,6 +3677,8 @@ static int bnxt_query_pf_resources(struct bnxt *bp,
+@@ -3564,6 +3556,8 @@ static int bnxt_query_pf_resources(struct bnxt *bp,
@@ -107 +108 @@
-@@ -3705,6 +3699,8 @@ bnxt_calculate_pf_resources(struct bnxt *bp,
+@@ -3584,6 +3578,8 @@ bnxt_calculate_pf_resources(struct bnxt *bp,
@@ -116 +117 @@
-@@ -3723,6 +3719,10 @@ bnxt_calculate_pf_resources(struct bnxt *bp,
+@@ -3602,6 +3598,10 @@ bnxt_calculate_pf_resources(struct bnxt *bp,
@@ -127 +128 @@
-@@ -3898,6 +3898,8 @@ bnxt_update_pf_resources(struct bnxt *bp,
+@@ -3777,6 +3777,8 @@ bnxt_update_pf_resources(struct bnxt *bp,
@@ -137 +138 @@
-index 21e1b7a499..63f8d8ceab 100644
+index 926f32df05..d36defbc70 100644
@@ -140 +141 @@
-@@ -114,6 +114,8 @@ struct bnxt_pf_resource_info {
+@@ -113,6 +113,8 @@ struct bnxt_pf_resource_info {
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'raw/ifpga/base: fix port feature ID' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (53 preceding siblings ...)
2022-02-18 12:38 ` patch 'net/bnxt: fix VF resource allocation strategy' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'net/memif: remove unnecessary Rx interrupt stub' " luca.boccassi
` (67 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Wei Huang; +Cc: Tianfei Zhang, Rosen Xu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/10445169472d42fc209cf53fa1e212eb24e41d7a
Thanks.
Luca Boccassi
---
From 10445169472d42fc209cf53fa1e212eb24e41d7a 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 9f0147d1ed..7853d2976a 100644
--- a/drivers/raw/ifpga/base/ifpga_defines.h
+++ b/drivers/raw/ifpga/base/ifpga_defines.h
@@ -93,9 +93,9 @@ 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.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:40.177782115 +0000
+++ 0056-raw-ifpga-base-fix-port-feature-ID.patch 2022-02-18 12:37:37.686791831 +0000
@@ -1 +1 @@
-From e55d8d4c12f30eaccf0912420881e027d7f295f3 Mon Sep 17 00:00:00 2001
+From 10445169472d42fc209cf53fa1e212eb24e41d7a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e55d8d4c12f30eaccf0912420881e027d7f295f3 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index dca1518a83..8f6203392b 100644
+index 9f0147d1ed..7853d2976a 100644
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/memif: remove unnecessary Rx interrupt stub' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (54 preceding siblings ...)
2022-02-18 12:38 ` patch 'raw/ifpga/base: fix port feature ID' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'net/bonding: fix RSS with early configure' " luca.boccassi
` (66 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Morten Brørup, Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/1ed391676f5980415daecc2c152f74daafe6b8eb
Thanks.
Luca Boccassi
---
From 1ed391676f5980415daecc2c152f74daafe6b8eb 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 c81c6d6818..3dc357aef3 100644
--- a/drivers/net/memif/rte_eth_memif.c
+++ b/drivers/net/memif/rte_eth_memif.c
@@ -1449,23 +1449,6 @@ memif_stats_reset(struct rte_eth_dev *dev)
return 0;
}
-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,
.dev_stop = memif_dev_stop,
@@ -1476,8 +1459,6 @@ static const struct eth_dev_ops ops = {
.rx_queue_setup = memif_rx_queue_setup,
.rx_queue_release = memif_queue_release,
.tx_queue_release = memif_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,
.stats_reset = memif_stats_reset,
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:40.210005249 +0000
+++ 0057-net-memif-remove-unnecessary-Rx-interrupt-stub.patch 2022-02-18 12:37:37.690791920 +0000
@@ -1 +1 @@
-From d6dccbd76692c64cff79a821bc73069dc5b043e4 Mon Sep 17 00:00:00 2001
+From 1ed391676f5980415daecc2c152f74daafe6b8eb Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit d6dccbd76692c64cff79a821bc73069dc5b043e4 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 59cb5a82a2..d3459c5007 100644
+index c81c6d6818..3dc357aef3 100644
@@ -28 +29 @@
-@@ -1500,23 +1500,6 @@ memif_stats_reset(struct rte_eth_dev *dev)
+@@ -1449,23 +1449,6 @@ memif_stats_reset(struct rte_eth_dev *dev)
@@ -52 +53 @@
-@@ -1527,8 +1510,6 @@ static const struct eth_dev_ops ops = {
+@@ -1476,8 +1459,6 @@ static const struct eth_dev_ops ops = {
@@ -54,2 +55,2 @@
- .rx_queue_release = memif_rx_queue_release,
- .tx_queue_release = memif_tx_queue_release,
+ .rx_queue_release = memif_queue_release,
+ .tx_queue_release = memif_queue_release,
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/bonding: fix RSS with early configure' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (55 preceding siblings ...)
2022-02-18 12:38 ` patch 'net/memif: remove unnecessary Rx interrupt stub' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'net/hns3: fix using enum as boolean' " luca.boccassi
` (65 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Yu Wenjun; +Cc: Min Hu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/90ada5e388bc8873c465d445d97384a4f796f2bd
Thanks.
Luca Boccassi
---
From 90ada5e388bc8873c465d445d97384a4f796f2bd 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 be92a5e15a..3962d04b1a 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -3511,6 +3511,11 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
if (dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS) {
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) {
RTE_BOND_LOG(ERR, "Invalid rss key length(%u)",
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:40.242733986 +0000
+++ 0058-net-bonding-fix-RSS-with-early-configure.patch 2022-02-18 12:37:37.690791920 +0000
@@ -1 +1 @@
-From 4986aea2b879fb242ae04880eb0ed958f40d199a Mon Sep 17 00:00:00 2001
+From 90ada5e388bc8873c465d445d97384a4f796f2bd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4986aea2b879fb242ae04880eb0ed958f40d199a ]
+
@@ -29 +30,0 @@
-Cc: stable@dpdk.org
@@ -38 +39 @@
-index 9607141b39..c72fc64806 100644
+index be92a5e15a..3962d04b1a 100644
@@ -42 +43 @@
- if (dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_RSS) {
+ if (dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS) {
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/hns3: fix using enum as boolean' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (56 preceding siblings ...)
2022-02-18 12:38 ` patch 'net/bonding: fix RSS with early configure' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'vdpa/mlx5: workaround queue stop with traffic' " luca.boccassi
` (64 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Huisong Li; +Cc: Min Hu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f3cd5320d89228aaae2f10dcb85045fb53fcd8b1
Thanks.
Luca Boccassi
---
From f3cd5320d89228aaae2f10dcb85045fb53fcd8b1 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 aa069c92ce..6c09172343 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1277,7 +1277,8 @@ hns3_action_rss_same(const struct rte_flow_action_rss *comp,
if (comp->func == RTE_ETH_HASH_FUNCTION_MAX)
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 &&
comp->types == (with->types & HNS3_ETH_RSS_SUPPORT) &&
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:40.276896790 +0000
+++ 0059-net-hns3-fix-using-enum-as-boolean.patch 2022-02-18 12:37:37.694792009 +0000
@@ -1 +1 @@
-From 67d0b17947d6936147f4cbfff6ff938884f14776 Mon Sep 17 00:00:00 2001
+From f3cd5320d89228aaae2f10dcb85045fb53fcd8b1 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 aa069c92ce..6c09172343 100644
@@ -22 +23 @@
-@@ -1251,7 +1251,8 @@ hns3_action_rss_same(const struct rte_flow_action_rss *comp,
+@@ -1277,7 +1277,8 @@ hns3_action_rss_same(const struct rte_flow_action_rss *comp,
@@ -26 +27 @@
-- func_is_same = with->func ? (comp->func == with->func) : true;
+- func_is_same = (with->func ? (comp->func == with->func) : true);
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'vdpa/mlx5: workaround queue stop with traffic' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (57 preceding siblings ...)
2022-02-18 12:38 ` patch 'net/hns3: fix using enum as boolean' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'net/virtio: fix Tx queue 0 overriden by queue 128' " luca.boccassi
` (63 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Matan Azrad; +Cc: Xueming Li, Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/16ba91d4f3c0bd6d03b2ed5a4f09842ec8b0de73
Thanks.
Luca Boccassi
---
From 16ba91d4f3c0bd6d03b2ed5a4f09842ec8b0de73 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 38a93d041d..06e602e72a 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa.c
@@ -281,10 +281,10 @@ mlx5_vdpa_dev_close(int vid)
DRV_LOG(ERR, "Invalid vDPA device: %s.", vdev->device->name);
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);
mlx5_vdpa_event_qp_global_release(priv);
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:40.310942302 +0000
+++ 0060-vdpa-mlx5-workaround-queue-stop-with-traffic.patch 2022-02-18 12:37:37.694792009 +0000
@@ -1 +1 @@
-From b5e51edfbe18ee30b8fed5efdb09f2ab4c8a05a0 Mon Sep 17 00:00:00 2001
+From 16ba91d4f3c0bd6d03b2ed5a4f09842ec8b0de73 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b5e51edfbe18ee30b8fed5efdb09f2ab4c8a05a0 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index b9e84dd9bf..8dfaba791d 100644
+index 38a93d041d..06e602e72a 100644
@@ -28 +29 @@
-@@ -250,10 +250,10 @@ mlx5_vdpa_dev_close(int vid)
+@@ -281,10 +281,10 @@ mlx5_vdpa_dev_close(int vid)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/virtio: fix Tx queue 0 overriden by queue 128' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (58 preceding siblings ...)
2022-02-18 12:38 ` patch 'vdpa/mlx5: workaround queue stop with traffic' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'vdpa/ifc: fix log info mismatch' " luca.boccassi
` (62 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Xueming Li; +Cc: Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/9605f71afa8a11a9f0fb0c8d5131f08241b775fc
Thanks.
Luca Boccassi
---
From 9605f71afa8a11a9f0fb0c8d5131f08241b775fc 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 1d264d2fd0..fe6f9942a9 100644
--- a/drivers/net/virtio/virtio_rxtx.c
+++ b/drivers/net/virtio/virtio_rxtx.c
@@ -834,7 +834,7 @@ virtio_dev_tx_queue_setup(struct rte_eth_dev *dev,
unsigned int socket_id __rte_unused,
const struct rte_eth_txconf *tx_conf)
{
- uint8_t vtpci_queue_idx = 2 * queue_idx + VTNET_SQ_TQ_QUEUE_IDX;
+ uint16_t vtpci_queue_idx = 2 * queue_idx + VTNET_SQ_TQ_QUEUE_IDX;
struct virtio_hw *hw = dev->data->dev_private;
struct virtqueue *vq = hw->vqs[vtpci_queue_idx];
struct virtnet_tx *txvq;
@@ -878,7 +878,7 @@ int
virtio_dev_tx_queue_setup_finish(struct rte_eth_dev *dev,
uint16_t queue_idx)
{
- uint8_t vtpci_queue_idx = 2 * queue_idx + VTNET_SQ_TQ_QUEUE_IDX;
+ uint16_t vtpci_queue_idx = 2 * queue_idx + VTNET_SQ_TQ_QUEUE_IDX;
struct virtio_hw *hw = dev->data->dev_private;
struct virtqueue *vq = hw->vqs[vtpci_queue_idx];
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:40.342076047 +0000
+++ 0061-net-virtio-fix-Tx-queue-0-overriden-by-queue-128.patch 2022-02-18 12:37:37.698792099 +0000
@@ -1 +1 @@
-From 8a886e573af9d25be33e333e9f5cfb48ddd3646c Mon Sep 17 00:00:00 2001
+From 9605f71afa8a11a9f0fb0c8d5131f08241b775fc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8a886e573af9d25be33e333e9f5cfb48ddd3646c ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index b39dd92d1b..4795893ec7 100644
+index 1d264d2fd0..fe6f9942a9 100644
@@ -25 +26 @@
-@@ -814,7 +814,7 @@ virtio_dev_tx_queue_setup(struct rte_eth_dev *dev,
+@@ -834,7 +834,7 @@ virtio_dev_tx_queue_setup(struct rte_eth_dev *dev,
@@ -29,2 +30,2 @@
-- uint8_t vq_idx = 2 * queue_idx + VTNET_SQ_TQ_QUEUE_IDX;
-+ uint16_t vq_idx = 2 * queue_idx + VTNET_SQ_TQ_QUEUE_IDX;
+- uint8_t vtpci_queue_idx = 2 * queue_idx + VTNET_SQ_TQ_QUEUE_IDX;
++ uint16_t vtpci_queue_idx = 2 * queue_idx + VTNET_SQ_TQ_QUEUE_IDX;
@@ -32 +33 @@
- struct virtqueue *vq = hw->vqs[vq_idx];
+ struct virtqueue *vq = hw->vqs[vtpci_queue_idx];
@@ -34 +35 @@
-@@ -858,7 +858,7 @@ int
+@@ -878,7 +878,7 @@ int
@@ -38,2 +39,2 @@
-- uint8_t vq_idx = 2 * queue_idx + VTNET_SQ_TQ_QUEUE_IDX;
-+ uint16_t vq_idx = 2 * queue_idx + VTNET_SQ_TQ_QUEUE_IDX;
+- uint8_t vtpci_queue_idx = 2 * queue_idx + VTNET_SQ_TQ_QUEUE_IDX;
++ uint16_t vtpci_queue_idx = 2 * queue_idx + VTNET_SQ_TQ_QUEUE_IDX;
@@ -41 +42 @@
- struct virtqueue *vq = hw->vqs[vq_idx];
+ struct virtqueue *vq = hw->vqs[vtpci_queue_idx];
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'vdpa/ifc: fix log info mismatch' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (59 preceding siblings ...)
2022-02-18 12:38 ` patch 'net/virtio: fix Tx queue 0 overriden by queue 128' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'net/virtio-user: fix resource leak on probing failure' " luca.boccassi
` (61 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Andy Pei; +Cc: Chenbo Xia, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/61144dff749695b0cdbbae14eb3153d247a06b2b
Thanks.
Luca Boccassi
---
From 61144dff749695b0cdbbae14eb3153d247a06b2b 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
@@ -94,12 +94,14 @@ next:
return -1;
}
- 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.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:40.374441786 +0000
+++ 0062-vdpa-ifc-fix-log-info-mismatch.patch 2022-02-18 12:37:37.698792099 +0000
@@ -1 +1 @@
-From 527ec438eb31d4d821624f74d7dfd3b0bcc1c28e Mon Sep 17 00:00:00 2001
+From 61144dff749695b0cdbbae14eb3153d247a06b2b 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] 228+ messages in thread
* patch 'net/virtio-user: fix resource leak on probing failure' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (60 preceding siblings ...)
2022-02-18 12:38 ` patch 'vdpa/ifc: fix log info mismatch' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'net/virtio-user: check FD flags getting " luca.boccassi
` (60 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Harold Huang; +Cc: Chenbo Xia, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/ac0c52244d8385f60974679742f09c87858b9fbf
Thanks.
Luca Boccassi
---
From ac0c52244d8385f60974679742f09c87858b9fbf 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 0906a34799..04d6d7e2f4 100644
--- a/drivers/net/virtio/virtio_user_ethdev.c
+++ b/drivers/net/virtio/virtio_user_ethdev.c
@@ -887,6 +887,7 @@ virtio_user_pmd_probe(struct rte_vdev_device *dev)
/* previously called by pci probing for physical dev */
if (eth_virtio_dev_init(eth_dev) < 0) {
PMD_INIT_LOG(ERR, "eth_virtio_dev_init fails");
+ virtio_user_dev_uninit(hw->virtio_user_dev);
virtio_user_eth_dev_free(eth_dev);
goto end;
}
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:40.405299516 +0000
+++ 0063-net-virtio-user-fix-resource-leak-on-probing-failure.patch 2022-02-18 12:37:37.702792189 +0000
@@ -1 +1 @@
-From edca47a1d9e01cb6f9bd174cc1cbefce1af7fd37 Mon Sep 17 00:00:00 2001
+From ac0c52244d8385f60974679742f09c87858b9fbf Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit edca47a1d9e01cb6f9bd174cc1cbefce1af7fd37 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 0271098f0d..16eca2f940 100644
+index 0906a34799..04d6d7e2f4 100644
@@ -26 +27 @@
-@@ -666,6 +666,7 @@ virtio_user_pmd_probe(struct rte_vdev_device *vdev)
+@@ -887,6 +887,7 @@ virtio_user_pmd_probe(struct rte_vdev_device *dev)
@@ -30 +31 @@
-+ virtio_user_dev_uninit(dev);
++ virtio_user_dev_uninit(hw->virtio_user_dev);
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/virtio-user: check FD flags getting failure' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (61 preceding siblings ...)
2022-02-18 12:38 ` patch 'net/virtio-user: fix resource leak on probing failure' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'net/mlx5: fix mark enabling for Rx' " luca.boccassi
` (59 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Yunjian Wang; +Cc: Chenbo Xia, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/d8090fd8c4bdc3415ff0ba312d62f9e5936e4248
Thanks.
Luca Boccassi
---
From d8090fd8c4bdc3415ff0ba312d62f9e5936e4248 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 350eed4182..dba5368456 100644
--- a/drivers/net/virtio/virtio_user/vhost_user.c
+++ b/drivers/net/virtio/virtio_user/vhost_user.c
@@ -468,8 +468,10 @@ 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));
un.sun_family = AF_UNIX;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:40.436134585 +0000
+++ 0064-net-virtio-user-check-FD-flags-getting-failure.patch 2022-02-18 12:37:37.702792189 +0000
@@ -1 +1 @@
-From 6abf10a21b293cb427ef21c59f490592717cb211 Mon Sep 17 00:00:00 2001
+From d8090fd8c4bdc3415ff0ba312d62f9e5936e4248 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6abf10a21b293cb427ef21c59f490592717cb211 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index cc830a660f..0a39393c45 100644
+index 350eed4182..dba5368456 100644
@@ -22 +23 @@
-@@ -840,8 +840,10 @@ vhost_user_setup(struct virtio_user_dev *dev)
+@@ -468,8 +468,10 @@ vhost_user_setup(struct virtio_user_dev *dev)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/mlx5: fix mark enabling for Rx' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (62 preceding siblings ...)
2022-02-18 12:38 ` patch 'net/virtio-user: check FD flags getting " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'net/mlx5: reject jump to root table' " luca.boccassi
` (58 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Raja Zidane; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a133cd9add74162b2efc09169b910f863a41a6c1
Thanks.
Luca Boccassi
---
From a133cd9add74162b2efc09169b910f863a41a6c1 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 | 54 ++++++++++++++++--------------
drivers/net/mlx5/mlx5_flow.h | 2 +-
drivers/net/mlx5/mlx5_flow_dv.c | 6 ++--
drivers/net/mlx5/mlx5_flow_verbs.c | 4 +--
drivers/net/mlx5/mlx5_rxtx.h | 1 -
6 files changed, 36 insertions(+), 32 deletions(-)
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index a4880d01d9..93d9ad5e64 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -947,6 +947,7 @@ struct mlx5_priv {
unsigned int mtr_reg_share:1; /* Whether support meter REG_C share. */
unsigned int sampler_en:1; /* Whether support sampler. */
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). */
uint32_t vport_meta_tag; /* Used for vport index match ove VF LAG. */
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 080731ca04..69f57605f8 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -1171,7 +1171,6 @@ flow_drv_rxq_flags_set(struct rte_eth_dev *dev,
struct mlx5_flow_handle *dev_handle)
{
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;
unsigned int i;
@@ -1205,15 +1204,6 @@ flow_drv_rxq_flags_set(struct rte_eth_dev *dev,
* this must be always enabled (metadata may arive
* 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;
@@ -1231,6 +1221,20 @@ 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
*
@@ -1245,7 +1249,11 @@ flow_rxq_flags_set(struct rte_eth_dev *dev, struct rte_flow *flow)
struct mlx5_priv *priv = dev->data->dev_private;
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)
flow_drv_rxq_flags_set(dev, dev_handle);
@@ -1265,7 +1273,6 @@ flow_drv_rxq_flags_trim(struct rte_eth_dev *dev,
struct mlx5_flow_handle *dev_handle)
{
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;
unsigned int i;
@@ -1295,15 +1302,6 @@ flow_drv_rxq_flags_trim(struct rte_eth_dev *dev,
container_of((*priv->rxqs)[idx],
struct mlx5_rxq_ctrl, rxq);
- 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;
@@ -1362,12 +1360,12 @@ flow_rxq_flags_clear(struct rte_eth_dev *dev)
continue;
rxq_ctrl = container_of((*priv->rxqs)[i],
struct mlx5_rxq_ctrl, rxq);
- rxq_ctrl->flow_mark_n = 0;
rxq_ctrl->rxq.mark = 0;
for (j = 0; j != MLX5_FLOW_TUNNEL; ++j)
rxq_ctrl->flow_tunnels_n[j] = 0;
rxq_ctrl->rxq.tunnel = 0;
}
+ priv->mark_enabled = 0;
}
/**
@@ -4272,6 +4270,7 @@ flow_create_split_inner(struct rte_eth_dev *dev,
struct rte_flow_error *error)
{
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,
flow_split_info->flow_idx, error);
@@ -4290,8 +4289,10 @@ 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;
return flow_drv_translate(dev, dev_flow, attr, items, actions, error);
@@ -5091,6 +5092,7 @@ flow_create_split_meter(struct rte_eth_dev *dev,
struct mlx5_flow_split_info *flow_split_info,
struct rte_flow_error *error)
{
+ struct mlx5_flow_workspace *wks = mlx5_flow_get_thread_workspace();
struct mlx5_priv *priv = dev->data->dev_private;
struct rte_flow_action *sfx_actions = NULL;
struct rte_flow_action *pre_actions = NULL;
@@ -5146,7 +5148,7 @@ flow_create_split_meter(struct rte_eth_dev *dev,
MLX5_FLOW_TABLE_LEVEL_SUFFIX;
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;
}
/* Add the prefix subflow. */
ret = flow_create_split_metadata(dev, flow,
@@ -5212,6 +5214,7 @@ 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;
union mlx5_flow_tbl_key sfx_table_key;
+ struct mlx5_flow_workspace *wks = mlx5_flow_get_thread_workspace();
#endif
size_t act_size;
size_t item_size;
@@ -5277,7 +5280,8 @@ flow_create_split_sample(struct rte_eth_dev *dev,
sfx_table_key.table_id;
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
* skip_scale to 1 to avoid scale again in translation.
*/
diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index ed5f94a9a0..fb11ae6b40 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -632,7 +632,6 @@ struct mlx5_flow_handle {
/**< Bit-fields of present layers, see MLX5_FLOW_LAYER_*. */
void *drv_flow; /**< pointer to driver flow object. */
uint32_t split_flow_id:28; /**< Sub flow unique match flow id. */
- uint32_t mark:1; /**< Metadata rxq mark flag. */
uint32_t fate_action:3; /**< Fate action type. */
union {
uint32_t rix_hrxq; /**< Hash Rx queue object index. */
@@ -1123,6 +1122,7 @@ struct mlx5_flow_workspace {
struct mlx5_flow_rss_desc rss_desc;
uint32_t rssq_num; /* Allocated queue num in rss_desc. */
uint32_t flow_idx; /* Intermediate device flow index. */
+ uint32_t mark:1; /* Indicates if flow contains mark action. */
};
struct mlx5_flow_split_info {
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index c134e24c0e..977072ba32 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -9200,7 +9200,7 @@ flow_dv_translate_action_sample(struct rte_eth_dev *dev,
(((const struct rte_flow_action_mark *)
(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 */
pre_r = dev_flow->dv.tag_resource;
@@ -9889,7 +9889,7 @@ flow_dv_translate(struct rte_eth_dev *dev,
break;
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 = {
.id = MLX5_FLOW_MARK_DEFAULT,
@@ -9918,7 +9918,7 @@ flow_dv_translate(struct rte_eth_dev *dev,
break;
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 =
(const struct rte_flow_action_mark *)
diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c b/drivers/net/mlx5/mlx5_flow_verbs.c
index 9c2fc1b25e..fa7ba129fd 100644
--- a/drivers/net/mlx5/mlx5_flow_verbs.c
+++ b/drivers/net/mlx5/mlx5_flow_verbs.c
@@ -1736,12 +1736,12 @@ flow_verbs_translate(struct rte_eth_dev *dev,
case RTE_FLOW_ACTION_TYPE_FLAG:
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:
flow_verbs_translate_action_drop(dev_flow, actions);
diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
index 630ab1d989..7157233e45 100644
--- a/drivers/net/mlx5/mlx5_rxtx.h
+++ b/drivers/net/mlx5/mlx5_rxtx.h
@@ -189,7 +189,6 @@ struct mlx5_rxq_ctrl {
enum mlx5_rxq_type type; /* Rxq type. */
unsigned int socket; /* CPU socket ID for allocations. */
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. */
uint16_t dump_file_n; /* Number of dump files. */
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:40.467434797 +0000
+++ 0065-net-mlx5-fix-mark-enabling-for-Rx.patch 2022-02-18 12:37:37.726792724 +0000
@@ -1 +1 @@
-From 082becbf1f35bda03a9ad80fcd7fe4afe3aea7be Mon Sep 17 00:00:00 2001
+From a133cd9add74162b2efc09169b910f863a41a6c1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 082becbf1f35bda03a9ad80fcd7fe4afe3aea7be ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
- drivers/net/mlx5/mlx5_flow.c | 53 ++++++++++++++++--------------
+ drivers/net/mlx5/mlx5_flow.c | 54 ++++++++++++++++--------------
@@ -28 +29 @@
- drivers/net/mlx5/mlx5_flow_dv.c | 14 +++++---
+ drivers/net/mlx5/mlx5_flow_dv.c | 6 ++--
@@ -30,2 +31,2 @@
- drivers/net/mlx5/mlx5_rx.h | 1 -
- 6 files changed, 41 insertions(+), 34 deletions(-)
+ drivers/net/mlx5/mlx5_rxtx.h | 1 -
+ 6 files changed, 36 insertions(+), 32 deletions(-)
@@ -34 +35 @@
-index 9413e3397c..737ad6895c 100644
+index a4880d01d9..93d9ad5e64 100644
@@ -37,2 +38 @@
-@@ -1413,6 +1413,7 @@ struct mlx5_priv {
- unsigned int mtr_en:1; /* Whether support meter. */
+@@ -947,6 +947,7 @@ struct mlx5_priv {
@@ -39,0 +40 @@
+ unsigned int sampler_en:1; /* Whether support sampler. */
@@ -46 +47 @@
-index 2cadf615ec..d7cb1eb89b 100644
+index 080731ca04..69f57605f8 100644
@@ -49 +50 @@
-@@ -1234,7 +1234,6 @@ flow_drv_rxq_flags_set(struct rte_eth_dev *dev,
+@@ -1171,7 +1171,6 @@ flow_drv_rxq_flags_set(struct rte_eth_dev *dev,
@@ -57 +58 @@
-@@ -1269,15 +1268,6 @@ flow_drv_rxq_flags_set(struct rte_eth_dev *dev,
+@@ -1205,15 +1204,6 @@ flow_drv_rxq_flags_set(struct rte_eth_dev *dev,
@@ -73 +74 @@
-@@ -1295,6 +1285,20 @@ flow_drv_rxq_flags_set(struct rte_eth_dev *dev,
+@@ -1231,6 +1221,20 @@ flow_drv_rxq_flags_set(struct rte_eth_dev *dev,
@@ -94 +95 @@
-@@ -1309,7 +1313,11 @@ flow_rxq_flags_set(struct rte_eth_dev *dev, struct rte_flow *flow)
+@@ -1245,7 +1249,11 @@ flow_rxq_flags_set(struct rte_eth_dev *dev, struct rte_flow *flow)
@@ -106 +107 @@
-@@ -1329,7 +1337,6 @@ flow_drv_rxq_flags_trim(struct rte_eth_dev *dev,
+@@ -1265,7 +1273,6 @@ flow_drv_rxq_flags_trim(struct rte_eth_dev *dev,
@@ -114,4 +115,4 @@
-@@ -1360,15 +1367,6 @@ flow_drv_rxq_flags_trim(struct rte_eth_dev *dev,
- MLX5_ASSERT(rxq_ctrl != NULL);
- if (rxq_ctrl == NULL)
- continue;
+@@ -1295,15 +1302,6 @@ flow_drv_rxq_flags_trim(struct rte_eth_dev *dev,
+ container_of((*priv->rxqs)[idx],
+ struct mlx5_rxq_ctrl, rxq);
+
@@ -130,3 +131 @@
-@@ -1425,12 +1423,12 @@ flow_rxq_flags_clear(struct rte_eth_dev *dev)
-
- if (rxq == NULL || rxq->ctrl == NULL)
+@@ -1362,12 +1360,12 @@ flow_rxq_flags_clear(struct rte_eth_dev *dev)
@@ -134,2 +133,4 @@
-- rxq->ctrl->flow_mark_n = 0;
- rxq->ctrl->rxq.mark = 0;
+ rxq_ctrl = container_of((*priv->rxqs)[i],
+ struct mlx5_rxq_ctrl, rxq);
+- rxq_ctrl->flow_mark_n = 0;
+ rxq_ctrl->rxq.mark = 0;
@@ -137,2 +138,2 @@
- rxq->ctrl->flow_tunnels_n[j] = 0;
- rxq->ctrl->rxq.tunnel = 0;
+ rxq_ctrl->flow_tunnels_n[j] = 0;
+ rxq_ctrl->rxq.tunnel = 0;
@@ -144 +145 @@
-@@ -4811,6 +4809,7 @@ flow_create_split_inner(struct rte_eth_dev *dev,
+@@ -4272,6 +4270,7 @@ flow_create_split_inner(struct rte_eth_dev *dev,
@@ -152 +153 @@
-@@ -4829,8 +4828,10 @@ flow_create_split_inner(struct rte_eth_dev *dev,
+@@ -4290,8 +4289,10 @@ flow_create_split_inner(struct rte_eth_dev *dev,
@@ -164,3 +165,11 @@
- #ifdef HAVE_IBV_FLOW_DV_SUPPORT
-@@ -6143,7 +6144,7 @@ flow_create_split_meter(struct rte_eth_dev *dev,
- MLX5_FLOW_TABLE_LEVEL_METER;
+ return flow_drv_translate(dev, dev_flow, attr, items, actions, error);
+@@ -5091,6 +5092,7 @@ flow_create_split_meter(struct rte_eth_dev *dev,
+ struct mlx5_flow_split_info *flow_split_info,
+ struct rte_flow_error *error)
+ {
++ struct mlx5_flow_workspace *wks = mlx5_flow_get_thread_workspace();
+ struct mlx5_priv *priv = dev->data->dev_private;
+ struct rte_flow_action *sfx_actions = NULL;
+ struct rte_flow_action *pre_actions = NULL;
+@@ -5146,7 +5148,7 @@ flow_create_split_meter(struct rte_eth_dev *dev,
+ MLX5_FLOW_TABLE_LEVEL_SUFFIX;
@@ -171 +179,0 @@
- flow_split_info->table_id = MLX5_MTR_TABLE_ID_SUFFIX;
@@ -174,2 +182,2 @@
-@@ -6209,6 +6210,7 @@ flow_create_split_sample(struct rte_eth_dev *dev,
- struct mlx5_flow_dv_sample_resource *sample_res;
+ ret = flow_create_split_metadata(dev, flow,
+@@ -5212,6 +5214,7 @@ flow_create_split_sample(struct rte_eth_dev *dev,
@@ -177,0 +186 @@
+ union mlx5_flow_tbl_key sfx_table_key;
@@ -182,2 +191,2 @@
-@@ -6295,7 +6297,8 @@ flow_create_split_sample(struct rte_eth_dev *dev,
- }
+@@ -5277,7 +5280,8 @@ flow_create_split_sample(struct rte_eth_dev *dev,
+ sfx_table_key.table_id;
@@ -190,2 +199,2 @@
- * MLX5_SCALE_FLOW_GROUP_BIT of skip_scale to 1 to avoid scale
- * again in translation.
+ * skip_scale to 1 to avoid scale again in translation.
+ */
@@ -193 +202 @@
-index 125d85899c..7fec79afb3 100644
+index ed5f94a9a0..fb11ae6b40 100644
@@ -196 +205,2 @@
-@@ -697,7 +697,6 @@ struct mlx5_flow_handle {
+@@ -632,7 +632,6 @@ struct mlx5_flow_handle {
+ /**< Bit-fields of present layers, see MLX5_FLOW_LAYER_*. */
@@ -198,2 +208 @@
- 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 split_flow_id:28; /**< Sub flow unique match flow id. */
@@ -202 +210,0 @@
- uint32_t flex_item; /**< referenced Flex Item bitmask. */
@@ -204,4 +212,5 @@
-@@ -1108,6 +1107,7 @@ struct mlx5_flow_workspace {
- /* The final policy when meter policy is hierarchy. */
- uint32_t skip_matcher_reg:1;
- /* Indicates if need to skip matcher register in translate. */
+ uint32_t rix_hrxq; /**< Hash Rx queue object index. */
+@@ -1123,6 +1122,7 @@ struct mlx5_flow_workspace {
+ struct mlx5_flow_rss_desc rss_desc;
+ uint32_t rssq_num; /* Allocated queue num in rss_desc. */
+ uint32_t flow_idx; /* Intermediate device flow index. */
@@ -213 +222 @@
-index 0383976883..18992b1e26 100644
+index c134e24c0e..977072ba32 100644
@@ -216 +225 @@
-@@ -11646,7 +11646,7 @@ flow_dv_translate_action_sample(struct rte_eth_dev *dev,
+@@ -9200,7 +9200,7 @@ flow_dv_translate_action_sample(struct rte_eth_dev *dev,
@@ -225 +234 @@
-@@ -12806,7 +12806,7 @@ flow_dv_translate(struct rte_eth_dev *dev,
+@@ -9889,7 +9889,7 @@ flow_dv_translate(struct rte_eth_dev *dev,
@@ -234 +243 @@
-@@ -12835,7 +12835,7 @@ flow_dv_translate(struct rte_eth_dev *dev,
+@@ -9918,7 +9918,7 @@ flow_dv_translate(struct rte_eth_dev *dev,
@@ -243,38 +251,0 @@
-@@ -15403,7 +15403,9 @@ __flow_dv_create_domain_policy_acts(struct rte_eth_dev *dev,
- (MLX5_MAX_MODIFY_NUM + 1)];
- } 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;
- memset(&dh, 0, sizeof(struct mlx5_flow_handle));
-@@ -15441,7 +15443,7 @@ __flow_dv_create_domain_policy_acts(struct rte_eth_dev *dev,
- NULL,
- "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))
- return -rte_mtr_error_set(error,
-@@ -16866,7 +16868,9 @@ __flow_dv_meter_get_rss_sub_policy(struct rte_eth_dev *dev,
- struct mlx5_meter_policy_action_container *act_cnt;
- 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++) {
- if (!rss_desc[i])
-@@ -16940,7 +16944,7 @@ __flow_dv_meter_get_rss_sub_policy(struct rte_eth_dev *dev,
- if (act_cnt->rix_mark || act_cnt->modify_hdr) {
- 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];
- flow_drv_rxq_flags_set(dev, &dh);
@@ -282 +253 @@
-index 192a00d4fd..90ccb9aaff 100644
+index 9c2fc1b25e..fa7ba129fd 100644
@@ -285 +256 @@
-@@ -1693,12 +1693,12 @@ flow_verbs_translate(struct rte_eth_dev *dev,
+@@ -1736,12 +1736,12 @@ flow_verbs_translate(struct rte_eth_dev *dev,
@@ -300,7 +271,7 @@
-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
-@@ -161,7 +161,6 @@ struct mlx5_rxq_ctrl {
- uint16_t share_qid; /* Shared RxQ ID in group. */
- unsigned int started:1; /* Whether (shared) RXQ has been started. */
+diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
+index 630ab1d989..7157233e45 100644
+--- a/drivers/net/mlx5/mlx5_rxtx.h
++++ b/drivers/net/mlx5/mlx5_rxtx.h
+@@ -189,7 +189,6 @@ struct mlx5_rxq_ctrl {
+ enum mlx5_rxq_type type; /* Rxq type. */
+ unsigned int socket; /* CPU socket ID for allocations. */
@@ -311 +282 @@
- uint32_t rxseg_n; /* Number of split segment descriptions. */
+ uint16_t dump_file_n; /* Number of dump files. */
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/mlx5: reject jump to root table' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (63 preceding siblings ...)
2022-02-18 12:38 ` patch 'net/mlx5: fix mark enabling for Rx' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'doc: update matching versions in ice guide' " luca.boccassi
` (57 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Xiaoyu Min; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/12eaf885f5d033b7d15fa98ba9a0d37b4b9ff9fb
Thanks.
Luca Boccassi
---
From 12eaf885f5d033b7d15fa98ba9a0d37b4b9ff9fb 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 977072ba32..35c87e1fc5 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -3977,7 +3977,7 @@ flow_dv_validate_action_jump(struct rte_eth_dev *dev,
const struct rte_flow_attr *attributes,
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 = {
.external = !!external,
@@ -4018,6 +4018,10 @@ flow_dv_validate_action_jump(struct rte_eth_dev *dev,
RTE_FLOW_ERROR_TYPE_ACTION, NULL,
"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.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:40.527893562 +0000
+++ 0066-net-mlx5-reject-jump-to-root-table.patch 2022-02-18 12:37:37.738792992 +0000
@@ -1 +1 @@
-From 87b26522f7ff65375fb1d773a7f93c70bf857b96 Mon Sep 17 00:00:00 2001
+From 12eaf885f5d033b7d15fa98ba9a0d37b4b9ff9fb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 87b26522f7ff65375fb1d773a7f93c70bf857b96 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 18992b1e26..af90a7fd0a 100644
+index 977072ba32..35c87e1fc5 100644
@@ -23 +24 @@
-@@ -4968,7 +4968,7 @@ flow_dv_validate_action_jump(struct rte_eth_dev *dev,
+@@ -3977,7 +3977,7 @@ flow_dv_validate_action_jump(struct rte_eth_dev *dev,
@@ -32 +33 @@
-@@ -4999,6 +4999,10 @@ flow_dv_validate_action_jump(struct rte_eth_dev *dev,
+@@ -4018,6 +4018,10 @@ flow_dv_validate_action_jump(struct rte_eth_dev *dev,
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'doc: update matching versions in ice guide' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (64 preceding siblings ...)
2022-02-18 12:38 ` patch 'net/mlx5: reject jump to root table' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'build: fix warnings when running external commands' " luca.boccassi
` (56 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Qi Zhang; +Cc: Junfeng Guo, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/29649b45905936893920d4fbe5ef10553c92943d
Thanks.
Luca Boccassi
---
From 29649b45905936893920d4fbe5ef10553c92943d 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 | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/doc/guides/nics/ice.rst b/doc/guides/nics/ice.rst
index 7b5a1bf157..2df7ceceb3 100644
--- a/doc/guides/nics/ice.rst
+++ b/doc/guides/nics/ice.rst
@@ -34,11 +34,19 @@ to avoid the compatibility issues with ice PMD.
Here is the suggested matching list which has been tested and verified.
The detailed information can refer to chapter Tested Platforms/Tested NICs in release notes.
- +-----------+---------------+-----------------+-----------+-----------+
- | DPDK | Kernel Driver | OS Default DDP | COMMS DDP | Firmware |
- +===========+===============+=================+===========+===========+
- | 20.11 | 1.3.2 | 1.3.20 | 1.3.24 | 2.3 |
- +-----------+---------------+-----------------+-----------+-----------+
+ +-----------+---------------+-----------------+-----------+--------------+-----------+
+ | DPDK | Kernel Driver | OS Default DDP | COMMS DDP | Wireless DDP | Firmware |
+ +===========+===============+=================+===========+==============+===========+
+ | 20.11 | 1.3.2 | 1.3.20 | 1.3.24 | N/A | 2.3 |
+ +-----------+---------------+-----------------+-----------+--------------+-----------+
+ | 21.02 | 1.4.11 | 1.3.24 | 1.3.28 | 1.3.4 | 2.4 |
+ +-----------+---------------+-----------------+-----------+--------------+-----------+
+ | 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.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:40.572608922 +0000
+++ 0067-doc-update-matching-versions-in-ice-guide.patch 2022-02-18 12:37:37.738792992 +0000
@@ -1 +1 @@
-From affa9de4747d3fc8b827a51211e9d3020f658574 Mon Sep 17 00:00:00 2001
+From 29649b45905936893920d4fbe5ef10553c92943d 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.
@@ -13,2 +13,2 @@
- doc/guides/nics/ice.rst | 4 ++++
- 1 file changed, 4 insertions(+)
+ doc/guides/nics/ice.rst | 18 +++++++++++++-----
+ 1 file changed, 13 insertions(+), 5 deletions(-)
@@ -17 +17 @@
-index f95fef8cf0..a1780c46c3 100644
+index 7b5a1bf157..2df7ceceb3 100644
@@ -20,4 +20,18 @@
-@@ -58,6 +58,10 @@ 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 |
- +-----------+---------------+-----------------+-----------+--------------+-----------+
+@@ -34,11 +34,19 @@ to avoid the compatibility issues with ice PMD.
+ Here is the suggested matching list which has been tested and verified.
+ The detailed information can refer to chapter Tested Platforms/Tested NICs in release notes.
+
+- +-----------+---------------+-----------------+-----------+-----------+
+- | DPDK | Kernel Driver | OS Default DDP | COMMS DDP | Firmware |
+- +===========+===============+=================+===========+===========+
+- | 20.11 | 1.3.2 | 1.3.20 | 1.3.24 | 2.3 |
+- +-----------+---------------+-----------------+-----------+-----------+
++ +-----------+---------------+-----------------+-----------+--------------+-----------+
++ | DPDK | Kernel Driver | OS Default DDP | COMMS DDP | Wireless DDP | Firmware |
++ +===========+===============+=================+===========+==============+===========+
++ | 20.11 | 1.3.2 | 1.3.20 | 1.3.24 | N/A | 2.3 |
++ +-----------+---------------+-----------------+-----------+--------------+-----------+
++ | 21.02 | 1.4.11 | 1.3.24 | 1.3.28 | 1.3.4 | 2.4 |
++ +-----------+---------------+-----------------+-----------+--------------+-----------+
++ | 21.05 | 1.6.5 | 1.3.26 | 1.3.30 | 1.3.6 | 3.0 |
++ +-----------+---------------+-----------------+-----------+--------------+-----------+
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'build: fix warnings when running external commands' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (65 preceding siblings ...)
2022-02-18 12:38 ` patch 'doc: update matching versions in ice guide' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'build: fix warning about using -Wextra flag' " luca.boccassi
` (55 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Jerin Jacob, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/14421740c492df1d9267892566ef33e784790c1c
Thanks.
Luca Boccassi
---
From 14421740c492df1d9267892566ef33e784790c1c 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 +-
config/arm/meson.build | 2 +-
config/meson.build | 2 +-
config/x86/meson.build | 2 +-
drivers/common/mlx5/linux/meson.build | 2 +-
drivers/net/mlx4/meson.build | 2 +-
kernel/linux/kni/meson.build | 2 +-
kernel/linux/meson.build | 4 ++--
meson.build | 2 +-
9 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/app/test/meson.build b/app/test/meson.build
index 49fbb5e18e..c2f0d24c1d 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -437,7 +437,7 @@ dpdk_test = executable('dpdk-test',
driver_install_path),
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))
# some perf tests (eg: memcpy perf autotest)take very long
diff --git a/config/arm/meson.build b/config/arm/meson.build
index 42b4e43c74..fcbcf1ca56 100644
--- a/config/arm/meson.build
+++ b/config/arm/meson.build
@@ -156,7 +156,7 @@ else
# 'Primary Part number', 'Revision']
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(' ')
endif
diff --git a/config/meson.build b/config/meson.build
index a19f67ec5a..7275946e66 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -23,7 +23,7 @@ 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_file, check: true).stdout().strip()
# Libraries have the abi_version as the filename extension
# and have the soname be all but the final part of the abi_version.
diff --git a/config/x86/meson.build b/config/x86/meson.build
index 0007b6b49f..918a29008b 100644
--- a/config/x86/meson.build
+++ b/config/x86/meson.build
@@ -4,7 +4,7 @@
# get binutils version for the workaround of Bug 97
binutils_ok = true
if not is_windows and (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'
warning('Binutils error with AVX512 assembly, disabling AVX512 support')
diff --git a/drivers/common/mlx5/linux/meson.build b/drivers/common/mlx5/linux/meson.build
index 43d70c1324..7e64583b4a 100644
--- a/drivers/common/mlx5/linux/meson.build
+++ b/drivers/common/mlx5/linux/meson.build
@@ -37,7 +37,7 @@ foreach libname:libnames
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
if static_ibverbs
diff --git a/drivers/net/mlx4/meson.build b/drivers/net/mlx4/meson.build
index d7602b748e..467fa25a3c 100644
--- a/drivers/net/mlx4/meson.build
+++ b/drivers/net/mlx4/meson.build
@@ -42,7 +42,7 @@ foreach libname:libnames
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
if static_ibverbs
diff --git a/kernel/linux/kni/meson.build b/kernel/linux/kni/meson.build
index 0eedbd6cb1..1e642ec9d4 100644
--- a/kernel/linux/kni/meson.build
+++ b/kernel/linux/kni/meson.build
@@ -5,7 +5,7 @@
# Ref: https://jira.devtools.intel.com/browse/DPDK-29263
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
kmod_cflags = '-DHAVE_ARG_TX_QUEUE'
diff --git a/kernel/linux/meson.build b/kernel/linux/meson.build
index 76eb279d9e..b23298b1fd 100644
--- a/kernel/linux/meson.build
+++ b/kernel/linux/meson.build
@@ -11,7 +11,7 @@ endif
kernel_dir = get_option('kernel_dir')
if kernel_dir == ''
# use default path for native builds
- kernel_version = run_command('uname', '-r').stdout().strip()
+ kernel_version = run_command('uname', '-r', check: true).stdout().strip()
kernel_dir = '/lib/modules/' + kernel_version
endif
@@ -23,7 +23,7 @@ endif
# test running make in kernel directory, using "make kernelversion"
make_returncode = run_command('make', '-sC', kernel_dir + '/build',
- 'kernelversion').returncode()
+ 'kernelversion', check: true).returncode()
if make_returncode != 0
error('Cannot compile kernel modules as requested - are kernel headers installed?')
endif
diff --git a/meson.build b/meson.build
index 8e051f7f4e..4463c40018 100644
--- a/meson.build
+++ b/meson.build
@@ -5,7 +5,7 @@ project('DPDK', 'C',
# Get version number from file.
# 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'],
meson_version: '>= 0.47.1'
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:40.605349870 +0000
+++ 0068-build-fix-warnings-when-running-external-commands.patch 2022-02-18 12:37:37.742793082 +0000
@@ -1 +1 @@
-From ecb904cc4596b33aa182e2a7c9edc3104ff981c3 Mon Sep 17 00:00:00 2001
+From 14421740c492df1d9267892566ef33e784790c1c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ecb904cc4596b33aa182e2a7c9edc3104ff981c3 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -24,12 +25,10 @@
- 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(-)
+ app/test/meson.build | 2 +-
+ config/arm/meson.build | 2 +-
+ config/meson.build | 2 +-
+ config/x86/meson.build | 2 +-
+ drivers/common/mlx5/linux/meson.build | 2 +-
+ drivers/net/mlx4/meson.build | 2 +-
+ kernel/linux/kni/meson.build | 2 +-
+ kernel/linux/meson.build | 4 ++--
+ meson.build | 2 +-
+ 9 files changed, 10 insertions(+), 10 deletions(-)
@@ -38 +37 @@
-index 725a218f4a..5476c180ee 100644
+index 49fbb5e18e..c2f0d24c1d 100644
@@ -41,3 +40,3 @@
-@@ -457,7 +457,7 @@ dpdk_test = executable('dpdk-test',
- driver_install_path),
- install: true)
+@@ -437,7 +437,7 @@ dpdk_test = executable('dpdk-test',
+ driver_install_path),
+ install: true)
@@ -50,13 +48,0 @@
-diff --git a/buildtools/meson.build b/buildtools/meson.build
-index 22ea0ba375..400b88f251 100644
---- a/buildtools/meson.build
-+++ b/buildtools/meson.build
-@@ -45,7 +45,7 @@ if host_machine.system() != 'windows'
- 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
- endforeach
@@ -64 +50 @@
-index c3a3f2faaf..e102381af5 100644
+index 42b4e43c74..fcbcf1ca56 100644
@@ -67,9 +53,9 @@
-@@ -463,7 +463,7 @@ else
- # 'Primary Part number', 'Revision']
- 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(' ')
- implementer_id = cmd_output[0]
+@@ -156,7 +156,7 @@ else
+ # 'Primary Part number', 'Revision']
+ 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(' ')
+ endif
@@ -77 +63 @@
-index 805d5d51d0..ee12318d4f 100644
+index a19f67ec5a..7275946e66 100644
@@ -80,2 +66 @@
-@@ -22,7 +22,8 @@ is_ms_linker = is_windows and (cc.get_id() == 'clang')
- # depending on the configuration options
+@@ -23,7 +23,7 @@ is_ms_linker = is_windows and (cc.get_id() == 'clang')
@@ -84,3 +69,3 @@
--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()
+ abi_version = run_command(find_program('cat', 'more'),
+- abi_version_file).stdout().strip()
++ abi_version_file, check: true).stdout().strip()
@@ -90,9 +74,0 @@
-@@ -334,7 +335,7 @@ if max_lcores == 'detect'
- error('Discovery of max_lcores is not supported for cross-compilation.')
- 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
- if max_lcores < min_lcores
@@ -100 +76 @@
-index e25ed316f4..54345c4da3 100644
+index 0007b6b49f..918a29008b 100644
@@ -106,6 +82,6 @@
- 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'
- warning('Binutils error with AVX512 assembly, disabling AVX512 support')
+ if not is_windows and (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'
+ warning('Binutils error with AVX512 assembly, disabling AVX512 support')
@@ -113 +89 @@
-index 7909f23e21..4c7b53b9bd 100644
+index 43d70c1324..7e64583b4a 100644
@@ -116 +92 @@
-@@ -36,7 +36,7 @@ foreach libname:libnames
+@@ -37,7 +37,7 @@ foreach libname:libnames
@@ -119,4 +95,4 @@
- # 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())
+ # 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())
@@ -125,15 +100,0 @@
-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
-@@ -8,8 +8,8 @@ sources += files(
- 'mlx5_common_os.c',
- )
-
--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)
- build = false
@@ -141 +102 @@
-index 99a30eab8f..a038c1ec1b 100644
+index d7602b748e..467fa25a3c 100644
@@ -147,4 +108,4 @@
- # 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())
+ # 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())
@@ -154 +115 @@
-index c683fc7b36..dae8c37b37 100644
+index 0eedbd6cb1..1e642ec9d4 100644
@@ -167 +128 @@
-index 0637452e95..d8fb20c1c3 100644
+index 76eb279d9e..b23298b1fd 100644
@@ -170 +131,8 @@
-@@ -11,7 +11,7 @@ cross_args = []
+@@ -11,7 +11,7 @@ endif
+ kernel_dir = get_option('kernel_dir')
+ if kernel_dir == ''
+ # use default path for native builds
+- kernel_version = run_command('uname', '-r').stdout().strip()
++ kernel_version = run_command('uname', '-r', check: true).stdout().strip()
+ kernel_dir = '/lib/modules/' + kernel_version
+ endif
@@ -172,23 +140 @@
- 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 == ''
- # use default path for native builds
-@@ -24,14 +24,14 @@ 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:
- # the headers could still be in the 'build' subdir
- if not kernel_build_dir.endswith('build') and not kernel_build_dir.endswith('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
+@@ -23,7 +23,7 @@ endif
@@ -196 +142,6 @@
-@@ -54,7 +54,8 @@ if kernel_build_dir == ''
+ # test running make in kernel directory, using "make kernelversion"
+ make_returncode = run_command('make', '-sC', kernel_dir + '/build',
+- 'kernelversion').returncode()
++ 'kernelversion', check: true).returncode()
+ if make_returncode != 0
+ error('Cannot compile kernel modules as requested - are kernel headers installed?')
@@ -198,8 +148,0 @@
- 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 = ''
- found_target = false
@@ -207 +150 @@
-index 12cb6e0e83..1223b79d74 100644
+index 8e051f7f4e..4463c40018 100644
@@ -211,8 +154,8 @@
- # Get version number from file.
- # 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'],
- meson_version: '>= 0.49.2'
+ # Get version number from file.
+ # 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'],
+ meson_version: '>= 0.47.1'
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'build: fix warning about using -Wextra flag' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (66 preceding siblings ...)
2022-02-18 12:38 ` patch 'build: fix warnings when running external commands' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 13:13 ` Richardson, Bruce
2022-02-18 12:38 ` patch 'build: remove deprecated Meson functions' " luca.boccassi
` (54 subsequent siblings)
122 siblings, 1 reply; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Luca Boccassi, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/3215df7480e04af0ce177c5320d6c580bedec99a
Thanks.
Luca Boccassi
---
From 3215df7480e04af0ce177c5320d6c580bedec99a Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 21 Jan 2022 16:12:30 +0000
Subject: [PATCH] build: fix warning about using -Wextra flag
[ upstream commit d832326ae9b1b67c2976da293a459b51297fcfa0 ]
Each build, meson would issue a warning reporting that the
"warning_level" setting should be used in place of adding -Wextra
directly to our build commands. Testing with meson 0.61 shows that the
only difference for gcc and clang builds between warning levels 1 and
2 is the addition of -Wextra, so we can remove the warning by deleting
our explicit set of Wextra and changing the build defaults to
warning_level 2.
Fixes: 524a0d5d66b9 ("build: enable extra warnings with meson")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
config/meson.build | 5 ++---
meson.build | 6 +++++-
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/config/meson.build b/config/meson.build
index 7275946e66..bd50f189e0 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -194,10 +194,9 @@ endif
add_project_arguments('-include', 'rte_config.h', language: 'c')
# enable extra warnings and disable any unwanted warnings
+# -Wall is added by default at warning level 1, and -Wextra
+# at warning level 2 (DPDK default)
warning_flags = [
- # -Wall is added by meson by default, so add -Wextra only
- '-Wextra',
-
# additional warnings in alphabetical order
'-Wcast-qual',
'-Wdeprecated',
diff --git a/meson.build b/meson.build
index 4463c40018..8eeb0ff8d8 100644
--- a/meson.build
+++ b/meson.build
@@ -7,7 +7,11 @@ project('DPDK', 'C',
version: run_command(find_program('cat', 'more'),
files('VERSION'), check: true).stdout().strip(),
license: 'BSD',
- default_options: ['buildtype=release', 'default_library=static'],
+ default_options: [
+ 'buildtype=release',
+ 'default_library=static',
+ 'warning_level=2',
+ ],
meson_version: '>= 0.47.1'
)
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:40.641036173 +0000
+++ 0069-build-fix-warning-about-using-Wextra-flag.patch 2022-02-18 12:37:37.746793171 +0000
@@ -1 +1 @@
-From d832326ae9b1b67c2976da293a459b51297fcfa0 Mon Sep 17 00:00:00 2001
+From 3215df7480e04af0ce177c5320d6c580bedec99a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d832326ae9b1b67c2976da293a459b51297fcfa0 ]
+
@@ -24 +26 @@
-index ee12318d4f..7134e80e8d 100644
+index 7275946e66..bd50f189e0 100644
@@ -27 +29 @@
-@@ -247,10 +247,9 @@ endif
+@@ -194,10 +194,9 @@ endif
@@ -34,2 +36,2 @@
-- # -Wall is added by meson by default, so add -Wextra only
-- '-Wextra',
+- # -Wall is added by meson by default, so add -Wextra only
+- '-Wextra',
@@ -37,3 +39,3 @@
- # additional warnings in alphabetical order
- '-Wcast-qual',
- '-Wdeprecated',
+ # additional warnings in alphabetical order
+ '-Wcast-qual',
+ '-Wdeprecated',
@@ -41 +43 @@
-index 1223b79d74..3d97e96f38 100644
+index 4463c40018..8eeb0ff8d8 100644
@@ -45,10 +47,10 @@
- version: run_command(find_program('cat', 'more'),
- files('VERSION'), check: true).stdout().strip(),
- license: 'BSD',
-- default_options: ['buildtype=release', 'default_library=static'],
-+ default_options: [
-+ 'buildtype=release',
-+ 'default_library=static',
-+ 'warning_level=2',
-+ ],
- meson_version: '>= 0.49.2'
+ version: run_command(find_program('cat', 'more'),
+ files('VERSION'), check: true).stdout().strip(),
+ license: 'BSD',
+- default_options: ['buildtype=release', 'default_library=static'],
++ default_options: [
++ 'buildtype=release',
++ 'default_library=static',
++ 'warning_level=2',
++ ],
+ meson_version: '>= 0.47.1'
^ permalink raw reply [flat|nested] 228+ messages in thread
* RE: patch 'build: fix warning about using -Wextra flag' has been queued to stable release 20.11.5
2022-02-18 12:38 ` patch 'build: fix warning about using -Wextra flag' " luca.boccassi
@ 2022-02-18 13:13 ` Richardson, Bruce
0 siblings, 0 replies; 228+ messages in thread
From: Richardson, Bruce @ 2022-02-18 13:13 UTC (permalink / raw)
To: luca.boccassi; +Cc: Luca Boccassi, dpdk stable
I'm a little conflicted about this patch being backported. While it's probably safe enough, since it only affects warnings, it's probably unnecessary to backport.
I'll defer to your judgement, Luca, as LTS maintainer.
> -----Original Message-----
> From: luca.boccassi@gmail.com <luca.boccassi@gmail.com>
> Sent: Friday, February 18, 2022 12:39 PM
> To: Richardson, Bruce <bruce.richardson@intel.com>
> Cc: Luca Boccassi <bluca@debian.org>; dpdk stable <stable@dpdk.org>
> Subject: patch 'build: fix warning about using -Wextra flag' has been
> queued to stable release 20.11.5
>
> Hi,
>
> FYI, your patch has been queued to stable release 20.11.5
>
> 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/20/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/bluca/dpdk-stable
>
> This queued commit can be viewed at:
> https://github.com/bluca/dpdk-
> stable/commit/3215df7480e04af0ce177c5320d6c580bedec99a
>
> Thanks.
>
> Luca Boccassi
>
> ---
> From 3215df7480e04af0ce177c5320d6c580bedec99a Mon Sep 17 00:00:00 2001
> From: Bruce Richardson <bruce.richardson@intel.com>
> Date: Fri, 21 Jan 2022 16:12:30 +0000
> Subject: [PATCH] build: fix warning about using -Wextra flag
>
> [ upstream commit d832326ae9b1b67c2976da293a459b51297fcfa0 ]
>
> Each build, meson would issue a warning reporting that the
> "warning_level" setting should be used in place of adding -Wextra
> directly to our build commands. Testing with meson 0.61 shows that the
> only difference for gcc and clang builds between warning levels 1 and
> 2 is the addition of -Wextra, so we can remove the warning by deleting
> our explicit set of Wextra and changing the build defaults to
> warning_level 2.
>
> Fixes: 524a0d5d66b9 ("build: enable extra warnings with meson")
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> Acked-by: Luca Boccassi <bluca@debian.org>
> ---
> config/meson.build | 5 ++---
> meson.build | 6 +++++-
> 2 files changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/config/meson.build b/config/meson.build
> index 7275946e66..bd50f189e0 100644
> --- a/config/meson.build
> +++ b/config/meson.build
> @@ -194,10 +194,9 @@ endif
> add_project_arguments('-include', 'rte_config.h', language: 'c')
>
> # enable extra warnings and disable any unwanted warnings
> +# -Wall is added by default at warning level 1, and -Wextra
> +# at warning level 2 (DPDK default)
> warning_flags = [
> - # -Wall is added by meson by default, so add -Wextra only
> - '-Wextra',
> -
> # additional warnings in alphabetical order
> '-Wcast-qual',
> '-Wdeprecated',
> diff --git a/meson.build b/meson.build
> index 4463c40018..8eeb0ff8d8 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -7,7 +7,11 @@ project('DPDK', 'C',
> version: run_command(find_program('cat', 'more'),
> files('VERSION'), check: true).stdout().strip(),
> license: 'BSD',
> - default_options: ['buildtype=release', 'default_library=static'],
> + default_options: [
> + 'buildtype=release',
> + 'default_library=static',
> + 'warning_level=2',
> + ],
> meson_version: '>= 0.47.1'
> )
>
> --
> 2.30.2
>
> ---
> Diff of the applied patch vs upstream commit (please double-check if
> non-empty:
> ---
> --- - 2022-02-18 12:37:40.641036173 +0000
> +++ 0069-build-fix-warning-about-using-Wextra-flag.patch 2022-02-18
> 12:37:37.746793171 +0000
> @@ -1 +1 @@
> -From d832326ae9b1b67c2976da293a459b51297fcfa0 Mon Sep 17 00:00:00 2001
> +From 3215df7480e04af0ce177c5320d6c580bedec99a Mon Sep 17 00:00:00 2001
> @@ -5,0 +6,2 @@
> +[ upstream commit d832326ae9b1b67c2976da293a459b51297fcfa0 ]
> +
> @@ -24 +26 @@
> -index ee12318d4f..7134e80e8d 100644
> +index 7275946e66..bd50f189e0 100644
> @@ -27 +29 @@
> -@@ -247,10 +247,9 @@ endif
> +@@ -194,10 +194,9 @@ endif
> @@ -34,2 +36,2 @@
> -- # -Wall is added by meson by default, so add -Wextra only
> -- '-Wextra',
> +- # -Wall is added by meson by default, so add -Wextra only
> +- '-Wextra',
> @@ -37,3 +39,3 @@
> - # additional warnings in alphabetical order
> - '-Wcast-qual',
> - '-Wdeprecated',
> + # additional warnings in alphabetical order
> + '-Wcast-qual',
> + '-Wdeprecated',
> @@ -41 +43 @@
> -index 1223b79d74..3d97e96f38 100644
> +index 4463c40018..8eeb0ff8d8 100644
> @@ -45,10 +47,10 @@
> - version: run_command(find_program('cat', 'more'),
> - files('VERSION'), check: true).stdout().strip(),
> - license: 'BSD',
> -- default_options: ['buildtype=release',
> 'default_library=static'],
> -+ default_options: [
> -+ 'buildtype=release',
> -+ 'default_library=static',
> -+ 'warning_level=2',
> -+ ],
> - meson_version: '>= 0.49.2'
> + version: run_command(find_program('cat', 'more'),
> + files('VERSION'), check: true).stdout().strip(),
> + license: 'BSD',
> +- default_options: ['buildtype=release', 'default_library=static'],
> ++ default_options: [
> ++ 'buildtype=release',
> ++ 'default_library=static',
> ++ 'warning_level=2',
> ++ ],
> + meson_version: '>= 0.47.1'
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'build: remove deprecated Meson functions' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (67 preceding siblings ...)
2022-02-18 12:38 ` patch 'build: fix warning about using -Wextra flag' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 13:16 ` Richardson, Bruce
2022-02-18 12:38 ` patch 'kni: fix ioctl signature' " luca.boccassi
` (53 subsequent siblings)
122 siblings, 1 reply; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Jerin Jacob, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/04a29bf8a81580ad1349654e3227a96822b5faa5
Thanks.
Luca Boccassi
---
From 04a29bf8a81580ad1349654e3227a96822b5faa5 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 | 2 +-
kernel/linux/kni/meson.build | 8 ++++----
meson.build | 2 ++
4 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/doc/api/meson.build b/doc/api/meson.build
index 22d1bc204d..94e683455f 100644
--- a/doc/api/meson.build
+++ b/doc/api/meson.build
@@ -24,7 +24,7 @@ htmldir = join_paths(get_option('datadir'), 'doc', 'dpdk')
# So use a configure option for now.
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'),
install_dir: htmldir,
@@ -32,11 +32,11 @@ 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')
cdata.set('WARN_AS_ERROR', 'YES')
diff --git a/kernel/freebsd/meson.build b/kernel/freebsd/meson.build
index dc156a43fd..16a4e0b124 100644
--- a/kernel/freebsd/meson.build
+++ b/kernel/freebsd/meson.build
@@ -10,7 +10,7 @@ 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'),
+ '-I' + join_paths(dpdk_source_root, 'config'),
'-include rte_config.h']
# to avoid warnings due to race conditions with creating the dev_if.h, etc.
diff --git a/kernel/linux/kni/meson.build b/kernel/linux/kni/meson.build
index 1e642ec9d4..dab4f77df4 100644
--- a/kernel/linux/kni/meson.build
+++ b/kernel/linux/kni/meson.build
@@ -28,10 +28,10 @@ custom_target('rte_kni',
'M=' + meson.current_build_dir(),
'src=' + meson.current_source_dir(),
' '.join(['MODULE_CFLAGS=', kmod_cflags,'-include '])
- + meson.source_root() + '/config/rte_config.h' +
- ' -I' + meson.source_root() + '/lib/librte_eal/include' +
- ' -I' + meson.source_root() + '/lib/librte_kni' +
- ' -I' + meson.build_root() +
+ + dpdk_source_root + '/config/rte_config.h' +
+ ' -I' + dpdk_source_root + '/lib/librte_eal/include' +
+ ' -I' + dpdk_source_root + '/lib/librte_kni' +
+ ' -I' + dpdk_build_root +
' -I' + meson.current_source_dir(),
'modules'],
depends: kni_mkfile,
diff --git a/meson.build b/meson.build
index 8eeb0ff8d8..290d99cdf9 100644
--- a/meson.build
+++ b/meson.build
@@ -17,6 +17,8 @@ project('DPDK', 'C',
# 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 = []
dpdk_static_libraries = []
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:40.672276767 +0000
+++ 0070-build-remove-deprecated-Meson-functions.patch 2022-02-18 12:37:37.746793171 +0000
@@ -1 +1 @@
-From e16b972b1afe2444346016175ae086d5bea54016 Mon Sep 17 00:00:00 2001
+From 04a29bf8a81580ad1349654e3227a96822b5faa5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e16b972b1afe2444346016175ae086d5bea54016 ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
- kernel/freebsd/meson.build | 4 ++--
+ kernel/freebsd/meson.build | 2 +-
@@ -29 +30 @@
- 4 files changed, 13 insertions(+), 11 deletions(-)
+ 4 files changed, 12 insertions(+), 10 deletions(-)
@@ -32 +33 @@
-index 7e2b429ac8..5c25b92092 100644
+index 22d1bc204d..94e683455f 100644
@@ -38,6 +39,6 @@
- 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'),
- install_dir: htmldir,
+ 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'),
+ install_dir: htmldir,
@@ -59 +60 @@
- cdata.set('WARN_AS_ERROR', 'YES')
+ cdata.set('WARN_AS_ERROR', 'YES')
@@ -61 +62 @@
-index bf5aa20a55..1f612711be 100644
+index dc156a43fd..16a4e0b124 100644
@@ -64,2 +65 @@
-@@ -9,8 +9,8 @@ kmods = ['contigmem', 'nic_uio']
- # right now, which allows us to simplify things. We pull in the sourcer
+@@ -10,7 +10,7 @@ kmods = ['contigmem', 'nic_uio']
@@ -68,5 +68,4 @@
--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']
+ kmod_cflags = ['-I' + meson.build_root(),
+- '-I' + join_paths(meson.source_root(), 'config'),
++ '-I' + join_paths(dpdk_source_root, 'config'),
+ '-include rte_config.h']
@@ -76 +75 @@
-index dae8c37b37..4c90069e99 100644
+index 1e642ec9d4..dab4f77df4 100644
@@ -79,15 +78,15 @@
-@@ -29,10 +29,10 @@ custom_target('rte_kni',
- 'M=' + meson.current_build_dir(),
- '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,
- depends: kni_mkfile,
+@@ -28,10 +28,10 @@ custom_target('rte_kni',
+ 'M=' + meson.current_build_dir(),
+ 'src=' + meson.current_source_dir(),
+ ' '.join(['MODULE_CFLAGS=', kmod_cflags,'-include '])
+- + meson.source_root() + '/config/rte_config.h' +
+- ' -I' + meson.source_root() + '/lib/librte_eal/include' +
+- ' -I' + meson.source_root() + '/lib/librte_kni' +
+- ' -I' + meson.build_root() +
++ + dpdk_source_root + '/config/rte_config.h' +
++ ' -I' + dpdk_source_root + '/lib/librte_eal/include' +
++ ' -I' + dpdk_source_root + '/lib/librte_kni' +
++ ' -I' + dpdk_build_root +
+ ' -I' + meson.current_source_dir(),
+ 'modules'],
+ depends: kni_mkfile,
@@ -95 +94 @@
-index 3d97e96f38..937f6110c0 100644
+index 8eeb0ff8d8..290d99cdf9 100644
@@ -98 +97 @@
-@@ -31,6 +31,8 @@ endif
+@@ -17,6 +17,8 @@ project('DPDK', 'C',
^ permalink raw reply [flat|nested] 228+ messages in thread
* RE: patch 'build: remove deprecated Meson functions' has been queued to stable release 20.11.5
2022-02-18 12:38 ` patch 'build: remove deprecated Meson functions' " luca.boccassi
@ 2022-02-18 13:16 ` Richardson, Bruce
2022-02-21 10:56 ` Luca Boccassi
0 siblings, 1 reply; 228+ messages in thread
From: Richardson, Bruce @ 2022-02-18 13:16 UTC (permalink / raw)
To: luca.boccassi; +Cc: Jerin Jacob, dpdk stable
Again, I'm not sure this needs backport, as it's unlikely the deprecated functions will be removed in the near future. As before, I'll defer to your judgement as to the risk, if any.
> -----Original Message-----
> From: luca.boccassi@gmail.com <luca.boccassi@gmail.com>
> Sent: Friday, February 18, 2022 12:39 PM
> To: Richardson, Bruce <bruce.richardson@intel.com>
> Cc: Jerin Jacob <jerinj@marvell.com>; dpdk stable <stable@dpdk.org>
> Subject: patch 'build: remove deprecated Meson functions' has been queued
> to stable release 20.11.5
>
> Hi,
>
> FYI, your patch has been queued to stable release 20.11.5
>
> 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/20/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/bluca/dpdk-stable
>
> This queued commit can be viewed at:
> https://github.com/bluca/dpdk-
> stable/commit/04a29bf8a81580ad1349654e3227a96822b5faa5
>
> Thanks.
>
> Luca Boccassi
>
> ---
> From 04a29bf8a81580ad1349654e3227a96822b5faa5 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 | 2 +-
> kernel/linux/kni/meson.build | 8 ++++----
> meson.build | 2 ++
> 4 files changed, 12 insertions(+), 10 deletions(-)
>
> diff --git a/doc/api/meson.build b/doc/api/meson.build
> index 22d1bc204d..94e683455f 100644
> --- a/doc/api/meson.build
> +++ b/doc/api/meson.build
> @@ -24,7 +24,7 @@ htmldir = join_paths(get_option('datadir'), 'doc',
> 'dpdk')
> # So use a configure option for now.
> 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'),
> install_dir: htmldir,
> @@ -32,11 +32,11 @@ 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')
> cdata.set('WARN_AS_ERROR', 'YES')
> diff --git a/kernel/freebsd/meson.build b/kernel/freebsd/meson.build
> index dc156a43fd..16a4e0b124 100644
> --- a/kernel/freebsd/meson.build
> +++ b/kernel/freebsd/meson.build
> @@ -10,7 +10,7 @@ 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'),
> + '-I' + join_paths(dpdk_source_root, 'config'),
> '-include rte_config.h']
>
> # to avoid warnings due to race conditions with creating the dev_if.h,
> etc.
> diff --git a/kernel/linux/kni/meson.build b/kernel/linux/kni/meson.build
> index 1e642ec9d4..dab4f77df4 100644
> --- a/kernel/linux/kni/meson.build
> +++ b/kernel/linux/kni/meson.build
> @@ -28,10 +28,10 @@ custom_target('rte_kni',
> 'M=' + meson.current_build_dir(),
> 'src=' + meson.current_source_dir(),
> ' '.join(['MODULE_CFLAGS=', kmod_cflags,'-include '])
> - + meson.source_root() + '/config/rte_config.h' +
> - ' -I' + meson.source_root() + '/lib/librte_eal/include' +
> - ' -I' + meson.source_root() + '/lib/librte_kni' +
> - ' -I' + meson.build_root() +
> + + dpdk_source_root + '/config/rte_config.h' +
> + ' -I' + dpdk_source_root + '/lib/librte_eal/include' +
> + ' -I' + dpdk_source_root + '/lib/librte_kni' +
> + ' -I' + dpdk_build_root +
> ' -I' + meson.current_source_dir(),
> 'modules'],
> depends: kni_mkfile,
> diff --git a/meson.build b/meson.build
> index 8eeb0ff8d8..290d99cdf9 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -17,6 +17,8 @@ project('DPDK', 'C',
>
> # 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 = []
> dpdk_static_libraries = []
> --
> 2.30.2
>
> ---
> Diff of the applied patch vs upstream commit (please double-check if
> non-empty:
> ---
> --- - 2022-02-18 12:37:40.672276767 +0000
> +++ 0070-build-remove-deprecated-Meson-functions.patch 2022-02-18
> 12:37:37.746793171 +0000
> @@ -1 +1 @@
> -From e16b972b1afe2444346016175ae086d5bea54016 Mon Sep 17 00:00:00 2001
> +From 04a29bf8a81580ad1349654e3227a96822b5faa5 Mon Sep 17 00:00:00 2001
> @@ -5,0 +6,2 @@
> +[ upstream commit e16b972b1afe2444346016175ae086d5bea54016 ]
> +
> @@ -20 +21,0 @@
> -Cc: stable@dpdk.org
> @@ -26 +27 @@
> - kernel/freebsd/meson.build | 4 ++--
> + kernel/freebsd/meson.build | 2 +-
> @@ -29 +30 @@
> - 4 files changed, 13 insertions(+), 11 deletions(-)
> + 4 files changed, 12 insertions(+), 10 deletions(-)
> @@ -32 +33 @@
> -index 7e2b429ac8..5c25b92092 100644
> +index 22d1bc204d..94e683455f 100644
> @@ -38,6 +39,6 @@
> - 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'),
> - install_dir: htmldir,
> + 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'),
> + install_dir: htmldir,
> @@ -59 +60 @@
> - cdata.set('WARN_AS_ERROR', 'YES')
> + cdata.set('WARN_AS_ERROR', 'YES')
> @@ -61 +62 @@
> -index bf5aa20a55..1f612711be 100644
> +index dc156a43fd..16a4e0b124 100644
> @@ -64,2 +65 @@
> -@@ -9,8 +9,8 @@ kmods = ['contigmem', 'nic_uio']
> - # right now, which allows us to simplify things. We pull in the sourcer
> +@@ -10,7 +10,7 @@ kmods = ['contigmem', 'nic_uio']
> @@ -68,5 +68,4 @@
> --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']
> + kmod_cflags = ['-I' + meson.build_root(),
> +- '-I' + join_paths(meson.source_root(), 'config'),
> ++ '-I' + join_paths(dpdk_source_root, 'config'),
> + '-include rte_config.h']
> @@ -76 +75 @@
> -index dae8c37b37..4c90069e99 100644
> +index 1e642ec9d4..dab4f77df4 100644
> @@ -79,15 +78,15 @@
> -@@ -29,10 +29,10 @@ custom_target('rte_kni',
> - 'M=' + meson.current_build_dir(),
> - '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,
> - depends: kni_mkfile,
> +@@ -28,10 +28,10 @@ custom_target('rte_kni',
> + 'M=' + meson.current_build_dir(),
> + 'src=' + meson.current_source_dir(),
> + ' '.join(['MODULE_CFLAGS=', kmod_cflags,'-include '])
> +- + meson.source_root() + '/config/rte_config.h' +
> +- ' -I' + meson.source_root() + '/lib/librte_eal/include' +
> +- ' -I' + meson.source_root() + '/lib/librte_kni' +
> +- ' -I' + meson.build_root() +
> ++ + dpdk_source_root + '/config/rte_config.h' +
> ++ ' -I' + dpdk_source_root + '/lib/librte_eal/include' +
> ++ ' -I' + dpdk_source_root + '/lib/librte_kni' +
> ++ ' -I' + dpdk_build_root +
> + ' -I' + meson.current_source_dir(),
> + 'modules'],
> + depends: kni_mkfile,
> @@ -95 +94 @@
> -index 3d97e96f38..937f6110c0 100644
> +index 8eeb0ff8d8..290d99cdf9 100644
> @@ -98 +97 @@
> -@@ -31,6 +31,8 @@ endif
> +@@ -17,6 +17,8 @@ project('DPDK', 'C',
^ permalink raw reply [flat|nested] 228+ messages in thread
* Re: patch 'build: remove deprecated Meson functions' has been queued to stable release 20.11.5
2022-02-18 13:16 ` Richardson, Bruce
@ 2022-02-21 10:56 ` Luca Boccassi
2022-02-21 11:51 ` Richardson, Bruce
0 siblings, 1 reply; 228+ messages in thread
From: Luca Boccassi @ 2022-02-21 10:56 UTC (permalink / raw)
To: Richardson, Bruce; +Cc: Jerin Jacob, dpdk stable
On Fri, 2022-02-18 at 13:16 +0000, Richardson, Bruce wrote:
> Again, I'm not sure this needs backport, as it's unlikely the deprecated functions will be removed in the near future. As before, I'll defer to your judgement as to the risk, if any.
These seemed low-risk enough to me (it either builds or doesn't), and
it makes deprecation warnings go away. Also helps keeping a smaller
diff with main, to easure future backporting.
> > -----Original Message-----
> > From: luca.boccassi@gmail.com <luca.boccassi@gmail.com>
> > Sent: Friday, February 18, 2022 12:39 PM
> > To: Richardson, Bruce <bruce.richardson@intel.com>
> > Cc: Jerin Jacob <jerinj@marvell.com>; dpdk stable <stable@dpdk.org>
> > Subject: patch 'build: remove deprecated Meson functions' has been queued
> > to stable release 20.11.5
> >
> > Hi,
> >
> > FYI, your patch has been queued to stable release 20.11.5
> >
> > 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/20/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/bluca/dpdk-stable
> >
> > This queued commit can be viewed at:
> > https://github.com/bluca/dpdk-
> > stable/commit/04a29bf8a81580ad1349654e3227a96822b5faa5
> >
> > Thanks.
> >
> > Luca Boccassi
> >
> > ---
> > From 04a29bf8a81580ad1349654e3227a96822b5faa5 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 | 2 +-
> > kernel/linux/kni/meson.build | 8 ++++----
> > meson.build | 2 ++
> > 4 files changed, 12 insertions(+), 10 deletions(-)
> >
> > diff --git a/doc/api/meson.build b/doc/api/meson.build
> > index 22d1bc204d..94e683455f 100644
> > --- a/doc/api/meson.build
> > +++ b/doc/api/meson.build
> > @@ -24,7 +24,7 @@ htmldir = join_paths(get_option('datadir'), 'doc',
> > 'dpdk')
> > # So use a configure option for now.
> > 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'),
> > install_dir: htmldir,
> > @@ -32,11 +32,11 @@ 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')
> > cdata.set('WARN_AS_ERROR', 'YES')
> > diff --git a/kernel/freebsd/meson.build b/kernel/freebsd/meson.build
> > index dc156a43fd..16a4e0b124 100644
> > --- a/kernel/freebsd/meson.build
> > +++ b/kernel/freebsd/meson.build
> > @@ -10,7 +10,7 @@ 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'),
> > + '-I' + join_paths(dpdk_source_root, 'config'),
> > '-include rte_config.h']
> >
> > # to avoid warnings due to race conditions with creating the dev_if.h,
> > etc.
> > diff --git a/kernel/linux/kni/meson.build b/kernel/linux/kni/meson.build
> > index 1e642ec9d4..dab4f77df4 100644
> > --- a/kernel/linux/kni/meson.build
> > +++ b/kernel/linux/kni/meson.build
> > @@ -28,10 +28,10 @@ custom_target('rte_kni',
> > 'M=' + meson.current_build_dir(),
> > 'src=' + meson.current_source_dir(),
> > ' '.join(['MODULE_CFLAGS=', kmod_cflags,'-include '])
> > - + meson.source_root() + '/config/rte_config.h' +
> > - ' -I' + meson.source_root() + '/lib/librte_eal/include' +
> > - ' -I' + meson.source_root() + '/lib/librte_kni' +
> > - ' -I' + meson.build_root() +
> > + + dpdk_source_root + '/config/rte_config.h' +
> > + ' -I' + dpdk_source_root + '/lib/librte_eal/include' +
> > + ' -I' + dpdk_source_root + '/lib/librte_kni' +
> > + ' -I' + dpdk_build_root +
> > ' -I' + meson.current_source_dir(),
> > 'modules'],
> > depends: kni_mkfile,
> > diff --git a/meson.build b/meson.build
> > index 8eeb0ff8d8..290d99cdf9 100644
> > --- a/meson.build
> > +++ b/meson.build
> > @@ -17,6 +17,8 @@ project('DPDK', 'C',
> >
> > # 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 = []
> > dpdk_static_libraries = []
> > --
> > 2.30.2
> >
> > ---
> > Diff of the applied patch vs upstream commit (please double-check if
> > non-empty:
> > ---
> > --- - 2022-02-18 12:37:40.672276767 +0000
> > +++ 0070-build-remove-deprecated-Meson-functions.patch 2022-02-18
> > 12:37:37.746793171 +0000
> > @@ -1 +1 @@
> > -From e16b972b1afe2444346016175ae086d5bea54016 Mon Sep 17 00:00:00 2001
> > +From 04a29bf8a81580ad1349654e3227a96822b5faa5 Mon Sep 17 00:00:00 2001
> > @@ -5,0 +6,2 @@
> > +[ upstream commit e16b972b1afe2444346016175ae086d5bea54016 ]
> > +
> > @@ -20 +21,0 @@
> > -Cc: stable@dpdk.org
> > @@ -26 +27 @@
> > - kernel/freebsd/meson.build | 4 ++--
> > + kernel/freebsd/meson.build | 2 +-
> > @@ -29 +30 @@
> > - 4 files changed, 13 insertions(+), 11 deletions(-)
> > + 4 files changed, 12 insertions(+), 10 deletions(-)
> > @@ -32 +33 @@
> > -index 7e2b429ac8..5c25b92092 100644
> > +index 22d1bc204d..94e683455f 100644
> > @@ -38,6 +39,6 @@
> > - 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'),
> > - install_dir: htmldir,
> > + 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'),
> > + install_dir: htmldir,
> > @@ -59 +60 @@
> > - cdata.set('WARN_AS_ERROR', 'YES')
> > + cdata.set('WARN_AS_ERROR', 'YES')
> > @@ -61 +62 @@
> > -index bf5aa20a55..1f612711be 100644
> > +index dc156a43fd..16a4e0b124 100644
> > @@ -64,2 +65 @@
> > -@@ -9,8 +9,8 @@ kmods = ['contigmem', 'nic_uio']
> > - # right now, which allows us to simplify things. We pull in the sourcer
> > +@@ -10,7 +10,7 @@ kmods = ['contigmem', 'nic_uio']
> > @@ -68,5 +68,4 @@
> > --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']
> > + kmod_cflags = ['-I' + meson.build_root(),
> > +- '-I' + join_paths(meson.source_root(), 'config'),
> > ++ '-I' + join_paths(dpdk_source_root, 'config'),
> > + '-include rte_config.h']
> > @@ -76 +75 @@
> > -index dae8c37b37..4c90069e99 100644
> > +index 1e642ec9d4..dab4f77df4 100644
> > @@ -79,15 +78,15 @@
> > -@@ -29,10 +29,10 @@ custom_target('rte_kni',
> > - 'M=' + meson.current_build_dir(),
> > - '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,
> > - depends: kni_mkfile,
> > +@@ -28,10 +28,10 @@ custom_target('rte_kni',
> > + 'M=' + meson.current_build_dir(),
> > + 'src=' + meson.current_source_dir(),
> > + ' '.join(['MODULE_CFLAGS=', kmod_cflags,'-include '])
> > +- + meson.source_root() + '/config/rte_config.h' +
> > +- ' -I' + meson.source_root() + '/lib/librte_eal/include' +
> > +- ' -I' + meson.source_root() + '/lib/librte_kni' +
> > +- ' -I' + meson.build_root() +
> > ++ + dpdk_source_root + '/config/rte_config.h' +
> > ++ ' -I' + dpdk_source_root + '/lib/librte_eal/include' +
> > ++ ' -I' + dpdk_source_root + '/lib/librte_kni' +
> > ++ ' -I' + dpdk_build_root +
> > + ' -I' + meson.current_source_dir(),
> > + 'modules'],
> > + depends: kni_mkfile,
> > @@ -95 +94 @@
> > -index 3d97e96f38..937f6110c0 100644
> > +index 8eeb0ff8d8..290d99cdf9 100644
> > @@ -98 +97 @@
> > -@@ -31,6 +31,8 @@ endif
> > +@@ -17,6 +17,8 @@ project('DPDK', 'C',
^ permalink raw reply [flat|nested] 228+ messages in thread
* RE: patch 'build: remove deprecated Meson functions' has been queued to stable release 20.11.5
2022-02-21 10:56 ` Luca Boccassi
@ 2022-02-21 11:51 ` Richardson, Bruce
0 siblings, 0 replies; 228+ messages in thread
From: Richardson, Bruce @ 2022-02-21 11:51 UTC (permalink / raw)
To: Luca Boccassi; +Cc: Jerin Jacob, dpdk stable
> -----Original Message-----
> From: Luca Boccassi <luca.boccassi@gmail.com>
> Sent: Monday, February 21, 2022 10:57 AM
> To: Richardson, Bruce <bruce.richardson@intel.com>
> Cc: Jerin Jacob <jerinj@marvell.com>; dpdk stable <stable@dpdk.org>
> Subject: Re: patch 'build: remove deprecated Meson functions' has been
> queued to stable release 20.11.5
>
> On Fri, 2022-02-18 at 13:16 +0000, Richardson, Bruce wrote:
> > Again, I'm not sure this needs backport, as it's unlikely the deprecated
> functions will be removed in the near future. As before, I'll defer to
> your judgement as to the risk, if any.
>
> These seemed low-risk enough to me (it either builds or doesn't), and
> it makes deprecation warnings go away. Also helps keeping a smaller
> diff with main, to easure future backporting.
>
Ok, seems good enough reasons to me.
Thanks.
/Bruce
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'kni: fix ioctl signature' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (68 preceding siblings ...)
2022-02-18 12:38 ` patch 'build: remove deprecated Meson functions' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'doc: fix KNI PMD name typo' " luca.boccassi
` (52 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Markus Theil; +Cc: Michael Pfeiffer, Stephen Hemminger, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/1b61157ec9460a316b25d456624222c6da43eb75
Thanks.
Luca Boccassi
---
From 1b61157ec9460a316b25d456624222c6da43eb75 Mon Sep 17 00:00:00 2001
From: Markus Theil <markus.theil@secunet.com>
Date: Fri, 3 Dec 2021 08:19:07 +0100
Subject: [PATCH] kni: fix ioctl signature
[ upstream commit f1b2991c3c0f480fe8e9f6c5c640a1d913b76bed ]
Fix kni's ioctl signature to correctly match the kernel's
structs. This shaves off the (void*) casts and uses struct file*
instead of struct inode*. With the correct signature, control flow
integrity checkers are no longer confused at this point.
Signed-off-by: Markus Theil <markus.theil@secunet.com>
Tested-by: Michael Pfeiffer <michael.pfeiffer@tu-ilmenau.de>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
kernel/linux/kni/kni_misc.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/kernel/linux/kni/kni_misc.c b/kernel/linux/kni/kni_misc.c
index aae977c187..c8da5805c0 100644
--- a/kernel/linux/kni/kni_misc.c
+++ b/kernel/linux/kni/kni_misc.c
@@ -485,10 +485,10 @@ kni_ioctl_release(struct net *net, uint32_t ioctl_num,
return ret;
}
-static int
-kni_ioctl(struct inode *inode, uint32_t ioctl_num, unsigned long ioctl_param)
+static long
+kni_ioctl(struct file *file, unsigned int ioctl_num, unsigned long ioctl_param)
{
- int ret = -EINVAL;
+ long ret = -EINVAL;
struct net *net = current->nsproxy->net_ns;
pr_debug("IOCTL num=0x%0x param=0x%0lx\n", ioctl_num, ioctl_param);
@@ -514,8 +514,8 @@ kni_ioctl(struct inode *inode, uint32_t ioctl_num, unsigned long ioctl_param)
return ret;
}
-static int
-kni_compat_ioctl(struct inode *inode, uint32_t ioctl_num,
+static long
+kni_compat_ioctl(struct file *file, unsigned int ioctl_num,
unsigned long ioctl_param)
{
/* 32 bits app on 64 bits OS to be supported later */
@@ -528,8 +528,8 @@ static const struct file_operations kni_fops = {
.owner = THIS_MODULE,
.open = kni_open,
.release = kni_release,
- .unlocked_ioctl = (void *)kni_ioctl,
- .compat_ioctl = (void *)kni_compat_ioctl,
+ .unlocked_ioctl = kni_ioctl,
+ .compat_ioctl = kni_compat_ioctl,
};
static struct miscdevice kni_misc = {
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:40.703388238 +0000
+++ 0071-kni-fix-ioctl-signature.patch 2022-02-18 12:37:37.746793171 +0000
@@ -1 +1 @@
-From f1b2991c3c0f480fe8e9f6c5c640a1d913b76bed Mon Sep 17 00:00:00 2001
+From 1b61157ec9460a316b25d456624222c6da43eb75 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f1b2991c3c0f480fe8e9f6c5c640a1d913b76bed ]
+
@@ -19 +21 @@
-index e8a8203c90..ec70190042 100644
+index aae977c187..c8da5805c0 100644
@@ -22 +24 @@
-@@ -480,10 +480,10 @@ kni_ioctl_release(struct net *net, uint32_t ioctl_num,
+@@ -485,10 +485,10 @@ kni_ioctl_release(struct net *net, uint32_t ioctl_num,
@@ -36 +38 @@
-@@ -509,8 +509,8 @@ kni_ioctl(struct inode *inode, uint32_t ioctl_num, unsigned long ioctl_param)
+@@ -514,8 +514,8 @@ kni_ioctl(struct inode *inode, uint32_t ioctl_num, unsigned long ioctl_param)
@@ -47 +49 @@
-@@ -523,8 +523,8 @@ static const struct file_operations kni_fops = {
+@@ -528,8 +528,8 @@ static const struct file_operations kni_fops = {
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'doc: fix KNI PMD name typo' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (69 preceding siblings ...)
2022-02-18 12:38 ` patch 'kni: fix ioctl signature' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'ring: optimize corner case for enqueue/dequeue' " luca.boccassi
` (51 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Haiyue Wang; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/25f563d3887f8892f76541f7fafb5e710e158882
Thanks.
Luca Boccassi
---
From 25f563d3887f8892f76541f7fafb5e710e158882 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 80ba459d49..7c724dd467 100644
--- a/doc/guides/nics/kni.rst
+++ b/doc/guides/nics/kni.rst
@@ -33,7 +33,7 @@ Usage
EAL ``--vdev`` argument can be used to create KNI device instance, like::
- testpmd --vdev=net_kni0 --vdev=net_kn1 -- -i
+ testpmd --vdev=net_kni0 --vdev=net_kni1 -- -i
Above command will create ``kni0`` and ``kni1`` Linux network interfaces,
those interfaces can be controlled by standard Linux tools.
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:40.734616241 +0000
+++ 0072-doc-fix-KNI-PMD-name-typo.patch 2022-02-18 12:37:37.750793260 +0000
@@ -1 +1 @@
-From 08c724b3276725549e4426f15be206d1b688795b Mon Sep 17 00:00:00 2001
+From 25f563d3887f8892f76541f7fafb5e710e158882 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 08c724b3276725549e4426f15be206d1b688795b ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 37c5411a32..2a23bb3f3b 100644
+index 80ba459d49..7c724dd467 100644
@@ -25,2 +26,2 @@
-- dpdk-testpmd --vdev=net_kni0 --vdev=net_kn1 -- -i
-+ dpdk-testpmd --vdev=net_kni0 --vdev=net_kni1 -- -i
+- testpmd --vdev=net_kni0 --vdev=net_kn1 -- -i
++ testpmd --vdev=net_kni0 --vdev=net_kni1 -- -i
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'ring: optimize corner case for enqueue/dequeue' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (70 preceding siblings ...)
2022-02-18 12:38 ` patch 'doc: fix KNI PMD name typo' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'ring: fix error code when creating ring' " luca.boccassi
` (50 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Andrzej Ostruszka
Cc: Olivier Matz, Konstantin Ananyev, Morten Brørup, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6c4c4398a4398fdc311496d5a5f6ae80c3179629
Thanks.
Luca Boccassi
---
From 6c4c4398a4398fdc311496d5a5f6ae80c3179629 Mon Sep 17 00:00:00 2001
From: Andrzej Ostruszka <amo@semihalf.com>
Date: Tue, 11 Jan 2022 12:37:39 +0100
Subject: [PATCH] ring: optimize corner case for enqueue/dequeue
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 97ed4cb6fb324f4277ee754d4b6f3c7a0d96400b ]
When enqueueing/dequeueing to/from the ring we try to optimize by manual
loop unrolling. The check for this optimization looks like:
if (likely(idx + n < size)) {
where 'idx' points to the first usable element (empty slot for enqueue,
data for dequeue). The correct comparison here should be '<=' instead
of '<'.
This is not a functional error since we fall back to the loop with
correct checks on indexes. Just a minor suboptimal behaviour for the
case when we want to enqueue/dequeue exactly the number of elements that
we have in the ring before wrapping to its beginning.
Fixes: cc4b218790f6 ("ring: support configurable element size")
Fixes: 286bd05bf70d ("ring: optimisations")
Signed-off-by: Andrzej Ostruszka <amo@semihalf.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
---
lib/librte_ring/rte_ring_elem.h | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/lib/librte_ring/rte_ring_elem.h b/lib/librte_ring/rte_ring_elem.h
index 7034d29c07..0057da3597 100644
--- a/lib/librte_ring/rte_ring_elem.h
+++ b/lib/librte_ring/rte_ring_elem.h
@@ -112,7 +112,7 @@ __rte_ring_enqueue_elems_32(struct rte_ring *r, const uint32_t size,
unsigned int i;
uint32_t *ring = (uint32_t *)&r[1];
const uint32_t *obj = (const uint32_t *)obj_table;
- if (likely(idx + n < size)) {
+ if (likely(idx + n <= size)) {
for (i = 0; i < (n & ~0x7); i += 8, idx += 8) {
ring[idx] = obj[i];
ring[idx + 1] = obj[i + 1];
@@ -157,7 +157,7 @@ __rte_ring_enqueue_elems_64(struct rte_ring *r, uint32_t prod_head,
uint32_t idx = prod_head & r->mask;
uint64_t *ring = (uint64_t *)&r[1];
const unaligned_uint64_t *obj = (const unaligned_uint64_t *)obj_table;
- if (likely(idx + n < size)) {
+ if (likely(idx + n <= size)) {
for (i = 0; i < (n & ~0x3); i += 4, idx += 4) {
ring[idx] = obj[i];
ring[idx + 1] = obj[i + 1];
@@ -190,7 +190,7 @@ __rte_ring_enqueue_elems_128(struct rte_ring *r, uint32_t prod_head,
uint32_t idx = prod_head & r->mask;
rte_int128_t *ring = (rte_int128_t *)&r[1];
const rte_int128_t *obj = (const rte_int128_t *)obj_table;
- if (likely(idx + n < size)) {
+ if (likely(idx + n <= size)) {
for (i = 0; i < (n & ~0x1); i += 2, idx += 2)
memcpy((void *)(ring + idx),
(const void *)(obj + i), 32);
@@ -246,7 +246,7 @@ __rte_ring_dequeue_elems_32(struct rte_ring *r, const uint32_t size,
unsigned int i;
uint32_t *ring = (uint32_t *)&r[1];
uint32_t *obj = (uint32_t *)obj_table;
- if (likely(idx + n < size)) {
+ if (likely(idx + n <= size)) {
for (i = 0; i < (n & ~0x7); i += 8, idx += 8) {
obj[i] = ring[idx];
obj[i + 1] = ring[idx + 1];
@@ -291,7 +291,7 @@ __rte_ring_dequeue_elems_64(struct rte_ring *r, uint32_t prod_head,
uint32_t idx = prod_head & r->mask;
uint64_t *ring = (uint64_t *)&r[1];
unaligned_uint64_t *obj = (unaligned_uint64_t *)obj_table;
- if (likely(idx + n < size)) {
+ if (likely(idx + n <= size)) {
for (i = 0; i < (n & ~0x3); i += 4, idx += 4) {
obj[i] = ring[idx];
obj[i + 1] = ring[idx + 1];
@@ -324,7 +324,7 @@ __rte_ring_dequeue_elems_128(struct rte_ring *r, uint32_t prod_head,
uint32_t idx = prod_head & r->mask;
rte_int128_t *ring = (rte_int128_t *)&r[1];
rte_int128_t *obj = (rte_int128_t *)obj_table;
- if (likely(idx + n < size)) {
+ if (likely(idx + n <= size)) {
for (i = 0; i < (n & ~0x1); i += 2, idx += 2)
memcpy((void *)(obj + i), (void *)(ring + idx), 32);
switch (n & 0x1) {
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:40.766001111 +0000
+++ 0073-ring-optimize-corner-case-for-enqueue-dequeue.patch 2022-02-18 12:37:37.750793260 +0000
@@ -1 +1 @@
-From 97ed4cb6fb324f4277ee754d4b6f3c7a0d96400b Mon Sep 17 00:00:00 2001
+From 6c4c4398a4398fdc311496d5a5f6ae80c3179629 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 97ed4cb6fb324f4277ee754d4b6f3c7a0d96400b ]
+
@@ -31 +33 @@
- lib/ring/rte_ring_elem_pvt.h | 12 ++++++------
+ lib/librte_ring/rte_ring_elem.h | 12 ++++++------
@@ -34,5 +36,5 @@
-diff --git a/lib/ring/rte_ring_elem_pvt.h b/lib/ring/rte_ring_elem_pvt.h
-index 275ec55393..83788c56e6 100644
---- a/lib/ring/rte_ring_elem_pvt.h
-+++ b/lib/ring/rte_ring_elem_pvt.h
-@@ -17,7 +17,7 @@ __rte_ring_enqueue_elems_32(struct rte_ring *r, const uint32_t size,
+diff --git a/lib/librte_ring/rte_ring_elem.h b/lib/librte_ring/rte_ring_elem.h
+index 7034d29c07..0057da3597 100644
+--- a/lib/librte_ring/rte_ring_elem.h
++++ b/lib/librte_ring/rte_ring_elem.h
+@@ -112,7 +112,7 @@ __rte_ring_enqueue_elems_32(struct rte_ring *r, const uint32_t size,
@@ -47 +49 @@
-@@ -62,7 +62,7 @@ __rte_ring_enqueue_elems_64(struct rte_ring *r, uint32_t prod_head,
+@@ -157,7 +157,7 @@ __rte_ring_enqueue_elems_64(struct rte_ring *r, uint32_t prod_head,
@@ -56 +58 @@
-@@ -95,7 +95,7 @@ __rte_ring_enqueue_elems_128(struct rte_ring *r, uint32_t prod_head,
+@@ -190,7 +190,7 @@ __rte_ring_enqueue_elems_128(struct rte_ring *r, uint32_t prod_head,
@@ -65 +67 @@
-@@ -151,7 +151,7 @@ __rte_ring_dequeue_elems_32(struct rte_ring *r, const uint32_t size,
+@@ -246,7 +246,7 @@ __rte_ring_dequeue_elems_32(struct rte_ring *r, const uint32_t size,
@@ -74 +76 @@
-@@ -196,7 +196,7 @@ __rte_ring_dequeue_elems_64(struct rte_ring *r, uint32_t prod_head,
+@@ -291,7 +291,7 @@ __rte_ring_dequeue_elems_64(struct rte_ring *r, uint32_t prod_head,
@@ -83 +85 @@
-@@ -229,7 +229,7 @@ __rte_ring_dequeue_elems_128(struct rte_ring *r, uint32_t prod_head,
+@@ -324,7 +324,7 @@ __rte_ring_dequeue_elems_128(struct rte_ring *r, uint32_t prod_head,
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'ring: fix error code when creating ring' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (71 preceding siblings ...)
2022-02-18 12:38 ` patch 'ring: optimize corner case for enqueue/dequeue' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'ring: fix overflow in memory size calculation' " luca.boccassi
` (49 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Yunjian Wang; +Cc: Nan Zhou, Konstantin Ananyev, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6e47aebf24d3bc6a8e69c8bc03250def488a5b6f
Thanks.
Luca Boccassi
---
From 6e47aebf24d3bc6a8e69c8bc03250def488a5b6f 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/librte_ring/rte_ring.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_ring/rte_ring.c b/lib/librte_ring/rte_ring.c
index f17bd966be..185f9be798 100644
--- a/lib/librte_ring/rte_ring.c
+++ b/lib/librte_ring/rte_ring.c
@@ -267,7 +267,7 @@ 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.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:40.797306321 +0000
+++ 0074-ring-fix-error-code-when-creating-ring.patch 2022-02-18 12:37:37.750793260 +0000
@@ -1 +1 @@
-From 074717be3ef9e7a8868b5af078b0ca7b61bcc44b Mon Sep 17 00:00:00 2001
+From 6e47aebf24d3bc6a8e69c8bc03250def488a5b6f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 074717be3ef9e7a8868b5af078b0ca7b61bcc44b ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
- lib/ring/rte_ring.c | 2 +-
+ lib/librte_ring/rte_ring.c | 2 +-
@@ -22 +23 @@
-diff --git a/lib/ring/rte_ring.c b/lib/ring/rte_ring.c
+diff --git a/lib/librte_ring/rte_ring.c b/lib/librte_ring/rte_ring.c
@@ -24,2 +25,2 @@
---- a/lib/ring/rte_ring.c
-+++ b/lib/ring/rte_ring.c
+--- a/lib/librte_ring/rte_ring.c
++++ b/lib/librte_ring/rte_ring.c
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'ring: fix overflow in memory size calculation' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (72 preceding siblings ...)
2022-02-18 12:38 ` patch 'ring: fix error code when creating ring' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'eal/windows: fix error code for not supported API' " luca.boccassi
` (48 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 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 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/19746aaeabb2a7865a02e95d76f454529839a480
Thanks.
Luca Boccassi
---
From 19746aaeabb2a7865a02e95d76f454529839a480 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/librte_ring/rte_ring.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_ring/rte_ring.c b/lib/librte_ring/rte_ring.c
index 185f9be798..6a94a038c4 100644
--- a/lib/librte_ring/rte_ring.c
+++ b/lib/librte_ring/rte_ring.c
@@ -75,7 +75,7 @@ rte_ring_get_memsize_elem(unsigned int esize, unsigned int count)
return -EINVAL;
}
- 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.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:40.828207500 +0000
+++ 0075-ring-fix-overflow-in-memory-size-calculation.patch 2022-02-18 12:37:37.750793260 +0000
@@ -1 +1 @@
-From 0e4dc6af06228c8504a5538512cb31ed7bf6cc23 Mon Sep 17 00:00:00 2001
+From 19746aaeabb2a7865a02e95d76f454529839a480 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 0e4dc6af06228c8504a5538512cb31ed7bf6cc23 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
- lib/ring/rte_ring.c | 2 +-
+ lib/librte_ring/rte_ring.c | 2 +-
@@ -23 +24 @@
-diff --git a/lib/ring/rte_ring.c b/lib/ring/rte_ring.c
+diff --git a/lib/librte_ring/rte_ring.c b/lib/librte_ring/rte_ring.c
@@ -25,2 +26,2 @@
---- a/lib/ring/rte_ring.c
-+++ b/lib/ring/rte_ring.c
+--- a/lib/librte_ring/rte_ring.c
++++ b/lib/librte_ring/rte_ring.c
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'eal/windows: fix error code for not supported API' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (73 preceding siblings ...)
2022-02-18 12:38 ` patch 'ring: fix overflow in memory size calculation' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'test/mem: fix error check' " luca.boccassi
` (47 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Jie Zhou; +Cc: Dmitry Kozlyuk, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/2da6c3024762d5b8ef308aaac5ae11a50fe03969
Thanks.
Luca Boccassi
---
From 2da6c3024762d5b8ef308aaac5ae11a50fe03969 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/librte_eal/windows/eal_memalloc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/librte_eal/windows/eal_memalloc.c b/lib/librte_eal/windows/eal_memalloc.c
index d1e49f0be8..690a8d8243 100644
--- a/lib/librte_eal/windows/eal_memalloc.c
+++ b/lib/librte_eal/windows/eal_memalloc.c
@@ -18,7 +18,7 @@ eal_memalloc_get_seg_fd(int list_idx, int seg_idx)
RTE_SET_USED(list_idx);
RTE_SET_USED(seg_idx);
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
int
@@ -29,7 +29,7 @@ eal_memalloc_get_seg_fd_offset(int list_idx, int seg_idx, size_t *offset)
RTE_SET_USED(seg_idx);
RTE_SET_USED(offset);
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
static int
@@ -429,7 +429,7 @@ eal_memalloc_sync_with_primary(void)
{
/* No multi-process support. */
EAL_LOG_NOT_IMPLEMENTED();
- return -1;
+ return -ENOTSUP;
}
int
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:40.859533442 +0000
+++ 0076-eal-windows-fix-error-code-for-not-supported-API.patch 2022-02-18 12:37:37.754793350 +0000
@@ -1 +1 @@
-From 7e71c4dce375b8aa575dbdcda97936199a4136f3 Mon Sep 17 00:00:00 2001
+From 2da6c3024762d5b8ef308aaac5ae11a50fe03969 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7e71c4dce375b8aa575dbdcda97936199a4136f3 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
- lib/eal/windows/eal_memalloc.c | 6 +++---
+ lib/librte_eal/windows/eal_memalloc.c | 6 +++---
@@ -21,5 +22,5 @@
-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
-@@ -17,7 +17,7 @@ eal_memalloc_get_seg_fd(int list_idx, int seg_idx)
+diff --git a/lib/librte_eal/windows/eal_memalloc.c b/lib/librte_eal/windows/eal_memalloc.c
+index d1e49f0be8..690a8d8243 100644
+--- a/lib/librte_eal/windows/eal_memalloc.c
++++ b/lib/librte_eal/windows/eal_memalloc.c
+@@ -18,7 +18,7 @@ eal_memalloc_get_seg_fd(int list_idx, int seg_idx)
@@ -34 +35 @@
-@@ -28,7 +28,7 @@ eal_memalloc_get_seg_fd_offset(int list_idx, int seg_idx, size_t *offset)
+@@ -29,7 +29,7 @@ eal_memalloc_get_seg_fd_offset(int list_idx, int seg_idx, size_t *offset)
@@ -43 +44 @@
-@@ -428,7 +428,7 @@ eal_memalloc_sync_with_primary(void)
+@@ -429,7 +429,7 @@ eal_memalloc_sync_with_primary(void)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'test/mem: fix error check' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (74 preceding siblings ...)
2022-02-18 12:38 ` patch 'eal/windows: fix error code for not supported API' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'bus/dpaa: fix C++ include guard' " luca.boccassi
` (46 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Jie Zhou; +Cc: Dmitry Kozlyuk, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/d3f8892862bc11c9207f23ac07b5b722c0a851bd
Thanks.
Luca Boccassi
---
From d3f8892862bc11c9207f23ac07b5b722c0a851bd 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
@@ -63,7 +63,7 @@ check_seg_fds(const struct rte_memseg_list *msl, const struct rte_memseg *ms,
/* we're able to get memseg fd - try getting its offset */
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.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:40.892004479 +0000
+++ 0077-test-mem-fix-error-check.patch 2022-02-18 12:37:37.754793350 +0000
@@ -1 +1 @@
-From 068cdfae1fc19a491fc68723997ca89a92501736 Mon Sep 17 00:00:00 2001
+From d3f8892862bc11c9207f23ac07b5b722c0a851bd 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] 228+ messages in thread
* patch 'bus/dpaa: fix C++ include guard' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (75 preceding siblings ...)
2022-02-18 12:38 ` patch 'test/mem: fix error check' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'net/cxgbe: remove useless " luca.boccassi
` (45 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Weiguo Li; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/8650a0c17cb7ea1c2349abe04be10c8e76fb297a
Thanks.
Luca Boccassi
---
From 8650a0c17cb7ea1c2349abe04be10c8e76fb297a Mon Sep 17 00:00:00 2001
From: Weiguo Li <liwg06@foxmail.com>
Date: Mon, 7 Feb 2022 20:36:56 +0800
Subject: [PATCH] bus/dpaa: fix C++ include guard
[ upstream commit 1785d9eb62eea2b32c08ea30bfdd318e45b8120c ]
Supplement the missing half of braces for the extern "C" block,
or remove the incomplete guard in internal header.
Fixes: 6d6b4f49a155 ("bus/dpaa: add FMAN hardware operations")
Fixes: 919eeaccb2ba ("bus/dpaa: introduce NXP DPAA bus driver skeleton")
Signed-off-by: Weiguo Li <liwg06@foxmail.com>
---
drivers/bus/dpaa/include/fsl_fman.h | 4 ----
drivers/bus/dpaa/rte_dpaa_bus.h | 4 ++++
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/bus/dpaa/include/fsl_fman.h b/drivers/bus/dpaa/include/fsl_fman.h
index a3cf77f0e3..b5408337c8 100644
--- a/drivers/bus/dpaa/include/fsl_fman.h
+++ b/drivers/bus/dpaa/include/fsl_fman.h
@@ -9,10 +9,6 @@
#include <rte_compat.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/* Status field in FD is updated on Rx side by FMAN with following information.
* Refer to field description in FM BG.
*/
diff --git a/drivers/bus/dpaa/rte_dpaa_bus.h b/drivers/bus/dpaa/rte_dpaa_bus.h
index 48d5cf4625..467baa09b4 100644
--- a/drivers/bus/dpaa/rte_dpaa_bus.h
+++ b/drivers/bus/dpaa/rte_dpaa_bus.h
@@ -17,6 +17,10 @@
#include <fsl_bman.h>
#include <netcfg.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* This sequence number field is used to store event entry index for
* driver specific usage. For parallel mode queues, invalid
* index will be set and for atomic mode queues, valid value
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:40.922505778 +0000
+++ 0078-bus-dpaa-fix-C-include-guard.patch 2022-02-18 12:37:37.754793350 +0000
@@ -1 +1 @@
-From 1785d9eb62eea2b32c08ea30bfdd318e45b8120c Mon Sep 17 00:00:00 2001
+From 8650a0c17cb7ea1c2349abe04be10c8e76fb297a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1785d9eb62eea2b32c08ea30bfdd318e45b8120c ]
+
@@ -19 +21 @@
-index acb344584f..20690f8329 100644
+index a3cf77f0e3..b5408337c8 100644
@@ -34 +36 @@
-index 31a5ea3fca..54bb1436fd 100644
+index 48d5cf4625..467baa09b4 100644
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/cxgbe: remove useless C++ include guard' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (76 preceding siblings ...)
2022-02-18 12:38 ` patch 'bus/dpaa: fix C++ include guard' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'net/dpaa2: " luca.boccassi
` (44 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Weiguo Li; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6506a4b48560128b3bf6021cf72a2f7d304b2740
Thanks.
Luca Boccassi
---
From 6506a4b48560128b3bf6021cf72a2f7d304b2740 Mon Sep 17 00:00:00 2001
From: Weiguo Li <liwg06@foxmail.com>
Date: Mon, 7 Feb 2022 20:36:58 +0800
Subject: [PATCH] net/cxgbe: remove useless C++ include guard
[ upstream commit 073ab38ff7ea71f71cb9b9b8b729e4584eaffef3 ]
Remove the incomplete cplusplus guard in internal header.
Fixes: 3bd122eef2cc ("cxgbe/base: add hardware API for Chelsio T5 series adapters")
Signed-off-by: Weiguo Li <liwg06@foxmail.com>
---
drivers/net/cxgbe/base/common.h | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/net/cxgbe/base/common.h b/drivers/net/cxgbe/base/common.h
index 60ba14d044..1a12fbc081 100644
--- a/drivers/net/cxgbe/base/common.h
+++ b/drivers/net/cxgbe/base/common.h
@@ -12,10 +12,6 @@
#include "t4_chip_type.h"
#include "t4fw_interface.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
-
#define CXGBE_PAGE_SIZE RTE_PGSIZE_4K
#define T4_MEMORY_WRITE 0
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:40.953493384 +0000
+++ 0079-net-cxgbe-remove-useless-C-include-guard.patch 2022-02-18 12:37:37.754793350 +0000
@@ -1 +1 @@
-From 073ab38ff7ea71f71cb9b9b8b729e4584eaffef3 Mon Sep 17 00:00:00 2001
+From 6506a4b48560128b3bf6021cf72a2f7d304b2740 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 073ab38ff7ea71f71cb9b9b8b729e4584eaffef3 ]
+
@@ -16 +18 @@
-index 58d7d7a8f2..af987b0d5d 100644
+index 60ba14d044..1a12fbc081 100644
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/dpaa2: remove useless C++ include guard' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (77 preceding siblings ...)
2022-02-18 12:38 ` patch 'net/cxgbe: remove useless " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'eal/windows: " luca.boccassi
` (43 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Weiguo Li; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e9734a61dac50e163f66fb534c43891cc8834318
Thanks.
Luca Boccassi
---
From e9734a61dac50e163f66fb534c43891cc8834318 Mon Sep 17 00:00:00 2001
From: Weiguo Li <liwg06@foxmail.com>
Date: Mon, 7 Feb 2022 20:36:59 +0800
Subject: [PATCH] net/dpaa2: remove useless C++ include guard
[ upstream commit 9df62f8574c2ea139432e3fff010d756f0980c45 ]
Remove the incomplete cplusplus guard in internal headers.
Fixes: 72ec7a678e70 ("net/dpaa2: add soft parser driver")
Signed-off-by: Weiguo Li <liwg06@foxmail.com>
---
drivers/net/dpaa2/dpaa2_sparser.h | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/net/dpaa2/dpaa2_sparser.h b/drivers/net/dpaa2/dpaa2_sparser.h
index 365b8062a9..ed0897928b 100644
--- a/drivers/net/dpaa2/dpaa2_sparser.h
+++ b/drivers/net/dpaa2/dpaa2_sparser.h
@@ -13,10 +13,6 @@
#ifndef _DPAA2_SPARSER_H
#define _DPAA2_SPARSER_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
#define WRIOP_SS_INITIALIZER(priv) \
do { \
/* Base offset of parse profile memory in WRIOP */ \
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:40.984857726 +0000
+++ 0080-net-dpaa2-remove-useless-C-include-guard.patch 2022-02-18 12:37:37.758793438 +0000
@@ -1 +1 @@
-From 9df62f8574c2ea139432e3fff010d756f0980c45 Mon Sep 17 00:00:00 2001
+From e9734a61dac50e163f66fb534c43891cc8834318 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,2 @@
+
+[ upstream commit 9df62f8574c2ea139432e3fff010d756f0980c45 ]
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'eal/windows: remove useless C++ include guard' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (78 preceding siblings ...)
2022-02-18 12:38 ` patch 'net/dpaa2: " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'net/enic: fix dereference before null check' " luca.boccassi
` (42 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Weiguo Li; +Cc: Dmitry Kozlyuk, Pallavi Kadam, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/cafb0cbdb4dbddba84bcdd115e6be2cd8deabbe9
Thanks.
Luca Boccassi
---
From cafb0cbdb4dbddba84bcdd115e6be2cd8deabbe9 Mon Sep 17 00:00:00 2001
From: Weiguo Li <liwg06@foxmail.com>
Date: Mon, 7 Feb 2022 20:37:00 +0800
Subject: [PATCH] eal/windows: remove useless C++ include guard
[ upstream commit 0ae7844fcdad143ce4833f4fc8d886740b3f482d ]
Remove the incomplete cplusplus guard in internal header.
Fixes: 6e1ed4cbbe99 ("eal/windows: add dirent implementation")
Signed-off-by: Weiguo Li <liwg06@foxmail.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Pallavi Kadam <pallavi.kadam@intel.com>
---
lib/librte_eal/windows/include/dirent.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/lib/librte_eal/windows/include/dirent.h b/lib/librte_eal/windows/include/dirent.h
index 34eb077f8c..b522424403 100644
--- a/lib/librte_eal/windows/include/dirent.h
+++ b/lib/librte_eal/windows/include/dirent.h
@@ -658,7 +658,4 @@ dirent_set_errno(int error)
#endif
}
-#ifdef __cplusplus
-}
-#endif
#endif /*DIRENT_H*/
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:41.015786371 +0000
+++ 0081-eal-windows-remove-useless-C-include-guard.patch 2022-02-18 12:37:37.758793438 +0000
@@ -1 +1 @@
-From 0ae7844fcdad143ce4833f4fc8d886740b3f482d Mon Sep 17 00:00:00 2001
+From cafb0cbdb4dbddba84bcdd115e6be2cd8deabbe9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0ae7844fcdad143ce4833f4fc8d886740b3f482d ]
+
@@ -14 +16 @@
- lib/eal/windows/include/dirent.h | 3 ---
+ lib/librte_eal/windows/include/dirent.h | 3 ---
@@ -17 +19 @@
-diff --git a/lib/eal/windows/include/dirent.h b/lib/eal/windows/include/dirent.h
+diff --git a/lib/librte_eal/windows/include/dirent.h b/lib/librte_eal/windows/include/dirent.h
@@ -19,2 +21,2 @@
---- a/lib/eal/windows/include/dirent.h
-+++ b/lib/eal/windows/include/dirent.h
+--- a/lib/librte_eal/windows/include/dirent.h
++++ b/lib/librte_eal/windows/include/dirent.h
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/enic: fix dereference before null check' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (79 preceding siblings ...)
2022-02-18 12:38 ` patch 'eal/windows: " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'net/hns3: fix max packet size rollback in PF' " luca.boccassi
` (41 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Weiguo Li; +Cc: John Daley, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/463673460a3fd3a98b48c724865bb995f7aeb4a9
Thanks.
Luca Boccassi
---
From 463673460a3fd3a98b48c724865bb995f7aeb4a9 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 36ba95943f..a083ec1ed8 100644
--- a/drivers/net/enic/enic_fm_flow.c
+++ b/drivers/net/enic/enic_fm_flow.c
@@ -2196,11 +2196,11 @@ enic_action_handle_get(struct enic_flowman *fm, struct fm_action *action_in,
memcpy(fma, action_in, sizeof(*fma));
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;
ret = flowman_cmd(fm, args, 2);
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:41.047011512 +0000
+++ 0082-net-enic-fix-dereference-before-null-check.patch 2022-02-18 12:37:37.762793528 +0000
@@ -1 +1 @@
-From a5f42986968a0699e070c56f1033aee5f90d2c12 Mon Sep 17 00:00:00 2001
+From 463673460a3fd3a98b48c724865bb995f7aeb4a9 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 36ba95943f..a083ec1ed8 100644
@@ -21 +22 @@
-@@ -2521,11 +2521,11 @@ enic_action_handle_get(struct enic_flowman *fm, struct fm_action *action_in,
+@@ -2196,11 +2196,11 @@ enic_action_handle_get(struct enic_flowman *fm, struct fm_action *action_in,
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/hns3: fix max packet size rollback in PF' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (80 preceding siblings ...)
2022-02-18 12:38 ` patch 'net/enic: fix dereference before null check' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'net/hns3: fix RSS key with null' " luca.boccassi
` (40 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Huisong Li; +Cc: Min Hu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/edfefb90ca2987fd7b0ee8daabb47362b234ace5
Thanks.
Luca Boccassi
---
From edfefb90ca2987fd7b0ee8daabb47362b234ace5 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 fcbff7e5ae..8514d62617 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2457,7 +2457,6 @@ static int
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;
@@ -2467,22 +2466,20 @@ hns3_config_mtu(struct hns3_hw *hw, uint16_t mps)
return ret;
}
- hns->pf.mps = mps;
ret = hns3_buffer_alloc(hw);
if (ret) {
hns3_err(hw, "failed to allocate buffer, ret = %d", ret);
goto rollback;
}
+ 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.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:41.081383105 +0000
+++ 0083-net-hns3-fix-max-packet-size-rollback-in-PF.patch 2022-02-18 12:37:37.766793617 +0000
@@ -1 +1 @@
-From e8f1f783d1cd61faf12658df64726bca88b7ff63 Mon Sep 17 00:00:00 2001
+From edfefb90ca2987fd7b0ee8daabb47362b234ace5 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 fcbff7e5ae..8514d62617 100644
@@ -26 +27 @@
-@@ -2075,7 +2075,6 @@ static int
+@@ -2457,7 +2457,6 @@ static int
@@ -34 +35 @@
-@@ -2085,22 +2084,20 @@ hns3_config_mtu(struct hns3_hw *hw, uint16_t mps)
+@@ -2467,22 +2466,20 @@ hns3_config_mtu(struct hns3_hw *hw, uint16_t mps)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/hns3: fix RSS key with null' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (81 preceding siblings ...)
2022-02-18 12:38 ` patch 'net/hns3: fix max packet size rollback in PF' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'net/hns3: fix insecure way to query MAC statistics' " luca.boccassi
` (39 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Lijun Ou; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/73d429724480502174f68200a152a54bc9baf9fb
Thanks.
Luca Boccassi
---
From 73d429724480502174f68200a152a54bc9baf9fb 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 6c09172343..8d9c2ef530 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1264,6 +1264,7 @@ static bool
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;
/*
@@ -1280,11 +1281,16 @@ hns3_action_rss_same(const struct rte_flow_action_rss *comp,
func_is_same = (with->func != RTE_ETH_HASH_FUNCTION_DEFAULT) ?
(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.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:41.117607526 +0000
+++ 0084-net-hns3-fix-RSS-key-with-null.patch 2022-02-18 12:37:37.770793707 +0000
@@ -1 +1 @@
-From e995c91dcc426e83d4d0d6681b8d3dc0d313c655 Mon Sep 17 00:00:00 2001
+From 73d429724480502174f68200a152a54bc9baf9fb 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 6c09172343..8d9c2ef530 100644
@@ -27 +28 @@
-@@ -1286,6 +1286,7 @@ static bool
+@@ -1264,6 +1264,7 @@ static bool
@@ -35 +36 @@
-@@ -1302,11 +1303,16 @@ hns3_action_rss_same(const struct rte_flow_action_rss *comp,
+@@ -1280,11 +1281,16 @@ hns3_action_rss_same(const struct rte_flow_action_rss *comp,
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/hns3: fix insecure way to query MAC statistics' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (82 preceding siblings ...)
2022-02-18 12:38 ` patch 'net/hns3: fix RSS key with null' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'net/hns3: fix operating queue when TCAM table is invalid' " luca.boccassi
` (38 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Huisong Li; +Cc: Min Hu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b65114d8a356dab639016ecf64345b67e5642982
Thanks.
Luca Boccassi
---
From b65114d8a356dab639016ecf64345b67e5642982 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 8514d62617..3c8d41c6c8 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -3102,6 +3102,10 @@ 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);
hw->intr.mapping_mode = HNS3_INTR_MAPPING_VEC_RSV_ONE;
diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
index d6d9b0504a..5717f54441 100644
--- a/drivers/net/hns3/hns3_ethdev.h
+++ b/drivers/net/hns3/hns3_ethdev.h
@@ -431,6 +431,7 @@ struct hns3_hw {
struct hns3_tqp_stats tqp_stats;
/* Include Mac stats | Rx stats | Tx stats */
struct hns3_mac_stats mac_stats;
+ uint32_t mac_stats_reg_num;
uint32_t fw_version;
uint16_t num_msi;
diff --git a/drivers/net/hns3/hns3_stats.c b/drivers/net/hns3/hns3_stats.c
index fc577ddf45..04702f17d1 100644
--- a/drivers/net/hns3/hns3_stats.c
+++ b/drivers/net/hns3/hns3_stats.c
@@ -328,24 +328,21 @@ static const struct hns3_xstats_name_offset hns3_tx_queue_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);
if (desc == NULL) {
@@ -361,65 +358,71 @@ hns3_update_mac_stats(struct hns3_hw *hw, const uint32_t desc_num)
return ret;
}
- 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);
return 0;
}
-/*
- * 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;
}
@@ -429,15 +432,8 @@ 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);
}
/* Get tqp stats from register */
diff --git a/drivers/net/hns3/hns3_stats.h b/drivers/net/hns3/hns3_stats.h
index 7b9b502a6b..436fac3b31 100644
--- a/drivers/net/hns3/hns3_stats.h
+++ b/drivers/net/hns3/hns3_stats.h
@@ -5,11 +5,6 @@
#ifndef _HNS3_STATS_H_
#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 {
uint64_t rcb_tx_ring_pktnum_rcd; /* Total num of transmitted packets */
@@ -22,6 +17,7 @@ struct hns3_tqp_stats {
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;
uint64_t mac_tx_pfc_pri2_pkt_num;
@@ -58,7 +54,7 @@ struct hns3_mac_stats {
uint64_t mac_tx_1519_2047_oct_pkt_num;
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;
uint64_t mac_tx_12288_16383_oct_pkt_num;
@@ -85,7 +81,7 @@ struct hns3_mac_stats {
uint64_t mac_rx_1519_2047_oct_pkt_num;
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;
uint64_t mac_rx_12288_16383_oct_pkt_num;
@@ -151,5 +147,6 @@ int hns3_stats_reset(struct rte_eth_dev *dev);
void hns3_error_int_stats_add(struct hns3_adapter *hns, const char *err);
int hns3_tqp_stats_init(struct hns3_hw *hw);
void hns3_tqp_stats_uninit(struct hns3_hw *hw);
+int hns3_query_mac_stats_reg_num(struct hns3_hw *hw);
#endif /* _HNS3_STATS_H_ */
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:41.150237151 +0000
+++ 0085-net-hns3-fix-insecure-way-to-query-MAC-statistics.patch 2022-02-18 12:37:37.774793796 +0000
@@ -1 +1 @@
-From 6ee07e3cb589145d0f0826f918fd44eb3e160a08 Mon Sep 17 00:00:00 2001
+From b65114d8a356dab639016ecf64345b67e5642982 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 8514d62617..3c8d41c6c8 100644
@@ -30,3 +31,3 @@
-@@ -2733,6 +2733,10 @@ hns3_get_capability(struct hns3_hw *hw)
- if (ret)
- return ret;
+@@ -3102,6 +3102,10 @@ hns3_get_capability(struct hns3_hw *hw)
+ }
+ hw->revision = revision;
@@ -38 +39 @@
- if (hw->revision < PCI_REVISION_ID_HIP09_A) {
+ if (revision < PCI_REVISION_ID_HIP09_A) {
@@ -42 +43 @@
-index cf6380ebb2..ef028a7b2c 100644
+index d6d9b0504a..5717f54441 100644
@@ -45 +46 @@
-@@ -500,6 +500,7 @@ struct hns3_hw {
+@@ -431,6 +431,7 @@ struct hns3_hw {
@@ -50,2 +50,0 @@
- struct hns3_rx_missed_stats imissed_stats;
- uint64_t oerror_stats;
@@ -52,0 +52,2 @@
+
+ uint16_t num_msi;
@@ -54 +55 @@
-index 606b72509a..806720faff 100644
+index fc577ddf45..04702f17d1 100644
@@ -57 +58 @@
-@@ -307,24 +307,21 @@ static const struct hns3_xstats_name_offset hns3_imissed_stats_strings[] = {
+@@ -328,24 +328,21 @@ static const struct hns3_xstats_name_offset hns3_tx_queue_strings[] = {
@@ -90 +91 @@
-@@ -340,65 +337,71 @@ hns3_update_mac_stats(struct hns3_hw *hw, const uint32_t desc_num)
+@@ -361,65 +358,71 @@ hns3_update_mac_stats(struct hns3_hw *hw, const uint32_t desc_num)
@@ -205 +206 @@
-@@ -408,15 +411,8 @@ hns3_query_update_mac_stats(struct rte_eth_dev *dev)
+@@ -429,15 +432,8 @@ hns3_query_update_mac_stats(struct rte_eth_dev *dev)
@@ -221 +222 @@
- static int
+ /* Get tqp stats from register */
@@ -223 +224 @@
-index d1230f94cb..c81d351082 100644
+index 7b9b502a6b..436fac3b31 100644
@@ -264 +265,2 @@
-@@ -168,5 +164,6 @@ int hns3_stats_reset(struct rte_eth_dev *dev);
+@@ -151,5 +147,6 @@ int hns3_stats_reset(struct rte_eth_dev *dev);
+ void hns3_error_int_stats_add(struct hns3_adapter *hns, const char *err);
@@ -267 +268,0 @@
- int hns3_update_imissed_stats(struct hns3_hw *hw, bool is_clear);
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/hns3: fix operating queue when TCAM table is invalid' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (83 preceding siblings ...)
2022-02-18 12:38 ` patch 'net/hns3: fix insecure way to query MAC statistics' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'net/hns3: delete duplicated RSS type' " luca.boccassi
` (37 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Huisong Li; +Cc: Min Hu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/3f03bc5d20d519f118a2b105cd877b26103ffecb
Thanks.
Luca Boccassi
---
From 3f03bc5d20d519f118a2b105cd877b26103ffecb 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 3c8d41c6c8..b2ff59ef62 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -4598,6 +4598,10 @@ hns3_init_hardware(struct hns3_adapter *hns)
struct hns3_hw *hw = &hns->hw;
int ret;
+ /*
+ * All queue-related HW operations must be performed after the TCAM
+ * table is configured.
+ */
ret = hns3_map_tqp(hw);
if (ret) {
PMD_INIT_LOG(ERR, "Failed to map tqp: %d", ret);
@@ -5374,18 +5378,18 @@ hns3_reinit_dev(struct hns3_adapter *hns)
return ret;
}
+ 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) {
hns3_err(hw, "Failed to reset all queues: %d", ret);
return ret;
}
- 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) {
hns3_err(hw, "fail to enable hw error interrupts: %d",
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:41.189256761 +0000
+++ 0086-net-hns3-fix-operating-queue-when-TCAM-table-is-inva.patch 2022-02-18 12:37:37.782793975 +0000
@@ -1 +1 @@
-From eae97230dc2ab9553cdb335ab9b287a18a1b0c97 Mon Sep 17 00:00:00 2001
+From 3f03bc5d20d519f118a2b105cd877b26103ffecb 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 3c8d41c6c8..b2ff59ef62 100644
@@ -24 +25 @@
-@@ -4378,6 +4378,10 @@ hns3_init_hardware(struct hns3_adapter *hns)
+@@ -4598,6 +4598,10 @@ hns3_init_hardware(struct hns3_adapter *hns)
@@ -35 +36 @@
-@@ -5547,18 +5551,18 @@ hns3_reinit_dev(struct hns3_adapter *hns)
+@@ -5374,18 +5378,18 @@ hns3_reinit_dev(struct hns3_adapter *hns)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/hns3: delete duplicated RSS type' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (84 preceding siblings ...)
2022-02-18 12:38 ` patch 'net/hns3: fix operating queue when TCAM table is invalid' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'net/ixgbe: check filter init failure' " luca.boccassi
` (36 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Chengwen Feng; +Cc: Min Hu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/061f2416ab683416cf4d2fd7581659a4d226b6f0
Thanks.
Luca Boccassi
---
From 061f2416ab683416cf4d2fd7581659a4d226b6f0 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 3a11a78341..3b8c2c845b 100644
--- a/drivers/net/hns3/hns3_rss.c
+++ b/drivers/net/hns3/hns3_rss.c
@@ -152,10 +152,6 @@ static const struct {
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) },
- { 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) },
{ 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) |
BIT_ULL(HNS3_RSS_FIELD_IPV4_UDP_EN_UDP_S) |
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:41.226595896 +0000
+++ 0087-net-hns3-delete-duplicated-RSS-type.patch 2022-02-18 12:37:37.782793975 +0000
@@ -1 +1 @@
-From 2fe781865875b83c9028678d76e12392a2fb39c3 Mon Sep 17 00:00:00 2001
+From 061f2416ab683416cf4d2fd7581659a4d226b6f0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2fe781865875b83c9028678d76e12392a2fb39c3 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 3a4b699ae2..1782d63883 100644
+index 3a11a78341..3b8c2c845b 100644
@@ -26 +27 @@
-- { RTE_ETH_RSS_NONFRAG_IPV4_TCP, BIT_ULL(HNS3_RSS_FIELD_IPV4_TCP_EN_IP_S) |
+- { ETH_RSS_NONFRAG_IPV4_TCP, BIT_ULL(HNS3_RSS_FIELD_IPV4_TCP_EN_IP_S) |
@@ -30 +31 @@
- { RTE_ETH_RSS_NONFRAG_IPV4_UDP, BIT_ULL(HNS3_RSS_FIELD_IPV4_UDP_EN_IP_S) |
+ { ETH_RSS_NONFRAG_IPV4_UDP, BIT_ULL(HNS3_RSS_FIELD_IPV4_UDP_EN_IP_S) |
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/ixgbe: check filter init failure' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (85 preceding siblings ...)
2022-02-18 12:38 ` patch 'net/hns3: delete duplicated RSS type' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'net/bonding: fix promiscuous and allmulticast state' " luca.boccassi
` (35 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Yunjian Wang; +Cc: Haiyue Wang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/8189e99b3a5f743b1b7ecd3cb1553d6e49a26a78
Thanks.
Luca Boccassi
---
From 8189e99b3a5f743b1b7ecd3cb1553d6e49a26a78 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 e125eff54b..0853ae05d6 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -1231,13 +1231,8 @@ 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);
/* let hardware know driver is loaded */
@@ -1276,10 +1271,14 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
TAILQ_INIT(&filter_info->fivetuple_list);
/* 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 */
ixgbe_filterlist_init();
@@ -1291,6 +1290,21 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
ixgbe_tm_conf_init(eth_dev);
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;
}
static int
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:41.257946107 +0000
+++ 0088-net-ixgbe-check-filter-init-failure.patch 2022-02-18 12:37:37.790794153 +0000
@@ -1 +1 @@
-From 8c1e5c658c24553d5f813adc8afed8910e6f5194 Mon Sep 17 00:00:00 2001
+From 8189e99b3a5f743b1b7ecd3cb1553d6e49a26a78 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8c1e5c658c24553d5f813adc8afed8910e6f5194 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index c8f0460440..2f4ebb4e59 100644
+index e125eff54b..0853ae05d6 100644
@@ -23 +24 @@
-@@ -1223,13 +1223,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
+@@ -1231,13 +1231,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
@@ -39 +40 @@
-@@ -1268,10 +1263,14 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
+@@ -1276,10 +1271,14 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
@@ -56 +57 @@
-@@ -1283,6 +1282,21 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
+@@ -1291,6 +1290,21 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/bonding: fix promiscuous and allmulticast state' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (86 preceding siblings ...)
2022-02-18 12:38 ` patch 'net/ixgbe: check filter init failure' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:38 ` patch 'net/bonding: fix reference count on mbufs' " luca.boccassi
` (34 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Min Hu (Connor); +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/78ee1995c908215d312b8ef55516800eceebeaaf
Thanks.
Luca Boccassi
---
From 78ee1995c908215d312b8ef55516800eceebeaaf 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 3962d04b1a..6857b474af 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -2688,6 +2688,39 @@ bond_ethdev_promiscuous_disable(struct rte_eth_dev *dev)
return ret;
}
+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)
{
@@ -2801,6 +2834,39 @@ bond_ethdev_allmulticast_disable(struct rte_eth_dev *eth_dev)
return ret;
}
+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)
{
@@ -2890,6 +2956,8 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,
lsc_flag = 1;
mac_address_slaves_update(bonded_eth_dev);
+ bond_ethdev_promiscuous_update(bonded_eth_dev);
+ bond_ethdev_allmulticast_update(bonded_eth_dev);
}
activate_slave(bonded_eth_dev, port_id);
@@ -2919,6 +2987,8 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,
else
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.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:41.294808541 +0000
+++ 0089-net-bonding-fix-promiscuous-and-allmulticast-state.patch 2022-02-18 12:37:37.794794243 +0000
@@ -1 +1 @@
-From ac5341f5f9bab7b87b1a71761c40d204a7e6ab86 Mon Sep 17 00:00:00 2001
+From 78ee1995c908215d312b8ef55516800eceebeaaf Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ac5341f5f9bab7b87b1a71761c40d204a7e6ab86 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index e5abe90e07..d2fcfad676 100644
+index 3962d04b1a..6857b474af 100644
@@ -30 +31 @@
-@@ -2691,6 +2691,39 @@ bond_ethdev_promiscuous_disable(struct rte_eth_dev *dev)
+@@ -2688,6 +2688,39 @@ bond_ethdev_promiscuous_disable(struct rte_eth_dev *dev)
@@ -70 +71 @@
-@@ -2804,6 +2837,39 @@ bond_ethdev_allmulticast_disable(struct rte_eth_dev *eth_dev)
+@@ -2801,6 +2834,39 @@ bond_ethdev_allmulticast_disable(struct rte_eth_dev *eth_dev)
@@ -110 +111 @@
-@@ -2893,6 +2959,8 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,
+@@ -2890,6 +2956,8 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,
@@ -119 +120 @@
-@@ -2922,6 +2990,8 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,
+@@ -2919,6 +2987,8 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/bonding: fix reference count on mbufs' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (87 preceding siblings ...)
2022-02-18 12:38 ` patch 'net/bonding: fix promiscuous and allmulticast state' " luca.boccassi
@ 2022-02-18 12:38 ` luca.boccassi
2022-02-18 12:39 ` patch 'app/testpmd: fix bonding mode set' " luca.boccassi
` (33 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:38 UTC (permalink / raw)
To: Min Hu (Connor); +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/c4a4ba788f6369745ca3a5aa70a7c3f1f8d69be0
Thanks.
Luca Boccassi
---
From c4a4ba788f6369745ca3a5aa70a7c3f1f8d69be0 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 6857b474af..d7bc0f0875 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1322,7 +1322,7 @@ 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 */
for (i = 0; i < num_of_slaves; i++) {
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:41.329766748 +0000
+++ 0090-net-bonding-fix-reference-count-on-mbufs.patch 2022-02-18 12:37:37.798794333 +0000
@@ -1 +1 @@
-From 814e79f3afad8c45c6922617f26292af3221ae2b Mon Sep 17 00:00:00 2001
+From c4a4ba788f6369745ca3a5aa70a7c3f1f8d69be0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 814e79f3afad8c45c6922617f26292af3221ae2b ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index d2fcfad676..bfa931098e 100644
+index 6857b474af..d7bc0f0875 100644
@@ -25 +26 @@
-@@ -1318,7 +1318,7 @@ bond_ethdev_tx_burst_broadcast(void *queue, struct rte_mbuf **bufs,
+@@ -1322,7 +1322,7 @@ bond_ethdev_tx_burst_broadcast(void *queue, struct rte_mbuf **bufs,
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'app/testpmd: fix bonding mode set' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (88 preceding siblings ...)
2022-02-18 12:38 ` patch 'net/bonding: fix reference count on mbufs' " luca.boccassi
@ 2022-02-18 12:39 ` luca.boccassi
2022-02-18 12:39 ` patch 'ethdev: add internal function to device struct from name' " luca.boccassi
` (32 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:39 UTC (permalink / raw)
To: Min Hu (Connor); +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b040eaa3352bd73be25795ff11f9a20897651a96
Thanks.
Luca Boccassi
---
From b040eaa3352bd73be25795ff11f9a20897651a96 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 496f628b27..df6a575002 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -5771,6 +5771,19 @@ 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. */
if (0 != rte_eth_bond_mode_set(port_id, res->value))
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:41.363202195 +0000
+++ 0091-app-testpmd-fix-bonding-mode-set.patch 2022-02-18 12:37:37.810794601 +0000
@@ -1 +1 @@
-From 39ddd5d1895e72ba2bc974eddbc12a3135639ed1 Mon Sep 17 00:00:00 2001
+From b040eaa3352bd73be25795ff11f9a20897651a96 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 39ddd5d1895e72ba2bc974eddbc12a3135639ed1 ]
+
@@ -36 +37,0 @@
-Cc: stable@dpdk.org
@@ -45 +46 @@
-index e626b1c7d9..16ad4be005 100644
+index 496f628b27..df6a575002 100644
@@ -48 +49 @@
-@@ -5915,6 +5915,19 @@ static void cmd_set_bonding_mode_parsed(void *parsed_result,
+@@ -5771,6 +5771,19 @@ static void cmd_set_bonding_mode_parsed(void *parsed_result,
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'ethdev: add internal function to device struct from name' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (89 preceding siblings ...)
2022-02-18 12:39 ` patch 'app/testpmd: fix bonding mode set' " luca.boccassi
@ 2022-02-18 12:39 ` luca.boccassi
2022-02-18 12:39 ` patch 'net/tap: fix to populate FDs in secondary process' " luca.boccassi
` (31 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:39 UTC (permalink / raw)
To: Kumara Parameshwaran; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/eea12b2874ac505618169234d4c23bbb16353341
Thanks.
Luca Boccassi
---
From eea12b2874ac505618169234d4c23bbb16353341 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/librte_ethdev/rte_ethdev.c | 11 +++++++++++
lib/librte_ethdev/rte_ethdev_driver.h | 18 ++++++++++++++++++
lib/librte_ethdev/version.map | 1 +
3 files changed, 30 insertions(+)
diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index dd5ce4eb1a..24eb0d1197 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -839,6 +839,17 @@ rte_eth_dev_get_port_by_name(const char *name, uint16_t *port_id)
return -ENODEV;
}
+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/librte_ethdev/rte_ethdev_driver.h b/lib/librte_ethdev/rte_ethdev_driver.h
index 7ee0f797d3..b6abef7782 100644
--- a/lib/librte_ethdev/rte_ethdev_driver.h
+++ b/lib/librte_ethdev/rte_ethdev_driver.h
@@ -1326,6 +1326,24 @@ rte_eth_hairpin_queue_peer_bind(uint16_t cur_port, uint16_t cur_queue,
struct rte_hairpin_peer_info *peer_info,
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
* Reset the current queue state and configuration to disconnect (unbind) it
diff --git a/lib/librte_ethdev/version.map b/lib/librte_ethdev/version.map
index d3f5410806..d3f9baf23c 100644
--- a/lib/librte_ethdev/version.map
+++ b/lib/librte_ethdev/version.map
@@ -251,6 +251,7 @@ INTERNAL {
rte_eth_dev_callback_process;
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;
rte_eth_dev_probing_finish;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:41.410099774 +0000
+++ 0092-ethdev-add-internal-function-to-device-struct-from-n.patch 2022-02-18 12:37:37.818794779 +0000
@@ -1 +1 @@
-From 961fb4029b8c52c0e8230d34993c354d70e10e14 Mon Sep 17 00:00:00 2001
+From eea12b2874ac505618169234d4c23bbb16353341 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 961fb4029b8c52c0e8230d34993c354d70e10e14 ]
+
@@ -9,2 +10,0 @@
-Cc: stable@dpdk.org
-
@@ -14,3 +14,3 @@
- lib/ethdev/ethdev_driver.h | 18 ++++++++++++++++++
- lib/ethdev/rte_ethdev.c | 11 +++++++++++
- lib/ethdev/version.map | 1 +
+ lib/librte_ethdev/rte_ethdev.c | 11 +++++++++++
+ lib/librte_ethdev/rte_ethdev_driver.h | 18 ++++++++++++++++++
+ lib/librte_ethdev/version.map | 1 +
@@ -19,5 +19,27 @@
-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
-@@ -1629,6 +1629,24 @@ rte_eth_hairpin_queue_peer_bind(uint16_t cur_port, uint16_t cur_queue,
+diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
+index dd5ce4eb1a..24eb0d1197 100644
+--- a/lib/librte_ethdev/rte_ethdev.c
++++ b/lib/librte_ethdev/rte_ethdev.c
+@@ -839,6 +839,17 @@ rte_eth_dev_get_port_by_name(const char *name, uint16_t *port_id)
+ return -ENODEV;
+ }
+
++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/librte_ethdev/rte_ethdev_driver.h b/lib/librte_ethdev/rte_ethdev_driver.h
+index 7ee0f797d3..b6abef7782 100644
+--- a/lib/librte_ethdev/rte_ethdev_driver.h
++++ b/lib/librte_ethdev/rte_ethdev_driver.h
+@@ -1326,6 +1326,24 @@ rte_eth_hairpin_queue_peer_bind(uint16_t cur_port, uint16_t cur_queue,
@@ -48,27 +70,5 @@
-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
-@@ -894,6 +894,17 @@ rte_eth_dev_get_port_by_name(const char *name, uint16_t *port_id)
- return -ENODEV;
- }
-
-+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
-@@ -267,6 +267,7 @@ INTERNAL {
+diff --git a/lib/librte_ethdev/version.map b/lib/librte_ethdev/version.map
+index d3f5410806..d3f9baf23c 100644
+--- a/lib/librte_ethdev/version.map
++++ b/lib/librte_ethdev/version.map
+@@ -251,6 +251,7 @@ INTERNAL {
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/tap: fix to populate FDs in secondary process' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (90 preceding siblings ...)
2022-02-18 12:39 ` patch 'ethdev: add internal function to device struct from name' " luca.boccassi
@ 2022-02-18 12:39 ` luca.boccassi
2022-02-18 12:39 ` patch 'app/testpmd: fix stack overflow for EEPROM display' " luca.boccassi
` (30 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:39 UTC (permalink / raw)
To: Kumara Parameshwaran; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/aea2c5be01694644e9111b4f2407382a8af19aaa
Thanks.
Luca Boccassi
---
From aea2c5be01694644e9111b4f2407382a8af19aaa 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 40a7bc44b1..dcc12f32e7 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -67,6 +67,7 @@
/* 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
@@ -905,11 +906,49 @@ tap_link_set_up(struct rte_eth_dev *dev)
return tap_ioctl(pmd, SIOCSIFFLAGS, &ifr, 1, LOCAL_AND_REMOTE);
}
+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)
{
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)
return err;
@@ -926,6 +965,34 @@ tap_dev_start(struct rte_eth_dev *dev)
return err;
}
+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.
*/
static int
@@ -1110,6 +1177,9 @@ 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;
}
@@ -2464,6 +2534,16 @@ rte_pmd_tap_probe(struct rte_vdev_device *dev)
ret = tap_mp_attach_queues(name, eth_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.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:41.447603653 +0000
+++ 0093-net-tap-fix-to-populate-FDs-in-secondary-process.patch 2022-02-18 12:37:37.818794779 +0000
@@ -1 +1 @@
-From c36ce7099c2187926cd62cff7ebd479823554929 Mon Sep 17 00:00:00 2001
+From aea2c5be01694644e9111b4f2407382a8af19aaa 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 40a7bc44b1..dcc12f32e7 100644
@@ -33 +34 @@
-@@ -880,11 +881,49 @@ tap_link_set_up(struct rte_eth_dev *dev)
+@@ -905,11 +906,49 @@ tap_link_set_up(struct rte_eth_dev *dev)
@@ -83 +84 @@
-@@ -901,6 +940,34 @@ tap_dev_start(struct rte_eth_dev *dev)
+@@ -926,6 +965,34 @@ tap_dev_start(struct rte_eth_dev *dev)
@@ -118 +119 @@
-@@ -1092,6 +1159,9 @@ tap_dev_close(struct rte_eth_dev *dev)
+@@ -1110,6 +1177,9 @@ tap_dev_close(struct rte_eth_dev *dev)
@@ -128 +129 @@
-@@ -2453,6 +2523,16 @@ rte_pmd_tap_probe(struct rte_vdev_device *dev)
+@@ -2464,6 +2534,16 @@ rte_pmd_tap_probe(struct rte_vdev_device *dev)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'app/testpmd: fix stack overflow for EEPROM display' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (91 preceding siblings ...)
2022-02-18 12:39 ` patch 'net/tap: fix to populate FDs in secondary process' " luca.boccassi
@ 2022-02-18 12:39 ` luca.boccassi
2022-02-18 12:39 ` patch 'vhost: fix guest to host physical address mapping' " luca.boccassi
` (29 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:39 UTC (permalink / raw)
To: Steve Yang; +Cc: Aman Singh, Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/58767a90f4b169d62b4e42086473bec562ed3ab7
Thanks.
Luca Boccassi
---
From 58767a90f4b169d62b4e42086473bec562ed3ab7 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 8e37602f6b..abe2cc394c 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -797,10 +797,15 @@ port_eeprom_display(portid_t port_id)
return;
}
- 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);
if (ret != 0) {
@@ -818,10 +823,12 @@ port_eeprom_display(portid_t port_id)
printf("Unable to get EEPROM: %d\n", ret);
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);
}
void
@@ -856,10 +863,15 @@ port_module_eeprom_display(portid_t port_id)
return;
}
- 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);
if (ret != 0) {
@@ -877,11 +889,13 @@ port_module_eeprom_display(portid_t port_id)
printf("Unable to get module EEPROM: %d\n", ret);
break;
}
+ free(einfo.data);
return;
}
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);
}
void
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:41.481428216 +0000
+++ 0094-app-testpmd-fix-stack-overflow-for-EEPROM-display.patch 2022-02-18 12:37:37.822794868 +0000
@@ -1 +1 @@
-From ff6db8829678396d2d10b3c29744d36149608982 Mon Sep 17 00:00:00 2001
+From 58767a90f4b169d62b4e42086473bec562ed3ab7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ff6db8829678396d2d10b3c29744d36149608982 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 1722d6c8f8..e812f57151 100644
+index 8e37602f6b..abe2cc394c 100644
@@ -25 +26 @@
-@@ -912,10 +912,15 @@ port_eeprom_display(portid_t port_id)
+@@ -797,10 +797,15 @@ port_eeprom_display(portid_t port_id)
@@ -43,2 +44,2 @@
-@@ -933,10 +938,12 @@ port_eeprom_display(portid_t port_id)
- fprintf(stderr, "Unable to get EEPROM: %d\n", ret);
+@@ -818,10 +823,12 @@ port_eeprom_display(portid_t port_id)
+ printf("Unable to get EEPROM: %d\n", ret);
@@ -56 +57 @@
-@@ -972,10 +979,15 @@ port_module_eeprom_display(portid_t port_id)
+@@ -856,10 +863,15 @@ port_module_eeprom_display(portid_t port_id)
@@ -74,2 +75,2 @@
-@@ -994,11 +1006,13 @@ port_module_eeprom_display(portid_t port_id)
- ret);
+@@ -877,11 +889,13 @@ port_module_eeprom_display(portid_t port_id)
+ printf("Unable to get module EEPROM: %d\n", ret);
@@ -87 +88 @@
- int
+ void
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'vhost: fix guest to host physical address mapping' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (92 preceding siblings ...)
2022-02-18 12:39 ` patch 'app/testpmd: fix stack overflow for EEPROM display' " luca.boccassi
@ 2022-02-18 12:39 ` luca.boccassi
2022-02-18 12:39 ` patch 'regex/mlx5: fix memory allocation check' " luca.boccassi
` (28 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:39 UTC (permalink / raw)
To: Yuan Wang; +Cc: Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/0e63db20225d30607facb5db741edd543e0d3bdf
Thanks.
Luca Boccassi
---
From 0e63db20225d30607facb5db741edd543e0d3bdf 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/librte_vhost/vhost.h | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
index 984c7a6f5f..36d6fdabd8 100644
--- a/lib/librte_vhost/vhost.h
+++ b/lib/librte_vhost/vhost.h
@@ -565,6 +565,20 @@ static __rte_always_inline int guest_page_addrcmp(const void *p1,
return 0;
}
+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,
uint64_t gpa_size, uint64_t *hpa_size)
@@ -575,9 +589,9 @@ 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 <=
page->guest_phys_addr + page->size) {
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:41.516949670 +0000
+++ 0095-vhost-fix-guest-to-host-physical-address-mapping.patch 2022-02-18 12:37:37.826794957 +0000
@@ -1 +1 @@
-From 8b764f460f168505b9335bdbd0e0fead8edbc188 Mon Sep 17 00:00:00 2001
+From 0e63db20225d30607facb5db741edd543e0d3bdf Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8b764f460f168505b9335bdbd0e0fead8edbc188 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
- lib/vhost/vhost.h | 18 ++++++++++++++++--
+ lib/librte_vhost/vhost.h | 18 ++++++++++++++++--
@@ -20,5 +21,5 @@
-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
-@@ -587,6 +587,20 @@ static __rte_always_inline int guest_page_addrcmp(const void *p1,
+diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
+index 984c7a6f5f..36d6fdabd8 100644
+--- a/lib/librte_vhost/vhost.h
++++ b/lib/librte_vhost/vhost.h
+@@ -565,6 +565,20 @@ static __rte_always_inline int guest_page_addrcmp(const void *p1,
@@ -45 +46 @@
-@@ -597,9 +611,9 @@ gpa_to_first_hpa(struct virtio_net *dev, uint64_t gpa,
+@@ -575,9 +589,9 @@ gpa_to_first_hpa(struct virtio_net *dev, uint64_t gpa,
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'regex/mlx5: fix memory allocation check' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (93 preceding siblings ...)
2022-02-18 12:39 ` patch 'vhost: fix guest to host physical address mapping' " luca.boccassi
@ 2022-02-18 12:39 ` luca.boccassi
2022-02-18 12:39 ` patch 'stack: fix stubs header export' " luca.boccassi
` (27 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:39 UTC (permalink / raw)
To: Weiguo Li; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/c53cb87b513061b3473a2d9363c89a995f4f86a3
Thanks.
Luca Boccassi
---
From c53cb87b513061b3473a2d9363c89a995f4f86a3 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 0753ab3bdc..b7ac6ed4a8 100644
--- a/drivers/regex/mlx5/mlx5_rxp.c
+++ b/drivers/regex/mlx5/mlx5_rxp.c
@@ -989,7 +989,7 @@ mlx5_regex_configure(struct rte_regexdev *dev,
dev->data->dev_conf.nb_queue_pairs = priv->nb_queues;
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;
return -rte_errno;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:41.548283299 +0000
+++ 0096-regex-mlx5-fix-memory-allocation-check.patch 2022-02-18 12:37:37.826794957 +0000
@@ -1 +1 @@
-From 60e9028a8e7e034bcfc7054b12c39f1f2ee2513c Mon Sep 17 00:00:00 2001
+From c53cb87b513061b3473a2d9363c89a995f4f86a3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 60e9028a8e7e034bcfc7054b12c39f1f2ee2513c ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
-index 5ead3ca341..51b6e71376 100644
+index 0753ab3bdc..b7ac6ed4a8 100644
@@ -20 +21 @@
-@@ -148,7 +148,7 @@ mlx5_regex_configure(struct rte_regexdev *dev,
+@@ -989,7 +989,7 @@ mlx5_regex_configure(struct rte_regexdev *dev,
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'stack: fix stubs header export' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (94 preceding siblings ...)
2022-02-18 12:39 ` patch 'regex/mlx5: fix memory allocation check' " luca.boccassi
@ 2022-02-18 12:39 ` luca.boccassi
2022-02-18 12:39 ` patch 'eal: fix C++ include' " luca.boccassi
` (26 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:39 UTC (permalink / raw)
To: David Marchand; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/7cabaf23be3b854d49c9baf81ddda9c1e9ebfe86
Thanks.
Luca Boccassi
---
From 7cabaf23be3b854d49c9baf81ddda9c1e9ebfe86 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/librte_stack/meson.build | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/librte_stack/meson.build b/lib/librte_stack/meson.build
index 8f82a40ec2..88ed276d9a 100644
--- a/lib/librte_stack/meson.build
+++ b/lib/librte_stack/meson.build
@@ -6,4 +6,6 @@ headers = files('rte_stack.h',
'rte_stack_std.h',
'rte_stack_lf.h',
'rte_stack_lf_generic.h',
- 'rte_stack_lf_c11.h')
+ 'rte_stack_lf_c11.h',
+ 'rte_stack_lf_stubs.h',
+)
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:41.578757127 +0000
+++ 0097-stack-fix-stubs-header-export.patch 2022-02-18 12:37:37.826794957 +0000
@@ -1 +1 @@
-From 8adf5f528bf3321feeae2231007ebae162032739 Mon Sep 17 00:00:00 2001
+From 7cabaf23be3b854d49c9baf81ddda9c1e9ebfe86 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8adf5f528bf3321feeae2231007ebae162032739 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -17,2 +18,2 @@
- lib/stack/meson.build | 1 +
- 1 file changed, 1 insertion(+)
+ lib/librte_stack/meson.build | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
@@ -20,10 +21,12 @@
-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
-@@ -9,4 +9,5 @@ indirect_headers += files(
- 'rte_stack_lf.h',
- 'rte_stack_lf_generic.h',
- 'rte_stack_lf_c11.h',
-+ 'rte_stack_lf_stubs.h',
- )
+diff --git a/lib/librte_stack/meson.build b/lib/librte_stack/meson.build
+index 8f82a40ec2..88ed276d9a 100644
+--- a/lib/librte_stack/meson.build
++++ b/lib/librte_stack/meson.build
+@@ -6,4 +6,6 @@ headers = files('rte_stack.h',
+ 'rte_stack_std.h',
+ 'rte_stack_lf.h',
+ 'rte_stack_lf_generic.h',
+- 'rte_stack_lf_c11.h')
++ 'rte_stack_lf_c11.h',
++ 'rte_stack_lf_stubs.h',
++)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'eal: fix C++ include' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (95 preceding siblings ...)
2022-02-18 12:39 ` patch 'stack: fix stubs header export' " luca.boccassi
@ 2022-02-18 12:39 ` luca.boccassi
2022-02-18 12:39 ` patch 'eventdev: " luca.boccassi
` (25 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:39 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/ae0613e1333077f194f40edd6d709b1ff0aacd05
Thanks.
Luca Boccassi
---
From ae0613e1333077f194f40edd6d709b1ff0aacd05 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/librte_eal/include/generic/rte_ticketlock.h | 14 +++++++-------
lib/librte_eal/include/rte_trace_point.h | 2 +-
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/lib/librte_eal/include/generic/rte_ticketlock.h b/lib/librte_eal/include/generic/rte_ticketlock.h
index c1b8808f51..693c67b517 100644
--- a/lib/librte_eal/include/generic/rte_ticketlock.h
+++ b/lib/librte_eal/include/generic/rte_ticketlock.h
@@ -91,13 +91,13 @@ rte_ticketlock_unlock(rte_ticketlock_t *tl)
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/librte_eal/include/rte_trace_point.h b/lib/librte_eal/include/rte_trace_point.h
index e226f073f7..0f8700974f 100644
--- a/lib/librte_eal/include/rte_trace_point.h
+++ b/lib/librte_eal/include/rte_trace_point.h
@@ -370,7 +370,7 @@ do { \
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.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:41.609470308 +0000
+++ 0098-eal-fix-C-include.patch 2022-02-18 12:37:37.830795047 +0000
@@ -1 +1 @@
-From 59144f6edd884bfc392143b60bf4d0f082053784 Mon Sep 17 00:00:00 2001
+From ae0613e1333077f194f40edd6d709b1ff0aacd05 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 59144f6edd884bfc392143b60bf4d0f082053784 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -17,2 +18,2 @@
- lib/eal/include/generic/rte_ticketlock.h | 14 +++++++-------
- lib/eal/include/rte_trace_point.h | 2 +-
+ lib/librte_eal/include/generic/rte_ticketlock.h | 14 +++++++-------
+ lib/librte_eal/include/rte_trace_point.h | 2 +-
@@ -21 +22 @@
-diff --git a/lib/eal/include/generic/rte_ticketlock.h b/lib/eal/include/generic/rte_ticketlock.h
+diff --git a/lib/librte_eal/include/generic/rte_ticketlock.h b/lib/librte_eal/include/generic/rte_ticketlock.h
@@ -23,2 +24,2 @@
---- a/lib/eal/include/generic/rte_ticketlock.h
-+++ b/lib/eal/include/generic/rte_ticketlock.h
+--- a/lib/librte_eal/include/generic/rte_ticketlock.h
++++ b/lib/librte_eal/include/generic/rte_ticketlock.h
@@ -46 +47 @@
-diff --git a/lib/eal/include/rte_trace_point.h b/lib/eal/include/rte_trace_point.h
+diff --git a/lib/librte_eal/include/rte_trace_point.h b/lib/librte_eal/include/rte_trace_point.h
@@ -48,2 +49,2 @@
---- a/lib/eal/include/rte_trace_point.h
-+++ b/lib/eal/include/rte_trace_point.h
+--- a/lib/librte_eal/include/rte_trace_point.h
++++ b/lib/librte_eal/include/rte_trace_point.h
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'eventdev: fix C++ include' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (96 preceding siblings ...)
2022-02-18 12:39 ` patch 'eal: fix C++ include' " luca.boccassi
@ 2022-02-18 12:39 ` luca.boccassi
2022-02-18 12:39 ` patch 'graph: " luca.boccassi
` (24 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:39 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Jerin Jacob, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/48735e1e43eba0ccb3dbdff6dd14a87ea04d9f47
Thanks.
Luca Boccassi
---
From 48735e1e43eba0ccb3dbdff6dd14a87ea04d9f47 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/librte_eventdev/rte_event_timer_adapter.h | 4 ++++
lib/librte_eventdev/rte_eventdev.h | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/lib/librte_eventdev/rte_event_timer_adapter.h b/lib/librte_eventdev/rte_event_timer_adapter.h
index d2ebcb0909..6919b1de90 100644
--- a/lib/librte_eventdev/rte_event_timer_adapter.h
+++ b/lib/librte_eventdev/rte_event_timer_adapter.h
@@ -665,4 +665,8 @@ rte_event_timer_cancel_burst(const struct rte_event_timer_adapter *adapter,
return adapter->cancel_burst(adapter, evtims, nb_evtims);
}
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __RTE_EVENT_TIMER_ADAPTER_H__ */
diff --git a/lib/librte_eventdev/rte_eventdev.h b/lib/librte_eventdev/rte_eventdev.h
index ce1fc2ce0f..bec8f3c0c9 100644
--- a/lib/librte_eventdev/rte_eventdev.h
+++ b/lib/librte_eventdev/rte_eventdev.h
@@ -1380,7 +1380,7 @@ __rte_event_enqueue_burst(uint8_t dev_id, uint8_t port_id,
return 0;
}
#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
* requests nb_events as const one
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:41.640886268 +0000
+++ 0099-eventdev-fix-C-include.patch 2022-02-18 12:37:37.830795047 +0000
@@ -1 +1 @@
-From 153e7d88133cf30e6a042e92dcc6a8a0acfe7a62 Mon Sep 17 00:00:00 2001
+From 48735e1e43eba0ccb3dbdff6dd14a87ea04d9f47 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 153e7d88133cf30e6a042e92dcc6a8a0acfe7a62 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -18,2 +19,2 @@
- lib/eventdev/rte_event_timer_adapter.h | 4 ++++
- lib/eventdev/rte_eventdev.h | 2 +-
+ lib/librte_eventdev/rte_event_timer_adapter.h | 4 ++++
+ lib/librte_eventdev/rte_eventdev.h | 2 +-
@@ -22,5 +23,5 @@
-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
-@@ -678,4 +678,8 @@ rte_event_timer_cancel_burst(const struct rte_event_timer_adapter *adapter,
+diff --git a/lib/librte_eventdev/rte_event_timer_adapter.h b/lib/librte_eventdev/rte_event_timer_adapter.h
+index d2ebcb0909..6919b1de90 100644
+--- a/lib/librte_eventdev/rte_event_timer_adapter.h
++++ b/lib/librte_eventdev/rte_event_timer_adapter.h
+@@ -665,4 +665,8 @@ rte_event_timer_cancel_burst(const struct rte_event_timer_adapter *adapter,
@@ -35,5 +36,5 @@
-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
-@@ -1805,7 +1805,7 @@ __rte_event_enqueue_burst(uint8_t dev_id, uint8_t port_id,
+diff --git a/lib/librte_eventdev/rte_eventdev.h b/lib/librte_eventdev/rte_eventdev.h
+index ce1fc2ce0f..bec8f3c0c9 100644
+--- a/lib/librte_eventdev/rte_eventdev.h
++++ b/lib/librte_eventdev/rte_eventdev.h
+@@ -1380,7 +1380,7 @@ __rte_event_enqueue_burst(uint8_t dev_id, uint8_t port_id,
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'graph: fix C++ include' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (97 preceding siblings ...)
2022-02-18 12:39 ` patch 'eventdev: " luca.boccassi
@ 2022-02-18 12:39 ` luca.boccassi
2022-02-18 12:39 ` patch 'ipsec: " luca.boccassi
` (23 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:39 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Jerin Jacob, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/04eb6cecc92a906701788c1ed125d6872f2582be
Thanks.
Luca Boccassi
---
From 04eb6cecc92a906701788c1ed125d6872f2582be 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/librte_graph/rte_graph_worker.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_graph/rte_graph_worker.h b/lib/librte_graph/rte_graph_worker.h
index eef77f732a..0c0b9c095a 100644
--- a/lib/librte_graph/rte_graph_worker.h
+++ b/lib/librte_graph/rte_graph_worker.h
@@ -155,7 +155,7 @@ rte_graph_walk(struct rte_graph *graph)
* +-----+ <= cir_start + mask
*/
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;
rte_prefetch0(objs);
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:41.674172314 +0000
+++ 0100-graph-fix-C-include.patch 2022-02-18 12:37:37.834795136 +0000
@@ -1 +1 @@
-From ca6732316c23e158da10b0e3a7b2eaab9d3e1368 Mon Sep 17 00:00:00 2001
+From 04eb6cecc92a906701788c1ed125d6872f2582be Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ca6732316c23e158da10b0e3a7b2eaab9d3e1368 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -15 +16 @@
- lib/graph/rte_graph_worker.h | 2 +-
+ lib/librte_graph/rte_graph_worker.h | 2 +-
@@ -18 +19 @@
-diff --git a/lib/graph/rte_graph_worker.h b/lib/graph/rte_graph_worker.h
+diff --git a/lib/librte_graph/rte_graph_worker.h b/lib/librte_graph/rte_graph_worker.h
@@ -20,2 +21,2 @@
---- a/lib/graph/rte_graph_worker.h
-+++ b/lib/graph/rte_graph_worker.h
+--- a/lib/librte_graph/rte_graph_worker.h
++++ b/lib/librte_graph/rte_graph_worker.h
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'ipsec: fix C++ include' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (98 preceding siblings ...)
2022-02-18 12:39 ` patch 'graph: " luca.boccassi
@ 2022-02-18 12:39 ` luca.boccassi
2022-02-18 12:39 ` patch 'table: " luca.boccassi
` (22 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:39 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Konstantin Ananyev, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/97f298e315388b3b1f3c41119971777a666a3e5e
Thanks.
Luca Boccassi
---
From 97f298e315388b3b1f3c41119971777a666a3e5e 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/librte_ipsec/rte_ipsec_group.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/librte_ipsec/rte_ipsec_group.h b/lib/librte_ipsec/rte_ipsec_group.h
index ea3bdfad95..530cd92eef 100644
--- a/lib/librte_ipsec/rte_ipsec_group.h
+++ b/lib/librte_ipsec/rte_ipsec_group.h
@@ -49,10 +49,10 @@ 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.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:41.704939227 +0000
+++ 0101-ipsec-fix-C-include.patch 2022-02-18 12:37:37.834795136 +0000
@@ -1 +1 @@
-From e82470e22528ad7c0277aa94ecbc6b97f3bdb4c2 Mon Sep 17 00:00:00 2001
+From 97f298e315388b3b1f3c41119971777a666a3e5e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e82470e22528ad7c0277aa94ecbc6b97f3bdb4c2 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -15 +16 @@
- lib/ipsec/rte_ipsec_group.h | 4 ++--
+ lib/librte_ipsec/rte_ipsec_group.h | 4 ++--
@@ -18,4 +19,4 @@
-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
+diff --git a/lib/librte_ipsec/rte_ipsec_group.h b/lib/librte_ipsec/rte_ipsec_group.h
+index ea3bdfad95..530cd92eef 100644
+--- a/lib/librte_ipsec/rte_ipsec_group.h
++++ b/lib/librte_ipsec/rte_ipsec_group.h
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'table: fix C++ include' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (99 preceding siblings ...)
2022-02-18 12:39 ` patch 'ipsec: " luca.boccassi
@ 2022-02-18 12:39 ` luca.boccassi
2022-02-18 12:39 ` patch 'vhost: " luca.boccassi
` (21 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:39 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b6dd9d6b2c8c2a91b9790378d6e46d21d26e16fc
Thanks.
Luca Boccassi
---
From b6dd9d6b2c8c2a91b9790378d6e46d21d26e16fc 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/librte_table/rte_table_hash_func.h | 32 +++++++++++++-------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/lib/librte_table/rte_table_hash_func.h b/lib/librte_table/rte_table_hash_func.h
index c4c35cc06a..a962ec2f68 100644
--- a/lib/librte_table/rte_table_hash_func.h
+++ b/lib/librte_table/rte_table_hash_func.h
@@ -58,8 +58,8 @@ static inline uint64_t
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;
crc0 = rte_crc32_u64(seed, k[0] & m[0]);
@@ -72,8 +72,8 @@ static inline uint64_t
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;
k0 = k[0] & m[0];
@@ -91,8 +91,8 @@ static inline uint64_t
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;
k0 = k[0] & m[0];
@@ -113,8 +113,8 @@ static inline uint64_t
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;
k0 = k[0] & m[0];
@@ -139,8 +139,8 @@ static inline uint64_t
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;
k0 = k[0] & m[0];
@@ -165,8 +165,8 @@ static inline uint64_t
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;
k0 = k[0] & m[0];
@@ -192,8 +192,8 @@ static inline uint64_t
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;
k0 = k[0] & m[0];
@@ -222,8 +222,8 @@ static inline uint64_t
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;
k0 = k[0] & m[0];
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:41.735614132 +0000
+++ 0102-table-fix-C-include.patch 2022-02-18 12:37:37.834795136 +0000
@@ -1 +1 @@
-From 097ea8e274440919433cd932ec7a1b2f3956180b Mon Sep 17 00:00:00 2001
+From b6dd9d6b2c8c2a91b9790378d6e46d21d26e16fc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 097ea8e274440919433cd932ec7a1b2f3956180b ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -14 +15 @@
- lib/table/rte_table_hash_func.h | 32 ++++++++++++++++----------------
+ lib/librte_table/rte_table_hash_func.h | 32 +++++++++++++-------------
@@ -17 +18 @@
-diff --git a/lib/table/rte_table_hash_func.h b/lib/table/rte_table_hash_func.h
+diff --git a/lib/librte_table/rte_table_hash_func.h b/lib/librte_table/rte_table_hash_func.h
@@ -19,2 +20,2 @@
---- a/lib/table/rte_table_hash_func.h
-+++ b/lib/table/rte_table_hash_func.h
+--- a/lib/librte_table/rte_table_hash_func.h
++++ b/lib/librte_table/rte_table_hash_func.h
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'vhost: fix C++ include' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (100 preceding siblings ...)
2022-02-18 12:39 ` patch 'table: " luca.boccassi
@ 2022-02-18 12:39 ` luca.boccassi
2022-02-18 12:39 ` patch 'mem: check allocation in dynamic hugepage init' " luca.boccassi
` (20 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:39 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/c7bd2f435490e211d98b70ca8ca2dcc4fdf51ece
Thanks.
Luca Boccassi
---
From c7bd2f435490e211d98b70ca8ca2dcc4fdf51ece 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/librte_vhost/rte_vhost.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/librte_vhost/rte_vhost.h b/lib/librte_vhost/rte_vhost.h
index 755fb3dd7a..39fe428079 100644
--- a/lib/librte_vhost/rte_vhost.h
+++ b/lib/librte_vhost/rte_vhost.h
@@ -21,10 +21,12 @@
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)
#define RTE_VHOST_USER_NO_RECONNECT (1ULL << 1)
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:41.766146065 +0000
+++ 0103-vhost-fix-C-include.patch 2022-02-18 12:37:37.834795136 +0000
@@ -1 +1 @@
-From 1d1126ad436e8c7c015fb3f67ad3af05c3b397d5 Mon Sep 17 00:00:00 2001
+From c7bd2f435490e211d98b70ca8ca2dcc4fdf51ece Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1d1126ad436e8c7c015fb3f67ad3af05c3b397d5 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
- lib/vhost/rte_vhost.h | 2 ++
+ lib/librte_vhost/rte_vhost.h | 2 ++
@@ -20,4 +21,4 @@
-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
+diff --git a/lib/librte_vhost/rte_vhost.h b/lib/librte_vhost/rte_vhost.h
+index 755fb3dd7a..39fe428079 100644
+--- a/lib/librte_vhost/rte_vhost.h
++++ b/lib/librte_vhost/rte_vhost.h
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'mem: check allocation in dynamic hugepage init' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (101 preceding siblings ...)
2022-02-18 12:39 ` patch 'vhost: " luca.boccassi
@ 2022-02-18 12:39 ` luca.boccassi
2022-02-18 12:39 ` patch 'app/fib: fix division by zero' " luca.boccassi
` (19 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:39 UTC (permalink / raw)
To: Yunjian Wang; +Cc: David Marchand, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/1b84be5c00418b3fc97988c8e3d5bfaaef8c3cde
Thanks.
Luca Boccassi
---
From 1b84be5c00418b3fc97988c8e3d5bfaaef8c3cde 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/librte_eal/common/eal_common_dynmem.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lib/librte_eal/common/eal_common_dynmem.c b/lib/librte_eal/common/eal_common_dynmem.c
index 7c5437ddfa..c1e1889f5c 100644
--- a/lib/librte_eal/common/eal_common_dynmem.c
+++ b/lib/librte_eal/common/eal_common_dynmem.c
@@ -304,6 +304,10 @@ eal_dynmem_hugepage_init(void)
needed = num_pages - num_pages_alloc;
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 */
cur_pages = eal_memalloc_alloc_seg_bulk(pages,
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:41.797744959 +0000
+++ 0104-mem-check-allocation-in-dynamic-hugepage-init.patch 2022-02-18 12:37:37.834795136 +0000
@@ -1 +1 @@
-From 5f69ebbd85300a197bbe9e6a630642352f5aba39 Mon Sep 17 00:00:00 2001
+From 1b84be5c00418b3fc97988c8e3d5bfaaef8c3cde Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5f69ebbd85300a197bbe9e6a630642352f5aba39 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -15 +16 @@
- lib/eal/common/eal_common_dynmem.c | 4 ++++
+ lib/librte_eal/common/eal_common_dynmem.c | 4 ++++
@@ -18 +19 @@
-diff --git a/lib/eal/common/eal_common_dynmem.c b/lib/eal/common/eal_common_dynmem.c
+diff --git a/lib/librte_eal/common/eal_common_dynmem.c b/lib/librte_eal/common/eal_common_dynmem.c
@@ -20,2 +21,2 @@
---- a/lib/eal/common/eal_common_dynmem.c
-+++ b/lib/eal/common/eal_common_dynmem.c
+--- a/lib/librte_eal/common/eal_common_dynmem.c
++++ b/lib/librte_eal/common/eal_common_dynmem.c
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'app/fib: fix division by zero' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (102 preceding siblings ...)
2022-02-18 12:39 ` patch 'mem: check allocation in dynamic hugepage init' " luca.boccassi
@ 2022-02-18 12:39 ` luca.boccassi
2022-02-18 12:39 ` patch 'test/mbuf: fix mbuf data content check' " luca.boccassi
` (18 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:39 UTC (permalink / raw)
To: Vladimir Medvedkin; +Cc: Kevin Traynor, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/32d2194f4f405db4a046200ce0ffa4fd2372377a
Thanks.
Luca Boccassi
---
From 32d2194f4f405db4a046200ce0ffa4fd2372377a 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 ebf37652ab..17569ece07 100644
--- a/app/test-fib/main.c
+++ b/app/test-fib/main.c
@@ -711,6 +711,10 @@ parse_opts(int argc, char **argv)
print_usage();
rte_exit(-EINVAL, "Invalid option -n\n");
}
+
+ if (config.nb_routes < config.print_fract)
+ config.print_fract = config.nb_routes;
+
break;
case 'd':
distrib_string = optarg;
@@ -1240,6 +1244,10 @@ main(int argc, char **argv)
config.nb_routes = 0;
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.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:41.828601943 +0000
+++ 0105-app-fib-fix-division-by-zero.patch 2022-02-18 12:37:37.838795226 +0000
@@ -1 +1 @@
-From a01070dac90b76f735e3c8805c3b78357b078518 Mon Sep 17 00:00:00 2001
+From 32d2194f4f405db4a046200ce0ffa4fd2372377a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a01070dac90b76f735e3c8805c3b78357b078518 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 622703dce8..830c32cc44 100644
+index ebf37652ab..17569ece07 100644
@@ -38 +39 @@
-@@ -1242,6 +1246,10 @@ main(int argc, char **argv)
+@@ -1240,6 +1244,10 @@ main(int argc, char **argv)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'test/mbuf: fix mbuf data content check' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (103 preceding siblings ...)
2022-02-18 12:39 ` patch 'app/fib: fix division by zero' " luca.boccassi
@ 2022-02-18 12:39 ` luca.boccassi
2022-02-18 12:39 ` patch 'ipc: end multiprocess thread during cleanup' " luca.boccassi
` (17 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:39 UTC (permalink / raw)
To: David Marchand; +Cc: Olivier Matz, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b8e818df2acd8e7f4ee2e8ca8edfb24bb7f1c7ea
Thanks.
Luca Boccassi
---
From b8e818df2acd8e7f4ee2e8ca8edfb24bb7f1c7ea 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 1bfaa029ba..f0dd693e94 100644
--- a/app/test/test_mbuf.c
+++ b/app/test/test_mbuf.c
@@ -2030,8 +2030,6 @@ test_pktmbuf_read_from_offset(struct rte_mempool *pktmbuf_pool)
NULL);
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)
GOTO_FAIL("Data corrupted at offset %u", off);
@@ -2053,8 +2051,6 @@ test_pktmbuf_read_from_offset(struct rte_mempool *pktmbuf_pool)
data_copy = rte_pktmbuf_read(m, hdr_len, 0, NULL);
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)
GOTO_FAIL("Data corrupted at offset %u", off);
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:41.860460623 +0000
+++ 0106-test-mbuf-fix-mbuf-data-content-check.patch 2022-02-18 12:37:37.838795226 +0000
@@ -1 +1 @@
-From 985571b6b41ec49552b3d91c20060236c7c0fecb Mon Sep 17 00:00:00 2001
+From b8e818df2acd8e7f4ee2e8ca8edfb24bb7f1c7ea 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 1bfaa029ba..f0dd693e94 100644
@@ -31 +32 @@
-@@ -2042,8 +2042,6 @@ test_pktmbuf_read_from_offset(struct rte_mempool *pktmbuf_pool)
+@@ -2030,8 +2030,6 @@ test_pktmbuf_read_from_offset(struct rte_mempool *pktmbuf_pool)
@@ -40 +41 @@
-@@ -2065,8 +2063,6 @@ test_pktmbuf_read_from_offset(struct rte_mempool *pktmbuf_pool)
+@@ -2053,8 +2051,6 @@ test_pktmbuf_read_from_offset(struct rte_mempool *pktmbuf_pool)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'ipc: end multiprocess thread during cleanup' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (104 preceding siblings ...)
2022-02-18 12:39 ` patch 'test/mbuf: fix mbuf data content check' " luca.boccassi
@ 2022-02-18 12:39 ` luca.boccassi
2022-02-18 12:39 ` patch 'vfio: cleanup the multiprocess sync handle' " luca.boccassi
` (16 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:39 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Anatoly Burakov, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/184d1f7ae077a91a0ec4e4bf12b17b1a15bf126d
Thanks.
Luca Boccassi
---
From 184d1f7ae077a91a0ec4e4bf12b17b1a15bf126d 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/librte_eal/common/eal_common_proc.c | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/lib/librte_eal/common/eal_common_proc.c b/lib/librte_eal/common/eal_common_proc.c
index ebd0f6673b..b33d58ea0a 100644
--- a/lib/librte_eal/common/eal_common_proc.c
+++ b/lib/librte_eal/common/eal_common_proc.c
@@ -282,8 +282,17 @@ read_msg(struct mp_msg_internal *m, struct sockaddr_un *s)
msgh.msg_control = control;
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;
}
@@ -311,7 +320,7 @@ read_msg(struct mp_msg_internal *m, struct sockaddr_un *s)
RTE_LOG(ERR, EAL, "invalid received data length\n");
return -1;
}
- return 0;
+ return msglen;
}
static void
@@ -385,8 +394,13 @@ mp_handle(void *arg __rte_unused)
struct sockaddr_un sa;
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);
}
return NULL;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:41.893601203 +0000
+++ 0107-ipc-end-multiprocess-thread-during-cleanup.patch 2022-02-18 12:37:37.842795315 +0000
@@ -1 +1 @@
-From 6e858b4d9244cf53505589673755ab18ac2a4a83 Mon Sep 17 00:00:00 2001
+From 184d1f7ae077a91a0ec4e4bf12b17b1a15bf126d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6e858b4d9244cf53505589673755ab18ac2a4a83 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
- lib/eal/common/eal_common_proc.c | 20 +++++++++++++++++---
+ lib/librte_eal/common/eal_common_proc.c | 20 +++++++++++++++++---
@@ -23 +24 @@
-diff --git a/lib/eal/common/eal_common_proc.c b/lib/eal/common/eal_common_proc.c
+diff --git a/lib/librte_eal/common/eal_common_proc.c b/lib/librte_eal/common/eal_common_proc.c
@@ -25,2 +26,2 @@
---- a/lib/eal/common/eal_common_proc.c
-+++ b/lib/eal/common/eal_common_proc.c
+--- a/lib/librte_eal/common/eal_common_proc.c
++++ b/lib/librte_eal/common/eal_common_proc.c
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'vfio: cleanup the multiprocess sync handle' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (105 preceding siblings ...)
2022-02-18 12:39 ` patch 'ipc: end multiprocess thread during cleanup' " luca.boccassi
@ 2022-02-18 12:39 ` luca.boccassi
2022-02-18 12:39 ` patch 'net/memif: remove pointer deference before null check' " luca.boccassi
` (15 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:39 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Anatoly Burakov, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/468cbff3fee4060264ea8e64385d722bfcebca17
Thanks.
Luca Boccassi
---
From 468cbff3fee4060264ea8e64385d722bfcebca17 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/librte_eal/linux/eal.c | 4 ++++
lib/librte_eal/linux/eal_vfio.h | 1 +
lib/librte_eal/linux/eal_vfio_mp_sync.c | 8 ++++++++
3 files changed, 13 insertions(+)
diff --git a/lib/librte_eal/linux/eal.c b/lib/librte_eal/linux/eal.c
index 814572ccbd..5814f9ce69 100644
--- a/lib/librte_eal/linux/eal.c
+++ b/lib/librte_eal/linux/eal.c
@@ -1360,7 +1360,11 @@ 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();
rte_trace_save();
eal_trace_fini();
diff --git a/lib/librte_eal/linux/eal_vfio.h b/lib/librte_eal/linux/eal_vfio.h
index c5d5f70548..bba5c7afa5 100644
--- a/lib/librte_eal/linux/eal_vfio.h
+++ b/lib/librte_eal/linux/eal_vfio.h
@@ -133,6 +133,7 @@ int
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/librte_eal/linux/eal_vfio_mp_sync.c b/lib/librte_eal/linux/eal_vfio_mp_sync.c
index a2accfab3a..d12bbaee64 100644
--- a/lib/librte_eal/linux/eal_vfio_mp_sync.c
+++ b/lib/librte_eal/linux/eal_vfio_mp_sync.c
@@ -120,4 +120,12 @@ vfio_mp_sync_setup(void)
return 0;
}
+void
+vfio_mp_sync_cleanup(void)
+{
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return;
+
+ rte_mp_action_unregister(EAL_VFIO_MP);
+}
#endif
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:41.925327243 +0000
+++ 0108-vfio-cleanup-the-multiprocess-sync-handle.patch 2022-02-18 12:37:37.842795315 +0000
@@ -1 +1 @@
-From 6412941ae8d183ead5720f06cd2616f7c523f6a8 Mon Sep 17 00:00:00 2001
+From 468cbff3fee4060264ea8e64385d722bfcebca17 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6412941ae8d183ead5720f06cd2616f7c523f6a8 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -15,3 +16,3 @@
- lib/eal/linux/eal.c | 4 ++++
- lib/eal/linux/eal_vfio.h | 1 +
- lib/eal/linux/eal_vfio_mp_sync.c | 8 ++++++++
+ lib/librte_eal/linux/eal.c | 4 ++++
+ lib/librte_eal/linux/eal_vfio.h | 1 +
+ lib/librte_eal/linux/eal_vfio_mp_sync.c | 8 ++++++++
@@ -20,7 +21,7 @@
-diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c
-index fad062a2dd..d77cd871be 100644
---- a/lib/eal/linux/eal.c
-+++ b/lib/eal/linux/eal.c
-@@ -1276,7 +1276,11 @@ rte_eal_cleanup(void)
- if (rte_eal_process_type() == RTE_PROC_PRIMARY &&
- internal_conf->hugepage_file.unlink_existing)
+diff --git a/lib/librte_eal/linux/eal.c b/lib/librte_eal/linux/eal.c
+index 814572ccbd..5814f9ce69 100644
+--- a/lib/librte_eal/linux/eal.c
++++ b/lib/librte_eal/linux/eal.c
+@@ -1360,7 +1360,11 @@ rte_eal_cleanup(void)
+
+ if (rte_eal_process_type() == RTE_PROC_PRIMARY)
@@ -34,3 +35,3 @@
- /* after this point, any DPDK pointers will become dangling */
- rte_eal_memory_detach();
-diff --git a/lib/eal/linux/eal_vfio.h b/lib/eal/linux/eal_vfio.h
+ rte_trace_save();
+ eal_trace_fini();
+diff --git a/lib/librte_eal/linux/eal_vfio.h b/lib/librte_eal/linux/eal_vfio.h
@@ -38,2 +39,2 @@
---- a/lib/eal/linux/eal_vfio.h
-+++ b/lib/eal/linux/eal_vfio.h
+--- a/lib/librte_eal/linux/eal_vfio.h
++++ b/lib/librte_eal/linux/eal_vfio.h
@@ -48 +49 @@
-diff --git a/lib/eal/linux/eal_vfio_mp_sync.c b/lib/eal/linux/eal_vfio_mp_sync.c
+diff --git a/lib/librte_eal/linux/eal_vfio_mp_sync.c b/lib/librte_eal/linux/eal_vfio_mp_sync.c
@@ -50,2 +51,2 @@
---- a/lib/eal/linux/eal_vfio_mp_sync.c
-+++ b/lib/eal/linux/eal_vfio_mp_sync.c
+--- a/lib/librte_eal/linux/eal_vfio_mp_sync.c
++++ b/lib/librte_eal/linux/eal_vfio_mp_sync.c
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/memif: remove pointer deference before null check' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (106 preceding siblings ...)
2022-02-18 12:39 ` patch 'vfio: cleanup the multiprocess sync handle' " luca.boccassi
@ 2022-02-18 12:39 ` luca.boccassi
2022-02-18 12:39 ` patch 'net/sfc: do not push fast free offload to default TxQ config' " luca.boccassi
` (14 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:39 UTC (permalink / raw)
To: Weiguo Li; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/3915e71a30b0c5740c878003d172e8b4e5041eeb
Thanks.
Luca Boccassi
---
From 3915e71a30b0c5740c878003d172e8b4e5041eeb 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 16c6efee33..1a4eccaf10 100644
--- a/drivers/net/memif/memif_socket.c
+++ b/drivers/net/memif/memif_socket.c
@@ -396,11 +396,10 @@ 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;
i->version = MEMIF_VERSION;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:41.957571245 +0000
+++ 0109-net-memif-remove-pointer-deference-before-null-check.patch 2022-02-18 12:37:37.842795315 +0000
@@ -1 +1 @@
-From b6c0f464affcf0ec6fcf0a26e517692dc08244f4 Mon Sep 17 00:00:00 2001
+From 3915e71a30b0c5740c878003d172e8b4e5041eeb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b6c0f464affcf0ec6fcf0a26e517692dc08244f4 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 42f48a68a1..7886644412 100644
+index 16c6efee33..1a4eccaf10 100644
@@ -22 +23 @@
-@@ -402,11 +402,10 @@ memif_msg_enq_init(struct rte_eth_dev *dev)
+@@ -396,11 +396,10 @@ memif_msg_enq_init(struct rte_eth_dev *dev)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/sfc: do not push fast free offload to default TxQ config' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (107 preceding siblings ...)
2022-02-18 12:39 ` patch 'net/memif: remove pointer deference before null check' " luca.boccassi
@ 2022-02-18 12:39 ` luca.boccassi
2022-02-18 12:39 ` patch 'net/sfc: demand Tx fast free offload on EF10 simple datapath' " luca.boccassi
` (13 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:39 UTC (permalink / raw)
To: Ivan Malov; +Cc: Andrew Rybchenko, Andy Moreton, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/964a78f4be1e1e5be526541d8f1e00494946f641
Thanks.
Luca Boccassi
---
From 964a78f4be1e1e5be526541d8f1e00494946f641 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 7c2bf78da0..1b02759f93 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -86,7 +86,6 @@ sfc_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
struct sfc_adapter *sa = sfc_adapter_by_eth_dev(dev);
struct sfc_rss *rss = &sas->rss;
struct sfc_mae *mae = &sa->mae;
- uint64_t txq_offloads_def = 0;
sfc_log_init(sa, "entry");
@@ -138,11 +137,6 @@ sfc_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
dev_info->tx_offload_capa = sfc_tx_get_dev_offload_caps(sa) |
dev_info->tx_queue_offload_capa;
- if (dev_info->tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
- txq_offloads_def |= DEV_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;
unsigned int i;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:41.988873671 +0000
+++ 0110-net-sfc-do-not-push-fast-free-offload-to-default-TxQ.patch 2022-02-18 12:37:37.846795404 +0000
@@ -1 +1 @@
-From f67615ea626e23e61b71d27f894fe9a4ef716df3 Mon Sep 17 00:00:00 2001
+From 964a78f4be1e1e5be526541d8f1e00494946f641 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 7c2bf78da0..1b02759f93 100644
@@ -27 +28 @@
-@@ -94,7 +94,6 @@ sfc_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
+@@ -86,7 +86,6 @@ sfc_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
@@ -35 +36 @@
-@@ -146,11 +145,6 @@ sfc_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
+@@ -138,11 +137,6 @@ sfc_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
@@ -39,2 +40,2 @@
-- if (dev_info->tx_offload_capa & RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE)
-- txq_offloads_def |= RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE;
+- if (dev_info->tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
+- txq_offloads_def |= DEV_TX_OFFLOAD_MBUF_FAST_FREE;
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/sfc: demand Tx fast free offload on EF10 simple datapath' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (108 preceding siblings ...)
2022-02-18 12:39 ` patch 'net/sfc: do not push fast free offload to default TxQ config' " luca.boccassi
@ 2022-02-18 12:39 ` luca.boccassi
2022-02-18 12:39 ` patch 'net/iavf: count continuous DD bits for Arm' " luca.boccassi
` (12 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:39 UTC (permalink / raw)
To: Ivan Malov; +Cc: Andrew Rybchenko, Andy Moreton, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/813b5994cfcbbbe75eaf9ed25918979e0fd74cf9
Thanks.
Luca Boccassi
---
From 813b5994cfcbbbe75eaf9ed25918979e0fd74cf9 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 24602e3d10..7c6bac694d 100644
--- a/drivers/net/sfc/sfc_tx.c
+++ b/drivers/net/sfc/sfc_tx.c
@@ -269,6 +269,7 @@ sfc_tx_qinit_info(struct sfc_adapter *sa, unsigned int sw_index)
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;
switch (txmode->mq_mode) {
@@ -280,6 +281,13 @@ sfc_tx_check_mode(struct sfc_adapter *sa, const struct rte_eth_txmode *txmode)
rc = EINVAL;
}
+ if ((dev_tx_offload_cap & DEV_TX_OFFLOAD_MBUF_FAST_FREE) != 0 &&
+ (txmode->offloads & DEV_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,
* but it does make sense to double-check their absence
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:42.022139407 +0000
+++ 0111-net-sfc-demand-Tx-fast-free-offload-on-EF10-simple-d.patch 2022-02-18 12:37:37.846795404 +0000
@@ -1 +1 @@
-From 24a491bb882a3269b9b4e2754e1d5b43d83b9821 Mon Sep 17 00:00:00 2001
+From 813b5994cfcbbbe75eaf9ed25918979e0fd74cf9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 24a491bb882a3269b9b4e2754e1d5b43d83b9821 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index cd927cf2f7..f376f24f7b 100644
+index 24602e3d10..7c6bac694d 100644
@@ -22 +23 @@
-@@ -308,6 +308,7 @@ sfc_tx_qinit_info(struct sfc_adapter *sa, sfc_sw_index_t sw_index)
+@@ -269,6 +269,7 @@ sfc_tx_qinit_info(struct sfc_adapter *sa, unsigned int sw_index)
@@ -30 +31 @@
-@@ -319,6 +320,13 @@ sfc_tx_check_mode(struct sfc_adapter *sa, const struct rte_eth_txmode *txmode)
+@@ -280,6 +281,13 @@ sfc_tx_check_mode(struct sfc_adapter *sa, const struct rte_eth_txmode *txmode)
@@ -34,2 +35,2 @@
-+ if ((dev_tx_offload_cap & RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE) != 0 &&
-+ (txmode->offloads & RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE) == 0) {
++ if ((dev_tx_offload_cap & DEV_TX_OFFLOAD_MBUF_FAST_FREE) != 0 &&
++ (txmode->offloads & DEV_TX_OFFLOAD_MBUF_FAST_FREE) == 0) {
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/iavf: count continuous DD bits for Arm' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (109 preceding siblings ...)
2022-02-18 12:39 ` patch 'net/sfc: demand Tx fast free offload on EF10 simple datapath' " luca.boccassi
@ 2022-02-18 12:39 ` luca.boccassi
2022-02-18 12:39 ` patch 'net/iavf: count continuous DD bits for Arm in flex Rx' " luca.boccassi
` (11 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:39 UTC (permalink / raw)
To: Kathleen Capella; +Cc: Honnappa Nagarahalli, Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/3152179d55301a71e4157c51debf8cc374be357c
Thanks.
Luca Boccassi
---
From 3152179d55301a71e4157c51debf8cc374be357c 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 8c5bfcecbc..dfc3f906ee 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -1714,7 +1714,7 @@ iavf_rx_scan_hw_ring(struct iavf_rx_queue *rxq)
uint16_t pkt_len;
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;
const uint32_t *ptype_tbl = rxq->vsi->adapter->ptype_tbl;
@@ -1745,9 +1745,27 @@ 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.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:42.053702550 +0000
+++ 0112-net-iavf-count-continuous-DD-bits-for-Arm.patch 2022-02-18 12:37:37.850795494 +0000
@@ -1 +1 @@
-From 3d88d5e401f6d04882415866012a98bced0c3cb8 Mon Sep 17 00:00:00 2001
+From 3152179d55301a71e4157c51debf8cc374be357c 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 8c5bfcecbc..dfc3f906ee 100644
@@ -24 +25 @@
-@@ -1897,7 +1897,7 @@ iavf_rx_scan_hw_ring(struct iavf_rx_queue *rxq)
+@@ -1714,7 +1714,7 @@ iavf_rx_scan_hw_ring(struct iavf_rx_queue *rxq)
@@ -33 +34 @@
-@@ -1928,9 +1928,27 @@ iavf_rx_scan_hw_ring(struct iavf_rx_queue *rxq)
+@@ -1745,9 +1745,27 @@ iavf_rx_scan_hw_ring(struct iavf_rx_queue *rxq)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/iavf: count continuous DD bits for Arm in flex Rx' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (110 preceding siblings ...)
2022-02-18 12:39 ` patch 'net/iavf: count continuous DD bits for Arm' " luca.boccassi
@ 2022-02-18 12:39 ` luca.boccassi
2022-02-18 12:39 ` patch 'net/ice/base: add profile validation on switch filter' " luca.boccassi
` (10 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:39 UTC (permalink / raw)
To: Kathleen Capella; +Cc: Honnappa Nagarahalli, Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/da0833ea1f2be8c1aa0c1f4994486fd76d8d2a74
Thanks.
Luca Boccassi
---
From da0833ea1f2be8c1aa0c1f4994486fd76d8d2a74 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 dfc3f906ee..c2a9c4f37b 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -1637,7 +1637,7 @@ iavf_rx_scan_hw_ring_flex_rxd(struct iavf_rx_queue *rxq)
struct rte_mbuf *mb;
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;
const uint32_t *ptype_tbl = rxq->vsi->adapter->ptype_tbl;
@@ -1662,9 +1662,27 @@ 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.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:42.087784974 +0000
+++ 0113-net-iavf-count-continuous-DD-bits-for-Arm-in-flex-Rx.patch 2022-02-18 12:37:37.854795583 +0000
@@ -1 +1 @@
-From 32e38011fc35625efdd74dc83edf7e53c54ef13e Mon Sep 17 00:00:00 2001
+From da0833ea1f2be8c1aa0c1f4994486fd76d8d2a74 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 dfc3f906ee..c2a9c4f37b 100644
@@ -24 +25 @@
-@@ -1818,7 +1818,7 @@ iavf_rx_scan_hw_ring_flex_rxd(struct iavf_rx_queue *rxq)
+@@ -1637,7 +1637,7 @@ iavf_rx_scan_hw_ring_flex_rxd(struct iavf_rx_queue *rxq)
@@ -33 +34 @@
-@@ -1843,9 +1843,27 @@ iavf_rx_scan_hw_ring_flex_rxd(struct iavf_rx_queue *rxq)
+@@ -1662,9 +1662,27 @@ iavf_rx_scan_hw_ring_flex_rxd(struct iavf_rx_queue *rxq)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/ice/base: add profile validation on switch filter' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (111 preceding siblings ...)
2022-02-18 12:39 ` patch 'net/iavf: count continuous DD bits for Arm in flex Rx' " luca.boccassi
@ 2022-02-18 12:39 ` luca.boccassi
2022-02-18 12:39 ` patch 'net/ice: fix build with 16-byte Rx descriptor' " luca.boccassi
` (9 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:39 UTC (permalink / raw)
To: Yuying Zhang; +Cc: Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/dc92390efe7d705e91aafebc61c50f8897e171df
Thanks.
Luca Boccassi
---
From dc92390efe7d705e91aafebc61c50f8897e171df 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 42eda0b4b4..67afb7bbba 100644
--- a/drivers/net/ice/base/ice_flex_pipe.c
+++ b/drivers/net/ice/base/ice_flex_pipe.c
@@ -1597,8 +1597,12 @@ static enum ice_prof_type
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 &&
fv->ew[i].off == ICE_VNI_OFFSET)
@@ -1613,7 +1617,7 @@ ice_get_sw_prof_type(struct ice_hw *hw, struct ice_fv *fv)
return ICE_PROF_TUN_PPPOE;
}
- return ICE_PROF_NON_TUN;
+ return valid_prof ? ICE_PROF_NON_TUN : ICE_PROF_INVALID;
}
/**
@@ -1630,11 +1634,6 @@ ice_get_sw_fv_bitmap(struct ice_hw *hw, enum ice_prof_type req_profs,
struct ice_seg *ice_seg;
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);
ice_seg = hw->seg;
diff --git a/drivers/net/ice/base/ice_flex_type.h b/drivers/net/ice/base/ice_flex_type.h
index 1dd57baccd..a0030183ac 100644
--- a/drivers/net/ice/base/ice_flex_type.h
+++ b/drivers/net/ice/base/ice_flex_type.h
@@ -779,6 +779,7 @@ struct ice_chs_chg {
#define ICE_FLOW_PTYPE_MAX ICE_XLT1_CNT
enum ice_prof_type {
+ ICE_PROF_INVALID = 0x0,
ICE_PROF_NON_TUN = 0x1,
ICE_PROF_TUN_UDP = 0x2,
ICE_PROF_TUN_GRE = 0x4,
diff --git a/drivers/net/ice/base/ice_protocol_type.h b/drivers/net/ice/base/ice_protocol_type.h
index e8caefd8f9..023d661341 100644
--- a/drivers/net/ice/base/ice_protocol_type.h
+++ b/drivers/net/ice/base/ice_protocol_type.h
@@ -164,6 +164,7 @@ 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
#define ICE_ETYPE_OL_HW 9
diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index 95400dd315..d7a8836293 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -7022,6 +7022,7 @@ ice_get_compat_fv_bitmap(struct ice_hw *hw, struct ice_adv_rule_info *rinfo,
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:
case ICE_SW_TUN_PROFID_MAC_IPV6_L2TPV3:
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:42.122195247 +0000
+++ 0114-net-ice-base-add-profile-validation-on-switch-filter.patch 2022-02-18 12:37:37.866795851 +0000
@@ -1 +1 @@
-From a62f095049900b8148a739ad0a86fbfc32429326 Mon Sep 17 00:00:00 2001
+From dc92390efe7d705e91aafebc61c50f8897e171df Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a62f095049900b8148a739ad0a86fbfc32429326 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 395787806b..f6a29f87c5 100644
+index 42eda0b4b4..67afb7bbba 100644
@@ -28 +29 @@
-@@ -1785,8 +1785,12 @@ static enum ice_prof_type
+@@ -1597,8 +1597,12 @@ static enum ice_prof_type
@@ -41 +42 @@
-@@ -1801,7 +1805,7 @@ ice_get_sw_prof_type(struct ice_hw *hw, struct ice_fv *fv)
+@@ -1613,7 +1617,7 @@ ice_get_sw_prof_type(struct ice_hw *hw, struct ice_fv *fv)
@@ -50 +51 @@
-@@ -1818,11 +1822,6 @@ ice_get_sw_fv_bitmap(struct ice_hw *hw, enum ice_prof_type req_profs,
+@@ -1630,11 +1634,6 @@ ice_get_sw_fv_bitmap(struct ice_hw *hw, enum ice_prof_type req_profs,
@@ -63 +64 @@
-index 59eeca0a30..09a02fe9ac 100644
+index 1dd57baccd..a0030183ac 100644
@@ -66 +67 @@
-@@ -1003,6 +1003,7 @@ struct ice_chs_chg {
+@@ -779,6 +779,7 @@ struct ice_chs_chg {
@@ -75 +76 @@
-index cef8354f77..0e6e5990be 100644
+index e8caefd8f9..023d661341 100644
@@ -78 +79 @@
-@@ -191,6 +191,7 @@ enum ice_prot_id {
+@@ -164,6 +164,7 @@ enum ice_prot_id {
@@ -87 +88 @@
-index 1fee790c25..d4cc664ad7 100644
+index 95400dd315..d7a8836293 100644
@@ -90 +91 @@
-@@ -7779,6 +7779,7 @@ ice_get_compat_fv_bitmap(struct ice_hw *hw, struct ice_adv_rule_info *rinfo,
+@@ -7022,6 +7022,7 @@ ice_get_compat_fv_bitmap(struct ice_hw *hw, struct ice_adv_rule_info *rinfo,
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/ice: fix build with 16-byte Rx descriptor' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (112 preceding siblings ...)
2022-02-18 12:39 ` patch 'net/ice/base: add profile validation on switch filter' " luca.boccassi
@ 2022-02-18 12:39 ` luca.boccassi
2022-02-18 12:39 ` patch 'net/mlx5: fix committed bucket size' " luca.boccassi
` (8 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:39 UTC (permalink / raw)
To: Yiding Zhou; +Cc: Wei Ling, Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/64d94d1e8f5176865661b12f64e1061c826ccbd8
Thanks.
Luca Boccassi
---
From 64d94d1e8f5176865661b12f64e1061c826ccbd8 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 1fc2bec5d5..97cbeb2cf5 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -129,6 +129,8 @@ ice_rxd_to_pkt_fields_by_comms_aux_v1(struct ice_rx_queue *rxq,
*RTE_NET_ICE_DYNF_PROTO_XTR_METADATA(mb) = metadata;
}
}
+#else
+ RTE_SET_USED(rxq);
#endif
}
@@ -167,6 +169,8 @@ ice_rxd_to_pkt_fields_by_comms_aux_v2(struct ice_rx_queue *rxq,
*RTE_NET_ICE_DYNF_PROTO_XTR_METADATA(mb) = metadata;
}
}
+#else
+ RTE_SET_USED(rxq);
#endif
}
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:42.167382836 +0000
+++ 0115-net-ice-fix-build-with-16-byte-Rx-descriptor.patch 2022-02-18 12:37:37.870795940 +0000
@@ -1 +1 @@
-From 94005e4640a7d1e10e9b6b89e9a31890c578192f Mon Sep 17 00:00:00 2001
+From 64d94d1e8f5176865661b12f64e1061c826ccbd8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 94005e4640a7d1e10e9b6b89e9a31890c578192f ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 58700f1b92..4f218bcd0d 100644
+index 1fc2bec5d5..97cbeb2cf5 100644
@@ -23 +24 @@
-@@ -163,6 +163,8 @@ ice_rxd_to_pkt_fields_by_comms_aux_v1(struct ice_rx_queue *rxq,
+@@ -129,6 +129,8 @@ ice_rxd_to_pkt_fields_by_comms_aux_v1(struct ice_rx_queue *rxq,
@@ -32 +33 @@
-@@ -201,6 +203,8 @@ ice_rxd_to_pkt_fields_by_comms_aux_v2(struct ice_rx_queue *rxq,
+@@ -167,6 +169,8 @@ ice_rxd_to_pkt_fields_by_comms_aux_v2(struct ice_rx_queue *rxq,
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/mlx5: fix committed bucket size' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (113 preceding siblings ...)
2022-02-18 12:39 ` patch 'net/ice: fix build with 16-byte Rx descriptor' " luca.boccassi
@ 2022-02-18 12:39 ` luca.boccassi
2022-02-18 12:39 ` patch 'net/mlx5: fix inline length for multi-segment TSO' " luca.boccassi
` (7 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:39 UTC (permalink / raw)
To: Alexander Kozyrev; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/c45f526d8a32573d326ac0eb77a8625f1ed8ffe6
Thanks.
Luca Boccassi
---
From c45f526d8a32573d326ac0eb77a8625f1ed8ffe6 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 acaca240d0..058d94c9cf 100644
--- a/drivers/net/mlx5/mlx5_flow_meter.c
+++ b/drivers/net/mlx5/mlx5_flow_meter.c
@@ -216,8 +216,10 @@ 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.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:42.201244186 +0000
+++ 0116-net-mlx5-fix-committed-bucket-size.patch 2022-02-18 12:37:37.870795940 +0000
@@ -1 +1 @@
-From 21fdeab422e0edabc6b738f7a0c56dec7e9c374e Mon Sep 17 00:00:00 2001
+From c45f526d8a32573d326ac0eb77a8625f1ed8ffe6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 21fdeab422e0edabc6b738f7a0c56dec7e9c374e ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 0dc7fbfb32..d0f8bcd100 100644
+index acaca240d0..058d94c9cf 100644
@@ -27 +28 @@
-@@ -295,8 +295,10 @@ mlx5_flow_meter_xbs_man_exp_calc(uint64_t xbs, uint8_t *man, uint8_t *exp)
+@@ -216,8 +216,10 @@ mlx5_flow_meter_xbs_man_exp_calc(uint64_t xbs, uint8_t *man, uint8_t *exp)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/mlx5: fix inline length for multi-segment TSO' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (114 preceding siblings ...)
2022-02-18 12:39 ` patch 'net/mlx5: fix committed bucket size' " luca.boccassi
@ 2022-02-18 12:39 ` luca.boccassi
2022-02-18 12:39 ` patch 'net/bnxt: fix ring calculation for representors' " luca.boccassi
` (6 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:39 UTC (permalink / raw)
To: Dariusz Sosnowski; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/c9eb38cd065bfc2cdb9bdefc37863cd37595c1d7
Thanks.
Luca Boccassi
---
From c9eb38cd065bfc2cdb9bdefc37863cd37595c1d7 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_rxtx.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index 5012f2a74f..ba98277cf8 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -3239,7 +3239,6 @@ mlx5_tx_packet_multi_tso(struct mlx5_txq_data *__rte_restrict txq,
inlen <= MLX5_ESEG_MIN_INLINE_SIZE ||
inlen > (dlen + vlan)))
return MLX5_TXCMP_CODE_ERROR;
- MLX5_ASSERT(inlen >= txq->inlen_mode);
/*
* Check whether there are enough free WQEBBs:
* - Control Segment
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:42.232939642 +0000
+++ 0117-net-mlx5-fix-inline-length-for-multi-segment-TSO.patch 2022-02-18 12:37:37.878796119 +0000
@@ -1 +1 @@
-From 864678e420f00225572be476559a087bfecaafbf Mon Sep 17 00:00:00 2001
+From c9eb38cd065bfc2cdb9bdefc37863cd37595c1d7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 864678e420f00225572be476559a087bfecaafbf ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
- drivers/net/mlx5/mlx5_tx.h | 1 -
+ drivers/net/mlx5/mlx5_rxtx.c | 1 -
@@ -24,5 +25,5 @@
-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
-@@ -1710,7 +1710,6 @@ mlx5_tx_packet_multi_tso(struct mlx5_txq_data *__rte_restrict txq,
+diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
+index 5012f2a74f..ba98277cf8 100644
+--- a/drivers/net/mlx5/mlx5_rxtx.c
++++ b/drivers/net/mlx5/mlx5_rxtx.c
+@@ -3239,7 +3239,6 @@ mlx5_tx_packet_multi_tso(struct mlx5_txq_data *__rte_restrict txq,
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/bnxt: fix ring calculation for representors' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (115 preceding siblings ...)
2022-02-18 12:39 ` patch 'net/mlx5: fix inline length for multi-segment TSO' " luca.boccassi
@ 2022-02-18 12:39 ` luca.boccassi
2022-02-18 12:39 ` patch 'compress/octeontx: fix null pointer dereference' " luca.boccassi
` (5 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:39 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: Somnath Kotur, Kalesh AP, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/045d6f7c38225082358a11c79570dd5535197482
Thanks.
Luca Boccassi
---
From 045d6f7c38225082358a11c79570dd5535197482 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 b1ed54dd35..30265d245b 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -798,7 +798,7 @@ struct bnxt {
uint16_t max_rx_rings;
#define MAX_STINGRAY_RINGS 128U
-#define BNXT_MAX_VF_REP_RINGS 8
+#define BNXT_MAX_VF_REP_RINGS 8U
uint16_t max_nq_rings;
uint16_t max_l2_ctx;
diff --git a/drivers/net/bnxt/bnxt_reps.c b/drivers/net/bnxt/bnxt_reps.c
index db780c3d2c..b35c54fe13 100644
--- a/drivers/net/bnxt/bnxt_reps.c
+++ b/drivers/net/bnxt/bnxt_reps.c
@@ -523,7 +523,10 @@ int bnxt_rep_dev_info_get_op(struct rte_eth_dev *eth_dev,
dev_info->max_mac_addrs = parent_bp->max_l2_ctx;
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;
dev_info->max_tx_queues = max_rx_rings;
@@ -603,10 +606,10 @@ int bnxt_rep_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
struct rte_mbuf **buf_ring;
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;
}
@@ -702,10 +705,10 @@ int bnxt_rep_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
struct bnxt_tx_queue *parent_txq, *txq;
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;
}
@@ -777,10 +780,10 @@ int bnxt_rep_stats_get_op(struct rte_eth_dev *eth_dev,
struct rte_eth_stats *stats)
{
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];
stats->ibytes += rep_bp->rx_bytes[i];
@@ -800,9 +803,9 @@ int bnxt_rep_stats_get_op(struct rte_eth_dev *eth_dev,
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;
rep_bp->rx_pkts[i] = 0;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:42.266148105 +0000
+++ 0118-net-bnxt-fix-ring-calculation-for-representors.patch 2022-02-18 12:37:37.878796119 +0000
@@ -1 +1 @@
-From 59e62818877aa45c0066743470192c317670678c Mon Sep 17 00:00:00 2001
+From 045d6f7c38225082358a11c79570dd5535197482 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 59e62818877aa45c0066743470192c317670678c ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index 433f1c80be..0cbb58b2cf 100644
+index b1ed54dd35..30265d245b 100644
@@ -32,2 +33 @@
-@@ -831,7 +831,7 @@ struct bnxt {
- uint16_t max_tx_rings;
+@@ -798,7 +798,7 @@ struct bnxt {
@@ -35 +35,2 @@
- #define MAX_STINGRAY_RINGS 236U
+ #define MAX_STINGRAY_RINGS 128U
+
@@ -42 +43 @@
-index 5e140f0cdb..e773932681 100644
+index db780c3d2c..b35c54fe13 100644
@@ -45 +46 @@
-@@ -548,7 +548,10 @@ int bnxt_rep_dev_info_get_op(struct rte_eth_dev *eth_dev,
+@@ -523,7 +523,10 @@ int bnxt_rep_dev_info_get_op(struct rte_eth_dev *eth_dev,
@@ -57 +58 @@
-@@ -629,10 +632,10 @@ int bnxt_rep_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
+@@ -603,10 +606,10 @@ int bnxt_rep_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
@@ -70 +71 @@
-@@ -729,10 +732,10 @@ int bnxt_rep_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
+@@ -702,10 +705,10 @@ int bnxt_rep_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
@@ -83 +84 @@
-@@ -805,10 +808,10 @@ int bnxt_rep_stats_get_op(struct rte_eth_dev *eth_dev,
+@@ -777,10 +780,10 @@ int bnxt_rep_stats_get_op(struct rte_eth_dev *eth_dev,
@@ -96 +97 @@
-@@ -828,9 +831,9 @@ int bnxt_rep_stats_get_op(struct rte_eth_dev *eth_dev,
+@@ -800,9 +803,9 @@ int bnxt_rep_stats_get_op(struct rte_eth_dev *eth_dev,
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'compress/octeontx: fix null pointer dereference' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (116 preceding siblings ...)
2022-02-18 12:39 ` patch 'net/bnxt: fix ring calculation for representors' " luca.boccassi
@ 2022-02-18 12:39 ` luca.boccassi
2022-02-18 12:39 ` patch 'crypto/dpaax_sec: fix auth/cipher xform chain checks' " luca.boccassi
` (4 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:39 UTC (permalink / raw)
To: Weiguo Li; +Cc: Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/bdd4b322cf9b8575364d889fb508e3bd4ab6c05c
Thanks.
Luca Boccassi
---
From bdd4b322cf9b8575364d889fb508e3bd4ab6c05c 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 bee90fc7cd..ff40968244 100644
--- a/drivers/compress/octeontx/otx_zip_pmd.c
+++ b/drivers/compress/octeontx/otx_zip_pmd.c
@@ -392,6 +392,8 @@ 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",
dev->data->dev_id, qp_id);
@@ -399,8 +401,10 @@ zip_pmd_qp_setup(struct rte_compressdev *dev, uint16_t qp_id,
/* Allocate the queue pair data structure. */
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.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:42.297298659 +0000
+++ 0119-compress-octeontx-fix-null-pointer-dereference.patch 2022-02-18 12:37:37.882796208 +0000
@@ -1 +1 @@
-From b072930fb10a0471d69db5de341ea87a0d1561cc Mon Sep 17 00:00:00 2001
+From bdd4b322cf9b8575364d889fb508e3bd4ab6c05c 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 bee90fc7cd..ff40968244 100644
@@ -22 +23 @@
-@@ -391,6 +391,8 @@ zip_pmd_qp_setup(struct rte_compressdev *dev, uint16_t qp_id,
+@@ -392,6 +392,8 @@ zip_pmd_qp_setup(struct rte_compressdev *dev, uint16_t qp_id,
@@ -31 +32 @@
-@@ -398,8 +400,10 @@ zip_pmd_qp_setup(struct rte_compressdev *dev, uint16_t qp_id,
+@@ -399,8 +401,10 @@ zip_pmd_qp_setup(struct rte_compressdev *dev, uint16_t qp_id,
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'crypto/dpaax_sec: fix auth/cipher xform chain checks' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (117 preceding siblings ...)
2022-02-18 12:39 ` patch 'compress/octeontx: fix null pointer dereference' " luca.boccassi
@ 2022-02-18 12:39 ` luca.boccassi
2022-02-18 12:39 ` patch 'raw/ntb: clear all valid doorbell bits on init' " luca.boccassi
` (3 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:39 UTC (permalink / raw)
To: Hemant Agrawal; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/cf9be042906ea3717203f1f07d7ba9aeac0f0a12
Thanks.
Luca Boccassi
---
From cf9be042906ea3717203f1f07d7ba9aeac0f0a12 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/dpaa_sec/dpaa_sec.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 94c3a4bbca..9179cccf83 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -2881,11 +2881,13 @@ dpaa_sec_set_pdcp_session(struct rte_cryptodev *dev,
/* find xfrm types */
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 {
DPAA_SEC_ERR("Invalid crypto type");
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:42.327925990 +0000
+++ 0120-crypto-dpaax_sec-fix-auth-cipher-xform-chain-checks.patch 2022-02-18 12:37:37.882796208 +0000
@@ -1 +1 @@
-From 99cc26f6652caa2c779fd169cadd62a1c365d52f Mon Sep 17 00:00:00 2001
+From cf9be042906ea3717203f1f07d7ba9aeac0f0a12 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 99cc26f6652caa2c779fd169cadd62a1c365d52f ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -14,3 +15,2 @@
- drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 6 ++++--
- drivers/crypto/dpaa_sec/dpaa_sec.c | 6 ++++--
- 2 files changed, 8 insertions(+), 4 deletions(-)
+ drivers/crypto/dpaa_sec/dpaa_sec.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
@@ -18,22 +17,0 @@
-diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
-index 444e1f0043..cb8aaf6446 100644
---- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
-+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
-@@ -3231,13 +3231,15 @@ dpaa2_sec_set_pdcp_session(struct rte_cryptodev *dev,
- /* find xfrm types */
- 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;
- }
- } 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;
- }
@@ -41 +19 @@
-index 1137b142e9..75e437f696 100644
+index 94c3a4bbca..9179cccf83 100644
@@ -44 +22 @@
-@@ -2984,11 +2984,13 @@ dpaa_sec_set_pdcp_session(struct rte_cryptodev *dev,
+@@ -2881,11 +2881,13 @@ dpaa_sec_set_pdcp_session(struct rte_cryptodev *dev,
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'raw/ntb: clear all valid doorbell bits on init' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (118 preceding siblings ...)
2022-02-18 12:39 ` patch 'crypto/dpaax_sec: fix auth/cipher xform chain checks' " luca.boccassi
@ 2022-02-18 12:39 ` luca.boccassi
2022-02-18 12:39 ` patch 'kni: update kernel API to set random MAC address' " luca.boccassi
` (2 subsequent siblings)
122 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:39 UTC (permalink / raw)
To: Junfeng Guo; +Cc: Jingjing Wu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/105b5a413059ab8b134858be1b8d7fe53847bb44
Thanks.
Luca Boccassi
---
From 105b5a413059ab8b134858be1b8d7fe53847bb44 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 6703bb5d08..4e22fb3733 100644
--- a/drivers/raw/ntb/ntb.c
+++ b/drivers/raw/ntb/ntb.c
@@ -1401,6 +1401,10 @@ 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;
/* Register callback func to eal lib */
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-18 12:37:42.363815423 +0000
+++ 0121-raw-ntb-clear-all-valid-doorbell-bits-on-init.patch 2022-02-18 12:37:37.886796297 +0000
@@ -1 +1 @@
-From 3bc814fc555d8c7d1c7c63e1e831e9c34679837f Mon Sep 17 00:00:00 2001
+From 105b5a413059ab8b134858be1b8d7fe53847bb44 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3bc814fc555d8c7d1c7c63e1e831e9c34679837f ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 46ac02e5ab..f5e773c53b 100644
+index 6703bb5d08..4e22fb3733 100644
@@ -24 +25 @@
-@@ -1398,6 +1398,10 @@ ntb_init_hw(struct rte_rawdev *dev, struct rte_pci_device *pci_dev)
+@@ -1401,6 +1401,10 @@ ntb_init_hw(struct rte_rawdev *dev, struct rte_pci_device *pci_dev)
@@ -33 +34 @@
- intr_handle = pci_dev->intr_handle;
+ intr_handle = &pci_dev->intr_handle;
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'kni: update kernel API to set random MAC address' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (119 preceding siblings ...)
2022-02-18 12:39 ` patch 'raw/ntb: clear all valid doorbell bits on init' " luca.boccassi
@ 2022-02-18 12:39 ` luca.boccassi
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
2022-03-09 16:30 ` patch 'app/compress-perf: fix cycle count operations allocation' " luca.boccassi
2022-03-15 13:32 ` patch 'vhost: fix queue number check when setting inflight FD' " luca.boccassi
122 siblings, 1 reply; 228+ messages in thread
From: luca.boccassi @ 2022-02-18 12:39 UTC (permalink / raw)
To: Ferruh Yigit; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
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/20/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/2bc455ec39e1b2a2d949b926039311966b3317d7
Thanks.
Luca Boccassi
---
From 2bc455ec39e1b2a2d949b926039311966b3317d7 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Wed, 3 Nov 2021 12:59:50 +0000
Subject: [PATCH] kni: update kernel API to set random MAC address
[ backported from upstream commit e6cbfd9bf30bbc4170fe8c7c04a16d9cf795fb90 ]
Previously used 'random_ether_addr()' API is removed in upstream kernel
with commit
Commit ba530fea8ca1 ("ethernet: remove random_ether_addr()")
Replacement API 'eth_random_addr()' is around since v3.6 [1], so
simply switching to this API without any version checks.
[1]
0a4dd594982a ("etherdevice: Rename random_ether_addr to eth_random_addr")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
kernel/linux/kni/kni_misc.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/kernel/linux/kni/kni_misc.c b/kernel/linux/kni/kni_misc.c
index c8da5805c0..cc5172fefc 100644
--- a/kernel/linux/kni/kni_misc.c
+++ b/kernel/linux/kni/kni_misc.c
@@ -403,11 +403,8 @@ kni_ioctl_create(struct net *net, uint32_t ioctl_num,
if (is_valid_ether_addr(dev_info.mac_addr))
memcpy(net_dev->dev_addr, dev_info.mac_addr, ETH_ALEN);
else
- /*
- * Generate random mac address. eth_random_addr() is the
- * newer version of generating mac address in kernel.
- */
- random_ether_addr(net_dev->dev_addr);
+ /* Generate random MAC address. */
+ eth_random_addr(net_dev->dev_addr);
if (dev_info.mtu)
net_dev->mtu = dev_info.mtu;
--
2.30.2
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'eventdev/eth_tx: fix queue add error code' has been queued to stable release 20.11.5
2022-02-18 12:39 ` patch 'kni: update kernel API to set random MAC address' " luca.boccassi
@ 2022-02-28 21:19 ` luca.boccassi
2022-02-28 21:19 ` patch 'eal: add missing C++ guards' " luca.boccassi
` (49 more replies)
0 siblings, 50 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:19 UTC (permalink / raw)
To: Naga Harish K S V; +Cc: Jay Jayatheerthan, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/5d76457095c13677bfab501a3488de0c2bb5fa2e
Thanks.
Luca Boccassi
---
From 5d76457095c13677bfab501a3488de0c2bb5fa2e 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/librte_eventdev/rte_event_eth_tx_adapter.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.c b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
index 2684eb4308..21155362f9 100644
--- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c
+++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
@@ -760,10 +760,8 @@ 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);
if (ret)
@@ -775,6 +773,8 @@ 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;
txa_retry->id = txa->id;
@@ -790,6 +790,10 @@ txa_service_queue_add(uint8_t id,
tdi->nb_queues++;
txa->nb_queues++;
+ret_unlock:
+ rte_spinlock_unlock(&txa->tx_lock);
+ return 0;
+
err_unlock:
if (txa->nb_queues == 0) {
txa_service_queue_array_free(txa,
@@ -798,7 +802,7 @@ err_unlock:
}
rte_spinlock_unlock(&txa->tx_lock);
- return 0;
+ return -1;
}
static int
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:54.121594598 +0000
+++ 0001-eventdev-eth_tx-fix-queue-add-error-code.patch 2022-02-28 21:17:53.776927828 +0000
@@ -1 +1 @@
-From bd0a32d14b87661c39130d73ab4323247b80f864 Mon Sep 17 00:00:00 2001
+From 5d76457095c13677bfab501a3488de0c2bb5fa2e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bd0a32d14b87661c39130d73ab4323247b80f864 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -16 +17 @@
- lib/eventdev/rte_event_eth_tx_adapter.c | 14 +++++++++-----
+ lib/librte_eventdev/rte_event_eth_tx_adapter.c | 14 +++++++++-----
@@ -19,5 +20,5 @@
-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
-@@ -806,10 +806,8 @@ txa_service_queue_add(uint8_t id,
+diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.c b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
+index 2684eb4308..21155362f9 100644
+--- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c
++++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
+@@ -760,10 +760,8 @@ txa_service_queue_add(uint8_t id,
@@ -36 +37 @@
-@@ -821,6 +819,8 @@ txa_service_queue_add(uint8_t id,
+@@ -775,6 +773,8 @@ txa_service_queue_add(uint8_t id,
@@ -45 +46 @@
-@@ -836,6 +836,10 @@ txa_service_queue_add(uint8_t id,
+@@ -790,6 +790,10 @@ txa_service_queue_add(uint8_t id,
@@ -56 +57 @@
-@@ -844,7 +848,7 @@ err_unlock:
+@@ -798,7 +802,7 @@ err_unlock:
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'eal: add missing C++ guards' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
@ 2022-02-28 21:19 ` luca.boccassi
2022-02-28 21:19 ` patch 'telemetry: " luca.boccassi
` (48 subsequent siblings)
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:19 UTC (permalink / raw)
To: Brian Dooley; +Cc: Bruce Richardson, Tyler Retzlaff, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/2c2d7d7af165285a559ea2d92923f22bce2d97b2
Thanks.
Luca Boccassi
---
From 2c2d7d7af165285a559ea2d92923f22bce2d97b2 Mon Sep 17 00:00:00 2001
From: Brian Dooley <brian.dooley@intel.com>
Date: Wed, 16 Feb 2022 15:14:46 +0000
Subject: [PATCH] eal: add missing C++ guards
[ upstream commit d7e9c02ccad8928b6b804049ced9a3ce6172d81e ]
Some public header files were missing 'extern "C"' C++ guards,
and couldn't be used by C++ applications. Add the missing guards.
Fixes: af75078fece3 ("first public release")
Fixes: 7f3aa0863903 ("eal: introduce bit operations API")
Fixes: 166a743c53fa ("compat: add infrastructure to support symbol versioning")
Fixes: 8f40ee0734c8 ("eal/x86: get hypervisor name")
Fixes: 75583b0d1efd ("eal: add keep alive monitoring")
Fixes: 88701645c98c ("eal: move interrupt type out of igb_uio")
Fixes: f04519d8092e ("lib: add missing include dependencies")
Fixes: f58880682c81 ("trace: implement register API")
Fixes: 428eb983f5f7 ("eal: add OS specific header file")
Signed-off-by: Brian Dooley <brian.dooley@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
lib/librte_eal/include/rte_bitops.h | 8 ++++++++
lib/librte_eal/include/rte_branch_prediction.h | 8 ++++++++
lib/librte_eal/include/rte_compat.h | 8 ++++++++
lib/librte_eal/include/rte_hypervisor.h | 8 ++++++++
lib/librte_eal/include/rte_keepalive.h | 8 ++++++++
lib/librte_eal/include/rte_pci_dev_feature_defs.h | 8 ++++++++
lib/librte_eal/include/rte_pci_dev_features.h | 8 ++++++++
lib/librte_eal/include/rte_time.h | 8 ++++++++
lib/librte_eal/include/rte_trace_point_register.h | 8 ++++++++
lib/librte_eal/linux/include/rte_os.h | 8 ++++++++
10 files changed, 80 insertions(+)
diff --git a/lib/librte_eal/include/rte_bitops.h b/lib/librte_eal/include/rte_bitops.h
index 141e8ea730..f50dbe4388 100644
--- a/lib/librte_eal/include/rte_bitops.h
+++ b/lib/librte_eal/include/rte_bitops.h
@@ -17,6 +17,10 @@
#include <rte_debug.h>
#include <rte_compat.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* Get the uint64_t value for a specified bit set.
*
@@ -271,4 +275,8 @@ rte_bit_relaxed_test_and_clear64(unsigned int nr, volatile uint64_t *addr)
return val & mask;
}
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _RTE_BITOPS_H_ */
diff --git a/lib/librte_eal/include/rte_branch_prediction.h b/lib/librte_eal/include/rte_branch_prediction.h
index 854ef9e5dd..0256a9de60 100644
--- a/lib/librte_eal/include/rte_branch_prediction.h
+++ b/lib/librte_eal/include/rte_branch_prediction.h
@@ -10,6 +10,10 @@
#ifndef _RTE_BRANCH_PREDICTION_H_
#define _RTE_BRANCH_PREDICTION_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* Check if a branch is likely to be taken.
*
@@ -38,4 +42,8 @@
#define unlikely(x) __builtin_expect(!!(x), 0)
#endif /* unlikely */
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _RTE_BRANCH_PREDICTION_H_ */
diff --git a/lib/librte_eal/include/rte_compat.h b/lib/librte_eal/include/rte_compat.h
index 2718612cce..a7dbe23449 100644
--- a/lib/librte_eal/include/rte_compat.h
+++ b/lib/librte_eal/include/rte_compat.h
@@ -6,6 +6,10 @@
#ifndef _RTE_COMPAT_H_
#define _RTE_COMPAT_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#ifndef ALLOW_EXPERIMENTAL_API
#define __rte_experimental \
@@ -43,4 +47,8 @@ __attribute__((section(".text.internal")))
#endif
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _RTE_COMPAT_H_ */
diff --git a/lib/librte_eal/include/rte_hypervisor.h b/lib/librte_eal/include/rte_hypervisor.h
index 5fe719c1d4..1666431ce3 100644
--- a/lib/librte_eal/include/rte_hypervisor.h
+++ b/lib/librte_eal/include/rte_hypervisor.h
@@ -5,6 +5,10 @@
#ifndef RTE_HYPERVISOR_H
#define RTE_HYPERVISOR_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* @file
* Hypervisor awareness.
@@ -30,4 +34,8 @@ rte_hypervisor_get(void);
const char *
rte_hypervisor_get_name(enum rte_hypervisor id);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* RTE_HYPERVISOR_H */
diff --git a/lib/librte_eal/include/rte_keepalive.h b/lib/librte_eal/include/rte_keepalive.h
index bd25508da8..538fb09095 100644
--- a/lib/librte_eal/include/rte_keepalive.h
+++ b/lib/librte_eal/include/rte_keepalive.h
@@ -11,6 +11,10 @@
#ifndef _KEEPALIVE_H_
#define _KEEPALIVE_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <rte_config.h>
#include <rte_memory.h>
@@ -139,4 +143,8 @@ rte_keepalive_register_relay_callback(struct rte_keepalive *keepcfg,
rte_keepalive_relay_callback_t callback,
void *data);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _KEEPALIVE_H_ */
diff --git a/lib/librte_eal/include/rte_pci_dev_feature_defs.h b/lib/librte_eal/include/rte_pci_dev_feature_defs.h
index e12c22081f..c5bb631286 100644
--- a/lib/librte_eal/include/rte_pci_dev_feature_defs.h
+++ b/lib/librte_eal/include/rte_pci_dev_feature_defs.h
@@ -5,6 +5,10 @@
#ifndef _RTE_PCI_DEV_DEFS_H_
#define _RTE_PCI_DEV_DEFS_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* interrupt mode */
enum rte_intr_mode {
RTE_INTR_MODE_NONE = 0,
@@ -13,4 +17,8 @@ enum rte_intr_mode {
RTE_INTR_MODE_MSIX
};
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _RTE_PCI_DEV_DEFS_H_ */
diff --git a/lib/librte_eal/include/rte_pci_dev_features.h b/lib/librte_eal/include/rte_pci_dev_features.h
index 6104123d27..ee6e10590c 100644
--- a/lib/librte_eal/include/rte_pci_dev_features.h
+++ b/lib/librte_eal/include/rte_pci_dev_features.h
@@ -5,6 +5,10 @@
#ifndef _RTE_PCI_DEV_FEATURES_H
#define _RTE_PCI_DEV_FEATURES_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <rte_pci_dev_feature_defs.h>
#define RTE_INTR_MODE_NONE_NAME "none"
@@ -12,4 +16,8 @@
#define RTE_INTR_MODE_MSI_NAME "msi"
#define RTE_INTR_MODE_MSIX_NAME "msix"
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/lib/librte_eal/include/rte_time.h b/lib/librte_eal/include/rte_time.h
index 5ad7c8841a..ec25f7b93d 100644
--- a/lib/librte_eal/include/rte_time.h
+++ b/lib/librte_eal/include/rte_time.h
@@ -5,6 +5,10 @@
#ifndef _RTE_TIME_H_
#define _RTE_TIME_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <stdint.h>
#include <time.h>
@@ -98,4 +102,8 @@ rte_ns_to_timespec(uint64_t nsec)
return ts;
}
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _RTE_TIME_H_ */
diff --git a/lib/librte_eal/include/rte_trace_point_register.h b/lib/librte_eal/include/rte_trace_point_register.h
index 4f5c86552d..2e61439940 100644
--- a/lib/librte_eal/include/rte_trace_point_register.h
+++ b/lib/librte_eal/include/rte_trace_point_register.h
@@ -5,6 +5,10 @@
#ifndef _RTE_TRACE_POINT_REGISTER_H_
#define _RTE_TRACE_POINT_REGISTER_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#ifdef _RTE_TRACE_POINT_H_
#error for registration, include this file first before <rte_trace_point.h>
#endif
@@ -42,4 +46,8 @@ do { \
RTE_STR(in)"[32]", "string_bounded_t"); \
} while (0)
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _RTE_TRACE_POINT_REGISTER_H_ */
diff --git a/lib/librte_eal/linux/include/rte_os.h b/lib/librte_eal/linux/include/rte_os.h
index 1618b4df22..748c4c7602 100644
--- a/lib/librte_eal/linux/include/rte_os.h
+++ b/lib/librte_eal/linux/include/rte_os.h
@@ -5,6 +5,10 @@
#ifndef _RTE_OS_H_
#define _RTE_OS_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* This header should contain any definition
* which is not supported natively or named differently in Linux.
@@ -32,4 +36,8 @@ typedef cpu_set_t rte_cpuset_t;
} while (0)
#endif
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _RTE_OS_H_ */
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:54.177081870 +0000
+++ 0002-eal-add-missing-C-guards.patch 2022-02-28 21:17:53.788928092 +0000
@@ -1 +1 @@
-From d7e9c02ccad8928b6b804049ced9a3ce6172d81e Mon Sep 17 00:00:00 2001
+From 2c2d7d7af165285a559ea2d92923f22bce2d97b2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d7e9c02ccad8928b6b804049ced9a3ce6172d81e ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -24,10 +25,10 @@
- lib/eal/include/rte_bitops.h | 8 ++++++++
- lib/eal/include/rte_branch_prediction.h | 8 ++++++++
- lib/eal/include/rte_compat.h | 8 ++++++++
- lib/eal/include/rte_hypervisor.h | 8 ++++++++
- lib/eal/include/rte_keepalive.h | 8 ++++++++
- lib/eal/include/rte_pci_dev_feature_defs.h | 8 ++++++++
- lib/eal/include/rte_pci_dev_features.h | 8 ++++++++
- lib/eal/include/rte_time.h | 8 ++++++++
- lib/eal/include/rte_trace_point_register.h | 8 ++++++++
- lib/eal/linux/include/rte_os.h | 8 ++++++++
+ lib/librte_eal/include/rte_bitops.h | 8 ++++++++
+ lib/librte_eal/include/rte_branch_prediction.h | 8 ++++++++
+ lib/librte_eal/include/rte_compat.h | 8 ++++++++
+ lib/librte_eal/include/rte_hypervisor.h | 8 ++++++++
+ lib/librte_eal/include/rte_keepalive.h | 8 ++++++++
+ lib/librte_eal/include/rte_pci_dev_feature_defs.h | 8 ++++++++
+ lib/librte_eal/include/rte_pci_dev_features.h | 8 ++++++++
+ lib/librte_eal/include/rte_time.h | 8 ++++++++
+ lib/librte_eal/include/rte_trace_point_register.h | 8 ++++++++
+ lib/librte_eal/linux/include/rte_os.h | 8 ++++++++
@@ -36 +37 @@
-diff --git a/lib/eal/include/rte_bitops.h b/lib/eal/include/rte_bitops.h
+diff --git a/lib/librte_eal/include/rte_bitops.h b/lib/librte_eal/include/rte_bitops.h
@@ -38,2 +39,2 @@
---- a/lib/eal/include/rte_bitops.h
-+++ b/lib/eal/include/rte_bitops.h
+--- a/lib/librte_eal/include/rte_bitops.h
++++ b/lib/librte_eal/include/rte_bitops.h
@@ -60 +61 @@
-diff --git a/lib/eal/include/rte_branch_prediction.h b/lib/eal/include/rte_branch_prediction.h
+diff --git a/lib/librte_eal/include/rte_branch_prediction.h b/lib/librte_eal/include/rte_branch_prediction.h
@@ -62,2 +63,2 @@
---- a/lib/eal/include/rte_branch_prediction.h
-+++ b/lib/eal/include/rte_branch_prediction.h
+--- a/lib/librte_eal/include/rte_branch_prediction.h
++++ b/lib/librte_eal/include/rte_branch_prediction.h
@@ -84,4 +85,4 @@
-diff --git a/lib/eal/include/rte_compat.h b/lib/eal/include/rte_compat.h
-index 9556bbf4d0..fc9fbaaab2 100644
---- a/lib/eal/include/rte_compat.h
-+++ b/lib/eal/include/rte_compat.h
+diff --git a/lib/librte_eal/include/rte_compat.h b/lib/librte_eal/include/rte_compat.h
+index 2718612cce..a7dbe23449 100644
+--- a/lib/librte_eal/include/rte_compat.h
++++ b/lib/librte_eal/include/rte_compat.h
@@ -99 +100 @@
-@@ -46,4 +50,8 @@ __attribute__((section(".text.internal")))
+@@ -43,4 +47,8 @@ __attribute__((section(".text.internal")))
@@ -108 +109 @@
-diff --git a/lib/eal/include/rte_hypervisor.h b/lib/eal/include/rte_hypervisor.h
+diff --git a/lib/librte_eal/include/rte_hypervisor.h b/lib/librte_eal/include/rte_hypervisor.h
@@ -110,2 +111,2 @@
---- a/lib/eal/include/rte_hypervisor.h
-+++ b/lib/eal/include/rte_hypervisor.h
+--- a/lib/librte_eal/include/rte_hypervisor.h
++++ b/lib/librte_eal/include/rte_hypervisor.h
@@ -132 +133 @@
-diff --git a/lib/eal/include/rte_keepalive.h b/lib/eal/include/rte_keepalive.h
+diff --git a/lib/librte_eal/include/rte_keepalive.h b/lib/librte_eal/include/rte_keepalive.h
@@ -134,2 +135,2 @@
---- a/lib/eal/include/rte_keepalive.h
-+++ b/lib/eal/include/rte_keepalive.h
+--- a/lib/librte_eal/include/rte_keepalive.h
++++ b/lib/librte_eal/include/rte_keepalive.h
@@ -156 +157 @@
-diff --git a/lib/eal/include/rte_pci_dev_feature_defs.h b/lib/eal/include/rte_pci_dev_feature_defs.h
+diff --git a/lib/librte_eal/include/rte_pci_dev_feature_defs.h b/lib/librte_eal/include/rte_pci_dev_feature_defs.h
@@ -158,2 +159,2 @@
---- a/lib/eal/include/rte_pci_dev_feature_defs.h
-+++ b/lib/eal/include/rte_pci_dev_feature_defs.h
+--- a/lib/librte_eal/include/rte_pci_dev_feature_defs.h
++++ b/lib/librte_eal/include/rte_pci_dev_feature_defs.h
@@ -180 +181 @@
-diff --git a/lib/eal/include/rte_pci_dev_features.h b/lib/eal/include/rte_pci_dev_features.h
+diff --git a/lib/librte_eal/include/rte_pci_dev_features.h b/lib/librte_eal/include/rte_pci_dev_features.h
@@ -182,2 +183,2 @@
---- a/lib/eal/include/rte_pci_dev_features.h
-+++ b/lib/eal/include/rte_pci_dev_features.h
+--- a/lib/librte_eal/include/rte_pci_dev_features.h
++++ b/lib/librte_eal/include/rte_pci_dev_features.h
@@ -204 +205 @@
-diff --git a/lib/eal/include/rte_time.h b/lib/eal/include/rte_time.h
+diff --git a/lib/librte_eal/include/rte_time.h b/lib/librte_eal/include/rte_time.h
@@ -206,2 +207,2 @@
---- a/lib/eal/include/rte_time.h
-+++ b/lib/eal/include/rte_time.h
+--- a/lib/librte_eal/include/rte_time.h
++++ b/lib/librte_eal/include/rte_time.h
@@ -228 +229 @@
-diff --git a/lib/eal/include/rte_trace_point_register.h b/lib/eal/include/rte_trace_point_register.h
+diff --git a/lib/librte_eal/include/rte_trace_point_register.h b/lib/librte_eal/include/rte_trace_point_register.h
@@ -230,2 +231,2 @@
---- a/lib/eal/include/rte_trace_point_register.h
-+++ b/lib/eal/include/rte_trace_point_register.h
+--- a/lib/librte_eal/include/rte_trace_point_register.h
++++ b/lib/librte_eal/include/rte_trace_point_register.h
@@ -252,4 +253,4 @@
-diff --git a/lib/eal/linux/include/rte_os.h b/lib/eal/linux/include/rte_os.h
-index 35c07c70cb..c72bf5b7e6 100644
---- a/lib/eal/linux/include/rte_os.h
-+++ b/lib/eal/linux/include/rte_os.h
+diff --git a/lib/librte_eal/linux/include/rte_os.h b/lib/librte_eal/linux/include/rte_os.h
+index 1618b4df22..748c4c7602 100644
+--- a/lib/librte_eal/linux/include/rte_os.h
++++ b/lib/librte_eal/linux/include/rte_os.h
@@ -267 +268 @@
-@@ -42,4 +46,8 @@ typedef cpu_set_t rte_cpuset_t;
+@@ -32,4 +36,8 @@ typedef cpu_set_t rte_cpuset_t;
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'telemetry: add missing C++ guards' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
2022-02-28 21:19 ` patch 'eal: add missing C++ guards' " luca.boccassi
@ 2022-02-28 21:19 ` luca.boccassi
2022-02-28 21:20 ` patch 'ethdev: " luca.boccassi
` (47 subsequent siblings)
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:19 UTC (permalink / raw)
To: Brian Dooley; +Cc: Bruce Richardson, Tyler Retzlaff, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f749277d0828804da96f741eed8f782f04127df4
Thanks.
Luca Boccassi
---
From f749277d0828804da96f741eed8f782f04127df4 Mon Sep 17 00:00:00 2001
From: Brian Dooley <brian.dooley@intel.com>
Date: Wed, 16 Feb 2022 15:14:47 +0000
Subject: [PATCH] telemetry: add missing C++ guards
[ upstream commit cf8e6263647d217ad5c9bdfa2c3275f71bd19f64 ]
Some public header files were missing 'extern "C"' C++ guards,
and couldn't be used by C++ applications. Add the missing guards.
Fixes: 8877ac688b52 ("telemetry: introduce infrastructure")
Signed-off-by: Brian Dooley <brian.dooley@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
lib/librte_telemetry/rte_telemetry.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/lib/librte_telemetry/rte_telemetry.h b/lib/librte_telemetry/rte_telemetry.h
index 9cd6d0cd4c..fb4842a56e 100644
--- a/lib/librte_telemetry/rte_telemetry.h
+++ b/lib/librte_telemetry/rte_telemetry.h
@@ -11,8 +11,13 @@
#ifndef _RTE_TELEMETRY_H_
#define _RTE_TELEMETRY_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/** Maximum number of telemetry callbacks. */
#define TELEMETRY_MAX_CALLBACKS 64
+
/** Maximum length for string used in object. */
#define RTE_TEL_MAX_STRING_LEN 64
/** Maximum length of string. */
@@ -341,4 +346,8 @@ __rte_experimental
void
rte_tel_data_free(struct rte_tel_data *data);
+#ifdef __cplusplus
+}
+#endif
+
#endif
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:54.258354925 +0000
+++ 0003-telemetry-add-missing-C-guards.patch 2022-02-28 21:17:53.788928092 +0000
@@ -1 +1 @@
-From cf8e6263647d217ad5c9bdfa2c3275f71bd19f64 Mon Sep 17 00:00:00 2001
+From f749277d0828804da96f741eed8f782f04127df4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cf8e6263647d217ad5c9bdfa2c3275f71bd19f64 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -16,2 +17,2 @@
- lib/telemetry/rte_telemetry.h | 8 ++++++++
- 1 file changed, 8 insertions(+)
+ lib/librte_telemetry/rte_telemetry.h | 9 +++++++++
+ 1 file changed, 9 insertions(+)
@@ -19,5 +20,5 @@
-diff --git a/lib/telemetry/rte_telemetry.h b/lib/telemetry/rte_telemetry.h
-index 7bca8a9a49..3372b32f38 100644
---- a/lib/telemetry/rte_telemetry.h
-+++ b/lib/telemetry/rte_telemetry.h
-@@ -9,6 +9,10 @@
+diff --git a/lib/librte_telemetry/rte_telemetry.h b/lib/librte_telemetry/rte_telemetry.h
+index 9cd6d0cd4c..fb4842a56e 100644
+--- a/lib/librte_telemetry/rte_telemetry.h
++++ b/lib/librte_telemetry/rte_telemetry.h
+@@ -11,8 +11,13 @@
@@ -30,0 +32,3 @@
+ /** Maximum number of telemetry callbacks. */
+ #define TELEMETRY_MAX_CALLBACKS 64
++
@@ -32 +36 @@
- #define RTE_TEL_MAX_STRING_LEN 128
+ #define RTE_TEL_MAX_STRING_LEN 64
@@ -34 +38 @@
-@@ -294,4 +298,8 @@ rte_tel_data_alloc(void);
+@@ -341,4 +346,8 @@ __rte_experimental
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'ethdev: add missing C++ guards' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
2022-02-28 21:19 ` patch 'eal: add missing C++ guards' " luca.boccassi
2022-02-28 21:19 ` patch 'telemetry: " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-02-28 21:20 ` patch 'metrics: " luca.boccassi
` (46 subsequent siblings)
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Brian Dooley; +Cc: Bruce Richardson, Tyler Retzlaff, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/c840104e2394624680b36d9498367f2138ca1828
Thanks.
Luca Boccassi
---
From c840104e2394624680b36d9498367f2138ca1828 Mon Sep 17 00:00:00 2001
From: Brian Dooley <brian.dooley@intel.com>
Date: Wed, 16 Feb 2022 15:14:48 +0000
Subject: [PATCH] ethdev: add missing C++ guards
[ upstream commit dbf9fc1dac70b64dd1ed9a3ffd6997838fbf170e ]
Some public header files were missing 'extern "C"' C++ guards,
and couldn't be used by C++ applications. Add the missing guards.
Fixes: 7a3f27cbf59b ("ethdev: add access to specific device info")
Fixes: dcd5c8112bc3 ("ethdev: add PCI driver helpers")
Fixes: 7f0a669e7b04 ("ethdev: add allocation helper for virtual drivers")
Fixes: 7a3357205755 ("lib: remove C++ include guard from private headers")
Signed-off-by: Brian Dooley <brian.dooley@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
lib/librte_ethdev/rte_dev_info.h | 8 ++++++++
lib/librte_ethdev/rte_ethdev_driver.h | 4 ++++
lib/librte_ethdev/rte_ethdev_pci.h | 8 ++++++++
lib/librte_ethdev/rte_ethdev_vdev.h | 8 ++++++++
4 files changed, 28 insertions(+)
diff --git a/lib/librte_ethdev/rte_dev_info.h b/lib/librte_ethdev/rte_dev_info.h
index 7a6b61fdb7..cacb989ced 100644
--- a/lib/librte_ethdev/rte_dev_info.h
+++ b/lib/librte_ethdev/rte_dev_info.h
@@ -5,6 +5,10 @@
#ifndef _RTE_DEV_INFO_H_
#define _RTE_DEV_INFO_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <stdint.h>
/*
@@ -48,4 +52,8 @@ struct rte_eth_dev_module_info {
#define RTE_ETH_MODULE_SFF_8436_LEN 256
#define RTE_ETH_MODULE_SFF_8436_MAX_LEN 640
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _RTE_DEV_INFO_H_ */
diff --git a/lib/librte_ethdev/rte_ethdev_driver.h b/lib/librte_ethdev/rte_ethdev_driver.h
index b6abef7782..afee4b8b80 100644
--- a/lib/librte_ethdev/rte_ethdev_driver.h
+++ b/lib/librte_ethdev/rte_ethdev_driver.h
@@ -5,6 +5,10 @@
#ifndef _RTE_ETHDEV_DRIVER_H_
#define _RTE_ETHDEV_DRIVER_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* @file
*
diff --git a/lib/librte_ethdev/rte_ethdev_pci.h b/lib/librte_ethdev/rte_ethdev_pci.h
index 0eba781917..e2c83fd941 100644
--- a/lib/librte_ethdev/rte_ethdev_pci.h
+++ b/lib/librte_ethdev/rte_ethdev_pci.h
@@ -6,6 +6,10 @@
#ifndef _RTE_ETHDEV_PCI_H_
#define _RTE_ETHDEV_PCI_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <rte_malloc.h>
#include <rte_pci.h>
#include <rte_bus_pci.h>
@@ -171,4 +175,8 @@ rte_eth_dev_pci_generic_remove(struct rte_pci_device *pci_dev,
return 0;
}
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _RTE_ETHDEV_PCI_H_ */
diff --git a/lib/librte_ethdev/rte_ethdev_vdev.h b/lib/librte_ethdev/rte_ethdev_vdev.h
index 4ba3f28964..96a710d96a 100644
--- a/lib/librte_ethdev/rte_ethdev_vdev.h
+++ b/lib/librte_ethdev/rte_ethdev_vdev.h
@@ -6,6 +6,10 @@
#ifndef _RTE_ETHDEV_VDEV_H_
#define _RTE_ETHDEV_VDEV_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <rte_config.h>
#include <rte_malloc.h>
#include <rte_bus_vdev.h>
@@ -52,4 +56,8 @@ rte_eth_vdev_allocate(struct rte_vdev_device *dev, size_t private_data_size)
return eth_dev;
}
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _RTE_ETHDEV_VDEV_H_ */
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:54.334585949 +0000
+++ 0004-ethdev-add-missing-C-guards.patch 2022-02-28 21:17:53.796928266 +0000
@@ -1 +1 @@
-From dbf9fc1dac70b64dd1ed9a3ffd6997838fbf170e Mon Sep 17 00:00:00 2001
+From c840104e2394624680b36d9498367f2138ca1828 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit dbf9fc1dac70b64dd1ed9a3ffd6997838fbf170e ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -19,5 +20,5 @@
- lib/ethdev/ethdev_driver.h | 8 ++++++++
- lib/ethdev/ethdev_pci.h | 8 ++++++++
- lib/ethdev/ethdev_vdev.h | 8 ++++++++
- lib/ethdev/rte_dev_info.h | 8 ++++++++
- 4 files changed, 32 insertions(+)
+ lib/librte_ethdev/rte_dev_info.h | 8 ++++++++
+ lib/librte_ethdev/rte_ethdev_driver.h | 4 ++++
+ lib/librte_ethdev/rte_ethdev_pci.h | 8 ++++++++
+ lib/librte_ethdev/rte_ethdev_vdev.h | 8 ++++++++
+ 4 files changed, 28 insertions(+)
@@ -25,4 +26,4 @@
-diff --git a/lib/ethdev/ethdev_driver.h b/lib/ethdev/ethdev_driver.h
-index 6d697a879a..5ec00e533e 100644
---- a/lib/ethdev/ethdev_driver.h
-+++ b/lib/ethdev/ethdev_driver.h
+diff --git a/lib/librte_ethdev/rte_dev_info.h b/lib/librte_ethdev/rte_dev_info.h
+index 7a6b61fdb7..cacb989ced 100644
+--- a/lib/librte_ethdev/rte_dev_info.h
++++ b/lib/librte_ethdev/rte_dev_info.h
@@ -30,2 +31,2 @@
- #ifndef _RTE_ETHDEV_DRIVER_H_
- #define _RTE_ETHDEV_DRIVER_H_
+ #ifndef _RTE_DEV_INFO_H_
+ #define _RTE_DEV_INFO_H_
@@ -37,6 +38,6 @@
- /**
- * @file
- *
-@@ -1881,4 +1885,8 @@ struct rte_eth_tunnel_filter_conf {
- uint16_t queue_id; /**< Queue assigned to if match */
- };
+ #include <stdint.h>
+
+ /*
+@@ -48,4 +52,8 @@ struct rte_eth_dev_module_info {
+ #define RTE_ETH_MODULE_SFF_8436_LEN 256
+ #define RTE_ETH_MODULE_SFF_8436_MAX_LEN 640
@@ -48,5 +49,20 @@
- #endif /* _RTE_ETHDEV_DRIVER_H_ */
-diff --git a/lib/ethdev/ethdev_pci.h b/lib/ethdev/ethdev_pci.h
-index 71aa4b2e98..6130bcbd1f 100644
---- a/lib/ethdev/ethdev_pci.h
-+++ b/lib/ethdev/ethdev_pci.h
+ #endif /* _RTE_DEV_INFO_H_ */
+diff --git a/lib/librte_ethdev/rte_ethdev_driver.h b/lib/librte_ethdev/rte_ethdev_driver.h
+index b6abef7782..afee4b8b80 100644
+--- a/lib/librte_ethdev/rte_ethdev_driver.h
++++ b/lib/librte_ethdev/rte_ethdev_driver.h
+@@ -5,6 +5,10 @@
+ #ifndef _RTE_ETHDEV_DRIVER_H_
+ #define _RTE_ETHDEV_DRIVER_H_
+
++#ifdef __cplusplus
++extern "C" {
++#endif
++
+ /**
+ * @file
+ *
+diff --git a/lib/librte_ethdev/rte_ethdev_pci.h b/lib/librte_ethdev/rte_ethdev_pci.h
+index 0eba781917..e2c83fd941 100644
+--- a/lib/librte_ethdev/rte_ethdev_pci.h
++++ b/lib/librte_ethdev/rte_ethdev_pci.h
@@ -73,4 +89,4 @@
-diff --git a/lib/ethdev/ethdev_vdev.h b/lib/ethdev/ethdev_vdev.h
-index 2b49e9665b..f5f536ce64 100644
---- a/lib/ethdev/ethdev_vdev.h
-+++ b/lib/ethdev/ethdev_vdev.h
+diff --git a/lib/librte_ethdev/rte_ethdev_vdev.h b/lib/librte_ethdev/rte_ethdev_vdev.h
+index 4ba3f28964..96a710d96a 100644
+--- a/lib/librte_ethdev/rte_ethdev_vdev.h
++++ b/lib/librte_ethdev/rte_ethdev_vdev.h
@@ -97,24 +112,0 @@
-diff --git a/lib/ethdev/rte_dev_info.h b/lib/ethdev/rte_dev_info.h
-index cb2fe0ae97..67cf0ae526 100644
---- a/lib/ethdev/rte_dev_info.h
-+++ b/lib/ethdev/rte_dev_info.h
-@@ -5,6 +5,10 @@
- #ifndef _RTE_DEV_INFO_H_
- #define _RTE_DEV_INFO_H_
-
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
- #include <stdint.h>
-
- /*
-@@ -48,4 +52,8 @@ struct rte_eth_dev_module_info {
- #define RTE_ETH_MODULE_SFF_8436_LEN 256
- #define RTE_ETH_MODULE_SFF_8436_MAX_LEN 640
-
-+#ifdef __cplusplus
-+}
-+#endif
-+
- #endif /* _RTE_DEV_INFO_H_ */
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'metrics: add missing C++ guards' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (2 preceding siblings ...)
2022-02-28 21:20 ` patch 'ethdev: " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-02-28 21:20 ` patch 'acl: " luca.boccassi
` (45 subsequent siblings)
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Brian Dooley; +Cc: Bruce Richardson, Tyler Retzlaff, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/8f9c5d8497f713ca4133655dbf9b10dc7fb00a75
Thanks.
Luca Boccassi
---
From 8f9c5d8497f713ca4133655dbf9b10dc7fb00a75 Mon Sep 17 00:00:00 2001
From: Brian Dooley <brian.dooley@intel.com>
Date: Wed, 16 Feb 2022 15:14:49 +0000
Subject: [PATCH] metrics: add missing C++ guards
[ upstream commit 4e90b3a3d6cc476ee1a39be7368675c31a28b093 ]
Some public header files were missing 'extern "C"' C++ guards,
and couldn't be used by C++ applications. Add the missing guards.
Fixes: c5b7197f662e ("telemetry: move some functions to metrics library")
Signed-off-by: Brian Dooley <brian.dooley@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
lib/librte_metrics/rte_metrics_telemetry.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/lib/librte_metrics/rte_metrics_telemetry.h b/lib/librte_metrics/rte_metrics_telemetry.h
index 5dbb32ca0c..ce9408ab10 100644
--- a/lib/librte_metrics/rte_metrics_telemetry.h
+++ b/lib/librte_metrics/rte_metrics_telemetry.h
@@ -13,6 +13,9 @@
#ifndef _RTE_METRICS_TELEMETRY_H_
#define _RTE_METRICS_TELEMETRY_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
enum rte_telemetry_stats_type {
PORT_STATS = 0,
@@ -60,4 +63,8 @@ __rte_experimental
int32_t
rte_metrics_tel_extract_data(struct telemetry_encode_param *ep, json_t *data);
+#ifdef __cplusplus
+}
+#endif
+
#endif
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:54.414359429 +0000
+++ 0005-metrics-add-missing-C-guards.patch 2022-02-28 21:17:53.800928355 +0000
@@ -1 +1 @@
-From 4e90b3a3d6cc476ee1a39be7368675c31a28b093 Mon Sep 17 00:00:00 2001
+From 8f9c5d8497f713ca4133655dbf9b10dc7fb00a75 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4e90b3a3d6cc476ee1a39be7368675c31a28b093 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -16 +17 @@
- lib/metrics/rte_metrics_telemetry.h | 7 +++++++
+ lib/librte_metrics/rte_metrics_telemetry.h | 7 +++++++
@@ -19,4 +20,4 @@
-diff --git a/lib/metrics/rte_metrics_telemetry.h b/lib/metrics/rte_metrics_telemetry.h
-index 2b6eb1ccc8..09b14d9336 100644
---- a/lib/metrics/rte_metrics_telemetry.h
-+++ b/lib/metrics/rte_metrics_telemetry.h
+diff --git a/lib/librte_metrics/rte_metrics_telemetry.h b/lib/librte_metrics/rte_metrics_telemetry.h
+index 5dbb32ca0c..ce9408ab10 100644
+--- a/lib/librte_metrics/rte_metrics_telemetry.h
++++ b/lib/librte_metrics/rte_metrics_telemetry.h
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'acl: add missing C++ guards' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (3 preceding siblings ...)
2022-02-28 21:20 ` patch 'metrics: " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-02-28 21:20 ` patch 'compressdev: " luca.boccassi
` (44 subsequent siblings)
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Brian Dooley; +Cc: Bruce Richardson, Tyler Retzlaff, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/4fd5a95b49cd7afea30ebcc12beb0d62d03a5920
Thanks.
Luca Boccassi
---
From 4fd5a95b49cd7afea30ebcc12beb0d62d03a5920 Mon Sep 17 00:00:00 2001
From: Brian Dooley <brian.dooley@intel.com>
Date: Wed, 16 Feb 2022 15:14:50 +0000
Subject: [PATCH] acl: add missing C++ guards
[ upstream commit bfec92e3821f57200f7e956f39745303f995531d ]
Some public header files were missing 'extern "C"' C++ guards,
and couldn't be used by C++ applications. Add the missing guards.
Fixes: dc276b5780c2 ("acl: new library")
Signed-off-by: Brian Dooley <brian.dooley@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
lib/librte_acl/rte_acl_osdep.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/lib/librte_acl/rte_acl_osdep.h b/lib/librte_acl/rte_acl_osdep.h
index b2c262dee7..3c1dc402ca 100644
--- a/lib/librte_acl/rte_acl_osdep.h
+++ b/lib/librte_acl/rte_acl_osdep.h
@@ -5,6 +5,10 @@
#ifndef _RTE_ACL_OSDEP_H_
#define _RTE_ACL_OSDEP_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* @file
*
@@ -45,4 +49,8 @@
#include <rte_cpuflags.h>
#include <rte_debug.h>
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _RTE_ACL_OSDEP_H_ */
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:54.488960494 +0000
+++ 0006-acl-add-missing-C-guards.patch 2022-02-28 21:17:53.800928355 +0000
@@ -1 +1 @@
-From bfec92e3821f57200f7e956f39745303f995531d Mon Sep 17 00:00:00 2001
+From 4fd5a95b49cd7afea30ebcc12beb0d62d03a5920 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bfec92e3821f57200f7e956f39745303f995531d ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -16 +17 @@
- lib/acl/rte_acl_osdep.h | 8 ++++++++
+ lib/librte_acl/rte_acl_osdep.h | 8 ++++++++
@@ -19 +20 @@
-diff --git a/lib/acl/rte_acl_osdep.h b/lib/acl/rte_acl_osdep.h
+diff --git a/lib/librte_acl/rte_acl_osdep.h b/lib/librte_acl/rte_acl_osdep.h
@@ -21,2 +22,2 @@
---- a/lib/acl/rte_acl_osdep.h
-+++ b/lib/acl/rte_acl_osdep.h
+--- a/lib/librte_acl/rte_acl_osdep.h
++++ b/lib/librte_acl/rte_acl_osdep.h
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'compressdev: add missing C++ guards' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (4 preceding siblings ...)
2022-02-28 21:20 ` patch 'acl: " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-02-28 21:20 ` patch 'eventdev: " luca.boccassi
` (43 subsequent siblings)
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Brian Dooley; +Cc: Bruce Richardson, Tyler Retzlaff, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f85ebc37b1d9af7e9f1df0abe18a016d6e65aa66
Thanks.
Luca Boccassi
---
From f85ebc37b1d9af7e9f1df0abe18a016d6e65aa66 Mon Sep 17 00:00:00 2001
From: Brian Dooley <brian.dooley@intel.com>
Date: Wed, 16 Feb 2022 15:14:51 +0000
Subject: [PATCH] compressdev: add missing C++ guards
[ upstream commit ef64c2f311f66bf8fe563bf7777e5dba72fc57e6 ]
Some public header files were missing 'extern "C"' C++ guards,
and couldn't be used by C++ applications. Add the missing guards.
Fixes: ed7dd94f7f66 ("compressdev: add basic device management")
Signed-off-by: Brian Dooley <brian.dooley@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
lib/librte_compressdev/rte_compressdev_internal.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/lib/librte_compressdev/rte_compressdev_internal.h b/lib/librte_compressdev/rte_compressdev_internal.h
index 22ceac66e2..888c8f5c5c 100644
--- a/lib/librte_compressdev/rte_compressdev_internal.h
+++ b/lib/librte_compressdev/rte_compressdev_internal.h
@@ -5,6 +5,10 @@
#ifndef _RTE_COMPRESSDEV_INTERNAL_H_
#define _RTE_COMPRESSDEV_INTERNAL_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* rte_compressdev_internal.h
* This file holds Compressdev private data structures.
*/
@@ -111,4 +115,9 @@ struct rte_compressdev_data {
void *dev_private;
/**< PMD-specific private data */
} __rte_cache_aligned;
+
+#ifdef __cplusplus
+}
+#endif
+
#endif
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:54.566147440 +0000
+++ 0007-compressdev-add-missing-C-guards.patch 2022-02-28 21:17:53.800928355 +0000
@@ -1 +1 @@
-From ef64c2f311f66bf8fe563bf7777e5dba72fc57e6 Mon Sep 17 00:00:00 2001
+From f85ebc37b1d9af7e9f1df0abe18a016d6e65aa66 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ef64c2f311f66bf8fe563bf7777e5dba72fc57e6 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -16 +17 @@
- lib/compressdev/rte_compressdev_internal.h | 9 +++++++++
+ lib/librte_compressdev/rte_compressdev_internal.h | 9 +++++++++
@@ -19 +20 @@
-diff --git a/lib/compressdev/rte_compressdev_internal.h b/lib/compressdev/rte_compressdev_internal.h
+diff --git a/lib/librte_compressdev/rte_compressdev_internal.h b/lib/librte_compressdev/rte_compressdev_internal.h
@@ -21,2 +22,2 @@
---- a/lib/compressdev/rte_compressdev_internal.h
-+++ b/lib/compressdev/rte_compressdev_internal.h
+--- a/lib/librte_compressdev/rte_compressdev_internal.h
++++ b/lib/librte_compressdev/rte_compressdev_internal.h
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'eventdev: add missing C++ guards' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (5 preceding siblings ...)
2022-02-28 21:20 ` patch 'compressdev: " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-02-28 21:20 ` patch 'kni: " luca.boccassi
` (42 subsequent siblings)
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Brian Dooley; +Cc: Bruce Richardson, Tyler Retzlaff, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/9c5dd18e1878a78c3733ca4089f91bfe1c610142
Thanks.
Luca Boccassi
---
From 9c5dd18e1878a78c3733ca4089f91bfe1c610142 Mon Sep 17 00:00:00 2001
From: Brian Dooley <brian.dooley@intel.com>
Date: Wed, 16 Feb 2022 15:14:52 +0000
Subject: [PATCH] eventdev: add missing C++ guards
[ upstream commit 2c552933ba453984c26262136150d75235f6aabe ]
Some public header files were missing 'extern "C"' C++ guards,
and couldn't be used by C++ applications. Add the missing guards.
Fixes: dc39e2f359b5 ("eventdev: add ring structure for events")
Fixes: 7a3357205755 ("lib: remove C++ include guard from private headers")
Signed-off-by: Brian Dooley <brian.dooley@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
lib/librte_eventdev/rte_event_ring.h | 9 +++++++++
lib/librte_eventdev/rte_eventdev_pmd.h | 8 ++++++++
lib/librte_eventdev/rte_eventdev_pmd_pci.h | 4 ++++
lib/librte_eventdev/rte_eventdev_pmd_vdev.h | 4 ++++
4 files changed, 25 insertions(+)
diff --git a/lib/librte_eventdev/rte_event_ring.h b/lib/librte_eventdev/rte_event_ring.h
index c0861b0ec2..0b9aefb000 100644
--- a/lib/librte_eventdev/rte_event_ring.h
+++ b/lib/librte_eventdev/rte_event_ring.h
@@ -14,6 +14,10 @@
#ifndef _RTE_EVENT_RING_
#define _RTE_EVENT_RING_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <stdint.h>
#include <rte_common.h>
@@ -266,4 +270,9 @@ rte_event_ring_get_capacity(const struct rte_event_ring *r)
{
return rte_ring_get_capacity(&r->r);
}
+
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/lib/librte_eventdev/rte_eventdev_pmd.h b/lib/librte_eventdev/rte_eventdev_pmd.h
index 5e1c836eb7..31d11f6f02 100644
--- a/lib/librte_eventdev/rte_eventdev_pmd.h
+++ b/lib/librte_eventdev/rte_eventdev_pmd.h
@@ -5,6 +5,10 @@
#ifndef _RTE_EVENTDEV_PMD_H_
#define _RTE_EVENTDEV_PMD_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/** @file
* RTE Event PMD APIs
*
@@ -1142,4 +1146,8 @@ rte_event_pmd_release(struct rte_eventdev *eventdev);
}
#endif
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _RTE_EVENTDEV_PMD_H_ */
diff --git a/lib/librte_eventdev/rte_eventdev_pmd_pci.h b/lib/librte_eventdev/rte_eventdev_pmd_pci.h
index 5f238bf496..e3b5e6e86e 100644
--- a/lib/librte_eventdev/rte_eventdev_pmd_pci.h
+++ b/lib/librte_eventdev/rte_eventdev_pmd_pci.h
@@ -5,6 +5,10 @@
#ifndef _RTE_EVENTDEV_PMD_PCI_H_
#define _RTE_EVENTDEV_PMD_PCI_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/** @file
* RTE Eventdev PCI PMD APIs
*
diff --git a/lib/librte_eventdev/rte_eventdev_pmd_vdev.h b/lib/librte_eventdev/rte_eventdev_pmd_vdev.h
index 8c64a06743..ff79d82530 100644
--- a/lib/librte_eventdev/rte_eventdev_pmd_vdev.h
+++ b/lib/librte_eventdev/rte_eventdev_pmd_vdev.h
@@ -5,6 +5,10 @@
#ifndef _RTE_EVENTDEV_PMD_VDEV_H_
#define _RTE_EVENTDEV_PMD_VDEV_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/** @file
* RTE Eventdev VDEV PMD APIs
*
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:54.640943058 +0000
+++ 0008-eventdev-add-missing-C-guards.patch 2022-02-28 21:17:53.808928529 +0000
@@ -1 +1 @@
-From 2c552933ba453984c26262136150d75235f6aabe Mon Sep 17 00:00:00 2001
+From 9c5dd18e1878a78c3733ca4089f91bfe1c610142 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2c552933ba453984c26262136150d75235f6aabe ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -17,5 +18,5 @@
- lib/eventdev/eventdev_pmd.h | 8 ++++++++
- lib/eventdev/eventdev_pmd_pci.h | 8 ++++++++
- lib/eventdev/eventdev_pmd_vdev.h | 8 ++++++++
- lib/eventdev/rte_event_ring.h | 9 +++++++++
- 4 files changed, 33 insertions(+)
+ lib/librte_eventdev/rte_event_ring.h | 9 +++++++++
+ lib/librte_eventdev/rte_eventdev_pmd.h | 8 ++++++++
+ lib/librte_eventdev/rte_eventdev_pmd_pci.h | 4 ++++
+ lib/librte_eventdev/rte_eventdev_pmd_vdev.h | 4 ++++
+ 4 files changed, 25 insertions(+)
@@ -23,4 +24,29 @@
-diff --git a/lib/eventdev/eventdev_pmd.h b/lib/eventdev/eventdev_pmd.h
-index b05ffce549..ce469d47a6 100644
---- a/lib/eventdev/eventdev_pmd.h
-+++ b/lib/eventdev/eventdev_pmd.h
+diff --git a/lib/librte_eventdev/rte_event_ring.h b/lib/librte_eventdev/rte_event_ring.h
+index c0861b0ec2..0b9aefb000 100644
+--- a/lib/librte_eventdev/rte_event_ring.h
++++ b/lib/librte_eventdev/rte_event_ring.h
+@@ -14,6 +14,10 @@
+ #ifndef _RTE_EVENT_RING_
+ #define _RTE_EVENT_RING_
+
++#ifdef __cplusplus
++extern "C" {
++#endif
++
+ #include <stdint.h>
+
+ #include <rte_common.h>
+@@ -266,4 +270,9 @@ rte_event_ring_get_capacity(const struct rte_event_ring *r)
+ {
+ return rte_ring_get_capacity(&r->r);
+ }
++
++#ifdef __cplusplus
++}
++#endif
++
+ #endif
+diff --git a/lib/librte_eventdev/rte_eventdev_pmd.h b/lib/librte_eventdev/rte_eventdev_pmd.h
+index 5e1c836eb7..31d11f6f02 100644
+--- a/lib/librte_eventdev/rte_eventdev_pmd.h
++++ b/lib/librte_eventdev/rte_eventdev_pmd.h
@@ -38,3 +64,3 @@
-@@ -1366,4 +1370,8 @@ void
- event_dev_fp_ops_set(struct rte_event_fp_ops *fp_ops,
- const struct rte_eventdev *dev);
+@@ -1142,4 +1146,8 @@ rte_event_pmd_release(struct rte_eventdev *eventdev);
+ }
+ #endif
@@ -47,4 +73,4 @@
-diff --git a/lib/eventdev/eventdev_pmd_pci.h b/lib/eventdev/eventdev_pmd_pci.h
-index 499852db16..24b56faaa9 100644
---- a/lib/eventdev/eventdev_pmd_pci.h
-+++ b/lib/eventdev/eventdev_pmd_pci.h
+diff --git a/lib/librte_eventdev/rte_eventdev_pmd_pci.h b/lib/librte_eventdev/rte_eventdev_pmd_pci.h
+index 5f238bf496..e3b5e6e86e 100644
+--- a/lib/librte_eventdev/rte_eventdev_pmd_pci.h
++++ b/lib/librte_eventdev/rte_eventdev_pmd_pci.h
@@ -62,13 +88,4 @@
-@@ -150,4 +154,8 @@ rte_event_pmd_pci_remove(struct rte_pci_device *pci_dev,
- return 0;
- }
-
-+#ifdef __cplusplus
-+}
-+#endif
-+
- #endif /* _RTE_EVENTDEV_PMD_PCI_H_ */
-diff --git a/lib/eventdev/eventdev_pmd_vdev.h b/lib/eventdev/eventdev_pmd_vdev.h
-index d9ee7277dd..77904910a2 100644
---- a/lib/eventdev/eventdev_pmd_vdev.h
-+++ b/lib/eventdev/eventdev_pmd_vdev.h
+diff --git a/lib/librte_eventdev/rte_eventdev_pmd_vdev.h b/lib/librte_eventdev/rte_eventdev_pmd_vdev.h
+index 8c64a06743..ff79d82530 100644
+--- a/lib/librte_eventdev/rte_eventdev_pmd_vdev.h
++++ b/lib/librte_eventdev/rte_eventdev_pmd_vdev.h
@@ -86,34 +102,0 @@
-@@ -99,4 +103,8 @@ rte_event_pmd_vdev_uninit(const char *name)
- return 0;
- }
-
-+#ifdef __cplusplus
-+}
-+#endif
-+
- #endif /* _RTE_EVENTDEV_PMD_VDEV_H_ */
-diff --git a/lib/eventdev/rte_event_ring.h b/lib/eventdev/rte_event_ring.h
-index 0a54f7fde2..0101cc0aa2 100644
---- a/lib/eventdev/rte_event_ring.h
-+++ b/lib/eventdev/rte_event_ring.h
-@@ -14,6 +14,10 @@
- #ifndef _RTE_EVENT_RING_
- #define _RTE_EVENT_RING_
-
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
- #include <stdint.h>
-
- #include <rte_common.h>
-@@ -264,4 +268,9 @@ rte_event_ring_get_capacity(const struct rte_event_ring *r)
- {
- return rte_ring_get_capacity(&r->r);
- }
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
- #endif
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'kni: add missing C++ guards' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (6 preceding siblings ...)
2022-02-28 21:20 ` patch 'eventdev: " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-02-28 21:20 ` patch 'vhost: " luca.boccassi
` (41 subsequent siblings)
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Brian Dooley; +Cc: Bruce Richardson, Tyler Retzlaff, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/581dea537e997e3afdcd4273fb9f5566055d1c4d
Thanks.
Luca Boccassi
---
From 581dea537e997e3afdcd4273fb9f5566055d1c4d Mon Sep 17 00:00:00 2001
From: Brian Dooley <brian.dooley@intel.com>
Date: Wed, 16 Feb 2022 15:14:53 +0000
Subject: [PATCH] kni: add missing C++ guards
[ upstream commit e90df35c7a0328f7ad5bfc4d2d9968ff774d7f77 ]
Some public header files were missing 'extern "C"' C++ guards,
and couldn't be used by C++ applications. Add the missing guards.
Fixes: 3fc5ca2f6352 ("kni: initial import")
Signed-off-by: Brian Dooley <brian.dooley@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
lib/librte_kni/rte_kni_common.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/lib/librte_kni/rte_kni_common.h b/lib/librte_kni/rte_kni_common.h
index b547ea5501..8d3ee0fa4f 100644
--- a/lib/librte_kni/rte_kni_common.h
+++ b/lib/librte_kni/rte_kni_common.h
@@ -6,6 +6,10 @@
#ifndef _RTE_KNI_COMMON_H_
#define _RTE_KNI_COMMON_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#ifdef __KERNEL__
#include <linux/if.h>
#include <asm/barrier.h>
@@ -136,4 +140,8 @@ struct rte_kni_device_info {
#define RTE_KNI_IOCTL_CREATE _IOWR(0, 2, struct rte_kni_device_info)
#define RTE_KNI_IOCTL_RELEASE _IOWR(0, 3, struct rte_kni_device_info)
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _RTE_KNI_COMMON_H_ */
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:54.717586098 +0000
+++ 0009-kni-add-missing-C-guards.patch 2022-02-28 21:17:53.812928618 +0000
@@ -1 +1 @@
-From e90df35c7a0328f7ad5bfc4d2d9968ff774d7f77 Mon Sep 17 00:00:00 2001
+From 581dea537e997e3afdcd4273fb9f5566055d1c4d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e90df35c7a0328f7ad5bfc4d2d9968ff774d7f77 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -16 +17 @@
- lib/kni/rte_kni_common.h | 8 ++++++++
+ lib/librte_kni/rte_kni_common.h | 8 ++++++++
@@ -19 +20 @@
-diff --git a/lib/kni/rte_kni_common.h b/lib/kni/rte_kni_common.h
+diff --git a/lib/librte_kni/rte_kni_common.h b/lib/librte_kni/rte_kni_common.h
@@ -21,2 +22,2 @@
---- a/lib/kni/rte_kni_common.h
-+++ b/lib/kni/rte_kni_common.h
+--- a/lib/librte_kni/rte_kni_common.h
++++ b/lib/librte_kni/rte_kni_common.h
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'vhost: add missing C++ guards' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (7 preceding siblings ...)
2022-02-28 21:20 ` patch 'kni: " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-02-28 21:20 ` patch 'ethdev: fix cast for C++ compatibility' " luca.boccassi
` (40 subsequent siblings)
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Brian Dooley; +Cc: Bruce Richardson, Chenbo Xia, Tyler Retzlaff, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/20baa98d62c825ed8548d74b8ae797dd8dd49ee6
Thanks.
Luca Boccassi
---
From 20baa98d62c825ed8548d74b8ae797dd8dd49ee6 Mon Sep 17 00:00:00 2001
From: Brian Dooley <brian.dooley@intel.com>
Date: Wed, 16 Feb 2022 15:14:54 +0000
Subject: [PATCH] vhost: add missing C++ guards
[ upstream commit cedca4084a61e85323800022974c1fde5027cbb4 ]
Some public header files were missing 'extern "C"' C++ guards,
and couldn't be used by C++ applications. Add the missing guards.
Fixes: d7280c9fffcb ("vhost: support selective datapath")
Fixes: 78639d54563a ("vhost: introduce async enqueue registration API")
Fixes: 3bb595ecd682 ("vhost/crypto: add request handler")
Fixes: 94c16e89d779 ("vhost: mark vDPA driver API as internal")
Signed-off-by: Brian Dooley <brian.dooley@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
lib/librte_vhost/rte_vdpa.h | 9 +++++++++
lib/librte_vhost/rte_vdpa_dev.h | 8 ++++++++
lib/librte_vhost/rte_vhost_crypto.h | 8 ++++++++
3 files changed, 25 insertions(+)
diff --git a/lib/librte_vhost/rte_vdpa.h b/lib/librte_vhost/rte_vdpa.h
index 1437f400bf..6ac85d1bbf 100644
--- a/lib/librte_vhost/rte_vdpa.h
+++ b/lib/librte_vhost/rte_vdpa.h
@@ -5,6 +5,10 @@
#ifndef _RTE_VDPA_H_
#define _RTE_VDPA_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* @file
*
@@ -183,4 +187,9 @@ rte_vdpa_get_stats(struct rte_vdpa_device *dev, uint16_t qid,
*/
int
rte_vdpa_reset_stats(struct rte_vdpa_device *dev, uint16_t qid);
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _RTE_VDPA_H_ */
diff --git a/lib/librte_vhost/rte_vdpa_dev.h b/lib/librte_vhost/rte_vdpa_dev.h
index bfada387b0..52f528ff20 100644
--- a/lib/librte_vhost/rte_vdpa_dev.h
+++ b/lib/librte_vhost/rte_vdpa_dev.h
@@ -5,6 +5,10 @@
#ifndef _RTE_VDPA_H_DEV_
#define _RTE_VDPA_H_DEV_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <stdbool.h>
#include "rte_vhost.h"
@@ -135,4 +139,8 @@ rte_vhost_host_notifier_ctrl(int vid, uint16_t qid, bool enable);
int
rte_vdpa_relay_vring_used(int vid, uint16_t qid, void *vring_m);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _RTE_VDPA_DEV_H_ */
diff --git a/lib/librte_vhost/rte_vhost_crypto.h b/lib/librte_vhost/rte_vhost_crypto.h
index 8531757285..ef01f94aa5 100644
--- a/lib/librte_vhost/rte_vhost_crypto.h
+++ b/lib/librte_vhost/rte_vhost_crypto.h
@@ -5,6 +5,10 @@
#ifndef _VHOST_CRYPTO_H_
#define _VHOST_CRYPTO_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <stdint.h>
#include <rte_compat.h>
@@ -137,4 +141,8 @@ uint16_t
rte_vhost_crypto_finalize_requests(struct rte_crypto_op **ops,
uint16_t nb_ops, int *callfds, uint16_t *nb_callfds);
+#ifdef __cplusplus
+}
+#endif
+
#endif /**< _VHOST_CRYPTO_H_ */
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:54.792607141 +0000
+++ 0010-vhost-add-missing-C-guards.patch 2022-02-28 21:17:53.812928618 +0000
@@ -1 +1 @@
-From cedca4084a61e85323800022974c1fde5027cbb4 Mon Sep 17 00:00:00 2001
+From 20baa98d62c825ed8548d74b8ae797dd8dd49ee6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cedca4084a61e85323800022974c1fde5027cbb4 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -20,5 +21,4 @@
- lib/vhost/rte_vdpa.h | 9 +++++++++
- lib/vhost/rte_vhost_async.h | 8 ++++++++
- lib/vhost/rte_vhost_crypto.h | 8 ++++++++
- lib/vhost/vdpa_driver.h | 8 ++++++++
- 4 files changed, 33 insertions(+)
+ lib/librte_vhost/rte_vdpa.h | 9 +++++++++
+ lib/librte_vhost/rte_vdpa_dev.h | 8 ++++++++
+ lib/librte_vhost/rte_vhost_crypto.h | 8 ++++++++
+ 3 files changed, 25 insertions(+)
@@ -26 +26 @@
-diff --git a/lib/vhost/rte_vdpa.h b/lib/vhost/rte_vdpa.h
+diff --git a/lib/librte_vhost/rte_vdpa.h b/lib/librte_vhost/rte_vdpa.h
@@ -28,2 +28,2 @@
---- a/lib/vhost/rte_vdpa.h
-+++ b/lib/vhost/rte_vdpa.h
+--- a/lib/librte_vhost/rte_vdpa.h
++++ b/lib/librte_vhost/rte_vdpa.h
@@ -51,4 +51,4 @@
-diff --git a/lib/vhost/rte_vhost_async.h b/lib/vhost/rte_vhost_async.h
-index 838c4778cc..f1293c6a9d 100644
---- a/lib/vhost/rte_vhost_async.h
-+++ b/lib/vhost/rte_vhost_async.h
+diff --git a/lib/librte_vhost/rte_vdpa_dev.h b/lib/librte_vhost/rte_vdpa_dev.h
+index bfada387b0..52f528ff20 100644
+--- a/lib/librte_vhost/rte_vdpa_dev.h
++++ b/lib/librte_vhost/rte_vdpa_dev.h
@@ -56,2 +56,2 @@
- #ifndef _RTE_VHOST_ASYNC_H_
- #define _RTE_VHOST_ASYNC_H_
+ #ifndef _RTE_VDPA_H_DEV_
+ #define _RTE_VDPA_H_DEV_
@@ -63 +63 @@
- #include <stdint.h>
+ #include <stdbool.h>
@@ -65,4 +65,4 @@
- #include <rte_compat.h>
-@@ -183,4 +187,8 @@ uint16_t rte_vhost_clear_queue_thread_unsafe(int vid, uint16_t queue_id,
- __rte_experimental
- int rte_vhost_async_dma_configure(int16_t dma_id, uint16_t vchan_id);
+ #include "rte_vhost.h"
+@@ -135,4 +139,8 @@ rte_vhost_host_notifier_ctrl(int vid, uint16_t qid, bool enable);
+ int
+ rte_vdpa_relay_vring_used(int vid, uint16_t qid, void *vring_m);
@@ -74,5 +74,5 @@
- #endif /* _RTE_VHOST_ASYNC_H_ */
-diff --git a/lib/vhost/rte_vhost_crypto.h b/lib/vhost/rte_vhost_crypto.h
-index f54d731139..b49e389579 100644
---- a/lib/vhost/rte_vhost_crypto.h
-+++ b/lib/vhost/rte_vhost_crypto.h
+ #endif /* _RTE_VDPA_DEV_H_ */
+diff --git a/lib/librte_vhost/rte_vhost_crypto.h b/lib/librte_vhost/rte_vhost_crypto.h
+index 8531757285..ef01f94aa5 100644
+--- a/lib/librte_vhost/rte_vhost_crypto.h
++++ b/lib/librte_vhost/rte_vhost_crypto.h
@@ -90 +90 @@
-@@ -132,4 +136,8 @@ uint16_t
+@@ -137,4 +141,8 @@ uint16_t
@@ -99,24 +98,0 @@
-diff --git a/lib/vhost/vdpa_driver.h b/lib/vhost/vdpa_driver.h
-index fddbd50652..88138be34a 100644
---- a/lib/vhost/vdpa_driver.h
-+++ b/lib/vhost/vdpa_driver.h
-@@ -5,6 +5,10 @@
- #ifndef _VDPA_DRIVER_H_
- #define _VDPA_DRIVER_H_
-
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
- #include <stdbool.h>
-
- #include <rte_compat.h>
-@@ -144,4 +148,8 @@ __rte_internal
- int
- rte_vdpa_relay_vring_used(int vid, uint16_t qid, void *vring_m);
-
-+#ifdef __cplusplus
-+}
-+#endif
-+
- #endif /* _VDPA_DRIVER_H_ */
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'ethdev: fix cast for C++ compatibility' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (8 preceding siblings ...)
2022-02-28 21:20 ` patch 'vhost: " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-02-28 21:20 ` patch 'dma/idxd: configure maximum batch size to high value' " luca.boccassi
` (39 subsequent siblings)
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Tyler Retzlaff, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/26bebaab5557171ceb47582bdc26b43922e5900c
Thanks.
Luca Boccassi
---
From 26bebaab5557171ceb47582bdc26b43922e5900c Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Tue, 15 Feb 2022 17:30:27 +0000
Subject: [PATCH] ethdev: fix cast for C++ compatibility
[ upstream commit 5ed2a2d4fdb696727b614f881f263851fad8832c ]
C++ does not allow implicit conversion to/from void*,
so we need an explicit cast to allow the driver SDK header
to be included from C++ code.
Fixes: e489007a411c ("ethdev: add generic create/destroy ethdev APIs")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
lib/librte_ethdev/rte_ethdev_pci.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/librte_ethdev/rte_ethdev_pci.h b/lib/librte_ethdev/rte_ethdev_pci.h
index e2c83fd941..d015697e21 100644
--- a/lib/librte_ethdev/rte_ethdev_pci.h
+++ b/lib/librte_ethdev/rte_ethdev_pci.h
@@ -50,8 +50,9 @@ rte_eth_copy_pci_info(struct rte_eth_dev *eth_dev,
}
static inline int
-eth_dev_pci_specific_init(struct rte_eth_dev *eth_dev, void *bus_device) {
- struct rte_pci_device *pci_dev = bus_device;
+eth_dev_pci_specific_init(struct rte_eth_dev *eth_dev, void *bus_device)
+{
+ struct rte_pci_device *pci_dev = (struct rte_pci_device *)bus_device;
if (!pci_dev)
return -ENODEV;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:54.871032504 +0000
+++ 0011-ethdev-fix-cast-for-C-compatibility.patch 2022-02-28 21:17:53.816928705 +0000
@@ -1 +1 @@
-From 5ed2a2d4fdb696727b614f881f263851fad8832c Mon Sep 17 00:00:00 2001
+From 26bebaab5557171ceb47582bdc26b43922e5900c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5ed2a2d4fdb696727b614f881f263851fad8832c ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -16 +17 @@
- lib/ethdev/ethdev_pci.h | 5 +++--
+ lib/librte_ethdev/rte_ethdev_pci.h | 5 +++--
@@ -19,4 +20,4 @@
-diff --git a/lib/ethdev/ethdev_pci.h b/lib/ethdev/ethdev_pci.h
-index 6130bcbd1f..0549842709 100644
---- a/lib/ethdev/ethdev_pci.h
-+++ b/lib/ethdev/ethdev_pci.h
+diff --git a/lib/librte_ethdev/rte_ethdev_pci.h b/lib/librte_ethdev/rte_ethdev_pci.h
+index e2c83fd941..d015697e21 100644
+--- a/lib/librte_ethdev/rte_ethdev_pci.h
++++ b/lib/librte_ethdev/rte_ethdev_pci.h
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'dma/idxd: configure maximum batch size to high value' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (9 preceding siblings ...)
2022-02-28 21:20 ` patch 'ethdev: fix cast for C++ compatibility' " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-02-28 21:20 ` patch 'examples/qos_sched: fix core mask overflow' " luca.boccassi
` (38 subsequent siblings)
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Bruce Richardson; +Cc: Kevin Laatz, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b56b636c578096b20d33290a549bd0d14dc39c56
Thanks.
Luca Boccassi
---
From b56b636c578096b20d33290a549bd0d14dc39c56 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Wed, 16 Feb 2022 16:06:08 +0000
Subject: [PATCH] dma/idxd: configure maximum batch size to high value
[ upstream commit 6a87d036a7ced87ba39406032c42ec2749b2cb88 ]
When configuring an Intel DSA instance using the utility script
dpdk_idxd_cfg.py, explicitly set the max supported batch size value to a
high value, to ensure large bursts are supported if so desired. The
default in the linux kernel is now just 32 [1], which may not be
sufficient for all DPDK apps.
[1] https://lore.kernel.org/r/163528473483.3926048.7950067926287180976.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Kevin Laatz <kevin.laatz@intel.com>
---
drivers/raw/ioat/dpdk_idxd_cfg.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/raw/ioat/dpdk_idxd_cfg.py b/drivers/raw/ioat/dpdk_idxd_cfg.py
index e999a27d45..6d6d3a801b 100755
--- a/drivers/raw/ioat/dpdk_idxd_cfg.py
+++ b/drivers/raw/ioat/dpdk_idxd_cfg.py
@@ -63,6 +63,7 @@ def configure_dsa(dsa_id, queues):
"mode": "dedicated",
"name": f"dpdk_wq{dsa_id}.{q}",
"priority": 1,
+ "max_batch_size": 1024,
"size": int(max_work_queues_size / nb_queues)})
# enable device and then queues
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:54.948502419 +0000
+++ 0012-dma-idxd-configure-maximum-batch-size-to-high-value.patch 2022-02-28 21:17:53.816928705 +0000
@@ -1 +1 @@
-From 6a87d036a7ced87ba39406032c42ec2749b2cb88 Mon Sep 17 00:00:00 2001
+From b56b636c578096b20d33290a549bd0d14dc39c56 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6a87d036a7ced87ba39406032c42ec2749b2cb88 ]
+
@@ -14,2 +15,0 @@
-Cc: stable@dpdk.org
-
@@ -19 +19 @@
- drivers/dma/idxd/dpdk_idxd_cfg.py | 1 +
+ drivers/raw/ioat/dpdk_idxd_cfg.py | 1 +
@@ -22,5 +22,5 @@
-diff --git a/drivers/dma/idxd/dpdk_idxd_cfg.py b/drivers/dma/idxd/dpdk_idxd_cfg.py
-index 34537cb980..3f5d5ee752 100755
---- a/drivers/dma/idxd/dpdk_idxd_cfg.py
-+++ b/drivers/dma/idxd/dpdk_idxd_cfg.py
-@@ -89,6 +89,7 @@ def configure_dsa(dsa_id, queues, prefix):
+diff --git a/drivers/raw/ioat/dpdk_idxd_cfg.py b/drivers/raw/ioat/dpdk_idxd_cfg.py
+index e999a27d45..6d6d3a801b 100755
+--- a/drivers/raw/ioat/dpdk_idxd_cfg.py
++++ b/drivers/raw/ioat/dpdk_idxd_cfg.py
+@@ -63,6 +63,7 @@ def configure_dsa(dsa_id, queues):
@@ -28 +28 @@
- "name": f"{prefix}_wq{dsa_id}.{q}",
+ "name": f"dpdk_wq{dsa_id}.{q}",
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'examples/qos_sched: fix core mask overflow' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (10 preceding siblings ...)
2022-02-28 21:20 ` patch 'dma/idxd: configure maximum batch size to high value' " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-03-01 18:29 ` Ajmera, Megha
2022-02-28 21:20 ` patch 'cryptodev: fix RSA key type name' " luca.boccassi
` (37 subsequent siblings)
49 siblings, 1 reply; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Megha Ajmera; +Cc: Morten Brørup, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a7aa7d8812abe4034027363036a0ec297574f49d
Thanks.
Luca Boccassi
---
From a7aa7d8812abe4034027363036a0ec297574f49d Mon Sep 17 00:00:00 2001
From: Megha Ajmera <megha.ajmera@intel.com>
Date: Wed, 23 Feb 2022 17:36:30 +0000
Subject: [PATCH] examples/qos_sched: fix core mask overflow
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 9c9fad3dfa042ae4b7a045cb1731f8701f8210e6 ]
Masking of core mask was incorrect. Instead of using 1U for shifting, it
should be using 1LU as the result is assigned to uint64.
CID 375859: Potentially overflowing expression "1U << app_main_core" with
type "unsigned int" (32 bits, unsigned) is evaluated using 32-bit
arithmetic, and then used in a context that expects an expression of
type "uint64_t" (64 bits, unsigned).
Coverity issue: 375859
Fixes: de3cfa2c9823 ("sched: initial import")
Signed-off-by: Megha Ajmera <megha.ajmera@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
---
examples/qos_sched/args.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/examples/qos_sched/args.c b/examples/qos_sched/args.c
index c369ba9b4d..891cfb2809 100644
--- a/examples/qos_sched/args.c
+++ b/examples/qos_sched/args.c
@@ -410,13 +410,13 @@ app_parse_args(int argc, char **argv)
/* check main core index validity */
for (i = 0; i <= app_main_core; i++) {
- if (app_used_core_mask & (1u << app_main_core)) {
+ if (app_used_core_mask & RTE_BIT64(app_main_core)) {
RTE_LOG(ERR, APP, "Main core index is not configured properly\n");
app_usage(prgname);
return -1;
}
}
- app_used_core_mask |= 1u << app_main_core;
+ app_used_core_mask |= RTE_BIT64(app_main_core);
if ((app_used_core_mask != app_eal_core_mask()) ||
(app_main_core != rte_get_main_lcore())) {
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:55.022866035 +0000
+++ 0013-examples-qos_sched-fix-core-mask-overflow.patch 2022-02-28 21:17:53.820928793 +0000
@@ -1 +1 @@
-From 9c9fad3dfa042ae4b7a045cb1731f8701f8210e6 Mon Sep 17 00:00:00 2001
+From a7aa7d8812abe4034027363036a0ec297574f49d Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 9c9fad3dfa042ae4b7a045cb1731f8701f8210e6 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 10ca7bea61..b2959499ae 100644
+index c369ba9b4d..891cfb2809 100644
@@ -31 +32 @@
-@@ -427,13 +427,13 @@ app_parse_args(int argc, char **argv)
+@@ -410,13 +410,13 @@ app_parse_args(int argc, char **argv)
^ permalink raw reply [flat|nested] 228+ messages in thread
* RE: patch 'examples/qos_sched: fix core mask overflow' has been queued to stable release 20.11.5
2022-02-28 21:20 ` patch 'examples/qos_sched: fix core mask overflow' " luca.boccassi
@ 2022-03-01 18:29 ` Ajmera, Megha
0 siblings, 0 replies; 228+ messages in thread
From: Ajmera, Megha @ 2022-03-01 18:29 UTC (permalink / raw)
To: luca.boccassi; +Cc: Morten Brørup, dpdk stable
Please go ahead and apply to the branch.
Regards,
Megha
> -----Original Message-----
> From: luca.boccassi@gmail.com <luca.boccassi@gmail.com>
> Sent: Tuesday, March 01, 2022 2:50 AM
> To: Ajmera, Megha <megha.ajmera@intel.com>
> Cc: Morten Brørup <mb@smartsharesystems.com>; dpdk stable
> <stable@dpdk.org>
> Subject: patch 'examples/qos_sched: fix core mask overflow' has been queued
> to stable release 20.11.5
>
> Hi,
>
> FYI, your patch has been queued to stable release 20.11.5
>
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
>
> This queued commit can be viewed at:
> https://github.com/bluca/dpdk-
> stable/commit/a7aa7d8812abe4034027363036a0ec297574f49d
>
> Thanks.
>
> Luca Boccassi
>
> ---
> From a7aa7d8812abe4034027363036a0ec297574f49d Mon Sep 17 00:00:00
> 2001
> From: Megha Ajmera <megha.ajmera@intel.com>
> Date: Wed, 23 Feb 2022 17:36:30 +0000
> Subject: [PATCH] examples/qos_sched: fix core mask overflow
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> [ upstream commit 9c9fad3dfa042ae4b7a045cb1731f8701f8210e6 ]
>
> Masking of core mask was incorrect. Instead of using 1U for shifting, it should
> be using 1LU as the result is assigned to uint64.
>
> CID 375859: Potentially overflowing expression "1U << app_main_core" with
> type "unsigned int" (32 bits, unsigned) is evaluated using 32-bit arithmetic, and
> then used in a context that expects an expression of type "uint64_t" (64 bits,
> unsigned).
>
> Coverity issue: 375859
> Fixes: de3cfa2c9823 ("sched: initial import")
>
> Signed-off-by: Megha Ajmera <megha.ajmera@intel.com>
> Acked-by: Morten Brørup <mb@smartsharesystems.com>
> ---
> examples/qos_sched/args.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/examples/qos_sched/args.c b/examples/qos_sched/args.c index
> c369ba9b4d..891cfb2809 100644
> --- a/examples/qos_sched/args.c
> +++ b/examples/qos_sched/args.c
> @@ -410,13 +410,13 @@ app_parse_args(int argc, char **argv)
>
> /* check main core index validity */
> for (i = 0; i <= app_main_core; i++) {
> - if (app_used_core_mask & (1u << app_main_core)) {
> + if (app_used_core_mask & RTE_BIT64(app_main_core)) {
> RTE_LOG(ERR, APP, "Main core index is not configured
> properly\n");
> app_usage(prgname);
> return -1;
> }
> }
> - app_used_core_mask |= 1u << app_main_core;
> + app_used_core_mask |= RTE_BIT64(app_main_core);
>
> if ((app_used_core_mask != app_eal_core_mask()) ||
> (app_main_core != rte_get_main_lcore())) {
> --
> 2.30.2
>
> ---
> Diff of the applied patch vs upstream commit (please double-check if non-
> empty:
> ---
> --- - 2022-02-28 21:17:55.022866035 +0000
> +++ 0013-examples-qos_sched-fix-core-mask-overflow.patch 2022-02-28
> 21:17:53.820928793 +0000
> @@ -1 +1 @@
> -From 9c9fad3dfa042ae4b7a045cb1731f8701f8210e6 Mon Sep 17 00:00:00
> 2001
> +From a7aa7d8812abe4034027363036a0ec297574f49d Mon Sep 17 00:00:00
> 2001
> @@ -8,0 +9,2 @@
> +[ upstream commit 9c9fad3dfa042ae4b7a045cb1731f8701f8210e6 ]
> +
> @@ -19 +20,0 @@
> -Cc: stable@dpdk.org
> @@ -28 +29 @@
> -index 10ca7bea61..b2959499ae 100644
> +index c369ba9b4d..891cfb2809 100644
> @@ -31 +32 @@
> -@@ -427,13 +427,13 @@ app_parse_args(int argc, char **argv)
> +@@ -410,13 +410,13 @@ app_parse_args(int argc, char **argv)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'cryptodev: fix RSA key type name' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (11 preceding siblings ...)
2022-02-28 21:20 ` patch 'examples/qos_sched: fix core mask overflow' " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-03-16 8:06 ` David Marchand
2022-02-28 21:20 ` patch 'doc: fix FIPS guide' " luca.boccassi
` (36 subsequent siblings)
49 siblings, 1 reply; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Arek Kusztal; +Cc: Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/7b5609a5a0e790f4d51ac19dc937a9c0ef203f5b
Thanks.
Luca Boccassi
---
From 7b5609a5a0e790f4d51ac19dc937a9c0ef203f5b Mon Sep 17 00:00:00 2001
From: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Date: Fri, 18 Feb 2022 07:53:32 +0000
Subject: [PATCH] cryptodev: fix RSA key type name
[ upstream commit 3387912f5cacd934594f2c7a0c34eda7279419a8 ]
This patch fixes misspelled RTE_RSA_KEY_TYPE_QT,
this will prevent checkpach from complaining wherever
change to RSA is being made.
Fixes: 26008aaed14c ("cryptodev: add asymmetric xform and op definitions")
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
app/test/test_cryptodev_asym.c | 2 +-
app/test/test_cryptodev_rsa_test_vectors.h | 2 +-
drivers/crypto/qat/qat_asym.c | 4 ++--
lib/librte_cryptodev/rte_crypto_asym.h | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c
index 85cd076059..af1310d9a2 100644
--- a/app/test/test_cryptodev_asym.c
+++ b/app/test/test_cryptodev_asym.c
@@ -559,7 +559,7 @@ test_one_case(const void *test_case, int sessionless)
status = test_cryptodev_asym_op(
&testsuite_params,
&tc, test_msg, sessionless, i,
- RTE_RSA_KET_TYPE_QT);
+ RTE_RSA_KEY_TYPE_QT);
}
if (status)
break;
diff --git a/app/test/test_cryptodev_rsa_test_vectors.h b/app/test/test_cryptodev_rsa_test_vectors.h
index 48a72e1492..04539a1ecf 100644
--- a/app/test/test_cryptodev_rsa_test_vectors.h
+++ b/app/test/test_cryptodev_rsa_test_vectors.h
@@ -378,7 +378,7 @@ struct rte_crypto_asym_xform rsa_xform_crt = {
.data = rsa_e,
.length = sizeof(rsa_e)
},
- .key_type = RTE_RSA_KET_TYPE_QT,
+ .key_type = RTE_RSA_KEY_TYPE_QT,
.qt = {
.p = {
.data = rsa_p,
diff --git a/drivers/crypto/qat/qat_asym.c b/drivers/crypto/qat/qat_asym.c
index 09d8761c5f..bd0bf5f0cb 100644
--- a/drivers/crypto/qat/qat_asym.c
+++ b/drivers/crypto/qat/qat_asym.c
@@ -97,7 +97,7 @@ static void qat_clear_arrays_by_alg(struct qat_asym_op_cookie *cookie,
qat_clear_arrays(cookie, QAT_ASYM_MODINV_NUM_IN_PARAMS,
QAT_ASYM_MODINV_NUM_OUT_PARAMS, alg_size);
else if (xform->xform_type == RTE_CRYPTO_ASYM_XFORM_RSA) {
- if (xform->rsa.key_type == RTE_RSA_KET_TYPE_QT)
+ if (xform->rsa.key_type == RTE_RSA_KEY_TYPE_QT)
qat_clear_arrays_crt(cookie, alg_size);
else {
qat_clear_arrays(cookie, QAT_ASYM_RSA_NUM_IN_PARAMS,
@@ -370,7 +370,7 @@ qat_asym_fill_arrays(struct rte_crypto_asym_op *asym_op,
return -(EINVAL);
}
}
- if (xform->rsa.key_type == RTE_RSA_KET_TYPE_QT) {
+ if (xform->rsa.key_type == RTE_RSA_KEY_TYPE_QT) {
qat_req->input_param_count =
QAT_ASYM_RSA_QT_NUM_IN_PARAMS;
diff --git a/lib/librte_cryptodev/rte_crypto_asym.h b/lib/librte_cryptodev/rte_crypto_asym.h
index 9c866f553f..9c5bb9233a 100644
--- a/lib/librte_cryptodev/rte_crypto_asym.h
+++ b/lib/librte_cryptodev/rte_crypto_asym.h
@@ -146,7 +146,7 @@ enum rte_crypto_rsa_padding_type {
enum rte_crypto_rsa_priv_key_type {
RTE_RSA_KEY_TYPE_EXP,
/**< RSA private key is an exponent */
- RTE_RSA_KET_TYPE_QT,
+ RTE_RSA_KEY_TYPE_QT,
/**< RSA private key is in quintuple format
* See rte_crypto_rsa_priv_key_qt
*/
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:55.136891942 +0000
+++ 0014-cryptodev-fix-RSA-key-type-name.patch 2022-02-28 21:17:53.832929056 +0000
@@ -1 +1 @@
-From 3387912f5cacd934594f2c7a0c34eda7279419a8 Mon Sep 17 00:00:00 2001
+From 7b5609a5a0e790f4d51ac19dc937a9c0ef203f5b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3387912f5cacd934594f2c7a0c34eda7279419a8 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
- lib/cryptodev/rte_crypto_asym.h | 2 +-
+ lib/librte_cryptodev/rte_crypto_asym.h | 2 +-
@@ -23 +24 @@
-index 7cda8bb081..573af2a537 100644
+index 85cd076059..af1310d9a2 100644
@@ -26 +27 @@
-@@ -549,7 +549,7 @@ test_one_case(const void *test_case, int sessionless)
+@@ -559,7 +559,7 @@ test_one_case(const void *test_case, int sessionless)
@@ -49 +50 @@
-index f46eefd4b3..27ce0337a7 100644
+index 09d8761c5f..bd0bf5f0cb 100644
@@ -70,5 +71,5 @@
-diff --git a/lib/cryptodev/rte_crypto_asym.h b/lib/cryptodev/rte_crypto_asym.h
-index 2eb0f001e3..cd24d4b07b 100644
---- a/lib/cryptodev/rte_crypto_asym.h
-+++ b/lib/cryptodev/rte_crypto_asym.h
-@@ -145,7 +145,7 @@ enum rte_crypto_rsa_padding_type {
+diff --git a/lib/librte_cryptodev/rte_crypto_asym.h b/lib/librte_cryptodev/rte_crypto_asym.h
+index 9c866f553f..9c5bb9233a 100644
+--- a/lib/librte_cryptodev/rte_crypto_asym.h
++++ b/lib/librte_cryptodev/rte_crypto_asym.h
+@@ -146,7 +146,7 @@ enum rte_crypto_rsa_padding_type {
^ permalink raw reply [flat|nested] 228+ messages in thread
* Re: patch 'cryptodev: fix RSA key type name' has been queued to stable release 20.11.5
2022-02-28 21:20 ` patch 'cryptodev: fix RSA key type name' " luca.boccassi
@ 2022-03-16 8:06 ` David Marchand
2022-03-22 9:18 ` Ray Kinsella
0 siblings, 1 reply; 228+ messages in thread
From: David Marchand @ 2022-03-16 8:06 UTC (permalink / raw)
To: Luca Boccassi, Kevin Traynor, Christian Ehrhardt
Cc: Arek Kusztal, Akhil Goyal, dpdk stable, Thomas Monjalon, Ray Kinsella
Hello Luca, Kevin, Christian,
On Mon, Feb 28, 2022 at 10:21 PM <luca.boccassi@gmail.com> wrote:
> Subject: [PATCH] cryptodev: fix RSA key type name
>
> [ upstream commit 3387912f5cacd934594f2c7a0c34eda7279419a8 ]
>
> This patch fixes misspelled RTE_RSA_KEY_TYPE_QT,
> this will prevent checkpach from complaining wherever
> change to RSA is being made.
>
> Fixes: 26008aaed14c ("cryptodev: add asymmetric xform and op definitions")
>
> Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
> Acked-by: Akhil Goyal <gakhil@marvell.com>
This patch triggers a warning from libabigail in UNH tests for 20.11 and 21.11:
type of 'anonymous
data member union {rte_crypto_rsa_xform rsa; rte_crypto_modex_xform
modex; rte_crypto_modinv_xform modinv; rte_crypto_dh_xform dh;
rte_crypto_dsa_xform dsa; rte_crypto_ec_xform ec;}' changed:
type size hasn't changed
1 data member change:
type of
'rte_crypto_rsa_xform rsa' changed:
type size hasn't changed
1 data member change:
type of
'rte_crypto_rsa_priv_key_type key_type' changed:
type size
hasn't changed
1
enumerator deletion:
'rte_crypto_rsa_priv_key_type::RTE_RSA_KET_TYPE_QT' value '1'
1
enumerator insertion:
'rte_crypto_rsa_priv_key_type::RTE_RSA_KEY_TYPE_QT' value '1'
type size hasn't changed
Error: ABI issue reported for 'abidiff --suppr
dpdk/devtools/libabigail.abignore --no-added-syms --headers-dir1
reference/include --headers-dir2 build_install/include
reference/dump/librte_ipsec.dump build_install/dump/librte_ipsec.dump'
ABIDIFF_ABI_CHANGE, this change requires a review (abidiff flagged
this as a potential issue).
This API is experimental, so changes are acceptable, but we are
missing a suppression rule similar to what is in the main repo:
; Ignore changes to rte_crypto_asym_op, asymmetric crypto API is experimental
[suppress_type]
name = rte_crypto_asym_op
Note to Thomas and myself: the next time we clean those rules, the
suppression rule on asymmetric crypto should be kept if still
experimental.
--
David Marchand
^ permalink raw reply [flat|nested] 228+ messages in thread
* Re: patch 'cryptodev: fix RSA key type name' has been queued to stable release 20.11.5
2022-03-16 8:06 ` David Marchand
@ 2022-03-22 9:18 ` Ray Kinsella
0 siblings, 0 replies; 228+ messages in thread
From: Ray Kinsella @ 2022-03-22 9:18 UTC (permalink / raw)
To: David Marchand
Cc: Luca Boccassi, Kevin Traynor, Christian Ehrhardt, Arek Kusztal,
Akhil Goyal, dpdk stable, Thomas Monjalon
David Marchand <david.marchand@redhat.com> writes:
> Hello Luca, Kevin, Christian,
>
> On Mon, Feb 28, 2022 at 10:21 PM <luca.boccassi@gmail.com> wrote:
>> Subject: [PATCH] cryptodev: fix RSA key type name
>>
>> [ upstream commit 3387912f5cacd934594f2c7a0c34eda7279419a8 ]
>>
>> This patch fixes misspelled RTE_RSA_KEY_TYPE_QT,
>> this will prevent checkpach from complaining wherever
>> change to RSA is being made.
>>
>> Fixes: 26008aaed14c ("cryptodev: add asymmetric xform and op definitions")
>>
>> Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
>> Acked-by: Akhil Goyal <gakhil@marvell.com>
>
> This patch triggers a warning from libabigail in UNH tests for 20.11 and 21.11:
>
> type of 'anonymous
> data member union {rte_crypto_rsa_xform rsa; rte_crypto_modex_xform
> modex; rte_crypto_modinv_xform modinv; rte_crypto_dh_xform dh;
> rte_crypto_dsa_xform dsa; rte_crypto_ec_xform ec;}' changed:
> type size hasn't changed
> 1 data member change:
> type of
> 'rte_crypto_rsa_xform rsa' changed:
> type size hasn't changed
> 1 data member change:
> type of
> 'rte_crypto_rsa_priv_key_type key_type' changed:
> type size
> hasn't changed
> 1
> enumerator deletion:
>
> 'rte_crypto_rsa_priv_key_type::RTE_RSA_KET_TYPE_QT' value '1'
> 1
> enumerator insertion:
>
> 'rte_crypto_rsa_priv_key_type::RTE_RSA_KEY_TYPE_QT' value '1'
> type size hasn't changed
>
> Error: ABI issue reported for 'abidiff --suppr
> dpdk/devtools/libabigail.abignore --no-added-syms --headers-dir1
> reference/include --headers-dir2 build_install/include
> reference/dump/librte_ipsec.dump build_install/dump/librte_ipsec.dump'
>
> ABIDIFF_ABI_CHANGE, this change requires a review (abidiff flagged
> this as a potential issue).
>
> This API is experimental, so changes are acceptable, but we are
> missing a suppression rule similar to what is in the main repo:
>
> ; Ignore changes to rte_crypto_asym_op, asymmetric crypto API is experimental
> [suppress_type]
> name = rte_crypto_asym_op
>
>
> Note to Thomas and myself: the next time we clean those rules, the
> suppression rule on asymmetric crypto should be kept if still
> experimental.
Might be worth adding a comment to that effect in libabigail, lest we
forget.
--
Regards, Ray K
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'doc: fix FIPS guide' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (12 preceding siblings ...)
2022-02-28 21:20 ` patch 'cryptodev: fix RSA key type name' " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-02-28 21:20 ` patch 'examples/l2fwd-crypto: fix port mask overflow' " luca.boccassi
` (35 subsequent siblings)
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Jakub Poczatek; +Cc: Fan Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/9d1d70c9c8f4e888573b3e705048913a11e98fcb
Thanks.
Luca Boccassi
---
From 9d1d70c9c8f4e888573b3e705048913a11e98fcb Mon Sep 17 00:00:00 2001
From: Jakub Poczatek <jakub.poczatek@intel.com>
Date: Wed, 9 Feb 2022 11:36:23 +0000
Subject: [PATCH] doc: fix FIPS guide
[ upstream commit 1998071cb654e06573181c9420ec3766e9518fa5 ]
Added missing step for converting SHA request files to correct
format. Replaced AES_GCM with GCM to follow the correct
naming format.
Fixes: 3d0fad56b74 ("examples/fips_validation: add crypto FIPS application")
Signed-off-by: Jakub Poczatek <jakub.poczatek@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
doc/guides/sample_app_ug/fips_validation.rst | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/doc/guides/sample_app_ug/fips_validation.rst b/doc/guides/sample_app_ug/fips_validation.rst
index 56df434215..39baea3346 100644
--- a/doc/guides/sample_app_ug/fips_validation.rst
+++ b/doc/guides/sample_app_ug/fips_validation.rst
@@ -77,11 +77,12 @@ Compiling the Application
.. code-block:: console
dos2unix AES/req/*
- dos2unix AES_GCM/req/*
+ dos2unix GCM/req/*
dos2unix CCM/req/*
dos2unix CMAC/req/*
dos2unix HMAC/req/*
dos2unix TDES/req/*
+ dos2unix SHA/req/*
Running the Application
-----------------------
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:55.218466066 +0000
+++ 0015-doc-fix-FIPS-guide.patch 2022-02-28 21:17:53.836929143 +0000
@@ -1 +1 @@
-From 1998071cb654e06573181c9420ec3766e9518fa5 Mon Sep 17 00:00:00 2001
+From 9d1d70c9c8f4e888573b3e705048913a11e98fcb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1998071cb654e06573181c9420ec3766e9518fa5 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'examples/l2fwd-crypto: fix port mask overflow' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (13 preceding siblings ...)
2022-02-28 21:20 ` patch 'doc: fix FIPS guide' " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-02-28 21:20 ` patch 'baseband/acc100: avoid out-of-bounds access' " luca.boccassi
` (34 subsequent siblings)
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Brian Dooley; +Cc: Akhil Goyal, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/ced86386114936f7692ebaef28f054c6510b4767
Thanks.
Luca Boccassi
---
From ced86386114936f7692ebaef28f054c6510b4767 Mon Sep 17 00:00:00 2001
From: Brian Dooley <brian.dooley@intel.com>
Date: Mon, 21 Feb 2022 18:06:58 +0000
Subject: [PATCH] examples/l2fwd-crypto: fix port mask overflow
[ upstream commit aaf4ac404362752e9c8effa4641bb480187d04ec ]
Coverity flags an issue with 32-bit value. If max ethports value is
configured with a value larger than 32 there will be an issue.
Coverity issue: 375863 Unintentional integer overflow
Fixes: 387259bd6c67 ("examples/l2fwd-crypto: add sample application")
Signed-off-by: Brian Dooley <brian.dooley@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
examples/l2fwd-crypto/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 05f953e242..c1e26f5dd4 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -2636,7 +2636,7 @@ initialize_ports(struct l2fwd_crypto_options *options)
last_portid = portid;
}
- l2fwd_enabled_port_mask |= (1 << portid);
+ l2fwd_enabled_port_mask |= (1ULL << portid);
enabled_portcount++;
}
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:55.296068342 +0000
+++ 0016-examples-l2fwd-crypto-fix-port-mask-overflow.patch 2022-02-28 21:17:53.840929230 +0000
@@ -1 +1 @@
-From aaf4ac404362752e9c8effa4641bb480187d04ec Mon Sep 17 00:00:00 2001
+From ced86386114936f7692ebaef28f054c6510b4767 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit aaf4ac404362752e9c8effa4641bb480187d04ec ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 4d9f8861af..bbdb263143 100644
+index 05f953e242..c1e26f5dd4 100644
@@ -23 +24 @@
-@@ -2719,7 +2719,7 @@ initialize_ports(struct l2fwd_crypto_options *options)
+@@ -2636,7 +2636,7 @@ initialize_ports(struct l2fwd_crypto_options *options)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'baseband/acc100: avoid out-of-bounds access' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (14 preceding siblings ...)
2022-02-28 21:20 ` patch 'examples/l2fwd-crypto: fix port mask overflow' " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-02-28 21:20 ` patch 'crypto/virtio: fix " luca.boccassi
` (33 subsequent siblings)
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Nicolas Chautru; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/dceebf9eebb3e47717d5cc33e478e4c65ffcafeb
Thanks.
Luca Boccassi
---
From dceebf9eebb3e47717d5cc33e478e4c65ffcafeb Mon Sep 17 00:00:00 2001
From: Nicolas Chautru <nicolas.chautru@intel.com>
Date: Tue, 22 Feb 2022 15:43:36 -0800
Subject: [PATCH] baseband/acc100: avoid out-of-bounds access
[ upstream commit fb6996eec066dc7fa0eda951e492a65c8380d930 ]
The actual maximum number of gather pointers should have been limited
Coverity issue: 375803, 375813, 375819, 375827, 375831
Fixes: 5ad5060f8f7a ("baseband/acc100: add LDPC processing functions")
Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
---
drivers/baseband/acc100/rte_acc100_pmd.c | 3 +--
drivers/baseband/acc100/rte_acc100_pmd.h | 1 +
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c
index 05fd467768..c13eb454f9 100644
--- a/drivers/baseband/acc100/rte_acc100_pmd.c
+++ b/drivers/baseband/acc100/rte_acc100_pmd.c
@@ -1458,8 +1458,7 @@ acc100_dma_fill_blk_type_in(struct acc100_dma_req_desc *desc,
next_triplet++;
while (cb_len > 0) {
- if (next_triplet < ACC100_DMA_MAX_NUM_POINTERS &&
- m->next != NULL) {
+ if (next_triplet < ACC100_DMA_MAX_NUM_POINTERS_IN && m->next != NULL) {
m = m->next;
*seg_total_left = rte_pktmbuf_data_len(m);
diff --git a/drivers/baseband/acc100/rte_acc100_pmd.h b/drivers/baseband/acc100/rte_acc100_pmd.h
index 03ed0b3e1a..cbcece2966 100644
--- a/drivers/baseband/acc100/rte_acc100_pmd.h
+++ b/drivers/baseband/acc100/rte_acc100_pmd.h
@@ -113,6 +113,7 @@
#define ACC100_SW_RING_MEM_ALLOC_ATTEMPTS 5
#define ACC100_MAX_QUEUE_DEPTH 1024
#define ACC100_DMA_MAX_NUM_POINTERS 14
+#define ACC100_DMA_MAX_NUM_POINTERS_IN 7
#define ACC100_DMA_DESC_PADDING 8
#define ACC100_FCW_PADDING 12
#define ACC100_DESC_FCW_OFFSET 192
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:55.370660707 +0000
+++ 0017-baseband-acc100-avoid-out-of-bounds-access.patch 2022-02-28 21:17:53.852929494 +0000
@@ -1 +1 @@
-From fb6996eec066dc7fa0eda951e492a65c8380d930 Mon Sep 17 00:00:00 2001
+From dceebf9eebb3e47717d5cc33e478e4c65ffcafeb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fb6996eec066dc7fa0eda951e492a65c8380d930 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index f86474f7e0..de7e4bcef4 100644
+index 05fd467768..c13eb454f9 100644
@@ -22 +23 @@
-@@ -1460,8 +1460,7 @@ acc100_dma_fill_blk_type_in(struct acc100_dma_req_desc *desc,
+@@ -1458,8 +1458,7 @@ acc100_dma_fill_blk_type_in(struct acc100_dma_req_desc *desc,
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'crypto/virtio: fix out-of-bounds access' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (15 preceding siblings ...)
2022-02-28 21:20 ` patch 'baseband/acc100: avoid out-of-bounds access' " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-02-28 21:20 ` patch 'crypto/ipsec_mb: fix ZUC authentication verify' " luca.boccassi
` (32 subsequent siblings)
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Brian Dooley; +Cc: Fan Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/2eb55ed0243f32abb1b089a7b771638100cbd413
Thanks.
Luca Boccassi
---
From 2eb55ed0243f32abb1b089a7b771638100cbd413 Mon Sep 17 00:00:00 2001
From: Brian Dooley <brian.dooley@intel.com>
Date: Tue, 22 Feb 2022 09:54:51 +0000
Subject: [PATCH] crypto/virtio: fix out-of-bounds access
[ upstream commit a965e768065ae496c9a1c7a77545bc0f0f0e38e2 ]
Coverity flags an untrusted loop bound. Check length of session iv.
Coverity issue: 375802
Fixes: b063e843fa03 ("crypto/virtio: fix IV physical address")
Signed-off-by: Brian Dooley <brian.dooley@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
drivers/crypto/virtio/virtio_rxtx.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/crypto/virtio/virtio_rxtx.c b/drivers/crypto/virtio/virtio_rxtx.c
index e1cb4ad104..8b391a4fce 100644
--- a/drivers/crypto/virtio/virtio_rxtx.c
+++ b/drivers/crypto/virtio/virtio_rxtx.c
@@ -264,6 +264,9 @@ virtqueue_crypto_sym_enqueue_xmit(
if (cop->phys_addr)
desc[idx].addr = cop->phys_addr + session->iv.offset;
else {
+ if (session->iv.length > VIRTIO_CRYPTO_MAX_IV_SIZE)
+ return -ENOMEM;
+
rte_memcpy(crypto_op_cookie->iv,
rte_crypto_op_ctod_offset(cop,
uint8_t *, session->iv.offset),
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:55.451914896 +0000
+++ 0018-crypto-virtio-fix-out-of-bounds-access.patch 2022-02-28 21:17:53.856929582 +0000
@@ -1 +1 @@
-From a965e768065ae496c9a1c7a77545bc0f0f0e38e2 Mon Sep 17 00:00:00 2001
+From 2eb55ed0243f32abb1b089a7b771638100cbd413 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a965e768065ae496c9a1c7a77545bc0f0f0e38e2 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index a65524a306..08359b3a39 100644
+index e1cb4ad104..8b391a4fce 100644
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'crypto/ipsec_mb: fix ZUC authentication verify' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (16 preceding siblings ...)
2022-02-28 21:20 ` patch 'crypto/virtio: fix " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-02-28 21:20 ` patch 'crypto/ipsec_mb: fix ZUC operation overwrite' " luca.boccassi
` (31 subsequent siblings)
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Pablo de Lara; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/4bc8222a12bbf5eb56906d2eb15e3900a0dd436b
Thanks.
Luca Boccassi
---
From 4bc8222a12bbf5eb56906d2eb15e3900a0dd436b Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Wed, 23 Feb 2022 16:01:14 +0000
Subject: [PATCH] crypto/ipsec_mb: fix ZUC authentication verify
[ upstream commit bd3769739b3897865b1f0d2886ce1fe8a88eac75 ]
ZUC authentication is done over multiple buffers at a time.
When authentication verification is done, multiple scratch buffers
are using to generate the tags that will be compared afterwards.
However, the same scratch buffer was used always, instead of having
different ones for each crypto operation.
Fixes: 0b133c36ad7d ("crypto/zuc: support IPsec Multi-buffer lib v0.54")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
drivers/crypto/zuc/rte_zuc_pmd.c | 3 +--
drivers/crypto/zuc/zuc_pmd_private.h | 3 ++-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c
index 28ce961c77..c1eb42754d 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd.c
@@ -11,7 +11,6 @@
#include <rte_cpuflags.h>
#include "zuc_pmd_private.h"
-#define ZUC_MAX_BURST 16
#define BYTE_LEN 8
static uint8_t cryptodev_driver_id;
@@ -264,7 +263,7 @@ process_zuc_hash_op(struct zuc_qp *qp, struct rte_crypto_op **ops,
hash_keys[i] = sess->pKey_hash;
if (sess->auth_op == RTE_CRYPTO_AUTH_OP_VERIFY)
- dst[i] = (uint32_t *)qp->temp_digest;
+ dst[i] = (uint32_t *)qp->temp_digest[i];
else
dst[i] = (uint32_t *)ops[i]->sym->auth.digest.data;
diff --git a/drivers/crypto/zuc/zuc_pmd_private.h b/drivers/crypto/zuc/zuc_pmd_private.h
index d8684891ee..e01f1378c6 100644
--- a/drivers/crypto/zuc/zuc_pmd_private.h
+++ b/drivers/crypto/zuc/zuc_pmd_private.h
@@ -19,6 +19,7 @@ extern int zuc_logtype_driver;
#define ZUC_IV_KEY_LENGTH 16
#define ZUC_DIGEST_LENGTH 4
+#define ZUC_MAX_BURST 16
/** private data structure for each virtual ZUC device */
struct zuc_private {
@@ -42,7 +43,7 @@ struct zuc_qp {
/**< Session Private Data Mempool */
struct rte_cryptodev_stats qp_stats;
/**< Queue pair statistics */
- uint8_t temp_digest[ZUC_DIGEST_LENGTH];
+ uint8_t temp_digest[ZUC_MAX_BURST][ZUC_DIGEST_LENGTH];
/**< Buffer used to store the digest generated
* by the driver when verifying a digest provided
* by the user (using authentication verify operation)
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:55.527212030 +0000
+++ 0019-crypto-ipsec_mb-fix-ZUC-authentication-verify.patch 2022-02-28 21:17:53.860929669 +0000
@@ -1 +1 @@
-From bd3769739b3897865b1f0d2886ce1fe8a88eac75 Mon Sep 17 00:00:00 2001
+From 4bc8222a12bbf5eb56906d2eb15e3900a0dd436b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bd3769739b3897865b1f0d2886ce1fe8a88eac75 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -17,3 +18,3 @@
- drivers/crypto/ipsec_mb/pmd_zuc.c | 2 +-
- drivers/crypto/ipsec_mb/pmd_zuc_priv.h | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
+ drivers/crypto/zuc/rte_zuc_pmd.c | 3 +--
+ drivers/crypto/zuc/zuc_pmd_private.h | 3 ++-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
@@ -21,5 +22,13 @@
-diff --git a/drivers/crypto/ipsec_mb/pmd_zuc.c b/drivers/crypto/ipsec_mb/pmd_zuc.c
-index ec83d96dfc..07cf1462d2 100644
---- a/drivers/crypto/ipsec_mb/pmd_zuc.c
-+++ b/drivers/crypto/ipsec_mb/pmd_zuc.c
-@@ -166,7 +166,7 @@ process_zuc_hash_op(struct ipsec_mb_qp *qp, struct rte_crypto_op **ops,
+diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c
+index 28ce961c77..c1eb42754d 100644
+--- a/drivers/crypto/zuc/rte_zuc_pmd.c
++++ b/drivers/crypto/zuc/rte_zuc_pmd.c
+@@ -11,7 +11,6 @@
+ #include <rte_cpuflags.h>
+
+ #include "zuc_pmd_private.h"
+-#define ZUC_MAX_BURST 16
+ #define BYTE_LEN 8
+
+ static uint8_t cryptodev_driver_id;
+@@ -264,7 +263,7 @@ process_zuc_hash_op(struct zuc_qp *qp, struct rte_crypto_op **ops,
@@ -29,2 +38,2 @@
-- dst[i] = (uint32_t *)qp_data->temp_digest;
-+ dst[i] = (uint32_t *)qp_data->temp_digest[i];
+- dst[i] = (uint32_t *)qp->temp_digest;
++ dst[i] = (uint32_t *)qp->temp_digest[i];
@@ -34,5 +43,5 @@
-diff --git a/drivers/crypto/ipsec_mb/pmd_zuc_priv.h b/drivers/crypto/ipsec_mb/pmd_zuc_priv.h
-index 46d5bfae37..76fd6758c2 100644
---- a/drivers/crypto/ipsec_mb/pmd_zuc_priv.h
-+++ b/drivers/crypto/ipsec_mb/pmd_zuc_priv.h
-@@ -75,7 +75,7 @@ struct zuc_session {
+diff --git a/drivers/crypto/zuc/zuc_pmd_private.h b/drivers/crypto/zuc/zuc_pmd_private.h
+index d8684891ee..e01f1378c6 100644
+--- a/drivers/crypto/zuc/zuc_pmd_private.h
++++ b/drivers/crypto/zuc/zuc_pmd_private.h
+@@ -19,6 +19,7 @@ extern int zuc_logtype_driver;
@@ -40 +49,3 @@
- struct zuc_qp_data {
+ #define ZUC_IV_KEY_LENGTH 16
+ #define ZUC_DIGEST_LENGTH 4
++#define ZUC_MAX_BURST 16
@@ -41,0 +53,6 @@
+ /** private data structure for each virtual ZUC device */
+ struct zuc_private {
+@@ -42,7 +43,7 @@ struct zuc_qp {
+ /**< Session Private Data Mempool */
+ struct rte_cryptodev_stats qp_stats;
+ /**< Queue pair statistics */
@@ -44 +61 @@
- /* *< Buffers used to store the digest generated
+ /**< Buffer used to store the digest generated
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'crypto/ipsec_mb: fix ZUC operation overwrite' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (17 preceding siblings ...)
2022-02-28 21:20 ` patch 'crypto/ipsec_mb: fix ZUC authentication verify' " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-02-28 21:20 ` patch 'net/nfb: fix array indexes in deinit functions' " luca.boccassi
` (30 subsequent siblings)
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Pablo de Lara; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/92d7cb4446e4538032aa22546416ad4a05bb8e03
Thanks.
Luca Boccassi
---
From 92d7cb4446e4538032aa22546416ad4a05bb8e03 Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Wed, 23 Feb 2022 16:01:15 +0000
Subject: [PATCH] crypto/ipsec_mb: fix ZUC operation overwrite
[ upstream commit 96d0dc2a3cd21d6f392347ae1d2ff3c21e27231a ]
ZUC PMD batches crypto operations depending on their type
(encryption + tag generation, tag verification + decryption, etc),
to allow parallelization.
The array used to store the pointers to these operations was
always the same array provided by dequeue_burst() function,
and it was looping around the same positions (from 0 to ZUC_MAX_BURST - 1).
A new internal array is used to avoid overwriting the pointers
of the array provided by dequeue_burst() function.
Fixes: cf7685d68f00 ("crypto/zuc: add driver for ZUC library")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
drivers/crypto/zuc/rte_zuc_pmd.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c
index c1eb42754d..2f8a34e4f1 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd.c
@@ -358,11 +358,11 @@ static uint16_t
zuc_pmd_enqueue_burst(void *queue_pair, struct rte_crypto_op **ops,
uint16_t nb_ops)
{
- struct rte_crypto_op *c_ops[ZUC_MAX_BURST];
struct rte_crypto_op *curr_c_op;
struct zuc_session *curr_sess;
struct zuc_session *sessions[ZUC_MAX_BURST];
+ struct rte_crypto_op *int_c_ops[ZUC_MAX_BURST];
enum zuc_operation prev_zuc_op = ZUC_OP_NOT_SUPPORTED;
enum zuc_operation curr_zuc_op;
struct zuc_qp *qp = queue_pair;
@@ -389,11 +389,11 @@ zuc_pmd_enqueue_burst(void *queue_pair, struct rte_crypto_op **ops,
*/
if (burst_size == 0) {
prev_zuc_op = curr_zuc_op;
- c_ops[0] = curr_c_op;
+ int_c_ops[0] = curr_c_op;
sessions[0] = curr_sess;
burst_size++;
} else if (curr_zuc_op == prev_zuc_op) {
- c_ops[burst_size] = curr_c_op;
+ int_c_ops[burst_size] = curr_c_op;
sessions[burst_size] = curr_sess;
burst_size++;
/*
@@ -401,7 +401,7 @@ zuc_pmd_enqueue_burst(void *queue_pair, struct rte_crypto_op **ops,
* process them, and start a new batch.
*/
if (burst_size == ZUC_MAX_BURST) {
- processed_ops = process_ops(c_ops, curr_zuc_op,
+ processed_ops = process_ops(int_c_ops, curr_zuc_op,
sessions, qp, burst_size,
&enqueued_ops);
if (processed_ops < burst_size) {
@@ -416,7 +416,7 @@ zuc_pmd_enqueue_burst(void *queue_pair, struct rte_crypto_op **ops,
* Different operation type, process the ops
* of the previous type.
*/
- processed_ops = process_ops(c_ops, prev_zuc_op,
+ processed_ops = process_ops(int_c_ops, prev_zuc_op,
sessions, qp, burst_size,
&enqueued_ops);
if (processed_ops < burst_size) {
@@ -427,7 +427,7 @@ zuc_pmd_enqueue_burst(void *queue_pair, struct rte_crypto_op **ops,
burst_size = 0;
prev_zuc_op = curr_zuc_op;
- c_ops[0] = curr_c_op;
+ int_c_ops[0] = curr_c_op;
sessions[0] = curr_sess;
burst_size++;
}
@@ -435,7 +435,7 @@ zuc_pmd_enqueue_burst(void *queue_pair, struct rte_crypto_op **ops,
if (burst_size != 0) {
/* Process the crypto ops of the last operation type. */
- processed_ops = process_ops(c_ops, prev_zuc_op,
+ processed_ops = process_ops(int_c_ops, prev_zuc_op,
sessions, qp, burst_size,
&enqueued_ops);
}
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:55.601964414 +0000
+++ 0020-crypto-ipsec_mb-fix-ZUC-operation-overwrite.patch 2022-02-28 21:17:53.860929669 +0000
@@ -1 +1 @@
-From 96d0dc2a3cd21d6f392347ae1d2ff3c21e27231a Mon Sep 17 00:00:00 2001
+From 92d7cb4446e4538032aa22546416ad4a05bb8e03 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 96d0dc2a3cd21d6f392347ae1d2ff3c21e27231a ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -21,2 +22,2 @@
- drivers/crypto/ipsec_mb/pmd_zuc.c | 13 +++++++------
- 1 file changed, 7 insertions(+), 6 deletions(-)
+ drivers/crypto/zuc/rte_zuc_pmd.c | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
@@ -24,5 +25,10 @@
-diff --git a/drivers/crypto/ipsec_mb/pmd_zuc.c b/drivers/crypto/ipsec_mb/pmd_zuc.c
-index 07cf1462d2..e36c7092d6 100644
---- a/drivers/crypto/ipsec_mb/pmd_zuc.c
-+++ b/drivers/crypto/ipsec_mb/pmd_zuc.c
-@@ -259,6 +259,7 @@ zuc_pmd_dequeue_burst(void *queue_pair,
+diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c
+index c1eb42754d..2f8a34e4f1 100644
+--- a/drivers/crypto/zuc/rte_zuc_pmd.c
++++ b/drivers/crypto/zuc/rte_zuc_pmd.c
+@@ -358,11 +358,11 @@ static uint16_t
+ zuc_pmd_enqueue_burst(void *queue_pair, struct rte_crypto_op **ops,
+ uint16_t nb_ops)
+ {
+- struct rte_crypto_op *c_ops[ZUC_MAX_BURST];
+ struct rte_crypto_op *curr_c_op;
@@ -33,4 +39,4 @@
- enum ipsec_mb_operation prev_zuc_op = IPSEC_MB_OP_NOT_SUPPORTED;
- enum ipsec_mb_operation curr_zuc_op;
- struct ipsec_mb_qp *qp = queue_pair;
-@@ -290,11 +291,11 @@ zuc_pmd_dequeue_burst(void *queue_pair,
+ enum zuc_operation prev_zuc_op = ZUC_OP_NOT_SUPPORTED;
+ enum zuc_operation curr_zuc_op;
+ struct zuc_qp *qp = queue_pair;
+@@ -389,11 +389,11 @@ zuc_pmd_enqueue_burst(void *queue_pair, struct rte_crypto_op **ops,
@@ -50 +56 @@
-@@ -302,7 +303,7 @@ zuc_pmd_dequeue_burst(void *queue_pair,
+@@ -401,7 +401,7 @@ zuc_pmd_enqueue_burst(void *queue_pair, struct rte_crypto_op **ops,
@@ -56 +62,2 @@
- sessions, qp, burst_size);
+ sessions, qp, burst_size,
+ &enqueued_ops);
@@ -58,2 +65 @@
- burst_size = 0;
-@@ -316,7 +317,7 @@ zuc_pmd_dequeue_burst(void *queue_pair,
+@@ -416,7 +416,7 @@ zuc_pmd_enqueue_burst(void *queue_pair, struct rte_crypto_op **ops,
@@ -65 +71,2 @@
- sessions, qp, burst_size);
+ sessions, qp, burst_size,
+ &enqueued_ops);
@@ -67,2 +74 @@
- burst_size = 0;
-@@ -326,7 +327,7 @@ zuc_pmd_dequeue_burst(void *queue_pair,
+@@ -427,7 +427,7 @@ zuc_pmd_enqueue_burst(void *queue_pair, struct rte_crypto_op **ops,
@@ -77 +83 @@
-@@ -334,7 +335,7 @@ zuc_pmd_dequeue_burst(void *queue_pair,
+@@ -435,7 +435,7 @@ zuc_pmd_enqueue_burst(void *queue_pair, struct rte_crypto_op **ops,
@@ -83 +89,2 @@
- sessions, qp, burst_size);
+ sessions, qp, burst_size,
+ &enqueued_ops);
@@ -85 +91,0 @@
-
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/nfb: fix array indexes in deinit functions' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (18 preceding siblings ...)
2022-02-28 21:20 ` patch 'crypto/ipsec_mb: fix ZUC operation overwrite' " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-02-28 21:20 ` patch 'net/nfb: fix multicast/promiscuous mode switching' " luca.boccassi
` (29 subsequent siblings)
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Martin Spinler; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/aa27fa7968f1890e3f6679dd8310aa15ce0eb27a
Thanks.
Luca Boccassi
---
From aa27fa7968f1890e3f6679dd8310aa15ce0eb27a Mon Sep 17 00:00:00 2001
From: Martin Spinler <spinler@cesnet.cz>
Date: Tue, 15 Feb 2022 13:55:39 +0100
Subject: [PATCH] net/nfb: fix array indexes in deinit functions
[ upstream commit 8a4c8edb1154a58bad807cdc2ca947773e2ee8f1 ]
The indexes in the for cycle were wrongly used and
the code accessed outside of the rxmac/txmac array.
Fixes: 6435f9a0ac22 ("net/nfb: add new netcope driver")
Signed-off-by: Martin Spinler <spinler@cesnet.cz>
---
drivers/net/nfb/nfb_ethdev.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/drivers/net/nfb/nfb_ethdev.c b/drivers/net/nfb/nfb_ethdev.c
index c55bcdf1ef..d7c0879ef5 100644
--- a/drivers/net/nfb/nfb_ethdev.c
+++ b/drivers/net/nfb/nfb_ethdev.c
@@ -77,9 +77,10 @@ static void
nfb_nc_rxmac_deinit(struct nc_rxmac *rxmac[RTE_MAX_NC_RXMAC],
uint16_t max_rxmac)
{
- for (; max_rxmac > 0; --max_rxmac) {
- nc_rxmac_close(rxmac[max_rxmac]);
- rxmac[max_rxmac] = NULL;
+ uint16_t i;
+ for (i = 0; i < max_rxmac; i++) {
+ nc_rxmac_close(rxmac[i]);
+ rxmac[i] = NULL;
}
}
@@ -95,9 +96,10 @@ static void
nfb_nc_txmac_deinit(struct nc_txmac *txmac[RTE_MAX_NC_TXMAC],
uint16_t max_txmac)
{
- for (; max_txmac > 0; --max_txmac) {
- nc_txmac_close(txmac[max_txmac]);
- txmac[max_txmac] = NULL;
+ uint16_t i;
+ for (i = 0; i < max_txmac; i++) {
+ nc_txmac_close(txmac[i]);
+ txmac[i] = NULL;
}
}
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:55.674850674 +0000
+++ 0021-net-nfb-fix-array-indexes-in-deinit-functions.patch 2022-02-28 21:17:53.864929757 +0000
@@ -1 +1 @@
-From 8a4c8edb1154a58bad807cdc2ca947773e2ee8f1 Mon Sep 17 00:00:00 2001
+From aa27fa7968f1890e3f6679dd8310aa15ce0eb27a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8a4c8edb1154a58bad807cdc2ca947773e2ee8f1 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 3c39937816..0b27fe78cc 100644
+index c55bcdf1ef..d7c0879ef5 100644
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/nfb: fix multicast/promiscuous mode switching' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (19 preceding siblings ...)
2022-02-28 21:20 ` patch 'net/nfb: fix array indexes in deinit functions' " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-02-28 21:20 ` patch 'net/ixgbe: reset security context pointer on close' " luca.boccassi
` (28 subsequent siblings)
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Martin Spinler; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/3a4dd2649ffc6fafafd9990f561856ba49005f1c
Thanks.
Luca Boccassi
---
From 3a4dd2649ffc6fafafd9990f561856ba49005f1c Mon Sep 17 00:00:00 2001
From: Martin Spinler <spinler@cesnet.cz>
Date: Tue, 15 Feb 2022 13:55:42 +0100
Subject: [PATCH] net/nfb: fix multicast/promiscuous mode switching
[ upstream commit 6685343c4805fcae80bad449903d848409193bd8 ]
In the firmware, the promisc mode overrides the multicast mode.
So when the promisc mode is turned off, driver must check if the
multicast mode was active before and conditionally reactivate it.
Fixes: 6435f9a0ac22 ("net/nfb: add new netcope driver")
Signed-off-by: Martin Spinler <spinler@cesnet.cz>
---
drivers/net/nfb/nfb.h | 4 ----
drivers/net/nfb/nfb_ethdev.c | 1 -
drivers/net/nfb/nfb_rxmode.c | 20 ++++++++------------
3 files changed, 8 insertions(+), 17 deletions(-)
diff --git a/drivers/net/nfb/nfb.h b/drivers/net/nfb/nfb.h
index 59d3ab4986..96c44c3a45 100644
--- a/drivers/net/nfb/nfb.h
+++ b/drivers/net/nfb/nfb.h
@@ -48,10 +48,6 @@ struct pmd_internals {
char nfb_dev[PATH_MAX];
struct nfb_device *nfb;
- /* Place to remember if filter was promiscuous or filtering by table,
- * when disabling allmulticast
- */
- enum nc_rxmac_mac_filter rx_filter_original;
};
#endif /* _NFB_H_ */
diff --git a/drivers/net/nfb/nfb_ethdev.c b/drivers/net/nfb/nfb_ethdev.c
index d7c0879ef5..6740bc65c5 100644
--- a/drivers/net/nfb/nfb_ethdev.c
+++ b/drivers/net/nfb/nfb_ethdev.c
@@ -516,7 +516,6 @@ nfb_eth_dev_init(struct rte_eth_dev *dev)
data->promiscuous = nfb_eth_promiscuous_get(dev);
data->all_multicast = nfb_eth_allmulticast_get(dev);
- internals->rx_filter_original = data->promiscuous;
dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
diff --git a/drivers/net/nfb/nfb_rxmode.c b/drivers/net/nfb/nfb_rxmode.c
index 2d0b613d21..ca6e4d5578 100644
--- a/drivers/net/nfb/nfb_rxmode.c
+++ b/drivers/net/nfb/nfb_rxmode.c
@@ -14,8 +14,6 @@ nfb_eth_promiscuous_enable(struct rte_eth_dev *dev)
dev->data->dev_private;
uint16_t i;
- internals->rx_filter_original = RXMAC_MAC_FILTER_PROMISCUOUS;
-
for (i = 0; i < internals->max_rxmac; ++i) {
nc_rxmac_mac_filter_enable(internals->rxmac[i],
RXMAC_MAC_FILTER_PROMISCUOUS);
@@ -30,16 +28,13 @@ nfb_eth_promiscuous_disable(struct rte_eth_dev *dev)
struct pmd_internals *internals = (struct pmd_internals *)
dev->data->dev_private;
uint16_t i;
+ enum nc_rxmac_mac_filter filter = RXMAC_MAC_FILTER_TABLE_BCAST;
- internals->rx_filter_original = RXMAC_MAC_FILTER_TABLE;
-
- /* if promisc is not enabled, do nothing */
- if (!nfb_eth_promiscuous_get(dev))
- return 0;
+ if (dev->data->all_multicast)
+ filter = RXMAC_MAC_FILTER_TABLE_BCAST_MCAST;
for (i = 0; i < internals->max_rxmac; ++i) {
- nc_rxmac_mac_filter_enable(internals->rxmac[i],
- RXMAC_MAC_FILTER_TABLE);
+ nc_rxmac_mac_filter_enable(internals->rxmac[i], filter);
}
return 0;
@@ -67,6 +62,8 @@ nfb_eth_allmulticast_enable(struct rte_eth_dev *dev)
dev->data->dev_private;
uint16_t i;
+ if (dev->data->promiscuous)
+ return 0;
for (i = 0; i < internals->max_rxmac; ++i) {
nc_rxmac_mac_filter_enable(internals->rxmac[i],
RXMAC_MAC_FILTER_TABLE_BCAST_MCAST);
@@ -83,13 +80,12 @@ nfb_eth_allmulticast_disable(struct rte_eth_dev *dev)
uint16_t i;
- /* if multicast is not enabled do nothing */
- if (!nfb_eth_allmulticast_get(dev))
+ if (dev->data->promiscuous)
return 0;
for (i = 0; i < internals->max_rxmac; ++i) {
nc_rxmac_mac_filter_enable(internals->rxmac[i],
- internals->rx_filter_original);
+ RXMAC_MAC_FILTER_TABLE_BCAST);
}
return 0;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:55.754979786 +0000
+++ 0022-net-nfb-fix-multicast-promiscuous-mode-switching.patch 2022-02-28 21:17:53.868929845 +0000
@@ -1 +1 @@
-From 6685343c4805fcae80bad449903d848409193bd8 Mon Sep 17 00:00:00 2001
+From 3a4dd2649ffc6fafafd9990f561856ba49005f1c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6685343c4805fcae80bad449903d848409193bd8 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 4de9006ac0..7dc5bd29e4 100644
+index 59d3ab4986..96c44c3a45 100644
@@ -24 +25 @@
-@@ -47,10 +47,6 @@ struct pmd_internals {
+@@ -48,10 +48,6 @@ struct pmd_internals {
@@ -36 +37 @@
-index 53a98642b3..5d503e131a 100644
+index d7c0879ef5..6740bc65c5 100644
@@ -39 +40 @@
-@@ -534,7 +534,6 @@ nfb_eth_dev_init(struct rte_eth_dev *dev)
+@@ -516,7 +516,6 @@ nfb_eth_dev_init(struct rte_eth_dev *dev)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/ixgbe: reset security context pointer on close' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (20 preceding siblings ...)
2022-02-28 21:20 ` patch 'net/nfb: fix multicast/promiscuous mode switching' " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-02-28 21:20 ` patch 'app/testpmd: check starting port is not in bonding' " luca.boccassi
` (27 subsequent siblings)
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Yunjian Wang; +Cc: Haiyue Wang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f85bba14cc776268d0e7540256b85df822c74c7e
Thanks.
Luca Boccassi
---
From f85bba14cc776268d0e7540256b85df822c74c7e Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Tue, 15 Feb 2022 21:01:51 +0800
Subject: [PATCH] net/ixgbe: reset security context pointer on close
[ upstream commit 848a37cead7bd604d51b5f04507fea3e59e9088e ]
When ixgbe_dev_close() is cleaning up, it does not correctly set
the security_ctx variable to NULL, which will lead to wild pointer.
Fixes: 9a0752f498d2 ("net/ixgbe: enable inline IPsec")
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
---
drivers/net/ixgbe/ixgbe_ethdev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 0853ae05d6..c741698d70 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -3055,6 +3055,7 @@ ixgbe_dev_close(struct rte_eth_dev *dev)
#ifdef RTE_LIB_SECURITY
rte_free(dev->security_ctx);
+ dev->security_ctx = NULL;
#endif
return ret;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:55.831962002 +0000
+++ 0023-net-ixgbe-reset-security-context-pointer-on-close.patch 2022-02-28 21:17:53.884930196 +0000
@@ -1 +1 @@
-From 848a37cead7bd604d51b5f04507fea3e59e9088e Mon Sep 17 00:00:00 2001
+From f85bba14cc776268d0e7540256b85df822c74c7e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 848a37cead7bd604d51b5f04507fea3e59e9088e ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 3d799d2187..7643842560 100644
+index 0853ae05d6..c741698d70 100644
@@ -22 +23 @@
-@@ -3038,6 +3038,7 @@ ixgbe_dev_close(struct rte_eth_dev *dev)
+@@ -3055,6 +3055,7 @@ ixgbe_dev_close(struct rte_eth_dev *dev)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'app/testpmd: check starting port is not in bonding' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (21 preceding siblings ...)
2022-02-28 21:20 ` patch 'net/ixgbe: reset security context pointer on close' " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-02-28 21:20 ` patch 'vhost: fix field naming in guest page struct' " luca.boccassi
` (26 subsequent siblings)
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Min Hu (Connor); +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/85ec94182b8437f701a82109ab0c3bdf6096cd0f
Thanks.
Luca Boccassi
---
From 85ec94182b8437f701a82109ab0c3bdf6096cd0f Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Thu, 17 Feb 2022 19:36:55 +0800
Subject: [PATCH] app/testpmd: check starting port is not in bonding
[ upstream commit d8c079a572f3b76ca22fbfe665fb2e5e578ba881 ]
In bond, start or stop slave port should be operated by bonding port.
This patch add port_is_bonding_slave in start_port function.
Fixes: 0e545d3047fe ("app/testpmd: check stopping port is not in bonding")
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
app/test-pmd/testpmd.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 7e4b96d442..1a7488d8dc 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2442,6 +2442,13 @@ start_port(portid_t pid)
if (pid != pi && pid != (portid_t)RTE_PORT_ALL)
continue;
+ if (port_is_bonding_slave(pi)) {
+ fprintf(stderr,
+ "Please remove port %d from bonded device.\n",
+ pi);
+ continue;
+ }
+
need_check_link_status = 0;
port = &ports[pi];
if (rte_atomic16_cmpset(&(port->port_status), RTE_PORT_STOPPED,
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:55.918679778 +0000
+++ 0024-app-testpmd-check-starting-port-is-not-in-bonding.patch 2022-02-28 21:17:53.892930370 +0000
@@ -1 +1 @@
-From d8c079a572f3b76ca22fbfe665fb2e5e578ba881 Mon Sep 17 00:00:00 2001
+From 85ec94182b8437f701a82109ab0c3bdf6096cd0f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d8c079a572f3b76ca22fbfe665fb2e5e578ba881 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 6d2e52c790..fe2ce19f99 100644
+index 7e4b96d442..1a7488d8dc 100644
@@ -22 +23 @@
-@@ -2726,6 +2726,13 @@ start_port(portid_t pid)
+@@ -2442,6 +2442,13 @@ start_port(portid_t pid)
@@ -35 +36 @@
- if (port->port_status == RTE_PORT_STOPPED)
+ if (rte_atomic16_cmpset(&(port->port_status), RTE_PORT_STOPPED,
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'vhost: fix field naming in guest page struct' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (22 preceding siblings ...)
2022-02-28 21:20 ` patch 'app/testpmd: check starting port is not in bonding' " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-02-28 21:20 ` patch 'vhost: fix unsafe vring addresses modifications' " luca.boccassi
` (25 subsequent siblings)
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Xuan Ding; +Cc: Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/37936eb9ef29c14517cf5229486f53fb29bfe79e
Thanks.
Luca Boccassi
---
From 37936eb9ef29c14517cf5229486f53fb29bfe79e Mon Sep 17 00:00:00 2001
From: Xuan Ding <xuan.ding@intel.com>
Date: Tue, 15 Feb 2022 15:02:25 +0000
Subject: [PATCH] vhost: fix field naming in guest page struct
[ upstream commit 2ec359747e61db15ab18a78fa35f503a4f647463 ]
This patch renames the host_phys_addr to host_iova in guest_page
struct. The host_phys_addr is iova, it depends on the DPDK
IOVA mode.
Fixes: e246896178e6 ("vhost: get guest/host physical address mappings")
Signed-off-by: Xuan Ding <xuan.ding@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
lib/librte_vhost/vhost.h | 10 +++++-----
lib/librte_vhost/vhost_user.c | 20 ++++++++++----------
lib/librte_vhost/virtio_net.c | 8 ++++----
3 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
index 36d6fdabd8..92b67a2c6f 100644
--- a/lib/librte_vhost/vhost.h
+++ b/lib/librte_vhost/vhost.h
@@ -333,7 +333,7 @@ struct vring_packed_desc_event {
struct guest_page {
uint64_t guest_phys_addr;
- uint64_t host_phys_addr;
+ uint64_t host_iova;
uint64_t size;
};
@@ -596,13 +596,13 @@ gpa_to_first_hpa(struct virtio_net *dev, uint64_t gpa,
if (gpa + gpa_size <=
page->guest_phys_addr + page->size) {
return gpa - page->guest_phys_addr +
- page->host_phys_addr;
+ page->host_iova;
} else if (gpa < page->guest_phys_addr +
page->size) {
*hpa_size = page->guest_phys_addr +
page->size - gpa;
return gpa - page->guest_phys_addr +
- page->host_phys_addr;
+ page->host_iova;
}
}
} else {
@@ -613,13 +613,13 @@ gpa_to_first_hpa(struct virtio_net *dev, uint64_t gpa,
if (gpa + gpa_size <=
page->guest_phys_addr + page->size) {
return gpa - page->guest_phys_addr +
- page->host_phys_addr;
+ page->host_iova;
} else if (gpa < page->guest_phys_addr +
page->size) {
*hpa_size = page->guest_phys_addr +
page->size - gpa;
return gpa - page->guest_phys_addr +
- page->host_phys_addr;
+ page->host_iova;
}
}
}
diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 843bfbbfd9..0ee54def9c 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -903,7 +903,7 @@ vhost_user_set_vring_base(struct virtio_net **pdev,
static int
add_one_guest_page(struct virtio_net *dev, uint64_t guest_phys_addr,
- uint64_t host_phys_addr, uint64_t size)
+ uint64_t host_iova, uint64_t size)
{
struct guest_page *page, *last_page;
struct guest_page *old_pages;
@@ -924,7 +924,7 @@ add_one_guest_page(struct virtio_net *dev, uint64_t guest_phys_addr,
if (dev->nr_guest_pages > 0) {
last_page = &dev->guest_pages[dev->nr_guest_pages - 1];
/* merge if the two pages are continuous */
- if (host_phys_addr == last_page->host_phys_addr +
+ if (host_iova == last_page->host_iova +
last_page->size) {
last_page->size += size;
return 0;
@@ -933,7 +933,7 @@ add_one_guest_page(struct virtio_net *dev, uint64_t guest_phys_addr,
page = &dev->guest_pages[dev->nr_guest_pages++];
page->guest_phys_addr = guest_phys_addr;
- page->host_phys_addr = host_phys_addr;
+ page->host_iova = host_iova;
page->size = size;
return 0;
@@ -946,14 +946,14 @@ add_guest_pages(struct virtio_net *dev, struct rte_vhost_mem_region *reg,
uint64_t reg_size = reg->size;
uint64_t host_user_addr = reg->host_user_addr;
uint64_t guest_phys_addr = reg->guest_phys_addr;
- uint64_t host_phys_addr;
+ uint64_t host_iova;
uint64_t size;
- host_phys_addr = rte_mem_virt2iova((void *)(uintptr_t)host_user_addr);
+ host_iova = rte_mem_virt2iova((void *)(uintptr_t)host_user_addr);
size = page_size - (guest_phys_addr & (page_size - 1));
size = RTE_MIN(size, reg_size);
- if (add_one_guest_page(dev, guest_phys_addr, host_phys_addr, size) < 0)
+ if (add_one_guest_page(dev, guest_phys_addr, host_iova, size) < 0)
return -1;
host_user_addr += size;
@@ -962,9 +962,9 @@ add_guest_pages(struct virtio_net *dev, struct rte_vhost_mem_region *reg,
while (reg_size > 0) {
size = RTE_MIN(reg_size, page_size);
- host_phys_addr = rte_mem_virt2iova((void *)(uintptr_t)
+ host_iova = rte_mem_virt2iova((void *)(uintptr_t)
host_user_addr);
- if (add_one_guest_page(dev, guest_phys_addr, host_phys_addr,
+ if (add_one_guest_page(dev, guest_phys_addr, host_iova,
size) < 0)
return -1;
@@ -996,11 +996,11 @@ dump_guest_pages(struct virtio_net *dev)
VHOST_LOG_CONFIG(INFO,
"guest physical page region %u\n"
"\t guest_phys_addr: %" PRIx64 "\n"
- "\t host_phys_addr : %" PRIx64 "\n"
+ "\t host_iova : %" PRIx64 "\n"
"\t size : %" PRIx64 "\n",
i,
page->guest_phys_addr,
- page->host_phys_addr,
+ page->host_iova,
page->size);
}
}
diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index e165a70afc..d4e9da308a 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -990,7 +990,7 @@ async_mbuf_to_desc(struct virtio_net *dev, struct vhost_virtqueue *vq,
uint32_t tlen = 0;
int tvec_idx = 0;
- void *hpa;
+ void *host_iova;
if (unlikely(m == NULL)) {
error = -1;
@@ -1081,11 +1081,11 @@ async_mbuf_to_desc(struct virtio_net *dev, struct vhost_virtqueue *vq,
cpy_len = RTE_MIN(buf_avail, mbuf_avail);
while (unlikely(cpy_len && cpy_len >= cpy_threshold)) {
- hpa = (void *)(uintptr_t)gpa_to_first_hpa(dev,
+ host_iova = (void *)(uintptr_t)gpa_to_first_hpa(dev,
buf_iova + buf_offset,
cpy_len, &mapped_len);
- if (unlikely(!hpa || mapped_len < cpy_threshold))
+ if (unlikely(!host_iova || mapped_len < cpy_threshold))
break;
async_fill_vec(src_iovec + tvec_idx,
@@ -1093,7 +1093,7 @@ async_mbuf_to_desc(struct virtio_net *dev, struct vhost_virtqueue *vq,
mbuf_offset), (size_t)mapped_len);
async_fill_vec(dst_iovec + tvec_idx,
- hpa, (size_t)mapped_len);
+ host_iova, (size_t)mapped_len);
tlen += (uint32_t)mapped_len;
cpy_len -= (uint32_t)mapped_len;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:55.999244109 +0000
+++ 0025-vhost-fix-field-naming-in-guest-page-struct.patch 2022-02-28 21:17:53.904930633 +0000
@@ -1 +1 @@
-From 2ec359747e61db15ab18a78fa35f503a4f647463 Mon Sep 17 00:00:00 2001
+From 37936eb9ef29c14517cf5229486f53fb29bfe79e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2ec359747e61db15ab18a78fa35f503a4f647463 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -16,4 +17,4 @@
- lib/vhost/vhost.h | 10 +++++-----
- lib/vhost/vhost_user.c | 20 ++++++++++----------
- lib/vhost/virtio_net.c | 11 ++++++-----
- 3 files changed, 21 insertions(+), 20 deletions(-)
+ lib/librte_vhost/vhost.h | 10 +++++-----
+ lib/librte_vhost/vhost_user.c | 20 ++++++++++----------
+ lib/librte_vhost/virtio_net.c | 8 ++++----
+ 3 files changed, 19 insertions(+), 19 deletions(-)
@@ -21,5 +22,5 @@
-diff --git a/lib/vhost/vhost.h b/lib/vhost/vhost.h
-index 64ec76b80e..5606360414 100644
---- a/lib/vhost/vhost.h
-+++ b/lib/vhost/vhost.h
-@@ -424,7 +424,7 @@ struct vring_packed_desc_event {
+diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
+index 36d6fdabd8..92b67a2c6f 100644
+--- a/lib/librte_vhost/vhost.h
++++ b/lib/librte_vhost/vhost.h
+@@ -333,7 +333,7 @@ struct vring_packed_desc_event {
@@ -34 +35 @@
-@@ -687,13 +687,13 @@ gpa_to_first_hpa(struct virtio_net *dev, uint64_t gpa,
+@@ -596,13 +596,13 @@ gpa_to_first_hpa(struct virtio_net *dev, uint64_t gpa,
@@ -50 +51 @@
-@@ -704,13 +704,13 @@ gpa_to_first_hpa(struct virtio_net *dev, uint64_t gpa,
+@@ -613,13 +613,13 @@ gpa_to_first_hpa(struct virtio_net *dev, uint64_t gpa,
@@ -66,5 +67,5 @@
-diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
-index 4f135f1f72..8257a92e12 100644
---- a/lib/vhost/vhost_user.c
-+++ b/lib/vhost/vhost_user.c
-@@ -986,7 +986,7 @@ vhost_user_set_vring_base(struct virtio_net **pdev,
+diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
+index 843bfbbfd9..0ee54def9c 100644
+--- a/lib/librte_vhost/vhost_user.c
++++ b/lib/librte_vhost/vhost_user.c
+@@ -903,7 +903,7 @@ vhost_user_set_vring_base(struct virtio_net **pdev,
@@ -79 +80 @@
-@@ -1007,7 +1007,7 @@ add_one_guest_page(struct virtio_net *dev, uint64_t guest_phys_addr,
+@@ -924,7 +924,7 @@ add_one_guest_page(struct virtio_net *dev, uint64_t guest_phys_addr,
@@ -88 +89 @@
-@@ -1016,7 +1016,7 @@ add_one_guest_page(struct virtio_net *dev, uint64_t guest_phys_addr,
+@@ -933,7 +933,7 @@ add_one_guest_page(struct virtio_net *dev, uint64_t guest_phys_addr,
@@ -97 +98 @@
-@@ -1029,14 +1029,14 @@ add_guest_pages(struct virtio_net *dev, struct rte_vhost_mem_region *reg,
+@@ -946,14 +946,14 @@ add_guest_pages(struct virtio_net *dev, struct rte_vhost_mem_region *reg,
@@ -115 +116 @@
-@@ -1045,9 +1045,9 @@ add_guest_pages(struct virtio_net *dev, struct rte_vhost_mem_region *reg,
+@@ -962,9 +962,9 @@ add_guest_pages(struct virtio_net *dev, struct rte_vhost_mem_region *reg,
@@ -127,10 +128,12 @@
-@@ -1080,8 +1080,8 @@ dump_guest_pages(struct virtio_net *dev)
- dev->ifname, i);
- VHOST_LOG_CONFIG(INFO, "(%s)\tguest_phys_addr: %" PRIx64 "\n",
- dev->ifname, page->guest_phys_addr);
-- VHOST_LOG_CONFIG(INFO, "(%s)\thost_phys_addr : %" PRIx64 "\n",
-- dev->ifname, page->host_phys_addr);
-+ VHOST_LOG_CONFIG(INFO, "(%s)\thost_iova : %" PRIx64 "\n",
-+ dev->ifname, page->host_iova);
- VHOST_LOG_CONFIG(INFO, "(%s)\tsize : %" PRIx64 "\n",
- dev->ifname, page->size);
+@@ -996,11 +996,11 @@ dump_guest_pages(struct virtio_net *dev)
+ VHOST_LOG_CONFIG(INFO,
+ "guest physical page region %u\n"
+ "\t guest_phys_addr: %" PRIx64 "\n"
+- "\t host_phys_addr : %" PRIx64 "\n"
++ "\t host_iova : %" PRIx64 "\n"
+ "\t size : %" PRIx64 "\n",
+ i,
+ page->guest_phys_addr,
+- page->host_phys_addr,
++ page->host_iova,
+ page->size);
@@ -138,8 +141,9 @@
-diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c
-index 886e076b28..5f432b0d77 100644
---- a/lib/vhost/virtio_net.c
-+++ b/lib/vhost/virtio_net.c
-@@ -1004,20 +1004,21 @@ async_mbuf_to_desc_seg(struct virtio_net *dev, struct vhost_virtqueue *vq,
- struct vhost_async *async = vq->async;
- uint64_t mapped_len;
- uint32_t buf_offset = 0;
+ }
+diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
+index e165a70afc..d4e9da308a 100644
+--- a/lib/librte_vhost/virtio_net.c
++++ b/lib/librte_vhost/virtio_net.c
+@@ -990,7 +990,7 @@ async_mbuf_to_desc(struct virtio_net *dev, struct vhost_virtqueue *vq,
+
+ uint32_t tlen = 0;
+ int tvec_idx = 0;
@@ -149,18 +153,22 @@
- while (cpy_len) {
-- hpa = (void *)(uintptr_t)gpa_to_first_hpa(dev,
-+ host_iova = (void *)(uintptr_t)gpa_to_first_hpa(dev,
- buf_iova + buf_offset, cpy_len, &mapped_len);
-- if (unlikely(!hpa)) {
-- VHOST_LOG_DATA(ERR, "(%s) %s: failed to get hpa.\n", dev->ifname, __func__);
-+ if (unlikely(!host_iova)) {
-+ VHOST_LOG_DATA(ERR, "(%s) %s: failed to get host iova.\n",
-+ dev->ifname, __func__);
- return -1;
- }
-
- if (unlikely(async_iter_add_iovec(dev, async,
- (void *)(uintptr_t)rte_pktmbuf_iova_offset(m,
- mbuf_offset),
-- hpa, (size_t)mapped_len)))
-+ host_iova, (size_t)mapped_len)))
- return -1;
+ if (unlikely(m == NULL)) {
+ error = -1;
+@@ -1081,11 +1081,11 @@ async_mbuf_to_desc(struct virtio_net *dev, struct vhost_virtqueue *vq,
+ cpy_len = RTE_MIN(buf_avail, mbuf_avail);
+
+ while (unlikely(cpy_len && cpy_len >= cpy_threshold)) {
+- hpa = (void *)(uintptr_t)gpa_to_first_hpa(dev,
++ host_iova = (void *)(uintptr_t)gpa_to_first_hpa(dev,
+ buf_iova + buf_offset,
+ cpy_len, &mapped_len);
+
+- if (unlikely(!hpa || mapped_len < cpy_threshold))
++ if (unlikely(!host_iova || mapped_len < cpy_threshold))
+ break;
+
+ async_fill_vec(src_iovec + tvec_idx,
+@@ -1093,7 +1093,7 @@ async_mbuf_to_desc(struct virtio_net *dev, struct vhost_virtqueue *vq,
+ mbuf_offset), (size_t)mapped_len);
+
+ async_fill_vec(dst_iovec + tvec_idx,
+- hpa, (size_t)mapped_len);
++ host_iova, (size_t)mapped_len);
@@ -168 +176,2 @@
- cpy_len -= (uint32_t)mapped_len;
+ tlen += (uint32_t)mapped_len;
+ cpy_len -= (uint32_t)mapped_len;
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'vhost: fix unsafe vring addresses modifications' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (23 preceding siblings ...)
2022-02-28 21:20 ` patch 'vhost: fix field naming in guest page struct' " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-02-28 21:20 ` patch 'net/af_xdp: add missing trailing newline in logs' " luca.boccassi
` (24 subsequent siblings)
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Maxime Coquelin; +Cc: Chenbo Xia, David Marchand, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/33f2e375618602da76c84d408876edd34c179740
Thanks.
Luca Boccassi
---
From 33f2e375618602da76c84d408876edd34c179740 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Thu, 27 Jan 2022 12:09:53 +0100
Subject: [PATCH] vhost: fix unsafe vring addresses modifications
[ upstream commit 04c27cb673b983ce2580731c0afc4b0e815fd658 ]
This patch adds missing protection around vring_invalidate
and translate_ring_addresses calls in vhost_user_iotlb_msg.
Fixes: eefac9536a90 ("vhost: postpone device creation until rings are mapped")
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
lib/librte_vhost/vhost_user.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 0ee54def9c..11d58113a7 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -2379,8 +2379,11 @@ vhost_user_iotlb_msg(struct virtio_net **pdev, struct VhostUserMsg *msg,
vhost_user_iotlb_cache_insert(vq, imsg->iova, vva,
len, imsg->perm);
- if (is_vring_iotlb(dev, vq, imsg))
+ if (is_vring_iotlb(dev, vq, imsg)) {
+ rte_spinlock_lock(&vq->access_lock);
*pdev = dev = translate_ring_addresses(dev, i);
+ rte_spinlock_unlock(&vq->access_lock);
+ }
}
break;
case VHOST_IOTLB_INVALIDATE:
@@ -2393,8 +2396,11 @@ vhost_user_iotlb_msg(struct virtio_net **pdev, struct VhostUserMsg *msg,
vhost_user_iotlb_cache_remove(vq, imsg->iova,
imsg->size);
- if (is_vring_iotlb(dev, vq, imsg))
+ if (is_vring_iotlb(dev, vq, imsg)) {
+ rte_spinlock_lock(&vq->access_lock);
vring_invalidate(dev, vq);
+ rte_spinlock_unlock(&vq->access_lock);
+ }
}
break;
default:
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:56.055035138 +0000
+++ 0026-vhost-fix-unsafe-vring-addresses-modifications.patch 2022-02-28 21:17:53.912930808 +0000
@@ -1 +1 @@
-From 04c27cb673b983ce2580731c0afc4b0e815fd658 Mon Sep 17 00:00:00 2001
+From 33f2e375618602da76c84d408876edd34c179740 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 04c27cb673b983ce2580731c0afc4b0e815fd658 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -16 +17 @@
- lib/vhost/vhost_user.c | 10 ++++++++--
+ lib/librte_vhost/vhost_user.c | 10 ++++++++--
@@ -19,6 +20,6 @@
-diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
-index 8ee9c3e2db..723c6890c3 100644
---- a/lib/vhost/vhost_user.c
-+++ b/lib/vhost/vhost_user.c
-@@ -2564,8 +2564,11 @@ vhost_user_iotlb_msg(struct virtio_net **pdev,
- vhost_user_iotlb_cache_insert(dev, vq, imsg->iova, vva,
+diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
+index 0ee54def9c..11d58113a7 100644
+--- a/lib/librte_vhost/vhost_user.c
++++ b/lib/librte_vhost/vhost_user.c
+@@ -2379,8 +2379,11 @@ vhost_user_iotlb_msg(struct virtio_net **pdev, struct VhostUserMsg *msg,
+ vhost_user_iotlb_cache_insert(vq, imsg->iova, vva,
@@ -36 +37 @@
-@@ -2578,8 +2581,11 @@ vhost_user_iotlb_msg(struct virtio_net **pdev,
+@@ -2393,8 +2396,11 @@ vhost_user_iotlb_msg(struct virtio_net **pdev, struct VhostUserMsg *msg,
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/af_xdp: add missing trailing newline in logs' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (24 preceding siblings ...)
2022-02-28 21:20 ` patch 'vhost: fix unsafe vring addresses modifications' " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-02-28 21:20 ` patch 'net/af_xdp: ensure socket is deleted on Rx queue setup error' " luca.boccassi
` (23 subsequent siblings)
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: David Marchand; +Cc: Ciara Loftus, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/92f88226d93fee87198688fa3ae99509b0922451
Thanks.
Luca Boccassi
---
From 92f88226d93fee87198688fa3ae99509b0922451 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 17 Feb 2022 14:06:14 +0100
Subject: [PATCH] net/af_xdp: add missing trailing newline in logs
[ upstream commit 744fd4126937b7f195fac38ae24cab52d0922b04 ]
Caught while trying --in-memory mode, some log messages in this driver
are not terminated with a newline:
rte_pmd_af_xdp_probe(): net_af_xdp: Failed to register multi-process IPC
callback: Operation not supportedvdev_probe(): failed to initialize
net_af_xdp device
Other locations in this driver had the same issue, fix all at once.
Fixes: f1debd77efaf ("net/af_xdp: introduce AF_XDP PMD")
Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks")
Fixes: 9876cf8316b3 ("net/af_xdp: re-enable secondary process support")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ciara Loftus <ciara.loftus@intel.com>
---
drivers/net/af_xdp/rte_eth_af_xdp.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index a8f50b14e3..eaf93695ec 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -958,7 +958,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
umem = rte_zmalloc_socket("umem", sizeof(*umem), 0,
rte_socket_id());
if (umem == NULL) {
- AF_XDP_LOG(ERR, "Failed to allocate umem info");
+ AF_XDP_LOG(ERR, "Failed to allocate umem info\n");
return NULL;
}
@@ -971,7 +971,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
ret = xsk_umem__create(&umem->umem, base_addr, umem_size,
&rxq->fq, &rxq->cq, &usr_config);
if (ret) {
- AF_XDP_LOG(ERR, "Failed to create umem");
+ AF_XDP_LOG(ERR, "Failed to create umem\n");
goto err;
}
umem->buffer = base_addr;
@@ -1005,7 +1005,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
umem = rte_zmalloc_socket("umem", sizeof(*umem), 0, rte_socket_id());
if (umem == NULL) {
- AF_XDP_LOG(ERR, "Failed to allocate umem info");
+ AF_XDP_LOG(ERR, "Failed to allocate umem info\n");
return NULL;
}
@@ -1041,7 +1041,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
&usr_config);
if (ret) {
- AF_XDP_LOG(ERR, "Failed to create umem");
+ AF_XDP_LOG(ERR, "Failed to create umem\n");
goto err;
}
umem->mz = mz;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:56.135143599 +0000
+++ 0027-net-af_xdp-add-missing-trailing-newline-in-logs.patch 2022-02-28 21:17:53.916930897 +0000
@@ -1 +1 @@
-From 744fd4126937b7f195fac38ae24cab52d0922b04 Mon Sep 17 00:00:00 2001
+From 92f88226d93fee87198688fa3ae99509b0922451 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 744fd4126937b7f195fac38ae24cab52d0922b04 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -22,2 +23,2 @@
- drivers/net/af_xdp/rte_eth_af_xdp.c | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
+ drivers/net/af_xdp/rte_eth_af_xdp.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
@@ -26 +27 @@
-index 2163df7c5c..69dfa1b898 100644
+index a8f50b14e3..eaf93695ec 100644
@@ -29 +30 @@
-@@ -1071,7 +1071,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
+@@ -958,7 +958,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
@@ -38 +39 @@
-@@ -1084,7 +1084,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
+@@ -971,7 +971,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
@@ -47 +48 @@
-@@ -1124,7 +1124,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
+@@ -1005,7 +1005,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
@@ -56 +57 @@
-@@ -1160,7 +1160,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
+@@ -1041,7 +1041,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
@@ -65,18 +65,0 @@
-@@ -1847,7 +1847,7 @@ afxdp_mp_request_fds(const char *name, struct rte_eth_dev *dev)
- AF_XDP_LOG(DEBUG, "Sending multi-process IPC request for %s\n", name);
- ret = rte_mp_request_sync(&request, &replies, &timeout);
- if (ret < 0 || replies.nb_received != 1) {
-- AF_XDP_LOG(ERR, "Failed to request fds from primary: %d",
-+ AF_XDP_LOG(ERR, "Failed to request fds from primary: %d\n",
- rte_errno);
- return -1;
- }
-@@ -1996,7 +1996,7 @@ rte_pmd_af_xdp_probe(struct rte_vdev_device *dev)
- if (!afxdp_dev_count) {
- ret = rte_mp_action_register(ETH_AF_XDP_MP_KEY, afxdp_mp_send_fds);
- if (ret < 0 && rte_errno != ENOTSUP) {
-- AF_XDP_LOG(ERR, "%s: Failed to register multi-process IPC callback: %s",
-+ AF_XDP_LOG(ERR, "%s: Failed to register multi-process IPC callback: %s\n",
- name, strerror(rte_errno));
- return -1;
- }
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/af_xdp: ensure socket is deleted on Rx queue setup error' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (25 preceding siblings ...)
2022-02-28 21:20 ` patch 'net/af_xdp: add missing trailing newline in logs' " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-02-28 21:20 ` patch 'net/ice: fix overwriting of LSE bit by DCF' " luca.boccassi
` (22 subsequent siblings)
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Ciara Loftus; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b1b1cd71e95f12cc41e70595a9a9e8aaeb32d279
Thanks.
Luca Boccassi
---
From b1b1cd71e95f12cc41e70595a9a9e8aaeb32d279 Mon Sep 17 00:00:00 2001
From: Ciara Loftus <ciara.loftus@intel.com>
Date: Fri, 18 Feb 2022 11:20:36 +0000
Subject: [PATCH] net/af_xdp: ensure socket is deleted on Rx queue setup error
[ upstream commit b26431a617e4039e6c0f65c5ee56f62f347b686b ]
The Rx queue setup can fail for many reasons eg. failure to setup the
custom program, failure to allocate or reserve fill queue buffers,
failure to configure busy polling etc. When a failure like one of these
occurs, if the xsk is already set up it should be deleted before
returning. This commit ensures this happens.
Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks")
Fixes: 288a85aef192 ("net/af_xdp: enable custom XDP program loading")
Fixes: 055a393626ed ("net/af_xdp: prefer busy polling")
Fixes: 01fa83c94d7e ("net/af_xdp: workaround custom program loading")
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
---
drivers/net/af_xdp/rte_eth_af_xdp.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index eaf93695ec..efe7b80e7a 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -1125,7 +1125,7 @@ xsk_configure(struct pmd_internals *internals, struct pkt_rx_queue *rxq,
if (ret) {
AF_XDP_LOG(ERR, "Failed to load custom XDP program %s\n",
internals->prog_path);
- goto err;
+ goto out_umem;
}
internals->custom_prog_configured = 1;
}
@@ -1141,26 +1141,27 @@ xsk_configure(struct pmd_internals *internals, struct pkt_rx_queue *rxq,
if (ret) {
AF_XDP_LOG(ERR, "Failed to create xsk socket.\n");
- goto err;
+ goto out_umem;
}
#if defined(XDP_UMEM_UNALIGNED_CHUNK_FLAG)
ret = rte_pktmbuf_alloc_bulk(rxq->umem->mb_pool, fq_bufs, reserve_size);
if (ret) {
AF_XDP_LOG(DEBUG, "Failed to get enough buffers for fq.\n");
- goto err;
+ goto out_xsk;
}
#endif
ret = reserve_fill_queue(rxq->umem, reserve_size, fq_bufs, &rxq->fq);
if (ret) {
- xsk_socket__delete(rxq->xsk);
AF_XDP_LOG(ERR, "Failed to reserve fill queue.\n");
- goto err;
+ goto out_xsk;
}
return 0;
-err:
+out_xsk:
+ xsk_socket__delete(rxq->xsk);
+out_umem:
if (__atomic_sub_fetch(&rxq->umem->refcnt, 1, __ATOMIC_ACQUIRE) == 0)
xdp_umem_destroy(rxq->umem);
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:56.205101557 +0000
+++ 0028-net-af_xdp-ensure-socket-is-deleted-on-Rx-queue-setu.patch 2022-02-28 21:17:53.916930897 +0000
@@ -1 +1 @@
-From b26431a617e4039e6c0f65c5ee56f62f347b686b Mon Sep 17 00:00:00 2001
+From b1b1cd71e95f12cc41e70595a9a9e8aaeb32d279 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b26431a617e4039e6c0f65c5ee56f62f347b686b ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -20,2 +21,2 @@
- drivers/net/af_xdp/rte_eth_af_xdp.c | 17 +++++++++--------
- 1 file changed, 9 insertions(+), 8 deletions(-)
+ drivers/net/af_xdp/rte_eth_af_xdp.c | 13 +++++++------
+ 1 file changed, 7 insertions(+), 6 deletions(-)
@@ -24 +25 @@
-index 2477f31c7b..7d5e2887b8 100644
+index eaf93695ec..efe7b80e7a 100644
@@ -27 +28 @@
-@@ -1301,7 +1301,7 @@ xsk_configure(struct pmd_internals *internals, struct pkt_rx_queue *rxq,
+@@ -1125,7 +1125,7 @@ xsk_configure(struct pmd_internals *internals, struct pkt_rx_queue *rxq,
@@ -35,2 +36,2 @@
- cfg.libbpf_flags = XSK_LIBBPF_FLAGS__INHIBIT_PROG_LOAD;
-@@ -1318,7 +1318,7 @@ xsk_configure(struct pmd_internals *internals, struct pkt_rx_queue *rxq,
+ }
+@@ -1141,26 +1141,27 @@ xsk_configure(struct pmd_internals *internals, struct pkt_rx_queue *rxq,
@@ -44,11 +45 @@
- /* insert the xsk into the xsks_map */
-@@ -1330,7 +1330,7 @@ xsk_configure(struct pmd_internals *internals, struct pkt_rx_queue *rxq,
- &rxq->xsk_queue_idx, &fd, 0);
- if (err) {
- AF_XDP_LOG(ERR, "Failed to insert xsk in map.\n");
-- goto err;
-+ goto out_xsk;
- }
- }
-
-@@ -1338,7 +1338,7 @@ xsk_configure(struct pmd_internals *internals, struct pkt_rx_queue *rxq,
+ #if defined(XDP_UMEM_UNALIGNED_CHUNK_FLAG)
@@ -62,10 +52,0 @@
-
-@@ -1346,20 +1346,21 @@ xsk_configure(struct pmd_internals *internals, struct pkt_rx_queue *rxq,
- ret = configure_preferred_busy_poll(rxq);
- if (ret) {
- AF_XDP_LOG(ERR, "Failed configure busy polling.\n");
-- goto err;
-+ goto out_xsk;
- }
- }
-
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/ice: fix overwriting of LSE bit by DCF' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (26 preceding siblings ...)
2022-02-28 21:20 ` patch 'net/af_xdp: ensure socket is deleted on Rx queue setup error' " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-02-28 21:20 ` patch 'net/i40e: enable maximum frame size at port level' " luca.boccassi
` (21 subsequent siblings)
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Michal Wilczynski; +Cc: Haiyue Wang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/7eaca36d9c661619bbd62e2ef50899a366b56296
Thanks.
Luca Boccassi
---
From 7eaca36d9c661619bbd62e2ef50899a366b56296 Mon Sep 17 00:00:00 2001
From: Michal Wilczynski <michal.wilczynski@intel.com>
Date: Fri, 18 Feb 2022 12:57:19 +0100
Subject: [PATCH] net/ice: fix overwriting of LSE bit by DCF
[ upstream commit ea9fac93e1ca1f0684b2ccdad9467a7760b4a3eb ]
After enabling DCF on a VF, the ice driver stops receiving
link updates on it's Admin Receive Queue. During the init
of DCF ice_aqc_opc_get_link_status command is send to the
firmware without LSE (Link Status Event) bit set. This prevents
the ice driver from receiving up/down events, and correspondingly
updating netdev.
Fixes: 0b02c9519432 ("net/ice: handle PF initialization by DCF")
Signed-off-by: Michal Wilczynski <michal.wilczynski@intel.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
---
drivers/net/ice/ice_dcf_parent.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ice/ice_dcf_parent.c b/drivers/net/ice/ice_dcf_parent.c
index ad94953932..c7c1111a67 100644
--- a/drivers/net/ice/ice_dcf_parent.c
+++ b/drivers/net/ice/ice_dcf_parent.c
@@ -220,7 +220,7 @@ ice_dcf_init_parent_hw(struct ice_hw *hw)
goto err_unroll_alloc;
/* Initialize port_info struct with link information */
- status = ice_aq_get_link_info(hw->port_info, false, NULL, NULL);
+ status = ice_aq_get_link_info(hw->port_info, true, NULL, NULL);
if (status)
goto err_unroll_alloc;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:56.291916369 +0000
+++ 0029-net-ice-fix-overwriting-of-LSE-bit-by-DCF.patch 2022-02-28 21:17:53.920930984 +0000
@@ -1 +1 @@
-From ea9fac93e1ca1f0684b2ccdad9467a7760b4a3eb Mon Sep 17 00:00:00 2001
+From 7eaca36d9c661619bbd62e2ef50899a366b56296 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ea9fac93e1ca1f0684b2ccdad9467a7760b4a3eb ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 0c8c2ed6c7..2f96dedcce 100644
+index ad94953932..c7c1111a67 100644
@@ -26 +27 @@
-@@ -340,7 +340,7 @@ ice_dcf_init_parent_hw(struct ice_hw *hw)
+@@ -220,7 +220,7 @@ ice_dcf_init_parent_hw(struct ice_hw *hw)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/i40e: enable maximum frame size at port level' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (27 preceding siblings ...)
2022-02-28 21:20 ` patch 'net/ice: fix overwriting of LSE bit by DCF' " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-02-28 21:20 ` patch 'net/mlx5: fix ineffective metadata argument adjustment' " luca.boccassi
` (20 subsequent siblings)
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Dapeng Yu; +Cc: Peng Zhang, Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/1b7f6d2ad92d522e4f024c46e5794fad8540e94f
Thanks.
Luca Boccassi
---
From 1b7f6d2ad92d522e4f024c46e5794fad8540e94f Mon Sep 17 00:00:00 2001
From: Dapeng Yu <dapengx.yu@intel.com>
Date: Tue, 7 Dec 2021 16:59:46 +0800
Subject: [PATCH] net/i40e: enable maximum frame size at port level
[ upstream commit a4ba773679231264e4077824358260c6583cc874 ]
Currently max frame size is set at queue level, which makes the values
of the following counters wrong when a jumbo frame is received.
The expected value:
rx_good_bytes: 0
rx_errors: 1
rx_oversize_errors: 1
The actual value:
rx_good_bytes: 1626
rx_errors: 0
rx_oversize_errors: 0
This patch enables setting max frame size at port level, and makes the
values above right.
Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Tested-by: Peng Zhang <peng1x.zhang@intel.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/i40e/i40e_ethdev.c | 41 ++++++++++++++++++++++++++++------
1 file changed, 34 insertions(+), 7 deletions(-)
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 72a1959367..e396e82f06 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -397,6 +397,7 @@ static int i40e_set_default_mac_addr(struct rte_eth_dev *dev,
struct rte_ether_addr *mac_addr);
static int i40e_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu);
+static void i40e_set_mac_max_frame(struct rte_eth_dev *dev, uint16_t size);
static int i40e_ethertype_filter_convert(
const struct rte_eth_ethertype_filter *input,
@@ -1775,11 +1776,6 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
*/
i40e_add_tx_flow_control_drop_filter(pf);
- /* Set the max frame size to 0x2600 by default,
- * in case other drivers changed the default value.
- */
- i40e_aq_set_mac_config(hw, I40E_FRAME_SIZE_MAX, TRUE, false, 0, NULL);
-
/* initialize mirror rule list */
TAILQ_INIT(&pf->mirror_list);
@@ -2434,6 +2430,7 @@ i40e_dev_start(struct rte_eth_dev *dev)
uint32_t intr_vector = 0;
struct i40e_vsi *vsi;
uint16_t nb_rxq, nb_txq;
+ uint16_t max_frame_size;
hw->adapter_stopped = 0;
@@ -2575,6 +2572,9 @@ i40e_dev_start(struct rte_eth_dev *dev)
"please call hierarchy_commit() "
"before starting the port");
+ max_frame_size = dev->data->mtu + I40E_ETH_OVERHEAD;
+ i40e_set_mac_max_frame(dev, max_frame_size);
+
return I40E_SUCCESS;
tx_err:
@@ -2942,6 +2942,9 @@ i40e_dev_set_link_down(struct rte_eth_dev *dev)
return i40e_phy_conf_link(hw, abilities, speed, false);
}
+#define CHECK_INTERVAL 100 /* 100ms */
+#define MAX_REPEAT_TIME 10 /* 1s (10 * 100ms) in total */
+
static __rte_always_inline void
update_link_reg(struct i40e_hw *hw, struct rte_eth_link *link)
{
@@ -3009,8 +3012,6 @@ static __rte_always_inline void
update_link_aq(struct i40e_hw *hw, struct rte_eth_link *link,
bool enable_lse, int wait_to_complete)
{
-#define CHECK_INTERVAL 100 /* 100ms */
-#define MAX_REPEAT_TIME 10 /* 1s (10 * 100ms) in total */
uint32_t rep_cnt = MAX_REPEAT_TIME;
struct i40e_link_status link_status;
int status;
@@ -6813,6 +6814,7 @@ i40e_dev_handle_aq_msg(struct rte_eth_dev *dev)
if (!ret)
rte_eth_dev_callback_process(dev,
RTE_ETH_EVENT_INTR_LSC, NULL);
+
break;
default:
PMD_DRV_LOG(DEBUG, "Request %u is not supported yet",
@@ -13130,6 +13132,31 @@ i40e_config_rss_filter(struct i40e_pf *pf,
return 0;
}
+static void
+i40e_set_mac_max_frame(struct rte_eth_dev *dev, uint16_t size)
+{
+ struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+ uint32_t rep_cnt = MAX_REPEAT_TIME;
+ struct rte_eth_link link;
+ enum i40e_status_code status;
+
+ do {
+ update_link_reg(hw, &link);
+ if (link.link_status)
+ break;
+
+ rte_delay_ms(CHECK_INTERVAL);
+ } while (--rep_cnt);
+
+ if (link.link_status) {
+ status = i40e_aq_set_mac_config(hw, size, TRUE, 0, false, NULL);
+ if (status != I40E_SUCCESS)
+ PMD_DRV_LOG(ERR, "Failed to set max frame size at port level");
+ } else {
+ PMD_DRV_LOG(ERR, "Set max frame size at port level not applicable on link down");
+ }
+}
+
RTE_LOG_REGISTER(i40e_logtype_init, pmd.net.i40e.init, NOTICE);
RTE_LOG_REGISTER(i40e_logtype_driver, pmd.net.i40e.driver, NOTICE);
#ifdef RTE_LIBRTE_I40E_DEBUG_RX
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:56.369917283 +0000
+++ 0030-net-i40e-enable-maximum-frame-size-at-port-level.patch 2022-02-28 21:17:53.944931510 +0000
@@ -1 +1 @@
-From a4ba773679231264e4077824358260c6583cc874 Mon Sep 17 00:00:00 2001
+From 1b7f6d2ad92d522e4f024c46e5794fad8540e94f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a4ba773679231264e4077824358260c6583cc874 ]
+
@@ -22,2 +23,0 @@
-Cc: stable@dpdk.org
-
@@ -32 +32 @@
-index ecfa3c94db..755786dc10 100644
+index 72a1959367..e396e82f06 100644
@@ -35 +35 @@
-@@ -386,6 +386,7 @@ static int i40e_set_default_mac_addr(struct rte_eth_dev *dev,
+@@ -397,6 +397,7 @@ static int i40e_set_default_mac_addr(struct rte_eth_dev *dev,
@@ -43 +43 @@
-@@ -1709,11 +1710,6 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
+@@ -1775,11 +1776,6 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
@@ -52,2 +52,2 @@
- /* initialize RSS rule list */
- TAILQ_INIT(&pf->rss_config_list);
+ /* initialize mirror rule list */
+ TAILQ_INIT(&pf->mirror_list);
@@ -55 +55 @@
-@@ -2355,6 +2351,7 @@ i40e_dev_start(struct rte_eth_dev *dev)
+@@ -2434,6 +2430,7 @@ i40e_dev_start(struct rte_eth_dev *dev)
@@ -63 +63 @@
-@@ -2493,6 +2490,9 @@ i40e_dev_start(struct rte_eth_dev *dev)
+@@ -2575,6 +2572,9 @@ i40e_dev_start(struct rte_eth_dev *dev)
@@ -73 +73 @@
-@@ -2839,6 +2839,9 @@ i40e_dev_set_link_down(struct rte_eth_dev *dev)
+@@ -2942,6 +2942,9 @@ i40e_dev_set_link_down(struct rte_eth_dev *dev)
@@ -83 +83 @@
-@@ -2905,8 +2908,6 @@ static __rte_always_inline void
+@@ -3009,8 +3012,6 @@ static __rte_always_inline void
@@ -92 +92 @@
-@@ -6710,6 +6711,7 @@ i40e_dev_handle_aq_msg(struct rte_eth_dev *dev)
+@@ -6813,6 +6814,7 @@ i40e_dev_handle_aq_msg(struct rte_eth_dev *dev)
@@ -100,2 +100,2 @@
-@@ -12094,6 +12096,31 @@ i40e_cloud_filter_qinq_create(struct i40e_pf *pf)
- return ret;
+@@ -13130,6 +13132,31 @@ i40e_config_rss_filter(struct i40e_pf *pf,
+ return 0;
@@ -129,3 +129,3 @@
- RTE_LOG_REGISTER_SUFFIX(i40e_logtype_init, init, NOTICE);
- RTE_LOG_REGISTER_SUFFIX(i40e_logtype_driver, driver, NOTICE);
- #ifdef RTE_ETHDEV_DEBUG_RX
+ RTE_LOG_REGISTER(i40e_logtype_init, pmd.net.i40e.init, NOTICE);
+ RTE_LOG_REGISTER(i40e_logtype_driver, pmd.net.i40e.driver, NOTICE);
+ #ifdef RTE_LIBRTE_I40E_DEBUG_RX
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/mlx5: fix ineffective metadata argument adjustment' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (28 preceding siblings ...)
2022-02-28 21:20 ` patch 'net/i40e: enable maximum frame size at port level' " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-02-28 21:20 ` patch 'app/testpmd: fix GENEVE parsing in checksum mode' " luca.boccassi
` (19 subsequent siblings)
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Michael Baum; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/8d5484e7a11050d616ab5c7dee541d03a1d0fbfa
Thanks.
Luca Boccassi
---
From 8d5484e7a11050d616ab5c7dee541d03a1d0fbfa Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Mon, 14 Feb 2022 11:34:53 +0200
Subject: [PATCH] net/mlx5: fix ineffective metadata argument adjustment
[ upstream commit ad9d0c6395abf9793f328f571338fbe6a61f5ebe ]
In "dv_xmeta_en" devarg there is an option of dv_xmeta_en=3 which
engages tunnel offload mode. In E-Switch configuration, that mode
implicitly activates dv_xmeta_en=1.
The update according to E-switch support is done immediately after the
first parsing of the devargs, but there is another adjustment later.
This patch moves the adjustment after the second parsing.
Fixes: 4ec6360de37d ("net/mlx5: implement tunnel offload")
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/linux/mlx5_os.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index 602dc671ef..9d5cef9e09 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -868,10 +868,6 @@ err_secondary:
strerror(rte_errno));
goto error;
}
- if (config->dv_miss_info) {
- if (switch_info->master || switch_info->representor)
- config->dv_xmeta_en = MLX5_XMETA_MODE_META16;
- }
mlx5_malloc_mem_select(config->sys_mem_en);
sh = mlx5_alloc_shared_dev_ctx(spawn, config);
if (!sh)
@@ -1111,6 +1107,10 @@ err_secondary:
}
/* Override some values set by hardware configuration. */
mlx5_args(config, dpdk_dev->devargs);
+ if (config->dv_miss_info) {
+ if (switch_info->master || switch_info->representor)
+ config->dv_xmeta_en = MLX5_XMETA_MODE_META16;
+ }
err = mlx5_dev_check_sibling_config(priv, config);
if (err)
goto error;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:56.460262306 +0000
+++ 0031-net-mlx5-fix-ineffective-metadata-argument-adjustmen.patch 2022-02-28 21:17:53.952931686 +0000
@@ -1 +1 @@
-From ad9d0c6395abf9793f328f571338fbe6a61f5ebe Mon Sep 17 00:00:00 2001
+From 8d5484e7a11050d616ab5c7dee541d03a1d0fbfa Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ad9d0c6395abf9793f328f571338fbe6a61f5ebe ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index e157795b63..69d3e1e3ad 100644
+index 602dc671ef..9d5cef9e09 100644
@@ -28 +29 @@
-@@ -977,10 +977,6 @@ err_secondary:
+@@ -868,10 +868,6 @@ err_secondary:
@@ -35,0 +37 @@
+ mlx5_malloc_mem_select(config->sys_mem_en);
@@ -38,2 +40,2 @@
- return NULL;
-@@ -1242,6 +1238,10 @@ err_secondary:
+@@ -1111,6 +1107,10 @@ err_secondary:
+ }
@@ -42 +43,0 @@
- /* Update final values for devargs before check sibling config. */
@@ -47,3 +48,3 @@
- #if !defined(HAVE_IBV_FLOW_DV_SUPPORT) || !defined(HAVE_MLX5DV_DR)
- if (config->dv_flow_en) {
- DRV_LOG(WARNING, "DV flow is not supported.");
+ err = mlx5_dev_check_sibling_config(priv, config);
+ if (err)
+ goto error;
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'app/testpmd: fix GENEVE parsing in checksum mode' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (29 preceding siblings ...)
2022-02-28 21:20 ` patch 'net/mlx5: fix ineffective metadata argument adjustment' " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-02-28 21:20 ` patch 'net/txgbe: fix debug logs' " luca.boccassi
` (18 subsequent siblings)
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Raja Zidane; +Cc: Aman Singh, Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a274e8922f707146793b9c17fc27355f3f1bcaff
Thanks.
Luca Boccassi
---
From a274e8922f707146793b9c17fc27355f3f1bcaff Mon Sep 17 00:00:00 2001
From: Raja Zidane <rzidane@nvidia.com>
Date: Mon, 21 Feb 2022 15:24:23 +0200
Subject: [PATCH] app/testpmd: fix GENEVE parsing in checksum mode
[ upstream commit 993677affe391be8bb390c2625bc3d8bb857f0a5 ]
The csum FWD mode parses any received packet to set mbuf offloads for
the transmitting burst, mainly in the checksum/TSO areas.
In the case of a tunnel header, the csum FWD tries to detect known
tunnels by the standard definition using the header's data and fallback
to check the packet type in the mbuf to see if the Rx port driver
already sign the packet as a tunnel.
In the fallback case, the csum assumes the tunnel is VXLAN and parses
the tunnel as VXLAN.
When the GENEVE tunnel was added to the known tunnels in csum, its
parsing trial was wrongly located after the pkt type detection, causing
the csum to parse the GENEVE header as VXLAN when the Rx port set the
tunnel packet type.
Remove the fall back case to VXLAN.
Log error of unrecognized tunnel if no tunnel was parsed successfully.
Fixes: c10a026c3b03 ("app/testpmd: introduce vxlan parsing function in csum fwd engine")
Signed-off-by: Raja Zidane <rzidane@nvidia.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
app/test-pmd/csumonly.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index f06441d987..243ef3e47a 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -252,8 +252,7 @@ parse_gtp(struct rte_udp_hdr *udp_hdr,
/* Parse a vxlan header */
static void
parse_vxlan(struct rte_udp_hdr *udp_hdr,
- struct testpmd_offload_info *info,
- uint32_t pkt_type)
+ struct testpmd_offload_info *info)
{
struct rte_ether_hdr *eth_hdr;
@@ -261,8 +260,7 @@ parse_vxlan(struct rte_udp_hdr *udp_hdr,
* default vxlan port (rfc7348) or that the rx offload flag is set
* (i40e only currently)
*/
- if (udp_hdr->dst_port != _htons(RTE_VXLAN_DEFAULT_PORT) &&
- RTE_ETH_IS_TUNNEL_PKT(pkt_type) == 0)
+ if (udp_hdr->dst_port != _htons(RTE_VXLAN_DEFAULT_PORT))
return;
update_tunnel_outer(info);
@@ -893,8 +891,7 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)
PKT_TX_TUNNEL_VXLAN_GPE;
goto tunnel_update;
}
- parse_vxlan(udp_hdr, &info,
- m->packet_type);
+ parse_vxlan(udp_hdr, &info);
if (info.is_tunnel) {
tx_ol_flags |=
PKT_TX_TUNNEL_VXLAN;
@@ -906,6 +903,12 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)
PKT_TX_TUNNEL_GENEVE;
goto tunnel_update;
}
+ /* Always keep last. */
+ if (unlikely(RTE_ETH_IS_TUNNEL_PKT(
+ m->packet_type) != 0)) {
+ TESTPMD_LOG(DEBUG, "Unknown tunnel packet. UDP dst port: %hu",
+ udp_hdr->dst_port);
+ }
} else if (info.l4_proto == IPPROTO_GRE) {
struct simple_gre_hdr *gre_hdr;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:56.539387001 +0000
+++ 0032-app-testpmd-fix-GENEVE-parsing-in-checksum-mode.patch 2022-02-28 21:17:53.956931773 +0000
@@ -1 +1 @@
-From 993677affe391be8bb390c2625bc3d8bb857f0a5 Mon Sep 17 00:00:00 2001
+From a274e8922f707146793b9c17fc27355f3f1bcaff Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 993677affe391be8bb390c2625bc3d8bb857f0a5 ]
+
@@ -23 +24,0 @@
-Cc: stable@dpdk.org
@@ -33 +34 @@
-index 02bc3929c7..5274d498ee 100644
+index f06441d987..243ef3e47a 100644
@@ -36 +37 @@
-@@ -258,8 +258,7 @@ parse_gtp(struct rte_udp_hdr *udp_hdr,
+@@ -252,8 +252,7 @@ parse_gtp(struct rte_udp_hdr *udp_hdr,
@@ -46 +47 @@
-@@ -267,8 +266,7 @@ parse_vxlan(struct rte_udp_hdr *udp_hdr,
+@@ -261,8 +260,7 @@ parse_vxlan(struct rte_udp_hdr *udp_hdr,
@@ -56,2 +57,2 @@
-@@ -922,8 +920,7 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)
- RTE_MBUF_F_TX_TUNNEL_VXLAN_GPE;
+@@ -893,8 +891,7 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)
+ PKT_TX_TUNNEL_VXLAN_GPE;
@@ -65,3 +66,3 @@
- RTE_MBUF_F_TX_TUNNEL_VXLAN;
-@@ -935,6 +932,12 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)
- RTE_MBUF_F_TX_TUNNEL_GENEVE;
+ PKT_TX_TUNNEL_VXLAN;
+@@ -906,6 +903,12 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)
+ PKT_TX_TUNNEL_GENEVE;
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/txgbe: fix debug logs' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (30 preceding siblings ...)
2022-02-28 21:20 ` patch 'app/testpmd: fix GENEVE parsing in checksum mode' " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-02-28 21:20 ` patch 'net/ena: remove unused enumeration' " luca.boccassi
` (17 subsequent siblings)
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Jiawen Wu; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/2c0325226cfe873b89a1dc3e9b7a5ba774e4f583
Thanks.
Luca Boccassi
---
From 2c0325226cfe873b89a1dc3e9b7a5ba774e4f583 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Wed, 23 Feb 2022 18:28:57 +0800
Subject: [PATCH] net/txgbe: fix debug logs
[ upstream commit 75c85e39652ef2eb54dd07b8f3d6b42b3930e8fe ]
Remove 'DEBUGFUNC' due to too many invalid debug log prints, unify the
DEBUG level macros.
Fixes: 7dc117068a7c ("net/txgbe: support probe and remove")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/txgbe/base/meson.build | 2 +-
drivers/net/txgbe/base/txgbe_eeprom.c | 41 ++----
drivers/net/txgbe/base/txgbe_hw.c | 185 +++++---------------------
drivers/net/txgbe/base/txgbe_mbx.c | 22 ---
drivers/net/txgbe/base/txgbe_mng.c | 15 +--
drivers/net/txgbe/base/txgbe_osdep.h | 1 +
drivers/net/txgbe/base/txgbe_phy.c | 66 ++-------
drivers/net/txgbe/txgbe_logs.h | 7 +-
8 files changed, 66 insertions(+), 273 deletions(-)
diff --git a/drivers/net/txgbe/base/meson.build b/drivers/net/txgbe/base/meson.build
index 3c63bf5f4c..cf4e8cb0b4 100644
--- a/drivers/net/txgbe/base/meson.build
+++ b/drivers/net/txgbe/base/meson.build
@@ -21,6 +21,6 @@ foreach flag: error_cflags
endforeach
base_lib = static_library('txgbe_base', sources,
- dependencies: static_rte_eal,
+ dependencies: [static_rte_eal, static_rte_net],
c_args: c_args)
base_objs = base_lib.extract_all_objects()
diff --git a/drivers/net/txgbe/base/txgbe_eeprom.c b/drivers/net/txgbe/base/txgbe_eeprom.c
index bcbf3503c8..6ff0f23f18 100644
--- a/drivers/net/txgbe/base/txgbe_eeprom.c
+++ b/drivers/net/txgbe/base/txgbe_eeprom.c
@@ -20,8 +20,6 @@ s32 txgbe_init_eeprom_params(struct txgbe_hw *hw)
u16 eeprom_size;
int err = 0;
- DEBUGFUNC("txgbe_init_eeprom_params");
-
if (eeprom->type != txgbe_eeprom_unknown)
return 0;
@@ -53,12 +51,12 @@ s32 txgbe_init_eeprom_params(struct txgbe_hw *hw)
err = eeprom->read32(hw, TXGBE_SW_REGION_PTR << 1, &eeprom->sw_addr);
if (err) {
- DEBUGOUT("EEPROM read failed.\n");
+ DEBUGOUT("EEPROM read failed.");
return err;
}
- DEBUGOUT("eeprom params: type = %d, size = %d, address bits: "
- "%d %d\n", eeprom->type, eeprom->word_size,
+ DEBUGOUT("eeprom params: type = %d, size = %d, address bits: %d %d",
+ eeprom->type, eeprom->word_size,
eeprom->address_bits, eeprom->sw_addr);
return 0;
@@ -77,9 +75,6 @@ s32 txgbe_get_eeprom_semaphore(struct txgbe_hw *hw)
u32 i;
u32 swsm;
- DEBUGFUNC("txgbe_get_eeprom_semaphore");
-
-
/* Get SMBI software semaphore between device drivers first */
for (i = 0; i < timeout; i++) {
/*
@@ -95,8 +90,7 @@ s32 txgbe_get_eeprom_semaphore(struct txgbe_hw *hw)
}
if (i == timeout) {
- DEBUGOUT("Driver can't access the eeprom - SMBI Semaphore "
- "not granted.\n");
+ DEBUGOUT("Driver can't access the eeprom - SMBI Semaphore not granted.");
/*
* this release is particularly important because our attempts
* above to get the semaphore may have succeeded, and if there
@@ -139,13 +133,12 @@ s32 txgbe_get_eeprom_semaphore(struct txgbe_hw *hw)
* was not granted because we don't have access to the EEPROM
*/
if (i >= timeout) {
- DEBUGOUT("SWESMBI Software EEPROM semaphore not granted.\n");
+ DEBUGOUT("SWESMBI Software EEPROM semaphore not granted.");
txgbe_release_eeprom_semaphore(hw);
status = TXGBE_ERR_EEPROM;
}
} else {
- DEBUGOUT("Software semaphore SMBI between device drivers "
- "not granted.\n");
+ DEBUGOUT("Software semaphore SMBI between device drivers not granted.");
}
return status;
@@ -159,8 +152,6 @@ s32 txgbe_get_eeprom_semaphore(struct txgbe_hw *hw)
**/
void txgbe_release_eeprom_semaphore(struct txgbe_hw *hw)
{
- DEBUGFUNC("txgbe_release_eeprom_semaphore");
-
wr32m(hw, TXGBE_MNGSWSYNC, TXGBE_MNGSWSYNC_REQ, 0);
wr32m(hw, TXGBE_SWSEM, TXGBE_SWSEM_PF, 0);
txgbe_flush(hw);
@@ -289,8 +280,6 @@ s32 txgbe_ee_write16(struct txgbe_hw *hw, u32 offset,
u32 addr = (offset << 1);
int err;
- DEBUGFUNC("\n");
-
err = hw->mac.acquire_swfw_sync(hw, mask);
if (err)
return err;
@@ -347,8 +336,6 @@ s32 txgbe_ee_writew_sw(struct txgbe_hw *hw, u32 offset,
u32 addr = hw->rom.sw_addr + (offset << 1);
int err;
- DEBUGFUNC("\n");
-
err = hw->mac.acquire_swfw_sync(hw, mask);
if (err)
return err;
@@ -398,11 +385,9 @@ s32 txgbe_calc_eeprom_checksum(struct txgbe_hw *hw)
int err;
u16 buffer[BUFF_SIZE];
- DEBUGFUNC("txgbe_calc_eeprom_checksum");
-
err = hw->rom.readw_sw(hw, TXGBE_EEPROM_CHECKSUM, &read_checksum);
if (err) {
- DEBUGOUT("EEPROM read failed\n");
+ DEBUGOUT("EEPROM read failed");
return err;
}
@@ -436,15 +421,13 @@ s32 txgbe_validate_eeprom_checksum(struct txgbe_hw *hw,
u16 read_checksum = 0;
int err;
- DEBUGFUNC("txgbe_validate_eeprom_checksum");
-
/* Read the first word from the EEPROM. If this times out or fails, do
* not continue or we could be in for a very long wait while every
* EEPROM read fails
*/
err = hw->rom.read16(hw, 0, &checksum);
if (err) {
- DEBUGOUT("EEPROM read failed\n");
+ DEBUGOUT("EEPROM read failed");
return err;
}
@@ -456,7 +439,7 @@ s32 txgbe_validate_eeprom_checksum(struct txgbe_hw *hw,
err = hw->rom.readw_sw(hw, TXGBE_EEPROM_CHECKSUM, &read_checksum);
if (err) {
- DEBUGOUT("EEPROM read failed\n");
+ DEBUGOUT("EEPROM read failed");
return err;
}
@@ -465,7 +448,7 @@ s32 txgbe_validate_eeprom_checksum(struct txgbe_hw *hw,
*/
if (read_checksum != checksum) {
err = TXGBE_ERR_EEPROM_CHECKSUM;
- DEBUGOUT("EEPROM checksum error\n");
+ DEBUGOUT("EEPROM checksum error");
}
/* If the user cares, return the calculated checksum */
@@ -484,15 +467,13 @@ s32 txgbe_update_eeprom_checksum(struct txgbe_hw *hw)
s32 status;
u16 checksum;
- DEBUGFUNC("txgbe_update_eeprom_checksum");
-
/* Read the first word from the EEPROM. If this times out or fails, do
* not continue or we could be in for a very long wait while every
* EEPROM read fails
*/
status = hw->rom.read16(hw, 0, &checksum);
if (status) {
- DEBUGOUT("EEPROM read failed\n");
+ DEBUGOUT("EEPROM read failed");
return status;
}
diff --git a/drivers/net/txgbe/base/txgbe_hw.c b/drivers/net/txgbe/base/txgbe_hw.c
index 5ee13b0f82..e6ffbd900e 100644
--- a/drivers/net/txgbe/base/txgbe_hw.c
+++ b/drivers/net/txgbe/base/txgbe_hw.c
@@ -40,8 +40,6 @@ bool txgbe_device_supports_autoneg_fc(struct txgbe_hw *hw)
u32 speed;
bool link_up;
- DEBUGFUNC("txgbe_device_supports_autoneg_fc");
-
switch (hw->phy.media_type) {
case txgbe_media_type_fiber_qsfp:
case txgbe_media_type_fiber:
@@ -92,11 +90,9 @@ s32 txgbe_setup_fc(struct txgbe_hw *hw)
u64 reg_bp = 0;
bool locked = false;
- DEBUGFUNC("txgbe_setup_fc");
-
/* Validate the requested mode */
if (hw->fc.strict_ieee && hw->fc.requested_mode == txgbe_fc_rx_pause) {
- DEBUGOUT("txgbe_fc_rx_pause not valid in strict IEEE mode\n");
+ DEBUGOUT("txgbe_fc_rx_pause not valid in strict IEEE mode");
err = TXGBE_ERR_INVALID_LINK_SETTINGS;
goto out;
}
@@ -194,7 +190,7 @@ s32 txgbe_setup_fc(struct txgbe_hw *hw)
SR_AN_MMD_ADV_REG1_PAUSE_ASM;
break;
default:
- DEBUGOUT("Flow control param set incorrectly\n");
+ DEBUGOUT("Flow control param set incorrectly");
err = TXGBE_ERR_CONFIG;
goto out;
}
@@ -225,7 +221,7 @@ s32 txgbe_setup_fc(struct txgbe_hw *hw)
TXGBE_MD_DEV_AUTO_NEG, reg_cu);
}
- DEBUGOUT("Set up FC; reg = 0x%08X\n", reg);
+ DEBUGOUT("Set up FC; reg = 0x%08X", reg);
out:
return err;
}
@@ -244,8 +240,6 @@ s32 txgbe_start_hw(struct txgbe_hw *hw)
s32 err;
u16 device_caps;
- DEBUGFUNC("txgbe_start_hw");
-
/* Set the media type */
hw->phy.media_type = hw->phy.get_media_type(hw);
@@ -258,7 +252,7 @@ s32 txgbe_start_hw(struct txgbe_hw *hw)
/* Setup flow control */
err = txgbe_setup_fc(hw);
if (err != 0 && err != TXGBE_NOT_IMPLEMENTED) {
- DEBUGOUT("Flow control setup failed, returning %d\n", err);
+ DEBUGOUT("Flow control setup failed, returning %d", err);
return err;
}
@@ -320,8 +314,6 @@ s32 txgbe_init_hw(struct txgbe_hw *hw)
{
s32 status;
- DEBUGFUNC("txgbe_init_hw");
-
/* Reset the hardware */
status = hw->mac.reset_hw(hw);
if (status == 0 || status == TXGBE_ERR_SFP_NOT_PRESENT) {
@@ -330,7 +322,7 @@ s32 txgbe_init_hw(struct txgbe_hw *hw)
}
if (status != 0)
- DEBUGOUT("Failed to initialize HW, STATUS = %d\n", status);
+ DEBUGOUT("Failed to initialize HW, STATUS = %d", status);
return status;
}
@@ -346,8 +338,6 @@ s32 txgbe_clear_hw_cntrs(struct txgbe_hw *hw)
{
u16 i = 0;
- DEBUGFUNC("txgbe_clear_hw_cntrs");
-
/* QP Stats */
/* don't write clear queue stats */
for (i = 0; i < TXGBE_MAX_QP; i++) {
@@ -467,8 +457,6 @@ s32 txgbe_get_mac_addr(struct txgbe_hw *hw, u8 *mac_addr)
u32 rar_low;
u16 i;
- DEBUGFUNC("txgbe_get_mac_addr");
-
wr32(hw, TXGBE_ETHADDRIDX, 0);
rar_high = rd32(hw, TXGBE_ETHADDRH);
rar_low = rd32(hw, TXGBE_ETHADDRL);
@@ -494,8 +482,6 @@ void txgbe_set_lan_id_multi_port(struct txgbe_hw *hw)
struct txgbe_bus_info *bus = &hw->bus;
u32 reg;
- DEBUGFUNC("txgbe_set_lan_id_multi_port_pcie");
-
reg = rd32(hw, TXGBE_PORTSTAT);
bus->lan_id = TXGBE_PORTSTAT_ID(reg);
@@ -521,8 +507,6 @@ s32 txgbe_stop_hw(struct txgbe_hw *hw)
u32 reg_val;
u16 i;
- DEBUGFUNC("txgbe_stop_hw");
-
/*
* Set the adapter_stopped flag so other driver functions stop touching
* the hardware
@@ -569,8 +553,6 @@ s32 txgbe_led_on(struct txgbe_hw *hw, u32 index)
{
u32 led_reg = rd32(hw, TXGBE_LEDCTL);
- DEBUGFUNC("txgbe_led_on");
-
if (index > 4)
return TXGBE_ERR_PARAM;
@@ -592,8 +574,6 @@ s32 txgbe_led_off(struct txgbe_hw *hw, u32 index)
{
u32 led_reg = rd32(hw, TXGBE_LEDCTL);
- DEBUGFUNC("txgbe_led_off");
-
if (index > 4)
return TXGBE_ERR_PARAM;
@@ -616,8 +596,6 @@ s32 txgbe_validate_mac_addr(u8 *mac_addr)
{
s32 status = 0;
- DEBUGFUNC("txgbe_validate_mac_addr");
-
/* Make sure it is not a multicast address */
if (TXGBE_IS_MULTICAST(mac_addr)) {
status = TXGBE_ERR_INVALID_MAC_ADDR;
@@ -648,11 +626,9 @@ s32 txgbe_set_rar(struct txgbe_hw *hw, u32 index, u8 *addr, u32 vmdq,
u32 rar_low, rar_high;
u32 rar_entries = hw->mac.num_rar_entries;
- DEBUGFUNC("txgbe_set_rar");
-
/* Make sure we are using a valid rar index range */
if (index >= rar_entries) {
- DEBUGOUT("RAR index %d is out of range.\n", index);
+ DEBUGOUT("RAR index %d is out of range.", index);
return TXGBE_ERR_INVALID_ARGUMENT;
}
@@ -700,11 +676,9 @@ s32 txgbe_clear_rar(struct txgbe_hw *hw, u32 index)
u32 rar_high;
u32 rar_entries = hw->mac.num_rar_entries;
- DEBUGFUNC("txgbe_clear_rar");
-
/* Make sure we are using a valid rar index range */
if (index >= rar_entries) {
- DEBUGOUT("RAR index %d is out of range.\n", index);
+ DEBUGOUT("RAR index %d is out of range.", index);
return TXGBE_ERR_INVALID_ARGUMENT;
}
@@ -740,8 +714,6 @@ s32 txgbe_init_rx_addrs(struct txgbe_hw *hw)
u32 psrctl;
u32 rar_entries = hw->mac.num_rar_entries;
- DEBUGFUNC("txgbe_init_rx_addrs");
-
/*
* If the current mac address is valid, assume it is a software override
* to the permanent address.
@@ -759,7 +731,7 @@ s32 txgbe_init_rx_addrs(struct txgbe_hw *hw)
hw->mac.addr[4], hw->mac.addr[5]);
} else {
/* Setup the receive address. */
- DEBUGOUT("Overriding MAC Address in RAR[0]\n");
+ DEBUGOUT("Overriding MAC Address in RAR[0]");
DEBUGOUT(" New MAC Addr =%.2X %.2X %.2X ",
hw->mac.addr[0], hw->mac.addr[1],
hw->mac.addr[2]);
@@ -777,7 +749,7 @@ s32 txgbe_init_rx_addrs(struct txgbe_hw *hw)
hw->addr_ctrl.rar_used_count = 1;
/* Zero out the other receive addresses. */
- DEBUGOUT("Clearing RAR[1-%d]\n", rar_entries - 1);
+ DEBUGOUT("Clearing RAR[1-%d]", rar_entries - 1);
for (i = 1; i < rar_entries; i++) {
wr32(hw, TXGBE_ETHADDRIDX, i);
wr32(hw, TXGBE_ETHADDRL, 0);
@@ -791,7 +763,7 @@ s32 txgbe_init_rx_addrs(struct txgbe_hw *hw)
psrctl |= TXGBE_PSRCTL_ADHF12(hw->mac.mc_filter_type);
wr32(hw, TXGBE_PSRCTL, psrctl);
- DEBUGOUT(" Clearing MTA\n");
+ DEBUGOUT(" Clearing MTA");
for (i = 0; i < hw->mac.mcft_size; i++)
wr32(hw, TXGBE_MCADDRTBL(i), 0);
@@ -816,8 +788,6 @@ static s32 txgbe_mta_vector(struct txgbe_hw *hw, u8 *mc_addr)
{
u32 vector = 0;
- DEBUGFUNC("txgbe_mta_vector");
-
switch (hw->mac.mc_filter_type) {
case 0: /* use bits [47:36] of the address */
vector = ((mc_addr[4] >> 4) | (((u16)mc_addr[5]) << 4));
@@ -832,7 +802,7 @@ static s32 txgbe_mta_vector(struct txgbe_hw *hw, u8 *mc_addr)
vector = ((mc_addr[4]) | (((u16)mc_addr[5]) << 8));
break;
default: /* Invalid mc_filter_type */
- DEBUGOUT("MC filter type param set incorrectly\n");
+ DEBUGOUT("MC filter type param set incorrectly");
ASSERT(0);
break;
}
@@ -855,12 +825,10 @@ void txgbe_set_mta(struct txgbe_hw *hw, u8 *mc_addr)
u32 vector_bit;
u32 vector_reg;
- DEBUGFUNC("txgbe_set_mta");
-
hw->addr_ctrl.mta_in_use++;
vector = txgbe_mta_vector(hw, mc_addr);
- DEBUGOUT(" bit-vector = 0x%03X\n", vector);
+ DEBUGOUT(" bit-vector = 0x%03X", vector);
/*
* The MTA is a register array of 128 32-bit registers. It is treated
@@ -894,8 +862,6 @@ s32 txgbe_update_mc_addr_list(struct txgbe_hw *hw, u8 *mc_addr_list,
u32 i;
u32 vmdq;
- DEBUGFUNC("txgbe_update_mc_addr_list");
-
/*
* Set the new number of MC addresses that we are being requested to
* use.
@@ -905,13 +871,13 @@ s32 txgbe_update_mc_addr_list(struct txgbe_hw *hw, u8 *mc_addr_list,
/* Clear mta_shadow */
if (clear) {
- DEBUGOUT(" Clearing MTA\n");
+ DEBUGOUT(" Clearing MTA");
memset(&hw->mac.mta_shadow, 0, sizeof(hw->mac.mta_shadow));
}
/* Update mta_shadow */
for (i = 0; i < mc_addr_count; i++) {
- DEBUGOUT(" Adding the multicast addresses:\n");
+ DEBUGOUT(" Adding the multicast addresses:");
txgbe_set_mta(hw, next(hw, &mc_addr_list, &vmdq));
}
@@ -928,7 +894,7 @@ s32 txgbe_update_mc_addr_list(struct txgbe_hw *hw, u8 *mc_addr_list,
wr32(hw, TXGBE_PSRCTL, psrctl);
}
- DEBUGOUT("txgbe update mc addr list complete\n");
+ DEBUGOUT("txgbe update mc addr list complete");
return 0;
}
@@ -946,8 +912,6 @@ s32 txgbe_fc_enable(struct txgbe_hw *hw)
u32 fcrtl, fcrth;
int i;
- DEBUGFUNC("txgbe_fc_enable");
-
/* Validate the water mark configuration */
if (!hw->fc.pause_time) {
err = TXGBE_ERR_INVALID_LINK_SETTINGS;
@@ -960,7 +924,7 @@ s32 txgbe_fc_enable(struct txgbe_hw *hw)
hw->fc.high_water[i]) {
if (!hw->fc.low_water[i] ||
hw->fc.low_water[i] >= hw->fc.high_water[i]) {
- DEBUGOUT("Invalid water mark configuration\n");
+ DEBUGOUT("Invalid water mark configuration");
err = TXGBE_ERR_INVALID_LINK_SETTINGS;
goto out;
}
@@ -1018,7 +982,7 @@ s32 txgbe_fc_enable(struct txgbe_hw *hw)
fccfg_reg |= TXGBE_TXFCCFG_FC;
break;
default:
- DEBUGOUT("Flow control param set incorrectly\n");
+ DEBUGOUT("Flow control param set incorrectly");
err = TXGBE_ERR_CONFIG;
goto out;
}
@@ -1079,8 +1043,7 @@ s32 txgbe_negotiate_fc(struct txgbe_hw *hw, u32 adv_reg, u32 lp_reg,
u32 adv_sym, u32 adv_asm, u32 lp_sym, u32 lp_asm)
{
if ((!(adv_reg)) || (!(lp_reg))) {
- DEBUGOUT("Local or link partner's advertised flow control "
- "settings are NULL. Local: %x, link partner: %x\n",
+ DEBUGOUT("Local or link partner's advertised flow control settings are NULL. Local: %x, link partner: %x",
adv_reg, lp_reg);
return TXGBE_ERR_FC_NOT_NEGOTIATED;
}
@@ -1095,22 +1058,22 @@ s32 txgbe_negotiate_fc(struct txgbe_hw *hw, u32 adv_reg, u32 lp_reg,
*/
if (hw->fc.requested_mode == txgbe_fc_full) {
hw->fc.current_mode = txgbe_fc_full;
- DEBUGOUT("Flow Control = FULL.\n");
+ DEBUGOUT("Flow Control = FULL.");
} else {
hw->fc.current_mode = txgbe_fc_rx_pause;
- DEBUGOUT("Flow Control=RX PAUSE frames only\n");
+ DEBUGOUT("Flow Control=RX PAUSE frames only");
}
} else if (!(adv_reg & adv_sym) && (adv_reg & adv_asm) &&
(lp_reg & lp_sym) && (lp_reg & lp_asm)) {
hw->fc.current_mode = txgbe_fc_tx_pause;
- DEBUGOUT("Flow Control = TX PAUSE frames only.\n");
+ DEBUGOUT("Flow Control = TX PAUSE frames only.");
} else if ((adv_reg & adv_sym) && (adv_reg & adv_asm) &&
!(lp_reg & lp_sym) && (lp_reg & lp_asm)) {
hw->fc.current_mode = txgbe_fc_rx_pause;
- DEBUGOUT("Flow Control = RX PAUSE frames only.\n");
+ DEBUGOUT("Flow Control = RX PAUSE frames only.");
} else {
hw->fc.current_mode = txgbe_fc_none;
- DEBUGOUT("Flow Control = NONE.\n");
+ DEBUGOUT("Flow Control = NONE.");
}
return 0;
}
@@ -1210,8 +1173,6 @@ void txgbe_fc_autoneg(struct txgbe_hw *hw)
u32 speed;
bool link_up;
- DEBUGFUNC("txgbe_fc_autoneg");
-
/*
* AN should have completed when the cable was plugged in.
* Look for reasons to bail out. Bail out if:
@@ -1277,8 +1238,6 @@ s32 txgbe_acquire_swfw_sync(struct txgbe_hw *hw, u32 mask)
u32 timeout = 200;
u32 i;
- DEBUGFUNC("txgbe_acquire_swfw_sync");
-
for (i = 0; i < timeout; i++) {
/*
* SW NVM semaphore bit is used for access to all
@@ -1321,8 +1280,6 @@ void txgbe_release_swfw_sync(struct txgbe_hw *hw, u32 mask)
u32 mngsem;
u32 swmask = mask;
- DEBUGFUNC("txgbe_release_swfw_sync");
-
txgbe_get_eeprom_semaphore(hw);
mngsem = rd32(hw, TXGBE_MNGSEM);
@@ -1346,8 +1303,6 @@ s32 txgbe_disable_sec_rx_path(struct txgbe_hw *hw)
int i;
u32 secrxreg;
- DEBUGFUNC("txgbe_disable_sec_rx_path");
-
secrxreg = rd32(hw, TXGBE_SECRXCTL);
secrxreg |= TXGBE_SECRXCTL_XDSA;
wr32(hw, TXGBE_SECRXCTL, secrxreg);
@@ -1362,8 +1317,7 @@ s32 txgbe_disable_sec_rx_path(struct txgbe_hw *hw)
/* For informational purposes only */
if (i >= TXGBE_MAX_SECRX_POLL)
- DEBUGOUT("Rx unit being enabled before security "
- "path fully disabled. Continuing with init.\n");
+ DEBUGOUT("Rx unit being enabled before security path fully disabled. Continuing with init.");
return 0;
}
@@ -1378,8 +1332,6 @@ s32 txgbe_enable_sec_rx_path(struct txgbe_hw *hw)
{
u32 secrxreg;
- DEBUGFUNC("txgbe_enable_sec_rx_path");
-
secrxreg = rd32(hw, TXGBE_SECRXCTL);
secrxreg &= ~TXGBE_SECRXCTL_XDSA;
wr32(hw, TXGBE_SECRXCTL, secrxreg);
@@ -1415,8 +1367,7 @@ int txgbe_disable_sec_tx_path(struct txgbe_hw *hw)
/* For informational purposes only */
if (i >= TXGBE_MAX_SECTX_POLL)
- PMD_DRV_LOG(DEBUG, "Tx unit being enabled before security "
- "path fully disabled. Continuing with init.");
+ DEBUGOUT("Tx unit being enabled before security path fully disabled. Continuing with init.");
return 0;
}
@@ -1453,8 +1404,6 @@ static s32 txgbe_get_san_mac_addr_offset(struct txgbe_hw *hw,
{
s32 err;
- DEBUGFUNC("txgbe_get_san_mac_addr_offset");
-
/*
* First read the EEPROM pointer to see if the MAC addresses are
* available.
@@ -1485,8 +1434,6 @@ s32 txgbe_get_san_mac_addr(struct txgbe_hw *hw, u8 *san_mac_addr)
u8 i;
s32 err;
- DEBUGFUNC("txgbe_get_san_mac_addr");
-
/*
* First read the EEPROM pointer to see if the MAC addresses are
* available. If they're not, no point in calling set_lan_id() here.
@@ -1535,8 +1482,6 @@ s32 txgbe_set_san_mac_addr(struct txgbe_hw *hw, u8 *san_mac_addr)
u16 san_mac_data, san_mac_offset;
u8 i;
- DEBUGFUNC("txgbe_set_san_mac_addr");
-
/* Look for SAN mac address pointer. If not defined, return */
err = txgbe_get_san_mac_addr_offset(hw, &san_mac_offset);
if (err || san_mac_offset == 0 || san_mac_offset == 0xFFFF)
@@ -1567,11 +1512,9 @@ s32 txgbe_clear_vmdq(struct txgbe_hw *hw, u32 rar, u32 vmdq)
u32 mpsar_lo, mpsar_hi;
u32 rar_entries = hw->mac.num_rar_entries;
- DEBUGFUNC("txgbe_clear_vmdq");
-
/* Make sure we are using a valid rar index range */
if (rar >= rar_entries) {
- DEBUGOUT("RAR index %d is out of range.\n", rar);
+ DEBUGOUT("RAR index %d is out of range.", rar);
return TXGBE_ERR_INVALID_ARGUMENT;
}
@@ -1621,11 +1564,9 @@ s32 txgbe_set_vmdq(struct txgbe_hw *hw, u32 rar, u32 vmdq)
u32 mpsar;
u32 rar_entries = hw->mac.num_rar_entries;
- DEBUGFUNC("txgbe_set_vmdq");
-
/* Make sure we are using a valid rar index range */
if (rar >= rar_entries) {
- DEBUGOUT("RAR index %d is out of range.\n", rar);
+ DEBUGOUT("RAR index %d is out of range.", rar);
return TXGBE_ERR_INVALID_ARGUMENT;
}
@@ -1650,8 +1591,7 @@ s32 txgbe_init_uta_tables(struct txgbe_hw *hw)
{
int i;
- DEBUGFUNC("txgbe_init_uta_tables");
- DEBUGOUT(" Clearing UTA\n");
+ DEBUGOUT(" Clearing UTA");
for (i = 0; i < 128; i++)
wr32(hw, TXGBE_UCADDRTBL(i), 0);
@@ -1706,7 +1646,7 @@ s32 txgbe_find_vlvf_slot(struct txgbe_hw *hw, u32 vlan, bool vlvf_bypass)
* slot we found during our search, else error.
*/
if (!first_empty_slot)
- DEBUGOUT("No space in VLVF.\n");
+ DEBUGOUT("No space in VLVF.");
return first_empty_slot ? first_empty_slot : TXGBE_ERR_NO_SPACE;
}
@@ -1727,8 +1667,6 @@ s32 txgbe_set_vfta(struct txgbe_hw *hw, u32 vlan, u32 vind,
u32 regidx, vfta_delta, vfta;
s32 err;
- DEBUGFUNC("txgbe_set_vfta");
-
if (vlan > 4095 || vind > 63)
return TXGBE_ERR_PARAM;
@@ -1796,8 +1734,6 @@ s32 txgbe_set_vlvf(struct txgbe_hw *hw, u32 vlan, u32 vind,
u32 portctl;
s32 vlvf_index;
- DEBUGFUNC("txgbe_set_vlvf");
-
if (vlan > 4095 || vind > 63)
return TXGBE_ERR_PARAM;
@@ -1877,8 +1813,6 @@ s32 txgbe_clear_vfta(struct txgbe_hw *hw)
{
u32 offset;
- DEBUGFUNC("txgbe_clear_vfta");
-
for (offset = 0; offset < hw->mac.vft_size; offset++)
wr32(hw, TXGBE_VLANTBL(offset), 0);
@@ -1932,8 +1866,6 @@ s32 txgbe_check_mac_link(struct txgbe_hw *hw, u32 *speed,
u32 links_reg, links_orig;
u32 i;
- DEBUGFUNC("txgbe_check_mac_link");
-
/* If Crosstalk fix enabled do the sanity check of making sure
* the SFP+ cage is full.
*/
@@ -1964,7 +1896,7 @@ s32 txgbe_check_mac_link(struct txgbe_hw *hw, u32 *speed,
links_reg = rd32(hw, TXGBE_PORTSTAT);
if (links_orig != links_reg) {
- DEBUGOUT("LINKS changed from %08X to %08X\n",
+ DEBUGOUT("LINKS changed from %08X to %08X",
links_orig, links_reg);
}
@@ -2019,8 +1951,6 @@ s32 txgbe_get_wwn_prefix(struct txgbe_hw *hw, u16 *wwnn_prefix,
u16 offset, caps;
u16 alt_san_mac_blk_offset;
- DEBUGFUNC("txgbe_get_wwn_prefix");
-
/* clear output first */
*wwnn_prefix = 0xFFFF;
*wwpn_prefix = 0xFFFF;
@@ -2110,8 +2040,6 @@ void txgbe_set_ethertype_anti_spoofing(struct txgbe_hw *hw,
**/
s32 txgbe_get_device_caps(struct txgbe_hw *hw, u16 *device_caps)
{
- DEBUGFUNC("txgbe_get_device_caps");
-
hw->rom.readw_sw(hw, TXGBE_DEVICE_CAPS, device_caps);
return 0;
@@ -2233,8 +2161,6 @@ s32 txgbe_get_thermal_sensor_data(struct txgbe_hw *hw)
s64 tsv;
u32 ts_stat;
- DEBUGFUNC("txgbe_get_thermal_sensor_data");
-
/* Only support thermal sensors attached to physical port 0 */
if (hw->bus.lan_id != 0)
return TXGBE_NOT_IMPLEMENTED;
@@ -2265,8 +2191,6 @@ s32 txgbe_init_thermal_sensor_thresh(struct txgbe_hw *hw)
{
struct txgbe_thermal_sensor_data *data = &hw->mac.thermal_sensor_data;
- DEBUGFUNC("txgbe_init_thermal_sensor_thresh");
-
memset(data, 0, sizeof(struct txgbe_thermal_sensor_data));
if (hw->bus.lan_id != 0)
@@ -2337,8 +2261,6 @@ s32 txgbe_setup_mac_link_multispeed_fiber(struct txgbe_hw *hw,
u32 i = 0;
bool autoneg, link_up = false;
- DEBUGFUNC("txgbe_setup_mac_link_multispeed_fiber");
-
/* Mask off requested but non-supported speeds */
status = hw->mac.get_link_capabilities(hw, &link_speed, &autoneg);
if (status != 0)
@@ -2363,7 +2285,7 @@ s32 txgbe_setup_mac_link_multispeed_fiber(struct txgbe_hw *hw,
/* QSFP module automatically detects MAC link speed */
break;
default:
- DEBUGOUT("Unexpected media type.\n");
+ DEBUGOUT("Unexpected media type.");
break;
}
@@ -2413,7 +2335,7 @@ s32 txgbe_setup_mac_link_multispeed_fiber(struct txgbe_hw *hw,
/* QSFP module automatically detects link speed */
break;
default:
- DEBUGOUT("Unexpected media type.\n");
+ DEBUGOUT("Unexpected media type.");
break;
}
@@ -2479,8 +2401,6 @@ s32 txgbe_init_shared_code(struct txgbe_hw *hw)
{
s32 status;
- DEBUGFUNC("txgbe_init_shared_code");
-
/*
* Set the mac type
*/
@@ -2513,8 +2433,6 @@ s32 txgbe_set_mac_type(struct txgbe_hw *hw)
{
s32 err = 0;
- DEBUGFUNC("txgbe_set_mac_type");
-
if (hw->vendor_id != PCI_VENDOR_ID_WANGXUN) {
DEBUGOUT("Unsupported vendor id: %x", hw->vendor_id);
return TXGBE_ERR_DEVICE_NOT_SUPPORTED;
@@ -2550,7 +2468,7 @@ s32 txgbe_set_mac_type(struct txgbe_hw *hw)
break;
}
- DEBUGOUT("found mac: %d media: %d, returns: %d\n",
+ DEBUGOUT("found mac: %d media: %d, returns: %d",
hw->mac.type, hw->phy.media_type, err);
return err;
}
@@ -2559,8 +2477,6 @@ void txgbe_init_mac_link_ops(struct txgbe_hw *hw)
{
struct txgbe_mac_info *mac = &hw->mac;
- DEBUGFUNC("txgbe_init_mac_link_ops");
-
/*
* enable the laser control functions for SFP+ fiber
* and MNG not enabled
@@ -2607,8 +2523,6 @@ s32 txgbe_init_phy_raptor(struct txgbe_hw *hw)
struct txgbe_phy_info *phy = &hw->phy;
s32 err = 0;
- DEBUGFUNC("txgbe_init_phy_raptor");
-
if (hw->device_id == TXGBE_DEV_ID_RAPTOR_QSFP) {
/* Store flag indicating I2C bus access control unit. */
hw->phy.qsfp_shared_i2c_bus = TRUE;
@@ -2650,8 +2564,6 @@ s32 txgbe_setup_sfp_modules(struct txgbe_hw *hw)
{
s32 err = 0;
- DEBUGFUNC("txgbe_setup_sfp_modules");
-
if (hw->phy.sfp_type == txgbe_sfp_type_unknown)
return 0;
@@ -2671,7 +2583,7 @@ s32 txgbe_setup_sfp_modules(struct txgbe_hw *hw)
msec_delay(hw->rom.semaphore_delay);
if (err) {
- DEBUGOUT("sfp module setup not complete\n");
+ DEBUGOUT("sfp module setup not complete");
return TXGBE_ERR_SFP_SETUP_NOT_COMPLETE;
}
@@ -2769,8 +2681,6 @@ s32 txgbe_init_ops_pf(struct txgbe_hw *hw)
struct txgbe_rom_info *rom = &hw->rom;
struct txgbe_mbx_info *mbx = &hw->mbx;
- DEBUGFUNC("txgbe_init_ops_pf");
-
/* BUS */
bus->set_lan_id = txgbe_set_lan_id_multi_port;
@@ -2895,8 +2805,6 @@ s32 txgbe_get_link_capabilities_raptor(struct txgbe_hw *hw,
s32 status = 0;
u32 autoc = 0;
- DEBUGFUNC("txgbe_get_link_capabilities_raptor");
-
/* Check if 1G SFP module. */
if (hw->phy.sfp_type == txgbe_sfp_type_1g_cu_core0 ||
hw->phy.sfp_type == txgbe_sfp_type_1g_cu_core1 ||
@@ -3000,8 +2908,6 @@ u32 txgbe_get_media_type_raptor(struct txgbe_hw *hw)
{
u32 media_type;
- DEBUGFUNC("txgbe_get_media_type_raptor");
-
/* Detect if there is a copper PHY attached. */
switch (hw->phy.type) {
case txgbe_phy_cu_unknown:
@@ -3050,8 +2956,6 @@ s32 txgbe_start_mac_link_raptor(struct txgbe_hw *hw,
s32 status = 0;
bool got_lock = false;
- DEBUGFUNC("txgbe_start_mac_link_raptor");
-
UNREFERENCED_PARAMETER(autoneg_wait_to_complete);
/* reset_pipeline requires us to hold this lock as it writes to
@@ -3134,8 +3038,6 @@ void txgbe_enable_tx_laser_multispeed_fiber(struct txgbe_hw *hw)
**/
void txgbe_flap_tx_laser_multispeed_fiber(struct txgbe_hw *hw)
{
- DEBUGFUNC("txgbe_flap_tx_laser_multispeed_fiber");
-
/* Blocked by MNG FW so bail */
if (txgbe_check_reset_blocked(hw))
return;
@@ -3167,7 +3069,7 @@ void txgbe_set_hard_rate_select_speed(struct txgbe_hw *hw,
esdp_reg &= ~(TXGBE_GPIOBIT_4 | TXGBE_GPIOBIT_5);
break;
default:
- DEBUGOUT("Invalid fixed module speed\n");
+ DEBUGOUT("Invalid fixed module speed");
return;
}
@@ -3193,8 +3095,6 @@ s32 txgbe_setup_mac_link_smartspeed(struct txgbe_hw *hw,
bool link_up = false;
u32 autoc_reg = rd32_epcs(hw, SR_AN_MMD_ADV_REG1);
- DEBUGFUNC("txgbe_setup_mac_link_smartspeed");
-
/* Set autoneg_advertised value based on input link speed */
hw->phy.autoneg_advertised = 0;
@@ -3283,8 +3183,7 @@ s32 txgbe_setup_mac_link_smartspeed(struct txgbe_hw *hw,
out:
if (link_up && link_speed == TXGBE_LINK_SPEED_1GB_FULL)
- DEBUGOUT("Smartspeed has downgraded the link speed "
- "from the maximum advertised\n");
+ DEBUGOUT("Smartspeed has downgraded the link speed from the maximum advertised");
return status;
}
@@ -3313,8 +3212,6 @@ s32 txgbe_setup_mac_link(struct txgbe_hw *hw,
u32 i;
u32 link_capabilities = TXGBE_LINK_SPEED_UNKNOWN;
- DEBUGFUNC("txgbe_setup_mac_link");
-
/* Check to see if speed passed in is supported. */
status = hw->mac.get_link_capabilities(hw,
&link_capabilities, &autoneg);
@@ -3421,8 +3318,6 @@ static s32 txgbe_setup_copper_link_raptor(struct txgbe_hw *hw,
{
s32 status;
- DEBUGFUNC("txgbe_setup_copper_link_raptor");
-
/* Setup the PHY according to input speed */
status = hw->phy.setup_link_speed(hw, speed,
autoneg_wait_to_complete);
@@ -3530,8 +3425,6 @@ s32 txgbe_reset_hw(struct txgbe_hw *hw)
s32 status;
u32 autoc;
- DEBUGFUNC("txgbe_reset_hw");
-
/* Call adapter stop to disable tx/rx and clear interrupts */
status = hw->mac.stop_hw(hw);
if (status != 0)
@@ -3661,8 +3554,6 @@ s32 txgbe_start_hw_raptor(struct txgbe_hw *hw)
{
s32 err = 0;
- DEBUGFUNC("txgbe_start_hw_raptor");
-
err = txgbe_start_hw(hw);
if (err != 0)
goto out;
@@ -3687,8 +3578,6 @@ out:
**/
s32 txgbe_enable_rx_dma_raptor(struct txgbe_hw *hw, u32 regval)
{
- DEBUGFUNC("txgbe_enable_rx_dma_raptor");
-
/*
* Workaround silicon errata when enabling the Rx datapath.
* If traffic is incoming before we enable the Rx unit, it could hang
@@ -3721,8 +3610,6 @@ bool txgbe_verify_lesm_fw_enabled_raptor(struct txgbe_hw *hw)
u16 fw_offset, fw_lesm_param_offset, fw_lesm_state;
s32 status;
- DEBUGFUNC("txgbe_verify_lesm_fw_enabled_raptor");
-
/* get the offset to the Firmware Module block */
status = hw->rom.read16(hw, TXGBE_FW_PTR, &fw_offset);
diff --git a/drivers/net/txgbe/base/txgbe_mbx.c b/drivers/net/txgbe/base/txgbe_mbx.c
index bfe53478ea..3ef4fce1f2 100644
--- a/drivers/net/txgbe/base/txgbe_mbx.c
+++ b/drivers/net/txgbe/base/txgbe_mbx.c
@@ -20,8 +20,6 @@ s32 txgbe_read_mbx(struct txgbe_hw *hw, u32 *msg, u16 size, u16 mbx_id)
struct txgbe_mbx_info *mbx = &hw->mbx;
s32 ret_val = TXGBE_ERR_MBX;
- DEBUGFUNC("txgbe_read_mbx");
-
/* limit read to size of mailbox */
if (size > mbx->size)
size = mbx->size;
@@ -46,8 +44,6 @@ s32 txgbe_write_mbx(struct txgbe_hw *hw, u32 *msg, u16 size, u16 mbx_id)
struct txgbe_mbx_info *mbx = &hw->mbx;
s32 ret_val = 0;
- DEBUGFUNC("txgbe_write_mbx");
-
if (size > mbx->size) {
ret_val = TXGBE_ERR_MBX;
DEBUGOUT("Invalid mailbox message size %d", size);
@@ -70,8 +66,6 @@ s32 txgbe_check_for_msg(struct txgbe_hw *hw, u16 mbx_id)
struct txgbe_mbx_info *mbx = &hw->mbx;
s32 ret_val = TXGBE_ERR_MBX;
- DEBUGFUNC("txgbe_check_for_msg");
-
if (mbx->check_for_msg)
ret_val = mbx->check_for_msg(hw, mbx_id);
@@ -90,8 +84,6 @@ s32 txgbe_check_for_ack(struct txgbe_hw *hw, u16 mbx_id)
struct txgbe_mbx_info *mbx = &hw->mbx;
s32 ret_val = TXGBE_ERR_MBX;
- DEBUGFUNC("txgbe_check_for_ack");
-
if (mbx->check_for_ack)
ret_val = mbx->check_for_ack(hw, mbx_id);
@@ -110,8 +102,6 @@ s32 txgbe_check_for_rst(struct txgbe_hw *hw, u16 mbx_id)
struct txgbe_mbx_info *mbx = &hw->mbx;
s32 ret_val = TXGBE_ERR_MBX;
- DEBUGFUNC("txgbe_check_for_rst");
-
if (mbx->check_for_rst)
ret_val = mbx->check_for_rst(hw, mbx_id);
@@ -144,8 +134,6 @@ s32 txgbe_check_for_msg_pf(struct txgbe_hw *hw, u16 vf_number)
s32 index = TXGBE_MBVFICR_INDEX(vf_number);
u32 vf_bit = vf_number % 16;
- DEBUGFUNC("txgbe_check_for_msg_pf");
-
if (!txgbe_check_for_bit_pf(hw, TXGBE_MBVFICR_VFREQ_VF1 << vf_bit,
index)) {
ret_val = 0;
@@ -168,8 +156,6 @@ s32 txgbe_check_for_ack_pf(struct txgbe_hw *hw, u16 vf_number)
s32 index = TXGBE_MBVFICR_INDEX(vf_number);
u32 vf_bit = vf_number % 16;
- DEBUGFUNC("txgbe_check_for_ack_pf");
-
if (!txgbe_check_for_bit_pf(hw, TXGBE_MBVFICR_VFACK_VF1 << vf_bit,
index)) {
ret_val = 0;
@@ -193,8 +179,6 @@ s32 txgbe_check_for_rst_pf(struct txgbe_hw *hw, u16 vf_number)
u32 vflre = 0;
s32 ret_val = TXGBE_ERR_MBX;
- DEBUGFUNC("txgbe_check_for_rst_pf");
-
vflre = rd32(hw, TXGBE_FLRVFE(reg_offset));
if (vflre & (1 << vf_shift)) {
ret_val = 0;
@@ -217,8 +201,6 @@ STATIC s32 txgbe_obtain_mbx_lock_pf(struct txgbe_hw *hw, u16 vf_number)
s32 ret_val = TXGBE_ERR_MBX;
u32 p2v_mailbox;
- DEBUGFUNC("txgbe_obtain_mbx_lock_pf");
-
/* Take ownership of the buffer */
wr32(hw, TXGBE_MBCTL(vf_number), TXGBE_MBCTL_PFU);
@@ -247,8 +229,6 @@ s32 txgbe_write_mbx_pf(struct txgbe_hw *hw, u32 *msg, u16 size, u16 vf_number)
s32 ret_val;
u16 i;
- DEBUGFUNC("txgbe_write_mbx_pf");
-
/* lock the mailbox to prevent pf/vf race condition */
ret_val = txgbe_obtain_mbx_lock_pf(hw, vf_number);
if (ret_val)
@@ -288,8 +268,6 @@ s32 txgbe_read_mbx_pf(struct txgbe_hw *hw, u32 *msg, u16 size, u16 vf_number)
s32 ret_val;
u16 i;
- DEBUGFUNC("txgbe_read_mbx_pf");
-
/* lock the mailbox to prevent pf/vf race condition */
ret_val = txgbe_obtain_mbx_lock_pf(hw, vf_number);
if (ret_val)
diff --git a/drivers/net/txgbe/base/txgbe_mng.c b/drivers/net/txgbe/base/txgbe_mng.c
index 224e48f5e1..b492dc8f11 100644
--- a/drivers/net/txgbe/base/txgbe_mng.c
+++ b/drivers/net/txgbe/base/txgbe_mng.c
@@ -44,10 +44,8 @@ txgbe_hic_unlocked(struct txgbe_hw *hw, u32 *buffer, u32 length, u32 timeout)
u32 value, loop;
u16 i, dword_len;
- DEBUGFUNC("txgbe_hic_unlocked");
-
if (!length || length > TXGBE_PMMBX_BSIZE) {
- DEBUGOUT("Buffer length failure buffersize=%d.\n", length);
+ DEBUGOUT("Buffer length failure buffersize=%d.", length);
return TXGBE_ERR_HOST_INTERFACE_COMMAND;
}
@@ -77,7 +75,7 @@ txgbe_hic_unlocked(struct txgbe_hw *hw, u32 *buffer, u32 length, u32 timeout)
TXGBE_MNGMBXCTL_FWRDY, TXGBE_MNGMBXCTL_FWRDY,
&value, timeout, 1000);
if (!loop || !(value & TXGBE_MNGMBXCTL_FWACK)) {
- DEBUGOUT("Command has failed with no status valid.\n");
+ DEBUGOUT("Command has failed with no status valid.");
return TXGBE_ERR_HOST_INTERFACE_COMMAND;
}
@@ -113,10 +111,8 @@ txgbe_host_interface_command(struct txgbe_hw *hw, u32 *buffer,
u32 bi;
u32 dword_len;
- DEBUGFUNC("txgbe_host_interface_command");
-
if (length == 0 || length > TXGBE_PMMBX_BSIZE) {
- DEBUGOUT("Buffer length failure buffersize=%d.\n", length);
+ DEBUGOUT("Buffer length failure buffersize=%d.", length);
return TXGBE_ERR_HOST_INTERFACE_COMMAND;
}
@@ -158,7 +154,7 @@ txgbe_host_interface_command(struct txgbe_hw *hw, u32 *buffer,
goto rel_out;
if (length < buf_len + hdr_size) {
- DEBUGOUT("Buffer not large enough for reply message.\n");
+ DEBUGOUT("Buffer not large enough for reply message.");
err = TXGBE_ERR_HOST_INTERFACE_COMMAND;
goto rel_out;
}
@@ -284,7 +280,6 @@ s32 txgbe_hic_set_drv_ver(struct txgbe_hw *hw, u8 maj, u8 min,
int i;
s32 ret_val = 0;
- DEBUGFUNC("txgbe_hic_set_drv_ver");
UNREFERENCED_PARAMETER(len, driver_ver);
fw_cmd.hdr.cmd = FW_CEM_CMD_DRIVER_INFO;
@@ -337,8 +332,6 @@ txgbe_hic_reset(struct txgbe_hw *hw)
int i;
s32 err = 0;
- DEBUGFUNC("\n");
-
reset_cmd.hdr.cmd = FW_RESET_CMD;
reset_cmd.hdr.buf_len = FW_RESET_LEN;
reset_cmd.hdr.cmd_or_resp.cmd_resv = FW_CEM_CMD_RESERVED;
diff --git a/drivers/net/txgbe/base/txgbe_osdep.h b/drivers/net/txgbe/base/txgbe_osdep.h
index e18e400af3..4a0dd385b3 100644
--- a/drivers/net/txgbe/base/txgbe_osdep.h
+++ b/drivers/net/txgbe/base/txgbe_osdep.h
@@ -17,6 +17,7 @@
#include <rte_byteorder.h>
#include <rte_config.h>
#include <rte_io.h>
+#include <rte_ether.h>
#include "../txgbe_logs.h"
diff --git a/drivers/net/txgbe/base/txgbe_phy.c b/drivers/net/txgbe/base/txgbe_phy.c
index aa8037a36e..ce6d580636 100644
--- a/drivers/net/txgbe/base/txgbe_phy.c
+++ b/drivers/net/txgbe/base/txgbe_phy.c
@@ -22,7 +22,7 @@ static bool txgbe_identify_extphy(struct txgbe_hw *hw)
u16 phy_addr = 0;
if (!txgbe_validate_phy_addr(hw, phy_addr)) {
- DEBUGOUT("Unable to validate PHY address 0x%04X\n",
+ DEBUGOUT("Unable to validate PHY address 0x%04X",
phy_addr);
return false;
}
@@ -87,8 +87,6 @@ s32 txgbe_identify_phy(struct txgbe_hw *hw)
{
s32 err = TXGBE_ERR_PHY_ADDR_INVALID;
- DEBUGFUNC("txgbe_identify_phy");
-
txgbe_read_phy_if(hw);
if (hw->phy.type != txgbe_phy_unknown)
@@ -124,11 +122,9 @@ s32 txgbe_check_reset_blocked(struct txgbe_hw *hw)
{
u32 mmngc;
- DEBUGFUNC("txgbe_check_reset_blocked");
-
mmngc = rd32(hw, TXGBE_STAT);
if (mmngc & TXGBE_STAT_MNGVETO) {
- DEBUGOUT("MNG_VETO bit detected.\n");
+ DEBUGOUT("MNG_VETO bit detected.");
return true;
}
@@ -146,8 +142,6 @@ bool txgbe_validate_phy_addr(struct txgbe_hw *hw, u32 phy_addr)
u16 phy_id = 0;
bool valid = false;
- DEBUGFUNC("txgbe_validate_phy_addr");
-
hw->phy.addr = phy_addr;
hw->phy.read_reg(hw, TXGBE_MD_PHY_ID_HIGH,
TXGBE_MD_DEV_PMA_PMD, &phy_id);
@@ -155,7 +149,7 @@ bool txgbe_validate_phy_addr(struct txgbe_hw *hw, u32 phy_addr)
if (phy_id != 0xFFFF && phy_id != 0x0)
valid = true;
- DEBUGOUT("PHY ID HIGH is 0x%04X\n", phy_id);
+ DEBUGOUT("PHY ID HIGH is 0x%04X", phy_id);
return valid;
}
@@ -171,8 +165,6 @@ s32 txgbe_get_phy_id(struct txgbe_hw *hw)
u16 phy_id_high = 0;
u16 phy_id_low = 0;
- DEBUGFUNC("txgbe_get_phy_id");
-
err = hw->phy.read_reg(hw, TXGBE_MD_PHY_ID_HIGH,
TXGBE_MD_DEV_PMA_PMD,
&phy_id_high);
@@ -185,7 +177,7 @@ s32 txgbe_get_phy_id(struct txgbe_hw *hw)
hw->phy.id |= (u32)(phy_id_low & TXGBE_PHY_REVISION_MASK);
hw->phy.revision = (u32)(phy_id_low & ~TXGBE_PHY_REVISION_MASK);
}
- DEBUGOUT("PHY_ID_HIGH 0x%04X, PHY_ID_LOW 0x%04X\n",
+ DEBUGOUT("PHY_ID_HIGH 0x%04X, PHY_ID_LOW 0x%04X",
phy_id_high, phy_id_low);
return err;
@@ -200,8 +192,6 @@ enum txgbe_phy_type txgbe_get_phy_type_from_id(u32 phy_id)
{
enum txgbe_phy_type phy_type;
- DEBUGFUNC("txgbe_get_phy_type_from_id");
-
switch (phy_id) {
case TXGBE_PHYID_TN1010:
phy_type = txgbe_phy_tn;
@@ -259,7 +249,7 @@ txgbe_reset_extphy(struct txgbe_hw *hw)
if (ctrl & TXGBE_MD_PORT_CTRL_RESET) {
err = TXGBE_ERR_RESET_FAILED;
- DEBUGOUT("PHY reset polling failed to complete.\n");
+ DEBUGOUT("PHY reset polling failed to complete.");
}
return err;
@@ -273,8 +263,6 @@ s32 txgbe_reset_phy(struct txgbe_hw *hw)
{
s32 err = 0;
- DEBUGFUNC("txgbe_reset_phy");
-
if (hw->phy.type == txgbe_phy_unknown)
err = txgbe_identify_phy(hw);
@@ -330,7 +318,7 @@ s32 txgbe_read_phy_reg_mdi(struct txgbe_hw *hw, u32 reg_addr, u32 device_type,
*/
if (!po32m(hw, TXGBE_MDIOSCD, TXGBE_MDIOSCD_BUSY,
0, NULL, 100, 100)) {
- DEBUGOUT("PHY address command did not complete\n");
+ DEBUGOUT("PHY address command did not complete");
return TXGBE_ERR_PHY;
}
@@ -354,8 +342,6 @@ s32 txgbe_read_phy_reg(struct txgbe_hw *hw, u32 reg_addr,
s32 err;
u32 gssr = hw->phy.phy_semaphore_mask;
- DEBUGFUNC("txgbe_read_phy_reg");
-
if (hw->mac.acquire_swfw_sync(hw, gssr))
return TXGBE_ERR_SWFW_SYNC;
@@ -393,7 +379,7 @@ s32 txgbe_write_phy_reg_mdi(struct txgbe_hw *hw, u32 reg_addr,
/* wait for completion */
if (!po32m(hw, TXGBE_MDIOSCD, TXGBE_MDIOSCD_BUSY,
0, NULL, 100, 100)) {
- TLOG_DEBUG("PHY write cmd didn't complete\n");
+ DEBUGOUT("PHY write cmd didn't complete");
return -TERR_PHY;
}
@@ -414,8 +400,6 @@ s32 txgbe_write_phy_reg(struct txgbe_hw *hw, u32 reg_addr,
s32 err;
u32 gssr = hw->phy.phy_semaphore_mask;
- DEBUGFUNC("txgbe_write_phy_reg");
-
if (hw->mac.acquire_swfw_sync(hw, gssr))
err = TXGBE_ERR_SWFW_SYNC;
@@ -439,8 +423,6 @@ s32 txgbe_setup_phy_link(struct txgbe_hw *hw)
bool autoneg = false;
u32 speed;
- DEBUGFUNC("txgbe_setup_phy_link");
-
txgbe_get_copper_link_capabilities(hw, &speed, &autoneg);
/* Set or unset auto-negotiation 10G advertisement */
@@ -526,8 +508,6 @@ s32 txgbe_setup_phy_link_speed(struct txgbe_hw *hw,
{
UNREFERENCED_PARAMETER(autoneg_wait_to_complete);
- DEBUGFUNC("txgbe_setup_phy_link_speed");
-
/*
* Clear autoneg_advertised and set new values based on input link
* speed.
@@ -598,8 +578,6 @@ s32 txgbe_get_copper_link_capabilities(struct txgbe_hw *hw,
{
s32 err = 0;
- DEBUGFUNC("txgbe_get_copper_link_capabilities");
-
*autoneg = true;
if (!hw->phy.speeds_supported)
err = txgbe_get_copper_speeds_supported(hw);
@@ -627,8 +605,6 @@ s32 txgbe_check_phy_link_tnx(struct txgbe_hw *hw, u32 *speed,
u16 phy_speed = 0;
u16 phy_data = 0;
- DEBUGFUNC("txgbe_check_phy_link_tnx");
-
/* Initialize speed and link to default case */
*link_up = false;
*speed = TXGBE_LINK_SPEED_10GB_FULL;
@@ -672,8 +648,6 @@ s32 txgbe_setup_phy_link_tnx(struct txgbe_hw *hw)
bool autoneg = false;
u32 speed;
- DEBUGFUNC("txgbe_setup_phy_link_tnx");
-
txgbe_get_copper_link_capabilities(hw, &speed, &autoneg);
if (speed & TXGBE_LINK_SPEED_10GB_FULL) {
@@ -747,8 +721,6 @@ s32 txgbe_identify_module(struct txgbe_hw *hw)
{
s32 err = TXGBE_ERR_SFP_NOT_PRESENT;
- DEBUGFUNC("txgbe_identify_module");
-
switch (hw->phy.media_type) {
case txgbe_media_type_fiber:
err = txgbe_identify_sfp_module(hw);
@@ -786,8 +758,6 @@ s32 txgbe_identify_sfp_module(struct txgbe_hw *hw)
u8 cable_spec = 0;
u16 enforce_sfp = 0;
- DEBUGFUNC("txgbe_identify_sfp_module");
-
if (hw->phy.media_type != txgbe_media_type_fiber) {
hw->phy.sfp_type = txgbe_sfp_type_not_present;
return TXGBE_ERR_SFP_NOT_PRESENT;
@@ -967,7 +937,7 @@ ERR_I2C:
hw->phy.sfp_type == txgbe_sfp_type_1g_lx_core1 ||
hw->phy.sfp_type == txgbe_sfp_type_1g_sx_core0 ||
hw->phy.sfp_type == txgbe_sfp_type_1g_sx_core1)) {
- DEBUGOUT("SFP+ module not supported\n");
+ DEBUGOUT("SFP+ module not supported");
hw->phy.type = txgbe_phy_sfp_unsupported;
return TXGBE_ERR_SFP_NOT_SUPPORTED;
}
@@ -996,8 +966,6 @@ s32 txgbe_identify_qsfp_module(struct txgbe_hw *hw)
u8 device_tech = 0;
bool active_cable = false;
- DEBUGFUNC("txgbe_identify_qsfp_module");
-
if (hw->phy.media_type != txgbe_media_type_fiber_qsfp) {
hw->phy.sfp_type = txgbe_sfp_type_not_present;
err = TXGBE_ERR_SFP_NOT_PRESENT;
@@ -1140,10 +1108,10 @@ ERR_I2C:
if (hw->allow_unsupported_sfp) {
DEBUGOUT("WARNING: Wangxun (R) Network Connections are quality tested using Wangxun (R) Ethernet Optics. "
"Using untested modules is not supported and may cause unstable operation or damage to the module or the adapter. "
- "Wangxun Corporation is not responsible for any harm caused by using untested modules.\n");
+ "Wangxun Corporation is not responsible for any harm caused by using untested modules.");
err = 0;
} else {
- DEBUGOUT("QSFP module not supported\n");
+ DEBUGOUT("QSFP module not supported");
hw->phy.type =
txgbe_phy_sfp_unsupported;
err = TXGBE_ERR_SFP_NOT_SUPPORTED;
@@ -1169,8 +1137,6 @@ out:
s32 txgbe_read_i2c_eeprom(struct txgbe_hw *hw, u8 byte_offset,
u8 *eeprom_data)
{
- DEBUGFUNC("txgbe_read_i2c_eeprom");
-
return hw->phy.read_i2c_byte(hw, byte_offset,
TXGBE_I2C_EEPROM_DEV_ADDR,
eeprom_data);
@@ -1203,8 +1169,6 @@ s32 txgbe_read_i2c_sff8472(struct txgbe_hw *hw, u8 byte_offset,
s32 txgbe_write_i2c_eeprom(struct txgbe_hw *hw, u8 byte_offset,
u8 eeprom_data)
{
- DEBUGFUNC("txgbe_write_i2c_eeprom");
-
return hw->phy.write_i2c_byte(hw, byte_offset,
TXGBE_I2C_EEPROM_DEV_ADDR,
eeprom_data);
@@ -1223,8 +1187,6 @@ s32 txgbe_write_i2c_eeprom(struct txgbe_hw *hw, u8 byte_offset,
s32 txgbe_read_i2c_byte_unlocked(struct txgbe_hw *hw, u8 byte_offset,
u8 dev_addr, u8 *data)
{
- DEBUGFUNC("txgbe_read_i2c_byte");
-
txgbe_i2c_start(hw, dev_addr);
/* wait tx empty */
@@ -1287,8 +1249,6 @@ s32 txgbe_read_i2c_byte(struct txgbe_hw *hw, u8 byte_offset,
s32 txgbe_write_i2c_byte_unlocked(struct txgbe_hw *hw, u8 byte_offset,
u8 dev_addr, u8 data)
{
- DEBUGFUNC("txgbe_write_i2c_byte");
-
txgbe_i2c_start(hw, dev_addr);
/* wait tx empty */
@@ -1342,8 +1302,6 @@ s32 txgbe_write_i2c_byte(struct txgbe_hw *hw, u8 byte_offset,
**/
static void txgbe_i2c_start(struct txgbe_hw *hw, u8 dev_addr)
{
- DEBUGFUNC("txgbe_i2c_start");
-
wr32(hw, TXGBE_I2CENA, 0);
wr32(hw, TXGBE_I2CCON,
@@ -1371,12 +1329,10 @@ static void txgbe_i2c_start(struct txgbe_hw *hw, u8 dev_addr)
**/
static void txgbe_i2c_stop(struct txgbe_hw *hw)
{
- DEBUGFUNC("txgbe_i2c_stop");
-
/* wait for completion */
if (!po32m(hw, TXGBE_I2CSTAT, TXGBE_I2CSTAT_MST,
0, NULL, 100, 100)) {
- DEBUGFUNC("i2c stop timeout.");
+ DEBUGOUT("i2c stop timeout.");
}
wr32(hw, TXGBE_I2CENA, 0);
diff --git a/drivers/net/txgbe/txgbe_logs.h b/drivers/net/txgbe/txgbe_logs.h
index f44ca06ee2..337e2cb5e8 100644
--- a/drivers/net/txgbe/txgbe_logs.h
+++ b/drivers/net/txgbe/txgbe_logs.h
@@ -45,10 +45,7 @@ extern int txgbe_logtype_tx_free;
#define PMD_TX_FREE_LOG(level, fmt, args...) do { } while (0)
#endif
-#define TLOG_DEBUG(fmt, args...) PMD_DRV_LOG(DEBUG, fmt, ##args)
-
-#define DEBUGOUT(fmt, args...) TLOG_DEBUG(fmt, ##args)
-#define PMD_INIT_FUNC_TRACE() TLOG_DEBUG(" >>")
-#define DEBUGFUNC(fmt) TLOG_DEBUG(fmt)
+#define DEBUGOUT(fmt, args...) PMD_DRV_LOG(DEBUG, fmt, ##args)
+#define PMD_INIT_FUNC_TRACE() PMD_DRV_LOG(DEBUG, ">>")
#endif /* _TXGBE_LOGS_H_ */
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:56.618806236 +0000
+++ 0033-net-txgbe-fix-debug-logs.patch 2022-02-28 21:17:53.968932035 +0000
@@ -1 +1 @@
-From 75c85e39652ef2eb54dd07b8f3d6b42b3930e8fe Mon Sep 17 00:00:00 2001
+From 2c0325226cfe873b89a1dc3e9b7a5ba774e4f583 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 75c85e39652ef2eb54dd07b8f3d6b42b3930e8fe ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -16,3 +17,3 @@
- drivers/net/txgbe/base/txgbe_hw.c | 202 ++++++--------------------
- drivers/net/txgbe/base/txgbe_mbx.c | 38 -----
- drivers/net/txgbe/base/txgbe_mng.c | 21 +--
+ drivers/net/txgbe/base/txgbe_hw.c | 185 +++++---------------------
+ drivers/net/txgbe/base/txgbe_mbx.c | 22 ---
+ drivers/net/txgbe/base/txgbe_mng.c | 15 +--
@@ -20,2 +21 @@
- drivers/net/txgbe/base/txgbe_phy.c | 84 ++---------
- drivers/net/txgbe/base/txgbe_vf.c | 12 +-
+ drivers/net/txgbe/base/txgbe_phy.c | 66 ++-------
@@ -23 +23 @@
- 9 files changed, 79 insertions(+), 329 deletions(-)
+ 8 files changed, 66 insertions(+), 273 deletions(-)
@@ -26 +26 @@
-index 7a30191472..a81d6890fe 100644
+index 3c63bf5f4c..cf4e8cb0b4 100644
@@ -29 +29 @@
-@@ -22,6 +22,6 @@ foreach flag: error_cflags
+@@ -21,6 +21,6 @@ foreach flag: error_cflags
@@ -33,4 +33,4 @@
-- dependencies: static_rte_eal,
-+ dependencies: [static_rte_eal, static_rte_net],
- c_args: c_args)
- base_objs = base_lib.extract_all_objects(recursive: true)
+- dependencies: static_rte_eal,
++ dependencies: [static_rte_eal, static_rte_net],
+ c_args: c_args)
+ base_objs = base_lib.extract_all_objects()
@@ -38 +38 @@
-index 72901cd0b0..4ed6bd6728 100644
+index bcbf3503c8..6ff0f23f18 100644
@@ -41 +41 @@
-@@ -21,8 +21,6 @@ s32 txgbe_init_eeprom_params(struct txgbe_hw *hw)
+@@ -20,8 +20,6 @@ s32 txgbe_init_eeprom_params(struct txgbe_hw *hw)
@@ -50 +50 @@
-@@ -54,12 +52,12 @@ s32 txgbe_init_eeprom_params(struct txgbe_hw *hw)
+@@ -53,12 +51,12 @@ s32 txgbe_init_eeprom_params(struct txgbe_hw *hw)
@@ -66 +66 @@
-@@ -78,9 +76,6 @@ s32 txgbe_get_eeprom_semaphore(struct txgbe_hw *hw)
+@@ -77,9 +75,6 @@ s32 txgbe_get_eeprom_semaphore(struct txgbe_hw *hw)
@@ -76 +76 @@
-@@ -96,8 +91,7 @@ s32 txgbe_get_eeprom_semaphore(struct txgbe_hw *hw)
+@@ -95,8 +90,7 @@ s32 txgbe_get_eeprom_semaphore(struct txgbe_hw *hw)
@@ -86 +86 @@
-@@ -140,13 +134,12 @@ s32 txgbe_get_eeprom_semaphore(struct txgbe_hw *hw)
+@@ -139,13 +133,12 @@ s32 txgbe_get_eeprom_semaphore(struct txgbe_hw *hw)
@@ -102 +102 @@
-@@ -160,8 +153,6 @@ s32 txgbe_get_eeprom_semaphore(struct txgbe_hw *hw)
+@@ -159,8 +152,6 @@ s32 txgbe_get_eeprom_semaphore(struct txgbe_hw *hw)
@@ -111 +111 @@
-@@ -290,8 +281,6 @@ s32 txgbe_ee_write16(struct txgbe_hw *hw, u32 offset,
+@@ -289,8 +280,6 @@ s32 txgbe_ee_write16(struct txgbe_hw *hw, u32 offset,
@@ -120 +120 @@
-@@ -348,8 +337,6 @@ s32 txgbe_ee_writew_sw(struct txgbe_hw *hw, u32 offset,
+@@ -347,8 +336,6 @@ s32 txgbe_ee_writew_sw(struct txgbe_hw *hw, u32 offset,
@@ -129 +129 @@
-@@ -399,11 +386,9 @@ s32 txgbe_calc_eeprom_checksum(struct txgbe_hw *hw)
+@@ -398,11 +385,9 @@ s32 txgbe_calc_eeprom_checksum(struct txgbe_hw *hw)
@@ -142 +142 @@
-@@ -437,15 +422,13 @@ s32 txgbe_validate_eeprom_checksum(struct txgbe_hw *hw,
+@@ -436,15 +421,13 @@ s32 txgbe_validate_eeprom_checksum(struct txgbe_hw *hw,
@@ -159 +159 @@
-@@ -457,7 +440,7 @@ s32 txgbe_validate_eeprom_checksum(struct txgbe_hw *hw,
+@@ -456,7 +439,7 @@ s32 txgbe_validate_eeprom_checksum(struct txgbe_hw *hw,
@@ -168 +168 @@
-@@ -466,7 +449,7 @@ s32 txgbe_validate_eeprom_checksum(struct txgbe_hw *hw,
+@@ -465,7 +448,7 @@ s32 txgbe_validate_eeprom_checksum(struct txgbe_hw *hw,
@@ -177 +177 @@
-@@ -485,15 +468,13 @@ s32 txgbe_update_eeprom_checksum(struct txgbe_hw *hw)
+@@ -484,15 +467,13 @@ s32 txgbe_update_eeprom_checksum(struct txgbe_hw *hw)
@@ -195 +195 @@
-index db8ffe61a4..6a045cba79 100644
+index 5ee13b0f82..e6ffbd900e 100644
@@ -198 +198 @@
-@@ -42,8 +42,6 @@ bool txgbe_device_supports_autoneg_fc(struct txgbe_hw *hw)
+@@ -40,8 +40,6 @@ bool txgbe_device_supports_autoneg_fc(struct txgbe_hw *hw)
@@ -207,2 +207 @@
-@@ -93,11 +91,9 @@ s32 txgbe_setup_fc(struct txgbe_hw *hw)
- u32 value = 0;
+@@ -92,11 +90,9 @@ s32 txgbe_setup_fc(struct txgbe_hw *hw)
@@ -209,0 +209 @@
+ bool locked = false;
@@ -220 +220 @@
-@@ -149,7 +145,7 @@ s32 txgbe_setup_fc(struct txgbe_hw *hw)
+@@ -194,7 +190,7 @@ s32 txgbe_setup_fc(struct txgbe_hw *hw)
@@ -229 +229 @@
-@@ -180,7 +176,7 @@ s32 txgbe_setup_fc(struct txgbe_hw *hw)
+@@ -225,7 +221,7 @@ s32 txgbe_setup_fc(struct txgbe_hw *hw)
@@ -238 +238 @@
-@@ -199,8 +195,6 @@ s32 txgbe_start_hw(struct txgbe_hw *hw)
+@@ -244,8 +240,6 @@ s32 txgbe_start_hw(struct txgbe_hw *hw)
@@ -247 +247 @@
-@@ -213,7 +207,7 @@ s32 txgbe_start_hw(struct txgbe_hw *hw)
+@@ -258,7 +252,7 @@ s32 txgbe_start_hw(struct txgbe_hw *hw)
@@ -256 +256 @@
-@@ -275,8 +269,6 @@ s32 txgbe_init_hw(struct txgbe_hw *hw)
+@@ -320,8 +314,6 @@ s32 txgbe_init_hw(struct txgbe_hw *hw)
@@ -262,4 +262,4 @@
- /* Get firmware version */
- hw->phy.get_fw_version(hw, &hw->fw_version);
-
-@@ -288,7 +280,7 @@ s32 txgbe_init_hw(struct txgbe_hw *hw)
+ /* Reset the hardware */
+ status = hw->mac.reset_hw(hw);
+ if (status == 0 || status == TXGBE_ERR_SFP_NOT_PRESENT) {
+@@ -330,7 +322,7 @@ s32 txgbe_init_hw(struct txgbe_hw *hw)
@@ -274 +274 @@
-@@ -304,8 +296,6 @@ s32 txgbe_clear_hw_cntrs(struct txgbe_hw *hw)
+@@ -346,8 +338,6 @@ s32 txgbe_clear_hw_cntrs(struct txgbe_hw *hw)
@@ -283 +283 @@
-@@ -425,8 +415,6 @@ s32 txgbe_get_mac_addr(struct txgbe_hw *hw, u8 *mac_addr)
+@@ -467,8 +457,6 @@ s32 txgbe_get_mac_addr(struct txgbe_hw *hw, u8 *mac_addr)
@@ -292 +292 @@
-@@ -452,8 +440,6 @@ void txgbe_set_lan_id_multi_port(struct txgbe_hw *hw)
+@@ -494,8 +482,6 @@ void txgbe_set_lan_id_multi_port(struct txgbe_hw *hw)
@@ -301 +301 @@
-@@ -479,8 +465,6 @@ s32 txgbe_stop_hw(struct txgbe_hw *hw)
+@@ -521,8 +507,6 @@ s32 txgbe_stop_hw(struct txgbe_hw *hw)
@@ -310 +310 @@
-@@ -527,8 +511,6 @@ s32 txgbe_led_on(struct txgbe_hw *hw, u32 index)
+@@ -569,8 +553,6 @@ s32 txgbe_led_on(struct txgbe_hw *hw, u32 index)
@@ -316,4 +316,4 @@
- /* To turn on the LED, set mode to ON. */
- led_reg |= index << TXGBE_LEDCTL_ORD_SHIFT;
- led_reg |= index;
-@@ -547,8 +529,6 @@ s32 txgbe_led_off(struct txgbe_hw *hw, u32 index)
+ if (index > 4)
+ return TXGBE_ERR_PARAM;
+
+@@ -592,8 +574,6 @@ s32 txgbe_led_off(struct txgbe_hw *hw, u32 index)
@@ -325,4 +325,4 @@
- /* To turn off the LED, set mode to OFF. */
- led_reg &= ~(index << TXGBE_LEDCTL_ORD_SHIFT);
- led_reg |= index;
-@@ -568,8 +548,6 @@ s32 txgbe_validate_mac_addr(u8 *mac_addr)
+ if (index > 4)
+ return TXGBE_ERR_PARAM;
+
+@@ -616,8 +596,6 @@ s32 txgbe_validate_mac_addr(u8 *mac_addr)
@@ -337 +337 @@
-@@ -600,11 +578,9 @@ s32 txgbe_set_rar(struct txgbe_hw *hw, u32 index, u8 *addr, u32 vmdq,
+@@ -648,11 +626,9 @@ s32 txgbe_set_rar(struct txgbe_hw *hw, u32 index, u8 *addr, u32 vmdq,
@@ -350 +350 @@
-@@ -652,11 +628,9 @@ s32 txgbe_clear_rar(struct txgbe_hw *hw, u32 index)
+@@ -700,11 +676,9 @@ s32 txgbe_clear_rar(struct txgbe_hw *hw, u32 index)
@@ -363 +363 @@
-@@ -692,8 +666,6 @@ s32 txgbe_init_rx_addrs(struct txgbe_hw *hw)
+@@ -740,8 +714,6 @@ s32 txgbe_init_rx_addrs(struct txgbe_hw *hw)
@@ -372,11 +372 @@
-@@ -704,18 +676,18 @@ s32 txgbe_init_rx_addrs(struct txgbe_hw *hw)
- /* Get the MAC address from the RAR0 for later reference */
- hw->mac.get_mac_addr(hw, hw->mac.addr);
-
-- DEBUGOUT(" Keeping Current RAR0 Addr =%.2X %.2X %.2X ",
-+ DEBUGOUT(" Keeping Current RAR0 Addr = "
-+ RTE_ETHER_ADDR_PRT_FMT,
- hw->mac.addr[0], hw->mac.addr[1],
-- hw->mac.addr[2]);
-- DEBUGOUT("%.2X %.2X %.2X\n", hw->mac.addr[3],
-+ hw->mac.addr[2], hw->mac.addr[3],
+@@ -759,7 +731,7 @@ s32 txgbe_init_rx_addrs(struct txgbe_hw *hw)
@@ -387 +376,0 @@
-- DEBUGOUT(" New MAC Addr =%.2X %.2X %.2X ",
@@ -389,2 +378 @@
-+ DEBUGOUT(" New MAC Addr = "
-+ RTE_ETHER_ADDR_PRT_FMT,
+ DEBUGOUT(" New MAC Addr =%.2X %.2X %.2X ",
@@ -392,7 +380,2 @@
-- hw->mac.addr[2]);
-- DEBUGOUT("%.2X %.2X %.2X\n", hw->mac.addr[3],
-+ hw->mac.addr[2], hw->mac.addr[3],
- hw->mac.addr[4], hw->mac.addr[5]);
-
- hw->mac.set_rar(hw, 0, hw->mac.addr, 0, true);
-@@ -729,7 +701,7 @@ s32 txgbe_init_rx_addrs(struct txgbe_hw *hw)
+ hw->mac.addr[2]);
+@@ -777,7 +749,7 @@ s32 txgbe_init_rx_addrs(struct txgbe_hw *hw)
@@ -407 +390 @@
-@@ -743,7 +715,7 @@ s32 txgbe_init_rx_addrs(struct txgbe_hw *hw)
+@@ -791,7 +763,7 @@ s32 txgbe_init_rx_addrs(struct txgbe_hw *hw)
@@ -416 +399 @@
-@@ -768,8 +740,6 @@ static s32 txgbe_mta_vector(struct txgbe_hw *hw, u8 *mc_addr)
+@@ -816,8 +788,6 @@ static s32 txgbe_mta_vector(struct txgbe_hw *hw, u8 *mc_addr)
@@ -425 +408 @@
-@@ -784,7 +754,7 @@ static s32 txgbe_mta_vector(struct txgbe_hw *hw, u8 *mc_addr)
+@@ -832,7 +802,7 @@ static s32 txgbe_mta_vector(struct txgbe_hw *hw, u8 *mc_addr)
@@ -434 +417 @@
-@@ -807,12 +777,10 @@ void txgbe_set_mta(struct txgbe_hw *hw, u8 *mc_addr)
+@@ -855,12 +825,10 @@ void txgbe_set_mta(struct txgbe_hw *hw, u8 *mc_addr)
@@ -448 +431 @@
-@@ -846,8 +814,6 @@ s32 txgbe_update_mc_addr_list(struct txgbe_hw *hw, u8 *mc_addr_list,
+@@ -894,8 +862,6 @@ s32 txgbe_update_mc_addr_list(struct txgbe_hw *hw, u8 *mc_addr_list,
@@ -457 +440 @@
-@@ -857,13 +823,13 @@ s32 txgbe_update_mc_addr_list(struct txgbe_hw *hw, u8 *mc_addr_list,
+@@ -905,13 +871,13 @@ s32 txgbe_update_mc_addr_list(struct txgbe_hw *hw, u8 *mc_addr_list,
@@ -473 +456 @@
-@@ -880,7 +846,7 @@ s32 txgbe_update_mc_addr_list(struct txgbe_hw *hw, u8 *mc_addr_list,
+@@ -928,7 +894,7 @@ s32 txgbe_update_mc_addr_list(struct txgbe_hw *hw, u8 *mc_addr_list,
@@ -482 +465 @@
-@@ -898,8 +864,6 @@ s32 txgbe_fc_enable(struct txgbe_hw *hw)
+@@ -946,8 +912,6 @@ s32 txgbe_fc_enable(struct txgbe_hw *hw)
@@ -491 +474 @@
-@@ -912,7 +876,7 @@ s32 txgbe_fc_enable(struct txgbe_hw *hw)
+@@ -960,7 +924,7 @@ s32 txgbe_fc_enable(struct txgbe_hw *hw)
@@ -500 +483 @@
-@@ -970,7 +934,7 @@ s32 txgbe_fc_enable(struct txgbe_hw *hw)
+@@ -1018,7 +982,7 @@ s32 txgbe_fc_enable(struct txgbe_hw *hw)
@@ -509 +492 @@
-@@ -1031,8 +995,7 @@ s32 txgbe_negotiate_fc(struct txgbe_hw *hw, u32 adv_reg, u32 lp_reg,
+@@ -1079,8 +1043,7 @@ s32 txgbe_negotiate_fc(struct txgbe_hw *hw, u32 adv_reg, u32 lp_reg,
@@ -519 +502 @@
-@@ -1047,22 +1010,22 @@ s32 txgbe_negotiate_fc(struct txgbe_hw *hw, u32 adv_reg, u32 lp_reg,
+@@ -1095,22 +1058,22 @@ s32 txgbe_negotiate_fc(struct txgbe_hw *hw, u32 adv_reg, u32 lp_reg,
@@ -547 +530 @@
-@@ -1162,8 +1125,6 @@ void txgbe_fc_autoneg(struct txgbe_hw *hw)
+@@ -1210,8 +1173,6 @@ void txgbe_fc_autoneg(struct txgbe_hw *hw)
@@ -556 +539 @@
-@@ -1229,8 +1190,6 @@ s32 txgbe_acquire_swfw_sync(struct txgbe_hw *hw, u32 mask)
+@@ -1277,8 +1238,6 @@ s32 txgbe_acquire_swfw_sync(struct txgbe_hw *hw, u32 mask)
@@ -565 +548 @@
-@@ -1273,8 +1232,6 @@ void txgbe_release_swfw_sync(struct txgbe_hw *hw, u32 mask)
+@@ -1321,8 +1280,6 @@ void txgbe_release_swfw_sync(struct txgbe_hw *hw, u32 mask)
@@ -574 +557 @@
-@@ -1298,8 +1255,6 @@ s32 txgbe_disable_sec_rx_path(struct txgbe_hw *hw)
+@@ -1346,8 +1303,6 @@ s32 txgbe_disable_sec_rx_path(struct txgbe_hw *hw)
@@ -583 +566 @@
-@@ -1314,8 +1269,7 @@ s32 txgbe_disable_sec_rx_path(struct txgbe_hw *hw)
+@@ -1362,8 +1317,7 @@ s32 txgbe_disable_sec_rx_path(struct txgbe_hw *hw)
@@ -593 +576 @@
-@@ -1330,8 +1284,6 @@ s32 txgbe_enable_sec_rx_path(struct txgbe_hw *hw)
+@@ -1378,8 +1332,6 @@ s32 txgbe_enable_sec_rx_path(struct txgbe_hw *hw)
@@ -602 +585 @@
-@@ -1367,8 +1319,7 @@ int txgbe_disable_sec_tx_path(struct txgbe_hw *hw)
+@@ -1415,8 +1367,7 @@ int txgbe_disable_sec_tx_path(struct txgbe_hw *hw)
@@ -612 +595 @@
-@@ -1405,8 +1356,6 @@ static s32 txgbe_get_san_mac_addr_offset(struct txgbe_hw *hw,
+@@ -1453,8 +1404,6 @@ static s32 txgbe_get_san_mac_addr_offset(struct txgbe_hw *hw,
@@ -621 +604 @@
-@@ -1437,8 +1386,6 @@ s32 txgbe_get_san_mac_addr(struct txgbe_hw *hw, u8 *san_mac_addr)
+@@ -1485,8 +1434,6 @@ s32 txgbe_get_san_mac_addr(struct txgbe_hw *hw, u8 *san_mac_addr)
@@ -630 +613 @@
-@@ -1487,8 +1434,6 @@ s32 txgbe_set_san_mac_addr(struct txgbe_hw *hw, u8 *san_mac_addr)
+@@ -1535,8 +1482,6 @@ s32 txgbe_set_san_mac_addr(struct txgbe_hw *hw, u8 *san_mac_addr)
@@ -639 +622 @@
-@@ -1519,11 +1464,9 @@ s32 txgbe_clear_vmdq(struct txgbe_hw *hw, u32 rar, u32 vmdq)
+@@ -1567,11 +1512,9 @@ s32 txgbe_clear_vmdq(struct txgbe_hw *hw, u32 rar, u32 vmdq)
@@ -652 +635 @@
-@@ -1573,11 +1516,9 @@ s32 txgbe_set_vmdq(struct txgbe_hw *hw, u32 rar, u32 vmdq)
+@@ -1621,11 +1564,9 @@ s32 txgbe_set_vmdq(struct txgbe_hw *hw, u32 rar, u32 vmdq)
@@ -665 +648 @@
-@@ -1602,8 +1543,7 @@ s32 txgbe_init_uta_tables(struct txgbe_hw *hw)
+@@ -1650,8 +1591,7 @@ s32 txgbe_init_uta_tables(struct txgbe_hw *hw)
@@ -675 +658 @@
-@@ -1658,7 +1598,7 @@ s32 txgbe_find_vlvf_slot(struct txgbe_hw *hw, u32 vlan, bool vlvf_bypass)
+@@ -1706,7 +1646,7 @@ s32 txgbe_find_vlvf_slot(struct txgbe_hw *hw, u32 vlan, bool vlvf_bypass)
@@ -684 +667 @@
-@@ -1679,8 +1619,6 @@ s32 txgbe_set_vfta(struct txgbe_hw *hw, u32 vlan, u32 vind,
+@@ -1727,8 +1667,6 @@ s32 txgbe_set_vfta(struct txgbe_hw *hw, u32 vlan, u32 vind,
@@ -693 +676 @@
-@@ -1748,8 +1686,6 @@ s32 txgbe_set_vlvf(struct txgbe_hw *hw, u32 vlan, u32 vind,
+@@ -1796,8 +1734,6 @@ s32 txgbe_set_vlvf(struct txgbe_hw *hw, u32 vlan, u32 vind,
@@ -702 +685 @@
-@@ -1829,8 +1765,6 @@ s32 txgbe_clear_vfta(struct txgbe_hw *hw)
+@@ -1877,8 +1813,6 @@ s32 txgbe_clear_vfta(struct txgbe_hw *hw)
@@ -711 +694 @@
-@@ -1884,8 +1818,6 @@ s32 txgbe_check_mac_link(struct txgbe_hw *hw, u32 *speed,
+@@ -1932,8 +1866,6 @@ s32 txgbe_check_mac_link(struct txgbe_hw *hw, u32 *speed,
@@ -720 +703 @@
-@@ -1916,7 +1848,7 @@ s32 txgbe_check_mac_link(struct txgbe_hw *hw, u32 *speed,
+@@ -1964,7 +1896,7 @@ s32 txgbe_check_mac_link(struct txgbe_hw *hw, u32 *speed,
@@ -729 +712 @@
-@@ -1971,8 +1903,6 @@ s32 txgbe_get_wwn_prefix(struct txgbe_hw *hw, u16 *wwnn_prefix,
+@@ -2019,8 +1951,6 @@ s32 txgbe_get_wwn_prefix(struct txgbe_hw *hw, u16 *wwnn_prefix,
@@ -738 +721 @@
-@@ -2062,8 +1992,6 @@ void txgbe_set_ethertype_anti_spoofing(struct txgbe_hw *hw,
+@@ -2110,8 +2040,6 @@ void txgbe_set_ethertype_anti_spoofing(struct txgbe_hw *hw,
@@ -747 +730 @@
-@@ -2185,8 +2113,6 @@ s32 txgbe_get_thermal_sensor_data(struct txgbe_hw *hw)
+@@ -2233,8 +2161,6 @@ s32 txgbe_get_thermal_sensor_data(struct txgbe_hw *hw)
@@ -756 +739 @@
-@@ -2217,8 +2143,6 @@ s32 txgbe_init_thermal_sensor_thresh(struct txgbe_hw *hw)
+@@ -2265,8 +2191,6 @@ s32 txgbe_init_thermal_sensor_thresh(struct txgbe_hw *hw)
@@ -765 +748 @@
-@@ -2289,8 +2213,6 @@ s32 txgbe_setup_mac_link_multispeed_fiber(struct txgbe_hw *hw,
+@@ -2337,8 +2261,6 @@ s32 txgbe_setup_mac_link_multispeed_fiber(struct txgbe_hw *hw,
@@ -774 +757 @@
-@@ -2315,7 +2237,7 @@ s32 txgbe_setup_mac_link_multispeed_fiber(struct txgbe_hw *hw,
+@@ -2363,7 +2285,7 @@ s32 txgbe_setup_mac_link_multispeed_fiber(struct txgbe_hw *hw,
@@ -783 +766 @@
-@@ -2365,7 +2287,7 @@ s32 txgbe_setup_mac_link_multispeed_fiber(struct txgbe_hw *hw,
+@@ -2413,7 +2335,7 @@ s32 txgbe_setup_mac_link_multispeed_fiber(struct txgbe_hw *hw,
@@ -792 +775 @@
-@@ -2431,8 +2353,6 @@ s32 txgbe_init_shared_code(struct txgbe_hw *hw)
+@@ -2479,8 +2401,6 @@ s32 txgbe_init_shared_code(struct txgbe_hw *hw)
@@ -801 +784 @@
-@@ -2468,8 +2388,6 @@ s32 txgbe_set_mac_type(struct txgbe_hw *hw)
+@@ -2513,8 +2433,6 @@ s32 txgbe_set_mac_type(struct txgbe_hw *hw)
@@ -810 +793 @@
-@@ -2491,7 +2409,7 @@ s32 txgbe_set_mac_type(struct txgbe_hw *hw)
+@@ -2550,7 +2468,7 @@ s32 txgbe_set_mac_type(struct txgbe_hw *hw)
@@ -814,3 +797,3 @@
-- DEBUGOUT("found mac: %d, returns: %d\n",
-+ DEBUGOUT("found mac: %d, returns: %d",
- hw->mac.type, err);
+- DEBUGOUT("found mac: %d media: %d, returns: %d\n",
++ DEBUGOUT("found mac: %d media: %d, returns: %d",
+ hw->mac.type, hw->phy.media_type, err);
@@ -819 +802 @@
-@@ -2500,8 +2418,6 @@ void txgbe_init_mac_link_ops(struct txgbe_hw *hw)
+@@ -2559,8 +2477,6 @@ void txgbe_init_mac_link_ops(struct txgbe_hw *hw)
@@ -828 +811 @@
-@@ -2544,8 +2460,6 @@ s32 txgbe_init_phy_raptor(struct txgbe_hw *hw)
+@@ -2607,8 +2523,6 @@ s32 txgbe_init_phy_raptor(struct txgbe_hw *hw)
@@ -834 +817 @@
- if ((hw->device_id & 0xFF) == TXGBE_DEV_ID_QSFP) {
+ if (hw->device_id == TXGBE_DEV_ID_RAPTOR_QSFP) {
@@ -837 +820 @@
-@@ -2592,8 +2506,6 @@ s32 txgbe_setup_sfp_modules(struct txgbe_hw *hw)
+@@ -2650,8 +2564,6 @@ s32 txgbe_setup_sfp_modules(struct txgbe_hw *hw)
@@ -846 +829 @@
-@@ -2613,7 +2525,7 @@ s32 txgbe_setup_sfp_modules(struct txgbe_hw *hw)
+@@ -2671,7 +2583,7 @@ s32 txgbe_setup_sfp_modules(struct txgbe_hw *hw)
@@ -855 +838 @@
-@@ -2711,8 +2623,6 @@ s32 txgbe_init_ops_pf(struct txgbe_hw *hw)
+@@ -2769,8 +2681,6 @@ s32 txgbe_init_ops_pf(struct txgbe_hw *hw)
@@ -864 +847 @@
-@@ -2839,8 +2749,6 @@ s32 txgbe_get_link_capabilities_raptor(struct txgbe_hw *hw,
+@@ -2895,8 +2805,6 @@ s32 txgbe_get_link_capabilities_raptor(struct txgbe_hw *hw,
@@ -873 +856 @@
-@@ -2944,8 +2852,6 @@ u32 txgbe_get_media_type_raptor(struct txgbe_hw *hw)
+@@ -3000,8 +2908,6 @@ u32 txgbe_get_media_type_raptor(struct txgbe_hw *hw)
@@ -879,4 +862,4 @@
- if (hw->phy.ffe_set)
- txgbe_bp_mode_set(hw);
-
-@@ -3004,8 +2910,6 @@ s32 txgbe_start_mac_link_raptor(struct txgbe_hw *hw,
+ /* Detect if there is a copper PHY attached. */
+ switch (hw->phy.type) {
+ case txgbe_phy_cu_unknown:
+@@ -3050,8 +2956,6 @@ s32 txgbe_start_mac_link_raptor(struct txgbe_hw *hw,
@@ -891 +874 @@
-@@ -3095,8 +2999,6 @@ void txgbe_enable_tx_laser_multispeed_fiber(struct txgbe_hw *hw)
+@@ -3134,8 +3038,6 @@ void txgbe_enable_tx_laser_multispeed_fiber(struct txgbe_hw *hw)
@@ -900 +883 @@
-@@ -3128,7 +3030,7 @@ void txgbe_set_hard_rate_select_speed(struct txgbe_hw *hw,
+@@ -3167,7 +3069,7 @@ void txgbe_set_hard_rate_select_speed(struct txgbe_hw *hw,
@@ -909 +892 @@
-@@ -3154,8 +3056,6 @@ s32 txgbe_setup_mac_link_smartspeed(struct txgbe_hw *hw,
+@@ -3193,8 +3095,6 @@ s32 txgbe_setup_mac_link_smartspeed(struct txgbe_hw *hw,
@@ -918 +901 @@
-@@ -3244,8 +3144,7 @@ s32 txgbe_setup_mac_link_smartspeed(struct txgbe_hw *hw,
+@@ -3283,8 +3183,7 @@ s32 txgbe_setup_mac_link_smartspeed(struct txgbe_hw *hw,
@@ -928,2 +911,2 @@
-@@ -3271,7 +3170,6 @@ s32 txgbe_setup_mac_link(struct txgbe_hw *hw,
- u64 orig_autoc = 0;
+@@ -3313,8 +3212,6 @@ s32 txgbe_setup_mac_link(struct txgbe_hw *hw,
+ u32 i;
@@ -933,2 +916 @@
- UNREFERENCED_PARAMETER(autoneg_wait_to_complete);
-
+-
@@ -936 +918,3 @@
-@@ -3358,8 +3256,6 @@ static s32 txgbe_setup_copper_link_raptor(struct txgbe_hw *hw,
+ status = hw->mac.get_link_capabilities(hw,
+ &link_capabilities, &autoneg);
+@@ -3421,8 +3318,6 @@ static s32 txgbe_setup_copper_link_raptor(struct txgbe_hw *hw,
@@ -945 +929 @@
-@@ -3468,8 +3364,6 @@ s32 txgbe_reset_hw(struct txgbe_hw *hw)
+@@ -3530,8 +3425,6 @@ s32 txgbe_reset_hw(struct txgbe_hw *hw)
@@ -954,27 +938 @@
-@@ -3625,15 +3519,13 @@ s32 txgbe_reinit_fdir_tables(struct txgbe_hw *hw)
- u32 fdircmd;
- fdirctrl &= ~TXGBE_FDIRCTL_INITDONE;
-
-- DEBUGFUNC("txgbe_reinit_fdir_tables");
--
- /*
- * Before starting reinitialization process,
- * FDIRPICMD.OP must be zero.
- */
- err = txgbe_fdir_check_cmd_complete(hw, &fdircmd);
- if (err) {
-- DEBUGOUT("Flow Director previous command did not complete, aborting table re-initialization.\n");
-+ DEBUGOUT("Flow Director previous command did not complete, aborting table re-initialization.");
- return err;
- }
-
-@@ -3667,7 +3559,7 @@ s32 txgbe_reinit_fdir_tables(struct txgbe_hw *hw)
- msec_delay(1);
- }
- if (i >= TXGBE_FDIR_INIT_DONE_POLL) {
-- DEBUGOUT("Flow Director Signature poll time exceeded!\n");
-+ DEBUGOUT("Flow Director Signature poll time exceeded!");
- return TXGBE_ERR_FDIR_REINIT_FAILED;
- }
-
-@@ -3693,8 +3585,6 @@ s32 txgbe_start_hw_raptor(struct txgbe_hw *hw)
+@@ -3661,8 +3554,6 @@ s32 txgbe_start_hw_raptor(struct txgbe_hw *hw)
@@ -989 +947 @@
-@@ -3719,8 +3609,6 @@ out:
+@@ -3687,8 +3578,6 @@ out:
@@ -998 +956 @@
-@@ -3753,8 +3641,6 @@ bool txgbe_verify_lesm_fw_enabled_raptor(struct txgbe_hw *hw)
+@@ -3721,8 +3610,6 @@ bool txgbe_verify_lesm_fw_enabled_raptor(struct txgbe_hw *hw)
@@ -1008 +966 @@
-index 4d64c6c3e9..7f2489a13f 100644
+index bfe53478ea..3ef4fce1f2 100644
@@ -1011 +969 @@
-@@ -21,8 +21,6 @@ s32 txgbe_read_mbx(struct txgbe_hw *hw, u32 *msg, u16 size, u16 mbx_id)
+@@ -20,8 +20,6 @@ s32 txgbe_read_mbx(struct txgbe_hw *hw, u32 *msg, u16 size, u16 mbx_id)
@@ -1020 +978 @@
-@@ -47,8 +45,6 @@ s32 txgbe_write_mbx(struct txgbe_hw *hw, u32 *msg, u16 size, u16 mbx_id)
+@@ -46,8 +44,6 @@ s32 txgbe_write_mbx(struct txgbe_hw *hw, u32 *msg, u16 size, u16 mbx_id)
@@ -1029 +987 @@
-@@ -71,8 +67,6 @@ s32 txgbe_check_for_msg(struct txgbe_hw *hw, u16 mbx_id)
+@@ -70,8 +66,6 @@ s32 txgbe_check_for_msg(struct txgbe_hw *hw, u16 mbx_id)
@@ -1038 +996 @@
-@@ -91,8 +85,6 @@ s32 txgbe_check_for_ack(struct txgbe_hw *hw, u16 mbx_id)
+@@ -90,8 +84,6 @@ s32 txgbe_check_for_ack(struct txgbe_hw *hw, u16 mbx_id)
@@ -1047 +1005 @@
-@@ -111,8 +103,6 @@ s32 txgbe_check_for_rst(struct txgbe_hw *hw, u16 mbx_id)
+@@ -110,8 +102,6 @@ s32 txgbe_check_for_rst(struct txgbe_hw *hw, u16 mbx_id)
@@ -1056,87 +1014 @@
-@@ -131,8 +121,6 @@ STATIC s32 txgbe_poll_for_msg(struct txgbe_hw *hw, u16 mbx_id)
- struct txgbe_mbx_info *mbx = &hw->mbx;
- int countdown = mbx->timeout;
-
-- DEBUGFUNC("txgbe_poll_for_msg");
--
- if (!countdown || !mbx->check_for_msg)
- goto out;
-
-@@ -162,8 +150,6 @@ STATIC s32 txgbe_poll_for_ack(struct txgbe_hw *hw, u16 mbx_id)
- struct txgbe_mbx_info *mbx = &hw->mbx;
- int countdown = mbx->timeout;
-
-- DEBUGFUNC("txgbe_poll_for_ack");
--
- if (!countdown || !mbx->check_for_ack)
- goto out;
-
-@@ -196,8 +182,6 @@ s32 txgbe_read_posted_mbx(struct txgbe_hw *hw, u32 *msg, u16 size, u16 mbx_id)
- struct txgbe_mbx_info *mbx = &hw->mbx;
- s32 ret_val = TXGBE_ERR_MBX;
-
-- DEBUGFUNC("txgbe_read_posted_mbx");
--
- if (!mbx->read)
- goto out;
-
-@@ -226,8 +210,6 @@ s32 txgbe_write_posted_mbx(struct txgbe_hw *hw, u32 *msg, u16 size,
- struct txgbe_mbx_info *mbx = &hw->mbx;
- s32 ret_val = TXGBE_ERR_MBX;
-
-- DEBUGFUNC("txgbe_write_posted_mbx");
--
- /* exit if either we can't write or there isn't a defined timeout */
- if (!mbx->write || !mbx->timeout)
- goto out;
-@@ -292,7 +274,6 @@ s32 txgbe_check_for_msg_vf(struct txgbe_hw *hw, u16 mbx_id)
- s32 ret_val = TXGBE_ERR_MBX;
-
- UNREFERENCED_PARAMETER(mbx_id);
-- DEBUGFUNC("txgbe_check_for_msg_vf");
-
- if (!txgbe_check_for_bit_vf(hw, TXGBE_VFMBCTL_PFSTS)) {
- ret_val = 0;
-@@ -314,7 +295,6 @@ s32 txgbe_check_for_ack_vf(struct txgbe_hw *hw, u16 mbx_id)
- s32 ret_val = TXGBE_ERR_MBX;
-
- UNREFERENCED_PARAMETER(mbx_id);
-- DEBUGFUNC("txgbe_check_for_ack_vf");
-
- if (!txgbe_check_for_bit_vf(hw, TXGBE_VFMBCTL_PFACK)) {
- ret_val = 0;
-@@ -336,7 +316,6 @@ s32 txgbe_check_for_rst_vf(struct txgbe_hw *hw, u16 mbx_id)
- s32 ret_val = TXGBE_ERR_MBX;
-
- UNREFERENCED_PARAMETER(mbx_id);
-- DEBUGFUNC("txgbe_check_for_rst_vf");
-
- if (!txgbe_check_for_bit_vf(hw, (TXGBE_VFMBCTL_RSTD |
- TXGBE_VFMBCTL_RSTI))) {
-@@ -357,8 +336,6 @@ STATIC s32 txgbe_obtain_mbx_lock_vf(struct txgbe_hw *hw)
- {
- s32 ret_val = TXGBE_ERR_MBX;
-
-- DEBUGFUNC("txgbe_obtain_mbx_lock_vf");
--
- /* Take ownership of the buffer */
- wr32(hw, TXGBE_VFMBCTL, TXGBE_VFMBCTL_VFU);
-
-@@ -386,8 +363,6 @@ s32 txgbe_write_mbx_vf(struct txgbe_hw *hw, u32 *msg, u16 size,
-
- UNREFERENCED_PARAMETER(mbx_id);
-
-- DEBUGFUNC("txgbe_write_mbx_vf");
--
- /* lock the mailbox to prevent pf/vf race condition */
- ret_val = txgbe_obtain_mbx_lock_vf(hw);
- if (ret_val)
-@@ -426,7 +401,6 @@ s32 txgbe_read_mbx_vf(struct txgbe_hw *hw, u32 *msg, u16 size,
- s32 ret_val = 0;
- u16 i;
-
-- DEBUGFUNC("txgbe_read_mbx_vf");
- UNREFERENCED_PARAMETER(mbx_id);
-
- /* lock the mailbox to prevent pf/vf race condition */
-@@ -499,8 +473,6 @@ s32 txgbe_check_for_msg_pf(struct txgbe_hw *hw, u16 vf_number)
+@@ -144,8 +134,6 @@ s32 txgbe_check_for_msg_pf(struct txgbe_hw *hw, u16 vf_number)
@@ -1151 +1023 @@
-@@ -523,8 +495,6 @@ s32 txgbe_check_for_ack_pf(struct txgbe_hw *hw, u16 vf_number)
+@@ -168,8 +156,6 @@ s32 txgbe_check_for_ack_pf(struct txgbe_hw *hw, u16 vf_number)
@@ -1160 +1032 @@
-@@ -548,8 +518,6 @@ s32 txgbe_check_for_rst_pf(struct txgbe_hw *hw, u16 vf_number)
+@@ -193,8 +179,6 @@ s32 txgbe_check_for_rst_pf(struct txgbe_hw *hw, u16 vf_number)
@@ -1169 +1041 @@
-@@ -572,8 +540,6 @@ STATIC s32 txgbe_obtain_mbx_lock_pf(struct txgbe_hw *hw, u16 vf_number)
+@@ -217,8 +201,6 @@ STATIC s32 txgbe_obtain_mbx_lock_pf(struct txgbe_hw *hw, u16 vf_number)
@@ -1178 +1050 @@
-@@ -602,8 +568,6 @@ s32 txgbe_write_mbx_pf(struct txgbe_hw *hw, u32 *msg, u16 size, u16 vf_number)
+@@ -247,8 +229,6 @@ s32 txgbe_write_mbx_pf(struct txgbe_hw *hw, u32 *msg, u16 size, u16 vf_number)
@@ -1187 +1059 @@
-@@ -643,8 +607,6 @@ s32 txgbe_read_mbx_pf(struct txgbe_hw *hw, u32 *msg, u16 size, u16 vf_number)
+@@ -288,8 +268,6 @@ s32 txgbe_read_mbx_pf(struct txgbe_hw *hw, u32 *msg, u16 size, u16 vf_number)
@@ -1197 +1069 @@
-index d0aa665d4a..07bbfe8142 100644
+index 224e48f5e1..b492dc8f11 100644
@@ -1200 +1072 @@
-@@ -45,10 +45,8 @@ txgbe_hic_unlocked(struct txgbe_hw *hw, u32 *buffer, u32 length, u32 timeout)
+@@ -44,10 +44,8 @@ txgbe_hic_unlocked(struct txgbe_hw *hw, u32 *buffer, u32 length, u32 timeout)
@@ -1212 +1084 @@
-@@ -78,12 +76,12 @@ txgbe_hic_unlocked(struct txgbe_hw *hw, u32 *buffer, u32 length, u32 timeout)
+@@ -77,7 +75,7 @@ txgbe_hic_unlocked(struct txgbe_hw *hw, u32 *buffer, u32 length, u32 timeout)
@@ -1221,7 +1093 @@
- if ((rd32(hw, TXGBE_MNGMBX) & 0xff0000) >> 16 == 0x80) {
-- DEBUGOUT("It's unknown command.\n");
-+ DEBUGOUT("It's unknown command.");
- return TXGBE_ERR_MNG_ACCESS_FAILED;
- }
-
-@@ -119,10 +117,8 @@ txgbe_host_interface_command(struct txgbe_hw *hw, u32 *buffer,
+@@ -113,10 +111,8 @@ txgbe_host_interface_command(struct txgbe_hw *hw, u32 *buffer,
@@ -1239 +1105 @@
-@@ -164,7 +160,7 @@ txgbe_host_interface_command(struct txgbe_hw *hw, u32 *buffer,
+@@ -158,7 +154,7 @@ txgbe_host_interface_command(struct txgbe_hw *hw, u32 *buffer,
@@ -1248,19 +1114 @@
-@@ -273,8 +269,6 @@ s32 txgbe_close_notify(struct txgbe_hw *hw)
- s32 status;
- struct txgbe_hic_write_shadow_ram buffer;
-
-- DEBUGFUNC("txgbe_close_notify");
--
- buffer.hdr.req.cmd = FW_DW_CLOSE_NOTIFY;
- buffer.hdr.req.buf_lenh = 0;
- buffer.hdr.req.buf_lenl = 0;
-@@ -305,8 +299,6 @@ s32 txgbe_open_notify(struct txgbe_hw *hw)
- s32 status;
- struct txgbe_hic_write_shadow_ram buffer;
-
-- DEBUGFUNC("txgbe_open_notify");
--
- buffer.hdr.req.cmd = FW_DW_OPEN_NOTIFY;
- buffer.hdr.req.buf_lenh = 0;
- buffer.hdr.req.buf_lenl = 0;
-@@ -354,7 +346,6 @@ s32 txgbe_hic_set_drv_ver(struct txgbe_hw *hw, u8 maj, u8 min,
+@@ -284,7 +280,6 @@ s32 txgbe_hic_set_drv_ver(struct txgbe_hw *hw, u8 maj, u8 min,
@@ -1274 +1122 @@
-@@ -407,8 +398,6 @@ txgbe_hic_reset(struct txgbe_hw *hw)
+@@ -337,8 +332,6 @@ txgbe_hic_reset(struct txgbe_hw *hw)
@@ -1284 +1132 @@
-index 11fcf7e8fe..b62c0b0824 100644
+index e18e400af3..4a0dd385b3 100644
@@ -1287 +1135 @@
-@@ -18,6 +18,7 @@
+@@ -17,6 +17,7 @@
@@ -1296 +1144 @@
-index 3fb929f37a..da2bbc43e0 100644
+index aa8037a36e..ce6d580636 100644
@@ -1299 +1147 @@
-@@ -35,7 +35,7 @@ static bool txgbe_identify_extphy(struct txgbe_hw *hw)
+@@ -22,7 +22,7 @@ static bool txgbe_identify_extphy(struct txgbe_hw *hw)
@@ -1308 +1156 @@
-@@ -100,8 +100,6 @@ s32 txgbe_identify_phy(struct txgbe_hw *hw)
+@@ -87,8 +87,6 @@ s32 txgbe_identify_phy(struct txgbe_hw *hw)
@@ -1317 +1165 @@
-@@ -137,11 +135,9 @@ s32 txgbe_check_reset_blocked(struct txgbe_hw *hw)
+@@ -124,11 +122,9 @@ s32 txgbe_check_reset_blocked(struct txgbe_hw *hw)
@@ -1330 +1178 @@
-@@ -159,8 +155,6 @@ bool txgbe_validate_phy_addr(struct txgbe_hw *hw, u32 phy_addr)
+@@ -146,8 +142,6 @@ bool txgbe_validate_phy_addr(struct txgbe_hw *hw, u32 phy_addr)
@@ -1339 +1187 @@
-@@ -168,7 +162,7 @@ bool txgbe_validate_phy_addr(struct txgbe_hw *hw, u32 phy_addr)
+@@ -155,7 +149,7 @@ bool txgbe_validate_phy_addr(struct txgbe_hw *hw, u32 phy_addr)
@@ -1348 +1196 @@
-@@ -184,8 +178,6 @@ s32 txgbe_get_phy_id(struct txgbe_hw *hw)
+@@ -171,8 +165,6 @@ s32 txgbe_get_phy_id(struct txgbe_hw *hw)
@@ -1357 +1205 @@
-@@ -198,7 +190,7 @@ s32 txgbe_get_phy_id(struct txgbe_hw *hw)
+@@ -185,7 +177,7 @@ s32 txgbe_get_phy_id(struct txgbe_hw *hw)
@@ -1366 +1214 @@
-@@ -213,8 +205,6 @@ enum txgbe_phy_type txgbe_get_phy_type_from_id(u32 phy_id)
+@@ -200,8 +192,6 @@ enum txgbe_phy_type txgbe_get_phy_type_from_id(u32 phy_id)
@@ -1375 +1223 @@
-@@ -272,7 +262,7 @@ txgbe_reset_extphy(struct txgbe_hw *hw)
+@@ -259,7 +249,7 @@ txgbe_reset_extphy(struct txgbe_hw *hw)
@@ -1384 +1232 @@
-@@ -286,8 +276,6 @@ s32 txgbe_reset_phy(struct txgbe_hw *hw)
+@@ -273,8 +263,6 @@ s32 txgbe_reset_phy(struct txgbe_hw *hw)
@@ -1393 +1241 @@
-@@ -343,7 +331,7 @@ s32 txgbe_read_phy_reg_mdi(struct txgbe_hw *hw, u32 reg_addr, u32 device_type,
+@@ -330,7 +318,7 @@ s32 txgbe_read_phy_reg_mdi(struct txgbe_hw *hw, u32 reg_addr, u32 device_type,
@@ -1402 +1250 @@
-@@ -367,8 +355,6 @@ s32 txgbe_read_phy_reg(struct txgbe_hw *hw, u32 reg_addr,
+@@ -354,8 +342,6 @@ s32 txgbe_read_phy_reg(struct txgbe_hw *hw, u32 reg_addr,
@@ -1411 +1259 @@
-@@ -406,7 +392,7 @@ s32 txgbe_write_phy_reg_mdi(struct txgbe_hw *hw, u32 reg_addr,
+@@ -393,7 +379,7 @@ s32 txgbe_write_phy_reg_mdi(struct txgbe_hw *hw, u32 reg_addr,
@@ -1420 +1268 @@
-@@ -427,8 +413,6 @@ s32 txgbe_write_phy_reg(struct txgbe_hw *hw, u32 reg_addr,
+@@ -414,8 +400,6 @@ s32 txgbe_write_phy_reg(struct txgbe_hw *hw, u32 reg_addr,
@@ -1429 +1277 @@
-@@ -452,8 +436,6 @@ s32 txgbe_setup_phy_link(struct txgbe_hw *hw)
+@@ -439,8 +423,6 @@ s32 txgbe_setup_phy_link(struct txgbe_hw *hw)
@@ -1438 +1286 @@
-@@ -539,8 +521,6 @@ s32 txgbe_setup_phy_link_speed(struct txgbe_hw *hw,
+@@ -526,8 +508,6 @@ s32 txgbe_setup_phy_link_speed(struct txgbe_hw *hw,
@@ -1447 +1295 @@
-@@ -623,8 +603,6 @@ s32 txgbe_get_copper_link_capabilities(struct txgbe_hw *hw,
+@@ -598,8 +578,6 @@ s32 txgbe_get_copper_link_capabilities(struct txgbe_hw *hw,
@@ -1456 +1304 @@
-@@ -652,8 +630,6 @@ s32 txgbe_check_phy_link_tnx(struct txgbe_hw *hw, u32 *speed,
+@@ -627,8 +605,6 @@ s32 txgbe_check_phy_link_tnx(struct txgbe_hw *hw, u32 *speed,
@@ -1465 +1313 @@
-@@ -697,8 +673,6 @@ s32 txgbe_setup_phy_link_tnx(struct txgbe_hw *hw)
+@@ -672,8 +648,6 @@ s32 txgbe_setup_phy_link_tnx(struct txgbe_hw *hw)
@@ -1474 +1322 @@
-@@ -772,8 +746,6 @@ s32 txgbe_identify_module(struct txgbe_hw *hw)
+@@ -747,8 +721,6 @@ s32 txgbe_identify_module(struct txgbe_hw *hw)
@@ -1483 +1331 @@
-@@ -811,8 +783,6 @@ s32 txgbe_identify_sfp_module(struct txgbe_hw *hw)
+@@ -786,8 +758,6 @@ s32 txgbe_identify_sfp_module(struct txgbe_hw *hw)
@@ -1492 +1340 @@
-@@ -992,7 +962,7 @@ ERR_I2C:
+@@ -967,7 +937,7 @@ ERR_I2C:
@@ -1501 +1349 @@
-@@ -1021,8 +991,6 @@ s32 txgbe_identify_qsfp_module(struct txgbe_hw *hw)
+@@ -996,8 +966,6 @@ s32 txgbe_identify_qsfp_module(struct txgbe_hw *hw)
@@ -1510 +1358 @@
-@@ -1165,10 +1133,10 @@ ERR_I2C:
+@@ -1140,10 +1108,10 @@ ERR_I2C:
@@ -1523 +1371 @@
-@@ -1194,8 +1162,6 @@ out:
+@@ -1169,8 +1137,6 @@ out:
@@ -1532 +1380 @@
-@@ -1228,8 +1194,6 @@ s32 txgbe_read_i2c_sff8472(struct txgbe_hw *hw, u8 byte_offset,
+@@ -1203,8 +1169,6 @@ s32 txgbe_read_i2c_sff8472(struct txgbe_hw *hw, u8 byte_offset,
@@ -1541 +1389 @@
-@@ -1248,8 +1212,6 @@ s32 txgbe_write_i2c_eeprom(struct txgbe_hw *hw, u8 byte_offset,
+@@ -1223,8 +1187,6 @@ s32 txgbe_write_i2c_eeprom(struct txgbe_hw *hw, u8 byte_offset,
@@ -1550 +1398 @@
-@@ -1312,8 +1274,6 @@ s32 txgbe_read_i2c_byte(struct txgbe_hw *hw, u8 byte_offset,
+@@ -1287,8 +1249,6 @@ s32 txgbe_read_i2c_byte(struct txgbe_hw *hw, u8 byte_offset,
@@ -1559 +1407 @@
-@@ -1367,8 +1327,6 @@ s32 txgbe_write_i2c_byte(struct txgbe_hw *hw, u8 byte_offset,
+@@ -1342,8 +1302,6 @@ s32 txgbe_write_i2c_byte(struct txgbe_hw *hw, u8 byte_offset,
@@ -1568 +1416 @@
-@@ -1396,12 +1354,10 @@ static void txgbe_i2c_start(struct txgbe_hw *hw, u8 dev_addr)
+@@ -1371,12 +1329,10 @@ static void txgbe_i2c_start(struct txgbe_hw *hw, u8 dev_addr)
@@ -1582,139 +1429,0 @@
-@@ -2420,8 +2376,6 @@ s32 txgbe_kr_handle(struct txgbe_hw *hw)
- u32 value;
- s32 status = 0;
-
-- DEBUGFUNC("txgbe_kr_handle");
--
- value = rd32_epcs(hw, VR_AN_INTR);
- BP_LOG("AN INTERRUPT!! value: 0x%x\n", value);
- if (!(value & VR_AN_INTR_PG_RCV)) {
-@@ -2445,8 +2399,6 @@ static s32 txgbe_handle_bp_flow(u32 link_mode, struct txgbe_hw *hw)
- s32 status = 0;
- struct txgbe_backplane_ability local_ability, lp_ability;
-
-- DEBUGFUNC("txgbe_handle_bp_flow");
--
- local_ability.current_link_mode = link_mode;
-
- /* 1. Get the local AN73 Base Page Ability */
-@@ -2548,8 +2500,6 @@ static void txgbe_get_bp_ability(struct txgbe_backplane_ability *ability,
- {
- u32 value = 0;
-
-- DEBUGFUNC("txgbe_get_bp_ability");
--
- /* Link Partner Base Page */
- if (link_partner == 1) {
- /* Read the link partner AN73 Base Page Ability Registers */
-@@ -2621,8 +2571,6 @@ static s32 txgbe_check_bp_ability(struct txgbe_backplane_ability *local_ability,
- u32 com_link_abi;
- s32 ret = 0;
-
-- DEBUGFUNC("txgbe_check_bp_ability");
--
- com_link_abi = local_ability->link_ability & lp_ability->link_ability;
- BP_LOG("com_link_abi = 0x%x, local_ability = 0x%x, lp_ability = 0x%x\n",
- com_link_abi, local_ability->link_ability,
-@@ -2678,8 +2626,6 @@ static void txgbe_clear_bp_intr(u32 bit, u32 bit_high, struct txgbe_hw *hw)
- {
- u32 rdata = 0, wdata, i;
-
-- DEBUGFUNC("txgbe_clear_bp_intr");
--
- rdata = rd32_epcs(hw, VR_AN_INTR);
- BP_LOG("[Before clear]Read VR AN MMD Interrupt Register: 0x%x\n",
- rdata);
-@@ -2704,8 +2650,6 @@ static s32 txgbe_enable_kr_training(struct txgbe_hw *hw)
- s32 status = 0;
- u32 value = 0;
-
-- DEBUGFUNC("txgbe_enable_kr_training");
--
- BP_LOG("Enable Clause 72 KR Training ...\n");
-
- if (CL72_KRTR_PRBS_MODE_EN != 0xFFFF) {
-@@ -2749,8 +2693,6 @@ static s32 txgbe_disable_kr_training(struct txgbe_hw *hw, s32 post, s32 mode)
- {
- s32 status = 0;
-
-- DEBUGFUNC("txgbe_disable_kr_training");
--
- BP_LOG("Disable Clause 72 KR Training ...\n");
- /* Read PHY Lane0 TX EQ before Clause 72 KR Training. */
- txgbe_read_phy_lane_tx_eq(0, hw, post, mode);
-@@ -2767,8 +2709,6 @@ static s32 txgbe_check_kr_training(struct txgbe_hw *hw)
- int i;
- int times = hw->devarg.poll ? 35 : 20;
-
-- DEBUGFUNC("txgbe_check_kr_training");
--
- for (i = 0; i < times; i++) {
- value = rd32_epcs(hw, SR_PMA_KR_LP_CEU);
- BP_LOG("SR PMA MMD 10GBASE-KR LP Coefficient Update Register: 0x%x\n",
-@@ -2826,8 +2766,6 @@ static void txgbe_read_phy_lane_tx_eq(u16 lane, struct txgbe_hw *hw,
- u32 addr;
- u32 tx_main_cursor, tx_pre_cursor, tx_post_cursor, lmain;
-
-- DEBUGFUNC("txgbe_read_phy_lane_tx_eq");
--
- addr = TXGBE_PHY_LANE0_TX_EQ_CTL1 | (lane << 8);
- value = rd32_ephy(hw, addr);
- BP_LOG("PHY LANE TX EQ Read Value: %x\n", lane);
-diff --git a/drivers/net/txgbe/base/txgbe_vf.c b/drivers/net/txgbe/base/txgbe_vf.c
-index fb6d6d90ea..a73502351e 100644
---- a/drivers/net/txgbe/base/txgbe_vf.c
-+++ b/drivers/net/txgbe/base/txgbe_vf.c
-@@ -107,8 +107,6 @@ s32 txgbe_reset_hw_vf(struct txgbe_hw *hw)
- u32 msgbuf[TXGBE_VF_PERMADDR_MSG_LEN];
- u8 *addr = (u8 *)(&msgbuf[1]);
-
-- DEBUGFUNC("txgbevf_reset_hw_vf");
--
- /* Call adapter stop to disable tx/rx and clear interrupts */
- hw->mac.stop_hw(hw);
-
-@@ -121,7 +119,7 @@ s32 txgbe_reset_hw_vf(struct txgbe_hw *hw)
- mbx->write_posted(hw, msgbuf, 1, 0);
- msec_delay(10);
-
-- DEBUGOUT("Issuing a function level reset to MAC\n");
-+ DEBUGOUT("Issuing a function level reset to MAC");
- wr32(hw, TXGBE_VFRST, TXGBE_VFRST_SET);
- txgbe_flush(hw);
- msec_delay(50);
-@@ -238,7 +236,7 @@ STATIC s32 txgbe_mta_vector(struct txgbe_hw *hw, u8 *mc_addr)
- vector = ((mc_addr[4]) | (((u16)mc_addr[5]) << 8));
- break;
- default: /* Invalid mc_filter_type */
-- DEBUGOUT("MC filter type param set incorrectly\n");
-+ DEBUGOUT("MC filter type param set incorrectly");
- ASSERT(0);
- break;
- }
-@@ -316,8 +314,6 @@ s32 txgbe_update_mc_addr_list_vf(struct txgbe_hw *hw, u8 *mc_addr_list,
-
- UNREFERENCED_PARAMETER(clear);
-
-- DEBUGFUNC("txgbe_update_mc_addr_list_vf");
--
- /* Each entry in the list uses 1 16 bit word. We have 30
- * 16 bit words available in our HW msg buffer (minus 1 for the
- * msg type). That's 30 hash values if we pack 'em right. If
-@@ -327,7 +323,7 @@ s32 txgbe_update_mc_addr_list_vf(struct txgbe_hw *hw, u8 *mc_addr_list,
- * addresses except for in large enterprise network environments.
- */
-
-- DEBUGOUT("MC Addr Count = %d\n", mc_addr_count);
-+ DEBUGOUT("MC Addr Count = %d", mc_addr_count);
-
- cnt = (mc_addr_count > 30) ? 30 : mc_addr_count;
- msgbuf[0] = TXGBE_VF_SET_MULTICAST;
-@@ -335,7 +331,7 @@ s32 txgbe_update_mc_addr_list_vf(struct txgbe_hw *hw, u8 *mc_addr_list,
-
- for (i = 0; i < cnt; i++) {
- vector = txgbe_mta_vector(hw, next(hw, &mc_addr_list, &vmdq));
-- DEBUGOUT("Hash value = 0x%03X\n", vector);
-+ DEBUGOUT("Hash value = 0x%03X", vector);
- vector_list[i] = (u16)vector;
- }
-
@@ -1722 +1431 @@
-index 67e9bfb3af..74f49ab9ef 100644
+index f44ca06ee2..337e2cb5e8 100644
@@ -1725 +1434 @@
-@@ -48,11 +48,8 @@ extern int txgbe_logtype_tx_free;
+@@ -45,10 +45,7 @@ extern int txgbe_logtype_tx_free;
@@ -1737,2 +1446 @@
- extern int txgbe_logtype_bp;
- #define BP_LOG(fmt, args...) \
+ #endif /* _TXGBE_LOGS_H_ */
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/ena: remove unused enumeration' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (31 preceding siblings ...)
2022-02-28 21:20 ` patch 'net/txgbe: fix debug logs' " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-02-28 21:20 ` patch 'net/ena: remove unused offload variables' " luca.boccassi
` (16 subsequent siblings)
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Michal Krawczyk
Cc: Artur Rojek, Dawid Gorecki, Igor Chauskin, Shai Brandes, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/d609358e18094040e566cd2018ea23842057290c
Thanks.
Luca Boccassi
---
From d609358e18094040e566cd2018ea23842057290c Mon Sep 17 00:00:00 2001
From: Michal Krawczyk <mk@semihalf.com>
Date: Wed, 23 Feb 2022 13:19:26 +0100
Subject: [PATCH] net/ena: remove unused enumeration
[ upstream commit 0f135d2fe2644182ce1ad92ab4f2311a50bfb267 ]
The enumeration seems to be leftover from porting the Linux driver to
the DPDK. It was used nowhere and refers to the ethtool which is not
present in the DPDK.
Fixes: 372c1af5ed8f ("net/ena: add dedicated memory area for extra device info")
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Artur Rojek <ar@semihalf.com>
Reviewed-by: Dawid Gorecki <dgr@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Shai Brandes <shaibran@amazon.com>
---
drivers/net/ena/ena_ethdev.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 5ad01677fc..207709c0ca 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -53,11 +53,6 @@
#define ENA_PTYPE_HAS_HASH (RTE_PTYPE_L4_TCP | RTE_PTYPE_L4_UDP)
-enum ethtool_stringset {
- ETH_SS_TEST = 0,
- ETH_SS_STATS,
-};
-
struct ena_stats {
char name[ETH_GSTRING_LEN];
int stat_offset;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:56.702803769 +0000
+++ 0034-net-ena-remove-unused-enumeration.patch 2022-02-28 21:17:53.976932211 +0000
@@ -1 +1 @@
-From 0f135d2fe2644182ce1ad92ab4f2311a50bfb267 Mon Sep 17 00:00:00 2001
+From d609358e18094040e566cd2018ea23842057290c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0f135d2fe2644182ce1ad92ab4f2311a50bfb267 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 34fb43cb00..2de2dcf12f 100644
+index 5ad01677fc..207709c0ca 100644
@@ -26 +27 @@
-@@ -38,11 +38,6 @@
+@@ -53,11 +53,6 @@
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/ena: remove unused offload variables' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (32 preceding siblings ...)
2022-02-28 21:20 ` patch 'net/ena: remove unused enumeration' " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-02-28 21:20 ` patch 'net/ena: skip timer if reset is triggered' " luca.boccassi
` (15 subsequent siblings)
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Michal Krawczyk
Cc: Artur Rojek, Dawid Gorecki, Igor Chauskin, Shai Brandes, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/39f6adbf547a9c624360ad612c0b9522f1520afd
Thanks.
Luca Boccassi
---
From 39f6adbf547a9c624360ad612c0b9522f1520afd Mon Sep 17 00:00:00 2001
From: Michal Krawczyk <mk@semihalf.com>
Date: Wed, 23 Feb 2022 13:19:27 +0100
Subject: [PATCH] net/ena: remove unused offload variables
[ upstream commit fa11980449c225a217bf6923e79924edf991cb27 ]
Those variables are being set, but never read. As they seem to be
leftover from the old offloads API and don't have any purpose right
now, they are simply being removed.
Fixes: a4996bd89c42 ("ethdev: new Rx/Tx offloads API")
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Artur Rojek <ar@semihalf.com>
Reviewed-by: Dawid Gorecki <dgr@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@semihalf.com>
Reviewed-by: Shai Brandes <shaibran@amazon.com>
---
drivers/net/ena/ena_ethdev.c | 3 ---
drivers/net/ena/ena_ethdev.h | 5 -----
2 files changed, 8 deletions(-)
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 207709c0ca..3359ca79d2 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -2023,9 +2023,6 @@ static int ena_dev_configure(struct rte_eth_dev *dev)
*/
dev->data->scattered_rx = 1;
- adapter->tx_selected_offloads = dev->data->dev_conf.txmode.offloads;
- adapter->rx_selected_offloads = dev->data->dev_conf.rxmode.offloads;
-
return 0;
}
diff --git a/drivers/net/ena/ena_ethdev.h b/drivers/net/ena/ena_ethdev.h
index e344941ef7..7bb3ff2b9e 100644
--- a/drivers/net/ena/ena_ethdev.h
+++ b/drivers/net/ena/ena_ethdev.h
@@ -246,11 +246,6 @@ struct ena_adapter {
struct ena_driver_stats *drv_stats;
enum ena_adapter_state state;
- uint64_t tx_supported_offloads;
- uint64_t tx_selected_offloads;
- uint64_t rx_supported_offloads;
- uint64_t rx_selected_offloads;
-
bool link_status;
enum ena_regs_reset_reason_types reset_reason;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:56.780596435 +0000
+++ 0035-net-ena-remove-unused-offload-variables.patch 2022-02-28 21:17:53.980932299 +0000
@@ -1 +1 @@
-From fa11980449c225a217bf6923e79924edf991cb27 Mon Sep 17 00:00:00 2001
+From 39f6adbf547a9c624360ad612c0b9522f1520afd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fa11980449c225a217bf6923e79924edf991cb27 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 2de2dcf12f..de5fdb8f1d 100644
+index 207709c0ca..3359ca79d2 100644
@@ -27 +28 @@
-@@ -2015,9 +2015,6 @@ static int ena_dev_configure(struct rte_eth_dev *dev)
+@@ -2023,9 +2023,6 @@ static int ena_dev_configure(struct rte_eth_dev *dev)
@@ -29 +30 @@
- adapter->tx_cleanup_stall_delay = adapter->missing_tx_completion_to / 2;
+ dev->data->scattered_rx = 1;
@@ -38 +39 @@
-index f47ba3fb02..4dfa604d51 100644
+index e344941ef7..7bb3ff2b9e 100644
@@ -41 +42 @@
-@@ -278,11 +278,6 @@ struct ena_adapter {
+@@ -246,11 +246,6 @@ struct ena_adapter {
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/ena: skip timer if reset is triggered' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (33 preceding siblings ...)
2022-02-28 21:20 ` patch 'net/ena: remove unused offload variables' " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-02-28 21:20 ` patch 'net/ena: fix reset reason being overwritten' " luca.boccassi
` (14 subsequent siblings)
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Michal Krawczyk; +Cc: Shai Brandes, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b1d55a40d6cb397f0d0dd370ce4378b3cfbba80c
Thanks.
Luca Boccassi
---
From b1d55a40d6cb397f0d0dd370ce4378b3cfbba80c Mon Sep 17 00:00:00 2001
From: Michal Krawczyk <mk@semihalf.com>
Date: Wed, 23 Feb 2022 13:19:30 +0100
Subject: [PATCH] net/ena: skip timer if reset is triggered
[ upstream commit e2174a54469febb2905f06d5c942ff76c492c2ff ]
Some user applications may not support PMD reset handling. If they will
support timer service it could cause a situation, when information
about the reset trigger is being showed every time the timer service is
being called.
Timer service is now being skipped if the reset was already triggered.
Fixes: d9b8b106bf9d ("net/ena: add watchdog and keep alive AENQ handler")
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Shai Brandes <shaibran@amazon.com>
---
drivers/net/ena/ena_ethdev.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 3359ca79d2..98efea960a 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -1652,6 +1652,9 @@ static void ena_timer_wd_callback(__rte_unused struct rte_timer *timer,
struct ena_adapter *adapter = arg;
struct rte_eth_dev *dev = adapter->rte_dev;
+ if (unlikely(adapter->trigger_reset))
+ return;
+
check_for_missing_keep_alive(adapter);
check_for_admin_com_state(adapter);
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:56.855034383 +0000
+++ 0036-net-ena-skip-timer-if-reset-is-triggered.patch 2022-02-28 21:17:53.988932474 +0000
@@ -1 +1 @@
-From e2174a54469febb2905f06d5c942ff76c492c2ff Mon Sep 17 00:00:00 2001
+From b1d55a40d6cb397f0d0dd370ce4378b3cfbba80c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e2174a54469febb2905f06d5c942ff76c492c2ff ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index a2793f13cd..4b82372155 100644
+index 3359ca79d2..98efea960a 100644
@@ -26,3 +27,3 @@
-@@ -1624,6 +1624,9 @@ static void ena_timer_wd_callback(__rte_unused struct rte_timer *timer,
- struct rte_eth_dev *dev = arg;
- struct ena_adapter *adapter = dev->data->dev_private;
+@@ -1652,6 +1652,9 @@ static void ena_timer_wd_callback(__rte_unused struct rte_timer *timer,
+ struct ena_adapter *adapter = arg;
+ struct rte_eth_dev *dev = adapter->rte_dev;
@@ -35 +36 @@
- check_for_tx_completions(adapter);
+
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/ena: fix reset reason being overwritten' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (34 preceding siblings ...)
2022-02-28 21:20 ` patch 'net/ena: skip timer if reset is triggered' " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-02-28 21:20 ` patch 'net/ena: fix meta descriptor DF flag setup' " luca.boccassi
` (13 subsequent siblings)
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Dawid Gorecki; +Cc: Michal Krawczyk, Shai Brandes, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/5bb3ff7b47d357e9248e01f61bafba62d24a4661
Thanks.
Luca Boccassi
---
From 5bb3ff7b47d357e9248e01f61bafba62d24a4661 Mon Sep 17 00:00:00 2001
From: Dawid Gorecki <dgr@semihalf.com>
Date: Wed, 23 Feb 2022 13:19:38 +0100
Subject: [PATCH] net/ena: fix reset reason being overwritten
[ upstream commit 2bae75eaa2e036020b726f61bc607a8f4142c3a8 ]
When triggering the reset, no check was performed to see if the reset
was already triggered. This could result in original reset reason being
overwritten. Add ena_trigger_reset helper function, which checks if the
reset was triggered and only sets the reset reason if the reset wasn't
triggered yet. Replace all occurrences of manually setting the reset
with ena_trigger_reset call.
Fixes: 2081d5e2e92d ("net/ena: add reset routine")
Signed-off-by: Dawid Gorecki <dgr@semihalf.com>
Reviewed-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Shai Brandes <shaibran@amazon.com>
---
drivers/net/ena/ena_ethdev.c | 32 ++++++++++++++++++--------------
1 file changed, 18 insertions(+), 14 deletions(-)
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 98efea960a..13154602a2 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -303,6 +303,15 @@ void ena_rss_key_fill(void *key, size_t size)
rte_memcpy(key, default_key, size);
}
+static inline void ena_trigger_reset(struct ena_adapter *adapter,
+ enum ena_regs_reset_reason_types reason)
+{
+ if (likely(!adapter->trigger_reset)) {
+ adapter->reset_reason = reason;
+ adapter->trigger_reset = true;
+ }
+}
+
static inline void ena_rx_mbuf_prepare(struct rte_mbuf *mbuf,
struct ena_com_rx_ctx *ena_rx_ctx)
{
@@ -420,8 +429,7 @@ static int validate_tx_req_id(struct ena_ring *tx_ring, u16 req_id)
/* Trigger device reset */
++tx_ring->tx_stats.bad_req_id;
- tx_ring->adapter->reset_reason = ENA_REGS_RESET_INV_TX_REQ_ID;
- tx_ring->adapter->trigger_reset = true;
+ ena_trigger_reset(tx_ring->adapter, ENA_REGS_RESET_INV_TX_REQ_ID);
return -EFAULT;
}
@@ -1630,8 +1638,7 @@ static void check_for_missing_keep_alive(struct ena_adapter *adapter)
if (unlikely((rte_get_timer_cycles() - adapter->timestamp_wd) >=
adapter->keep_alive_timeout)) {
PMD_DRV_LOG(ERR, "Keep alive timeout\n");
- adapter->reset_reason = ENA_REGS_RESET_KEEP_ALIVE_TO;
- adapter->trigger_reset = true;
+ ena_trigger_reset(adapter, ENA_REGS_RESET_KEEP_ALIVE_TO);
++adapter->dev_stats.wd_expired;
}
}
@@ -1641,8 +1648,7 @@ static void check_for_admin_com_state(struct ena_adapter *adapter)
{
if (unlikely(!ena_com_get_admin_running_state(&adapter->ena_dev))) {
PMD_DRV_LOG(ERR, "ENA admin queue is not in running state!\n");
- adapter->reset_reason = ENA_REGS_RESET_ADMIN_TO;
- adapter->trigger_reset = true;
+ ena_trigger_reset(adapter, ENA_REGS_RESET_ADMIN_TO);
}
}
@@ -2311,14 +2317,13 @@ static uint16_t eth_ena_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
PMD_DRV_LOG(ERR, "ena_com_rx_pkt error %d\n", rc);
if (rc == ENA_COM_NO_SPACE) {
++rx_ring->rx_stats.bad_desc_num;
- rx_ring->adapter->reset_reason =
- ENA_REGS_RESET_TOO_MANY_RX_DESCS;
+ ena_trigger_reset(rx_ring->adapter,
+ ENA_REGS_RESET_TOO_MANY_RX_DESCS);
} else {
++rx_ring->rx_stats.bad_req_id;
- rx_ring->adapter->reset_reason =
- ENA_REGS_RESET_INV_RX_REQ_ID;
+ ena_trigger_reset(rx_ring->adapter,
+ ENA_REGS_RESET_INV_RX_REQ_ID);
}
- rx_ring->adapter->trigger_reset = true;
return 0;
}
@@ -2707,9 +2712,8 @@ static int ena_xmit_mbuf(struct ena_ring *tx_ring, struct rte_mbuf *mbuf)
if (unlikely(rc)) {
PMD_DRV_LOG(ERR, "Failed to prepare Tx buffers, rc: %d\n", rc);
++tx_ring->tx_stats.prepare_ctx_err;
- tx_ring->adapter->reset_reason =
- ENA_REGS_RESET_DRIVER_INVALID_STATE;
- tx_ring->adapter->trigger_reset = true;
+ ena_trigger_reset(tx_ring->adapter,
+ ENA_REGS_RESET_DRIVER_INVALID_STATE);
return rc;
}
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:56.925000555 +0000
+++ 0037-net-ena-fix-reset-reason-being-overwritten.patch 2022-02-28 21:17:53.992932562 +0000
@@ -1 +1 @@
-From 2bae75eaa2e036020b726f61bc607a8f4142c3a8 Mon Sep 17 00:00:00 2001
+From 5bb3ff7b47d357e9248e01f61bafba62d24a4661 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2bae75eaa2e036020b726f61bc607a8f4142c3a8 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 11c9bb05e6..3cdeba9fad 100644
+index 98efea960a..13154602a2 100644
@@ -27,3 +28,3 @@
-@@ -539,6 +539,15 @@ ENA_PROXY_DESC(ena_com_indirect_table_get, ENA_MP_IND_TBL_GET,
- }),
- struct ena_com_dev *ena_dev, u32 *ind_tbl);
+@@ -303,6 +303,15 @@ void ena_rss_key_fill(void *key, size_t size)
+ rte_memcpy(key, default_key, size);
+ }
@@ -40,4 +41,4 @@
- static inline void ena_rx_mbuf_prepare(struct ena_ring *rx_ring,
- struct rte_mbuf *mbuf,
- struct ena_com_rx_ctx *ena_rx_ctx,
-@@ -666,8 +675,7 @@ static int validate_tx_req_id(struct ena_ring *tx_ring, u16 req_id)
+ static inline void ena_rx_mbuf_prepare(struct rte_mbuf *mbuf,
+ struct ena_com_rx_ctx *ena_rx_ctx)
+ {
+@@ -420,8 +429,7 @@ static int validate_tx_req_id(struct ena_ring *tx_ring, u16 req_id)
@@ -53 +54 @@
-@@ -1783,8 +1791,7 @@ static void check_for_missing_keep_alive(struct ena_adapter *adapter)
+@@ -1630,8 +1638,7 @@ static void check_for_missing_keep_alive(struct ena_adapter *adapter)
@@ -63 +64 @@
-@@ -1794,8 +1801,7 @@ static void check_for_admin_com_state(struct ena_adapter *adapter)
+@@ -1641,8 +1648,7 @@ static void check_for_admin_com_state(struct ena_adapter *adapter)
@@ -66 +67 @@
- PMD_DRV_LOG(ERR, "ENA admin queue is not in running state\n");
+ PMD_DRV_LOG(ERR, "ENA admin queue is not in running state!\n");
@@ -73,2 +74,2 @@
-@@ -2606,14 +2612,13 @@ static uint16_t eth_ena_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
- rc);
+@@ -2311,14 +2317,13 @@ static uint16_t eth_ena_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
+ PMD_DRV_LOG(ERR, "ena_com_rx_pkt error %d\n", rc);
@@ -92 +93 @@
-@@ -2978,9 +2983,8 @@ static int ena_xmit_mbuf(struct ena_ring *tx_ring, struct rte_mbuf *mbuf)
+@@ -2707,9 +2712,8 @@ static int ena_xmit_mbuf(struct ena_ring *tx_ring, struct rte_mbuf *mbuf)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/ena: fix meta descriptor DF flag setup' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (35 preceding siblings ...)
2022-02-28 21:20 ` patch 'net/ena: fix reset reason being overwritten' " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-02-28 21:20 ` patch 'net/ena: check memory BAR before initializing LLQ' " luca.boccassi
` (12 subsequent siblings)
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Michal Krawczyk; +Cc: Dawid Gorecki, Shai Brandes, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/abbaa0b9d15ab2e0598877bdea27ac0e00766413
Thanks.
Luca Boccassi
---
From abbaa0b9d15ab2e0598877bdea27ac0e00766413 Mon Sep 17 00:00:00 2001
From: Michal Krawczyk <mk@semihalf.com>
Date: Wed, 23 Feb 2022 13:19:40 +0100
Subject: [PATCH] net/ena: fix meta descriptor DF flag setup
[ upstream commit 022fb61b62623868db2ec9dbe5b1ee43a4d6cbfb ]
Whenever Tx checksum offload is being used, the meta descriptor content
is taken into consideration. Setting DF field properly in the meta
descriptor may have huge impact on the performance both for the IPv4 and
IPv6 packets.
The requirements for the df field are as below:
* No offload used - value doesn't matter
* IPv4 - 0 or 1, depending on the DF flag in the IPv4 header
* IPv6 - 1
Setting DF to 0 causes the packet to enter the slow-path in the HW and
as a result can noticeable impact the performance.
Moreover, as 'true' may not always be mapped to 1 depending on it's
definition for the given platform/compiler, for safety DF field is being
set explicitly to 1.
Fixes: 1173fca25af9 ("ena: add polling-mode driver")
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Dawid Gorecki <dgr@semihalf.com>
Reviewed-by: Shai Brandes <shaibran@amazon.com>
---
drivers/net/ena/ena_ethdev.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 13154602a2..f17679e3f8 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -374,6 +374,8 @@ static inline void ena_tx_mbuf_prepare(struct rte_mbuf *mbuf,
if (mbuf->ol_flags & PKT_TX_IPV6) {
ena_tx_ctx->l3_proto = ENA_ETH_IO_L3_PROTO_IPV6;
+ /* For the IPv6 packets, DF always needs to be true. */
+ ena_tx_ctx->df = 1;
} else {
ena_tx_ctx->l3_proto = ENA_ETH_IO_L3_PROTO_IPV4;
@@ -381,7 +383,7 @@ static inline void ena_tx_mbuf_prepare(struct rte_mbuf *mbuf,
if (mbuf->packet_type &
(RTE_PTYPE_L4_NONFRAG
| RTE_PTYPE_INNER_L4_NONFRAG))
- ena_tx_ctx->df = true;
+ ena_tx_ctx->df = 1;
}
/* check if L4 checksum is needed */
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:57.004018379 +0000
+++ 0038-net-ena-fix-meta-descriptor-DF-flag-setup.patch 2022-02-28 21:17:54.000932737 +0000
@@ -1 +1 @@
-From 022fb61b62623868db2ec9dbe5b1ee43a4d6cbfb Mon Sep 17 00:00:00 2001
+From abbaa0b9d15ab2e0598877bdea27ac0e00766413 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 022fb61b62623868db2ec9dbe5b1ee43a4d6cbfb ]
+
@@ -24 +25,0 @@
-Cc: stable@dpdk.org
@@ -34 +35 @@
-index 0ca4269522..53a8071968 100644
+index 13154602a2..f17679e3f8 100644
@@ -37 +38 @@
-@@ -624,6 +624,8 @@ static inline void ena_tx_mbuf_prepare(struct rte_mbuf *mbuf,
+@@ -374,6 +374,8 @@ static inline void ena_tx_mbuf_prepare(struct rte_mbuf *mbuf,
@@ -39 +40 @@
- if (mbuf->ol_flags & RTE_MBUF_F_TX_IPV6) {
+ if (mbuf->ol_flags & PKT_TX_IPV6) {
@@ -46 +47 @@
-@@ -631,7 +633,7 @@ static inline void ena_tx_mbuf_prepare(struct rte_mbuf *mbuf,
+@@ -381,7 +383,7 @@ static inline void ena_tx_mbuf_prepare(struct rte_mbuf *mbuf,
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/ena: check memory BAR before initializing LLQ' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (36 preceding siblings ...)
2022-02-28 21:20 ` patch 'net/ena: fix meta descriptor DF flag setup' " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-02-28 21:20 ` patch 'net/ena: fix checksum flag for L4' " luca.boccassi
` (11 subsequent siblings)
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Dawid Gorecki; +Cc: Michal Krawczyk, Shai Brandes, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/c73e88da7076b205534dbe3bf4591471865900c6
Thanks.
Luca Boccassi
---
From c73e88da7076b205534dbe3bf4591471865900c6 Mon Sep 17 00:00:00 2001
From: Dawid Gorecki <dgr@semihalf.com>
Date: Wed, 23 Feb 2022 13:19:42 +0100
Subject: [PATCH] net/ena: check memory BAR before initializing LLQ
[ upstream commit 9ae7a13f8247319f63402107c8304ba57c3f4308 ]
The ena_com_config_dev_mode() performs many calculations related to LLQ
and then performs an admin queue call to configure LLQ in the device.
All of the operations performed by ena_com_config_dev_mode() are
unnecessary if membar hasn't been found. Move the dev_mem_base check
before ena_com_config_dev_mode() call. This prevents the unnecessary
operations from being performed.
Fixes: 2fca2a98c0d1 ("net/ena: support LLQv2")
Signed-off-by: Dawid Gorecki <dgr@semihalf.com>
Reviewed-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Shai Brandes <shaibran@amazon.com>
---
drivers/net/ena/ena_ethdev.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index f17679e3f8..98661e864b 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -1712,6 +1712,13 @@ ena_set_queues_placement_policy(struct ena_adapter *adapter,
return 0;
}
+ if (adapter->dev_mem_base == NULL) {
+ PMD_DRV_LOG(ERR,
+ "LLQ is advertised as supported, but device doesn't expose mem bar\n");
+ ena_dev->tx_mem_queue_type = ENA_ADMIN_PLACEMENT_POLICY_HOST;
+ return 0;
+ }
+
rc = ena_com_config_dev_mode(ena_dev, llq, llq_default_configurations);
if (unlikely(rc)) {
PMD_INIT_LOG(WARNING, "Failed to config dev mode. "
@@ -1724,13 +1731,6 @@ ena_set_queues_placement_policy(struct ena_adapter *adapter,
if (ena_dev->tx_mem_queue_type == ENA_ADMIN_PLACEMENT_POLICY_HOST)
return 0;
- if (!adapter->dev_mem_base) {
- PMD_DRV_LOG(ERR, "Unable to access LLQ bar resource. "
- "Fallback to host mode policy.\n.");
- ena_dev->tx_mem_queue_type = ENA_ADMIN_PLACEMENT_POLICY_HOST;
- return 0;
- }
-
ena_dev->mem_bar = adapter->dev_mem_base;
return 0;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:57.071503670 +0000
+++ 0039-net-ena-check-memory-BAR-before-initializing-LLQ.patch 2022-02-28 21:17:54.004932825 +0000
@@ -1 +1 @@
-From 9ae7a13f8247319f63402107c8304ba57c3f4308 Mon Sep 17 00:00:00 2001
+From c73e88da7076b205534dbe3bf4591471865900c6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9ae7a13f8247319f63402107c8304ba57c3f4308 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index b471102ea9..151c688eec 100644
+index f17679e3f8..98661e864b 100644
@@ -28 +29 @@
-@@ -1953,6 +1953,13 @@ ena_set_queues_placement_policy(struct ena_adapter *adapter,
+@@ -1712,6 +1712,13 @@ ena_set_queues_placement_policy(struct ena_adapter *adapter,
@@ -41,2 +42,2 @@
- PMD_INIT_LOG(WARNING,
-@@ -1965,13 +1972,6 @@ ena_set_queues_placement_policy(struct ena_adapter *adapter,
+ PMD_INIT_LOG(WARNING, "Failed to config dev mode. "
+@@ -1724,13 +1731,6 @@ ena_set_queues_placement_policy(struct ena_adapter *adapter,
@@ -47,2 +48,2 @@
-- PMD_DRV_LOG(ERR,
-- "Unable to access LLQ BAR resource. Fallback to host mode policy.\n");
+- PMD_DRV_LOG(ERR, "Unable to access LLQ bar resource. "
+- "Fallback to host mode policy.\n.");
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/ena: fix checksum flag for L4' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (37 preceding siblings ...)
2022-02-28 21:20 ` patch 'net/ena: check memory BAR before initializing LLQ' " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-02-28 21:20 ` patch 'common/mlx5: fix queue pair ack timeout configuration' " luca.boccassi
` (10 subsequent siblings)
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Michal Krawczyk; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b94aa3454758fa42f38739064fc521a432a92609
Thanks.
Luca Boccassi
---
From b94aa3454758fa42f38739064fc521a432a92609 Mon Sep 17 00:00:00 2001
From: Michal Krawczyk <mk@semihalf.com>
Date: Wed, 23 Feb 2022 13:19:43 +0100
Subject: [PATCH] net/ena: fix checksum flag for L4
[ upstream commit b2d2f1cf89a6c3661e68b750364e4a7018f954ba ]
Some HW may invalidly set checksum error bit for the valid L4 checksum.
To avoid drop of the packets in that situation, do not indicate bad
checksum for L4 Rx csum offloads. Instead, set it as unknown, so the
application will re-verify this value.
The statistics counters will still work as previously.
Fixes: 05817057faba ("net/ena: fix indication of bad L4 Rx checksums")
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
---
drivers/net/ena/ena_ethdev.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 98661e864b..64e38e49fa 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -337,7 +337,13 @@ static inline void ena_rx_mbuf_prepare(struct rte_mbuf *mbuf,
ol_flags |= PKT_RX_L4_CKSUM_UNKNOWN;
else
if (unlikely(ena_rx_ctx->l4_csum_err))
- ol_flags |= PKT_RX_L4_CKSUM_BAD;
+ /*
+ * For the L4 Rx checksum offload the HW may indicate
+ * bad checksum although it's valid. Because of that,
+ * we're setting the UNKNOWN flag to let the app
+ * re-verify the checksum.
+ */
+ ol_flags |= PKT_RX_L4_CKSUM_UNKNOWN;
else
ol_flags |= PKT_RX_L4_CKSUM_GOOD;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:57.147460964 +0000
+++ 0040-net-ena-fix-checksum-flag-for-L4.patch 2022-02-28 21:17:54.008932912 +0000
@@ -1 +1 @@
-From b2d2f1cf89a6c3661e68b750364e4a7018f954ba Mon Sep 17 00:00:00 2001
+From b94aa3454758fa42f38739064fc521a432a92609 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b2d2f1cf89a6c3661e68b750364e4a7018f954ba ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 151c688eec..4b58dcda74 100644
+index 98661e864b..64e38e49fa 100644
@@ -25,5 +26,5 @@
-@@ -583,7 +583,13 @@ static inline void ena_rx_mbuf_prepare(struct ena_ring *rx_ring,
- } else {
- if (unlikely(ena_rx_ctx->l4_csum_err)) {
- ++rx_stats->l4_csum_bad;
-- ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_BAD;
+@@ -337,7 +337,13 @@ static inline void ena_rx_mbuf_prepare(struct rte_mbuf *mbuf,
+ ol_flags |= PKT_RX_L4_CKSUM_UNKNOWN;
+ else
+ if (unlikely(ena_rx_ctx->l4_csum_err))
+- ol_flags |= PKT_RX_L4_CKSUM_BAD;
@@ -36,4 +37,4 @@
-+ ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN;
- } else {
- ++rx_stats->l4_csum_good;
- ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD;
++ ol_flags |= PKT_RX_L4_CKSUM_UNKNOWN;
+ else
+ ol_flags |= PKT_RX_L4_CKSUM_GOOD;
+
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'common/mlx5: fix queue pair ack timeout configuration' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (38 preceding siblings ...)
2022-02-28 21:20 ` patch 'net/ena: fix checksum flag for L4' " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-02-28 21:20 ` patch 'doc: remove obsolete vector Tx explanations from mlx5 guide' " luca.boccassi
` (9 subsequent siblings)
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Yajun Wu; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/15f171576e7dcd16ee8f599edd8c46ec4d4e3e17
Thanks.
Luca Boccassi
---
From 15f171576e7dcd16ee8f599edd8c46ec4d4e3e17 Mon Sep 17 00:00:00 2001
From: Yajun Wu <yajunw@nvidia.com>
Date: Mon, 14 Feb 2022 08:03:19 +0200
Subject: [PATCH] common/mlx5: fix queue pair ack timeout configuration
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 05b54bf0892dcd1e3698ba86a297722b7566cc10 ]
VDPA driver creates two QPs(1 queue pair include 1 send queue
and 1 receive queue) per virtio queue to get traffic events
from NIC to SW.
Two QPs(called FW QP and SW QP) are created as loopback QP
and FW QP'SQ is connected to SW QP'RQ internally.
When packet receive or send out, HW will send WQE by FW QP'SQ,
then SW will get CQE from the CQ of SW QP.
With large scale and heavy traffic, the SQ's request may fail
to get ACK from RQ HW, because HW is busy.
SQ will retry the request with qpc.retry_count times and each time
wait for 4.096 uS *2^(ack_timeout) for the response. If still can’t
get RQ’s HW response, SQ will go to an error state.
16 is experienced value. It should not be too high or too low.
Too high will make QP waits too long in case it’s packet drop.
Too low will cause QP to go to an error state(retry-exceeded) easily.
Fixes: 15c3807e86ab ("common/mlx5: support DevX QP operations")
Signed-off-by: Yajun Wu <yajunw@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/common/mlx5/mlx5_devx_cmds.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c
index e6aebf4156..ef82981927 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.c
+++ b/drivers/common/mlx5/mlx5_devx_cmds.c
@@ -1975,7 +1975,7 @@ mlx5_devx_cmd_modify_qp_state(struct mlx5_devx_obj *qp, uint32_t qp_st_mod_op,
case MLX5_CMD_OP_RTR2RTS_QP:
qpc = MLX5_ADDR_OF(rtr2rts_qp_in, &in, qpc);
MLX5_SET(rtr2rts_qp_in, &in, qpn, qp->id);
- MLX5_SET(qpc, qpc, primary_address_path.ack_timeout, 14);
+ MLX5_SET(qpc, qpc, primary_address_path.ack_timeout, 16);
MLX5_SET(qpc, qpc, log_ack_req_freq, 0);
MLX5_SET(qpc, qpc, retry_count, 7);
MLX5_SET(qpc, qpc, rnr_retry, 7);
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:57.220077698 +0000
+++ 0041-common-mlx5-fix-queue-pair-ack-timeout-configuration.patch 2022-02-28 21:17:54.012933001 +0000
@@ -1 +1 @@
-From 05b54bf0892dcd1e3698ba86a297722b7566cc10 Mon Sep 17 00:00:00 2001
+From 15f171576e7dcd16ee8f599edd8c46ec4d4e3e17 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 05b54bf0892dcd1e3698ba86a297722b7566cc10 ]
+
@@ -29 +30,0 @@
-Cc: stable@dpdk.org
@@ -38 +39 @@
-index 2e807a0829..7732613c69 100644
+index e6aebf4156..ef82981927 100644
@@ -41 +42 @@
-@@ -2279,7 +2279,7 @@ mlx5_devx_cmd_modify_qp_state(struct mlx5_devx_obj *qp, uint32_t qp_st_mod_op,
+@@ -1975,7 +1975,7 @@ mlx5_devx_cmd_modify_qp_state(struct mlx5_devx_obj *qp, uint32_t qp_st_mod_op,
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'doc: remove obsolete vector Tx explanations from mlx5 guide' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (39 preceding siblings ...)
2022-02-28 21:20 ` patch 'common/mlx5: fix queue pair ack timeout configuration' " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-02-28 21:20 ` patch 'doc: replace broken links in mlx guides' " luca.boccassi
` (8 subsequent siblings)
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Michael Baum; +Cc: Raslan Darawsheh, Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/d07cbead1d1fa69b46e70185c4116fbb7f962633
Thanks.
Luca Boccassi
---
From d07cbead1d1fa69b46e70185c4116fbb7f962633 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Wed, 23 Feb 2022 15:48:30 +0200
Subject: [PATCH] doc: remove obsolete vector Tx explanations from mlx5 guide
[ upstream commit 9c7dc70265696ef402ed6f54a2552ed7684560aa ]
Vectorized routines were removed in result of Tx datapath refactoring,
and devarg keys documentation was updated.
However, more updating should have been done. In environment variables
doc, there was explanation according to vectorized Tx which isn't
relevant anymore.
This patch removes this irrelevant explanation.
Fixes: a6bd4911ad93 ("net/mlx5: remove Tx implementation")
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Reviewed-by: Raslan Darawsheh <rasland@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
doc/guides/nics/mlx5.rst | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
index 03850cc4bc..07c9e6de1d 100644
--- a/doc/guides/nics/mlx5.rst
+++ b/doc/guides/nics/mlx5.rst
@@ -398,15 +398,6 @@ Environment variables
The register would be flushed to HW usually when the write-combining buffer
becomes full, but it depends on CPU design.
- Except for vectorized Tx burst routines, a write memory barrier is enforced
- after updating the register so that the update can be immediately visible to
- HW.
-
- When vectorized Tx burst is called, the barrier is set only if the burst size
- is not aligned to MLX5_VPMD_TX_MAX_BURST. However, setting this environmental
- variable will bring better latency even though the maximum throughput can
- slightly decline.
-
Run-time configuration
~~~~~~~~~~~~~~~~~~~~~~
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:57.293615873 +0000
+++ 0042-doc-remove-obsolete-vector-Tx-explanations-from-mlx5.patch 2022-02-28 21:17:54.016933088 +0000
@@ -1 +1 @@
-From 9c7dc70265696ef402ed6f54a2552ed7684560aa Mon Sep 17 00:00:00 2001
+From d07cbead1d1fa69b46e70185c4116fbb7f962633 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9c7dc70265696ef402ed6f54a2552ed7684560aa ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index c3cc0c0f41..3f5c8bb303 100644
+index 03850cc4bc..07c9e6de1d 100644
@@ -29 +30 @@
-@@ -557,15 +557,6 @@ Environment variables
+@@ -398,15 +398,6 @@ Environment variables
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'doc: replace broken links in mlx guides' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (40 preceding siblings ...)
2022-02-28 21:20 ` patch 'doc: remove obsolete vector Tx explanations from mlx5 guide' " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-02-28 21:20 ` patch 'doc: correct name of BlueField-2 in mlx5 guide' " luca.boccassi
` (7 subsequent siblings)
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Michael Baum; +Cc: Raslan Darawsheh, Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/dc599f85f7f3222081cf1f99faa1864098d8af46
Thanks.
Luca Boccassi
---
From dc599f85f7f3222081cf1f99faa1864098d8af46 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Wed, 23 Feb 2022 15:48:31 +0200
Subject: [PATCH] doc: replace broken links in mlx guides
[ upstream commit ec49089884628892ba8e6ece7ec545f069e2d9e3 ]
Update links in both mlx4 and mlx5 doc.
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Reviewed-by: Raslan Darawsheh <rasland@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
doc/guides/nics/mlx4.rst | 4 ++--
doc/guides/nics/mlx5.rst | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/doc/guides/nics/mlx4.rst b/doc/guides/nics/mlx4.rst
index 5c6ac16783..71705feb9b 100644
--- a/doc/guides/nics/mlx4.rst
+++ b/doc/guides/nics/mlx4.rst
@@ -14,7 +14,7 @@ the `Mellanox website <http://www.mellanox.com>`_. Help is also provided by
the `Mellanox community <http://community.mellanox.com/welcome>`_.
There is also a `section dedicated to this poll mode driver
-<http://www.mellanox.com/page/products_dyn?product_family=209&mtag=pmd_for_dpdk>`_.
+<https://developer.nvidia.com/networking/dpdk>`_.
Implementation details
@@ -219,7 +219,7 @@ Mellanox OFED as a fallback
- `Mellanox OFED`_ version: **4.4, 4.5, 4.6**.
- firmware version: **2.42.5000** and above.
-.. _`Mellanox OFED`: http://www.mellanox.com/page/products_dyn?product_family=26&mtag=linux_sw_drivers
+.. _`Mellanox OFED`: https://network.nvidia.com/products/infiniband-drivers/linux/mlnx_ofed/
.. note::
diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
index 07c9e6de1d..b1b9d6f4e3 100644
--- a/doc/guides/nics/mlx5.rst
+++ b/doc/guides/nics/mlx5.rst
@@ -19,7 +19,7 @@ Information and documentation about these adapters can be found on the
`Mellanox community <http://community.mellanox.com/welcome>`__.
There is also a `section dedicated to this poll mode driver
-<http://www.mellanox.com/page/products_dyn?product_family=209&mtag=pmd_for_dpdk>`__.
+<https://developer.nvidia.com/networking/dpdk>`_.
Design
@@ -1147,9 +1147,9 @@ managers on most distributions, this PMD requires Ethernet extensions that
may not be supported at the moment (this is a work in progress).
`Mellanox OFED
-<http://www.mellanox.com/page/products_dyn?product_family=26&mtag=linux>`__ and
+<https://network.nvidia.com/products/infiniband-drivers/linux/mlnx_ofed/>`__ and
`Mellanox EN
-<http://www.mellanox.com/page/products_dyn?product_family=27&mtag=linux>`__
+<https://network.nvidia.com/products/ethernet-drivers/linux/mlnx_en/>`__
include the necessary support and should be used in the meantime. For DPDK,
only libibverbs, libmlx5, mlnx-ofed-kernel packages and firmware updates are
required from that distribution.
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:57.386381211 +0000
+++ 0043-doc-replace-broken-links-in-mlx-guides.patch 2022-02-28 21:17:54.024933264 +0000
@@ -1 +1 @@
-From ec49089884628892ba8e6ece7ec545f069e2d9e3 Mon Sep 17 00:00:00 2001
+From dc599f85f7f3222081cf1f99faa1864098d8af46 Mon Sep 17 00:00:00 2001
@@ -6 +6 @@
-Update links in both mlx4 and mlx5 doc.
+[ upstream commit ec49089884628892ba8e6ece7ec545f069e2d9e3 ]
@@ -8 +8 @@
-Cc: stable@dpdk.org
+Update links in both mlx4 and mlx5 doc.
@@ -19 +19 @@
-index c81105730d..66493a1157 100644
+index 5c6ac16783..71705feb9b 100644
@@ -41 +41 @@
-index 3f5c8bb303..c9defd0c60 100644
+index 07c9e6de1d..b1b9d6f4e3 100644
@@ -53 +53 @@
-@@ -1376,9 +1376,9 @@ managers on most distributions, this PMD requires Ethernet extensions that
+@@ -1147,9 +1147,9 @@ managers on most distributions, this PMD requires Ethernet extensions that
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'doc: correct name of BlueField-2 in mlx5 guide' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (41 preceding siblings ...)
2022-02-28 21:20 ` patch 'doc: replace broken links in mlx guides' " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-02-28 21:20 ` patch 'net/i40e: fix unintentional integer overflow' " luca.boccassi
` (6 subsequent siblings)
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Michael Baum; +Cc: Raslan Darawsheh, Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/073988b86273da45ee8933b3970ca709998f3b53
Thanks.
Luca Boccassi
---
From 073988b86273da45ee8933b3970ca709998f3b53 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Wed, 23 Feb 2022 15:48:32 +0200
Subject: [PATCH] doc: correct name of BlueField-2 in mlx5 guide
[ upstream commit 67e1bb42b95047b8edfdf86bd3cbd6916eeb36d6 ]
Update "BlueField 2" -> "BlueField-2" in mlx5 docs.
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Reviewed-by: Raslan Darawsheh <rasland@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
doc/guides/regexdevs/mlx5.rst | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/doc/guides/regexdevs/mlx5.rst b/doc/guides/regexdevs/mlx5.rst
index faaa6ac11d..fb1693e085 100644
--- a/doc/guides/regexdevs/mlx5.rst
+++ b/doc/guides/regexdevs/mlx5.rst
@@ -7,7 +7,7 @@ MLX5 RegEx driver
=================
The MLX5 RegEx (Regular Expression) driver library
-(**librte_regex_mlx5**) provides support for **Mellanox BlueField 2**
+(**librte_regex_mlx5**) provides support for **Mellanox BlueField-2**
families of 25/50/100/200 Gb/s adapters.
Design
@@ -38,13 +38,13 @@ For example: ``class=net:regex`` will probe both the net PMD and the RegEx PMD.
Supported NICs
--------------
-* Mellanox\ |reg| BlueField 2 SmartNIC
+* Mellanox\ |reg| BlueField-2 SmartNIC
Prerequisites
-------------
-- BlueField 2 running Mellanox supported kernel.
-- Enable the RegEx capabilities using system call from the BlueField 2.
+- BlueField-2 running Mellanox supported kernel.
+- Enable the RegEx capabilities using system call from the BlueField-2.
- Official support is not yet released.
Run-time configuration
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:57.469424320 +0000
+++ 0044-doc-correct-name-of-BlueField-2-in-mlx5-guide.patch 2022-02-28 21:17:54.024933264 +0000
@@ -1 +1 @@
-From 67e1bb42b95047b8edfdf86bd3cbd6916eeb36d6 Mon Sep 17 00:00:00 2001
+From 073988b86273da45ee8933b3970ca709998f3b53 Mon Sep 17 00:00:00 2001
@@ -6 +6 @@
-Update "BlueField 2" -> "BlueField-2" in mlx5 docs.
+[ upstream commit 67e1bb42b95047b8edfdf86bd3cbd6916eeb36d6 ]
@@ -8 +8 @@
-Cc: stable@dpdk.org
+Update "BlueField 2" -> "BlueField-2" in mlx5 docs.
@@ -14,5 +14,2 @@
- doc/guides/compressdevs/mlx5.rst | 6 +++---
- doc/guides/cryptodevs/mlx5.rst | 6 +++---
- doc/guides/nics/mlx5.rst | 2 +-
- doc/guides/regexdevs/mlx5.rst | 8 ++++----
- 4 files changed, 11 insertions(+), 11 deletions(-)
+ doc/guides/regexdevs/mlx5.rst | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
@@ -20,75 +16,0 @@
-diff --git a/doc/guides/compressdevs/mlx5.rst b/doc/guides/compressdevs/mlx5.rst
-index a4e17f65b3..7f2d6bdfff 100644
---- a/doc/guides/compressdevs/mlx5.rst
-+++ b/doc/guides/compressdevs/mlx5.rst
-@@ -7,7 +7,7 @@ MLX5 compress driver
- ====================
-
- The MLX5 compress driver library
--(**librte_compress_mlx5**) provides support for **Mellanox BlueField 2**
-+(**librte_compress_mlx5**) provides support for **Mellanox BlueField-2**
- families of 25/50/100/200 Gb/s adapters.
-
- Design
-@@ -21,7 +21,7 @@ These engines are part of the ARM complex of the BlueField chip, and as
- such they do not use NIC related resources (e.g. RX/TX bandwidth).
- They do share the same PCI and memory bandwidth.
-
--So, using the BlueField device (starting from BlueField 2), the compress
-+So, using the BlueField device (starting from BlueField-2), the compress
- class operations can be supported in parallel to the net, vDPA and
- RegEx class operations.
-
-@@ -95,7 +95,7 @@ Driver options
- Supported NICs
- --------------
-
--* Mellanox\ |reg| BlueField 2 SmartNIC
-+* Mellanox\ |reg| BlueField-2 SmartNIC
-
- Prerequisites
- -------------
-diff --git a/doc/guides/cryptodevs/mlx5.rst b/doc/guides/cryptodevs/mlx5.rst
-index e86a6205e8..9936556cc9 100644
---- a/doc/guides/cryptodevs/mlx5.rst
-+++ b/doc/guides/cryptodevs/mlx5.rst
-@@ -88,7 +88,7 @@ The mlxreg dedicated tool should be used as follows:
- should not be specified.
-
- All the device ports should set it in order to move to operational mode.
-- For BlueField 2, the internal ports in the ARM system should also be set.
-+ For BlueField-2, the internal ports in the ARM system should also be set.
-
- - Query CRYPTO_OPERATIONAL register to make sure the device is in Operational
- mode.
-@@ -142,7 +142,7 @@ Supported NICs
- --------------
-
- * Mellanox\ |reg| ConnectX\ |reg|-6 200G MCX654106A-HCAT (2x200G)
--* Mellanox\ |reg| BlueField 2 SmartNIC
-+* Mellanox\ |reg| BlueField-2 SmartNIC
- * Mellanox\ |reg| ConnectX\ |reg|-6 Dx
-
-
-@@ -162,7 +162,7 @@ FW Prerequisites
- ~~~~~~~~~~~~~~~~
-
- - xx.31.0328 for ConnectX-6.
--- xx.32.0108 for ConnectX-6 Dx and BlueField 2.
-+- xx.32.0108 for ConnectX-6 Dx and BlueField-2.
-
- Linux Prerequisites
- ~~~~~~~~~~~~~~~~~~~
-diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
-index c9defd0c60..b7ad55561c 100644
---- a/doc/guides/nics/mlx5.rst
-+++ b/doc/guides/nics/mlx5.rst
-@@ -253,7 +253,7 @@ Limitations
-
- - Flex item:
-
-- - Hardware support: BlueField 2.
-+ - Hardware support: BlueField-2.
- - Flex item is supported on PF only.
- - Hardware limits ``header_length_mask_width`` up to 6 bits.
- - Firmware supports 8 global sample fields.
@@ -96 +18 @@
-index b2bf0afd01..fc2cacba60 100644
+index faaa6ac11d..fb1693e085 100644
@@ -108 +30 @@
-@@ -43,13 +43,13 @@ Features
+@@ -38,13 +38,13 @@ For example: ``class=net:regex`` will probe both the net PMD and the RegEx PMD.
@@ -124 +46 @@
- Limitations
+ Run-time configuration
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/i40e: fix unintentional integer overflow' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (42 preceding siblings ...)
2022-02-28 21:20 ` patch 'doc: correct name of BlueField-2 in mlx5 guide' " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-02-28 21:20 ` patch 'app/testpmd: fix build without drivers' " luca.boccassi
` (5 subsequent siblings)
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Steve Yang; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/2d1c255f3007e1eb4f8cc583babdc63aa5b2a46c
Thanks.
Luca Boccassi
---
From 2d1c255f3007e1eb4f8cc583babdc63aa5b2a46c Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Fri, 25 Feb 2022 02:39:47 +0000
Subject: [PATCH] net/i40e: fix unintentional integer overflow
[ upstream commit df5807658026e7b18493a6c8ebf0e47adee26b4d ]
Cast 1 to type uint64_t to avoid overflow.
CID 375812 (#1 of 1):
Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
overflow_before_widen: Potentially overflowing expression 1 << 2 * i + 1
with type int (32 bits, signed) is evaluated using 32-bit arithmetic, and
then used in a context that expects an expression of type uint64_t
(64 bits, unsigned).
Coverity issue: 375812
Fixes: 5fec01c35c49 ("net/i40e: support Linux VF to configure IRQ link list")
Signed-off-by: Steve Yang <stevex.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
drivers/net/i40e/i40e_pf.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/i40e/i40e_pf.c b/drivers/net/i40e/i40e_pf.c
index ddba055805..7ec8209f09 100644
--- a/drivers/net/i40e/i40e_pf.c
+++ b/drivers/net/i40e/i40e_pf.c
@@ -17,6 +17,7 @@
#include <rte_ethdev_driver.h>
#include <rte_malloc.h>
#include <rte_memcpy.h>
+#include <rte_bitops.h>
#include "i40e_logs.h"
#include "base/i40e_prototype.h"
@@ -597,14 +598,14 @@ i40e_pf_config_irq_link_list(struct i40e_pf_vf *vf,
tempmap = vvm->rxq_map;
for (i = 0; i < sizeof(vvm->rxq_map) * BITS_PER_CHAR; i++) {
if (tempmap & 0x1)
- linklistmap |= (1 << (2 * i));
+ linklistmap |= RTE_BIT64(2 * i);
tempmap >>= 1;
}
tempmap = vvm->txq_map;
for (i = 0; i < sizeof(vvm->txq_map) * BITS_PER_CHAR; i++) {
if (tempmap & 0x1)
- linklistmap |= (1 << (2 * i + 1));
+ linklistmap |= RTE_BIT64(2 * i + 1);
tempmap >>= 1;
}
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:57.552209559 +0000
+++ 0045-net-i40e-fix-unintentional-integer-overflow.patch 2022-02-28 21:17:54.028933351 +0000
@@ -1 +1 @@
-From df5807658026e7b18493a6c8ebf0e47adee26b4d Mon Sep 17 00:00:00 2001
+From 2d1c255f3007e1eb4f8cc583babdc63aa5b2a46c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit df5807658026e7b18493a6c8ebf0e47adee26b4d ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -22,2 +23,2 @@
- drivers/net/i40e/i40e_pf.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
+ drivers/net/i40e/i40e_pf.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
@@ -26 +27 @@
-index 2435a8a070..15d9ff868f 100644
+index ddba055805..7ec8209f09 100644
@@ -29 +30,9 @@
-@@ -597,14 +597,14 @@ i40e_pf_config_irq_link_list(struct i40e_pf_vf *vf,
+@@ -17,6 +17,7 @@
+ #include <rte_ethdev_driver.h>
+ #include <rte_malloc.h>
+ #include <rte_memcpy.h>
++#include <rte_bitops.h>
+
+ #include "i40e_logs.h"
+ #include "base/i40e_prototype.h"
+@@ -597,14 +598,14 @@ i40e_pf_config_irq_link_list(struct i40e_pf_vf *vf,
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'app/testpmd: fix build without drivers' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (43 preceding siblings ...)
2022-02-28 21:20 ` patch 'net/i40e: fix unintentional integer overflow' " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-02-28 21:20 ` patch 'test/efd: fix sockets mask size' " luca.boccassi
` (4 subsequent siblings)
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: Bruce Richardson, Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/3fc564b2d0c09aa00adb17de6cbed7fda59cbbed
Thanks.
Luca Boccassi
---
From 3fc564b2d0c09aa00adb17de6cbed7fda59cbbed Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Fri, 25 Feb 2022 16:26:53 +0100
Subject: [PATCH] app/testpmd: fix build without drivers
[ upstream commit 1a2eaefa47ba1e0e199cfe8a4653a5023425bce5 ]
When ixgbe and bnxt are disabled, compilation was failing:
app/test-pmd/cmdline.c:9396:11: error:
variable 'vf_rxmode' set but not used
Fixes: 4cfe399f6550 ("net/bnxt: support to set VF rxmode")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
app/test-pmd/cmdline.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index df6a575002..9dfd0dcfab 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -8739,6 +8739,7 @@ cmd_set_vf_rxmode_parsed(void *parsed_result,
}
RTE_SET_USED(is_on);
+ RTE_SET_USED(vf_rxmode);
#ifdef RTE_NET_IXGBE
if (ret == -ENOTSUP)
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:57.625293891 +0000
+++ 0046-app-testpmd-fix-build-without-drivers.patch 2022-02-28 21:17:54.056933965 +0000
@@ -1 +1 @@
-From 1a2eaefa47ba1e0e199cfe8a4653a5023425bce5 Mon Sep 17 00:00:00 2001
+From 3fc564b2d0c09aa00adb17de6cbed7fda59cbbed Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1a2eaefa47ba1e0e199cfe8a4653a5023425bce5 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index b4ba8da2b0..7ab0575e64 100644
+index df6a575002..9dfd0dcfab 100644
@@ -25 +26 @@
-@@ -9409,6 +9409,7 @@ cmd_set_vf_rxmode_parsed(void *parsed_result,
+@@ -8739,6 +8739,7 @@ cmd_set_vf_rxmode_parsed(void *parsed_result,
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'test/efd: fix sockets mask size' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (44 preceding siblings ...)
2022-02-28 21:20 ` patch 'app/testpmd: fix build without drivers' " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-02-28 21:20 ` patch 'efd: fix uninitialized structure' " luca.boccassi
` (3 subsequent siblings)
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Pablo de Lara; +Cc: Yipeng Wang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/5cd3c071a3b084f79d6f6d5e51fac386b198ea7f
Thanks.
Luca Boccassi
---
From 5cd3c071a3b084f79d6f6d5e51fac386b198ea7f Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Fri, 25 Feb 2022 09:27:44 +0000
Subject: [PATCH] test/efd: fix sockets mask size
[ upstream commit 3b0e34e80b55bbd683f4aa8257e25cbea029489b ]
Constant value 1 has a size of 32 bits, and shifting it more than 32 bits
to the left overflows. 1ULL is needed to be able to get a 64-bit value.
Coverity ID: 375846
Fixes: 8751a7e9832b ("efd: allow more CPU sockets in table creation")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
---
app/test/test_efd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test/test_efd.c b/app/test/test_efd.c
index 180dc4748e..97498d57aa 100644
--- a/app/test/test_efd.c
+++ b/app/test/test_efd.c
@@ -98,7 +98,7 @@ static inline uint8_t efd_get_all_sockets_bitmask(void)
unsigned int next_lcore = rte_get_main_lcore();
const int val_true = 1, val_false = 0;
for (i = 0; i < rte_lcore_count(); i++) {
- all_cpu_sockets_bitmask |= 1 << rte_lcore_to_socket_id(next_lcore);
+ all_cpu_sockets_bitmask |= 1ULL << rte_lcore_to_socket_id(next_lcore);
next_lcore = rte_get_next_lcore(next_lcore, val_false, val_true);
}
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:57.733537014 +0000
+++ 0047-test-efd-fix-sockets-mask-size.patch 2022-02-28 21:17:54.060934052 +0000
@@ -1 +1 @@
-From 3b0e34e80b55bbd683f4aa8257e25cbea029489b Mon Sep 17 00:00:00 2001
+From 5cd3c071a3b084f79d6f6d5e51fac386b198ea7f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3b0e34e80b55bbd683f4aa8257e25cbea029489b ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 7bea674086..fa29e8f97a 100644
+index 180dc4748e..97498d57aa 100644
@@ -23 +24 @@
-@@ -107,7 +107,7 @@ static inline uint64_t efd_get_all_sockets_bitmask(void)
+@@ -98,7 +98,7 @@ static inline uint8_t efd_get_all_sockets_bitmask(void)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'efd: fix uninitialized structure' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (45 preceding siblings ...)
2022-02-28 21:20 ` patch 'test/efd: fix sockets mask size' " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-02-28 21:20 ` patch 'distributor: fix potential overflow' " luca.boccassi
` (2 subsequent siblings)
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Pablo de Lara; +Cc: Yipeng Wang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/ffc6e4ea387b2dc7f2662b507dcd0abbd6caafdd
Thanks.
Luca Boccassi
---
From ffc6e4ea387b2dc7f2662b507dcd0abbd6caafdd Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Fri, 25 Feb 2022 09:27:45 +0000
Subject: [PATCH] efd: fix uninitialized structure
[ upstream commit ecda2c40ac549f2ebd1e8be6bf0a96c4aba6bf36 ]
Coverity flags that both elements of efd_online_group_entry
are used uninitialized. This is OK because this structure
is initially used for starting values, so any value is OK.
Coverity ID: 375868
Fixes: 56b6ef874f80 ("efd: new Elastic Flow Distributor library")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
---
lib/librte_efd/rte_efd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_efd/rte_efd.c b/lib/librte_efd/rte_efd.c
index 77f46809f8..ae9fb43404 100644
--- a/lib/librte_efd/rte_efd.c
+++ b/lib/librte_efd/rte_efd.c
@@ -1165,7 +1165,7 @@ rte_efd_update(struct rte_efd_table * const table, const unsigned int socket_id,
{
uint32_t chunk_id = 0, group_id = 0, bin_id = 0;
uint8_t new_bin_choice = 0;
- struct efd_online_group_entry entry;
+ struct efd_online_group_entry entry = {{0}};
int status = efd_compute_update(table, socket_id, key, value,
&chunk_id, &group_id, &bin_id,
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:57.811242463 +0000
+++ 0048-efd-fix-uninitialized-structure.patch 2022-02-28 21:17:54.064934139 +0000
@@ -1 +1 @@
-From ecda2c40ac549f2ebd1e8be6bf0a96c4aba6bf36 Mon Sep 17 00:00:00 2001
+From ffc6e4ea387b2dc7f2662b507dcd0abbd6caafdd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ecda2c40ac549f2ebd1e8be6bf0a96c4aba6bf36 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
- lib/efd/rte_efd.c | 2 +-
+ lib/librte_efd/rte_efd.c | 2 +-
@@ -20,5 +21,5 @@
-diff --git a/lib/efd/rte_efd.c b/lib/efd/rte_efd.c
-index 560cd78961..bbc6fc585d 100644
---- a/lib/efd/rte_efd.c
-+++ b/lib/efd/rte_efd.c
-@@ -1162,7 +1162,7 @@ rte_efd_update(struct rte_efd_table * const table, const unsigned int socket_id,
+diff --git a/lib/librte_efd/rte_efd.c b/lib/librte_efd/rte_efd.c
+index 77f46809f8..ae9fb43404 100644
+--- a/lib/librte_efd/rte_efd.c
++++ b/lib/librte_efd/rte_efd.c
+@@ -1165,7 +1165,7 @@ rte_efd_update(struct rte_efd_table * const table, const unsigned int socket_id,
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'distributor: fix potential overflow' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (46 preceding siblings ...)
2022-02-28 21:20 ` patch 'efd: fix uninitialized structure' " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-02-28 21:20 ` patch 'eal/linux: fix illegal memory access in uevent handler' " luca.boccassi
2022-02-28 21:20 ` patch 'kni: fix freeing order in device release' " luca.boccassi
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Bruce Richardson; +Cc: David Hunt, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/240dc513c2b191a30d4e0ee39bd97a39d5a30db6
Thanks.
Luca Boccassi
---
From 240dc513c2b191a30d4e0ee39bd97a39d5a30db6 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Thu, 17 Feb 2022 15:02:39 +0000
Subject: [PATCH] distributor: fix potential overflow
[ upstream commit 9699b09803b799ddc11abedffb17af059c992e9a ]
Coverity flags the fact that the tag values used in distributor are
32-bit, which means that when we use bit-manipulation to convert a tag
match/no-match to a bit in an array, we need to typecast to a 64-bit
type before shifting past 32 bits.
Coverity issue: 375808
Fixes: 08ccf3faa6a9 ("distributor: new packet distributor library")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
---
lib/librte_distributor/rte_distributor_single.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/librte_distributor/rte_distributor_single.c b/lib/librte_distributor/rte_distributor_single.c
index f4725b1d0b..e8a13ce980 100644
--- a/lib/librte_distributor/rte_distributor_single.c
+++ b/lib/librte_distributor/rte_distributor_single.c
@@ -249,8 +249,7 @@ rte_distributor_process_single(struct rte_distributor_single *d,
* worker given by the bit-position
*/
for (i = 0; i < d->num_workers; i++)
- match |= (!(d->in_flight_tags[i] ^ new_tag)
- << i);
+ match |= ((uint64_t)!(d->in_flight_tags[i] ^ new_tag) << i);
/* Only turned-on bits are considered as match */
match &= d->in_flight_bitmask;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:57.886170148 +0000
+++ 0049-distributor-fix-potential-overflow.patch 2022-02-28 21:17:54.064934139 +0000
@@ -1 +1 @@
-From 9699b09803b799ddc11abedffb17af059c992e9a Mon Sep 17 00:00:00 2001
+From 240dc513c2b191a30d4e0ee39bd97a39d5a30db6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9699b09803b799ddc11abedffb17af059c992e9a ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
- lib/distributor/rte_distributor_single.c | 3 +--
+ lib/librte_distributor/rte_distributor_single.c | 3 +--
@@ -21,5 +22,5 @@
-diff --git a/lib/distributor/rte_distributor_single.c b/lib/distributor/rte_distributor_single.c
-index de90aa8bb5..2c77ac454a 100644
---- a/lib/distributor/rte_distributor_single.c
-+++ b/lib/distributor/rte_distributor_single.c
-@@ -245,8 +245,7 @@ rte_distributor_process_single(struct rte_distributor_single *d,
+diff --git a/lib/librte_distributor/rte_distributor_single.c b/lib/librte_distributor/rte_distributor_single.c
+index f4725b1d0b..e8a13ce980 100644
+--- a/lib/librte_distributor/rte_distributor_single.c
++++ b/lib/librte_distributor/rte_distributor_single.c
+@@ -249,8 +249,7 @@ rte_distributor_process_single(struct rte_distributor_single *d,
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'eal/linux: fix illegal memory access in uevent handler' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (47 preceding siblings ...)
2022-02-28 21:20 ` patch 'distributor: fix potential overflow' " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
2022-02-28 21:20 ` patch 'kni: fix freeing order in device release' " luca.boccassi
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Steve Yang; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/3cb68884dd7bb7edfa8813cfbe4335951c1cd14f
Thanks.
Luca Boccassi
---
From 3cb68884dd7bb7edfa8813cfbe4335951c1cd14f Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Wed, 23 Feb 2022 08:49:50 +0000
Subject: [PATCH] eal/linux: fix illegal memory access in uevent handler
[ upstream commit 1a287fc9c95bd6245c119b20f07382cf4b8fefa4 ]
'recv()' fills the 'buf', later 'strlcpy()' used to copy from this buffer.
But as coverity warns 'recv()' doesn't guarantee that 'buf' is
null-terminated, but 'strlcpy()' requires it.
Enlarge 'buf' size to 'EAL_UEV_MSG_LEN + 1' and ensure the last one can
be set to 0 when received buffer size is EAL_UEV_MSG_LEN.
CID 375864: Memory - illegal accesses (STRING_NULL)
Passing unterminated string "buf" to "dev_uev_parse", which expects
a null-terminated string.
Coverity issue: 375864
Fixes: 0d0f478d0483 ("eal/linux: add uevent parse and process")
Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
lib/librte_eal/linux/eal_dev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/librte_eal/linux/eal_dev.c b/lib/librte_eal/linux/eal_dev.c
index ae0021e7b5..c1737f4672 100644
--- a/lib/librte_eal/linux/eal_dev.c
+++ b/lib/librte_eal/linux/eal_dev.c
@@ -226,13 +226,13 @@ dev_uev_handler(__rte_unused void *param)
{
struct rte_dev_event uevent;
int ret;
- char buf[EAL_UEV_MSG_LEN];
+ char buf[EAL_UEV_MSG_LEN + 1];
struct rte_bus *bus;
struct rte_device *dev;
const char *busname = "";
memset(&uevent, 0, sizeof(struct rte_dev_event));
- memset(buf, 0, EAL_UEV_MSG_LEN);
+ memset(buf, 0, EAL_UEV_MSG_LEN + 1);
ret = recv(intr_handle.fd, buf, EAL_UEV_MSG_LEN, MSG_DONTWAIT);
if (ret < 0 && errno == EAGAIN)
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:57.957762290 +0000
+++ 0050-eal-linux-fix-illegal-memory-access-in-uevent-handle.patch 2022-02-28 21:17:54.064934139 +0000
@@ -1 +1 @@
-From 1a287fc9c95bd6245c119b20f07382cf4b8fefa4 Mon Sep 17 00:00:00 2001
+From 3cb68884dd7bb7edfa8813cfbe4335951c1cd14f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1a287fc9c95bd6245c119b20f07382cf4b8fefa4 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
- lib/eal/linux/eal_dev.c | 4 ++--
+ lib/librte_eal/linux/eal_dev.c | 4 ++--
@@ -27,5 +28,5 @@
-diff --git a/lib/eal/linux/eal_dev.c b/lib/eal/linux/eal_dev.c
-index f6e5861221..e6f509bcff 100644
---- a/lib/eal/linux/eal_dev.c
-+++ b/lib/eal/linux/eal_dev.c
-@@ -227,13 +227,13 @@ dev_uev_handler(__rte_unused void *param)
+diff --git a/lib/librte_eal/linux/eal_dev.c b/lib/librte_eal/linux/eal_dev.c
+index ae0021e7b5..c1737f4672 100644
+--- a/lib/librte_eal/linux/eal_dev.c
++++ b/lib/librte_eal/linux/eal_dev.c
+@@ -226,13 +226,13 @@ dev_uev_handler(__rte_unused void *param)
@@ -45,2 +46,2 @@
- if (rte_intr_fd_get(intr_handle) < 0)
- return;
+ ret = recv(intr_handle.fd, buf, EAL_UEV_MSG_LEN, MSG_DONTWAIT);
+ if (ret < 0 && errno == EAGAIN)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'kni: fix freeing order in device release' has been queued to stable release 20.11.5
2022-02-28 21:19 ` patch 'eventdev/eth_tx: fix queue add error code' " luca.boccassi
` (48 preceding siblings ...)
2022-02-28 21:20 ` patch 'eal/linux: fix illegal memory access in uevent handler' " luca.boccassi
@ 2022-02-28 21:20 ` luca.boccassi
49 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-02-28 21:20 UTC (permalink / raw)
To: Huisong Li; +Cc: Min Hu, Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/8d6bbbc514d0e804595702dd61a4ff626c0a7400
Thanks.
Luca Boccassi
---
From 8d6bbbc514d0e804595702dd61a4ff626c0a7400 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Wed, 9 Feb 2022 15:35:25 +0800
Subject: [PATCH] kni: fix freeing order in device release
[ upstream commit d57f2899e29a74fffeb876863e1f570084d6437b ]
The "kni_dev" is the private data of the "net_device" in kni, and allocated
with the "net_device" by calling "alloc_netdev()". The "net_device" is
freed by calling "free_netdev()" when kni release. The freed memory
includes the "kni_dev". So after "kni_dev" should not be accessed after
"net_device" is released.
Fixes: e77fec694936 ("kni: fix possible mbuf leaks and speed up port release")
KASAN trace:
[ 85.263717] ==========================================================
[ 85.264418] BUG: KASAN: use-after-free in kni_net_release_fifo_phy+
0x30/0x84 [rte_kni]
[ 85.265139] Read of size 8 at addr ffff000260668d60 by task kni/341
[ 85.265703]
[ 85.265857] CPU: 0 PID: 341 Comm: kni Tainted: G U O
5.15.0-rc4+ #1
[ 85.266525] Hardware name: linux,dummy-virt (DT)
[ 85.266968] Call trace:
[ 85.267220] dump_backtrace+0x0/0x2d0
[ 85.267591] show_stack+0x24/0x30
[ 85.267924] dump_stack_lvl+0x8c/0xb8
[ 85.268294] print_address_description.constprop.0+0x74/0x2b8
[ 85.268855] kasan_report+0x1e4/0x200
[ 85.269224] __asan_load8+0x98/0xd4
[ 85.269577] kni_net_release_fifo_phy+0x30/0x84 [rte_kni]
[ 85.270116] kni_dev_remove.isra.0+0x50/0x64 [rte_kni]
[ 85.270630] kni_ioctl_release+0x254/0x320 [rte_kni]
[ 85.271136] kni_ioctl+0x64/0xb0 [rte_kni]
[ 85.271553] __arm64_sys_ioctl+0xdc/0x120
[ 85.271955] invoke_syscall+0x68/0x1a0
[ 85.272332] el0_svc_common.constprop.0+0x90/0x200
[ 85.272807] do_el0_svc+0x94/0xa4
[ 85.273144] el0_svc+0x78/0x240
[ 85.273463] el0t_64_sync_handler+0x1a8/0x1b0
[ 85.273895] el0t_64_sync+0x1a0/0x1a4
[ 85.274264]
[ 85.274427] Allocated by task 341:
[ 85.274767] kasan_save_stack+0x2c/0x60
[ 85.275157] __kasan_kmalloc+0x90/0xb4
[ 85.275533] __kmalloc_node+0x230/0x594
[ 85.275917] kvmalloc_node+0x8c/0x190
[ 85.276286] alloc_netdev_mqs+0x70/0x6b0
[ 85.276678] kni_ioctl_create+0x224/0xf40 [rte_kni]
[ 85.277166] kni_ioctl+0x9c/0xb0 [rte_kni]
[ 85.277581] __arm64_sys_ioctl+0xdc/0x120
[ 85.277980] invoke_syscall+0x68/0x1a0
[ 85.278357] el0_svc_common.constprop.0+0x90/0x200
[ 85.278830] do_el0_svc+0x94/0xa4
[ 85.279172] el0_svc+0x78/0x240
[ 85.279491] el0t_64_sync_handler+0x1a8/0x1b0
[ 85.279925] el0t_64_sync+0x1a0/0x1a4
[ 85.280292]
[ 85.280454] Freed by task 341:
[ 85.280763] kasan_save_stack+0x2c/0x60
[ 85.281147] kasan_set_track+0x2c/0x40
[ 85.281522] kasan_set_free_info+0x2c/0x50
[ 85.281930] __kasan_slab_free+0xdc/0x140
[ 85.282331] slab_free_freelist_hook+0x90/0x250
[ 85.282782] kfree+0x128/0x580
[ 85.283099] kvfree+0x48/0x60
[ 85.283402] netdev_freemem+0x34/0x44
[ 85.283770] netdev_release+0x50/0x64
[ 85.284138] device_release+0xa0/0x120
[ 85.284516] kobject_put+0xf8/0x160
[ 85.284867] put_device+0x20/0x30
[ 85.285204] free_netdev+0x22c/0x310
[ 85.285562] kni_dev_remove.isra.0+0x48/0x64 [rte_kni]
[ 85.286076] kni_ioctl_release+0x254/0x320 [rte_kni]
[ 85.286573] kni_ioctl+0x64/0xb0 [rte_kni]
[ 85.286992] __arm64_sys_ioctl+0xdc/0x120
[ 85.287392] invoke_syscall+0x68/0x1a0
[ 85.287769] el0_svc_common.constprop.0+0x90/0x200
[ 85.288243] do_el0_svc+0x94/0xa4
[ 85.288579] el0_svc+0x78/0x240
[ 85.288899] el0t_64_sync_handler+0x1a8/0x1b0
[ 85.289332] el0t_64_sync+0x1a0/0x1a4
[ 85.289699]
[ 85.289862] The buggy address belongs to the object at ffff000260668000
[ 85.289862] which belongs to the cache kmalloc-cg-8k of size 8192
[ 85.291079] The buggy address is located 3424 bytes inside of
[ 85.291079] 8192-byte region [ffff000260668000, ffff00026066a000)
[ 85.292213] The buggy address belongs to the page:
[ 85.292684] page:(____ptrval____) refcount:1 mapcount:0 mapping:
0000000000000000 index:0x0 pfn:0x2a0668
[ 85.293585] head:(____ptrval____) order:3 compound_mapcount:0
compound_pincount:0
[ 85.294305] flags: 0xbfff80000010200(slab|head|node=0|zone=2|
lastcpupid=0x7fff)
[ 85.295020] raw: 0bfff80000010200 0000000000000000 dead000000000122
ffff0000c000d680
[ 85.295767] raw: 0000000000000000 0000000080020002 00000001ffffffff
0000000000000000
[ 85.296512] page dumped because: kasan: bad access detected
[ 85.297054]
[ 85.297217] Memory state around the buggy address:
[ 85.297688] ffff000260668c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb
fb fb
[ 85.298384] ffff000260668c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb
fb fb
[ 85.299088] >ffff000260668d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb
fb fb
[ 85.299781] ^
[ 85.300396] ffff000260668d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb
fb fb
[ 85.301092] ffff000260668e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb
fb fb
[ 85.301787] ===========================================================
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
kernel/linux/kni/kni_misc.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/kernel/linux/kni/kni_misc.c b/kernel/linux/kni/kni_misc.c
index cc5172fefc..d1f6f54aac 100644
--- a/kernel/linux/kni/kni_misc.c
+++ b/kernel/linux/kni/kni_misc.c
@@ -184,13 +184,17 @@ kni_dev_remove(struct kni_dev *dev)
if (!dev)
return -ENODEV;
+ /*
+ * The memory of kni device is allocated and released together
+ * with net device. Release mbuf before freeing net device.
+ */
+ kni_net_release_fifo_phy(dev);
+
if (dev->net_dev) {
unregister_netdev(dev->net_dev);
free_netdev(dev->net_dev);
}
- kni_net_release_fifo_phy(dev);
-
return 0;
}
@@ -220,8 +224,8 @@ kni_release(struct inode *inode, struct file *file)
dev->pthread = NULL;
}
- kni_dev_remove(dev);
list_del(&dev->list);
+ kni_dev_remove(dev);
}
up_write(&knet->kni_list_lock);
@@ -470,8 +474,8 @@ kni_ioctl_release(struct net *net, uint32_t ioctl_num,
dev->pthread = NULL;
}
- kni_dev_remove(dev);
list_del(&dev->list);
+ kni_dev_remove(dev);
ret = 0;
break;
}
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-02-28 21:17:58.034425089 +0000
+++ 0051-kni-fix-freeing-order-in-device-release.patch 2022-02-28 21:17:54.068934228 +0000
@@ -1 +1 @@
-From d57f2899e29a74fffeb876863e1f570084d6437b Mon Sep 17 00:00:00 2001
+From 8d6bbbc514d0e804595702dd61a4ff626c0a7400 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d57f2899e29a74fffeb876863e1f570084d6437b ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -124 +125 @@
-index ec70190042..780187d8bf 100644
+index cc5172fefc..d1f6f54aac 100644
@@ -127 +128 @@
-@@ -182,13 +182,17 @@ kni_dev_remove(struct kni_dev *dev)
+@@ -184,13 +184,17 @@ kni_dev_remove(struct kni_dev *dev)
@@ -147 +148 @@
-@@ -218,8 +222,8 @@ kni_release(struct inode *inode, struct file *file)
+@@ -220,8 +224,8 @@ kni_release(struct inode *inode, struct file *file)
@@ -157 +158 @@
-@@ -468,8 +472,8 @@ kni_ioctl_release(struct net *net, uint32_t ioctl_num,
+@@ -470,8 +474,8 @@ kni_ioctl_release(struct net *net, uint32_t ioctl_num,
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'app/compress-perf: fix cycle count operations allocation' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (120 preceding siblings ...)
2022-02-18 12:39 ` patch 'kni: update kernel API to set random MAC address' " luca.boccassi
@ 2022-03-09 16:30 ` luca.boccassi
2022-03-09 16:30 ` patch 'app/compress-perf: optimize operations pool " luca.boccassi
` (34 more replies)
2022-03-15 13:32 ` patch 'vhost: fix queue number check when setting inflight FD' " luca.boccassi
122 siblings, 35 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-09 16:30 UTC (permalink / raw)
To: Raja Zidane; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/11/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a166f7044b9f1210546c7ca136604088ca4f8822
Thanks.
Luca Boccassi
---
From a166f7044b9f1210546c7ca136604088ca4f8822 Mon Sep 17 00:00:00 2001
From: Raja Zidane <rzidane@nvidia.com>
Date: Wed, 23 Feb 2022 15:32:17 +0200
Subject: [PATCH] app/compress-perf: fix cycle count operations allocation
[ upstream commit 81353ea4dc2a57d8c4378fda6e3e0e6b6db6cd21 ]
In cyclecount main_loop function, each iteration it tries to
enqueue X ops, in case Y<X ops were enqueued, the rest of the
X-Y ops are moved to the beginning of the ops array, to preserve
ops order, and next Y ops are allocated for the next enqueue
action, the allocation of the ops occurs on the first Y entries
in the array, when it should have skipped the first X-Y
array entries and allocate the following Y entries.
Fix the allocation by adding the correct offset.
Fixes: 2695db95a147 ("test/compress: add cycle-count mode to perf tool")
Signed-off-by: Raja Zidane <rzidane@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
app/test-compress-perf/comp_perf_test_cyclecount.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test-compress-perf/comp_perf_test_cyclecount.c b/app/test-compress-perf/comp_perf_test_cyclecount.c
index 034a2932a9..9ade89fc8e 100644
--- a/app/test-compress-perf/comp_perf_test_cyclecount.c
+++ b/app/test-compress-perf/comp_perf_test_cyclecount.c
@@ -273,7 +273,7 @@ main_loop(struct cperf_cyclecount_ctx *ctx, enum rte_comp_xform_type type)
/* Allocate compression operations */
if (ops_needed && rte_mempool_get_bulk(
mem->op_pool,
- (void **)ops,
+ (void **)&ops[ops_unused],
ops_needed) != 0) {
RTE_LOG(ERR, USER1,
"Could not allocate enough operations\n");
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-09 16:30:08.631203157 +0000
+++ 0001-app-compress-perf-fix-cycle-count-operations-allocat.patch 2022-03-09 16:30:08.479023632 +0000
@@ -1 +1 @@
-From 81353ea4dc2a57d8c4378fda6e3e0e6b6db6cd21 Mon Sep 17 00:00:00 2001
+From a166f7044b9f1210546c7ca136604088ca4f8822 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 81353ea4dc2a57d8c4378fda6e3e0e6b6db6cd21 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 1d8e5fe6c2..c215547291 100644
+index 034a2932a9..9ade89fc8e 100644
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'app/compress-perf: optimize operations pool allocation' has been queued to stable release 20.11.5
2022-03-09 16:30 ` patch 'app/compress-perf: fix cycle count operations allocation' " luca.boccassi
@ 2022-03-09 16:30 ` luca.boccassi
2022-03-09 16:30 ` patch 'app/compress-perf: fix socket ID type during init' " luca.boccassi
` (33 subsequent siblings)
34 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-09 16:30 UTC (permalink / raw)
To: Raja Zidane; +Cc: Matan Azrad, Fan Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/11/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/c30254b5da1b5033462ab40450cce4fc7cb18088
Thanks.
Luca Boccassi
---
From c30254b5da1b5033462ab40450cce4fc7cb18088 Mon Sep 17 00:00:00 2001
From: Raja Zidane <rzidane@nvidia.com>
Date: Wed, 23 Feb 2022 15:33:07 +0200
Subject: [PATCH] app/compress-perf: optimize operations pool allocation
[ upstream commit 68d3287f4ef43318728e4a134b7aa33d5c52b12d ]
An array of the size of total operations needed for the de/compression is
reserved for ops while enqueueing, although only first burst_size entries
of the array are used.
Reduce the size of the array allocated.
Fixes: b68a82425da4 ("app/compress-perf: add performance measurement")
Signed-off-by: Raja Zidane <rzidane@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
app/test-compress-perf/comp_perf_test_cyclecount.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/app/test-compress-perf/comp_perf_test_cyclecount.c b/app/test-compress-perf/comp_perf_test_cyclecount.c
index 9ade89fc8e..4a6e7aa094 100644
--- a/app/test-compress-perf/comp_perf_test_cyclecount.c
+++ b/app/test-compress-perf/comp_perf_test_cyclecount.c
@@ -175,7 +175,8 @@ main_loop(struct cperf_cyclecount_ctx *ctx, enum rte_comp_xform_type type)
/* one array for both enqueue and dequeue */
ops = rte_zmalloc_socket(NULL,
- 2 * mem->total_bufs * sizeof(struct rte_comp_op *),
+ (test_data->burst_sz + mem->total_bufs) *
+ sizeof(struct rte_comp_op *),
0, rte_socket_id());
if (ops == NULL) {
@@ -184,7 +185,7 @@ main_loop(struct cperf_cyclecount_ctx *ctx, enum rte_comp_xform_type type)
return -1;
}
- deq_ops = &ops[mem->total_bufs];
+ deq_ops = &ops[test_data->burst_sz];
if (type == RTE_COMP_COMPRESS) {
xform = (struct rte_comp_xform) {
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-09 16:30:08.657693009 +0000
+++ 0002-app-compress-perf-optimize-operations-pool-allocatio.patch 2022-03-09 16:30:08.483023722 +0000
@@ -1 +1 @@
-From 68d3287f4ef43318728e4a134b7aa33d5c52b12d Mon Sep 17 00:00:00 2001
+From c30254b5da1b5033462ab40450cce4fc7cb18088 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 68d3287f4ef43318728e4a134b7aa33d5c52b12d ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index c215547291..a3f6404eb2 100644
+index 9ade89fc8e..4a6e7aa094 100644
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'app/compress-perf: fix socket ID type during init' has been queued to stable release 20.11.5
2022-03-09 16:30 ` patch 'app/compress-perf: fix cycle count operations allocation' " luca.boccassi
2022-03-09 16:30 ` patch 'app/compress-perf: optimize operations pool " luca.boccassi
@ 2022-03-09 16:30 ` luca.boccassi
2022-03-09 16:30 ` patch 'app/compress-perf: fix number of queue pairs to setup' " luca.boccassi
` (32 subsequent siblings)
34 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-09 16:30 UTC (permalink / raw)
To: Raja Zidane; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/11/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/9df88bfefeaaaf22a22a64b4a3f4c5841ec11341
Thanks.
Luca Boccassi
---
From 9df88bfefeaaaf22a22a64b4a3f4c5841ec11341 Mon Sep 17 00:00:00 2001
From: Raja Zidane <rzidane@nvidia.com>
Date: Wed, 2 Mar 2022 10:39:27 +0200
Subject: [PATCH] app/compress-perf: fix socket ID type during init
[ upstream commit 220b51f78b46bf773e513a09bf2fa67a9b8428ba ]
Socket ID is obtained by function rte_compressdev_socket_id, which
returns it as integer, but is interpreted as unsigned byte integer.
change type from uint8_t to int.
Fixes: ed7dd94f7f66 ("compressdev: add basic device management")
Signed-off-by: Raja Zidane <rzidane@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
app/test-compress-perf/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test-compress-perf/main.c b/app/test-compress-perf/main.c
index 6ff6a2f04a..3402b65c63 100644
--- a/app/test-compress-perf/main.c
+++ b/app/test-compress-perf/main.c
@@ -168,7 +168,7 @@ comp_perf_initialize_compressdev(struct comp_test_data *test_data,
cdev_id = enabled_cdevs[i];
struct rte_compressdev_info cdev_info;
- uint8_t socket_id = rte_compressdev_socket_id(cdev_id);
+ int socket_id = rte_compressdev_socket_id(cdev_id);
rte_compressdev_info_get(cdev_id, &cdev_info);
if (cdev_info.max_nb_queue_pairs &&
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-09 16:30:08.689293718 +0000
+++ 0003-app-compress-perf-fix-socket-ID-type-during-init.patch 2022-03-09 16:30:08.483023722 +0000
@@ -1 +1 @@
-From 220b51f78b46bf773e513a09bf2fa67a9b8428ba Mon Sep 17 00:00:00 2001
+From 9df88bfefeaaaf22a22a64b4a3f4c5841ec11341 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 220b51f78b46bf773e513a09bf2fa67a9b8428ba ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'app/compress-perf: fix number of queue pairs to setup' has been queued to stable release 20.11.5
2022-03-09 16:30 ` patch 'app/compress-perf: fix cycle count operations allocation' " luca.boccassi
2022-03-09 16:30 ` patch 'app/compress-perf: optimize operations pool " luca.boccassi
2022-03-09 16:30 ` patch 'app/compress-perf: fix socket ID type during init' " luca.boccassi
@ 2022-03-09 16:30 ` luca.boccassi
2022-03-09 16:30 ` patch 'compressdev: fix socket ID type' " luca.boccassi
` (31 subsequent siblings)
34 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-09 16:30 UTC (permalink / raw)
To: Raja Zidane; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/11/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6b75eeccec4f7e2200be5299f1da79b16e32f23b
Thanks.
Luca Boccassi
---
From 6b75eeccec4f7e2200be5299f1da79b16e32f23b Mon Sep 17 00:00:00 2001
From: Raja Zidane <rzidane@nvidia.com>
Date: Wed, 2 Mar 2022 10:41:31 +0200
Subject: [PATCH] app/compress-perf: fix number of queue pairs to setup
[ upstream commit e77e8b66d1f917419f9e6bea4148a3f246bbc75d ]
The number of QPs is limited by the number of cores, such that in
case the user requests more QPs than possible, the number of QPs
actually configured on the device is equal to the number of cores,
but the app tries to setup the original number of QPs.
Align the number of QPs setup'ed to the limited number.
Fixes: 424dd6c8c1a8 ("app/compress-perf: add weak functions for multicore test")
Signed-off-by: Raja Zidane <rzidane@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
app/test-compress-perf/main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/app/test-compress-perf/main.c b/app/test-compress-perf/main.c
index 3402b65c63..ce9e80bedc 100644
--- a/app/test-compress-perf/main.c
+++ b/app/test-compress-perf/main.c
@@ -194,6 +194,7 @@ comp_perf_initialize_compressdev(struct comp_test_data *test_data,
.max_nb_priv_xforms = NUM_MAX_XFORMS,
.max_nb_streams = 0
};
+ test_data->nb_qps = config.nb_queue_pairs;
if (rte_compressdev_configure(cdev_id, &config) < 0) {
RTE_LOG(ERR, USER1, "Device configuration failed\n");
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-09 16:30:08.719808897 +0000
+++ 0004-app-compress-perf-fix-number-of-queue-pairs-to-setup.patch 2022-03-09 16:30:08.483023722 +0000
@@ -1 +1 @@
-From e77e8b66d1f917419f9e6bea4148a3f246bbc75d Mon Sep 17 00:00:00 2001
+From 6b75eeccec4f7e2200be5299f1da79b16e32f23b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e77e8b66d1f917419f9e6bea4148a3f246bbc75d ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'compressdev: fix socket ID type' has been queued to stable release 20.11.5
2022-03-09 16:30 ` patch 'app/compress-perf: fix cycle count operations allocation' " luca.boccassi
` (2 preceding siblings ...)
2022-03-09 16:30 ` patch 'app/compress-perf: fix number of queue pairs to setup' " luca.boccassi
@ 2022-03-09 16:30 ` luca.boccassi
2022-03-09 16:30 ` patch 'net/hns3: remove duplicate macro definition' " luca.boccassi
` (30 subsequent siblings)
34 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-09 16:30 UTC (permalink / raw)
To: Raja Zidane; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/11/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/52e0989cce1bd5c33c0aed386c45b66e0372cfa6
Thanks.
Luca Boccassi
---
From 52e0989cce1bd5c33c0aed386c45b66e0372cfa6 Mon Sep 17 00:00:00 2001
From: Raja Zidane <rzidane@nvidia.com>
Date: Tue, 1 Mar 2022 16:15:02 +0200
Subject: [PATCH] compressdev: fix socket ID type
[ upstream commit c0941508b30618b9dd335fb4b533d451f8686f3b ]
Socket ID is used and interpreted as integer, one of the possible
values for socket id is -1 (SOCKET_ID_ANY).
here socket_id is defined as unsigned 8 bit integer, so when putting
-1, it is interpreted as 255, which causes allocation errors when
trying to allocate from socket_id (255).
change socket_id from unsigned 8 bit integer to integer.
Fixes: ed7dd94f7f66 ("compressdev: add basic device management")
Signed-off-by: Raja Zidane <rzidane@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
lib/librte_compressdev/rte_compressdev_internal.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_compressdev/rte_compressdev_internal.h b/lib/librte_compressdev/rte_compressdev_internal.h
index 888c8f5c5c..25d8afbfb9 100644
--- a/lib/librte_compressdev/rte_compressdev_internal.h
+++ b/lib/librte_compressdev/rte_compressdev_internal.h
@@ -98,7 +98,7 @@ struct rte_compressdev {
struct rte_compressdev_data {
uint8_t dev_id;
/**< Compress device identifier */
- uint8_t socket_id;
+ int socket_id;
/**< Socket identifier where memory is allocated */
char name[RTE_COMPRESSDEV_NAME_MAX_LEN];
/**< Unique identifier name */
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-09 16:30:08.750681731 +0000
+++ 0005-compressdev-fix-socket-ID-type.patch 2022-03-09 16:30:08.483023722 +0000
@@ -1 +1 @@
-From c0941508b30618b9dd335fb4b533d451f8686f3b Mon Sep 17 00:00:00 2001
+From 52e0989cce1bd5c33c0aed386c45b66e0372cfa6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c0941508b30618b9dd335fb4b533d451f8686f3b ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
- lib/compressdev/rte_compressdev_internal.h | 2 +-
+ lib/librte_compressdev/rte_compressdev_internal.h | 2 +-
@@ -23 +24 @@
-diff --git a/lib/compressdev/rte_compressdev_internal.h b/lib/compressdev/rte_compressdev_internal.h
+diff --git a/lib/librte_compressdev/rte_compressdev_internal.h b/lib/librte_compressdev/rte_compressdev_internal.h
@@ -25,2 +26,2 @@
---- a/lib/compressdev/rte_compressdev_internal.h
-+++ b/lib/compressdev/rte_compressdev_internal.h
+--- a/lib/librte_compressdev/rte_compressdev_internal.h
++++ b/lib/librte_compressdev/rte_compressdev_internal.h
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/hns3: remove duplicate macro definition' has been queued to stable release 20.11.5
2022-03-09 16:30 ` patch 'app/compress-perf: fix cycle count operations allocation' " luca.boccassi
` (3 preceding siblings ...)
2022-03-09 16:30 ` patch 'compressdev: fix socket ID type' " luca.boccassi
@ 2022-03-09 16:30 ` luca.boccassi
2022-03-09 16:30 ` patch 'net/hns3: fix RSS TC mode entry' " luca.boccassi
` (29 subsequent siblings)
34 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-09 16:30 UTC (permalink / raw)
To: Jie Hai; +Cc: Min Hu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/11/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/af3bd943eed8e6f872ce37acd617b1eb41f7a530
Thanks.
Luca Boccassi
---
From af3bd943eed8e6f872ce37acd617b1eb41f7a530 Mon Sep 17 00:00:00 2001
From: Jie Hai <haijie1@huawei.com>
Date: Mon, 28 Feb 2022 11:21:41 +0800
Subject: [PATCH] net/hns3: remove duplicate macro definition
[ upstream commit 0983cdc1870f52a360eadb40eab84b34c20b464d ]
This patch fixes duplicate macro definition of HNS3_RSS_CFG_TBL_SIZE.
Fixes: 737f30e1c3ab ("net/hns3: support command interface with firmware")
Signed-off-by: Jie Hai <haijie1@huawei.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
---
drivers/net/hns3/hns3_cmd.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/hns3/hns3_cmd.h b/drivers/net/hns3/hns3_cmd.h
index 0463acb215..344474db6f 100644
--- a/drivers/net/hns3/hns3_cmd.h
+++ b/drivers/net/hns3/hns3_cmd.h
@@ -557,7 +557,6 @@ struct hns3_cfg_gro_status_cmd {
#define HNS3_RSS_HASH_KEY_OFFSET_B 4
-#define HNS3_RSS_CFG_TBL_SIZE 16
#define HNS3_RSS_HASH_KEY_NUM 16
/* Configure the algorithm mode and Hash Key, opcode:0x0D01 */
struct hns3_rss_generic_config_cmd {
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-09 16:30:08.780944960 +0000
+++ 0006-net-hns3-remove-duplicate-macro-definition.patch 2022-03-09 16:30:08.487023811 +0000
@@ -1 +1 @@
-From 0983cdc1870f52a360eadb40eab84b34c20b464d Mon Sep 17 00:00:00 2001
+From af3bd943eed8e6f872ce37acd617b1eb41f7a530 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0983cdc1870f52a360eadb40eab84b34c20b464d ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 81bc9e9d98..f9addc6069 100644
+index 0463acb215..344474db6f 100644
@@ -21 +22 @@
-@@ -603,7 +603,6 @@ struct hns3_cfg_gro_status_cmd {
+@@ -557,7 +557,6 @@ struct hns3_cfg_gro_status_cmd {
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/hns3: fix RSS TC mode entry' has been queued to stable release 20.11.5
2022-03-09 16:30 ` patch 'app/compress-perf: fix cycle count operations allocation' " luca.boccassi
` (4 preceding siblings ...)
2022-03-09 16:30 ` patch 'net/hns3: remove duplicate macro definition' " luca.boccassi
@ 2022-03-09 16:30 ` luca.boccassi
2022-03-09 16:30 ` patch 'net/hns3: fix VF " luca.boccassi
` (28 subsequent siblings)
34 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-09 16:30 UTC (permalink / raw)
To: Huisong Li; +Cc: Min Hu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/11/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/ff48dd55d6f73ff78ba790ce36d8857666ea5d4b
Thanks.
Luca Boccassi
---
From ff48dd55d6f73ff78ba790ce36d8857666ea5d4b Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Mon, 28 Feb 2022 11:21:45 +0800
Subject: [PATCH] net/hns3: fix RSS TC mode entry
[ upstream commit cdb9a7ae5f8f3b59b6de9dc2b52387636245e3a5 ]
The driver allocates queues only to valid TCs. But the driver also
configure queues for invalid TCs, which is unreasonable.
Fixes: c37ca66f2b27 ("net/hns3: support RSS")
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
---
| 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c
index 3b8c2c845b..52986d590d 100644
--- a/drivers/net/hns3/hns3_rss.c
+++ b/drivers/net/hns3/hns3_rss.c
@@ -601,8 +601,8 @@ hns3_set_rss_tc_mode(struct hns3_hw *hw)
for (i = 0; i < HNS3_MAX_TC_NUM; i++) {
tc_valid[i] = !!(hw->hw_tc_map & BIT(i));
- tc_size[i] = roundup_size;
- tc_offset[i] = rss_size * i;
+ tc_size[i] = tc_valid[i] ? roundup_size : 0;
+ tc_offset[i] = tc_valid[i] ? rss_size * i : 0;
}
hns3_cmd_setup_basic_desc(&desc, HNS3_OPC_RSS_TC_MODE, false);
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-09 16:30:08.813776718 +0000
+++ 0007-net-hns3-fix-RSS-TC-mode-entry.patch 2022-03-09 16:30:08.487023811 +0000
@@ -1 +1 @@
-From cdb9a7ae5f8f3b59b6de9dc2b52387636245e3a5 Mon Sep 17 00:00:00 2001
+From ff48dd55d6f73ff78ba790ce36d8857666ea5d4b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cdb9a7ae5f8f3b59b6de9dc2b52387636245e3a5 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 1782d63883..ebf3c60f07 100644
+index 3b8c2c845b..52986d590d 100644
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/hns3: fix VF RSS TC mode entry' has been queued to stable release 20.11.5
2022-03-09 16:30 ` patch 'app/compress-perf: fix cycle count operations allocation' " luca.boccassi
` (5 preceding siblings ...)
2022-03-09 16:30 ` patch 'net/hns3: fix RSS TC mode entry' " luca.boccassi
@ 2022-03-09 16:30 ` luca.boccassi
2022-03-09 16:30 ` patch 'net/hns3: increase time waiting for PF reset completion' " luca.boccassi
` (27 subsequent siblings)
34 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-09 16:30 UTC (permalink / raw)
To: Huisong Li; +Cc: Min Hu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/11/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b27dbae232df8873581a78d1c2f47c88ea94fedb
Thanks.
Luca Boccassi
---
From b27dbae232df8873581a78d1c2f47c88ea94fedb Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Mon, 28 Feb 2022 11:21:46 +0800
Subject: [PATCH] net/hns3: fix VF RSS TC mode entry
[ upstream commit 87f9628e2c786dff500139baf59720693e46b0bc ]
For packets with VLAN priorities destined for the VF, hardware still
assign Rx queue based on the Up-to-TC mapping PF configured. But VF has
only one TC. If other TC don't enable, it causes that the priority
packets that aren't destined for TC0 aren't received by RSS hash but is
destined for queue 0. So driver has to enable the unused TC by using TC0
queue mapping configuration.
Fixes: c37ca66f2b27 ("net/hns3: support RSS")
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
---
| 58 +++++++++++++++++++++++++++----------
1 file changed, 42 insertions(+), 16 deletions(-)
--git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c
index 52986d590d..2e9ac328c1 100644
--- a/drivers/net/hns3/hns3_rss.c
+++ b/drivers/net/hns3/hns3_rss.c
@@ -578,33 +578,59 @@ hns3_dev_rss_reta_query(struct rte_eth_dev *dev,
return 0;
}
-/*
- * Used to configure the tc_size and tc_offset.
- */
-static int
-hns3_set_rss_tc_mode(struct hns3_hw *hw)
+static void
+hns3_set_rss_tc_mode_entry(struct hns3_hw *hw, uint8_t *tc_valid,
+ uint16_t *tc_size, uint16_t *tc_offset,
+ uint8_t tc_num)
{
+ struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);
uint16_t rss_size = hw->alloc_rss_size;
+ uint16_t roundup_size;
+ uint16_t i;
+
+ roundup_size = roundup_pow_of_two(rss_size);
+ roundup_size = ilog2(roundup_size);
+
+ for (i = 0; i < tc_num; i++) {
+ if (hns->is_vf) {
+ /*
+ * For packets with VLAN priorities destined for the VF,
+ * hardware still assign Rx queue based on the Up-to-TC
+ * mapping PF configured. But VF has only one TC. If
+ * other TC don't enable, it causes that the priority
+ * packets that aren't destined for TC0 aren't received
+ * by RSS hash but is destined for queue 0. So driver
+ * has to enable the unused TC by using TC0 queue
+ * mapping configuration.
+ */
+ tc_valid[i] = (hw->hw_tc_map & BIT(i)) ?
+ !!(hw->hw_tc_map & BIT(i)) : 1;
+ tc_size[i] = roundup_size;
+ tc_offset[i] = (hw->hw_tc_map & BIT(i)) ?
+ rss_size * i : 0;
+ } else {
+ tc_valid[i] = !!(hw->hw_tc_map & BIT(i));
+ tc_size[i] = tc_valid[i] ? roundup_size : 0;
+ tc_offset[i] = tc_valid[i] ? rss_size * i : 0;
+ }
+ }
+}
+
+static int
+hns3_set_rss_tc_mode(struct hns3_hw *hw)
+{
struct hns3_rss_tc_mode_cmd *req;
uint16_t tc_offset[HNS3_MAX_TC_NUM];
uint8_t tc_valid[HNS3_MAX_TC_NUM];
uint16_t tc_size[HNS3_MAX_TC_NUM];
struct hns3_cmd_desc desc;
- uint16_t roundup_size;
uint16_t i;
int ret;
+ hns3_set_rss_tc_mode_entry(hw, tc_valid, tc_size,
+ tc_offset, HNS3_MAX_TC_NUM);
+
req = (struct hns3_rss_tc_mode_cmd *)desc.data;
-
- roundup_size = roundup_pow_of_two(rss_size);
- roundup_size = ilog2(roundup_size);
-
- for (i = 0; i < HNS3_MAX_TC_NUM; i++) {
- tc_valid[i] = !!(hw->hw_tc_map & BIT(i));
- tc_size[i] = tc_valid[i] ? roundup_size : 0;
- tc_offset[i] = tc_valid[i] ? rss_size * i : 0;
- }
-
hns3_cmd_setup_basic_desc(&desc, HNS3_OPC_RSS_TC_MODE, false);
for (i = 0; i < HNS3_MAX_TC_NUM; i++) {
uint16_t mode = 0;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-09 16:30:08.846008098 +0000
+++ 0008-net-hns3-fix-VF-RSS-TC-mode-entry.patch 2022-03-09 16:30:08.491023900 +0000
@@ -1 +1 @@
-From 87f9628e2c786dff500139baf59720693e46b0bc Mon Sep 17 00:00:00 2001
+From b27dbae232df8873581a78d1c2f47c88ea94fedb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 87f9628e2c786dff500139baf59720693e46b0bc ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index ebf3c60f07..1493b10f96 100644
+index 52986d590d..2e9ac328c1 100644
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/hns3: increase time waiting for PF reset completion' has been queued to stable release 20.11.5
2022-03-09 16:30 ` patch 'app/compress-perf: fix cycle count operations allocation' " luca.boccassi
` (6 preceding siblings ...)
2022-03-09 16:30 ` patch 'net/hns3: fix VF " luca.boccassi
@ 2022-03-09 16:30 ` luca.boccassi
2022-03-09 16:30 ` patch 'net/ixgbe: fix FSP check for X550EM devices' " luca.boccassi
` (26 subsequent siblings)
34 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-09 16:30 UTC (permalink / raw)
To: Huisong Li; +Cc: Min Hu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/11/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/38dee9e84ab49a01d12f921e7590062948248a81
Thanks.
Luca Boccassi
---
From 38dee9e84ab49a01d12f921e7590062948248a81 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Wed, 2 Mar 2022 08:35:01 +0800
Subject: [PATCH] net/hns3: increase time waiting for PF reset completion
[ upstream commit d6a9f8fb26b8d6adaac20d6a303faa5c5ba4d5bc ]
On the case that PF and VF need to be reset, after the hardware reset is
complete, VF needs wait for 1 second to restore the configuration so
that VF does not fail to recover because PF reset isn't complete. But
the estimated time is not sufficient. This patch fixes it to 5 seconds.
Fixes: 2790c6464725 ("net/hns3: support device reset")
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
---
drivers/net/hns3/hns3_ethdev_vf.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 317dd5ec46..b0db01993b 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -2331,6 +2331,7 @@ hns3vf_is_reset_pending(struct hns3_adapter *hns)
static int
hns3vf_wait_hardware_ready(struct hns3_adapter *hns)
{
+#define HNS3_WAIT_PF_RESET_READY_TIME 5
struct hns3_hw *hw = &hns->hw;
struct hns3_wait_data *wait_data = hw->reset.wait_data;
struct timeval tv;
@@ -2351,12 +2352,14 @@ hns3vf_wait_hardware_ready(struct hns3_adapter *hns)
return 0;
wait_data->check_completion = NULL;
- wait_data->interval = 1 * MSEC_PER_SEC * USEC_PER_MSEC;
+ wait_data->interval = HNS3_WAIT_PF_RESET_READY_TIME *
+ MSEC_PER_SEC * USEC_PER_MSEC;
wait_data->count = 1;
wait_data->result = HNS3_WAIT_REQUEST;
rte_eal_alarm_set(wait_data->interval, hns3_wait_callback,
wait_data);
- hns3_warn(hw, "hardware is ready, delay 1 sec for PF reset complete");
+ hns3_warn(hw, "hardware is ready, delay %d sec for PF reset complete",
+ HNS3_WAIT_PF_RESET_READY_TIME);
return -EAGAIN;
} else if (wait_data->result == HNS3_WAIT_TIMEOUT) {
hns3_clock_gettime(&tv);
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-09 16:30:08.877914881 +0000
+++ 0009-net-hns3-increase-time-waiting-for-PF-reset-completi.patch 2022-03-09 16:30:08.495023990 +0000
@@ -1 +1 @@
-From d6a9f8fb26b8d6adaac20d6a303faa5c5ba4d5bc Mon Sep 17 00:00:00 2001
+From 38dee9e84ab49a01d12f921e7590062948248a81 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d6a9f8fb26b8d6adaac20d6a303faa5c5ba4d5bc ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 06ddf64184..9091706fe5 100644
+index 317dd5ec46..b0db01993b 100644
@@ -24 +25 @@
-@@ -1877,6 +1877,7 @@ hns3vf_is_reset_pending(struct hns3_adapter *hns)
+@@ -2331,6 +2331,7 @@ hns3vf_is_reset_pending(struct hns3_adapter *hns)
@@ -32 +33 @@
-@@ -1897,12 +1898,14 @@ hns3vf_wait_hardware_ready(struct hns3_adapter *hns)
+@@ -2351,12 +2352,14 @@ hns3vf_wait_hardware_ready(struct hns3_adapter *hns)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/ixgbe: fix FSP check for X550EM devices' has been queued to stable release 20.11.5
2022-03-09 16:30 ` patch 'app/compress-perf: fix cycle count operations allocation' " luca.boccassi
` (7 preceding siblings ...)
2022-03-09 16:30 ` patch 'net/hns3: increase time waiting for PF reset completion' " luca.boccassi
@ 2022-03-09 16:30 ` luca.boccassi
2022-03-09 16:30 ` patch 'net/iavf: fix function pointer in multi-process' " luca.boccassi
` (25 subsequent siblings)
34 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-09 16:30 UTC (permalink / raw)
To: Stephen Douthit; +Cc: Jeff Daly, Haiyue Wang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/11/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f0a47837dd5090aebd748f244d5c333bfbebf0b3
Thanks.
Luca Boccassi
---
From f0a47837dd5090aebd748f244d5c333bfbebf0b3 Mon Sep 17 00:00:00 2001
From: Stephen Douthit <stephend@silicom-usa.com>
Date: Mon, 28 Feb 2022 10:29:35 -0500
Subject: [PATCH] net/ixgbe: fix FSP check for X550EM devices
[ upstream commit 05271b99a93ae306fe4abe09fa561f0220469724 ]
Currently all X500EM* MAC types fall through to the default case and get
reported as non-SFP regardless of media type, which isn't correct.
Fixes: 0790adeb5675 ("ixgbe/base: support X550em_a device")
Signed-off-by: Stephen Douthit <stephend@silicom-usa.com>
Signed-off-by: Jeff Daly <jeffd@silicom-usa.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
---
drivers/net/ixgbe/ixgbe_ethdev.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index c741698d70..08d6bb66a5 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -788,6 +788,20 @@ ixgbe_is_sfp(struct ixgbe_hw *hw)
case ixgbe_phy_sfp_passive_unknown:
return 1;
default:
+ /* x550em devices may be SFP, check media type */
+ switch (hw->mac.type) {
+ case ixgbe_mac_X550EM_x:
+ case ixgbe_mac_X550EM_a:
+ switch (ixgbe_get_media_type(hw)) {
+ case ixgbe_media_type_fiber:
+ case ixgbe_media_type_fiber_qsfp:
+ return 1;
+ default:
+ break;
+ }
+ default:
+ break;
+ }
return 0;
}
}
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-09 16:30:08.911145714 +0000
+++ 0010-net-ixgbe-fix-FSP-check-for-X550EM-devices.patch 2022-03-09 16:30:08.507024258 +0000
@@ -1 +1 @@
-From 05271b99a93ae306fe4abe09fa561f0220469724 Mon Sep 17 00:00:00 2001
+From f0a47837dd5090aebd748f244d5c333bfbebf0b3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 05271b99a93ae306fe4abe09fa561f0220469724 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 7643842560..2da3f67bbc 100644
+index c741698d70..08d6bb66a5 100644
@@ -23 +24 @@
-@@ -781,6 +781,20 @@ ixgbe_is_sfp(struct ixgbe_hw *hw)
+@@ -788,6 +788,20 @@ ixgbe_is_sfp(struct ixgbe_hw *hw)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/iavf: fix function pointer in multi-process' has been queued to stable release 20.11.5
2022-03-09 16:30 ` patch 'app/compress-perf: fix cycle count operations allocation' " luca.boccassi
` (8 preceding siblings ...)
2022-03-09 16:30 ` patch 'net/ixgbe: fix FSP check for X550EM devices' " luca.boccassi
@ 2022-03-09 16:30 ` luca.boccassi
2022-03-09 16:30 ` patch 'common/mlx5: add Netlink event helpers' " luca.boccassi
` (24 subsequent siblings)
34 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-09 16:30 UTC (permalink / raw)
To: Steve Yang; +Cc: Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/11/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/63030f8b7bf946181e2ae40d0e4ded4306066839
Thanks.
Luca Boccassi
---
From 63030f8b7bf946181e2ae40d0e4ded4306066839 Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Mon, 28 Feb 2022 09:48:59 +0000
Subject: [PATCH] net/iavf: fix function pointer in multi-process
[ upstream commit 0ed16e01313e1f8930dc6a52b22159b20269d4e0 ]
This patch uses the index value to call the function, instead of the
function pointer assignment to save the selection of Receive Flex
Descriptor profile ID.
Otherwise the secondary process will run with wrong function address
from primary process.
Fixes: 12b435bf8f2f ("net/iavf: support flex desc metadata extraction")
Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/iavf/iavf_rxtx.c | 36 +++++++++++++++++++-----------------
drivers/net/iavf/iavf_rxtx.h | 2 --
2 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index c2a9c4f37b..6243199f2a 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -439,48 +439,50 @@ iavf_rxd_to_pkt_fields_by_comms_aux_v2(struct iavf_rx_queue *rxq,
#endif
}
+static const
+iavf_rxd_to_pkt_fields_t rxd_to_pkt_fields_ops[] = {
+ [IAVF_RXDID_COMMS_AUX_VLAN] = iavf_rxd_to_pkt_fields_by_comms_aux_v1,
+ [IAVF_RXDID_COMMS_AUX_IPV4] = iavf_rxd_to_pkt_fields_by_comms_aux_v1,
+ [IAVF_RXDID_COMMS_AUX_IPV6] = iavf_rxd_to_pkt_fields_by_comms_aux_v1,
+ [IAVF_RXDID_COMMS_AUX_IPV6_FLOW] =
+ iavf_rxd_to_pkt_fields_by_comms_aux_v1,
+ [IAVF_RXDID_COMMS_AUX_TCP] = iavf_rxd_to_pkt_fields_by_comms_aux_v1,
+ [IAVF_RXDID_COMMS_AUX_IP_OFFSET] =
+ iavf_rxd_to_pkt_fields_by_comms_aux_v2,
+ [IAVF_RXDID_COMMS_OVS_1] = iavf_rxd_to_pkt_fields_by_comms_ovs,
+};
+
static void
iavf_select_rxd_to_pkt_fields_handler(struct iavf_rx_queue *rxq, uint32_t rxdid)
{
+ rxq->rxdid = rxdid;
+
switch (rxdid) {
case IAVF_RXDID_COMMS_AUX_VLAN:
rxq->xtr_ol_flag = rte_pmd_ifd_dynflag_proto_xtr_vlan_mask;
- rxq->rxd_to_pkt_fields =
- iavf_rxd_to_pkt_fields_by_comms_aux_v1;
break;
case IAVF_RXDID_COMMS_AUX_IPV4:
rxq->xtr_ol_flag = rte_pmd_ifd_dynflag_proto_xtr_ipv4_mask;
- rxq->rxd_to_pkt_fields =
- iavf_rxd_to_pkt_fields_by_comms_aux_v1;
break;
case IAVF_RXDID_COMMS_AUX_IPV6:
rxq->xtr_ol_flag = rte_pmd_ifd_dynflag_proto_xtr_ipv6_mask;
- rxq->rxd_to_pkt_fields =
- iavf_rxd_to_pkt_fields_by_comms_aux_v1;
break;
case IAVF_RXDID_COMMS_AUX_IPV6_FLOW:
rxq->xtr_ol_flag =
rte_pmd_ifd_dynflag_proto_xtr_ipv6_flow_mask;
- rxq->rxd_to_pkt_fields =
- iavf_rxd_to_pkt_fields_by_comms_aux_v1;
break;
case IAVF_RXDID_COMMS_AUX_TCP:
rxq->xtr_ol_flag = rte_pmd_ifd_dynflag_proto_xtr_tcp_mask;
- rxq->rxd_to_pkt_fields =
- iavf_rxd_to_pkt_fields_by_comms_aux_v1;
break;
case IAVF_RXDID_COMMS_AUX_IP_OFFSET:
rxq->xtr_ol_flag =
rte_pmd_ifd_dynflag_proto_xtr_ip_offset_mask;
- rxq->rxd_to_pkt_fields =
- iavf_rxd_to_pkt_fields_by_comms_aux_v2;
break;
case IAVF_RXDID_COMMS_OVS_1:
- rxq->rxd_to_pkt_fields = iavf_rxd_to_pkt_fields_by_comms_ovs;
break;
default:
/* update this according to the RXDID for FLEX_DESC_NONE */
- rxq->rxd_to_pkt_fields = iavf_rxd_to_pkt_fields_by_comms_ovs;
+ rxq->rxdid = IAVF_RXDID_COMMS_OVS_1;
break;
}
@@ -1304,7 +1306,7 @@ iavf_recv_pkts_flex_rxd(void *rx_queue,
rxm->packet_type = ptype_tbl[IAVF_RX_FLEX_DESC_PTYPE_M &
rte_le_to_cpu_16(rxd.wb.ptype_flex_flags0)];
iavf_flex_rxd_to_vlan_tci(rxm, &rxd);
- rxq->rxd_to_pkt_fields(rxq, rxm, &rxd);
+ rxd_to_pkt_fields_ops[rxq->rxdid](rxq, rxm, &rxd);
pkt_flags = iavf_flex_rxd_error_to_pkt_flags(rx_stat_err0);
rxm->ol_flags |= pkt_flags;
@@ -1446,7 +1448,7 @@ iavf_recv_scattered_pkts_flex_rxd(void *rx_queue, struct rte_mbuf **rx_pkts,
first_seg->packet_type = ptype_tbl[IAVF_RX_FLEX_DESC_PTYPE_M &
rte_le_to_cpu_16(rxd.wb.ptype_flex_flags0)];
iavf_flex_rxd_to_vlan_tci(first_seg, &rxd);
- rxq->rxd_to_pkt_fields(rxq, first_seg, &rxd);
+ rxd_to_pkt_fields_ops[rxq->rxdid](rxq, first_seg, &rxd);
pkt_flags = iavf_flex_rxd_error_to_pkt_flags(rx_stat_err0);
first_seg->ol_flags |= pkt_flags;
@@ -1702,7 +1704,7 @@ iavf_rx_scan_hw_ring_flex_rxd(struct iavf_rx_queue *rxq)
mb->packet_type = ptype_tbl[IAVF_RX_FLEX_DESC_PTYPE_M &
rte_le_to_cpu_16(rxdp[j].wb.ptype_flex_flags0)];
iavf_flex_rxd_to_vlan_tci(mb, &rxdp[j]);
- rxq->rxd_to_pkt_fields(rxq, mb, &rxdp[j]);
+ rxd_to_pkt_fields_ops[rxq->rxdid](rxq, mb, &rxdp[j]);
stat_err0 = rte_le_to_cpu_16(rxdp[j].wb.status_error0);
pkt_flags = iavf_flex_rxd_error_to_pkt_flags(stat_err0);
diff --git a/drivers/net/iavf/iavf_rxtx.h b/drivers/net/iavf/iavf_rxtx.h
index decfe3ad4c..5b24d2ca29 100644
--- a/drivers/net/iavf/iavf_rxtx.h
+++ b/drivers/net/iavf/iavf_rxtx.h
@@ -193,8 +193,6 @@ struct iavf_rx_queue {
uint8_t proto_xtr; /* protocol extraction type */
uint64_t xtr_ol_flag;
/* flexible descriptor metadata extraction offload flag */
- iavf_rxd_to_pkt_fields_t rxd_to_pkt_fields;
- /* handle flexible descriptor by RXDID */
};
struct iavf_tx_entry {
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-09 16:30:08.950282970 +0000
+++ 0011-net-iavf-fix-function-pointer-in-multi-process.patch 2022-03-09 16:30:08.511024348 +0000
@@ -1 +1 @@
-From 0ed16e01313e1f8930dc6a52b22159b20269d4e0 Mon Sep 17 00:00:00 2001
+From 63030f8b7bf946181e2ae40d0e4ded4306066839 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0ed16e01313e1f8930dc6a52b22159b20269d4e0 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
- drivers/net/iavf/iavf_rxtx.c | 40 +++++++++++++++++++-----------------
+ drivers/net/iavf/iavf_rxtx.c | 36 +++++++++++++++++++-----------------
@@ -21 +22 @@
- 2 files changed, 21 insertions(+), 21 deletions(-)
+ 2 files changed, 19 insertions(+), 19 deletions(-)
@@ -24 +25 @@
-index ca54c70dd0..cb779879cb 100644
+index c2a9c4f37b..6243199f2a 100644
@@ -27 +28 @@
-@@ -475,54 +475,56 @@ iavf_rxd_to_pkt_fields_by_comms_aux_v2(struct iavf_rx_queue *rxq,
+@@ -439,48 +439,50 @@ iavf_rxd_to_pkt_fields_by_comms_aux_v2(struct iavf_rx_queue *rxq,
@@ -41,2 +41,0 @@
-+ [IAVF_RXDID_COMMS_IPSEC_CRYPTO] =
-+ iavf_rxd_to_pkt_fields_by_comms_aux_v2,
@@ -84,6 +82,0 @@
- case IAVF_RXDID_COMMS_IPSEC_CRYPTO:
- rxq->xtr_ol_flag =
- rte_pmd_ifd_dynflag_proto_xtr_ipsec_crypto_said_mask;
-- rxq->rxd_to_pkt_fields =
-- iavf_rxd_to_pkt_fields_by_comms_aux_v2;
- break;
@@ -100 +93,3 @@
-@@ -1483,7 +1485,7 @@ iavf_recv_pkts_flex_rxd(void *rx_queue,
+@@ -1304,7 +1306,7 @@ iavf_recv_pkts_flex_rxd(void *rx_queue,
+ rxm->packet_type = ptype_tbl[IAVF_RX_FLEX_DESC_PTYPE_M &
+ rte_le_to_cpu_16(rxd.wb.ptype_flex_flags0)];
@@ -102,2 +96,0 @@
- iavf_flex_rxd_to_ipsec_crypto_status(rxm, &rxd,
- &rxq->stats.ipsec_crypto);
@@ -109 +102,3 @@
-@@ -1627,7 +1629,7 @@ iavf_recv_scattered_pkts_flex_rxd(void *rx_queue, struct rte_mbuf **rx_pkts,
+@@ -1446,7 +1448,7 @@ iavf_recv_scattered_pkts_flex_rxd(void *rx_queue, struct rte_mbuf **rx_pkts,
+ first_seg->packet_type = ptype_tbl[IAVF_RX_FLEX_DESC_PTYPE_M &
+ rte_le_to_cpu_16(rxd.wb.ptype_flex_flags0)];
@@ -111,2 +105,0 @@
- iavf_flex_rxd_to_ipsec_crypto_status(first_seg, &rxd,
- &rxq->stats.ipsec_crypto);
@@ -118 +111,3 @@
-@@ -1885,7 +1887,7 @@ iavf_rx_scan_hw_ring_flex_rxd(struct iavf_rx_queue *rxq)
+@@ -1702,7 +1704,7 @@ iavf_rx_scan_hw_ring_flex_rxd(struct iavf_rx_queue *rxq)
+ mb->packet_type = ptype_tbl[IAVF_RX_FLEX_DESC_PTYPE_M &
+ rte_le_to_cpu_16(rxdp[j].wb.ptype_flex_flags0)];
@@ -120,2 +114,0 @@
- iavf_flex_rxd_to_ipsec_crypto_status(mb, &rxdp[j],
- &rxq->stats.ipsec_crypto);
@@ -128 +121 @@
-index b610176b30..bf8aebbce8 100644
+index decfe3ad4c..5b24d2ca29 100644
@@ -131 +124 @@
-@@ -217,8 +217,6 @@ struct iavf_rx_queue {
+@@ -193,8 +193,6 @@ struct iavf_rx_queue {
@@ -137,2 +129,0 @@
- struct iavf_rx_queue_stats stats;
- uint64_t offloads;
@@ -139,0 +131,2 @@
+
+ struct iavf_tx_entry {
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'common/mlx5: add Netlink event helpers' has been queued to stable release 20.11.5
2022-03-09 16:30 ` patch 'app/compress-perf: fix cycle count operations allocation' " luca.boccassi
` (9 preceding siblings ...)
2022-03-09 16:30 ` patch 'net/iavf: fix function pointer in multi-process' " luca.boccassi
@ 2022-03-09 16:30 ` luca.boccassi
2022-03-09 16:30 ` patch 'net/txgbe: fix queue statistics mapping' " luca.boccassi
` (23 subsequent siblings)
34 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-09 16:30 UTC (permalink / raw)
To: Dmitry Kozlyuk; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/11/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/cd135f699c1f30f0ad5a2cee9438189e7dfa393c
Thanks.
Luca Boccassi
---
From cd135f699c1f30f0ad5a2cee9438189e7dfa393c Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Date: Tue, 1 Mar 2022 14:15:12 +0200
Subject: [PATCH] common/mlx5: add Netlink event helpers
[ upstream commit be66461cba371c3138ce942eb9fe5657f9e9a446 ]
Introduce mlx5_nl_read_events() to read Netlink events
(technically, messages) from a socket that was configured
to listen for them via a new mlx5_nl_init() parameter.
Add mlx5_nl_parse_link_status_update() helper
to extract information from link-related events.
This patch is a shared base for later fixes.
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Reviewed-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/common/mlx5/linux/mlx5_nl.c | 102 +++++++++++++++++++++++++-
drivers/common/mlx5/linux/mlx5_nl.h | 8 +-
drivers/common/mlx5/version.map | 2 +
drivers/net/mlx5/linux/mlx5_os.c | 8 +-
drivers/net/mlx5/linux/mlx5_vlan_os.c | 2 +-
drivers/vdpa/mlx5/mlx5_vdpa.c | 2 +-
6 files changed, 116 insertions(+), 8 deletions(-)
diff --git a/drivers/common/mlx5/linux/mlx5_nl.c b/drivers/common/mlx5/linux/mlx5_nl.c
index 145e354b2c..9dbb7e909b 100644
--- a/drivers/common/mlx5/linux/mlx5_nl.c
+++ b/drivers/common/mlx5/linux/mlx5_nl.c
@@ -180,19 +180,22 @@ uint32_t atomic_sn;
*
* @param protocol
* Netlink protocol (e.g. NETLINK_ROUTE, NETLINK_RDMA).
+ * @param groups
+ * Groups to listen (e.g. RTMGRP_LINK), can be 0.
*
* @return
* A file descriptor on success, a negative errno value otherwise and
* rte_errno is set.
*/
int
-mlx5_nl_init(int protocol)
+mlx5_nl_init(int protocol, int groups)
{
int fd;
int buf_size;
socklen_t opt_size;
struct sockaddr_nl local = {
.nl_family = AF_NETLINK,
+ .nl_groups = groups,
};
int ret;
@@ -1798,3 +1801,100 @@ mlx5_nl_enable_roce_set(int nlsk_fd, int family_id, const char *pci_addr,
/* Now, need to reload the driver. */
return mlx5_nl_driver_reload(nlsk_fd, family_id, pci_addr);
}
+
+/**
+ * Try to parse a Netlink message as a link status update.
+ *
+ * @param hdr
+ * Netlink message header.
+ * @param[out] ifindex
+ * Index of the updated interface.
+ *
+ * @return
+ * 0 on success, negative on failure.
+ */
+int
+mlx5_nl_parse_link_status_update(struct nlmsghdr *hdr, uint32_t *ifindex)
+{
+ struct ifinfomsg *info;
+
+ switch (hdr->nlmsg_type) {
+ case RTM_NEWLINK:
+ case RTM_DELLINK:
+ case RTM_GETLINK:
+ case RTM_SETLINK:
+ info = NLMSG_DATA(hdr);
+ *ifindex = info->ifi_index;
+ return 0;
+ }
+ return -1;
+}
+
+/**
+ * Read pending events from a Netlink socket.
+ *
+ * @param nlsk_fd
+ * Netlink socket.
+ * @param cb
+ * Callback invoked for each of the events.
+ * @param cb_arg
+ * User data for the callback.
+ *
+ * @return
+ * 0 on success, including the case when there are no events.
+ * Negative on failure and rte_errno is set.
+ */
+int
+mlx5_nl_read_events(int nlsk_fd, mlx5_nl_event_cb *cb, void *cb_arg)
+{
+ char buf[8192];
+ struct sockaddr_nl addr;
+ struct iovec iov = {
+ .iov_base = buf,
+ .iov_len = sizeof(buf),
+ };
+ struct msghdr msg = {
+ .msg_name = &addr,
+ .msg_namelen = sizeof(addr),
+ .msg_iov = &iov,
+ .msg_iovlen = 1,
+ };
+ struct nlmsghdr *hdr;
+ ssize_t size;
+
+ while (1) {
+ size = recvmsg(nlsk_fd, &msg, MSG_DONTWAIT);
+ if (size < 0) {
+ if (errno == EAGAIN)
+ return 0;
+ if (errno == EINTR)
+ continue;
+ DRV_LOG(DEBUG, "Failed to receive netlink message: %s",
+ strerror(errno));
+ rte_errno = errno;
+ return -rte_errno;
+ }
+ hdr = (struct nlmsghdr *)buf;
+ while (size >= (ssize_t)sizeof(*hdr)) {
+ ssize_t msg_len = hdr->nlmsg_len;
+ ssize_t data_len = msg_len - sizeof(*hdr);
+ ssize_t aligned_len;
+
+ if (data_len < 0) {
+ DRV_LOG(DEBUG, "Netlink message too short");
+ rte_errno = EINVAL;
+ return -rte_errno;
+ }
+ aligned_len = NLMSG_ALIGN(msg_len);
+ if (aligned_len > size) {
+ DRV_LOG(DEBUG, "Netlink message too long");
+ rte_errno = EINVAL;
+ return -rte_errno;
+ }
+ cb(hdr, cb_arg);
+ hdr = RTE_PTR_ADD(hdr, aligned_len);
+ size -= aligned_len;
+ }
+ }
+ return 0;
+}
diff --git a/drivers/common/mlx5/linux/mlx5_nl.h b/drivers/common/mlx5/linux/mlx5_nl.h
index 15129ffdc8..05189e997a 100644
--- a/drivers/common/mlx5/linux/mlx5_nl.h
+++ b/drivers/common/mlx5/linux/mlx5_nl.h
@@ -11,6 +11,7 @@
#include "mlx5_common.h"
+typedef void (mlx5_nl_event_cb)(struct nlmsghdr *hdr, void *user_data);
/* VLAN netdev for VLAN workaround. */
struct mlx5_nl_vlan_dev {
@@ -30,7 +31,7 @@ struct mlx5_nl_vlan_vmwa_context {
};
__rte_internal
-int mlx5_nl_init(int protocol);
+int mlx5_nl_init(int protocol, int groups);
__rte_internal
int mlx5_nl_mac_addr_add(int nlsk_fd, unsigned int iface_idx, uint64_t *mac_own,
struct rte_ether_addr *mac, uint32_t index);
@@ -77,4 +78,9 @@ __rte_internal
int mlx5_nl_enable_roce_set(int nlsk_fd, int family_id, const char *pci_addr,
int enable);
+__rte_internal
+int mlx5_nl_read_events(int nlsk_fd, mlx5_nl_event_cb *cb, void *cb_arg);
+__rte_internal
+int mlx5_nl_parse_link_status_update(struct nlmsghdr *hdr, uint32_t *ifindex);
+
#endif /* RTE_PMD_MLX5_NL_H_ */
diff --git a/drivers/common/mlx5/version.map b/drivers/common/mlx5/version.map
index 983714a82c..f5404da3de 100644
--- a/drivers/common/mlx5/version.map
+++ b/drivers/common/mlx5/version.map
@@ -82,8 +82,10 @@ INTERNAL {
mlx5_nl_mac_addr_flush;
mlx5_nl_mac_addr_remove;
mlx5_nl_mac_addr_sync;
+ mlx5_nl_parse_link_status_update;
mlx5_nl_portnum;
mlx5_nl_promisc;
+ mlx5_nl_read_events;
mlx5_nl_switch_info;
mlx5_nl_vf_mac_addr_modify;
mlx5_nl_vlan_vmwa_create;
diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index aa66879d74..b3a5a8d3c7 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -1002,8 +1002,8 @@ err_secondary:
priv->pci_dev = spawn->pci_dev;
priv->mtu = RTE_ETHER_MTU;
/* Some internal functions rely on Netlink sockets, open them now. */
- priv->nl_socket_rdma = mlx5_nl_init(NETLINK_RDMA);
- priv->nl_socket_route = mlx5_nl_init(NETLINK_ROUTE);
+ priv->nl_socket_rdma = mlx5_nl_init(NETLINK_RDMA, 0);
+ priv->nl_socket_route = mlx5_nl_init(NETLINK_ROUTE, 0);
priv->representor = !!switch_info->representor;
priv->master = !!switch_info->master;
priv->domain_id = RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID;
@@ -1877,8 +1877,8 @@ mlx5_os_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
* matching ones, gathering into the list.
*/
struct ibv_device *ibv_match[ret + 1];
- int nl_route = mlx5_nl_init(NETLINK_ROUTE);
- int nl_rdma = mlx5_nl_init(NETLINK_RDMA);
+ int nl_route = mlx5_nl_init(NETLINK_ROUTE, 0);
+ int nl_rdma = mlx5_nl_init(NETLINK_RDMA, 0);
unsigned int i;
while (ret-- > 0) {
diff --git a/drivers/net/mlx5/linux/mlx5_vlan_os.c b/drivers/net/mlx5/linux/mlx5_vlan_os.c
index 40e895e080..598026c414 100644
--- a/drivers/net/mlx5/linux/mlx5_vlan_os.c
+++ b/drivers/net/mlx5/linux/mlx5_vlan_os.c
@@ -136,7 +136,7 @@ mlx5_vlan_vmwa_init(struct rte_eth_dev *dev, uint32_t ifindex)
return NULL;
}
rte_spinlock_init(&vmwa->sl);
- vmwa->nl_socket = mlx5_nl_init(NETLINK_ROUTE);
+ vmwa->nl_socket = mlx5_nl_init(NETLINK_ROUTE, 0);
if (vmwa->nl_socket < 0) {
DRV_LOG(WARNING,
"Can not create Netlink socket"
diff --git a/drivers/vdpa/mlx5/mlx5_vdpa.c b/drivers/vdpa/mlx5/mlx5_vdpa.c
index 06e602e72a..6519b9c9ac 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa.c
@@ -504,7 +504,7 @@ mlx5_vdpa_get_ib_device_match(struct rte_pci_addr *addr)
static int
mlx5_vdpa_nl_roce_disable(const char *addr)
{
- int nlsk_fd = mlx5_nl_init(NETLINK_GENERIC);
+ int nlsk_fd = mlx5_nl_init(NETLINK_GENERIC, 0);
int devlink_id;
int enable;
int ret;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-09 16:30:08.986098583 +0000
+++ 0012-common-mlx5-add-Netlink-event-helpers.patch 2022-03-09 16:30:08.515024438 +0000
@@ -1 +1 @@
-From be66461cba371c3138ce942eb9fe5657f9e9a446 Mon Sep 17 00:00:00 2001
+From cd135f699c1f30f0ad5a2cee9438189e7dfa393c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit be66461cba371c3138ce942eb9fe5657f9e9a446 ]
+
@@ -13,2 +14,0 @@
-Cc: stable@dpdk.org
-
@@ -18,6 +18,6 @@
- drivers/common/mlx5/linux/mlx5_common_os.c | 2 +-
- drivers/common/mlx5/linux/mlx5_nl.c | 102 ++++++++++++++++++++-
- drivers/common/mlx5/linux/mlx5_nl.h | 8 +-
- drivers/common/mlx5/version.map | 2 +
- drivers/net/mlx5/linux/mlx5_os.c | 8 +-
- drivers/net/mlx5/linux/mlx5_vlan_os.c | 2 +-
+ drivers/common/mlx5/linux/mlx5_nl.c | 102 +++++++++++++++++++++++++-
+ drivers/common/mlx5/linux/mlx5_nl.h | 8 +-
+ drivers/common/mlx5/version.map | 2 +
+ drivers/net/mlx5/linux/mlx5_os.c | 8 +-
+ drivers/net/mlx5/linux/mlx5_vlan_os.c | 2 +-
+ drivers/vdpa/mlx5/mlx5_vdpa.c | 2 +-
@@ -26,13 +25,0 @@
-diff --git a/drivers/common/mlx5/linux/mlx5_common_os.c b/drivers/common/mlx5/linux/mlx5_common_os.c
-index a3c25638da..030ceb561f 100644
---- a/drivers/common/mlx5/linux/mlx5_common_os.c
-+++ b/drivers/common/mlx5/linux/mlx5_common_os.c
-@@ -590,7 +590,7 @@ mlx5_os_get_ibv_device(const struct rte_pci_addr *addr)
- static int
- mlx5_nl_roce_disable(const char *addr)
- {
-- int nlsk_fd = mlx5_nl_init(NETLINK_GENERIC);
-+ int nlsk_fd = mlx5_nl_init(NETLINK_GENERIC, 0);
- int devlink_id;
- int enable;
- int ret;
@@ -40 +27 @@
-index fd4c2d2625..5d04857b38 100644
+index 145e354b2c..9dbb7e909b 100644
@@ -43 +30 @@
-@@ -185,19 +185,22 @@ uint32_t atomic_sn;
+@@ -180,19 +180,22 @@ uint32_t atomic_sn;
@@ -67 +54 @@
-@@ -1862,3 +1865,100 @@ mlx5_nl_enable_roce_set(int nlsk_fd, int family_id, const char *pci_addr,
+@@ -1798,3 +1801,100 @@ mlx5_nl_enable_roce_set(int nlsk_fd, int family_id, const char *pci_addr,
@@ -169 +156 @@
-index 2063c0deeb..0b7552338a 100644
+index 15129ffdc8..05189e997a 100644
@@ -189 +176 @@
-@@ -75,4 +76,9 @@ int mlx5_nl_enable_roce_get(int nlsk_fd, int family_id, const char *pci_addr,
+@@ -77,4 +78,9 @@ __rte_internal
@@ -200 +187 @@
-index cb20a7d893..a23a30a6c0 100644
+index 983714a82c..f5404da3de 100644
@@ -203,12 +190,11 @@
-@@ -127,9 +127,11 @@ INTERNAL {
- mlx5_nl_mac_addr_flush; # WINDOWS_NO_EXPORT
- mlx5_nl_mac_addr_remove; # WINDOWS_NO_EXPORT
- mlx5_nl_mac_addr_sync; # WINDOWS_NO_EXPORT
-+ mlx5_nl_parse_link_status_update; # WINDOWS_NO_EXPORT
- mlx5_nl_port_state; # WINDOWS_NO_EXPORT
- mlx5_nl_portnum; # WINDOWS_NO_EXPORT
- mlx5_nl_promisc; # WINDOWS_NO_EXPORT
-+ mlx5_nl_read_events; # WINDOWS_NO_EXPORT
- mlx5_nl_switch_info; # WINDOWS_NO_EXPORT
- mlx5_nl_vf_mac_addr_modify; # WINDOWS_NO_EXPORT
- mlx5_nl_vlan_vmwa_create; # WINDOWS_NO_EXPORT
+@@ -82,8 +82,10 @@ INTERNAL {
+ mlx5_nl_mac_addr_flush;
+ mlx5_nl_mac_addr_remove;
+ mlx5_nl_mac_addr_sync;
++ mlx5_nl_parse_link_status_update;
+ mlx5_nl_portnum;
+ mlx5_nl_promisc;
++ mlx5_nl_read_events;
+ mlx5_nl_switch_info;
+ mlx5_nl_vf_mac_addr_modify;
+ mlx5_nl_vlan_vmwa_create;
@@ -216 +202 @@
-index be95095521..17e7144cc9 100644
+index aa66879d74..b3a5a8d3c7 100644
@@ -219,10 +205,2 @@
-@@ -1117,7 +1117,7 @@ err_secondary:
- sh = mlx5_alloc_shared_dev_ctx(spawn, mkvlist);
- if (!sh)
- return NULL;
-- nl_rdma = mlx5_nl_init(NETLINK_RDMA);
-+ nl_rdma = mlx5_nl_init(NETLINK_RDMA, 0);
- /* Check port status. */
- if (spawn->phys_port <= UINT8_MAX) {
- /* Legacy Verbs api only support u8 port number. */
-@@ -1180,7 +1180,7 @@ err_secondary:
+@@ -1002,8 +1002,8 @@ err_secondary:
+ priv->pci_dev = spawn->pci_dev;
@@ -231 +209 @@
- priv->nl_socket_rdma = nl_rdma;
+- priv->nl_socket_rdma = mlx5_nl_init(NETLINK_RDMA);
@@ -232,0 +211 @@
++ priv->nl_socket_rdma = mlx5_nl_init(NETLINK_RDMA, 0);
@@ -237 +216 @@
-@@ -1927,8 +1927,8 @@ mlx5_os_pci_probe_pf(struct mlx5_common_device *cdev,
+@@ -1877,8 +1877,8 @@ mlx5_os_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
@@ -249 +228 @@
-index 80ccd5a460..81611a8d3f 100644
+index 40e895e080..598026c414 100644
@@ -252 +231 @@
-@@ -135,7 +135,7 @@ mlx5_vlan_vmwa_init(struct rte_eth_dev *dev, uint32_t ifindex)
+@@ -136,7 +136,7 @@ mlx5_vlan_vmwa_init(struct rte_eth_dev *dev, uint32_t ifindex)
@@ -260,0 +240,13 @@
+diff --git a/drivers/vdpa/mlx5/mlx5_vdpa.c b/drivers/vdpa/mlx5/mlx5_vdpa.c
+index 06e602e72a..6519b9c9ac 100644
+--- a/drivers/vdpa/mlx5/mlx5_vdpa.c
++++ b/drivers/vdpa/mlx5/mlx5_vdpa.c
+@@ -504,7 +504,7 @@ mlx5_vdpa_get_ib_device_match(struct rte_pci_addr *addr)
+ static int
+ mlx5_vdpa_nl_roce_disable(const char *addr)
+ {
+- int nlsk_fd = mlx5_nl_init(NETLINK_GENERIC);
++ int nlsk_fd = mlx5_nl_init(NETLINK_GENERIC, 0);
+ int devlink_id;
+ int enable;
+ int ret;
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/txgbe: fix queue statistics mapping' has been queued to stable release 20.11.5
2022-03-09 16:30 ` patch 'app/compress-perf: fix cycle count operations allocation' " luca.boccassi
` (10 preceding siblings ...)
2022-03-09 16:30 ` patch 'common/mlx5: add Netlink event helpers' " luca.boccassi
@ 2022-03-09 16:30 ` luca.boccassi
2022-03-09 16:30 ` patch 'net/kni: fix config initialization' " luca.boccassi
` (22 subsequent siblings)
34 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-09 16:30 UTC (permalink / raw)
To: Weiguo Li; +Cc: Jiawen Wu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/11/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/4e76a13521aa9afb7576712309f052ee418f6471
Thanks.
Luca Boccassi
---
From 4e76a13521aa9afb7576712309f052ee418f6471 Mon Sep 17 00:00:00 2001
From: Weiguo Li <liwg06@foxmail.com>
Date: Tue, 1 Mar 2022 14:08:30 +0800
Subject: [PATCH] net/txgbe: fix queue statistics mapping
[ upstream commit f69467177fa34afaeeeae81ad83142121ee1bc98 ]
Since boolean value is in 0 and 1, it's strange to combines a boolean
value with a bit operator.
Thus it's highly possible a typo error with "if (A & !B)", and more
probably to use "if (A & ~B)" instead.
Fixes: c1d4e9d37abd ("net/txgbe: add queue stats mapping")
Signed-off-by: Weiguo Li <liwg06@foxmail.com>
Acked-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/txgbe/txgbe_ethdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index 4a5d6aad26..1a2c9ff976 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -366,7 +366,7 @@ txgbe_dev_queue_stats_mapping_set(struct rte_eth_dev *eth_dev,
if (hw->mac.type != txgbe_mac_raptor)
return -ENOSYS;
- if (stat_idx & !QMAP_FIELD_RESERVED_BITS_MASK)
+ if (stat_idx & ~QMAP_FIELD_RESERVED_BITS_MASK)
return -EIO;
PMD_INIT_LOG(DEBUG, "Setting port %d, %s queue_id %d to stat index %d",
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-09 16:30:09.023214853 +0000
+++ 0013-net-txgbe-fix-queue-statistics-mapping.patch 2022-03-09 16:30:08.523024617 +0000
@@ -1 +1 @@
-From f69467177fa34afaeeeae81ad83142121ee1bc98 Mon Sep 17 00:00:00 2001
+From 4e76a13521aa9afb7576712309f052ee418f6471 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f69467177fa34afaeeeae81ad83142121ee1bc98 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 19d4444748..f0994f028d 100644
+index 4a5d6aad26..1a2c9ff976 100644
@@ -25 +26 @@
-@@ -376,7 +376,7 @@ txgbe_dev_queue_stats_mapping_set(struct rte_eth_dev *eth_dev,
+@@ -366,7 +366,7 @@ txgbe_dev_queue_stats_mapping_set(struct rte_eth_dev *eth_dev,
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/kni: fix config initialization' has been queued to stable release 20.11.5
2022-03-09 16:30 ` patch 'app/compress-perf: fix cycle count operations allocation' " luca.boccassi
` (11 preceding siblings ...)
2022-03-09 16:30 ` patch 'net/txgbe: fix queue statistics mapping' " luca.boccassi
@ 2022-03-09 16:30 ` luca.boccassi
2022-03-09 16:30 ` patch 'doc: fix typos and punctuation in flow API guide' " luca.boccassi
` (21 subsequent siblings)
34 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-09 16:30 UTC (permalink / raw)
To: Harold Huang; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/11/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/2de6a2e6269d3b04ff4e6cfd1d6b1bae3cb3b739
Thanks.
Luca Boccassi
---
From 2de6a2e6269d3b04ff4e6cfd1d6b1bae3cb3b739 Mon Sep 17 00:00:00 2001
From: Harold Huang <baymaxhuang@gmail.com>
Date: Thu, 3 Mar 2022 10:18:03 +0800
Subject: [PATCH] net/kni: fix config initialization
[ upstream commit dcd398f9466fc42f09e5c725c3188d8c41bd3fbf ]
When kni driver calls eth_kni_start to start device, some fields such as
min_mtu and max_mtu of rte_kni_conf are not initialized. It will cause
kni_ioctl_create create a kni netdevice with a random min_mtu and
max_mtu value. This is unexpected and sometimes we could not change the
kni device mtu with ip link command.
Fixes: ff1e35fb5f83 ("kni: calculate MTU from mbuf size")
Signed-off-by: Harold Huang <baymaxhuang@gmail.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
drivers/net/kni/rte_eth_kni.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c
index 5d8fb1451a..5e8d0b722e 100644
--- a/drivers/net/kni/rte_eth_kni.c
+++ b/drivers/net/kni/rte_eth_kni.c
@@ -124,7 +124,7 @@ eth_kni_start(struct rte_eth_dev *dev)
struct pmd_internals *internals = dev->data->dev_private;
uint16_t port_id = dev->data->port_id;
struct rte_mempool *mb_pool;
- struct rte_kni_conf conf;
+ struct rte_kni_conf conf = {{0}};
const char *name = dev->device->name + 4; /* remove net_ */
mb_pool = internals->rx_queues[0].mb_pool;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-09 16:30:09.059491129 +0000
+++ 0014-net-kni-fix-config-initialization.patch 2022-03-09 16:30:08.523024617 +0000
@@ -1 +1 @@
-From dcd398f9466fc42f09e5c725c3188d8c41bd3fbf Mon Sep 17 00:00:00 2001
+From 2de6a2e6269d3b04ff4e6cfd1d6b1bae3cb3b739 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit dcd398f9466fc42f09e5c725c3188d8c41bd3fbf ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index c428caf441..0532de5315 100644
+index 5d8fb1451a..5e8d0b722e 100644
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'doc: fix typos and punctuation in flow API guide' has been queued to stable release 20.11.5
2022-03-09 16:30 ` patch 'app/compress-perf: fix cycle count operations allocation' " luca.boccassi
` (12 preceding siblings ...)
2022-03-09 16:30 ` patch 'net/kni: fix config initialization' " luca.boccassi
@ 2022-03-09 16:30 ` luca.boccassi
2022-03-09 16:30 ` patch 'net/mlx5: fix GRE item translation in Verbs' " luca.boccassi
` (20 subsequent siblings)
34 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-09 16:30 UTC (permalink / raw)
To: Ali Alnubani; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/11/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/ed3f7dd2f60a959baefbabffb687a9b92af804c2
Thanks.
Luca Boccassi
---
From ed3f7dd2f60a959baefbabffb687a9b92af804c2 Mon Sep 17 00:00:00 2001
From: Ali Alnubani <alialnu@nvidia.com>
Date: Tue, 1 Mar 2022 14:17:09 +0200
Subject: [PATCH] doc: fix typos and punctuation in flow API guide
[ upstream commit 00373909c8f0377f03969eabf530293a7af9e23f ]
This fixes typos and punctuation in the rte flow API guide.
Fixes: 2f82d143fb31 ("ethdev: add group jump action")
Fixes: 4d73b6fb9907 ("doc: add generic flow API guide")
Signed-off-by: Ali Alnubani <alialnu@nvidia.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
doc/guides/prog_guide/rte_flow.rst | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst
index b182d310f0..10e6d06853 100644
--- a/doc/guides/prog_guide/rte_flow.rst
+++ b/doc/guides/prog_guide/rte_flow.rst
@@ -65,12 +65,12 @@ Flow rules can also be grouped, the flow rule priority is specific to the
group they belong to. All flow rules in a given group are thus processed within
the context of that group. Groups are not linked by default, so the logical
hierarchy of groups must be explicitly defined by flow rules themselves in each
-group using the JUMP action to define the next group to redirect too. Only flow
-rules defined in the default group 0 are guarantee to be matched against, this
+group using the JUMP action to define the next group to redirect to. Only flow
+rules defined in the default group 0 are guaranteed to be matched against. This
makes group 0 the origin of any group hierarchy defined by an application.
Support for multiple actions per rule may be implemented internally on top
-of non-default hardware priorities, as a result both features may not be
+of non-default hardware priorities. As a result, both features may not be
simultaneously available to applications.
Considering that allowed pattern/actions combinations cannot be known in
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-09 16:30:09.092227897 +0000
+++ 0015-doc-fix-typos-and-punctuation-in-flow-API-guide.patch 2022-03-09 16:30:08.527024706 +0000
@@ -1 +1 @@
-From 00373909c8f0377f03969eabf530293a7af9e23f Mon Sep 17 00:00:00 2001
+From ed3f7dd2f60a959baefbabffb687a9b92af804c2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 00373909c8f0377f03969eabf530293a7af9e23f ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index f2deef95d8..588914b231 100644
+index b182d310f0..10e6d06853 100644
@@ -22 +23 @@
-@@ -60,12 +60,12 @@ Flow rules can also be grouped, the flow rule priority is specific to the
+@@ -65,12 +65,12 @@ Flow rules can also be grouped, the flow rule priority is specific to the
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/mlx5: fix GRE item translation in Verbs' has been queued to stable release 20.11.5
2022-03-09 16:30 ` patch 'app/compress-perf: fix cycle count operations allocation' " luca.boccassi
` (13 preceding siblings ...)
2022-03-09 16:30 ` patch 'doc: fix typos and punctuation in flow API guide' " luca.boccassi
@ 2022-03-09 16:30 ` luca.boccassi
2022-03-09 16:30 ` patch 'net/mlx5: fix matcher priority with ICMP or ICMPv6' " luca.boccassi
` (19 subsequent siblings)
34 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-09 16:30 UTC (permalink / raw)
To: Gregory Etelson; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/11/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/8de9d40b7c9057f2c3bf89e287bc55333baa09f5
Thanks.
Luca Boccassi
---
From 8de9d40b7c9057f2c3bf89e287bc55333baa09f5 Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Mon, 28 Feb 2022 11:53:01 +0200
Subject: [PATCH] net/mlx5: fix GRE item translation in Verbs
[ upstream commit df4986559f24fbf669aeaa33e5e23563f7fc90b3 ]
GRE item translation must set inner protocol value.
For that reason the item is not translated inplace when PMD
translation iterates over flow items, but moved after the loop, when
all inner types are discovered.
If PMD does not translate GRE flow item inside the translation loop
it must save the GRE item for access outside the loop.
Fixes: 985b479267aa ("net/mlx5: fix GRE protocol type translation for Verbs")
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/mlx5_flow_verbs.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c b/drivers/net/mlx5/mlx5_flow_verbs.c
index fa7ba129fd..a0c6d23c6a 100644
--- a/drivers/net/mlx5/mlx5_flow_verbs.c
+++ b/drivers/net/mlx5/mlx5_flow_verbs.c
@@ -1722,6 +1722,7 @@ flow_verbs_translate(struct rte_eth_dev *dev,
struct mlx5_priv *priv = dev->data->dev_private;
struct mlx5_flow_workspace *wks = mlx5_flow_get_thread_workspace();
struct mlx5_flow_rss_desc *rss_desc;
+ const struct rte_flow_item *tunnel_item = NULL;
MLX5_ASSERT(wks);
rss_desc = &wks->rss_desc;
@@ -1861,6 +1862,7 @@ flow_verbs_translate(struct rte_eth_dev *dev,
case RTE_FLOW_ITEM_TYPE_GRE:
subpriority = MLX5_TUNNEL_PRIO_GET(rss_desc);
item_flags |= MLX5_FLOW_LAYER_GRE;
+ tunnel_item = items;
break;
case RTE_FLOW_ITEM_TYPE_MPLS:
flow_verbs_translate_item_mpls(dev_flow, items,
@@ -1875,7 +1877,8 @@ 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);
+ flow_verbs_translate_item_gre(dev_flow, tunnel_item,
+ item_flags);
dev_flow->handle->layers = item_flags;
/* Other members of attr will be ignored. */
dev_flow->verbs.attr.priority =
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-09 16:30:09.127587012 +0000
+++ 0016-net-mlx5-fix-GRE-item-translation-in-Verbs.patch 2022-03-09 16:30:08.527024706 +0000
@@ -1 +1 @@
-From df4986559f24fbf669aeaa33e5e23563f7fc90b3 Mon Sep 17 00:00:00 2001
+From 8de9d40b7c9057f2c3bf89e287bc55333baa09f5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit df4986559f24fbf669aeaa33e5e23563f7fc90b3 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index f08aa7a770..85f0788222 100644
+index fa7ba129fd..a0c6d23c6a 100644
@@ -27 +28 @@
-@@ -1679,6 +1679,7 @@ flow_verbs_translate(struct rte_eth_dev *dev,
+@@ -1722,6 +1722,7 @@ flow_verbs_translate(struct rte_eth_dev *dev,
@@ -35 +36 @@
-@@ -1818,6 +1819,7 @@ flow_verbs_translate(struct rte_eth_dev *dev,
+@@ -1861,6 +1862,7 @@ flow_verbs_translate(struct rte_eth_dev *dev,
@@ -43 +44 @@
-@@ -1832,7 +1834,8 @@ flow_verbs_translate(struct rte_eth_dev *dev,
+@@ -1875,7 +1877,8 @@ flow_verbs_translate(struct rte_eth_dev *dev,
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/mlx5: fix matcher priority with ICMP or ICMPv6' has been queued to stable release 20.11.5
2022-03-09 16:30 ` patch 'app/compress-perf: fix cycle count operations allocation' " luca.boccassi
` (14 preceding siblings ...)
2022-03-09 16:30 ` patch 'net/mlx5: fix GRE item translation in Verbs' " luca.boccassi
@ 2022-03-09 16:30 ` luca.boccassi
2022-03-09 16:30 ` patch 'net/ice: fix Tx offload path choice' " luca.boccassi
` (18 subsequent siblings)
34 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-09 16:30 UTC (permalink / raw)
To: Bing Zhao; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/11/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/ebf7ca8c7ea7246dd4f14c98dc4505902cd550b7
Thanks.
Luca Boccassi
---
From ebf7ca8c7ea7246dd4f14c98dc4505902cd550b7 Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@nvidia.com>
Date: Mon, 28 Feb 2022 13:41:49 +0200
Subject: [PATCH] net/mlx5: fix matcher priority with ICMP or ICMPv6
[ upstream commit dfb8c448daaf29a10d6249fc045bd2eef9655684 ]
On TCP/IP-based layered network, ICMP is considered and implemented
as part of layer 3 IP protocol. Actually, it is a user of the IP
protocol and must be encapsulated within IP packets. There is no
layer 4 protocol over ICMP.
The rule with layer 4 should be matched prior to the rule only with
layer 3 pattern when:
1. Both rules are created in the same table
2. Both rules could be hit
3. The rules has the same priority
The steering result of the packet is indeterministic if there are
rules with patterns IP and IP+ICMP in the same table with the same
priority. Like TCP / UDP, a packet should hit the rule with a longer
matching criterion.
By treating the priority of ICMP/ICMPv6 as a layer 4 priority in the
PMD internally, the IP+ICMP will be hit in prior to IP only.
Fixes: d53aa89aea91 ("net/mlx5: support matching on ICMP/ICMP6")
Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 35c87e1fc5..e2dc48f471 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -10601,11 +10601,13 @@ flow_dv_translate(struct rte_eth_dev *dev,
case RTE_FLOW_ITEM_TYPE_ICMP:
flow_dv_translate_item_icmp(match_mask, match_value,
items, tunnel);
+ matcher.priority = MLX5_PRIORITY_MAP_L4;
last_item = MLX5_FLOW_LAYER_ICMP;
break;
case RTE_FLOW_ITEM_TYPE_ICMP6:
flow_dv_translate_item_icmp6(match_mask, match_value,
items, tunnel);
+ matcher.priority = MLX5_PRIORITY_MAP_L4;
last_item = MLX5_FLOW_LAYER_ICMP6;
break;
case RTE_FLOW_ITEM_TYPE_TAG:
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-09 16:30:09.161620896 +0000
+++ 0017-net-mlx5-fix-matcher-priority-with-ICMP-or-ICMPv6.patch 2022-03-09 16:30:08.543025064 +0000
@@ -1 +1 @@
-From dfb8c448daaf29a10d6249fc045bd2eef9655684 Mon Sep 17 00:00:00 2001
+From ebf7ca8c7ea7246dd4f14c98dc4505902cd550b7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit dfb8c448daaf29a10d6249fc045bd2eef9655684 ]
+
@@ -26 +27,0 @@
-Cc: stable@dpdk.org
@@ -35 +36 @@
-index c4a9b022b7..7a7591144a 100644
+index 35c87e1fc5..e2dc48f471 100644
@@ -38 +39 @@
-@@ -13675,11 +13675,13 @@ flow_dv_translate(struct rte_eth_dev *dev,
+@@ -10601,11 +10601,13 @@ flow_dv_translate(struct rte_eth_dev *dev,
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/ice: fix Tx offload path choice' has been queued to stable release 20.11.5
2022-03-09 16:30 ` patch 'app/compress-perf: fix cycle count operations allocation' " luca.boccassi
` (15 preceding siblings ...)
2022-03-09 16:30 ` patch 'net/mlx5: fix matcher priority with ICMP or ICMPv6' " luca.boccassi
@ 2022-03-09 16:30 ` luca.boccassi
2022-03-09 16:30 ` patch 'examples/vhost: fix launch with physical port' " luca.boccassi
` (17 subsequent siblings)
34 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-09 16:30 UTC (permalink / raw)
To: Kevin Liu; +Cc: Ting Xu, Qi Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/11/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/0b46c9cad7db070e720e3319d0329a6597be4401
Thanks.
Luca Boccassi
---
From 0b46c9cad7db070e720e3319d0329a6597be4401 Mon Sep 17 00:00:00 2001
From: Kevin Liu <kevinx.liu@intel.com>
Date: Wed, 29 Dec 2021 09:37:01 +0000
Subject: [PATCH] net/ice: fix Tx offload path choice
[ upstream commit d852fec1be63126bb2c16be187340eb89a3d8a32 ]
Testpmd forwards packets in checksum mode that it needs to calculate
the checksum of each layer's protocol.
When setting the hardware calculates the outer UDP checksum and the
software calculates the outer IP checksum, the dev->tx_pkt_burst in
ice_set_tx_function is set to ice_xmit_pkts_vec_avx2.
The inner and outer UDP checksum of the tunnel packet after forwarding
is wrong.The dev->tx_pkt_burst should be set to ice_xmit_pkts.
The patch adds RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM to
ICE_TX_NO_VECTOR_FLAGS, set dev->tx_pkt_burst to ice_xmit_pkts. After
the tunnel packet is forwarded, the inner and outer UDP checksum is
correct.
At the same time, the patch of "net/ice: fix Tx Checksum offload" will
cause interrupt errors in a special case that only inner IP and inner
UDP checksum are set for hardware calculation. The patch is updating
ICE_TX_NO_VECTOR_FLAGS, the problem can be solved, so I will restore the
code modification of that patch.
Fixes: 28f9002ab67f ("net/ice: add Tx AVX512 offload path")
Fixes: 295968d17407 ("ethdev: add namespace")
Fixes: 17c7d0f9d6a4 ("net/ice: support basic Rx/Tx")
Signed-off-by: Kevin Liu <kevinx.liu@intel.com>
Acked-by: Ting Xu <ting.xu@intel.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/ice/ice_rxtx.c | 41 +++++++++++---------------------------
1 file changed, 12 insertions(+), 29 deletions(-)
diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index 97cbeb2cf5..edd21f0401 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -2354,35 +2354,18 @@ ice_txd_enable_checksum(uint64_t ol_flags,
<< ICE_TX_DESC_LEN_MACLEN_S;
/* Enable L3 checksum offloads */
- /*Tunnel package usage outer len enable L3 checksum offload*/
- if (ol_flags & PKT_TX_TUNNEL_MASK) {
- if (ol_flags & PKT_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 & PKT_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 & PKT_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 & PKT_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 & PKT_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 & PKT_TX_IPV6) {
- *td_cmd |= ICE_TX_DESC_CMD_IIPT_IPV6;
- *td_offset |= (tx_offload.l3_len >> 2) <<
- ICE_TX_DESC_LEN_IPLEN_S;
- }
+ if (ol_flags & PKT_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 & PKT_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 & PKT_TX_IPV6) {
+ *td_cmd |= ICE_TX_DESC_CMD_IIPT_IPV6;
+ *td_offset |= (tx_offload.l3_len >> 2) <<
+ ICE_TX_DESC_LEN_IPLEN_S;
}
if (ol_flags & PKT_TX_TCP_SEG) {
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-09 16:30:09.208483171 +0000
+++ 0018-net-ice-fix-Tx-offload-path-choice.patch 2022-03-09 16:30:08.543025064 +0000
@@ -1 +1 @@
-From d852fec1be63126bb2c16be187340eb89a3d8a32 Mon Sep 17 00:00:00 2001
+From 0b46c9cad7db070e720e3319d0329a6597be4401 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d852fec1be63126bb2c16be187340eb89a3d8a32 ]
+
@@ -29 +30,0 @@
-Cc: stable@dpdk.org
@@ -35,3 +36,2 @@
- drivers/net/ice/ice_rxtx.c | 41 ++++++-------------
- drivers/net/ice/ice_rxtx_vec_common.h | 57 +++++++++------------------
- 2 files changed, 30 insertions(+), 68 deletions(-)
+ drivers/net/ice/ice_rxtx.c | 41 +++++++++++---------------------------
+ 1 file changed, 12 insertions(+), 29 deletions(-)
@@ -40 +40 @@
-index 4f218bcd0d..041f4bc91f 100644
+index 97cbeb2cf5..edd21f0401 100644
@@ -43 +43 @@
-@@ -2501,35 +2501,18 @@ ice_txd_enable_checksum(uint64_t ol_flags,
+@@ -2354,35 +2354,18 @@ ice_txd_enable_checksum(uint64_t ol_flags,
@@ -48,2 +48,2 @@
-- if (ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK) {
-- if (ol_flags & RTE_MBUF_F_TX_IP_CKSUM) {
+- if (ol_flags & PKT_TX_TUNNEL_MASK) {
+- if (ol_flags & PKT_TX_IP_CKSUM) {
@@ -53 +53 @@
-- } else if (ol_flags & RTE_MBUF_F_TX_IPV4) {
+- } else if (ol_flags & PKT_TX_IPV4) {
@@ -57 +57 @@
-- } else if (ol_flags & RTE_MBUF_F_TX_IPV6) {
+- } else if (ol_flags & PKT_TX_IPV6) {
@@ -63 +63 @@
-- if (ol_flags & RTE_MBUF_F_TX_IP_CKSUM) {
+- if (ol_flags & PKT_TX_IP_CKSUM) {
@@ -67 +67 @@
-- } else if (ol_flags & RTE_MBUF_F_TX_IPV4) {
+- } else if (ol_flags & PKT_TX_IPV4) {
@@ -71 +71 @@
-- } else if (ol_flags & RTE_MBUF_F_TX_IPV6) {
+- } else if (ol_flags & PKT_TX_IPV6) {
@@ -76 +76 @@
-+ if (ol_flags & RTE_MBUF_F_TX_IP_CKSUM) {
++ if (ol_flags & PKT_TX_IP_CKSUM) {
@@ -80 +80 @@
-+ } else if (ol_flags & RTE_MBUF_F_TX_IPV4) {
++ } else if (ol_flags & PKT_TX_IPV4) {
@@ -84 +84 @@
-+ } else if (ol_flags & RTE_MBUF_F_TX_IPV6) {
++ } else if (ol_flags & PKT_TX_IPV6) {
@@ -90,77 +90 @@
- if (ol_flags & RTE_MBUF_F_TX_TCP_SEG) {
-diff --git a/drivers/net/ice/ice_rxtx_vec_common.h b/drivers/net/ice/ice_rxtx_vec_common.h
-index 8ff01046e1..2dd2d83650 100644
---- a/drivers/net/ice/ice_rxtx_vec_common.h
-+++ b/drivers/net/ice/ice_rxtx_vec_common.h
-@@ -250,7 +250,8 @@ ice_rxq_vec_setup_default(struct ice_rx_queue *rxq)
- #define ICE_TX_NO_VECTOR_FLAGS ( \
- RTE_ETH_TX_OFFLOAD_MULTI_SEGS | \
- RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM | \
-- RTE_ETH_TX_OFFLOAD_TCP_TSO)
-+ RTE_ETH_TX_OFFLOAD_TCP_TSO | \
-+ RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM)
-
- #define ICE_TX_VECTOR_OFFLOAD ( \
- RTE_ETH_TX_OFFLOAD_VLAN_INSERT | \
-@@ -364,45 +365,23 @@ ice_txd_enable_offload(struct rte_mbuf *tx_pkt,
- uint32_t td_offset = 0;
-
- /* Tx Checksum Offload */
-- /*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;
-+ /* 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->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;
-- }
-+ /* 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 L4 checksum offloads */
+ if (ol_flags & PKT_TX_TCP_SEG) {
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'examples/vhost: fix launch with physical port' has been queued to stable release 20.11.5
2022-03-09 16:30 ` patch 'app/compress-perf: fix cycle count operations allocation' " luca.boccassi
` (16 preceding siblings ...)
2022-03-09 16:30 ` patch 'net/ice: fix Tx offload path choice' " luca.boccassi
@ 2022-03-09 16:30 ` luca.boccassi
2022-03-09 16:30 ` patch 'raw/ifpga: fix variable initialization in probing' " luca.boccassi
` (16 subsequent siblings)
34 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-09 16:30 UTC (permalink / raw)
To: Wenwu Ma; +Cc: Chenbo Xia, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/11/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/80b49318e6d4100cee8f9be4f6d0385f079f5ad2
Thanks.
Luca Boccassi
---
From 80b49318e6d4100cee8f9be4f6d0385f079f5ad2 Mon Sep 17 00:00:00 2001
From: Wenwu Ma <wenwux.ma@intel.com>
Date: Fri, 4 Mar 2022 16:24:24 +0000
Subject: [PATCH] examples/vhost: fix launch with physical port
[ upstream commit 917229c24e871bbc3225a0227eb3f0faaa7aaa69 ]
dpdk-vhost will fail to launch with a 40G i40e port because
there are not enough mbufs. This patch adds a new option
--total-num-mbufs, through which the user can set larger
mbuf pool to avoid this problem.
Fixes: 4796ad63ba1f ("examples/vhost: import userspace vhost application")
Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
examples/vhost/main.c | 83 +++++++++++++++----------------------------
1 file changed, 28 insertions(+), 55 deletions(-)
diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index e05a270a2d..fc07b31b2e 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -33,6 +33,8 @@
#define MAX_QUEUES 128
#endif
+#define NUM_MBUFS_DEFAULT 0x24000
+
/* the maximum number of external ports supported */
#define MAX_SUP_PORTS 1
@@ -60,6 +62,9 @@
/* Maximum long option length for option parsing. */
#define MAX_LONG_OPT_SZ 64
+/* number of mbufs in all pools - if specified on command-line. */
+static int total_num_mbufs = NUM_MBUFS_DEFAULT;
+
/* mask of enabled ports */
static uint32_t enabled_port_mask = 0;
@@ -463,7 +468,8 @@ us_vhost_usage(const char *prgname)
" --tso [0|1] disable/enable TCP segment offload.\n"
" --client register a vhost-user socket as client mode.\n"
" --dma-type register dma type for your vhost async driver. For example \"ioat\" for now.\n"
- " --dmas register dma channel for specific vhost device.\n",
+ " --dmas register dma channel for specific vhost device.\n"
+ " --total-num-mbufs [0-N] set the number of mbufs to be allocated in mbuf pools, the default value is 147456.\n",
prgname);
}
@@ -491,7 +497,7 @@ us_vhost_parse_args(int argc, char **argv)
{"builtin-net-driver", no_argument, &builtin_net_driver, 1},
{"dma-type", required_argument, NULL, 0},
{"dmas", required_argument, NULL, 0},
- {NULL, 0, 0, 0},
+ {"total-num-mbufs", required_argument, NULL, 0},
};
/* Parse command line */
@@ -655,6 +661,21 @@ us_vhost_parse_args(int argc, char **argv)
async_vhost_driver = 1;
}
+
+ if (!strncmp(long_option[option_index].name,
+ "total-num-mbufs", MAX_LONG_OPT_SZ)) {
+ ret = parse_num_opt(optarg, INT32_MAX);
+ if (ret == -1) {
+ RTE_LOG(INFO, VHOST_CONFIG,
+ "Invalid argument for total-num-mbufs [0..N]\n");
+ us_vhost_usage(prgname);
+ return -1;
+ }
+
+ if (total_num_mbufs < ret)
+ total_num_mbufs = ret;
+ }
+
break;
/* Invalid option - print options. */
@@ -1443,57 +1464,6 @@ sigint_handler(__rte_unused int signum)
exit(0);
}
-/*
- * While creating an mbuf pool, one key thing is to figure out how
- * many mbuf entries is enough for our use. FYI, here are some
- * guidelines:
- *
- * - Each rx queue would reserve @nr_rx_desc mbufs at queue setup stage
- *
- * - For each switch core (A CPU core does the packet switch), we need
- * also make some reservation for receiving the packets from virtio
- * Tx queue. How many is enough depends on the usage. It's normally
- * a simple calculation like following:
- *
- * MAX_PKT_BURST * max packet size / mbuf size
- *
- * So, we definitely need allocate more mbufs when TSO is enabled.
- *
- * - Similarly, for each switching core, we should serve @nr_rx_desc
- * mbufs for receiving the packets from physical NIC device.
- *
- * - We also need make sure, for each switch core, we have allocated
- * enough mbufs to fill up the mbuf cache.
- */
-static void
-create_mbuf_pool(uint16_t nr_port, uint32_t nr_switch_core, uint32_t mbuf_size,
- uint32_t nr_queues, uint32_t nr_rx_desc, uint32_t nr_mbuf_cache)
-{
- uint32_t nr_mbufs;
- uint32_t nr_mbufs_per_core;
- uint32_t mtu = 1500;
-
- if (mergeable)
- mtu = 9000;
- if (enable_tso)
- mtu = 64 * 1024;
-
- nr_mbufs_per_core = (mtu + mbuf_size) * MAX_PKT_BURST /
- (mbuf_size - RTE_PKTMBUF_HEADROOM);
- nr_mbufs_per_core += nr_rx_desc;
- nr_mbufs_per_core = RTE_MAX(nr_mbufs_per_core, nr_mbuf_cache);
-
- nr_mbufs = nr_queues * nr_rx_desc;
- nr_mbufs += nr_mbufs_per_core * nr_switch_core;
- nr_mbufs *= nr_port;
-
- mbuf_pool = rte_pktmbuf_pool_create("MBUF_POOL", nr_mbufs,
- nr_mbuf_cache, 0, mbuf_size,
- rte_socket_id());
- if (mbuf_pool == NULL)
- rte_exit(EXIT_FAILURE, "Cannot create mbuf pool\n");
-}
-
/*
* Main function, does initialisation and calls the per-lcore functions.
*/
@@ -1552,8 +1522,11 @@ main(int argc, char *argv[])
* many queues here. We probably should only do allocation for
* those queues we are going to use.
*/
- create_mbuf_pool(valid_num_ports, rte_lcore_count() - 1, MBUF_DATA_SIZE,
- MAX_QUEUES, RTE_TEST_RX_DESC_DEFAULT, MBUF_CACHE_SIZE);
+ mbuf_pool = rte_pktmbuf_pool_create("MBUF_POOL", total_num_mbufs,
+ MBUF_CACHE_SIZE, 0, MBUF_DATA_SIZE,
+ rte_socket_id());
+ if (mbuf_pool == NULL)
+ rte_exit(EXIT_FAILURE, "Cannot create mbuf pool\n");
if (vm2vm_mode == VM2VM_HARDWARE) {
/* Enable VT loop back to let L2 switch to do it. */
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-09 16:30:09.245866424 +0000
+++ 0019-examples-vhost-fix-launch-with-physical-port.patch 2022-03-09 16:30:08.547025154 +0000
@@ -1 +1 @@
-From 917229c24e871bbc3225a0227eb3f0faaa7aaa69 Mon Sep 17 00:00:00 2001
+From 80b49318e6d4100cee8f9be4f6d0385f079f5ad2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 917229c24e871bbc3225a0227eb3f0faaa7aaa69 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
- 1 file changed, 29 insertions(+), 54 deletions(-)
+ 1 file changed, 28 insertions(+), 55 deletions(-)
@@ -21 +22 @@
-index 68afd398bb..d94fabb060 100644
+index e05a270a2d..fc07b31b2e 100644
@@ -33,3 +34,3 @@
-@@ -61,6 +63,9 @@
-
- #define DMA_RING_SIZE 4096
+@@ -60,6 +62,9 @@
+ /* Maximum long option length for option parsing. */
+ #define MAX_LONG_OPT_SZ 64
@@ -40,5 +41,4 @@
- struct dma_for_vhost dma_bind[RTE_MAX_VHOST_DEVICE];
- int16_t dmas_id[RTE_DMADEV_DEFAULT_MAX];
- static int dma_count;
-@@ -608,7 +613,8 @@ us_vhost_usage(const char *prgname)
- " --tx-csum [0|1] disable/enable TX checksum offload.\n"
+ /* mask of enabled ports */
+ static uint32_t enabled_port_mask = 0;
+
+@@ -463,7 +468,8 @@ us_vhost_usage(const char *prgname)
@@ -46,0 +47 @@
+ " --dma-type register dma type for your vhost async driver. For example \"ioat\" for now.\n"
@@ -53,16 +54,6 @@
-@@ -637,6 +643,8 @@ enum {
- OPT_BUILTIN_NET_DRIVER_NUM,
- #define OPT_DMAS "dmas"
- OPT_DMAS_NUM,
-+#define OPT_NUM_MBUFS "total-num-mbufs"
-+ OPT_NUM_MBUFS_NUM,
- };
-
- /*
-@@ -674,6 +682,8 @@ us_vhost_parse_args(int argc, char **argv)
- NULL, OPT_BUILTIN_NET_DRIVER_NUM},
- {OPT_DMAS, required_argument,
- NULL, OPT_DMAS_NUM},
-+ {OPT_NUM_MBUFS, required_argument,
-+ NULL, OPT_NUM_MBUFS_NUM},
- {NULL, 0, 0, 0},
+@@ -491,7 +497,7 @@ us_vhost_parse_args(int argc, char **argv)
+ {"builtin-net-driver", no_argument, &builtin_net_driver, 1},
+ {"dma-type", required_argument, NULL, 0},
+ {"dmas", required_argument, NULL, 0},
+- {NULL, 0, 0, 0},
++ {"total-num-mbufs", required_argument, NULL, 0},
@@ -71 +62,3 @@
-@@ -801,6 +811,19 @@ us_vhost_parse_args(int argc, char **argv)
+ /* Parse command line */
+@@ -655,6 +661,21 @@ us_vhost_parse_args(int argc, char **argv)
+ async_vhost_driver = 1;
@@ -73 +65,0 @@
- break;
@@ -75,8 +66,0 @@
-+ case OPT_NUM_MBUFS_NUM:
-+ ret = parse_num_opt(optarg, INT32_MAX);
-+ if (ret == -1) {
-+ RTE_LOG(INFO, VHOST_CONFIG,
-+ "Invalid argument for total-num-mbufs [0..N]\n");
-+ us_vhost_usage(prgname);
-+ return -1;
-+ }
@@ -84,3 +68,13 @@
-+ if (total_num_mbufs < ret)
-+ total_num_mbufs = ret;
-+ break;
++ if (!strncmp(long_option[option_index].name,
++ "total-num-mbufs", MAX_LONG_OPT_SZ)) {
++ ret = parse_num_opt(optarg, INT32_MAX);
++ if (ret == -1) {
++ RTE_LOG(INFO, VHOST_CONFIG,
++ "Invalid argument for total-num-mbufs [0..N]\n");
++ us_vhost_usage(prgname);
++ return -1;
++ }
++
++ if (total_num_mbufs < ret)
++ total_num_mbufs = ret;
++ }
@@ -88,2 +81,0 @@
- case OPT_CLIENT_NUM:
- client_mode = 1;
@@ -91 +83,3 @@
-@@ -1730,57 +1753,6 @@ sigint_handler(__rte_unused int signum)
+
+ /* Invalid option - print options. */
+@@ -1443,57 +1464,6 @@ sigint_handler(__rte_unused int signum)
@@ -146,4 +140,4 @@
- static void
- reset_dma(void)
- {
-@@ -1860,8 +1832,11 @@ main(int argc, char *argv[])
+ /*
+ * Main function, does initialisation and calls the per-lcore functions.
+ */
+@@ -1552,8 +1522,11 @@ main(int argc, char *argv[])
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'raw/ifpga: fix variable initialization in probing' has been queued to stable release 20.11.5
2022-03-09 16:30 ` patch 'app/compress-perf: fix cycle count operations allocation' " luca.boccassi
` (17 preceding siblings ...)
2022-03-09 16:30 ` patch 'examples/vhost: fix launch with physical port' " luca.boccassi
@ 2022-03-09 16:30 ` luca.boccassi
2022-03-09 16:30 ` patch 'raw/ifpga: fix monitor thread' " luca.boccassi
` (15 subsequent siblings)
34 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-09 16:30 UTC (permalink / raw)
To: Wei Huang; +Cc: Tianfei Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/11/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/c22979908f7350a0072d088ca94b397f4f922eb1
Thanks.
Luca Boccassi
---
From c22979908f7350a0072d088ca94b397f4f922eb1 Mon Sep 17 00:00:00 2001
From: Wei Huang <wei.huang@intel.com>
Date: Mon, 21 Feb 2022 02:52:22 -0500
Subject: [PATCH] raw/ifpga: fix variable initialization in probing
[ upstream commit aae56ac43bcb6b605df8435be2ff6f07788fb1cf ]
Scalar variable sub_brg_bdf may be used uninitialized in function
ifpga_rawdev_fill_info(). It is initialized now in this fix.
Coverity issue: 375805
Fixes: 9c006c45d0c5 ("raw/ifpga: scan PCIe BDF device tree")
Signed-off-by: Wei Huang <wei.huang@intel.com>
Acked-by: Tianfei Zhang <tianfei.zhang@intel.com>
---
drivers/raw/ifpga/ifpga_rawdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c
index d421d14d68..decf183a0b 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.c
+++ b/drivers/raw/ifpga/ifpga_rawdev.c
@@ -216,7 +216,7 @@ static int ifpga_rawdev_fill_info(struct ifpga_rawdev *ifpga_dev,
char dir[1024] = "/sys/devices/";
char *c;
int ret;
- char sub_brg_bdf[4][16];
+ char sub_brg_bdf[4][16] = {{0}};
int point;
DIR *dp = NULL;
struct dirent *entry;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-09 16:30:09.277935809 +0000
+++ 0020-raw-ifpga-fix-variable-initialization-in-probing.patch 2022-03-09 16:30:08.547025154 +0000
@@ -1 +1 @@
-From aae56ac43bcb6b605df8435be2ff6f07788fb1cf Mon Sep 17 00:00:00 2001
+From c22979908f7350a0072d088ca94b397f4f922eb1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit aae56ac43bcb6b605df8435be2ff6f07788fb1cf ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index b73512d3ad..6beecb710a 100644
+index d421d14d68..decf183a0b 100644
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'raw/ifpga: fix monitor thread' has been queued to stable release 20.11.5
2022-03-09 16:30 ` patch 'app/compress-perf: fix cycle count operations allocation' " luca.boccassi
` (18 preceding siblings ...)
2022-03-09 16:30 ` patch 'raw/ifpga: fix variable initialization in probing' " luca.boccassi
@ 2022-03-09 16:30 ` luca.boccassi
2022-03-09 16:30 ` patch 'app/pdump: abort on multi-core capture limit' " luca.boccassi
` (14 subsequent siblings)
34 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-09 16:30 UTC (permalink / raw)
To: Wei Huang; +Cc: Tianfei Zhang, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/11/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/4297b2d419135300f90ce52328d384de484c9d67
Thanks.
Luca Boccassi
---
From 4297b2d419135300f90ce52328d384de484c9d67 Mon Sep 17 00:00:00 2001
From: Wei Huang <wei.huang@intel.com>
Date: Tue, 1 Mar 2022 03:47:03 -0500
Subject: [PATCH] raw/ifpga: fix monitor thread
[ upstream commit 2479a1e9a8886c93ba4c8a7aa2a35a04302f1aae ]
Monitor thread handles graceful shutdown according to the value of
specific sensors in device, two issues are found below.
1. Thread is not created when card is probed.
2. Thread is canceled without checking presence of other cards.
To fix them, thread is created in pci device probe function, a reference
count is checked before canceling the thread.
Fixes: 9c006c45 ("raw/ifpga: scan PCIe BDF device tree")
Signed-off-by: Wei Huang <wei.huang@intel.com>
Acked-by: Tianfei Zhang <tianfei.zhang@intel.com>
---
drivers/raw/ifpga/ifpga_rawdev.c | 62 +++++++++++++++++++++-----------
drivers/raw/ifpga/ifpga_rawdev.h | 2 ++
2 files changed, 43 insertions(+), 21 deletions(-)
diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c
index decf183a0b..fb37313784 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.c
+++ b/drivers/raw/ifpga/ifpga_rawdev.c
@@ -68,7 +68,7 @@ static const struct rte_pci_id pci_ifpga_map[] = {
static struct ifpga_rawdev ifpga_rawdevices[IFPGA_RAWDEV_NUM];
-static int ifpga_monitor_start;
+static int ifpga_monitor_refcnt;
static pthread_t ifpga_monitor_start_thread;
#define IFPGA_MAX_IRQ 12
@@ -134,6 +134,7 @@ ifpga_rawdev_allocate(struct rte_rawdev *rawdev)
dev = &ifpga_rawdevices[dev_id];
dev->rawdev = rawdev;
dev->dev_id = dev_id;
+ dev->poll_enabled = 0;
return dev;
}
@@ -208,10 +209,11 @@ static int ifpga_get_dev_vendor_id(const char *bdf,
return 0;
}
-static int ifpga_rawdev_fill_info(struct ifpga_rawdev *ifpga_dev,
- const char *bdf)
+
+static int ifpga_rawdev_fill_info(struct ifpga_rawdev *ifpga_dev)
{
- char path[1024] = "/sys/bus/pci/devices/0000:";
+ struct opae_adapter *adapter = NULL;
+ char path[1024] = "/sys/bus/pci/devices/";
char link[1024], link1[1024];
char dir[1024] = "/sys/devices/";
char *c;
@@ -226,7 +228,11 @@ static int ifpga_rawdev_fill_info(struct ifpga_rawdev *ifpga_dev,
int func;
uint32_t dev_id, vendor_id;
- strlcat(path, bdf, sizeof(path));
+ adapter = ifpga_dev ? ifpga_rawdev_get_priv(ifpga_dev->rawdev) : NULL;
+ if (!adapter)
+ return -ENODEV;
+
+ strlcat(path, adapter->name, sizeof(path));
memset(link, 0, sizeof(link));
memset(link1, 0, sizeof(link1));
ret = readlink(path, link, (sizeof(link)-1));
@@ -376,7 +382,7 @@ ifpga_monitor_sensor(struct rte_rawdev *raw_dev,
/* monitor temperature sensors */
if (!strcmp(sensor->name, "Board Temperature") ||
!strcmp(sensor->name, "FPGA Die Temperature")) {
- IFPGA_RAWDEV_PMD_INFO("read sensor %s %d %d %d\n",
+ IFPGA_RAWDEV_PMD_DEBUG("read sensor %s %d %d %d\n",
sensor->name, value, sensor->high_warn,
sensor->high_fatal);
@@ -418,7 +424,7 @@ static int set_surprise_link_check_aer(
bool enable = 0;
uint32_t aer_new0, aer_new1;
- if (!ifpga_rdev) {
+ if (!ifpga_rdev || !ifpga_rdev->rawdev) {
printf("\n device does not exist\n");
return -EFAULT;
}
@@ -497,11 +503,11 @@ ifpga_rawdev_gsd_handle(__rte_unused void *param)
int gsd_enable, ret;
#define MS 1000
- while (__atomic_load_n(&ifpga_monitor_start, __ATOMIC_RELAXED)) {
+ while (__atomic_load_n(&ifpga_monitor_refcnt, __ATOMIC_RELAXED)) {
gsd_enable = 0;
for (i = 0; i < IFPGA_RAWDEV_NUM; i++) {
ifpga_rdev = &ifpga_rawdevices[i];
- if (ifpga_rdev->rawdev) {
+ if (ifpga_rdev->poll_enabled) {
ret = set_surprise_link_check_aer(ifpga_rdev,
gsd_enable);
if (ret == 1 && !gsd_enable) {
@@ -521,32 +527,46 @@ ifpga_rawdev_gsd_handle(__rte_unused void *param)
}
static int
-ifpga_monitor_start_func(void)
+ifpga_monitor_start_func(struct ifpga_rawdev *dev)
{
int ret;
- if (!__atomic_load_n(&ifpga_monitor_start, __ATOMIC_RELAXED)) {
+ if (!dev)
+ return -ENODEV;
+
+ ret = ifpga_rawdev_fill_info(dev);
+ if (ret)
+ return ret;
+
+ dev->poll_enabled = 1;
+
+ if (!__atomic_fetch_add(&ifpga_monitor_refcnt, 1, __ATOMIC_RELAXED)) {
ret = pthread_create(&ifpga_monitor_start_thread,
NULL,
ifpga_rawdev_gsd_handle, NULL);
if (ret) {
+ ifpga_monitor_start_thread = 0;
IFPGA_RAWDEV_PMD_ERR(
"Fail to create ifpga monitor thread");
return -1;
}
- __atomic_store_n(&ifpga_monitor_start, 1, __ATOMIC_RELAXED);
}
return 0;
}
+
static int
-ifpga_monitor_stop_func(void)
+ifpga_monitor_stop_func(struct ifpga_rawdev *dev)
{
int ret;
- if (__atomic_load_n(&ifpga_monitor_start, __ATOMIC_RELAXED)) {
- __atomic_store_n(&ifpga_monitor_start, 0, __ATOMIC_RELAXED);
+ if (!dev || !dev->poll_enabled)
+ return 0;
+ dev->poll_enabled = 0;
+
+ if (!__atomic_sub_fetch(&ifpga_monitor_refcnt, 1, __ATOMIC_RELAXED) &&
+ ifpga_monitor_start_thread) {
ret = pthread_cancel(ifpga_monitor_start_thread);
if (ret)
IFPGA_RAWDEV_PMD_ERR("Can't cancel the thread");
@@ -719,6 +739,7 @@ ifpga_rawdev_close(struct rte_rawdev *dev)
struct opae_adapter *adapter;
if (dev) {
+ ifpga_monitor_stop_func(ifpga_rawdev_get(dev));
adapter = ifpga_rawdev_get_priv(dev);
if (adapter) {
opae_adapter_destroy(adapter);
@@ -1522,6 +1543,10 @@ ifpga_rawdev_create(struct rte_pci_device *pci_dev,
if (ret)
goto free_adapter_data;
+ ret = ifpga_monitor_start_func(dev);
+ if (ret)
+ goto free_adapter_data;
+
return ret;
free_adapter_data:
@@ -1597,7 +1622,7 @@ ifpga_rawdev_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
static int
ifpga_rawdev_pci_remove(struct rte_pci_device *pci_dev)
{
- ifpga_monitor_stop_func();
+ IFPGA_RAWDEV_PMD_INFO("remove pci_dev %s", pci_dev->device.name);
return ifpga_rawdev_destroy(pci_dev);
}
@@ -1648,7 +1673,6 @@ ifpga_cfg_probe(struct rte_vdev_device *dev)
struct ifpga_rawdev *ifpga_dev;
int port;
char *name = NULL;
- const char *bdf;
char dev_name[RTE_RAWDEV_NAME_MAX_LEN];
int ret = -1;
@@ -1697,10 +1721,6 @@ ifpga_cfg_probe(struct rte_vdev_device *dev)
ifpga_dev = ifpga_rawdev_get(rawdev);
if (!ifpga_dev)
goto end;
- bdf = name;
- ifpga_rawdev_fill_info(ifpga_dev, bdf);
-
- ifpga_monitor_start_func();
memset(dev_name, 0, sizeof(dev_name));
snprintf(dev_name, RTE_RAWDEV_NAME_MAX_LEN, "%d|%s",
diff --git a/drivers/raw/ifpga/ifpga_rawdev.h b/drivers/raw/ifpga/ifpga_rawdev.h
index 5c3ecd35d6..f082280f9a 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.h
+++ b/drivers/raw/ifpga/ifpga_rawdev.h
@@ -59,6 +59,8 @@ struct ifpga_rawdev {
uint32_t aer_old[2];
char fvl_bdf[8][16];
char parent_bdf[16];
+ /* enable monitor thread poll device's sensors or not */
+ int poll_enabled;
};
struct ifpga_rawdev *
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-09 16:30:09.311744195 +0000
+++ 0021-raw-ifpga-fix-monitor-thread.patch 2022-03-09 16:30:08.551025243 +0000
@@ -1 +1 @@
-From 2479a1e9a8886c93ba4c8a7aa2a35a04302f1aae Mon Sep 17 00:00:00 2001
+From 4297b2d419135300f90ce52328d384de484c9d67 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2479a1e9a8886c93ba4c8a7aa2a35a04302f1aae ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index cc569c5e71..26c1366a64 100644
+index decf183a0b..fb37313784 100644
@@ -35,2 +36,4 @@
- static struct ifpga_rawdev *
-@@ -133,6 +133,7 @@ ifpga_rawdev_allocate(struct rte_rawdev *rawdev)
+ #define IFPGA_MAX_IRQ 12
+@@ -134,6 +134,7 @@ ifpga_rawdev_allocate(struct rte_rawdev *rawdev)
+ dev = &ifpga_rawdevices[dev_id];
+ dev->rawdev = rawdev;
@@ -38,2 +40,0 @@
- for (i = 0; i < IFPGA_MAX_IRQ; i++)
- dev->intr_handle[i] = NULL;
@@ -44 +45 @@
-@@ -207,10 +208,11 @@ static int ifpga_get_dev_vendor_id(const char *bdf,
+@@ -208,10 +209,11 @@ static int ifpga_get_dev_vendor_id(const char *bdf,
@@ -59 +60 @@
-@@ -225,7 +227,11 @@ static int ifpga_rawdev_fill_info(struct ifpga_rawdev *ifpga_dev,
+@@ -226,7 +228,11 @@ static int ifpga_rawdev_fill_info(struct ifpga_rawdev *ifpga_dev,
@@ -72 +73 @@
-@@ -375,7 +381,7 @@ ifpga_monitor_sensor(struct rte_rawdev *raw_dev,
+@@ -376,7 +382,7 @@ ifpga_monitor_sensor(struct rte_rawdev *raw_dev,
@@ -81 +82 @@
-@@ -417,7 +423,7 @@ static int set_surprise_link_check_aer(
+@@ -418,7 +424,7 @@ static int set_surprise_link_check_aer(
@@ -90 +91 @@
-@@ -496,11 +502,11 @@ ifpga_rawdev_gsd_handle(__rte_unused void *param)
+@@ -497,11 +503,11 @@ ifpga_rawdev_gsd_handle(__rte_unused void *param)
@@ -104 +105 @@
-@@ -520,32 +526,46 @@ ifpga_rawdev_gsd_handle(__rte_unused void *param)
+@@ -521,32 +527,46 @@ ifpga_rawdev_gsd_handle(__rte_unused void *param)
@@ -124,4 +125,4 @@
- ret = rte_ctrl_thread_create(&ifpga_monitor_start_thread,
- "ifpga-monitor", NULL,
- ifpga_rawdev_gsd_handle, NULL);
- if (ret != 0) {
+ ret = pthread_create(&ifpga_monitor_start_thread,
+ NULL,
+ ifpga_rawdev_gsd_handle, NULL);
+ if (ret) {
@@ -157 +158 @@
-@@ -718,6 +738,7 @@ ifpga_rawdev_close(struct rte_rawdev *dev)
+@@ -719,6 +739,7 @@ ifpga_rawdev_close(struct rte_rawdev *dev)
@@ -165 +166 @@
-@@ -1571,6 +1592,10 @@ ifpga_rawdev_create(struct rte_pci_device *pci_dev,
+@@ -1522,6 +1543,10 @@ ifpga_rawdev_create(struct rte_pci_device *pci_dev,
@@ -176 +177 @@
-@@ -1646,7 +1671,7 @@ ifpga_rawdev_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
+@@ -1597,7 +1622,7 @@ ifpga_rawdev_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
@@ -185 +186 @@
-@@ -1697,7 +1722,6 @@ ifpga_cfg_probe(struct rte_vdev_device *dev)
+@@ -1648,7 +1673,6 @@ ifpga_cfg_probe(struct rte_vdev_device *dev)
@@ -193 +194 @@
-@@ -1746,10 +1770,6 @@ ifpga_cfg_probe(struct rte_vdev_device *dev)
+@@ -1697,10 +1721,6 @@ ifpga_cfg_probe(struct rte_vdev_device *dev)
@@ -205 +206 @@
-index 6e09afead3..857b73463d 100644
+index 5c3ecd35d6..f082280f9a 100644
@@ -208 +209,3 @@
-@@ -62,6 +62,8 @@ struct ifpga_rawdev {
+@@ -59,6 +59,8 @@ struct ifpga_rawdev {
+ uint32_t aer_old[2];
+ char fvl_bdf[8][16];
@@ -210,2 +212,0 @@
- /* 0 for FME interrupt, others are reserved for AFU irq */
- void *intr_handle[IFPGA_MAX_IRQ];
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'app/pdump: abort on multi-core capture limit' has been queued to stable release 20.11.5
2022-03-09 16:30 ` patch 'app/compress-perf: fix cycle count operations allocation' " luca.boccassi
` (19 preceding siblings ...)
2022-03-09 16:30 ` patch 'raw/ifpga: fix monitor thread' " luca.boccassi
@ 2022-03-09 16:30 ` luca.boccassi
2022-03-09 16:30 ` patch 'examples/distributor: reduce Tx queue number to 1' " luca.boccassi
` (13 subsequent siblings)
34 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-09 16:30 UTC (permalink / raw)
To: Reshma Pattan; +Cc: Stephen Hemminger, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/11/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/30d6d025329463056262ecd9095ebbe67113bdd4
Thanks.
Luca Boccassi
---
From 30d6d025329463056262ecd9095ebbe67113bdd4 Mon Sep 17 00:00:00 2001
From: Reshma Pattan <reshma.pattan@intel.com>
Date: Mon, 28 Feb 2022 09:58:56 +0000
Subject: [PATCH] app/pdump: abort on multi-core capture limit
[ upstream commit 3ee04ebc91f3872c4c1d9f9911f0cdfa32377d8c ]
Check lcore id value is not the maximum core supported.
Using lcore id without this check might cause
out of bound access inside the rte_eal_wait_lcore.
Coverity issue: 375841
Fixes: b2854d5317e8 ("app/pdump: support multi-core capture")
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
app/pdump/main.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/app/pdump/main.c b/app/pdump/main.c
index b34bf33531..36b14fa59f 100644
--- a/app/pdump/main.c
+++ b/app/pdump/main.c
@@ -906,11 +906,21 @@ dump_packets_core(void *arg)
return 0;
}
+static unsigned int
+get_next_core(unsigned int lcore)
+{
+ lcore = rte_get_next_lcore(lcore, 1, 0);
+ if (lcore == RTE_MAX_LCORE)
+ rte_exit(EXIT_FAILURE,
+ "Max core limit %u reached for packet capture", lcore);
+ return lcore;
+}
+
static inline void
dump_packets(void)
{
int i;
- uint32_t lcore_id = 0;
+ unsigned int lcore_id = 0;
if (!multiple_core_capture) {
printf(" core (%u), capture for (%d) tuples\n",
@@ -936,12 +946,12 @@ dump_packets(void)
return;
}
- lcore_id = rte_get_next_lcore(lcore_id, 1, 0);
+ lcore_id = get_next_core(lcore_id);
for (i = 0; i < num_tuples; i++) {
rte_eal_remote_launch(dump_packets_core,
&pdump_t[i], lcore_id);
- lcore_id = rte_get_next_lcore(lcore_id, 1, 0);
+ lcore_id = get_next_core(lcore_id);
if (rte_eal_wait_lcore(lcore_id) < 0)
rte_exit(EXIT_FAILURE, "failed to wait\n");
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-09 16:30:09.344937714 +0000
+++ 0022-app-pdump-abort-on-multi-core-capture-limit.patch 2022-03-09 16:30:08.551025243 +0000
@@ -1 +1 @@
-From 3ee04ebc91f3872c4c1d9f9911f0cdfa32377d8c Mon Sep 17 00:00:00 2001
+From 30d6d025329463056262ecd9095ebbe67113bdd4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3ee04ebc91f3872c4c1d9f9911f0cdfa32377d8c ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 04a38e8911..96fa76f8da 100644
+index b34bf33531..36b14fa59f 100644
@@ -24 +25 @@
-@@ -900,11 +900,21 @@ dump_packets_core(void *arg)
+@@ -906,11 +906,21 @@ dump_packets_core(void *arg)
@@ -47 +48 @@
-@@ -930,12 +940,12 @@ dump_packets(void)
+@@ -936,12 +946,12 @@ dump_packets(void)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'examples/distributor: reduce Tx queue number to 1' has been queued to stable release 20.11.5
2022-03-09 16:30 ` patch 'app/compress-perf: fix cycle count operations allocation' " luca.boccassi
` (20 preceding siblings ...)
2022-03-09 16:30 ` patch 'app/pdump: abort on multi-core capture limit' " luca.boccassi
@ 2022-03-09 16:30 ` luca.boccassi
2022-03-09 16:30 ` patch 'examples/flow_classify: fix failure message' " luca.boccassi
` (12 subsequent siblings)
34 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-09 16:30 UTC (permalink / raw)
To: Honnappa Nagarahalli; +Cc: Ruifeng Wang, Bruce Richardson, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/11/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/11564d16c1d5d4bbc2ce8aa47495170d7f5d5e69
Thanks.
Luca Boccassi
---
From 11564d16c1d5d4bbc2ce8aa47495170d7f5d5e69 Mon Sep 17 00:00:00 2001
From: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Date: Mon, 7 Mar 2022 22:39:46 +0000
Subject: [PATCH] examples/distributor: reduce Tx queue number to 1
[ upstream commit e7f6d1289bc2d6880bcc708b7ba42976b8d4a3e8 ]
Distributor application creates one Tx queue per core. However
the transmit is done only from a single core. Hence creating
one Tx queue is enough.
Fixes: 07db4a975094 ("examples/distributor: new sample app")
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
examples/distributor/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/distributor/main.c b/examples/distributor/main.c
index 1b1029660e..9303a00d1b 100644
--- a/examples/distributor/main.c
+++ b/examples/distributor/main.c
@@ -109,7 +109,7 @@ static inline int
port_init(uint16_t port, struct rte_mempool *mbuf_pool)
{
struct rte_eth_conf port_conf = port_conf_default;
- const uint16_t rxRings = 1, txRings = rte_lcore_count() - 1;
+ const uint16_t rxRings = 1, txRings = 1;
int retval;
uint16_t q;
uint16_t nb_rxd = RX_RING_SIZE;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-09 16:30:09.377480499 +0000
+++ 0023-examples-distributor-reduce-Tx-queue-number-to-1.patch 2022-03-09 16:30:08.551025243 +0000
@@ -1 +1 @@
-From e7f6d1289bc2d6880bcc708b7ba42976b8d4a3e8 Mon Sep 17 00:00:00 2001
+From 11564d16c1d5d4bbc2ce8aa47495170d7f5d5e69 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e7f6d1289bc2d6880bcc708b7ba42976b8d4a3e8 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index c681e237ea..02bf91f555 100644
+index 1b1029660e..9303a00d1b 100644
@@ -24 +25 @@
-@@ -108,7 +108,7 @@ static inline int
+@@ -109,7 +109,7 @@ static inline int
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'examples/flow_classify: fix failure message' has been queued to stable release 20.11.5
2022-03-09 16:30 ` patch 'app/compress-perf: fix cycle count operations allocation' " luca.boccassi
` (21 preceding siblings ...)
2022-03-09 16:30 ` patch 'examples/distributor: reduce Tx queue number to 1' " luca.boccassi
@ 2022-03-09 16:30 ` luca.boccassi
2022-03-09 16:30 ` patch 'examples/kni: add missing trailing newline in log' " luca.boccassi
` (11 subsequent siblings)
34 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-09 16:30 UTC (permalink / raw)
To: Chuanshe Zhang; +Cc: Bernard Iremonger, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/11/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/66efb3371f8ccd12ef6d6d821f1794c6e12dfd29
Thanks.
Luca Boccassi
---
From 66efb3371f8ccd12ef6d6d821f1794c6e12dfd29 Mon Sep 17 00:00:00 2001
From: Chuanshe Zhang <zhangchuanshe@icloudshield.com>
Date: Tue, 18 Jan 2022 10:49:34 +0800
Subject: [PATCH] examples/flow_classify: fix failure message
[ upstream commit 750c177980cb7642f1893a9ae4076b631fa6a98f ]
Fixes: bab16ddaf2c1 ("examples/flow_classify: add sample application")
Signed-off-by: Chuanshe Zhang <zhangchuanshe@icloudshield.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
examples/flow_classify/flow_classify.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/flow_classify/flow_classify.c b/examples/flow_classify/flow_classify.c
index 94c1553648..54c7dda20f 100644
--- a/examples/flow_classify/flow_classify.c
+++ b/examples/flow_classify/flow_classify.c
@@ -424,7 +424,7 @@ parse_ipv4_5tuple_rule(char *str, struct rte_eth_ntuple_filter *ntuple_filter)
&ntuple_filter->dst_ip,
&ntuple_filter->dst_ip_mask);
if (ret != 0) {
- flow_classify_log("failed to read source address/mask: %s\n",
+ flow_classify_log("failed to read destination address/mask: %s\n",
in[CB_FLD_DST_ADDR]);
return ret;
}
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-09 16:30:09.409669247 +0000
+++ 0024-examples-flow_classify-fix-failure-message.patch 2022-03-09 16:30:08.551025243 +0000
@@ -1 +1 @@
-From 750c177980cb7642f1893a9ae4076b631fa6a98f Mon Sep 17 00:00:00 2001
+From 66efb3371f8ccd12ef6d6d821f1794c6e12dfd29 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 750c177980cb7642f1893a9ae4076b631fa6a98f ]
+
@@ -7 +8,0 @@
-Cc: stable@dpdk.org
@@ -16 +17 @@
-index 6185b34060..97708b7084 100644
+index 94c1553648..54c7dda20f 100644
@@ -19 +20 @@
-@@ -430,7 +430,7 @@ parse_ipv4_5tuple_rule(char *str, struct rte_eth_ntuple_filter *ntuple_filter)
+@@ -424,7 +424,7 @@ parse_ipv4_5tuple_rule(char *str, struct rte_eth_ntuple_filter *ntuple_filter)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'examples/kni: add missing trailing newline in log' has been queued to stable release 20.11.5
2022-03-09 16:30 ` patch 'app/compress-perf: fix cycle count operations allocation' " luca.boccassi
` (22 preceding siblings ...)
2022-03-09 16:30 ` patch 'examples/flow_classify: fix failure message' " luca.boccassi
@ 2022-03-09 16:30 ` luca.boccassi
2022-03-09 16:30 ` patch 'regexdev: fix section attribute of symbols' " luca.boccassi
` (10 subsequent siblings)
34 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-09 16:30 UTC (permalink / raw)
To: Tianli Lai; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/11/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6a5ad6b291891deed417652375cb4d0310a2e5c8
Thanks.
Luca Boccassi
---
From 6a5ad6b291891deed417652375cb4d0310a2e5c8 Mon Sep 17 00:00:00 2001
From: Tianli Lai <laitianli@tom.com>
Date: Mon, 7 Mar 2022 17:05:05 +0800
Subject: [PATCH] examples/kni: add missing trailing newline in log
[ upstream commit 2e7997ce58f95762511568e4b6549fcde9860726 ]
Add CR character at print link state information.
Fixes: db4e81351fb8 ("examples: use new link status print format")
Signed-off-by: Tianli Lai <laitianli@tom.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
examples/kni/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/kni/main.c b/examples/kni/main.c
index 7a9b8062e9..df9666f78c 100644
--- a/examples/kni/main.c
+++ b/examples/kni/main.c
@@ -720,7 +720,7 @@ log_link_state(struct rte_kni *kni, int prev, struct rte_eth_link *link)
rte_eth_link_to_str(link_status_text, sizeof(link_status_text), link);
if (prev != link->link_status)
- RTE_LOG(INFO, APP, "%s NIC %s",
+ RTE_LOG(INFO, APP, "%s NIC %s\n",
rte_kni_get_name(kni),
link_status_text);
}
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-09 16:30:09.441697865 +0000
+++ 0025-examples-kni-add-missing-trailing-newline-in-log.patch 2022-03-09 16:30:08.555025333 +0000
@@ -1 +1 @@
-From 2e7997ce58f95762511568e4b6549fcde9860726 Mon Sep 17 00:00:00 2001
+From 6a5ad6b291891deed417652375cb4d0310a2e5c8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2e7997ce58f95762511568e4b6549fcde9860726 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index f5b20a7b62..e99ef5c38a 100644
+index 7a9b8062e9..df9666f78c 100644
@@ -21 +22 @@
-@@ -719,7 +719,7 @@ log_link_state(struct rte_kni *kni, int prev, struct rte_eth_link *link)
+@@ -720,7 +720,7 @@ log_link_state(struct rte_kni *kni, int prev, struct rte_eth_link *link)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'regexdev: fix section attribute of symbols' has been queued to stable release 20.11.5
2022-03-09 16:30 ` patch 'app/compress-perf: fix cycle count operations allocation' " luca.boccassi
` (23 preceding siblings ...)
2022-03-09 16:30 ` patch 'examples/kni: add missing trailing newline in log' " luca.boccassi
@ 2022-03-09 16:30 ` luca.boccassi
2022-03-09 16:30 ` patch 'ethdev: fix doxygen comments for device info struct' " luca.boccassi
` (9 subsequent siblings)
34 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-09 16:30 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: Ori Kam, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/11/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/7490d6d4d9f05da786cd003b1e3435833722a5d6
Thanks.
Luca Boccassi
---
From 7490d6d4d9f05da786cd003b1e3435833722a5d6 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Sun, 6 Mar 2022 10:20:22 +0100
Subject: [PATCH] regexdev: fix section attribute of symbols
[ upstream commit 89e290eb8ca99af9f7cfc3292d93860f8e672708 ]
The functions used by the drivers must be internal,
while the function and variables used in inline functions
must be experimental.
These are the changes done in the shared library:
- DF .text Base rte_regexdev_get_device_by_name
+ DF .text INTERNAL rte_regexdev_get_device_by_name
- DF .text Base rte_regexdev_register
+ DF .text INTERNAL rte_regexdev_register
- DF .text Base rte_regexdev_unregister
+ DF .text INTERNAL rte_regexdev_unregister
- DF .text Base rte_regexdev_is_valid_dev
+ DF .text EXPERIMENTAL rte_regexdev_is_valid_dev
- DO .bss Base rte_regex_devices
+ DO .bss EXPERIMENTAL rte_regex_devices
- DO .bss Base rte_regexdev_logtype
+ DO .bss EXPERIMENTAL rte_regexdev_logtype
Because these symbols were exported in the default section in DPDK 21.11,
any change in these functions would be seen as incompatible
by the ABI compatibility check.
An exception rule is added for this experimental library,
so the ABI check will skip it until the next ABI version.
Fixes: bab9497ef78b ("regexdev: introduce API")
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Ori Kam <orika@nvidia.com>
---
devtools/libabigail.abignore | 4 ++++
lib/librte_regexdev/rte_regexdev.h | 4 ++++
lib/librte_regexdev/rte_regexdev_driver.h | 3 +++
lib/librte_regexdev/version.map | 9 +++++++++
4 files changed, 20 insertions(+)
diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
index 025f2c01bc..1414cdfba9 100644
--- a/devtools/libabigail.abignore
+++ b/devtools/libabigail.abignore
@@ -7,3 +7,7 @@
symbol_version = INTERNAL
[suppress_variable]
symbol_version = INTERNAL
+
+; Ignore section attribute fixes in experimental regexdev library
+[suppress_file]
+ soname_regexp = ^librte_regexdev\.
diff --git a/lib/librte_regexdev/rte_regexdev.h b/lib/librte_regexdev/rte_regexdev.h
index df2312678c..09d1718da9 100644
--- a/lib/librte_regexdev/rte_regexdev.h
+++ b/lib/librte_regexdev/rte_regexdev.h
@@ -228,6 +228,9 @@ extern int rte_regexdev_logtype;
} while (0)
/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice.
+ *
* Check if dev_id is ready.
*
* @param dev_id
@@ -237,6 +240,7 @@ extern int rte_regexdev_logtype;
* - 0 if device state is not in ready state.
* - 1 if device state is ready state.
*/
+__rte_experimental
int rte_regexdev_is_valid_dev(uint16_t dev_id);
/**
diff --git a/lib/librte_regexdev/rte_regexdev_driver.h b/lib/librte_regexdev/rte_regexdev_driver.h
index 64742016c0..6246b144a6 100644
--- a/lib/librte_regexdev/rte_regexdev_driver.h
+++ b/lib/librte_regexdev/rte_regexdev_driver.h
@@ -32,6 +32,7 @@ extern "C" {
* A pointer to the RegEx device slot case of success,
* NULL otherwise.
*/
+__rte_internal
struct rte_regexdev *rte_regexdev_register(const char *name);
/**
@@ -41,6 +42,7 @@ struct rte_regexdev *rte_regexdev_register(const char *name);
* @param dev
* Device to be released.
*/
+__rte_internal
void rte_regexdev_unregister(struct rte_regexdev *dev);
/**
@@ -50,6 +52,7 @@ void rte_regexdev_unregister(struct rte_regexdev *dev);
* @param name
* The device name.
*/
+__rte_internal
struct rte_regexdev *rte_regexdev_get_device_by_name(const char *name);
#ifdef __cplusplus
diff --git a/lib/librte_regexdev/version.map b/lib/librte_regexdev/version.map
index 8db9b17018..988b909638 100644
--- a/lib/librte_regexdev/version.map
+++ b/lib/librte_regexdev/version.map
@@ -1,6 +1,7 @@
EXPERIMENTAL {
global:
+ rte_regex_devices;
rte_regexdev_attr_get;
rte_regexdev_attr_set;
rte_regexdev_close;
@@ -11,6 +12,8 @@ EXPERIMENTAL {
rte_regexdev_enqueue_burst;
rte_regexdev_get_dev_id;
rte_regexdev_info_get;
+ rte_regexdev_is_valid_dev;
+ rte_regexdev_logtype;
rte_regexdev_queue_pair_setup;
rte_regexdev_rule_db_compile_activate;
rte_regexdev_rule_db_export;
@@ -24,3 +27,9 @@ EXPERIMENTAL {
rte_regexdev_xstats_names_get;
rte_regexdev_xstats_reset;
};
+
+INTERNAL {
+ rte_regexdev_get_device_by_name;
+ rte_regexdev_register;
+ rte_regexdev_unregister;
+};
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-09 16:30:09.473760116 +0000
+++ 0026-regexdev-fix-section-attribute-of-symbols.patch 2022-03-09 16:30:08.555025333 +0000
@@ -1 +1 @@
-From 89e290eb8ca99af9f7cfc3292d93860f8e672708 Mon Sep 17 00:00:00 2001
+From 7490d6d4d9f05da786cd003b1e3435833722a5d6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 89e290eb8ca99af9f7cfc3292d93860f8e672708 ]
+
@@ -31 +32,0 @@
-Cc: stable@dpdk.org
@@ -36,4 +37,4 @@
- devtools/libabigail.abignore | 4 ++++
- lib/regexdev/rte_regexdev.h | 4 ++++
- lib/regexdev/rte_regexdev_driver.h | 3 +++
- lib/regexdev/version.map | 9 +++++++++
+ devtools/libabigail.abignore | 4 ++++
+ lib/librte_regexdev/rte_regexdev.h | 4 ++++
+ lib/librte_regexdev/rte_regexdev_driver.h | 3 +++
+ lib/librte_regexdev/version.map | 9 +++++++++
@@ -43 +44 @@
-index 9c921c47d4..18c11c80c6 100644
+index 025f2c01bc..1414cdfba9 100644
@@ -46,4 +47,5 @@
-@@ -25,6 +25,10 @@
- [suppress_type]
- name = rte_crypto_asym_op
-
+@@ -7,3 +7,7 @@
+ symbol_version = INTERNAL
+ [suppress_variable]
+ symbol_version = INTERNAL
++
@@ -53,9 +55,5 @@
-+
- ; Ignore changes in common mlx5 driver, should be all internal
- [suppress_file]
- soname_regexp = ^librte_common_mlx5\.
-diff --git a/lib/regexdev/rte_regexdev.h b/lib/regexdev/rte_regexdev.h
-index 4ba67b0c25..3bce8090f6 100644
---- a/lib/regexdev/rte_regexdev.h
-+++ b/lib/regexdev/rte_regexdev.h
-@@ -225,6 +225,9 @@ extern int rte_regexdev_logtype;
+diff --git a/lib/librte_regexdev/rte_regexdev.h b/lib/librte_regexdev/rte_regexdev.h
+index df2312678c..09d1718da9 100644
+--- a/lib/librte_regexdev/rte_regexdev.h
++++ b/lib/librte_regexdev/rte_regexdev.h
+@@ -228,6 +228,9 @@ extern int rte_regexdev_logtype;
@@ -71 +69 @@
-@@ -234,6 +237,7 @@ extern int rte_regexdev_logtype;
+@@ -237,6 +240,7 @@ extern int rte_regexdev_logtype;
@@ -79 +77 @@
-diff --git a/lib/regexdev/rte_regexdev_driver.h b/lib/regexdev/rte_regexdev_driver.h
+diff --git a/lib/librte_regexdev/rte_regexdev_driver.h b/lib/librte_regexdev/rte_regexdev_driver.h
@@ -81,2 +79,2 @@
---- a/lib/regexdev/rte_regexdev_driver.h
-+++ b/lib/regexdev/rte_regexdev_driver.h
+--- a/lib/librte_regexdev/rte_regexdev_driver.h
++++ b/lib/librte_regexdev/rte_regexdev_driver.h
@@ -107 +105 @@
-diff --git a/lib/regexdev/version.map b/lib/regexdev/version.map
+diff --git a/lib/librte_regexdev/version.map b/lib/librte_regexdev/version.map
@@ -109,2 +107,2 @@
---- a/lib/regexdev/version.map
-+++ b/lib/regexdev/version.map
+--- a/lib/librte_regexdev/version.map
++++ b/lib/librte_regexdev/version.map
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'ethdev: fix doxygen comments for device info struct' has been queued to stable release 20.11.5
2022-03-09 16:30 ` patch 'app/compress-perf: fix cycle count operations allocation' " luca.boccassi
` (24 preceding siblings ...)
2022-03-09 16:30 ` patch 'regexdev: fix section attribute of symbols' " luca.boccassi
@ 2022-03-09 16:30 ` luca.boccassi
2022-03-09 16:30 ` patch 'net/bnxt: fix null dereference in session cleanup' " luca.boccassi
` (8 subsequent siblings)
34 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-09 16:30 UTC (permalink / raw)
To: Ferruh Yigit; +Cc: Bruce Merry, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/11/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/c0f4bcb7af08aca0c07d3f90215cebcbb871a549
Thanks.
Luca Boccassi
---
From c0f4bcb7af08aca0c07d3f90215cebcbb871a549 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Tue, 8 Mar 2022 09:47:00 +0000
Subject: [PATCH] ethdev: fix doxygen comments for device info struct
[ upstream commit 3b358e330153bc792c688d6da60c80c40eaacb22 ]
API documentation for "struct rte_eth_dev_info" was missing some fields
'device' & 'max_hash_mac_addrs',
because of syntax error in doxygen comment, fixing it.
Bugzilla ID: 954
Fixes: 88ac4396ad29 ("ethdev: add VMDq support")
Fixes: cd8c7c7ce241 ("ethdev: replace bus specific struct with generic dev")
Reported-by: Bruce Merry <bmerry@sarao.ac.za>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
lib/librte_ethdev/rte_ethdev.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 8856648d11..899f152a83 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -1502,7 +1502,7 @@ struct rte_eth_rxseg_capa {
* device, etc...
*/
struct rte_eth_dev_info {
- struct rte_device *device; /** Generic device information */
+ struct rte_device *device; /**< Generic device information */
const char *driver_name; /**< Device Driver name. */
unsigned int if_index; /**< Index to bound host interface, or 0 if none.
Use if_indextoname() to translate into an interface name. */
@@ -1516,8 +1516,8 @@ struct rte_eth_dev_info {
uint16_t max_rx_queues; /**< Maximum number of RX queues. */
uint16_t max_tx_queues; /**< Maximum number of TX queues. */
uint32_t max_mac_addrs; /**< Maximum number of MAC addresses. */
- uint32_t max_hash_mac_addrs;
/** Maximum number of hash MAC addresses for MTA and UTA. */
+ uint32_t max_hash_mac_addrs;
uint16_t max_vfs; /**< Maximum number of VFs. */
uint16_t max_vmdq_pools; /**< Maximum number of VMDq pools. */
struct rte_eth_rxseg_capa rx_seg_capa; /**< Segmentation capability.*/
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-09 16:30:09.506540181 +0000
+++ 0027-ethdev-fix-doxygen-comments-for-device-info-struct.patch 2022-03-09 16:30:08.559025422 +0000
@@ -1 +1 @@
-From 3b358e330153bc792c688d6da60c80c40eaacb22 Mon Sep 17 00:00:00 2001
+From c0f4bcb7af08aca0c07d3f90215cebcbb871a549 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3b358e330153bc792c688d6da60c80c40eaacb22 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
- lib/ethdev/rte_ethdev.h | 4 ++--
+ lib/librte_ethdev/rte_ethdev.h | 4 ++--
@@ -21,5 +22,5 @@
-diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
-index c2d1f9a972..04cff8ee10 100644
---- a/lib/ethdev/rte_ethdev.h
-+++ b/lib/ethdev/rte_ethdev.h
-@@ -1855,7 +1855,7 @@ enum rte_eth_representor_type {
+diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
+index 8856648d11..899f152a83 100644
+--- a/lib/librte_ethdev/rte_ethdev.h
++++ b/lib/librte_ethdev/rte_ethdev.h
+@@ -1502,7 +1502,7 @@ struct rte_eth_rxseg_capa {
@@ -34,3 +35,3 @@
-@@ -1869,8 +1869,8 @@ struct rte_eth_dev_info {
- uint16_t max_rx_queues; /**< Maximum number of Rx queues. */
- uint16_t max_tx_queues; /**< Maximum number of Tx queues. */
+@@ -1516,8 +1516,8 @@ struct rte_eth_dev_info {
+ uint16_t max_rx_queues; /**< Maximum number of RX queues. */
+ uint16_t max_tx_queues; /**< Maximum number of TX queues. */
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/bnxt: fix null dereference in session cleanup' has been queued to stable release 20.11.5
2022-03-09 16:30 ` patch 'app/compress-perf: fix cycle count operations allocation' " luca.boccassi
` (25 preceding siblings ...)
2022-03-09 16:30 ` patch 'ethdev: fix doxygen comments for device info struct' " luca.boccassi
@ 2022-03-09 16:30 ` luca.boccassi
2022-03-09 16:30 ` patch 'net/mlx5: fix inet IPIP protocol type' " luca.boccassi
` (7 subsequent siblings)
34 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-09 16:30 UTC (permalink / raw)
To: Weiguo Li; +Cc: Ajit Khaparde, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/11/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/cfd9d0902d95112a2b9c18edc5382eca5f34e745
Thanks.
Luca Boccassi
---
From cfd9d0902d95112a2b9c18edc5382eca5f34e745 Mon Sep 17 00:00:00 2001
From: Weiguo Li <liwg06@foxmail.com>
Date: Thu, 24 Feb 2022 23:53:59 +0800
Subject: [PATCH] net/bnxt: fix null dereference in session cleanup
[ upstream commit a2dfcd1ff609f5a4fd3b65774618a35c5c9f73c6 ]
In tf_session_create(), there is a case that with 'tfp->session' still
be NULL and run 'goto cleanup', which will leads to a null dereference
by 'tfp_free(tfp->session->core_data)' in the cleanup.
Fixes: a46bbb57605b ("net/bnxt: update multi device design")
Signed-off-by: Weiguo Li <liwg06@foxmail.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/tf_core/tf_session.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/net/bnxt/tf_core/tf_session.c b/drivers/net/bnxt/tf_core/tf_session.c
index c95c4bdbd3..598338d46c 100644
--- a/drivers/net/bnxt/tf_core/tf_session.c
+++ b/drivers/net/bnxt/tf_core/tf_session.c
@@ -182,9 +182,12 @@ tf_session_create(struct tf *tfp,
return 0;
cleanup:
- tfp_free(tfp->session->core_data);
- tfp_free(tfp->session);
- tfp->session = NULL;
+ if (tfp->session) {
+ tfp_free(tfp->session->core_data);
+ tfp_free(tfp->session);
+ tfp->session = NULL;
+ }
+
return rc;
}
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-09 16:30:09.544325884 +0000
+++ 0028-net-bnxt-fix-null-dereference-in-session-cleanup.patch 2022-03-09 16:30:08.559025422 +0000
@@ -1 +1 @@
-From a2dfcd1ff609f5a4fd3b65774618a35c5c9f73c6 Mon Sep 17 00:00:00 2001
+From cfd9d0902d95112a2b9c18edc5382eca5f34e745 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a2dfcd1ff609f5a4fd3b65774618a35c5c9f73c6 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -16,2 +17,2 @@
- drivers/net/bnxt/tf_core/tf_session.c | 8 +++++---
- 1 file changed, 5 insertions(+), 3 deletions(-)
+ drivers/net/bnxt/tf_core/tf_session.c | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
@@ -20 +21 @@
-index 9f849a0a76..c30c0e7029 100644
+index c95c4bdbd3..598338d46c 100644
@@ -23,4 +24,7 @@
-@@ -230,10 +230,12 @@ tf_session_create(struct tf *tfp,
- "FW Session close failed, rc:%s\n",
- strerror(-rc));
- }
+@@ -182,9 +182,12 @@ tf_session_create(struct tf *tfp,
+ return 0;
+
+ cleanup:
+- tfp_free(tfp->session->core_data);
+- tfp_free(tfp->session);
+- tfp->session = NULL;
@@ -32,4 +36 @@
-
-- tfp_free(tfp->session->core_data);
-- tfp_free(tfp->session);
-- tfp->session = NULL;
++
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/mlx5: fix inet IPIP protocol type' has been queued to stable release 20.11.5
2022-03-09 16:30 ` patch 'app/compress-perf: fix cycle count operations allocation' " luca.boccassi
` (26 preceding siblings ...)
2022-03-09 16:30 ` patch 'net/bnxt: fix null dereference in session cleanup' " luca.boccassi
@ 2022-03-09 16:30 ` luca.boccassi
2022-03-09 16:30 ` patch 'net/mlx5: fix next protocol RSS expansion' " luca.boccassi
` (6 subsequent siblings)
34 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-09 16:30 UTC (permalink / raw)
To: Gregory Etelson; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/11/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/7913c9202f4b8f8d35d2d198516c78dc9059475d
Thanks.
Luca Boccassi
---
From 7913c9202f4b8f8d35d2d198516c78dc9059475d Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Tue, 1 Mar 2022 17:18:56 +0200
Subject: [PATCH] net/mlx5: fix inet IPIP protocol type
[ upstream commit d16ec6841b5e2e8ee7e224d4456aaf4d5e02e13b ]
Fix typo in INET IPIP protocol macro.
Fixes: f3f1f576f438 ("net/mlx5: fix RSS expansion with explicit next protocol")
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/mlx5_flow.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 69f57605f8..24c2665c53 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -201,7 +201,7 @@ mlx5_inet_proto_to_item_type(uint8_t proto_spec, uint8_t proto_mask)
case IPPROTO_TCP:
type = RTE_FLOW_ITEM_TYPE_TCP;
break;
- case IPPROTO_IP:
+ case IPPROTO_IPIP:
type = RTE_FLOW_ITEM_TYPE_IPV4;
break;
case IPPROTO_IPV6:
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-09 16:30:09.576642385 +0000
+++ 0029-net-mlx5-fix-inet-IPIP-protocol-type.patch 2022-03-09 16:30:08.567025602 +0000
@@ -1 +1 @@
-From d16ec6841b5e2e8ee7e224d4456aaf4d5e02e13b Mon Sep 17 00:00:00 2001
+From 7913c9202f4b8f8d35d2d198516c78dc9059475d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d16ec6841b5e2e8ee7e224d4456aaf4d5e02e13b ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index a690e2d337..9bb4ce26f7 100644
+index 69f57605f8..24c2665c53 100644
@@ -21 +22 @@
-@@ -202,7 +202,7 @@ mlx5_inet_proto_to_item_type(uint8_t proto_spec, uint8_t proto_mask)
+@@ -201,7 +201,7 @@ mlx5_inet_proto_to_item_type(uint8_t proto_spec, uint8_t proto_mask)
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/mlx5: fix next protocol RSS expansion' has been queued to stable release 20.11.5
2022-03-09 16:30 ` patch 'app/compress-perf: fix cycle count operations allocation' " luca.boccassi
` (27 preceding siblings ...)
2022-03-09 16:30 ` patch 'net/mlx5: fix inet IPIP protocol type' " luca.boccassi
@ 2022-03-09 16:30 ` luca.boccassi
2022-03-09 16:30 ` patch 'net/mlx5: fix shared RSS destroy' " luca.boccassi
` (5 subsequent siblings)
34 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-09 16:30 UTC (permalink / raw)
To: Gregory Etelson; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/11/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/34d3fdceae89d42fd910f46eae2ccb94899797d6
Thanks.
Luca Boccassi
---
From 34d3fdceae89d42fd910f46eae2ccb94899797d6 Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Tue, 1 Mar 2022 17:18:55 +0200
Subject: [PATCH] net/mlx5: fix next protocol RSS expansion
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 6ae5c238371aeb86359c5a6c1eb1330e1cc25fca ]
RSS expansion scheme has 2 operational modes: default and specific.
The default mode expands into all valid options for a given network
layer. For example, Ethernet expands by default into VLAN, IPv4 and
IPv6, L3 expands into TCP and UDP, etc.
The specific mode expands according to flow item next protocol
configuration provided by the item spec and mask parameters.
There are 3 outcomes for the specific expansion:
1. Back to default – that is the case when result of (spec & mask)
allows all possibilities.
For example: eth type mask 0 type spec 0
2. No results – in that case item configuration has no valid expansion.
For example: eth type mask 0xffff type spec 101
3. Direct - In that case flow item mask and spec configuration return
valid expansion option.
Example: eth type mask 0x0fff type spec 0x0800.
Current PMD expands flow items with explicit spec and mask
configuration into the Direct(3) or No results (2). Default expansions
were handled as No results.
Fixes: f3f1f576f438 ("net/mlx5: fix RSS expansion with explicit next protocol")
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/mlx5_flow.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 24c2665c53..56db0217b9 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -174,6 +174,9 @@ 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 0:
+ type = RTE_FLOW_ITEM_TYPE_VOID;
+ break;
case RTE_VXLAN_GPE_TYPE_IPV4:
type = RTE_FLOW_ITEM_TYPE_IPV4;
break;
@@ -195,6 +198,9 @@ 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 0:
+ type = RTE_FLOW_ITEM_TYPE_VOID;
+ break;
case IPPROTO_UDP:
type = RTE_FLOW_ITEM_TYPE_UDP;
break;
@@ -220,6 +226,9 @@ mlx5_ethertype_to_item_type(rte_be16_t type_spec,
enum rte_flow_item_type type;
switch (rte_be_to_cpu_16(type_spec & type_mask)) {
+ case 0:
+ type = RTE_FLOW_ITEM_TYPE_VOID;
+ break;
case RTE_ETHER_TYPE_TEB:
type = is_tunnel ?
RTE_FLOW_ITEM_TYPE_ETH : RTE_FLOW_ITEM_TYPE_END;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-09 16:30:09.617167382 +0000
+++ 0030-net-mlx5-fix-next-protocol-RSS-expansion.patch 2022-03-09 16:30:08.575025781 +0000
@@ -1 +1 @@
-From 6ae5c238371aeb86359c5a6c1eb1330e1cc25fca Mon Sep 17 00:00:00 2001
+From 34d3fdceae89d42fd910f46eae2ccb94899797d6 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 6ae5c238371aeb86359c5a6c1eb1330e1cc25fca ]
+
@@ -30 +31,0 @@
-Cc: stable@dpdk.org
@@ -39 +40 @@
-index 9bb4ce26f7..efb988a9bb 100644
+index 24c2665c53..56db0217b9 100644
@@ -42 +43 @@
-@@ -175,6 +175,9 @@ mlx5_nsh_proto_to_item_type(uint8_t proto_spec, uint8_t proto_mask)
+@@ -174,6 +174,9 @@ mlx5_nsh_proto_to_item_type(uint8_t proto_spec, uint8_t proto_mask)
@@ -52 +53 @@
-@@ -196,6 +199,9 @@ mlx5_inet_proto_to_item_type(uint8_t proto_spec, uint8_t proto_mask)
+@@ -195,6 +198,9 @@ mlx5_inet_proto_to_item_type(uint8_t proto_spec, uint8_t proto_mask)
@@ -62 +63 @@
-@@ -221,6 +227,9 @@ mlx5_ethertype_to_item_type(rte_be16_t type_spec,
+@@ -220,6 +226,9 @@ mlx5_ethertype_to_item_type(rte_be16_t type_spec,
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/mlx5: fix shared RSS destroy' has been queued to stable release 20.11.5
2022-03-09 16:30 ` patch 'app/compress-perf: fix cycle count operations allocation' " luca.boccassi
` (28 preceding siblings ...)
2022-03-09 16:30 ` patch 'net/mlx5: fix next protocol RSS expansion' " luca.boccassi
@ 2022-03-09 16:30 ` luca.boccassi
2022-03-09 16:30 ` patch 'net/mlx5: fix NIC egress flow mismatch in switchdev mode' " luca.boccassi
` (4 subsequent siblings)
34 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-09 16:30 UTC (permalink / raw)
To: Rongwei Liu; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/11/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/c0278ca723280b26d80fd847800ebb12024b50e3
Thanks.
Luca Boccassi
---
From c0278ca723280b26d80fd847800ebb12024b50e3 Mon Sep 17 00:00:00 2001
From: Rongwei Liu <rongweil@nvidia.com>
Date: Wed, 2 Mar 2022 13:19:38 +0200
Subject: [PATCH] net/mlx5: fix shared RSS destroy
[ upstream commit e1786fd53d7e5631c9ffb9b2fba0fd402bc8cf74 ]
When both shared and non-shared RSS actions are present in single
flow rule shared RSS index is unset by mistake.
For example:
1. flow indirect_action 0 create action_id 3 ingress action RSS ...
2. set sample_actions 0 mark id 43690 / queue index 0 / end
3. flow create 0 ingress group 107 pattern eth / sample ratio 2
index 0 / indirect 3 / end
PMD translates the indirect action to a shared RSS description at first.
In the split prefix flow, RSS->shared_RSS is unset when translating
sample queue action, the subfix flow will treat the RSS as non-shared.
Fixes: 8e61555657b2 ("net/mlx5: fix shared RSS and mark actions combination")
Signed-off-by: Rongwei Liu <rongweil@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index e2dc48f471..4e87f7a952 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -8741,6 +8741,7 @@ flow_dv_hrxq_prepare(struct rte_eth_dev *dev,
{
struct mlx5_priv *priv = dev->data->dev_private;
struct mlx5_flow_handle *dh = dev_flow->handle;
+ uint32_t shared_rss = rss_desc->shared_rss;
struct mlx5_hrxq *hrxq;
MLX5_ASSERT(rss_desc->queue_num);
@@ -8755,6 +8756,7 @@ flow_dv_hrxq_prepare(struct rte_eth_dev *dev,
return NULL;
hrxq = mlx5_ipool_get(priv->sh->ipool[MLX5_IPOOL_HRXQ],
*hrxq_idx);
+ rss_desc->shared_rss = shared_rss;
return hrxq;
}
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-09 16:30:09.657243837 +0000
+++ 0031-net-mlx5-fix-shared-RSS-destroy.patch 2022-03-09 16:30:08.587026049 +0000
@@ -1 +1 @@
-From e1786fd53d7e5631c9ffb9b2fba0fd402bc8cf74 Mon Sep 17 00:00:00 2001
+From c0278ca723280b26d80fd847800ebb12024b50e3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e1786fd53d7e5631c9ffb9b2fba0fd402bc8cf74 ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index 7a7591144a..ebd0a427f3 100644
+index e2dc48f471..4e87f7a952 100644
@@ -32,2 +33 @@
-@@ -11206,6 +11206,7 @@ flow_dv_hrxq_prepare(struct rte_eth_dev *dev,
- uint32_t *hrxq_idx)
+@@ -8741,6 +8741,7 @@ flow_dv_hrxq_prepare(struct rte_eth_dev *dev,
@@ -34,0 +35 @@
+ struct mlx5_priv *priv = dev->data->dev_private;
@@ -40,4 +41,4 @@
-@@ -11217,6 +11218,7 @@ flow_dv_hrxq_prepare(struct rte_eth_dev *dev,
- rss_desc->queue_num = 1;
- hrxq = mlx5_hrxq_get(dev, rss_desc);
- *hrxq_idx = hrxq ? hrxq->idx : 0;
+@@ -8755,6 +8756,7 @@ flow_dv_hrxq_prepare(struct rte_eth_dev *dev,
+ return NULL;
+ hrxq = mlx5_ipool_get(priv->sh->ipool[MLX5_IPOOL_HRXQ],
+ *hrxq_idx);
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/mlx5: fix NIC egress flow mismatch in switchdev mode' has been queued to stable release 20.11.5
2022-03-09 16:30 ` patch 'app/compress-perf: fix cycle count operations allocation' " luca.boccassi
` (29 preceding siblings ...)
2022-03-09 16:30 ` patch 'net/mlx5: fix shared RSS destroy' " luca.boccassi
@ 2022-03-09 16:30 ` luca.boccassi
2022-03-09 16:30 ` patch 'net/mlx5: fix modify port action validation' " luca.boccassi
` (3 subsequent siblings)
34 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-09 16:30 UTC (permalink / raw)
To: Jiawei Wang; +Cc: Viacheslav Ovsiienko, Ori Kam, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/11/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f400875c4e06f9932276c0c098ee3669bc7a43fb
Thanks.
Luca Boccassi
---
From f400875c4e06f9932276c0c098ee3669bc7a43fb Mon Sep 17 00:00:00 2001
From: Jiawei Wang <jiaweiw@nvidia.com>
Date: Wed, 2 Mar 2022 17:30:51 +0200
Subject: [PATCH] net/mlx5: fix NIC egress flow mismatch in switchdev mode
[ upstream commit 6d4f1066be6cd60a95f21ef07a16a3c3676c5cd9 ]
When E-Switch mode was enabled, the NIC egress flows was implicitly
appended with source vport to match on. If the metadata register C0
was used to maintain the source vport, it was initialized to zero
on packet steering engine entry, the flow could be hit only
if source vport was zero, the register C0 of the packet was not correct
to match in the TX side, this caused egress flow misses.
This patch:
- removes the implicit source vport match for NIC egress flow.
- rejects the NIC egress flows on the representor ports at validation.
- allows the internal NIC egress flows containing the TX_QUEUE items in
order to not impact hairpins.
Fixes: ce777b147bf8 ("net/mlx5: fix E-Switch flow without port item")
Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
doc/guides/nics/mlx5.rst | 2 ++
drivers/net/mlx5/mlx5_flow_dv.c | 26 +++++++++++++++++++++-----
2 files changed, 23 insertions(+), 5 deletions(-)
diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
index b1b9d6f4e3..d76c3178dc 100644
--- a/doc/guides/nics/mlx5.rst
+++ b/doc/guides/nics/mlx5.rst
@@ -352,6 +352,8 @@ Limitations
from the reference "Clock Queue" completions,
the scheduled send timestamps should not be specified with non-zero MSB.
+- The NIC egress flow rules on representor port are not supported.
+
Statistics
----------
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 4e87f7a952..44f975c9c9 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -5611,8 +5611,10 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
return ret;
last_item = MLX5_FLOW_ITEM_TAG;
break;
- case MLX5_RTE_FLOW_ITEM_TYPE_TAG:
case MLX5_RTE_FLOW_ITEM_TYPE_TX_QUEUE:
+ last_item = MLX5_FLOW_ITEM_TX_QUEUE;
+ break;
+ case MLX5_RTE_FLOW_ITEM_TYPE_TAG:
break;
case RTE_FLOW_ITEM_TYPE_GTP:
ret = flow_dv_validate_item_gtp(dev, items, item_flags,
@@ -6273,6 +6275,18 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
NULL, "too many header modify"
" actions to support");
}
+ /*
+ * Validation the NIC Egress flow on representor, except implicit
+ * hairpin default egress flow with TX_QUEUE item, other flows not
+ * work due to metadata regC0 mismatch.
+ */
+ if ((!attr->transfer && attr->egress) && priv->representor &&
+ !(item_flags & MLX5_FLOW_ITEM_TX_QUEUE))
+ return rte_flow_error_set(error, EINVAL,
+ RTE_FLOW_ERROR_TYPE_ITEM,
+ NULL,
+ "NIC egress rules on representors"
+ " is not supported");
return 0;
}
@@ -10663,12 +10677,14 @@ flow_dv_translate(struct rte_eth_dev *dev,
/*
* When E-Switch mode is enabled, we have two cases where we need to
* set the source port manually.
- * The first one, is in case of Nic steering rule, and the second is
- * E-Switch rule where no port_id item was found. In both cases
- * the source port is set according the current port in use.
+ * The first one, is in case of NIC ingress steering rule, and the
+ * second is E-Switch rule where no port_id item was found.
+ * In both cases the source port is set according the current port
+ * in use.
*/
if (!(item_flags & MLX5_FLOW_ITEM_PORT_ID) &&
- (priv->representor || priv->master)) {
+ (priv->representor || priv->master) &&
+ !(attr->egress && !attr->transfer)) {
if (flow_dv_translate_item_port_id(dev, match_mask,
match_value, NULL, attr))
return -rte_errno;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-09 16:30:09.707043643 +0000
+++ 0032-net-mlx5-fix-NIC-egress-flow-mismatch-in-switchdev-m.patch 2022-03-09 16:30:08.599026318 +0000
@@ -1 +1 @@
-From 6d4f1066be6cd60a95f21ef07a16a3c3676c5cd9 Mon Sep 17 00:00:00 2001
+From f400875c4e06f9932276c0c098ee3669bc7a43fb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6d4f1066be6cd60a95f21ef07a16a3c3676c5cd9 ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -31 +32 @@
-index c31a154181..2fe5784c04 100644
+index b1b9d6f4e3..d76c3178dc 100644
@@ -34,3 +35,3 @@
-@@ -504,6 +504,8 @@ Limitations
-
- Matching on checksum and sequence needs OFED 5.6+.
+@@ -352,6 +352,8 @@ Limitations
+ from the reference "Clock Queue" completions,
+ the scheduled send timestamps should not be specified with non-zero MSB.
@@ -40 +40,0 @@
-
@@ -42,0 +43 @@
+
@@ -44 +45 @@
-index ebd0a427f3..34d2c7a99f 100644
+index 4e87f7a952..44f975c9c9 100644
@@ -47 +48 @@
-@@ -7235,8 +7235,10 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -5611,8 +5611,10 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
@@ -59,4 +60,4 @@
-@@ -8069,6 +8071,18 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
- return rte_flow_error_set(error, EINVAL,
- RTE_FLOW_ERROR_TYPE_ACTION, NULL,
- "sample before modify action is not supported");
+@@ -6273,6 +6275,18 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+ NULL, "too many header modify"
+ " actions to support");
+ }
@@ -78 +79 @@
-@@ -13758,11 +13772,13 @@ flow_dv_translate(struct rte_eth_dev *dev,
+@@ -10663,12 +10677,14 @@ flow_dv_translate(struct rte_eth_dev *dev,
@@ -90,2 +91,3 @@
-- if (!(item_flags & MLX5_FLOW_ITEM_PORT_ID) && priv->sh->esw_mode) {
-+ if (!(item_flags & MLX5_FLOW_ITEM_PORT_ID) && priv->sh->esw_mode &&
+ if (!(item_flags & MLX5_FLOW_ITEM_PORT_ID) &&
+- (priv->representor || priv->master)) {
++ (priv->representor || priv->master) &&
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/mlx5: fix modify port action validation' has been queued to stable release 20.11.5
2022-03-09 16:30 ` patch 'app/compress-perf: fix cycle count operations allocation' " luca.boccassi
` (30 preceding siblings ...)
2022-03-09 16:30 ` patch 'net/mlx5: fix NIC egress flow mismatch in switchdev mode' " luca.boccassi
@ 2022-03-09 16:30 ` luca.boccassi
2022-03-09 16:30 ` patch 'net/mlx5: remove unused reference counter' " luca.boccassi
` (2 subsequent siblings)
34 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-09 16:30 UTC (permalink / raw)
To: Dmitry Kozlyuk; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/11/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/331e5474b9faf4e6db16411928574d74342958b9
Thanks.
Luca Boccassi
---
From 331e5474b9faf4e6db16411928574d74342958b9 Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Date: Wed, 2 Mar 2022 03:34:29 +0200
Subject: [PATCH] net/mlx5: fix modify port action validation
[ upstream commit ea7cc15ab97a3f73ae4f6c0a9d9c89f5ca0374f3 ]
Certain flow rules containing a modify header action for an L4 port
could be erroneously rejected as invalid, because this action
was counted as consuming two HW actions, while it only requires one.
Fixes: 72a944dba163 ("net/mlx5: fix header modify action validation")
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/mlx5_flow.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index fb11ae6b40..090cc7c77f 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -363,7 +363,7 @@ enum mlx5_feature_name {
#define MLX5_ACT_NUM_MDF_IPV6 4
#define MLX5_ACT_NUM_MDF_MAC 2
#define MLX5_ACT_NUM_MDF_VID 1
-#define MLX5_ACT_NUM_MDF_PORT 2
+#define MLX5_ACT_NUM_MDF_PORT 1
#define MLX5_ACT_NUM_MDF_TTL 1
#define MLX5_ACT_NUM_DEC_TTL MLX5_ACT_NUM_MDF_TTL
#define MLX5_ACT_NUM_MDF_TCPSEQ 1
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-09 16:30:09.765678510 +0000
+++ 0033-net-mlx5-fix-modify-port-action-validation.patch 2022-03-09 16:30:08.599026318 +0000
@@ -1 +1 @@
-From ea7cc15ab97a3f73ae4f6c0a9d9c89f5ca0374f3 Mon Sep 17 00:00:00 2001
+From 331e5474b9faf4e6db16411928574d74342958b9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ea7cc15ab97a3f73ae4f6c0a9d9c89f5ca0374f3 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 484ce5791e..f56115dd11 100644
+index fb11ae6b40..090cc7c77f 100644
@@ -23 +24 @@
-@@ -427,7 +427,7 @@ enum mlx5_feature_name {
+@@ -363,7 +363,7 @@ enum mlx5_feature_name {
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/mlx5: remove unused reference counter' has been queued to stable release 20.11.5
2022-03-09 16:30 ` patch 'app/compress-perf: fix cycle count operations allocation' " luca.boccassi
` (31 preceding siblings ...)
2022-03-09 16:30 ` patch 'net/mlx5: fix modify port action validation' " luca.boccassi
@ 2022-03-09 16:30 ` luca.boccassi
2022-03-09 16:30 ` patch 'net/mlx5: fix MPLS/GRE Verbs spec ordering' " luca.boccassi
2022-03-09 16:30 ` patch 'net/iavf: fix potential out-of-bounds access' " luca.boccassi
34 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-09 16:30 UTC (permalink / raw)
To: Bing Zhao; +Cc: Matan Azrad, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/11/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b4de25642a7eb5c0f9111e1e5ad84935fa88e988
Thanks.
Luca Boccassi
---
From b4de25642a7eb5c0f9111e1e5ad84935fa88e988 Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@nvidia.com>
Date: Wed, 2 Mar 2022 09:57:35 +0200
Subject: [PATCH] net/mlx5: remove unused reference counter
[ upstream commit cff6aad7af61da8d31e146610f9b4a4875301ef4 ]
In the previous implementation, a count was used to record the number
of the references to a table resource, including the creation of the
table, the jumping to the table and the matchers created on the
table. Before releasing the table resource via the driver, it needed
to ensure that there is no reference to this table.
After the optimization of the resources management, the reference
count now is in the hash list entry as a unified solution for all the
resources management.
There is no need to keep the "refcnt" in the table resource
structure. It is removed in case that there is some unnecessary
memory overhead.
Fixes: afd7a62514ad ("net/mlx5: make flow table cache thread safe")
Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/mlx5.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 00713d6647..b18fffea52 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -585,7 +585,6 @@ union mlx5_flow_tbl_key {
/* Table structure. */
struct mlx5_flow_tbl_resource {
void *obj; /**< Pointer to DR table object. */
- uint32_t refcnt; /**< Reference counter. */
};
#define MLX5_MAX_TABLES UINT16_MAX
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-09 16:30:09.798729457 +0000
+++ 0034-net-mlx5-remove-unused-reference-counter.patch 2022-03-09 16:30:08.603026407 +0000
@@ -1 +1 @@
-From cff6aad7af61da8d31e146610f9b4a4875301ef4 Mon Sep 17 00:00:00 2001
+From b4de25642a7eb5c0f9111e1e5ad84935fa88e988 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cff6aad7af61da8d31e146610f9b4a4875301ef4 ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index 0f0045a2b5..dd5cd9209f 100644
+index 00713d6647..b18fffea52 100644
@@ -33 +34 @@
-@@ -993,7 +993,6 @@ union mlx5_flow_tbl_key {
+@@ -585,7 +585,6 @@ union mlx5_flow_tbl_key {
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/mlx5: fix MPLS/GRE Verbs spec ordering' has been queued to stable release 20.11.5
2022-03-09 16:30 ` patch 'app/compress-perf: fix cycle count operations allocation' " luca.boccassi
` (32 preceding siblings ...)
2022-03-09 16:30 ` patch 'net/mlx5: remove unused reference counter' " luca.boccassi
@ 2022-03-09 16:30 ` luca.boccassi
2022-03-09 16:30 ` patch 'net/iavf: fix potential out-of-bounds access' " luca.boccassi
34 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-09 16:30 UTC (permalink / raw)
To: Dariusz Sosnowski; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/11/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6b746a423fe910bb6cf0846c86f47674b735dbbf
Thanks.
Luca Boccassi
---
From 6b746a423fe910bb6cf0846c86f47674b735dbbf Mon Sep 17 00:00:00 2001
From: Dariusz Sosnowski <dsosnowski@nvidia.com>
Date: Wed, 2 Mar 2022 17:06:59 +0000
Subject: [PATCH] net/mlx5: fix MPLS/GRE Verbs spec ordering
[ upstream commit 98008ce6ec2f31c2e94c0eb39740c8178aeb8392 ]
When using Verbs flow engine to create flows, GRE Verbs spec was put at
the end of specs list. This created problems for flows matching MPLSoGRE
packets. In generated specs list MPLS spec was put before GRE spec, but
Verbs API requires that MPLS spec must be put in its exact location in
protocol stack.
This patch fixes this behavior. Space for GRE Verbs spec is reserved at
its exact location. MPLS Verbs is inserted at its exact location as
well. GRE spec is filled after all flow items are parsed.
Fixes: 985b479267aa ("net/mlx5: fix GRE protocol type translation for Verbs")
Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/mlx5_flow_verbs.c | 49 +++++++++++++++++++++++++++---
1 file changed, 44 insertions(+), 5 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c b/drivers/net/mlx5/mlx5_flow_verbs.c
index a0c6d23c6a..6a755e7c36 100644
--- a/drivers/net/mlx5/mlx5_flow_verbs.c
+++ b/drivers/net/mlx5/mlx5_flow_verbs.c
@@ -935,13 +935,48 @@ flow_verbs_item_gre_ip_protocol_update(struct ibv_flow_attr *attr,
}
}
+/**
+ * Reserve space for GRE spec in spec buffer.
+ *
+ * @param[in,out] dev_flow
+ * Pointer to dev_flow structure.
+ *
+ * @return
+ * Pointer to reserved space in spec buffer.
+ */
+static uint8_t *
+flow_verbs_reserve_gre(struct mlx5_flow *dev_flow)
+{
+ uint8_t *buffer;
+ struct mlx5_flow_verbs_workspace *verbs = &dev_flow->verbs;
+#ifndef HAVE_IBV_DEVICE_MPLS_SUPPORT
+ unsigned int size = sizeof(struct ibv_flow_spec_tunnel);
+ struct ibv_flow_spec_tunnel tunnel = {
+ .type = IBV_FLOW_SPEC_VXLAN_TUNNEL,
+ .size = size,
+ };
+#else
+ unsigned int size = sizeof(struct ibv_flow_spec_gre);
+ struct ibv_flow_spec_gre tunnel = {
+ .type = IBV_FLOW_SPEC_GRE,
+ .size = size,
+ };
+#endif
+
+ buffer = verbs->specs + verbs->size;
+ flow_verbs_spec_add(verbs, &tunnel, size);
+ return buffer;
+}
+
/**
* Convert the @p item into a Verbs specification. This function assumes that
- * the input is valid and that there is space to insert the requested item
- * into the flow.
+ * the input is valid and that Verbs specification will be placed in
+ * the pre-reserved space.
*
* @param[in, out] dev_flow
* Pointer to dev_flow structure.
+ * @param[in, out] gre_spec
+ * Pointer to space reserved for GRE spec.
* @param[in] item
* Item specification.
* @param[in] item_flags
@@ -949,6 +984,7 @@ flow_verbs_item_gre_ip_protocol_update(struct ibv_flow_attr *attr,
*/
static void
flow_verbs_translate_item_gre(struct mlx5_flow *dev_flow,
+ uint8_t *gre_spec,
const struct rte_flow_item *item __rte_unused,
uint64_t item_flags)
{
@@ -1002,7 +1038,8 @@ flow_verbs_translate_item_gre(struct mlx5_flow *dev_flow,
flow_verbs_item_gre_ip_protocol_update(&verbs->attr,
IBV_FLOW_SPEC_IPV6,
IPPROTO_GRE);
- flow_verbs_spec_add(verbs, &tunnel, size);
+ MLX5_ASSERT(gre_spec);
+ memcpy(gre_spec, &tunnel, size);
}
/**
@@ -1723,6 +1760,7 @@ flow_verbs_translate(struct rte_eth_dev *dev,
struct mlx5_flow_workspace *wks = mlx5_flow_get_thread_workspace();
struct mlx5_flow_rss_desc *rss_desc;
const struct rte_flow_item *tunnel_item = NULL;
+ uint8_t *gre_spec = NULL;
MLX5_ASSERT(wks);
rss_desc = &wks->rss_desc;
@@ -1860,6 +1898,7 @@ flow_verbs_translate(struct rte_eth_dev *dev,
item_flags |= MLX5_FLOW_LAYER_VXLAN_GPE;
break;
case RTE_FLOW_ITEM_TYPE_GRE:
+ gre_spec = flow_verbs_reserve_gre(dev_flow);
subpriority = MLX5_TUNNEL_PRIO_GET(rss_desc);
item_flags |= MLX5_FLOW_LAYER_GRE;
tunnel_item = items;
@@ -1877,8 +1916,8 @@ flow_verbs_translate(struct rte_eth_dev *dev,
}
}
if (item_flags & MLX5_FLOW_LAYER_GRE)
- flow_verbs_translate_item_gre(dev_flow, tunnel_item,
- item_flags);
+ flow_verbs_translate_item_gre(dev_flow, gre_spec,
+ tunnel_item, item_flags);
dev_flow->handle->layers = item_flags;
/* Other members of attr will be ignored. */
dev_flow->verbs.attr.priority =
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-09 16:30:09.831062928 +0000
+++ 0035-net-mlx5-fix-MPLS-GRE-Verbs-spec-ordering.patch 2022-03-09 16:30:08.603026407 +0000
@@ -1 +1 @@
-From 98008ce6ec2f31c2e94c0eb39740c8178aeb8392 Mon Sep 17 00:00:00 2001
+From 6b746a423fe910bb6cf0846c86f47674b735dbbf Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 98008ce6ec2f31c2e94c0eb39740c8178aeb8392 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 85f0788222..fd902078f8 100644
+index a0c6d23c6a..6a755e7c36 100644
@@ -29 +30 @@
-@@ -882,13 +882,48 @@ flow_verbs_item_gre_ip_protocol_update(struct ibv_flow_attr *attr,
+@@ -935,13 +935,48 @@ flow_verbs_item_gre_ip_protocol_update(struct ibv_flow_attr *attr,
@@ -80 +81 @@
-@@ -896,6 +931,7 @@ flow_verbs_item_gre_ip_protocol_update(struct ibv_flow_attr *attr,
+@@ -949,6 +984,7 @@ flow_verbs_item_gre_ip_protocol_update(struct ibv_flow_attr *attr,
@@ -88 +89 @@
-@@ -949,7 +985,8 @@ flow_verbs_translate_item_gre(struct mlx5_flow *dev_flow,
+@@ -1002,7 +1038,8 @@ flow_verbs_translate_item_gre(struct mlx5_flow *dev_flow,
@@ -98 +99 @@
-@@ -1680,6 +1717,7 @@ flow_verbs_translate(struct rte_eth_dev *dev,
+@@ -1723,6 +1760,7 @@ flow_verbs_translate(struct rte_eth_dev *dev,
@@ -106 +107 @@
-@@ -1817,6 +1855,7 @@ flow_verbs_translate(struct rte_eth_dev *dev,
+@@ -1860,6 +1898,7 @@ flow_verbs_translate(struct rte_eth_dev *dev,
@@ -114 +115 @@
-@@ -1834,8 +1873,8 @@ flow_verbs_translate(struct rte_eth_dev *dev,
+@@ -1877,8 +1916,8 @@ flow_verbs_translate(struct rte_eth_dev *dev,
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/iavf: fix potential out-of-bounds access' has been queued to stable release 20.11.5
2022-03-09 16:30 ` patch 'app/compress-perf: fix cycle count operations allocation' " luca.boccassi
` (33 preceding siblings ...)
2022-03-09 16:30 ` patch 'net/mlx5: fix MPLS/GRE Verbs spec ordering' " luca.boccassi
@ 2022-03-09 16:30 ` luca.boccassi
34 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-09 16:30 UTC (permalink / raw)
To: Leyi Rong; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/11/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/0c41b6164a61495b57976c5b26f240785e7eebc4
Thanks.
Luca Boccassi
---
From 0c41b6164a61495b57976c5b26f240785e7eebc4 Mon Sep 17 00:00:00 2001
From: Leyi Rong <leyi.rong@intel.com>
Date: Tue, 8 Mar 2022 13:56:17 +0800
Subject: [PATCH] net/iavf: fix potential out-of-bounds access
[ upstream commit d78d21b983f215d1425422f955cbd934e48360d3 ]
Fix potential out-of-bounds access as overrunning callee's array of
size 26 by passing argument rxq->rxdid(which evaluates to 63) in call
to iavf_rx_scan_hw_ring_flex_rxd.
Coverity issue: 376616
Fixes: 0ed16e01313e ("net/iavf: fix function pointer in multi-process")
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
drivers/net/iavf/iavf_rxtx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index 6243199f2a..c8fa912b99 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -440,7 +440,7 @@ iavf_rxd_to_pkt_fields_by_comms_aux_v2(struct iavf_rx_queue *rxq,
}
static const
-iavf_rxd_to_pkt_fields_t rxd_to_pkt_fields_ops[] = {
+iavf_rxd_to_pkt_fields_t rxd_to_pkt_fields_ops[IAVF_RXDID_LAST + 1] = {
[IAVF_RXDID_COMMS_AUX_VLAN] = iavf_rxd_to_pkt_fields_by_comms_aux_v1,
[IAVF_RXDID_COMMS_AUX_IPV4] = iavf_rxd_to_pkt_fields_by_comms_aux_v1,
[IAVF_RXDID_COMMS_AUX_IPV6] = iavf_rxd_to_pkt_fields_by_comms_aux_v1,
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-09 16:30:09.863355704 +0000
+++ 0036-net-iavf-fix-potential-out-of-bounds-access.patch 2022-03-09 16:30:08.607026496 +0000
@@ -1 +1 @@
-From d78d21b983f215d1425422f955cbd934e48360d3 Mon Sep 17 00:00:00 2001
+From 0c41b6164a61495b57976c5b26f240785e7eebc4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d78d21b983f215d1425422f955cbd934e48360d3 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index cb779879cb..16e8d021f9 100644
+index 6243199f2a..c8fa912b99 100644
@@ -24 +25 @@
-@@ -476,7 +476,7 @@ iavf_rxd_to_pkt_fields_by_comms_aux_v2(struct iavf_rx_queue *rxq,
+@@ -440,7 +440,7 @@ iavf_rxd_to_pkt_fields_by_comms_aux_v2(struct iavf_rx_queue *rxq,
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'vhost: fix queue number check when setting inflight FD' has been queued to stable release 20.11.5
[not found] <20220218123931.1749595-1-luca.boccassi@gmail.com>
` (121 preceding siblings ...)
2022-03-09 16:30 ` patch 'app/compress-perf: fix cycle count operations allocation' " luca.boccassi
@ 2022-03-15 13:32 ` luca.boccassi
2022-03-15 13:32 ` patch 'vhost: fix FD leak with inflight messages' " luca.boccassi
` (7 more replies)
122 siblings, 8 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-15 13:32 UTC (permalink / raw)
To: Chenbo Xia; +Cc: Wenxiang Qian, Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/17/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/9bac6ad8620073470cceba5848150102b0b9ed19
Thanks.
Luca Boccassi
---
From 9bac6ad8620073470cceba5848150102b0b9ed19 Mon Sep 17 00:00:00 2001
From: Chenbo Xia <chenbo.xia@intel.com>
Date: Mon, 14 Feb 2022 16:32:37 +0800
Subject: [PATCH] vhost: fix queue number check when setting inflight FD
[ upstream commit 6442c329b9d2ded0f44b27d2016aaba8ba5844c5 ]
In function vhost_user_set_inflight_fd, queue number in inflight
message is used to access virtqueue. However, queue number could
be larger than VHOST_MAX_VRING and cause write OOB as this number
will be used to write inflight info in virtqueue structure. This
patch checks the queue number to avoid the issue and also make
sure virtqueues are allocated before setting inflight information.
Fixes: ad0a4ae491fe ("vhost: checkout resubmit inflight information")
Reported-by: Wenxiang Qian <leonwxqian@gmail.com>
Signed-off-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
lib/librte_vhost/vhost_user.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 11d58113a7..c829ce95fb 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -2692,6 +2692,9 @@ vhost_user_check_and_alloc_queue_pair(struct virtio_net *dev,
case VHOST_USER_SET_VRING_ADDR:
vring_idx = msg->payload.addr.index;
break;
+ case VHOST_USER_SET_INFLIGHT_FD:
+ vring_idx = msg->payload.inflight.num_queues - 1;
+ break;
default:
return 0;
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-15 12:13:39.104683513 +0000
+++ 0001-vhost-fix-queue-number-check-when-setting-inflight-F.patch 2022-03-15 12:13:39.024180007 +0000
@@ -1 +1 @@
-From 6442c329b9d2ded0f44b27d2016aaba8ba5844c5 Mon Sep 17 00:00:00 2001
+From 9bac6ad8620073470cceba5848150102b0b9ed19 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6442c329b9d2ded0f44b27d2016aaba8ba5844c5 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
- lib/vhost/vhost_user.c | 3 +++
+ lib/librte_vhost/vhost_user.c | 3 +++
@@ -23,5 +24,5 @@
-diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
-index 589b950458..1ec4357bee 100644
---- a/lib/vhost/vhost_user.c
-+++ b/lib/vhost/vhost_user.c
-@@ -2883,6 +2883,9 @@ vhost_user_check_and_alloc_queue_pair(struct virtio_net *dev,
+diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
+index 11d58113a7..c829ce95fb 100644
+--- a/lib/librte_vhost/vhost_user.c
++++ b/lib/librte_vhost/vhost_user.c
+@@ -2692,6 +2692,9 @@ vhost_user_check_and_alloc_queue_pair(struct virtio_net *dev,
@@ -29 +30 @@
- vring_idx = ctx->msg.payload.addr.index;
+ vring_idx = msg->payload.addr.index;
@@ -32 +33 @@
-+ vring_idx = ctx->msg.payload.inflight.num_queues - 1;
++ vring_idx = msg->payload.inflight.num_queues - 1;
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'vhost: fix FD leak with inflight messages' has been queued to stable release 20.11.5
2022-03-15 13:32 ` patch 'vhost: fix queue number check when setting inflight FD' " luca.boccassi
@ 2022-03-15 13:32 ` luca.boccassi
2022-03-15 13:32 ` patch 'net/mlx5: fix sample flow action on trusted device' " luca.boccassi
` (6 subsequent siblings)
7 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-15 13:32 UTC (permalink / raw)
To: David Marchand; +Cc: Maxime Coquelin, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/17/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/8c3269273e80eeefc680ce41257a07e79bad8372
Thanks.
Luca Boccassi
---
From 8c3269273e80eeefc680ce41257a07e79bad8372 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 18 Jan 2022 15:53:30 +0100
Subject: [PATCH] vhost: fix FD leak with inflight messages
[ upstream commit af74f7db384ed149fe42b21dbd7975f8a54ef227 ]
Even if unlikely, a buggy vhost-user master might attach fds to inflight
messages. Add checks like for other types of vhost-user messages.
Fixes: d87f1a1cb7b6 ("vhost: support inflight info sharing")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
lib/librte_vhost/vhost_user.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index c829ce95fb..fbb854dad0 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -1450,6 +1450,9 @@ vhost_user_get_inflight_fd(struct virtio_net **pdev,
int fd, i, j;
void *addr;
+ if (validate_msg_fds(msg, 0) != 0)
+ return RTE_VHOST_MSG_RESULT_ERR;
+
if (msg->size != sizeof(msg->payload.inflight)) {
VHOST_LOG_CONFIG(ERR,
"invalid get_inflight_fd message size is %d\n",
@@ -1543,6 +1546,9 @@ vhost_user_set_inflight_fd(struct virtio_net **pdev, VhostUserMsg *msg,
void *addr;
int fd, i;
+ if (validate_msg_fds(msg, 1) != 0)
+ return RTE_VHOST_MSG_RESULT_ERR;
+
fd = msg->fds[0];
if (msg->size != sizeof(msg->payload.inflight) || fd < 0) {
VHOST_LOG_CONFIG(ERR,
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-15 12:13:39.134833210 +0000
+++ 0002-vhost-fix-FD-leak-with-inflight-messages.patch 2022-03-15 12:13:39.028180097 +0000
@@ -1 +1 @@
-From af74f7db384ed149fe42b21dbd7975f8a54ef227 Mon Sep 17 00:00:00 2001
+From 8c3269273e80eeefc680ce41257a07e79bad8372 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit af74f7db384ed149fe42b21dbd7975f8a54ef227 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -15 +16 @@
- lib/vhost/vhost_user.c | 6 ++++++
+ lib/librte_vhost/vhost_user.c | 6 ++++++
@@ -18,6 +19,6 @@
-diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
-index 1ec4357bee..1d390677fa 100644
---- a/lib/vhost/vhost_user.c
-+++ b/lib/vhost/vhost_user.c
-@@ -1602,6 +1602,9 @@ vhost_user_get_inflight_fd(struct virtio_net **pdev,
- int numa_node = SOCKET_ID_ANY;
+diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
+index c829ce95fb..fbb854dad0 100644
+--- a/lib/librte_vhost/vhost_user.c
++++ b/lib/librte_vhost/vhost_user.c
+@@ -1450,6 +1450,9 @@ vhost_user_get_inflight_fd(struct virtio_net **pdev,
+ int fd, i, j;
@@ -26 +27 @@
-+ if (validate_msg_fds(dev, ctx, 0) != 0)
++ if (validate_msg_fds(msg, 0) != 0)
@@ -29,4 +30,5 @@
- if (ctx->msg.size != sizeof(ctx->msg.payload.inflight)) {
- VHOST_LOG_CONFIG(ERR, "(%s) invalid get_inflight_fd message size is %d\n",
- dev->ifname, ctx->msg.size);
-@@ -1699,6 +1702,9 @@ vhost_user_set_inflight_fd(struct virtio_net **pdev,
+ if (msg->size != sizeof(msg->payload.inflight)) {
+ VHOST_LOG_CONFIG(ERR,
+ "invalid get_inflight_fd message size is %d\n",
+@@ -1543,6 +1546,9 @@ vhost_user_set_inflight_fd(struct virtio_net **pdev, VhostUserMsg *msg,
+ void *addr;
@@ -34 +35,0 @@
- int numa_node = SOCKET_ID_ANY;
@@ -36 +37 @@
-+ if (validate_msg_fds(dev, ctx, 1) != 0)
++ if (validate_msg_fds(msg, 1) != 0)
@@ -39,3 +40,3 @@
- fd = ctx->fds[0];
- if (ctx->msg.size != sizeof(ctx->msg.payload.inflight) || fd < 0) {
- VHOST_LOG_CONFIG(ERR, "(%s) invalid set_inflight_fd message size is %d,fd is %d\n",
+ fd = msg->fds[0];
+ if (msg->size != sizeof(msg->payload.inflight) || fd < 0) {
+ VHOST_LOG_CONFIG(ERR,
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/mlx5: fix sample flow action on trusted device' has been queued to stable release 20.11.5
2022-03-15 13:32 ` patch 'vhost: fix queue number check when setting inflight FD' " luca.boccassi
2022-03-15 13:32 ` patch 'vhost: fix FD leak with inflight messages' " luca.boccassi
@ 2022-03-15 13:32 ` luca.boccassi
2022-03-15 13:32 ` patch 'bpf: fix build with some libpcap version on FreeBSD' " luca.boccassi
` (5 subsequent siblings)
7 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-15 13:32 UTC (permalink / raw)
To: Jiawei Wang; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/17/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/63f156544d23447479047add796cd0e333e30924
Thanks.
Luca Boccassi
---
From 63f156544d23447479047add796cd0e333e30924 Mon Sep 17 00:00:00 2001
From: Jiawei Wang <jiaweiw@nvidia.com>
Date: Wed, 9 Mar 2022 12:19:46 +0200
Subject: [PATCH] net/mlx5: fix sample flow action on trusted device
[ upstream commit 9a726360dd3010a4c664e37682826b68a0a7f7fe ]
A flow rule with sample action will be split into two sub flows,
and a tag action was added implicitly in the sample prefix sub flow,
the reserved metadata regC index was used for this tag action.
The reserved metadata regC was shared with metering action,
for ConnectX-5 trusted device (VF/SF), the reserved metadata regC was
invalid since PF only supported the legacy metering.
This patch adds the checking for the tag index and back to use the
application tag if a failure happened.
Fixes: a9b6ea45bed6 ("net/mlx5: fix tag ID conflict with sample action")
Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
doc/guides/nics/mlx5.rst | 2 ++
drivers/net/mlx5/mlx5_flow.c | 6 ++++++
drivers/net/mlx5/mlx5_flow_dv.c | 8 ++++++++
3 files changed, 16 insertions(+)
diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
index d76c3178dc..9322c5327a 100644
--- a/doc/guides/nics/mlx5.rst
+++ b/doc/guides/nics/mlx5.rst
@@ -325,6 +325,8 @@ Limitations
- Supports ``RTE_FLOW_ACTION_TYPE_SAMPLE`` action only within NIC Rx and E-Switch steering domain.
- The E-Switch Sample flow must have the eswitch_manager VPORT destination (PF or ECPF) and no additional actions.
- For ConnectX-5, the ``RTE_FLOW_ACTION_TYPE_SAMPLE`` is typically used as first action in the E-Switch egress flow if with header modify or encapsulation actions.
+ - For ConnectX-5 trusted device, the application metadata with SET_TAG index 0
+ is not supported before ``RTE_FLOW_ACTION_TYPE_SAMPLE`` action.
- IPv6 header item 'proto' field, indicating the next header protocol, should
not be set as extension header.
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 56db0217b9..bed853e726 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -4779,6 +4779,12 @@ flow_sample_split_prep(struct rte_eth_dev *dev,
/* Prepare the prefix tag action. */
set_tag = (void *)(actions_pre + actions_n + 1);
ret = mlx5_flow_get_reg_id(dev, MLX5_SAMPLE_ID, 0, error);
+ /* Trust VF/SF on CX5 not supported meter so that the reserved
+ * metadata regC is REG_NON, back to use application tag
+ * index 0.
+ */
+ if (unlikely(ret == REG_NON))
+ ret = mlx5_flow_get_reg_id(dev, MLX5_APP_TAG, 0, error);
if (ret < 0)
return ret;
set_tag->id = ret;
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 44f975c9c9..2d0e239d4d 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -5335,6 +5335,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
.std_tbl_fix = true,
};
const struct rte_eth_hairpin_conf *conf;
+ uint32_t tag_id = 0;
if (items == NULL)
return -1;
@@ -5730,6 +5731,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
/* Count all modify-header actions as one action. */
if (!(action_flags & MLX5_FLOW_MODIFY_HDR_ACTIONS))
++actions_n;
+ tag_id = ((const struct rte_flow_action_set_tag *)
+ actions->conf)->index;
action_flags |= MLX5_FLOW_ACTION_SET_TAG;
rw_act_num += MLX5_ACT_NUM_SET_TAG;
break;
@@ -6103,6 +6106,11 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
error);
if (ret < 0)
return ret;
+ if ((action_flags & MLX5_FLOW_ACTION_SET_TAG) &&
+ tag_id == 0 && priv->mtr_color_reg == REG_NON)
+ return rte_flow_error_set(error, EINVAL,
+ RTE_FLOW_ERROR_TYPE_ACTION, NULL,
+ "sample after tag action causes metadata tag index 0 corruption");
action_flags |= MLX5_FLOW_ACTION_SAMPLE;
++actions_n;
break;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-15 12:13:39.171041049 +0000
+++ 0003-net-mlx5-fix-sample-flow-action-on-trusted-device.patch 2022-03-15 12:13:39.056180722 +0000
@@ -1 +1 @@
-From 9a726360dd3010a4c664e37682826b68a0a7f7fe Mon Sep 17 00:00:00 2001
+From 63f156544d23447479047add796cd0e333e30924 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9a726360dd3010a4c664e37682826b68a0a7f7fe ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index a734d10d3f..ca7ebbe9cd 100644
+index d76c3178dc..9322c5327a 100644
@@ -32,4 +33,4 @@
-@@ -400,6 +400,8 @@ Limitations
- sample actions list.
- - For E-Switch mirroring flow, supports ``RAW ENCAP``, ``Port ID``,
- ``VXLAN ENCAP``, ``NVGRE ENCAP`` in the sample actions list.
+@@ -325,6 +325,8 @@ Limitations
+ - Supports ``RTE_FLOW_ACTION_TYPE_SAMPLE`` action only within NIC Rx and E-Switch steering domain.
+ - The E-Switch Sample flow must have the eswitch_manager VPORT destination (PF or ECPF) and no additional actions.
+ - For ConnectX-5, the ``RTE_FLOW_ACTION_TYPE_SAMPLE`` is typically used as first action in the E-Switch egress flow if with header modify or encapsulation actions.
@@ -39,2 +40,2 @@
- - Modify Field flow:
-
+ - IPv6 header item 'proto' field, indicating the next header protocol, should
+ not be set as extension header.
@@ -42 +43 @@
-index ffcaef0baa..e2bc6ce8ad 100644
+index 56db0217b9..bed853e726 100644
@@ -45,3 +46,3 @@
-@@ -5881,6 +5881,12 @@ flow_sample_split_prep(struct rte_eth_dev *dev,
- append_index++;
- set_tag = (void *)(actions_pre + actions_n + append_index);
+@@ -4779,6 +4779,12 @@ flow_sample_split_prep(struct rte_eth_dev *dev,
+ /* Prepare the prefix tag action. */
+ set_tag = (void *)(actions_pre + actions_n + 1);
@@ -57 +58 @@
- mlx5_ipool_malloc(priv->sh->ipool
+ set_tag->id = ret;
@@ -59 +60 @@
-index 1746ef37bd..d553e9dee3 100644
+index 44f975c9c9..2d0e239d4d 100644
@@ -62,4 +63,4 @@
-@@ -6913,6 +6913,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
- bool def_policy = false;
- bool shared_count = false;
- uint16_t udp_dport = 0;
+@@ -5335,6 +5335,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+ .std_tbl_fix = true,
+ };
+ const struct rte_eth_hairpin_conf *conf;
@@ -70 +71,3 @@
-@@ -7389,6 +7390,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -5730,6 +5731,8 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+ /* Count all modify-header actions as one action. */
+ if (!(action_flags & MLX5_FLOW_MODIFY_HDR_ACTIONS))
@@ -72,2 +74,0 @@
- if (action_flags & MLX5_FLOW_ACTION_SAMPLE)
- modify_after_mirror = 1;
@@ -79 +80 @@
-@@ -7823,6 +7826,11 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -6103,6 +6106,11 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'bpf: fix build with some libpcap version on FreeBSD' has been queued to stable release 20.11.5
2022-03-15 13:32 ` patch 'vhost: fix queue number check when setting inflight FD' " luca.boccassi
2022-03-15 13:32 ` patch 'vhost: fix FD leak with inflight messages' " luca.boccassi
2022-03-15 13:32 ` patch 'net/mlx5: fix sample flow action on trusted device' " luca.boccassi
@ 2022-03-15 13:32 ` luca.boccassi
2022-03-15 13:32 ` patch 'app/testpmd: fix show RSS RETA on Windows' " luca.boccassi
` (4 subsequent siblings)
7 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-15 13:32 UTC (permalink / raw)
To: David Marchand; +Cc: Stephen Hemminger, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/17/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6fc2a8d4995a9cb8f6b5fae192c643e634910e6c
Thanks.
Luca Boccassi
---
From 6fc2a8d4995a9cb8f6b5fae192c643e634910e6c Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 10 Mar 2022 19:30:40 +0100
Subject: [PATCH] bpf: fix build with some libpcap version on FreeBSD
[ upstream commit 63f39a430a0a7a8b893ffbf88cd452dbc7b97c97 ]
This is something caught in UNH FreeBSD env.
For some reason [1], the pcap/bpf.h header started to define _BPF_H_.
It happens that the bpf_impl.h internal DPDK header uses this define as
an internal guard.
This triggers a build failure in bpf_convert.c which can't find
RTE_BPF_LOG macro.
Fix the include guard to use the filename and remove _.
1: https://github.com/the-tcpdump-group/libpcap/pull/1074
Fixes: 94972f35a02e ("bpf: add BPF loading and execution framework")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/librte_bpf/bpf_impl.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/librte_bpf/bpf_impl.h b/lib/librte_bpf/bpf_impl.h
index 03ba0ae112..8f5dd10212 100644
--- a/lib/librte_bpf/bpf_impl.h
+++ b/lib/librte_bpf/bpf_impl.h
@@ -2,8 +2,8 @@
* Copyright(c) 2018 Intel Corporation
*/
-#ifndef _BPF_H_
-#define _BPF_H_
+#ifndef BPF_IMPL_H
+#define BPF_IMPL_H
#include <rte_bpf.h>
#include <sys/mman.h>
@@ -51,4 +51,4 @@ bpf_size(uint32_t bpf_op_sz)
}
#endif
-#endif /* _BPF_H_ */
+#endif /* BPF_IMPL_H */
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-15 12:13:39.235277359 +0000
+++ 0004-bpf-fix-build-with-some-libpcap-version-on-FreeBSD.patch 2022-03-15 12:13:39.056180722 +0000
@@ -1 +1 @@
-From 63f39a430a0a7a8b893ffbf88cd452dbc7b97c97 Mon Sep 17 00:00:00 2001
+From 6fc2a8d4995a9cb8f6b5fae192c643e634910e6c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 63f39a430a0a7a8b893ffbf88cd452dbc7b97c97 ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
- lib/bpf/bpf_impl.h | 6 +++---
+ lib/librte_bpf/bpf_impl.h | 6 +++---
@@ -28,4 +29,4 @@
-diff --git a/lib/bpf/bpf_impl.h b/lib/bpf/bpf_impl.h
-index 26d165ad5c..b4d8e87c6d 100644
---- a/lib/bpf/bpf_impl.h
-+++ b/lib/bpf/bpf_impl.h
+diff --git a/lib/librte_bpf/bpf_impl.h b/lib/librte_bpf/bpf_impl.h
+index 03ba0ae112..8f5dd10212 100644
+--- a/lib/librte_bpf/bpf_impl.h
++++ b/lib/librte_bpf/bpf_impl.h
@@ -43,2 +44 @@
-@@ -43,4 +43,4 @@ bpf_size(uint32_t bpf_op_sz)
- return 0;
+@@ -51,4 +51,4 @@ bpf_size(uint32_t bpf_op_sz)
@@ -45,0 +46 @@
+ #endif
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'app/testpmd: fix show RSS RETA on Windows' has been queued to stable release 20.11.5
2022-03-15 13:32 ` patch 'vhost: fix queue number check when setting inflight FD' " luca.boccassi
` (2 preceding siblings ...)
2022-03-15 13:32 ` patch 'bpf: fix build with some libpcap version on FreeBSD' " luca.boccassi
@ 2022-03-15 13:32 ` luca.boccassi
2022-03-15 13:32 ` patch 'examples/l3fwd: fix buffer overflow in Tx' " luca.boccassi
` (3 subsequent siblings)
7 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-15 13:32 UTC (permalink / raw)
To: Adham Masarwah; +Cc: Aman Singh, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/17/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/63f7788b203edea7dd970bcf2bb21f82267eb306
Thanks.
Luca Boccassi
---
From 63f7788b203edea7dd970bcf2bb21f82267eb306 Mon Sep 17 00:00:00 2001
From: Adham Masarwah <adham@nvidia.com>
Date: Sun, 13 Mar 2022 14:57:02 +0200
Subject: [PATCH] app/testpmd: fix show RSS RETA on Windows
[ upstream commit 5aae2723cddba81b179162b5e7e4f6bd429eaac5 ]
Replaced using strtoul with strtoull when converting to
64-bit mask field.
In Windows strtoul returns 32-bit values which cause an
issue with show RSS RETA.
Fixes: 66c594904ac ("ethdev: support multiple sizes of redirection table")
Signed-off-by: Adham Masarwah <adham@nvidia.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
---
app/test-pmd/cmdline.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 9dfd0dcfab..1741d00ba8 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -3021,7 +3021,7 @@ showport_parse_reta_config(struct rte_eth_rss_reta_entry64 *conf,
return -1;
}
for (i = 0; i < ret; i++)
- conf[i].mask = (uint64_t)strtoul(str_fld[i], &end, 0);
+ conf[i].mask = (uint64_t)strtoull(str_fld[i], &end, 0);
return 0;
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-15 12:13:39.267218737 +0000
+++ 0005-app-testpmd-fix-show-RSS-RETA-on-Windows.patch 2022-03-15 12:13:39.072181080 +0000
@@ -1 +1 @@
-From 5aae2723cddba81b179162b5e7e4f6bd429eaac5 Mon Sep 17 00:00:00 2001
+From 63f7788b203edea7dd970bcf2bb21f82267eb306 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5aae2723cddba81b179162b5e7e4f6bd429eaac5 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 7ab0575e64..6ffea8e21a 100644
+index 9dfd0dcfab..1741d00ba8 100644
@@ -24 +25 @@
-@@ -3127,7 +3127,7 @@ showport_parse_reta_config(struct rte_eth_rss_reta_entry64 *conf,
+@@ -3021,7 +3021,7 @@ showport_parse_reta_config(struct rte_eth_rss_reta_entry64 *conf,
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'examples/l3fwd: fix buffer overflow in Tx' has been queued to stable release 20.11.5
2022-03-15 13:32 ` patch 'vhost: fix queue number check when setting inflight FD' " luca.boccassi
` (3 preceding siblings ...)
2022-03-15 13:32 ` patch 'app/testpmd: fix show RSS RETA on Windows' " luca.boccassi
@ 2022-03-15 13:32 ` luca.boccassi
2022-03-15 13:32 ` patch 'eal/freebsd: add missing C++ include guards' " luca.boccassi
` (2 subsequent siblings)
7 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-15 13:32 UTC (permalink / raw)
To: Rahul Bhansali; +Cc: Conor Walsh, Konstantin Ananyev, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/17/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/dd8a8529443a7ade2ddb3b2d365d6f73eba87451
Thanks.
Luca Boccassi
---
From dd8a8529443a7ade2ddb3b2d365d6f73eba87451 Mon Sep 17 00:00:00 2001
From: Rahul Bhansali <rbhansali@marvell.com>
Date: Tue, 11 Jan 2022 18:20:05 +0530
Subject: [PATCH] examples/l3fwd: fix buffer overflow in Tx
[ upstream commit 0490d69d58d9d75c37e780966c837a062658f528 ]
This patch fixes the stack buffer overflow error reported
from AddressSanitizer.
Function send_packetsx4() tries to access out of bound data
from rte_mbuf and fill it into TX buffer even in the case
where no pending packets (len = 0).
Performance impact:- No
ASAN error report:-
==819==ERROR: AddressSanitizer: stack-buffer-overflow on address
0xffffe2c0dcf0 at pc 0x0000005e791c bp 0xffffe2c0d7e0 sp 0xffffe2c0d800
READ of size 8 at 0xffffe2c0dcf0 thread T0
#0 0x5e7918 in send_packetsx4 ../examples/l3fwd/l3fwd_common.h:251
#1 0x5e7918 in send_packets_multi ../examples/l3fwd/l3fwd_neon.h:226
Fixes: 96ff445371e0 ("examples/l3fwd: reorganise and optimize LPM code path")
Signed-off-by: Rahul Bhansali <rbhansali@marvell.com>
Reviewed-by: Conor Walsh <conor.walsh@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
examples/l3fwd/l3fwd_common.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/examples/l3fwd/l3fwd_common.h b/examples/l3fwd/l3fwd_common.h
index cbaab79f5b..8e4c27218f 100644
--- a/examples/l3fwd/l3fwd_common.h
+++ b/examples/l3fwd/l3fwd_common.h
@@ -236,6 +236,9 @@ send_packetsx4(struct lcore_conf *qconf, uint16_t port, struct rte_mbuf *m[],
/* copy rest of the packets into the TX buffer. */
len = num - n;
+ if (len == 0)
+ goto exit;
+
j = 0;
switch (len % FWDSTEP) {
while (j < len) {
@@ -258,6 +261,7 @@ send_packetsx4(struct lcore_conf *qconf, uint16_t port, struct rte_mbuf *m[],
}
}
+exit:
qconf->tx_mbufs[port].len = len;
}
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-15 12:13:39.317400562 +0000
+++ 0006-examples-l3fwd-fix-buffer-overflow-in-Tx.patch 2022-03-15 12:13:39.072181080 +0000
@@ -1 +1 @@
-From 0490d69d58d9d75c37e780966c837a062658f528 Mon Sep 17 00:00:00 2001
+From dd8a8529443a7ade2ddb3b2d365d6f73eba87451 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0490d69d58d9d75c37e780966c837a062658f528 ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'eal/freebsd: add missing C++ include guards' has been queued to stable release 20.11.5
2022-03-15 13:32 ` patch 'vhost: fix queue number check when setting inflight FD' " luca.boccassi
` (4 preceding siblings ...)
2022-03-15 13:32 ` patch 'examples/l3fwd: fix buffer overflow in Tx' " luca.boccassi
@ 2022-03-15 13:32 ` luca.boccassi
2022-03-15 13:32 ` patch 'compressdev: fix missing space in log macro' " luca.boccassi
2022-03-15 13:32 ` patch 'cryptodev: fix clang C++ include' " luca.boccassi
7 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-15 13:32 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/17/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/eca0c20f67d02cfae989826fd63ef6a034ba0048
Thanks.
Luca Boccassi
---
From eca0c20f67d02cfae989826fd63ef6a034ba0048 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 11 Mar 2022 20:05:19 +0000
Subject: [PATCH] eal/freebsd: add missing C++ include guards
[ upstream commit 29fd052dcc3be76112bc7b03a918308ebcf901d8 ]
Add missing 'extern "C"' to file.
Fixes: 428eb983f5f7 ("eal: add OS specific header file")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
lib/librte_eal/freebsd/include/rte_os.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/lib/librte_eal/freebsd/include/rte_os.h b/lib/librte_eal/freebsd/include/rte_os.h
index 627f0483ab..81a32387a0 100644
--- a/lib/librte_eal/freebsd/include/rte_os.h
+++ b/lib/librte_eal/freebsd/include/rte_os.h
@@ -5,6 +5,10 @@
#ifndef _RTE_OS_H_
#define _RTE_OS_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* This header should contain any definition
* which is not supported natively or named differently in FreeBSD.
@@ -49,4 +53,8 @@ typedef cpuset_t rte_cpuset_t;
} while (0)
#endif
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _RTE_OS_H_ */
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-15 12:13:39.350106682 +0000
+++ 0007-eal-freebsd-add-missing-C-include-guards.patch 2022-03-15 12:13:39.072181080 +0000
@@ -1 +1 @@
-From 29fd052dcc3be76112bc7b03a918308ebcf901d8 Mon Sep 17 00:00:00 2001
+From eca0c20f67d02cfae989826fd63ef6a034ba0048 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 29fd052dcc3be76112bc7b03a918308ebcf901d8 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -13 +14 @@
- lib/eal/freebsd/include/rte_os.h | 8 ++++++++
+ lib/librte_eal/freebsd/include/rte_os.h | 8 ++++++++
@@ -16,4 +17,4 @@
-diff --git a/lib/eal/freebsd/include/rte_os.h b/lib/eal/freebsd/include/rte_os.h
-index 9d8a69008c..b4afd45adc 100644
---- a/lib/eal/freebsd/include/rte_os.h
-+++ b/lib/eal/freebsd/include/rte_os.h
+diff --git a/lib/librte_eal/freebsd/include/rte_os.h b/lib/librte_eal/freebsd/include/rte_os.h
+index 627f0483ab..81a32387a0 100644
+--- a/lib/librte_eal/freebsd/include/rte_os.h
++++ b/lib/librte_eal/freebsd/include/rte_os.h
@@ -31 +32 @@
-@@ -59,4 +63,8 @@ typedef cpuset_t rte_cpuset_t;
+@@ -49,4 +53,8 @@ typedef cpuset_t rte_cpuset_t;
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'compressdev: fix missing space in log macro' has been queued to stable release 20.11.5
2022-03-15 13:32 ` patch 'vhost: fix queue number check when setting inflight FD' " luca.boccassi
` (5 preceding siblings ...)
2022-03-15 13:32 ` patch 'eal/freebsd: add missing C++ include guards' " luca.boccassi
@ 2022-03-15 13:32 ` luca.boccassi
2022-03-15 13:32 ` patch 'cryptodev: fix clang C++ include' " luca.boccassi
7 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-15 13:32 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/17/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b16e4220e96caef4843c1006fc1e9bc25fbc794a
Thanks.
Luca Boccassi
---
From b16e4220e96caef4843c1006fc1e9bc25fbc794a Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 11 Mar 2022 20:05:21 +0000
Subject: [PATCH] compressdev: fix missing space in log macro
[ upstream commit dfb90fbe6b2b11ecf3535286c8d418ba8cc5485c ]
Building with clang on FreeBSD with chkincs enabled, we get the
following error about a missing space:
lib/compressdev/rte_compressdev_internal.h:25:58: error:
invalid suffix on literal;
C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]
rte_log(RTE_LOG_ ## level, compressdev_logtype, "%s(): "fmt "\n", \
Adding in a space between the '"' and 'fmt' removes the error.
Fixes: ed7dd94f7f66 ("compressdev: add basic device management")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
lib/librte_compressdev/rte_compressdev_internal.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_compressdev/rte_compressdev_internal.h b/lib/librte_compressdev/rte_compressdev_internal.h
index 25d8afbfb9..b3b193e3ee 100644
--- a/lib/librte_compressdev/rte_compressdev_internal.h
+++ b/lib/librte_compressdev/rte_compressdev_internal.h
@@ -22,7 +22,7 @@ extern "C" {
/* Logging Macros */
extern int compressdev_logtype;
#define COMPRESSDEV_LOG(level, fmt, args...) \
- rte_log(RTE_LOG_ ## level, compressdev_logtype, "%s(): "fmt "\n", \
+ rte_log(RTE_LOG_ ## level, compressdev_logtype, "%s(): " fmt "\n", \
__func__, ##args)
/**
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-15 12:13:39.385931703 +0000
+++ 0008-compressdev-fix-missing-space-in-log-macro.patch 2022-03-15 12:13:39.072181080 +0000
@@ -1 +1 @@
-From dfb90fbe6b2b11ecf3535286c8d418ba8cc5485c Mon Sep 17 00:00:00 2001
+From b16e4220e96caef4843c1006fc1e9bc25fbc794a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit dfb90fbe6b2b11ecf3535286c8d418ba8cc5485c ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
- lib/compressdev/rte_compressdev_internal.h | 2 +-
+ lib/librte_compressdev/rte_compressdev_internal.h | 2 +-
@@ -24 +25 @@
-diff --git a/lib/compressdev/rte_compressdev_internal.h b/lib/compressdev/rte_compressdev_internal.h
+diff --git a/lib/librte_compressdev/rte_compressdev_internal.h b/lib/librte_compressdev/rte_compressdev_internal.h
@@ -26,2 +27,2 @@
---- a/lib/compressdev/rte_compressdev_internal.h
-+++ b/lib/compressdev/rte_compressdev_internal.h
+--- a/lib/librte_compressdev/rte_compressdev_internal.h
++++ b/lib/librte_compressdev/rte_compressdev_internal.h
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'cryptodev: fix clang C++ include' has been queued to stable release 20.11.5
2022-03-15 13:32 ` patch 'vhost: fix queue number check when setting inflight FD' " luca.boccassi
` (6 preceding siblings ...)
2022-03-15 13:32 ` patch 'compressdev: fix missing space in log macro' " luca.boccassi
@ 2022-03-15 13:32 ` luca.boccassi
2022-03-17 12:06 ` patch 'net/mlx5: fix port matching in sample flow rule' " luca.boccassi
7 siblings, 1 reply; 228+ messages in thread
From: luca.boccassi @ 2022-03-15 13:32 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/17/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/975469beaa9b81eb743814f4af786f14e3f67e49
Thanks.
Luca Boccassi
---
From 975469beaa9b81eb743814f4af786f14e3f67e49 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 11 Mar 2022 20:05:22 +0000
Subject: [PATCH] cryptodev: fix clang C++ include
[ upstream commit 1763c91b06ca65bbb8516f47b97cffe1cac97dde ]
When compiling on FreeBSD with clang and include checking enabled,
errors are emitted due to differences in how empty structs/unions are
handled in C and C++, as C++ structs cannot have zero size.
lib/cryptodev/rte_crypto.h:127:2: error:
union has size 0 in C, non-zero size in C++
Since the contents of the union are all themselves of zero size,
the actual union wrapper is unnecessary. We therefore remove it for C++
builds - though keep it for C builds for safety and clarity of
understanding the code.
Fixes: c0f87eb5252b ("cryptodev: change burst API to be crypto op oriented")
Fixes: d2a4223c4c6d ("cryptodev: do not store pointer to op specific params")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
lib/librte_cryptodev/rte_crypto.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/lib/librte_cryptodev/rte_crypto.h b/lib/librte_cryptodev/rte_crypto.h
index fd5ef3a876..2ba12cff2e 100644
--- a/lib/librte_cryptodev/rte_crypto.h
+++ b/lib/librte_cryptodev/rte_crypto.h
@@ -113,15 +113,24 @@ struct rte_crypto_op {
rte_iova_t phys_addr;
/**< physical address of crypto operation */
+/* empty structures do not have zero size in C++ leading to compilation errors
+ * with clang about structure/union having different sizes in C and C++.
+ * While things are clearer with an explicit union, since each field is
+ * zero-sized it's not actually needed, so omit it for C++
+ */
+#ifndef __cplusplus
__extension__
union {
+#endif
struct rte_crypto_sym_op sym[0];
/**< Symmetric operation parameters */
struct rte_crypto_asym_op asym[0];
/**< Asymmetric operation parameters */
+#ifndef __cplusplus
}; /**< operation specific parameters */
+#endif
};
/**
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-15 12:13:39.419845871 +0000
+++ 0009-cryptodev-fix-clang-C-include.patch 2022-03-15 12:13:39.076181169 +0000
@@ -1 +1 @@
-From 1763c91b06ca65bbb8516f47b97cffe1cac97dde Mon Sep 17 00:00:00 2001
+From 975469beaa9b81eb743814f4af786f14e3f67e49 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1763c91b06ca65bbb8516f47b97cffe1cac97dde ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
- lib/cryptodev/rte_crypto.h | 9 +++++++++
+ lib/librte_cryptodev/rte_crypto.h | 9 +++++++++
@@ -27,5 +28,5 @@
-diff --git a/lib/cryptodev/rte_crypto.h b/lib/cryptodev/rte_crypto.h
-index a864f5036f..aeb3bf6e38 100644
---- a/lib/cryptodev/rte_crypto.h
-+++ b/lib/cryptodev/rte_crypto.h
-@@ -123,15 +123,24 @@ struct rte_crypto_op {
+diff --git a/lib/librte_cryptodev/rte_crypto.h b/lib/librte_cryptodev/rte_crypto.h
+index fd5ef3a876..2ba12cff2e 100644
+--- a/lib/librte_cryptodev/rte_crypto.h
++++ b/lib/librte_cryptodev/rte_crypto.h
+@@ -113,15 +113,24 @@ struct rte_crypto_op {
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'net/mlx5: fix port matching in sample flow rule' has been queued to stable release 20.11.5
2022-03-15 13:32 ` patch 'cryptodev: fix clang C++ include' " luca.boccassi
@ 2022-03-17 12:06 ` luca.boccassi
2022-03-17 12:06 ` patch 'doc: replace characters for (R) symbol in Linux guide' " luca.boccassi
` (2 more replies)
0 siblings, 3 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-17 12:06 UTC (permalink / raw)
To: Jiawei Wang; +Cc: Viacheslav Ovsiienko, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/19/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/1d25333ce0a0b615ee571078a7b3f270beb306d9
Thanks.
Luca Boccassi
---
From 1d25333ce0a0b615ee571078a7b3f270beb306d9 Mon Sep 17 00:00:00 2001
From: Jiawei Wang <jiaweiw@nvidia.com>
Date: Mon, 7 Mar 2022 04:10:42 +0200
Subject: [PATCH] net/mlx5: fix port matching in sample flow rule
[ upstream commit 04c0d3f20f54618c2b62f353b31b5a2fb20d687a ]
If there are an explicit port match and sample action in the same flow,
mlx5 PMD pushes the explicit port match in the prefix subflow, and
uses the tag item match in the suffix subflow.
The explicit port match was translated into source vport match so
the sample suffix subflow lost this match after flow split.
This patch copies the explicit port match to the sample suffix subflow,
and the latter gets the correct source vport value in the flow matcher.
Fixes: b4c0ddbfcc58 ("net/mlx5: split sample flow into two sub-flows")
Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/mlx5_flow.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index bed853e726..cee8bc3418 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -4714,7 +4714,7 @@ flow_check_match_action(const struct rte_flow_action actions[],
return flag ? actions_n + 1 : 0;
}
-#define SAMPLE_SUFFIX_ITEM 2
+#define SAMPLE_SUFFIX_ITEM 3
/**
* Split the sample flow.
@@ -4753,6 +4753,7 @@ flow_check_match_action(const struct rte_flow_action actions[],
static int
flow_sample_split_prep(struct rte_eth_dev *dev,
uint32_t fdb_tx,
+ const struct rte_flow_item items[],
struct rte_flow_item sfx_items[],
const struct rte_flow_action actions[],
struct rte_flow_action actions_sfx[],
@@ -4792,6 +4793,12 @@ flow_sample_split_prep(struct rte_eth_dev *dev,
[MLX5_IPOOL_RSS_EXPANTION_FLOW_ID], &tag_id);
set_tag->data = tag_id;
/* Prepare the suffix subflow items. */
+ for (; items->type != RTE_FLOW_ITEM_TYPE_END; items++) {
+ if (items->type == RTE_FLOW_ITEM_TYPE_PORT_ID) {
+ memcpy(sfx_items, items, sizeof(*sfx_items));
+ sfx_items++;
+ }
+ }
tag_spec = (void *)(sfx_items + SAMPLE_SUFFIX_ITEM);
tag_spec->data = tag_id;
tag_spec->id = set_tag->id;
@@ -5263,7 +5270,7 @@ flow_create_split_sample(struct rte_eth_dev *dev,
sfx_items = (struct rte_flow_item *)((char *)sfx_actions
+ act_size);
pre_actions = sfx_actions + actions_n;
- tag_id = flow_sample_split_prep(dev, fdb_tx, sfx_items,
+ tag_id = flow_sample_split_prep(dev, fdb_tx, items, sfx_items,
actions, sfx_actions,
pre_actions, actions_n,
sample_action_pos,
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-17 12:05:30.337012733 +0000
+++ 0001-net-mlx5-fix-port-matching-in-sample-flow-rule.patch 2022-03-17 12:05:30.300855283 +0000
@@ -1 +1 @@
-From 04c0d3f20f54618c2b62f353b31b5a2fb20d687a Mon Sep 17 00:00:00 2001
+From 1d25333ce0a0b615ee571078a7b3f270beb306d9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 04c0d3f20f54618c2b62f353b31b5a2fb20d687a ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index cd55bdc2c0..78cb38d42b 100644
+index bed853e726..cee8bc3418 100644
@@ -29 +30 @@
-@@ -5783,7 +5783,7 @@ flow_check_match_action(const struct rte_flow_action actions[],
+@@ -4714,7 +4714,7 @@ flow_check_match_action(const struct rte_flow_action actions[],
@@ -38 +39 @@
-@@ -5824,6 +5824,7 @@ flow_check_match_action(const struct rte_flow_action actions[],
+@@ -4753,6 +4753,7 @@ flow_check_match_action(const struct rte_flow_action actions[],
@@ -41 +42 @@
- int add_tag,
+ uint32_t fdb_tx,
@@ -46,3 +47,3 @@
-@@ -5951,6 +5952,12 @@ flow_sample_split_prep(struct rte_eth_dev *dev,
- .data = tag_id,
- };
+@@ -4792,6 +4793,12 @@ flow_sample_split_prep(struct rte_eth_dev *dev,
+ [MLX5_IPOOL_RSS_EXPANTION_FLOW_ID], &tag_id);
+ set_tag->data = tag_id;
@@ -59,3 +60,3 @@
-@@ -6563,7 +6570,7 @@ flow_create_split_sample(struct rte_eth_dev *dev,
- jump_table = attr->group * MLX5_FLOW_TABLE_FACTOR +
- next_ft_step;
+@@ -5263,7 +5270,7 @@ flow_create_split_sample(struct rte_eth_dev *dev,
+ sfx_items = (struct rte_flow_item *)((char *)sfx_actions
+ + act_size);
@@ -63,2 +64,2 @@
-- tag_id = flow_sample_split_prep(dev, add_tag, sfx_items,
-+ tag_id = flow_sample_split_prep(dev, add_tag, items, sfx_items,
+- tag_id = flow_sample_split_prep(dev, fdb_tx, sfx_items,
++ tag_id = flow_sample_split_prep(dev, fdb_tx, items, sfx_items,
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'doc: replace characters for (R) symbol in Linux guide' has been queued to stable release 20.11.5
2022-03-17 12:06 ` patch 'net/mlx5: fix port matching in sample flow rule' " luca.boccassi
@ 2022-03-17 12:06 ` luca.boccassi
2022-03-17 12:06 ` patch 'doc: fix missing note on UIO module " luca.boccassi
2022-03-17 12:06 ` patch 'raw/ifpga: fix build with optimization' " luca.boccassi
2 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-17 12:06 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/19/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/5bc5bab0dc396b444e963bba02bd0dd7ed9938e8
Thanks.
Luca Boccassi
---
From 5bc5bab0dc396b444e963bba02bd0dd7ed9938e8 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Wed, 16 Mar 2022 13:45:43 +0000
Subject: [PATCH] doc: replace characters for (R) symbol in Linux guide
[ upstream commit c265d58619e7fc0f72441faafec56a2a8633a15b ]
Some IDEs, such as eclipse, complained on save about the use of special
characters in the (R) symbol in linux GSG doc. We can replace those with
the equivalent "|reg|" text, and including isonum.txt.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
doc/guides/linux_gsg/enable_func.rst | 8 +++++---
doc/guides/linux_gsg/linux_drivers.rst | 6 ++++--
doc/guides/linux_gsg/sys_reqs.rst | 6 ++++--
3 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/doc/guides/linux_gsg/enable_func.rst b/doc/guides/linux_gsg/enable_func.rst
index 7bd6b03f10..25f87f6b1a 100644
--- a/doc/guides/linux_gsg/enable_func.rst
+++ b/doc/guides/linux_gsg/enable_func.rst
@@ -1,6 +1,8 @@
.. SPDX-License-Identifier: BSD-3-Clause
Copyright(c) 2010-2014 Intel Corporation.
+.. include:: <isonum.txt>
+
.. _Enabling_Additional_Functionality:
Enabling Additional Functionality
@@ -119,15 +121,15 @@ system objects' permissions should be adjusted:
Power Management and Power Saving Functionality
-----------------------------------------------
-Enhanced Intel SpeedStep® Technology must be enabled in the platform BIOS if the power management feature of DPDK is to be used.
+Enhanced Intel SpeedStep\ |reg| Technology must be enabled in the platform BIOS if the power management feature of DPDK is to be used.
Otherwise, the sys file folder ``/sys/devices/system/cpu/cpu0/cpufreq`` will not exist, and the CPU frequency- based power management cannot be used.
Consult the relevant BIOS documentation to determine how these settings can be accessed.
-For example, on some Intel reference platform BIOS variants, the path to Enhanced Intel SpeedStep® Technology is::
+For example, on some Intel reference platform BIOS variants, the path to Enhanced Intel SpeedStep\ |reg| Technology is::
Advanced
-> Processor Configuration
- -> Enhanced Intel SpeedStep® Tech
+ -> Enhanced Intel SpeedStep\ |reg| Tech
In addition, C3 and C6 should be enabled as well for power management. The path of C3 and C6 on the same platform BIOS is::
diff --git a/doc/guides/linux_gsg/linux_drivers.rst b/doc/guides/linux_gsg/linux_drivers.rst
index c6b6881ea2..bacfd552ab 100644
--- a/doc/guides/linux_gsg/linux_drivers.rst
+++ b/doc/guides/linux_gsg/linux_drivers.rst
@@ -3,6 +3,8 @@
Copyright 2017 Mellanox Technologies, Ltd
All rights reserved.
+.. include:: <isonum.txt>
+
.. _linux_gsg_linux_drivers:
Linux Drivers
@@ -93,7 +95,7 @@ The token will be used for all PF and VF ports within the application.
To make use of full VFIO functionality,
both kernel and BIOS must support and be configured
-to use IO virtualization (such as Intel® VT-d).
+to use IO virtualization (such as Intel\ |reg| VT-d).
.. note::
@@ -329,7 +331,7 @@ Please refer to earlier sections on how to configure kernel parameters
correctly for your system.
If the kernel is configured correctly, one also has to make sure that
-the BIOS configuration has virtualization features (such as Intel® VT-d).
+the BIOS configuration has virtualization features (such as Intel\ |reg| VT-d).
There is no standard way to check if the platform is configured correctly,
so please check with your platform documentation to see if it has such features,
and how to enable them.
diff --git a/doc/guides/linux_gsg/sys_reqs.rst b/doc/guides/linux_gsg/sys_reqs.rst
index be714adf22..50a86d5a2e 100644
--- a/doc/guides/linux_gsg/sys_reqs.rst
+++ b/doc/guides/linux_gsg/sys_reqs.rst
@@ -1,6 +1,8 @@
.. SPDX-License-Identifier: BSD-3-Clause
Copyright(c) 2010-2014 Intel Corporation.
+.. include:: <isonum.txt>
+
System Requirements
===================
@@ -66,10 +68,10 @@ Compilation of the DPDK
**Optional Tools:**
-* Intel® C++ Compiler (icc). For installation, additional libraries may be required.
+* Intel\ |reg| C++ Compiler (icc). For installation, additional libraries may be required.
See the icc Installation Guide found in the Documentation directory under the compiler installation.
-* IBM® Advance ToolChain for Powerlinux. This is a set of open source development tools and runtime libraries
+* IBM\ |reg| Advance ToolChain for Powerlinux. This is a set of open source development tools and runtime libraries
which allows users to take leading edge advantage of IBM's latest POWER hardware features on Linux. To install
it, see the IBM official installation document.
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-17 12:05:30.378137942 +0000
+++ 0002-doc-replace-characters-for-R-symbol-in-Linux-guide.patch 2022-03-17 12:05:30.300855283 +0000
@@ -1 +1 @@
-From c265d58619e7fc0f72441faafec56a2a8633a15b Mon Sep 17 00:00:00 2001
+From 5bc5bab0dc396b444e963bba02bd0dd7ed9938e8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c265d58619e7fc0f72441faafec56a2a8633a15b ]
+
@@ -10,2 +11,0 @@
-Cc: stable@dpdk.org
-
@@ -20 +20 @@
-index 44c3b05130..1df3ab0255 100644
+index 7bd6b03f10..25f87f6b1a 100644
@@ -32 +32 @@
-@@ -66,15 +68,15 @@ system objects' permissions should be adjusted:
+@@ -119,15 +121,15 @@ system objects' permissions should be adjusted:
@@ -52 +52 @@
-index 006a9df83e..ef6fec10d7 100644
+index c6b6881ea2..bacfd552ab 100644
@@ -64 +64 @@
-@@ -99,7 +101,7 @@ The token will be used for all PF and VF ports within the application.
+@@ -93,7 +95,7 @@ The token will be used for all PF and VF ports within the application.
@@ -73 +73 @@
-@@ -335,7 +337,7 @@ Please refer to earlier sections on how to configure kernel parameters
+@@ -329,7 +331,7 @@ Please refer to earlier sections on how to configure kernel parameters
@@ -83 +83 @@
-index b2eacac6dc..08d45898f0 100644
+index be714adf22..50a86d5a2e 100644
@@ -95 +95 @@
-@@ -68,10 +70,10 @@ Compilation of the DPDK
+@@ -66,10 +68,10 @@ Compilation of the DPDK
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'doc: fix missing note on UIO module in Linux guide' has been queued to stable release 20.11.5
2022-03-17 12:06 ` patch 'net/mlx5: fix port matching in sample flow rule' " luca.boccassi
2022-03-17 12:06 ` patch 'doc: replace characters for (R) symbol in Linux guide' " luca.boccassi
@ 2022-03-17 12:06 ` luca.boccassi
2022-03-17 12:06 ` patch 'raw/ifpga: fix build with optimization' " luca.boccassi
2 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-17 12:06 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/19/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/c93d1201cc433a2666ac8a1c37d7172c666aedb7
Thanks.
Luca Boccassi
---
From c93d1201cc433a2666ac8a1c37d7172c666aedb7 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Wed, 16 Mar 2022 13:45:44 +0000
Subject: [PATCH] doc: fix missing note on UIO module in Linux guide
[ upstream commit b421909ce7c42109ebb3236275793b1c7fd3394e ]
The docs on binding drivers was updated as part of the removal of the
igb_uio module from the main DPDK repo. As part of that update, a note
about uio_pci_generic requiring legacy interrupts was removed, but
should have been kept.
Fixes: 56bb5841fd06 ("kernel/linux: remove igb_uio")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
doc/guides/linux_gsg/linux_drivers.rst | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/doc/guides/linux_gsg/linux_drivers.rst b/doc/guides/linux_gsg/linux_drivers.rst
index bacfd552ab..67ab9009a9 100644
--- a/doc/guides/linux_gsg/linux_drivers.rst
+++ b/doc/guides/linux_gsg/linux_drivers.rst
@@ -168,6 +168,11 @@ It can be loaded as shown below:
sudo modprobe uio
sudo insmod igb_uio.ko
+.. note::
+
+ For some devices which lack support for legacy interrupts, e.g. virtual function
+ (VF) devices, the ``igb_uio`` module may be needed in place of ``uio_pci_generic``.
+
.. note::
If UEFI secure boot is enabled,
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-17 12:05:30.411335455 +0000
+++ 0003-doc-fix-missing-note-on-UIO-module-in-Linux-guide.patch 2022-03-17 12:05:30.300855283 +0000
@@ -1 +1 @@
-From b421909ce7c42109ebb3236275793b1c7fd3394e Mon Sep 17 00:00:00 2001
+From c93d1201cc433a2666ac8a1c37d7172c666aedb7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b421909ce7c42109ebb3236275793b1c7fd3394e ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index ef6fec10d7..bd983b4d81 100644
+index bacfd552ab..67ab9009a9 100644
@@ -23 +24 @@
-@@ -174,6 +174,11 @@ It can be loaded as shown below:
+@@ -168,6 +168,11 @@ It can be loaded as shown below:
^ permalink raw reply [flat|nested] 228+ messages in thread
* patch 'raw/ifpga: fix build with optimization' has been queued to stable release 20.11.5
2022-03-17 12:06 ` patch 'net/mlx5: fix port matching in sample flow rule' " luca.boccassi
2022-03-17 12:06 ` patch 'doc: replace characters for (R) symbol in Linux guide' " luca.boccassi
2022-03-17 12:06 ` patch 'doc: fix missing note on UIO module " luca.boccassi
@ 2022-03-17 12:06 ` luca.boccassi
2 siblings, 0 replies; 228+ messages in thread
From: luca.boccassi @ 2022-03-17 12:06 UTC (permalink / raw)
To: Wei Huang; +Cc: Tianfei Zhang, Rosen Xu, dpdk stable
Hi,
FYI, your patch has been queued to stable release 20.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/19/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/5cb14d74366f08f666e12ec0d8b2e03bcf144812
Thanks.
Luca Boccassi
---
From 5cb14d74366f08f666e12ec0d8b2e03bcf144812 Mon Sep 17 00:00:00 2001
From: Wei Huang <wei.huang@intel.com>
Date: Wed, 16 Mar 2022 03:26:30 -0400
Subject: [PATCH] raw/ifpga: fix build with optimization
[ upstream commit 047c25401d2b4001e7e20200a5ec05868a113290 ]
Compile failed with cflag optimization=1 on Ubuntu20.04 with GCC10.3,
it reported vendor_id and dev_id may be used uninitialized in function
ifpga_rawdev_fill_info().
Actually it's not the truth, the variables are initialized in function
ifpga_get_dev_vendor_id(). To avoid such compile error, the variables
are initialized when they are defined.
Fixes: 9c006c45d0c5 ("raw/ifpga: scan PCIe BDF device tree")
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/ifpga_rawdev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c
index e04b791561..cc6223cb28 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.c
+++ b/drivers/raw/ifpga/ifpga_rawdev.c
@@ -225,7 +225,8 @@ static int ifpga_rawdev_fill_info(struct ifpga_rawdev *ifpga_dev)
unsigned int dom, bus, dev;
int func;
- uint32_t dev_id, vendor_id;
+ uint32_t dev_id = 0;
+ uint32_t vendor_id = 0;
adapter = ifpga_dev ? ifpga_rawdev_get_priv(ifpga_dev->rawdev) : NULL;
if (!adapter)
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-17 12:05:30.443495190 +0000
+++ 0004-raw-ifpga-fix-build-with-optimization.patch 2022-03-17 12:05:30.304855371 +0000
@@ -1 +1 @@
-From 047c25401d2b4001e7e20200a5ec05868a113290 Mon Sep 17 00:00:00 2001
+From 5cb14d74366f08f666e12ec0d8b2e03bcf144812 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 047c25401d2b4001e7e20200a5ec05868a113290 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 26c1366a64..6d4117c5e8 100644
+index e04b791561..cc6223cb28 100644
^ permalink raw reply [flat|nested] 228+ messages in thread