Commit Graph

17529 Commits

Author SHA1 Message Date
Andrew Rybchenko
bdca79053b app/testpmd: set fixed flag for exact link speed
Setting exact link speed makes sense if auto-negotiation is
disabled. Fixed flag is required to disable auto-negotiation.

Fixes: 88fbedcd5e ("app/testpmd: move speed and duplex parsing in a function")
Cc: stable@dpdk.org

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
2019-04-19 14:51:54 +02:00
Rosen Xu
d1cd4eb2d4 raw/ifpga: support ipn3ke
Add Intel FPGA Acceleration NIC IPN3KE support for IFPGA Rawdev.

Signed-off-by: Rosen Xu <rosen.xu@intel.com>
Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>
Signed-off-by: Andy Pei <andy.pei@intel.com>
2019-04-19 14:51:54 +02:00
Tianfei Zhang
e61569e757 raw/ifpga/base: add prefix for feature and its ops
Using prefix name "ifpga_" for feature and feature_ops data
struct on ifpga base code, which is suggested by Yigit, Ferruh.

Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>
2019-04-19 14:51:54 +02:00
Tianfei Zhang
e94a9484ea raw/ifpga/base: add version description
add verion description on READ about ifpga base code.

Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>
2019-04-19 14:51:54 +02:00
Tianfei Zhang
8a256bef32 raw/ifpga/base: add eth group driver
There is two eth group devices in PAC N3000 card,
each eth group include PHY device and MAC device. Exposing
APIs for DPDK PMD driver to access those devices.

Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>
2019-04-19 14:51:54 +02:00
Tianfei Zhang
15d21c8510 raw/ifpga/base: add I2C and at24 EEPROM driver
1. Add Altera I2C master device driver
2. Add at24 eeprom driver which is i2c slave device
3. Introducing a new ops for opae_manager: opae_manager_networking_ops.
This ops will include some networking operation by FPGA, like vBNG
operation, MAC ROM operation and so on.

Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>
2019-04-19 14:51:54 +02:00
Tianfei Zhang
96ebfcf812 raw/ifpga/base: add SPI and MAX10 device driver
There is a SPI bus link between A10 FPGA and MAX10 FPGA.
MAX10 is in charge of board management, like power management,
sensors, flash devices.

Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>
2019-04-19 14:51:54 +02:00
Tianfei Zhang
e4dc499d56 raw/ifpga/base: store private features in FME and port
Get private features attribute like size, id, address after
enumeration, and insert into FEM or Port dedicate list.

when initial the private feature driver, we just compare the
private feature id between the list and feature drivers array
to match the proper drivers.

This patch avoid the hardcore in feature_info array in previous
implementation. and the same time we can use one driver for mulitple
devices which the id is the same.

Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>
2019-04-19 14:51:54 +02:00
Tianfei Zhang
93bf4b3101 raw/ifpga/base: clean up
clean up code:
1. use opae_memcpy instead of memcpy
2. use opae_memset instead of memset
3. disable opae_adapter_dump by default

Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>
2019-04-19 14:51:54 +02:00
Rosen Xu
6ad943ff49 net/ipn3ke: support flow API
Add Intel FPGA Acceleration NIC IPN3KE Flow of PMD driver.

Signed-off-by: Rosen Xu <rosen.xu@intel.com>
Signed-off-by: Andy Pei <andy.pei@intel.com>
Signed-off-by: Dan Wei <dan.wei@intel.com>
2019-04-19 14:51:54 +02:00
Rosen Xu
c820468ac9 net/ipn3ke: support TM
Add Intel FPGA Acceleration NIC IPN3KE TM of PMD driver.

Signed-off-by: Rosen Xu <rosen.xu@intel.com>
Signed-off-by: Andy Pei <andy.pei@intel.com>
Signed-off-by: Dan Wei <dan.wei@intel.com>
2019-04-19 14:51:54 +02:00
Rosen Xu
70d6b7f550 net/ipn3ke: add representor
Add Intel FPGA Acceleration NIC IPN3KE representor of PMD driver.

Signed-off-by: Rosen Xu <rosen.xu@intel.com>
Signed-off-by: Andy Pei <andy.pei@intel.com>
Signed-off-by: Dan Wei <dan.wei@intel.com>
2019-04-19 14:51:54 +02:00
Rosen Xu
c01c748e4a net/ipn3ke: add new driver
Add Intel FPGA Acceleration NIC IPN3KE ethdev PMD driver.

Signed-off-by: Rosen Xu <rosen.xu@intel.com>
Signed-off-by: Andy Pei <andy.pei@intel.com>
Signed-off-by: Dan Wei <dan.wei@intel.com>
2019-04-19 14:51:54 +02:00
Rosen Xu
dc384b5087 bus/ifpga: support AFU device search by name
In many scenarios, AFU is needed searched by name, this
function add the feature.

Signed-off-by: Rosen Xu <rosen.xu@intel.com>
Signed-off-by: Andy Pei <andy.pei@intel.com>
2019-04-19 14:51:54 +02:00
Rosen Xu
bad9d52e0b bus/ifpga: add AFU shared data
AFU can be implemented into many different acceleration
devices, these devices need shared data to store private
information when they are handled by users.

Signed-off-by: Rosen Xu <rosen.xu@intel.com>
Signed-off-by: Andy Pei <andy.pei@intel.com>
2019-04-19 14:51:54 +02:00
Gagandeep Singh
e091c6915e net/enetc: fix crash at high speed traffic
On xmit side, there should be a check whether BD ring
has free BDs available before transmit a packet to avoid
data corruption and buffer leak issue.

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
f5a2e3bad4 net/enetc: enable Rx checksum offload validation
Checksum Validation on Rx is supported.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
2019-04-19 14:51:54 +02:00
Gagandeep Singh
1d0c33978a net/enetc: enable CRC offload
CRC offload keep feature supported

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
2019-04-19 14:51:54 +02:00
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
Ferruh Yigit
00cc9701e4 mbuf: update Tx VLAN and QinQ flags documentation
Currently PKT_TX_VLAN and PKT_TX_QINQ mbuf flags are documented as
they are to say packet contains VLAN or QINQ information.

Updating the definition as they are requests from application to
driver to insert VLAN or double VLAN tags into packet.

Fixes: dc6c911c99 ("mbuf: use reserved space for double vlan")
Fixes: af75078fec ("first public release")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2019-04-19 23:21:13 +02:00
Bruce Richardson
e5f7bd199d devtools: fix meson build test for plain bourne shell
The pipefail option is not supported in /bin/sh, just in bash/ksh and
similar shells - which means it's there by default on most Linux distros
but not on e.g. FreeBSD. Therefore we check for it's presence before
setting the option, and if it's missing, we upgrade verbosity level if
needed to ensure we never hide any build failures.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2019-04-19 23:21:13 +02:00
Bruce Richardson
890028e252 test/compress: fix missing include
Build of test_compressdev.c fails on FreeBSD due to the missing
include of unistd.h, to provide the function usleep.

Fixes: b06aa643ca ("test/compress: add initial unit tests")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
2019-04-19 23:21:13 +02:00
Fiona Trahe
0e7d65181a test/compress: fix build
Fixed the compilation error:

app/test/test_compressdev.c:1949:11: note:
	previous definition of 'i' was here
app/test/test_compressdev.c:1992:2: error:
	'for' loop initial declarations are only allowed in C99 mode
app/test/test_compressdev.c:1992:2: note:
	use option -std=c99 or -std=gnu99 to compile your code
app/test/test_compressdev.c:1996:19: warning:
	assignment from incompatible pointer type [enabled by default]

Fixes: 355b02eedc65 ("test/compress: add max mbuf size test case")

Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
2019-04-19 23:07:17 +02:00
Jie Pan
c629829f02 kni: fix type for MAC address
The type for MAC address should be unsigned.

Fixes: 1cfe212ed1 ("kni: support MAC address change")
Cc: stable@dpdk.org

Signed-off-by: Jie Pan <panjie5@jd.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Rami Rosen <ramirose@gmail.com>
2019-04-19 23:07:17 +02:00
Igor Ryzhov
8ce1fdea09 kni: implement header_ops parse method
It allows applications running packet sockets over KNI interfaces to get
source Ethernet addresses of packets received using recvfrom function.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-04-19 12:35:28 +02:00
Ferruh Yigit
db9178c24c kni: fix build with Linux 5.1
Build error seen with Linux kernel 5.1 and
when CONFIG_RTE_KNI_KMOD_ETHTOOL is enabled.

Build error:
kernel/linux/kni/igb_main.c:2352:18:
  error: initialization of ... from incompatible pointer type ...
  [-Werror=incompatible-pointer-types]
    .ndo_fdb_add  = igb_ndo_fdb_add,
                      ^~~~~~~~~~~~~~~

ndo_fdb_add() is changed in Linux kernel version 5.1 and now requires
a new parameter, 'struct netlink_ext_ack *extack':
Linux Commit 87b0984ebfab ("net: Add extack argument to ndo_fdb_add()")

ndo_fdb_add() parameter updated with compile time Linux kernel version
check.

Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tested-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Rami Rosen <ramirose@gmail.com>
2019-04-19 12:30:46 +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
Bernard Iremonger
2cb4a0d44b test/ipsec: fix logic around dequeue burst
Added crypto_dequeue_burst() function to call
rte_crypto_dequeue_burst() in a loop with a
delay to ensure that all the  packets are
dequeued from the crypto device.

Fixes: 59d7353b0d ("test/ipsec: fix test suite setup")
Cc: stable@dpdk.org

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2019-04-18 16:01:28 +02:00
Bruce Richardson
64c469b9e7 app/crypto-perf: check range of socket id
The socket_id is used as an array index so should be within the range
of zero to max numa nodes. Add a range check to ensure we don't get
excessive values.

Coverity issue: 336812
Coverity issue: 336829
Fixes: 2c59bd32b7 ("cryptodev: do not create session mempool internally")
CC: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2019-04-18 16:01:28 +02:00
Fiona Trahe
7df9d02e68 doc: fix missing asymmetric crypto table
Fixes: 11e5ba72cf ("doc: add crypto asymmetric feature list")
Cc: stable@dpdk.org

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2019-04-18 16:01:28 +02:00
Bernard Iremonger
63774c02fe test/ipsec: fix initialisation
Fix xform initialisation.
Fix testsuite_setup.
Remove unused variables.

Fixes: 05fe65eb66 ("test/ipsec: introduce functional test")
Fixes: 59d7353b0d ("test/ipsec: fix test suite setup")
Cc: stable@dpdk.org

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.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
Tomasz Jozwiak
9df7ffd188 test/compress: add max mbuf size test case
This patch adds new test case in which max. size of
chain mbufs has been used to compress random data dynamically.

Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Acked-by: Tomasz Cel <tomaszx.cel@intel.com>
2019-04-18 16:01:28 +02:00