dpdk.git
7 years agonet/tap: add Rx trigger
Adrien Mazarguil [Tue, 14 Mar 2017 12:51:58 +0000 (13:51 +0100)]
net/tap: add Rx trigger

This commit adds a signal-based trigger to the Rx burst function in order
to avoid unnecessary system calls while Rx queues are empty.

Triggered Rx bursts put less pressure on the kernel, free up CPU resources
for applications and result in a noticeable performance improvement when
sharing CPU threads with other PMDs.

Measuring the traffic forwarding rate between two physical devices in
testpmd (IO mode, single thread, 64B packets) before and after adding two
tap PMD instances (4 ports total) that do not process any traffic and
comparing results yields:

Without Rx trigger:

 -15% (--burst=32)
 -62% (--burst=1)

With Rx trigger:

 -0.3% (--burst=32)
 -6% (--burst=1)

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
7 years agonet/tap: remove redundant syscall on Tx
Adrien Mazarguil [Tue, 14 Mar 2017 12:51:57 +0000 (13:51 +0100)]
net/tap: remove redundant syscall on Tx

Polling the Tx queue file descriptor before writing to it is not mandatory
since it is configured as non-blocking.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
7 years agonet/thunderx: check data offset alignment requirement
Jerin Jacob [Mon, 13 Mar 2017 08:02:11 +0000 (13:32 +0530)]
net/thunderx: check data offset alignment requirement

nicvf HW expects the DMA address of the packet data to be
aligned with cache line size.

Packet data offset is a function of struct mbuf size,
mbuf private size and headroom. mbuf private size can
be changed from the application in pool creation, this
check detects HW alignment requirement constraint in pmd
start function.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agonet/e1000: advertise offload capabilities for the EM PMD
Allain Legacy [Fri, 10 Mar 2017 14:38:21 +0000 (09:38 -0500)]
net/e1000: advertise offload capabilities for the EM PMD

The hardware offload capabilities are not being advertised for the EM PMD.
Because of this, applications that only enable these features if the device
advertises them will never do so.

Normally this is not an issue since normal packet processing should work
even if hardware offload is not available.  But, in older versions of
Virtual Box the e1000 device emulation (Intel PRO/1000 MT Desktop 82540EM)
assumes that it should enable VLAN stripping even if the driver does not
request it.  This means that any ingress packets that have a VLAN tag will
be stripped.  Since the application did not request to enable VLAN
stripping it is not expecting these packets so they are not processed as
VLAN packets.

Regardless of the Virtual Box issue, the driver should be advertising
supported capabilities as is done in other drivers.

Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
7 years agonet/sfc: set multicast address list in started state only
Ivan Malov [Thu, 9 Mar 2017 16:21:30 +0000 (16:21 +0000)]
net/sfc: set multicast address list in started state only

According to 'libefx' API requirements, one is allowed to
apply multicast address list to the port in started state
only, otherwise the new array should be copied to a local
storage in order to be applied during the next port start

Coverity issue: 141296
Fixes: 0fa0070e4391 ("net/sfc: support multicast addresses list controls")

Fixes: e9ddf37a507d ("net/sfc: fix setting empty multicast list")
Cc: stable@dpdk.org
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
7 years agonet/sfc: add unknown unicast/multicast match in flow API
Roman Zhukov [Thu, 9 Mar 2017 15:26:33 +0000 (15:26 +0000)]
net/sfc: add unknown unicast/multicast match in flow API

Support individual/group destination address match (unknown unicast
and all-multicast correspondingly in terms of firmware).

Signed-off-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
7 years agonet/sfc: support UDP in flow API filters
Roman Zhukov [Thu, 9 Mar 2017 15:26:32 +0000 (15:26 +0000)]
net/sfc: support UDP in flow API filters

Exact match of source and destination ports is supported by parser.
IP protocol match is enforced to UDP.

Signed-off-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
7 years agonet/sfc: support TCP in flow API filters
Roman Zhukov [Thu, 9 Mar 2017 15:26:31 +0000 (15:26 +0000)]
net/sfc: support TCP in flow API filters

Exact match of source and destination ports is supported by parser.
IP protocol match is enforced to TCP.

Signed-off-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
7 years agonet/sfc: support IPV6 in flow API filters
Roman Zhukov [Thu, 9 Mar 2017 15:26:30 +0000 (15:26 +0000)]
net/sfc: support IPV6 in flow API filters

Exact match of IP protocol, source and destination
addresses is supported by parser.
EtherType match is enforced to IPv6 EtherType.

Signed-off-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
7 years agonet/sfc: support IPV4 in flow API filters
Roman Zhukov [Thu, 9 Mar 2017 15:26:29 +0000 (15:26 +0000)]
net/sfc: support IPV4 in flow API filters

Exact match of IP protocol, source and destination
addresses is supported by parser.
EtherType match is enforced to IPv4 EtherType.

Signed-off-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
7 years agonet/sfc: support VLAN in flow API filters
Roman Zhukov [Thu, 9 Mar 2017 15:26:28 +0000 (15:26 +0000)]
net/sfc: support VLAN in flow API filters

Exact match of VLAN ID bits is supported only and required in VLAN item.
Mask to match VLAN ID bits only is required, default mask to match entire
TCI is not supported.

Signed-off-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
7 years agonet/sfc: support flow API filters
Roman Zhukov [Thu, 9 Mar 2017 15:26:27 +0000 (15:26 +0000)]
net/sfc: support flow API filters

Only pattern items VOID, ETH and actions VOID, QUEUE is now
supported.

Signed-off-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
7 years agonet/sfc: provide a way to check if filter is supported
Andrew Rybchenko [Thu, 9 Mar 2017 15:26:26 +0000 (15:26 +0000)]
net/sfc: provide a way to check if filter is supported

The information is obtained from firmware on attach. It may
change after MC reboot (firmware version or variant change).
Cache should be refreshed after MC reboot when it is handled
properly (not yet).

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Robert Stonehouse <rstonehouse@solarflare.com>
7 years agonet/sfc: implement dummy filter control callback
Andrew Rybchenko [Thu, 9 Mar 2017 15:26:25 +0000 (15:26 +0000)]
net/sfc: implement dummy filter control callback

Just log error for all filter types and return no support indication.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Robert Stonehouse <rstonehouse@solarflare.com>
7 years agonet/sfc/base: improve API to get supported filter matches
Mark Spender [Thu, 9 Mar 2017 15:26:24 +0000 (15:26 +0000)]
net/sfc/base: improve API to get supported filter matches

The previous API had various problems, including the length of the
caller provided buffer not being specified, no means being available
to discover how big the buffer needs to be, and a lack of clarity of
what the resulting list contains.

To improve it:
- add the buffer length as a parameter
- if the provided buffer is too short, fail with ENOSPC and return
  the required length
- ensure that the list contents are valid and add comments describing it

It is safe to change this API as, unsurprisingly, it has no users.

Signed-off-by: Mark Spender <mspender@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
7 years agonet/sfc/base: split local MAC I/G back into separate flags
Mark Spender [Thu, 9 Mar 2017 15:26:23 +0000 (15:26 +0000)]
net/sfc/base: split local MAC I/G back into separate flags

The flag EFX_FILTER_MATCH_LOC_MAC_IG to represent filtering on the
individual/group bit of the MAC address (with the two cases being
distinguished by the MAC address in the filter specification) was
introduced to mirror the Linux driver filtering code, but the
implementations are different enough anyway that it isn't of much
value.

Having separate flags for unknown unicast and multicast simplifies
the code and allows the set of flags to match those used by MCDI.

It will also makes it easier to report whether these filters are
supported.

In the MCDI definitions, the unknown multicast and unicast flags
have the values 0x40000000 and 0x80000000 respectively, and so using
the same values for simplicity requires 32 bits in the filter
specification to store the flags. This means the structure is now
a little bigger than 64 bytes, but filters are not often used on
critical paths so this shouldn't have much impact - on Linux they
are also bigger than they used to be.

Signed-off-by: Mark Spender <mspender@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
7 years agonet/ixgbevf: set xstats id values
Ido Barnea [Thu, 9 Mar 2017 16:59:28 +0000 (16:59 +0000)]
net/ixgbevf: set xstats id values

Without setting the id, calling xstats_get twice with same array causes
memory corruption.

Also, if IXGBEVF_NB_XSTATS will be different than 1 in the future,
this will cause issues.

Fixes: 156712ba40d3 ("ixgbevf: add extending stats")

Signed-off-by: Ido Barnea <ibarnea@cisco.com>
7 years agonet/mlx5: fix TSO TCP checksum flag
Shahaf Shuler [Tue, 7 Mar 2017 11:47:51 +0000 (13:47 +0200)]
net/mlx5: fix TSO TCP checksum flag

Since PKT_TX_TCP_SEG implies PKT_TX_TCP_CKSUM, the PMD must force this
flag.
The fix applied for both tunneled and non-tunneled packets.

Fixes: 3f13f8c23a7c ("net/mlx5: support hardware TSO")
Fixes: b247f346019b ("net/mlx5: support hardware TSO for VXLAN and GRE")

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
7 years agonet/fm10k/base: add base driver information
Qi Zhang [Wed, 8 Mar 2017 06:19:06 +0000 (01:19 -0500)]
net/fm10k/base: add base driver information

Add base driver information in Makefile.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
7 years agonet/fm10k/base: request reset on mailbox state change
Qi Zhang [Wed, 8 Mar 2017 06:19:05 +0000 (01:19 -0500)]
net/fm10k/base: request reset on mailbox state change

Multiple IES API resets can cause a race condition where the mailbox
interrupt request bits can be cleared before being handled. This can
leave certain mailbox messages from the PF to be untreated and the PF
will enter in some inactive state. If this situation occurs, the IES API
will initiate a mailbox version reset which, then, trigger a mailbox
state change. Once this mailbox transition occurs (from OPEN to CONNECT
state), a request for reset will be returned.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
7 years agonet/fm10k/base: replace macros
Qi Zhang [Wed, 8 Mar 2017 06:19:04 +0000 (01:19 -0500)]
net/fm10k/base: replace macros

Other shared code bases are planning on using
IS_MULTICAST_ETHER_ADDR and friends without leaving the driver
name in the macro.
Remove reference to FM10K here so that we can re-use the specific
compat flags from Linux.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
7 years agonet/fm10k/base: improve re-map queues handle
Qi Zhang [Wed, 8 Mar 2017 06:19:03 +0000 (01:19 -0500)]
net/fm10k/base: improve re-map queues handle

Avoid potential FUM fault errors on a VF when updating MAC address
and VLAN information. Only use the register flow when the mailbox is
disconnected, by checking if the enqueue_tx returns
FM10K_MBX_ERR_NO_MBX. If the mailbox message can be sent, there is no
reason to bother with the register writes which are only intended to
be used during VF driver initialization.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
7 years agonet/fm10k/base: add macro for geneve tunnel offload
Qi Zhang [Wed, 8 Mar 2017 06:19:02 +0000 (01:19 -0500)]
net/fm10k/base: add macro for geneve tunnel offload

add necessary macro to support geneve tunnel offload.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
7 years agonet/fm10k/base: do not stop reset
Qi Zhang [Wed, 8 Mar 2017 06:19:01 +0000 (01:19 -0500)]
net/fm10k/base: do not stop reset

Don't report FM10K_ERR_REQUESTS_PENDING when we fail to disable queues
within the timeout. This can occur due to a hardware Tx hang, or when
the switch ethernet fabric is resetting while we are transmitting
traffic. It can sometimes take up to 500ms before the Tx DMA engine
gives up. Instead, just skip the DMA engine check and perform
a data-path reset anyways. Add a statistic counter to keep track of the
number of resets occurring while we have pending DMA on the rings.

In order to prevent having to assign err = FM10K_SUCCESS, re-order the
last few items of the reset_hw_pf function so that we don't perform
"return err" at the end.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
7 years agonet/fm10k/base: add macros for global interrupt
Qi Zhang [Wed, 8 Mar 2017 06:19:00 +0000 (01:19 -0500)]
net/fm10k/base: add macros for global interrupt

Add two macros for global interrupt.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
7 years agonet/fm10k/base: enable lport map request
Qi Zhang [Wed, 8 Mar 2017 06:18:59 +0000 (01:18 -0500)]
net/fm10k/base: enable lport map request

If the fm10k interface is brought up, but the switch manager software is
not running, the driver will continuously request the lport map every
few seconds in the base driver watchdog routine. Eventually after
several minutes the switch mailbox Tx fifo will fill up and the mailbox
will timeout, resulting in a reset. This reset will appear as if for no
reason, and occurs regularly every few minutes until the switch manager
software is loaded.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
7 years agonet/fm10k/base: improve VF multi-bit VLAN update requests
Qi Zhang [Wed, 8 Mar 2017 06:18:58 +0000 (01:18 -0500)]
net/fm10k/base: improve VF multi-bit VLAN update requests

The VF uses a multi-bit update request to clear unused VLANs whenever it
resets. However, an accident in a previous refactor broke multi-bit
updates for VFs, due to misreading a comment in fm10k_vf.c and
attempting to reduce code duplication. The problem occurs because
a multi-bit request has a non-zero length, and the PF would simply drop
any request with the upper 16 bits set. In addition, a multi-bit vlan
update does not have a concept for "VLAN 0" as the single bit update
does.

A previous revision of this patch resolved the issue by simply removing
the upper 16 bit check and the iov_select_vid checks. However, this would
remove the checks for default VID and for ensuring no other VLANs can be
enabled except pf_vid when it has been set. To resolve that issue, this
revision uses the iov_select_vid when we have a single-bit update, and
denies any multi-bit update when the VLAN was administratively set by
the PF. This should be ok since the PF properly updates VLAN_TABLE when
it assigns the PF vid. This ensures that requests to add or "remove" the
PF vid work as expected, but a rogue VF could not use the multi-bit
update as a loophole to attempt receiving traffic on other VLANs.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
7 years agonet/fm10k/base: update comment regarding reserved bits check
Qi Zhang [Wed, 8 Mar 2017 06:18:57 +0000 (01:18 -0500)]
net/fm10k/base: update comment regarding reserved bits check

The original comment may be read incorrectly as referring to checking
the *entire* length is zero. However, it merely checks only the reserved
bits of both length and reserved in a small amount of code. Update the
comment to indicate this is a clever trick and clearly spell out that it
only checks the reserve bits.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
7 years agonet/fm10k/base: use different name for override bit
Qi Zhang [Wed, 8 Mar 2017 06:18:56 +0000 (01:18 -0500)]
net/fm10k/base: use different name for override bit

Use a new #define FM10K_VLAN_OVERRIDE even though we're using
the exact same bit. The reason for this is clarity in the code,
otherwise you can read FM10K_VLAN_CLEAR and think it should be
removed. Also add a comment explaining why the FM10K_VLAN_OVERRIDE
bit is set.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
7 years agonet/fm10k/base: update comment to use 8 bit notation
Qi Zhang [Wed, 8 Mar 2017 06:18:55 +0000 (01:18 -0500)]
net/fm10k/base: update comment to use 8 bit notation

The diagram represents bit layout of the multi-bit VLAN update
message format. Re-draw the numbers using base 8, and mark the
bit values every 8 bits at the top. This should make it more
easy to grasp the table quickly.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
7 years agonet/fm10k/base: add new item to lport msg attr
Qi Zhang [Wed, 8 Mar 2017 06:18:54 +0000 (01:18 -0500)]
net/fm10k/base: add new item to lport msg attr

Add FM10K_PF_ATTR_ID_ERR, since it is possible for the switch manager
to send out an error message indicating status of the LPORT_MAP due to
zero allocated bandwidth.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
7 years agonet/fm10k/base: clean up the logic
Qi Zhang [Wed, 8 Mar 2017 06:18:53 +0000 (01:18 -0500)]
net/fm10k/base: clean up the logic

Clean up the logic in fm10k_tlv_attr_parse, we
should not reply on that FM10K_NOT_IMPLEMENTED is
greater than zero, as this can easily cause confusion.
The patch also correct a minor document error.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
7 years agonet/fm10k/base: add error code
Qi Zhang [Wed, 8 Mar 2017 06:18:52 +0000 (01:18 -0500)]
net/fm10k/base: add error code

Add API error code for when PEP is not scheduled.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
7 years agonet/fm10k/base: expose macros needed by DPDK
Qi Zhang [Wed, 8 Mar 2017 06:18:51 +0000 (01:18 -0500)]
net/fm10k/base: expose macros needed by DPDK

Add back macros that DPDK required and remove the redundant ones
in fm10k_osdep.h.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
7 years agonet/fm10k/base: reset multicast mode when deleting lport
Qi Zhang [Wed, 8 Mar 2017 06:18:50 +0000 (01:18 -0500)]
net/fm10k/base: reset multicast mode when deleting lport

Deleting lport when multicast mod is configured to
FM10K_XCAST_MODE_ALLMULTI or FM10K_XCAST_MODE_PROMISC will
result in generating orphaned multicast-group entries in the
switch manager.
Before deleting the lport, reset multicast mode to
FM10K_XCAST_MODE_NONE to flush out these multicast-group
entries.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
7 years agonet/fm10k/base: add a flag to indicate VF trust mode
Qi Zhang [Wed, 8 Mar 2017 06:18:49 +0000 (01:18 -0500)]
net/fm10k/base: add a flag to indicate VF trust mode

Adds boolean flag in fm10k_vf_info to support configuring
a VF to be trusted.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
7 years agonet/tap: fix dev name look-up
Pascal Mazon [Mon, 6 Mar 2017 15:13:08 +0000 (16:13 +0100)]
net/tap: fix dev name look-up

Store the device name in dev->data->name, to have symmetrical behavior
between rte_pmd_tap_probe(name) and rte_pmd_tap_remove(name).

The netdevice name (linux interface name) is stored in the name field of
struct pmd_internals.

snprintf(data->name) has been moved closer to the rte_ethdev_allocate()
as it should use the same name.

Fixes: 02f96a0a82d1 ("net/tap: add TUN/TAP device PMD")

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
7 years agonet/sfc: remove Tx DMA descriptor boundary crossing limit
Andrew Rybchenko [Mon, 6 Mar 2017 13:05:09 +0000 (13:05 +0000)]
net/sfc: remove Tx DMA descriptor boundary crossing limit

EF10 supported by the PMD has no limitations on address boundary
crossing by Tx DMA descriptors.

Fixes: 428c7ddd2f16 ("net/sfc: send bursts of packets")
Fixes: fec33d5bb3eb ("net/sfc: support firmware-assisted TSO")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
7 years agonet/sfc/base: separate limitations on Tx DMA descriptors
Andrew Rybchenko [Mon, 6 Mar 2017 13:05:08 +0000 (13:05 +0000)]
net/sfc/base: separate limitations on Tx DMA descriptors

Siena has limitation on maximum byte count and 4k boundary crosssing
(which is stricter than maximum byte count).
EF10 has limitation on maximum byte count only.

Fixes: f7dc06bf35f2 ("net/sfc/base: import 5xxx/6xxx family support")
Fixes: e7cd430c864f ("net/sfc/base: import SFN7xxx family support")
Fixes: 94190e3543bf ("net/sfc/base: import SFN8xxx family support")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
7 years agonet/i40e: fix incorrect packet index reference
Jerin Jacob [Sat, 4 Mar 2017 12:00:32 +0000 (17:30 +0530)]
net/i40e: fix incorrect packet index reference

Fixes: ae0eb310f253 ("net/i40e: implement vector PMD for ARM")
Cc: stable@dpdk.org
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Sunil Kulkarni <sunil.kulkarni@caviumnetworks.com>
Acked-by: Jianbo Liu <jianbo.liu@linaro.org>
7 years agonet/sfc: support statistics reset
Ivan Malov [Fri, 3 Mar 2017 12:49:25 +0000 (12:49 +0000)]
net/sfc: support statistics reset

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
7 years agonet/sfc/base: add MCDI agnostic wrapper for MAC stats clear
Ivan Malov [Fri, 3 Mar 2017 12:49:24 +0000 (12:49 +0000)]
net/sfc/base: add MCDI agnostic wrapper for MAC stats clear

If a libefx-based driver needs some way to clear port statistics,
then an MCDI agnostic method is required.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
7 years agonet/ixgbe: fix filters adding MAC type check
Wei Zhao [Wed, 8 Mar 2017 07:58:31 +0000 (15:58 +0800)]
net/ixgbe: fix filters adding MAC type check

All kinds of filter need to hardware mac type check
to make sure the hardware support that type of filter.
If not, it may cause serious issue.

Fixes: 11777435c727 ("net/ixgbe: parse flow director filter")
Fixes: 672be56d76a2 ("net/ixgbe: parse n-tuple filter")
Fixes: eb3539fc8550 ("net/ixgbe: parse ethertype filter")
Fixes: 429f6ebb42cc ("net/ixgbe: parse TCP SYN filter")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
7 years agonet/ixgbe: move MAC type check macros
Wei Zhao [Wed, 8 Mar 2017 07:58:30 +0000 (15:58 +0800)]
net/ixgbe: move MAC type check macros

Move ixgbe 2 mac type check macros to ixgbe_ethdev.h in
order to be used by filter parser functions in file
ixgbe_flow.c.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
7 years agonet/ixgbe: delete useless function declaration
Wei Zhao [Wed, 8 Mar 2017 06:58:49 +0000 (14:58 +0800)]
net/ixgbe: delete useless function declaration

Delete useless function declarations in file ixgbe_flow.c and
adjust function definition position to avoid compile error.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
7 years agodoc: announce TSO support on mlx5 driver
Shahaf Shuler [Mon, 6 Mar 2017 11:55:45 +0000 (13:55 +0200)]
doc: announce TSO support on mlx5 driver

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
7 years agonet/vmxnet3: update to version 3
Shrikrishna Khare [Mon, 6 Mar 2017 22:55:07 +0000 (14:55 -0800)]
net/vmxnet3: update to version 3

With all vmxnet3 version 3 changes incorporated in the vmxnet3 driver,
the driver can configure emulation to run at vmxnet3 version 3, provided
the emulation advertises support for version 3.

This patch also updates release notes.

Signed-off-by: Shrikrishna Khare <skhare@vmware.com>
Acked-by: Yong Wang <yongwang@vmware.com>
Acked-by: Jin Heo <heoj@vmware.com>
7 years agonet/vmxnet3: add cmd to register memory region
Shrikrishna Khare [Mon, 6 Mar 2017 22:55:06 +0000 (14:55 -0800)]
net/vmxnet3: add cmd to register memory region

In vmxnet3 version 3, the emulation added support for the vmxnet3 driver
to communicate information about the memory regions the driver will use
for rx/tx buffers. The driver can also indicate which rx/tx queue the
memory region is applicable for. If this information is communicated
to the emulation, the emulation will always keep these memory regions
mapped, thereby avoiding the mapping/unmapping overhead for every packet.

Signed-off-by: Shrikrishna Khare <skhare@vmware.com>
Signed-off-by: Guolin Yang <gyang@vmware.com>
Acked-by: Yong Wang <yongwang@vmware.com>
Acked-by: Jin Heo <heoj@vmware.com>
7 years agonet/vmxnet3: add reserved version 3 command
Shrikrishna Khare [Mon, 6 Mar 2017 22:55:05 +0000 (14:55 -0800)]
net/vmxnet3: add reserved version 3 command

This command is reserved.

Signed-off-by: Shrikrishna Khare <skhare@vmware.com>
Acked-by: Yong Wang <yongwang@vmware.com>
Acked-by: Jin Heo <heoj@vmware.com>
7 years agonet/vmxnet3: support receive data ring
Shrikrishna Khare [Mon, 6 Mar 2017 22:55:04 +0000 (14:55 -0800)]
net/vmxnet3: support receive data ring

vmxnet3 driver preallocates buffers for receiving packets and posts the
buffers to the emulation. In order to deliver a received packet to the
guest, the emulation must map buffer(s) and copy the packet into it.

To avoid this memory mapping overhead, this patch introduces the receive
data ring - a set of small sized buffers that are always mapped by
the emulation. If a packet fits into the receive data ring buffer, the
emulation delivers the packet via the receive data ring (which must be
copied by the guest driver), or else the usual receive path is used.

Signed-off-by: Shrikrishna Khare <skhare@vmware.com>
Acked-by: Yong Wang <yongwang@vmware.com>
Acked-by: Jin Heo <heoj@vmware.com>
7 years agonet/vmxnet3: allow variable length Tx data ring
Shrikrishna Khare [Mon, 6 Mar 2017 22:55:03 +0000 (14:55 -0800)]
net/vmxnet3: allow variable length Tx data ring

vmxnet3 driver supports transmit data ring viz. a set of fixed size
buffers used by the driver to copy packet headers. Small packets that
fit these buffers are copied into these buffers entirely.

Currently this buffer size of fixed at 128 bytes. This patch extends
transmit data ring implementation to allow variable length transmit
data ring buffers. The length of the buffer is read from the emulation
during initialization.

Signed-off-by: Shrikrishna Khare <skhare@vmware.com>
Acked-by: Yong Wang <yongwang@vmware.com>
Acked-by: Jin Heo <heoj@vmware.com>
7 years agonet/vmxnet3: introduce generalized cmd interface
Shrikrishna Khare [Mon, 6 Mar 2017 22:55:02 +0000 (14:55 -0800)]
net/vmxnet3: introduce generalized cmd interface

Shared memory is used to exchange information between the vmxnet3 driver
and the emulation. In order to request emulation to perform a task, the
driver first populates specific fields in this shared memory and then
issues corresponding command by writing to the command register(CMD). The
layout of the shared memory was defined by vmxnet3 version 1 and cannot
be extended for every new command without breaking backward compatibility.

To address this problem, in vmxnet3 version 3, the emulation repurposed
a reserved field in the shared memory to represent command information
instead. For new commands, the driver first populates the command
information field in the shared memory and then issues the command. The
emulation interprets the data written to the command information
depending on the type of the command. This patch exposes this capability
to the driver.

Signed-off-by: Shrikrishna Khare <skhare@vmware.com>
Acked-by: Yong Wang <yongwang@vmware.com>
Acked-by: Jin Heo <heoj@vmware.com>
7 years agonet/vmxnet3: prepare for version 3 changes
Shrikrishna Khare [Mon, 6 Mar 2017 22:55:01 +0000 (14:55 -0800)]
net/vmxnet3: prepare for version 3 changes

Cleanup some code in preparation of vmxnet3 version 3 changes.

Signed-off-by: Shrikrishna Khare <skhare@vmware.com>
Acked-by: Yong Wang <yongwang@vmware.com>
Acked-by: Jin Heo <heoj@vmware.com>
7 years agonet/i40e: enable DCB on SRIOV VFs
Jingjing Wu [Tue, 28 Feb 2017 06:26:30 +0000 (14:26 +0800)]
net/i40e: enable DCB on SRIOV VFs

enable DCB on SRIOV VFs, including
 - UP and TC mapping according to dcb_tc in struct rte_eth_dcb_rx_conf.
 - TC and queue mapping: queues are divided equally for each TC.
 - UP insert when sending packet according to the TC the Tx queue
   belongs to.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agoapp/testpmd: fix TC mapping in DCB init config
Jingjing Wu [Tue, 28 Feb 2017 06:26:29 +0000 (14:26 +0800)]
app/testpmd: fix TC mapping in DCB init config

Fix the UP and TC mapping to divide multiple UPs to TCs instead of mapping
the UPs who are lager than num_tcs to TC0.

Fixes: 1a572499beb6 ("app/testpmd: setup DCB forwarding based on traffic class")
Cc: stable@dpdk.org
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agoapp/testpmd: fix init config for multi-queue mode
Jingjing Wu [Tue, 28 Feb 2017 06:26:28 +0000 (14:26 +0800)]
app/testpmd: fix init config for multi-queue mode

In SRIOV mode, the mq_mode of rte_eth_rxmode should not carry VMDQ info
without rx_adv_conf setting.

Fixes: a30979f6ad7f ("app/testpmd: set Rx VMDq RSS mode")
Cc: stable@dpdk.org
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/ixgbe: fix multi-queue mode check in SRIOV mode
Jingjing Wu [Tue, 28 Feb 2017 06:26:27 +0000 (14:26 +0800)]
net/ixgbe: fix multi-queue mode check in SRIOV mode

In SRIOV case, ETH_MQ_RX_VMDQ_DCB and ETH_MQ_RX_DCB should be considered as
the same meaning, due to the multi-queue mapping is the same SRIOV and VMDq
in ixgbe.

Fixes: 27b609cbd1c6 ("ethdev: move the multi-queue mode check to specific drivers")
Cc: stable@dpdk.org
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/ixgbe: fix all queues drop setting of DCB
Wenzhuo Lu [Mon, 27 Feb 2017 05:34:04 +0000 (13:34 +0800)]
net/ixgbe: fix all queues drop setting of DCB

DCB is split to RX and TX mode. All-queues-drop is set for TX mode.
It's not appropriate because all-queue-drop is a RX feature.
Move this setting from TX to RX.

Fixes: f3f9b17bb8a5 ("net/ixgbe: support multiqueue mode VMDq DCB with SRIOV")
Cc: stable@dpdk.org
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
7 years agonet/mlx5: fix extended statistics counters identification
Shahaf Shuler [Sun, 5 Mar 2017 12:02:48 +0000 (14:02 +0200)]
net/mlx5: fix extended statistics counters identification

Checking whether the counter is IB counter was performed with the
wrong index.

Fixes: 859081d3fbbf ("net/mlx5: add out of buffer counter to extended statistic")
Cc: stable@dpdk.org
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
7 years agonet/mlx5: support hardware TSO for VXLAN and GRE
Shahaf Shuler [Thu, 2 Mar 2017 09:05:45 +0000 (11:05 +0200)]
net/mlx5: support hardware TSO for VXLAN and GRE

This commit adds support for hardware TSO for tunneled packets.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
7 years agonet/mlx5: add hardware checksum offload for tunnel packets
Shahaf Shuler [Thu, 2 Mar 2017 09:05:44 +0000 (11:05 +0200)]
net/mlx5: add hardware checksum offload for tunnel packets

Prior to this commit Tx checksum offload was supported only for the
inner headers.
This commit adds support for the hardware to compute the checksum for the
outer headers as well.

The support is for tunneling protocols GRE and VXLAN.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
7 years agonet/mlx5: support hardware TSO
Shahaf Shuler [Thu, 2 Mar 2017 09:01:31 +0000 (11:01 +0200)]
net/mlx5: support hardware TSO

Implement support for hardware TSO.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
7 years agonet/ixgbe: remove invalid declaration
Olivier Matz [Tue, 28 Feb 2017 13:22:49 +0000 (14:22 +0100)]
net/ixgbe: remove invalid declaration

The function is not defined anywhere, remove it.

Fixes: 0eb609239efd ("ixgbe: enable Rx queue interrupts for PF and VF")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/ixgbe: fix Rx queue blocking issue
Wenzhuo Lu [Wed, 22 Feb 2017 02:59:35 +0000 (10:59 +0800)]
net/ixgbe: fix Rx queue blocking issue

In the IOV scenario, multi Rx queues can be assigned to one VF.
If the dropping is not enabled, when no descriptors are available
for one queue, this queue can block others.

Fixes: 00e30184daa0 ("ixgbe: add PF support")
Cc: stable@dpdk.org
Suggested-by: Liang-Min Larry Wang <liang-min.wang@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
7 years agonet/i40e: no more initial VF MAC address
Qi Zhang [Tue, 21 Feb 2017 22:45:29 +0000 (17:45 -0500)]
net/i40e: no more initial VF MAC address

During PF initialization, PF will generate an initial mac address
for VFs, the purpose is to help VF keep a constant mac address between
its startup/shutdown cycles. Now this is not necessary, since we already
provide an API to set VF's MAC address from PF side
(rte_pmd_i40e_set_vf_mac_addr).

Application can use this API to lock down VF's mac address.(of course this
should happen before VF init)
While without this patch, we still can use rte_pmd_i40e_set_vf_mac_addr
to overwrite the random one, but this patch align DPDK's default behavior
with Kernel PF driver's, and this help to give an identical experience
when work with kernel VF driver.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
7 years agonet/mlx5: use an RSS drop queue
Nélio Laranjeiro [Wed, 1 Mar 2017 12:49:48 +0000 (13:49 +0100)]
net/mlx5: use an RSS drop queue

Having a drop queue per drop flow consumes a lot of memory and reduce the
speed capabilities of the NIC to handle such cases.
To avoid this and reduce memory consumption, an RSS drop queue is created
for all drop flows.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
7 years agonet/mlx5: support RSS action flow rule
Nélio Laranjeiro [Wed, 1 Mar 2017 12:49:47 +0000 (13:49 +0100)]
net/mlx5: support RSS action flow rule

Implement a basic flow RSS action.  This commits don't handle the default
RSS queues already created by the control plane, this last part being huge.

Any new request RSS flow request will be added using an higher priority
than the default one to be sure this rule will be the one used.

Default ones (those created by dev_start()) remains but has they have a
lower priority they will not receive any new packet.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
7 years agonet/mlx5: prepare support for RSS action rule
Nélio Laranjeiro [Wed, 1 Mar 2017 12:49:46 +0000 (13:49 +0100)]
net/mlx5: prepare support for RSS action rule

In mlx5 PMD handling a single queue of several destination queues ends in
creating the same Verbs attribute, the main difference resides in the
indirection table and the RSS hash key.

This helps to prepare the supports to the RSS queues by first handling the
queue action has being an RSS queue with a single queue.  No RSS hash key
will be provided to the Verbs flow.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
7 years agonet/mlx5: support flag flow action
Nélio Laranjeiro [Wed, 1 Mar 2017 12:49:45 +0000 (13:49 +0100)]
net/mlx5: support flag flow action

This action is not terminal in this PMD, it must be followed by a queue
action.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
7 years agonet/mlx5: extend IPv6 flow item
Nélio Laranjeiro [Wed, 1 Mar 2017 12:49:44 +0000 (13:49 +0100)]
net/mlx5: extend IPv6 flow item

This commit adds:
 - Vtc flow,
 - Protocol,
 - Hop limits

Needs MLNX_OFED-4.0-0.0.7.0 or higher.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
7 years agonet/mlx5: add RSS hash result with mark id
Nélio Laranjeiro [Wed, 1 Mar 2017 12:49:43 +0000 (13:49 +0100)]
net/mlx5: add RSS hash result with mark id

RSS hash and mark ID can now coexists.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
7 years agonet/mlx5: support ether type support in flow item
Nélio Laranjeiro [Wed, 1 Mar 2017 12:49:42 +0000 (13:49 +0100)]
net/mlx5: support ether type support in flow item

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
7 years agonet/mlx5: fix resources free in the right function
Nélio Laranjeiro [Wed, 1 Mar 2017 12:49:41 +0000 (13:49 +0100)]
net/mlx5: fix resources free in the right function

ibv_attr should be freed in the function which allocates the memory.

Fixes: 2097d0d1e2cc ("net/mlx5: support basic flow items and actions")
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
7 years agonet/mlx5: fix drop queue creation error
Nélio Laranjeiro [Wed, 1 Mar 2017 12:49:40 +0000 (13:49 +0100)]
net/mlx5: fix drop queue creation error

Creating a drop queue in mlx5 ends by creating a non polled queue, but if
the associated work queue could not be created the error was not handled
ending in a undefined situation.

Fixes: 2097d0d1e2cc ("net/mlx5: support basic flow items and actions")
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
7 years agonet/mlx5: fix flow mark action handling
Nélio Laranjeiro [Tue, 28 Feb 2017 09:20:01 +0000 (10:20 +0100)]
net/mlx5: fix flow mark action handling

Mark value is always reported even when not requested or invalid.

Fixes: ea3bc3b1df94 ("net/mlx5: support mark flow action")
Cc: stable@dpdk.org
Reported-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
7 years agonet/ixgbe/base: update shared code version to 2017.02.27
Wenzhuo Lu [Wed, 1 Mar 2017 06:04:52 +0000 (14:04 +0800)]
net/ixgbe/base: update shared code version to 2017.02.27

* Add link block check for KR.
* Complete HW initialization even if SFP is not present.
* Add VF xcast promiscuous mode.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
7 years agonet/ixgbe/base: fix build error
Wenzhuo Lu [Wed, 1 Mar 2017 06:04:51 +0000 (14:04 +0800)]
net/ixgbe/base: fix build error

Fix ICC build error by removing the EWARN third parameter.

Build error:
.../drivers/net/ixgbe/base/ixgbe_phy.c(1543):
error #268: the format string ends before this argument
EWARN(hw, "WARNING: Intel (R) Network "
^

.../drivers/net/ixgbe/base/ixgbe_phy.c(1805):
error #268: the format string ends before this argument
EWARN(hw, "WARNING: Intel (R) Network "
^

Fixes: aa4fc14d2cee ("ixgbe: update base driver")
Fixes: b94a06c1b451 ("ixgbe/base: support qsfp and lco")
Cc: stable@dpdk.org
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
7 years agonet/ixgbe: support xcast promisc mode
Wenzhuo Lu [Wed, 1 Mar 2017 06:04:50 +0000 (14:04 +0800)]
net/ixgbe: support xcast promisc mode

Add the support of xcast promiscuous mode. It's
added in mailbox v1.3.
Move the definition of xcast mode to base code.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
7 years agonet/ixgbe/base: disable FC for 15B0
Wenzhuo Lu [Wed, 1 Mar 2017 06:04:49 +0000 (14:04 +0800)]
net/ixgbe/base: disable FC for 15B0

Disable Ethernet Flow Control (FC) for device 15B0.

Make sure that ixgbe_device_supports_autoneg_fc()
returns false and hw->fc.disable_fc_autoneg is set
to true to avoid running the fc_autoneg function
for the device 15B0, as this device doesn't support
this function.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
7 years agonet/ixgbe/base: complete HW init when SFP not present
Wenzhuo Lu [Wed, 1 Mar 2017 06:04:48 +0000 (14:04 +0800)]
net/ixgbe/base: complete HW init when SFP not present

If SFP module is not present, reset_hw doesn't return success.
SW should complete the initialization, or with specific module
it resulted in no link when the module was later inserted.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
7 years agonet/ixgbe/base: add bit for enabling L3/L4 filtering
Wenzhuo Lu [Wed, 1 Mar 2017 06:04:47 +0000 (14:04 +0800)]
net/ixgbe/base: add bit for enabling L3/L4 filtering

Add a L3/L4 filtering definition of Multiple Receive Queues Command
(MRQC) register for the future use.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
7 years agonet/ixgbe/base: add link block check for KR
Wenzhuo Lu [Wed, 1 Mar 2017 06:04:46 +0000 (14:04 +0800)]
net/ixgbe/base: add link block check for KR

When setting up link on x550 KR devices, should check
if there are constraints on link from manageability, which
may result in link loss.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
7 years agonet/ixgbe/base: remove X550em SFP iXFI setup
Wenzhuo Lu [Wed, 1 Mar 2017 06:04:45 +0000 (14:04 +0800)]
net/ixgbe/base: remove X550em SFP iXFI setup

Removes X550em SFP iXFI setup since there is no released
HW production with SFP iXFI.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
7 years agonet/ixgbe/base: make a debug message simple
Wenzhuo Lu [Wed, 1 Mar 2017 06:04:44 +0000 (14:04 +0800)]
net/ixgbe/base: make a debug message simple

The debug message is too long. Make it shorter.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
7 years agonet/i40e: implement vector PMD for altivec
Gowrishankar Muthukrishnan [Thu, 23 Feb 2017 04:39:08 +0000 (10:09 +0530)]
net/i40e: implement vector PMD for altivec

This patch enables i40e driver in PowerPC along with its altivec
intrinsic support.

Signed-off-by: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
Acked-by: Chao Zhu <chaozhu@linux.vnet.ibm.com>
7 years agonet/i40e: fix a typo in flow
Rami Rosen [Mon, 27 Feb 2017 04:53:59 +0000 (23:53 -0500)]
net/i40e: fix a typo in flow

This patch fixes a trivial typo in i40e_flow.c.

Fixes: 47c6782344b7 ("net/i40e: fix tunnel filter")
Fixes: d416530e6358 ("net/i40e: parse tunnel filter")
Cc: stable@dpdk.org
Signed-off-by: Rami Rosen <rami.rosen@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
7 years agonet/mlx5: fix supported packets types
Nélio Laranjeiro [Fri, 24 Feb 2017 09:16:56 +0000 (10:16 +0100)]
net/mlx5: fix supported packets types

Fixes: 0603df73a077 ("net/mlx5: fix Rx packet validation and type")
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
7 years agonet/e1000/base: fix multicast setting in VF
Yong Wang [Tue, 21 Feb 2017 09:33:23 +0000 (04:33 -0500)]
net/e1000/base: fix multicast setting in VF

In function e1000_update_mc_addr_list_vf(), "msgbuf[0]" is used prior
to initialization at "msgbuf[0] |= E1000_VF_SET_MULTICAST_OVERFLOW".
And "msgbuf[0]" is overwritten at "msgbuf[0] = E1000_VF_SET_MULTICAST".

Fix it by moving the second line prior to the first one that mentioned
above.

Fixes: dffbaf7880a8 ("e1000: revert fix for multicast in VF")
Cc: stable@dpdk.org
Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
7 years agonet/bnx2x: fix transmit queue free threshold
Chas Williams [Fri, 10 Feb 2017 20:12:06 +0000 (15:12 -0500)]
net/bnx2x: fix transmit queue free threshold

The default tx_free_thresh is potentially larger than the allocated queue
which will result in TX queue cleanup never happening.  To fix this,
lower the default free threshold and ensure that the free threshold is
never greater than the maximum outstanding transmit buffers.

Fixes: 827ed2a118cc ("net/bnx2x: restructure Tx routine")
Cc: stable@dpdk.org
Signed-off-by: Chas Williams <ciwillia@brocade.com>
Acked-by: Harish Patil <harish.patil@qlogic.com>
7 years agonet/mlx5: fix startup when flow cannot be applied
Nélio Laranjeiro [Wed, 22 Feb 2017 09:57:52 +0000 (10:57 +0100)]
net/mlx5: fix startup when flow cannot be applied

When flows cannot be re-applied due to configuration modifications, the
start function should rollback the configuration done.

Fixes: 2097d0d1e2cc ("net/mlx5: support basic flow items and actions")
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
7 years agonet/mlx5: fix extended statistics
Shahaf Shuler [Tue, 21 Feb 2017 14:37:24 +0000 (16:37 +0200)]
net/mlx5: fix extended statistics

The number of extended statistics counters is queried through ETHTOOL.
ETHTOOL provides a different number when the link is up or down.
Since extended statistics query occurs at device start,
segmentation fault might happen when changing the link state before and
after the device start.

this commit address this issue, and query the number of statistics
before every call to ETHTOOL.

Fixes: a4193ae3bc4f ("net/mlx5: support extended statistics")
Cc: stable@dpdk.org
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
7 years agonet/mlx5: remove unused interface name query
Shahaf Shuler [Tue, 21 Feb 2017 14:37:23 +0000 (16:37 +0200)]
net/mlx5: remove unused interface name query

Interface name is queried, however never used.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
7 years agodoc: add tap features
Pascal Mazon [Tue, 21 Feb 2017 13:14:53 +0000 (14:14 +0100)]
doc: add tap features

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
7 years agonet/i40e: fix compile error
Qi Zhang [Mon, 20 Feb 2017 18:11:56 +0000 (13:11 -0500)]
net/i40e: fix compile error

Fix the compile error when RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC
is disabled.

Also fake_mbuf is required to be initialized and assigned to
additional sw_ring entries for vector PMD independent from
RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC config option.

Fixes: 4861cde46116 ("i40e: new poll mode driver")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
7 years agonet/mlx5: fix VLAN stripping indication
Shahaf Shuler [Mon, 20 Feb 2017 11:14:32 +0000 (13:14 +0200)]
net/mlx5: fix VLAN stripping indication

The indication on vlan stripping was taken from the wrong location in the
completion entry.

Fixes: 9964b965ad69 ("net/mlx5: re-add Rx scatter support")
Cc: stable@dpdk.org
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
7 years agonet/i40e: fix memory allocation for hash table
Beilei Xing [Fri, 17 Feb 2017 08:37:56 +0000 (16:37 +0800)]
net/i40e: fix memory allocation for hash table

Testpmd failed to start in another hugetlbfs mount point on
i40e, the root cause is that hash table is always allocated
on socket 0.

Issue can be reproduced by forcing testpmd to allocate memory
only from node 1:

testpmd --socket-mem=0,8192 -- -i --socket-num=1

EAL: PCI device 0000:81:00.0 on NUMA socket 1
EAL:   probe driver: 8086:1572 net_i40e
PMD: eth_i40e_dev_init(): FW 4.40 API 1.4 NVM 04.05.03 eetrack 80001cd8
RING: Cannot reserve memory
HASH: memory allocation failed
PMD: i40e_init_ethtype_filter_list(): Failed to create ethertype hash
table!
EAL: Error - exiting with code: 1
  Cause: Requested device 0000:81:00.0 cannot be used

Fix the issue by assigning socket id during hash parameter definition.

Fixes: 5c53c82c8174 ("net/i40e: store flow director filter")
Fixes: 425c3325f0b0 ("net/i40e: store tunnel filter")
Fixes: 078259773da9 ("net/i40e: store ethertype filter")
Cc: stable@dpdk.org
Reported-by: Ivan Nardi <nardi.ivan@gmail.com>
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
7 years agonet/i40e: fix TC bitmap of VEB
Wenzhuo Lu [Thu, 16 Feb 2017 03:29:17 +0000 (11:29 +0800)]
net/i40e: fix TC bitmap of VEB

When setting up the VEB, default TC bitmap is used.

But after setting the default TC bitmap, it's not stored. So when we're
trying to get the enabled TCs on the VEB, it's always wrong.

Fixes: 5135f3ca49a7 ("i40e: enable DCB in VMDQ VSIs")
Cc: stable@dpdk.org
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
7 years agonet/i40e: remove redundant macros
Qiming Yang [Mon, 20 Feb 2017 05:48:13 +0000 (13:48 +0800)]
net/i40e: remove redundant macros

These macros are left by historical reasons and useless now.

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
7 years agonet/i40e: remove redundant VLAN insert code
Qiming Yang [Mon, 20 Feb 2017 05:43:03 +0000 (13:43 +0800)]
net/i40e: remove redundant VLAN insert code

Remove useless tx_flags and related macros in VLAN insertion.

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
7 years agonet/kni: add KNI PMD
Ferruh Yigit [Fri, 17 Feb 2017 13:42:38 +0000 (13:42 +0000)]
net/kni: add KNI PMD

Add KNI PMD which wraps librte_kni for ease of use.

KNI PMD can be used as any regular PMD to send / receive packets to the
Linux networking stack.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Yong Wang <yongwang@vmware.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Yong Wang <yongwang@vmware.com>