dpdk.git
6 years agonet/netvsc: implement link state change callback
Stephen Hemminger [Thu, 30 Aug 2018 22:35:11 +0000 (15:35 -0700)]
net/netvsc: implement link state change callback

Implement callback functionality on link state changes.
This is not really driven off of interrupt file descriptor like most other
PMD's. Instead, it happens when a link state change message arrives
in the common ring buffer.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
6 years agonet/netvsc: exhausting Tx descriptors is not an error
Stephen Hemminger [Thu, 30 Aug 2018 22:35:10 +0000 (15:35 -0700)]
net/netvsc: exhausting Tx descriptors is not an error

If application sends faster than vswitch can keep up, then the
transmit descriptor pool will be exhausted. This is not a failure
so change the name statistic and don't include it in oerrors.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
6 years agonet/netvsc: allow tuning latency with devargs
Stephen Hemminger [Thu, 30 Aug 2018 22:35:09 +0000 (15:35 -0700)]
net/netvsc: allow tuning latency with devargs

Allow overriding default guest to host latency on per device basis
with devargs.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
6 years agobus/vmbus: add devargs support
Stephen Hemminger [Thu, 30 Aug 2018 22:35:08 +0000 (15:35 -0700)]
bus/vmbus: add devargs support

Take device arguments from command line and put
them in the device devargs.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
6 years agoethdev: make default behavior CRC strip on Rx
Ferruh Yigit [Tue, 4 Sep 2018 10:12:56 +0000 (11:12 +0100)]
ethdev: make default behavior CRC strip on Rx

Removed DEV_RX_OFFLOAD_CRC_STRIP offload flag.
Without any specific Rx offload flag, default behavior by PMDs is to
strip CRC.

PMDs that support keeping CRC should advertise DEV_RX_OFFLOAD_KEEP_CRC
Rx offload capability.

Applications that require keeping CRC should check PMD capability first
and if it is supported can enable this feature by setting
DEV_RX_OFFLOAD_KEEP_CRC in Rx offload flag in rte_eth_dev_configure()

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Tomasz Duszynski <tdu@semihalf.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Jan Remes <remes@netcope.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Hyong Youb Kim <hyonkim@cisco.com>
6 years agonet/bonding: do not ignore RSS key on device config
Igor Romanov [Wed, 29 Aug 2018 07:51:24 +0000 (08:51 +0100)]
net/bonding: do not ignore RSS key on device config

Bonding driver ignores the value of RSS key (that is set in the port RSS
configuration) in bond_ethdev_configure(). So the only way to set
non-default RSS key is by using rss_hash_update(). This is not an
expected behaviour.

Make the bond_ethdev_configure() set default RSS key only if
requested key is set to NULL.

Fixes: 734ce47f71e0 ("bonding: support RSS dynamic configuration")
Cc: stable@dpdk.org
Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Chas Williams <chas3@att.com>
6 years agonet/bonding: use evenly distributed default RSS RETA
Igor Romanov [Wed, 29 Aug 2018 07:48:30 +0000 (08:48 +0100)]
net/bonding: use evenly distributed default RSS RETA

Default Redirection Table that is set in bonding driver is distributed
evenly over all Rx queues only within every RETA group (the first RETA
entries in every group are always start with zero). But in the most
drivers, default RETA is distributed over all Rx queues without sequence
resets in the beginning of a new group, which implies more balanced
per-core load.

Change the default RETA to be evenly distributed over all Rx queues
considering the whole table.

Fixes: 734ce47f71e0 ("bonding: support RSS dynamic configuration")
Cc: stable@dpdk.org
Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Chas Williams <chas3@att.com>
6 years agonet/sfc: support runtime Tx queue setup
Igor Romanov [Wed, 29 Aug 2018 07:35:34 +0000 (08:35 +0100)]
net/sfc: support runtime Tx queue setup

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc: support runtime Rx queue setup
Igor Romanov [Wed, 29 Aug 2018 07:35:33 +0000 (08:35 +0100)]
net/sfc: support runtime Rx queue setup

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/cxgbe: add flow ops to match based on dest MAC
Shagun Agrawal [Mon, 27 Aug 2018 12:52:32 +0000 (18:22 +0530)]
net/cxgbe: add flow ops to match based on dest MAC

Add flow operations to match packets based on destination MAC address.
Allocate and program hardware MPS table with the destination MAC
address to be matched against. The returned MPS index is then used while
offloading flows to LETCAM (maskfull) and HASH (maskless) filter regions.

Also update existing mac_addr_set() to use the new MPS table API.

Signed-off-by: Shagun Agrawal <shaguna@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
6 years agonet/cxgbe: add API to program hardware MPS table
Shagun Agrawal [Mon, 27 Aug 2018 12:52:31 +0000 (18:22 +0530)]
net/cxgbe: add API to program hardware MPS table

Add API to program and manage hardware Multi Port Switch table. MPS
holds destination MAC addresses to be matched against incoming packets
for further rule processing. Packets not matching any entry in MPS table
will be dropped by default, unless the underlying port is in promiscuous
mode.

Signed-off-by: Shagun Agrawal <shaguna@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
6 years agonet/cxgbe: add flow operations to offload VLAN actions
Shagun Agrawal [Mon, 27 Aug 2018 12:52:30 +0000 (18:22 +0530)]
net/cxgbe: add flow operations to offload VLAN actions

Add flow API operations to offload vlan push, pop, and rewrite actions.
For vlan push or rewrite actions, allocate and program an entry from
L2T table. Use the L2T index to program vlan actions for LETCAM
(maskfull) and HASH (maskless) filters.

Signed-off-by: Shagun Agrawal <shaguna@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
6 years agonet/cxgbe: add API to program hardware layer 2 table
Shagun Agrawal [Mon, 27 Aug 2018 12:52:29 +0000 (18:22 +0530)]
net/cxgbe: add API to program hardware layer 2 table

Add API to program and manage hardware Layer 2 Table. L2T holds
information necessary to rewrite specific fields in packet, such
as destination MAC address and vlan id.

Signed-off-by: Shagun Agrawal <shaguna@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
6 years agoexamples/vhost_crypto: support multi-core
Fan Zhang [Fri, 22 Jun 2018 12:36:05 +0000 (13:36 +0100)]
examples/vhost_crypto: support multi-core

Originally vhost_crypto sample application only supports single
core. This patch adds the multi-core support with more flexible
options.

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
6 years agoethdev: fix missing names in Tx offload name array
Dekel Peled [Wed, 12 Sep 2018 08:28:02 +0000 (11:28 +0300)]
ethdev: fix missing names in Tx offload name array

Patch 5355f443 added two definitions of DEV_TX_OFFLOAD_xxx.
If new Tx offload capabilities are defined, they also must be mentioned
in rte_tx_offload_names in rte_ethdev.c file.

This patch adds the required lines in array rte_tx_offload_names.

Fixes: 5355f4439e2e ("ethdev: introduce generic IP/UDP tunnel checksum and TSO")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/i40e: stop LLDP before setting local LLDP MIB
Chas Williams [Mon, 6 Aug 2018 20:05:45 +0000 (16:05 -0400)]
net/i40e: stop LLDP before setting local LLDP MIB

>From the Intel Ethernet Controller X710/XXV710/XL710 Specification
Update:

    Starting from NVM 5.02, if the Set Local LLDP MIB command is
    received while the DCBx specific agent is stopped, the command
    returns an EPERM error. If the command is received while the
    LLDP agent is stopped, it sets the local MIB without exchanging
    LLDP with peer, and returns SUCCESS.

This results in the harmless, but annoying, diagnostic:

    default dcb config fails. err = -53, aq_err = 1.

So, if possible (older firmwares cannot safely stop LLDP), stop the
LLDP daemon when we are in software mod before we attempt to call
i40e_set_dcb_config.

Signed-off-by: Chas Williams <chas3@att.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
6 years agonet/i40e: add alarm handler
Beilei Xing [Tue, 11 Sep 2018 03:35:41 +0000 (11:35 +0800)]
net/i40e: add alarm handler

This patch adds alarm handler, and then i40e
PF will use alarm handler instead of interrupt
handler when device is started and Rx interrupt
mode is disabled. This way will save CPU cycles
during receiving packets.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
6 years agovhost: fix return value on enqueue path
Tiwei Bie [Thu, 6 Sep 2018 04:59:27 +0000 (12:59 +0800)]
vhost: fix return value on enqueue path

Fixes: 62250c1d0978 ("vhost: extract split ring handling from Rx and Tx functions")
Fixes: a922401f35cc ("vhost: add Rx support for packed ring")
Cc: stable@dpdk.org
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
6 years agovhost-user: drop connection on message handling failures
Ilya Maximets [Mon, 3 Sep 2018 10:12:24 +0000 (13:12 +0300)]
vhost-user: drop connection on message handling failures

There are a lot of cases where vhost-user massage handling
could fail and end up in a fully not recoverable state. For
example, allocation failures of shadow used ring and batched
copy array are not recoverable and leads to the segmentation
faults like this on the receiving/transmission path:

  Program received signal SIGSEGV, Segmentation fault.
  [Switching to Thread 0x7f913fecf0 (LWP 43625)]
  in copy_desc_to_mbuf () at /lib/librte_vhost/virtio_net.c:760
  760       batch_copy[vq->batch_copy_nb_elems].dst =

This could be easily reproduced in case of low memory or big
number of vhost-user ports.

Fix that by propagating error to the upper layer which will
end up with disconnection in case we can not report to
the message sender when the error happens.

Fixes: f689586bc060 ("vhost: shadow used ring update")
Cc: stable@dpdk.org
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
6 years agovhost: fix vhost interrupt support
Tiwei Bie [Tue, 4 Sep 2018 23:55:55 +0000 (07:55 +0800)]
vhost: fix vhost interrupt support

When VIRTIO_RING_F_EVENT_IDX is negotiated, we need to
update the avail event to enable the notification.

Fixes: 3f8ff12821e4 ("vhost: support interrupt mode")
Cc: stable@dpdk.org
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
6 years agonet/virtio-user: check negotiated features before set
Eric Zhang [Wed, 29 Aug 2018 15:55:21 +0000 (11:55 -0400)]
net/virtio-user: check negotiated features before set

This patch checks negotiated features to see if necessary to offload
before set the tap device offload capabilities. It also checks if kernel
support the TUNSETOFFLOAD operation.

Fixes: 5e97e4202563 ("net/virtio-user: enable offloading")
Cc: stable@dpdk.org
Signed-off-by: Eric Zhang <eric.zhang@windriver.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
6 years agovhost: fix zmbufs array leak after NUMA realloc
Ilya Maximets [Wed, 15 Aug 2018 14:54:39 +0000 (17:54 +0300)]
vhost: fix zmbufs array leak after NUMA realloc

'numa_realloc()' allocates 'zmbufs' even if zero copy mode
is not configured. This leads to memory leak, because array
is freed only for zero copy case.

Fixes: 2651726defb7 ("vhost: do deep copy while reallocating queue")
CC: stable@dpdk.org
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
6 years agoexamples/vhost: remove unnecessary constant
Rami Rosen [Sat, 25 Aug 2018 19:22:40 +0000 (22:22 +0300)]
examples/vhost: remove unnecessary constant

This patch removes an unnecessary definition of MAX_PRINT_BUFF
in examples/vhost/main.c, since it is no longer being used.

Fixes: 68363d85857d ("examples/vhost: remove the non-working zero copy code")
Cc: stable@dpdk.org
Signed-off-by: Rami Rosen <ramirose@gmail.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
6 years agodoc: fix wrong usage of bind command
Rami Rosen [Fri, 24 Aug 2018 07:43:02 +0000 (10:43 +0300)]
doc: fix wrong usage of bind command

This patch fixes wrong usage of bind command in vhost.rst.
Using "dpdk-devbind.py -b=uio_pci_generic 0000:00:04.0" gives
an error of "unbind failed". It should be "-b uio_pci_generic" so
it will work correctly.

Fixes: a971c509a523 ("doc: update vhost sample guide")
Cc: stable@dpdk.org
Signed-off-by: Rami Rosen <ramirose@gmail.com>
Acked-by: Zhiyong Yang <zhiyong.yang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
6 years agonet/mlx5: fix interrupt completion queue index wrapping
Xueming Li [Thu, 23 Aug 2018 23:10:33 +0000 (07:10 +0800)]
net/mlx5: fix interrupt completion queue index wrapping

Rxq cq_ci was 16 bits while hardware is expecting to wrap
around 24 bits, this caused interrupt failure after burst of packets.

Fixes: 43e9d9794cde ("net/mlx5: support upstream rdma-core")
Cc: stable@dpdk.org
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
6 years agonet/ixgbe: do not return internal code
Luca Boccassi [Mon, 3 Sep 2018 14:18:11 +0000 (15:18 +0100)]
net/ixgbe: do not return internal code

In case of a temporary failure the ixgbe driver can return the internal
error IXGBE_ERR_RESET_FAILED to the application. Instead, return
-EAGAIN as per the public API specification.

Fixes: cddaf87a1ecb ("lib: fix unused values")
Cc: stable@dpdk.org
Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
6 years agonet/cxgbe: fix memory access when parsing flow match items
Shagun Agrawal [Mon, 27 Aug 2018 12:53:31 +0000 (18:23 +0530)]
net/cxgbe: fix memory access when parsing flow match items

Coverity issue: 293096
Fixes: ee61f5113b17 ("net/cxgbe: parse and validate flows")
Cc: stable@dpdk.org
Signed-off-by: Shagun Agrawal <shaguna@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
6 years agonet/e1000: fix Tx offload capability typos
Yaroslav Brustinov [Wed, 8 Aug 2018 09:45:21 +0000 (12:45 +0300)]
net/e1000: fix Tx offload capability typos

Fix rx/tx typos in igb_get_tx_port_offloads_capa and
igb_get_tx_queue_offloads_capa.

Fixes: e5c05e6590ea ("net/e1000: convert to new Tx offloads API")
Cc: stable@dpdk.org
Signed-off-by: Yaroslav Brustinov <ybrustin@cisco.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
6 years agodoc: update i40e guide for GTPv1 package release
Beilei Xing [Mon, 3 Sep 2018 05:40:56 +0000 (13:40 +0800)]
doc: update i40e guide for GTPv1 package release

Add link of GTPv1 package release.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
6 years agonet/bonding: fix buffer corruption in packets
Jia Yu [Mon, 20 Aug 2018 05:18:45 +0000 (22:18 -0700)]
net/bonding: fix buffer corruption in packets

When bond slave devices cannot transmit all packets in bufs array,
tx_burst callback shall merge the un-transmitted packets back to
bufs array. Recent merge logic introduced a bug which causes
invalid mbuf addresses being written to bufs array.
When caller frees the un-transmitted packets, due to invalid addresses,
application will crash.

The fix is avoid shifting mbufs, and directly write un-transmitted
packets back to bufs array.

Fixes: 09150784a776 ("net/bonding: burst mode hash calculation")
Cc: stable@dpdk.org
Signed-off-by: Jia Yu <jyu@vmware.com>
Acked-by: Chas Williams <chas3@att.com>
6 years agoethdev: fix port ownership logs
Stephen Hemminger [Thu, 16 Aug 2018 22:37:14 +0000 (15:37 -0700)]
ethdev: fix port ownership logs

The rte_eth_dev_owner_unset function always generates a log
message because the unset value for owner id is 0.

Also, when rte_eth_dev_owner_delete is called with a valid
owner id, the log message should be at NOTICE not ERROR
severity.

Fixes: 5b7ba31148a8 ("ethdev: add port ownership")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Matan Azrad <matan@mellanox.com>
6 years agonet/nfp: fix live MAC changes not supported
Alejandro Lucero [Fri, 24 Aug 2018 14:25:36 +0000 (15:25 +0100)]
net/nfp: fix live MAC changes not supported

Some NFP firmwares support live changes to the MAC address, but
this is not always true and the firmware advertises it accordingly.

This patch checks if firmware does not support live changes and
sets RTE_ETH_DEV_NOLIVE_MAC_ADDR in that case.

Cc: stable@dpdk.org
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
6 years agoethdev: fix MAC changes when live change not supported
Alejandro Lucero [Fri, 24 Aug 2018 14:25:35 +0000 (15:25 +0100)]
ethdev: fix MAC changes when live change not supported

Current code assumes a MAC change can occur when the port has been
started. In fact, there are some NICs which require this port state
for being successful, but other NICs not always support MAC change
in that case.

This patch supports a new device flag for a device advertising this
limitation, and if the flag is set, the MAC is changed before the
port starts.

Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/mvpp2: support VLAN for parser offload
Natalie Samsonov [Fri, 24 Aug 2018 18:30:03 +0000 (20:30 +0200)]
net/mvpp2: support VLAN for parser offload

Add VLAN packet type support for parser offload.

Signed-off-by: Natalie Samsonov <nsamsono@marvell.com>
Reviewed-by: Shlomi Gridish <sgridish@marvell.com>
Reviewed-by: Dmitri Epshtein <dima@marvell.com>
Reviewed-by: Yuval Caduri <cyuval@marvell.com>
6 years agonet/mvpp2: make private variables static
Natalie Samsonov [Fri, 24 Aug 2018 18:30:02 +0000 (20:30 +0200)]
net/mvpp2: make private variables static

Mark internal variables static to avoid potential redefinition
errors later on.

Signed-off-by: Natalie Samsonov <nsamsono@marvell.com>
Reviewed-by: Yelena Krivosheev <yelena@marvell.com>
6 years agonet/mvpp2: fix comments and error messages
Natalie Samsonov [Fri, 24 Aug 2018 18:30:01 +0000 (20:30 +0200)]
net/mvpp2: fix comments and error messages

Fix comments and error messages.

Fixes: 7235341d7517 ("net/mrvl: support classifier")
Cc: stable@dpdk.org
Signed-off-by: Natalie Samsonov <nsamsono@marvell.com>
Reviewed-by: Liron Himi <lironh@marvell.com>
6 years agonet/mvpp2: fix array initialization
Tomasz Duszynski [Fri, 24 Aug 2018 18:30:00 +0000 (20:30 +0200)]
net/mvpp2: fix array initialization

Fix used_bpools array initialization by using range initializer.
This way all necessary variables are properly initialized regardless
of PP2_NUM_PKT_PROC value.

Fixes: 0ddc9b815b11 ("net/mrvl: add net PMD skeleton")
Cc: stable@dpdk.org
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
6 years agonet/mvpp2: use common code to initialize DMA
Liron Himi [Fri, 24 Aug 2018 18:29:59 +0000 (20:29 +0200)]
net/mvpp2: use common code to initialize DMA

Use common code to initialize MUSDK DMA memory buffers.

Signed-off-by: Liron Himi <lironh@marvell.com>
Reviewed-by: Natalie Samsonov <nsamsono@marvell.com>
6 years agocommon/mvep: add common code for Marvell drivers
Liron Himi [Fri, 24 Aug 2018 18:29:58 +0000 (20:29 +0200)]
common/mvep: add common code for Marvell drivers

Add MVEP (Marvell Embedded Processors) to drivers/common which
will keep code reused by current and future MRVL PMDs.
Right now we have only common DMA memory initialization routines there.

Signed-off-by: Liron Himi <lironh@marvell.com>
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Reviewed-by: Natalie Samsonov <nsamsono@marvell.com>
6 years agonet/mlx5: fix RSS flow action hash type selection
Shahaf Shuler [Tue, 14 Aug 2018 11:17:21 +0000 (14:17 +0300)]
net/mlx5: fix RSS flow action hash type selection

On the code after the below commits, the criteria to select the IPV4 or
IPV6 hash functions was the existence of some ETH_RSS_IPV4 RSS types on
the flow rule.

The check is wrong. For example ETH_RSS_NONFRAG_IPV4_TCP will not select
the IPV4 hash which will cause the packet to be spread in a bad way.

Fix it by adding the corresponding types needed for each hash selection.

Fixes: 592f05b29a25 ("net/mlx5: add RSS flow action")
Fixes: fd0b70316bca ("net/mlx5: support inner RSS computation")
Cc: stable@dpdk.org
Reported-by: Yaroslav Brustinov <ybrustin@cisco.com>
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
6 years agonet/mlx5: disable ConnectX-4 Lx Multi Packet Send by default
Shahaf Shuler [Mon, 13 Aug 2018 06:47:57 +0000 (09:47 +0300)]
net/mlx5: disable ConnectX-4 Lx Multi Packet Send by default

On ConnectX-4 Lx the Multi Packet Send (MPW) feature is considered
un-secure, as on some cases were the application provides incorrect mbufs
on the Tx burst the host or NIC can get stuck.

Hence, disabling the feature by default for this specific NIC.
Users can still enable this feature and enjoy the performance gain
(mostly for low number of cores) by using the txq_mpw_en devarg.

This patch will impact the out of the box performance of some application
using ConnectX-4 Lx for the sack of security and robustness.

Since we need different defaults based on the underlying device the mpw
field in the configuration struct was extended to contain also the
MLX5_ARG_UNSET option.

Cc: stable@dpdk.org
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
6 years agonet/mlx5: fix artificial L4 limitation on switch flow rules
Adrien Mazarguil [Mon, 6 Aug 2018 14:25:42 +0000 (16:25 +0200)]
net/mlx5: fix artificial L4 limitation on switch flow rules

Partial bit-masks are in fact supported on TCP/UDP source/destination
ports. Remove unnecessary check.

Fixes: 2bfc777e07 ("net/mlx5: add L2-L4 pattern items to switch flow rules")
Cc: stable@dpdk.org
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agovhost: suppress error if NUMA is not available
Ilya Maximets [Fri, 10 Aug 2018 07:24:54 +0000 (10:24 +0300)]
vhost: suppress error if NUMA is not available

It's a common case that 'get_mempolicy' fails on systems
without NUMA support. No need to flag an error in log for
this situation.

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
6 years agodoc: fix style and syntax in flow API guide
Ilya Maximets [Thu, 23 Aug 2018 08:05:54 +0000 (11:05 +0300)]
doc: fix style and syntax in flow API guide

Fixes: 3e0ceb9f17ff ("doc: add basic howto for flow API")
Cc: stable@dpdk.org
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/octeontx: fix packet corruption on Tx
Jerin Jacob [Fri, 17 Aug 2018 14:30:22 +0000 (20:00 +0530)]
net/octeontx: fix packet corruption on Tx

LMTST does not guarantee packet content get synced with L2C when
HW access the packet for transmitting.

Adding coherent IO write barrier will make sure HW sees the correct
packet if its modified.

Fixes: 9e747589bd4c ("net/octeontx: add packet transmit burst function")
Cc: stable@dpdk.org
Reported-by: Vikas Aggarwal <vikas.aggarwal@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
6 years agonet/netvsc: resize event buffer as needed
Stephen Hemminger [Tue, 14 Aug 2018 16:45:25 +0000 (09:45 -0700)]
net/netvsc: resize event buffer as needed

The event buffer was changed to be a fixed size value,
had a couple of issues. The big one is that rte_free was still
being called for a pointer that was not setup with rte_malloc().

The event buffer was also too small to handle heavy receive
traffic; and running the event buffer out would crash
the application.

Fix by going back to a dynamically resized event buffer.
And grow it by 25% to avoid lots of realloc's.

Fixes: 530af95a7849 ("bus/vmbus: avoid signalling host on read")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
6 years agonet/netvsc: implement free Tx mbuf on demand
Stephen Hemminger [Thu, 9 Aug 2018 17:50:08 +0000 (10:50 -0700)]
net/netvsc: implement free Tx mbuf on demand

Add tx_done_cleanup ethdev hook to allow application to
control if/when it wants completions to be handled.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
6 years agonet/netvsc: set lower host latency
Stephen Hemminger [Thu, 9 Aug 2018 17:50:07 +0000 (10:50 -0700)]
net/netvsc: set lower host latency

Tune the vmbus connection so the host scans faster. This improves
transmit performance. The host default value is 100us but setting
to 50us reduces packet loss significantly.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
6 years agobus/vmbus: add host latency tuning function
Stephen Hemminger [Thu, 9 Aug 2018 17:50:06 +0000 (10:50 -0700)]
bus/vmbus: add host latency tuning function

Add vmbus API to allow tuning the scan interval on the host side.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
6 years agonet/netvsc: fix chimney buffer size error handling
Stephen Hemminger [Thu, 9 Aug 2018 17:50:05 +0000 (10:50 -0700)]
net/netvsc: fix chimney buffer size error handling

Fix the error handling in setting up transmit buffer.
If setting up chimney buffer fails, then it is not connected so
no need to send disconnect.

Allow for some unused area if full area is not used.

Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
6 years agonet/bonding: support matching QinQ ethertype
Yunjian Wang [Tue, 7 Aug 2018 08:10:46 +0000 (16:10 +0800)]
net/bonding: support matching QinQ ethertype

We assume VLAN ethtertype is 0x8100 in get_vlan_offset() function,
but it could be 0x88A8 if QinQ is supported.

Fixes: 06fe78b98ccd ("bond: add mode 6")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Chas Williams <chas3@att.com>
6 years agoethdev: change vtune profiling approach
Ilia Kurakin [Thu, 19 Jul 2018 12:21:42 +0000 (15:21 +0300)]
ethdev: change vtune profiling approach

The patch changes rx_burst profiling approach:
1. VTune's instrumentation is removed
2. empty hook callback for profiling is added
This way all VTune-specific logic moves to the VTune side.
Hook is enabled only when CONFIG_RTE_ETHDEV_PROFILE_WITH_VTUNE option
is turned on. VTune uses this hook to attach to the polling cycle. It
is not possible to attach to the rx_burst directly, as it is inline.

Signed-off-by: Ilia Kurakin <ilia.kurakin@intel.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoacl: forbid rule with priority zero
Konstantin Ananyev [Fri, 24 Aug 2018 16:47:06 +0000 (17:47 +0100)]
acl: forbid rule with priority zero

If user specifies priority=0 for some of ACL rules
that can cause rte_acl_classify to return wrong results.
The reason is that priority zero is used internally for no-match nodes.
See more details at: https://bugs.dpdk.org/show_bug.cgi?id=79.
The simplest way to overcome the issue is just not allow zero
to be a valid priority for the rule.

Fixes: dc276b5780c2 ("acl: new library")
Cc: stable@dpdk.org
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
6 years agobus/vdev: fix error log on secondary device scan
Qi Zhang [Mon, 3 Sep 2018 08:49:29 +0000 (16:49 +0800)]
bus/vdev: fix error log on secondary device scan

When a secondary process handles VDEV_SCAN_ONE mp action, it is possible
the device is already be inserted. This happens when we have multiple
secondary processes which cause multiple broadcasts from primary during
bus->scan. So we don't need to log any error for -EEXIST.

Bugzilla ID: 84
Fixes: cdb068f031c6 ("bus/vdev: scan by multi-process channel")
Cc: stable@dpdk.org
Reported-by: Gage Eads <gage.eads@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Gage Eads <gage.eads@intel.com>
6 years agomalloc: fix potential null pointer dereference
Tiwei Bie [Wed, 15 Aug 2018 07:20:15 +0000 (15:20 +0800)]
malloc: fix potential null pointer dereference

We need to do the NULL pointer check first after malloc().

Fixes: 07dcbfe0101f ("malloc: support multiprocess memory hotplug")
Cc: stable@dpdk.org
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
6 years agobuild: enable ARM NEON flag when __aarch64__ defined
Honnappa Nagarahalli [Sun, 2 Sep 2018 18:35:28 +0000 (13:35 -0500)]
build: enable ARM NEON flag when __aarch64__ defined

GCC version 4.8.5 does not pre-define __ARM_NEON. NEON is not
optional for ArmV8. Hence NEON related code can be enabled
when __aarch64__ is defined.

Bugzilla ID: 82
Cc: stable@dpdk.org
Reported-by: Raslan Darawsheh <rasland@mellanox.com>
Reported-by: Thomas F Herbert <therbert@redhat.com>
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
6 years agomk: disable OcteonTx for buggy compilers only on arm64
Jerin Jacob [Mon, 3 Sep 2018 09:31:10 +0000 (15:01 +0530)]
mk: disable OcteonTx for buggy compilers only on arm64

Disable octeontx for gcc 4.8.5 as the compiler is emitting "internal
compiler error" for aarch64. The GCC "internal compiler error" was
observed only for arm64 architecture so disable the PMD only
for arm64.

Fixes: 4f760550a093 ("mk: disable OcteonTx for buggy compilers")
Cc: stable@dpdk.org
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agobus/fslmc: fix undefined reference of memsegs
Hemant Agrawal [Mon, 27 Aug 2018 08:52:23 +0000 (14:22 +0530)]
bus/fslmc: fix undefined reference of memsegs

This patch fix the undefined reference issue with rte_dpaa2_memsegs
when compiled in shared lib mode with EXTRA_CFLAGS="-g -O0"

Bugzilla ID: 61
Fixes: 365fb925d3b3 ("bus/fslmc: optimize physical to virtual address search")
Cc: stable@dpdk.org
Reported-by: Keith Wiles <keith.wiles@intel.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
6 years agodevtools: relax rule for identifying symbol section
Neil Horman [Thu, 16 Aug 2018 11:08:01 +0000 (07:08 -0400)]
devtools: relax rule for identifying symbol section

It was reported recently that some patches that add symbols to an
existing EXPERIMENTAL section of a version map file generate errors
because the check-symbol-change script was identifying the section as
"@@" rather than EXPERIMENTAL.  This was fairly clearly due to the fact
that the rule identifying the version section expected the whole section
to be added, rather than having it already exist, with only new symbols
being added to the existing section. This led the match rule to misread
the format of that line and pull the wrong word out of it.

The fix is to relax the rule slightly.  Rather than assume that the
section must exist on a line that was added, allow the section name to
be set by any line that ends in a '{', which should be correct, given
our coding practices.  The section name is then extracted as the next to
the last word on the line ( $(NF-1) ).

Fixes: 4bec48184e33 ("devtools: add checks for ABI symbol addition")
Cc: stable@dpdk.org
Reported-by: Nikhil Rao <nikhil.rao@intel.com>
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Tested-by: Nikhil Rao <nikhil.rao@intel.com>
6 years agoversion: 18.11-rc0
Thomas Monjalon [Sat, 11 Aug 2018 21:58:03 +0000 (23:58 +0200)]
version: 18.11-rc0

Start version numbering for a new release cycle,
and introduce a template file for release notes.

The release notes comments have a new block to suggest
the order of items, inspired by Ferruh's proposal.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: John McNamara <john.mcnamara@intel.com>
6 years agoversion: 18.08.0
Thomas Monjalon [Thu, 9 Aug 2018 21:11:26 +0000 (23:11 +0200)]
version: 18.08.0

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
6 years agodoc: update release notes for 18.08
John McNamara [Thu, 9 Aug 2018 12:08:43 +0000 (13:08 +0100)]
doc: update release notes for 18.08

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

Signed-off-by: John McNamara <john.mcnamara@intel.com>
6 years agodoc: add SPDX and copyright to release notes
Hemant Agrawal [Fri, 27 Jul 2018 04:54:18 +0000 (10:24 +0530)]
doc: add SPDX and copyright to release notes

using "The DPDK Contributors" as decided by techboard.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
6 years agodoc: add SPDX and copyright to contributing guide
Hemant Agrawal [Tue, 5 Jun 2018 07:50:24 +0000 (13:20 +0530)]
doc: add SPDX and copyright to contributing guide

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
6 years agoexamples/performance-thread: convert to SPDX tags
Pablo de Lara [Fri, 20 Apr 2018 09:53:38 +0000 (10:53 +0100)]
examples/performance-thread: convert to SPDX tags

Convert dual license headers with Intel and Dmitry Vyukov
names to SPDX.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Dmitry Vyukov <dvyukov@gmail.com>
6 years agohash: add more accurate thread-safety comments
Yipeng Wang [Thu, 26 Jul 2018 17:56:01 +0000 (10:56 -0700)]
hash: add more accurate thread-safety comments

Describing the thread-safety support more accurately for
API documentation.

Fixes: f2e3001b53ec ("hash: support read/write concurrency")

Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agodoc: add multithread description to hash library
Yipeng Wang [Thu, 26 Jul 2018 17:56:00 +0000 (10:56 -0700)]
doc: add multithread description to hash library

Added multithreading related description into programmer
guide of hash library.

Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agodoc: describe --builtin-net-driver option in vhost app
Marvin Liu [Tue, 31 Jul 2018 16:00:39 +0000 (00:00 +0800)]
doc: describe --builtin-net-driver option in vhost app

Very simple version of vhost-user driver in vhost sample will be used if
builtin-net-driver option is enabled. This driver is based on generic
vhost lib APIs. Unfortunately, the implementation is incompatible with
QEMU as protocol feature is not supported.

Signed-off-by: Marvin Liu <yong.liu@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
6 years agodoc: move and update experimental API process
Shreyansh Jain [Fri, 25 May 2018 12:07:33 +0000 (17:37 +0530)]
doc: move and update experimental API process

Experimental API text has been moved into a sub-section of ABI Policy.
A paragraph has been added to explain the process for removal of an
experimental tag.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
6 years agomaintainers: claim maintainership for ARM v7 and v8
Gavin Hu [Thu, 9 Aug 2018 01:58:03 +0000 (09:58 +0800)]
maintainers: claim maintainership for ARM v7 and v8

Claim the maintainership as Jianbo Liu is not working on this any more.
Aslo remove the co-maintainership for Marvel mvpp2 amd mrvl crypto driver
and doc.

Cc: stable@dpdk.org
Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Song Zhu <song.zhu@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
6 years agomk: fix permissions when using make install
Bruce Richardson [Thu, 9 Aug 2018 15:22:35 +0000 (16:22 +0100)]
mk: fix permissions when using make install

When using make install, the permissions of the resulting file should be
those of the user using make install, not those of the user who ran the
build. This would not be the case when a user explicitly runs:

   "make && sudo make install"

Fix this by changing "cp -a", which preserves all attributes, to
"cp -dR --preserve=timestamp", and by adding the flags
"--no-same-owner --no-same-permissions" to the calls to tar.

Fixes: 1fa0fd9d6b42 ("mk: allow to specify DESTDIR in build rule")
Fixes: 6b62a72a70d0 ("mk: install a standard cutomizable tree")
Fixes: 576de42b83e5 ("doc: render and install man pages")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
6 years agodevtools: fix symbol check for dash
Thomas Monjalon [Sun, 5 Aug 2018 09:38:47 +0000 (11:38 +0200)]
devtools: fix symbol check for dash

The script check-symbol-change.sh was not running when
/bin/sh redirects to dash.

Fixes: 4bec48184e33 ("devtools: add checks for ABI symbol addition")
Cc: nhorman@tuxdriver.com
Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
6 years agoethdev: fix a doxygen comment for port allocation
Rami Rosen [Sun, 5 Aug 2018 20:03:28 +0000 (23:03 +0300)]
ethdev: fix a doxygen comment for port allocation

This patch fixes a doxygen comment of the rte_eth_dev_allocate()
method. There is no parameter named "type" for this
method; so this patch removes the doxygen comment about it.

Fixes: 6751f6deb798 ("ethdev: get rid of device type")
Cc: stable@dpdk.org
Signed-off-by: Rami Rosen <rami.rosen@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agobus/pci: remove unneeded EAL private include
Rami Rosen [Wed, 8 Aug 2018 18:40:54 +0000 (21:40 +0300)]
bus/pci: remove unneeded EAL private include

This trivial patch removes an uneeded include
from drivers/bus/pci/linux/pci.c.

Signed-off-by: Rami Rosen <rami.rosen@intel.com>
6 years agobus/pci: remove useless forward declaration
Rami Rosen [Tue, 7 Aug 2018 19:09:14 +0000 (22:09 +0300)]
bus/pci: remove useless forward declaration

This patch removes the forward declaration of rte_pci_remove_device()
method. In the past, this forward decalaration was needed for
rte_pci_detach(), which is now removed from pci_common.c.

Fixes: e690338a7b85 ("bus/pci: remove unused function to detach by address")

Signed-off-by: Rami Rosen <rami.rosen@intel.com>
6 years agokni: fix build on RHEL 7.5
Drocula Lambda [Thu, 9 Aug 2018 12:09:06 +0000 (12:09 +0000)]
kni: fix build on RHEL 7.5

This patch fixes compilation errors on Centos 7.5 when
CONFIG_RTE_KNI_KMOD_ETHTOOL is set to 'y'.
On RHEL75 ndo_change_mtu has changed to ndo_change_mtu_rh74.

See commit 37d477b6863e5c06 ("kni: fix build on RHEL 7.5")

Signed-off-by: Drocula Lambda <quzeyao@gmail.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agokni: fix crash with null name
Dan Gora [Thu, 28 Jun 2018 22:58:38 +0000 (15:58 -0700)]
kni: fix crash with null name

Fix a segmentation fault which occurs when the kni_autotest is run
in the 'test' application.

This segmenation fault occurs when rte_kni_get() is called with a
NULL value for 'name'.

Fixes: 0c6bc8ef70ba ("kni: memzone pool for alloc and release")
Cc: stable@dpdk.org
Signed-off-by: Dan Gora <dg@adax.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agodoc: announce deprecation of flow copy function
Adrien Mazarguil [Fri, 3 Aug 2018 14:37:52 +0000 (16:37 +0200)]
doc: announce deprecation of flow copy function

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
6 years agodoc: update deprecation notice about devargs
Thomas Monjalon [Wed, 8 Aug 2018 22:28:57 +0000 (00:28 +0200)]
doc: update deprecation notice about devargs

The devargs parsing function has changed in 18.08.
The devargs rework should be completed in 18.11.

Fixes: a23bc2c4e01b ("devargs: add non-variadic parsing function")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
6 years agoeal: remove experimental tag for user mbuf pool ops
Olivier Matz [Tue, 7 Aug 2018 21:34:43 +0000 (23:34 +0200)]
eal: remove experimental tag for user mbuf pool ops

Remove experimental tag from rte_eal_mbuf_user_pool_ops().

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agoeal: remove deprecated function for mbuf pool ops
Olivier Matz [Tue, 7 Aug 2018 21:34:42 +0000 (23:34 +0200)]
eal: remove deprecated function for mbuf pool ops

rte_eal_mbuf_default_mempool_ops() is replaced by
rte_mbuf_best_mempool_ops().

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agodoc: fix PDF build
Thomas Monjalon [Wed, 8 Aug 2018 18:37:36 +0000 (20:37 +0200)]
doc: fix PDF build

The SVG images must be referenced without their extension,
because it is converted to PNG for PDF.

Fixes: 54c4cbb6ccf1 ("doc: add graphics to bbdev guide")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Amr Mokhtar <amr.mokhtar@intel.com>
6 years agodoc: add tested Intel platforms with Intel NICs
Lijuan Tu [Mon, 6 Aug 2018 10:56:31 +0000 (18:56 +0800)]
doc: add tested Intel platforms with Intel NICs

Add tested Intel platforms with Intel NICs to the release note.

Signed-off-by: Lijuan Tu <lijuan.tu@intel.com>
6 years agodoc: add tested platforms with Mellanox NICs
Raslan Darawsheh [Wed, 8 Aug 2018 15:32:57 +0000 (18:32 +0300)]
doc: add tested platforms with Mellanox NICs

Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
6 years agodoc: update release notes for Mellanox drivers
Shahaf Shuler [Sun, 5 Aug 2018 11:13:17 +0000 (14:13 +0300)]
doc: update release notes for Mellanox drivers

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
6 years agonet/mlx5: fix minimum size of multi-packet Rx queue
Yongseok Koh [Wed, 8 Aug 2018 19:32:47 +0000 (12:32 -0700)]
net/mlx5: fix minimum size of multi-packet Rx queue

The size of Rx queue is determined by dividing the number of descriptors by
the number of strides. As device can't support single slot queue, if the
number of descriptors is same as the number of strides, MPRQ shouldn't be
enabled. Otherwise, this will cause HW fault. For example, if rxd is set to
512 with testpmd on ConnectX-4 Lx, PMD can't receive more than 512 packets
because the minimum number of strides for ConnectX-4 Lx is 512. Users have
to configure larger number of descriptors in this case.

Fixes: 7d6bf6b866b8 ("net/mlx5: add Multi-Packet Rx support")
Cc: stable@dpdk.org
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
6 years agonet/qede: bump version to 2.9.0.1
Rasesh Mody [Wed, 8 Aug 2018 05:38:35 +0000 (22:38 -0700)]
net/qede: bump version to 2.9.0.1

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede: fix ntuple filter configuration
Shahed Shaikh [Wed, 8 Aug 2018 05:38:34 +0000 (22:38 -0700)]
net/qede: fix ntuple filter configuration

PMD did not pass down the intended queue id while
configuring the ntuple filter.

Fixes: 622075356e8f ("net/qede: support ntuple and flow director filter")
Cc: stable@dpdk.org
Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
6 years agoexamples/ip_pipeline: fix RSS
Cristian Dumitrescu [Mon, 6 Aug 2018 15:24:16 +0000 (16:24 +0100)]
examples/ip_pipeline: fix RSS

After adding RSS hash offload checks, flags that are not supported by
the current device result in RSS configuration failing as opposed to
unsupported flags being silently discarded. This fix is making sure
that only device supported flags are passed to RSS configuration.

Fixes: aa1a6d87f15d ("ethdev: force RSS offload rules again")

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
6 years agonet/tap: fix zeroed flow mask configurations
Matan Azrad [Mon, 6 Aug 2018 10:58:47 +0000 (10:58 +0000)]
net/tap: fix zeroed flow mask configurations

The rte_flow meaning of zero flow mask configuration is to match all
the range of the item value.
For example, the flow eth / ipv4 dst spec 1.2.3.4 dst mask 0.0.0.0
should much all the ipv4 traffic from the rte_flow API perspective.

>From some kernel perspectives the above rule means to ignore all the
ipv4 traffic (e.g. Ubuntu 16.04, 4.15.10).

Due to the fact that the tap PMD should provide the rte_flow meaning,
it is necessary to ignore the spec in case the mask is zero when it
forwards such like flows to the kernel.
So, the above rule should be translated to eth / ipv4 to get the
correct meaning.

Ignore spec configurations when the mask is zero.

Fixes: de96fe68ae95 ("net/tap: add basic flow API patterns and actions")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agohash: fix doxygen of return values
Pablo de Lara [Tue, 7 Aug 2018 02:00:04 +0000 (03:00 +0100)]
hash: fix doxygen of return values

rte_hash_lookup_data() and rte_hash_lookup_with_hash_data()
functions return the index of the table where the key is stored
when this is found, and not 0 as the Doxygen currently states.

Also, these functions, and rte_hash_get_key_with_position()
return negative values when keys are not found (-EINVAL and -ENOENT),
where the minus sign was missing.

Bugzilla ID: 78
Fixes: 473d1bebce43 ("hash: allow to store data in hash table")
Fixes: 6dc34e0afe7a ("hash: retrieve a key given its position")
Cc: stable@dpdk.org
Reported-by: Petr Houska <t-pehous@microsoft.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
6 years agodoc: clarify usage of netvsc PMD
Stephen Hemminger [Mon, 6 Aug 2018 16:31:07 +0000 (09:31 -0700)]
doc: clarify usage of netvsc PMD

Since netvsc PMD does not support SR-IOV accelerated networking,
it is not recommended for use on Azure. Make this clear in the
guide.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
6 years agonet/netvsc: report checksum failures
Stephen Hemminger [Mon, 6 Aug 2018 18:22:44 +0000 (11:22 -0700)]
net/netvsc: report checksum failures

The host will notify netvsc device about failed UDP and TCP
checksum. Propagate that information into the mbuf.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
6 years agonet/netvsc: support packet type
Stephen Hemminger [Mon, 6 Aug 2018 18:22:43 +0000 (11:22 -0700)]
net/netvsc: support packet type

The Netvsc PMD was not filling in the packet type information.

Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device")

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
6 years agobus/vmbus: handle EOF on IRQ read
Stephen Hemminger [Mon, 6 Aug 2018 18:11:08 +0000 (11:11 -0700)]
bus/vmbus: handle EOF on IRQ read

This function is not used by netvsc driver yet.
Still the code should handle case where device driver returns
zero (due to rescind).

Coverity issue: 302871
Fixes: 831dba47bd36 ("bus/vmbus: add Hyper-V virtual bus support")

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
6 years agobus/vmbus: make sure path is null terminated
Stephen Hemminger [Mon, 6 Aug 2018 18:11:07 +0000 (11:11 -0700)]
bus/vmbus: make sure path is null terminated

Use strlcpy rather than strncpy to avoid any issues about
null termination.

Coverity issue 302859
Fixes: 831dba47bd36 ("bus/vmbus: add Hyper-V virtual bus support")

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
6 years agobus/vmbus: close directory in error path
Stephen Hemminger [Mon, 6 Aug 2018 18:11:06 +0000 (11:11 -0700)]
bus/vmbus: close directory in error path

Fix bug reported by Coverity where directory being scanned was
not closed in error path (leaking file descriptor).

Coverity issue: 302848
Fixes: 831dba47bd36 ("bus/vmbus: add Hyper-V virtual bus support")

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
6 years agoethdev: bump library version
Thomas Monjalon [Mon, 6 Aug 2018 10:51:19 +0000 (12:51 +0200)]
ethdev: bump library version

The old offload API is removed in 18.08,
so the library version must be increased,
in order to show the incompatibility with 18.05 one.

Fixes: ab3ce1e0c193 ("ethdev: remove old offload API")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agoversion: 18.08-rc3
Thomas Monjalon [Sun, 5 Aug 2018 23:45:20 +0000 (01:45 +0200)]
version: 18.08-rc3

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
6 years agodoc: add deprecation notice for external memory
Anatoly Burakov [Wed, 1 Aug 2018 12:07:16 +0000 (13:07 +0100)]
doc: add deprecation notice for external memory

Due to the upcoming external memory support [1], some API and ABI
changes will be required. In addition, although the changes called
out in the deprecation notice are not yet present in form of code
in the published RFC itself, they are based on consensus on the
mailing list [2] on how to best implement this feature.

[1] http://patches.dpdk.org/project/dpdk/list/?series=453&state=*
[2] https://mails.dpdk.org/archives/dev/2018-July/108002.html

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: Zhihong Wang <zhihong.wang@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>