dpdk.git
6 years agonet/i40e: change VF default ITR interval
Beilei Xing [Wed, 27 Dec 2017 06:01:49 +0000 (14:01 +0800)]
net/i40e: change VF default ITR interval

Current default ITR interval I40E_QUEUE_ITR_INTERVAL_DEFAULT is
used by both DPDK PF and DPDK VF, but this ITR interval value
will cause lots of interrupts when using VF. This patch modifies
VF default ITR interval to reduce interrupts.
ITR interval can be reconfigured by RTE_LIBRTE_I40E_ITR_INTERVAL
if expecting low latency.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
6 years agonet/i40e: fix FDIR rule confiliction issue
Beilei Xing [Thu, 30 Nov 2017 06:36:08 +0000 (14:36 +0800)]
net/i40e: fix FDIR rule confiliction issue

Failed to create two FDIR rules with different vlan id for
the same PCTYPE. Root cause is that wrong hash key length
is used.

Fixes: 4149825bbdb9 ("net/i40e: finish integration FDIR with generic flow API")
Cc: stable@dpdk.org
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
6 years agonet/ixgbe: move RSS to flow API
Wei Zhao [Tue, 9 Jan 2018 06:44:30 +0000 (14:44 +0800)]
net/ixgbe: move RSS to flow API

Rte_flow was defined to include RSS, this patch moves ixgbe
existing RSS to rte_flow. The old RSS configuration is kept
as it was, and can be deprecated in the future.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
6 years agonet/e1000: move RSS to flow API
Wei Zhao [Tue, 9 Jan 2018 06:44:29 +0000 (14:44 +0800)]
net/e1000: move RSS to flow API

Rte_flow was defined to include RSS, this patch moves igb
existing RSS functionalities into rte_flow. The old RSS
configuration method is kept as it was, and can be deprecated in
the future.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
6 years agonet/ixgbe: fix parsing FDIR NVGRE issue
Wei Zhao [Fri, 22 Dec 2017 05:45:59 +0000 (13:45 +0800)]
net/ixgbe: fix parsing FDIR NVGRE issue

This patch fixes the issue of mask check in NVGRE parser
for flow API.

Fixes: 11777435c727 ("net/ixgbe: parse flow director filter")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
6 years agodoc: add sfc tunnels support to release features
Andrew Rybchenko [Sun, 24 Dec 2017 10:46:44 +0000 (10:46 +0000)]
doc: add sfc tunnels support to release features

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
6 years agonet/sfc: support inner checksum offload on transmit
Andrew Rybchenko [Sun, 24 Dec 2017 10:46:43 +0000 (10:46 +0000)]
net/sfc: support inner checksum offload on transmit

There is no dedicated controls for inner checksum offload on
device/queue level. So, enable together with outer offloads.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
6 years agonet/sfc: correct Rx checksum offloads for tunnel packets
Andrew Rybchenko [Sun, 24 Dec 2017 10:46:42 +0000 (10:46 +0000)]
net/sfc: correct Rx checksum offloads for tunnel packets

In the case of tunnel packet, PKT_RX_{IP,L4}_CSUM_* flags correspond
to inner packet checksums. There is only one flag to indicate bad
external IPv4 header checksum.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
6 years agonet/sfc: support VXLAN and NVGRE packet types classification
Andrew Rybchenko [Sun, 24 Dec 2017 10:46:41 +0000 (10:46 +0000)]
net/sfc: support VXLAN and NVGRE packet types classification

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
6 years agonet/sfc: fix incorrect bitwise ORing of L3/L4 packet types
Andrew Rybchenko [Sun, 24 Dec 2017 10:46:40 +0000 (10:46 +0000)]
net/sfc: fix incorrect bitwise ORing of L3/L4 packet types

Not a bug since value is set only once, but it is still incorrect.

Fixes: 638bddc99faa ("net/sfc: implement EF10 native Rx datapath")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc: support UDP tunnel ports configuration
Andrew Rybchenko [Sun, 24 Dec 2017 10:46:39 +0000 (10:46 +0000)]
net/sfc: support UDP tunnel ports configuration

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
6 years agonet/sfc/base: add API to control UDP tunnel ports
Ivan Malov [Sun, 24 Dec 2017 10:46:38 +0000 (10:46 +0000)]
net/sfc/base: add API to control UDP tunnel ports

HW needs to know which UDP packets should be treated as tunnel
encapsulation to do inner packet recognition, classification and
offloads.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: allow to request inner classes for Rx packets
Andrew Rybchenko [Sun, 24 Dec 2017 10:46:37 +0000 (10:46 +0000)]
net/sfc/base: allow to request inner classes for Rx packets

If HW/FW supports tunnel encapsulations, Rx event may contain
either inner or outer packet classes. By default outer classes
are requested. Make it possible to request inner classes to
have more information about packet type and allow to interpret
inner frame checksum validation results correctly.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Mark Spender <mspender@solarflare.com>
6 years agonet/sfc/base: add function to create packed stream RxQ
Andrew Rybchenko [Sun, 24 Dec 2017 10:46:36 +0000 (10:46 +0000)]
net/sfc/base: add function to create packed stream RxQ

Encoding packed stream buffer size in RxQ type is not a future-proof
idea taking into account a new RxQ types with extra parameters.
To be consistent make packet stream buffer size a separate parameter.
In order to avoid blowing of the default RxQ create function prototype
add a dedicated function to create packed stream RxQ without not
applicable paramters.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Mark Spender <mspender@solarflare.com>
6 years agonet/sfc/base: control RxQ scatter using flag instead of type
Andrew Rybchenko [Sun, 24 Dec 2017 10:46:35 +0000 (10:46 +0000)]
net/sfc/base: control RxQ scatter using flag instead of type

Rx scatter may be applicable to different Rx queue types.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Mark Spender <mspender@solarflare.com>
6 years agonet/sfc: retry port start to handle MC reboot in the middle
Andrew Rybchenko [Sun, 24 Dec 2017 10:46:34 +0000 (10:46 +0000)]
net/sfc: retry port start to handle MC reboot in the middle

MC reboot may be provoked by the other function which is either
starting in parallel or, for example, reconfiguring UDP tunnel
ports.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
6 years agonet/sfc: handle MC reboot event
Andrew Rybchenko [Sun, 24 Dec 2017 10:46:33 +0000 (10:46 +0000)]
net/sfc: handle MC reboot event

Implement handling of the MC reboot event received on management
event queue or detected by MCDI processing.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
6 years agonet/sfc: do not hold management event queue lock while MCDI
Andrew Rybchenko [Sun, 24 Dec 2017 10:46:32 +0000 (10:46 +0000)]
net/sfc: do not hold management event queue lock while MCDI

MCDI execution may require MCDI proxy handling which involves
management event queue polling. So, it is a bad idea to hold
managment event queue lock when MCDI is executed.

Event queue creation and destruction are MCDI operations.

Fixes: 4650ed44c120 ("net/sfc: support MCDI proxy")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
6 years agonet/sfc: fix label name to be consistent
Andrew Rybchenko [Sun, 24 Dec 2017 10:46:31 +0000 (10:46 +0000)]
net/sfc: fix label name to be consistent

Management event queue is the right name of event queue 0.

Fixes: 3b809c27b1fe ("net/sfc: support link status change interrupt")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
6 years agoevent/octeontx: fix Rx adapter port id mapping
Pavan Nikhilesh [Tue, 19 Dec 2017 18:01:45 +0000 (23:31 +0530)]
event/octeontx: fix Rx adapter port id mapping

When octeontx event dev receives a packet for the event Rx adapter, the
mbuf port id should contain the appropriate ethdev id instead of
internal channel info.

Fixes: 45a914c5bd71 ("event/octeontx: support event Rx adapter")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
6 years agonet/octeontx: add channel to port id mapping
Pavan Nikhilesh [Tue, 19 Dec 2017 18:01:44 +0000 (23:31 +0530)]
net/octeontx: add channel to port id mapping

The channel to port id map is used by event octeontx to map the received
wqe to the respective ethdev port.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
6 years agodoc: remove unused config options
Pavan Nikhilesh [Tue, 19 Dec 2017 12:25:10 +0000 (17:55 +0530)]
doc: remove unused config options

Remove unused debug config options for thunder nicvf and octeontx as they
are now controlled by dynamic logging.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
6 years agoevent/octeontx: implement dynamic logging
Pavan Nikhilesh [Tue, 19 Dec 2017 12:25:09 +0000 (17:55 +0530)]
event/octeontx: implement dynamic logging

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
6 years agomempool/octeontx: implement dynamic logging
Pavan Nikhilesh [Tue, 19 Dec 2017 12:25:08 +0000 (17:55 +0530)]
mempool/octeontx: implement dynamic logging

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
6 years agonet/octeontx: implement dynamic logging
Pavan Nikhilesh [Tue, 19 Dec 2017 12:25:07 +0000 (17:55 +0530)]
net/octeontx: implement dynamic logging

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
6 years agonet/thunderx: implement dynamic logging
Pavan Nikhilesh [Tue, 19 Dec 2017 12:25:06 +0000 (17:55 +0530)]
net/thunderx: implement dynamic logging

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
6 years agonet/liquidio: implement dynamic logging
Stephen Hemminger [Tue, 19 Dec 2017 06:38:40 +0000 (22:38 -0800)]
net/liquidio: implement dynamic logging

This driver mostly uses the common pattern. Convert this to the
dynamic logging.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
6 years agonet/qede: implement dynamic logging
Stephen Hemminger [Tue, 19 Dec 2017 06:38:39 +0000 (22:38 -0800)]
net/qede: implement dynamic logging

This driver is mostly like others with slightly different logging
macros. The semantics were retained, with some minor reformatting.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
6 years agonet/ena: implement dynamic logging
Stephen Hemminger [Tue, 19 Dec 2017 06:38:38 +0000 (22:38 -0800)]
net/ena: implement dynamic logging

Use dynamic rather static configuration for logging.
Also include ena_assert_msg.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
6 years agonet/fm10k: implement dynamic logging
Stephen Hemminger [Tue, 19 Dec 2017 06:38:37 +0000 (22:38 -0800)]
net/fm10k: implement dynamic logging

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
6 years agonet/nfp: implement dynamic logging
Stephen Hemminger [Tue, 19 Dec 2017 06:38:36 +0000 (22:38 -0800)]
net/nfp: implement dynamic logging

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
v2: remove unsed macro RTE_LIBRTE_NFP_NET_DEBUG_INIT

6 years agonet/virtio: implement dynamic logging
Stephen Hemminger [Tue, 19 Dec 2017 06:38:35 +0000 (22:38 -0800)]
net/virtio: implement dynamic logging

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Tested-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
6 years agonet/e1000: implement dynamic logging
Stephen Hemminger [Tue, 19 Dec 2017 06:38:34 +0000 (22:38 -0800)]
net/e1000: implement dynamic logging

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
6 years agonet/ixgbe: implement dynamic logging
Stephen Hemminger [Tue, 19 Dec 2017 06:38:33 +0000 (22:38 -0800)]
net/ixgbe: implement dynamic logging

Convert all drivers possible to dynamic logging.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
6 years agonet/vmxnet3: implement dynamic logging
Stephen Hemminger [Tue, 19 Dec 2017 06:38:32 +0000 (22:38 -0800)]
net/vmxnet3: implement dynamic logging

Replace compile time configuration with runtime.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
6 years agonet/bnx2x: implement dynamic logging
Stephen Hemminger [Tue, 19 Dec 2017 06:38:31 +0000 (22:38 -0800)]
net/bnx2x: implement dynamic logging

Replace compile time option for init and driver log with
dynamic value.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
v2: remove remaining RTE_LIBRTE_BNX2X_DEBUG usage

6 years agonet/avp: implement dynamic logging
Stephen Hemminger [Tue, 19 Dec 2017 06:38:30 +0000 (22:38 -0800)]
net/avp: implement dynamic logging

All PMD should be using dynamic log levels.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
6 years agonet/tap: renamed netlink functions
Radu Nicolau [Fri, 15 Dec 2017 11:34:37 +0000 (11:34 +0000)]
net/tap: renamed netlink functions

Functions like nl_recev and nl_send name clash functions in the
libnl library (https://www.infradead.org/~tgr/libnl/).
All functions declared in tap_netlink.h were decorated with tap_
for consistency.

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/octeontx: advertise supported mbuf pool ops
Pavan Nikhilesh [Thu, 14 Dec 2017 08:31:49 +0000 (14:01 +0530)]
net/octeontx: advertise supported mbuf pool ops

Advertise mempool/octeontx as the only supported mempool ops when the
application checks using `rte_eth_dev_pool_ops_supported`.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
6 years agoethdev: optimize xstats by ids APIs
Elza Mathew [Wed, 6 Dec 2017 00:25:07 +0000 (16:25 -0800)]
ethdev: optimize xstats by ids APIs

Introduced a check to detect if the stats IDs being
requested are all basic stats IDs. In that case,
ensured that only the basic stats would be retrieved.

Previously, both basic stats and xstats were being
retrieved even if all the IDs were basic stats IDs.

Signed-off-by: Elza Mathew <elza.mathew@intel.com>
Reviewed-by: Lee Daly <lee.daly@intel.com>
6 years agoethdev: refactor basic stats code
Elza Mathew [Wed, 6 Dec 2017 00:25:06 +0000 (16:25 -0800)]
ethdev: refactor basic stats code

Moved the code to get the basic stats names and values
into static functions.

Signed-off-by: Elza Mathew <elza.mathew@intel.com>
Reviewed-by: Lee Daly <lee.daly@intel.com>
6 years agovhost: destroy unused virtqueues when multiqueue not negotiated
Maxime Coquelin [Wed, 13 Dec 2017 08:51:09 +0000 (09:51 +0100)]
vhost: destroy unused virtqueues when multiqueue not negotiated

QEMU sends VHOST_USER_SET_VRING_CALL requests for all queues
declared in QEMU command line before the guest is started.
It has the effect in DPDK vhost-user backend to allocate vrings
for all queues declared by QEMU.

If the first driver being used does not support multiqueue,
the device never changes to VIRTIO_DEV_RUNNING state as only
the first queue pair is initialized. One driver impacted by
this bug is virtio-net's iPXE driver which does not support
VIRTIO_NET_F_MQ feature.

It is safe to destroy unused virtqueues in SET_FEATURES request
handler, as it is ensured the device is not in running state
at this stage, so virtqueues aren't being processed.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
6 years agovhost: extract virtqueue cleaning and freeing functions
Maxime Coquelin [Wed, 13 Dec 2017 08:51:08 +0000 (09:51 +0100)]
vhost: extract virtqueue cleaning and freeing functions

This patch extracts needed code for vhost_user.c to be able
to clean and free virtqueues unitary.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
6 years agovhost: propagate set features handling error
Maxime Coquelin [Wed, 13 Dec 2017 08:51:07 +0000 (09:51 +0100)]
vhost: propagate set features handling error

Not propagating VHOST_USER_SET_FEATURES request handling
error may result in unpredictable behavior, as host and
guests features may no more be synchronized.

This patch fixes this by reporting the error to the upper
layer, which would result in the device being destroyed
and the connection with the master to be closed.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
6 years agovhost: prevent features to be changed while device is running
Maxime Coquelin [Wed, 13 Dec 2017 08:51:06 +0000 (09:51 +0100)]
vhost: prevent features to be changed while device is running

As section 2.2 of the Virtio spec states about features
negotiation:
"During device initialization, the driver reads this and tells
the device the subset that it accepts. The only way to
renegotiate is to reset the device."

This patch implements a check to prevent illegal features change
while the device is running.

One exception is the VHOST_F_LOG_ALL feature bit, which is enabled
when live-migration is initiated. But this feature is not negotiated
with the Virtio driver, but directly with the Vhost master.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
6 years agovhost: support UDP Fragmentation Offload
Jiayu Hu [Tue, 21 Nov 2017 06:56:52 +0000 (14:56 +0800)]
vhost: support UDP Fragmentation Offload

In virtio, UDP Fragmentation Offload (UFO) includes two parts: host UFO
and guest UFO. Guest UFO means the frontend can receive large UDP
packets, and host UFO means the backend can receive large UDP packets.
This patch supports host UFO and guest UFO for vhost-user.

Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Tested-by: Lei Yao <lei.a.yao@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
6 years agoexamples/vhost: fix sending ARP packet to self
Junjie Chen [Fri, 29 Dec 2017 14:33:19 +0000 (09:33 -0500)]
examples/vhost: fix sending ARP packet to self

ARP packets are not dropped when dest vdev is itself, which breaks
RX ring inconspicuously.

Fixes: 9c5ef51207c6 ("examples/vhost: handle broadcast packet")
Cc: stable@dpdk.org
Signed-off-by: Junjie Chen <junjie.j.chen@intel.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
6 years agovhost: introduce vring call API
Stefan Hajnoczi [Tue, 2 Jan 2018 09:31:36 +0000 (09:31 +0000)]
vhost: introduce vring call API

Users of librte_vhost currently implement the vring call operation
themselves.  Each caller performs the operation slightly differently.

This patch introduces a new librte_vhost API called
rte_vhost_vring_call() that performs the operation so that vhost-user
applications don't have to duplicate it.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
6 years agovhost: add vring call helper
Stefan Hajnoczi [Tue, 2 Jan 2018 09:31:35 +0000 (09:31 +0000)]
vhost: add vring call helper

Extract the callfd eventfd signal operation so virtio_net.c does not
have to repeat it multiple times.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
6 years agonet/virtio: remove redundant macro definitions for vector Rx
Tiwei Bie [Mon, 11 Dec 2017 05:13:32 +0000 (13:13 +0800)]
net/virtio: remove redundant macro definitions for vector Rx

RTE_VIRTIO_VPMD_RX_BURST and RTE_VIRTIO_VPMD_RX_REARM_THRESH
have been defined and used in virtio_rxtx_simple.h, but are
defined again in virtio_rxtx_simple_*.c. It just happens to
work. So remove the redundant definitions from the *.c files.

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
6 years agonet/virtio: remove a redundant macro definition for ctrl vq
Tiwei Bie [Mon, 11 Dec 2017 05:13:31 +0000 (13:13 +0800)]
net/virtio: remove a redundant macro definition for ctrl vq

VIRTIO_NET_CTRL_MAC_ADDR_SET is defined two times in
virtqueue.h, the second one is obviously not wanted.

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
6 years agonet/virtio: fix typo in LRO support
Tiwei Bie [Mon, 11 Dec 2017 05:13:30 +0000 (13:13 +0800)]
net/virtio: fix typo in LRO support

Fixes: 86d59b21468a ("net/virtio: support LRO")
Fixes: ec9f3d122a58 ("net/virtio: revert not claiming LRO support")
Cc: stable@dpdk.org
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
6 years agonet/virtio: fix vector Rx flushing
Tiwei Bie [Mon, 11 Dec 2017 05:13:29 +0000 (13:13 +0800)]
net/virtio: fix vector Rx flushing

The vector Rx will be broken if backend has consumed all
the descs in the avail ring before the device is started.
Because in current implementation, vector Rx will return
immediately without refilling the avail ring if the used
ring is empty. So we have to refill the avail ring after
flushing the elements in the used ring for vector Rx.

Besides, vector Rx has a different ring layout assumption
and mbuf management. So we need to handle it differently.

Fixes: d8227497ec5c ("net/virtio: flush Rx queues on start")
Cc: stable@dpdk.org
Reported-by: Antonio Fischetti <antonio.fischetti@intel.com>
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Tested-by: Antonio Fischetti <antonio.fischetti@intel.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
6 years agonet/virtio: fix incorrect cast
Didier Pallard [Thu, 14 Dec 2017 14:33:43 +0000 (15:33 +0100)]
net/virtio: fix incorrect cast

The rx_queues and tx_queues fields of the data structure points to a
struct virtnet_rx or virtnet_tx. Casting it to a virtqueue is an error.

It does not trigger any bug because pointer is not dereferenced inside
the function, but it can become a bug if this code is copy/pasted and
vq is dereferenced.

Fixes: 01ad44fd374f ("net/virtio: split Rx/Tx queue")
Cc: stable@dpdk.org
Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
6 years agovhost: support Generic Segmentation Offload
Jiayu Hu [Tue, 28 Nov 2017 05:28:33 +0000 (13:28 +0800)]
vhost: support Generic Segmentation Offload

In virtio, Generic Segmentation Offload (GSO) is the feature for the
backend, which means the backend can receive packets with any GSO
type.

Virtio-net enables the GSO feature by default, and vhost-net supports it.
To make live migration from vhost-net to vhost-user possible, this patch
enables GSO for vhost-user.

Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Tested-by: Lei Yao <lei.a.yao@intel.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
6 years agonet/virtio: remove unnecessary macro definitions
Zhiyong Yang [Tue, 26 Dec 2017 09:25:00 +0000 (17:25 +0800)]
net/virtio: remove unnecessary macro definitions

DPDK has already the definition of Ethernet numeric link speeds in Mbps
in the file Rte_ethdev.h, it is unnecessary to rededine virtio specific
link speeds macros again.

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
6 years agovhost: fix dequeue zero copy with virtio1
Junjie Chen [Wed, 13 Dec 2017 16:50:56 +0000 (11:50 -0500)]
vhost: fix dequeue zero copy with virtio1

This fix dequeue zero copy can not work with Qemu
version >= 2.7. Since from Qemu 2.7 virtio device
use virtio-1 protocol, the zero copy code path
forget to add offset to buffer address.

Fixes: b0a985d1f340 ("vhost: add dequeue zero copy")
Cc: stable@dpdk.org
Signed-off-by: Junjie Chen <junjie.j.chen@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
6 years agovhost: fix crash
Jianfeng Tan [Wed, 15 Nov 2017 11:41:08 +0000 (11:41 +0000)]
vhost: fix crash

In a running VM, operations (like device attach/detach) will
trigger the QEMU to resend set_mem_table to vhost-user backend.

DPDK vhost-user handles this message rudely by unmap all existing
regions and map new ones. This might lead to segfault if there
is pmd thread just trying to touch those unmapped memory regions.

But for most cases, except VM memory hotplug, QEMU still sends the
set_mem_table message even the memory regions are not changed as
QEMU vhost-user filters out those not backed by file (fd > 0).

To fix this case, we add a check in the handler to see if the
memory regions are really changed; if not, we just keep old memory
regions.

Fixes: 8f972312b8f4 ("vhost: support vhost-user")
CC: stable@dpdk.org
Reported-by: Yang Zhang <zy107165@alibaba-inc.com>
Reported-by: Xin Long <longxin.xl@alibaba-inc.com>
Signed-off-by: Yi Yang <yi.y.yang@intel.com>
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
6 years agonet/i40e: fix setting of MAC address on i40evf
Olivier Matz [Wed, 3 Jan 2018 13:34:18 +0000 (14:34 +0100)]
net/i40e: fix setting of MAC address on i40evf

When setting the MAC address, the ethdev layer copies the new mac
address in dev->data->mac_addrs[0] before calling the dev_ops.

Therefore, "is_same_ether_addr(mac_addr, dev->data->mac_addrs)" was
always true, and the MAC was never set. Remove this test to fix the
issue.

Fixes: 943c2d899a0c ("net/i40e: set VF MAC from VF")
Cc: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
6 years agoexamples/flow_filtering: add Tx queues setup process
Wei Zhao [Wed, 27 Dec 2017 08:32:15 +0000 (16:32 +0800)]
examples/flow_filtering: add Tx queues setup process

This example does not have the process to set up the Tx queues,
which is required by Intel NICs. So this patch adds that Tx setup
to the application.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Ori Kam <orika@mellanox.com>
6 years agonet/i40e: add FDIR NVGRE parameter check
Wei Zhao [Fri, 22 Dec 2017 05:11:05 +0000 (13:11 +0800)]
net/i40e: add FDIR NVGRE parameter check

Add mask parameter check to nvgre parser for flow API.

Fixes: 30965ca34127 ("net/i40e: add NVGRE flow parsing")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
6 years agonet/ixgbe: fix tunnel filter fail problem
Wei Zhao [Mon, 8 Jan 2018 03:35:36 +0000 (11:35 +0800)]
net/ixgbe: fix tunnel filter fail problem

Add a mode type check for tunnel mode, if FDIR is in this mode,
it does not need to do sanity check for x550.

Fixes: a2ba854ec616 ("net/ixgbe: fix MAC VLAN filter fail problem")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
6 years agonet/ixgbe: remove ipsec keys from private data
Radu Nicolau [Thu, 21 Dec 2017 10:55:50 +0000 (10:55 +0000)]
net/ixgbe: remove ipsec keys from private data

All ipsec related settings are being held in the driver
private data to allow easy add and remove of SAS. There
is no need to keep a record of the keys, and also
storing the keys can be a security issue.

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
6 years agonet/i40e: support MAC loopback
Yanglong Wu [Tue, 2 Jan 2018 02:41:23 +0000 (10:41 +0800)]
net/i40e: support MAC loopback

According to loopback mode, setup loopback link or not.
If loopback link is set, packets transmitted will be
looped back to received side directly.

Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
6 years agonet/i40e: enable VF Tx offload
Beilei Xing [Wed, 27 Dec 2017 08:27:14 +0000 (16:27 +0800)]
net/i40e: enable VF Tx offload

Enable VF Tx offload including outer ip checksum,
TSO and tunnel TSO.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
6 years agonet/i40e: improve packet type parser
Beilei Xing [Thu, 4 Jan 2018 10:46:21 +0000 (18:46 +0800)]
net/i40e: improve packet type parser

Add support for PPPoE and L2TP packet types parser.
Change parser as new metadata 'OIPV4' and 'OIPV6'
added in profile to distinguish outer IP and inner
IP.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
6 years agombuf: add PPPoE and L2TP packet types
Beilei Xing [Thu, 4 Jan 2018 10:46:20 +0000 (18:46 +0800)]
mbuf: add PPPoE and L2TP packet types

Add support of PPPoE and L2TP packet types.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
6 years agonet/ixgbe: add ntuple support to flow parser
Wei Zhao [Fri, 5 Jan 2018 06:13:50 +0000 (14:13 +0800)]
net/ixgbe: add ntuple support to flow parser

ixgbe ntuple filter in rte_flow needs to support diversion data
with less than 5 tuple parameters. So it adds this new support
in parser code. This patch also adds parsering vlan pattern code
in ntuple filter in order to handle some cases like vlan in flow
API.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
6 years agonet/i40e: fix FDIR input set conflict
Beilei Xing [Mon, 18 Dec 2017 05:20:57 +0000 (13:20 +0800)]
net/i40e: fix FDIR input set conflict

The first FDIR rule for some PCTYPE will configure input set and
create flow, the following flows must use the same input set,
otherwise it will cause input set conflict and fail to create flow.
If it creates the first rule after flow flush, input set should be
re-configured.

Fixes: 42044b69c67d ("net/i40e: support input set selection for FDIR")
Cc: stable@dpdk.org
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
6 years agonet/i40e: fix VLAN offload setting issue
Beilei Xing [Fri, 8 Dec 2017 07:40:33 +0000 (15:40 +0800)]
net/i40e: fix VLAN offload setting issue

When using kernel PF + DPDK VF, if setting VLAN strip on
or off in VF side after setting PVID for VF with ethtool in
PF side, it will cause VF Tx error. The root cause is that
Rx VLAN offload is not permitted after setting PVID for VF
in kernel PF side.
This patch fixes the issue by check VLAN offload capability
when setting VLAN offload.

Fixes: 5f0b95d59a98 ("net/i40e: support VLAN stripping for VF")
Cc: stable@dpdk.org
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
6 years agonet/i40e: remove forward declaration
Rami Rosen [Sun, 26 Nov 2017 19:26:13 +0000 (21:26 +0200)]
net/i40e: remove forward declaration

This trivial patch removes unnecessary forward declaration
of i40e_xmit_pkts_simple() in i40e_rxtx.c.

Signed-off-by: Rami Rosen <rami.rosen@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
6 years agonet/fm10k: remove RSS restriction with num of queues
Yangchao Zhou [Mon, 4 Dec 2017 06:38:09 +0000 (14:38 +0800)]
net/fm10k: remove RSS restriction with num of queues

FM10K HW does not have such restrictions.

Enabling RSS with single queue is not used to distribute flow, but
it can be used to compute a RSS hash value. It can reduce CPU
cycles of computing a hash value with five tuples. In addition,
there is an explicit method to disable RSS instead of an obscure
way.

Signed-off-by: Yangchao Zhou <zhouyates@gmail.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
6 years agonet/igb: fix Tx queue number assignment
Yangchao Zhou [Wed, 29 Nov 2017 02:50:12 +0000 (10:50 +0800)]
net/igb: fix Tx queue number assignment

Internal variable containing the number of TX queues for a device,
was being incorrectly assigned the number of RX queues, instead of TX.

Fixes: 27b609cbd1c6 ("ethdev: move the multi-queue mode check to specific drivers")
Cc: stable@dpdk.org
Signed-off-by: Yangchao Zhou <zhouyates@gmail.com>
Acked-by: Wei Dai <wei.dai@intel.com>
6 years agodoc: add i40e limitation of DCB function
Beilei Xing [Tue, 12 Dec 2017 07:19:19 +0000 (15:19 +0800)]
doc: add i40e limitation of DCB function

This patch adds limitation of DCB function.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
6 years agonet/ixgbe: fix wrong PBA setting
Wenzhuo Lu [Mon, 20 Nov 2017 03:37:45 +0000 (11:37 +0800)]
net/ixgbe: fix wrong PBA setting

The datasheet says, if using MSI-X mode, the PBA support
bit of the GPIE register must be set to 1.
DPDK uses polling mode, we cannot hit this issue in the
scenario DPDK PF + DPDK VF. If we use DPDK PF + kernel VF,
as the kernel driver uses interrpt mode, VF may hit RX hang
after running hours.

Fixes: 00e30184daa0 ("ixgbe: add PF support")
Cc: stable@dpdk.org
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
6 years agonet/fm10k: fix logical port delete
Xiao Wang [Sat, 9 Dec 2017 01:55:41 +0000 (17:55 -0800)]
net/fm10k: fix logical port delete

When closing port, we need to send mailbox messages to switch manager
to reset multicast mode and delete logical port. In the latest IES_SDK,
e.g. v4.3.3, switch takes longer time to handle these mailbox messages.

So this patch adds longer delay to accommodate this change. Otherwise,
the mailbox will be closed before all the messages are handled, as a
result, the logical port remains in switch manager after port is closed.

Fixes: b961fe9344dd ("net/fm10k: fix MAC address removal from switch")
Cc: stable@dpdk.org
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
6 years agonet/i40e: fix VLAN offload setting
Qi Zhang [Wed, 29 Nov 2017 10:27:30 +0000 (05:27 -0500)]
net/i40e: fix VLAN offload setting

Vlan offload flag "rx_mode.hw_vlan_extend" should be considerred at
rte_eth_dev_configure stage as well as "rx_mode.hw_vlan_strip" and
"rx_mode.hw_vlan_filter".

Fixes: 4861cde46116 ("i40e: new poll mode driver")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
6 years agonet/mlx5: fix un-supported RSS hash fields use
Nélio Laranjeiro [Wed, 3 Jan 2018 09:14:19 +0000 (10:14 +0100)]
net/mlx5: fix un-supported RSS hash fields use

MLX5 NIC does not support all hash fields, this patch limit by refusing
impossible RSS combination to avoid errors.

Fixes: 2f97422e7759 ("mlx5: support RSS hash update and get")
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
6 years agonet/mlx5: fix HW checksum offload for outer IP
Yongseok Koh [Wed, 3 Jan 2018 08:06:22 +0000 (00:06 -0800)]
net/mlx5: fix HW checksum offload for outer IP

Checking HW checksum offload flag for outer IP is missing. If flag is set
for only outer IP, this can't be set properly.

Fixes: f5fde5205101 ("net/mlx5: add hardware checksum offload for tunnel packets")
Cc: stable@dpdk.org
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
6 years agonet/mlx5: fix RSS key configuration
Shahaf Shuler [Tue, 26 Dec 2017 07:40:41 +0000 (09:40 +0200)]
net/mlx5: fix RSS key configuration

The trigger for PMD to use the application RSS configuration should be
based on the validity of rss_key and not the rss_key_len. Otherwise
segmentation fault can occur if application provide valid RSS key length
but without any RSS key.

Fixes: 29c1d8bb3e79 ("net/mlx5: handle a single RSS hash key for all protocols")
Cc: stable@dpdk.org
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
6 years agonet/mlx5: clean up multi-segment packet processing
Yongseok Koh [Wed, 27 Dec 2017 03:55:47 +0000 (19:55 -0800)]
net/mlx5: clean up multi-segment packet processing

Remove multi-segment packet handling from mlx5_tx_burst_empw() as there's
fallback to regular Tx for such packets.

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
6 years agonet/mlx5: add fallback in Tx for multi-segment packet
Yongseok Koh [Wed, 27 Dec 2017 03:55:46 +0000 (19:55 -0800)]
net/mlx5: add fallback in Tx for multi-segment packet

mlx5_tx_burst_empw() falls back to legacy Tx descriptor for multi-segmented
packets without taking advantage of inlining. In many cases, the 1st
segment can be inlined and this could make device fetch only one segment
instead of two. This helps saving PCIe bandwidth when transmitting out
multi-segmented packets with still using the Enhanced Multi-Packet Send for
other packets.

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
6 years agonet/mlx5: add missing sanity checks for Tx completion queue
Yongseok Koh [Wed, 27 Dec 2017 03:55:45 +0000 (19:55 -0800)]
net/mlx5: add missing sanity checks for Tx completion queue

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
6 years agonet/mlx5: consolidate condition checks for TSO
Yongseok Koh [Wed, 27 Dec 2017 03:55:44 +0000 (19:55 -0800)]
net/mlx5: consolidate condition checks for TSO

This change helps compiler to better optimize the code.

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
6 years agonet/mlx5: enable inlining data from multiple segments
Yongseok Koh [Wed, 27 Dec 2017 03:55:43 +0000 (19:55 -0800)]
net/mlx5: enable inlining data from multiple segments

mlx5_tx_burst() doesn't inline data from the 2nd segment. If there's still
enough room in the descriptor after inlining the 1st segment, further
inlining from the 2nd segment would be beneficial to save PCIe bandwidth.

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
6 years agonet/mlx5: fix overflow of Memory Region cache
Yongseok Koh [Fri, 15 Dec 2017 01:59:18 +0000 (17:59 -0800)]
net/mlx5: fix overflow of Memory Region cache

If there're more MR(Memroy Region)'s than the size of per-queue cache, the
cache can be overflowed and corrupt the following data structure in
mlx5_txq_data.

Fixes: 6e78005a9b30 ("net/mlx5: add reference counter on DPDK Tx queues")
Cc: stable@dpdk.org
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
6 years agonet/mlx5: fix Memory Region registration
Yongseok Koh [Fri, 15 Dec 2017 01:59:17 +0000 (17:59 -0800)]
net/mlx5: fix Memory Region registration

Although granularity of chunks in a mempool is a cacheline, addresses are
extended to align to page boundary for performance reason in device when
registering a MR (Memory Region). This could make some regions overlap,
then can cause Tx completion error due to incorrect LKEY search. If the
error occurs, the Tx queue will get stuck. To avoid it, end address of a
packet segment is used in LKEY search.

Fixes: b0b093845793 ("net/mlx5: use buffer address for LKEY search")
Cc: stable@dpdk.org
Reported-by: Hanoch Haim <hhaim@cisco.com>
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
6 years agonet/mlx5: fix VLAN configuration after port stop
Shahaf Shuler [Wed, 13 Dec 2017 14:03:10 +0000 (16:03 +0200)]
net/mlx5: fix VLAN configuration after port stop

Ethdev layer has an API to configure vlan setting on the flight, i.e.
when the port state is start.

Calling such API when the port is stopped may cause segmentation fault
as the related Verbs contexts has not been created yet.

Fixes: 09cb5b581762 ("net/mlx5: separate DPDK from verbs Rx queue objects")
Cc: stable@dpdk.org
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
6 years agonet/sfc: fix main MAC address handling
Ivan Malov [Wed, 20 Dec 2017 09:52:14 +0000 (09:52 +0000)]
net/sfc: fix main MAC address handling

There is a school of thought that rte_eth_dev_default_mac_addr_set()
must call the PMD callback first and then save the new MAC address
in dev->data->mac_addrs[0]. If this concept gets approved, it will
break the current approach used in sfc driver as the latter relies
on the assumption that the new MAC address is already contained in
dev->data->mac_addrs[0], and, if adapter restart is needed to make
the HW apply the new address, the outdated value will be retrieved
from dev->data. In order to preclude any possible bugs, this patch
adds device private storage for the up-to-date copy of the address.

Fixes: c100fd464bb7 ("net/sfc: support main MAC address change")
Cc: stable@dpdk.org
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agoethdev: fix typo in functions comment
Pablo de Lara [Tue, 19 Dec 2017 11:31:50 +0000 (11:31 +0000)]
ethdev: fix typo in functions comment

Fixes: fbde27f19ab8 ("ethdev: get default Rx/Tx configuration from dev info")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agomaintainers: update for bnxt
Ajit Khaparde [Thu, 14 Dec 2017 17:53:33 +0000 (09:53 -0800)]
maintainers: update for bnxt

Remove Stephen Hurd and add Somnath Kotur to maintain bnxt PMD.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agoethdev: fix missing imissed counter in xstats
Olivier Matz [Thu, 14 Dec 2017 14:23:00 +0000 (15:23 +0100)]
ethdev: fix missing imissed counter in xstats

imissed counter has been set as deprecated in commit 49f386542af4
("ethdev: remove driver specific stats") and removed from the
rte_eth_xstats_name_off structure.

The imissed counter has been restored few commits later but has not been
restored in the rte_eth_stats structure. Add it back.

Fixes: 4eadb8ba11b7 ("ethdev: do not deprecate imissed counter")
Cc: stable@dpdk.org
Signed-off-by: Thibaut Collet <thibaut.collet@6wind.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/sfc: fix DMA memory leak after kvarg processing failure
Andrew Rybchenko [Wed, 13 Dec 2017 07:12:18 +0000 (07:12 +0000)]
net/sfc: fix DMA memory leak after kvarg processing failure

Fixes: e56fa9c23e7a ("net/sfc: add kvarg control for MAC statistics update period")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
6 years agonet/sfc: fix multicast address list copy memory leak
Andrew Rybchenko [Wed, 13 Dec 2017 07:12:17 +0000 (07:12 +0000)]
net/sfc: fix multicast address list copy memory leak

Fixes: 295f647a38a2 ("net/sfc: set multicast address list in started state only")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
6 years agonet/sfc: stop periodic DMA if MAC stats upload fails
Andrew Rybchenko [Wed, 13 Dec 2017 07:12:16 +0000 (07:12 +0000)]
net/sfc: stop periodic DMA if MAC stats upload fails

Fixes: 3b257f7e6c0f ("net/sfc: request MAC stats upload immediately on port start")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
6 years agonet/qede: add support for GENEVE tunneling offload
Shahed Shaikh [Thu, 14 Dec 2017 06:36:03 +0000 (22:36 -0800)]
net/qede: add support for GENEVE tunneling offload

This patch refactors existing VXLAN tunneling offload code and enables
following features for GENEVE:
 - destination UDP port configuration
 - checksum offloads
 - filter configuration

Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
Acked-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede: fix to reject config with no Rx queue
Harish Patil [Thu, 14 Dec 2017 06:36:02 +0000 (22:36 -0800)]
net/qede: fix to reject config with no Rx queue

The qede firmware expects minimum one RX queue to be created, otherwise
it results in firmware exception. So a check is added to prevent that.

Fixes: ec94dbc57362 ("qede: add base driver")
Cc: stable@dpdk.org
Signed-off-by: Harish Patil <harish.patil@cavium.com>
6 years agonet/qede: fix to enable LRO over tunnels
Harish Patil [Thu, 14 Dec 2017 06:36:01 +0000 (22:36 -0800)]
net/qede: fix to enable LRO over tunnels

Enable LRO feature to work with tunnel encapsulation protocols.

Fixes: 29540be7efce ("net/qede: support LRO/TSO offloads")
Cc: stable@dpdk.org
Signed-off-by: Harish Patil <harish.patil@cavium.com>
6 years agonet/bonding: fix activated slave in 8023ad mode
Jerry Lilijun [Mon, 20 Nov 2017 07:15:41 +0000 (07:15 +0000)]
net/bonding: fix activated slave in 8023ad mode

In the function bond_mode_8023ad_enable(), the var i is used as slave
port id to the function bond_mode_8023ad_activate_slave().

This variable is only a index for array internals->active_slaves.
So its need to be fixed and change i to internals->active_slaves[i].

Fixes: 46fb43683679 ("bond: add mode 4")
Cc: stable@dpdk.org
Signed-off-by: Jerry Lilijun <jerry.lilijun@huawei.com>
Tested-by: Kyle Larose <klarose@sandvine.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
6 years agonet/mlx4: remove Tx completion elements counter
Matan Azrad [Wed, 6 Dec 2017 17:57:56 +0000 (17:57 +0000)]
net/mlx4: remove Tx completion elements counter

This counter saved the descriptor elements which are waiting to be
completed and was used to know if completion function should be
called.

This completion check can be done by other elements management
variables and we can prevent this counter management.

Remove this counter and replace the completion check easily by other
elements management variables.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>