Rashmi Shetty [Tue, 7 Dec 2021 23:01:51 +0000 (17:01 -0600)]
doc: fix dlb2 guide
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") Cc: stable@dpdk.org Signed-off-by: Rashmi Shetty <rashmi.shetty@intel.com> Reviewed-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
David Marchand [Thu, 20 Jan 2022 10:54:21 +0000 (11:54 +0100)]
build: remove custom dependency checks in drivers
Some drivers currently have their own checks and give some non
consistent reasons when an internal dependency is unavailable.
drivers/meson.build also checks for internal dependencies via 'deps'.
Let's rely on it for consistency, and smaller code.
Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Long Li <longli@microsoft.com>
Bruce Richardson [Wed, 19 Jan 2022 18:10:01 +0000 (18:10 +0000)]
build: make "packet framework" optional
Add port, table and pipeline libraries - collectively often known as
the "packet framework" - to the list of optional libraries, and
ensure tests can build with them disabled.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Morten Brørup <mb@smartsharesystems.com> Acked-by: David Marchand <david.marchand@redhat.com>
Bruce Richardson [Wed, 19 Jan 2022 18:09:58 +0000 (18:09 +0000)]
test: link against all enabled libs
Rather than maintaining a list of the libraries the unit tests need, and
having to conditionally include/omit optional libs from the list, we can
just link against all available libraries, simplifying the code
considerably.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Morten Brørup <mb@smartsharesystems.com> Acked-by: David Marchand <david.marchand@redhat.com>
Bruce Richardson [Wed, 19 Jan 2022 18:09:57 +0000 (18:09 +0000)]
build: allow recursive disabling of libraries
Align the code in lib/meson.build with that in drivers/meson.build to
enable recursive disabling of libraries, i.e. if library b depends on
library a, disable library b if a is disabled (either explicitly or
implicitly). This allows libraries to be optional even if other DPDK
libs depend on them, something that was not previously possible.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Morten Brørup <mb@smartsharesystems.com> Acked-by: David Marchand <david.marchand@redhat.com>
Ruifeng Wang [Thu, 20 Jan 2022 02:38:00 +0000 (10:38 +0800)]
config: add arch define for Arm
As per design document, RTE_ARCH is the name of the architecture.
However, the definition was missing on Arm with meson build.
It impacts applications that refers to this string.
Added for Arm builds.
Fixes: b1d48c41189a ("build: support ARM with meson") Cc: stable@dpdk.org Reported-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Bruce Richardson [Tue, 11 Jan 2022 13:41:04 +0000 (13:41 +0000)]
dma/idxd: fix wrap-around in burst capacity calculation
The burst capacity calculation code assumes that the write and read
(i.e. ids_returned) values both wrap at the ring-size, but the read
value instead wraps as UINT16_MAX. Therefore, instead of just adding
ring-size to the write value in case the read is greater, we need to
just always mask the result to ensure a correct, in-range, value.
Fixes: 9459de4edc99 ("dma/idxd: add burst capacity") Cc: stable@dpdk.org Reported-by: Sunil Pai G <sunil.pai.g@intel.com> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Tested-by: Sunil Pai G <sunil.pai.g@intel.com> Acked-by: Kevin Laatz <kevin.laatz@intel.com>
Bruce Richardson [Tue, 11 Jan 2022 13:41:03 +0000 (13:41 +0000)]
dma/idxd: fix paths to driver sysfs directory
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.
Fixes: 01863b9d2354 ("raw/ioat: include example configuration script") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Kevin Laatz <kevin.laatz@intel.com>
Bruce Richardson [Tue, 11 Jan 2022 13:41:02 +0000 (13:41 +0000)]
dma/idxd: fix burst capacity calculation
When the maximum burst size supported by HW is less than the available
ring space, incorrect capacity was returned when there was already some
jobs queued up for submission. This was because the capacity calculation
failed to subtract the number of already-enqueued jobs from the max
burst size. After subtraction is done, ensure that any negative values
(which should never occur if the user respects the reported limits), are
clamped to zero.
Fixes: 9459de4edc99 ("dma/idxd: add burst capacity") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Kevin Laatz <kevin.laatz@intel.com> Tested-by: Jiayu Hu <jiayu.hu@intel.com>
Bruce Richardson [Thu, 16 Dec 2021 15:21:07 +0000 (15:21 +0000)]
eal: add OS defines for C conditional checks
Define a set of macros in the build configuration to allow C runtime
code to check the current OS environment. This saves the user having to
use ifdefs for e.g. disabling particular tests on Windows.
See included documentation changes for usage examples.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> Acked-by: Jerin Jacob <jerinj@marvell.com>
Ferruh Yigit [Mon, 1 Nov 2021 13:35:32 +0000 (13:35 +0000)]
devtools: remove ugly workaround from get maintainer
Linux kernel 'get_maintainer.pl' script supports running out of Linux
tree since commit 31bb82c9caa9 ("get_maintainer: allow usage outside of kernel tree")
As commit is a few years old now, integrating it to DPDK and removing
ugly workaround for it.
Bruce Richardson [Wed, 22 Dec 2021 15:18:55 +0000 (15:18 +0000)]
doc: remove dependency on findutils on FreeBSD
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") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Python 3.5 subprocess.run() does not have a capture_output
parameter (it is present only in 3.7 and up).
Capture output by using subprocess.PIPE for stdout instead.
Jerin Jacob [Sat, 11 Dec 2021 09:04:35 +0000 (14:34 +0530)]
drivers: remove octeontx2 drivers
As per the deprecation notice, In the view of enabling unified driver
for octeontx2(cn9k)/octeontx3(cn10k), removing drivers/octeontx2
drivers and replace with drivers/cnxk/ which
supports both octeontx2(cn9k) and octeontx3(cn10k) SoCs.
This patch does the following
- Replace drivers/common/octeontx2/ with drivers/common/cnxk/
- Replace drivers/mempool/octeontx2/ with drivers/mempool/cnxk/
- Replace drivers/net/octeontx2/ with drivers/net/cnxk/
- Replace drivers/event/octeontx2/ with drivers/event/cnxk/
- Replace drivers/crypto/octeontx2/ with drivers/crypto/cnxk/
- Rename config/arm/arm64_octeontx2_linux_gcc as
config/arm/arm64_cn9k_linux_gcc
- Update the documentation and MAINTAINERS to reflect the same.
- Change the reference to OCTEONTX2 as OCTEON 9. Old release notes and
the kernel related documentation is not accounted for this change.
Signed-off-by: Jerin Jacob <jerinj@marvell.com> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com> Acked-by: Akhil Goyal <gakhil@marvell.com> Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
Kevin Traynor [Mon, 13 Dec 2021 16:48:58 +0000 (16:48 +0000)]
doc: update LTS release cadence
Regular LTS releases have previously aligned to DPDK main branch
releases so that fixes being backported have already gone through
DPDK main branch release validation.
Now that DPDK main branch has moved to 3 releases per year, the LTS
releases should continue to align with it and follow a similar release
cadence.
Update stable docs to reflect this.
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Thomas Monjalon [Tue, 11 Jan 2022 11:35:44 +0000 (12:35 +0100)]
doc: replace deprecated distutils version parsing
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 Cc: stable@dpdk.org Reported-by: Jerin Jacob <jerinj@marvell.com> Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Tested-by: Jerin Jacob <jerinj@marvell.com>
ethdev: announce migration to generic flow modify action
The generic RTE_FLOW_ACTION_TYPE_MODIFY_FIELD action was
introduced by [1]. This action provides an unified way
to perform various arithmetic and transfer operations over
packet network header fields and packet metadata.
The VLAN set actions are interrelated to VLAN header insertion/removal
and supported by multiple PMDs and widely used by applications and
not supposed to be deprecated due to potential large impact on
drivers and applications.
Aman Singh [Tue, 23 Nov 2021 08:47:19 +0000 (14:17 +0530)]
devtools/cocci: add script for ethdev namespace change
The cocci script is to help add prefix 'RTE_ETH' namespace to enum
& macro of ethdev library. It helps in automating these changes for
applications. The script won't make changes in the code comment part.
Usage: spatch <script path> <app path>
Signed-off-by: Aman Singh <aman.deep.singh@intel.com> Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Aaron Conole [Fri, 15 Oct 2021 17:06:04 +0000 (13:06 -0400)]
doc: add a guide for developing unit tests
The DPDK testing infrastructure includes a comprehensive set of
libraries, utilities, and CI integrations for developers to test
their code changes. This isn't well documented, however.
Document the basics for adding a test suite to the infrastructure
and enabling that test suite for continuous integration platforms
so that newer developers can understand how to develop test suites
and test cases.
Signed-off-by: Aaron Conole <aconole@redhat.com> Acked-by: Ciara Power <ciara.power@intel.com> Acked-by: Fan Zhang <roy.fan.zhang@intel.com> Acked-by: John McNamara <john.mcnamara@intel.com>
Jerin Jacob [Sat, 7 Aug 2021 08:21:08 +0000 (13:51 +0530)]
doc: add traffic metering API walk-through
Added a diagram to document meter library components
and added text for steps performed by the application to
configure the traffic meter and policing library.
Signed-off-by: Jerin Jacob <jerinj@marvell.com> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Michael Baum [Thu, 25 Nov 2021 06:16:55 +0000 (08:16 +0200)]
net/mlx5: fix devargs validation for multi-class probing
The mlx5_args function reads the devargs and checks if they are valid
for this driver and if not it returns an error.
This was normal behavior as long as all the devargs come to this driver,
but since it is possible to run several drivers together, the function
may return an error for another driver's devarg even though it is
completely valid.
In addition the function does not allow the user to know which of the
devargs is incorrect, but returns an error without printing the
unknown devarg.
This patch eliminates the error return in the case of an unknown devarg,
and prints a warning for each such devarg specifically.
Fixes: 7b4f1e6bd367 ("common/mlx5: introduce common library") Cc: stable@dpdk.org Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
Dmitry Kozlyuk [Thu, 25 Nov 2021 20:20:44 +0000 (22:20 +0200)]
common/mlx5: fix memory region lookup on slow path
Memory region (MR) was being looked up incorrectly
for the data address of an externally-attached mbuf.
A search was attempted for the mempool of the mbuf,
while mbuf data address does not belong to this mempool
in case of externally-attached mbuf.
Only attempt the search:
1) for not externally-attached mbufs;
2) for mbufs coming from MPRQ mempool;
3) for externally-attached mbufs from mempools
with pinned external buffers.
Michael Baum [Thu, 25 Nov 2021 08:18:29 +0000 (10:18 +0200)]
compress/mlx5: fix double close of device context
The context of the device opens once in the common probe and closes with
its removal.
If the probe of one of the drivers fails, it releases its resources and
then the common closes the context.
But mistakenly in the compress probe, if there isn't enough capabilities
to support compress operations, it closes the device and then common
probe closes it again.
Remove the redundant closing from compress probe.
Fixes: 2efd26544554 ("compress/mlx5: support partial transformation") Cc: stable@dpdk.org Signed-off-by: Michael Baum <michaelba@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
CPT -> Cryptographic Accelerator Unit
CQ -> Completion Queue
LBK -> Loopback Interface Unit
LMT -> Large Atomic Store Unit
MCAM -> Match Content Addressable Memory
NIX -> Network Interface Controller Unit
NPA -> Network Pool Allocator
NPC -> Network Parser and CAM Unit
ROC -> Rest Of Chip
RQ -> Receive Queue
RVU -> Resource Virtualization Unit
SQ -> Send Queue
SSO -> Schedule Synchronize Order Unit
TIM -> Timer Unit
Suggested-by: Ferruh Yigit <ferruh.yigit@intel.com> Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com> Reviewed-by: Jerin Jacob <jerinj@marvell.com>
Bruce Richardson [Wed, 20 Oct 2021 14:26:01 +0000 (15:26 +0100)]
devtools: clarify that lines up to 100 characters are ok
Since we allow line lengths of up to 100, and the CI checkpatches job
only check for that amount, the rest of our tooling and docs should
reflect this reality. Therefore we can:
* adjust the editorconfig to use that value, to save editors (e.g. vim)
from automatically wrapping lines at 80 characters when typing.
[Since python checkers all seem to expect 79 character lines max, add
for python only a 79-char max line length.]
* change the default line length setting in checkpatches script to 100
so as it matches CI and pre-merge checks.
* update the docs to clarify that while 80 chars is recommended, up to
100 characters is acceptable.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> Acked-by: Jerin Jacob <jerinj@marvell.com> Acked-by: Chenbo Xia <chenbo.xia@intel.com> Acked-by: Chengwen Feng <fengchengwen@huawei.com> Acked-by: Conor Walsh <conor.walsh@intel.com> Acked-by: Thomas Monjalon <thomas@monjalon.net>
net/mlx5: fix shared Rx queue segment configuration match
While joining the shared Rx queue to the existing queue group,
the queue configurations is checked to be the same as it was
specified in the first group queue creation - all shared
queues should be created with identical configurations.
During the Rx queue creation the buffer split segment
configuration can be altered - the zero segment sizes are
substituted with the actual ones, inherited from the pools,
number of segments can be extended to cover the maximal
packet length, etc. It means the actual queue segment
configuration can not be used directly to match the
configuration provided in the queue setup call.
To resolve an issue we should store original parameters
in the shared queue structure and perform the check against
one of these stored ones.
net/mlx5: fix GENEVE and VXLAN-GPE flow item matching
GENEVE and VXLAN-GPE item matching is done similarly to GRE matching.
Users can skip the specification of the protocol type and expect that
this type is deducted from the inner header type automatically.
But the inner header type may not be specified in order to match all the
protocol types. In this case, PMD should not specify the protocol type.
Check if we have the inner header type before setting the protocol type.
Fixes: 690391dd0e8b ("net/mlx5: fix GENEVE protocol type translation") Fixes: 861fa3796f75 ("net/mlx5: fix VXLAN-GPE next protocol translation") Cc: stable@dpdk.org Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
GRE protocol type is implicitly set in the matching translation in case
an application doesn't specify any type explicitly in a flow rule.
It is extracted from the inner header type, but this type may be absent.
In this case, GRE item matching is broken. Check if we have the inner
header type before setting it to allow matching on all GRE packets.
Fixes: be26e81bfc1c ("net/mlx5: fix GRE protocol type translation") Cc: stable@dpdk.org Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Dmitry Kozlyuk [Wed, 24 Nov 2021 09:40:30 +0000 (11:40 +0200)]
net/mlx5: fix Rx queue reference count for indirect RSS
mlx5_ind_table_obj_modify() was not changing the reference counters
of neither the new set of RxQs, nor the old set of RxQs.
On the other hand, creation of the RSS incremented the RxQ refcnt.
If an RxQ was present in both the initial and the modified set,
its reference counter was incremented one extra time
compared to the queues that were only present in the new set.
This prevented releasing said RxQ resources on port stop:
flow indirect_action 0 create action_id 1 \
action rss queues 0 1 end / end
flow indirect_action 0 update 1 \
action rss queues 2 3 end / end
quit
...
mlx5_net: mlx5.c:1622: mlx5_dev_close():
port 0 some Rx queue objects still remain
mlx5_net: mlx5.c:1626: mlx5_dev_close():
port 0 some Rx queues still remain
Increment reference counters for the new set of RxQs
and decrement them for the old set of RxQs when needed.
Remove explicit referencing of RxQ from mlx5_ind_table_obj_attach()
because it reuses mlx5_ind_table_obj_modify() code doing this.
Dmitry Kozlyuk [Wed, 24 Nov 2021 09:40:29 +0000 (11:40 +0200)]
net/mlx5: fix indirect RSS creation when port is stopped
mlx5_ind_table_obj_setup() was incrementing RxQ reference counters
even when the port was stopped, which prevented RxQ release
and triggered an internal assertion.
Only increment reference counter when the port is started.
Gregory Etelson [Wed, 24 Nov 2021 12:33:54 +0000 (14:33 +0200)]
app/testpmd: fix hexadecimal parser with odd length
Current hex string parser assumes input has even characters number.
The parser fails input string with odd length.
The patch parses hex strings with even and odd length.
Parse result of an input with odd length will match result of
even length input, that has `0` as MSB, following by the original
sequence.
For example:
"0x1" results in *dst={0x01, 0x00}, *size=1
"0xabc" results in *dst={0x0a, 0xbc, 0x00}, *size=2
Jerin Jacob [Fri, 19 Nov 2021 04:59:26 +0000 (10:29 +0530)]
doc: fix memif driver acronyms
The commit d250589d5702 ("net/memif: replace master/slave arguments")
replaced master/slave terms to server/client terms.
Fix the documentation to reflect the same.
Michal Krawczyk [Tue, 23 Nov 2021 07:23:21 +0000 (08:23 +0100)]
doc: remove custom kernel patch link in ena guide
ENAv2 device requires write combining support which isn't supported by
the upstream vfio-pci. amzn-driver repository provided non-upstream
patch to enable this feature and it was linked directly by the ENA PMD
guide.
To avoid custom kernel patch linking, the user is now guided to the AWS
ENA PMD documentation, which describes vfio-pci and ENAv2 issue more
deeply with possible workarounds on how to resolve it.
Signed-off-by: Michal Krawczyk <mk@semihalf.com> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Dmitry Kozlyuk [Tue, 23 Nov 2021 20:22:27 +0000 (22:22 +0200)]
net/mlx5: fix crash on close after failed start
If mlx5_rxq_start() failed and rxq_ctrl was not initialized,
mlx5_rxq_obj_verify() would segfault in an attempt to dereference it.
Add a check that rxq_ctrl is not NULL before accessing its members.
Bing Zhao [Tue, 23 Nov 2021 12:48:35 +0000 (14:48 +0200)]
common/mlx5: fix shared memory region ranges allocation
Memory regions (MRs) were allocated in one chunk of memory with a
mempool registration object. However, MRs can be reused among
different mempool registrations.
When the registration that allocated the MRs originally was
destroyed, the dangling pointers to the MRs could be left in other
registrations sharing these MRs.
Splitting the memory allocation of registration structure and MRs in
this commit solves this pointer reference issue.
net/mlx5: fix reference count on detached indirect action
This patch fixes segfault which was triggered when port, with indirect
actions created, was closed. Segfault was occurring only when
RTE_LIBRTE_MLX5_DEBUG was defined. It was caused by redundant decrement
of RX queues refcount:
- refcount was decremented when port was stopped and indirect actions
were detached from RX queues (port stop),
- refcount was decremented when indirect actions objects were destroyed
(port close or destroying of indirect action).
This patch fixes behavior. Dereferencing Rx queues is done if and only
if indirect action is explicitly destroyed by the user or detached on
port stop. Dereferencing Rx queues on action destroy operation depends
on an argument to the wrapper of indirect action destroy operation,
introduced in this patch.
This patch fixes the assertion failure triggered when the user
configured minimum inline length requirements and the application
transmitted multi segment packets. Failure was triggered when space left
in TX queue was not enough to cover this requirement.
This patch limits the length of data to be copied to the available space
in TX queue.
Bing Zhao [Tue, 23 Nov 2021 16:05:19 +0000 (18:05 +0200)]
net/mlx5: fix RSS validation for meter hierarchy
In a meter hierarchy, all the meters are marked with having RSS if
the final meter's termination action is RSS.
When validating a flow rule with meter hierarchy, the RSS action
should not be fetched from the current meter if it is not the final
one.
The fate action union is next meter ID instead of the pointer to the
RSS action. By using the final meter in the hierarchy, the flow rule
validation will succeed without any crash caused by the invalid RSS
action pointer access.
Fixes: 1ce19ab1f43b ("net/mlx5: fix RSS validation with meter policy") Cc: stable@dpdk.org Signed-off-by: Bing Zhao <bingz@nvidia.com> Reviewed-by: Li Zhang <lizh@nvidia.com> Reviewed-by: Shun Hao <shunh@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
Jiawei Wang [Mon, 22 Nov 2021 14:22:52 +0000 (16:22 +0200)]
net/mlx5: fix flow mark with sampling and metering
If there are sample action and the meter action in the same flow,
mlx5 PMD performs several levels of splitting. For example, sampling
feature splits the original flow into prefix subflow with sample action,
and suffix subflow with the rest of actions. Then, metering feature
splits the sampling suffix subflow into its own meter subflows.
If mark action was added before the sample and meter action, the
flow mark flag was kept in the sample subflows but reset on
handling the metering split, causing the flow mark value missed.
This patch keeps the flow mark flag of previous subflow, and then
the following meter subflows handle the flow mark correctly.
Fixes: 9ade91dfe85d ("net/mlx5: fix group value of sample suffix flow") Cc: stable@dpdk.org Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Xiaoyu Min [Mon, 22 Nov 2021 13:53:29 +0000 (21:53 +0800)]
net/mlx4: fix empty Ethernet spec with VLAN
When the ETH spec is empty MLX4 PMD doesn't allow match other criteria,
which means the flow should be promisc one.
Currently, PMD validates this by setting flow->promisc bit when ETH spec
is empty and checking whether there is other rte_flow_item followed
when flow->promisc is on.
However, commit [1] adds support to match traffic only on VLAN id, the
above validation logic should be changed accordingly.
This patch changes the above validate logic by skipping flow->promisc
check if this item is VLAN.
[1]: Fixes: c0d239263156 ("net/mlx4: support flow w/o ETH spec and with VLAN") Cc: stable@dpdk.org Signed-off-by: Xiaoyu Min <jackmin@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
Dmitry Kozlyuk [Fri, 19 Nov 2021 14:31:56 +0000 (16:31 +0200)]
common/mlx5: fix mempool registration
Mempool registration was not correctly processing
mempools with RTE_PKTMBUF_F_PINEND_EXT_BUF flag set
("pinned mempools" for short), because it is not known
at registration time whether the mempool is a pktmbuf one,
and its elements may not yet be initialized to analyze them.
Attempts had been made to recognize such pools,
but there was no robust solution, only the owner of a mempool
(the application or a device) knows its type.
This patch extends common/mlx5 registration code
to accept a hint that the mempool is a pinned one
and uses this capability from net/mlx5 driver.
1. Remove all code assuming pktmbuf pool type
or trying to recognize the type of a pool.
2. Register pinned mempools used for Rx
and their external memory on port start.
Populate the MR cache with all their MRs.
3. Change Tx slow path logic as follows:
3.1. Search the mempool database for a memory region (MR)
by the mbuf pool and its buffer address.
3.2. If not MR for the address is found for the mempool,
and the mempool contains only pinned external buffers,
perform the mempool registration of the mempool
and its external pinned memory.
3.3. Fall back to using page-based MRs in other cases
(for example, a buffer with externally attached memory,
but not from a pinned mempool).
Jiawei Wang [Fri, 19 Nov 2021 13:02:01 +0000 (15:02 +0200)]
net/mlx5: fix mismatch metadata flow with meter action
The mlx5 PMD introduced the table id attribute to allow multiple
flow tables on the same table level for flow metering, there can be
multiple flow table objects with the same table level but different
table ids.
If the extended metadata mode is enabled, all flows containing
destination Queue/RSS actions are split into two subflows - prefix one
jumps to the MLX5_FLOW_MREG_CP_TABLE_GROUP flow table to copy
MARK action data, and suffix one to perform the destination Queue/RSS
action. The table_id for the jump in the metadata split prefix flow
is always 0.
If flow itself was the metering split suffix subflow the table id was
set to 1 in the flow split structure and the metadata split suffix
subflow was created in the table with wrong table id, causing the
metadata suffix flow mismatch.
This patch resets the table id to 0 while creating the metadata
suffix flows.
Fixes: 51ec04dc7bcf ("net/mlx5: connect meter policy to created flows") Cc: stable@dpdk.org Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Jiawei Wang [Fri, 19 Nov 2021 13:02:00 +0000 (15:02 +0200)]
net/mlx5: fix metadata and meter split shared tag
In the metadata flow split, PMD created the prefix subflow
with removed Queue or RSS action and appended the set tag and
copy table jump actions. If the flow being split for metadata
was the meter prefix subflow, the driver supposed to share the same
meter split tag action for the metadata split flow. There was the wrong
check for preceding meter split tag action, causing append with metadata
split set tag action and resulting the meter suffix subflow was missed
due to tag value mismatch.
This patch adds the checking before copying into extend action list,
to make sure the correct shared tag is used.
Fixes: 8d72fa668964 ("net/mlx5: share tag between meter and metadata") Cc: stable@dpdk.org Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Mike Baucom [Mon, 22 Nov 2021 06:14:34 +0000 (11:44 +0530)]
net/bnxt: fix Thor SVIF size for generic tables
The size of the svif in the generic tables was incorrectly set to the
Wh+ size of 8 bits. This resulted in incorrect l2 context entries being
associated with a flow once the svif became greater than 255.
Fixes: ad9eed0248ad ("net/bnxt: support flow template for Thor") Signed-off-by: Mike Baucom <michael.baucom@broadcom.com> Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com> Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com> Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Ajit Khaparde [Wed, 17 Nov 2021 21:10:09 +0000 (13:10 -0800)]
net/bnxt: fail init when mbuf allocation fails
Fix driver init when Rx mbuf allocation fails.
If we continue to use the driver with whatever rings were
created successfully, it can cause unexpected behavior.
Somnath Kotur [Fri, 19 Nov 2021 03:50:41 +0000 (09:20 +0530)]
net/bnxt: fix crash caused by error recovery
bnxt_stop_rxtx() does not stop data path processing as intended
as it does not update the recently introduced fast-path pointers
'(struct rte_eth_fp_ops)->rx_pkt_burst'. Since both the burst routines
only use the fast-path pointer, the real burst routines get invoked
instead of the dummy ones set by bnxt_stop_rxtx() leading to crashes
in the data path (e.g. dereferencing freed structures)
Fix the segfault by updating the fast-path pointer as well
Fixes: c87d435a4d79 ("ethdev: copy fast-path API into separate structure") Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com> Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Somnath Kotur [Thu, 18 Nov 2021 04:04:39 +0000 (09:34 +0530)]
net/bnxt: fix autoneg on PAM4 links
If autonegotiation was enabled, driver was not passing the
'auto_pam4_link_speeds' obtained during init and stored in bp->link_info
to bnxt_hwrm_port_phy_cfg(). This would result in an incorrect setting
being passed to the HW during PHY configuration. This in turn, would
result in invalid settings being retrieved and configured in subsequent
application loads resulting in launch failures.
Martin Spinler [Wed, 10 Nov 2021 15:39:38 +0000 (16:39 +0100)]
doc: update links in nfb guide
Update the software dependency link because of website shutdown.
Netcope Technologies was recently renamed to Magmio and no longer
provides packages and support for the FPGA cards and NDK platform.
However the project Liberouter@CESNET continues with the maintenance
of Network Development Kit and cooperates on the development of high
speed network FPGA cards as well.
Signed-off-by: Martin Spinler <spinler@cesnet.cz> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Jerin Jacob [Tue, 9 Nov 2021 15:51:32 +0000 (21:21 +0530)]
doc: announce removal of octeontx2 drivers
In the view of enabling unified driver for octeontx2(cn9k)/
octeontx3(cn10k), removing drivers/octeontx2 drivers and
replace with drivers/cnxk/ which supports both octeontx2(cn9k)
and octeontx3(cn10k) SoCs.
Signed-off-by: Jerin Jacob <jerinj@marvell.com> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com> Acked-by: Akhil Goyal <gakhil@marvell.com> Acked-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: David Marchand <david.marchand@redhat.com>
Vanshika Shukla [Mon, 22 Nov 2021 07:31:22 +0000 (13:01 +0530)]
examples/ptpclient: fix delay request message
The size of delay request message sent out by the DPDK
ptpclient application was observed to have extra length
than expected. Due to this, bad messages were observed
on the master side and delay response was not received.
This patch fixes this bug.
Xueming Li [Wed, 24 Nov 2021 12:45:24 +0000 (13:45 +0100)]
bus: fix device iterator match from arguments
Device iterator RTE_DEV_FOREACH() failed to return devices from
classifier like "class=vdpa", because matching name from empty kvargs
returns no result. If device name not specified in kvargs, the function
should iterate all devices.
This patch allows empty devargs or devargs without name specified.
Fixes: 6aebb942907d ("kvargs: add function to get from key and value") Signed-off-by: Xueming Li <xuemingl@nvidia.com> Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Acked-by: Xueming Li <xuemingl@nvidia.com>