dpdk.git
5 years agomem: mark unused function in 32-bit builds
Bruce Richardson [Tue, 28 May 2019 11:07:47 +0000 (12:07 +0100)]
mem: mark unused function in 32-bit builds

The get_socket_mem_size() function is only used in 64-bit builds,
causing clang to warn about it for 32-bit builds. Add the __rte_unused
attribute to the function to silence the warning.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
5 years agobuild: remove unnecessary large file support defines
Bruce Richardson [Tue, 28 May 2019 11:07:46 +0000 (12:07 +0100)]
build: remove unnecessary large file support defines

Since we now always use _FILE_OFFSET_BITS=64 flag when building
DPDK, we can remove the Makefile and C-file #defines setting it
individually for parts of the build.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
5 years agobuild: enable large file support on 32-bit
Bruce Richardson [Tue, 28 May 2019 11:07:45 +0000 (12:07 +0100)]
build: enable large file support on 32-bit

By default on 32-bit systems, file offsets are given as 32-bit values
which prevents support for large files. While this is unlikely to be
a problem, enabling large file support globally makes "make" and
"meson" builds consistent, since meson always enables large file
support, and without this change, the size of "struct stat" fields
will be different between the two builds.

The only location where this appears to be significant is in the
dpaax common code, where a printf needs to be updated for 32-bit
builds.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
5 years agonet/nfp: disable for 32-bit meson builds
Bruce Richardson [Tue, 28 May 2019 11:07:44 +0000 (12:07 +0100)]
net/nfp: disable for 32-bit meson builds

From comment in the build config for the make build-system:

 "NFP PMD is not supported on 32-bit"

Therefore disable NFP for 32-bit meson builds as well as for 32-bit
make ones.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
5 years agonet: replace IPv4/v6 constants with uppercase name
David Marchand [Wed, 29 May 2019 11:29:16 +0000 (13:29 +0200)]
net: replace IPv4/v6 constants with uppercase name

Since we change these macros, we might as well avoid triggering complaints
from checkpatch because of mixed case.

old=RTE_IPv4
new=RTE_IPV4
git grep -lw $old | xargs sed -i -e "s/\<$old\>/$new/g"

old=RTE_ETHER_TYPE_IPv4
new=RTE_ETHER_TYPE_IPV4
git grep -lw $old | xargs sed -i -e "s/\<$old\>/$new/g"

old=RTE_ETHER_TYPE_IPv6
new=RTE_ETHER_TYPE_IPV6
git grep -lw $old | xargs sed -i -e "s/\<$old\>/$new/g"

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
5 years agonet/tap: revert rte prefixing
David Marchand [Wed, 29 May 2019 11:29:15 +0000 (13:29 +0200)]
net/tap: revert rte prefixing

This source is compiled as a bpf program out of dpdk.
Revert to structures/macros coming from libc.

Fixes: 6d13ea8e8e49 ("net: add rte prefix to ether structures")
Fixes: 24ac604ef746 ("net: add rte prefix to IP defines")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
5 years agotest/table: remove duplicate macro
David Marchand [Wed, 29 May 2019 11:29:14 +0000 (13:29 +0200)]
test/table: remove duplicate macro

No need for this macro here, take it from librte_net.

Fixes: 24ac604ef746 ("net: add rte prefix to IP defines")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
5 years agotest: use lcore accessors
Stephen Hemminger [Fri, 31 May 2019 15:37:02 +0000 (17:37 +0200)]
test: use lcore accessors

Don't refer to lcore_config directly.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David Marchand <david.marchand@redhat.com>
5 years agoexamples/bond: use lcore accessors
Stephen Hemminger [Fri, 31 May 2019 15:37:01 +0000 (17:37 +0200)]
examples/bond: use lcore accessors

Referring to lcore_config directly is no longer recommended.
Also remove unnecessary assignment of slave_core_id.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David Marchand <david.marchand@redhat.com>
5 years agodrivers/bus: use lcore accessors
Stephen Hemminger [Fri, 31 May 2019 15:37:00 +0000 (17:37 +0200)]
drivers/bus: use lcore accessors

The lcore_config structure will be hidden in future release.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David Marchand <david.marchand@redhat.com>
5 years agoeal: add lcore accessors
Stephen Hemminger [Fri, 31 May 2019 15:36:59 +0000 (17:36 +0200)]
eal: add lcore accessors

The fields of the internal EAL core configuration are currently
laid bare as part of the API. This is not good practice and limits
fixing issues with layout and sizes.

Make new accessor functions for the fields used by current drivers
and examples.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David Marchand <david.marchand@redhat.com>
5 years agoeal: use unsigned int in lcore API prototypes
Stephen Hemminger [Fri, 31 May 2019 15:36:58 +0000 (17:36 +0200)]
eal: use unsigned int in lcore API prototypes

Purely cosmetic change, use unsigned int instead of unsigned alone.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David Marchand <david.marchand@redhat.com>
5 years agotest/rcu: use existing lcore API
David Marchand [Wed, 22 May 2019 15:06:57 +0000 (17:06 +0200)]
test/rcu: use existing lcore API

Prefer the existing apis rather than direct access lcore_config that is
going to disappear.

Fixes: b87089b0bb19 ("test/rcu: add API and functional tests")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
5 years agotest/hash: use existing lcore API
David Marchand [Wed, 22 May 2019 15:06:56 +0000 (17:06 +0200)]
test/hash: use existing lcore API

Prefer the existing apis rather than direct access the configuration
structure.

test_hash_multi_add_lookup() currently starts n readers and N writers
using rte_eal_remote_launch().
It then waits for the N writers to complete with a custom
multi_writer_done[] array to synchronise over.
Jump on the occasion to use rte_eal_wait_lcore() so that the code is
more straightforward:
- we start n readers with rte_eal_remote_launch(),
- we start N writers with rte_eal_remote_launch(),
- we wait for N writers to join with rte_eal_wait_lcore(),
- we wait for n readers to join with rte_eal_wait_lcore(),

Fixes: c7eb0972e74b ("test/hash: add lock-free r/w concurrency")
Fixes: 3f9aab961ed3 ("test/hash: check lock-free extendable bucket")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
5 years agoexamples/qos_sched: do not dereference global config struct
David Marchand [Wed, 15 May 2019 07:54:22 +0000 (09:54 +0200)]
examples/qos_sched: do not dereference global config struct

Prefer the existing apis rather than direct access the configuration
structure.

Fixes: de3cfa2c9823 ("sched: initial import")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
5 years agoexamples/multi_process: do not dereference global config struct
David Marchand [Wed, 15 May 2019 07:54:21 +0000 (09:54 +0200)]
examples/multi_process: do not dereference global config struct

Prefer the existing apis rather than direct access the configuration
structure.

Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
5 years agonet/softnic: do not dereference global config struct
David Marchand [Wed, 15 May 2019 07:54:20 +0000 (09:54 +0200)]
net/softnic: do not dereference global config struct

Prefer the existing apis rather than direct access the configuration
structure.

Fixes: a958a5c07f4b ("net/softnic: support service cores")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
5 years agonet/cxgbe: do not dereference global config struct
David Marchand [Wed, 15 May 2019 07:54:19 +0000 (09:54 +0200)]
net/cxgbe: do not dereference global config struct

Prefer the existing apis rather than direct access the configuration
structure.

Fixes: 92c8a63223e5 ("cxgbe: add device configuration and Rx support")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
5 years agokernel/linux: remove unneeded meson variables
Bruce Richardson [Fri, 17 May 2019 13:45:29 +0000 (14:45 +0100)]
kernel/linux: remove unneeded meson variables

The local variables for the error message aren't needed, since the messages
aren't used more than once, and the indent levels are now such that the
lines printing the message are not much longer than the lines defining the
variables to hold the messages themselves. Therefore the use of the
variables is pointless.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
5 years agokernel/linux: reduce unneeded indents in meson file
Bruce Richardson [Fri, 17 May 2019 13:45:28 +0000 (14:45 +0100)]
kernel/linux: reduce unneeded indents in meson file

Since meson 0.46, meson has supported the subdir_done() function, which
allows us to abort processing of a file early. Using this we can reduce the
indentation in our files by eliminating unnecessary else blocks.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
5 years agokernel/linux: remove unnecessary meson version check
Bruce Richardson [Fri, 17 May 2019 13:45:27 +0000 (14:45 +0100)]
kernel/linux: remove unnecessary meson version check

The check for meson version 0.44 is redundant since the minimum
supported version for the project as a whole is 0.47.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
5 years agokni: remove ethtool support
Ferruh Yigit [Fri, 24 May 2019 16:55:20 +0000 (17:55 +0100)]
kni: remove ethtool support

Current design requires kernel drivers and they need to be probed by
Linux up to some level so that they can be usable by DPDK for ethtool
support, this requires maintaining the Linux drivers in DPDK.

Also ethtool support is limited and hard, if not impossible, to expand
to other PMDs.

Since KNI ethtool support is not used commonly, if not used at all,
removing the support for the sake of simplicity and maintenance.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
5 years agodoc: update build command in BlueField guide
Yong Wang [Mon, 27 May 2019 05:18:36 +0000 (13:18 +0800)]
doc: update build command in BlueField guide

Since linuxapp in build configs has been changed to linux, change it
in the bluefield doc.

Fixes: 22d1d1ccc357 ("doc: add Mellanox BlueField platform guide")
Cc: stable@dpdk.org
Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
5 years agodoc: clean PDF config
Thomas Monjalon [Wed, 22 May 2019 09:24:54 +0000 (11:24 +0200)]
doc: clean PDF config

Some font options do not look necessary.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: John McNamara <john.mcnamara@intel.com>
5 years agodoc: fix PDF with greek letter
Thomas Monjalon [Wed, 22 May 2019 08:44:31 +0000 (10:44 +0200)]
doc: fix PDF with greek letter

For an unknown reason, the sign "μ" is not accepted by some environments,
probably due to the version of some Latex packages or dependencies.

! Package inputenc Error: Unicode character μ (U+03BC)
(inputenc)                not set up for use with LaTeX.

It is fixed by installing texlive-langgreek.

Fixes: d0dff9ba445e ("doc: sample application user guide")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: John McNamara <john.mcnamara@intel.com>
5 years agodoc: robustify PDF build
Thomas Monjalon [Wed, 22 May 2019 17:55:24 +0000 (19:55 +0200)]
doc: robustify PDF build

In some environment like the current dpdk.org server,
there can be some errors due to symbols in titles,
as it was the case before this commit in DPDK 18.05:
commit 551d148944dc ("doc: remove flow API migration section")

! LaTeX Error: Bad math environment delimiter.

It can be avoided thanks to the Latex command \robustify.

Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: John McNamara <john.mcnamara@intel.com>
5 years agodoc: fix helloworld build on Windows
Adham Masarwah [Mon, 20 May 2019 08:19:52 +0000 (11:19 +0300)]
doc: fix helloworld build on Windows

The option -Dexamples=helloworld is missing.
The helloworld binary name was wrong.
Forcing clang may be required in some environments.

Fixes: 196c650b8b63 ("doc: add guide for Windows")
Cc: stable@dpdk.org
Signed-off-by: Adham Masarwah <adham@mellanox.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
5 years agofix off-by-one errors in snprintf
Michael Santana [Fri, 10 May 2019 14:53:12 +0000 (10:53 -0400)]
fix off-by-one errors in snprintf

snprintf guarantees to always correctly place a null terminator
in the buffer string. So manually placing a null terminator
in a buffer right after a call to snprintf is redundant code.

Additionally, there is no need to use 'sizeof(buffer) - 1' in snprintf as this
means we are not using the last character in the buffer. 'sizeof(buffer)' is
enough.

Cc: stable@dpdk.org
Signed-off-by: Michael Santana <msantana@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
5 years agonet/ixgbe/base: wait for link after copper MAC setup
Ashijeet Acharya [Fri, 24 May 2019 09:30:15 +0000 (11:30 +0200)]
net/ixgbe/base: wait for link after copper MAC setup

After setting up the link on x552/X557-AT 10GBASE-T NICs, sometimes the
link does not get set up properly and as a result all the subsequent
calls to ixgbe_check_link() from ixgbe_dev_link_update_share() fail.

Introduce a delay time of 1s in ixgbe_setup_mac_link_t_X550em() before
beginning to set up the external PHY link speed to ensure that the
controller can acquire the link.

Signed-off-by: Ashijeet Acharya <ashijeet.acharya@6wind.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
5 years agonet/vmxnet3: fix uninitialized variable
Yogev Chaimovich [Thu, 16 May 2019 07:10:38 +0000 (07:10 +0000)]
net/vmxnet3: fix uninitialized variable

Coverity issue: 323479
Fixes: 30f77abecd38 ("net/vmxnet3: support stats reset")
Cc: stable@dpdk.org
Signed-off-by: Yogev Chaimovich <yogev@cgstowernetworks.com>
Acked-by: Yong Wang <yongwang@vmware.com>
5 years agonet/ixgbe: enable new device
Beilei Xing [Fri, 24 May 2019 00:28:24 +0000 (08:28 +0800)]
net/ixgbe: enable new device

This patch enables new device, the device id is 0x15B0.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
5 years agonet/bnxt: support bulk free of Tx mbufs
Ajit Khaparde [Wed, 15 May 2019 18:08:17 +0000 (11:08 -0700)]
net/bnxt: support bulk free of Tx mbufs

The driver currently uses rte_pktmbuf_free() to free each mbuf
after transmit completion. This is optimized to free multiple
mbufs using rte_mempool_put_bulk().

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
5 years agonet/bnxt: optimize Tx batching
Sriharsha Basavapatna [Wed, 15 May 2019 18:08:16 +0000 (11:08 -0700)]
net/bnxt: optimize Tx batching

This patch adds a few optimizations to Tx batching. Instead of
specifying 'cmpl_next' to bnxt_start_xmit() as a hint to enable
completion for a given packet, request for completion on the last
successfully enqueued TxBD. This takes care of both success and
error cases. It eliminates 'cmpl_next' arg and related per-packet
condition checks around it.

Fixes: 5735eb241947 ("net/bnxt: support Tx batching")
Cc: stable@dpdk.org
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
5 years agonet/bnxt: fix Tx batching
Sriharsha Basavapatna [Wed, 15 May 2019 18:08:15 +0000 (11:08 -0700)]
net/bnxt: fix Tx batching

This patch addresses the following issues with Tx batching:

1. Tx stall observed in some conditions:

The batching code doesn't request for a completion when only a partial
chain of packets is transmitted due to mbuf allocation errors. Because
of this, Tx consumer index is not updated correctly and it eventually
leads to qfull condition. Fix this by requesting a completion for the
last packet in the partial chain that is transmitted successfully.

2. Tx stall seen with Jumbo frames:

With jumbo frames, number of TxBDs is > 1. While setting up these
additional BDs in bnxt_start_xmit(), the flags field is being set using
the OR-assignment operator. We end up using a stale value of the flags
field (from a previous use of that descriptor). This results in an
invalid completion and eventually leads to tx stall. Fix this to just
assign the flags field with the right value.

Fixes: 5735eb241947 ("net/bnxt: support Tx batching")
Cc: stable@dpdk.org
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
5 years agonet/bnxt: check for error conditions in Tx path
Ajit Khaparde [Wed, 15 May 2019 18:08:14 +0000 (11:08 -0700)]
net/bnxt: check for error conditions in Tx path

The HW can have limits on the minimum packet size it can support,
or the maximum number of segments it can support. Check for such
possibilities. Also check if we are going to have a 0 length buffer.

Fixes: 6eb3cc2294fd ("net/bnxt: add initial Tx code")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
5 years agonet/bnxt: support updating IPID
Ajit Khaparde [Wed, 15 May 2019 18:08:13 +0000 (11:08 -0700)]
net/bnxt: support updating IPID

Add support to update ipid during TSO.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
5 years agonet/bnxt: fix TSO
Ajit Khaparde [Wed, 15 May 2019 18:08:12 +0000 (11:08 -0700)]
net/bnxt: fix TSO

We wrongly update lflags in the Tx descriptor; avoid it.
Also, instead of calculating the last producer index to see if mbuf
segments are chained, check if the pointer is NULL to iterate through
the segment list.

Fixes: 6eb3cc2294fd ("net/bnxt: add initial Tx code")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
5 years agonet/mlx5: fix memory free on queue create error
Dekel Peled [Mon, 20 May 2019 08:07:26 +0000 (11:07 +0300)]
net/mlx5: fix memory free on queue create error

In function mlx5_rxq_ibv_new(), pointer *tmpl allocation is attempted
at the start, but not validated or freed in case of error.
In function mlx5_txq_ibv_new(), pointer *txq_ibv allocation is
attempted at the start, but not freed in case of error.

This patch adds pointers initialization, validation and freeing.

Fixes: 09cb5b581762 ("net/mlx5: separate DPDK from verbs Rx queue objects")
Fixes: faf2667fe8d5 ("net/mlx5: separate DPDK from verbs Tx queue objects")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
5 years agonet/mlx5: remove redundant size calculation macro
Dekel Peled [Wed, 15 May 2019 10:11:38 +0000 (13:11 +0300)]
net/mlx5: remove redundant size calculation macro

Patch [1] added, among other definitions, the macro MLX5_ST_SZ_DB.
Patch [2] added later the macro MLX5_ST_SZ_BYTES, which is exactly
the same macro with a different name.
Each of these macros was used in very few places.

This patch removes the definition of MLX5_ST_SZ_DB, and replaces it
with MLX5_ST_SZ_BYTES wherever it was used.
Macro MLX5_ST_SZ_BYTES was preffered since it is the same macro
name used in kernel code, see [3].

[1] http://patches.dpdk.org/patch/45254/
[2] http://patches.dpdk.org/patch/49403/
[3] https://lists.openwall.net/netdev/2014/10/02/75

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
5 years agonet/mlx5: support match on TCP flags
Jack Min [Thu, 9 May 2019 06:11:09 +0000 (06:11 +0000)]
net/mlx5: support match on TCP flags

Add support to match all TCP control bits (flags)
except "NS (ECN-nonce)" via Direct Verbs (DV) or Direct Rule (DR)
engine.

Signed-off-by: Jack Min <jackmin@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
5 years agonet/mlx4: use dynamic log type
Stephen Hemminger [Fri, 24 May 2019 16:03:16 +0000 (09:03 -0700)]
net/mlx4: use dynamic log type

This driver should use dynamic log level not RTE_LOGTYPE_PMD.
Other drivers were converted back in 18.02.

This is really a bug, all other drivers use dynamic log levels
by now.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet/mlx5: move locally used functions to static
Dekel Peled [Wed, 8 May 2019 08:29:41 +0000 (11:29 +0300)]
net/mlx5: move locally used functions to static

Multiple functions were declared in header file mlx5_rxtx.h,
implemented in mlx5_rxq.c, and called only in mlx5_rxq.c.

This patch moves all these functions declarations into mlx5_rxq.c,
as static functions.
Some functions implementation was copied higher in the file to
precede the functions calls.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
5 years agonet/mlx5: fix description of return value
Dekel Peled [Wed, 8 May 2019 08:29:40 +0000 (11:29 +0300)]
net/mlx5: fix description of return value

Return value of function mlx5_rxq_releasable() was not described
correctly in function description.

This patch updates the description to correctly describe the optional
return values.

Fixes: a6d83b6a9209 ("net/mlx5: standardize on negative errno values")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
5 years agonet/mlx5: fix missing validation of null pointer
Dekel Peled [Wed, 8 May 2019 08:29:39 +0000 (11:29 +0300)]
net/mlx5: fix missing validation of null pointer

Function mlx5_rxq_ibv_release() is called in several places.
Before each call except one, the input parameter is validated to make
sure it is not null.

This patch adds the validation where it is missing.
It also changes a priv_ prefix, left in a comment, to mlx5_ prefix.

Fixes: af4f09f28294 ("net/mlx5: prefix all functions with mlx5")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
5 years agonet/mlx5: remove unused functions
Dekel Peled [Wed, 8 May 2019 08:29:38 +0000 (11:29 +0300)]
net/mlx5: remove unused functions

Functions implemented but never called:
mlx5_rxq_ibv_releasable()
mlx5_rxq_cleanup()
mlx5_txq_ibv_releasable()

Function declared but not implemented:
rxq_alloc_mprq_buf()

This patch removes these functions from code and header file.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
5 years agonet/i40e: support MARK and RSS flow action
Mesut Ali Ergin [Thu, 16 May 2019 04:28:03 +0000 (21:28 -0700)]
net/i40e: support MARK and RSS flow action

Currently, i40e Flow Director action parser only allows following nine
action combinations: (QUEUE, PASSTHRU, DROP, QUEUE + MARK, PASSTHRU +
MARK, DROP + MARK, QUEUE + FLAG, PASSTHRU + FLAG, DROP + FLAG)

Using the existing Cloud Filter profile on the NIC, it is possible to
add support for two more combinations as: (MARK + RSS, MARK + FLAG +
RSS)

Addition of these new combinations would allow more applications to
utilize DPDK rte_flow to implement hardware flow offloads with Intel
Ethernet 700 series network adapters, including but not limited to the
existing OVS DPDK partial hardware flow offload feature.

Signed-off-by: Mesut Ali Ergin <mesut.a.ergin@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
5 years agodoc: announce network API change
Olivier Matz [Tue, 21 May 2019 16:13:15 +0000 (18:13 +0200)]
doc: announce network API change

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet: add rte prefix to UDP structure
Olivier Matz [Tue, 21 May 2019 16:13:14 +0000 (18:13 +0200)]
net: add rte prefix to UDP structure

Add 'rte_' prefix to structures:
- rename struct udp_hdr as struct rte_udp_hdr.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet: add rte prefix to TCP structure
Olivier Matz [Tue, 21 May 2019 16:13:13 +0000 (18:13 +0200)]
net: add rte prefix to TCP structure

Add 'rte_' prefix to structures:
- rename struct tcp_hdr as struct rte_tcp_hdr.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet: add rte prefix to SCTP structure
Olivier Matz [Tue, 21 May 2019 16:13:12 +0000 (18:13 +0200)]
net: add rte prefix to SCTP structure

Add 'rte_' prefix to structures:
- rename struct sctp_hdr as struct rte_sctp_hdr.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet: add rte prefix to IP defines
Olivier Matz [Tue, 21 May 2019 16:13:11 +0000 (18:13 +0200)]
net: add rte prefix to IP defines

Add 'RTE_' prefix to defines:
- rename IPv4( as RTE_IPv4(.
- rename IPV4_MAX_PKT_LEN as RTE_IPV4_MAX_PKT_LEN.
- rename IPV4_HDR_IHL_MASK as RTE_IPV4_HDR_IHL_MASK.
- rename IPV4_IHL_MULTIPLIER as RTE_IPV4_IHL_MULTIPLIER.
- rename IPV4_HDR_DF_SHIFT as RTE_IPV4_HDR_DF_SHIFT.
- rename IPV4_HDR_MF_SHIFT as RTE_IPV4_HDR_MF_SHIFT.
- rename IPV4_HDR_FO_SHIFT as RTE_IPV4_HDR_FO_SHIFT.
- rename IPV4_HDR_DF_FLAG as RTE_IPV4_HDR_DF_FLAG.
- rename IPV4_HDR_MF_FLAG as RTE_IPV4_HDR_MF_FLAG.
- rename IPV4_HDR_OFFSET_MASK as RTE_IPV4_HDR_OFFSET_MASK.
- rename IPV4_HDR_OFFSET_UNITS as RTE_IPV4_HDR_OFFSET_UNITS.
- rename IPV4_ANY as RTE_IPV4_ANY.
- rename IPV4_LOOPBACK as RTE_IPV4_LOOPBACK.
- rename IPV4_BROADCAST as RTE_IPV4_BROADCAST.
- rename IPV4_ALLHOSTS_GROUP as RTE_IPV4_ALLHOSTS_GROUP.
- rename IPV4_ALLRTRS_GROUP as RTE_IPV4_ALLRTRS_GROUP.
- rename IPV4_MAX_LOCAL_GROUP as RTE_IPV4_MAX_LOCAL_GROUP.
- rename IPV4_MIN_MCAST as RTE_IPV4_MIN_MCAST.
- rename IPV4_MAX_MCAST as RTE_IPV4_MAX_MCAST.
- rename IS_IPV4_MCAST as RTE_IS_IPV4_MCAST.
- rename IPV6_HDR_FL_SHIFT as RTE_IPV6_HDR_FL_SHIFT.
- rename IPV6_HDR_TC_SHIFT as RTE_IPV6_HDR_TC_SHIFT.
- rename IPV6_HDR_FL_MASK as RTE_IPV6_HDR_FL_MASK.
- rename IPV6_HDR_TC_MASK as RTE_IPV6_HDR_TC_MASK.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet: add rte prefix to IP structure
Olivier Matz [Tue, 21 May 2019 16:13:10 +0000 (18:13 +0200)]
net: add rte prefix to IP structure

Add 'rte_' prefix to structures:
- rename struct ipv4_hdr as struct rte_ipv4_hdr.
- rename struct ipv6_hdr as struct rte_ipv6_hdr.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet: add rte prefix to ICMP defines
Olivier Matz [Tue, 21 May 2019 16:13:09 +0000 (18:13 +0200)]
net: add rte prefix to ICMP defines

Add 'RTE_' prefix to defines:
- rename IP_ICMP_ECHO_REPLY as RTE_IP_ICMP_ECHO_REPLY.
- rename IP_ICMP_ECHO_REQUEST as RTE_IP_ICMP_ECHO_REQUEST.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet: add rte prefix to ICMP structure
Olivier Matz [Tue, 21 May 2019 16:13:08 +0000 (18:13 +0200)]
net: add rte prefix to ICMP structure

Add 'rte_' prefix to structures:
- rename struct icmp_hdr as struct rte_icmp_hdr.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet: add rte prefix to GRE structure
Olivier Matz [Tue, 21 May 2019 16:13:07 +0000 (18:13 +0200)]
net: add rte prefix to GRE structure

Add 'rte_' prefix to structures:
- rename struct gre_hdr as struct rte_gre_hdr.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet: add rte prefix to ESP structure
Olivier Matz [Tue, 21 May 2019 16:13:06 +0000 (18:13 +0200)]
net: add rte prefix to ESP structure

Add 'rte_' prefix to structures:
- rename struct esp_hdr as struct rte_esp_hdr.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet: add rte prefix to ether defines
Olivier Matz [Tue, 21 May 2019 16:13:05 +0000 (18:13 +0200)]
net: add rte prefix to ether defines

Add 'RTE_' prefix to defines:
- rename ETHER_ADDR_LEN as RTE_ETHER_ADDR_LEN.
- rename ETHER_TYPE_LEN as RTE_ETHER_TYPE_LEN.
- rename ETHER_CRC_LEN as RTE_ETHER_CRC_LEN.
- rename ETHER_HDR_LEN as RTE_ETHER_HDR_LEN.
- rename ETHER_MIN_LEN as RTE_ETHER_MIN_LEN.
- rename ETHER_MAX_LEN as RTE_ETHER_MAX_LEN.
- rename ETHER_MTU as RTE_ETHER_MTU.
- rename ETHER_MAX_VLAN_FRAME_LEN as RTE_ETHER_MAX_VLAN_FRAME_LEN.
- rename ETHER_MAX_VLAN_ID as RTE_ETHER_MAX_VLAN_ID.
- rename ETHER_MAX_JUMBO_FRAME_LEN as RTE_ETHER_MAX_JUMBO_FRAME_LEN.
- rename ETHER_MIN_MTU as RTE_ETHER_MIN_MTU.
- rename ETHER_LOCAL_ADMIN_ADDR as RTE_ETHER_LOCAL_ADMIN_ADDR.
- rename ETHER_GROUP_ADDR as RTE_ETHER_GROUP_ADDR.
- rename ETHER_TYPE_IPv4 as RTE_ETHER_TYPE_IPv4.
- rename ETHER_TYPE_IPv6 as RTE_ETHER_TYPE_IPv6.
- rename ETHER_TYPE_ARP as RTE_ETHER_TYPE_ARP.
- rename ETHER_TYPE_VLAN as RTE_ETHER_TYPE_VLAN.
- rename ETHER_TYPE_RARP as RTE_ETHER_TYPE_RARP.
- rename ETHER_TYPE_QINQ as RTE_ETHER_TYPE_QINQ.
- rename ETHER_TYPE_ETAG as RTE_ETHER_TYPE_ETAG.
- rename ETHER_TYPE_1588 as RTE_ETHER_TYPE_1588.
- rename ETHER_TYPE_SLOW as RTE_ETHER_TYPE_SLOW.
- rename ETHER_TYPE_TEB as RTE_ETHER_TYPE_TEB.
- rename ETHER_TYPE_LLDP as RTE_ETHER_TYPE_LLDP.
- rename ETHER_TYPE_MPLS as RTE_ETHER_TYPE_MPLS.
- rename ETHER_TYPE_MPLSM as RTE_ETHER_TYPE_MPLSM.
- rename ETHER_VXLAN_HLEN as RTE_ETHER_VXLAN_HLEN.
- rename ETHER_ADDR_FMT_SIZE as RTE_ETHER_ADDR_FMT_SIZE.
- rename VXLAN_GPE_TYPE_IPV4 as RTE_VXLAN_GPE_TYPE_IPV4.
- rename VXLAN_GPE_TYPE_IPV6 as RTE_VXLAN_GPE_TYPE_IPV6.
- rename VXLAN_GPE_TYPE_ETH as RTE_VXLAN_GPE_TYPE_ETH.
- rename VXLAN_GPE_TYPE_NSH as RTE_VXLAN_GPE_TYPE_NSH.
- rename VXLAN_GPE_TYPE_MPLS as RTE_VXLAN_GPE_TYPE_MPLS.
- rename VXLAN_GPE_TYPE_GBP as RTE_VXLAN_GPE_TYPE_GBP.
- rename VXLAN_GPE_TYPE_VBNG as RTE_VXLAN_GPE_TYPE_VBNG.
- rename ETHER_VXLAN_GPE_HLEN as RTE_ETHER_VXLAN_GPE_HLEN.

Do not update the command line library to avoid adding a dependency to
librte_net.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet: add rte prefix to ether functions
Olivier Matz [Tue, 21 May 2019 16:13:04 +0000 (18:13 +0200)]
net: add rte prefix to ether functions

Add 'rte_' prefix to functions:
- rename is_same_ether_addr() as rte_is_same_ether_addr().
- rename is_zero_ether_addr() as rte_is_zero_ether_addr().
- rename is_unicast_ether_addr() as rte_is_unicast_ether_addr().
- rename is_multicast_ether_addr() as rte_is_multicast_ether_addr().
- rename is_broadcast_ether_addr() as rte_is_broadcast_ether_addr().
- rename is_universal_ether_addr() as rte_is_universal_ether_addr().
- rename is_local_admin_ether_addr() as rte_is_local_admin_ether_addr().
- rename is_valid_assigned_ether_addr() as rte_is_valid_assigned_ether_addr().
- rename eth_random_addr() as rte_eth_random_addr().
- rename ether_addr_copy() as rte_ether_addr_copy().
- rename ether_format_addr() as rte_ether_format_addr().

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet: add rte prefix to ether structures
Olivier Matz [Tue, 21 May 2019 16:13:03 +0000 (18:13 +0200)]
net: add rte prefix to ether structures

Add 'rte_' prefix to structures:
- rename struct ether_addr as struct rte_ether_addr.
- rename struct ether_hdr as struct rte_ether_hdr.
- rename struct vlan_hdr as struct rte_vlan_hdr.
- rename struct vxlan_hdr as struct rte_vxlan_hdr.
- rename struct vxlan_gpe_hdr as struct rte_vxlan_gpe_hdr.

Do not update the command line library to avoid adding a dependency to
librte_net.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet: add rte prefix to ARP defines
Olivier Matz [Tue, 21 May 2019 16:13:02 +0000 (18:13 +0200)]
net: add rte prefix to ARP defines

Add 'RTE_' prefix to defines:
- rename ARP_HRD_ETHER as RTE_ARP_HRD_ETHER.
- rename ARP_OP_REQUEST as RTE_ARP_OP_REQUEST.
- rename ARP_OP_REPLY as RTE_ARP_OP_REPLY.
- rename ARP_OP_REVREQUEST as RTE_ARP_OP_REVREQUEST.
- rename ARP_OP_REVREPLY as RTE_ARP_OP_REVREPLY.
- rename ARP_OP_INVREQUEST as RTE_ARP_OP_INVREQUEST.
- rename ARP_OP_INVREPLY as RTE_ARP_OP_INVREPLY.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet: add rte prefix to ARP structures
Olivier Matz [Tue, 21 May 2019 16:13:01 +0000 (18:13 +0200)]
net: add rte prefix to ARP structures

Also rename arp_hrd, arp_pro, arp_hln, arp_pln and arp_op fields
to avoid conflict with the #defines in gnu libc.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agonet/ice: update RSS RETA size with supported values
Haiyue Wang [Mon, 20 May 2019 08:14:33 +0000 (16:14 +0800)]
net/ice: update RSS RETA size with supported values

Since ice can support 128, 512, 2K RSS RETA size value, change the
update API to set it to resize the RSS RETA table. And by default,
use 512 to sync with ETH_RSS_RETA_SIZE_x maximum value definition.
Also the flag ICE_FLAG_RSS_AQ_CAPABLE is missed to set.

Fixes: 690175ee51bf ("net/ice: support getting device information")
Fixes: ff963bfa7cb1 ("net/ice: support RSS")
Cc: stable@dpdk.org
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
5 years agonet/i40e: enable new device
Beilei Xing [Wed, 15 May 2019 01:58:36 +0000 (09:58 +0800)]
net/i40e: enable new device

This patch removes ifdef to enable new device.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
5 years agonet/ixgbe: fix Tx threshold setup
Qi Zhang [Sat, 4 May 2019 09:29:39 +0000 (17:29 +0800)]
net/ixgbe: fix Tx threshold setup

Tx desc's DD status is not cleaned by NIC automatically after packets
have been transmitted until software refill a new packet during next
loop. So when tx_free_thresh + tx_rs_thresh > nb_desc, it is possible
that an outdated DD status be checked as tx_next_dd, then segment fault
happen due to free a NULL mbuf pointer.

Then patch fixes this issue by
1. try to adapt tx_rs_thresh to an aggressive tx_free_thresh.
2. queue setup fail when tx_free_thresh + tx_rs_thresh > nb_desc

Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
5 years agonet/ice: fix Tx threshold setup
Qi Zhang [Sat, 4 May 2019 09:29:38 +0000 (17:29 +0800)]
net/ice: fix Tx threshold setup

Tx desc's DD status is not cleaned by NIC automatically after packets
have been transmitted until software refill a new packet during next
loop. So when tx_free_thresh + tx_rs_thresh > nb_desc, it is possible
that an outdated DD status be checked as tx_next_dd, then segment fault
happen due to free a NULL mbuf pointer.

Then patch fixes this issue by
1. try to adapt tx_rs_thresh to an aggressive tx_free_thresh.
2. queue setup fail when tx_free_thresh + tx_rs_thresh > nb_desc

Fixes: 50370662b727 ("net/ice: support device and queue ops")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
5 years agonet/i40e: fix Tx threshold setup
Qi Zhang [Sat, 4 May 2019 09:29:37 +0000 (17:29 +0800)]
net/i40e: fix Tx threshold setup

Tx desc's DD status is not cleaned by NIC automatically after packets
have been transmitted until software refill a new packet during next
loop. So when tx_free_thresh + tx_rs_thresh > nb_desc, it is possible
that an outdated DD status be checked as tx_next_dd, then segment fault
happen due to free a NULL mbuf pointer.

Then patch fixes this issue by
1. try to adapt tx_rs_thresh to an aggressive tx_free_thresh.
2. queue setup fail when tx_free_thresh + tx_rs_thresh > nb_desc

Fixes: 4861cde46116 ("i40e: new poll mode driver")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
5 years agonet/fm10k: advertise supported RSS hash function
Xiao Wang [Mon, 6 May 2019 08:44:34 +0000 (16:44 +0800)]
net/fm10k: advertise supported RSS hash function

PMD should advertise supported RSS hash functions via
dev_info.flow_type_rss_offloads variable [1], otherwise upper level check
would fail on configuring RSS, leading to MQ RSS failure.

[1] commit aa1a6d87f15d ("ethdev: force RSS offload rules again")
Cc: stable@dpdk.org
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
5 years agonet/ixgbe: fix unexpected link handler
Yunjian Wang [Wed, 8 May 2019 12:51:38 +0000 (20:51 +0800)]
net/ixgbe: fix unexpected link handler

The nic's interrupt source has some active handler, which maybe call
ixgbe_dev_link_update() to set link handler. We should cancel the
link handler before remove dev to prevent executing the link handler.
It triggers segfault.

Fixes: 0408f47ba4d6 ("net/ixgbe: fix busy polling while fiber link update")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Wei Zhao <wei.zhao1@intel.com>
5 years agonet/ice: set min and max MTU
Qi Zhang [Tue, 7 May 2019 01:53:46 +0000 (09:53 +0800)]
net/ice: set min and max MTU

This commit sets the min and max supported MTU values for ice devices
via the ice_dev_info_get() function. Min MTU supported is set to
ETHER_MIN_MTU and max mtu is calculated as the max packet length
supported minus the transport overhead.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
5 years agonet/i40e: forbid two RSS flow rules
Wei Zhao [Thu, 9 May 2019 02:59:30 +0000 (10:59 +0800)]
net/i40e: forbid two RSS flow rules

Refuse to create the second RSS flow rule as only one RSS key and
HASH register for each PF port. Users should delete the first rule
before setup the second rule.

Fixes: ecad87d22383 ("net/i40e: move RSS to flow API")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Tested-by: Wenjie Li <wenjiex.a.li@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
5 years agonet/fm10k: support Rx queue count API
Xiao Wang [Wed, 24 Apr 2019 07:51:36 +0000 (15:51 +0800)]
net/fm10k: support Rx queue count API

Some application, e.g. the l3fwd-power sample uses rte_eth_rx_queue_count()
API to get the get the number of used descriptors of a Rx queue. This patch
adds fm10k implementation for this API.

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
5 years agonet/ice: support link status change
Haiyue Wang [Fri, 3 May 2019 05:59:10 +0000 (13:59 +0800)]
net/ice: support link status change

Support link up and down functions for ice, and when stop the ice,
makes the link down also.

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
5 years agoexamples: fix make clean when using pkg-config
Bruce Richardson [Fri, 17 May 2019 12:02:31 +0000 (13:02 +0100)]
examples: fix make clean when using pkg-config

The "make clean" command had a number of issues:
- the "--ignore-fail-on-non-empty" flag is not present on BSD
- the call to remove the build folder would fail if there was no build
  folder present.

These are fixed by only removing the build folder if it exists, and by
using -p flag to rmdir in place of --ignore-fail-on-non-empty

Fixes: 22119c4591a0 ("examples: use pkg-config in makefiles")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
5 years agoexamples: remove auto-generation of examples list
Bruce Richardson [Fri, 17 May 2019 12:02:30 +0000 (13:02 +0100)]
examples: remove auto-generation of examples list

The examples/meson.build file scanned the filesystem to find all examples
to build (for examples=all option) and install. However, using run_command
and scanning the filesystem prevented ninja from properly detecting the
addition or removal of any examples - one had to recreate the build
directory from scratch to guarantee correct detection of all examples. This
patch replaces this generated list with a static list of examples, thereby
allowing proper tracking by ninja/meson, but at the cost of having to
update this file when a new example is added or removed.

This also fixes an issue with Windows builds, since "sh" is not available
there.

Fixes: 2daf565f91b5 ("examples: install as part of ninja install")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
5 years agoexamples: fix install with empty meson parameter
Bruce Richardson [Fri, 17 May 2019 12:02:29 +0000 (13:02 +0100)]
examples: fix install with empty meson parameter

While the examples were being installed into the appropriate install path
when processing the examples/meson.build file, that file was only processed
if the "examples" meson parameter was non-empty. Since we now do more than
just build the examples, we need to unconditionally process the file.

Fixes: 2daf565f91b5 ("examples: install as part of ninja install")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
5 years agoversion: 19.08-rc0
Thomas Monjalon [Tue, 14 May 2019 16:04:37 +0000 (18:04 +0200)]
version: 19.08-rc0

Start a new release cycle with empty release notes.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: David Marchand <david.marchand@redhat.com>
5 years agoversion: 19.05.0
Thomas Monjalon [Mon, 13 May 2019 21:41:38 +0000 (23:41 +0200)]
version: 19.05.0

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
5 years agodoc: announce power API change
Marcin Hajkowski [Mon, 13 May 2019 13:52:10 +0000 (15:52 +0200)]
doc: announce power API change

Function rte_power_set_env will no longer return
success on attempt to set env in initialized state.

Signed-off-by: Marcin Hajkowski <marcinx.hajkowski@intel.com>
Reviewed-by: Rami Rosen <ramirose@gmail.com>
Acked-by: David Hunt <david.hunt@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
5 years agodoc: announce sched API change
Jasvinder Singh [Wed, 24 Apr 2019 12:37:17 +0000 (13:37 +0100)]
doc: announce sched API change

Add deprecation note for making changes in data structures, APIs
and macros in order to have more traffic classes, flexible
mapping of pipe queues to traffic classes, subport level
configuration of pipes and queues, etc. These changes are aligned
to improvements suggested in the RFC-
https://mails.dpdk.org/archives/dev/2018-November/120035.html

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Mohammad Abdul Awal <mohammad.abdul.awal@intel.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
5 years agodoc: announce crypto API change for GCM IV
Arek Kusztal [Wed, 17 Apr 2019 07:41:13 +0000 (09:41 +0200)]
doc: announce crypto API change for GCM IV

This patch adds deprecation notice of changing iv behaviour
when using Galois Counter Mode of operation.
With this change, IV of all supported sizes can be used.

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
5 years agodoc: announce API change for net defines/structs/funcs
Olivier Matz [Wed, 10 Apr 2019 08:36:25 +0000 (10:36 +0200)]
doc: announce API change for net defines/structs/funcs

As discussed at techboard, the network definitions, structures
and functions will be prefixed by 'rte_'.

Link: http://mails.dpdk.org/archives/dev/2019-February/125033.html
Link: https://mails.dpdk.org/archives/dev/2019-April/129752.html
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
5 years agodoc: announce removal of memory config struct from API
Erik Gabriel Carrillo [Thu, 9 May 2019 18:51:45 +0000 (13:51 -0500)]
doc: announce removal of memory config struct from API

It is planned to make the rte_mem_config struct of the EAL private to
remove it from the visible ABI.  Add a notice to announce the intention.

Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
5 years agodoc: announce API change to remove exit calls in libs
Thomas Monjalon [Wed, 8 May 2019 20:54:13 +0000 (22:54 +0200)]
doc: announce API change to remove exit calls in libs

Two public functions from EAL and metrics libraries need to return
some new error codes instead of calling rte_panic or rte_exit.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Arnon Warshavsky <arnon@qwilt.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
5 years agodoc: prepare security process for vulnerabilities
Thomas Monjalon [Tue, 7 May 2019 16:02:31 +0000 (18:02 +0200)]
doc: prepare security process for vulnerabilities

In case a vulnerability is discovered, the process to follow
is described in this document.
It has been inspired by the process of some referenced projects
and with the help of experts from Intel, RedHat, Mellanox
and the Linux Foundation.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Luca Boccassi <bluca@debian.org>
5 years agodoc: update release notes for 19.05
John McNamara [Fri, 10 May 2019 14:18:17 +0000 (15:18 +0100)]
doc: update release notes for 19.05

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

Signed-off-by: John McNamara <john.mcnamara@intel.com>
5 years agodoc: update Mellanox guides and release notes
Ori Kam [Mon, 13 May 2019 11:41:02 +0000 (11:41 +0000)]
doc: update Mellanox guides and release notes

This patch adds some missing features to Mellanox drivers release notes.
It also updates the mlx5/mlx4 documentations.

Fixes: d85b204b5dba ("doc: update release notes for Mellanox drivers")

Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
5 years agodoc: fix JSON interface for power sample
Lukasz Krakowiak [Mon, 13 May 2019 14:13:55 +0000 (15:13 +0100)]
doc: fix JSON interface for power sample

Updated doc for JSON sample code related to vm_power_manager
fifo interface: "command": "destroy", "command": "power".

There is no code change to go with this doc update, it is to fix
the docs to match the implementation in the code.

Fixes: a63504a90f ("examples/power: add JSON string handling")
Cc: stable@dpdk.org
Signed-off-by: Lukasz Krakowiak <lukaszx.krakowiak@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
5 years agodoc: fix doxygen for timer API
Erik Gabriel Carrillo [Fri, 10 May 2019 16:38:36 +0000 (11:38 -0500)]
doc: fix doxygen for timer API

Now that some of the symbols in the timer lib are versioned, the
Doxygen documentation that is generated is incorrect.  Group all
versioned symbols, listing the generic name first, and remove comments
for older versions of symbols.

Fixes: c0749f7096c7 ("timer: allow management in shared memory")

Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
5 years agoapp/testpmd: fix offload flags after port config
Wei Zhao [Thu, 9 May 2019 07:20:47 +0000 (15:20 +0800)]
app/testpmd: fix offload flags after port config

There is an error in function rxtx_port_config(), which may overwrite
offloads configuration get from function launch_args_parse() when run
testpmd app. So rxtx_port_config() should do "or" for port offloads.

Fixes: d44f8a485f5d ("app/testpmd: enable per queue configure")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Tested-by: Peng Yuan <yuan.peng@intel.com>
5 years agonet/mlx5: fix device removal handler for multiport
Viacheslav Ovsiienko [Sun, 12 May 2019 08:32:29 +0000 (08:32 +0000)]
net/mlx5: fix device removal handler for multiport

IBV_EVENT_DEVICE_FATAL event is generated by the driver once for
the entire multiport Infiniband device, not for each existing ports.
The port index is zero and it causes dropping the device removal
event. We should invoke the removal event processing routine
for each port we have installed handler for.

Fixes: 028b2a28c3cb ("net/mlx5: update event handler for multiport IB devices")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
5 years agoevent/dsw: ignore scheduling type for single-link queues
Mattias Rönnblom [Fri, 10 May 2019 12:18:16 +0000 (14:18 +0200)]
event/dsw: ignore scheduling type for single-link queues

The scheduling type parameter is not applicable for single link
queues. DSW would, at the time of rte_event_queue_setup(), erroneously
verify that scheduling type was one of the supported types, and
returned -ENOTSUP in case of RTE_SCHED_TYPE_ORDERED.

Fixes: 4540ee9c68 ("event/dsw: add device and queue configuration")
Cc: stable@dpdk.org
Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Acked-by: Gage Eads <gage.eads@intel.com>
5 years agoeventdev: fix Rx adapter event flush
Nikhil Rao [Fri, 10 May 2019 08:08:10 +0000 (13:38 +0530)]
eventdev: fix Rx adapter event flush

The Rx adapter flushes events only if it has BATCH_SIZE
events buffered where BATCH_SIZE is set to 32, e.g., if a
single packet is sent, it is never passed to
eventdev. Fix this issue by adding an event buffer flush
either when a Rx queue is found to be empty or the adapter service
function has processed the max number of packets for an invocation.

Bugzilla ID: 277
Fixes: 6b83f5935543 ("eventdev: add event buffer flush in Rx adapter")
Cc: stable@dpdk.org
Reported-by: Matias Elo <matias.elo@nokia.com>
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Reviewed-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Tested-by: Matias Elo <matias.elo@nokia.com>
5 years agodevtools: select patches to check with git range
David Marchand [Fri, 10 May 2019 07:49:36 +0000 (09:49 +0200)]
devtools: select patches to check with git range

Rather than default to origin/master.., it can be handy to choose the
range you want to check.

Example on a branch rebased on next-net:

Before:
$ ./devtools/checkpatches.sh
...
...
67/69 valid patches

After:
$ ./devtools/checkpatches.sh -r next-net/master..

3/3 valid patches

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
5 years agoversion: 19.05-rc4
Thomas Monjalon [Thu, 9 May 2019 23:13:20 +0000 (01:13 +0200)]
version: 19.05-rc4

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
5 years agodoc: update recommended kernel version for i40e
Lijuan Tu [Mon, 6 May 2019 16:37:18 +0000 (00:37 +0800)]
doc: update recommended kernel version for i40e

add recommended DPDK/kernel driver/firmware version matching list for
i40e for 19.05

Signed-off-by: Lijuan Tu <lijuan.tu@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
5 years agodoc: add tested Intel platforms with Intel NICs
Lijuan Tu [Mon, 6 May 2019 16:37:17 +0000 (00:37 +0800)]
doc: add tested Intel platforms with Intel NICs

Add tested Intel platforms with Intel NICs to v19.05 release note.

Signed-off-by: Lijuan Tu <lijuan.tu@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
5 years agodoc: add tested platforms with Mellanox NICs
Raslan Darawsheh [Thu, 9 May 2019 11:12:22 +0000 (11:12 +0000)]
doc: add tested platforms with Mellanox NICs

Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
5 years agodoc: add Mellanox BlueField platform guide
Yongseok Koh [Wed, 8 May 2019 23:39:15 +0000 (16:39 -0700)]
doc: add Mellanox BlueField platform guide

Platform specific guide for Mellanox BlueField SoC is added.

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
5 years agodoc: update release notes for Mellanox drivers
Yongseok Koh [Thu, 9 May 2019 21:11:23 +0000 (14:11 -0700)]
doc: update release notes for Mellanox drivers

mlx4/mlx5 release note for v19.05

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
5 years agodoc: update release notes for QAT PMDs
Fiona Trahe [Fri, 3 May 2019 16:15:40 +0000 (17:15 +0100)]
doc: update release notes for QAT PMDs

Added release note entry for QAT compression PMD
Clarified that previous entry was for QAT sym crypto PMD

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>