Commit Graph

8110 Commits

Author SHA1 Message Date
Gagandeep Singh
8b675ab10e net/enetc: enable queue start/stop
Rx and Tx queue start-stop and deferred queue start
features enabled.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
2019-04-19 14:51:54 +02:00
Gagandeep Singh
5d5589b0c8 net/enetc: support MTU update and jumbo frames
Enable the jumbo frames and MTU update feature.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
2019-04-19 14:51:54 +02:00
Gagandeep Singh
4ef1767fa6 net/enetc: enable promiscuous and allmulticast
Promiscuous and allmulticast enable/disable APIs added.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
2019-04-19 14:51:54 +02:00
Gagandeep Singh
4b7bc5ee26 net/enetc: remove forward declarations
Remove unneeded forward declarations and re-order the code.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
2019-04-19 14:51:54 +02:00
Gagandeep Singh
7de1c06a8f net/enetc: replace register read/write macros with functions
Replacing read-write macros with already available
read-write functions.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
2019-04-19 14:51:54 +02:00
Gagandeep Singh
01128d3103 net/enetc: add basic statistics
Enable basic statistics APIs enetc_stats_get
and enetc_stats_reset.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
2019-04-19 14:51:54 +02:00
Gagandeep Singh
45e9be8b6c net/enetc: set interface mode for SXGMII
Support for SXGMII port has been enabled. It will
depends on boot loader information passed through IERB.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
2019-04-19 14:51:54 +02:00
Gagandeep Singh
389a450f37 net/enetc: fix big endian build and buffer allocation
There was an error at rte_constant_bswap64 while compiling
with big endian toolchain. so fixing it by adding type cast.

Also, rte_pktmbuf_alloc API should be used to allocate mbuf
instead of rte_pktmbuf_raw_alloc to avoid use of stale mbuf
information.

Fixes: 469c6111a7 ("net/enetc: enable Rx and Tx")
Cc: stable@dpdk.org

Suggested-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
2019-04-19 14:51:54 +02:00
Gagandeep Singh
63c34c299a net/enetc: fix SMMU unhandled context fault
First configure ring with BDs properly then enable
the ring.

Fixes: 469c6111a7 ("net/enetc: enable Rx and Tx")
Cc: stable@dpdk.org

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
2019-04-19 14:51:54 +02:00
Gagandeep Singh
fa45fda827 net/enetc: support physical addressing mode
Support added for physical addressing mode and
change driver flags to don't care.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
2019-04-19 14:51:54 +02:00
Leyi Rong
a841343009 net/ice: enable RSS for IPv4/IPv6 packets
Enable RSS for general IPv4 and IPv6 packets.

Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-04-19 14:51:54 +02:00
Ori Kam
1183f12f14 net/mlx5: fix RSS validation function
The RSS validation function was missing the verifcation that
if RSS is requested on inner packet, the flow must have tunnel data.

Fixes: 23c1d42c71 ("net/mlx5: split flow validation to dedicated function")
Cc: stable@dpdk.org

Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2019-04-19 14:51:54 +02:00
Rasesh Mody
5a6af6baa8 net/bnx2x: fix optic module verification
Enable the optic module vendor and part number verification from driver
by setting appropriate flags. Link handling module in conjunction with
FW performs optic module verification.

Without this fix the SFP is powered down and the link doesn't come up,
if module verification is enforced in nvram setting.

Fixes: 540a211084 ("bnx2x: driver core")
Cc: stable@dpdk.org

Signed-off-by: Rasesh Mody <rmody@marvell.com>
2019-04-19 14:51:54 +02:00
Rasesh Mody
c19eafccb2 net/bnx2x: fix race for periodic flags
The periodic callout function and the interrupt handler both modify the
periodic flags. There is a possible race condition when an application
is going through dev_stop()/dev_start() and an interrupt handler is
invoked. We also need to ensure that periodic polling is not invoked in
interrupt context.

This patch handles such case by using separate variable to check for
interrupt context. Also, atomically load and store the periodic flag
value.

Fixes: 0f6ebeee24 ("net/bnx2x: fix call to link handling periodic function")
Cc: stable@dpdk.org

Signed-off-by: Rasesh Mody <rmody@marvell.com>
2019-04-19 14:51:54 +02:00
Shahed Shaikh
e166e0db8c net/bnx2x: fix DMAE timeout
In some cases, DPDK application may send packets
while PMD is going through load or unload flow.
This causes firmware to access invalid/unallocated
memory to process transmit buffer. Which results in
error on PCI bus and chip further blocks access to host,
causing a DMAE timeout.

Fix this issue by installing dummy empty transmit and receive
handlers at the beginning of unload path (rte_eth_dev_stop())
and install actual transmit and receive handlers after successful
load of the PMD port (rte_eth_dev_start()). This way, application
won't be able to send packets while device is going through
load/unload flow.

Fixes: 540a211084 ("bnx2x: driver core")
Cc: stable@dpdk.org

Signed-off-by: Shahed Shaikh <shshaikh@marvell.com>
2019-04-19 14:51:54 +02:00
Shahed Shaikh
8bd31421c5 net/bnx2x: fix ramrod timeout
There is a race condition while processing RAMROD
completion in fast path queue through interrupt handler
and polling method.

Interrupt handler invoked from actual interrupt event
and from RAMROD processing polling flow may create a
situation where one flow will read and clear a fastpath
interrupt without actually processing the RAMROD completion.
Thus, causing a RAMROD timeout even though HW sent an
completion event.

Fix this by introducing an atomic variable which will be
set only when interrupt handler needs to process RAMROD
completion.

Fixes: 540a211084 ("bnx2x: driver core")
Cc: stable@dpdk.org

Signed-off-by: Shahed Shaikh <shshaikh@marvell.com>
2019-04-19 14:51:54 +02:00
Shahed Shaikh
68ed074225 net/bnx2x: fix memory leak
We allocate DMA memory but never free after using it.
Add function to free DMA memory.

Fixes: b5bf771922 ("bnx2x: driver support routines")
Cc: stable@dpdk.org

Signed-off-by: Shahed Shaikh <shshaikh@marvell.com>
2019-04-19 14:51:54 +02:00
Rasesh Mody
ed55533e98 net/bnx2x: fix MTU for jumbo frame
Fix to update eth dev MTU for jumbo frames

Fixes: 540a211084 ("bnx2x: driver core")
Cc: stable@dpdk.org

Signed-off-by: Rasesh Mody <rmody@marvell.com>
2019-04-19 14:51:54 +02:00
Akhil Goyal
261fb94185 crypto/dpaa: fix session destroy
Coverity issue: 336798
Fixes: 1f14d500bc ("crypto/dpaa_sec: support IPsec protocol offload")
Fixes: 0a23d4b6f4 ("crypto/dpaa2_sec: support protocol offload IPsec")
Cc: stable@dpdk.org

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2019-04-18 16:01:28 +02:00
Fiona Trahe
bf0cd22643 compress/qat: fix dataplane return
Fixes: 352332744c ("compress/qat: add dynamic SGL allocation")
Cc: stable@dpdk.org

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
2019-04-18 16:01:28 +02:00
Gagandeep Singh
c761bffe0b crypto/caam_jr: fix memory leak and illegal access
Opendir() returns allocated storage which must be freed at the
end of function or in case any return on error. so freeing the
allocation using closedir in an error case.

Coverity issue: 323507
Coverity issue: 325880
Fixes: e7a45f3cc2 ("crypto/caam_jr: add UIO specific operations")
Cc: stable@dpdk.org

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2019-04-18 16:01:28 +02:00
Gagandeep Singh
3386ca38bd crypto/caam_jr: fix total length in auth only s/g
CAAM return wrong digest value in AUTH only sg test case
because digest calculated on wrong length of data

Fixes: 71dd6b9d44 ("crypto/caam_jr: add scatter gather")
Cc: stable@dpdk.org

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2019-04-18 16:01:28 +02:00
Gagandeep Singh
d80dc4bb7c crypto/caam_jr: fix shared descriptor endianness
build a shared descriptor accordingly if core and
CAAM endianness is same or different

Fixes: 6ef6beca88 ("crypto/caam_jr: add enqueue/dequeue operations")
Cc: stable@dpdk.org

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2019-04-18 16:01:28 +02:00
Pablo de Lara
81fe96a0ce crypto/aesni_gcm: use architecture independent API
IPSec Multi-buffer library has recently added API
that sets pointers depending on the architecture, at initiliazation,
in version 0.52.

AESNI MB PMD was updated with these changes, but not
the AESNI GCM PMD, which also uses the same library.

This makes the PMD to be only compatible with version 0.52,
but makes both PMD consistent on version compatibility,
plus adds support for AVX512.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2019-04-18 16:01:28 +02:00
Yongseok Koh
d588f12ffb net/mlx: fix library search in meson build
If MLNX_OFED is installed, there's no .pc file installed for libraries and
dependency() can't find libraries by pkg-config. By adding fallback of
using cc.find_library(), libraries are properly located.

Fixes: e30b4e566f ("build: improve dependency handling")
Cc: stable@dpdk.org

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2019-04-18 18:22:42 +02:00
Yongseok Koh
0559d091cc drivers/event: disable OcteonTx for buggy Arm compilers
Disable octeontx for gcc 4.8.5 as compiler is emitting "internal compiler
error" for aarch64

Fixes: bd77f2d64c ("event/octeontx: build with meson")
Fixes: 4f760550a0 ("mk: disable OcteonTx for buggy compilers")
Fixes: f3af3e44a4 ("mk: disable OcteonTx for buggy compilers only on arm64")
Cc: stable@dpdk.org

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-04-18 18:14:44 +02:00
Bruce Richardson
adf93ca564 build: increase readability via shortcut variables
Define variables for "is_linux", "is_freebsd" and "is_windows"
to make the code shorter for comparisons and more readable.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2019-04-17 18:09:52 +02:00
Qiming Yang
59d151de66 net/ice: stop LLDP by default
This patch stopped LLDP by default to avoid the statistics error.

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-04-12 17:11:37 +02:00
Rastislav Cernay
6435f9a0ac net/nfb: add new netcope driver
Added new net driver for Netcope nfb cards

Signed-off-by: Rastislav Cernay <cernay@netcope.com>
2019-04-12 17:01:13 +02:00
Qi Zhang
756cea41e9 net/i40e: fix scattered Rx enabling
No need to add additional vlan tag size for max packet size, since
for i40e, the queue's Rx Max Frame Size (rxq->max_pkt_len) already
includes the vlan header size.

Fixes: a3c83a2527 ("net/i40e: enable runtime queue setup")
Fixes: 4861cde461 ("i40e: new poll mode driver")
Fixes: c1715402df ("i40evf: fix jumbo frame support")
Cc: stable@dpdk.org

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
2019-04-12 11:02:02 +02:00
Somnath Kotur
13856b7953 net/bnxt: fix big endian build
The result of the endian conversion was not being used incorrectly.

Fixes: b11cceb83a ("net/bnxt: support timesync")
Cc: stable@dpdk.org

Reported-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
2019-04-12 11:02:02 +02:00
Hyong Youb Kim
6e54c8ac5c net/enic: fix VLAN inner type matching for old hardware
The vlan pattern handler currently assumes the NIC always strips vlan
header from the L2 buffer, regardless of the vlan strip setting. But,
with older VIC models, the vlan header is actually present in the L2
buffer if stripping is disabled. So in this case, the inner ether type
needs to be shifted by that much.

Fixes: 6ced137607 ("net/enic: flow API for NICs with advanced filters enabled")
Cc: stable@dpdk.org

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
2019-04-12 11:02:02 +02:00
Hyong Youb Kim
37b07be28a net/enic: fix raw item length check
Currently, the raw item is always preceded by a UDP header, and both
land in the L4 pattern buffer. So consider the UDP header size when
checking if the raw spec fits in the L4 buffer.

Coverity issue: 336796, 336850
Fixes: 477959e6ee ("net/enic: enable limited support for raw flow item")

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
2019-04-12 11:02:02 +02:00
Yongseok Koh
97d37d2c1f net/mlx4: remove device register remap
UAR (User Access Region) register does not need to be remapped for
primary process but it should be remapped only for secondary process.
UAR register table is in the process private structure in
rte_eth_devices[],
(struct mlx4_proc_priv *)rte_eth_devices[port_id].process_private

The actual UAR table follows the data structure and the table is used
for both Tx and Rx.

For Tx, BlueFlame in UAR is used to ring the doorbell.
MLX4_TX_BFREG(txq) is defined to get a register for the txq. Processes
access its own private data to acquire the register from the UAR table.

For Rx, the doorbell in UAR is required in arming CQ event. However, it
is a known issue that the register isn't remapped for secondary process.

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-04-12 11:02:02 +02:00
Yongseok Koh
120dc4a7dc net/mlx5: remove device register remap
UAR (User Access Region) register does not need to be remapped for
primary process but it should be remapped only for secondary process.
UAR register table is in the process private structure in
rte_eth_devices[],
(struct mlx5_proc_priv *)rte_eth_devices[port_id].process_private

The actual UAR table follows the data structure and the table is used
for both Tx and Rx.

For Tx, BlueFlame in UAR is used to ring the doorbell.
MLX5_TX_BFREG(txq) is defined to get a register for the txq. Processes
access its own private data to acquire the register from the UAR table.

For Rx, the doorbell in UAR is required in arming CQ event. However, it
is a known issue that the register isn't remapped for secondary process.

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
2019-04-12 11:02:02 +02:00
Yongseok Koh
d5c900d1dd net/mlx5: remove redundant queue index
Queue index is redundantly stored for both Rx and Tx structures.
E.g. txq_ctrl->idx and txq->stats.idx. Both are consolidated to single
storage - rxq->idx and txq->idx.

Also, rxq and txq are moved to the beginning of its control structure
(rxq_ctrl and txq_ctrl) for cacheline alignment.

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-04-12 11:02:02 +02:00
Yongseok Koh
227684feb8 net/mlx5: fix recursive inclusion of header file
mlx5.h includes mlx5_rxtx.h and mlx5_rxtx.h includes mlx5.h recursively.

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-04-12 11:02:02 +02:00
Qi Zhang
50cc9d2a6e net/ice: fix max frame size
Max frame size setup should consider double VLAN case.

Fixes: ae2bdd0219 ("net/ice: support MTU setting")
Cc: stable@dpdk.org

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2019-04-12 11:02:02 +02:00
Yongseok Koh
b27669d691 net/mlx4: fix Tx doorbell register unmap
If rdma-core library doesn't support remapping UAR registers, the register
shouldn't be unmapped on device stop.

Fixes: 0203d33a10 ("net/mlx4: support secondary process")

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-04-12 11:02:02 +02:00
Ori Kam
bbda883ca0 net/mlx5: fix build on Arm
In case of cross compilation on aarch64 we must add include for
stdlib in order to use the free function.

Fixes: cbb66daa3c ("net/mlx5: prepare Direct Verbs for Direct Rule")

Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-04-12 11:02:02 +02:00
Andrew Rybchenko
bac46c6fef net/sfc: set min and max MTU
Advertise minimum and maximum MTU value in device information.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-04-12 11:02:02 +02:00
Alejandro Lucero
701e0bfa84 net/nfp: fix resource leak on errors
Not closing the socket implies a resource leak.

Coverity issue: 336865
Fixes: 29a62d1476 ("net/nfp: add CPP bridge as service")
Cc: stable@dpdk.org

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2019-04-12 11:02:02 +02:00
Alejandro Lucero
8539ec0a40 net/nfp: fix memory leak
Coverity issue: 32806
Fixes: ef28aa96e5 ("net/nfp: support multiprocess")
Cc: stable@dpdk.org

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2019-04-12 11:02:02 +02:00
Alejandro Lucero
318e737d2d net/nfp: fix memory leak
If errors, release the allocated structure.

Coverity issue: 277222
Fixes: c7e9729da6 ("net/nfp: support CPP")
Cc: stable@dpdk.org

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2019-04-12 11:02:02 +02:00
Alejandro Lucero
0fec453d58 net/nfp: check return value
Call to CPP read (nfp_cpp_readl()) can fail, return 0 on fail.

If the call to _nfp6000_cppat_mu_locality fails, the function needs
to return with an error.

If the nfp_cpp_readl() call fails just returns 0.

Coverity issue: 277209, 277215, 277225
Fixes: c7e9729da6 ("net/nfp: support CPP")
Cc: stable@dpdk.org

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2019-04-12 11:02:02 +02:00
Alejandro Lucero
3243f7c0d8 net/nfp: fix potential integer overflow
Coverity issue: 277204
Fixes: defb9a5dd1 ("nfp: introduce driver initialization")
Cc: stable@dpdk.org

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2019-04-12 11:02:02 +02:00
Alejandro Lucero
0c08589d9e net/nfp: fix file descriptor check
Although it is rather unlikely getting 0 as the descriptor handle, better
to contemplate that possibility.

Coverity issue: 195018
Fixes: 896c265ef9 ("net/nfp: use new CPP interface")
Cc: stable@dpdk.org

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2019-04-12 11:02:02 +02:00
Michal Krawczyk
ef538c1a7f net/ena: fix checksum feature flag
The boolean value was assigned to Tx flag twice, so it could cause bug
whenever Rx checksum will not be supported and Tx will be.

Coverity issue: 336831
Fixes: 117ba4a604 ("net/ena: get device info statically")

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
2019-04-12 11:02:02 +02:00
Viacheslav Ovsiienko
942d13e6e7 net/mlx5: fix sharing context destroy order
At the mlx5 device closing the shared IB context was destroyed
before cleanup routines completion. As it was found on some
setups (Netlink fails with old kernel drivers and we have to use
sysfs to retrieve interface index, this requires IB device name,
which is stored in shared context) the mlx5_nl_mac_addr_flush()
requires IB device name, and if shared context is removed it
causes the segmentation fault.

Fixes: 17e19bc4dd ("net/mlx5: add IB shared context alloc/free functions")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-04-12 11:02:02 +02:00
Viacheslav Ovsiienko
9c2bbd0488 net/mlx5: fix device probing for old kernel drivers
Retrieving network interface index via Netlink fails in
case of old ib_core kernel driver installed - mlx5_nl_ifindex()
routine fails due to RDMA_NLDEV_ATTR_NDEV_INDEX attribute is not
supported by the old driver.

The patch allowing to retrieve the network interface index and
name via Netlink [1]. So, the problem depends on ib_core module
version - 4.16 supports getting ifindex via Netlink, 4.15 does not.

This error was ignored in previous versions of MLX5 PMD probing
routine. For single device ifindex was retrieved via sysfs
and link control was not lost, so problem just was not noticed.
In order to support MLX5 PMD functioning over old kernel driver
this patch adds ifindex retrieving via sysfs into probing routine.
It is worth to note this method works for master/standalone
device only.

[1] https://www.spinics.net/lists/linux-rdma/msg62948.html
    Linux tree: 5b2cc79d (Leon Romanovsky 2018-03-27 20:40:49 +0300 270)

Fixes: ad74bc6195 ("net/mlx5: support multiport IB device during probing")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2019-04-12 11:02:02 +02:00