dpdk.git
4 years agonet/mlx5: fix layer type in header modify action
Suanming Mou [Wed, 19 Feb 2020 14:26:20 +0000 (16:26 +0200)]
net/mlx5: fix layer type in header modify action

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Also this fix enables compiling PMD for 32bit architecture.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Changed the ABI version to 20.0.1.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Update feature list to include inline protocol offload.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Silent the following warning when running script with python 3.8:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
4 years agoapp/test-fib: add test application for FIB
Vladimir Medvedkin [Wed, 11 Dec 2019 18:45:04 +0000 (18:45 +0000)]
app/test-fib: add test application for FIB

Introduce new application to provide user to evaluate and perform
custom functional and performance tests for FIB library.

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
4 years agotest: fix build without ring PMD
Reshma Pattan [Mon, 23 Dec 2019 06:53:05 +0000 (06:53 +0000)]
test: fix build without ring PMD

Some unit tests has dependency on RING PMD,
so this patch is trying to fix those and other
closely related issues.

1)pdump, latency, bitrate, ring PMD and test_event_eth_tx_adapter
unit tests are dependent on ring PMD, so compile those
tests only when ring PMD is enabled else ignore.

2)get rid of make file error which was added by bond unit test
for ring PMD disabled case which is not necessary.

3)Tx adapter UT is dependent on RING PMD, but it was
observed that it was missing from the run in meson
build, so added it. TX adapter UT uses 'sw event and
'null' pmd drivers, so for shared builds the drivers .so
path has to be passed to the test args of meson UT run.

Fixes: 086eb64db3 ("test/pdump: add unit test for pdump library")
Fixes: fdeb30fa71 ("test/bitrate: add unit tests for bitrate library")
Fixes: 1e3676a06e ("test/latency: add unit tests for latencystats library")
Fixes: 46cf97e4bb ("eventdev: add test for eth Tx adapter")
Fixes: d23e09e0ef ("app/test: link with ring pmd when needed")
Cc: stable@dpdk.org
Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Tested-by: Nikhil Rao <nikhil.rao@intel.com>
Tested-by: Bruce Richardson <bruce.richardson@intel.com>
4 years agomaintainers: set QoS git tree for some ethdev files
Thomas Monjalon [Wed, 22 Jan 2020 22:03:22 +0000 (23:03 +0100)]
maintainers: set QoS git tree for some ethdev files

The tree dpdk-next-tm does not exist anymore.
Traffic management and metering APIs, which are part of ethdev,
can be merged in the existing tree dpdk-next-qos.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
4 years agodoc: add a guide to run unit tests with meson
Hari Kumar Vemula [Mon, 12 Aug 2019 12:40:25 +0000 (13:40 +0100)]
doc: add a guide to run unit tests with meson

Add a programmer's guide section for meson ut

Signed-off-by: Hari Kumar Vemula <hari.kumarx.vemula@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Michael Santana <msantana@redhat.com>
4 years agodoc: update building and running FreeBSD apps
Bruce Richardson [Fri, 3 Jan 2020 15:32:56 +0000 (15:32 +0000)]
doc: update building and running FreeBSD apps

Update the documentation on building and running apps on FreeBSD, taking
account of having used meson for building. We can also update the section
on the command-line parameters, rather than claiming to be a complete list
of parameters, it should describe how to get the complete list and only
cover a few important ones.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
4 years agodoc: update loading FreeBSD kernel modules
Bruce Richardson [Fri, 3 Jan 2020 15:32:55 +0000 (15:32 +0000)]
doc: update loading FreeBSD kernel modules

The kernel modules are now installed in the correct system location on
install when using meson and ninja, so update the documentation to remove
any references to the "kmod" directory. Also, make a few additional updates
to improve clarity.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
4 years agodoc: add meson install instructions for FreeBSD
Bruce Richardson [Fri, 3 Jan 2020 15:32:54 +0000 (15:32 +0000)]
doc: add meson install instructions for FreeBSD

Update the FreeBSD GSG doc with instructions for installing
using meson and ninja rather than make.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
4 years agodoc: add installing from FreeBSD package
Bruce Richardson [Fri, 3 Jan 2020 15:32:53 +0000 (15:32 +0000)]
doc: add installing from FreeBSD package

Update the FreeBSD GSG to cover installing from the pre-built package as
well as installing from a port.

Also, since the port is now based on meson, update the instructions for
compiling and running the example applications.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
4 years agodoc: update introduction to FreeBSD guide
Bruce Richardson [Fri, 3 Jan 2020 15:32:52 +0000 (15:32 +0000)]
doc: update introduction to FreeBSD guide

Update the introduction section note, to add in the fact that DPDK is now
packaged in FreeBSD, i.e. available as a pre-built binary package, as well
as being in the ports collection for manual building.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
4 years agodoc: add dependency on header files for API doxygen
Bruce Richardson [Fri, 17 Jan 2020 11:22:36 +0000 (11:22 +0000)]
doc: add dependency on header files for API doxygen

Generate a dependency file for the header files used in the API guide
so that the docs can be rebuilt if a header changes.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
4 years agodoc: add dependency on examples for API doxygen
Bruce Richardson [Fri, 17 Jan 2020 11:22:35 +0000 (11:22 +0000)]
doc: add dependency on examples for API doxygen

For the doxygen API for the examples folder, we can generate a build
dependency file when we generate the examples.dox file. This allows
correct rebuilds if the files in examples change.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
4 years agodoc: update ring guide
Honnappa Nagarahalli [Fri, 31 Jan 2020 03:59:29 +0000 (21:59 -0600)]
doc: update ring guide

Changed the rte_ring chapter in programmer's guide to reflect
the addition of rte_ring_xxx_elem APIs. References to pointers
as ring elements is changed to generic term 'objects'.

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
4 years agoring: fix API documentation
Honnappa Nagarahalli [Fri, 31 Jan 2020 03:59:28 +0000 (21:59 -0600)]
ring: fix API documentation

Correct the documentation for obj_table in rte_ring_xxx_elem APIs.

Fixes: cc4b218790f6 ("ring: support configurable element size")

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
4 years agodoc: fix release notes for custom ring element size
Honnappa Nagarahalli [Sun, 26 Jan 2020 17:40:29 +0000 (11:40 -0600)]
doc: fix release notes for custom ring element size

Added introduction of rte_ring_xxx_elem APIs to release notes.

Fixes: cc4b218790f6 ("ring: support configurable element size")

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
4 years agomaintainers: update for NFP
Heinrich Kuhn [Tue, 11 Feb 2020 12:23:54 +0000 (14:23 +0200)]
maintainers: update for NFP

Jan is no longer with Netronome.
Remove him as maintainer for the Netronome PMD

Signed-off-by: Heinrich Kuhn <heinrich.kuhn@netronome.com>
4 years agoexamples/l2fwd-event: fix core allocation in poll mode
Pavan Nikhilesh [Mon, 3 Feb 2020 04:46:18 +0000 (10:16 +0530)]
examples/l2fwd-event: fix core allocation in poll mode

Skip master lcore when assigning cores to rx_queues as it is only used
to print stats.

Fixes: 4ff457986f76 ("examples/l2fwd-event: add default poll mode routines")
Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
4 years agoapp/eventdev: fix pipeline test with meson build
Pavan Nikhilesh [Mon, 3 Feb 2020 04:52:59 +0000 (10:22 +0530)]
app/eventdev: fix pipeline test with meson build

Add missing pipeline test to meson build.

Fixes: 2ff67267b049 ("app/eventdev: build with meson")
Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
4 years agodoc: fix service core mask in l3fwd guide
Pavan Nikhilesh [Fri, 7 Feb 2020 05:33:55 +0000 (11:03 +0530)]
doc: fix service core mask in l3fwd guide

Service core mask should be a hexadecimal value rather than a range of
lcores.

Bugzilla ID: 392
Fixes: 55499896d91a ("doc: add event mode to l3fwd guide")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
4 years agoexamples/l2fwd-event: fix error checking
Sunil Kumar Kori [Thu, 30 Jan 2020 08:19:12 +0000 (13:49 +0530)]
examples/l2fwd-event: fix error checking

Patch fixes coverity issues which handle return values from API
calling.

Coverity issue: 350588, 350594, 350598, 350599

Fixes: 3b5476db4823 ("examples/l2fwd-event: setup event queue and port")
Cc: stable@dpdk.org
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
4 years agoevent/dpaa2: set number of order sequences
Nipun Gupta [Sat, 8 Feb 2020 04:50:19 +0000 (10:20 +0530)]
event/dpaa2: set number of order sequences

This patch sets the number of atomic ordered sequences
supported by the driver.

Fixes: dbf63bd43afa ("event/dpaa2: support ordered queue")
Cc: stable@dpdk.org
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
4 years agonet/octeontx2: fix flow control initial state
Vamsi Attunuru [Thu, 6 Feb 2020 04:27:13 +0000 (09:57 +0530)]
net/octeontx2: fix flow control initial state

Currently when application requests for RTE_FC_NONE earlier
than PMD's internal fc mode update, flow control set routine
is returning without updating the flow control state.

Patch updates the PMD's internal fc mode details during
dev_configure to ensure any flow control set requests
issued later are handled properly.

Fixes: 609945f1ce90 ("net/octeontx2: support flow control")
Cc: stable@dpdk.org
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
4 years agodoc: fix release notes for ixgbe
Jiaqi Min [Fri, 14 Feb 2020 04:50:00 +0000 (04:50 +0000)]
doc: fix release notes for ixgbe

Added support for API rte_eth_tx_done_cleanup.
Added support setting VF MAC address by PF driver.
Added support for setting the link to specific speed.

Fixes: 26e9c3e20180 ("net/ixgbe: cleanup Tx buffers")
Fixes: 3c4270187518 ("net/ixgbe: support VF MAC address add/remove")
Fixes: 34e736096068 ("net/ixgbe: set fixed flag for exact link speed")

Signed-off-by: Jiaqi Min <jiaqix.min@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agodoc: fix release notes for ice
Jiaqi Min [Fri, 14 Feb 2020 04:21:45 +0000 (04:21 +0000)]
doc: fix release notes for ice

Added support for API rte_eth_tx_done_cleanup.

Fixes: ab7cfe1fe3d7 ("net/ice: cleanup Tx buffers")

Signed-off-by: Jiaqi Min <jiaqix.min@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agodoc: fix release notes for i40e
Jiaqi Min [Fri, 14 Feb 2020 04:09:21 +0000 (04:09 +0000)]
doc: fix release notes for i40e

Added support for API rte_eth_tx_done_cleanup.
Added support for VF multiple queues interrupt.
Added support for setting the link to specific speed.

Fixes: 6a8defc552b1 ("net/i40e: cleanup Tx buffers")
Fixes: 40163f9e1756 ("net/i40e: fix multi-queue Rx interrupt for VF")
Fixes: dc73db27bb61 ("net/i40e: set fixed flag for exact link speed")

Signed-off-by: Jiaqi Min <jiaqix.min@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agonet/i40e: fix unchecked Tx cleanup error
Beilei Xing [Wed, 12 Feb 2020 12:36:01 +0000 (20:36 +0800)]
net/i40e: fix unchecked Tx cleanup error

Coverity complains of unchecked return value warning of
i40e_xmit_cleanup, while this cleanup is opportunistic and will not
cause problems if it fails. So instead of checking the return value of
i40e_xmit_cleanup and return in case of cleanup failure, we directly
cast it to void function to make the Coverity happy.

Coverity issue: 353617
Fixes: 4861cde46116 ("i40e: new poll mode driver")
Cc: stable@dpdk.org
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agonet/ice: fix unchecked Tx cleanup error
Sunil Pai G [Wed, 12 Feb 2020 05:37:10 +0000 (05:37 +0000)]
net/ice: fix unchecked Tx cleanup error

Coverity complains of unchecked return value warning of
ice_xmit_cleanup, while this cleanup is opportunistic and will not cause
problems if it fails. So instead of checking the return value of
ice_xmit_cleanup and return in case of cleanup failure, we directly cast
it to void function to make the Coverity happy.

Coverity issue: 353623
Fixes: 17c7d0f9d6a4 ("net/ice: support basic Rx/Tx")
Cc: stable@dpdk.org
Signed-off-by: Sunil Pai G <sunil.pai.g@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agoapp/testpmd: update Rx offload after setting MTU
Wei Hu (Xavier) [Thu, 13 Feb 2020 01:57:43 +0000 (09:57 +0800)]
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: ae03d0d18adf ("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>
4 years agoapp/testpmd: fix hot-unplug detaching
Thomas Monjalon [Thu, 13 Feb 2020 15:52:26 +0000 (16:52 +0100)]
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: 43d0e304980a ("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>
4 years agoapp/testpmd: rename function for detaching by devargs
Thomas Monjalon [Thu, 13 Feb 2020 15:52:25 +0000 (16:52 +0100)]
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>
4 years agoapp/testpmd: add port check before manual detach
Thomas Monjalon [Thu, 13 Feb 2020 14:50:23 +0000 (15:50 +0100)]
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>
4 years agovhost: protect log address translation in IOTLB update
Adrian Moreno [Thu, 13 Feb 2020 10:04:58 +0000 (11:04 +0100)]
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: fbda9f145927 ("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>
4 years agovhost: fix inflight resubmit check
Jin Yu [Wed, 25 Dec 2019 14:18:35 +0000 (22:18 +0800)]
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: ad0a4ae491fe ("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>
4 years agodoc: fix release notes for virtio
Cheng Jiang [Thu, 13 Feb 2020 01:41:40 +0000 (01:41 +0000)]
doc: fix release notes for virtio

Add release notes for the notification data feature of virtio-PMD.

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

Signed-off-by: Cheng Jiang <cheng1.jiang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
4 years agoexamples/vhost_blk: fix check of device path
Jin Yu [Wed, 12 Feb 2020 12:54:46 +0000 (20:54 +0800)]
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: c19beb3f38cd ("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>
4 years agonet/vhost: remove an unused member
Itsuro Oda [Thu, 6 Feb 2020 01:39:36 +0000 (10:39 +0900)]
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>
4 years agonet/vhost: fix probing in secondary process
Itsuro Oda [Thu, 6 Feb 2020 01:39:35 +0000 (10:39 +0900)]
net/vhost: fix probing in secondary process

This patch adds lacking member setting and makes secondary
probe complete.

Fixes: 4852aa8f6e21 ("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>
4 years agonet/vhost: delay driver setup
Itsuro Oda [Thu, 6 Feb 2020 01:39:34 +0000 (10:39 +0900)]
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: 4852aa8f6e21 ("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>
4 years agonet/vhost: allocate interface name from heap
Itsuro Oda [Thu, 6 Feb 2020 01:39:33 +0000 (10:39 +0900)]
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: 4852aa8f6e21 ("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>
4 years agovhost: check message header size read
Maxime Coquelin [Wed, 5 Feb 2020 15:05:29 +0000 (16:05 +0100)]
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: 8f972312b8f4 ("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>
4 years agonet/mlx: fix overlinking with meson and glue dlopen
Thomas Monjalon [Wed, 12 Feb 2020 22:07:08 +0000 (23:07 +0100)]
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: 1dd7c7e38c19 ("net/mlx4: support meson build")
Fixes: 96d7c62a70c7 ("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>
4 years agonet/mlx: rename meson variable for dlopen option
Thomas Monjalon [Wed, 12 Feb 2020 22:07:07 +0000 (23:07 +0100)]
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>
4 years agonet/mlx: workaround static linkage with meson
Thomas Monjalon [Wed, 12 Feb 2020 22:07:06 +0000 (23:07 +0100)]
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: 6affeabaf321 ("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>
4 years agobuildtools: get static mlx dependencies for meson
Thomas Monjalon [Wed, 12 Feb 2020 22:07:05 +0000 (23:07 +0100)]
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>