dpdk.git
4 years agodoc: fix typos in 19.11 release notes
Yong Wang [Tue, 31 Dec 2019 07:36:47 +0000 (15:36 +0800)]
doc: fix typos in 19.11 release notes

Remove the redundant "when used". And modify "ans" to "and".

Fixes: b21302a10721 ("eventdev: add Tx flag for packets with same destination")
Fixes: 92c083915ade ("doc: update release notes for 19.11")
Cc: stable@dpdk.org
Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
4 years agodoc: add tested platforms with Mellanox NICs
Raslan Darawsheh [Tue, 25 Feb 2020 09:24:01 +0000 (11:24 +0200)]
doc: add tested platforms with Mellanox NICs

Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
4 years agodoc: add Tx inline hint in mlx5 guide
Viacheslav Ovsiienko [Tue, 25 Feb 2020 13:57:28 +0000 (13:57 +0000)]
doc: add Tx inline hint in mlx5 guide

The no-inline hint flag is described.

Fixes: cacb44a09962 ("net/mlx5: add no-inline Tx flag")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
4 years agodoc: announce python 2 support removal
Robin Jarry [Mon, 17 Feb 2020 09:26:59 +0000 (10:26 +0100)]
doc: announce python 2 support removal

Now that Python 2 is officially not maintained anymore, prepare the
removal of support in DPDK.

Add a deprecation notice indicating the removal schedule.

Signed-off-by: Robin Jarry <robin.jarry@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agodoc: announce igb_uio move to an external repository
Jerin Jacob [Thu, 30 Jan 2020 16:58:53 +0000 (22:28 +0530)]
doc: announce igb_uio move to an external repository

Based on the tech board meeting held on 2019-11-06,
It's been decided to move igb_uio kernel module to a new repository
hosted by dpdk.org in v20.11 release.

http://mails.dpdk.org/archives/dev/2019-November/151763.html

Adding the deprecation notice for the same in advance.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agodoc: announce deprecation of max constants as array size
Ferruh Yigit [Thu, 30 Jan 2020 14:20:03 +0000 (14:20 +0000)]
doc: announce deprecation of max constants as array size

Adding the deprecation notice as reminder for next ABI breakage release
(20.11).
This one time breakage is required to be able to extend enum/define
without breaking ABI.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agodoc: fix naming of Mellanox devices
Thomas Monjalon [Mon, 24 Feb 2020 19:52:14 +0000 (20:52 +0100)]
doc: fix naming of Mellanox devices

The devices of the family ConnectX may have two letters as suffix.
Such suffix is preceded with a space and the second x is lowercase:
    - ConnectX-4 Lx
    - ConnectX-5 Ex
    - ConnectX-6 Dx

Uppercase of the device family name BlueField is also fixed.

The lists of supported devices are fixed.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
4 years agodoc: remove redundant line in mlx5 guide
Thomas Monjalon [Mon, 24 Feb 2020 19:50:42 +0000 (20:50 +0100)]
doc: remove redundant line in mlx5 guide

When adding GTP to the list of supported tunnels,
the old line was not removed.

Fixes: f31d7a0171da ("net/mlx5: support GTP")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
4 years agodoc: add external pinned memory mbuf to release notes
Viacheslav Ovsiienko [Mon, 24 Feb 2020 17:58:15 +0000 (17:58 +0000)]
doc: add external pinned memory mbuf to release notes

Update release notes features for the new mbuf pool
with external pinned buffers.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
4 years agodoc: add metadata limitation in mlx5 guide
Viacheslav Ovsiienko [Mon, 24 Feb 2020 17:57:49 +0000 (17:57 +0000)]
doc: add metadata limitation in mlx5 guide

The metadata limitation is described.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
4 years agodoc: add raw encap/decap limitations in mlx5 guide
Raslan Darawsheh [Sun, 23 Feb 2020 09:30:59 +0000 (11:30 +0200)]
doc: add raw encap/decap limitations in mlx5 guide

Document validation limitations for encap/decap.

Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
4 years agodoc: add IP DSCP rewrite to mlx5 and release notes
Thomas Monjalon [Mon, 24 Feb 2020 19:50:05 +0000 (20:50 +0100)]
doc: add IP DSCP rewrite to mlx5 and release notes

The new rte_flow feature for DSCP field rewrite offload was
missing in the release notes.

The mlx5 requirements for DSCP field rewrite offload were missing.

Fixes: 8482ffe4b68b ("ethdev: add IPv4/IPv6 DSCP rewrite action")
Fixes: 6f26e604a9c3 ("net/mlx5: support IPv4/IPv6 DSCP rewrite action")

Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
4 years agodoc: update mlx5 vDPA requirements
Matan Azrad [Mon, 24 Feb 2020 16:55:07 +0000 (16:55 +0000)]
doc: update mlx5 vDPA requirements

The first Mellanox OFED version to support mlx5 vDPA driver is 5.0.

Signed-off-by: Matan Azrad <matan@mellanox.com>
4 years agovdpa/mlx5: fix guest notification timing
Matan Azrad [Mon, 24 Feb 2020 16:55:06 +0000 (16:55 +0000)]
vdpa/mlx5: fix guest notification timing

When the HW finishes to consume the guest Rx descriptors, it creates a
CQE in the CQ.

The mlx5 driver arms the CQ to get notifications when a specific CQE
index is created - the index to be armed is the next CQE index which
should be polled by the driver.

The mlx5 driver configured the kernel driver to send notification to the
guest callfd in the same time it arrives to the mlx5 driver.

It means that the guest was notified only for each first CQE in a poll
cycle, so if the driver polled CQEs of all the virtio queue available
descriptors, the guest was not notified again for the rest because
there was no any new cycle for polling.

Hence, the Rx queues might be stuck when the guest didn't work with
poll mode.

Move the guest notification to be after the driver consumes all the
SW own CQEs.
By this way, guest will be notified only after all the SW CQEs are
polled.

Also init the CQ to be with HW owner in the start.

Fixes: 8395927cdfaf ("vdpa/mlx5: prepare HW queues")

Signed-off-by: Matan Azrad <matan@mellanox.com>
4 years agovdpa/mlx5: fix event setup
Matan Azrad [Tue, 25 Feb 2020 08:43:48 +0000 (08:43 +0000)]
vdpa/mlx5: fix event setup

The completion event mechanism should work only if at least one of the
virtqs has valid callfd to be notified on.

When all the virtqs works with poll mode, the event mechanism should not
be configured.

The driver didn't take it into account and crashed in the above case.

Do not configure event interrupt when all the virtqs are in poll mode.

Fixes: 8395927cdfaf ("vdpa/mlx5: prepare HW queues")

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
4 years agodoc: update release notes for 20.02
John McNamara [Sun, 23 Feb 2020 10:59:28 +0000 (10:59 +0000)]
doc: update release notes for 20.02

Fix grammar, spelling and formatting of DPDK 20.02 release notes.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agoversion: 20.02-rc4
Thomas Monjalon [Sat, 22 Feb 2020 20:56:33 +0000 (21:56 +0100)]
version: 20.02-rc4

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
4 years agodevtools: add EditorConfig file
Robin Jarry [Fri, 25 Oct 2019 14:04:10 +0000 (16:04 +0200)]
devtools: add EditorConfig file

EditorConfig is a file format and collection of text editor plugins for
maintaining consistent coding styles between different editors and IDEs.

Initialize the file following the coding rules in
doc/guides/contributing/coding_style.rst,
doc/guides/contributing/documentation.rst and
doc/guides/contributing/patches.rst.

In order for this file to be taken into account (unless they use an
editor with built-in EditorConfig support), developers will have to
install a plugin.

Note: The max_line_length property is only supported by a limited number
of EditorConfig plugins. It will be ignored if unsupported.

Add this new file in MAINTAINERS in the "Developers and Maintainers
Tools" section.

Link: https://editorconfig.org/
Link: https://github.com/editorconfig/editorconfig-emacs
Link: https://github.com/editorconfig/editorconfig-vim
Link: https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties#max_line_length
Signed-off-by: Robin Jarry <robin.jarry@6wind.com>
4 years agodevtools: warn on C99-style comment
Lance Richardson [Sat, 15 Feb 2020 17:09:50 +0000 (12:09 -0500)]
devtools: warn on C99-style comment

C99-style comments are not permitted according to DPDK coding
style guidelines, enable checking for these by checkpatch.pl.

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
4 years agoadd top-level SPDX license tag
Hemant Agrawal [Thu, 28 Nov 2019 07:05:38 +0000 (12:35 +0530)]
add top-level SPDX license tag

This patch adds top level SPDX license identifiers for some of the DPDK
source and scripts, where the copyright owners have not yet agreed to
replace the full BSD-3 license plate.

This patch also add SPDX license tag for a file with no
previous license plates. (DPDK is BSD-3)

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
4 years agodevtools: add SPDX license tag to config loader
Stephen Hemminger [Wed, 4 Dec 2019 15:55:17 +0000 (07:55 -0800)]
devtools: add SPDX license tag to config loader

Trivial file was missing any license.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
4 years agopmdinfogen: add SPDX license tag
Hemant Agrawal [Fri, 27 Sep 2019 08:39:56 +0000 (14:09 +0530)]
pmdinfogen: add SPDX license tag

This patch adds SPDX license tag to pmdinfogen files.

These files are originally drived from kernel.
They are being used as binary tool to support internal
build.

This patch requires license exception approval from
DPDK Technical Board and Governing Board.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
4 years agodoc: add build requirement in some crypto PMD guides
Pablo de Lara [Mon, 17 Feb 2020 17:12:55 +0000 (17:12 +0000)]
doc: add build requirement in some crypto PMD guides

The following crypto PMDs use the Intel Multi-buffer library:
- AESNI MB PMD
- AESNI GCM PMD
- ZUC PMD
- KASUMI PMD
- SNOW3G PMD

When this library is built with gcc < 5.0, it might throw
some compilation issues. A workaround has been added in the
repo of this library, so a note on this has been added
to the documentation of these PMDs.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
4 years agodoc: introduce OpenWrt how-to
Xiaolong Ye [Mon, 17 Feb 2020 02:47:03 +0000 (10:47 +0800)]
doc: introduce OpenWrt how-to

This doc describes how to enable DPDK on OpenWrt
in both virtual and physical x86 environment.

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
4 years agodoc: clarify memory write combining in mlx5 guide
Viacheslav Ovsiienko [Thu, 20 Feb 2020 12:44:37 +0000 (12:44 +0000)]
doc: clarify memory write combining in mlx5 guide

Just add the words about write combining attribute.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
4 years agodoc: rework VM power manager user guide
David Hunt [Mon, 17 Feb 2020 10:48:17 +0000 (10:48 +0000)]
doc: rework VM power manager user guide

Review and re-work of vm_power_manager documentation.
Hopefully this is clearer, easier to follow.

Signed-off-by: David Hunt <david.hunt@intel.com>
4 years agodoc: fix multi-producer enqueue figure in ring guide
Prateek Agarwal [Wed, 19 Feb 2020 21:05:30 +0000 (15:05 -0600)]
doc: fix multi-producer enqueue figure in ring guide

The producer head pointer in multi producer enqueue fig.6.10
points to incorrect object in the ring array.

Fixes: fc1f2750a3ec ("doc: programmers guide")
Cc: stable@dpdk.org
Signed-off-by: Prateek Agarwal <prateekag@cse.iitb.ac.in>
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
4 years agodoc: fix quiescent state description in RCU guide
Prateek Agarwal [Wed, 19 Feb 2020 21:05:29 +0000 (15:05 -0600)]
doc: fix quiescent state description in RCU guide

The quiescent state description refers to an incorrect
thread.

Fixes: 64994b56cfd7 ("rcu: add RCU library supporting QSBR mechanism")
Cc: stable@dpdk.org
Signed-off-by: Prateek Agarwal <prateekag@cse.iitb.ac.in>
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
4 years agodoc: fix devargs in OCTEON TX2 event device guide
Pavan Nikhilesh [Wed, 19 Feb 2020 06:55:11 +0000 (12:25 +0530)]
doc: fix devargs in OCTEON TX2 event device guide

Fix OCTEON TX2 event device devargs examples.

Fixes: 55e778ca4648 ("event/octeontx2: add devargs for inflight buffer count")
Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
4 years agoeal/windows: fix out-of-memory check in asprintf
Dmitry Kozlyuk [Mon, 17 Feb 2020 23:56:16 +0000 (02:56 +0300)]
eal/windows: fix out-of-memory check in asprintf

Check vsnprintf() result to prevent calling malloc() with negative size.
Check actual malloc() result and terminate asprintf() with documented
error code to prevent the use of NULL pointer.

Fixes: e8428a9d8 ("eal/windows: add some basic functions and macros")

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Ranjit Menon <ranjit.menon@intel.com>
4 years agokernel: remove unused directory for Windows
Thomas Monjalon [Mon, 17 Feb 2020 16:58:29 +0000 (17:58 +0100)]
kernel: remove unused directory for Windows

The netuio driver will be hosted in a separate repository:
http://git.dpdk.org/dpdk-kmods/

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Narcisa Vasile <navasile@microsoft.com>
4 years agobuild: fix experimental library versioning
Ferruh Yigit [Thu, 20 Feb 2020 19:54:53 +0000 (19:54 +0000)]
build: fix experimental library versioning

The problem occurred when workaround that makes soname two digits
applied. With this change for the ABI version "20.0.1" the experimental
library version become ".so.2001".
After workaround removed in ABI version 21.0, the experimental library
version will become ".so.210".
"2001" is bigger value than "201" although it is a previous version of
the library version, this can break the version comparisons.

To fix this, introducing a temporary sub level versioning for the
experimental libraries, so that minor version comparison will continue
to work.

After change experimental libraries will follow below versioning:

DPDK version  ABI version  soname       library name
------------  -----------  ------       ------------
DPDK 19.11     20.0        .so.0.200    .so.0.200
DPDK 20.02     20.0.1      .so.0.200.1  .so.0.200.1
DPDK 20.05     20.0.2      .so.0.200.2  .so.0.200.2
DPDK 20.11     21.0        .so.0.210    .so.0.210
DPDK 21.02     21.1        .so.0.211    .so.0.211

Note: After workaround removed in DPDK 20.11 and soname switch back to
single digit this patch won't work and needs to be updated.

Fixes: f26c2b39b271 ("build: fix soname info for 19.11 compatibility")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: Ray Kinsella <ray.kinsella@intel.com>
4 years agodevtools: skip experimental libraries in ABI check
David Marchand [Fri, 21 Feb 2020 15:42:53 +0000 (16:42 +0100)]
devtools: skip experimental libraries in ABI check

We don't provide ABI compatibility for experimental libraries.
Skip those libraries by catching a soname containing a version starting
with '0.'.

Align the special case for the glue libraries by using the soname too.
Once libabigail has support for it, we will have a single type of rule.

Fixes: 777014e56d07 ("devtools: add ABI checks")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
4 years agodoc: update thunderx driver guide
Harman Kalra [Fri, 7 Feb 2020 10:02:48 +0000 (15:32 +0530)]
doc: update thunderx driver guide

Updating the thunderx with loopback port support,
debugging options, new features added and correcting
some formatting issues.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
4 years agonet/mlx5: fix inline packet size for ConnectX-4 Lx
Viacheslav Ovsiienko [Thu, 20 Feb 2020 21:18:33 +0000 (21:18 +0000)]
net/mlx5: fix inline packet size for ConnectX-4 Lx

This patch does extra inline packet size check to tune
the ConnectX-4 Lx performance in the legacy Multi-Packet Write
mode.

Fixes: 7593cf1d3500 ("net/mlx5: fix legacy multi-packet write session")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agonet/mlx5: fix last completed built descriptor
Viacheslav Ovsiienko [Thu, 20 Feb 2020 21:17:47 +0000 (21:17 +0000)]
net/mlx5: fix last completed built descriptor

The routine sending packets with Multi-Packet Write method assigns
the wqe_last variable with transmit descriptor (WQE - work queue entry)
being built. If send queue is close to full state, the WQE has no data
yet (trying to put the first packet) and there is no enough space
in descriptor for the next packet the WQE is discarded and the stored
wqe_last value becomes invalid - points to the discarded WQE.

The mlx5_tx_burst_request_completion() routine might set the completion
request flags in the WQE pointed by wqe_last, it is safe, but the next
mlx5_tx_burst call uses the WQE as the first free one and request
completion flags might be overwritten and completion request will be
lost causing the transmit  datapath malfunction.

Fixes: 8b581c690a54 ("net/mlx5: move Tx complete request routine")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agoapp/testpmd: fix return of port list parser
Hariprasad Govindharajan [Thu, 20 Feb 2020 17:39:03 +0000 (17:39 +0000)]
app/testpmd: fix return of port list parser

The function parse_port_list() is designed to return
unsigned int value. After sanitizing the inputs,
it is returning -1. Changed it to return 0.

Fixes: 2df00d562d20 ("app/testpmd: add --portlist option")

Signed-off-by: Hariprasad Govindharajan <hariprasad.govindharajan@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet/mlx5: fix metadata split with encap action
Matan Azrad [Thu, 20 Feb 2020 14:43:30 +0000 (14:43 +0000)]
net/mlx5: fix metadata split with encap action

In order to move the mbuf metadata from the WQE to the FDB steering
domain, the PMD add for each NIC TX flow a new action to copy the
metadata register REG_A to REG_C_0.

This copy action is considered as modify header action from HW
perspective.

The HW doesn't support to do modify header action after ant
encapsulation action.

The split metadata function wrongly added the copy action in the end of
the original actions list, hence, NIC egress flow with encapsulation
action failed when the PMD worked with dv_xmeta_en mode.

Move the copy action to be before and back to back with the
encapsulation action for the aforementioned case.

Fixes: 71e254bc0294 ("net/mlx5: split Rx flows to provide metadata copy")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
4 years agonet/mlx5: fix running without Rx queue
Shiri Kuzin [Thu, 20 Feb 2020 14:42:26 +0000 (14:42 +0000)]
net/mlx5: fix running without Rx queue

When running mlx5_dev_start in mlx5_ethdev the function calls
mlx5_dev_configure_rss_reta in order to configure the rxq's.

Before mlx5_dev_configure_rss_reta there isn't a check whether
there are rxq's and if rxq's are 0 the function fails.
For example, this command:
/build/app/test-pmd/testpmd -n 4  -w 0000:08:00.0,rx_vec_en=0
-- --burst=64 --mbcache=512 -i  --nb-cores=27  --txd=2048 --rxd=2048
--vxlan-gpe-port=6081 --mp-alloc=xbuf --rxq 0 --forward-mode=txonly
would fail.

In order to fix this issue, we should call mlx5_dev_configure_rss_reta
only if we have rxq's.

Fixes: 63bd16292c3a ("net/mlx5: support RSS on hairpin")
Cc: stable@dpdk.org
Reported-by: Sylvain Rodon <srn@nexatech.fr>
Signed-off-by: Shiri Kuzin <shirik@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agonet/mlx5: fix match on ethertype and CVLAN tag
Dekel Peled [Thu, 20 Feb 2020 11:33:25 +0000 (13:33 +0200)]
net/mlx5: fix match on ethertype and CVLAN tag

HW supports match on one Ethertype, the Ethertype following the last
VLAN tag of the packet (see PRM).
Previous patch added specific handling for packets with VLAN tag,
after setting match on Ethertype.

This patch moves the handling of packets with VLAN tag, to be done
before and instead of setting match on Ethertype.

Previous patch also added, as part of specific handling for packets
with VLAN tag, the setting of cvlan_tag mask bit in translation of
L3 items.
In case of L3 tunnel there is no inner L2 header, so setting this
mask bit is wrong and causes match failures.

This patch adds check to make sure L2 header exists before setting
cvlan_tag mask bit for L3 items.

Fixes: 00f75a40576b ("net/mlx5: fix VLAN match for DV mode")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Tested-by: Raslan Darawsheh <rasland@mellanox.com>
4 years agonet/mlx5: fix VLAN actions in meter
Suanming Mou [Thu, 20 Feb 2020 07:45:44 +0000 (09:45 +0200)]
net/mlx5: fix VLAN actions in meter

Meter suffix subflow only has the port id and tag match item, if VLAN
push and set VLAN id actions exist in the suffix subflow, the user
defined VLAN items is required for the actions to set a correct VLAN
id.

Currently, the VLAN item stays in the meter prefix subflow. Without
the VLAN item, VLAN id or pcp will not be inherited.

Actions require the VLAN item as below:
RTE_FLOW_ACTION_TYPE_OF_PUSH_VLAN
RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_VID

Add a private VLAN item to copy the user defined VLAN item to the meter
suffix subflow, so the suffix subflow will have the chance to get the
correct original VLAN id and pcp value from the VLAN item.

Fixes: 9ea9b049a960 ("net/mlx5: split meter flow")
Cc: stable@dpdk.org
Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agonet/mlx5: fix match information in meter
Suanming Mou [Thu, 20 Feb 2020 13:53:44 +0000 (15:53 +0200)]
net/mlx5: fix match information in meter

As meter flows are split into three subflows each, the prefix subflow
with meter action color the packet, the meter subflow filters out the
colored packets, the suffix subflow applies all the remaining actions
to the passed packets.

Currently, all the user defined items are matched in the prefix flow.
Flow id tag match item is the only item added to the meter suffix
subflow. Some of the remaining actions to be applied in the suffix
subflow require more information in the match item, or the suffix
subflow will not be created successfully.

Actions require the L3/L4 type in the match items as below:
RTE_FLOW_ACTION_TYPE_SET_TP_SRC
RTE_FLOW_ACTION_TYPE_SET_TP_DST
RTE_FLOW_ACTION_TYPE_DEC_TTL
RTE_FLOW_ACTION_TYPE_SET_TTL
RTE_FLOW_ACTION_TYPE_RSS
RTE_FLOW_ACTION_TYPE_QUEUE

Inherit the match item flags from meter prefix subflow to make actions
in suffix subflow get sufficient information.

Fixes: 9ea9b049a960 ("net/mlx5: split meter flow")
Cc: stable@dpdk.org
Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agonet/mlx5: fix layer flags missing in metadata
Suanming Mou [Thu, 20 Feb 2020 13:53:43 +0000 (15:53 +0200)]
net/mlx5: fix layer flags missing in metadata

Metadata suffix subflow inherits the RSS needed hash_fields from the
prefix subflow as the suffix subflow only has the tag match item unable
to generate the full original hash_fields for RSS action.

Unfortunately, hash_fields will only be generated if flow has RSS
action. So it means the prefix flow won't generate the hash_fields as
the RSS action has been split to the suffix flow.

Copy the layer flags from prefix subflow to suffix subflow to help the
suffix subflow to generate the correct hash_fields itself.

Fixes: 71e254bc0294 ("net/mlx5: split Rx flows to provide metadata copy")
Cc: stable@dpdk.org
Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agonet/mlx5: fix layer type in header modify action
Suanming Mou [Wed, 19 Feb 2020 14:26:20 +0000 (16:26 +0200)]
net/mlx5: fix layer type in header modify action

Currently, for header modify actions after tunnel decapsulation, the
header modify actions will still select the old outermost layer type.
It will cause header modify actions get the wrong layer type.

Add the tunnel decap flag to indicate the layer type to get for header
modify actions.

Fixes: 4bb14c83df95 ("net/mlx5: support modify header using Direct Verbs")
Cc: stable@dpdk.org
Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agonet/mlx5: fix layer validation with decapsulation
Suanming Mou [Wed, 19 Feb 2020 14:26:19 +0000 (16:26 +0200)]
net/mlx5: fix layer validation with decapsulation

Currently, the flow validate function only validate the outermost layer
with the header modify actions. If there is decapsulation action before
the header modify action, the validation should choose the inner layer
for validation.

Add decapsulation check when validate with the header modify actions.
Choose the inner layer once there is decapsulation action.

Fixes: 4bb14c83df95 ("net/mlx5: support modify header using Direct Verbs")
Cc: stable@dpdk.org
Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agonet/mlx5: fix VLAN ID action offset
Suanming Mou [Wed, 19 Feb 2020 14:15:17 +0000 (16:15 +0200)]
net/mlx5: fix VLAN ID action offset

Currently, the set VLAN ID header modify action has already got the
action pointer with offset from the header modify action array, but
the configuration saves the detail to the memory of action with the
offset again. It causes double offset to set the VLAN ID action to
the wrong place in the header modify array.

Remove the offset when get the action pointer to fix that issue.

Fixes: 5f163d520cff ("net/mlx5: support modify VLAN ID on existing VLAN header")
Cc: stable@dpdk.org
Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agoapp/testpmd: fix identifier size for port attach
Wisam Jaddo [Wed, 19 Feb 2020 16:47:30 +0000 (18:47 +0200)]
app/testpmd: fix identifier size for port attach

Identifier for new port may contain white list options,
and white list options will not fit into 128 from STR_TOKEN_SIZE,
instead having 4096 char from STR_MULTI_TOKEN_SIZE will provide
better and more options

Fixes: edab33b1c01d ("app/testpmd: support port hotplug")
Cc: stable@dpdk.org
Signed-off-by: Wisam Jaddo <wisamm@mellanox.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
4 years agonet/bnxt: fix race condition when port is stopped
Kalesh AP [Thu, 20 Feb 2020 04:12:14 +0000 (09:42 +0530)]
net/bnxt: fix race condition when port is stopped

Fix a race condition between port stop and error recovery task. When io
forwarding is not started on Stingray devices, driver will not receive
the async event from FW when there is a FW reset. While exiting testpmd,
as part of port stop driver sees this event and this in turn causes a
race between port stop and error recovery task.

Fixed this by ignoring the fatal/non-fatal async event from FW while
stopping port.

Fixes: df6cd7c1f73a ("net/bnxt: handle reset notify async event from FW")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Rahul Gupta <rahul.gupta@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
4 years agonet/bnxt: fix crash in port stop while handling events
Kalesh AP [Thu, 20 Feb 2020 04:12:13 +0000 (09:42 +0530)]
net/bnxt: fix crash in port stop while handling events

Check for bp->hwrm_cmd_resp_addr before using it in HWRM_PREP to avoid
segmentation fault when stop port and meanwhile receive events from FW.

Fixes: df6cd7c1f73a ("net/bnxt: handle reset notify async event from FW")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
4 years agonet/ice: fix queue MSI-X interrupt binding
Tao Zhu [Wed, 19 Feb 2020 10:17:12 +0000 (18:17 +0800)]
net/ice: fix queue MSI-X interrupt binding

Operator '<<' should be used instead of '<' for shifting value to be
set in MSI-X configuration register.

Old code adds 1 on even MSI-X interrupt vector index used by queue,
resulting in interrupt mapping error.

Fixes: 65dfc889d86b ("net/ice: support Rx queue interruption")
Cc: stable@dpdk.org
Signed-off-by: Tao Zhu <taox.zhu@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agoexamples/tep_term: remove redundant info get
Xiaoyun Li [Mon, 17 Feb 2020 01:41:15 +0000 (09:41 +0800)]
examples/tep_term: remove redundant info get

Removed redundant function call of 'rte_eth_dev_info_get()' since it has
already been called earlier.

Coverity issue: 349922
Fixes: 2bb43bd4350a ("examples/tep_term: add TSO offload configuration")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agoci: reorganise Travis jobs
David Marchand [Wed, 19 Feb 2020 16:36:55 +0000 (17:36 +0100)]
ci: reorganise Travis jobs

Let's prune the jobs list to limit the amount of time spent by the robot
in Travis.

Since meson enables automatically the relevant components, there is not
much gain in testing with extra_packages vs required_packages.

For a given arch/compiler/env combination, compilation is first tested
in all jobs that run tests or build the docs or run the ABI checks.
In the same context, for jobs that accumulates running tests, building
the docs etc..., those steps are independent and can be split to save
some cpu on Travis.

With this, we go down from 21 to 15 jobs.

Note: this patch requires a flush of the existing caches in Travis.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Aaron Conole <aconole@redhat.com>
4 years agoci: use an explicit list of Travis jobs
David Marchand [Wed, 19 Feb 2020 15:19:52 +0000 (16:19 +0100)]
ci: use an explicit list of Travis jobs

Maintaining the .travis.yml requires some knowledge of how Travis
computes the jobs list (combination of os: arch: compiler: etc...).
Let's switch to an explicit list to find all jobs at a glance.

To enhance readability, jobs have been sorted per arch/compiler with
comments to isolate blocks.

Setting required_packages for aarch64 native jobs is unnecessary,
the global addons: values are the same.

This commit does not change the jobs list (21 jobs in total).

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Aaron Conole <aconole@redhat.com>
4 years agoci: fix Travis config warnings
David Marchand [Wed, 19 Feb 2020 09:38:03 +0000 (10:38 +0100)]
ci: fix Travis config warnings

Reading https://config.travis-ci.com/ and using
https://config.travis-ci.com/explore to check changes, we can cleanup
some warnings reported by the config validation options in Travis.

Example on a job in master:
https://travis-ci.com/DPDK/dpdk/builds/149537002/config

Build config validation:
root: deprecated key doc_packages (anchor on a non-private key)
root: deprecated key build_32b_packages (anchor on a non-private key)
root: deprecated key libabigail_build_packages (anchor on a non-private key)
root: deprecated key extra_packages (anchor on a non-private key)
root: deprecated key aarch64_packages (anchor on a non-private key)
root: key matrix is an alias for jobs, using jobs

For the "(anchor on a non-private key)" warnings, the Travis
documentation [1] recommends prefixing private keys with _ (Travis
schema is available at [2]).

The use of the "matrix" key is allowed, but it is just an alias to the
"jobs" key.

1: https://docs.travis-ci.com/user/build-config-yaml#private-keys-as-yaml-anchors-and-aliases-and-external-tooling
2: https://github.com/travis-ci/travis-yml/blob/730a77f4028b91293a55c8c1c52fc72e64379dde/schema.json

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
4 years agoci: remove unnecessary dependency on Linux headers
David Marchand [Wed, 19 Feb 2020 15:17:57 +0000 (16:17 +0100)]
ci: remove unnecessary dependency on Linux headers

Following removal of kmod compilation, we don't need to install
linux-headers anymore.

Fixes: ea860973592b ("ci: remove redundant configs disabling kmods")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Aaron Conole <aconole@redhat.com>
4 years agonet/fm10k: fix non-x86 build
Ferruh Yigit [Wed, 19 Feb 2020 14:16:42 +0000 (14:16 +0000)]
net/fm10k: fix non-x86 build

'fm10k_rxtx_vec.c' is SSE vector instructions implementation and should
be compiled only for x86.

The vector PMD support controlled by
'CONFIG_RTE_LIBRTE_FM10K_INC_VECTOR' config option, but it is enabled by
default, safer to add x86 checks too.

Fixes: 10eb9ce8dccd ("fm10k: allow to disable vector driver")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Xiao Wang <xiao.w.wang@intel.com>
4 years agonet/sfc: fix log format specifiers
Ferruh Yigit [Wed, 19 Feb 2020 14:04:57 +0000 (14:04 +0000)]
net/sfc: fix log format specifiers

The format specifier for the 'size_t' format should be '%z'.

Also this fix enables compiling PMD for 32bit architecture.

Fixes: ba641f207642 ("net/sfc: add init on attach")
Fixes: 82faef507608 ("net/sfc: set RSS key and hash types config")
Fixes: 7803554a9e38 ("net/sfc: process RSS settings on Rx configure step")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
4 years agonet/mlx5: fix L3 VXLAN RSS expansion
Matan Azrad [Wed, 19 Feb 2020 08:29:36 +0000 (08:29 +0000)]
net/mlx5: fix L3 VXLAN RSS expansion

The RSS expansion feature was introduced to split RSS flows according to
the adjustment between the RSS types and the flow items.

The expansion function gets an item tree for the above adjustment from
the caller which reflects the HW needs.

The standard vxlan header next protocol is always Ethernet while there
are some Mellanox customers who use their own method to allow L3
headers after the vxlan tunnel header.

The expansion tree of mlx5 PMD didn't expect to get L3 headers after the
vxlan header what caused a failure in flow creation when inner RSS is
requested on L3 after vxlan flow.

Add IPV4 and IPV6 as optional headers after vxlan in the RSS expansion
tree to allow L3 tunnel support for vxlan.

Fixes: f4f06e361516 ("net/mlx5: add flow VXLAN item")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
4 years agonet/mlx5: fix hairpin queue capacity
Bing Zhao [Wed, 19 Feb 2020 08:28:39 +0000 (16:28 +0800)]
net/mlx5: fix hairpin queue capacity

The hairpin TX/RX queue depth and packet size is fixed in the past.
When the firmware has some fix or improvement, the PMD will not
make full use of it. And also, 32 packets for a single queue will not
guarantee a good performance for hairpin flows. It will make the
stride size larger and for small packets, it is a waste of memory.
The recommended stride size is 64B now.

The parameter of hairpin queue setup needs to be adjusted.
1. A proper buffer size should support the standard jumbo frame with
9KB, and also more than 1 jumbo frame packet for performance.
2. Number of packets of a single queue should be the maximum
supported value (total buffer size / stride size).

There is no need to support the max capacity of total buffer size
because the memory consumption should also be taken into
consideration.

Fixes: e79c9be91515 ("net/mlx5: support Rx hairpin queues")
Cc: stable@dpdk.org
Signed-off-by: Bing Zhao <bingz@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
4 years agoapp/testpmd: guarantee port array access in range
Ferruh Yigit [Wed, 19 Feb 2020 12:40:03 +0000 (12:40 +0000)]
app/testpmd: guarantee port array access in range

Coverity complains about out of bound access, which is a false positive.

The return value of the 'parse_port_list()' can't be bigger than
'maxsize' because of the logic in the function. ('value >= (int)maxsize'
check and 'marked[]' usage.)

But this is not explicitly clear, causing coverity warning and same
question can be rise by reviews later.

Adding a redundant check to highlight the access is in range, this is
done by replacing existing redundant check.

This is also good to protect against out out bound access in case
'parse_port_list()' behaviour changes later unexpectedly.

Coverity issue: 354229
Fixes: 2df00d562d20 ("app/testpmd: add --portlist option")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
4 years agonet/mlx5: fix GENEVE tunnel flow validation
Matan Azrad [Wed, 19 Feb 2020 06:52:11 +0000 (06:52 +0000)]
net/mlx5: fix GENEVE tunnel flow validation

The new Mellanox devices support GENEVE tunnel stateless offloads by
native HW parsers, FW doesn't need to configure flex parser to support
it.

The FW capability for GENEVE flex parser is not set for the above
devices, hence the GENEVE flow validation failed for them.

Remove the flex parser validation for GENEVE, stay only with the direct
FW capability for GENEVE support.

Fixes: e59a5dbcfd07 ("net/mlx5: add flow match on GENEVE item")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
4 years agonet/mlx5: fix flow match on GRE key
Matan Azrad [Tue, 18 Feb 2020 14:45:20 +0000 (14:45 +0000)]
net/mlx5: fix flow match on GRE key

The RTE_FLOW_ITEM_TYPE_GRE_KEY means that GRE key should
be present on the flow and in addition can explicitly match on the GRE
key field itself.

When no value is set in this item any GRE key should match the flow.

The match on GRE key wrongly was not added if the item fields are NULL
while at least the GRE key should be present in the flow.

Add the GRE key present match when RTE_FLOW_ITEM_TYPE_GRE_KEY is in
the flow item list.

Fixes: a7a0365565a4 ("net/mlx5: match GRE key and present bits")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
4 years agonet/mlx5: fix ICMPv6 header rewrite action validation
Shiri Kuzin [Tue, 18 Feb 2020 11:52:54 +0000 (13:52 +0200)]
net/mlx5: fix ICMPv6 header rewrite action validation

ICMPv6 header contains the checksum field, that includes the IP
addresses from IP header.

The ConnectX-5 hardware does not support ICMPv6 checksum calculation
and in case of IP header modification the checksum will contain
the wrong value.

The patch rejects the header modification actions related to IP
addresses if ICMPv6 protocol is detected in pattern.
This issue was also partly fixed in commit below which rejects
flows with the pattern "ipv6 proto is 58".

Fixes: 0e2ceb639d8a ("net/mlx5: fix ICMPv6 header rewrite actions")
Cc: stable@dpdk.org
Signed-off-by: Shiri Kuzin <shirik@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agonet/ionic: fix ABI version
Ferruh Yigit [Mon, 17 Feb 2020 16:13:03 +0000 (16:13 +0000)]
net/ionic: fix ABI version

Changed the ABI version to 20.0.1.

Fixes: a72cf98cc93e ("net/ionic: add skeleton")

Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agodoc: add module EEPROM dump to mlx5 features
Thomas Monjalon [Wed, 19 Feb 2020 10:11:25 +0000 (11:11 +0100)]
doc: add module EEPROM dump to mlx5 features

The dev_ops .get_module_info and .get_module_eeprom
were implemented in mlx5 in DPDK 19.11.

Fixes: 8a6a09f853a0 ("net/mlx5: support reading module EEPROM data")
Cc: stable@dpdk.org
Reported-by: Gal Cohen <galco@mellanox.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
4 years agodoc: update MTU limitations in AF_XDP guide
Ciara Loftus [Tue, 18 Feb 2020 14:03:59 +0000 (14:03 +0000)]
doc: update MTU limitations in AF_XDP guide

Explain how kernel driver RX buffer sizes affect the maximum
MTU size in practice.

Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agonet/vhost: prevent multiple setups on reconfiguration
Maxime Coquelin [Tue, 18 Feb 2020 17:22:40 +0000 (18:22 +0100)]
net/vhost: prevent multiple setups on reconfiguration

Ethdev's .dev_configure callback can be called multiple
time during a device life-time, but Vhost makes the
wrong assumption that it is not the case and try to
setup again the device on reconfiguration.

This patch ensures the device hasn't been already setup
before proceeding.

Fixes: 3d01b759d267 ("net/vhost: delay driver setup")
Cc: stable@dpdk.org
Reported-by: Yinan Wang <yinan.wang@intel.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Tested-by: Yinan Wang <yinan.wang@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
4 years agonet/vhost: fix setup error path
Maxime Coquelin [Tue, 18 Feb 2020 17:22:39 +0000 (18:22 +0100)]
net/vhost: fix setup error path

If for some reason vhost_driver_setup() fails, the list
element for the device may be freed without being removed
from the internal list of devices.

This patch fixes all the error paths, by unregistering the
device from Vhost library it has been registered, remove
the device from the list, reset device vring_state pointer
from the global table and only free vring state if it had
been allocated.

Fixes: 3d01b759d267 ("net/vhost: delay driver setup")
Cc: stable@dpdk.org
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
4 years agovdpa/mlx5: fix completion queue arming
Matan Azrad [Tue, 18 Feb 2020 12:25:21 +0000 (12:25 +0000)]
vdpa/mlx5: fix completion queue arming

The mlx5 vDPA driver manages QP and CQ in order to forward the HW event
to the guest by the callfd file descriptor for each virtq.

The driver arms the CQ for the next CQE index that should be
completed by the HW in order to create completion event.

In the SW completion event handler, the driver arms the CQ again for the
next index,

The CQE index in the CQ doorbell and in the CQ doorbell record was
masked incorrectly with the CQ size mask while it should be masked only
with 0xFFFFFF mask.

Remove the CQ size mask, stay only with 0xFFFFFF mask.

Fixes: 8395927cdfaf ("vdpa/mlx5: prepare HW queues")

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
4 years agonet/ixgbe: fix flow control mode setting
Guinan Sun [Tue, 18 Feb 2020 03:39:31 +0000 (03:39 +0000)]
net/ixgbe: fix flow control mode setting

When the port restarts, the flow ctrl register will be reset,
we need to make sure it can be configured the same as previous setting,
otherwise a register read error would occur. This patch fixes this
issue.

Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Tested-by: Tomasz Konieczny <tomaszx.konieczny@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agonet/i40e: fix multiple interrupts for VF
Shougang Wang [Mon, 17 Feb 2020 03:09:35 +0000 (03:09 +0000)]
net/i40e: fix multiple interrupts for VF

Interrupt mapping should be 1:n queue(s).This patch fixes the
logic of interrupt bind by code reconstruction.

Fixes: 6a6cf5f88b4a ("net/i40e: enable multi-queue Rx interrupt for VF")

Signed-off-by: Shougang Wang <shougangx.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agoethdev: add comment to warn of ABI breakage
Ciara Power [Tue, 18 Feb 2020 13:39:44 +0000 (13:39 +0000)]
ethdev: add comment to warn of ABI breakage

If a function is added to the eth_dev_ops struct before
tx_descriptor_status function, this will cause ABI breakage. This is due
to static inline functions using this function, and some other functions
above it in the struct, so they cannot change position. A comment is
added to inform developers of this possible breakage.

Signed-off-by: Ciara Power <ciara.power@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
4 years agonet/mlx5: fix matching for ICMP fragments
Bing Zhao [Mon, 17 Feb 2020 14:10:55 +0000 (22:10 +0800)]
net/mlx5: fix matching for ICMP fragments

The hardware can recognize and mark the layer 4 protocol type for TCP,
UDP and IPSec non-fragmented packets. For all the fragmented packets,
L4 type will be considered as None. This can be used when creating a
flow with L4 matching, then hops number will be reduced and a better
performance could be gained.

But for ICMP packets, it cannot be recognized correctly because it is
not a L4 protocol in the stack, even if the packet format is similar.

All the fragmented and non-fragmented ICMP will have the None L4 type.
Fragmented packets with incomplete headers could not hit the flow,
even for the first fragment. Because then it will make it complex to
defragment for both HW and SW. For other types, the implicit rules
could be used directly and all the fragments will miss the flow.

For ICMP packets, this should be done explicitly because all packets
have None type. The first fragment will still hit the flow if there is
no explicit rule.

All ICMP fragments will still hit the rules like ETH, ETH + IP, and
ETH + IP + "ICMP protocol" only since they are wildcard rules, and
there is no next layer protocol specified field in such rules.

Fixes: d53aa89aea91 ("net/mlx5: support matching on ICMP/ICMP6")
Cc: stable@dpdk.org
Signed-off-by: Bing Zhao <bingz@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
4 years agonet/mlx5: add BlueField-2 device ID
Raslan Darawsheh [Thu, 13 Feb 2020 16:11:42 +0000 (18:11 +0200)]
net/mlx5: add BlueField-2 device ID

This adds new device id to the list of Mellanox devices
that runs mlx5 PMD.
- BlueField-2 integrated ConnectX-6 Dx network controller

This device is not ready yet, it is in development stage.

Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agonet/mlx5: fix tunnel flow priority
Matan Azrad [Thu, 13 Feb 2020 13:03:25 +0000 (13:03 +0000)]
net/mlx5: fix tunnel flow priority

The PMD manages internally the priority of the flows in addition to the
user configured priority.

So, 2 flows with the same user priority may get different priority.

The method:
As much as the flow is more specific it gets higher priority
(higher means first to be matched).

In addition, When the user creates a RSS flow the PMD splits the flows
according to the flow RSS layers as the HW requests for RSS TIR.
The internal priority for each flow is decided by the flow last layer.
L2, L3 and L4 (L2 low and L4 high).

The tunnel layer was wrongly decided to be L4 all the time, even when
the flow is configured with inner-RSS.

Hence, the first RSS split which takes the tunnel layer priority all the
time will be matched before the more specific splits.

Change the priority of tunnel layer to be L2 when inner-RSS is
configured.

Fixes: d4a405186b73 ("net/mlx5: support tunnel RSS level")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
4 years agodoc: add tested Intel platforms with Intel NICs
Bo Chen [Tue, 18 Feb 2020 06:51:58 +0000 (14:51 +0800)]
doc: add tested Intel platforms with Intel NICs

Add tested Intel platforms with Intel NICs to v20.02 release note.

Signed-off-by: Bo Chen <box.c.chen@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agodoc: update driver/firmware versions in i40e guide
Zhaoyan Chen [Tue, 18 Feb 2020 06:52:35 +0000 (14:52 +0800)]
doc: update driver/firmware versions in i40e guide

Update driver/firmware version mapping table for new driver/firmware
supported in 20.02 release.

Signed-off-by: Zhaoyan Chen <zhaoyan.chen@intel.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agodoc: add inline protocol in features list
Anoob Joseph [Mon, 17 Feb 2020 15:39:43 +0000 (21:09 +0530)]
doc: add inline protocol in features list

Update feature list to include inline protocol offload.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
4 years agonet/ixgbe: check for illegal Tx packets
Xiao Zhang [Mon, 17 Feb 2020 14:51:15 +0000 (22:51 +0800)]
net/ixgbe: check for illegal Tx packets

For ixgbe, there is restriction that data buffers of any transmitted
packet must include at least 12 bytes of the src/dst Ethernet MAC
addresses as well as 2 bytes of the Type/Len field, otherwise, tx hang
would happen.

This patch adds check for those illegal packets and protects TX from
hanging.

Fixes: 7829b8d52be0 ("net/ixgbe: add Tx preparation")
Cc: stable@dpdk.org
Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agonet/octeontx2: fix PTP
Harman Kalra [Sat, 15 Feb 2020 08:35:03 +0000 (14:05 +0530)]
net/octeontx2: fix PTP

PTP functionality has been broken after a change in kernel
where enum npc_kpu_lc_ltype is change to allow adjustment of
LTYPE_MASK to detect all types of IP headers.
Syncing the required changes in DPDK to fix the issue.

The kernel side changes available in marvell SDK version SDK-10.3.2.x.

Fixes: b5dc3140448e ("net/octeontx2: support base PTP")
Cc: stable@dpdk.org
Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
4 years agonet/qede: do not stop vport if not started
Manish Chopra [Thu, 6 Feb 2020 20:01:46 +0000 (12:01 -0800)]
net/qede: do not stop vport if not started

Stopping an already disabled vport leads to firmware
assert. Stop the vport only if it was started.

Fixes: 2ea6f76aff40 ("qede: add core driver")
Cc: stable@dpdk.org
Signed-off-by: Manish Chopra <manishc@marvell.com>
Signed-off-by: Rasesh Mody <rmody@marvell.com>
4 years agonet/qede: fix VF reload
Manish Chopra [Thu, 6 Feb 2020 20:01:45 +0000 (12:01 -0800)]
net/qede: fix VF reload

On ungraceful termination of DPDK application, PMD VF driver
fails to re-load due to PF seeing the VF in unexpected state
during VF acquisition handshake.

This patch fixes it by allowing VF to request the PF for soft
FLR during the load in such cases so that it can get cleanly
re-loaded.

Fixes: 2ea6f76aff40 ("qede: add core driver")
Cc: stable@dpdk.org
Signed-off-by: Manish Chopra <manishc@marvell.com>
Signed-off-by: Shahed Shaikh <shshaikh@marvell.com>
Signed-off-by: Rasesh Mody <rmody@marvell.com>
Acked-by: Rasesh Mody <rmody@marvell.com>
4 years agonet/ixgbe: fix blocking system events
Tao Zhu [Wed, 15 Jan 2020 19:38:48 +0000 (19:38 +0000)]
net/ixgbe: fix blocking system events

IXGBE link status task uses rte alarm thread in old implementation.
Sometime ixgbe link status task takes up to 9 seconds. This will
severely affect the rte-alarm-thread dependent tasks in the
system, like interrupt or hotplug event. So replace with an
independent thread which has the same thread affinity settings
as rte interrupt.

Fixes: 0408f47ba4d6 ("net/ixgbe: fix busy polling while fiber link update")
Cc: stable@dpdk.org
Signed-off-by: Tao Zhu <taox.zhu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
4 years agoexamples/fips_validation: fix string token for CT length
Anoob Joseph [Tue, 18 Feb 2020 10:31:12 +0000 (16:01 +0530)]
examples/fips_validation: fix string token for CT length

The NIST test vectors use the string 'PTlen' to denote text lengths
in case of encrypt & decrypt operations. So the same string needs to be
used while parsing PT and CT.

Fixes: 2adb3b4e7e54 ("examples/fips_validation: fix AES-GCM cipher length parsing")

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
4 years agoexamples/ipsec-secgw: extend inline session to non AES-GCM
Ankur Dwivedi [Fri, 14 Feb 2020 06:38:18 +0000 (12:08 +0530)]
examples/ipsec-secgw: extend inline session to non AES-GCM

This patch extends creation of inline session to all the algorithms.
Previously the inline session was enabled only for AES-GCM cipher.

Fixes: 3a690d5a65e2 ("examples/ipsec-secgw: fix first packet with inline crypto")
Cc: stable@dpdk.org
Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
4 years agoipsec: fix use of uninitialized variable
Konstantin Ananyev [Wed, 19 Feb 2020 00:23:02 +0000 (00:23 +0000)]
ipsec: fix use of uninitialized variable

Defects reported by coverity scan
uninit_use_in_call: Using uninitialized element of array clen when
calling cpu_crypto_bulk.

Coverity issue: 354233, 354234
Fixes: 957394f72658 ("ipsec: support CPU crypto mode")

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
4 years agotest/ipsec: fix a typo in function name
Thomas Monjalon [Wed, 19 Feb 2020 11:26:50 +0000 (12:26 +0100)]
test/ipsec: fix a typo in function name

The name of the static function check_cryptodev_capablity()
is fixed for the word "capability".
There is no functional change.

The same typo is fixed in a comment in ip_fragmentation example.

Fixes: 05fe65eb66b2 ("test/ipsec: introduce functional test")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
4 years agoapp/crypto-perf: use common macros for min/max
Thomas Monjalon [Wed, 19 Feb 2020 10:38:48 +0000 (11:38 +0100)]
app/crypto-perf: use common macros for min/max

The macros RTE_MIN and RTE_MAX can be used in DPDK applications.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
4 years agoci: enable more drivers in Travis builds
Thomas Monjalon [Tue, 18 Feb 2020 21:20:05 +0000 (22:20 +0100)]
ci: enable more drivers in Travis builds

The Travis compilation is missing some dependencies to build all PMDs.
More PMDs are enabled in Travis which runs Ubuntu Bionic Beaver (18.04):
- ipn3ke (libfdt)
- mlx (libibverbs)
The next Ubuntu LTS, Focal Fossa (20.04) will allow to support more:
- af_xdp (libbpf)
- Intel crypto (libipsec-mb 0.53)

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Aaron Conole <aconole@redhat.com>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agoci: remove redundant configs disabling kmods
Thomas Monjalon [Tue, 18 Feb 2020 21:20:04 +0000 (22:20 +0100)]
ci: remove redundant configs disabling kmods

The kernel modules are not built by default since below commit.
The Travis CI matrix can be simplified
by removing the redundant option enable_kmods=false,
and by removing some jobs which are redundant.

Note: there is no benefit in checking kmods in Travis Ubuntu.
Anyway different kernel versions and distributions are needed,
and the Technical Board is looking at moving the Linux kmods
out of this repository.

Fixes: 91a861e54164 ("config: disable Linux kernel modules by default")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Aaron Conole <aconole@redhat.com>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agoci: build and use libabigail 1.6
David Marchand [Tue, 18 Feb 2020 20:13:54 +0000 (21:13 +0100)]
ci: build and use libabigail 1.6

libabigail 1.2 (at least) reports changes in 'const' property as an ABI
breakage [1].
This was fixed upstream in libabigail 1.4 [2], and a bug has been opened
in launchpad [3].

But for now, build and use the last version 1.6 so that the ABI checks
can be kept.

1: https://travis-ci.com/DPDK/dpdk/jobs/287872118#L2242
2: https://sourceware.org/git/gitweb.cgi?p=libabigail.git;a=commitdiff;h=215b7eb4fe8b
3: https://bugs.launchpad.net/ubuntu/+source/libabigail/+bug/1863607

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Aaron Conole <aconole@redhat.com>
4 years agomempool/octeontx2: fix build
Tao Zhu [Mon, 17 Feb 2020 16:43:45 +0000 (16:43 +0000)]
mempool/octeontx2: fix build

Change the definition of C99 style to C90 style.
compile log as below:

otx2_mempool_ops.c: In function ‘otx2_npa_populate’:
drivers/mempool/octeontx2/otx2_mempool_ops.c:790:2: error:
‘for’ loop initial declarations are only allowed in C99 mode
  for (int i = 0; i < OTX2_L1D_NB_SETS; i++)
  ^
drivers/mempool/octeontx2/otx2_mempool_ops.c:790:2:
note: use option -std=c99 or -std=gnu99 to compile your code

Fixes: 9ed8e95c ("mempool/octeontx2: optimize for L1D cache architecture")

Signed-off-by: Tao Zhu <taox.zhu@intel.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
4 years agoversion: 20.02-rc3
Thomas Monjalon [Sun, 16 Feb 2020 21:28:51 +0000 (22:28 +0100)]
version: 20.02-rc3

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
4 years agousertools: fix telemetry client with python 3
Ciara Power [Tue, 21 Jan 2020 17:03:10 +0000 (17:03 +0000)]
usertools: fix telemetry client with python 3

The client script for use with the telemetry library did not support
Python3, as the data being sent over the socket was in string format.
Python3 requires the data be explicitly converted to bytes before being
sent. Similarly, the received bytes need to be decoded into string
format.

Fixes: 53f293c9a783 ("usertools: replace unsafe input function")
Fixes: fe35622659ed ("usertools: fix telemetry client with python 3")
Fixes: d1b94da4a4e0 ("usertools: add client script for telemetry")
Fixes: 4080e46c8078 ("telemetry: support global metrics")
Cc: stable@dpdk.org
Signed-off-by: Ciara Power <ciara.power@intel.com>
Reviewed-by: Robin Jarry <robin.jarry@6wind.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
4 years agousertools: fix syntax warning in python 3.8
Thomas Faivre [Wed, 12 Feb 2020 12:31:56 +0000 (13:31 +0100)]
usertools: fix syntax warning in python 3.8

Silent the following warning when running script with python 3.8:

> /usr/bin/dpdk-pmdinfo:542: SyntaxWarning: "is" with a literal.
> Did you mean "=="?
>   if (autoload_path is None or autoload_path is ""):

As autoload_path can only be None or a string, directly check its bool
value.

Fixes: c67c9a5c646a ("tools: query binaries for HW and other support information")
Cc: stable@dpdk.org
Signed-off-by: Thomas Faivre <thomas.faivre@6wind.com>
4 years agomempool/octeontx2: optimize for L1D cache architecture
Pavan Nikhilesh [Fri, 31 Jan 2020 17:23:36 +0000 (22:53 +0530)]
mempool/octeontx2: optimize for L1D cache architecture

OCTEON TX2 has 8 sets, 41 ways L1D cache, VA<9:7> bits dictate
the set selection.
Add additional padding to ensure that the element size always
occupies odd number of cachelines to ensure even distribution
of elements among L1D cache sets.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
4 years agoexamples/l3fwd: improve destination lookup readability
Stephen Hemminger [Sun, 26 Jan 2020 01:09:11 +0000 (17:09 -0800)]
examples/l3fwd: improve destination lookup readability

The functions to lookup IPv4 and IPv6 were both using opaque
pointers (void *) when they should use a typed pointer instead.
The IP headers are not modified during lookup.

Get rid of unnecessary cast on the return from the function.
Replace complex trigraph expression with simple if to improve
readability.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
4 years agoexamples/l3fwd: make route array constant
Stephen Hemminger [Sun, 26 Jan 2020 01:09:10 +0000 (17:09 -0800)]
examples/l3fwd: make route array constant

The initial route setup array is unmodified by the lpm code
and can be made constant. This depends on earlier patch to
fix the rte_lpm6 to use const.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
4 years agoexamples/l3fwd: make lookup struct static
Stephen Hemminger [Sun, 26 Jan 2020 01:09:09 +0000 (17:09 -0800)]
examples/l3fwd: make lookup struct static

The lookup structure is only used in the lpm code and does
not have to be global.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
4 years agolpm6: make IPv6 address immutable
Stephen Hemminger [Sun, 26 Jan 2020 01:09:07 +0000 (17:09 -0800)]
lpm6: make IPv6 address immutable

Both the table setup and lookup do no modify their arguments.
Therefore the parameter should be constant.

This is not actually an API breakage since programs can be
recompiled without change. This is not an ABI breakage because
old programs will still run.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>