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.
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
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.
[1] http://patches.dpdk.org/cover/51800/
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
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.
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
When creating the modify action using Direct Rules, we need to
add flags to mark, if the action will be done on root table or on
private table.
Fixes: 4f84a19779 ("net/mlx5: add Direct Rules API")
Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
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: a37bde5631 ("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>
Identified by LGTM, the loop was incorrectly incrementing a different
variable and conditional on another.
Fixes: fe2b986ac6 ("net/dpaa2: support generic flow")
Suggested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
'rte_eth_dev_get_port_by_name()' return value is not checked caught by
coverity, adding return value check.
Coverity issue: 305853
Fixes: 96cb195211 ("net/ring: use EAL APIs in PMD specific API")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
The ring name is passed in as part of this drivers API, but it
doesn't check that the name is not truncated.
Fixes: 96cb195211 ("net/ring: use EAL APIs in PMD specific API")
Fixes: e1e4017751 ("ring: add new driver")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Don't hard code string length in two place; use sizeof() instead.
Ring name should use RTE_RING_NAMESIZE.
Fixes: 96cb195211 ("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: e1e4017751 ("ring: add new driver")
Fixes: a74a99bbb8 ("ring: free rings when detaching device")
Fixes: 61934c0956 ("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>
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: e0dcf94a0d ("net/ice: support VLAN ops")
Fixes: ff963bfa7c ("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>
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: e961cf425e ("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: e2b4925ef7 ("net/mlx5: support Direct Rules E-Switch")
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
In mlx5_rxq.c, in some comments, text includes "Tx" instead of "Rx".
In mlx5_txq.c, in some comments, text includes "Rx" instead of "Tx".
This patch fixes these typos.
Fixes: faf2667fe8 ("net/mlx5: separate DPDK from verbs Tx queue objects")
Fixes: a1366b1a2b ("net/mlx5: add reference counter on DPDK Rx queues")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
All the library calls must be called via the glue layer.
Fixes: b2177648b8 ("net/mlx5: add Direct Rules flow data alloc/free routines")
Fixes: 79e35d0d59 ("net/mlx5: share Direct Rules/Verbs flow related structures")
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Looking for an ethdev port is better (and more efficient)
with an ethdev API than an EAL one.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
The flow group should be initialized.
For example selecting if the encapsulation is for root or private tables
is based on the flow->group value.
Fixes: 4f84a19779 ("net/mlx5: add Direct Rules API")
Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
stats_reset has been missed when support stats in iavf driver.
This patch add statistics reset function.
Fixes: f4a41a6953 ("net/avf: support stats")
Cc: stable@dpdk.org
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
The DSW event device didn't set RTE_EVENT_DEV_CAP_MULTIPLE_QUEUE_PORT
and RTE_EVENT_DEV_CAP_NONSEQ_MODE, even though it has both these
capabilities.
Fixes: 4540ee9c68 ("event/dsw: add device and queue configuration")
Cc: stable@dpdk.org
Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
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: c9aa56edec ("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>
In rte_fpga_do_pr() function, if 'stat' return error the
'file_fd' is never closed thus leading a fd leak.
This patch avoids this.
Coverity issue: 279441
Fixes: ef1e8ede3d ("raw/ifpga: add Intel FPGA bus rawdev driver")
Cc: stable@dpdk.org
Signed-off-by: Li Qiang <liq3ea@163.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
vdev driver names are not available in create if called from probe.
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
The code shall be unlock post the lock.
Fixes: c22fab9a6c ("raw/dpaa2_qdma: support configuration APIs")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
GCC9 gives warnings if the parameter passed to printf for "%s" could be
NULL, so we need to add checks in some cases to ensure that is not the
case.
Fixes: 3298fa4853 ("raw/dpaa2_cmdif: introduce DPAA2 command interface driver")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
GCC9 gives warnings if the parameter passed to printf for "%s" could be
NULL, so we need to add checks in some cases to ensure that is not the
case.
Fixes: 61c592a8d0 ("raw/skeleton: introduce skeleton rawdev driver")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Printing a null pointer with %s is flagged as a warning by GCC 9, and
should not be done. Replace the %s with the word "null" itself.
Fixes: 828d51d8fc ("bus/fslmc: refactor scan and probe functions")
Cc: stable@dpdk.org
Signed-off-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;
| ~~~~~~~~~~^~~~~
Initializing the value to "NULL" fixes the issue.
Fixes: 8eecb3295a ("ixgbe: add LRO support")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
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.
Fixes: df1740a8db ("crypto/zuc: enable meson build")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
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.
Fixes: 2ec2d46c62 ("crypto/kasumi: enable meson build")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Snow3G driver is missing support for building with meson. Add a new
meson.build file so it can be included in the builds.
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
The metabuf pool is shared across all queue pairs belonging to the
PMD. In order to prevent one queue pair from starving another,
use a distinct mempool for each queue pair.
Fixes: 273487f7b3 ("crypto/octeontx: add global resource init")
Cc: stable@dpdk.org
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Shally Verma <shallyv@marvell.com>
NULL cipher algo of 4-byte multiple and other sizes caused firmware hang
due to use of wrong mode. Changed from ECB mode to CTR mode to fix.
Fixes: 98f0608916 ("crypto/qat: add symmetric session file")
Cc: stable@dpdk.org
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
The aesni_mb driver has a check in its Makefile for the correct version of
the IPsec_MB library, but this check was missed for the aesni_gcm driver.
Add this check to the makefile, removing an unnecessary assignment in the
process.
Suggested-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
The version check for the IPSec_MB library present in the aesni_gcm
library's meson.build file is a little cleaner than that given here,
so update this one so that both work identically.
While one could use the checks done in the other right now, potentially in
future they may have different version dependencies, or may be compiled in
different orders, so keep the code duplicated for safety, since it's only a
few lines.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
The aesni_mb driver and the aesni_gcm driver both require the same version
of the IPSec_MB library, but only the former has a check of the library
found by meson to see if it's the correct version. Add a similar check to
the aesni_gcm library's meson.build file, so that the auto-detection of
dependencies works correctly.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
As flagged by coverity, the "info" structure is being explicitly
dereferenced before being checked later for a NULL value.
Coverity issue: 277241
Fixes: 98e60c0d43 ("net/i40e: add module EEPROM callbacks for i40e")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Rami Rosen <ramirose@gmail.com>
Coverity flags that the txq variable is used before it's checked for NULL.
Also fix typo in error message.
Coverity issue: 195023
Fixes: 24853544c8 ("net/i40e: fix mbuf free in vector Tx")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Rami Rosen <ramirose@gmail.com>
If secondary process attempt to mmap the resource resulted in
the wrong address, then it would leave behind the bad mmap.
Coverity issue: 337675, 337664
Fixes: 2a28a502c6 ("bus/vmbus: map ring in secondary process")
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Promote the adapter functions and rte_event_port_unlinks_in_progress()
as stable as it's been added for a while now and multiple drivers and
test application like test-eventdev has been tested using the adapter APIs.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
The function rte_eal_cleanup() was introduced more than one year ago,
in DPDK 18.02. It is no longer experimental, allowing
pdump, proc-info and hotplug_mp apps to not need any experimental API.
The function rte_ctrl_thread_create() was introduced one year ago
in DPDK 18.05. It is no longer experimental, allowing
KNI PMD and TEP example to not need any experimental API.
The functions rte_socket_count() and rte_socket_id_by_idx() were
introduced one year ago in DPDK 18.05. They are no longer experimental.
The function rte_dev_is_probed() was introduced half a year ago
in DPDK 18.11. It is no longer experimental.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
A successful call to rte_mp_request_sync does not guarantee that there
are any messages in the buffer, and this should be checked for before
accessing data in the message. Buffer can be empty if IPC is disabled or
if we decide to ignore replies.
Fixes: c9aa56edec ("net/tap: access primary process queues from secondary")
Cc: stable@dpdk.org
Signed-off-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
This driver defines lots of functions (like init_rss) which are intended
to only be used in this device. But when doing static linking these
global functions cause link failures when similar function name is
used in application.
This patch prefixes all functions defined in cxgbe.h with cxgbe_
to avoid these kind of conflicts.
Fixes: bfcb257d30 ("net/cxgbe: enable RSS for VF")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>