Commit Graph

31114 Commits

Author SHA1 Message Date
Thomas Monjalon
2654ce5c56 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>
2022-01-11 14:33:09 +01:00
Josh Soref
7be78d0279 fix spelling in comments and strings
The tool comes from https://github.com/jsoref

Signed-off-by: Josh Soref <jsoref@gmail.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2022-01-11 12:16:53 +01:00
David Marchand
042f5a355a version: 22.03-rc0
Start a new release cycle with empty release notes.
Bump version and ABI minor.
Enable ABI checks.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2021-12-02 21:36:19 +01:00
David Marchand
45f04d88ae version: 21.11.0
Signed-off-by: David Marchand <david.marchand@redhat.com>
2021-11-26 18:58:21 +01:00
Fiona Trahe
cf91e58395 maintainers: update for compressdev
Replacing myself with Fan as compressdev API maintainer.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Ashish Gupta <ashish.gupta@marvell.com>
2021-11-26 18:20:47 +01:00
David Marchand
19acf5ca06 devtools: forbid additions of __reserved
__reserved is a reserved keyword in Windows system headers.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Conor Walsh <conor.walsh@intel.com>
2021-11-26 18:15:47 +01:00
Viacheslav Ovsiienko
bef7c9ff28 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.

[1] 73b68f4c54 ("ethdev: introduce generic modify flow action")

On other side there are a bunch of multiple legacy actions,
that can be superseded by the generic MODIFY_FIELD action:

RTE_FLOW_ACTION_TYPE_OF_SET_MPLS_TTL
RTE_FLOW_ACTION_TYPE_OF_DEC_MPLS_TTL
RTE_FLOW_ACTION_TYPE_OF_SET_NW_TTL
RTE_FLOW_ACTION_TYPE_OF_DEC_NW_TTL      sfc
RTE_FLOW_ACTION_TYPE_OF_COPY_TTL_OUT
RTE_FLOW_ACTION_TYPE_OF_COPY_TTL_IN
RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC       bnxt, cxgbe, mlx5
RTE_FLOW_ACTION_TYPE_SET_IPV4_DST       bnxt, cxgbe, mlx5
RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC       cxgbe, mlx5
RTE_FLOW_ACTION_TYPE_SET_IPV6_DST       cxgbe, mlx5
RTE_FLOW_ACTION_TYPE_SET_TP_SRC         cxgbe, mlx5
RTE_FLOW_ACTION_TYPE_SET_TP_DST         cxgbe, mlx5
RTE_FLOW_ACTION_TYPE_DEC_TTL            mlx5, sfc
RTE_FLOW_ACTION_TYPE_SET_TTL            mlx5
RTE_FLOW_ACTION_TYPE_SET_MAC_SRC        cxgbe, mlx5
RTE_FLOW_ACTION_TYPE_SET_MAC_DST        cxgbe, mlx5
RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ        mlx5
RTE_FLOW_ACTION_TYPE_DEC_TCP_SEQ        mlx5
RTE_FLOW_ACTION_TYPE_INC_TCP_ACK        mlx5
RTE_FLOW_ACTION_TYPE_DEC_TCP_ACK        mlx5
RTE_FLOW_ACTION_TYPE_SET_IPV4_DSCP      mlx5
RTE_FLOW_ACTION_TYPE_SET_IPV6_DSCP      mlx5
RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_VID    bnxt, cnxk, cxgbe, enic,
                                        mlx5, octeontx2, sfc
RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_PCP    bnxt, cnxk, cxgbe, enic,
                                        mlx5, octeontx2, sfc
RTE_FLOW_ACTION_TYPE_SET_TAG            mlx5
RTE_FLOW_ACTION_TYPE_SET_META           mlx5

This note deprecates the following RTE Flow actions,
as not supported by any of PMDs:

RTE_FLOW_ACTION_TYPE_OF_SET_MPLS_TTL
RTE_FLOW_ACTION_TYPE_OF_DEC_MPLS_TTL
RTE_FLOW_ACTION_TYPE_OF_SET_NW_TTL
RTE_FLOW_ACTION_TYPE_OF_COPY_TTL_OUT
RTE_FLOW_ACTION_TYPE_OF_COPY_TTL_IN

The following actions are supposed to be deprecated in 22.07
and replaced by generic field modify action:

RTE_FLOW_ACTION_TYPE_OF_DEC_NW_TTL
RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC
RTE_FLOW_ACTION_TYPE_SET_IPV4_DST
RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC
RTE_FLOW_ACTION_TYPE_SET_IPV6_DST
RTE_FLOW_ACTION_TYPE_SET_TP_SRC
RTE_FLOW_ACTION_TYPE_SET_TP_DST
RTE_FLOW_ACTION_TYPE_DEC_TTL
RTE_FLOW_ACTION_TYPE_SET_TTL
RTE_FLOW_ACTION_TYPE_SET_MAC_SRC
RTE_FLOW_ACTION_TYPE_SET_MAC_DST
RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ
RTE_FLOW_ACTION_TYPE_DEC_TCP_SEQ
RTE_FLOW_ACTION_TYPE_INC_TCP_ACK
RTE_FLOW_ACTION_TYPE_DEC_TCP_ACK
RTE_FLOW_ACTION_TYPE_SET_IPV4_DSCP
RTE_FLOW_ACTION_TYPE_SET_IPV6_DSCP
RTE_FLOW_ACTION_TYPE_SET_TAG
RTE_FLOW_ACTION_TYPE_SET_META

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.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2021-11-26 18:02:49 +01:00
Aman Singh
4dcfb00ce5 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>
2021-11-26 18:01:11 +01:00
Ciara Power
bcafd1733e doc: add details for new test structure
The testing guide is now updated to include details about
using sub-testsuites.
Some example code is given to demonstrate how they can be used.

A note is also added to highlight the need for using vdev EAL args
when running cryptodev tests.

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2021-11-26 17:51:17 +01:00
Aaron Conole
959710f16d 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>
2021-11-26 17:50:09 +01:00
Sunil Kumar Kori
f2577859be doc: add eventdev feature matrices
Patch adds feature matrices for event dev, Rx/Tx, Crypto
and Timer adapters.

Along with, .ini files are added for all supported PMDs.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
2021-11-26 16:29:25 +01:00
Vladimir Medvedkin
f3aa363df2 doc: add RIB and FIB programmer guides
Currently, programmer's guide for the RIB and FIB libraries are missing.
This commit adds them.

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Reviewed-by: Conor Walsh <conor.walsh@intel.com>
2021-11-26 15:47:23 +01:00
Kefu Chai
6c16a05c8c doc: fix a typo in EAL guide
Change from "how many segments each segment can have" to
"how many segments each segment list can have".

Fixes: b317393283 ("doc: update guides for memory subsystem")
Cc: stable@dpdk.org

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2021-11-26 15:20:50 +01:00
Juraj Linkeš
9cd9c57061 doc: replace machine option in build guide
Update the docs to reflect the two new variables, cpu_instruction_set
for non-arm builds and platform for arm builds.

Fixes: bf66003b51 ("build: use platform for generic and native builds")

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
2021-11-26 15:10:16 +01:00
Jerin Jacob
44f44b803b 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>
2021-11-26 15:09:15 +01:00
Ray Kinsella
a2a43d3a3d doc: fix typos in examples code
Fix documentation typos that are generating spurious CI warnings.

Fixes: 9a212dc06c ("doc: use code snippets in sample app guides")

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Acked-by: Aaron Conole <aconole@redhat.com>
Reviewed-by: Conor Walsh <conor.walsh@intel.com>
2021-11-26 14:41:31 +01:00
Raslan Darawsheh
b34bf915c1 doc: add tested platforms with Mellanox NICs
Add tested platforms with Mellanox NICs to the 21.11 release notes.

Signed-off-by: Raslan Darawsheh <rasland@nvidia.com>
2021-11-26 14:41:31 +01:00
Apeksha Gupta
32e06ccfd8 doc: add tested platforms with NXP SoCs
Add tested NXP platform to v21.11 release note for NXP enetfec PMD.

Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
2021-11-26 14:41:31 +01:00
David Hunt
7580f97338 doc: add power management scale mode reaction time note
When using PMD Power Management, scale mode reacts slower than
monitor mode and pause mode. Add note in user guide to this
effect.

Signed-off-by: David Hunt <david.hunt@intel.com>
2021-11-26 14:24:23 +01:00
Michael Baum
8648fa2f46 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: 7b4f1e6bd3 ("common/mlx5: introduce common library")
Cc: stable@dpdk.org

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2021-11-26 13:36:16 +01:00
Dmitry Kozlyuk
63625c5da1 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.

Fixes: 08ac03580e ("common/mlx5: fix mempool registration")

Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Reviewed-by: Matan Azrad <matan@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2021-11-26 13:27:38 +01:00
Elena Agostini
6399acaded app/gpudev: remove memory leaks
Remove all memory leaks in case of errors in
test-gpudev application.

Fixes: e818c4e2bf ("gpudev: add memory API")
Fixes: c7ebd65c13 ("gpudev: add communication list")

Signed-off-by: Elena Agostini <eagostini@nvidia.com>
2021-11-26 13:15:04 +01:00
Elena Agostini
579147d7aa gpudev: remove unnecessary memory barrier
Remove unnecessary rte_gpu_wmb from rte_gpu_comm_populate_list_pkts.
It causes a performance degradation in case of NVIDIA GPU V100.

This change doesn't affect any functionality as the status resides
in CPU registered memory.

Fixes: c7ebd65c13 ("gpudev: add communication list")

Signed-off-by: Elena Agostini <eagostini@nvidia.com>
2021-11-26 12:26:46 +01:00
Michael Baum
80b32fa702 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: 2efd265445 ("compress/mlx5: support partial transformation")
Cc: stable@dpdk.org

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2021-11-25 11:16:56 +01:00
Radu Nicolau
0fa4f444f6 examples/ipsec-secgw: fix L4 length for TSO packets
Using RTE_MBUF_F_TX_TCP_SEG requires L4 length to be set.

Fixes: a7f32947a3 ("examples/ipsec-secgw: support TCP TSO")

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-11-25 10:36:42 +01:00
Aman Singh
d3dd5d5eba maintainers: update for testpmd
Add Aman Singh as co-maintainer of testpmd.

Make the title description more accurate for this tool.

Signed-off-by: Aman Singh <aman.deep.singh@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2021-11-26 12:21:18 +01:00
Dariusz Sosnowski
6965091e0b doc: fix typo in coding style
This patch fixes a typo in DPDK Coding Style, in Return Values section,
i.e. replaces "indicated may" with "indicated by".

Fixes: 36032e46be ("doc: add coding style")
Cc: stable@dpdk.org

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2021-11-26 11:28:34 +01:00
Sean Morrissey
35bd0a5c58 doc: capitalise PMD
The doc's contain references to pmd but the proper use is to use PMD.

Cc: stable@dpdk.org

Signed-off-by: Sean Morrissey <sean.morrissey@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Reviewed-by: Conor Walsh <conor.walsh@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2021-11-26 11:28:34 +01:00
Sean Morrissey
f8dbaebbf1 fix PMD wording
Removing the use of driver following PMD as its unnecessary.

Cc: stable@dpdk.org

Signed-off-by: Sean Morrissey <sean.morrissey@intel.com>
Signed-off-by: Conor Fogarty <conor.fogarty@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Reviewed-by: Conor Walsh <conor.walsh@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2021-11-26 11:28:34 +01:00
Sean Morrissey
b53d106d34 remove repeated 'the' in the code
Remove the use of double "the" as it does not make sense.

Cc: stable@dpdk.org

Signed-off-by: Sean Morrissey <sean.morrissey@intel.com>
Signed-off-by: Conor Fogarty <conor.fogarty@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Reviewed-by: Conor Walsh <conor.walsh@intel.com>
Acked-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2021-11-26 11:28:34 +01:00
Stephen Hemminger
1eaa8f0160 devtools: suppress checkpatch warning about strlcpy
Current version of Linux kernel checkpatch now complains about
usages of strlcpy because the Linux kernel prefers strscpy.

WARNING:STRLCPY: Prefer strscpy over strlcpy

But DPDK project allows strlcpy, therefore suppress the warning.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2021-11-26 11:17:28 +01:00
David Marchand
807274d53a devtools: check prefix for libraries patches
The convention in DPDK is to directly use library names as prefix,
without a lib/.

Signed-off-by: David Marchand <david.marchand@redhat.com>
2021-11-26 11:11:42 +01:00
Ferruh Yigit
779279afa5 devtools: add acronyms in dictionary for commit checks
FD      -> File Descriptor
GUID    -> Globally Unique Identifier
Netlink -> Linux Netlink socket family
PCIe    -> Peripheral Component Interconnect Express

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2021-11-25 12:40:00 +01:00
Ashwin Sekhar T K
33c942d192 devtools: add Marvell acronyms for commit checks
Update word list with Marvell specific acronyms.

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>
2021-11-25 12:35:04 +01:00
Bruce Richardson
8f86ffa631 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>
2021-11-25 11:51:24 +01:00
David Marchand
872c6a2807 version: 21.11-rc4
Signed-off-by: David Marchand <david.marchand@redhat.com>
2021-11-24 19:13:05 +01:00
Viacheslav Ovsiienko
572c9d4bda 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.

Fixes: 09c2555303 ("net/mlx5: support shared Rx queue")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2021-11-24 17:25:37 +01:00
Alexander Kozyrev
94421842de 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: 690391dd0e ("net/mlx5: fix GENEVE protocol type translation")
Fixes: 861fa3796f ("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>
2021-11-24 17:25:36 +01:00
Alexander Kozyrev
9e61533df2 net/mlx5: fix GRE flow item matching
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: be26e81bfc ("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>
2021-11-24 17:25:36 +01:00
Dmitry Kozlyuk
ec9b812b6c 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.

Fixes: ec4e11d41d ("net/mlx5: preserve indirect actions on restart")
Cc: stable@dpdk.org

Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Reviewed-by: Matan Azrad <matan@nvidia.com>
2021-11-24 17:25:35 +01:00
Dmitry Kozlyuk
c65d684497 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.

Fixes: ec4e11d41d ("net/mlx5: preserve indirect actions on restart")
Cc: stable@dpdk.org

Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Reviewed-by: Matan Azrad <matan@nvidia.com>
2021-11-24 17:25:33 +01:00
Gregory Etelson
ea1da434c0 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

Fixes: 169a9fed1f ("app/testpmd: fix hex string parser support for flow API")
Cc: stable@dpdk.org

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Reviewed-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2021-11-24 17:34:38 +01:00
Jerin Jacob
3f7b90eb80 doc: fix memif driver acronyms
The commit d250589d57 ("net/memif: replace master/slave arguments")
replaced master/slave terms to server/client terms.
Fix the documentation to reflect the same.

Fixes: d250589d57 ("net/memif: replace master/slave arguments")
Cc: stable@dpdk.org

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2021-11-24 17:13:26 +01:00
Junxiao Shi
858a152ab5 net/memif: allow stopping and closing device
Bugzilla ID: 888
Fixes: febc855b35 ("ethdev: forbid closing started device")
Cc: stable@dpdk.org

Signed-off-by: Junxiao Shi <git@mail1.yoursunny.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2021-11-24 15:53:59 +01:00
Andrew Rybchenko
7aa1ede3e1 doc: remove flow mark Rx offload deprecation notice
The problem is solved using Rx metadata delivery negotiation API [1].

[1] commit f6d8a6d3fa ("ethdev: negotiate delivery of packet metadata from HW to PMD")

Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-11-24 13:13:04 +01:00
Michal Krawczyk
036ecae0ef 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>
2021-11-24 11:46:02 +01:00
Dmitry Kozlyuk
0ece5de3c4 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.

Fixes: 09c2555303 ("net/mlx5: support shared Rx queue")

Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2021-11-23 21:39:05 +01:00
Bing Zhao
8947eebc99 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.

Fixes: 690b2a88c2 ("common/mlx5: add mempool registration facilities")

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Reviewed-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
2021-11-23 21:36:11 +01:00
Dariusz Sosnowski
8fbce96fbe 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.

Fixes: ec4e11d41d ("net/mlx5: preserve indirect actions on restart")
Cc: stable@dpdk.org

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2021-11-23 17:57:19 +01:00
Dariusz Sosnowski
fa4883456d net/mlx5: fix multi-segment packet wraparound
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.

Fixes: cacb44a099 ("net/mlx5: add no-inline Tx flag")
Cc: stable@dpdk.org

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2021-11-23 17:57:13 +01:00