dpdk.git
7 years agonet/ixgbe/base: update device IDs
Beilei Xing [Thu, 23 Jun 2016 07:22:24 +0000 (15:22 +0800)]
net/ixgbe/base: update device IDs

There are two device IDs changed from 15C6/15C7 to 15E4/15E5 because of
PHY info changes. 15C6/15C7 IDs are now used for the backplane
SGMII versions.
Also, clean up some discovery kludges from the previous shared ID,
and also add 15C6/15C7 to ixgbe_set_mdio_speed just for paranoia
to control MDIO speed even though nothing should be attached.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
7 years agonet/ixgbe/base: support new PHY types
Beilei Xing [Thu, 23 Jun 2016 07:22:23 +0000 (15:22 +0800)]
net/ixgbe/base: support new PHY types

This patch adds new phy definitions and support functions to enable those
new phy types.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
7 years agonet/ixgbe/base: refactor internal PHY mode determination
Beilei Xing [Thu, 23 Jun 2016 07:22:22 +0000 (15:22 +0800)]
net/ixgbe/base: refactor internal PHY mode determination

NW_MNG_IF_SEL register is a PHY link configuration register.
Add ixgbe_read_mng_if_sel_x550em to read NW_MNG_IF_SEL, validate
register values and save fields such as PHY MDIO address. This
centralises the reading and checking of the register in one place

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
7 years agonet/ixgbe/base: rename header guard
Beilei Xing [Thu, 23 Jun 2016 07:22:21 +0000 (15:22 +0800)]
net/ixgbe/base: rename header guard

The ixgbe_vf.h file did not use _<FILENAME>_ and instead used
__<FILENAME>__ which is not the standard used in every other file.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
7 years agonet/ixgbe/base: fix error path to release lock
Beilei Xing [Thu, 23 Jun 2016 07:22:20 +0000 (15:22 +0800)]
net/ixgbe/base: fix error path to release lock

When there is an error getting the PHY token, the error path
fails to release the locks that it has taken. Release those
locks in that failure case.

Fixes: 86b8fb293fdf ("ixgbe/base: add sw-firmware sync for resource sharing on X550em_a")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
7 years agonet/ixgbe/base: fix macro name
Beilei Xing [Thu, 23 Jun 2016 07:22:19 +0000 (15:22 +0800)]
net/ixgbe/base: fix macro name

This patch renames IXGBE_PVFTTDLEN to IXGBE_PVFTDLEN according to
abbreviation of Transmit Descriptor Length in datasheet.

Fixes: d2e72774e58c ("ixgbe/base: support X550")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
7 years agonet/ixgbe/base: clear stale VMDq pool mappings
Beilei Xing [Thu, 23 Jun 2016 07:22:18 +0000 (15:22 +0800)]
net/ixgbe/base: clear stale VMDq pool mappings

This patch adds clearing the pool mappings when configuring default
MAC addresses for the interface. Without this there will be the risk
of leaking an address into pool 0 which really belongs to VF 0 when
SR-IOV is enabled.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
7 years agonet/ixgbe/base: add link MAC setup for X550a SFP+
Beilei Xing [Thu, 23 Jun 2016 07:22:17 +0000 (15:22 +0800)]
net/ixgbe/base: add link MAC setup for X550a SFP+

This patch updates ixgbe_setup_mac_link_sfp_x550a for X550 SFP+.
ixgbe_set_lan_id_multi_port_pcie has been updated to set the MAC
instance(0/1) which is needed when configuring the external PHY,
since X550a has two instances of MGPK. The MAC instance is read
from the EEPROM.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
7 years agonet/ixgbe/base: allow per-device-type method calls
Beilei Xing [Thu, 23 Jun 2016 07:22:16 +0000 (15:22 +0800)]
net/ixgbe/base: allow per-device-type method calls

Use the method pointers instead of direct function calls for IOSF
access so that the right functions can be called on X550EM_a,
compared to other devices using the driver.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
7 years agonet/ixgbe/base: add KR support for X550em_a devices
Beilei Xing [Thu, 23 Jun 2016 07:22:15 +0000 (15:22 +0800)]
net/ixgbe/base: add KR support for X550em_a devices

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
7 years agonet/ixgbe/base: refactor EEE setup for X550
Beilei Xing [Thu, 23 Jun 2016 07:22:14 +0000 (15:22 +0800)]
net/ixgbe/base: refactor EEE setup for X550

Break ixgbe_setup_eee_X550 down to better handle a change from if
statements to switch statements needed to add X550em_a KR support.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
7 years agonet/ixgbe/base: fix firmware command checksum error
Beilei Xing [Thu, 23 Jun 2016 07:22:13 +0000 (15:22 +0800)]
net/ixgbe/base: fix firmware command checksum error

When software sends commands to firmware using the host
slave command interface, firmware fails to receive the
command due to a checksum failed error, as the checksum is
not being correctly set by the driver software.

This patch sets command checksum to the default value of
0xFF, as per the datasheet, therefore the checksum won't
be checked by firmware.

Fixes: 86b8fb293fdf ("ixgbe/base: add sw-firmware sync for resource sharing on X550em_a")
Fixes: 0790adeb5675 ("ixgbe/base: support X550em_a device")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
7 years agonet/ixgbe/base: add MAC link setup for X550a SFP
Beilei Xing [Thu, 23 Jun 2016 07:22:12 +0000 (15:22 +0800)]
net/ixgbe/base: add MAC link setup for X550a SFP

This patch adds ixgbe_setup_mac_link_sfp_x550a for X550a SFP.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
7 years agonet/ixgbe/base: return error on VF MAC address failure
Beilei Xing [Thu, 23 Jun 2016 07:22:11 +0000 (15:22 +0800)]
net/ixgbe/base: return error on VF MAC address failure

An error code indicating that the PF rejects the MAC address change
should be returned, in case that the PF has already assigned a MAC
for the VF.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
7 years agonet/ixgbe/base: add SGMII link for X550
Beilei Xing [Thu, 23 Jun 2016 07:22:10 +0000 (15:22 +0800)]
net/ixgbe/base: add SGMII link for X550

This patch adds new phy type and media type to support
SGMII link for X550, and add ixgbe_setup_sgmii to support
SGMII link setup.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
7 years agonet/ixgbe/base: add new VF requests to mailbox API
Beilei Xing [Thu, 23 Jun 2016 07:22:09 +0000 (15:22 +0800)]
net/ixgbe/base: add new VF requests to mailbox API

This patch adds two new VF requests of IXGBE_VF_GET_RETA and
IXGBE_VF_GET_RSS_KEY to the mailbox API.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
7 years agonet/mlx5: re-add Rx scatter support
Nélio Laranjeiro [Fri, 24 Jun 2016 13:18:04 +0000 (15:18 +0200)]
net/mlx5: re-add Rx scatter support

This commit brings back Rx scatter and related support by the MTU update
function. The maximum number of segments per packet is not a fixed value
anymore (previously MLX5_PMD_SGE_WR_N, set to 4 by default) as it caused
performance issues when fewer segments were actually needed as well as
limitations on the maximum packet size that could be received with the
default mbuf size (supporting at most 8576 bytes).

These limitations are now lifted as the number of SGEs is derived from the
MTU (which implies MRU) at queue initialization and during MTU update.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Vasily Philipov <vasilyf@mellanox.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
7 years agonet/mlx5: make Rx queue reinitialization safer
Adrien Mazarguil [Fri, 24 Jun 2016 13:18:03 +0000 (15:18 +0200)]
net/mlx5: make Rx queue reinitialization safer

The primary purpose of rxq_rehash() function is to stop and restart
reception on a queue after re-posting buffers. This may fail if the array
that temporarily stores existing buffers for reuse cannot be allocated.

Update rxq_rehash() to work on the target queue directly (not through a
template copy) and avoid this allocation.

rxq_alloc_elts() is modified accordingly to take buffers from an existing
queue directly and update their refcount.

Unlike rxq_rehash(), rxq_setup() must work on a temporary structure but
should not allocate new mbufs from the pool while reinitializing an
existing queue. This is achieved by using the refcount-aware
rxq_alloc_elts() before overwriting queue data.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Vasily Philipov <vasilyf@mellanox.com>
7 years agonet/mlx5: remove redundant Rx queue initialization
Adrien Mazarguil [Fri, 24 Jun 2016 13:18:02 +0000 (15:18 +0200)]
net/mlx5: remove redundant Rx queue initialization

Toggling RX checksum offloads is already done at initialization time. This
code does not belong in rxq_rehash().

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
7 years agonet/mlx5: re-add Tx gather support
Adrien Mazarguil [Fri, 24 Jun 2016 13:18:00 +0000 (15:18 +0200)]
net/mlx5: re-add Tx gather support

Compared to its previous incarnation, the software limit on the number of
mbuf segments is no more (previously MLX5_PMD_SGE_WR_N, set to 4 by
default) hence no need for linearization code and related buffers that
permanently consumed a non negligible amount of memory to handle oversized
mbufs.

The resulting code is both lighter and faster.

With the addition of this code, older GCC versions (such
as 4.8.5) may complain about 'wqe' variable being uninitialized, so
initialize it preemptively, even though it is not necessary to do so.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
7 years agonet/mlx5: check remaining space while processing Tx burst
Adrien Mazarguil [Fri, 24 Jun 2016 13:17:59 +0000 (15:17 +0200)]
net/mlx5: check remaining space while processing Tx burst

The space necessary to store segmented packets cannot be known in advance
and must be verified for each of them.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
7 years agonet/mlx5: add debug information about Tx queues capabilities
Adrien Mazarguil [Fri, 24 Jun 2016 13:17:58 +0000 (15:17 +0200)]
net/mlx5: add debug information about Tx queues capabilities

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
7 years agonet/mlx5: support multi-packet send
Nélio Laranjeiro [Fri, 24 Jun 2016 13:17:57 +0000 (15:17 +0200)]
net/mlx5: support multi-packet send

This feature enables the TX burst function to emit up to 5 packets using
only two work queue entries (WQEs) on devices that support it. Saves PCI
bandwidth and improves performance.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Olga Shern <olgas@mellanox.com>
7 years agonet/mlx5: support inline send
Yaacov Hazan [Fri, 24 Jun 2016 13:17:56 +0000 (15:17 +0200)]
net/mlx5: support inline send

Implement send inline feature which copies packet data directly into
work queue entries (WQEs) for improved latency. The maximum packet
size and the minimum number of Tx queues to qualify for inline send
are user-configurable.

This feature is effective when HW causes a performance bottleneck.

Signed-off-by: Yaacov Hazan <yaacovh@mellanox.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
7 years agonet/mlx5: replace countdown with threshold for Tx completions
Adrien Mazarguil [Fri, 24 Jun 2016 13:17:55 +0000 (15:17 +0200)]
net/mlx5: replace countdown with threshold for Tx completions

Replacing the variable countdown (which depends on the number of
descriptors) with a fixed relative threshold known at compile time improves
performance by reducing the TX queue structure footprint and the amount of
code to manage completions during a burst.

Completions are now requested at most once per burst after threshold is
reached.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Signed-off-by: Vasily Philipov <vasilyf@mellanox.com>
7 years agonet/mlx5: handle Rx CQE compression
Nélio Laranjeiro [Fri, 24 Jun 2016 13:17:54 +0000 (15:17 +0200)]
net/mlx5: handle Rx CQE compression

Mini (compressed) completion queue entries (CQEs) are returned by the
NIC when PCI back pressure is detected, in which case the first CQE64
contains common packet information followed by a number of CQE8
providing the rest, followed by a matching number of empty CQE64
entries to be used by software for decompression.

Before decompression:

      0           1          2           6         7         8
  +-------+  +---------+ +-------+   +-------+ +-------+ +-------+
  | CQE64 |  |  CQE64  | | CQE64 |   | CQE64 | | CQE64 | | CQE64 |
  |-------|  |---------| |-------|   |-------| |-------| |-------|
  | ..... |  | cqe8[0] | |       | . |       | |       | | ..... |
  | ..... |  | cqe8[1] | |       | . |       | |       | | ..... |
  | ..... |  | ....... | |       | . |       | |       | | ..... |
  | ..... |  | cqe8[7] | |       |   |       | |       | | ..... |
  +-------+  +---------+ +-------+   +-------+ +-------+ +-------+

After decompression:

      0          1     ...     8
  +-------+  +-------+     +-------+
  | CQE64 |  | CQE64 |     | CQE64 |
  |-------|  |-------|     |-------|
  | ..... |  | ..... |  .  | ..... |
  | ..... |  | ..... |  .  | ..... |
  | ..... |  | ..... |  .  | ..... |
  | ..... |  | ..... |     | ..... |
  +-------+  +-------+     +-------+

This patch does not perform the entire decompression step as it would be
really expensive, instead the first CQE64 is consumed and an internal
context is maintained to interpret the following CQE8 entries directly.

Intermediate empty CQE64 entries are handed back to HW without further
processing.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Olga Shern <olgas@mellanox.com>
Signed-off-by: Vasily Philipov <vasilyf@mellanox.com>
7 years agonet/mlx5: refactor Tx data path
Nélio Laranjeiro [Fri, 24 Jun 2016 13:17:53 +0000 (15:17 +0200)]
net/mlx5: refactor Tx data path

Bypass Verbs to improve Tx performance.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Signed-off-by: Yaacov Hazan <yaacovh@mellanox.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
7 years agonet/mlx5: refactor Rx data path
Nélio Laranjeiro [Fri, 24 Jun 2016 13:17:52 +0000 (15:17 +0200)]
net/mlx5: refactor Rx data path

Bypass Verbs to improve RX performance.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Signed-off-by: Yaacov Hazan <yaacovh@mellanox.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Vasily Philipov <vasilyf@mellanox.com>
7 years agonet/mlx5: add Tx/Rx burst function selection wrapper
Nélio Laranjeiro [Fri, 24 Jun 2016 13:17:51 +0000 (15:17 +0200)]
net/mlx5: add Tx/Rx burst function selection wrapper

These wrappers are meant to prevent code duplication later.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
7 years agonet/mlx5: add support for configuration through kvargs
Nélio Laranjeiro [Fri, 24 Jun 2016 13:17:50 +0000 (15:17 +0200)]
net/mlx5: add support for configuration through kvargs

The intent is to replace the remaining compile-time options and environment
variables with a common mean of runtime configuration. This commit only
adds the kvargs handling code, subsequent commits will update the rest.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
7 years agonet/mlx5: add definitions for data path without Verbs
Nélio Laranjeiro [Fri, 24 Jun 2016 13:17:49 +0000 (15:17 +0200)]
net/mlx5: add definitions for data path without Verbs

These structures and macros extend those exposed by libmlx5 (in mlx5_hw.h)
to let the PMD manage work queue and completion queue elements directly.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
7 years agonet/mlx5: update prerequisites for upcoming enhancements
Nélio Laranjeiro [Fri, 24 Jun 2016 13:17:48 +0000 (15:17 +0200)]
net/mlx5: update prerequisites for upcoming enhancements

The latest version of Mellanox OFED exposes hardware definitions necessary
to implement data path operation bypassing Verbs. Update the minimum
version requirement to MLNX_OFED >= 3.3 and clean up compatibility checks
for previous releases.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
7 years agonet/mlx5: split Rx queue structure
Nélio Laranjeiro [Fri, 24 Jun 2016 13:17:47 +0000 (15:17 +0200)]
net/mlx5: split Rx queue structure

To keep the data path as efficient as possible, move fields only useful to
the control path into new structure rxq_ctrl.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
7 years agonet/mlx5: split Tx queue structure
Nélio Laranjeiro [Fri, 24 Jun 2016 13:17:46 +0000 (15:17 +0200)]
net/mlx5: split Tx queue structure

To keep the data path as efficient as possible, move fields only useful to
the control path into new structure txq_ctrl.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
7 years agonet/mlx5: remove inline Tx support
Nélio Laranjeiro [Fri, 24 Jun 2016 13:17:45 +0000 (15:17 +0200)]
net/mlx5: remove inline Tx support

Inline TX will be fully managed by the PMD after Verbs is bypassed in the
data path. Remove the current code until then.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
7 years agonet/mlx5: remove configuration variable
Nélio Laranjeiro [Fri, 24 Jun 2016 13:17:44 +0000 (15:17 +0200)]
net/mlx5: remove configuration variable

There is no scatter/gather support anymore, CONFIG_RTE_LIBRTE_MLX5_SGE_WR_N
has no purpose and can be removed.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
7 years agonet/mlx5: remove Rx scatter support
Nélio Laranjeiro [Fri, 24 Jun 2016 13:17:43 +0000 (15:17 +0200)]
net/mlx5: remove Rx scatter support

This is done in preparation of bypassing Verbs entirely for the data path
as a performance improvement. RX scatter cannot be maintained during the
transition and will be reimplemented later.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
7 years agonet/mlx5: remove Tx gather support
Nélio Laranjeiro [Fri, 24 Jun 2016 13:17:42 +0000 (15:17 +0200)]
net/mlx5: remove Tx gather support

This is done in preparation of bypassing Verbs entirely for the data path
as a performance improvement. TX gather cannot be maintained during the
transition and will be reimplemented later.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
7 years agonet/mlx5: split memory registration function
Nélio Laranjeiro [Fri, 24 Jun 2016 13:17:41 +0000 (15:17 +0200)]
net/mlx5: split memory registration function

Except for the first time when memory registration occurs, the lkey is
always cached. Since memory registration is slow and performs system calls,
performance can be improved by moving that code to its own function outside
of the data path so only the lookup code is left in the original inlined
function.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
7 years agonet: fix PCI class id
Nélio Laranjeiro [Fri, 24 Jun 2016 13:17:40 +0000 (15:17 +0200)]
net: fix PCI class id

Use RTE_PCI_DEVICE macro to set all fields rather than explicitly setting
them individually in the code. This shortens the code while helping to
future-proof against future changes to the rte_pci_id structure.

Fixes: 701c8d80c820 ("pci: support class id probing")

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
7 years agonet/vmxnet3: fix dump format
Ferruh Yigit [Thu, 23 Jun 2016 10:52:54 +0000 (11:52 +0100)]
net/vmxnet3: fix dump format

Remove 0x prefix for %p format to prevent double 0x in logs

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Yong Wang <yongwang@vmware.com>
7 years agodoc: update UIO module in nfp guide
Alejandro Lucero [Tue, 26 Apr 2016 11:36:41 +0000 (12:36 +0100)]
doc: update UIO module in nfp guide

Removing dependency on nfp_uio kernel module. The igb_uio
kernel modules can be used instead.

Fixes: 80bc1752f16e ("nfp: add guide")

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
7 years agonet/ixgbe: fix single VLAN tag to be outer VLAN tag
Beilei Xing [Thu, 23 Jun 2016 15:11:58 +0000 (23:11 +0800)]
net/ixgbe: fix single VLAN tag to be outer VLAN tag

Previously, a single VLAN header is treated as inner VLAN,
but generally, a single VLAN header is treated as the outer
VLAN header.
The patch fixes the ether type of a single VLAN type, and
enables configuring inner and outer TPID for double VLAN.

Fixes: 19b16e2f6442 ("ethdev: add vlan type when setting ether type")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
7 years agonet/i40e: fix single VLAN tag to be outer VLAN tag
Beilei Xing [Wed, 22 Jun 2016 02:53:51 +0000 (10:53 +0800)]
net/i40e: fix single VLAN tag to be outer VLAN tag

In current i40e codebase, if single VLAN header is added in a packet,
it's treated as inner VLAN. Generally, a single VLAN header is
treated as the outer VLAN header, so update the driver behaviour
appropriately.

Fixes: 19b16e2f6442 ("ethdev: add vlan type when setting ether type")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
7 years agonet/bnxt: support Cumulus+ Ethernet adapter
Ajit Khaparde [Tue, 21 Jun 2016 21:58:20 +0000 (16:58 -0500)]
net/bnxt: support Cumulus+ Ethernet adapter

This patch adds support for Cumulus+ Ethernet adapters.
These Cumulus+ Ethernet adapters support 10Gb/25Gb/40Gb/50Gb speeds.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
7 years agonet/enic: fix negative array index write
John Daley [Mon, 20 Jun 2016 19:27:46 +0000 (12:27 -0700)]
net/enic: fix negative array index write

Negative array index write using variable pos as an index to array
enic->fdir.nodes. Fixed by add array index check.

Coverity issue: 13270

Fixes: fefed3d1e62c ("enic: new driver")

Signed-off-by: John Daley <johndale@cisco.com>
7 years agonet/ixgbe: use mbuf prefetch function
Jerin Jacob [Fri, 17 Jun 2016 14:06:44 +0000 (19:36 +0530)]
net/ixgbe: use mbuf prefetch function

made second cache line access behavior same as IA

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Reviewed-by: Jianbo Liu <jianbo.liu@linaro.org>
7 years agonet/bnx2x: fix incorrect buffer length on Rx
Charles (Chas) Williams [Thu, 16 Jun 2016 22:50:06 +0000 (18:50 -0400)]
net/bnx2x: fix incorrect buffer length on Rx

The Rx function should not be setting the mbuf buffer length, so remove
the assignment.

Fixes: 540a211084a7 ("bnx2x: driver core")

Signed-off-by: Charles (Chas) Williams <ciwillia@brocade.com>
Acked-by: Harish Patil <harish.patil@qlogic.com>
7 years agonet/enic: support scattered Rx
Nelson Escobar [Thu, 16 Jun 2016 19:19:05 +0000 (12:19 -0700)]
net/enic: support scattered Rx

For performance reasons, this patch uses 2 VIC RQs per RQ presented to
DPDK.

The VIC requires that each descriptor be marked as either a start of
packet (SOP) descriptor or a non-SOP descriptor.  A one RQ solution
requires skipping descriptors when receiving small packets and results
in bad performance when receiving many small packets.

The 2 RQ solution makes use of the VIC feature that allows a receive
on primary queue to 'spill over' into another queue if the receive is
too large to fit in the buffer assigned to the descriptor on the
primary queue.  This means that there is no skipping of descriptors
when receiving small packets and results in much better performance.

Signed-off-by: Nelson Escobar <neescoba@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
7 years agonet/e1000: configure outer VLAN TPID field
Beilei Xing [Thu, 16 Jun 2016 13:36:28 +0000 (21:36 +0800)]
net/e1000: configure outer VLAN TPID field

This patch enables configuring the outer TPID for double VLAN.
Note that all other TPID values, for single VLANs or inner VLAN in the
QinQ case, are read only.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
7 years agonet/qede: update version to 8.7.9.0_1.1.0.1
Harish Patil [Thu, 16 Jun 2016 05:47:11 +0000 (22:47 -0700)]
net/qede: update version to 8.7.9.0_1.1.0.1

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
7 years agonet/qede: enable VF-VF traffic with unmatched dest address
Sony Chacko [Thu, 16 Jun 2016 05:47:10 +0000 (22:47 -0700)]
net/qede: enable VF-VF traffic with unmatched dest address

This patch enables VF to VF traffic with unmatched destination addresses.
The steps to enable this are:
- Enable promiscuous mode filter settings.
- Check for VF mode and enable promiscuous mode settings for VF.
- Check filter configuration to ensure conflicting filter modes
are not set.

Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
7 years agonet/qede: support 100G
Harish Patil [Thu, 16 Jun 2016 05:47:09 +0000 (22:47 -0700)]
net/qede: support 100G

 - Add device id to the PCI table
 - Add polling for the slowpath events for CMT mode device
 - Add prerequisites to allow 100g mode
        * Min number of queues needed is 2
        * Only even number of queues are allowed
 - Update documentation

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
7 years agonet/qede: set MTU
Sony Chacko [Thu, 16 Jun 2016 05:47:07 +0000 (22:47 -0700)]
net/qede: set MTU

Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
[NIC overview doc update]
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agonet/qede: query RSS redirection table
Sony Chacko [Thu, 16 Jun 2016 05:47:06 +0000 (22:47 -0700)]
net/qede: query RSS redirection table

Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
7 years agonet/qede: update RSS redirection table
Sony Chacko [Thu, 16 Jun 2016 05:47:05 +0000 (22:47 -0700)]
net/qede: update RSS redirection table

Add support for configuring the RSS redirection table and update
corresponding documentation.

Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
7 years agonet/qede: get RSS hash configuration
Sony Chacko [Thu, 16 Jun 2016 05:47:04 +0000 (22:47 -0700)]
net/qede: get RSS hash configuration

Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
7 years agonet/qede: support RSS hash configuration
Sony Chacko [Thu, 16 Jun 2016 05:47:03 +0000 (22:47 -0700)]
net/qede: support RSS hash configuration

Add support for setting hash configuration based on adapter capability
and update corresponding NIC documentation.

Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
7 years agonet/ixgbe: fix missed packet types on Rx
Konstantin Ananyev [Wed, 15 Jun 2016 12:58:37 +0000 (13:58 +0100)]
net/ixgbe: fix missed packet types on Rx

ixgbe PMD RX function(s) misses some packet types that are:
 - correctly recognised by the underlying HW.
 - marked as supported by ixgbe_dev_supported_ptypes_get().

Fixes: 9586ebd358d5 ("ixgbe: replace some offload flags with packet type")

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Tested-by: Olivier Matz <olivier.matz@6wind.com>
7 years agodoc: remove Match Interface in fm10k guide
Chen Jing D(Mark) [Wed, 8 Jun 2016 08:43:50 +0000 (16:43 +0800)]
doc: remove Match Interface in fm10k guide

Intel stopped supporting Match Interface, remove reference to it in the
documentation.

Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
7 years agonet/enic: fix releasing mbufs when tearing down Rx queue
Nelson Escobar [Tue, 14 Jun 2016 23:55:34 +0000 (16:55 -0700)]
net/enic: fix releasing mbufs when tearing down Rx queue

When trying to release the mbufs, the function was incorrectly
iterating over the max size configured instead of the actual size
of the ring.

Fixes: 947d860c821f ("enic: improve Rx performance")

Signed-off-by: Nelson Escobar <neescoba@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
7 years agonet/enic: improve packet type identification
Nelson Escobar [Tue, 14 Jun 2016 23:54:05 +0000 (16:54 -0700)]
net/enic: improve packet type identification

- add l4 ptypes to the ones we report as supporting
- report/use RTE_PTYPE_L3_IPV4_EXT_UNKNOWN and
  RTE_PTYPE_L3_IPV6_EXT_UNKNOWN instead of RTE_PTYPE_L3_IPV4 and
  RTE_PTYPE_L3_IPV6 as vic can't distinguish between packets with
  extentions and those without extentions.
- correctly set the ptype bits set on packets that are both tcp/udp
  and a frag
- set RTE_PTYPE_L4_NONFRAG on ip packets we know are not udp, tcp,
  or fragments.

Fixes: 947d860c821f ("enic: improve Rx performance")

Signed-off-by: Nelson Escobar <neescoba@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
7 years agonet/i40e: fix offload flags for vector Rx
Zhe Tao [Tue, 14 Jun 2016 05:24:16 +0000 (13:24 +0800)]
net/i40e: fix offload flags for vector Rx

The flags for RSS and flow director are not set correctly in the vector
Rx function, so applications which use these flags will not work
correctly.

The problem is caused by incorrect constants for masking,
shuffling and shifting the descriptor bytes, to create the resultant
flags in the mbuf. Correcting the constants fixes the problem

Fixes: 9ed94e5bb04e ("i40e: add vector Rx")

Signed-off-by: Zhe Tao <zhe.tao@intel.com>
Reviewed-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/xenvirt: support dynamic page size
Ricardo Salveti [Mon, 18 Apr 2016 03:06:06 +0000 (00:06 -0300)]
net/xenvirt: support dynamic page size

PAGE_SIZE constant is not defined on ARM since multiple values
are possible, so DPDK needs to dynamically get the page size.

Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
7 years agonet/bnx2x: fix MSIX vector and VF resource counts
Charles (Chas) Williams [Fri, 10 Jun 2016 22:18:52 +0000 (18:18 -0400)]
net/bnx2x: fix MSIX vector and VF resource counts

If MSIX is available, the vector count given by the table size is one
less than the actual count.  This count also limits the receive and
transmit queue resources the VF can support.

Fixes: 540a211084a7 ("bnx2x: driver core")

Signed-off-by: Charles (Chas) Williams <ciwillia@brocade.com>
Acked-by: Harish Patil <harish.patil@qlogic.com>
7 years agoapp/test: add external state machine in mode 4
Eric Kinzie [Fri, 27 May 2016 19:44:06 +0000 (12:44 -0700)]
app/test: add external state machine in mode 4

This adds test cases for exercising the external state machine API to
the mode 4 autotest.

Signed-off-by: Eric Kinzie <ehkinzie@gmail.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
7 years agonet/bonding: allow external state machine in mode 4
Eric Kinzie [Fri, 27 May 2016 19:44:05 +0000 (12:44 -0700)]
net/bonding: allow external state machine in mode 4

Provide functions to allow an external 802.3ad state machine to transmit
and receive LACPDUs and to set the collection/distribution flags on
slave interfaces.

Signed-off-by: Eric Kinzie <ehkinzie@gmail.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
7 years agonet/bonding: inherit maximum Rx packet length
Eric Kinzie [Sat, 7 May 2016 03:45:24 +0000 (20:45 -0700)]
net/bonding: inherit maximum Rx packet length

Instead of a hard-coded maximum receive length, allow the bonded interface
to inherit this limit from the slave interfaces.  This allows
an application that uses jumbo frames to pass realistic values to
rte_eth_dev_configure without causing an error.

Before the bonding interface is configured, allow slaves with any
max_rx_pktlen to be added and remember the lowest of these values as
a candidate value.  During dev_configure, set the bond device's
max_rx_pktlen to the candidate value.  After this point only slaves
with a max_rx_pktlen greater or equal to that of the bonding device
can be added.

If all slaves are removed, the bond device's pktlen is cleared.

Signed-off-by: Eric Kinzie <ehkinzie@gmail.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
7 years agodoc: add ThunderX nicvf
Jerin Jacob [Fri, 17 Jun 2016 13:29:53 +0000 (18:59 +0530)]
doc: add ThunderX nicvf

Updated doc/guides/nics/overview.rst, doc/guides/nics/thunderx.rst
and release notes

Changed "*" to "P" in overview.rst to capture the partially supported
feature as "*" creating alignment issues with Sphinx table

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
7 years agonet/thunderx: add device start/stop and close
Jerin Jacob [Fri, 17 Jun 2016 13:29:52 +0000 (18:59 +0530)]
net/thunderx: add device start/stop and close

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
7 years agonet/thunderx: support Tx queue start and stop
Jerin Jacob [Fri, 17 Jun 2016 13:29:51 +0000 (18:59 +0530)]
net/thunderx: support Tx queue start and stop

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
7 years agonet/thunderx: support Rx queue start and stop
Jerin Jacob [Fri, 17 Jun 2016 13:29:50 +0000 (18:59 +0530)]
net/thunderx: support Rx queue start and stop

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
7 years agonet/thunderx: get Rx queue count
Jerin Jacob [Fri, 17 Jun 2016 13:29:49 +0000 (18:59 +0530)]
net/thunderx: get Rx queue count

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
7 years agonet/thunderx: query supported packet types
Jerin Jacob [Fri, 17 Jun 2016 13:29:48 +0000 (18:59 +0530)]
net/thunderx: query supported packet types

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
7 years agonet/thunderx: add single and multi-segment Rx
Jerin Jacob [Fri, 17 Jun 2016 13:29:47 +0000 (18:59 +0530)]
net/thunderx: add single and multi-segment Rx

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/thunderx: add single and multi-segment Tx
Jerin Jacob [Fri, 17 Jun 2016 13:29:46 +0000 (18:59 +0530)]
net/thunderx: add single and multi-segment Tx

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
7 years agonet/thunderx: add statistics
Jerin Jacob [Fri, 17 Jun 2016 13:29:45 +0000 (18:59 +0530)]
net/thunderx: add statistics

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/thunderx: support promiscuous mode
Jerin Jacob [Fri, 17 Jun 2016 13:29:44 +0000 (18:59 +0530)]
net/thunderx: support promiscuous mode

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
7 years agonet/thunderx: support MTU configuration
Jerin Jacob [Fri, 17 Jun 2016 13:29:43 +0000 (18:59 +0530)]
net/thunderx: support MTU configuration

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/thunderx: support RSS and RETA query and update
Jerin Jacob [Fri, 17 Jun 2016 13:29:42 +0000 (18:59 +0530)]
net/thunderx: support RSS and RETA query and update

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/thunderx: add Tx queue setup and release
Jerin Jacob [Fri, 17 Jun 2016 13:29:41 +0000 (18:59 +0530)]
net/thunderx: add Tx queue setup and release

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
7 years agonet/thunderx: add Rx queue setup and release
Jerin Jacob [Fri, 17 Jun 2016 13:29:40 +0000 (18:59 +0530)]
net/thunderx: add Rx queue setup and release

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/thunderx: get device infos
Jerin Jacob [Fri, 17 Jun 2016 13:29:39 +0000 (18:59 +0530)]
net/thunderx: get device infos

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/thunderx: support ethdev configure
Jerin Jacob [Fri, 17 Jun 2016 13:29:38 +0000 (18:59 +0530)]
net/thunderx: support ethdev configure

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/thunderx: support register dump
Jerin Jacob [Fri, 17 Jun 2016 13:29:37 +0000 (18:59 +0530)]
net/thunderx: support register dump

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
7 years agonet/thunderx: add link status and update
Jerin Jacob [Fri, 17 Jun 2016 13:29:36 +0000 (18:59 +0530)]
net/thunderx: add link status and update

Extended the nicvf_interrupt function to respond
NIC_MBOX_MSG_BGX_LINK_CHANGE mbox message from PF and update
struct rte_eth_link accordingly.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/thunderx: add PMD skeleton
Jerin Jacob [Fri, 17 Jun 2016 13:29:35 +0000 (18:59 +0530)]
net/thunderx: add PMD skeleton

Introduce driver initialization and enable build infrastructure for
nicvf pmd driver.

By default, It is enabled only for defconfig_arm64-thunderx-*
config as it is an inbuilt NIC device.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
7 years agonet/thunderx/base: add statistics
Jerin Jacob [Fri, 17 Jun 2016 13:29:34 +0000 (18:59 +0530)]
net/thunderx/base: add statistics

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
7 years agonet/thunderx/base: add RSS and RETA configuration
Jerin Jacob [Fri, 17 Jun 2016 13:29:33 +0000 (18:59 +0530)]
net/thunderx/base: add RSS and RETA configuration

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
7 years agonet/thunderx/base: add hardware API
Jerin Jacob [Fri, 17 Jun 2016 13:29:32 +0000 (18:59 +0530)]
net/thunderx/base: add hardware API

add nicvf hardware specific APIs for initialization and configuration.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
7 years agonet/thunderx/base: add mailbox for PF/VF communication
Jerin Jacob [Fri, 17 Jun 2016 13:29:31 +0000 (18:59 +0530)]
net/thunderx/base: add mailbox for PF/VF communication

DPDK nicvf driver doesn't have access to NIC's PF address space.
Introduce a mailbox mechanism to communicate with PF driver through
shared 128bit register interface.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
7 years agonet/thunderx/base: implement platform abstraction
Jerin Jacob [Fri, 17 Jun 2016 13:29:30 +0000 (18:59 +0530)]
net/thunderx/base: implement platform abstraction

implement DPDK based platform abstraction for base code

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
7 years agonet/thunderx/base: add HW register definitions
Jerin Jacob [Fri, 17 Jun 2016 13:29:29 +0000 (18:59 +0530)]
net/thunderx/base: add HW register definitions

add HW register definitions of ThunderX inbuilt NIC

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
7 years agonet/thunderx/base: add HW constants
Jerin Jacob [Fri, 17 Jun 2016 13:29:28 +0000 (18:59 +0530)]
net/thunderx/base: add HW constants

add HW constants of ThunderX inbuilt NIC

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
Signed-off-by: Kamil Rytarowski <kamil.rytarowski@caviumnetworks.com>
Signed-off-by: Zyta Szpak <zyta.szpak@semihalf.com>
Signed-off-by: Slawomir Rosek <slawomir.rosek@semihalf.com>
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
7 years agonet/fm10k: fix promiscuous receive for VF
Xiao Wang [Mon, 6 Jun 2016 09:00:47 +0000 (17:00 +0800)]
net/fm10k: fix promiscuous receive for VF

When app tries to change promisc/allmulti setting, fm10k will check if a
valid glort is acquired, and exit without doing anything if not.

For VFs, this glort value is not necessary, and so the check can be
removed. This saves having unnecessary failures of the API call, as well as
saving the time taken for the mailbox communication between VF and PF in
the case when the glort check passes.

Fixes: df02ba864695 ("fm10k: support promiscuous mode")

Signed-off-by: Wang Xiao W <xiao.w.wang@intel.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>
7 years agonet/xenvirt: fix build after mempool changes
Olivier Matz [Mon, 13 Jun 2016 11:24:29 +0000 (13:24 +0200)]
net/xenvirt: fix build after mempool changes

The field elt_va_start has been removed from the mempool structure,
and it was not replaced in xenvirt.

Fix this by getting the mempool objects address by using the address of
the first memory chunk list.

Note that it won't work with mempool composed of several chunks,
but it was already the case before.

Fixes: 84121f197187 ("mempool: store memory chunks in a list")

Reported-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
7 years agonet/bnxt: add flow control operations
Ajit Khaparde [Wed, 15 Jun 2016 21:23:38 +0000 (14:23 -0700)]
net/bnxt: add flow control operations

Add flow_ctrl_get and flow_ctrl_set dev_ops.
Uses the bnxt_set_hwrm_link_config() HWRM API added in earlier patch.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
7 years agonet/bnxt: add RSS hash configuration
Ajit Khaparde [Wed, 15 Jun 2016 21:23:37 +0000 (14:23 -0700)]
net/bnxt: add RSS hash configuration

Add rss_hash_update and rss_hash_conf_get dev_ops
Uses the bnxt_hwrm_vnic_rss_cfg() HWRM API added in the previous patch.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
7 years agonet/bnxt: add RSS redirection table operations
Ajit Khaparde [Wed, 15 Jun 2016 21:23:36 +0000 (14:23 -0700)]
net/bnxt: add RSS redirection table operations

Add code to Update/query reta dev_ops
Uses the bnxt_hwrm_vnic_rss_cfg() HWRM API added earlier.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
7 years agonet/bnxt: add link state operations
Ajit Khaparde [Wed, 15 Jun 2016 21:23:35 +0000 (14:23 -0700)]
net/bnxt: add link state operations

Adds dev_ops to set link Up or Down as appropriate.
Uses the bnxt_set_hwrm_link_config() API added previously.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>