Commit Graph

32042 Commits

Author SHA1 Message Date
Bruce Richardson
3d883660ae doc: shorten details on HPET use
As best we can tell, the HPET timers are not commonly used, so there is
little need to give extensive detail and commentry on them in the Linux
GSG. As such, we can reduce the GSG section to just a single subsection
and also move it down the page below items which are likely of greater
importance.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2022-03-15 19:41:29 +01:00
Bruce Richardson
e2075e0d44 doc: expand list of directories in Linux guide
Not all directories were given in the GSG document, but many of those
omitted would be of interest to users, e.g. "doc", "license" and
"usertools" directories. Adding these leaves only "devtools", and
"kernel" as the only undocumented directories, so add them in too for
completeness.

When updating the section, add "including" to the line leading up to the
directory list, indicating that, while the list is currently complete,
it is not guaranteed to always be.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2022-03-15 19:37:25 +01:00
Bruce Richardson
167c08600a doc: merge Linux requirements for applications build
When building end-applications linked with DPDK, the only additional
tool needed is pkg-config/pkgconf. However, the standard development
tools meta-packages on most distro's include this as standard, meaning
it does not really require its own section. The one outlier in the
existing text is "alpine" where it is not present when using "libc-dev"
target. However, changing "gcc" and "libc-dev" to "alpine-sdk"
metapackage aligns alpine with the other distros in this regard.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2022-03-15 19:35:52 +01:00
Bruce Richardson
40356b62be doc: remove duplicated note about UEFI secure boot
A note about secure boot not allowing UIO is present in both the system
requirements section and the driver binding section. This fits better in
the driver binding section, so the copy in system requirements can be
removed. The document in general now also emphasises VFIO over UIO more
than when this note was first added, reducing the need for this warning
to be repeated.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2022-03-15 19:33:31 +01:00
Bruce Richardson
8faf0eec46 doc: drop note about old chipset from Linux guide
The chipsets referenced in the note[1] were all launched in 2012 and are
now discontinued, so we can drop the note about them at this stage.

[1] https://ark.intel.com/content/www/us/en/ark/products/codename/44946/products-formerly-cave-creek.html

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2022-03-15 19:32:48 +01:00
Bruce Richardson
9e6f75e259 doc: update build section of FreeBSD guide
Some minor updates for the section on builing DPDK in the GSG:

* update Python 3.7 package name to the 3.8 version
* note that the pyelftools needs to be tied to the python version
* drop reference to jansson library for legacy telemetry
* replace special characters for (R)

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2022-03-15 17:55:45 +01:00
Raslan Darawsheh
209844f1c7 doc: add tested platforms with Mellanox NICs
Add tested platforms with Mellanox NICs to the 22.03 release notes.

Signed-off-by: Raslan Darawsheh <rasland@nvidia.com>
2022-03-15 11:46:23 +01:00
Lingli Chen
044784326b doc: add tested Intel platforms with Intel NICs
Add tested Intel platforms with Intel NICs to v22.03 release note.

Signed-off-by: Lingli Chen <linglix.chen@intel.com>
Acked-by: Xueqin Lin <xueqin.lin@intel.com>
2022-03-13 21:11:31 +01:00
Rakesh Kudurumalla
68f8a52a6b net/cnxk: fix build with optimization
Fix the following build error seen with --optimization=1 and
GCC 10.3.0.

drivers/net/cnxk/cnxk_ethdev_mtr.c: In function
‘cnxk_nix_mtr_policy_validate’:
lib/ethdev/rte_mtr_driver.h:188:10: error: ‘str’ may be used
uninitialized in this function [-Werror=maybe-uninitialized]

drivers/net/cnxk/cn10k_rx.h:149:2 error: ‘frag_ptr’ may be
used uninitialized in this function

Bugzilla ID: 939
Fixes: b526599020 ("net/cnxk: fix build with GCC 12")
Cc: stable@dpdk.org

Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
Tested-by: Daxue Gao <daxuex.gao@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-03-10 09:48:11 +01:00
Thinh Tran
9011af71bb net/mlx5: fix CPU socket ID for Rx queue creation
The default CPU socket ID was used while creating the Rx queue and this caused
creation failure in case if hardware was not resided on the default socket.

The patch sets the correct CPU socket ID for the mlx5_rxq_ctrl before
calling the mlx5_rxq_create_devx_rq_resources() which eventually calls
mlx5_devx_rq_create() with correct CPU socket ID.

Fixes: bc5bee028e ("net/mlx5: create drop queue using DevX")
Cc: stable@dpdk.org

Signed-off-by: Thinh Tran <thinhtr@linux.vnet.ibm.com>
Reviewed-by: David Christensen <drc@linux.vnet.ibm.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2022-03-14 15:30:01 +01:00
Jiawei Wang
04c0d3f20f net/mlx5: fix port matching in sample flow rule
If there are an explicit port match and sample action in the same flow,
mlx5 PMD pushes the explicit port match in the prefix subflow, and
uses the tag item match in the suffix subflow.

The explicit port match was translated into source vport match so
the sample suffix subflow lost this match after flow split.

This patch copies the explicit port match to the sample suffix subflow,
and the latter gets the correct source vport value in the flow matcher.

Fixes: b4c0ddbfcc ("net/mlx5: split sample flow into two sub-flows")
Cc: stable@dpdk.org

Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2022-03-14 15:29:57 +01:00
Thomas Monjalon
1ceeac3241 version: 22.03-rc4
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2022-03-15 02:16:22 +01:00
Bruce Richardson
699155f2d4 eventdev: fix clang C++ include
When compiling on FreeBSD with clang and include checking enabled,
errors are emitted due to differences in how empty structs/unions are
handled in C and C++, as C++ structs cannot have zero size.

lib/eventdev/rte_eventdev.h:992:2: error:
union has size 0 in C, non-zero size in C++

Since the contents of the union are all themselves of zero size,
the actual union wrapper is unnecessary. We therefore remove it for C++
builds - though keep it for C builds for safety and clarity of
understanding the code. The alignment constraint on the union is
unnecessary in the case where the whole struct is aligned on a 16-byte
boundary, so we add that constraint to the overall structure to ensure
it applies for C++ code as well as C.

Fixes: 1cc44d4092 ("eventdev: introduce event vector capability")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2022-03-15 02:14:27 +01:00
Bruce Richardson
1763c91b06 cryptodev: fix clang C++ include
When compiling on FreeBSD with clang and include checking enabled,
errors are emitted due to differences in how empty structs/unions are
handled in C and C++, as C++ structs cannot have zero size.

lib/cryptodev/rte_crypto.h:127:2: error:
union has size 0 in C, non-zero size in C++

Since the contents of the union are all themselves of zero size,
the actual union wrapper is unnecessary. We therefore remove it for C++
builds - though keep it for C builds for safety and clarity of
understanding the code.

Fixes: c0f87eb525 ("cryptodev: change burst API to be crypto op oriented")
Fixes: d2a4223c4c ("cryptodev: do not store pointer to op specific params")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2022-03-15 02:14:27 +01:00
Bruce Richardson
dfb90fbe6b compressdev: fix missing space in log macro
Building with clang on FreeBSD with chkincs enabled, we get the
following error about a missing space:

lib/compressdev/rte_compressdev_internal.h:25:58: error:
invalid suffix on literal;
C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]
        rte_log(RTE_LOG_ ## level, compressdev_logtype, "%s(): "fmt "\n", \

Adding in a space between the '"' and 'fmt' removes the error.

Fixes: ed7dd94f7f ("compressdev: add basic device management")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2022-03-15 02:13:57 +01:00
Bruce Richardson
b98d1dc0fb compressdev: separate out driver-only headers
The headers rte_compressdev_pmd.h and rte_compressdev_internal.h are,
as the filenames suggest, headers for building drivers using the
compressdev APIs. As such they should be marked as
"driver_sdk_headers" rather than just "headers" in the meson.build
file.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2022-03-15 02:06:25 +01:00
Bruce Richardson
29fd052dcc eal/freebsd: add missing C++ include guards
Add missing 'extern "C"' to file.

Fixes: 428eb983f5 ("eal: add OS specific header file")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2022-03-15 02:06:13 +01:00
Ferruh Yigit
307dccc166 maintainers: update for KNI, UIO and pcap
Won't able to allocate time on these components, resigning from
maintaining them.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2022-03-15 01:16:15 +01:00
Rahul Bhansali
0490d69d58 examples/l3fwd: fix buffer overflow in Tx
This patch fixes the stack buffer overflow error reported
from AddressSanitizer.
Function send_packetsx4() tries to access out of bound data
from rte_mbuf and fill it into TX buffer even in the case
where no pending packets (len = 0).
Performance impact:- No

ASAN error report:-
==819==ERROR: AddressSanitizer: stack-buffer-overflow on address
0xffffe2c0dcf0 at pc 0x0000005e791c bp 0xffffe2c0d7e0 sp 0xffffe2c0d800
READ of size 8 at 0xffffe2c0dcf0 thread T0
 #0 0x5e7918 in send_packetsx4 ../examples/l3fwd/l3fwd_common.h:251
 #1 0x5e7918 in send_packets_multi ../examples/l3fwd/l3fwd_neon.h:226

Fixes: 96ff445371 ("examples/l3fwd: reorganise and optimize LPM code path")
Cc: stable@dpdk.org

Signed-off-by: Rahul Bhansali <rbhansali@marvell.com>
Reviewed-by: Conor Walsh <conor.walsh@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2022-03-15 01:14:56 +01:00
Gregory Etelson
fc547a92cf app/testpmd: fix flow rule with flex input link
Testpmd reads flex item configuration from a JSON file.
Flex item input link description is stored in testpmd
flow item format. For example, `eth type is 0x0800`.
The item description is placed into a general testpmd CLI
flow rule command template and parsed to convert string into
flow item object.

The patch adds the `actions` section to the flow rule template.

Fixes: 59f3a8acbc ("app/testpmd: add flex item commands")
Cc: stable@dpdk.org

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2022-03-14 22:21:07 +01:00
Gregory Etelson
a058de216c app/testpmd: fix GTP header parsing in checksum engine
GTP header can be followed by an optional 32 bits extension.
GTP notifies about the extension presence through the E, S or PN
header bits.

Csum GTP header parser did not check the extension bits value.

The patch updates GTP header length if at-least one of the
extension bits is set.

Fixes: d8e5e69f3a ("app/testpmd: add GTP parsing and Tx checksum offload")
Cc: stable@dpdk.org

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
2022-03-14 21:50:47 +01:00
Adham Masarwah
5aae2723cd app/testpmd: fix show RSS RETA on Windows
Replaced using strtoul with strtoull when converting to
64-bit mask field.
In Windows strtoul returns 32-bit values which cause an
issue with show RSS RETA.

Fixes: 66c594904a ("ethdev: support multiple sizes of redirection table")
Cc: stable@dpdk.org

Signed-off-by: Adham Masarwah <adham@nvidia.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
2022-03-14 21:38:48 +01:00
Kevin Liu
7dc92d1729 app/testpmd: fix L4 checksum in multi-segments
Testpmd forwards packets in checksum mode that it needs to calculate
the checksum of each layer's protocol.

In process_inner_cksums, when parsing tunnel packets, inner L4 offset
should be outer_l2_len + outer_l3_len + l2_len + l3_len.

In process_outer_cksums, when parsing tunnel packets, outer L4 offset
should be outer_l2_len + outer_l3_len.

Fixes: e6b9d6411e ("app/testpmd: add SW L4 checksum in multi-segments")
Cc: stable@dpdk.org

Signed-off-by: Kevin Liu <kevinx.liu@intel.com>
Acked-by: Yuying Zhang <yuying.zhang@intel.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
2022-03-14 21:23:26 +01:00
Gerry Gribbon
c1d1b94eec app/regex: fix number of matches
Depending on number of jobs specified on command line, part of the
data buffer may not get searched, resulting in incorrect number of
matches being reported.

Additional change to ensure the "All Matches" summary outputs the
correct match start locations in the supplied data buffer.

Fixes: de06137cb2 ("app/regex: add RegEx test application")
Cc: stable@dpdk.org

Signed-off-by: Gerry Gribbon <ggribbon@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
2022-03-14 12:15:29 +01:00
David Marchand
63f39a430a bpf: fix build with some libpcap version on FreeBSD
This is something caught in UNH FreeBSD env.

For some reason [1], the pcap/bpf.h header started to define _BPF_H_.

It happens that the bpf_impl.h internal DPDK header uses this define as
an internal guard.
This triggers a build failure in bpf_convert.c which can't find
RTE_BPF_LOG macro.

Fix the include guard to use the filename and remove _.

1: https://github.com/the-tcpdump-group/libpcap/pull/1074

Fixes: 94972f35a0 ("bpf: add BPF loading and execution framework")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2022-03-14 11:41:52 +01:00
Piotr Bronowski
2c6b3438d6 crypto/ipsec_mb: fix GCM requested digest length
This patch removes coverity defect CID 375828:
Untrusted value as argument (TAINTED_SCALAR)

Coverity issue: 375828
Fixes: ceb8639387 ("crypto/aesni_gcm: support all truncated digest sizes")
Cc: stable@dpdk.org

Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
2022-03-14 11:28:40 +01:00
Pablo de Lara
837269c2e5 crypto/ipsec_mb: fix GMAC parameters setting
AES-GMAC requires plaintext length to be 0 when using AES-GCM,
so only AAD data is used.

Fixes: a501609ea6 ("crypto/ipsec_mb: fix length and offset settings")
Cc: stable@dpdk.org

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
Tested-by: Radu Nicolau <radu.nicolau@intel.com>
2022-03-14 10:51:47 +01:00
Ciara Loftus
6dd3286f3a net/af_xdp: fix shared UMEM fill queue reserve
Commit 81fe6720f8 ("net/af_xdp: reserve fill queue before socket create")
moves the fill queue reserve logic to before the creation of the socket in
order to suppress kernel logs like:

XSK buffer pool does not provide enough addresses to fill 2047 buffers on
Rx ring 0

However, for queues that share umem, the fill queue reserve must occur
after the socket creation, because the fill queue is not valid until
that point.

This commit uses the umem refcnt value to determine whether the queue is
sharing a umem, and performs the fill queue reservation either before or
after the socket creation, depending on the refcnt value.

The kernel logs will still be seen for the shared umem queues.

Fixes: 81fe6720f8 ("net/af_xdp: reserve fill queue before socket create")

Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
2022-03-14 10:48:18 +01:00
Junxiao Shi
6f6134c35e net/af_xdp: fix custom program loading with multiple queues
When the PMD is configured to load a custom XDP program, it sets
XSK_LIBBPF_FLAGS__INHIBIT_PROG_LOAD flag to prevent libbpf from
loading its default XDP program. However, when queue_count is set to
greater than 1, this flag is only set for the first XSK socket but not
for subsequent XSK sockets. This causes XSK socket creation failure.

This commit ensures that XSK_LIBBPF_FLAGS__INHIBIT_PROG_LOAD flag is
set for all XSK socket creations when custom XDP program is being used.

Fixes: 01fa83c94d ("net/af_xdp: workaround custom program loading")
Cc: stable@dpdk.org

Signed-off-by: Junxiao Shi <git@mail1.yoursunny.com>
2022-03-14 09:39:00 +01:00
Devendra Singh Rawat
d8ded501e0 net/qede: fix maximum Rx packet length
Size of CRC is not added to max_rx_pktlen, due to this bigger sized
packets(size 1480, 1490 1500) are being dropped.
This fix adds RTE_ETHER_CRC_LEN to max_rx_pktlen.

Fixes: 1bb4a528c4 ("ethdev: fix max Rx packet length")
Cc: stable@dpdk.org

Signed-off-by: Devendra Singh Rawat <dsinghrawat@marvell.com>
Signed-off-by: Rasesh Mody <rmody@marvell.com>
2022-03-10 08:40:37 +01:00
Devendra Singh Rawat
f65c7fbcec net/qede: fix Rx bulk
qede_alloc_rx_bulk_mbufs() was trimming the number of requested
mbufs count to QEDE_MAX_BULK_ALLOC_COUNT.
The Rx callback was ignorant of this trimming and it was always
resetting the number of empty RX BD ring slots to 0.
This resulted in Rx BD ring getting into an inconsistent
state and ultimately the application fails to receive any traffic.

The fix trims the number of requested mbufs count before
making call to qede_alloc_rx_bulk_mbufs().
After qede_alloc_rx_bulk_mbufs() returns successfully, the
number of empty Rx BD ring slots are decremented by the
correct count.

Fixes: 8f23124745 ("net/qede: fix performance bottleneck in Rx path")
Cc: stable@dpdk.org

Signed-off-by: Devendra Singh Rawat <dsinghrawat@marvell.com>
Signed-off-by: Rasesh Mody <rmody@marvell.com>
2022-03-10 08:39:53 +01:00
Devendra Singh Rawat
bc30456265 net/qede: fix Tx completion
Tx completion routine was first incrementing the number of free
slots in Tx ring and then freeing corresponding mbufs in bulk.
In some situations, the number of mbufs freed were less than
number of Tx ring slots freed. This caused Tx ring to get into an
inconsistent state and ultimately application fails to transmit
further traffic.

The fix first updates the Tx ring SW consumer index, then
increments Tx ring free slot number and finally frees the mbuf,
this is done in a single iteration of loop.

Fixes: 2c41740bf1 ("net/qede: get consumer index once")
Fixes: 4996b959cd ("net/qede: free packets in bulk")
Cc: stable@dpdk.org

Signed-off-by: Devendra Singh Rawat <dsinghrawat@marvell.com>
Signed-off-by: Rasesh Mody <rmody@marvell.com>
2022-03-10 08:38:07 +01:00
Alexander Kozyrev
b60d006cd1 doc: mention mlx5 MPRQ incompatibility with external buffers
Multi-Packet Rx queue uses PMD-managed buffers to store packets.
These buffers are externally attached to user mbufs.
This conflicts with the feature that allows using user-managed
externally attached buffers in an application.
Add the corresponding limitation to MLX5 documentation that MPRQ
and external data buffers cannot be used together.

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
2022-03-10 10:06:10 +01:00
Viacheslav Ovsiienko
d98c04e82d doc: fix modify field action description for mlx5
This patch adds mlx5 specifics description about
handling the Ethernet type by modify field action
for VLAN-ed traffic.

Fixes: 641dbe4fb0 ("net/mlx5: support modify field flow action")
Cc: stable@dpdk.org

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2022-03-10 09:29:19 +01:00
Jiawei Wang
0f845cc726 net/mlx5: fix implicit tag insertion with sample action
A flow rule with sample action was split into two sub-flows,
and the implicit tag action with unique id was added in the prefix
sub-flow, the suffix sub-flow used the tag item to match with that
unique id, and the implicit set tag action was inserted next to
the sample action.

While there's either PUSH VLAN action or ENCAP action preceding the
sample action, implicit set tag action was added after PUSH VLAN or
ENCAP actions, causing flow creation failure due to rdma-core
does not support this action order.

This patch ensures the implicit set tag action is inserted before
either PUSH VLAN or encap action (if any) in the prefix sub-flow.

Fixes: 6a951567c1 ("net/mlx5: support E-Switch mirroring and jump in one flow")
Cc: stable@dpdk.org

Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2022-03-10 09:29:05 +01:00
Rongwei Liu
4a9e5c999c net/mlx5: forbid multiple ASO actions in a single rule
For now, only one ASO action is supported in a single flow rule.
Flow rule with more than one ASO action should be rejected in the
validation stage.

Flow rule with action non-shared AGE and COUNT together should be
treated as non-ASO because AGE will fall back to use HW counter,
not ASO hit object.

Group 0 will use HW counter for AGE action even if no COUNT action.

This commit will reject patterns (no matter which group if transfer)
like:
1. group 1 pattern... / end actions age / meter / end
2. group 1 pattern... / end actions conntrack / meter / end
3. group 1 pattern... / end actions age / conntrack... / end

If AGE comes together with COUNT in the above patterns, it's allowed.

Fixes: daed4b6e ("net/mlx5: use aging by counter when counter exists")
Cc: stable@dpdk.org

Signed-off-by: Rongwei Liu <rongweil@nvidia.com>
Acked-by: Xiaoyu Min <jackmin@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2022-03-09 13:32:04 +01:00
Jiawei Wang
9a726360dd net/mlx5: fix sample flow action on trusted device
A flow rule with sample action will be split into two sub flows,
and a tag action was added implicitly in the sample prefix sub flow,
the reserved metadata regC index was used for this tag action.

The reserved metadata regC was shared with metering action,
for ConnectX-5 trusted device (VF/SF), the reserved metadata regC was
invalid since PF only supported the legacy metering.

This patch adds the checking for the tag index and back to use the
application tag if a failure happened.

Fixes: a9b6ea45be ("net/mlx5: fix tag ID conflict with sample action")
Cc: stable@dpdk.org

Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2022-03-09 13:31:06 +01:00
Dariusz Sosnowski
7c0c63c9a5 net/mlx5: fix VLAN push action validation
Flow domain and direction was validated when OF_PUSH_VLAN action
appears in flow actions. Flow was rejected whenever this action:

- was used in NIC domain, in ingress direction;
- was used in FDB domain, in ingress direction, on ConnectX-5.

This validation logic rejected a valid case when the OF_PUSH_VLAN
action was used when directing traffic to the hairpin queue,
configured in TX implicit mode.

This patch moves code responsible for OF_PUSH_VLAN validation of
domain and direction from flow_dv_validate_push_vlan() to
flow_dv_validate(). Domain and direction are now validated when either
non-hairpin queue is used or hairpin queue is configured in Tx explicit
mode.

Fixes: 96f85ec489 ("net/mlx5: check VLAN push/pop support")
Cc: stable@dpdk.org

Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2022-03-09 13:30:51 +01:00
Joyce Kong
c251b6a688 net/i40e: fix build with 16B descriptor on Arm
For NEON vector path, there is an issue when building
with 16B descriptor:
incompatible types when assigning to type ‘uint64x2_t’
from type ‘uint32x4_t’
180 |  descs[3] = vbslq_u32(v_desc3_mask, v_zeros,
			vreinterpretq_u32_u64(descs[3]));
    |             ^~~~~~~~~

The fix is to add interpretation between type 'uint64x2_t'
and type 'uint32x4_t'.

Fixes: dba9e3bcd9 ("net/i40e: add flow mark capability to NEON Rx")

Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
2022-03-09 08:27:56 +01:00
Elena Agostini
ca12f5e8a7 gpu/cuda: mark unused GDRCopy functions parameters
Without enabling gdrcopy, DPDK build has warnings about
unused gdrcopy functions input parameters.

This patch set them to __rte_unused .

Fixes: 24c7759 ("gpu/cuda: map GPU memory with GDRCopy")

Signed-off-by: Elena Agostini <eagostini@nvidia.com>
2022-03-10 21:17:34 +01:00
David Marchand
af74f7db38 vhost: fix FD leak with inflight messages
Even if unlikely, a buggy vhost-user master might attach fds to inflight
messages. Add checks like for other types of vhost-user messages.

Fixes: d87f1a1cb7 ("vhost: support inflight info sharing")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-03-10 14:03:48 +01:00
Chenbo Xia
6442c329b9 vhost: fix queue number check when setting inflight FD
In function vhost_user_set_inflight_fd, queue number in inflight
message is used to access virtqueue. However, queue number could
be larger than VHOST_MAX_VRING and cause write OOB as this number
will be used to write inflight info in virtqueue structure. This
patch checks the queue number to avoid the issue and also make
sure virtqueues are allocated before setting inflight information.

Fixes: ad0a4ae491 ("vhost: checkout resubmit inflight information")
Cc: stable@dpdk.org

Reported-by: Wenxiang Qian <leonwxqian@gmail.com>
Signed-off-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2022-03-10 14:03:43 +01:00
Thomas Monjalon
312b94ef88 version: 22.03-rc3
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2022-03-09 00:34:09 +01:00
Robert Sanford
4f9b27c7c3 maintainers: update for timer library
Remove self from Timers maintainers.

Signed-off-by: Robert Sanford <rsanford@akamai.com>
2022-03-09 00:25:51 +01:00
Brian Dooley
d2148df610 maintainers: update for FIPS validation
Replace Marko Kovacevic with Brian Dooley and Fan Zhang.

Signed-off-by: Brian Dooley <brian.dooley@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
2022-03-09 00:16:59 +01:00
Yuying Zhang
da400c98cd maintainers: update for testpmd BPF files
Move 'test-pmd/bpf_cmd.*' files under BPF component.

Signed-off-by: Yuying Zhang <yuying.zhang@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2022-03-09 00:15:01 +01:00
Yuying Zhang
60ce2aae17 maintainers: update for testpmd TM and MTR
Move 'test-pmd/cmdline_tm.*' files under
"Traffic Management API" component.
Move 'test-pmd/cmdline_mtr.*' files under
"Traffic Metering and Policing API" component.

Signed-off-by: Yuying Zhang <yuying.zhang@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2022-03-09 00:15:01 +01:00
Elena Agostini
1fd3de64ff gpudev: fix page alignment in communication list
Memory allocated for CPU mapping the status flag
in the communication list should be aligned to the
GPU page size, which can be different of CPU page alignment.

The GPU page size is added to the GPU info,
and is used when creating a communication list.

Fixes: 9b8cae4d99 ("gpudev: use CPU mapping in communication list")

Signed-off-by: Elena Agostini <eagostini@nvidia.com>
2022-03-09 00:14:55 +01:00
Leyi Rong
d78d21b983 net/iavf: fix potential out-of-bounds access
Fix potential out-of-bounds access as overrunning callee's array of
size 26 by passing argument rxq->rxdid(which evaluates to 63) in call
to iavf_rx_scan_hw_ring_flex_rxd.

Coverity issue: 376616
Fixes: 0ed16e0131 ("net/iavf: fix function pointer in multi-process")
Cc: stable@dpdk.org

Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2022-03-08 16:10:02 +01:00
Ivan Malov
31c23acc08 net/sfc: reduce log level of tunnel restore info error
OvS might invoke this API on its data path, out of sync
with its control plane. If the control path has already
deactivated the tunnel context entry, these invocations
will produce quite a few error printouts. Suppress that.

Fixes: 7e5b479803 ("net/sfc: implement control path operations in tunnel offload")
Cc: stable@dpdk.org

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-03-08 13:20:21 +01:00