Commit Graph

29179 Commits

Author SHA1 Message Date
Igor Russkikh
b5886e64fc maintainers: update for Marvell QLogic
Adding Marvell prefix for qlogic drivers.
Removing myself as I'm no longer responsible for qede driver

Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
Signed-off-by: Rasesh Mody <rmody@marvell.com>
Acked-by: Devendra Singh Rawat <dsinghrawat@marvell.com>
2021-07-31 12:56:01 +02:00
Igor Russkikh
84fa9c35d3 maintainers: update for atlantic
Fixing ex-Aquantia email - it is now part of Marvell.
Removing Pavel Belous email - he is not in company now.
Adding Marvell tree to run this through.

Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
2021-07-31 12:55:19 +02:00
Nithin Dabilpuram
d3394c6c26 doc: announce security API changes for inline IPsec
Announce changes to make rte_security_set_pkt_metadata() and
rte_security_get_userdata() inline instead of C functions and
also addition of another field in structure rte_security_ctx for
holding flags.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2021-07-30 21:08:19 +02:00
Michael Baum
56ec985f31 crypto/mlx5: fix leaks on probing failure
In crypto driver probing, there are two validations after context
allocation.

When one of them fails, the context structure was not freed what caused
a memory leak.

Free it.

Fixes: debb27ea34 ("crypto/mlx5: create login object using DevX")
Fixes: e8db4413cb ("crypto/mlx5: add keytag configuration")
Cc: stable@dpdk.org

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2021-07-30 21:08:19 +02:00
Arek Kusztal
135e3a4046 crypto/qat: disable asymmetric crypto on GEN3
This patch disables asymmetric crypto PMD on GEN3 devices.

Fixes: 1f5e4053f9 ("common/qat: support GEN3 devices")
Cc: stable@dpdk.org

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
2021-07-30 21:08:19 +02:00
Arek Kusztal
3f6c8e77dd drivers: fix return of unsupported features on QAT GEN4
Fix return code when asymmetric crypto
or compression service is selected on GEN4 devices.

Fixes: 8f393c4ffd ("common/qat: support GEN4 devices")

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
2021-07-30 21:08:19 +02:00
Matan Azrad
dcf384b4ff examples/l2fwd-crypto: support cipher multiple data-unit
The support for multiple data-units includes the next:
- Add a new command-line argument to provide the data-unit length.
- Set the length in the cipher xform.
- Validate device capabilities for this feature.
- Pad the AES-XTS operation length to be aligned to the defined data-unit.

Signed-off-by: Matan Azrad <matan@nvidia.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-07-30 21:08:19 +02:00
Akhil Goyal
12b650efd4 crypto/octeontx: fix freeing after device release
When the PMD is removed, rte_cryptodev_pmd_release_device
is called which frees cryptodev->data, and then tries to free
cryptodev->data->dev_private, which causes the heap use
after free issue.

A temporary pointer is set before the free of cryptodev->data,
which can then be used afterwards to free dev_private.

Fixes: bfe2ae495e ("crypto/octeontx: add PMD skeleton")
Cc: stable@dpdk.org

Reported-by: Zhihong Peng <zhihongx.peng@intel.com>
Signed-off-by: Akhil Goyal <gakhil@marvell.com>
2021-07-30 21:08:19 +02:00
Ciara Power
eeaeca82b8 cryptodev: fix freeing after device release
The PMD destroy function was calling the release function, which frees
cryptodev->data, and then tries to free cryptodev->data->dev_private,
which causes the heap use after free issue.

A temporary pointer is set before the free of cryptodev->data,
which can then be used afterwards to free dev_private.
The free cannot be moved to before the release function is called,
as dev_private is used in the PMD close function while being released.

Fixes: 9e6edea418 ("cryptodev: add APIs to assist PMD initialisation")
Cc: stable@dpdk.org

Reported-by: Zhihong Peng <zhihongx.peng@intel.com>
Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-07-30 21:08:12 +02:00
Suanming Mou
0f678fdd8c test/crypto: increase mbuf data payload size to 4K
Currently, there is vendor which can support bigger crypto data size.
Increase the default mbuf data payload size to 4K as needed.

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-07-30 20:57:23 +02:00
Fan Zhang
fe9e06ab08 crypto/qat: fix raw data path dequeue
This patch fixes the raw data path dequeue burst fail problem.
Previously in case the queue is full and not all packets
asked to be dequeued are processed, the dequeue burst will
never happen.

Fixes: c21574edc5 ("cryptodev: add dequeue count parameter in raw API")
Cc: stable@dpdk.org

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
2021-07-30 20:57:23 +02:00
Kiran Kumar K
675ba70691 crypto/cnxk: add null check for RSA key data
Coverity is reporting FORWARD_NULL issue when qt data is NULL.
Adding NULL check for this.

Coverity issue: 371893
Fixes: 5a3513caeb ("crypto/cnxk: add asymmetric session")

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-07-30 20:57:23 +02:00
Amaranath Somalapuram
889317b7ec crypto/ccp: convert driver from vdev to PCI
drop all the code duplicating the PCI bus driver
developed for enable IOMMU in vdev.

Signed-off-by: Amaranath Somalapuram <asomalap@amd.com>
2021-07-30 20:57:23 +02:00
Arek Kusztal
92a3ea2244 crypto/qat: fix array access
Fix possible access of an array by negative index in function
qat_sym_qp_setup.

Coverity issue: 372131, 372134
Fixes: 8f393c4ffd ("common/qat: support GEN4 devices")

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Adam Dybkowski <adamx.dybkowski@intel.com>
2021-07-30 20:57:23 +02:00
Kiran Kumar K
8cd5064c46 common/cpt: update asymmetric ECDSA messages
Adding changes to asymmetric ECDSA messages to align with
the new ucode for octeontx2 device.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-07-30 20:57:23 +02:00
Kiran Kumar K
64e5ee3075 crypto/cnxk: update asymmetric ECDSA messages
Adding changes to asymmetric ECDSA messages to align with
the new ucode for cnxk device.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-07-30 20:57:23 +02:00
Kiran Kumar K
f4d66aef98 common/cnxk: add constants to EC groups
New ucode expects const values A and B for asymmetric ECDSA
messages. Adding roc support for this.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
2021-07-30 20:57:23 +02:00
Ajit Khaparde
1438a12cc8 net/bnxt: disable VF representors on Thor
In a few cases with Thor device, PMD can segfault when VF
representors are specified. Temporarily fix it by preventing
VF reps for Thor device. This will be addressed in next release.

Fixes: 3fe124d253 ("net/bnxt: support Thor platform")
Cc: stable@dpdk.org

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2021-07-31 00:20:59 +02:00
Joyce Kong
9f76c60286 test/rcu: use compiler atomics for data sync
Covert rte_atomic usages to compiler atomic built-ins in
rcu_perf testcases.

Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2021-07-30 23:56:07 +02:00
Joyce Kong
8c816dc54d test/service: use compiler atomics for lock sync
Convert rte_atomic usages to compiler atomic built-ins for lock
sync in service_cores testcases.

Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2021-07-30 23:56:03 +02:00
Joyce Kong
e9fea30314 test/mempool: use compiler atomics for lcores sync
Convert rte_atomic usages to compiler atomic built-ins for lcores
sync in mempool_perf testcases. Meanwhile, remove unnecessary
synchro init as it would be set to 0 when launching cores.

Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2021-07-30 23:55:36 +02:00
Joyce Kong
eb9ea11c97 test/mempool: remove unused variable for lcores sync
Remove the unused synchro variable as there is no lcores
sync in mempool function test.

Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2021-07-30 19:12:54 +02:00
Joyce Kong
8d08f7c9ae test/mcslock: use compiler atomics for lcores sync
Convert rte_atomic usages to compiler atomic built-ins for lcores
sync in mcslock testcases.

Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2021-07-30 19:10:58 +02:00
Joyce Kong
fb2a9bd266 test/rwlock: use compiler atomics for lcores sync
Convert rte_atomic usages to compiler atomic built-ins for lcores
sync in rwlock testcases.

Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2021-07-30 19:08:43 +02:00
Joyce Kong
d2794d6719 test/spinlock: use compile atomics for lcores sync
Convert rte_atomic usages to compiler atomic built-ins for lcores
sync in spinlock testcases.

Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2021-07-30 19:06:35 +02:00
Joyce Kong
f11bdb206a test/ticketlock: use compiler atomics for lcores sync
Convert rte_atomic usages to compiler atomic built-ins for lcores
sync in ticketlock testcases.

Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2021-07-30 19:04:34 +02:00
Dmitry Kozlyuk
23ce9e0a19 eal/windows: cleanup virt2phys handle
eal_mem_virt2phys_init() opens a handle for use by rte_mem_virt2phy().
Close this handle on EAL cleanup.

Fixes: 2a5d547a4a ("eal/windows: implement basic memory management")
Cc: stable@dpdk.org

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Ranjit Menon <ranjit.menon@intel.com>
2021-07-30 18:56:01 +02:00
Chaoyong He
97986fa564 examples/l3fwd: disable multi-queue for single queue
Set the Rx multi-queue mode to NONE when configuring a port that is
associated with hardware that only supports a single Rx queue.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Signed-off-by: Heinrich Kuhn <heinrich.kuhn@netronome.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2021-07-30 18:56:01 +02:00
Chengchang Tang
d3319ef938 app/procinfo: add device registers dump
This patch add support for dump the device registers from a running
application. It can help developers locate the problem.

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
2021-07-30 18:45:49 +02:00
Konstantin Ananyev
d6f638393f app/acl: add script to automate testing
The purpose of this script is to help automate ACL library functional
testing using test-acl app.
Sample input files are also provided.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2021-07-30 18:34:35 +02:00
Konstantin Ananyev
ca2183d3d6 app/acl: allow comment and empty line in input
Allow comment (lines starting with '#') and empty lines in input
(rules, traces) files. These lines will be just skipped and shouldn't
affect the result anyhow.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2021-07-30 18:33:55 +02:00
Kishore Padmanabha
9967ac7f84 net/bnxt: fix stats counter resource
The flow counters is reduced from 8192 to 6912 for Whitney
for compatibility with different versions of FW.
The FW resource manager splits resources for flow offload
and other use cases. A higher value used for flow offload
by the PMD can cause overriding the resources set aside by
FW. This in turn can lead to FW rejecting filter creation
requests during initialization.

Use a smaller safe value to avoid these issues.

Fixes: 6fad911510 ("net/bnxt: reorganize ULP template directory structure")
Cc: stable@dpdk.org

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2021-07-30 17:37:35 +02:00
Jay Ding
c18b1b1f99 net/bnxt: fix initialization with old firmware
Fix the resource qcap list handling to use size based on
FW response.
The size of resource qcap list could be different when FW
and application are not matching. Application should be able
to handle this scenario when the FW is older and the size of
qcap is smaller. Failure to do this causes initialization failure.

This patch is needed for backward compatibility on different
firmware versions.

Fixes: 873661aa64 ("net/bnxt: support shared session")
Cc: stable@dpdk.org

Signed-off-by: Jay Ding <jay.ding@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2021-07-30 17:21:36 +02:00
Naga Harish K S V
6922655cad eventdev: fix event port setup in Tx adapter
The event port config set by application in
rte_event_eth_tx_adapter_create API is modified in
default configuration callback function. This patch removes
this hardcode to use application provided event port
config value.

Fixes: a3bbf2e097 ("eventdev: add eth Tx adapter implementation")
Cc: stable@dpdk.org

Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
2021-07-30 12:55:19 +02:00
Pavan Nikhilesh
ac56433de5 event/cnxk: fix reading stale Tx queue depth
Reads to Tx queue FC memory need to be atomic to avoid cores using
same Tx queue spinning on stale values.

Fixes: 313e884a22 ("event/cnxk: support Tx adapter fast path")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
2021-07-30 12:28:52 +02:00
Paulis Gributs
e1d38504e1 app/testpmd: fix hotplug removal
After removing rte_eth_devices from testpmd the vm_hotplug no longer
recovered after removal of a device, because the port was closed
before querying it.

Fixes: 0a0821bcf3 ("app/testpmd: remove most uses of internal ethdev array")

Signed-off-by: Paulis Gributs <paulis.gributs@intel.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
2021-07-30 14:27:01 +02:00
Gregory Etelson
b2a9e4a855 app/testpmd: fix Tx checksum calculation for tunnel
csumonly engine calculates Tx checksum of a tunnelled packet
for outer headers only or separately for outer and inner headers.
The calculation method is determined by checksum configuration options.
If Tx checksum calculation is separated,
the inner headers are processed before outer headers.

Inner headers processing sets checksum values to 0 unconditionally.
If Tx configuration offloads inner checksums only, outer checksum
calculation in software will read 0 instead of real values
and produce wrong result.

The patch zeroes inner checksums only before software calculation.

Fixes: 6b520d54eb ("app/testpmd: use Tx preparation in checksum engine")
Cc: stable@dpdk.org

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2021-07-30 14:01:35 +02:00
Dapeng Yu
b3bc560bd6 net/softnic: fix memory leak as profile is freed
In function softnic_table_action_profile_free(), the memory referenced
by pointer "ap" in the instance of "struct softnic_table_action_profile"
is not freed.

This patch fixes it.

Fixes: a737dd4e58 ("net/softnic: add table action profile")
Cc: stable@dpdk.org

Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
2021-07-30 13:58:31 +02:00
Dapeng Yu
51799b4f97 net/softnic: fix null dereference in arguments parsing
When there is no "firmware" in arguments, the "firmware" pointer is
null, and will be dereferenced by rte_strscpy().

This patch moves the code block which copies character string from
"firmware" to "p->firmware" into the "if" statements where "firmware"
argument exists and it is duplicated successfully.

Coverity issue: 372136
Fixes: d8f852f5f3 ("net/softnic: fix memory leak in arguments parsing")
Cc: stable@dpdk.org

Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
2021-07-30 13:32:15 +02:00
Nathan Skrzypczak
4e30586dcd net/memif: fix abstract socket address length
This fixes using abstract sockets with memifs.
We were not passing the exact addr_len,
which requires zeroing the remaining sun_path
and doesn't appear well in other utilities (e.g. lsof -U)

Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Reviewed-by: Jakub Grajciar <jgrajcia@cisco.com>
2021-07-30 13:25:54 +02:00
Ivan Malov
08b3a170cb common/sfc_efx/base: do not validate MAE action COUNT order
In DPDK + Open vSwitch use case, action COUNT is always the
first one to be added. In particular, it goes before action
DECAP in that use case. The current code enforces the right
order (DECAP goes before COUNT), and this provokes failures.
As an exception, do not validate the order for action COUNT.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
2021-07-30 13:14:50 +02:00
Ghalem Boudour
3e7008459d net/ena: enable multi-segment in Tx offload flags
The DPDK ENA driver does not provide multi-segment tx offload capability.
Let's add DEV_TX_OFFLOAD_MULTI_SEGS to ports offload capability by
default, and always set it in dev->data->dev_conf.txmode.offload.

This flag in not listed in doc/guides/nics/features/default.ini, so
ena.ini does not need to be updated.

Fixes: 1173fca25a ("ena: add polling-mode driver")
Cc: stable@dpdk.org

Signed-off-by: Ghalem Boudour <ghalem.boudour@6wind.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Michal Krawczyk <mk@semihalf.com>
2021-07-30 12:10:20 +02:00
Bing Zhao
f8c42c53ce net/mlx5: fix meter hierarchy validation with yellow
In mlx5 PMD, the meter hierarchy only supports the green color. It
means that a meter action can only be in the green action list. In
the meanwhile, the yellow action list should be empty now. Any
action for the yellow color policy will be considered invalid if
the green color policy is a hierarchy.

Also, the error message printing of meter hierarchy validation is
fixed by removing an incorrect checking.

Fixes: 4b7bf3ffb4 ("net/mlx5: support yellow in meter policy validation")
Fixes: a3b7af90ba ("net/mlx5: validate meter action in policy")

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2021-07-29 22:06:43 +02:00
Bing Zhao
d5bb76d5b0 net/mlx5: fix green meter policy RSS queues
Both green policy and yellow policy could support RSS actions
simultaneous, the Rx queues configuration may be different between
them while the other fields should be the same.

When the only green color policy was supported in the past, the
queues copied and saved in the temporary workspace were used. Since
the yellow support was added, the queues stored in the thread
workspace would be overwritten by the yellow color policy. The flow
rule created using a meter with such a policy would have the same
RSS distribution for both green and yellow packets.

By using the meter action containers RSS information instead of the
workspace RSS, this overwritten can be prevented.

Fixes: b38a12272b ("net/mlx5: split meter color policy handling")

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2021-07-29 22:06:42 +02:00
Bing Zhao
a9e3a4a9e2 net/mlx5: fix meter EIR calculation
Before the yellow color policy was supported, the only supported
profile of metering is RFC2697 and EIR is not part of the profile.
When creating a meter with this profile, the EIR part was always
zero.

After the yellow color policy supported and RFC2698 & 4115 support
was introduced, EIR is relevant and should be calculated. Usually
the EIR could not be zero and the formula for calculating CIR
mantissa & exponent could be reused.

The EIR could be 0 and then only green and red colors will be
supported from the specification. Both the mantissa and exponent
parts should be set to 0. Currently, the formula wrongly sets
non-zero values for the EIR=0 case.

Setting the mantissa and the exponent parts to zeros when EIR is 0
will solve the issue.

Fixes: 33a7493c8d ("net/mlx5: support meter for trTCM profiles")

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2021-07-29 22:05:36 +02:00
Bing Zhao
8a0fca1101 net/mlx5: fix meter profile validation
After the support for yellow color and RFC2698 & RFC4115 were added,
the profile validation adjustment was missed. With this fix, the
validation is like below:
  1. Legacy metering only supports RFC2697 without EBS.
  2. ASO metering can support all three profiles.
  3. For backward compatibility, none EBS with RFC2697 profile is
     still supported and the checking is done in the meter
     creation stage.

In the meanwhile, some checking which was done in the parameters
calculation stage is moved in the validation in order to skip the
useless checking.

Fixes: 33a7493c8d ("net/mlx5: support meter for trTCM profiles")

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2021-07-29 22:03:14 +02:00
Viacheslav Ovsiienko
f17e4b4ffe net/mlx5: add Tx scheduling check on queue creation
The send scheduling on timestamp offload requires the Send
Queue (SQ) shares its User Access Region (UAR) with the
pacing Clock Queue. The SQ can be created by mlx5 PMD either
with DevX or with Verbs. If the SQ is being created with
DevX, the dedicated UAR can be specified and all the SQs
share the single UAR. Once SQ is being created with Verbs
the SQ's UAR is allocated by the rdma-core library internally
on its own and there is no UAR sharing. This caused hardware
errors on WAIT WQEs and overall send scheduling malfunction.

If SQs are going to be created with Verbs and the send
scheduling offload is explicitly requested via tx_pp devarg
the device probing is rejected as device configuration
can't satisfy the requirements.

Fixes: 3ec73abeed ("net/mlx5/linux: fix Tx queue operations decision")
Fixes: 8f848f32fc ("net/mlx5: introduce send scheduling devargs")
Cc: stable@dpdk.org

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2021-07-29 18:01:23 +02:00
Viacheslav Ovsiienko
dab07e489c net/mlx5: fix timestamp initialization on empty clock queue
The committing completions by clock queue might be delayed
after queue initialization is done and the only Clock Queue
completion entry (CQE) might keep the invalid status till
the CQE first update happens.

The mlx5_txpp_update_timestamp() wrongly recognized invalid
status as error and reported about lost synchronization.

The patch recognizes the invalid status as "not updated yet"
and accurate scheduling initialization routine waits till
CQE first update happens.

Some collateral typos in comment are fixed as well.

Fixes: 77522be0a5 ("net/mlx5: introduce clock queue service routine")
Cc: stable@dpdk.org

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2021-07-29 18:01:23 +02:00
Asaf Penso
e3db225065 net/mlx5: fix flow engine type in function name
The concrete function names have a prefix for flow_dv.
This emphasizes the flow engine is Direct Verbs.

The function flow_get_aged_flows doesn’t have this prefix.
It creates an inconsistency with the other functions.

Update the function name to include dv.

Fixes: fa2d01c87d ("net/mlx5: support flow aging")
Cc: stable@dpdk.org

Signed-off-by: Asaf Penso <asafp@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2021-07-29 18:01:22 +02:00
Suanming Mou
6821a57a9b net/mlx5: limit implicit MPLS RSS expansion over GRE
As [1] optimized the MPLS RSS expansion before, this commit limits
the implicitly MPLS RSS expansion for MPLSoGRE as well. For the
RSS flow matcher to GRE level only, it will not expand the MPLS
match item for the sub flows due to performance consideration.

The original RSS flow match item:
ETH VLAN IPV6 GRE GRE_KEY END

The previous RSS expansion:
ETH VLAN IPV6 GRE GRE_KEY END
ETH VLAN IPV6 GRE GRE_KEY IPV4 END
ETH VLAN IPV6 GRE GRE_KEY MPLS IPV4 END
ETH VLAN IPV6 GRE GRE_KEY MPLS ETH IPV4 END

New RSS expansion:
ETH VLAN IPV6 GRE GRE_KEY END
ETH VLAN IPV6 GRE GRE_KEY IPV4 END

[1]
commit a26cc30fa0 ("net/mlx5: limit inner RSS expansion for MPLS")

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Xiaoyu Min <jackmin@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2021-07-29 18:01:22 +02:00