Commit Graph

26953 Commits

Author SHA1 Message Date
Hemant Agrawal
d5e8a9f7eb doc: add tested platforms with NXP SoCs
Add tested platforms with NXP SoCs to the 21.02 release notes.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2021-02-11 14:47:38 +01:00
Ajit Khaparde
5a5e554835 doc: add tested platforms for Broadcom NICs
Add tested platforms for Broadcom NICs.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2021-02-11 12:06:20 +01:00
Raslan Darawsheh
084c01643a doc: add tested platforms with Mellanox NICs
Add tested platforms with Mellanox NICs to the 21.02 release notes.

Signed-off-by: Raslan Darawsheh <rasland@nvidia.com>
2021-02-11 12:01:15 +01:00
Bo Chen
01ed3ccf7c doc: add tested Intel platforms with Intel NICs
Add tested Intel platforms with Intel NICs to v21.02 release note.

Signed-off-by: Bo Chen <box.c.chen@intel.com>
2021-02-11 11:06:33 +01:00
Ferruh Yigit
618f0f4ac6 app/testpmd: fix help of metering commands
Helps strings syntax is "command : description", the 'command' part was
missing, updated command help strings.

Fixes: 281eeb8afc ("app/testpmd: add commands for metering and policing")
Fixes: 30ffb4e67e ("app/testpmd: add commands traffic metering and policing")
Fixes: e63b50162a ("app/testpmd: clean metering and policing commands")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
2021-02-10 22:27:03 +01:00
Viacheslav Ovsiienko
b8ee0a16cb doc: fix mark action zero value in mlx5 guide
The zero value in flow MARK action is reported in Rx datapath
as tagged with zero FDIR ID. Once packet is marked in flow engine
it will be always reported as tagged. For metadata only the zero
value means there is "no metadata" in the packet and the metadata
flag is not set for the case.

Fixes: 3ceeed9f78 ("doc: update flow mark action in mlx5 guide")
Cc: stable@dpdk.org

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2021-02-10 22:27:03 +01:00
Matan Azrad
b7fa0bf4d5 vdpa/mlx5: fix polling threads scheduling
When the event mode is with 0 fixed delay, the polling-thread will never
give-up CPU.

So, when multi-polling-threads are active, the context-switch between
them will be managed by the system which may affect latency according to
the time-out decided by the system.

In order to fix multi-devices polling thread scheduling, this patch
forces rescheduling for each CQ poll iteration.

Move the polling thread to SCHED_RR mode with maximum priority to
complete the fairness.

Fixes: 6956a48cab ("vdpa/mlx5: set polling mode default delay to zero")

Signed-off-by: Matan Azrad <matan@nvidia.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Xueming Li <xuemingl@nvidia.com>
2021-02-10 22:17:47 +01:00
Marvin Liu
894028ace2 vhost: fix packed ring dequeue offloading
When vhost is doing dequeue offloading, it parses ethernet and L3/L4
headers of the packet. Then vhost will set corresponding value in mbuf
attributes. It means offloading action should be after packet data copy.

Fixes: 75ed516978 ("vhost: add packed ring batch dequeue")
Cc: stable@dpdk.org

Signed-off-by: Marvin Liu <yong.liu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2021-02-10 22:17:47 +01:00
Feifei Wang
b9c366e029 net/ixgbe: fix UDP zero checksum on Arm
There is an 82599 errata that UDP frames with a zero checksum are
incorrectly marked as checksum invalid by the hardware.  This was
leading to misleading PKT_RX_L4_CKSUM_BAD flag.

To fix it for the NEON path in Arm platform, change the bad UDP checksum to
unknown, and then let software application to recompute the checksum.

NICs: 82599(igb)
Driver: ixgbe(vector)
Architecture: arm64
$:./app/dpdk-testpmd -c 0x3 -w 0002:f9:00.0 -- -i
--port-topology=chained --enable-rx-cksum
test-pmd> set fwd rxonly
test-pmd> set verbose 1
test-pmd> start

1. UDP Test:
Package: (Ether()/IP()/UDP(checksum=0)
ol_flags: PKT_RX_L4_CKSUM_UNKNOWN PKT_RX_IP_CKSUM_GOOD

2. TCP Test:
Package: (Ether()/IP()/TCP(checksum=0)
ol_flags: PKT_RX_L4_CKSUM_BAD PKT_RX_IP_CKSUM_GOOD

Bugzilla ID: 629
Fixes: af75078fec ("first public release")
Cc: stable@dpdk.org

Reported-by: Paolo Valerio <pvalerio@redhat.com>
Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
2021-02-10 21:51:38 +01:00
Haiyue Wang
9a40edb599 net/ixgbe: fix UDP zero checksum on x86
There is an 82599 errata that UDP frames with a zero checksum are
incorrectly marked as checksum invalid by the hardware.  This was
leading to misleading PKT_RX_L4_CKSUM_BAD flag.

This patch changes the bad UDP checksum to PKT_RX_L4_CKSUM_UNKNOWN,
so the software application will then have to recompute the checksum
itself if needed.

Bugzilla ID: 629
Fixes: af75078fec ("first public release")
Cc: stable@dpdk.org

Reported-by: Paolo Valerio <pvalerio@redhat.com>
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Tested-by: Paolo Valerio <pvalerio@redhat.com>
2021-02-10 21:49:00 +01:00
Qi Zhang
8a8c4760a1 ethdev: refine doxygen comment of UDP tunnel API
Clarify what is the scope and impact of the UDP port tunnel API.

There are still missing infos to be improved in future:
	- no capability flag
	- dependency between ports of the same device
	- required privilege

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2021-02-10 21:48:59 +01:00
Juraj Linkeš
7390f02315 config/arm: fix part number for clang Ubuntu 18.04
Rename the 'default' part number in clang cross-file to fix the
following issue:
config/arm/meson.build:238:2: ERROR:  Problem encountered: Unsupported
part number default of implementer generic. Please add support for it or
use the generic (-Dmachine=generic) build.

Fixes: 3d01d65ba0 ("config: add aarch64 clang for Ubuntu 18.04")

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
2021-02-10 19:37:16 +01:00
Honnappa Nagarahalli
fddbe822c3 config/arm: add Qualcomm
Add Qualcomm config back which was deleted.

Fixes: 91c730fd4e ("config/arm: remove unused or superfluous variables")

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
2021-02-10 11:29:32 +01:00
Bruce Richardson
9ff791eff6 eal: fix automatic loading of drivers as shared libs
When checking the loading of EAL shared lib to see if we have a shared
DPDK build, we only want to include part of the ABI version in the check
rather than the whole thing. For example, with ABI version 21.1 for DPDK
release 21.02, the linker links the binary against librte_eal.so.21,
without the ".1".

To avoid any further brittleness in this area, we can check for multiple
versions when doing the check, since just about any version of EAL implies
a shared build. Therefore we check for presence of librte_eal.so with full
ABI_VERSION extension, and then repeatedly remove the end part of the
filename after the last dot, checking each time. For example (debug log
output for static build):

  EAL: Checking presence of .so 'librte_eal.so.21.1'
  EAL: Checking presence of .so 'librte_eal.so.21'
  EAL: Checking presence of .so 'librte_eal.so'
  EAL: Detected static linkage of DPDK

Fixes: 7781950f4d ("eal: fix shared lib mode detection")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Sunil Pai G <sunil.pai.g@intel.com>
2021-02-10 10:01:48 +01:00
Bruce Richardson
0d32fd0945 telemetry: mark init function as internal-only
The "rte_telemetry_init()" function is for use by "rte_eal_init()" and
should not be part of the public API. Mark it as internal only.

Fixes: 6dd571fd07 ("telemetry: introduce new functionality")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2021-02-09 13:36:45 +01:00
Thomas Monjalon
a69f94e934 version: 21.02-rc3
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2021-02-05 21:11:44 +01:00
Sarosh Arif
b25f0a7df8 usertools: show error if unable to reserve hugepages
Sometimes the system is unable to reserve the requested hugepages because
enough space is not available in the RAM. In that case, currently the
script displays no error message hence the user can be under the delusion
that the hugepages requested are all successfully reserved. This patch
displays an error message if the pages reserved are different from the
requested pages.

Signed-off-by: Sarosh Arif <sarosh.arif@emumba.com>
2021-02-05 19:49:32 +01:00
David Christensen
2204feccf2 usertools: show hugepages on POWER systems
The IBM PowerNV systems include NUMA nodes that don't have associated
CPUs or hugepage memory.  Here is an example on an IBM AC922 system:

$ lscpu
...
NUMA node0 CPU(s):   0-63
NUMA node8 CPU(s):   64-127
NUMA node252 CPU(s):
...

$ numastat -m
...
                          Node 0          Node 8        Node 252
                 --------------- --------------- ---------------
MemTotal               126763.19       130785.06            0.00
MemFree                119513.38       125294.44            0.00
MemUsed                  7249.81         5490.62            0.00
...
HugePages_Total             4.00         1734.00            0.00
HugePages_Free              0.00            4.00            0.00
HugePages_Surp              4.00         1730.00            0.00
...

Modify dpdk-hugepages.py to test for the ../hugepages directory before
attempting to parse the hugepage entries.

Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
2021-02-05 19:49:32 +01:00
David Marchand
c48d8c3164 mbuf: remove unneeded atomic generic header include
There is no need for the direct inclusion of the generic/ header [1]
now that we don't use the rte_atomic API anymore.

It was the last case of direct inclusion of the generic/ headers,
so the flag -Wno-unused-function can be dropped.

1: https://git.dpdk.org/dpdk/commit/?id=3eb860b08eb7

Fixes: e41d27a68d ("mbuf: remove atomic reference counters")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2021-02-05 19:49:32 +01:00
Bernard Iremonger
65584ebe02 maintainers: update for testpmd
remove Bernard Iremonger
remove Wenzhuo Lu

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2021-02-05 18:13:57 +01:00
John McNamara
a22ab9936b license: remove pmdinfogen from exceptions
The C based pmdinfogen tool has been replaced by a Python
based tool with a BSD license. As such, we no longer need
to call out a licence exception for pmdinfogen.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2021-02-05 18:13:19 +01:00
David Marchand
1a3022b2ae devtools: remove ethdev ABI exception
Now that the ethernet driver dev_ops structure definition is not
exported anymore, there is no need for an exception.
abidiff will only consider structures defined in the installed headers
(passed with --headers-dirX options).

Fixes: df96fd0d73 ("ethdev: make driver-only headers private")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2021-02-05 17:47:30 +01:00
Olivier Matz
daeb7c7f41 mempool: fix panic on dump or audit
When doing a mempool dump or an audit, the application can panic because
the length of the cache is greater than the flush threshold, which is
seen as a fatal error. But this can temporarily happen when the mempool
is in use.

Fix the panic condition to abort only when the cache length is greater
than the array.

Fixes: ea5dd2744b ("mempool: cache optimisations")
Cc: stable@dpdk.org

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2021-02-05 17:40:23 +01:00
Thomas Monjalon
24fa59808d config: increase default maximum number of NUMA nodes
AMD CPU can present a high number of NUMA nodes.
On a dual-socket with 16 CCXs per CPU,
the option "CCX (or LLC) as NUMA domain" will expose 32 NUMA nodes.

The DPDK default should be 32 for better compatibility.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: Asaf Penso <asafp@nvidia.com>
2021-02-05 17:36:31 +01:00
Harry van Haaren
b07b80fe1c eventdev: fix a return value comment
The PMD info get API has a void return type. Remove the
@return 0 Success doxygen comment as it doesn't make sense here.

Fixes: 5223a1f3b8 ("eventdev: define southbound driver interface")
Cc: stable@dpdk.org

Reported-by: Fredrik A Lindgren <fredrik.a.lindgren@tietoevry.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
2021-02-04 13:51:45 +01:00
Timothy McDaniel
d9e8329518 event/dlb: fix accessing uninitialized variables
This patch updates the PMD to initialize response fields
prior to calling into the PF layer.

Coverity issue: 366200, 366202, 366205
Fixes: eb14a3421a ("event/dlb: add eventdev start")
Fixes: f007362194 ("event/dlb: add eventdev stop and close")
Cc: stable@dpdk.org

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
2021-02-04 13:25:43 +01:00
Ciara Power
5ba31a4e2e app/crypto-perf: fix handling of config parameters
The crypto perf graphing script did not handle parsing parameters
from the JSON config files correctly.
A common parsing function is used for both EAL and app parameters,
to ensure they are handled the same way and to reduce code duplication.
Short parameters are now passed with the value being a second argument,
rather than as one argument with dividing space.
Long parameters with no expected value are supported for EAL now also.
e.g. "--no-huge" can be added to config as "no-huge": true

Fixes: f400e0b82b ("app/crypto-perf: add script to graph perf results")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Adam Dybkowski <adamx.dybkowski@intel.com>
2021-02-04 19:21:27 +01:00
Ciara Power
96b32dc7d2 doc: fix crypto perf script guide
The guide for using the crypto perf graphing script had some incorrect
indentation, unnecessary blank lines, and a missing argument in one of
the usage examples. These are corrected in this patch.

Fixes: f400e0b82b ("app/crypto-perf: add script to graph perf results")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Adam Dybkowski <adamx.dybkowski@intel.com>
2021-02-04 19:21:27 +01:00
Ciara Power
7b284a5f8d doc: add crypto perf script in release notes
Add release note for the new crypto perf graphing script.

Fixes: f400e0b82b ("app/crypto-perf: add script to graph perf results")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Adam Dybkowski <adamx.dybkowski@intel.com>
2021-02-04 19:21:13 +01:00
Gagandeep Singh
f7ea970110 test/crypto: add check in decryption with digest case
Some platforms may not support operations on encrypted digest,
So in this patch adding a check for such test cases.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2021-02-04 19:06:25 +01:00
Matan Azrad
c024991991 compress/mlx5: fix asserts
When ASSERT is enabled for compilation, the 2 usages of assert mechanism
in the driver are failed due to typos.

Fix the typos.

Fixes: f8c97babc9 ("compress/mlx5: add data-path functions")
Fixes: 37862dafcb ("compress/mlx5: support 32-bit systems")

Reported-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Signed-off-by: Matan Azrad <matan@nvidia.com>
Tested-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2021-02-04 18:56:15 +01:00
Ankur Dwivedi
d4f6f2680b crypto/octeontx2: fix null pointer dereferences
Coverity reports that pointers ip and ip6 may be dereferenced
with null value. This patch fixes this.

Coverity issue: 365549, 365551
Fixes: 8f685ec2d5 ("crypto/octeontx2: support AES-CBC SHA1-HMAC")

Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
2021-02-04 18:55:52 +01:00
Andrew Boyer
d13d7829fc net/ionic: fix Tx fragment limits
The reported nb_seg_max should include the main fragment in the
descriptor and the fragments in the accompanying SGL.

Update the Tx prep check as well.

These were missed when updating to the v1 Tx queue structures.

Fixes: 5611763610 ("net/ionic: clean up Tx queue version support")

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
2021-02-05 12:44:16 +01:00
Hyong Youb Kim
89ce72c6ff net/enic: fix filter log message
A debug message for filter API is using a wrong flag. Use the correct
one.

Fixes: 936a9b9975 ("net/enic: flow API debug")
Cc: stable@dpdk.org

Reported-by: Hanoch Haim <hhaim@cisco.com>
Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
2021-02-05 11:28:48 +01:00
Viacheslav Ovsiienko
00984de533 net/mlx5: fix Tx queue size created with DevX
The number of descriptors specified for queue creation
implies the queue should be able to contain the specified
amount of packets being sent. Typically one packet takes
one queue descriptor (WQE) to be handled. If there is inline
data option enabled one packet might require more WQEs to
embrace the inline data and the overall queue size (the
number of queue descriptors) should be adjusted accordingly.

In mlx5 PMD the queues can be created either via Verbs, using
the rdma-core library or via DevX as direct kernel/firmware call.
The rdma-core does queue size adjustment internally, depending on
TSO and inline setting. The DevX approach missed this point.
This caused the queue size discrepancy and performance variations.

The patch adjusts the Tx queue size for the DevX approach
in the same as it is done in rdma-core implementation.

Fixes: 86d259cec8 ("net/mlx5: separate Tx queue object creations")
Cc: stable@dpdk.org

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2021-02-04 18:44:26 +01:00
Dekel Peled
207b4d06c3 net/mlx5: validate hash Rx queue pointer
Implementation of mlx5_hrxq_get() tries to get pointer to a hrxq
object, by reusing an existing hrxq, or creating a new one.
There is no check of the obtained pointer, so using it might result
in error.

This patch adds check of the pointer before using it, and return 0
if the pointer is NULL to indicate error.

Fixes: e1592b6c4d ("net/mlx5: make Rx queue thread safe")
Cc: stable@dpdk.org

Signed-off-by: Dekel Peled <dekelp@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2021-02-04 18:44:26 +01:00
Dekel Peled
ae8fdc8067 net/mlx5: fix shared RSS capability check
Existing code to create shared RSS action doesn't fully check
driver capabilities.
Using older driver, if DevX capabilities are insufficient,
the IBV operations are used.
In this case the ind_table_modify operation is not supported, and
shared RSS action can't be modified after creation.

This patch adds check of driver capability, and fails the validation
for shared RSS action in case it is insufficient.

Fixes: d2046c09aa ("net/mlx5: support shared action for RSS")
Cc: stable@dpdk.org

Signed-off-by: Dekel Peled <dekelp@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2021-02-04 18:44:26 +01:00
Ferruh Yigit
f62490e64d net/pcap: fix infinite Rx with large files
Packet forwarding is not working when infinite Rx feature is used with
large .pcap files that has high number of packets.

The problem is number of allocated mbufs are less than the infinite Rx
ring size, and all mbufs consumed to fill the ring, so there is no mbuf
left for forwarding.

Current logic can not detect that infinite Rx ring is not filled
completely and no more mbufs left, and setup continues which leads
silent fail on packet forwarding.

There isn't much can be done when there is not enough mbuf for the given
.pcap file, so additional checks added to detect the case and fail
explicitly with an error log.

Bugzilla ID: 595
Fixes: a3f5252e5c ("net/pcap: enable infinitely Rx a pcap file")
Cc: stable@dpdk.org

Reported-by: Cian Ferriter <cian.ferriter@intel.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Cian Ferriter <cian.ferriter@intel.com>
2021-02-04 18:19:37 +01:00
Ferruh Yigit
cec222d6e5 net/pcap: fix byte stats for drop Tx
Drop Tx path in pcap is Tx that just drops the packets, which is used
for the case only Rx from a pcap file is requested/matters.

The byte stats was calculated using first mbuf segment, which gives
wrong values for multi segmented mbufs, updated to use packet length
instead.

Bugzilla ID: 597
Fixes: a3f5252e5c ("net/pcap: enable infinitely Rx a pcap file")
Cc: stable@dpdk.org

Reported-by: Cian Ferriter <cian.ferriter@intel.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Cian Ferriter <cian.ferriter@intel.com>
2021-02-04 18:19:37 +01:00
Haiyue Wang
295b34f55b net/ice: fix VLAN 0 adding based on VLAN mode
In Single VLAN Mode, single VLAN filters via ICE_SW_LKUP_VLAN are based
on the inner VLAN ID, so the VLAN TPID (i.e. 0x8100 or 0x888a8) doesn't
matter.

In Double VLAN Mode, outer/single VLAN filters via ICE_SW_LKUP_VLAN are
based on the outer/single VLAN ID + VLAN TPID.

For both modes, adding a VLAN 0 + no VLAN TPID filter to handle untagged
traffic when VLAN pruning is enabled. Also, this handles VLAN 0 priority
tagged traffic in Single VLAN Mode, since the VLAN TPID is not part of
filtering.

If Double VLAN Mode is enabled then an explicit VLAN 0 + VLAN TPID filter
needs to be added to allow VLAN 0 priority tagged traffic in DVM, since
the VLAN TPID is part of filtering.

Fixes: 14e7a4b37b ("net/ice/base: support configuring device in double VLAN mode")

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2021-02-04 18:19:37 +01:00
Dekel Peled
dec7c4bd90 app/testpmd: support shared age action query
Shared age action query was implemented as part of flow query,
but was not implemented as part of shared action query.

This patch adds the required implementation.

Fixes: 2f622174bf ("app/testpmd: support query of age action")
Cc: stable@dpdk.org

Signed-off-by: Dekel Peled <dekelp@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2021-02-04 18:19:37 +01:00
Huisong Li
b8a67b10ee net/hns3: validate requested maximum Rx frame length
When jumbo frame is enabled, the MTU size needs to be modified
based on 'max_rx_pkt_len'. Driver needs to check the validity
of 'max_rx_pkt_len'. And it should be in the range of
HNS3_DEFAULT_FRAME_LEN and HNS3_MAX_FRAME_LEN. Otherwise, it may
cause that the MTU size is inconsistent with jumbo frame offload.

Fixes: 19a3ca4c99 ("net/hns3: add start/stop and configure operations")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
2021-02-04 18:19:37 +01:00
Chengchang Tang
ff81c6b7d0 net/hns3: fix VF reset on mailbox failure
Currently, during the VF reset, the VF will send a MBX to inform
PF to reset it and the disable command bit will be set whether
the MBX is successful. Generally, multiple reset attempts are made
after a failure. However, because the command is disabled, all
subsequent reset will all fail.

This patch disable the command only after the MBX message is
successfully.

Fixes: 2790c64647 ("net/hns3: support device reset")
Cc: stable@dpdk.org

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
2021-02-04 18:19:37 +01:00
Chengchang Tang
5ef63df128 net/hns3: fix firmware exceptions by concurrent commands
There are two scenarios that command queue uninit performed
concurrently with the firmware command: asynchronous command
and timeout command.

For asynchronous command, if a large number of functions send
commands, these commands may need to be queued to wait for
firmware processing. If a function is uninited suddenly, CMDQ
clearing and firmware processing may be performed concurrently.

For timeout command, if the command failed due to busy scheduling
of firmware, this command will be processed in the next scheduling.
And this may lead to concurrency.

The preceding concurrency may lead to a firmware exceptions.

This patch add a waiting time to ensure the firmware complete the
processing of left over command when PMD uninit.

Fixes: 737f30e1c3 ("net/hns3: support command interface with firmware")
Cc: stable@dpdk.org

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
2021-02-04 18:19:37 +01:00
Chengwen Feng
2b9a66e1b6 net/hns3: fix flow director rule residue on malloc failure
After FD rule config success, driver will malloc fdir_rule to hold the
rule info, if malloc fail the FD rule in hardware was not cleanup.

Fixes: fcba820d9b ("net/hns3: support flow director")
Cc: stable@dpdk.org

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
2021-02-04 18:19:37 +01:00
Chengchang Tang
b52366011d net/hns3: use C11 atomics
Replace all the atomic type with C11 atomic builtins in hns3
PMD.

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
2021-02-04 18:19:37 +01:00
Chengchang Tang
c27e64ee3e net/hns3: fix stats flip overflow
Currently, statistics may overflow in some scenarios.

For example, if HW statistics are reset by stats reset operation,
but there are still a lot of residual packets exist in the HW
queues and these packets are error packets, flip may occurred
because the ipacket is obtained by subtracting the number of
software error packets from the number of HW received packets.

This patch verifies the calculation and returns 0 when overflow
may occur.

Fixes: 8839c5e202 ("net/hns3: support device stats")
Cc: stable@dpdk.org

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
2021-02-04 18:19:37 +01:00
Chengwen Feng
e9550856f8 net/hns3: remove MPLS from supported flow items
The Kunpeng920 and Kunpeng930 don't support parse MPLS packet, so
remove the type from supported flow items.

Fixes: fcba820d9b ("net/hns3: support flow director")
Cc: stable@dpdk.org

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
2021-02-04 18:19:37 +01:00
Chengwen Feng
3e5c397ce4 net/hns3: constrain TM peak rate
User could config Port or TC's peak rate by TM ops, but hardware does
not support peak rate which lower than 1Mbps. So we constraint TM
peak rate must be at least 1Mbps.

Fixes: c09c7847d8 ("net/hns3: support traffic management")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
2021-02-04 18:19:37 +01:00
Lijun Ou
0fce2c46dc net/hns3: fix RSS indirection table size
The driver should not use the fixed value as the validity check of
RSS indirection table size with HW supported. As a result, it will
cause misjudgment when the RSS RETA size with HW supported have
changed.

Fixes: c37ca66f2b ("net/hns3: support RSS")
Cc: stable@dpdk.org

Signed-off-by: Lijun Ou <oulijun@huawei.com>
2021-02-04 18:19:37 +01:00