David Marchand [Mon, 29 Apr 2019 14:32:45 +0000 (16:32 +0200)]
test: clean remaining trace of devargs autotest
This test has been removed by the commit 83945fbd7c49 ("test: remove
devargs unit tests") which left some trace in meson and reintroduced in
autotest by the second commit 9eabcb682493 ("test: update autotest
list").
Not all PMDs support the fixed link speed set, and link speed can be set
even with auto negotiation enabled. Reverting the patch to not break
existing usage.
Fixes: bdca79053b6a ("app/testpmd: set fixed flag for exact link speed") Cc: stable@dpdk.org Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Mark Gillott [Wed, 1 May 2019 15:29:42 +0000 (16:29 +0100)]
net/vmxnet3: add VLAN filter capability
The driver supports VLAN filtering, but the option is not included in
the advertised list of capabilities. Thus any attempt to enable VLAN
filtering always fails. Update the list of offload capabilities to
include DEV_RX_OFFLOAD_VLAN_FILTER.
Fixes: 95e4a96ccbf1 ("net/vmxnet3: convert to new Rx offload API") Cc: stable@dpdk.org Signed-off-by: Mark Gillott <mgillott@vyatta.att-mail.com> Acked-by: Yong Wang <yongwang@vmware.com>
Yongseok Koh [Wed, 1 May 2019 01:37:17 +0000 (18:37 -0700)]
net/mlx5: fix max number of queues for NEON Tx
BlueField SmartNIC has 0xa2d2 as PCI device ID on both ARM and x86 host. On
ARM side, Tx inlining need not be used as PCI bandwidth is not bottleneck.
Vectorized Tx can still be used up to 16 queues. For other archs
(e.g., x86), keep using the default value.
Yongseok Koh [Wed, 1 May 2019 01:01:43 +0000 (18:01 -0700)]
net/mlx5: check Tx queue size overflow
If Tx packet inlining is enabled, rdma-core library should allocate large
Tx WQ enough to support it. It is better for PMD to calculate the size of
WQ based on the parameters and return error with appropriate message if it
exceeds the device capability.
Ori Kam [Thu, 25 Apr 2019 12:20:55 +0000 (12:20 +0000)]
net/mlx5: fix E-Switch flow without port item
When creating a flow rule without the port_id pattern item, always the
PF was selected.
This commit fixes this issue, if no port_id pattern item is available
then we use the port that the flow was created on as source port.
Fixes: 822fb3195348 ("net/mlx5: add port id item to Direct Verbs") Signed-off-by: Ori Kam <orika@mellanox.com> Acked-by: Yongseok Koh <yskoh@mellanox.com>
If disable LSC when launching testpmd with X722, shown
link speed is 20G but not 10G. It's caused by wrongly
parsed link speed.
Correct it according to X722 datasheet.
Fixes: eef2daf2e199 ("net/i40e: fix link update no wait") Cc: stable@dpdk.org Signed-off-by: Beilei Xing <beilei.xing@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Krzysztof Kanas [Fri, 26 Apr 2019 22:30:29 +0000 (00:30 +0200)]
test/bonding: fix MAC assignment for re-run
Fix test_set_bonded_port_initialization_mac_assignment so that it works
after 're run' test_link_bonding.
Fixes: f2ef6f21ee2e ("bond: fix mac assignment to slaves") Cc: stable@dpdk.org Signed-off-by: Krzysztof Kanas <kkanas@marvell.com> Acked-by: Chas Williams <chas3@att.com>
Xiaolong Ye [Tue, 30 Apr 2019 08:39:46 +0000 (16:39 +0800)]
net/af_xdp: remove resources when port is closed
Since 18.11, it is suggested that driver should release all its private
resources at the dev_close routine. So all resources previously released
in remove routine are now released at the dev_close routine, and the
dev_close routine will be called in driver remove routine in order to
support removing a device without closing its ports.
Above behavior changes are supported by setting RTE_ETH_DEV_CLOSE_REMOVE
flag during probe stage.
Also as af_xdp pmd doesn't allocate MAC addresses dynamically, it needs
to be set as NULL, so it won't be released by rte_eth_dev_release_port()
otherwise, there would be "EAL: Error: Invalid memory" error.
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Igor Russkikh [Mon, 29 Apr 2019 08:20:28 +0000 (08:20 +0000)]
net/atlantic: remove extra error check
Found by Coverity scan - dead code
Coverity issue: 337665 Fixes: 7943ba05f67c ("net/atlantic: add link status and interrupt management") Cc: stable@dpdk.org Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Pavel Belous [Mon, 29 Apr 2019 08:20:21 +0000 (08:20 +0000)]
net/atlantic: fix offsets for talking with firmware
EEPROM write accesses start using non zero configuration memory
accesses. This revealed an issue where firmware interface was actually
always did the uploads starting with zero offset
Fixes: 86d36773bd42 ("net/atlantic: implement firmware operations") Cc: stable@dpdk.org Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
Pavel Belous [Mon, 29 Apr 2019 08:20:15 +0000 (08:20 +0000)]
net/atlantic: consider EEPROM get/set offset
EEPROM get/set offset logic should take offset into account.
Data transfers to/from FW should also correctly use
dword based transfer interface, taking into account the
remainder.
We also check error code returned from FW.
Fixes: ce4e8d418097 ("net/atlantic: implement EEPROM get/set") Cc: stable@dpdk.org Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
net/mlx4: support multicast address list interface
Since this driver does not distinguish unicast/multicast addresses,
applications could always rely on the standard MAC add/remove/set
interface to configure both types.
As a result, the multicast address list interface never got implemented
(rte_eth_dev_set_mc_addr_list()) however PMD-agnostic applications still
rely on it for compatibility reasons; a wrapper is therefore required.
net/mlx5: update memory event callback for shared context
Mellanox mlx5 PMD implements the list of devices to process the memory
free events to reflect the actual memory state to Memory Regions.
Because this list contains the devices and devices may share the
same context the callback routine may be called multiple times
with the same parameter, that is not optimal. This patch modifies
the list to contain the device contexts instead of device objects
and shared context is included in the list only once.
net/mlx5: share Memory Regions for multiport device
The multiport Infiniband device support was introduced [1].
All active ports, belonging to the same Infiniband device use the single
shared Infiniband context of that device and share the resources:
- QPs are created within shared context
- Verbs flows are also created with specifying port index
- DV/DR resources
- Protection Domain
- Event Handlers
This patchset adds support for Memory Regions sharing between
ports, created on the base of multiport Infiniband device.
The datapath of mlx5 uses the layered cache subsystem for
allocating/releasing Memory Regions, only the lowest layer L3
is subject to share due to performance issues.
net/mlx5: inherit master link settings for representors
There are some physical link settings can be queried from
Ethernet devices: link status, link speed, speed capabilities,
duplex mode, etc. These setting do not make a lot of sense for
representors due to missing physical link. The new kernel drivers
dropped query for link settings for representors causing the
ioctl call to fail. This patch adds some kind of emulation
of link settings to PMD - representors inherit the link parameters
from the master device. The actual link status (up/down)
is retrieved from the representor device.
Simei Su [Wed, 24 Apr 2019 07:06:10 +0000 (15:06 +0800)]
net/ice: fix Rx statistics
The RX stats will increase even no packets sent, this patch fix this issue
by modifying ipackets and ibytes statistics based on vsi instead of port
to avoid statistics error.
Fixes: a37bde56314d ("net/ice: support statistics") Cc: stable@dpdk.org Signed-off-by: Simei Su <simei.su@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Don't hard code string length in two place; use sizeof() instead.
Ring name should use RTE_RING_NAMESIZE.
Fixes: 96cb19521147 ("net/ring: use EAL APIs in PMD specific API") Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Whitespace fixes to bring inline with current DPDK style.
Fixes: e1e4017751f1 ("ring: add new driver") Fixes: a74a99bbb8ed ("ring: free rings when detaching device") Fixes: 61934c0956d4 ("ring: convert to use of PMD_REGISTER_DRIVER and fix linking") Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Wenzhuo Lu [Wed, 24 Apr 2019 02:43:42 +0000 (10:43 +0800)]
net/ice: fix possible null pointer dereference
Fix the issues reported by Coverity check, "Null-checking
vsi suggests that it may be null, but it has already been
dereferenced on all paths leading to the check."
Coverity issue: 328509, 328519, 328523 Fixes: e0dcf94a0d7f ("net/ice: support VLAN ops") Fixes: ff963bfa7cb1 ("net/ice: support RSS") Cc: stable@dpdk.org Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com> Acked-by: Qiming Yang <qiming.yang@intel.com> Reviewed-by: Rami Rosen <ramirose@gmail.com>
Igor Romanov [Tue, 23 Apr 2019 08:14:30 +0000 (09:14 +0100)]
net/sfc: fix MTU change to check Rx scatter consistency
Rx queue setup function checks configured MTU to make sure that
no oversized packets can be received. But a following call to
set MTU function might make this check irrelevant.
Add a function to check MTU size against Rx buffer size and
additional Rx queue info, including Rx scatter offload.
Fixes: e961cf425e02 ("net/sfc: support MTU change") Cc: stable@dpdk.org Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
If there is the support of DevX is exposed by rdma-core but
DevX is not supported by or disabled for the specific interface
the mlx5_devx_cmd_query_hca_attr() routine returns an error
preventing the device from successful probing. The routine
should be invoked only in case of enabled DevX.
Fixes: e2b4925ef7c1 ("net/mlx5: support Direct Rules E-Switch") Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com> Acked-by: Shahaf Shuler <shahafs@mellanox.com>
The rte_timer_alt_manage function should track which is the running
timer and whether or not it was updated by a callback in the priv_timer
structure that corresponds to the running lcore, so that restarting
or stopping the timer from the callback works correctly.
Fixes: c0749f7096c7 ("timer: allow management in shared memory") Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
A null array is allowed to be passed as one of the parameters to
rte_timer_alt_manage() as a convenience. When that happened, an
anonymous array was created using compound literal syntax, and Coverity
detected that the object was out of scope in later uses of it. Create
an object in the proper scope instead.
Coverity issue: 337919 Fixes: c0749f7096c7 ("timer: allow management in shared memory") Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
David Hunt [Thu, 2 May 2019 11:18:15 +0000 (12:18 +0100)]
power: clarify comment about SST-BF priority core
As part of the documentation update on the changes made to the power
library for 19.05, information on SST-BF was added. This patch updates
the comment to clarify that a priority core is an SST-BF high
frequency core.
Signed-off-by: David Hunt <david.hunt@intel.com> Acked-by: John McNamara <john.mcnamara@intel.com>
David Hunt [Thu, 2 May 2019 11:18:13 +0000 (12:18 +0100)]
doc: add SST-BF info
In the Power Library, a new bit has been added to the mask returned by
rte_power_get_capabilities which indicates whether the core is an
Intel SST-BF high frequency core.
The distributor sample application has been enhanced to be aware of
Intel SST-BF high frequency cores. Docs also contain a link to
the Intel SST-BF application note.
Signed-off-by: David Hunt <david.hunt@intel.com> Acked-by: John McNamara <john.mcnamara@intel.com>
Thomas Monjalon [Fri, 3 May 2019 15:35:39 +0000 (17:35 +0200)]
ipc: replace bool checks with explicit non-zero
The function check_input() was returning a bool as error code.
It is changed to return an int, semantically more correct.
While at it, make checks of validate_action_name() return
explicit as described in the coding guidelines.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Length of buffer and number of fd's to send are signed values, so
they can be negative, but the API doesn't check for that. Fix it
by checking for negative values as well.
Currently, IPC does not check received messages for invalid data
and passes them to user code unchanged. This may result in buffer
overruns on reading message data. Fix this by checking the message
length and fd number on receive, and discard any messages that
are not valid.
According to manpage, ENOBUFS error indicates that either the
input or the output queue is full. This should be considered
an error, but it is treated as an "ignore" condition. Fix the
code to report an error instead.
When sending synchronous IPC requests, the caller must free the response
buffer if the request was successful and reply is no longer needed.
Fix the code to correctly
use the IPC API.
Bugzilla ID: 228 Fixes: c9aa56edec8e ("net/tap: access primary process queues from secondary") Cc: stable@dpdk.org Signed-off-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com> Acked-by: Keith Wiles <keith.wiles@intel.com>
When sending multiple requests, rte_mp_request_sync
can succeed sending a few of those requests, but then
fail on a later one and in the end return with rc=-1.
The upper layers - e.g. device hotplug - currently
handles this case as if no messages were sent and no
memory for response buffers was allocated, which is
not true. Fixed by always freeing memory buffers on
failure.
David Hunt [Fri, 26 Apr 2019 08:42:09 +0000 (09:42 +0100)]
examples/power: fix buffer overrun
The freqs array in freq_info struct has RTE_MAX_LCORE_FREQS elements,
yet the code can attempt to look at the index at RTE_MAX_LCORE,
which may be greater than RTE_MAX_LCORE_FREQS. Fix to limit index to
RTE_MAX_LCORE_FREQS.
Coverity issue: 337660 Fixes: d26c18c93260 ("examples/vm_power: cpu frequency in host") Cc: stable@dpdk.org Signed-off-by: David Hunt <david.hunt@intel.com> Acked-by: Reshma Pattan <reshma.pattan@intel.com>
For client_server_mp, the total number of buffers for the mbuf mempool
should be correctly calculated. Otherwise, having more clients will stop
traffic.
examples/l3fwd: support separate buffer pool per port
Traditionally, only a single buffer pool per port
(or, per-port-per-socket) is created in l3fwd application.
If separate pools are created per-port, it might lead to gain in
performance as packet alloc/dealloc requests would be isolated
across ports (and their corresponding lcores).
This patch adds an argument '--per-port-pool' to the l3fwd application.
By default, old mode of single pool per port (split on sockets) is
active.
L3fwd user guide is also updated by this patch.
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com> Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
If libbsd is enabled in DPDK, the strlcpy and strlcat functions in
rte_string_fns.h redirect to the varients in libbsd, only using the
fallbacks if it is not enabled. Therefore, if libbsd is enabled, it needs
to be called out as a DPDK dependency in the pkgconfig file.
To ensure that we don't have undefined variables on non-Linux platforms, we
can remove the linux condition around the libbsd check - no harm comes in
looking for it on other OS, since it's an optional dependency.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Luca Boccassi <bluca@debian.org>
The post-install script to symlink the PMDs from their own PMD directory to
the regular lib directory (so they would be found by ld at runtime) was
using the "-r" flag to ln to create relative symlinks. This flag is
unsupported by ln on FreeBSD causing the ninja install step to fail.
Reworking the script to take the relative driver path as parameter removes
the need for ln to calculate the relative path ensuring compatibility with
FreeBSD.
As part of the fix, we move the registration of the install script to the
config/meson.build file, from the top level one. This improves readability
as the script takes as parameters the variables set in that file.
Fixes: ed4d43d73e2b ("build: symlink drivers to library directory") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Luca Boccassi <bluca@debian.org>
On freebsd we need to include sys/socket.h to get the definition of
AF_INET in order to compile.
Fixes: d5ceea4ab160 ("examples/l3fwd: format IP addresses for printing") Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Luca Boccassi <bluca@debian.org>
Reshma Pattan [Thu, 2 May 2019 09:33:34 +0000 (10:33 +0100)]
mk: disable warning for packed member pointer
gcc 9 on Fedora 30 gives an error
"taking address of packed member may result in an
unaligned pointer value" warnings.
For clang builds this warning is already disabled,
so disable "-Waddress-of-packed-member" for gcc builds
also.
Snippet of build error:
lib/librte_eal/linux/eal/eal_memalloc.c: In function ‘alloc_seg_walk’:
lib/librte_eal/linux/eal/eal_memalloc.c:768:12: error:
taking address of packed member of ‘struct rte_mem_config’ may result
in an unaligned pointer value [-Werror=address-of-packed-member]
768 | cur_msl = &mcfg->memsegs[msl_idx];
| ^~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com> Tested-by: David Marchand <david.marchand@redhat.com>
Thomas Monjalon [Thu, 2 May 2019 14:53:45 +0000 (16:53 +0200)]
maintainers: fix added or removed files
Reference to test/Makefile was forgotten when removing this file.
Reference to app/test/test_rcu* was forgotten when adding the files.
Fixes: a9de470cc7c0 ("test: move to app directory") Fixes: b87089b0bb19 ("test/rcu: add API and functional tests") Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Ferruh Yigit [Thu, 2 May 2019 13:35:26 +0000 (14:35 +0100)]
build: fix crash by disabling AVX512 with binutils 2.31
On Skylake platform, with native build, KNI kernel module crashes
because of the corrupted values passed to kernel module.
The corruption occurs because the userspace kni library works
unexpectedly. Compiler [1] is using AVX512 instructions and generated
binary is wrong [2].
It turned around gcc does its job correct, but gas is generating binary
wrong. And expected binutils 2.30, 2.31 & 2.31.1 are affected. Issue has
been fixed in binutils 2.32 with:
Commit x86: don't mistakenly scale non-8-bit displacements
AVX512 was already disabled with bintuils 2.30 [3], extending it to
2.31 & 2.31.1 too.
Ferruh Yigit [Thu, 2 May 2019 13:35:25 +0000 (14:35 +0100)]
build: fix meson binutils workaround
The '-mno-avx512f' compiler flag is not passed to the compiler,
detection of the binutils and setting flags works fine, but the flag
itself not used by compiler.
Removing the interim 'march_opt' variable and using directly
'machine_args' and setting '-mno-avx512f' to 'machine_args'
Fixes: 566b4d7a968f ("build: fix meson check for binutils 2.30") Cc: stable@dpdk.org Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Compiling on Fedora 30, we get the following warning, causing build failure
when Werror flag is set:
../drivers/net/ixgbe/ixgbe_rxtx.c:2141:14: warning:
‘nmb’ may be used uninitialized in this function [-Wmaybe-uninitialized]
2141 | rxe->mbuf = nmb;
| ~~~~~~~~~~^~~~~
The check for the zuc library dependency did not check for the include
file needed for compilation. It's also recommended when looking for a
library to use the name without the lib prefix.
The check for the kasumi library dependency did not check for the include
file needed for compilation. It's also recommended when looking for a
library to use the name without the lib prefix.
The new default-taget "linux" is introduced in v19.05-rc1
but not exist in before release such as v19.02 which have
default-target "linuxapp", there is no compatibility report
when run validate-abi.sh to check ABI compatibility between
v19.05-rc1 and v19.02, changed default-target from "linux"
to "linuxapp" in validate-abi.sh
Fixes: 218c4e68c1d9 ("mk: use linux and freebsd in config names") Cc: stable@dpdk.org Signed-off-by: Peng Huang <peng.huang@intel.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Add RCU library supporting quiescent state based memory reclamation method.
This library helps identify the quiescent state of the reader threads so
that the writers can free the memory associated with the lock less data
structures.
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com> Reviewed-by: Steve Capper <steve.capper@arm.com> Reviewed-by: Gavin Hu <gavin.hu@arm.com> Reviewed-by: Ola Liljedahl <ola.liljedahl@arm.com> Acked-by: Paul E. McKenney <paulmck@linux.ibm.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com> Tested-by: Jerin Jacob <jerinj@marvell.com> Tested-by: Ruifeng Wang <ruifeng.wang@arm.com> Tested-by: Hemant Agrawal <hemant.agrawal@nxp.com>
eventdev: add experimental tag back for Rx adapter
Add the experimental tag back to the Rx event adapter callback,
the Rx event callback register and the Rx event adapter statistics
retrieval functions due to an API change to be proposed in a
future patch.
This patch also adds the experimental tag to these
function definitions and adds the functions to the EXPERIMENTAL
section of the map file, these were missing previously.
Fixes: 80bdf91dc8ee ("eventdev: promote adapter functions as stable") Signed-off-by: Nikhil Rao <nikhil.rao@intel.com> Acked-by: Kevin Traynor <ktraynor@redhat.com> Acked-by: Jerin Jacob <jerinj@marvell.com>
doc: update guide and release notes for QAT crypto
This patch adds release notes to 19.05 release document, and more
detailed description to Intel QuickAssist Technology driver
documentation files for asymmmetric crypto PMD.