Commit Graph

6491 Commits

Author SHA1 Message Date
Andrew Rybchenko
7243cc0869 net/sfc/base: import software per-queue statistics
EFSYS_OPT_QSTATS should be enabled to use it.

From Solarflare Communications Inc.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-01-17 19:39:26 +01:00
Andrew Rybchenko
1dae25112a net/sfc/base: import built-in selftest
EFSYS_OPT_BIST should be enabled to use it.

From Solarflare Communications Inc.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-01-17 19:39:26 +01:00
Andrew Rybchenko
7571c31687 net/sfc/base: import diagnostics support
EFSYS_OPT_DIAG should be enabled to use it.

From Solarflare Communications Inc.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-01-17 19:39:26 +01:00
Andrew Rybchenko
94190e3543 net/sfc/base: import SFN8xxx family support
SFN8xxx is the second family based on EF10 architecture.

It has few differences from SFN7xxx adapters family.

EFSYS_OPT_MEDFORD should be enabled to use it.

From Solarflare Communications Inc.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-01-17 19:39:25 +01:00
Andrew Rybchenko
e7cd430c86 net/sfc/base: import SFN7xxx family support
SFN7xxx is the first family based on EF10 architecture.

EFSYS_OPT_HUNTINGTON should be enabled to use it.

From Solarflare Communications Inc.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-01-17 19:39:25 +01:00
Andrew Rybchenko
f7dc06bf35 net/sfc/base: import 5xxx/6xxx family support
EFSYS_OPT_SIENA should be enabled to use it.

From Solarflare Communications Inc.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-01-17 19:39:25 +01:00
Andrew Rybchenko
099c33bef3 net/sfc/base: import MCDI proxy authorization
MCDI proxy authorization may be used if privileged PCI
function (physical function) would like to intercept and
authorize MCDI requests done by unprivileged (e.g. virtual)
PCI function. It may be used to control unprivileged
function Rx mode (e.g. promiscuous, all-multicast), MTU
and default MAC address change requests etc.

Current libefx support is limited to client-side which
is required to work when function requests need to be
authorized.

Server side support required to request and do the
authorization is not implemented yet.

EFSYS_OPT_MCDI_PROXY_AUTH should be enabled to use it.

From Solarflare Communications Inc.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-01-17 19:39:25 +01:00
Andrew Rybchenko
5858cccf68 net/sfc/base: import MCDI logging
Driver can provide a function to be called to log MCDI
requests and responses to help with debugging.

Solarflare netlogdecode cross-platform tool may be used
to decode these logs.

EFSYS_OPT_MCDI_LOGGING should be enabled to use it.

From Solarflare Communications Inc.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-01-17 19:39:25 +01:00
Andrew Rybchenko
6f619653b9 net/sfc/base: import MCDI implementation
Implement interface to talk to NIC management CPU. Provide
helpers to fill in MCDI requests, execute it and process
received response.

MCDI request is prepared in either PCI BAR mapped memory
(SFN5xxx/SFN6xxx) or DMA-mapped memory (SFN7xxx/SFN8xxx) and,
doorbell is pressed (memory-mapped register) to execute it.

Events about MCDI completion are delivered to house-keeping
event queue, but usage of these events is optional and MCDI
buffer may be simply polled waiting for completion
indication set.

From Solarflare Communications Inc.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-01-17 19:39:25 +01:00
Andrew Rybchenko
11358bf6f6 net/sfc/base: import MCDI definition
The header defines data interface between host CPU and NIC
management CPU.

The header is automatically generated from firmware sources.

MCDI is used on NIC control path (configuration,
event/transmit/receive queues setup and teardown etc), but
not used on data path.

From Solarflare Communications Inc.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-01-17 19:39:25 +01:00
Andrew Rybchenko
f9565517ff net/sfc/base: import filters support
Filtering capabilities depend on NIC family and used firmware
variant. Provided API allows to get supported filter types
(in a priority order), add/delete individual filters and
restore entire filter table after, for example, NIC management
CPU reboot.

Rx filters allow to redirect matching flow to specified Rx queue.

Tx filters allow to control generated traffic (e.g. to implement
virtual function anti-spoofing control).

EFSYS_OPT_FILTER should be enabled to use it. It is required
for SFN7xxx and SFN8xxx adapter families support.

From Solarflare Communications Inc.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-01-17 19:39:25 +01:00
Andrew Rybchenko
62ef0c6950 net/sfc/base: import register definitions
From Solarflare Communications Inc.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-01-17 19:39:25 +01:00
Andrew Rybchenko
19b64c6ac3 net/sfc/base: import libefx base
libefx is a platform-independent library to implement drivers
for Solarflare network adapters. It provides unified adapter
family independent interface (if possible).

Driver must provide efsys.h header which defines options
(EFSYS_OPT_*) to be used and macros/functions to allocate
memory, read/write DMA-mapped memory, read/write PCI BAR
space, locks, barriers etc.

efx.h and efx_types.h provide external interfaces intended
to be used by drivers. Other header files are internal.

From Solarflare Communications Inc.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-01-17 19:39:25 +01:00
Andrew Rybchenko
63d588ff26 net/sfc: libefx-based driver stub
Enable the PMD by default on supported configurations.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-01-17 19:39:25 +01:00
Jingjing Wu
dd2681bb1f net/i40evf: fix casting between structs
Casting from structs which lay out data in typed members
to structs which have flat memory buffers, will cause
problems if the alignment of the former isn't as expected.
This patch removes the casting between structs.

Fixes: ae19955e7c ("i40evf: support reporting PF reset")

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
2017-01-17 19:38:40 +01:00
Wenzhuo Lu
31d4210971 net/e1000/base: announce supported devices
Document all supported NICs.
Add Intel I219 NICs support in release note.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-01-17 19:38:40 +01:00
Qi Zhang
5e21d9ee9b net/i40e: enable auto link update for 25G
For 25G devices auto link update was disabled because it was causing
link issues when enabled.

The problem found because of interface changes in admin queue command
"set_phy_config" and "get_phy_capabilities" for 25G.

This patch fixes the issue and enables auto link update for 25G devices.

Fixes: 75d133dd32 ("net/i40e: enable 25G device")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
2017-01-17 19:36:48 +01:00
Jingjing Wu
f6d227550f net/i40e: fix logging for Tx free threshold check
Fixes: 4861cde461 ("i40e: new poll mode driver")

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
2017-01-17 19:36:48 +01:00
Wenzhuo Lu
7251f8fe4b net/e1000: enable new I219 devices
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-01-17 19:36:48 +01:00
Wenzhuo Lu
5b9c39d0f9 net/e1000/base: update shared code version
Updated to 2016.11.22

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-01-17 19:36:48 +01:00
Wenzhuo Lu
4add08ffd0 net/e1000/base: support more I219 devices
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-01-17 19:36:48 +01:00
Wenzhuo Lu
daa998d977 net/e1000/base: disable force K1-off feature
MAC-PHY desync may occur causing misdetection of link up event.
Disabling K1-off feature can work around the problem.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-01-17 19:36:48 +01:00
Wenzhuo Lu
75a202f022 net/e1000/base: add workaround for possible stalled packet
This works around a possible stalled packet issue, which may occur due to
clock recovery from the PCH being too slow, when the LAN is transitioning
from K1 at 1G link speed.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-01-17 19:36:48 +01:00
Wenzhuo Lu
a3358d942f net/e1000/base: enable new I219 devices
Enable the support of new I219 devices.
Also define some registers for future usage.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-01-17 19:36:48 +01:00
Wenzhuo Lu
db33e69c2a net/e1000/base: add workaround for ULP entry flow
For I217 revision 6, when entering Ultra Low Power (ULP) we need to enable
Low Power Link Up (LPLU) and disable Gig speed to make it work.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-01-17 19:36:48 +01:00
Wenzhuo Lu
35f0408eff net/e1000/base: increase LANPHYPC low duration
LANPHYPC low duration of 10 usec was too low for some corner cases
causing interface mismatches during Ultra Low Power (ULP) exit.

This patch increases the LANPHYPC low duration to 1 msec.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-01-17 19:36:48 +01:00
Wenzhuo Lu
5d55afe895 net/e1000/base: clear ULP configuration register on ULP exit
There are some client PHY Ultra Low Power (ULP) register bits that are
configured by the Manageability Engine (ME) FW.

The driver must ensure that these bits are cleared on exit from ULP.
Ordinarily the ME FW would do that, but there are cases in which the
FW is not present, and the driver must handle that.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-01-17 19:36:48 +01:00
Wenzhuo Lu
5cda50e867 net/e1000/base: restore link speed after ULP exit
When Ultra Low Power (ULP) enabled, the client PHY needs to be set up
for link configuration after cable reconnected.

Previously link configuration was only done in auto-negotiate mode.

Do link configuration also in autoneg disabled mode.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-01-17 19:36:48 +01:00
Wenzhuo Lu
e181c96241 net/e1000/base: define max Rx jumbo frame size
Add definition MAX_RX_JUMBO_FRAME_SIZE for igb.

All igb parts (82575 and newer) have 9.5K max jumbo frame size.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-01-17 19:36:48 +01:00
Wenzhuo Lu
ecab0e4d5b net/e1000/base: expose I350 internal function
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-01-17 19:36:48 +01:00
Wenzhuo Lu
2359472d45 net/e1000/base: get FW version for I354
I354 support was missing in the e1000_get_fw_version() which resulted in
the FW version not being reported. Support added.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-01-17 19:36:48 +01:00
Wenzhuo Lu
bc043fb7c9 net/e1000/base: retry to get HW mailbox lock
The driver shouldn't give up if it fails to get the hardware mailbox lock.

This can happen in a situation where the PF-VF communication channel is
heavily loaded and causes complete communications failure between the PF
and VF drivers.

Add a counter and a delay. The driver will now retry ten times,
waiting one millisecond between retries.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-01-17 19:36:48 +01:00
Wenzhuo Lu
8cce758d69 net/e1000/base: avoid packet loss for non-1G
To avoid packet loss, Phase Lock Loop (PLL) clock gate time needs to be
increased for non 1G speeds.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-01-17 19:36:48 +01:00
Wenzhuo Lu
02fc2241b1 net/e1000/base: increase ULP timer
With new hardware (I219), Ultra Low Power (ULP) exit takes significantly
longer time. Therefore, driver must wait longer.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-01-17 19:36:48 +01:00
David Marchand
73db5badb0 net: align ethdev and eal driver names
Some virtual pmds report a different name than the vdev driver name
registered in eal.
While it does not hurt, let's try to be consistent.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-01-17 19:36:47 +01:00
David Marchand
d857736110 net: remove dead driver names
Since commit b1fb53a39d ("ethdev: remove some PCI specific handling"),
rte_eth_dev_info_get() relies on dev->data->drv_name to report the driver
name to caller.

Having the pmds set driver_info->driver_name in the pmds is useless,
since ethdev overwrites it right after.
The only thing the pmd must do is:
- for pci drivers, call rte_eth_copy_pci_info() which then sets
  data->drv_name
- for vdev drivers, manually set data->drv_name

At this stage, virtio-user does not properly report a driver name (fixed in
next commit).

Signed-off-by: David Marchand <david.marchand@6wind.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Jan Blunck <jblunck@infradead.org>
2017-01-17 19:24:51 +01:00
Nélio Laranjeiro
b5750af6cb net/mlx5: do not invalidate title CQE
We can leave the title completion queue entry untouched since its contents
are not modified.

Reported-by: Liming Sun <lsun@mellanox.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-01-17 19:24:51 +01:00
Nélio Laranjeiro
e929f2a2cd net/mlx5: fix endianness in Tx completion queue
Completion queue entry data uses network endian, to access them we should
use ntoh*().

Fixes: c305090bba ("net/mlx5: replace countdown with threshold for Tx completions")

Reported-by: Liming Sun <lsun@mellanox.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-01-17 19:24:51 +01:00
Nélio Laranjeiro
fe5fe3820e net/mlx5: fix leak when starvation occurs
The list of segments to free was wrongly manipulated ending by only freeing
the first segment instead of freeing all of them.  The last one still
belongs to the NIC and thus should not be freed.

Fixes: a1bdb71a32 ("net/mlx5: fix crash in Rx")

Reported-by: Liming Sun <lsun@mellanox.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-01-17 19:24:51 +01:00
Remy Horton
5ebb74a12c net/i40e: fix spelling
Fixes: da61cd0849 ("i40evf: add extended stats")
Fixes: 0eedec25ea ("i40e: clean log messages")

Signed-off-by: Remy Horton <remy.horton@intel.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
2017-01-17 19:24:51 +01:00
Remy Horton
1ef3b073f7 net/i40e: fix xstats value mapping
The offsets used in rte_i40evf_stats_strings for transmission
statistics were wrong, returning the total byte count rather than
the respective (unicast, multicast, broadcast, drop, & error)
packet counts.

Fixes: da61cd0849 ("i40evf: add extended stats")

Signed-off-by: Remy Horton <remy.horton@intel.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
2017-01-17 19:24:51 +01:00
Thomas Monjalon
e754c959fc net/virtio: fix build without virtio-user
When CONFIG_RTE_VIRTIO_USER is disabled (default on FreeBSD),
the virtio driver cannot be compiled:

librte_pmd_virtio.a(virtio_ethdev.o): In function `eth_virtio_dev_init':
(.text+0x1eba): undefined reference to `virtio_user_ops'

Reported-by: Andrew Rybchenko <arybchenko@solarflare.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2017-01-17 23:25:08 +01:00
Qiming Yang
1e07b4ecb1 examples/ethtool: display firmware version
This patch enhances the ethtool example to support to show
firmware version, in the same way that the Linux kernel
ethtool does.

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Remy Horton <remy.horton@intel.com>
2017-01-17 22:34:36 +01:00
Qiming Yang
ed0dfdd0e9 net/i40e: add firmware version get
This patch add a new function i40e_fw_version_get.

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Remy Horton <remy.horton@intel.com>
2017-01-17 22:34:36 +01:00
Qiming Yang
8b0b565742 net/ixgbe: add firmware version get
This patch adds a new function ixgbe_fw_version_get.

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Remy Horton <remy.horton@intel.com>
2017-01-17 22:34:36 +01:00
Qiming Yang
b883c0644a net/e1000: add firmware version get
This patch adds a new function eth_igb_fw_version_get.

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Remy Horton <remy.horton@intel.com>
2017-01-17 22:34:35 +01:00
Qiming Yang
2191347120 ethdev: add firmware version get
This patch adds a new API 'rte_eth_dev_fw_version_get' for
fetching firmware version by a given device.

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Remy Horton <remy.horton@intel.com>
2017-01-17 22:34:35 +01:00
Olivier Matz
c1e55ed3f7 net/virtio: fix advertised Rx offload capabilities
When the virtio PMD is used on top of a vhost that does not support
offloads, Rx offload capabilities are still advertised by
virtio_dev_info_get(). But if an application tries to start the PMD with
Rx offloads enabled (rxmode.hw_ip_checksum = 1), the initialization of
the device will fail with -ENOTSUP and the following log:

  rx ip checksum not available on this host

This patch fixes the Rx offload capabilities returned by
virtio_dev_info_get() to be consistent with features advertised by the
host.

Fixes: 96cb671193 ("net/virtio: support Rx checksum offload")
Fixes: 86d59b2146 ("net/virtio: support LRO")
Cc: stable@dpdk.org

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2017-01-17 12:06:24 +01:00
Tomasz Kulasek
faf08c8b0f examples/performance-thread: add packet type parsing
Last changes in Niantic and Fortville NIC drivers causes that
vector Rx path is chosen by default in l3fwd-thread application.
This path doesn't support propagation of hw packet type recognition
to the packet_type field in mbuf, and packets cannot be classified
properly.

The approach to solve this problem is similar to the commit:
71a7e2424e ("examples/l3fwd: fix using packet type blindly").

To use sw packet analyzer, new command line option "--parse-ptype" is
introduced.

Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
2017-01-17 18:40:17 +01:00
Jasvinder Singh
d30185b7bf examples/ip_pipeline: fix parsing of pass-through pipeline
This patch fixes the configuration file parsing error when load balancing
function is enabled in pass-through pipeline.

error log:
pipeline> [APP] Initializing PIPELINE1 ...
[PIPELINE1] Pass-through
Parse error in section "PIPELINE1": entry "lb" has invalid value ("hash")

Fixes: cbe82f6cfb ("examples/ip_pipeline: add swap action in pass-through")
Cc: stable@dpdk.org

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2017-01-17 18:37:41 +01:00