dpdk.git
7 years agodoc: refer PMD compile/test section from bnx2x guide
Shijith Thotton [Tue, 11 Apr 2017 18:56:43 +0000 (00:26 +0530)]
doc: refer PMD compile/test section from bnx2x guide

Refer the section which explains driver compilation and running of
testpmd in Linux, instead of describing it in driver documentation.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
7 years agodoc: refer PMD compile/test section from ark guide
Shijith Thotton [Tue, 11 Apr 2017 18:56:42 +0000 (00:26 +0530)]
doc: refer PMD compile/test section from ark guide

Refer the section which explains driver compilation and running of
testpmd in Linux, instead of describing it in driver documentation.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
7 years agodoc: explain compiling and testing of PMD
Shijith Thotton [Tue, 11 Apr 2017 18:56:41 +0000 (00:26 +0530)]
doc: explain compiling and testing of PMD

Add a section in NIC drivers documentation to explain compiling and
testing of a PMD. It also mentions about host setup, which is required
before running testpmd.

Add label "testpmd_ug" to refer user guide.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
7 years agonet/dpaa2: enable frame queue based dequeuing
Hemant Agrawal [Tue, 11 Apr 2017 13:49:38 +0000 (19:19 +0530)]
net/dpaa2: enable frame queue based dequeuing

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agonet/dpaa2: enable DMA mapping during device scanning
Hemant Agrawal [Tue, 11 Apr 2017 13:49:37 +0000 (19:19 +0530)]
net/dpaa2: enable DMA mapping during device scanning

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agoconfig: add configuration for toggling physical addressing
Hemant Agrawal [Tue, 11 Apr 2017 13:49:36 +0000 (19:19 +0530)]
config: add configuration for toggling physical addressing

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agonet/dpaa2: enable physical addressing for packet buffers
Hemant Agrawal [Tue, 11 Apr 2017 13:49:35 +0000 (19:19 +0530)]
net/dpaa2: enable physical addressing for packet buffers

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agonet/dpaa2: handle non-hardware backed buffer pool
Hemant Agrawal [Tue, 11 Apr 2017 13:49:34 +0000 (19:19 +0530)]
net/dpaa2: handle non-hardware backed buffer pool

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agonet/dpaa2: enable stashing for LS2088A devices
Hemant Agrawal [Tue, 11 Apr 2017 13:49:33 +0000 (19:19 +0530)]
net/dpaa2: enable stashing for LS2088A devices

As the hardware determines which core will process which packet,
performance is boosted by direct cache warming/stashing as well
as by providing biasing for core-to-flow affinity, which ensures
that flow-specific data structures can remain in the core’s cache.

This patch enables the one cache line data stashing for packet
annotation data and packet context

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agonet/dpaa2: support basic stats
Hemant Agrawal [Tue, 11 Apr 2017 13:49:32 +0000 (19:19 +0530)]
net/dpaa2: support basic stats

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agonet/dpaa2: update link status
Hemant Agrawal [Tue, 11 Apr 2017 13:49:31 +0000 (19:19 +0530)]
net/dpaa2: update link status

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agonet/dpaa2: support Rx packet parsing
Hemant Agrawal [Tue, 11 Apr 2017 13:49:30 +0000 (19:19 +0530)]
net/dpaa2: support Rx packet parsing

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agonet/dpaa2: enable Rx and Tx operations
Hemant Agrawal [Tue, 11 Apr 2017 13:49:29 +0000 (19:19 +0530)]
net/dpaa2: enable Rx and Tx operations

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agonet/dpaa2: support MTU configuration
Hemant Agrawal [Tue, 11 Apr 2017 13:49:28 +0000 (19:19 +0530)]
net/dpaa2: support MTU configuration

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agonet/dpaa2: support promiscuous mode
Hemant Agrawal [Tue, 11 Apr 2017 13:49:27 +0000 (19:19 +0530)]
net/dpaa2: support promiscuous mode

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agonet/dpaa2: support L3 and L4 checksum offload
Hemant Agrawal [Tue, 11 Apr 2017 13:49:26 +0000 (19:19 +0530)]
net/dpaa2: support L3 and L4 checksum offload

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agonet/dpaa2: attach the buffer pool to dpni
Hemant Agrawal [Tue, 11 Apr 2017 13:49:25 +0000 (19:19 +0530)]
net/dpaa2: attach the buffer pool to dpni

This patch configures a MC-DPNI based DPAA2 PMD network
port with a DPBP based buffer pool.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agonet/dpaa2: configure MAC address at init
Hemant Agrawal [Tue, 11 Apr 2017 13:49:24 +0000 (19:19 +0530)]
net/dpaa2: configure MAC address at init

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agonet/dpaa2: add RSS flow distribution
Hemant Agrawal [Tue, 11 Apr 2017 13:49:23 +0000 (19:19 +0530)]
net/dpaa2: add RSS flow distribution

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agonet/dpaa2: add basic operations
Hemant Agrawal [Tue, 11 Apr 2017 13:49:22 +0000 (19:19 +0530)]
net/dpaa2: add basic operations

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agonet/dpaa2: support MC dpni object
Hemant Agrawal [Tue, 11 Apr 2017 13:49:21 +0000 (19:19 +0530)]
net/dpaa2: support MC dpni object

This patch add support for dpni object support in MC driver.

DPNI represent a network interface object in DPAA2.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agonet/dpaa2: support debug log
Hemant Agrawal [Tue, 11 Apr 2017 13:49:19 +0000 (19:19 +0530)]
net/dpaa2: support debug log

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agodoc: add DPAA2 NIC details
Hemant Agrawal [Tue, 11 Apr 2017 13:49:18 +0000 (19:19 +0530)]
doc: add DPAA2 NIC details

This patch adds the NXP dpaa2 architecture and pmd details
in the Network interfaces section.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
7 years agonet/dpaa2: introduce NXP DPAA2 driver
Hemant Agrawal [Tue, 11 Apr 2017 13:49:17 +0000 (19:19 +0530)]
net/dpaa2: introduce NXP DPAA2 driver

add support for fsl-mc bus based dpaa2 pmd driver.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agomempool/dpaa2: add hardware offloaded mempool
Hemant Agrawal [Tue, 11 Apr 2017 13:42:39 +0000 (19:12 +0530)]
mempool/dpaa2: add hardware offloaded mempool

DPAA2 Hardware Mempool handlers allow enqueue/dequeue from NXP's
QBMAN hardware block.
CONFIG_RTE_MBUF_DEFAULT_MEMPOOL_OPS is set to 'dpaa2', if the pool
is enabled.

This memory pool currently supports packet mbuf type blocks only.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agobus/fslmc: add frame queue based dq storage
Hemant Agrawal [Tue, 11 Apr 2017 13:37:27 +0000 (19:07 +0530)]
bus/fslmc: add frame queue based dq storage

This patch adds generic functions for allowing dq storage
for the frame queues.
As the frame queues are common resource for different drivers
this is helpful.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agobus/fslmc: support DMA mapping for ARM SMMU
Hemant Agrawal [Tue, 11 Apr 2017 13:37:26 +0000 (19:07 +0530)]
bus/fslmc: support DMA mapping for ARM SMMU

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agobus/fslmc: add physical-virtual address translation helpers
Hemant Agrawal [Tue, 11 Apr 2017 13:37:25 +0000 (19:07 +0530)]
bus/fslmc: add physical-virtual address translation helpers

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agobus/fslmc: add packet FLE definitions
Hemant Agrawal [Tue, 11 Apr 2017 13:37:24 +0000 (19:07 +0530)]
bus/fslmc: add packet FLE definitions

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agobus/fslmc: define VLAN header length
Hemant Agrawal [Tue, 11 Apr 2017 13:37:23 +0000 (19:07 +0530)]
bus/fslmc: define VLAN header length

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agobus/fslmc: introduce true and false macros
Hemant Agrawal [Tue, 11 Apr 2017 13:37:22 +0000 (19:07 +0530)]
bus/fslmc: introduce true and false macros

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agobus/fslmc: define hardware annotation area size
Hemant Agrawal [Tue, 11 Apr 2017 13:37:21 +0000 (19:07 +0530)]
bus/fslmc: define hardware annotation area size

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agobus/fslmc: define queues for DPAA2 devices
Hemant Agrawal [Tue, 11 Apr 2017 13:37:20 +0000 (19:07 +0530)]
bus/fslmc: define queues for DPAA2 devices

Before DPAA2 devices can communicate using hardware queues, this patch
adds queue definitions in the FSLMC bus which the DPAA2 devices would
instantiate.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agobus/fslmc: affine dpio to crypto threads
Hemant Agrawal [Tue, 11 Apr 2017 13:37:19 +0000 (19:07 +0530)]
bus/fslmc: affine dpio to crypto threads

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agobus/fslmc: support hardware mempool object
Hemant Agrawal [Tue, 11 Apr 2017 13:37:18 +0000 (19:07 +0530)]
bus/fslmc: support hardware mempool object

Each mempool instance is represented by a DPBP object
from the FSL-MC bus.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agobus/fslmc: add dpio portal driver
Hemant Agrawal [Tue, 11 Apr 2017 13:37:17 +0000 (19:07 +0530)]
bus/fslmc: add dpio portal driver

The portal driver is bound to DPIO objects discovered on the fsl-mc bus and
provides services that:
- allow other drivers, such as the Ethernet driver, to enqueue and dequeue
  frames for their respective objects

A system will typically allocate 1 DPIO object per CPU to allow queuing
operations to happen simultaneously across all CPUs.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agobus/fslmc: support debug log
Hemant Agrawal [Tue, 11 Apr 2017 13:37:16 +0000 (19:07 +0530)]
bus/fslmc: support debug log

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agobus/fslmc: scan for net and crypto device
Hemant Agrawal [Tue, 11 Apr 2017 13:37:15 +0000 (19:07 +0530)]
bus/fslmc: scan for net and crypto device

This patch will add support in fslmc vfio process to
scan and parse the dpni and dpseci object for net and crypto
devices. It will add the scanned devices to the fslmc bus.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agobus/fslmc: support VFIO
Hemant Agrawal [Tue, 11 Apr 2017 13:37:14 +0000 (19:07 +0530)]
bus/fslmc: support VFIO

Add support for using VFIO for dpaa2 based fsl-mc bus.

There are some differences in the way vfio used for fsl-mc bus
from the eal vfio.
 - The scanning of bus for individual objects on the basis of
   the DPRC container.
 - The use and mapping of MC portal for object access

With the evolution of bus model, they can be further aligned with
eal vfio code.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agovfio: export utility functions in map file
Hemant Agrawal [Tue, 11 Apr 2017 13:37:13 +0000 (19:07 +0530)]
vfio: export utility functions in map file

adding extra vfio utility functions to map file.
They will be used by other vfio supported buses like fslmc bus
for NXP DPAA2 devices

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agobus/fslmc: support MC dpbp object
Hemant Agrawal [Tue, 11 Apr 2017 13:37:12 +0000 (19:07 +0530)]
bus/fslmc: support MC dpbp object

DPBP object represent a hw based buffer pool instance
in the DPAA2 hardware.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agobus/fslmc: support MC dpio object
Hemant Agrawal [Tue, 11 Apr 2017 13:37:11 +0000 (19:07 +0530)]
bus/fslmc: support MC dpio object

This patch adds the DPIO object support in MC driver.

DPIO - Data Path Input Output represent the processing
context to access the QBMAN HW for packet I/O.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agobus/fslmc: introduce MC object functions
Hemant Agrawal [Tue, 11 Apr 2017 13:37:10 +0000 (19:07 +0530)]
bus/fslmc: introduce MC object functions

This patch introduces the DPAA2 MC(Management complex Driver).

This is a minimal set of low level functions to send and
receive commands to the fsl-mc. It includes support for basic
management commands and commands to manipulate MC objects.

This is common to be used by various DPAA2 PMDs. e.g.net, crypto
and other drivers.

This is a low level library also used in kernel.

Signed-off-by: Cristian Sovaiala <cristian.sovaiala@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agobus/fslmc: add QBMAN driver to bus
Hemant Agrawal [Tue, 11 Apr 2017 13:37:09 +0000 (19:07 +0530)]
bus/fslmc: add QBMAN driver to bus

QBMAN, is a hardware block which interfaces with the other
accelerating hardware blocks (For e.g., WRIOP) on NXP's DPAA2
SoC for queue, buffer and packet scheduling.

This patch introduces a userspace driver for interfacing with
the QBMAN hw block.

The qbman-portal component provides APIs to do the low level
hardware bit twiddling for operations such as:
  -initializing Qman software portals
  -building and sending portal commands
  -portal interrupt configuration and processing

This same/similar code is used in kernel and compat file is used
to make it working in user space.

Signed-off-by: Geoff Thorpe <geoff.thorpe@nxp.com>
Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agobus/fslmc: introduce fsl-mc bus driver
Hemant Agrawal [Tue, 11 Apr 2017 13:37:08 +0000 (19:07 +0530)]
bus/fslmc: introduce fsl-mc bus driver

The fslmc bus driver is a rte_bus driver which scans the fsl-mc bus
for NXP DPAA2 SoCs.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
7 years agomk: add CRC support to DPAA2 machine type
Hemant Agrawal [Tue, 11 Apr 2017 13:37:07 +0000 (19:07 +0530)]
mk: add CRC support to DPAA2 machine type

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
7 years agonet/ena: calculate partial checksum if DF bit is disabled
Michal Krawczyk [Mon, 10 Apr 2017 14:28:11 +0000 (16:28 +0200)]
net/ena: calculate partial checksum if DF bit is disabled

When TSO is disabled we still have to calculate partial checksum if DF bit
if turned off. This is caused by firmware bug.

First of all, we must make sure that we are dealing with IPV4 packet.
If not, we will just skip further checking of this packet and move to
the next one.

If application will not set m2_len field, we assume we that it was Ethernet
frame because we have to look inside the packet to check for the DF flag.
To make it work properly, PMD is assuming that before sending
packet application called function rte_eth_tx_prepare().

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Jakub Palider <jpalider@gmail.com>
Acked-by: Jan Medala <jan.medala@outlook.com>
7 years agonet/ena: cleanup if refilling of Rx descriptors fails
Michal Krawczyk [Mon, 10 Apr 2017 14:28:10 +0000 (16:28 +0200)]
net/ena: cleanup if refilling of Rx descriptors fails

If wrong number of descriptors for refilling was passed to the Rx
repopulate function, there was memory leak which caused memory pool to
run out of resources in longer go.

In case of fail when refilling Rx descriptors, all additional mbufs
have to be released.

Fixes: 1173fca25af9 ("ena: add polling-mode driver")
Cc: stable@dpdk.org
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Jakub Palider <jpalider@gmail.com>
Acked-by: Jan Medala <jan.medala@outlook.com>
7 years agonet/ena: fix delayed cleanup of Rx descriptors
Michal Krawczyk [Mon, 10 Apr 2017 14:28:09 +0000 (16:28 +0200)]
net/ena: fix delayed cleanup of Rx descriptors

On RX path, after receiving bunch of packets, variable tracking
available descriptors in HW queue was not updated.

To fix this issue, variable tracking used descriptors must be updated
after receiving packets - it must be reduced by the amount of received
descriptors in current batch.

Additionally, variable next_to_clean in rx_ring must be updated before
entering ena_populate_rx_queue() to keep it up to date with the current
ring state.

Fixes: 1daff5260ff8 ("net/ena: use unmasked head and tail")
Cc: stable@dpdk.org
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Jakub Palider <jpalider@gmail.com>
Acked-by: Jan Medala <jan.medala@outlook.com>
7 years agonet/ena: fix Rx descriptors allocation
Michal Krawczyk [Mon, 10 Apr 2017 14:28:08 +0000 (16:28 +0200)]
net/ena: fix Rx descriptors allocation

When application tried to allocate 1024 descriptors, device was not
initializing properly.

This patch solves it by avoiding allocation of all descriptors in the
ring in one attempt. At least one descriptor must remain unused in the
HW ring.

Fixes: 1173fca25af9 ("ena: add polling-mode driver")
Cc: stable@dpdk.org
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Jakub Palider <jpalider@gmail.com>
Acked-by: Jan Medala <jan.medala@outlook.com>
7 years agonet/ark: report hardware status on init
Ed Czeck [Tue, 11 Apr 2017 15:41:50 +0000 (11:41 -0400)]
net/ark: report hardware status on init

Expose additional fpga status registers.
Report hardware status during PMD init.

Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
Acked-by: John Miller <john.miller@atomicrules.com>
7 years agonet/ark: set mbuf time stamp field on Rx
Ed Czeck [Tue, 11 Apr 2017 15:41:37 +0000 (11:41 -0400)]
net/ark: set mbuf time stamp field on Rx

Time stamp was carried in the packet meta data, but not
place in the mbuf. The new time stamp field is the proper
destination.

Remove the setting of data offset since this is done by
rte_pktmbuf_free()

Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
Acked-by: John Miller <john.miller@atomicrules.com>
7 years agonet/mlx5: remove extra check on Rx
Nélio Laranjeiro [Tue, 11 Apr 2017 12:46:17 +0000 (14:46 +0200)]
net/mlx5: remove extra check on Rx

Removing this check improves performance as VLAN and CRC stripping are
enabled most of the time.

Convert MLX5_CQE_VLAN_STRIPPED to network order to speed up the check
instead of doing it on the completion queue entry field.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
7 years agonet/thunderx: fix stats access out of bounds
Marcin Wilk [Tue, 11 Apr 2017 12:35:13 +0000 (14:35 +0200)]
net/thunderx: fix stats access out of bounds

Trying to assign more queues to stats struct break only from one loop
when the maximum size is reached. Outside loop iteration is continued.
This leads to access an array out of bounds.

Fixes: 21e3fb0050b9 ("net/thunderx: add final bits for secondary queue support")
Cc: stable@dpdk.org
Signed-off-by: Marcin Wilk <marcin.wilk@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
7 years agonet/ixgbe: move private APIs to a specific file
Wenzhuo Lu [Tue, 11 Apr 2017 08:31:24 +0000 (16:31 +0800)]
net/ixgbe: move private APIs to a specific file

Create a new file rte_pmd_ixgbe.c for all the private
APIs. Move all the related code to the new file.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
7 years agonet/i40e: move private APIs to a specific file
Wenzhuo Lu [Tue, 11 Apr 2017 08:31:23 +0000 (16:31 +0800)]
net/i40e: move private APIs to a specific file

Create a new file rte_pmd_i40e.c for all the private
APIs. Move all the related code to the new file.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
7 years agonet/i40e: fix default PFC setting
Jingjing Wu [Tue, 11 Apr 2017 07:35:49 +0000 (15:35 +0800)]
net/i40e: fix default PFC setting

To keep consistent with previous release, Priority Flow Control (PFC)
need to be disabled by default. This patch fixes it.

This also fixes an issue where traffic was not forwarded by testpmd
occasionally. In those cases ~4770 pps seen on one of the ports rather
than the full rate (>20mpps).

Fixes: 6f0a707e5b55 ("net/i40e: enable DCB on SRIOV VFs")

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Tested-by: David Hunt <david.hunt@intel.com>
7 years agonet/i40e: fix hash input set on X722
Jeff Guo [Thu, 6 Apr 2017 02:35:26 +0000 (10:35 +0800)]
net/i40e: fix hash input set on X722

There are some new PCTYPEs on X722, but they have not been announced
on the RTE lib, so if it can not set corresponding hash input set for
these packet type, the hash function won’t work.

So we need to handle them base on the translation of the new
PCTYPE and the original PCTYPE.

Fixes: b6a0ec418274 ("i40e: use AQ for Rx control register read/write")

Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/enic: remove initialization of some mbuf fields
John Daley [Tue, 11 Apr 2017 01:37:19 +0000 (18:37 -0700)]
net/enic: remove initialization of some mbuf fields

Remove initialization of next and nb_segs mbuf fields in the Rx path
since they are now initialized in the mbuf pool.

See commit 8f094a9ac5d7 ("mbuf: set mbuf fields while in pool").

Signed-off-by: John Daley <johndale@cisco.com>
7 years agonet/thunderx: use internal byte ordering macros
Jerin Jacob [Mon, 10 Apr 2017 19:44:34 +0000 (01:14 +0530)]
net/thunderx: use internal byte ordering macros

The base code was using native GCC macros
for endian detection. Change to portable
rte_byteorder.h based endian detection.

Fixes: 262d43fe20ee ("net/thunderx/base: add HW register definitions")

Suggested-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
7 years agonet/tap: update driver param string
Pascal Mazon [Tue, 11 Apr 2017 09:01:03 +0000 (11:01 +0200)]
net/tap: update driver param string

Fixes: 2bc06869cd94 ("net/tap: add remote netdevice traffic capture")

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
7 years agonet/ixgbe: remove option to disable offload flags
Konstantin Ananyev [Mon, 10 Apr 2017 15:59:42 +0000 (16:59 +0100)]
net/ixgbe: remove option to disable offload flags

Having packets received without any offload flags given in the mbuf is not
very useful, and performance tests with testpmd indicates little
benefit is got with the current code by turning off the flags. This makes
the build-time option pointless, so we can remove it.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
7 years agonet/ixgbe: eliminate mbuf write on rearm
Konstantin Ananyev [Mon, 10 Apr 2017 15:59:41 +0000 (16:59 +0100)]
net/ixgbe: eliminate mbuf write on rearm

With the mbuf rework, we now have 8 contiguous bytes to be rearmed in the
mbuf just before the 8-bytes of olflags. If we don't do the rearm write
inside the descriptor ring replenishment function, and delay it to
receiving the packet, we can do a single 16B write inside the RX function
to set both the rearm data, and the flags together.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
7 years agonet/i40e: sync between x86 and arm64 vector PMD
Jianbo Liu [Thu, 6 Apr 2017 08:33:21 +0000 (16:33 +0800)]
net/i40e: sync between x86 and arm64 vector PMD

Porting two changes from x86 SSE implematation.
    net/i40e: fix checksum flag in x86 vector Rx
    net/i40e: eliminate mbuf write on rearm

Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org>
7 years agonet/i40e: remove option to disable offload flags
Bruce Richardson [Thu, 6 Apr 2017 11:32:17 +0000 (12:32 +0100)]
net/i40e: remove option to disable offload flags

Having packets received without any offload flags given in the mbuf is not
very useful, and performance tests with testpmd indicates little to no
benefit is got with the current code by turning off the flags. This makes
the build-time option pointless, so we can remove it.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Jianbo Liu <jianbo.liu@linaro.org>
7 years agonet/i40e: eliminate mbuf write on rearm
Bruce Richardson [Thu, 6 Apr 2017 11:32:16 +0000 (12:32 +0100)]
net/i40e: eliminate mbuf write on rearm

With the mbuf rework, we now have 8 contiguous bytes to be rearmed in the
mbuf just before the 8-bytes of olflags. If we don't do the rearm write
inside the descriptor ring replenishment function, and delay it to
receiving the packet, we can do a single 16B write inside the RX function
to set both the rearm data, and the flags together.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Jianbo Liu <jianbo.liu@linaro.org>
7 years agonet/liquidio: fix null pointer check
Shijith Thotton [Mon, 10 Apr 2017 07:18:56 +0000 (12:48 +0530)]
net/liquidio: fix null pointer check

Fix null pointer check in release Rx/Tx queue APIs.

Coverity issue: 1423923
Coverity issue: 1423924
Fixes: 9a30013b9884 ("net/liquidio: add API to release Rx queue")
Fixes: cf6bfcbea178 ("net/liquidio: add API to release Tx queue")

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
7 years agonet/liquidio/base: fix mbox command initialization
Shijith Thotton [Mon, 10 Apr 2017 07:18:55 +0000 (12:48 +0530)]
net/liquidio/base: fix mbox command initialization

Initialize mail box command to request VF FLR. Data field was
uninitialized before as it was not required and caused the following
error during scan.

Coverity issue: 1384518
Fixes: cdb166963cae ("net/liquidio: add API for VF FLR")

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
7 years agonet/i40e: add missing 25G link speed
Qi Zhang [Sun, 9 Apr 2017 18:05:06 +0000 (14:05 -0400)]
net/i40e: add missing 25G link speed

Add missing 25G link speed decode in i40evf_dev_link_update.

Fixes: 75d133dd3296 ("net/i40e: enable 25G device")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
7 years agonet/i40e: fix VF link speed
Qi Zhang [Sun, 9 Apr 2017 18:05:05 +0000 (14:05 -0400)]
net/i40e: fix VF link speed

When PF notify link speed to VF, encode of link speed need to
be converted from ETH_SPEED_XXX to I40E_LINK_SPEED_XXX.

Fixes: bb6722fb5c0e ("net/i40e: fix VF bonded device link down")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
7 years agonet/i40e: remove duplicate code
Qi Zhang [Sun, 9 Apr 2017 18:05:04 +0000 (14:05 -0400)]
net/i40e: remove duplicate code

Make i40e_notify_all_vfs_link_status as a wrapper of
i40e_notify_vf_link_status so duplicate code can be removed.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
7 years agonet/i40e: fix QinQ eth pattern parsing
Bernard Iremonger [Wed, 5 Apr 2017 14:03:57 +0000 (15:03 +0100)]
net/i40e: fix QinQ eth pattern parsing

The eth keyword only should be accepted.

Fixes: d37705068ee8 ("net/i40e: parse QinQ pattern")

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
7 years agonet/sfc: remove unnecessary mbuf initialization on Rx
Andrew Rybchenko [Tue, 4 Apr 2017 11:57:36 +0000 (12:57 +0100)]
net/sfc: remove unnecessary mbuf initialization on Rx

mbuf next is equal to NULL, nb_segs and reference counter are equal to 1
when mbuf is obtained from mempool.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
7 years agoconfig: enable AVP driver only on x86 64-bit
Allain Legacy [Tue, 4 Apr 2017 17:37:24 +0000 (13:37 -0400)]
config: enable AVP driver only on x86 64-bit

The AVP devices are only supported on Intel 64-bit architectures so
adjusting the defconfig attributes accordingly.

Fixes: 908072e9d0e6 ("net/avp: support driver registration")

Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
7 years agonet/ark: integrate PMD
Ed Czeck [Tue, 4 Apr 2017 19:51:32 +0000 (15:51 -0400)]
net/ark: integrate PMD

* Flesh out device configuration
* Add links dev_ops
* Allow dynamic extension loading
* Update release notes and feature listing

Signed-off-by: Shepard Siegel <shepard.siegel@atomicrules.com>
Signed-off-by: John Miller <john.miller@atomicrules.com>
Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
7 years agonet/ark: add Rx initial version
Ed Czeck [Tue, 4 Apr 2017 19:51:19 +0000 (15:51 -0400)]
net/ark: add Rx initial version

* Core RX packet moving functions

Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
7 years agonet/ark: add Tx initial version
Ed Czeck [Tue, 4 Apr 2017 19:51:08 +0000 (15:51 -0400)]
net/ark: add Tx initial version

* Core TX packet moving functions
* Flesh out ark_adapter struct to support TX code
(not all fields used at this patch)

Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
7 years agonet/ark: provide API for hardware modules pktchkr and pktgen
Ed Czeck [Tue, 4 Apr 2017 19:50:58 +0000 (15:50 -0400)]
net/ark: provide API for hardware modules pktchkr and pktgen

Provide C-level interface for Arkville's internal HW resources
pktchkr and pktgen

Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
7 years agonet/ark: provide API for hardware modules UDM and DDM
Ed Czeck [Tue, 4 Apr 2017 19:50:49 +0000 (15:50 -0400)]
net/ark: provide API for hardware modules UDM and DDM

Provide C-level interface for Arkville's internal HW resources
DDM (Downstream Data Mover) and UDM (Upstream Data Mover) modules

Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
7 years agonet/ark: provide API for hardware modules MPU RQP and pktdir
Ed Czeck [Tue, 4 Apr 2017 19:50:40 +0000 (15:50 -0400)]
net/ark: provide API for hardware modules MPU RQP and pktdir

Provide C-level interface for Arkville's internal HW resources
MPU, (Memory Prefetch Unit) pktdir (Packet director), and RQP
(Request Pacer) modules

Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
7 years agonet/ark: stub PMD for Atomic Rules Arkville
Ed Czeck [Tue, 4 Apr 2017 19:50:23 +0000 (15:50 -0400)]
net/ark: stub PMD for Atomic Rules Arkville

Enable Arkville on supported configurations
Add overview documentation
Minimum driver support for valid compile
Arkville PMD is not supported on ARM or PowerPC at this time

Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
Signed-off-by: John Miller <john.miller@atomicrules.com>
7 years agonet/i40e: fix allocation check
Henry Cai [Wed, 5 Apr 2017 13:19:53 +0000 (21:19 +0800)]
net/i40e: fix allocation check

function i40evf_add_del_all_mac_addr without check return
value of rte_zmalloc

Fixes: 97ac72aa71a9 ("i40e: support setting VF MAC address")
Cc: stable@dpdk.org
Signed-off-by: Henry Cai <caihe@huawei.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
7 years agonet/cxgbe: fix possible null pointer dereference
Henry Cai [Tue, 28 Mar 2017 07:32:20 +0000 (15:32 +0800)]
net/cxgbe: fix possible null pointer dereference

Check return value of malloc.

Fixes: 3bd122eef2cc ("cxgbe/base: add hardware API for Chelsio T5 series adapters")
Cc: stable@dpdk.org
Signed-off-by: Henry Cai <caihe@huawei.com>
Acked-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
7 years agotest/mempool_perf: support default mempool
Santosh Shukla [Tue, 18 Apr 2017 14:41:30 +0000 (20:11 +0530)]
test/mempool_perf: support default mempool

Mempool_perf autotest currently does perf regression for:
 * nochache
 * cache

Introducing default_pool, mainly targeted for ext-mempool regression
test. Ext-mempool don't need 'cache' modes so only adding test-case
support for 'nocache' mode.

So to run ext-mempool perf regression, user has to set
RTE_MBUF_DEFAULT_MEMPOOL_OPS="<>"

There is chance of duplication  ie.. if user sets

RTE_MBUF_DEFAULT_MEMPOOL_OPS="ring_mp_mc" then regression
will happen twice for 'ring_mp_mc'

Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
7 years agotest/mempool_perf: free mempool on exit
Santosh Shukla [Tue, 18 Apr 2017 14:41:29 +0000 (20:11 +0530)]
test/mempool_perf: free mempool on exit

Mempool_perf test not freeing pool memory.

Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
7 years agotest/mempool_perf: remove mempool global vars
Santosh Shukla [Tue, 18 Apr 2017 14:41:28 +0000 (20:11 +0530)]
test/mempool_perf: remove mempool global vars

Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
7 years agotest/mempool: support default mempool
Shreyansh Jain [Wed, 5 Apr 2017 09:35:34 +0000 (15:05 +0530)]
test/mempool: support default mempool

Mempool test currently supports:
 * ring_mp_mc
 * stack

Adding a new default pool options. So, ring* + stack + default
(which can be 'stack' or 'ring')
 * This way, whatever the value of RTE_MBUF_DEFAULT_MEMPOOL_OPS is set,
   it would be verified.
 * even if that means duplicating some test (for example when "stack" is
   set as default and it already part of standard test)

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Reviewed-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
7 years agotest/mempool: free mempool on exit
Shreyansh Jain [Wed, 5 Apr 2017 09:35:33 +0000 (15:05 +0530)]
test/mempool: free mempool on exit

mempool autotest was not freeing the mempools.

Fixes: 8ef772ae ("app/test: rework mempool test")
Cc: stable@dpdk.org
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Reviewed-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
7 years agomk: link app with ring mempool by default
Shreyansh Jain [Thu, 13 Apr 2017 09:02:07 +0000 (14:32 +0530)]
mk: link app with ring mempool by default

From the discussion in [1], it was observed that application should
have a default pool already linked even in case of shared builds.
Ring is especially important because packet mbuf creation API refer to
ring_mp_mc as default handler.

Documentation for this is pending.

[1] http://dpdk.org/ml/archives/dev/2017-April/063819.html

Fixes: 9a8e9b57f544 ("mempool: move ring handler as a driver")

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
7 years agodoc: fix sphinx warning
Thomas Monjalon [Wed, 19 Apr 2017 12:00:29 +0000 (14:00 +0200)]
doc: fix sphinx warning

Seen with recent version of sphinx:
WARNING: latex_preamble conflicts with latex_elements['preamble'], ignored.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agoethdev: fix build with strict flags
Shahaf Shuler [Thu, 13 Apr 2017 05:29:27 +0000 (08:29 +0300)]
ethdev: fix build with strict flags

Compilation error seen while compiling mlx5 in debug mode
under RHEL 7.3:

rte_ethdev.h:1670:7: error: type of bit-field 'state' is a GCC extension
    [-Werror=pedantic]

Address it by removing the unnecessary bit-field width limitation.

Fixes: d52268a8b24b ("ethdev: expose device states")

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
7 years agoeventdev: fix build for clang 4
Ferruh Yigit [Mon, 17 Apr 2017 14:35:59 +0000 (15:35 +0100)]
eventdev: fix build for clang 4

build error:
.../lib/librte_eventdev/rte_eventdev.c:371:6:
error: logical not is only applied to the left hand side of this
bitwise operator [-Werror,-Wlogical-not-parentheses]
  if (!dev_conf->event_dev_cfg & RTE_EVENT_DEV_CFG_PER_DEQUEUE_TIMEOUT)
      ^
Added parentheses after the '!' to evaluate the bitwise operator first.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agomk: fix build for clang 4
Ferruh Yigit [Mon, 17 Apr 2017 14:35:58 +0000 (15:35 +0100)]
mk: fix build for clang 4

clang 4 gives "taking address of packed member may result in an
unaligned pointer value" warnings in a few locations [1].

Disabled "-Waddress-of-packed-member" warning for clang >= 4

[1] build errors:
.../lib/librte_eal/common/eal_common_memzone.c:275:25:
error: taking address of packed member 'mlock' of class or structure
'rte_mem_config' may result in an unaligned pointer value
[-Werror,-Waddress-of-packed-member]
        rte_rwlock_write_lock(&mcfg->mlock);
                               ^~~~~~~~~~~

.../lib/librte_ip_frag/rte_ipv4_reassembly.c:139:31:
error: taking address of packed member 'src_addr' of class or structure
'ipv4_hdr' may result in an unaligned pointer value
[-Werror,-Waddress-of-packed-member]
        psd = (unaligned_uint64_t *)&ip_hdr->src_addr;
                                     ^~~~~~~~~~~~~~~~

.../lib/librte_vhost/vhost_user.c:1037:34:
error: taking address of packed member 'payload' of class or structure
'VhostUserMsg' may result in an unaligned pointer value
[-Werror,-Waddress-of-packed-member]
vhost_user_set_vring_num(dev, &msg.payload.state);
       ^~~~~~~~~~~~~~~~~

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/xenvirt: fix build error
Ferruh Yigit [Wed, 19 Apr 2017 09:52:09 +0000 (10:52 +0100)]
net/xenvirt: fix build error

build error:
.../drivers/net/xenvirt/rte_eth_xenvirt.c:676:9:
error: ‘struct rte_eth_dev’ has no member named ‘driver’
  eth_dev->driver = NULL;
         ^~

ethdev driver removed, removing assignment to it to fix the build error

Fixes: 9dca21fb80b6 ("ethdev: remove ethdev driver")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agoethdev: do not include PCI header
Jan Blunck [Tue, 11 Apr 2017 15:44:49 +0000 (17:44 +0200)]
ethdev: do not include PCI header

Since the PCI functionality has been moved to the PCI specific ethdev
header we don't need to include rte_pci.h from here anymore.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
7 years agoethdev: remove PCI helper from generic ethdev header
Jan Blunck [Tue, 11 Apr 2017 15:44:48 +0000 (17:44 +0200)]
ethdev: remove PCI helper from generic ethdev header

This moves the rte_eth_copy_pci_info() into the PCI specific ethdev
header. As a side effect this also removes it from the list of symbols
exported by the rte_ethdev library.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
7 years agoethdev: remove ethdev driver
Jan Blunck [Tue, 11 Apr 2017 15:44:46 +0000 (17:44 +0200)]
ethdev: remove ethdev driver

This removes the now unused struct eth_driver.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
7 years agoethdev: remove ethdev PCI probe/remove
Jan Blunck [Tue, 11 Apr 2017 15:44:45 +0000 (17:44 +0200)]
ethdev: remove ethdev PCI probe/remove

This removes the now unused rte_eth_dev_pci_probe() and
rte_eth_dev_pci_remove() functions.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
7 years agodrivers/net: do not use ethdev driver
Jan Blunck [Tue, 11 Apr 2017 15:44:24 +0000 (17:44 +0200)]
drivers/net: do not use ethdev driver

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
7 years agoethdev: add PCI driver helpers
Jan Blunck [Tue, 11 Apr 2017 15:44:23 +0000 (17:44 +0200)]
ethdev: add PCI driver helpers

This adds the following helper intended to be used by rte_pci_driver
implementations working with ethdev:

- rte_eth_dev_pci_allocate
- rte_eth_dev_pci_release
- rte_eth_dev_pci_generic_probe
- rte_eth_dev_pci_generic_remove

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>