dpdk.git
4 years agonet/memif: fix init when already connected
Július Milan [Wed, 19 Feb 2020 08:19:16 +0000 (09:19 +0100)]
net/memif: fix init when already connected

This patch fixes the situation when there is already connected pair of
memif interfaces and another slave tries to initiate the connection with
(already occupied) master. Expected behavior is that the second slave
is refused and gets disconnect message with reason: "Already connected",
while old connection remains functional.

Fixes: 09c7e63a71f9 ("net/memif: introduce memory interface PMD")
Cc: stable@dpdk.org
Signed-off-by: Július Milan <jmilan.dev@gmail.com>
Reviewed-by: Jakub Grajciar <jgrajcia@cisco.com>
4 years agonet/memif: enable loopback
Július Milan [Mon, 9 Mar 2020 14:22:08 +0000 (15:22 +0100)]
net/memif: enable loopback

With this patch it is possible to connect 2 DPDK memifs into loopback,
i.e. when they have the same id and different roles, as for example:
  "--vdev=net_memif0,role=master,id=0"
  "--vdev=net_memif1,role=slave,id=0"

Signed-off-by: Július Milan <jmilan.dev@gmail.com>
Reviewed-by: Jakub Grajciar <jgrajcia@cisco.com>
4 years agocommon/mlx5: fix build without dlopen option
Tonghao Zhang [Fri, 6 Mar 2020 14:27:19 +0000 (22:27 +0800)]
common/mlx5: fix build without dlopen option

When setting the CONFIG_RTE_BUILD_SHARED_LIB to y,
and build the mlx5 pmd, there is a building error.
To fix it, add RTE_IBVERBS_LINK_DLOPEN to include
relative codes.

    mlx5_common.o: In function `mlx5_glue_init':
    drivers/common/mlx5/mlx5_common.c:324: undefined reference to `dlclose'

Fixes: 7b4f1e6bd367 ("common/mlx5: introduce common library")
Cc: stable@dpdk.org
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Tested-by: Ali Alnubani <alialnu@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agonet/mlx5: support match on IPv4 TTL and IPv6 HLIM
Dekel Peled [Tue, 3 Mar 2020 12:37:31 +0000 (14:37 +0200)]
net/mlx5: support match on IPv4 TTL and IPv6 HLIM

This patch adds to MLX5 PMD the support of matching on IPv4 TTL and
IPv6 hoplimit.
Support is valid when using DV flow engine (Verbs flow engine doesn't
support matching on this field).

Signed-off-by: Eli Britstein <elibr@mellanox.com>
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agonet/mlx5: fix mask used for IPv6 item validation
Dekel Peled [Tue, 3 Mar 2020 12:37:30 +0000 (14:37 +0200)]
net/mlx5: fix mask used for IPv6 item validation

The nic_mask struct in function mlx5_flow_validate_item_ipv6()
includes hop_limits field.
This is redundant since matching on this item is not supported using
Verbs flow engine (dv_flow_en=0).

(Separate patch will be sent to handle this issue for DV flow engine.)

Setting a rule including match on this field will fail:
testpmd> flow create 0 ingress pattern eth / ipv6 hop is 1 / end actions
drop / end
port_flow_complain(): Caught PMD error type 1 (cause unspecified):
hardware refuses to create flow: Operation not supported

This patch removes the redundant field from nic_mask, to ensure that
such flow rules will be rejected by PMD validation:
testpmd> flow create 0 ingress pattern eth / ipv6 hop is 1 / end actions
drop / end
port_flow_complain(): Caught PMD error type 13 (specific pattern item):
cause: 0x7fffffffa2c8, mask enables non supported bits: Operation not
supported

The related lines in function flow_verbs_translate_item_ipv6() are
removed as well, since they are redundant.

Fixes: 23c1d42c7138 ("net/mlx5: split flow validation to dedicated function")
Fixes: 84c406e74524 ("net/mlx5: add flow translate function")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
4 years agonet/ice: remove bulk alloc option
Qi Zhang [Wed, 4 Mar 2020 11:40:38 +0000 (19:40 +0800)]
net/ice: remove bulk alloc option

Remove CONFIG_RTE_LIBRTE_ICE_RX_ALLOW_BULK_ALLOC with below
consideration:

1. A default Rx path can always be selected by setting a proper
   rx_free_thresh value at runtime, see
   ice_check_rx_burst_bulk_alloc_preconditions.

2. Its not a big deal to always reserve more space for desc ring.
   "ring_size = (uint16_t)(rxq->nb_rx_desc + ICE_RX_MAX_BURST);"

3. Fixes a potential invalid memory access in ice_reset_rx_queue.
   If CONFIG_RTE_LIBRTE_ICE_RX_ALLOW_BULK_ALLOC is turned on while
   ice_check_rx_burst_bulk_alloc_preconditions return fail.
   Below code will have problem.

   for (i = 0; i < ICE_RX_MAX_BURST; ++i)
    rxq->sw_ring[rxq->nb_rx_desc + i].mbuf = &rxq->fake_mbuf;

Fixes: 50370662b727 ("net/ice: support device and queue ops")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agonet/sfc: fix Rx queue start failure path
Igor Romanov [Thu, 5 Mar 2020 15:48:55 +0000 (15:48 +0000)]
net/sfc: fix Rx queue start failure path

Call correct cleanup operations on failure in Rx queue start function.

Fixes: df1bfde4ff0d ("net/sfc: factor out libefx-based Rx datapath")
Fixes: 28944ac098aa ("net/sfc: implement Rx queue start and stop operations")
Cc: stable@dpdk.org
Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
4 years agonet/sfc: generalise flow pattern item processing
Ivan Malov [Thu, 5 Mar 2020 10:47:53 +0000 (10:47 +0000)]
net/sfc: generalise flow pattern item processing

This is needed to reuse pattern processing engine for MAE.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
4 years agonet/sfc: generalise flow start and stop path
Ivan Malov [Thu, 5 Mar 2020 10:47:52 +0000 (10:47 +0000)]
net/sfc: generalise flow start and stop path

As a preparation step, generalise flow start and stop path using
callbacks.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
4 years agonet/sfc: generalise flow parsing
Ivan Malov [Thu, 5 Mar 2020 10:47:51 +0000 (10:47 +0000)]
net/sfc: generalise flow parsing

Generalise flow attribute parsing function in regard to transfer attribute.
Add a method table and factor out VNIC-specific parsing code as a callback.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
4 years agonet/sfc: introduce flow allocation and free path
Ivan Malov [Thu, 5 Mar 2020 10:47:50 +0000 (10:47 +0000)]
net/sfc: introduce flow allocation and free path

Riverhead boards maintain support for MAE, a low-level Match-Action Engine.
The upcoming patches will bring support for MAE to RTE flow implementation.

A follow-up patch will introduce MAE-specific specification cleanup method.
In order to prepare for the patch, introduce flow allocation and free path.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
4 years agonet/sfc: generalise flow specification structure
Ivan Malov [Thu, 5 Mar 2020 10:47:49 +0000 (10:47 +0000)]
net/sfc: generalise flow specification structure

Add the concept of a flow specification type.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
4 years agonet/sfc: make flow list engine-agnostic
Ivan Malov [Thu, 5 Mar 2020 10:47:48 +0000 (10:47 +0000)]
net/sfc: make flow list engine-agnostic

A backend which a driver employs to handle flow rules of a given
type depends on the underlying NIC flow engine. The driver in
question in its current state is tailored to support the only
flow engine, VNIC filtering. As the need arises to add support
for transfer rules, the driver has to be reworked so that it
becomes possible to introduce yet another backend.

As a preparation step, make the flow list shared
between different engines.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
4 years agonet/sfc: make flow RSS details VNIC-specific
Ivan Malov [Thu, 5 Mar 2020 10:47:47 +0000 (10:47 +0000)]
net/sfc: make flow RSS details VNIC-specific

The flow specification structure will be transformed to a generic one, and
its current contents will be fenced off to form a VNIC-specific parameters.
Flow RSS details do not belong to the said specification currently, albeit
being VNIC-specific. This patch addresses this issue as a preparation step.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
4 years agonet/axgbe: support unicast hash table for MAC address
Chandu Babu N [Fri, 28 Feb 2020 14:20:53 +0000 (19:50 +0530)]
net/axgbe: support unicast hash table for MAC address

Implement eth_dev_ops uc_hash_table_set and uc_all_hash_table_set

Signed-off-by: Chandu Babu N <chandu@amd.com>
Acked-by: Ravi Kumar <ravi1.kumar@amd.com>
4 years agonet/axgbe: support setting MAC address
Chandu Babu N [Fri, 28 Feb 2020 14:20:52 +0000 (19:50 +0530)]
net/axgbe: support setting MAC address

Supports adding MAC addresses to enable whitelist filtering to
accept packets
implement eth_dev_ops mac_addr_set, mac_addr_add, mac_addr_remove and
set_mc_addr_list

Signed-off-by: Chandu Babu N <chandu@amd.com>
Acked-by: Ravi Kumar <ravi1.kumar@amd.com>
4 years agonet/i40e: fix DCB initialization
Shougang Wang [Thu, 5 Mar 2020 10:42:35 +0000 (10:42 +0000)]
net/i40e: fix DCB initialization

Stopping LLDP is necessary for DPDK, but it will cause DCB init failure.
For kernel shared code, the prerequisite for successful initialization
of DCB is that LLDP is enabled. This patch starts LLDP before DCB init
and stops it when init finishes.

Fixes: a8e84b22bd55 ("net/i40e/base: support persistent LLDP")
Cc: stable@dpdk.org
Signed-off-by: Shougang Wang <shougangx.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agonet/sfc: fix initialization error path
Igor Romanov [Thu, 5 Mar 2020 10:38:36 +0000 (10:38 +0000)]
net/sfc: fix initialization error path

NIC deinitialization should not happen after a failed NIC
initialization.

Fixes: 91831d4068c8 ("net/sfc: estimate available resources")
Cc: stable@dpdk.org
Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
4 years agonet/vmxnet3: fix RSS setting on v4
Eduard Serra [Wed, 4 Mar 2020 02:35:56 +0000 (02:35 +0000)]
net/vmxnet3: fix RSS setting on v4

When calling to setup RSS on v4 API, ESX will expect
IPv4/6 TCP RSS to be set/requested mandatory.

This patch will:
- Set IPv4/6 TCP RSS when these have not been set. A warning
message is thrown to make sure we warn the application we are
setting IPv4/6 TCP RSS when not set.
- An additional check has been added to dodge RSS configuration
altogether unless MQ_RSS has been requested, similar to v3.

The alternative (returning error) was considered, the intent
is to ease the task of setting up and running vmxnet3 in situations
where it's supposed to be most straightforward (testpmd, pktgen).

Bugzilla ID: 400
Fixes: 643fba770705 ("net/vmxnet3: add v4 boot and guest UDP RSS config")
Cc: stable@dpdk.org
Signed-off-by: Eduard Serra <eserra@vmware.com>
Acked-by: Yong Wang <yongwang@vmware.com>
4 years agonet/axgbe: support scattered Rx
Selwin Sebastian [Wed, 4 Mar 2020 13:44:14 +0000 (19:14 +0530)]
net/axgbe: support scattered Rx

Enable scattered rx support and add jumbo packet receive capability

Signed-off-by: Selwin Sebastian <selwin.sebastian@amd.com>
4 years agonet/sfc: fix reported promiscuous/multicast mode
Andrew Rybchenko [Wed, 4 Mar 2020 15:01:04 +0000 (15:01 +0000)]
net/sfc: fix reported promiscuous/multicast mode

Requested promiscuous or all-multicast mode may be dropped on port
start if FW denies to enable it (e.g. because of no permission
in the case of VF). Return applied value on get.

Fixes: f5258439ee5d ("net/sfc: avoid failure on port start if Rx mode is rejected")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
4 years agodoc: fix number of failsafe sub-devices
Gaetan Rivet [Sat, 22 Feb 2020 00:14:40 +0000 (01:14 +0100)]
doc: fix number of failsafe sub-devices

Supporting more than 2 sub-device is a remnant from earlier fail-safe
design, that was never actually published.

Fixes: a46f8d584eb8 ("net/failsafe: add fail-safe PMD")
Cc: stable@dpdk.org
Signed-off-by: Gaetan Rivet <grive@u256.net>
4 years agodoc: improve failsafe guide
Gaetan Rivet [Sat, 22 Feb 2020 00:14:39 +0000 (01:14 +0100)]
doc: improve failsafe guide

Reading the fail-safe doc with a few years added, a few phrasing
choices are ambiguous or confusing.

Signed-off-by: Gaetan Rivet <grive@u256.net>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
4 years agonet/ice: remove unnecessary variable
Qi Zhang [Wed, 4 Mar 2020 02:05:49 +0000 (10:05 +0800)]
net/ice: remove unnecessary variable

Remove unnecessary variable "meta" in ice_flow_create and
ice_flow_validate, it should be defined when really needed:
its ice_parse_engine_create and ice_parse_engine_validate.

A meta data created by parser->parse_pattern_action should be
freed inside parser->engine->create.

During a validate operation, since parser->engine_>create will not
be invoked, it is unnecessary to create a meta during parser, so
NULL will passed to engine->parse_pattern_action and all parser's
parse_pattern_action need to be modified to handle meta = NULL
properly.

With above implementation, the patch also fixes a potential memory
leak in ice_parse_engine_validate, since meta may not be freed.

BTW, an engine without a create op should be regarded as a bug. So
use RTE_ASSERT to replace runtime engine->create == NULL check in
ice_parse_engine_create.

Fixes: 4e27d3ed02bd ("net/ice: fix flow API framework")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agonet/enetc: init SI transactions attribute register
Alex Marginean [Mon, 2 Mar 2020 14:32:09 +0000 (20:02 +0530)]
net/enetc: init SI transactions attribute register

This was left to its default value.  With the patch transactions are:
- coherent,
- do not allocate in downstream cache (there is none on LS1028a),
- merge surrounding data for BD writes,
- overwrite surrounding data for frame data writes.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Acked-by: Gagandeep Singh <g.singh@nxp.com>
4 years agonet/enetc: improve prefetch in Rx ring clean
Alex Marginean [Mon, 2 Mar 2020 14:32:08 +0000 (20:02 +0530)]
net/enetc: improve prefetch in Rx ring clean

LS1028A does not have platform cache so any reads following a hardware
write will go directly to DDR.  Latency of such a read is in excess of
100 core cycles, so try to prefetch more in advance to mitigate this.
How much is worth prefetching really depends on traffic conditions.
With congested Rx this could go up to 4 cache lines or so.  But if
software keeps up with hardware and follows behind Rx PI by a cache line
then it's harmful in terms of performance to cache more.  We would only
prefetch data that's yet to be written by ENETC, which will be evicted
again anyway.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Acked-by: Gagandeep Singh <g.singh@nxp.com>
4 years agonet/enetc: use bulk free in Tx clean
Alex Marginean [Mon, 2 Mar 2020 14:32:07 +0000 (20:02 +0530)]
net/enetc: use bulk free in Tx clean

Use rte_pktmbuf_free_bulk to release all mbufs at once.  This is flagged
as obsolete/not yet stable in DPDK but seems to be functional.
Don't count the released frames, it's no longer needed in the caller.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Acked-by: Gagandeep Singh <g.singh@nxp.com>
4 years agonet/enetc: use bulk alloc in Rx refill ring
Alex Marginean [Mon, 2 Mar 2020 14:32:06 +0000 (20:02 +0530)]
net/enetc: use bulk alloc in Rx refill ring

Since we know in advance that we're going to fill in multiple
descriptors it's convenient to allocate the buffers in batches.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Acked-by: Gagandeep Singh <g.singh@nxp.com>
4 years agonet/enetc: reorder BDR structure
Alex Marginean [Mon, 2 Mar 2020 14:32:05 +0000 (20:02 +0530)]
net/enetc: reorder BDR structure

Reorder the members of the structure so that the ones used on datapath
fit in a single cache line, to slightly reduce pressure on cache and
miss rate.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Acked-by: Gagandeep Singh <g.singh@nxp.com>
4 years agonet/enetc: improve batching Rx ring refill
Alex Marginean [Mon, 2 Mar 2020 14:32:04 +0000 (20:02 +0530)]
net/enetc: improve batching Rx ring refill

Move from doing batch refill of Rx ring from bundles of 8 to once per
enetc_clean_rx_ring call.  One benefit is that we're cleaning up all the
BDs that we just processed, which should still be cached.  The other is
that hardware Rx index stays a little back and doesn't cause contention
on the BDs processed in the Rx loop.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Acked-by: Gagandeep Singh <g.singh@nxp.com>
4 years agonet/enetc: fix Rx lock-up
Alex Marginean [Mon, 2 Mar 2020 14:32:03 +0000 (20:02 +0530)]
net/enetc: fix Rx lock-up

The default value in hardware for the Rx MAC FIFO (@) is higher than it
should be and can lead to Rx lock-up under traffic.
Set it to the value recommended by hardware team, 1.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
4 years agonet/enetc: batch process clean Tx ring calls
Alex Marginean [Mon, 2 Mar 2020 14:32:02 +0000 (20:02 +0530)]
net/enetc: batch process clean Tx ring calls

Each call to enetc_clean_tx_ring will cost at least 150-200 CPU cycles
even if no clean-up is done, due to the CI register read.
We're only calling it once at the end of the function, on the assumption
that software is slower than hardware and hardware completed sending
older frames out by now.
We're also cleaning up the ring before kicking off Tx for the new batch
to minimize chances of contention on the Tx ring.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Acked-by: Gagandeep Singh <g.singh@nxp.com>
4 years agonet/enetc: relax read for Tx CI in clean Tx
Alex Marginean [Mon, 2 Mar 2020 14:32:01 +0000 (20:02 +0530)]
net/enetc: relax read for Tx CI in clean Tx

We don't need barriers here since this read doesn't have to be strictly
serialized in relation to other surrounding memory/register accesses.
We only want a reasonably recent value out of hardware so we know how
much we can clean.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Acked-by: Gagandeep Singh <g.singh@nxp.com>
4 years agonet/enetc: do not stall in clean Tx ring
Alex Marginean [Mon, 2 Mar 2020 14:32:00 +0000 (20:02 +0530)]
net/enetc: do not stall in clean Tx ring

Don't read the hardware CI register in a loop, read it once, clean up
and exit.
The issue with reading the register in a loop is that we're stalling
here trying to catch up with hardware which keeps sending traffic as
long as it has traffic to send, so in effect we could be waiting here
for the Tx ring to be drained by hardware, instead of us doing Rx in
that meantime.
At the time we return the function there may be new BDs in the ring that
could be cleaned, we're just leaving those there for the next time.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Acked-by: Gagandeep Singh <g.singh@nxp.com>
4 years agonet/bnxt: fix MAC address setting when port is stopped
Kalesh AP [Thu, 27 Feb 2020 08:18:51 +0000 (13:48 +0530)]
net/bnxt: fix MAC address setting when port is stopped

Driver destroys the VNIC when the port is brought down.
Port HW filter setting such as default MAC address and
unicast MAC filters will be applied when port is started.

Fixed to return success silently for these callbacks
when port is stopped.

Fixes: 39b88344e364 ("net/bnxt: fix enable/disable VLAN filtering")
Cc: stable@dpdk.org
Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
4 years agonet/bnxt: fix recovery alarm race condition in port close
Kalesh AP [Fri, 28 Feb 2020 10:21:31 +0000 (15:51 +0530)]
net/bnxt: fix recovery alarm race condition in port close

There is a race condition when port is closed while error recovery
is happening in driver. Fixed this by canceling the recovery threads
during port close.

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: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
4 years agonet/ice: fix hash flow crash
Tao Zhu [Tue, 3 Mar 2020 05:38:46 +0000 (13:38 +0800)]
net/ice: fix hash flow crash

Commit 'dc36bd5dfdeb' mistakenly initializes ret as -rte_errno, then
return ret if ice_search_pattern_match_item fails, if rte_errno happens
to be 0 in this case, it would cause an unrecognized flow rule to be
marked as recognition success. Later, when the code tries to parse the
flow rule, a segmentation fault will occur due to null pointer
reference.

Fixes: dc36bd5dfdeb ("net/ice: fix flow FDIR/switch memory leak")
Cc: stable@dpdk.org
Signed-off-by: Tao Zhu <taox.zhu@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agonet/i40e: fix X722 performance
Qiming Yang [Tue, 3 Mar 2020 05:45:00 +0000 (13:45 +0800)]
net/i40e: fix X722 performance

Lack of GL_SWR_PM_UP_THR value for mac type 4x10G X722 caused it can't
reach line rate in one queue one core forwarding case. It's about 1%
performance drop.  This patch adds value as:

 Device-ID  Value        Comments
 0x37D0    0x03030303   4x10G FPK

This value is hardware specific.

Fixes: 3320d4a240da ("net/i40e: workaround performance degradation")
Cc: stable@dpdk.org
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agonet/af_packet: remove queue number limitation
Stephen Hemminger [Thu, 27 Feb 2020 20:00:03 +0000 (12:00 -0800)]
net/af_packet: remove queue number limitation

Since qpairs is part of the vdev arguments, there is no need to
limit it to 16. The queue arrays can be dynamically sized based
on the requested parameters.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: John W. Linville <linville@tuxdriver.com>
4 years agoapp/testpmd: parse flow command line for AH
Xiao Zhang [Fri, 14 Feb 2020 00:52:44 +0000 (08:52 +0800)]
app/testpmd: parse flow command line for AH

Add AH and AH SPI to testpmd rte flow command line.
Add note and sample AH rules in testpmd guide.

Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Acked-by: Ori Kam <orika@mellanox.com>
4 years agonet/mlx5: fix VLAN PCP item calculation
Ophir Munk [Wed, 26 Feb 2020 08:27:48 +0000 (08:27 +0000)]
net/mlx5: fix VLAN PCP item calculation

The VLAN 16 bits tci field contains both values of PCP and VID. When
extracting any one of them - it is required not to affect the other one.
Previous to this commit in routine flow_dev_get_vlan_info_from_items()
we calculated the PCP as follows:
    (1) vlan->vlan_tci &= MLX5DV_FLOW_VLAN_PCP_MASK;
    (2) vlan->vlan_tci |= <3 bits value of PCP>
In line (1) we should have used the negated mask ('~' operator) such
that only the PCP bits will be nullified before ORing them with the
updated PCP value.

Fixes: 9aee7a8418d4 ("net/mlx5: support push flow action on VLAN header")
Cc: stable@dpdk.org
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
4 years agonet/i40e: relax barrier in Tx
Gavin Hu [Wed, 12 Feb 2020 05:56:21 +0000 (13:56 +0800)]
net/i40e: relax barrier in Tx

To keep ordering of mixed accesses, rte_cio is sufficient.
The rte_io barrier inside the I40E_PCI_REG_WRITE is overkill.[1]

[1] http://inbox.dpdk.org/dev/CALBAE1M-ezVWCjqCZDBw+MMDEC4O9
qf0Kpn89EMdGDajepKoZQ@mail.gmail.com

Fixes: 4861cde46116 ("i40e: new poll mode driver")
Cc: stable@dpdk.org
Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
4 years agonet/i40e: fix port start during config restore
Xiao Zhang [Fri, 28 Feb 2020 03:22:04 +0000 (11:22 +0800)]
net/i40e: fix port start during config restore

If configuring VF promiscuous mode is not supported, return '-ENOTSUP'
error code in '.promiscuous_enable/disable' dev_ops.

This is to fix the port start during config restore, where if
'.promiscuous_enable/disable' dev_ops exists and return any value other
than '-ENOTSUP', start will fail.

Same is done for '.allmulticast_enable/disable' dev_ops.

Fixes: ddc7cb0d9453 ("net/i40e: re-program promiscuous mode on VF interface")
Cc: stable@dpdk.org
Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
4 years agonet/thunderx: support link up and down
Harman Kalra [Wed, 5 Feb 2020 09:26:33 +0000 (14:56 +0530)]
net/thunderx: support link up and down

Add support for .set_link_up/down() eth ops to bring
link up and down.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
4 years agonet/octeontx2: fix link information for loopback port
Ashish Gupta [Thu, 6 Feb 2020 12:30:58 +0000 (18:00 +0530)]
net/octeontx2: fix link information for loopback port

Loopback devices are exposed as ethdev device in octeontx2.
This patch fixes the link information for loopback ports.

Fixes: 38f566280abb ("net/octeontx2: add link stats operations")
Cc: stable@dpdk.org
Signed-off-by: Ashish Gupta <ashishg@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
4 years agonet/af_packet: support default MAC address change
Stephen Hemminger [Sat, 15 Feb 2020 19:20:12 +0000 (11:20 -0800)]
net/af_packet: support default MAC address change

Since packet is talking to a network device (probably tap)
it is possible for the device driver to change the hardware address
by making an ioctl to kernel.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agonet/axgbe: support registers dump
Chandu Babu N [Tue, 11 Feb 2020 10:28:03 +0000 (15:58 +0530)]
net/axgbe: support registers dump

Implement "get_reg" eth_dev_ops for axgbe

Signed-off-by: Chandu Babu N <chandu@amd.com>
Acked-by: Ravi Kumar <ravi1.kumar@amd.com>
4 years agonet/axgbe: add debug logs
Chandu Babu N [Tue, 11 Feb 2020 08:19:39 +0000 (13:49 +0530)]
net/axgbe: add debug logs

Add debug logs in various modules in axgbe

Signed-off-by: Chandu Babu N <chandu@amd.com>
Acked-by: Ravi Kumar <ravi1.kumar@amd.com>
4 years agobuild: fix linker warnings with clang on Windows
Dmitry Kozlyuk [Thu, 27 Feb 2020 04:25:37 +0000 (07:25 +0300)]
build: fix linker warnings with clang on Windows

Clang on Windows doesn't use pthread for now, while MinGW does. Removing
`-pthread` option with MS linker fixes the following warning:

    clang: warning: argument unused during compilation: '-pthread'
        [-Wunused-command-line-argument]

Option `--no-as-needed` is meaningless for PE output. Disabling it on
Windows fixes the following warning:

    LINK : warning LNK4044: unrecognized option '/-no-as-needed'; ignored

Fixes: 98edcbb5a ("eal/windows: introduce Windows support")

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Tested-by: William Tu <u9012063@gmail.com>
Tested-by: Pallavi Kadam <pallavi.kadam@intel.com>
Acked-by: Pallavi Kadam <pallavi.kadam@intel.com>
4 years agobuild: add cross-file for MinGW-w64
Dmitry Kozlyuk [Thu, 27 Feb 2020 04:25:35 +0000 (07:25 +0300)]
build: add cross-file for MinGW-w64

Add Meson configuration to cross-compile for Windows using MinGW-w64.
It may require adjustments in some cases, but at least it provides
the foundation.

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Tested-by: William Tu <u9012063@gmail.com>
Tested-by: Pallavi Kadam <pallavi.kadam@intel.com>
4 years agobuild: support MinGW-w64 with Meson
Dmitry Kozlyuk [Thu, 27 Feb 2020 04:25:34 +0000 (07:25 +0300)]
build: support MinGW-w64 with Meson

MinGW-w64 linker does not mimic MS linker options, so the build system
must differentiate between linkers on Windows. Use GNU linker options
with GCC and MS linker options with Clang.

MinGW-w64 by default uses MSVCRT stdio, which does not comply to ANSI,
most notably its formatting and string handling functions. MinGW-w64
support for the Universal CRT (UCRT) is ongoing, but the toolchain
provides its own standard-complying implementation of stdio. The latter
is used in the patch to support formatting in DPDK.

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Tested-by: William Tu <u9012063@gmail.com>
Tested-by: Pallavi Kadam <pallavi.kadam@intel.com>
4 years agoeal/windows: support building with MinGW-w64
Dmitry Kozlyuk [Thu, 27 Feb 2020 04:25:33 +0000 (07:25 +0300)]
eal/windows: support building with MinGW-w64

Disable bundled getopt implementation and GNU extensions shim when
building in GNU environment.

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Tested-by: William Tu <u9012063@gmail.com>
Tested-by: Pallavi Kadam <pallavi.kadam@intel.com>
Acked-by: Pallavi Kadam <pallavi.kadam@intel.com>
4 years agoeal/windows: use lowercase filenames for system headers
Dmitry Kozlyuk [Thu, 27 Feb 2020 04:25:32 +0000 (07:25 +0300)]
eal/windows: use lowercase filenames for system headers

Mixed case in Windows header names causes errors when cross-compiling
from Linux with case-sensitive filesystem using MinGW, because MinGW
distribution provides all platform SDK headers in lowercase. The change
does not affect Windows native builds on case-insensitive filesystems
(NTFS default).

Reported-by: Narcisa Vasile <navasile@microsoft.com>
Reported-by: William Tu <u9012063@gmail.com>
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Tested-by: William Tu <u9012063@gmail.com>
Tested-by: Pallavi Kadam <pallavi.kadam@intel.com>
Acked-by: Pallavi Kadam <pallavi.kadam@intel.com>
4 years agoeal: introduce portable format attribute
Dmitry Kozlyuk [Thu, 27 Feb 2020 04:25:31 +0000 (07:25 +0300)]
eal: introduce portable format attribute

When using __attribute__((format(...)) on functions, GCC on Windows
assumes MS-specific format string by default, even if the underlying
stdio implementation is ANSI-compliant (either MS Unicersal CRT
or MinGW implementation). Wrap attribute into a macro that forces
GNU-specific format string when using GCC.

Use this new attribute for logging and panic messages in EAL
and for output strings in cmdline library.

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Tested-by: William Tu <u9012063@gmail.com>
Tested-by: Pallavi Kadam <pallavi.kadam@intel.com>
4 years agoeal: fix compiler detection in public headers
Thomas Monjalon [Mon, 16 Mar 2020 12:04:53 +0000 (13:04 +0100)]
eal: fix compiler detection in public headers

RTE_TOOLCHAIN_* macros are defining the target compiler.
Some API may be used in a host application like pmdinfogen.
That's why the the public headers should check the effective compiler
in use instead of the target compiler.

Detecting the compiler with macros is easy, except for __GNUC__
which is defined in all compilers supporting some GNU compatibility.

It is improved by defining RTE_CC_CLANG, RTE_CC_ICC and RTE_CC_GCC.
The extra macro RTE_CC_IS_GNU is defined to 0 or 1 in GCC case,
so it can be used simply with #if.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
4 years agopci: fix build on ppc
David Christensen [Mon, 16 Mar 2020 20:47:49 +0000 (13:47 -0700)]
pci: fix build on ppc

The include file rte_debug.h is pulled into x86 builds through the
following callchain:

lib/librte_eal/common/include/generic/rte_cycles.h:17,
lib/librte_eal/common/include/arch/x86/rte_cycles.h:13,
lib/librte_eal/common/include/arch/x86/rte_spinlock.h:18,
lib/librte_eal/common/include/arch/x86/rte_rwlock.h:13,

The PPC specific version of the same callchain does not include
rte_debug.h.  Add rte_debug.h back into the C files that require it.

Fixes: 0dcba5256287 ("pci: remove unneeded includes in public header file")
Cc: stable@dpdk.org
Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
Tested-by: David Wilder <dwilder@us.ibm.com>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agopci: fix build on FreeBSD
Bruce Richardson [Mon, 16 Mar 2020 16:37:05 +0000 (16:37 +0000)]
pci: fix build on FreeBSD

When removing the extra headers from rte_pci.h stdlib should have been
removed instead of stdio, since off_t is missing for BSD builds when just
including stdlib.h

Fixes: 0dcba5256287 ("pci: remove unneeded includes in public header file")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
4 years agopci: remove unneeded includes in public header file
Bruce Richardson [Mon, 16 Mar 2020 11:29:51 +0000 (11:29 +0000)]
pci: remove unneeded includes in public header file

The rte_pci.h file includes more header files than are actually needed,
which means that all users of it also include those headers. This patch
removes the unneeded headers - adding them elsewhere where other components
were requiring them but not including them directly.

Fixes: c752998b5e2e ("pci: introduce library and driver")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
4 years agotelemetry: fix port stats retrieval
Ciara Power [Thu, 27 Feb 2020 17:04:56 +0000 (17:04 +0000)]
telemetry: fix port stats retrieval

The ep struct is used to track what type of stats are required by the
client. For PORT_STATS type, it contains the lists of port and metric
ids to query, and the number of ids in each list.

The ep struct has values set (num of port and metric ids) when a request
for port stats values by name is received. However, after this value
assignment, the struct is reset to all 0 values, meaning the number of
port and metric ids required now both show as 0, and the client will not
receive the requested data in response. To fix this issue, the memset
call is now moved above the ep struct value assignment.

Fixes: 4080e46c8078 ("telemetry: support global metrics")
Cc: stable@dpdk.org
Signed-off-by: Ciara Power <ciara.power@intel.com>
Reviewed-by: Kevin Laatz <kevin.laatz@intel.com>
4 years agoservice: fix crash on exit
Harry van Haaren [Wed, 11 Mar 2020 14:39:27 +0000 (14:39 +0000)]
service: fix crash on exit

This commit releases all service cores from their role,
returning them to ROLE_RTE on rte_service_finalize().

This fixes an issue relating to the service cores causing
a race-condition on rte_eal_cleanup(), where the service core
could still be executing while the main thread has already
free-d the service memory, leading to a segfault.

Fixes: da23f0aa87d8 ("service: fix memory leak with new function")
Cc: stable@dpdk.org
Reported-by: David Marchand <david.marchand@redhat.com>
Reported-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Aaron Conole <aconole@redhat.com>
4 years agomem: mark pages as not accessed when reserving VA
David Marchand [Mon, 9 Mar 2020 14:54:42 +0000 (15:54 +0100)]
mem: mark pages as not accessed when reserving VA

When the memory allocator reserves virtual addresses, it still does not
know what they will be used for.
Besides, huge areas are reserved for memory hotplug in multiprocess
setups. But most of the pages are unused in the whole life of the
processes.

Change protection mode to PROT_NONE when only reserving VA.
The memory allocator already switches to the right mode when making use
of it.

It also has the nice effect of getting those pages skipped by the kernel
when calling mlockall() or when a coredump gets generated.

Cc: stable@dpdk.org
Suggested-by: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
4 years agoeal/arm64: fix precise TSC
Haifeng Lin [Thu, 12 Mar 2020 01:08:33 +0000 (01:08 +0000)]
eal/arm64: fix precise TSC

In order to get more accurate the cntvct_el0 reading,
SW must invoke isb.

Fixes: ccad39ea0712 ("eal/arm: add cpu cycle operations for ARMv8")
Cc: stable@dpdk.org
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Haifeng Lin <haifeng.lin@huawei.com>
4 years agoeal/arm64: remove internal macros
David Marchand [Mon, 9 Mar 2020 09:38:44 +0000 (10:38 +0100)]
eal/arm64: remove internal macros

No need to export dsb and dmb.
EAL memory barriers are the public API.

%s/\<\(d.b\)\>(\([^()]*\))$/asm volatile("\1 \2" : : : "memory")/

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
4 years agoeal: fix log message print for regex
Sunil Kumar Kori [Mon, 9 Mar 2020 06:17:23 +0000 (11:47 +0530)]
eal: fix log message print for regex

If user passes log-level eal parameter to enable log level based on regex
then in case of error message is being printed for pattern match instead of
regex. Following is the warning message thrown:

Compiling C object 'lib/76b5a35@@rte_eal@sta/librte_eal_common_eal_common_options.c.o'.
In function ‘eal_parse_log_level’,
   inlined from ‘eal_parse_common_option’ at ../lib/librte_eal/common/eal_common_options.c:1418:7:
../lib/librte_eal/common/eal_common_options.c:1053:4: warning: ‘%s’ directive argument is null [-Wformat-overflow=]
 1053 |    fprintf(stderr, "cannot set log level %s,%d\n",
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1054 |     pattern, priority);
      |     ~~~~~~~~~~~~~~~~~~

Fixes: 7f0bb634a140 ("log: add ability to match log type with globbing")
Cc: stable@dpdk.org
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
4 years agoeal: fix 32-bit structure marker
Haiyue Wang [Sun, 8 Mar 2020 04:18:24 +0000 (12:18 +0800)]
eal: fix 32-bit structure marker

Use the 32bit typedef for structure 4B alignment marking.

Fixes: 2b393160a480 ("eal: introduce structure markers")
Cc: stable@dpdk.org
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
4 years agodrivers/crypto: fix build with make 4.3
Thomas Monjalon [Thu, 27 Feb 2020 22:20:28 +0000 (23:20 +0100)]
drivers/crypto: fix build with make 4.3

In the check for the version of intel-ipsec-mb library,
there is a backslash in front of the #include.
This backslash is for escaping the hash sign parsed as
a number sign in make.

Since make-4.3, escaping is not required for the number sign.
As a consequence, it resolves now to '\#':

syntax error near unexpected token `|'
`grep -e "IMB_VERSION_STR" \#include <intel-ipsec-mb.h> | cut -d'"' -f2'
syntax error near unexpected token `|'
`grep -e "IMB_VERSION_NUM" \#include <intel-ipsec-mb.h> | cut -d' ' -f3'

The makefiles are fixed by using a variable for the hash sign,
as recommended in make-4.3 changelog:
https://lists.gnu.org/archive/html/info-gnu/2020-01/msg00004.html

Fixes: 3067c8ce77ac ("crypto/aesni_mb: fix build with custom dependency path")
Fixes: 457b8e372975 ("crypto/aesni_gcm: check dependency version with make")
Fixes: bf6eb2c22fd1 ("crypto/kasumi: use IPsec library")
Fixes: 7c87e2d7b359 ("crypto/snow3g: use IPsec library")
Fixes: 61f7c988e39e ("crypto/zuc: use IPsec library")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
4 years agodevtools: add acronyms in dictionary for commit checks
Ferruh Yigit [Fri, 6 Mar 2020 14:32:53 +0000 (14:32 +0000)]
devtools: add acronyms in dictionary for commit checks

BAR    -> Base Address Register
FDIR   -> Flow Director
GENEVE -> Generic Network Virtualization Encapsulation
IO     -> Input/Output
MPLS   -> Multiprotocol Label Switching
NEON
null
NVGRE  -> Network Virtualization using Generic Routing Encapsulation
RDMA   -> Remote Direct Memory Access
TC     -> Traffic Class
VFIO   -> Virtual Function I/O
VXLAN  -> Virtual Extensible LAN
XDP    -> eXpress Data Path

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agodrivers: add crypto as dependency for event drivers
Hemant Agrawal [Thu, 5 Mar 2020 12:04:12 +0000 (17:34 +0530)]
drivers: add crypto as dependency for event drivers

Since the introduction of crypto event adapters, event drivers
have dependencies on crypto drivers.

/usr/bin/ld: cannot find -lrte_pmd_dpaa_sec
collect2: error: ld returned 1 exit status
make[9]: *** [.../mk/rte.lib.mk:100:
librte_pmd_dpaa_event.so.20.0.2] Error 1

Fixes: b0f66a68ca74 ("event/dpaa: support crypto adapter")
Fixes: 3721c39f405a ("event/dpaa2: support crypto adapter")
Cc: stable@dpdk.org
Reported-by: David Marchand <david.marchand@redhat.com>
Suggested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agoexamples/qos_sched: fix build with gcc 10
Timothy Redaelli [Wed, 5 Feb 2020 17:05:46 +0000 (18:05 +0100)]
examples/qos_sched: fix build with gcc 10

GCC 10 defaults to -fno-common, this means a linker error will now be
reported if the same global variable is defined in more than one
compilation unit.

Fixes: be1e533238c0 ("examples/qos_sched: add TC and queue config flexibility")
Cc: stable@dpdk.org
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agoexamples/eventdev: fix build with gcc 10
Timothy Redaelli [Wed, 5 Feb 2020 17:05:45 +0000 (18:05 +0100)]
examples/eventdev: fix build with gcc 10

GCC 10 defaults to -fno-common, this means a linker error will now be
reported if the same global variable is defined in more than one
compilation unit.

Fixes: 3d1b33e44ae2 ("examples/eventdev: move common data into pipeline common")
Cc: stable@dpdk.org
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agoexamples/vhost_blk: fix build with gcc 10
Timothy Redaelli [Wed, 5 Feb 2020 13:47:03 +0000 (14:47 +0100)]
examples/vhost_blk: fix build with gcc 10

GCC 10 defaults to -fno-common, this means a linker error will now be
reported if the same global variable is defined in more than one
compilation unit.

Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample")
Cc: stable@dpdk.org
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agoapp/pipeline: fix build with gcc 10
Timothy Redaelli [Wed, 5 Feb 2020 14:12:20 +0000 (15:12 +0100)]
app/pipeline: fix build with gcc 10

GCC 10 defaults to -fno-common, this means a linker error will now be
reported if the same global variable is defined in more than one
compilation unit.

Fixes: 48f31ca50cc4 ("app/pipeline: packet framework benchmark")
Cc: stable@dpdk.org
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
4 years agotest: fix build with gcc 10
Timothy Redaelli [Wed, 5 Feb 2020 12:50:42 +0000 (13:50 +0100)]
test: fix build with gcc 10

GCC 10 defaults to -fno-common, this means a linker error will now be
reported if the same global variable is defined in more than one
compilation unit.

Fixes: 08e0c7581468 ("test/fib: add performance autotests")
Cc: stable@dpdk.org
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
4 years agocrypto/octeontx2: fix build with gcc 10
Timothy Redaelli [Wed, 5 Feb 2020 12:50:41 +0000 (13:50 +0100)]
crypto/octeontx2: fix build with gcc 10

GCC 10 defaults to -fno-common, this means a linker error will now be
reported if the same global variable is defined in more than one
compilation unit.

Fixes: 2f8a1b963eb7 ("crypto/octeontx2: add PMD skeleton")
Cc: stable@dpdk.org
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
4 years agomaintainers: update for Netcope PMDs
Jan Remes [Mon, 2 Mar 2020 16:34:05 +0000 (17:34 +0100)]
maintainers: update for Netcope PMDs

Jan and Rastislav are leaving Netcope. Martin and Jakub
will replace them as Netcope PMD maintainers.

Signed-off-by: Jan Remes <remes@netcope.com>
4 years agomaintainers: update for virtio and vhost
Xiaolong Ye [Fri, 21 Feb 2020 13:35:39 +0000 (21:35 +0800)]
maintainers: update for virtio and vhost

I volunteer to be co-maintainer for Vhost-user/Vhost PMD/Virtio PMD.

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Tiwei Bie <tiwei.bie@intel.com>
Acked-by: Zhihong Wang <zhihong.wang@intel.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
4 years agomaintainers: resign from virtio and vhost
Tiwei Bie [Fri, 21 Feb 2020 13:28:41 +0000 (21:28 +0800)]
maintainers: resign from virtio and vhost

I'm leaving Intel, and I'm not sure when I could dedicate enough
time to DPDK in the future. So I'm removing my name from the
MAINTAINERS file.

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
4 years agoversion: 20.05-rc0
David Marchand [Tue, 25 Feb 2020 16:32:00 +0000 (17:32 +0100)]
version: 20.05-rc0

Start a new release cycle with empty release notes.
ABI must now be checked with v20.02 as a reference.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
4 years agoversion: 20.02
Thomas Monjalon [Tue, 25 Feb 2020 20:46:30 +0000 (21:46 +0100)]
version: 20.02

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
4 years agodevtools: export dictionary for commit title check
Sean Morrissey [Mon, 24 Feb 2020 15:30:01 +0000 (15:30 +0000)]
devtools: export dictionary for commit title check

Moved title syntax to a separate file so that it improves code
readability and allows easy addition.

Also logic changed from checking for bad pattern to checking good
pattern which documents the expected syntax more clearly, and does not
have gaps in the checks.

Signed-off-by: Sean Morrissey <sean.morrissey@intel.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agodoc: fix VM power manager guide as PDF
Thomas Monjalon [Tue, 25 Feb 2020 17:43:18 +0000 (18:43 +0100)]
doc: fix VM power manager guide as PDF

When generating PDF with on an old system,
there are failures because of long tables:

vm_power_management.rst:420: ERROR: Malformed table.
Column span alignment problem in table line 5.
vm_power_management.rst:545: ERROR: Malformed table.
Column span alignment problem in table line 5.
vm_power_management.rst:754: ERROR: Malformed table.
Column span alignment problem in table line 5.

The tables (having only two columns) are replaced
with the more appropriate definition lists.

Fixes: 30d3aa861db5 ("doc: rework VM power manager user guide")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
4 years agodoc: add tested Marvell integrated NIC platforms
Jerin Jacob [Tue, 25 Feb 2020 17:08:14 +0000 (22:38 +0530)]
doc: add tested Marvell integrated NIC platforms

Add tested Marvell integrated NIC platforms to v20.02 release notes.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
4 years agodevtools: add fixes flag to commit listing
Kevin Traynor [Mon, 3 Feb 2020 15:59:55 +0000 (15:59 +0000)]
devtools: add fixes flag to commit listing

During backporting, if the fixes or stable tag are missing,
it usually requires some investigation by stable maintainer
as to why.

The presence of a fixes tag may be known from whether the
originating release of the issue is printed at the end of the
line but with variable line lengths and nested partial fixes
it doesn't catch the eye.

When there are a large amount of commits, adding an aligned column
indicating the presence of a fixes tag beside the stable one makes
it easier to quickly see the patches requiring further investigation.

e.g.
20.02 8f33cbcfa S F net/i40e/base: fix buffer address (16.04)
20.02 4b3da9415 S F net/i40e/base: fix error message (1.7.0)
20.02 1da546c39 - F net/i40e/base: fix missing link modes (17.08)
20.02 79bfe7808 S F net/i40e/base: fix Tx descriptors number (1.7.0)
20.02 50126939c - F net/i40e/base: fix retrying logic (18.02)
20.02 dcd05da0a S F app/testpmd: fix GENEVE flow item (18.02)
20.02 b0b9fdad2 S - net/bnx2x: support secondary process (N/A)
20.02 f8279f47d S F net/netvsc: fix crash in secondary process (18.08)

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
4 years agodoc: add feature support matrix link in i40e guide
Xiaolong Ye [Tue, 25 Feb 2020 11:14:40 +0000 (19:14 +0800)]
doc: add feature support matrix link in i40e guide

There is an increase in number of issues related to supported cables and
modules, this link and note can help users identify or narrow down the
issues.

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agodoc: remove not supported features from hinic matrix
Thomas Monjalon [Mon, 24 Feb 2020 19:51:26 +0000 (20:51 +0100)]
doc: remove not supported features from hinic matrix

Only the supported features are supposed to be listed
in the networking features matrix.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
4 years agodoc: fix typos in 19.11 release notes
Yong Wang [Tue, 31 Dec 2019 07:36:47 +0000 (15:36 +0800)]
doc: fix typos in 19.11 release notes

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

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

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

The no-inline hint flag is described.

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

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

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

Add a deprecation notice indicating the removal schedule.

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

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

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

Adding the deprecation notice for the same in advance.

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

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

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

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

Uppercase of the device family name BlueField is also fixed.

The lists of supported devices are fixed.

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

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

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

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

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

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

The metadata limitation is described.

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

Document validation limitations for encap/decap.

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

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

The mlx5 requirements for DSCP field rewrite offload were missing.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>