dpdk.git
2 years agodoc: announce behavior change in bus probing doc-20211126
Olivier Matz [Fri, 26 Nov 2021 13:04:48 +0000 (14:04 +0100)]
doc: announce behavior change in bus probing

Announce a behavior change in the setting of the device->numa_node field
by the bus driver during the probe operation.

Link: https://patches.dpdk.org/project/dpdk/patch/20211026090610.10823-1-houssem.bouhlel@6wind.com/
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
2 years agonet/mlx5: fix devargs validation for multi-class probing
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>
2 years agocommon/mlx5: fix memory region lookup on slow path
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.

Fixes: 08ac03580ef2 ("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>
2 years agoapp/gpudev: remove memory leaks
Elena Agostini [Thu, 25 Nov 2021 23:03:32 +0000 (23:03 +0000)]
app/gpudev: remove memory leaks

Remove all memory leaks in case of errors in
test-gpudev application.

Fixes: e818c4e2bf50 ("gpudev: add memory API")
Fixes: c7ebd65c1372 ("gpudev: add communication list")

Signed-off-by: Elena Agostini <eagostini@nvidia.com>
2 years agogpudev: remove unnecessary memory barrier
Elena Agostini [Thu, 25 Nov 2021 22:40:54 +0000 (22:40 +0000)]
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: c7ebd65c1372 ("gpudev: add communication list")

Signed-off-by: Elena Agostini <eagostini@nvidia.com>
2 years agocompress/mlx5: fix double close of device context
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>
2 years agoexamples/ipsec-secgw: fix L4 length for TSO packets
Radu Nicolau [Wed, 24 Nov 2021 17:33:51 +0000 (17:33 +0000)]
examples/ipsec-secgw: fix L4 length for TSO packets

Using RTE_MBUF_F_TX_TCP_SEG requires L4 length to be set.

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

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agomaintainers: update for testpmd
Aman Singh [Fri, 22 Oct 2021 07:19:49 +0000 (12:49 +0530)]
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>
2 years agodoc: fix typo in coding style
Dariusz Sosnowski [Fri, 29 Oct 2021 13:19:02 +0000 (16:19 +0300)]
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: 36032e46be40 ("doc: add coding style")
Cc: stable@dpdk.org
Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2 years agodoc: capitalise PMD
Sean Morrissey [Mon, 22 Nov 2021 10:50:46 +0000 (10:50 +0000)]
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>
2 years agofix PMD wording
Sean Morrissey [Mon, 22 Nov 2021 10:50:44 +0000 (10:50 +0000)]
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>
2 years agoremove repeated 'the' in the code
Sean Morrissey [Mon, 22 Nov 2021 10:50:45 +0000 (10:50 +0000)]
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>
2 years agodevtools: suppress checkpatch warning about strlcpy
Stephen Hemminger [Mon, 15 Nov 2021 23:26:10 +0000 (15:26 -0800)]
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>
2 years agodevtools: check prefix for libraries patches
David Marchand [Wed, 20 Oct 2021 09:14:15 +0000 (11:14 +0200)]
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>
2 years agodevtools: add acronyms in dictionary for commit checks
Ferruh Yigit [Wed, 10 Nov 2021 17:41:40 +0000 (17:41 +0000)]
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>
2 years agodevtools: add Marvell acronyms for commit checks
Ashwin Sekhar T K [Fri, 17 Sep 2021 10:58:39 +0000 (16:28 +0530)]
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>
2 years agodevtools: clarify that lines up to 100 characters are ok
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>
2 years agoversion: 21.11-rc4
David Marchand [Wed, 24 Nov 2021 18:13:05 +0000 (19:13 +0100)]
version: 21.11-rc4

Signed-off-by: David Marchand <david.marchand@redhat.com>
2 years agonet/mlx5: fix shared Rx queue segment configuration match
Viacheslav Ovsiienko [Wed, 24 Nov 2021 14:33:16 +0000 (16:33 +0200)]
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: 09c2555303be ("net/mlx5: support shared Rx queue")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2 years agonet/mlx5: fix GENEVE and VXLAN-GPE flow item matching
Alexander Kozyrev [Wed, 24 Nov 2021 13:26:09 +0000 (15:26 +0200)]
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>
2 years agonet/mlx5: fix GRE flow item matching
Alexander Kozyrev [Wed, 24 Nov 2021 04:32:34 +0000 (06:32 +0200)]
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: 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>
2 years agonet/mlx5: fix Rx queue reference count for indirect RSS
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.

Fixes: ec4e11d41d12 ("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>
2 years agonet/mlx5: fix indirect RSS creation when port is stopped
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.

Fixes: ec4e11d41d12 ("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>
2 years agoapp/testpmd: fix hexadecimal parser with odd length
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

Fixes: 169a9fed1f4c ("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>
2 years agodoc: fix memif driver acronyms
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.

Fixes: d250589d5702 ("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>
2 years agonet/memif: allow stopping and closing device
Junxiao Shi [Thu, 18 Nov 2021 17:33:46 +0000 (17:33 +0000)]
net/memif: allow stopping and closing device

Bugzilla ID: 888
Fixes: febc855b358e ("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>
2 years agodoc: remove flow mark Rx offload deprecation notice
Andrew Rybchenko [Tue, 2 Nov 2021 12:50:58 +0000 (15:50 +0300)]
doc: remove flow mark Rx offload deprecation notice

The problem is solved using Rx metadata delivery negotiation API [1].

[1] commit f6d8a6d3fad7 ("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>
2 years agodoc: remove custom kernel patch link in ena guide
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>
2 years agonet/mlx5: fix crash on close after failed start
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.

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

Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2 years agocommon/mlx5: fix shared memory region ranges allocation
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.

Fixes: 690b2a88c2f7 ("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>
2 years agonet/mlx5: fix reference count on detached indirect action
Dariusz Sosnowski [Tue, 23 Nov 2021 15:38:05 +0000 (17:38 +0200)]
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: ec4e11d41d12 ("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>
2 years agonet/mlx5: fix multi-segment packet wraparound
Dariusz Sosnowski [Tue, 23 Nov 2021 13:57:40 +0000 (15:57 +0200)]
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: cacb44a09962 ("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>
2 years agonet/mlx5: fix RSS validation for meter hierarchy
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>
2 years agonet/mlx5: fix flow mark with sampling and metering
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>
2 years agonet/mlx4: fix empty Ethernet spec with VLAN
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>
2 years agodoc: add flex item specifications in mlx5 guide
Gregory Etelson [Tue, 16 Nov 2021 15:45:14 +0000 (17:45 +0200)]
doc: add flex item specifications in mlx5 guide

Describe firmware configuration requirements.
List mlx5 hardware and PMD limitations.

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2 years agocommon/mlx5: fix mempool registration
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).

Fixes: 690b2a88c2f7 ("common/mlx5: add mempool registration facilities")
Fixes: fec28ca0e3a9 ("net/mlx5: support mempool registration")

Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Reviewed-by: Matan Azrad <matan@nvidia.com>
Reviewed-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2 years agonet/mlx5: fix mismatch metadata flow with meter action
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>
2 years agonet/mlx5: fix metadata and meter split shared tag
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>
2 years agonet/bnxt: fix Thor SVIF size for generic tables
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>
2 years agonet/bnxt: fail init when mbuf allocation fails
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.

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>
2 years agonet/bnxt: fix crash caused by error recovery
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>
2 years agonet/bnxt: fix autoneg on PAM4 links
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.

Bugzilla ID: 791
Fixes: c23f9ded0391 ("net/bnxt: support 200G PAM4 link")
Cc: stable@dpdk.org
Reported-by: Charles Brett <cfb@hpe.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
2 years agodoc: update links in nfb guide
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>
2 years agodoc: remove repeated repeated words
Thomas Monjalon [Fri, 5 Nov 2021 21:10:30 +0000 (22:10 +0100)]
doc: remove repeated repeated words

Some duplicate words were detected with a script.

Fixes: fdec9301f52d ("doc: add flow classify guides")
Fixes: 4dc6d8e63c16 ("doc: add graph library guide")
Fixes: 30d3aa861db5 ("doc: rework VM power manager user guide")
Fixes: 0d547ed03717 ("examples/ipsec-secgw: support configuration file")
Fixes: e64833f2273a ("examples/l2fwd-keepalive: add sample application")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
2 years agodoc: announce removal of octeontx2 drivers
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>
2 years agodoc: update release notes for 21.11
John McNamara [Mon, 22 Nov 2021 17:00:59 +0000 (17:00 +0000)]
doc: update release notes for 21.11

Fix grammar, spelling and formatting of DPDK 21.11 release notes.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2 years agodoc: add tested Intel platforms with Intel NICs
Yan Xia [Fri, 19 Nov 2021 18:18:33 +0000 (18:18 +0000)]
doc: add tested Intel platforms with Intel NICs

Add tested Intel platforms with Intel NICs to v21.11 release note.

Signed-off-by: Yan Xia <yanx.xia@intel.com>
Acked-by: Xueqin Lin <xueqin.lin@intel.com>
2 years agoexamples/ptpclient: fix delay request message
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.

Fixes: ab129e9065a5 ("examples/ptpclient: add minimal PTP client")
Cc: stable@dpdk.org
Signed-off-by: Vanshika Shukla <vanshika.shukla@nxp.com>
Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
2 years agobus: fix device iterator match from arguments
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>
2 years agobus/auxiliary: fix device iteration
David Marchand [Mon, 22 Nov 2021 09:25:43 +0000 (10:25 +0100)]
bus/auxiliary: fix device iteration

rte_kvargs_parse() expects a NULL terminated keys array.

Fixes: 1afce3086cf4 ("bus/auxiliary: introduce auxiliary bus")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Xueming Li <xuemingl@nvidia.com>
2 years agodoc: strip build artefacts for examples file list
Timothy Redaelli [Tue, 23 Nov 2021 14:48:42 +0000 (15:48 +0100)]
doc: strip build artefacts for examples file list

examples.dox is built inside builddir/doc/api and so doxygen generates
some dir_HASH.html that includes the builddir name and this may prevent
DPDK documentation to be correctly generated in some distributions, for
example CentOS Stream 9 and RHEL9, since the builddir includes the
architecture.

This commit adds builddir/doc/api (the path where examples.dox is
generated) to STRIP_FROM_PATH, so the generated documentation doesn't
change if builddir changes.

Fixes: a6090630f4e5 ("doc: automate examples file list for API")
Cc: stable@dpdk.org
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Tested-by: David Marchand <david.marchand@redhat.com>
2 years agombuf: fix dump of dynamic fields and flags
Alexander Bechikov [Wed, 24 Nov 2021 12:57:04 +0000 (13:57 +0100)]
mbuf: fix dump of dynamic fields and flags

The dump of dynamic fields and flags fails if the shm is already
allocated. Add a check to fix the issue.

Fixes: d4902ed31c63 ("mbuf: check shared memory before dumping dynamic space")
Cc: stable@dpdk.org
Signed-off-by: Alexander Bechikov <asb.tyum@gmail.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2 years agokni: restrict bifurcated device support
Ferruh Yigit [Tue, 23 Nov 2021 16:46:17 +0000 (16:46 +0000)]
kni: restrict bifurcated device support

To enable bifurcated device support, rtnl_lock is released before calling
userspace callbacks and asynchronous requests are enabled.

But these changes caused more issues, like bug #809, #816. To reduce the
scope of the problems, the bifurcated device support related changes are
only enabled when it is requested explicitly with new 'enable_bifurcated'
module parameter.
And bifurcated device support is disabled by default.

So the bifurcated device related problems are isolated and they can be
fixed without impacting all use cases.

Bugzilla ID: 816
Fixes: 631217c76135 ("kni: fix kernel deadlock with bifurcated device")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Igor Ryzhov <iryzhov@nfware.com>
2 years agoexamples/l3fwd-power: revert wakeup log
David Hunt [Tue, 23 Nov 2021 15:57:49 +0000 (15:57 +0000)]
examples/l3fwd-power: revert wakeup log

Wakeup happens quite often (several hundred times a second) in
l3fwd-power example app in PMD power management mode, so this
message is appearing too often to be useful.
This patch reverts that info message addition.

Fixes: 931e3a994597 ("examples/l3fwd-power: add wakeup log")

Signed-off-by: David Hunt <david.hunt@intel.com>
Tested-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
2 years agoapp/crypto-perf: increase segment size for IPsec
Gagandeep Singh [Wed, 17 Nov 2021 07:40:31 +0000 (13:10 +0530)]
app/crypto-perf: increase segment size for IPsec

Application calculates segment size based on buffer size plus
digest size only, But if the operation mode is IPsec then
packet length can be increased by some more bytes depending on
the algorithm.

In this patch, increasing segment size with RTE_PKTMBUF_HEADROOM
when there is no user given segment size.

Fixes: 28dde5da503e ("app/crypto-perf: support lookaside IPsec")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agodoc: support IPsec Multi-buffer lib v1.1
Pablo de Lara [Thu, 18 Nov 2021 14:34:07 +0000 (14:34 +0000)]
doc: support IPsec Multi-buffer lib v1.1

Updated AESNI MB and AESNI GCM, KASUMI, ZUC and SNOW3G PMD documentation
guides with information about the latest Intel IPSec Multi-buffer
library supported.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
2 years agodrivers/crypto: return error for not supported SA lifetime
Gagandeep Singh [Thu, 18 Nov 2021 07:30:30 +0000 (13:00 +0530)]
drivers/crypto: return error for not supported SA lifetime

dpaa, dpaa2 and caam_jr drivers do not support
SA expiry. This result in failure of test cases in
test app. This patch returns ENOTSUP to skip the
SA lifetime test cases.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agodrivers/crypto: fix IPsec TTL decrement option
Gagandeep Singh [Thu, 18 Nov 2021 07:00:18 +0000 (12:30 +0530)]
drivers/crypto: fix IPsec TTL decrement option

dpaa, dpaa2 and caam_jr drivers decrement the inner IP header
TTL for all packets and ignoring the dec_ttl option of SA.

In this patch, using the dec_ttl to decide to decrement the
packets inner IP header TTL or not.

Fixes: 0a23d4b6f4c2 ("crypto/dpaa2_sec: support protocol offload IPsec")
Fixes: 3e33486f80a5 ("crypto/caam_jr: add security offload")
Fixes: 1f14d500bce1 ("crypto/dpaa_sec: support IPsec protocol offload")
Cc: stable@dpdk.org
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2 years agocrypto/mlx5: fix maximum number of queue pairs
Raja Zidane [Sun, 21 Nov 2021 12:59:43 +0000 (12:59 +0000)]
crypto/mlx5: fix maximum number of queue pairs

An indirect mkey is created for each descriptor in a QP, number of
descriptors per QP is configured by the user on QP setup callback.
In mlx cryptodev autotest, the max number of QPs (provided by the driver)
is created, and due to mkey resource limits, QPs creation fail which leads
to the test failing.
Since there is no capability of max number of descriptors provided to
the user, we can't give an exact number of max QPs available.
Reduce the max number of QPs to 128, which supports standard descriptors
numbers, including the 4K number provided in the test.

Fixes: 6152534e211e ("crypto/mlx5: support queue pairs operations")
Cc: stable@dpdk.org
Signed-off-by: Raja Zidane <rzidane@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2 years agocrypto/ipsec_mb: fix cipher key setting
Pablo de Lara [Mon, 22 Nov 2021 17:47:29 +0000 (17:47 +0000)]
crypto/ipsec_mb: fix cipher key setting

When authenticating with SNOW3G, KASUMI and ZUC,
the pointers for encryption/decryption keys is not set.
If a cipher algorithm such as AES-CBC is also used,
the application would seg fault.
Hence, these pointers should be set to some value by default.

Command line to replicate the issue:
./build/app/dpdk-test-crypto-perf -l 4,5 -n 6 --vdev="crypto_aesni_mb" -- \
 --devtype="crypto_aesni_mb" --optype=cipher-then-auth --auth-algo \
 snow3g-uia2 --auth-key-sz 16 --auth-iv-sz 16 --digest-sz 4 --silent \
 --total-ops 1000000 --auth-op generate --burst-sz 32 \
 --cipher-algo aes-ctr --cipher-key-sz 16 --cipher-iv-sz 16

Fixes: ae8e085c608d ("crypto/aesni_mb: support KASUMI F8/F9")
Fixes: 6c42e0cf4d12 ("crypto/aesni_mb: support SNOW3G-UEA2/UIA2")
Fixes: fd8df85487c4 ("crypto/aesni_mb: support ZUC-EEA3/EIA3")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
2 years agogpu/cuda: set rte_errno
Elena Agostini [Wed, 24 Nov 2021 18:34:09 +0000 (18:34 +0000)]
gpu/cuda: set rte_errno

Set correct rte_errno variable in CUDA driver
and return -rte_errno in case of error.

rte_errno values are compliant with the gpudev library documentation.

Fixes: 1306a73b1958 ("gpu/cuda: introduce CUDA driver")

Signed-off-by: Elena Agostini <eagostini@nvidia.com>
2 years agogpudev: manage null parameters in memory functions
Elena Agostini [Tue, 23 Nov 2021 00:42:07 +0000 (00:42 +0000)]
gpudev: manage null parameters in memory functions

The gpudev functions free, register and unregister
return gracefully if input pointer is NULL or size 0,
as API doc was indicating no-op accepted values.

CUDA driver checks are removed because redundant
with the checks added in gpudev library.

Fixes: e818c4e2bf50 ("gpudev: add memory API")

Signed-off-by: Elena Agostini <eagostini@nvidia.com>
2 years agoversion: 21.11-rc3
Thomas Monjalon [Wed, 17 Nov 2021 19:19:47 +0000 (20:19 +0100)]
version: 21.11-rc3

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2 years agonet: add macro for VLAN header length
Ferruh Yigit [Wed, 17 Nov 2021 18:24:26 +0000 (18:24 +0000)]
net: add macro for VLAN header length

Multiple drivers are defining macros for VLAN header length, to remove
the redundancy defining macro in the ether header.
And updated drivers to use the new macro.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
Acked-by: Jiawen Wu <jiawenwu@trustnetic.com>
2 years agoexamples/ethtool: close port before exit
Huisong Li [Thu, 6 May 2021 03:46:08 +0000 (11:46 +0800)]
examples/ethtool: close port before exit

Currently, ethtool directly ends the process after 'quit' cmd. In this
case, software resources are not released and hardware resources of the
device are not uninstalled.

This patch adds closing port operation to release resources.

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
2 years agoexamples/ethtool: enhance Rx/Tx queue NUMA affinity
Chengwen Feng [Thu, 6 May 2021 03:46:07 +0000 (11:46 +0800)]
examples/ethtool: enhance Rx/Tx queue NUMA affinity

In DPDK, 'rte_socket_id' means the running socket while
'rte_eth_dev_socket_id' is the device socket.
For better performance, memory which queue setup used and device
should be in the same socket.

This patch make sure it calls rte_eth_dev_socket_id API to get device
socket_id when setting ringparam.

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
2 years agohash: clarify comment for bucket entries number
Vladimir Medvedkin [Wed, 10 Nov 2021 18:36:14 +0000 (18:36 +0000)]
hash: clarify comment for bucket entries number

This patch adds a comment for RTE_HASH_BUCKET_ENTRIES
explaining why a particular value was chosen.

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
2 years agobuild: make gpudev optional
Elena Agostini [Wed, 17 Nov 2021 21:39:01 +0000 (21:39 +0000)]
build: make gpudev optional

This library can be made optional.
drivers/gpu and app/test-gpudev depend on this library,
so they are automatically disabled if the lib is disabled.

Signed-off-by: Elena Agostini <eagostini@nvidia.com>
2 years agonet/mlx5: fix modify field destination bit offset
Viacheslav Ovsiienko [Wed, 17 Nov 2021 11:14:35 +0000 (13:14 +0200)]
net/mlx5: fix modify field destination bit offset

If the modify field action requests the field copy/set transaction
from other field, the destination field hardware bit offset was
assigned incorrectly with non-zero byte offset, causing wrong
translations for the fields with sizes larger than 32 bits.

Fixes: 40c8fb1fd3b3 ("net/mlx5: update modify field action")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2 years agocommon/mlx5: fix memory leak in Windows MR deregistration
Michael Baum [Wed, 17 Nov 2021 11:02:55 +0000 (13:02 +0200)]
common/mlx5: fix memory leak in Windows MR deregistration

The "mlx5_devx_cmd_mkey_create" DevX cmd allocates DevX object using
mlx5_malloc and then creates MKey using glue function.
Compatibly, "mlx5_devx_cmd_destroy" cmd releases first the MKey using
glue function, and then free the DevX object using mlx5_free.

On Windows OS, the reg_mr function creates Mkey using
"mlx5_devx_cmd_mkey_create" cmd, but dereg_mr function using directly
glue function without freeing the object.
This behavior causes memory leak at each MR release.

In addition, the dereg_mr function makes sure that the MR pointer is
valid before destroying its fields, but always calls the memset function
that makes a difference to it.

This patch moves the dereg_mr function to use "mlx5_devx_cmd_destroy"
instead of glue function, and extends the validity test to the whole
function.

Fixes: ba420719823c ("common/mlx5: add reg/dereg MR on Windows")
Cc: stable@dpdk.org
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2 years agocommon/mlx5: fix user mode register access attribute
Michael Baum [Wed, 17 Nov 2021 10:57:09 +0000 (12:57 +0200)]
common/mlx5: fix user mode register access attribute

To detect the timestamp mode configured on the NIC the mlx5 PMD uses the
firmware command ACCESS_REGISTER_USER.
The HCA capability command has an attribute flag checking whether
firmware supports the command.

However, the HCA capability query command read the flag from wrong place
in PRM structure.

This patch move the flag to correct place.

Fixes: 972a1bf8120d ("common/mlx5: fix user mode register access command")
Cc: stable@dpdk.org
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2 years agonet/mlx5: fix MPLS tunnel outer layer overwrite
Dariusz Sosnowski [Wed, 17 Nov 2021 09:59:33 +0000 (11:59 +0200)]
net/mlx5: fix MPLS tunnel outer layer overwrite

mlx5 PMD incorrectly overwrote outer layer fields in MPLS tunnel
rte_flow patterns using defaults for MPLS tunnels. This included
overwriting UDP destination port in MPLSoUDP and GRE protocol field in
MPLSoGRE.

This patch fixes this behavior. If application provides the values in
flow pattern items preceding the MPLS flow item the provided values will
be used, otherwise the defaults will be applied.

Fixes: d1abe664ddde ("net/mlx5: add MPLS to Direct Verbs flow engine")
Cc: stable@dpdk.org
Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2 years agonet/mlx5: fix partial inline of fine grain packets
Dariusz Sosnowski [Wed, 17 Nov 2021 09:50:50 +0000 (11:50 +0200)]
net/mlx5: fix partial inline of fine grain packets

Assuming a user tried to send multi-segment packets, with
RTE_PMD_MLX5_FINE_GRANULARITY_INLINE flag set, using a device with
minimum inlining requirements (such as ConnectX-4 Lx or when user
specified them explicitly), sending such packets caused segfault.
Segfault was caused by failed invariants in
mlx5_tx_packet_multi_inline function.

This patch introduces a logic for multi-segment packets, with
RTE_PMD_MLX5_FINE_GRANULARITY_INLINE flag set, to omit mbuf scanning for
filling inline buffer and inline only minimal amount of data required.

Fixes: ec837ad0fc7c ("net/mlx5: fix multi-segment inline for the first segments")
Cc: stable@dpdk.org
Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2 years agodoc: explain partially supported features for ice PMD
Qi Zhang [Sun, 14 Nov 2021 03:40:57 +0000 (11:40 +0800)]
doc: explain partially supported features for ice PMD

Users are confused with a feature with "P", added necessary
explanation for this.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2 years agonet/sfc: support MAC address edits in transfer flows
Ivan Malov [Wed, 17 Nov 2021 11:44:38 +0000 (14:44 +0300)]
net/sfc: support MAC address edits in transfer flows

These edits affect the outermost header in the current processing state
of the packet, which might have been decapsulated by prior action DECAP.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
2 years agocommon/sfc_efx/base: support MAC address edit actions in MAE
Ivan Malov [Wed, 17 Nov 2021 11:44:37 +0000 (14:44 +0300)]
common/sfc_efx/base: support MAC address edit actions in MAE

In a tunnel packet, these actions affect the inner header if
action DECAP is set; otherwise, they affect the outer header.

Adding these actions is done in two steps: add the action to
the action mask and indicate the MAC address entry ID to use.
This allows the user to check the order of actions first and
allocate resources when time comes to enable the action rule.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
2 years agonet/sfc: organise MAE flow action parsing function arguments
Ivan Malov [Wed, 17 Nov 2021 11:44:36 +0000 (14:44 +0300)]
net/sfc: organise MAE flow action parsing function arguments

Add a context structure to simplify handling of action sets.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
2 years agonet/sfc: refine order of checks on MAE action set attach
Ivan Malov [Wed, 17 Nov 2021 11:44:35 +0000 (14:44 +0300)]
net/sfc: refine order of checks on MAE action set attach

The number of counters being non-zero can be detected before
the action set registry traversal, so move the check outside.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
2 years agoapp/testpmd: fix tunnel offload validation
Gregory Etelson [Tue, 2 Nov 2021 12:24:21 +0000 (14:24 +0200)]
app/testpmd: fix tunnel offload validation

Tunnel offload API allows application to restore packet to
its original form if chain of flows missed after DECAP action.
The main idea of the tunnel offload API was to query port PMD
to provide flow elements - actions or items.
Flow elements supplied by PMD are merged with original flow rule
elements provided by testpmd operator to create a new flow rule,
optimal for PMD, to implement the tunnel offload API.
That flow rule transformation is hidden form testpmd operator and uses
internal testpmd resources.

Current testpmd did not release tunnel offload resources if flow rule
validation failed.

The patch always releases tunnel offload resources after flow rule
validation returns.

Fixes: 1b9f274623b8 ("app/testpmd: add commands for tunnel offload")
Cc: stable@dpdk.org
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Reviewed-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
2 years agonet/failsafe: fix secondary process probe
Kumara Parameshwaran [Thu, 11 Nov 2021 12:44:58 +0000 (18:14 +0530)]
net/failsafe: fix secondary process probe

Remove the vdev args check for secondary process which prevents the
secondary from attaching to the device created by the primary process
via the hotplug framework. This check was removed for other vdevs but
was missed for failsafe.

Fixes: 4852aa8f6e21 ("drivers/net: enable hotplug on secondary process")
Cc: stable@dpdk.org
Signed-off-by: Kumara Parameshwaran <kumaraparamesh92@gmail.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2 years agonet/sfc: support regioned NIC DMA memory mapping type
Viacheslav Galaktionov [Wed, 17 Nov 2021 07:05:45 +0000 (10:05 +0300)]
net/sfc: support regioned NIC DMA memory mapping type

DMA on SN1022 SoC requires extra mapping of the memory via MCDI.

Signed-off-by: Viacheslav Galaktionov <viacheslav.galaktionov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
2 years agocommon/sfc_efx/base: support NIC DMA memory regions API
Andrew Rybchenko [Wed, 17 Nov 2021 07:05:44 +0000 (10:05 +0300)]
common/sfc_efx/base: support NIC DMA memory regions API

NIC DMA memory regions API allows to establish mapping of DMA addresses
used by NIC to host IOVA understood by the host when IOMMU is absent
and NIC cannot address entire host IOVA space because of too small
DMA mask.

The API does not allow to address entire host IOVA space, but allows
arbitrary regions of the space really used for the NIC DMA.

A DMA region needs to be mapped in order to perform MCDI initialization.
Since the NIC has not been probed at that point, its configuration cannot
be accessed and there an UNKNOWN mapping type is assumed.

Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
2 years agonet/sfc: fix printout labels for decrease TTL actions
Ivan Malov [Tue, 16 Nov 2021 21:41:27 +0000 (00:41 +0300)]
net/sfc: fix printout labels for decrease TTL actions

Fixes: 60e53c078d01 ("net/sfc: support decrement IP TTL actions in transfer flows")

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
2 years agonet/sfc: fix printout label for count action
Ivan Malov [Tue, 16 Nov 2021 21:41:26 +0000 (00:41 +0300)]
net/sfc: fix printout label for count action

Fixes: 96fd2bd69b58 ("net/sfc: support flow action count in transfer rules")
Cc: stable@dpdk.org
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
2 years agonet/bnxt: fix Rx next consumer index in mbuf alloc fail
Somnath Kotur [Wed, 17 Nov 2021 03:12:06 +0000 (08:42 +0530)]
net/bnxt: fix Rx next consumer index in mbuf alloc fail

The driver internal variable to track the next consumer index on
the Rx ring was not being set if there was an mbuf allocation
failure. In that scenario, eventually it would fall out of sync
with the actual consumer index and raise a false alarm on Thor
needlessly causing a segmentation fault with testpmd

Fixes: 03c8f2fe111c ("net/bnxt: detect bad opaque in Rx completion")
Cc: stable@dpdk.org
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
2 years agonet/bnxt: fix ULP context list deadlock
Kishore Padmanabha [Tue, 16 Nov 2021 13:04:37 +0000 (18:34 +0530)]
net/bnxt: fix ULP context list deadlock

The ULP context list was not updated when high availability
feature was deinitialized. This caused the ULP context list
to acquire the lock when it is not supposed to causing a
deadlock. The fix is to correctly clear the list.

Fixes: 3184b1ef666a ("net/bnxt: add HA support in ULP")
Cc: stable@dpdk.org
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2 years agonet/bnxt: fix multi adapter
Kishore Padmanabha [Tue, 16 Nov 2021 13:04:36 +0000 (18:34 +0530)]
net/bnxt: fix multi adapter

1. removed the global flag for TruFlow global config initialization.

2. Modified the TruFlow context lock to be a global lock instead
of per context lock.

3. The ULP context list is modified to check on the ULP configuration
data so alarm handlers can operate on the correct ULP context.

These changes help in support of multiple network cards using
single DPDK application.

Fixes: d75b55121bcd ("net/bnxt: add context list for timers")
Cc: stable@dpdk.org
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2 years agonet/bnxt: fix SRAM resource free block list
Kishore Padmanabha [Tue, 16 Nov 2021 13:04:35 +0000 (18:34 +0530)]
net/bnxt: fix SRAM resource free block list

The SRAM resource free did not reset the next block to be used
when the block is not empty. This caused the flows not be created
when max flows limit is reached and you delete one flow and try to
add a new flow. The fix calls the update of the next free block
even when block is not empty.

Fixes: 37ff91c158a3 ("net/bnxt: add SRAM manager model")

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2 years agonet/bnxt: remove settings for multiple session
Jay Ding [Tue, 16 Nov 2021 13:04:34 +0000 (18:34 +0530)]
net/bnxt: remove settings for multiple session

Move wc_tcam_slices_per_row and database structure of
global_cfg and if_tbl to session structure to support
multiple TruFlow sessions with different card type under single
DPDK application instance.

Signed-off-by: Jay Ding <jay.ding@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Farah Smith <farah.smith@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2 years agodoc: update release note for bnxt PMD
Ajit Khaparde [Fri, 5 Nov 2021 18:46:34 +0000 (11:46 -0700)]
doc: update release note for bnxt PMD

Updated support for RTE_FLOW_ACTION_TYPE_RSS.

Fixes: 239695f754cb ("net/bnxt: enhance RSS action support")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2 years agonet/bnxt: remove software prefetches from AVX2 Rx
Lance Richardson [Mon, 15 Nov 2021 18:24:10 +0000 (13:24 -0500)]
net/bnxt: remove software prefetches from AVX2 Rx

Testing has shown no performance benefit from software prefetching
of receive completion descriptors in the AVX2 burst receive path,
and slightly better performance without them on some CPU families,
so this patch removes them.

Fixes: c4e4c18963b0 ("net/bnxt: add AVX2 RX/Tx")
Cc: stable@dpdk.org
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2 years agonet/bnxt: avoid unnecessary work in AVX2 Rx
Lance Richardson [Mon, 15 Nov 2021 18:24:09 +0000 (13:24 -0500)]
net/bnxt: avoid unnecessary work in AVX2 Rx

Each call to the AVX2 vector burst receive function makes at
least one pass through the function's inner loop, loading
256 bytes of completion descriptors and copying 8 rte_mbuf
pointers regardless of whether there are any packets to be
received.

Unidirectional forwarding performance is improved by about
3-4% if we ensure that at least one packet can be received
before entering the inner loop.

Fixes: c4e4c18963b0 ("net/bnxt: add AVX2 RX/Tx")
Cc: stable@dpdk.org
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2 years agoapp/testpmd: fix flow transfer proxy port handling
Ivan Malov [Tue, 16 Nov 2021 15:38:17 +0000 (18:38 +0300)]
app/testpmd: fix flow transfer proxy port handling

The current approach detects the proxy port on each port (re-)plug and
may spam the log with error messages if the PMD does not support flows.
As testpmd is a debug tool, it must not do such implicit port handling.
Instead, the new API should be called only when the user requests that.

Revoke the existing code. Implement an explicit command-line primitive
to let the user find the proxy port themselves. Provide relevant hints.

Fixes: 1179f05cc9a0 ("ethdev: query proxy port to manage transfer flows")

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2 years agocommon/mlx5: fix MPRQ mempool registration
Dmitry Kozlyuk [Tue, 16 Nov 2021 11:55:44 +0000 (13:55 +0200)]
common/mlx5: fix MPRQ mempool registration

Mempool registration code had a wrong assumption that it is always
dealing with packet mempools and always called rte_pktmbuf_priv_flags(),
which returned a random value for different types of mempools.
In particular, it could consider MPRQ mempools as having externally
pinned buffers, which is wrong.
Packet mempools cannot be reliably recognized, but it is sufficient to
check that the mempool is not a packet one, so it cannot have externally
pinned buffers.
Compare mempool private data size to that of packet mempools to check.

Fixes: 690b2a88c2f7 ("common/mlx5: add mempool registration facilities")
Fixes: fec28ca0e3a9 ("net/mlx5: support mempool registration")

Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2 years agonet/mlx5: fix mutex unlock in Tx packet pacing cleanup
Chengfeng Ye [Tue, 16 Nov 2021 14:49:23 +0000 (06:49 -0800)]
net/mlx5: fix mutex unlock in Tx packet pacing cleanup

The lock sh->txpp.mutex was not correctly released on one path
of cleanup function return, potentially causing the deadlock.

Fixes: d133f4cdb706 ("net/mlx5: create clock queue for packet pacing")
Cc: stable@dpdk.org
Signed-off-by: Chengfeng Ye <cyeaa@connect.ust.hk>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2 years agonet/hns3: optimize Tx performance
Chengwen Feng [Tue, 16 Nov 2021 01:22:12 +0000 (09:22 +0800)]
net/hns3: optimize Tx performance

This patch uses tx_free_thresh to control mbufs free when the common
xmit algorithm is used.

This patch also modifies the implementation of PMD's tx_done_cleanup
because the mbuf free algorithm changed.

In the testpmd single core MAC forwarding scenario, the performance is
improved by 10% at 64B on Kunpeng920 platform.

Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
2 years agonet/hns3: optimize Tx performance by mbuf fast free
Chengwen Feng [Tue, 16 Nov 2021 01:22:11 +0000 (09:22 +0800)]
net/hns3: optimize Tx performance by mbuf fast free

Currently the vector and simple xmit algorithm don't support multi_segs,
so if Tx offload support MBUF_FAST_FREE, driver could invoke
rte_mempool_put_bulk() to free Tx mbufs in this situation.

In the testpmd single core MAC forwarding scenario, the performance is
improved by 8% at 64B on Kunpeng920 platform.

Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
2 years agoapp/testpmd: fix GTP PSC extension header length
Raslan Darawsheh [Thu, 4 Nov 2021 09:40:25 +0000 (11:40 +0200)]
app/testpmd: fix GTP PSC extension header length

Current implementation for raw encap sets the length to be in bytes,
but, GTP 'extension' header length is an 8-bit field in 4-octet units.

This fixes the length calculation of the header length.

Fixes: 9213c50e36fa ("app/testpmd: support GTP PSC option in raw sets")
Cc: stable@dpdk.org
Signed-off-by: Raslan Darawsheh <rasland@nvidia.com>
Reviewed-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2 years agonet/mlx5: fix keeping indirect RSS non-isolated mode
Dmitry Kozlyuk [Tue, 16 Nov 2021 07:38:34 +0000 (09:38 +0200)]
net/mlx5: fix keeping indirect RSS non-isolated mode

When a port starts in non-isolated mode,
an internal indirect RSS is created that includes all configured queues
and a flow rule is created that references this indirect RSS.
If before switching to non-isolated mode an indirect RSS was created
that includes the same set of queues, it would be reused at this point.
However, because the port had been stopped (or not yet started),
the TIR for this indirect RSS had been destroyed (or not yet created).
The flow rule could not be created and the port start failed.

Creation of TIRs is moved before configuring non-isolated mode flows,
but it is not enough because of the following issue.

Commit 0cedf34da78f ("net/mlx5: move Rx queue reference count")
changed mlx5_rxq_get() not to increment RxQ control structure
reference count, mlx5_rxq_ref() was introduced for this purpose.
mlx5_ind_table_obj_attach() was not updated to use the new function,
so when the port was stopped, the control structure reference count
of an RxQ used in RSS reached zero and the structure was destroyed.

Use mlx5_rxq_ref() to keep RxQ control structure
needed for indirect RSS persistence across port restart.

Fixes: ec4e11d41d12 ("net/mlx5: preserve indirect actions on restart")
Fixes: 0cedf34da78f ("net/mlx5: move Rx queue reference count")
Cc: stable@dpdk.org
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>