Commit Graph

21214 Commits

Author SHA1 Message Date
Wei Hu (Xavier)
150c9ac2df app/testpmd: update Rx offload after setting MTU
Currently, Rx offload capabilities and max_rx_pkt_len in the struct
variable named rte_port are not updated after setting mtu successfully
in port_mtu_set function by 'port config mtu <port_id> <value>' command.
This may lead to reconfig mtu to the initial value in the driver when
recalling rte_eth_dev_configure API interface.

This patch updates Rx offload capabilities and max_rx_pkt_len after
setting mtu successfully when configuring mtu.

Fixes: ae03d0d18a ("app/testpmd: command to configure MTU")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2020-02-14 12:42:13 +01:00
Thomas Monjalon
0654d4a8ad app/testpmd: fix hot-unplug detaching
There is a possible race condition in the hotplug path
in rmv_port_callback(). If a port is created between
close_port(port_id) and detach_port_device(port_id),
then the port_id will have been reallocated to a different
device which will be wrongly detached.

Since a check was added in detach_port_device() for
manual detach case, the hotplug path was even more broken.
It became impossible to run because the new check prevented
to run detach_port_device() after the port is closed.

The solution for both issues is to not rely on the port_id
for detaching the rte_device.
The function detach_port_device() is split to allow calling
detach_device() directly with the rte_device pointer, saved
before closing the port.

Fixes: 43d0e30498 ("app/testpmd: fix invalid port detaching")
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2020-02-14 12:42:13 +01:00
Thomas Monjalon
5edee5f6da app/testpmd: rename function for detaching by devargs
There is a function detach_port_device() which takes a port_id,
and a function detach_device() which takes a devargs string.
In order to add a third function accepting a rte_device pointer,
the function detach_device() is renamed into detach_devargs().

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2020-02-14 12:42:13 +01:00
Thomas Monjalon
c8743d5f15 app/testpmd: add port check before manual detach
User may try to run "port detach <port_id>"
for an already detached device.
It has been decided to protect from such usage in testpmd,
so a check was added to detach_port_device() in DPDK 19.11.
This check might be removed to allow hotplug path detaching
the device of a closed port.
Whatever will be decided in future, this check is also added
before the call to detach_port_device().

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2020-02-14 12:42:13 +01:00
Adrian Moreno
4f37df14c4 vhost: protect log address translation in IOTLB update
Currently, the log address translation only  happens in the vhost-user's
translate_ring_addresses(). However, the IOTLB update handler is not
checking if it was mapped to re-trigger that translation.

Since the log address mapping could fail, check it on iotlb updates.
Also, check it on vring_translate() so we do not dirty pages if the
logging address is not yet ready.

Additionally, properly protect the accesses to the iotlb structures.

Fixes: fbda9f1459 ("vhost: translate incoming log address to GPA")
Cc: stable@dpdk.org

Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2020-02-14 12:42:13 +01:00
Jin Yu
c47edd040a vhost: fix inflight resubmit check
The frontend may not send the get_inflight_fd and
set_inflight_fd although we negotiate the protocol
feature. When we meet this situation just return OK.

Fixes: ad0a4ae491 ("vhost: checkout resubmit inflight information")
Cc: stable@dpdk.org

Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2020-02-14 12:42:13 +01:00
Cheng Jiang
f1ad96fac7 doc: fix release notes for virtio
Add release notes for the notification data feature of virtio-PMD.

Fixes: 7e72f3ec1a ("net/virtio: support packed ring notification data")

Signed-off-by: Cheng Jiang <cheng1.jiang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2020-02-14 12:42:13 +01:00
Jin Yu
71dd2870bf examples/vhost_blk: fix check of device path
Fix the time of check time of use warning in example code.
Ignore the errno of unlink failure. There are two situations.
The first one is that file doesn't exist the unlink fails and
it's ok to ignore. The second one is that unlink fails to remove
file but the next bind() would fail too.

Coverity issue: 350589, 158663
Fixes: c19beb3f38 ("examples/vhost_blk: introduce vhost storage sample")
Cc: stable@dpdk.org

Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2020-02-14 12:42:13 +01:00
Itsuro Oda
facb02874d net/vhost: remove an unused member
This patch removes an unused member from pmd_internal.

Signed-off-by: Itsuro Oda <oda@valinux.co.jp>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2020-02-14 12:42:13 +01:00
Itsuro Oda
75ad5aadbd net/vhost: fix probing in secondary process
This patch adds lacking member setting and makes secondary
probe complete.

Fixes: 4852aa8f6e ("drivers/net: enable hotplug on secondary process")
Cc: stable@dpdk.org

Signed-off-by: Itsuro Oda <oda@valinux.co.jp>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2020-02-14 12:42:13 +01:00
Itsuro Oda
3d01b759d2 net/vhost: delay driver setup
Vhost driver setup is delayed at eth_dev configuration
in order to be able to set it from a secondary process.

Fixes: 4852aa8f6e ("drivers/net: enable hotplug on secondary process")
Cc: stable@dpdk.org

Signed-off-by: Itsuro Oda <oda@valinux.co.jp>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2020-02-14 12:42:13 +01:00
Itsuro Oda
e045e85844 net/vhost: allocate interface name from heap
This patch allocates iface_name of pmd_internal from heap
in order to be able to refer from secondary processes.

Fixes: 4852aa8f6e ("drivers/net: enable hotplug on secondary process")
Cc: stable@dpdk.org

Signed-off-by: Itsuro Oda <oda@valinux.co.jp>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2020-02-14 12:42:13 +01:00
Maxime Coquelin
966f89d998 vhost: check message header size read
This patch adds a check to ensure the read size of
the Vhost-user message header is not smaller than
the expected size.

In case of unexpected read size, report an error
and close file descriptors passed with the message,
if any.

Fixes: 8f972312b8 ("vhost: support vhost-user")
Cc: stable@dpdk.org

Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
2020-02-14 12:42:13 +01:00
Thomas Monjalon
e21492a517 net/mlx: fix overlinking with meson and glue dlopen
If ibverbs_link is dlopen, the PMD and application should not
be linked with ibverbs, but the glue library is.
Unfortunately the ibverbs dependency was exported in the
variable ext_deps, so there were overlinking.

It is fixed by not exporting the dependency in ext_deps,
and recreating a limited dependency object for cflags only.

Fixes: 1dd7c7e38c ("net/mlx4: support meson build")
Fixes: 96d7c62a70 ("net/mlx5: support meson build")
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2020-02-14 12:42:13 +01:00
Thomas Monjalon
76c72a34bb net/mlx: rename meson variable for dlopen option
The name of the variable pmd_dlopen is confusing because
it can be understood as true if the PMD is dlopen,
whereas it means the ibverbs glue layer is a dlopen library.
That's why it is renamed dlopen_ibverbs.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2020-02-14 12:42:13 +01:00
Thomas Monjalon
af331158f2 net/mlx: workaround static linkage with meson
If ibverbs_link is static and the application choose to link DPDK
as static libraries, both PMD and ibverbs libraries must be linked
as static libraries. And the dependencies of ibverbs (netlink) must
still be linked as shared libraries.

Unfortunately, meson forget about the static requirement for ibverbs
when generating the .pc file.
As a result, libibverbs, libmlx4, libmlx5 are listed in Requires.private
section (allowing to be linked as shared libraries) and libnl is missing.

A fix is in progress for meson, but anyway we will have to live without
such a fix until a better version of meson is widely available:
	https://github.com/mesonbuild/meson/pull/6393

In order to avoid meson suggesting shared libraries in the section
Requires.private of the .pc file, the dependency object is recreated
with declare_dependency():
	- cflags are extracted the libibverbs.pc
	- ldflags, from libibverbs.pc, are processed to force
	static flavor of ibverbs libraries, thanks to this syntax:
			-l:libfoo.a

Fixes: 6affeabaf3 ("net/mlx: add static ibverbs linkage with meson")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2020-02-14 12:42:13 +01:00
Thomas Monjalon
2cca60310a buildtools: get static mlx dependencies for meson
The shell script options-ibverbs-static.sh was used with make
in forcing static linkage of ibverbs libraries.

When choosing to link with a static dependency in meson,
the generated .pc file will not force such static linkage.
The solution will rely on using this script in meson.

If linking with libraries installed in a non-standard path,
an option -L is provided via EXTRA_LDFLAGS in case of using make.
With meson, tuning PKG_CONFIG_PATH for pkg-config should be enough.
When statically linking an application, the .pc file must save the
-L path so the application link will work without any extra option.
That's why --libs-only-l is replaced with --libs which includes -L.
Options which are neither -l or -L are filtered out because not needed
and can cause compilation issues with the legacy system using make.

The other change in this script is to drop the first occurrences of the
main library file (libiverbs.a). Only the last occurrence is kept.
It fixes some undefined references when linking a static application
using libdpdk.pc.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2020-02-14 12:42:13 +01:00
Thomas Monjalon
6affeabaf3 net/mlx: add static ibverbs linkage with meson
The libibverbs (and libmlx4/5) can be statically embedded
in the shared PMD library, or in the application with the static PMD.
It was supported with make build system in
commit 2c0dd7b69f ("config: add static linkage of mlx dependency").

The same feature is enabled with meson when using pkg-config
(i.e. only if the call to dependency() is successful).
The fallback method for searching library with cc.find_library()
is not supported because the dependencies of the found library
would not be linked (no such info in .a file unlike .so).

The main difference, in meson build system, is the generated .pc file
giving arguments to link DPDK with the application.
Unfortunately the .pc file will not keep memory of the static linkage
option for libibverbs.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2020-02-14 12:42:13 +01:00
Thomas Monjalon
79ece3649a drivers: cleanup meson build variable
The variable build is already initialized as true in
drivers/meson.build. Duplicate initializations can be removed from mlx.

When the variable build is set to false, it is easier to call
subdir_done() than branch the rest of the code on build condition.

Suggested-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Rosen Xu <rosen.xu@intel.com>
2020-02-14 12:42:12 +01:00
Matan Azrad
4231be021a common/mlx5: fix glue dlopen with meson build
The glue shared library name was created by the common class FMT name,
driver_name_fmt = 'rte_common_@0@', which is not correlated with
LIB_GLUE_BASE = 'librte_pmd_mlx5_glue.so'.

This causes the dynamic linkage of the glue library to fail what
remained mlx5 drivers outside the PCI driver list.

The command:
MLX5_GLUE_PATH=$(pwd)/build-meson/drivers/common/mlx5
build-meson/app/dpdk-testpmd -n 4  -w 0000:00:05.0 -w 0000:00:06.0 -- -i

The log:
common_mlx5: Cannot load glue library:
/usr/local/lib64/dpdk/pmds-20.0.1-glue/librte_pmd_mlx5_glue.so.20.02.0:
cannot open shared object file: No such file or directory

Adjust the shared library name to the LIB_GLUE_BASE definition.

Fixes: 7b4f1e6bd3 ("common/mlx5: introduce common library")

Signed-off-by: Matan Azrad <matan@mellanox.com>
2020-02-14 12:42:12 +01:00
Ciara Loftus
1668e87d4d net/af_xdp: fix maximum MTU
The maximum MTU for af_xdp zero copy is equal to the page size less the
frame overhead introduced by AF_XDP (XDP HR = 256) and DPDK (frame
headroom = 320). The patch updates this value to reflect this.

This change also makes it possible to remove unneeded constants for both
zero-copy and copy mode.

Fixes: d8a210774e ("net/af_xdp: support unaligned umem chunks")
Cc: stable@dpdk.org

Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
2020-02-14 12:42:12 +01:00
Ciara Loftus
96d8ae9990 net/af_xdp: fix fill queue addresses
The fill queue addresses should start at the beginning of the mempool
object instead of the beginning of the mbuf. This is because the umem
frame headroom includes the mp hdrobj size. Starting at this point
ensures AF_XDP doesn't write past the available room in the frame, in
the case of larger packets which are close to the size of the mbuf.

Fixes: d8a210774e ("net/af_xdp: support unaligned umem chunks")
Cc: stable@dpdk.org

Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
2020-02-14 12:42:12 +01:00
Ciara Loftus
b79ae90c78 net/af_xdp: fix umem frame size and headroom
The previous frame size calculation incorrectly used
mb_pool->private_data_size and didn't include mb_pool->header_size.
Instead of performing a manual calculation, use the
rte_mempool_calc_obj_size API to determine the frame size.

The previous frame headroom calculation also incorrectly used
mb_pool->private_data_size and didn't include mb_pool->header_size or
the mbuf priv size. Fix this.

Fixes: d8a210774e ("net/af_xdp: support unaligned umem chunks")
Cc: stable@dpdk.org

Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
2020-02-14 12:42:12 +01:00
Hariprasad Govindharajan
2df00d562d app/testpmd: add --portlist option
In current version, we are setting the ports
using portmask. With portmask, we can use only
up to 64 ports. This portlist option enables the user
to use more than 64 ports.
Now we can specify the ports in 2 different ways
 - Using portmask (-p [0x]nnn): mask must be in hex format
 - Using portlist in the following format
 --portlist <p1>[-p2][,p3[-p4],...]

 --portmask 0x2 is same as --portlist 1
 --portmask 0x3 is same as --portlist 0-1

Signed-off-by: Hariprasad Govindharajan <hariprasad.govindharajan@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
2020-02-14 12:42:12 +01:00
Suanming Mou
431f199883 net/mlx5: fix meter header modify before decap
The meter flows are split into three subflows each, the prefix subflow
with meter action color the packet, the meter subflow filters out the
colored packets, the suffix subflow applies all the remaining actions
to the passed packets. The tag header modify action is added to the
prefix subflow to make the suffix subflow to match the packets from the
prefix subflow.

Currently, the tag header modify action is added at the beginning in the
prefix subflow even before decap action. The header modify action does
not make sense to the later decap action, so the flow create will be
validated as incorrect flow rule and failed.

Move the tag header modify action just before meter action in the prefix
subflow to make the flow with decap action to do the decap first, then
do the tag and meter to fix that issue.

Fixes: 9ea9b049a9 ("net/mlx5: split meter flow")
Cc: stable@dpdk.org

Reported-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
2020-02-14 12:42:12 +01:00
Dekel Peled
00f75a4057 net/mlx5: fix VLAN match for DV mode
Currently MLX5 PMD can't match on untagged packets specifically.
Tagged traffic still hits the flows intended for untagged packets.
If the flow has ETH, it will catch all matching packets, tagged
and untagged.
The solution is to use cvlan_tag bit.
If mask=1 and value=0 it matches on untagged traffic.
If mask=1 and value=1 it matches on tagged traffic.
This is the kernel implementation.

This patch updated MLX5 PMD to set cvlan_tag mask and value according
to flow rule contents.
This update is relevant when using DV flow engine (dv_flow_en=1).

See example at https://doc.dpdk.org/guides/nics/mlx5.html#limitations.

Fixes: fc2c498ccb ("net/mlx5: add Direct Verbs translate items")
Cc: stable@dpdk.org

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
2020-02-14 12:42:12 +01:00
Wisam Jaddo
a262726ed4 net/mlx5: fix blocker for push VLAN on Rx
The blocker should take FDB into consideration, since FDB all directions
have transfer ingress in it.

Fixes: 55060e62e4 ("net/mlx5: block push VLAN action on Rx")
Cc: stable@dpdk.org

Signed-off-by: Wisam Jaddo <wisamm@mellanox.com>
Acked-by: Raslan Darawsheh <rasland@mellanox.com>
2020-02-14 12:42:12 +01:00
Viacheslav Ovsiienko
0eb89ba9f4 app/testpmd: fix txonly flow generation entropy
The testpmd application in txonly forwarding mode has an option
to generate the packet flows by varying the destination IP address.
The patch increments the IP for each packet sent, this improves
the entropy and RSS distribution on the peer receiving size
is getting more uniform.

Fixes: 01b645dcff ("app/testpmd: move txonly prepare in separate function")
Cc: stable@dpdk.org

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2020-02-14 12:42:12 +01:00
Shougang Wang
e07e2ca9e5 net/ixgbe: remove dead code
This patch fixes (Logically dead code) coverity issue.

Coverity issue: 353624
Fixes: ba7b12dd64 ("net/ixgbe: fix link up in FreeBSD")
Cc: stable@dpdk.org

Signed-off-by: Shougang Wang <shougangx.wang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
2020-02-14 12:42:12 +01:00
Thomas Monjalon
b689a78173 net/mlx: replace hardcoded value with macro
Replace checking against 65535 limit,
with a simpler form using RTE_MIN and UINT16_MAX macros.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Matan Azrad <matan@mellanox.com>
2020-02-14 12:42:12 +01:00
Viacheslav Ovsiienko
7593cf1d35 net/mlx5: fix legacy multi-packet write session
To provide the better PCIe bandwidth utilization the ConnectX-4LX
NIC supports the multi-packet write (MPW) sessions allowing to
pack multiple packets into one descriptor (WQE). This is legacy
feature and it has some limitations on the packets and data
description segments. To provide the best performance all inline
packets must be put into shared data segment and the total length
of MPW session must be limited. The limit is controlled with
txq_inline_mpw devarg.

Fixes: 82e75f8323 ("net/mlx5: fix legacy multi-packet Tx descriptors")
Cc: stable@dpdk.org

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
2020-02-14 12:42:12 +01:00
Zhaoyan Chen
642a4fcc90 doc: split versions table in i40e guide
Split recommended mapping table for X710/XL710/XXV710 and X722,
since they have different firmware versions.

Signed-off-by: Zhaoyan Chen <zhaoyan.chen@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
2020-02-14 12:42:12 +01:00
Haiyue Wang
9e0c99502d common/iavf: fix ABI version
The new symbols should be in ABI version 20.0.1.

Fixes: 89214fe915 ("net/iavf/base: move to drivers common directory")

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
2020-02-14 12:42:12 +01:00
Matan Azrad
06387be8ea net/mlx5: fix encap/decap validation
The encapsulation and decapsulation actions are divided into 2 types:
L2 and L3.
In order to configure L3 xcapsulation actions the user should use both
RAW_DECAP and RAW_ENCAP and setting the appropriated data sizes in
their action configuration structures.

The PMD flow validation wrongly didn't detect the RAW_DECAP
and RAW_ENCAP combination to distinguish between L3_DECAP and L3_ENCAP.
Thus, some xcapsulation related validation failed.
For example, when configuring modify header action before L3_DECAP.

Simplify the xcapsulation defines and fix the L3 xcapsulation detection
using the action configuration data sizes.

By the way, add the hairpin validation in this area.

Fixes: d85c7b5ea5 ("net/mlx5: split hairpin flows")
Fixes: 8ba9eee4ce ("net/mlx5: add raw data encap/decap to Direct Verbs")
Cc: stable@dpdk.org

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
2020-02-14 12:42:12 +01:00
Stephen Hemminger
047ad3787a net/netvsc: initialize link state
If application is using link state interrupt, the correct link state
needs to be filled in when device is started. This is similar to
how virtio updates link information.

Fixes: 4e9c73e96e ("net/netvsc: add Hyper-V network device")
Cc: stable@dpdk.org

Reported-by: Mohammed Gamal <mgamal@redhat.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Tested-by: Mohammed Gamal <mgamal@redhat.com>
2020-02-14 12:42:12 +01:00
Bernard Iremonger
2ab5c84605 net/i40e: fix ESP flow creation
Merge of ESP and L2TP code in i40e_fdir.c added checks on
cus_pctype->index which caused flow creation for ESP to fail.

Added fill_ipv4_function()
Refactored code to have one path for customized and non customized
pctype's.

Fixes: c5f8365bc8 ("net/i40e: support flow director for L2TPv3 over IP")

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Rory Sexton <rory.sexton@intel.com>
2020-02-14 12:42:12 +01:00
Guinan Sun
1b473b28dc net/ixgbe: remove dead code
This patch fixes (Logically dead code) coverity issue.

Coverity issue: 353613
Fixes: 3c42701875 ("net/ixgbe: support VF MAC address add/remove")

Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
2020-02-14 12:42:12 +01:00
Yahui Cao
0d14c49b28 net/ice: fix flow director passthru
The original PASSTHRU implementation is forwarding to queue 0. The
corrected implementation is forwarding to the next stage filter.

Fixes: f5cafa961f ("net/ice: add flow director create and destroy")
Cc: stable@dpdk.org

Signed-off-by: Yahui Cao <yahui.cao@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2020-02-14 12:42:12 +01:00
Ajit Khaparde
09550efac2 doc: fix release notes for bnxt
Fixes: 94eb699bc8 ("net/bnxt: support flow mark action")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2020-02-14 12:42:12 +01:00
Santoshkumar Karanappa Rastapur
01829dea73 net/bnxt: fix buffer allocation reattempt
In case of a buffer allocation failure, we reattempt buffer allocation
before the Rx handler exits. We were not attempting this when producer
index is greater than the number of buffers to allocate. Fixed it with
correct checks.

Fixes: d9dd0b29ed ("net/bnxt: fix Rx handling and buffer allocation logic")
Cc: stable@dpdk.org

Signed-off-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
2020-02-14 12:42:12 +01:00
Kalesh AP
623ac30bfa net/bnxt: make locally used functions static
bnxt_rss_ctxts() function is declared in header file bnxt.h,
implemented in bnxt_ethdev.c, and called only in bnxt_ethdev.c.

Also many functions are declared in header file bnxt_hwrm.h,
implemented in bnxt_hwrm.c, and called only in bnxt_hwrm.c.

This patch moves these function declarations into bnxt_ethdev.c
and bnxt_hwrm.c, as static functions.

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2020-02-14 12:42:12 +01:00
Kalesh AP
e5acec6929 net/bnxt: fix port stop on error recovery failure
During live FW upgrade or error recovery, if restoring the filter
settings fail after port start, driver invokes bnxt_uninit_resources()
only. Fix it to invoke bnxt_dev_stop_op() first before calling
bnxt_uninit_resources().

Fixes: df6cd7c1f7 ("net/bnxt: handle reset notify async event from FW")
Cc: stable@dpdk.org

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Rahul Gupta <rahul.gupta@broadcom.com>
2020-02-14 12:42:12 +01:00
Kalesh AP
990d4978fa net/bnxt: register for debug notification from FW
PF driver has to register for the debug notification async event
with firmware in the HWRM_FUNC_DRV_RGTR command.

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2020-02-14 12:42:12 +01:00
Kalesh AP
75a675d6d2 net/bnxt: log firmware debug notifications
The debug notifications are not functional in nature, they should
only have diagnostic value. Other than logging to system log,
drivers shall not take any other functional action based on this
async event.

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2020-02-14 12:42:12 +01:00
Rahul Gupta
975ff25e7c net/bnxt: fix default timeout for getting FW version
Initially when driver is loading, there is no HWRM timeout configured
by FW, the VER_GET command needs use default timeout as 500ms and
while recovering from fatal/non-fatal FW error, it should use timeout
as 50ms.

Fixes: 458f0360e8 ("net/bnxt: get default HWRM command timeout from FW")
Cc: stable@dpdk.org

Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2020-02-14 12:42:12 +01:00
Kalesh AP
967a722be0 net/bnxt: fix unnecessary delay in port stop
VFs and multifunction PFs do not have the privilege to change
link configuration. We force the physical link down as a part
of device stop only for single physical function(SPF).

This change also helps in eliminating the logs when a VF port
is stopped:

"Port 0: link state change event"
"bnxt_print_link_info(): Port 0 Link Up - speed 25000 Mbps - full-duplex"

Fixes: 316e412299 ("net/bnxt: fix crash when closing")
Cc: stable@dpdk.org

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2020-02-14 12:42:12 +01:00
Junxiao Shi
a0c2b3d8ee drivers/crypto: fix session-less mode
When OpenSSL or AESNI-MB cryptodev is being used in sessionless mode
for symmetric crypto operation (e.g. SHA256 hash), the driver prints
error message:

    CRYPTODEV: set_sym_session_private_data() line 489:
               Set private data for driver 0 not allowed

Then, AESNI-MB driver segfaults in post_process_mb_job().

Bugzilla ID: 377
Fixes: b3bbd9e5f2 ("cryptodev: support device independent sessions")
Fixes: c68d7aa354 ("crypto/aesni_mb: use architecture independent macros")
Cc: stable@dpdk.org

Signed-off-by: Junxiao Shi <git@mail1.yoursunny.com>
2020-02-13 12:41:21 +01:00
Marcin Smoczynski
2a9f232ce6 test/crypto: add CPU crypto mode cases
This patch adds ability to run unit tests in cpu crypto mode for AESNI
GCM cryptodev.

Signed-off-by: Marcin Smoczynski <marcinx.smoczynski@intel.com>
Tested-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2020-02-13 12:41:21 +01:00
Marcin Smoczynski
68c28400ec examples/ipsec-secgw: add missing SPDX license tag
Add missing BSD-3 license tag to inline fallback testing scripts.

Signed-off-by: Marcin Smoczynski <marcinx.smoczynski@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2020-02-13 12:41:04 +01:00
Artur Trybula
97c5ba4d51 doc: add cycle-count mode in compression perf tool
This commit adds release notes and updates documentation for
the cycle-count mode added to the compression performance tool.

Fixes: 2695db95a1 ("test/compress: add cycle-count mode to perf tool")

Signed-off-by: Artur Trybula <arturx.trybula@intel.com>
Acked-by: Adam Dybkowski <adamx.dybkowski@intel.com>
2020-02-13 12:41:04 +01:00