dpdk.git
4 years agobuildtools: make experimental symbol check lighter
David Marchand [Mon, 12 Aug 2019 07:02:28 +0000 (09:02 +0200)]
buildtools: make experimental symbol check lighter

Dumping every object file for every symbol is too heavy.
Use a temporary storage.

Before:
$ rm -rf master && make defconfig O=master
$ time make EXTRA_CFLAGS=-g O=master
[...]
real 2m24.063s
user 1m16.985s
sys 1m46.372s

After:
$ rm -rf master && make defconfig O=master
$ time make EXTRA_CFLAGS=-g O=master
[...]
real 1m37.110s
user 0m49.417s
sys 0m51.803s

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
4 years agoremove useless include of EAL memory config header
David Marchand [Mon, 12 Aug 2019 06:53:33 +0000 (08:53 +0200)]
remove useless include of EAL memory config header

Restrict this header inclusion to its real users.

Fixes: 028669bc9f0d ("eal: hide shared memory config")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
4 years agomaintainers: add David for main branch
Ferruh Yigit [Thu, 26 Sep 2019 10:12:55 +0000 (11:12 +0100)]
maintainers: add David for main branch

David will be co-maintaining the top level tree with Thomas,
Welcome and best luck J

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
4 years agodevtools: fix test of ninja install
Thomas Monjalon [Sat, 14 Sep 2019 08:56:32 +0000 (10:56 +0200)]
devtools: fix test of ninja install

When trying to compile some examples with libdpdk.pc,
the right environment (for default target) was not loaded.
The consequence is to not detect some dependencies because
of missing directories in PKG_CONFIG_PATH.

The environment preparation is moved to a dedicate function,
and called for the default target (cc),
before testing the install output of the default build.

Fixes: 272236741258 ("devtools: load target-specific compilation environment")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
4 years agodevtools: test nfb and AF_XDP build with make
Thomas Monjalon [Fri, 13 Sep 2019 21:03:30 +0000 (23:03 +0200)]
devtools: test nfb and AF_XDP build with make

The nfb PMD is disabled by default because of its dependency
on netcope-common package.
The variable DPDK_DEP_NFB was introduced but not used to notify
the dependency availability in the build test script.

The AF_XDP PMD is disabled by default because of its dependency
on libbpf on Linux.
An option was missing to notify the dependency availability
in the build test script.

Fixes: 6435f9a0ac22 ("net/nfb: add new netcope driver")
Fixes: f1debd77efaf ("net/af_xdp: introduce AF_XDP PMD")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
4 years agotest/interrupt: account for race with callback
Aaron Conole [Thu, 8 Aug 2019 17:38:35 +0000 (13:38 -0400)]
test/interrupt: account for race with callback

Because the eal interrupt framework can race when invoking the callback
and a separate unregister call, the test needs to accommodate the chance
that the two collide.  Do this by checking the return value of unregister
against the race-condition flag (EAGAIN).

Fixes: f1a6c22424ce ("app/test: update interrupts test")
Cc: stable@dpdk.org
Signed-off-by: Aaron Conole <aconole@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
4 years agoci: exit setup on any error
David Marchand [Thu, 8 Aug 2019 12:22:17 +0000 (14:22 +0200)]
ci: exit setup on any error

-e is preferrable so that we can catch errors in the middle of this
script.
An example is this Travis job [1] that should have errored at the meson
install step rather than go to the build step.

Adding debug mode as it can help post-mortem.

1: https://travis-ci.com/DPDK/dpdk/jobs/223511683

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Michael Santana <msantana@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
4 years agoci: add missing dependencies for documentation
David Marchand [Tue, 13 Aug 2019 13:22:16 +0000 (15:22 +0200)]
ci: add missing dependencies for documentation

Install missing dependencies so that doc can be generated.
While at it, explicitly configure that we want the doc to be generated.
Missing dependencies are then reported as an error rather than silently
ignored.

Because of these extra dependencies, only build them in dedicated travis
jobs.

Fixes: ad2b2cfb1ea3 ("ci: enable unit tests with Travis")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
4 years agodevtools: fix check of ccache for meson build
Thomas Monjalon [Fri, 13 Sep 2019 07:26:27 +0000 (09:26 +0200)]
devtools: fix check of ccache for meson build

The meson build test fails if ccache is not available.
The use of ccache must be optional.
And if used, the compiler to check is the last word of $CC.

Fixes: e0ae780e6569 ("devtools: test compiler availability only once")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Luca Boccassi <bluca@debian.org>
4 years agodevtools: load target-specific compilation environment
Thomas Monjalon [Mon, 12 Aug 2019 23:03:58 +0000 (01:03 +0200)]
devtools: load target-specific compilation environment

In order to re-use the same test environment as with
test-build.sh, the configuration file is loaded at each build,
after adjusting the variable DPDK_TARGET.

This is especially useful to set the variable PKG_CONFIG_PATH,
or define some meson options (without -D) in DPDK_MESON_OPTIONS.

The DPDK_TARGET values can be
aarch64-*, powerpc64-*, x86_64-*.
The matching DPDK_TARGET values for test-build.sh are
arm64-*, ppc_64-*, x86_64-*.
The advised expressions to use in the common configuration file are:
if echo $DPDK_TARGET | grep -q '^a.*64-' ; then
elif echo $DPDK_TARGET | grep -q '^p.*pc.*64' ; then
elif echo $DPDK_TARGET | grep -q '^x86_64' ; then
fi

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Luca Boccassi <bluca@debian.org>
4 years agodevtools: test compiler availability only once
Thomas Monjalon [Mon, 12 Aug 2019 23:03:57 +0000 (01:03 +0200)]
devtools: test compiler availability only once

The compilation test is skipped if the compiler is not available.
In the case of gcc/arm, it was tested both in the generic function
"build" and in the cross-compilation section.

By passing the compiler as argument of the generic function,
the test with "command" is done only once.

This small clean-up has the benefit of introducing the compiler
parameter to be used later in another improvement.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Luca Boccassi <bluca@debian.org>
4 years agonet/mlx: fix build with make and recent gcc
Thomas Monjalon [Mon, 12 Aug 2019 23:03:56 +0000 (01:03 +0200)]
net/mlx: fix build with make and recent gcc

With VERBOSE=1, this error was seen in debug mode with gcc 9.1:

In file included from /tmp/dpdk.auto-config-h.sh.c.w0VWMi:1:
In file included from rdma-core/build/include/infiniband/mlx5dv.h:47:
In file included from rdma-core/build/include/infiniband/verbs.h:46:
In file included from rdma-core/build/include/infiniband/verbs_api.h:66:
In file included from rdma-core/build/include/infiniband/ib_user_ioctl_verbs.h:38:
include/rdma/ib_user_verbs.h:161:28: fatal error:
zero size arrays are an extension [-Wzero-length-array]
__aligned_u64 driver_data0;
^
1 error generated.

As a result, buildtools/auto-config-h.sh was not generating
a correct autoconf file, so the compilation was generating such error:

fatal error: redefinition of 'mlx5_ib_uapi_flow_action_packet_reformat_type'

It is fixed by disabling -pedantic option when calling auto-config-h.sh
from the makefile-based system.

Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agonet/mlx: fix meson build with custom dependency path
Thomas Monjalon [Mon, 12 Aug 2019 23:03:55 +0000 (01:03 +0200)]
net/mlx: fix meson build with custom dependency path

If rdma-core is not installed in a standard directory of the system,
it is possible to specify the location of the pkgconfig file via
an environment variable:
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:~/rdma-core/build/lib/pkgconfig

In this case, the dependency may become mandatory to specify
for the configuration tests (checking dependency symbols or fields).

Some spacing is also fixed around.

Fixes: 8e4937640022 ("net/mlx4: add external allocator for Verbs object")
Fixes: 1dd7c7e38c19 ("net/mlx4: support meson build")
Fixes: 96d7c62a70c7 ("net/mlx5: support meson build")
Cc: stable@dpdk.org
Suggested-by: Luca Boccassi <bluca@debian.org>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agodrivers: add some reasons for meson disabling
Thomas Monjalon [Mon, 12 Aug 2019 23:03:54 +0000 (01:03 +0200)]
drivers: add some reasons for meson disabling

Some drivers were missing reasons text for their disabling in meson.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Luca Boccassi <bluca@debian.org>
4 years agobuild: remove redundant libs from pkgconfig
Thomas Monjalon [Mon, 12 Aug 2019 23:03:53 +0000 (01:03 +0200)]
build: remove redundant libs from pkgconfig

As explained in drivers/meson.build,
"
  For the find_library() case (but not with dependency()) we also
  need to specify the "-l" flags in pkgconfig_extra_libs variable
  too, so that it can be reflected in the pkgconfig output for
  static builds.
"

The commit e30b4e566f47 ("build: improve dependency handling")
must be followed up with this one in order to remove more
occurences of pkgconfig_extra_libs redundant with use of dependency().

Fixes: f1debd77efaf ("net/af_xdp: introduce AF_XDP PMD")
Fixes: 3c32e89f68e1 ("compress/isal: add skeleton ISA-L compression PMD")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Luca Boccassi <bluca@debian.org>
4 years agomaintainers: update for EFD library
Yipeng Wang [Wed, 11 Sep 2019 18:06:37 +0000 (11:06 -0700)]
maintainers: update for EFD library

Add myself as co-maintainer to EFD library to replace Pablo.

Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
4 years agomaintainers: update AESNI MB and GCM PMDs
Pablo de Lara [Wed, 11 Sep 2019 09:10:30 +0000 (10:10 +0100)]
maintainers: update AESNI MB and GCM PMDs

Added myself as co-maintainer of these PMDs,
as I am currently working on the library used in these PMDs.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
4 years agomaintainers: step down from various components
Pablo de Lara [Wed, 11 Sep 2019 08:06:26 +0000 (09:06 +0100)]
maintainers: step down from various components

I have not been active in a year, due to job position change.
Therefore, I cannot remain a maintainer any longer for most
components I used to maintain (various people will take over
on the components where I am the sole maintainer).

I will only remain maintainer of the crypto PMDs that I currently maintain.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
4 years agomaintainers: update for mlx5 PMD
Yongseok Koh [Wed, 21 Aug 2019 20:55:35 +0000 (13:55 -0700)]
maintainers: update for mlx5 PMD

Matan thankfully accepted to replace myself as maintainer for mlx5 PMD.
Good luck!

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agomaintainers: update for stable branches
Kevin Traynor [Thu, 5 Sep 2019 15:49:44 +0000 (16:49 +0100)]
maintainers: update for stable branches

Yuanhan is no longer maintaining DPDK stable.

Add myself as a stable maintainer.

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
4 years agomaintainers: update email address
Michael Santana [Thu, 15 Aug 2019 22:54:52 +0000 (18:54 -0400)]
maintainers: update email address

Change email address for Michael Santana
to personal email in the MAINTAINERS file.

Signed-off-by: Michael Santana <msantana@redhat.com>
Signed-off-by: Michael Santana <maicolgabriel@hotmail.com>
Acked-by: Aaron Conole <aconole@redhat.com>
4 years agodoc: fix format in virtio guide
Tiwei Bie [Tue, 13 Aug 2019 02:07:30 +0000 (10:07 +0800)]
doc: fix format in virtio guide

This patch removes an unwanted empty line in a sentence.

Fixes: 71afcefbd53e ("doc: update virtio ring size and header size")
Cc: stable@dpdk.org
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
4 years agodoc: add packed virtqueue in virtio guide
Tiwei Bie [Tue, 13 Aug 2019 02:07:29 +0000 (10:07 +0800)]
doc: add packed virtqueue in virtio guide

Document the packed virtqueue layout support in virtio net PMD.

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
4 years agodoc: add devargs for virtio-user
Tiwei Bie [Tue, 13 Aug 2019 02:07:28 +0000 (10:07 +0800)]
doc: add devargs for virtio-user

Document the devargs for virtio-user and also make it clear
that these devargs are only available in virtio-user, i.e. not
supported by the PCI virtio driver.

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
4 years agodoc: update description for virtio in-order Rx
Tiwei Bie [Tue, 13 Aug 2019 02:07:27 +0000 (10:07 +0800)]
doc: update description for virtio in-order Rx

The virtio_recv_mergeable_pkts_inorder() has been renamed to
virtio_recv_pkts_inorder() and added the non-mergeable support
in below commit.

Fixes: efcda13648d2 ("net/virtio: add non-mergeable support to in-order path")
Cc: stable@dpdk.org
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
4 years agodoc: fix typo in virtio in-order Rx function name
Tiwei Bie [Tue, 13 Aug 2019 02:07:26 +0000 (10:07 +0800)]
doc: fix typo in virtio in-order Rx function name

The Rx function that will be used when in-order is enabled
should be virtio_recv_mergeable_pkts_inorder() instead of
virtio_xmit_pkts_inorder().

Fixes: 8f3bd7e8702d ("net/virtio: add in-order Rx/Tx into selection")
Cc: stable@dpdk.org
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
4 years agonet/virtio: remove remaining simple Tx related stuff
Tiwei Bie [Tue, 13 Aug 2019 02:07:25 +0000 (10:07 +0800)]
net/virtio: remove remaining simple Tx related stuff

The simple Tx path in virtio has been removed in below commit.
This patch removes an undefined function declaration of simple
Tx and all related descriptions in the doc.

Fixes: 57f818963d80 ("net/virtio: remove simple Tx path")
Cc: stable@dpdk.org
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
4 years agonet/mlx5: remove unneeded constant
Dekel Peled [Tue, 27 Aug 2019 10:46:34 +0000 (13:46 +0300)]
net/mlx5: remove unneeded constant

Constant MLX5_GROUP_FACTOR is defined with value 1, and used to
multiply group value in two places.

This patch removes the unneeded constant definition and use.

Fixes: 4f84a19779ca ("net/mlx5: add Direct Rules API")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agonet/mlx5: support UDP tunnel adding
Raslan Darawsheh [Thu, 22 Aug 2019 10:15:52 +0000 (10:15 +0000)]
net/mlx5: support UDP tunnel adding

This adds support for adding a new UDP tunnel port
on a specific VXLAN types.

Currently we only support VXLAN, VXLAN-GPE on ports
4789, 4790 respectively. Without having to configure
anything in the NIC.

Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
4 years agonet/mlx5: fix typo in error message
Dekel Peled [Tue, 20 Aug 2019 06:21:14 +0000 (09:21 +0300)]
net/mlx5: fix typo in error message

This patch fixes a typing mistake in an error message.

Fixes: 2e4c987aad91 ("net/mlx5: validate Direct Rule E-Switch")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
4 years agonet/mlx5: fix jump action validation
Dekel Peled [Thu, 15 Aug 2019 09:26:51 +0000 (12:26 +0300)]
net/mlx5: fix jump action validation

This patch updates the validation function of jump action.
It adds check of conflicting fate actions in flow rule.
It also removes check of action->type which is not needed.

Fixes: 684b9a1b1f5c ("net/mlx5: support jump action")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
4 years agonet/mlx5: fix drop action validation
Dekel Peled [Thu, 15 Aug 2019 09:26:50 +0000 (12:26 +0300)]
net/mlx5: fix drop action validation

Function mlx5_flow_validate_action_drop() checks if another fate
action is already present in this flow rule, using defined value
MLX5_FLOW_FATE_ACTIONS.

This patch enhances the check using value
(MLX5_FLOW_FATE_ACTIONS | MLX5_FLOW_FATE_ESWITCH_ACTIONS)
to make sure all relevant fate actions are checked.

Fixes: 23c1d42c7138 ("net/mlx5: split flow validation to dedicated function")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
4 years agonet/mlx5: fix comment
Dekel Peled [Tue, 13 Aug 2019 14:07:24 +0000 (17:07 +0300)]
net/mlx5: fix comment

In struct mlx5_ibv_shared, member esw_drop_action was added between
existing member tx_tbl and the comment line describing it.
This patch moves the comment line to its original location, and fixes
a typo in the comment.

Fixes: 34fa7c0268e7 ("net/mlx5: add drop action to Direct Verbs E-Switch")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
4 years agonet/mlx5: fix missing packet type for IP-in-IP
Xiaoyu Min [Thu, 8 Aug 2019 11:38:56 +0000 (19:38 +0800)]
net/mlx5: fix missing packet type for IP-in-IP

The hw ptype information is missed for IP-in-IP tunnel.
It should be RTE_PTYPE_TUNNEL_IP ptype.

Fixes: 5e33bebdd8d3 ("net/mlx5: support IP-in-IP tunnel")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
4 years agonet/ixgbe: fix VF RSS offloads configuration
Wei Zhao [Wed, 4 Sep 2019 08:40:54 +0000 (16:40 +0800)]
net/ixgbe: fix VF RSS offloads configuration

x550 NIC VF port has the capacity to set RSS hash,
so device info get function should report that.

Fixes: 2144f6630fca ("ixgbe: add redirection table size in device info")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agonet/ixgbe: enable new PF host mbox version
Wei Zhao [Wed, 28 Aug 2019 08:16:52 +0000 (16:16 +0800)]
net/ixgbe: enable new PF host mbox version

A new mail box version of ixgbe_mbox_api_13 need to be enabled for PF
host, in order that it can communicate with VF for queue number.

Fixes: 46b14c231106 ("ixgbe: get VF queue number")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agonet/ixgbe: fix queue interrupt for X552/557
Junyu Jiang [Wed, 4 Sep 2019 03:31:47 +0000 (03:31 +0000)]
net/ixgbe: fix queue interrupt for X552/557

Interrupt mode is not working on X552/557 device because
this device doesn't enable the queue interrupt mapping,
this patch fixed the issue.

Fixes: d2e72774e58c ("ixgbe/base: support X550")
Cc: stable@dpdk.org
Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
4 years agoethdev: fix typos for ENOTSUP
Xiaolong Ye [Wed, 4 Sep 2019 14:05:31 +0000 (22:05 +0800)]
ethdev: fix typos for ENOTSUP

Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet/vmxnet3: remove IP checksum from capabilities
Maxime Leroy [Tue, 13 Aug 2019 13:29:47 +0000 (15:29 +0200)]
net/vmxnet3: remove IP checksum from capabilities

The vmxnet3_prep_pkts function set rte_errno to ENOTSUP for any packets
having PKT_TX_IP_CHECKSUM set in ol_flags. But the vmxnet3 has
DEV_TX_OFFLOAD_IPV4_CKSUM set in this tx offload capa.

This issue has been introduced with the new Rx offload
API. DEV_TX_OFFLOAD_IPV4_CKSUM and DEV_RX_OFFLOAD_IPV4_CKSUM has been
added to the tx/rx offloads capa, but the vmxnet3 driver doesn't support
it.

To fix the issue, DEV_TX/RX_OFFLOAD_IPV4_CKSUM needs to be removed from
tx/rx offload capa.

Fixes: 95e4a96ccbf1 ("net/vmxnet3: convert to new Rx offload API")
Cc: stable@dpdk.org
Signed-off-by: Maxime Leroy <maxime.leroy@6wind.com>
Acked-by: Yong Wang <yongwang@vmware.com>
4 years agonet/ixgbe: remove redundant assignment
Yong Wang [Fri, 30 Aug 2019 08:45:29 +0000 (16:45 +0800)]
net/ixgbe: remove redundant assignment

Since "link.link_duplex" has been assigned to ETH_LINK_FULL_DUPLEX just
before switch statement, the assignment in switch-case statement is
redundant. Remove it.

Fixes: 82113036e4e5 ("ethdev: redesign link speed config")
Cc: stable@dpdk.org
Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agonet/ixgbe: use intrinsics to count packet in NEON Rx
Ruifeng Wang [Wed, 28 Aug 2019 08:24:54 +0000 (16:24 +0800)]
net/ixgbe: use intrinsics to count packet in NEON Rx

vPMD for aarch64 calculates the number of received packets using a loop.
Change to use NEON intrinsics for calculation. This saves CPU cycles
and has slightly better performance.

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
4 years agonet/ixgbe: remove memory barrier from NEON Rx
Ruifeng Wang [Wed, 28 Aug 2019 08:24:53 +0000 (16:24 +0800)]
net/ixgbe: remove memory barrier from NEON Rx

The memory barrier was intended for descriptor data integrity (see
comments in [1]). As later NEON loads were implemented and a whole
entry is loaded in one-run and atomic, that makes the ordering of
partial loading unnecessary. Remove it accordingly.

Corrected couple of code comments.

In terms of performance, observed slightly higher average throughput
in tests with 82599ES NIC.

[1] http://patches.dpdk.org/patch/18153/

Fixes: 989a84050542 ("net/ixgbe: fix received packets number for ARM NEON")
Cc: stable@dpdk.org
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
4 years agonet/i40e: remove compiler barrier from NEON Rx
Gavin Hu [Tue, 13 Aug 2019 10:43:31 +0000 (18:43 +0800)]
net/i40e: remove compiler barrier from NEON Rx

As packet length extraction code was simplified,the ordering
was not necessary any more.[1]

2% performance gain was measured on Marvell ThunderX2.
4.3% performance gain was measured on Ampere eMAG80

[1] http://mails.dpdk.org/archives/dev/2016-April/037529.html

Fixes: ae0eb310f253 ("net/i40e: implement vector PMD for ARM")
Cc: stable@dpdk.org
Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Steve Capper <steve.capper@arm.com>
4 years agonet/i40e: remove memory barrier from NEON Rx
Gavin Hu [Tue, 13 Aug 2019 10:43:30 +0000 (18:43 +0800)]
net/i40e: remove memory barrier from NEON Rx

For x86, the descriptors needs to be loaded in order, so in between two
descriptors loading, there is a compiler barrier in place.[1]
For aarch64, a patch [2] is in place to survive with discontinuous DD
bits, the barriers can be removed to take full advantage of out-of-order
execution.

50% performance gain in the RFC2544 NDR test was measured on ThunderX2.
12.50% performance gain in the RFC2544 NDR test was measured on Ampere
eMAG80 platform.

[1] http://inbox.dpdk.org/users/039ED4275CED7440929022BC67E7061153D71548@
SHSMSX105.ccr.corp.intel.com/
[2] https://mails.dpdk.org/archives/stable/2017-October/003324.html

Fixes: ae0eb310f253 ("net/i40e: implement vector PMD for ARM")
Cc: stable@dpdk.org
Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Steve Capper <steve.capper@arm.com>
4 years agonet/mlx4: fix build on ppc64
Christian Ehrhardt [Tue, 13 Aug 2019 11:28:43 +0000 (13:28 +0200)]
net/mlx4: fix build on ppc64

The AltiVec header file breaks boolean type:

error: incompatible types when initializing type
'__vector _bool int' {aka '_vector(4) __bool int'} using type 'int'

If __APPLE_ALTIVEC__ is defined, then bool type is redefined
and conflicts with stdbool.h.

There is no good solution to fix it for the whole project without
breaking something else, so a workaround is inserted in mlx5 PMD.
This workaround is not compatible with C++ but there is no C++ in DPDK.

Related to: 725f5dd0bfb5 ("net/mlx5: fix build on PPC64")
Cc: stable@dpdk.org
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Tested-by: David Christensen <drc@linux.vnet.ibm.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agonet/atlantic: remove double function declaration
Ivan Ilchenko [Sun, 1 Sep 2019 14:36:43 +0000 (15:36 +0100)]
net/atlantic: remove double function declaration

atl_dev_info_get() is declared twice in atl_ethdev.c.
Delete one of these declarations.

Fixes: bb42aa9ffe4e ("net/atlantic: configure device start/stop")
Cc: stable@dpdk.org
Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Igor Russkikh <igor.russkikh@aquantia.com>
4 years agonet/ice: support multi-process
Xiao Zhang [Thu, 25 Jul 2019 11:18:35 +0000 (19:18 +0800)]
net/ice: support multi-process

Add multiple processes support for ice, secondary processes will share
memory and configuration with primary process, do not need further
initialization for secondary processes.

Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
4 years agonet/null: update license text to SPDX format
Tetsuya Mukawa [Fri, 30 Aug 2019 03:57:49 +0000 (12:57 +0900)]
net/null: update license text to SPDX format

Signed-off-by: Tetsuya Mukawa <mtetsuyah@gmail.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet/szedata2: remove resources when port is closed
Rastislav Cernay [Tue, 27 Aug 2019 21:04:19 +0000 (23:04 +0200)]
net/szedata2: remove resources when port is closed

The rte_eth_dev_close() function now handles freeing resources for
devices (e.g., mac_addrs).  To conform with the new close() behaviour we
are asserting the RTE_ETH_DEV_CLOSE_REMOVE flag so that
rte_eth_dev_close() releases all device level dynamic memory.

Signed-off-by: Rastislav Cernay <cernay@netcope.com>
Acked-by: Jan Remes <remes@netcope.com>
4 years agonet/nfb: remove resources when port is closed
Rastislav Cernay [Tue, 27 Aug 2019 20:37:16 +0000 (22:37 +0200)]
net/nfb: remove resources when port is closed

The rte_eth_dev_close() function now handles freeing resources for
devices (e.g., mac_addrs).  To conform with the new close() behaviour we
are asserting the RTE_ETH_DEV_CLOSE_REMOVE flag so that
rte_eth_dev_close() releases all device level dynamic memory.

Signed-off-by: Rastislav Cernay <cernay@netcope.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Jan Remes <remes@netcope.com>
4 years agoapp/testpmd: remove duplicated Rx offload commands
Flavia Musatescu [Tue, 27 Aug 2019 16:43:15 +0000 (17:43 +0100)]
app/testpmd: remove duplicated Rx offload commands

The testpmd application provides two sets of commands for RX offload
flags configuration. The purpose of this patch is to eliminate this
duplication by removing the old set of commands:
“port config all crc-strip|scatter|rx-cksum|rx-timestamp|hw-vlan|
hw-vlan-filter|hw-vlan-strip|hw-vlan-extend on|off”

The other commands set that can be used instead in order to enable
or disable the same RX offloading flags on all RX queues of a port is:
"port config <port_id> rx_offload crc_strip|scatter|ipv4_cksum|
udp_cksum|tcp_cksum|timestamp|vlan_strip|vlan_filter|vlan_extend on|off"

This patch also fixes the "drop-en" command, which enables packets
dropping on all RX queues of all ports when no receive buffers available
“port config all drop-en on|off”

Fixes: 384161e00627 ("app/testpmd: adjust on the fly VLAN configuration")
Cc: stable@dpdk.org
Signed-off-by: Flavia Musatescu <flavia.musatescu@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet/af_packet: fix stale sockets
Abhishek Sachan [Thu, 22 Aug 2019 06:25:36 +0000 (11:55 +0530)]
net/af_packet: fix stale sockets

af_packet driver is leaving stale socket after device is removed.

Ring buffers are memory mapped when device is added using rte_dev_probe.
There is no corresponding munmap call when device is removed/closed.

This commit fixes the issue by calling munmap
from rte_pmd_af_packet_remove().

Bugzilla ID: 339
Fixes: e6ee4db01b4d ("af_packet: make the device detachable")
Cc: stable@dpdk.org
Signed-off-by: Abhishek Sachan <abhishek.sachan@altran.com>
Reviewed-by: John W. Linville <linville@tuxdriver.com>
4 years agoethdev: fix endian annotation for SPI item
David Marchand [Tue, 20 Aug 2019 13:45:03 +0000 (15:45 +0200)]
ethdev: fix endian annotation for SPI item

Security Parameters Index (SPI) should be set with network endian
values.
While 0xffffffff == htonl(0xffffffff), this missing annotation is
caught by sparse when compiling ovs (dpdk-latest branch).

Fixes: d4b684f7197a ("net: add ESP header to generic flow steering")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
4 years agoethdev: fix doc reference to FDIR disabled mode
Andrew Rybchenko [Sun, 18 Aug 2019 09:37:46 +0000 (10:37 +0100)]
ethdev: fix doc reference to FDIR disabled mode

There is no RTE_FDIR_DISABLE. The right name is RTE_FDIR_MODE_NONE.

Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
4 years agonet/pcap: propagate timestamp from header to mbuf
Sylvain Rodon [Fri, 2 Aug 2019 08:57:24 +0000 (10:57 +0200)]
net/pcap: propagate timestamp from header to mbuf

Timestamp is always set in PCAP header, whether it reads a file or
listen on an interface. This information can be important for some
applications and it cannot be obtained otherwise (especially when
reading a PCAP file, where the timestamp is not the current time).
Timestamp here is the number of microseconds since epoch.

Signed-off-by: Sylvain Rodon <srn@nexatech.fr>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet/ark: implement dynamic log type
Stephen Hemminger [Tue, 16 Jul 2019 18:55:30 +0000 (11:55 -0700)]
net/ark: implement dynamic log type

The generic RTE_LOGTYPE_PMD is a historical relic and should
be deprecated. Every driver must register its own logtype.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet/cxgbe: implement dynamic log type
Stephen Hemminger [Tue, 16 Jul 2019 18:53:31 +0000 (11:53 -0700)]
net/cxgbe: implement dynamic log type

The generic RTE_LOGTYPE_PMD is a historical relic and should
be deprecated. Every driver must register its own logtype.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet/null: replace BSD license with SPDX tag
Stephen Hemminger [Fri, 16 Aug 2019 20:43:21 +0000 (13:43 -0700)]
net/null: replace BSD license with SPDX tag

Replace the boilerplate BSD license text with the equivalent
SPDX license id.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Tetsuya Mukawa <mtetsuyah@gmail.com>
Acked-by: Takanari Hayama <taki@igel.co.jp>
4 years agonet/mlx5: fix TSO flag check
Yongseok Koh [Tue, 20 Aug 2019 16:43:23 +0000 (09:43 -0700)]
net/mlx5: fix TSO flag check

Fix some mistakes in Tx bursts in regard to TSO flag check.

Fixes: 18a1c20044c0 ("net/mlx5: implement Tx burst template")
Cc: stable@dpdk.org
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
4 years agonet/mlx5: fix crash for empty raw encap data
Xiaoyu Min [Tue, 20 Aug 2019 09:47:14 +0000 (17:47 +0800)]
net/mlx5: fix crash for empty raw encap data

For the rte_flow_action_raw_encap, the header definition for
encapsulation must be available, otherwise it will lead to crash on some
OFED versions and logically it should be rejected.

Fixes: 8ba9eee4ce32 ("net/mlx5: add raw data encap/decap to Direct Verbs")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Dekel Peled <dekelp@mellanox.com>
4 years agonet/fm10k: fix stats crash in multi-process
Lu Qiuwen [Wed, 7 Aug 2019 08:24:22 +0000 (16:24 +0800)]
net/fm10k: fix stats crash in multi-process

The ops pointers in fm10k_stats_get() are set up from primary
process, when secondary process calls these ops pointers,
a segment fault will happen.

Fixes: 7223d200c227 ("fm10k: add base driver")
Cc: stable@dpdk.org
Signed-off-by: Lu Qiuwen <luqiuwen@iie.ac.cn>
Acked-by: Xiao Wang <xiao.w.wang@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agonet/i40e: fix VF runtime queues RSS config
Xiao Zhang [Tue, 13 Aug 2019 22:17:45 +0000 (06:17 +0800)]
net/i40e: fix VF runtime queues RSS config

I40evf queue can not work properly with kernel pf driver for X722 vf.
Eg. when configure 8 queues pair, only 4 queues can receive packets,
and half packets will be lost if using 2 queues pair.

This issue is caused by misconfiguration of look up table, the original
code of LUT configuration did not work for X722 vf, use aq command to
setup the LUT to make it work properly.

Fixes: cea7a51c1750 ("i40evf: support RSS")
Cc: stable@dpdk.org
Acked-by: Beilei Xing <beilei.xing@intel.com>
Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
4 years agonet/bonding: prefer allmulti to promiscuous for LACP
David Marchand [Wed, 10 Apr 2019 12:53:49 +0000 (14:53 +0200)]
net/bonding: prefer allmulti to promiscuous for LACP

Rather than the global promiscuous mode on all slaves, let's try to use
allmulti.
To do this, we apply the same mechanism than for promiscuous and drop in
rx_burst.

When adding a slave, we first try to use allmulti, else we try
promiscuous.
Because of this, we must be able to handle allmulti on the bonding
interface, so the associated dev_ops is added with checks on which mode
has been applied on each slave.

Rather than add a new flag in the bond private structure, we can remove
promiscuous_en since ethdev already maintains this information.
When starting the bond device, there is no promisc/allmulti re-apply
as, again, ethdev does this itself.

On reception, we must inspect if the packets are multicast or unicast
and take a decision to drop based on which mode has been enabled on the
bonding interface.

Note: in the future, if we define an API so that we can add/remove mc
addresses to a port (rather than the current global set_mc_addr_list
API), we can refine this to only register the LACP multicast mac
address.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Chas Williams <chas3@att.com>
4 years agonet/bonding: fix unicast packets filtering
David Marchand [Wed, 10 Apr 2019 12:53:48 +0000 (14:53 +0200)]
net/bonding: fix unicast packets filtering

By default, the 802.3ad code enables promisc mode on all slaves.
To avoid all packets going to the application (unless the application
asked for promiscuous mode), all frames are supposed to be filtered in
the rx burst handler.

However the incriminated commit broke this because non pure ethernet
frames (basically any unicast Ether()/IP() packet) are not filtered
anymore.

Fixes: 71b7b37ec959 ("net/bonding: use ptype flags for LACP Rx filtering")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Chas Williams <chas3@att.com>
4 years agonet/bonding: fix LACP fast queue Rx handler
David Marchand [Wed, 10 Apr 2019 12:53:47 +0000 (14:53 +0200)]
net/bonding: fix LACP fast queue Rx handler

Fast queue Rx burst function is missing checks on promisc and the
slave collecting state.
Define an inline wrapper to have a common base.

Fixes: 112891cd27e5 ("net/bonding: add dedicated HW queues for LACP control")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Chas Williams <chas3@att.com>
4 years agonet/bonding: fix out of bound access in LACP mode
David Marchand [Wed, 10 Apr 2019 12:53:46 +0000 (14:53 +0200)]
net/bonding: fix out of bound access in LACP mode

We'd better consolidate the fast queue and the normal tx burst functions
under a common inline wrapper for maintenance.

But looking closer at the bufs_slave_port_idxs[] mapping array in those
tx burst functions, its size is invalid since up to nb_bufs are handled
here.
A previous patch [1] fixed this issue for balance tx burst function
without mentioning it.

802.3ad and balance modes are functionally equivalent on transmit.
The only difference is on the slave id distribution.
Add an additional inline wrapper to consolidate even more and fix this
issue.

[1]: https://git.dpdk.org/dpdk/commit/?id=c5224f623431

Fixes: 09150784a776 ("net/bonding: burst mode hash calculation")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Chas Williams <chas3@att.com>
4 years agoversion: 19.11-rc0
David Marchand [Tue, 13 Aug 2019 12:18:48 +0000 (14:18 +0200)]
version: 19.11-rc0

Start a new release cycle with empty release notes.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
4 years agoversion: 19.08.0
Thomas Monjalon [Sun, 11 Aug 2019 09:37:19 +0000 (11:37 +0200)]
version: 19.08.0

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
4 years agodoc: add guidelines for initial PMD submission
Rami Rosen [Fri, 12 Apr 2019 10:26:51 +0000 (13:26 +0300)]
doc: add guidelines for initial PMD submission

This patch for DPDK Contributor's Guidelines indicates the repos
against which a new PMD should be prepared; for example, for new
network ethernet PMDs it should be dpdk-next-net, and for new crypto
PMDs it should be dpdk-next-crypto. For other new PMDs, the
contributor should refer to the MAINTAINERS file. Though this may seem
obvious, it is not mentioned in DPDK documentation.

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Last contribution, last commit closing the release.
Thank you Rami, you will be missed.

4 years agoexamples/qos_meter: fix color type conversion
Jasvinder Singh [Fri, 9 Aug 2019 09:37:13 +0000 (10:37 +0100)]
examples/qos_meter: fix color type conversion

In APP_MODE_SRTCM_COLOR_AWARE mode, sample app compilation fails
due to wrong meter color type conversion.

error log-
/qos_meter/main.c:error: conversion to incomplete type
(enum rte_meter_color) input_color);

Fixes: c1656328dbc2 ("meter: replace color definitions")
Cc: stable@dpdk.org
Reported-by: Yuan Peng <yuan.peng@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
4 years agonet/bnxt: revert fix traffic stall on stop/start
Lance Richardson [Fri, 9 Aug 2019 17:22:08 +0000 (13:22 -0400)]
net/bnxt: revert fix traffic stall on stop/start

This reverts commit aa2c00702bad7b2c742e11a86cb9dbbb8364fd88, which
introduced the possibility of an invalid address exception when running
an application with a stopped receive queue. The issues with rxq stop/start
 will be revisited in the 19.11 release timeframe.

Fixes: aa2c00702bad ("net/bnxt: fix traffic stall on Rx queue stop/start")
Cc: stable@dpdk.org
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
4 years agodoc: announce ethdev ABI change for LRO fields
Matan Azrad [Tue, 6 Aug 2019 14:56:22 +0000 (14:56 +0000)]
doc: announce ethdev ABI change for LRO fields

It may be needed by the user to limit the LRO session packet size.
In order to allow the above limitation, a new Rx configuration may be
added for the maximum LRO session size.

A new capability may be added too to expose the maximum LRO session size
supported by the port.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
4 years agodoc: announce ethdev API changes in offload flags
Pavan Nikhilesh [Fri, 9 Aug 2019 09:55:59 +0000 (15:25 +0530)]
doc: announce ethdev API changes in offload flags

Add new offload flags ``DEV_RX_OFFLOAD_RSS_HASH`` and
``DEV_RX_OFFLOAD_FLOW_MARK``.
Add new function ``rte_eth_dev_set_supported_ptypes`` to allow application
to set specific ptypes to be updated in ``rte_mbuf::packet_type``

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
4 years agodoc: announce removal of old port count function
Thomas Monjalon [Tue, 6 Aug 2019 13:31:35 +0000 (15:31 +0200)]
doc: announce removal of old port count function

The function rte_eth_dev_count() was marked as deprecated in DPDK 18.05
in commit d9a42a69febf ("ethdev: deprecate port count function").
It is planned to be removed after the next LTS release.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
4 years agodoc: announce ethdev functions will not return void
Andrew Rybchenko [Tue, 23 Jul 2019 14:07:51 +0000 (15:07 +0100)]
doc: announce ethdev functions will not return void

void return value is bad for get API (like rte_eth_dev_info-get())
since caller does not know if the function does its job or not and
output value is filled in.

void return value is bad for state changing API (like
rte_eth_promiscuous_enable()) since caller should use get API
to understand if state is really changed.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Jerin Jacob <jerinj@marvell.com>
4 years agodoc: announce ethernet structures alignment changes
Stephen Hemminger [Fri, 19 Jul 2019 16:56:31 +0000 (09:56 -0700)]
doc: announce ethernet structures alignment changes

Tell users about upcoming changes to rte_ether_addr and
rte_ether_header.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
4 years agodoc: announce lcore config struct removal from ABI
David Marchand [Thu, 8 Aug 2019 09:31:29 +0000 (11:31 +0200)]
doc: announce lcore config struct removal from ABI

New accessors have been introduced to provide the hidden information.
This symbol can now be kept internal.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
4 years agodoc: announce malloc virt2phys function removal
David Marchand [Thu, 8 Aug 2019 09:32:06 +0000 (11:32 +0200)]
doc: announce malloc virt2phys function removal

This symbol has been deprecated for quite some time.
Let's drop it as soon as possible.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
4 years agodoc: announce CPU flags check function removal
David Marchand [Thu, 8 Aug 2019 09:30:46 +0000 (11:30 +0200)]
doc: announce CPU flags check function removal

This symbol has been deprecated for quite some time.
Let's drop it as soon as possible.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
4 years agousertools: fix input handling in telemetry script
Andrius Sirvys [Thu, 8 Aug 2019 14:37:52 +0000 (15:37 +0100)]
usertools: fix input handling in telemetry script

This commit removes the unnecesarry ast.literal_eval() function call
from the input handling, which now relies just on raw_input() to get
its input.

Fixes: 53f293c9a783 ("usertools: replace unsafe input function")
Cc: stable@dpdk.org
Signed-off-by: Andrius Sirvys <andrius.sirvys@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
4 years agoeal: increase maximum different hugepage sizes on Arm
Gagandeep Singh [Thu, 8 Aug 2019 12:13:20 +0000 (17:43 +0530)]
eal: increase maximum different hugepage sizes on Arm

ARM is supporting maximum 4 hugepage sizes (64K, 2M, 32M
and 1G) when granule is 4KB since very long and DPDK
support maximum 3 hugepage sizes.

With all 4 hugepage sizes enabled, applications and some
stacks like VPP which are working over DPDK and using
"in-memory" eal option, or using separate mount points
on ARM based platform, fails at huge page initialization,
reporting error messages from eal:

EAL: FATAL: Cannot get hugepage information.
EAL: Cannot get hugepage information.
EAL: Error - exiting with code: 1

This issue is originated from Linux 5.0
(a21b0b78eaf7 "arm64: hugetlb: Register hugepages during arch init")
where kernel is by default creating directories for each supported
hugepage size in /sys/kernel/mm/hugepages/

On earlier Stable Kernel LTR's, the directories visible in
/sys/kernel/mm/hugepages/ were dependent upon what hugepage
sizes are configured at boot time.

This change increases the maximum supported hugepage sizes
to 4 for ARM based platforms.

Cc: stable@dpdk.org
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
4 years agonet/ixgbe/base: fix product version check
Congwen Zhang [Thu, 8 Aug 2019 00:37:20 +0000 (08:37 +0800)]
net/ixgbe/base: fix product version check

The "and" condition offset == 0 && offset == NVM_INVALID_PTR
 can never be true.

Fixes: cf3af5aa56c9 ("net/ixgbe/base: add functions to get version info")
Cc: stable@dpdk.org
Signed-off-by: Congwen Zhang <zhang.congwen@zte.com.cn>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agonet/mlx5: fix completion request for multi-segment
Viacheslav Ovsiienko [Wed, 7 Aug 2019 12:58:10 +0000 (12:58 +0000)]
net/mlx5: fix completion request for multi-segment

The copying of sent mbufs pointers might be deferred to the end of
tx_burst() routine to be copied in one call of rte_memcpy.
For the multi segment packets this optimization is not applicable,
because number of packets does not match with number of mbufs and
we do not have linear array of pointers in pkts parameter.

The completion request generating routine wrongly took into account
the inconsistent (for multi-segment packets) deferred pointer copying.

Fixes: 5a93e173b874 ("net/mlx5: fix Tx completion request generation")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
4 years agodoc: add limitation with mlx5 Tx inline settings
Viacheslav Ovsiienko [Thu, 8 Aug 2019 11:47:23 +0000 (11:47 +0000)]
doc: add limitation with mlx5 Tx inline settings

Introduces the possible limitations on maximal Tx queue
size in descriptors if Tx inline data are enabled.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
4 years agodoc: update Tx inline settings in mlx5 guide
Viacheslav Ovsiienko [Wed, 7 Aug 2019 12:57:47 +0000 (12:57 +0000)]
doc: update Tx inline settings in mlx5 guide

This patch updates mlx5 documentation in parts:

  - txq_inline_min parameter is described in more details,
    values are fixed

  - maximal amount of segments in multi-segment packets.

Fixes: 38b4b397a57d ("net/mlx5: add Tx configuration and setup")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Raslan Darawsheh <rasland@mellanox.com>
4 years agotest/mcslock: wait for lcore completion
Aaron Conole [Wed, 7 Aug 2019 14:58:44 +0000 (10:58 -0400)]
test/mcslock: wait for lcore completion

It's possible that the mcsunlock occurs before the test_mcslock_try has
a chance to execute, which will result in the trylock being successful,
making the test case fail.  Fix this by waiting until all lcores have
completed their test before unlocking the master lock.

Fixes: 32dcb9fd2a22 ("test/mcslock: add MCS queued lock unit test")

Signed-off-by: Aaron Conole <aconole@redhat.com>
Acked-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
4 years agoapp/testpmd: fix latency stats deinit on signal
Amit Gupta [Wed, 7 Aug 2019 13:12:09 +0000 (18:42 +0530)]
app/testpmd: fix latency stats deinit on signal

On receiving signal, testpmd showing warning as
"LATENCY_STATS: failed to remove Rx/Tx callback"
because rte_latencystats_uninit is called without
checking if latencystats is enabled or not.

After this fix, rte_latencystats_uninit will be
called only if latencystats is enabled.

Fixes: 62d3216d6194 ("app/testpmd: add latency statistics calculation")
Cc: stable@dpdk.org
Signed-off-by: Amit Gupta <agupta3@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Tested-by: Jerin Jacob <jerinj@marvell.com>
4 years agonet/memif: fix build with gcc 9.1
Jerin Jacob [Wed, 7 Aug 2019 03:11:34 +0000 (08:41 +0530)]
net/memif: fix build with gcc 9.1

gcc-9 is stricter on NULL arguments for printf.
Fix the following build error by avoiding NULL argument to printf.

In file included from drivers/net/memif/memif_socket.c:26:
In function 'memif_socket_create',
inlined from 'memif_socket_init' at net/memif/memif_socket.c:965:12:
net/memif/rte_eth_memif.h:35:2: error:
'%s' directive argument is null [-Werror=format-overflow=]
   35 |  rte_log(RTE_LOG_ ## level, memif_logtype, \
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   36 |   "%s(): " fmt "\n", __func__, ##args)
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fixes: 09c7e63a71f9 ("net/memif: introduce memory interface PMD")

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
4 years agoversion: 19.08-rc4
Thomas Monjalon [Tue, 6 Aug 2019 21:50:31 +0000 (23:50 +0200)]
version: 19.08-rc4

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
4 years agodoc: advise patching third party dependencies
John McNamara [Tue, 30 Jul 2019 11:07:55 +0000 (12:07 +0100)]
doc: advise patching third party dependencies

Added a note to the getting started guides about patching third
party libraries/dependencies to avoid any known vulnerabilities.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
4 years agodoc: remove deprecated ethdev features
Thomas Monjalon [Tue, 30 Jul 2019 15:57:26 +0000 (17:57 +0200)]
doc: remove deprecated ethdev features

As legacy filter API "filter_ctrl" is superseded since 2017
by the rte_flow API, and got the deprecated attribute in DPDK 19.05,
it is time to remove the associated features from the matrix.
Not documenting deprecated features as supported will avoid confusion.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
4 years agoapp/bbdev: fix bulk allocation checks
Nicolas Chautru [Tue, 6 Aug 2019 14:09:00 +0000 (07:09 -0700)]
app/bbdev: fix bulk allocation checks

Returned value from rte_bbdev_enc_op_alloc_bulk not checked consistently.

Coverity issue: 344986
Fixes: d819c08327f3 ("app/bbdev: update for 5GNR")

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
4 years agobaseband/turbo_sw: remove dead code
Nicolas Chautru [Tue, 6 Aug 2019 14:08:59 +0000 (07:08 -0700)]
baseband/turbo_sw: remove dead code

Error handling code cannot logically be reached.

Coverity issue: 344980, 344992
Fixes: c769c711757a ("baseband/turbo_sw: extend for 5G")

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
4 years agonet/mlx5: fix memory event callback list
Viacheslav Ovsiienko [Tue, 6 Aug 2019 15:00:33 +0000 (15:00 +0000)]
net/mlx5: fix memory event callback list

The shared Infiniband device context should be included
into memory event callback list only once on context creation,
and removed from the list only once on context destroying.
Multiple insertions of the same object caused the infinite
loop on the list processing.

Fixes: ccb3815346e6 ("net/mlx5: update memory event callback for shared context")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
4 years agonet/mlx5: fix RSS expand for IP-in-IP
Xiaoyu Min [Wed, 24 Jul 2019 11:31:56 +0000 (19:31 +0800)]
net/mlx5: fix RSS expand for IP-in-IP

The RSS expand function for IP-in-IP tunnel type is missed,
which leads to create following flow failed:

   flow create 0 ingress pattern eth / ipv4 proto is 4 /
        ipv4 / udp / end actions rss queues 0 1 end level 2
types ip ipv4-other udp ipv4 ipv4-frag end /
mark id 221 / count / end

In order to make RSS expand function working correctly,
now the way to check whether a IP tunnel existing is to
check whether there is the second IPv4/IPv6 item and whether the
first IPv4/IPv6 item's next protocl is IPPROTO_IPIP/IPPROTO_IPV6.
For example:
  ... pattern eth / ipv4 proto is 4 / ipv4 / ....

Fixes: 5e33bebdd8d3 ("net/mlx5: support IP-in-IP tunnel")

Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
4 years agodoc: add more details about mlx5 offloads
Thomas Monjalon [Mon, 5 Aug 2019 15:32:22 +0000 (17:32 +0200)]
doc: add more details about mlx5 offloads

Add firmware config for MPLS and DevX (required by LRO and DR).

Add a table for queue offloads requirements.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Raslan Darawsheh <rasland@mellanox.com>
4 years agodoc: add mlx5 design details
Thomas Monjalon [Mon, 5 Aug 2019 15:32:21 +0000 (17:32 +0200)]
doc: add mlx5 design details

Some details about libibverbs were missing:
- automatic detection by meson
- main ways to access the device

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Raslan Darawsheh <rasland@mellanox.com>
4 years agodoc: remove useless console syntax in mlx guides
Thomas Monjalon [Mon, 5 Aug 2019 15:32:20 +0000 (17:32 +0200)]
doc: remove useless console syntax in mlx guides

It is not needed to use "console" syntax highlighting
for literal blocks.
The file is easier to read by removing the code-block lines
and simply having double colons in previous line.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Raslan Darawsheh <rasland@mellanox.com>
4 years agodoc: fix wording and formatting of mlx5 guide
Thomas Monjalon [Mon, 5 Aug 2019 15:32:19 +0000 (17:32 +0200)]
doc: fix wording and formatting of mlx5 guide

These are simple fixes of punctuation, anchor placement
or wording.
The table format is fixed to avoid having a long line
in the first column.

Fixes: 909be50a34d0 ("doc: update Mellanox guides and release notes")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Raslan Darawsheh <rasland@mellanox.com>
4 years agodoc: improve firmware configuration in mlx5 guide
Thomas Monjalon [Mon, 5 Aug 2019 15:32:18 +0000 (17:32 +0200)]
doc: improve firmware configuration in mlx5 guide

The command mlxconfig was not enough explained and too much verbose
at the same time.
The syntax is now explained in introduction before listing the options,
without repeating the commands.
Some options, which are explained elsewhere in the doc,
are added to this list.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Raslan Darawsheh <rasland@mellanox.com>