dpdk.git
6 years agodoc: update enic guide
Hyong Youb Kim [Wed, 10 Jan 2018 09:17:02 +0000 (01:17 -0800)]
doc: update enic guide

Fix typos, inconsistencies, duplicate text, and so on.

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
6 years agomaintainers: update for enic
John Daley [Wed, 10 Jan 2018 09:17:01 +0000 (01:17 -0800)]
maintainers: update for enic

Welcome Hyong Youb Kim.

Signed-off-by: John Daley <johndale@cisco.com>
6 years agoapp/testpmd: extend event printing
Matan Azrad [Thu, 4 Jan 2018 16:01:12 +0000 (17:01 +0100)]
app/testpmd: extend event printing

There are new Ethernet device events - NEW and DESTROY, and new option
to register all ports by one call.

Adjust application to aforementioned changes.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoethdev: add notifications for probing and removal
Thomas Monjalon [Thu, 4 Jan 2018 16:01:11 +0000 (17:01 +0100)]
ethdev: add notifications for probing and removal

When a PMD finishes probing, it creates the new port by calling
the function rte_eth_dev_allocate().
A notification of the new port is sent there to the upper layer.

When a PMD finishes removal of a port, it calls the function
rte_eth_dev_release_port().
A notification of the destroyed port is sent there to the upper layer.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoethdev: free detached port by the dedicated function
Matan Azrad [Thu, 4 Jan 2018 16:01:10 +0000 (17:01 +0100)]
ethdev: free detached port by the dedicated function

In the port detach function, use the function to free an ethdev port
instead of changing its state directly.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
6 years agoethdev: allow event registration for all ports
Matan Azrad [Thu, 4 Jan 2018 16:01:09 +0000 (17:01 +0100)]
ethdev: allow event registration for all ports

Add option to register event callback for all ports by one call to
rte_eth_dev_callback_register using port_id=RTE_ETH_ALL.

In this case the callback is also registered to invalid ports.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
6 years agoethdev: remove useless parameter in callback process
Thomas Monjalon [Thu, 4 Jan 2018 16:01:08 +0000 (17:01 +0100)]
ethdev: remove useless parameter in callback process

The pointer to the user parameter of the callback registration is
automatically pass to the callback function.
There is no point to allow changing this user parameter by a caller.
That's why this parameter is always set to NULL by PMDs and set only
in ethdev layer before calling the callback function.

The history is that the user parameter was initially used
by the callback implementation to pass some information
between the application and the driver:
c1ceaf3ad056 ("ethdev: add an argument to internal callback function")
Then a new parameter has been added to leave the user parameter
to its standard usage of context given at registration:
d6af1a13d7a1 ("ethdev: add return values to callback process API")

The NULL parameter in the internal callback processing function
is now removed. It makes clear that the callback parameter is user
managed and opaque from a DPDK point of view.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoethdev: fix link autonegotiation value
Thomas Monjalon [Fri, 5 Jan 2018 17:38:55 +0000 (18:38 +0100)]
ethdev: fix link autonegotiation value

There are 3 kind of link data in ethdev:
- capabilities (rte_eth_dev_info)
- configuration (rte_eth_conf)
- status (rte_eth_link)

A bit-field is used for capabilities (rte_eth_dev_info.speed_capa) and
configuration (rte_eth_conf.link_speeds).
Bits are defined in ETH_LINK_SPEED_*.

Some numerical (ETH_SPEED_NUM_*) and boolean (ETH_LINK_*) values
are used for the link status (rte_eth_link.*).

There was a mistake in the comment of rte_eth_link.link_autoneg,
suggesting ETH_LINK_SPEED_[AUTONEG/FIXED] which are 0/1,
instead of ETH_LINK_[AUTONEG/FIXED] which are 1/0.

The drivers are fixed to use ETH_LINK_[AUTONEG/FIXED].

Fixes: 82113036e4e5 ("ethdev: redesign link speed config")

Suggested-by: Andrew Rybchenko <arybchenko@solarflare.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
6 years agonet/bnxt: fix headroom initialization
Olivier Matz [Wed, 3 Jan 2018 10:32:25 +0000 (11:32 +0100)]
net/bnxt: fix headroom initialization

When allocating a new mbuf for Rx, the value of m->data_off should not
be reset to its default value (RTE_PKTMBUF_HEADROOM), instead of reusing
the previous undefined value, which could cause the packet to have a too
small or too high headroom.

Fixes: 2eb53b134aae ("net/bnxt: add initial Rx code")
Cc: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agonet/bnxt: use new API to get IOVA address
Olivier Matz [Wed, 3 Jan 2018 10:32:24 +0000 (11:32 +0100)]
net/bnxt: use new API to get IOVA address

Replace internal functions to get DMA address them with their generic
IOVA version. Also rename the 'data' variable to 'mbuf' for more
readability.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agonet/bonding: burst mode hash calculation
Declan Doherty [Tue, 9 Jan 2018 11:34:09 +0000 (11:34 +0000)]
net/bonding: burst mode hash calculation

Change the xmit_hash functions to handle bursts of packet instead of
single packets at a time, and update the affected tx_burst functions.

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Signed-off-by: Keith Wiles <keith.wiles@intel.com>
6 years agonet/bonding: fix setting slave MAC addresses
Chas Williams [Thu, 28 Dec 2017 02:12:31 +0000 (21:12 -0500)]
net/bonding: fix setting slave MAC addresses

Use rte_eth_dev_default_mac_addr_set() to change a slave MAC address.
mac_address_set() only updates the software copy and does nothing to
update the hardware.

Signed-off-by: Chas Williams <chas3@att.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
6 years agonet/bnxt: check on-chip resources
Ajit Khaparde [Mon, 8 Jan 2018 20:24:37 +0000 (12:24 -0800)]
net/bnxt: check on-chip resources

Check for availability of on-chip resources - like Queue count,
number stat context, number of ring groups before inheriting and
initializing as per application requirements.
Also check before creating a Tx or Rx queue make sure there are
enough resources to complete the request.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agonet/bnxt: free the aggregation ring
Somnath Kotur [Mon, 8 Jan 2018 20:24:36 +0000 (12:24 -0800)]
net/bnxt: free the aggregation ring

bnxt_free_all_hwrm_rings() was freeing all the Rx Rings including
zero-ing out the memory for the Aggregation rings, but was not issuing
the FW cmd to destroy the AGG ring(s) from HW. This would manifest in
problems when port stop/port start would be issued as there would be a
HW ring leak every time port stop was issued.

Fixes: daef48efe5e5 ("net/bnxt: support set MTU")
Cc: stable@dpdk.org
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agonet/bnxt: fix duplicate pattern for 5tuple filter
Somnath Kotur [Mon, 8 Jan 2018 20:24:35 +0000 (12:24 -0800)]
net/bnxt: fix duplicate pattern for 5tuple filter

When user re-issues same 5 tuple filter pattern cmd with different
destination queue, it would flag it as an existing match.
However, when deletion on this filter was attempted, it would crash
as the 'vnic' from which the filter was being removed from would be
different.  Fix by updating the filter in the scenario where there
is a pattern match and only the destination queue varies.

Fixes: b7435d660a8c ("net/bnxt: add ntuple filtering support")
Cc: stable@dpdk.org
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agonet/bnxt: fix duplicate filter pattern creation error
Somnath Kotur [Mon, 8 Jan 2018 20:24:34 +0000 (12:24 -0800)]
net/bnxt: fix duplicate filter pattern creation error

If the attribute/pattern for a flow is the same, with only the 'action'
i.e the destination queue index changing, allow it by cleaning up
the older ntuple filter and updating the existing flow with
the new filter rule having the new destination queue ID.
Also, clear the L2 filter during flow_destroy after destroying
the ntuple filter, otherwise the flow record is not completely purged
from the HW.

Fixes: 5ef3b79fdfe6 ("net/bnxt: support flow filter ops")
Cc: stable@dpdk.org
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agonet/bnxt: remove addition of a temporary filter
Ajit Khaparde [Mon, 8 Jan 2018 20:24:33 +0000 (12:24 -0800)]
net/bnxt: remove addition of a temporary filter

filter1 which is used to just get the l2 filter FW id and not used
later was unnecessarily being inserted into a list and was not being
freed after it's use was done.
Fix it by not doing the list insertion and releasing it back to the free
filter pool.

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agonet/bnxt: fix check for ether type
Ajit Khaparde [Mon, 8 Jan 2018 20:24:32 +0000 (12:24 -0800)]
net/bnxt: fix check for ether type

As per documentation, While supporting ethertype_filters matching
ether_types 0x0800 (IPv4) and 0x86DD (IPv6) is invalid.
But we were wrongly doing that. This patch fixes it.

Fixes: 5ef3b79fdfe6 ("net/bnxt: support flow filter ops")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agonet/bnxt: check initialization before accessing stats
Ajit Khaparde [Mon, 8 Jan 2018 20:24:31 +0000 (12:24 -0800)]
net/bnxt: check initialization before accessing stats

Maintain state of PMD initialization and check it before checking stats.
In certain cases, we might end up accessing stats before the required
HWRM commands are processed by FW.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agonet/bnxt: add check for multi host PF per port
Ajit Khaparde [Mon, 8 Jan 2018 20:24:30 +0000 (12:24 -0800)]
net/bnxt: add check for multi host PF per port

Certain SKUs of NIC can support features like NPAR, Multi Host PFs per
port.  We need to check for such features in order to restrict certain
HWRM commands from being sent to the FW.

For the single PF per port model, allow commands like hwrm_port_phy_cfg
from the PF driver. In NPAR and MH environments with multiple PFs per
port, we should not allow HWRM commands like hwrm_port_phy_cfg to be
sent to the FW.

This patch takes care of that.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agonet/bnxt: return proper error code
Ajit Khaparde [Mon, 8 Jan 2018 20:24:29 +0000 (12:24 -0800)]
net/bnxt: return proper error code

If the FW fails bnxt_hwrm_func_reset() with an error status,
instead of returning -1, return a more standard value of -EIO.
Similarly sometimes the status returned by certain FW commands
may not be generic. Return a more standard value of -EIO in
that case as well.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agonet/bnxt: fix group info usage
Ajit Khaparde [Mon, 8 Jan 2018 20:24:28 +0000 (12:24 -0800)]
net/bnxt: fix group info usage

Ring groups is a Rx only attribute. Make sure there are sufficient
ring groups available. Return an error if they are not available.

Fixes: 37d6161a68ba ("net/bnxt: add ring group alloc/free")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agonet/bnxt: parse checksum offload flags
Ajit Khaparde [Mon, 8 Jan 2018 20:24:27 +0000 (12:24 -0800)]
net/bnxt: parse checksum offload flags

Parse the Tx checksum offload flags and set the proper bits
in the Tx descriptor.

Fixes: 6eb3cc2294fd ("net/bnxt: add initial Tx code")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agonet/bnxt: fix double increment of idx during Tx ring alloc
Ajit Khaparde [Mon, 8 Jan 2018 20:24:26 +0000 (12:24 -0800)]
net/bnxt: fix double increment of idx during Tx ring alloc

We are incrementing idx twice while allocating Tx rings.
Since this is passed to the firmware, it may cause unexpected behavior.

Fixes: daef48efe5e5 ("net/bnxt: support set MTU")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agonet/bnxt: check return values in init
Ajit Khaparde [Mon, 8 Jan 2018 20:24:25 +0000 (12:24 -0800)]
net/bnxt: check return values in init

We are not checking for return values of functions like
bnxt_hwrm_queue_qportcfg and bnxt_hwrm_func_qcfg in bnxt_dev_init
thereby preventing a cleanup in case of a HWRM command failure.
This patch fixes that.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agobus/dpaa: support enqueue frames of multiple queues
Akhil Goyal [Wed, 10 Jan 2018 10:46:41 +0000 (16:16 +0530)]
bus/dpaa: support enqueue frames of multiple queues

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agonet/dpaa: support push mode
Hemant Agrawal [Wed, 10 Jan 2018 10:46:40 +0000 (16:16 +0530)]
net/dpaa: support push mode

Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
6 years agobus/dpaa: support static queues
Hemant Agrawal [Wed, 10 Jan 2018 10:46:39 +0000 (16:16 +0530)]
bus/dpaa: support static queues

DPAA hardware support two kinds of queues:
1. Pull mode queue - where one needs to regularly pull the packets.
2. Push mode queue - where the hw pushes the packet to queue. These are
   high performance queues, but limited in number.

This patch add the driver support for push mode queues.

Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agoapp/testpmd: support loopback config for DPAA
Hemant Agrawal [Wed, 10 Jan 2018 10:46:38 +0000 (16:16 +0530)]
app/testpmd: support loopback config for DPAA

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agonet/dpaa: support loopback API
Hemant Agrawal [Wed, 10 Jan 2018 10:46:37 +0000 (16:16 +0530)]
net/dpaa: support loopback API

PMD specific API is being added as an EXPERIMENTAL API

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agonet/dpaa: support Rx queue count
Hemant Agrawal [Wed, 10 Jan 2018 10:46:36 +0000 (16:16 +0530)]
net/dpaa: support Rx queue count

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agobus/dpaa: query queue frame count support
Hemant Agrawal [Wed, 10 Jan 2018 10:46:35 +0000 (16:16 +0530)]
bus/dpaa: query queue frame count support

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agonet/dpaa: optimize Rx path
Nipun Gupta [Wed, 10 Jan 2018 10:46:34 +0000 (16:16 +0530)]
net/dpaa: optimize Rx path

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agonet/dpaa: optimize the Tx burst
Nipun Gupta [Wed, 10 Jan 2018 10:46:33 +0000 (16:16 +0530)]
net/dpaa: optimize the Tx burst

Optimize it for best case. Create a function
for TX offloads to be used in multiple legs.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agonet/dpaa: change Tx HW budget to 7
Nipun Gupta [Wed, 10 Jan 2018 10:46:32 +0000 (16:16 +0530)]
net/dpaa: change Tx HW budget to 7

change the TX budget to 7 to sync best with the hw.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agobus/dpaa: support creating dynamic HW portal
Hemant Agrawal [Wed, 10 Jan 2018 10:46:31 +0000 (16:16 +0530)]
bus/dpaa: support creating dynamic HW portal

HW portal is a processing context in DPAA. This patch allow
creation of a queue specific HW portal context.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agobus/dpaa: optimize the endianness conversions
Nipun Gupta [Wed, 10 Jan 2018 10:46:30 +0000 (16:16 +0530)]
bus/dpaa: optimize the endianness conversions

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agobus/dpaa: optimize the qman HW stashing settings
Nipun Gupta [Wed, 10 Jan 2018 10:46:29 +0000 (16:16 +0530)]
bus/dpaa: optimize the qman HW stashing settings

The settings are tuned for performance.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agonet/dpaa: add frame count based tail drop with CGR
Hemant Agrawal [Wed, 10 Jan 2018 10:46:28 +0000 (16:16 +0530)]
net/dpaa: add frame count based tail drop with CGR

Replace the byte based tail queue congestion support
with frame count based congestion groups.
It can easily map to number of RX descriptors for a queue.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agonet/dpaa: set the correct frame size in device MTU
Ashish Jain [Wed, 10 Jan 2018 10:46:27 +0000 (16:16 +0530)]
net/dpaa: set the correct frame size in device MTU

Setting correct frame size in dpaa_dev_mtu_set
api call. Also setting correct max frame size in
hardware in dev_configure for jumbo frames

Signed-off-by: Ashish Jain <ashish.jain@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agobus/dpaa: update platform SoC value register routines
Hemant Agrawal [Wed, 10 Jan 2018 10:46:26 +0000 (16:16 +0530)]
bus/dpaa: update platform SoC value register routines

This patch update the logic and expose the soc value
register, so that it can be used by other modules as well.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agonet/dpaa: fix FW version code
Hemant Agrawal [Wed, 10 Jan 2018 10:46:25 +0000 (16:16 +0530)]
net/dpaa: fix FW version code

fix the soc id path and missing fclose

Fixes: cf0fab1d2ca5 ("net/dpaa: support firmware version get API")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agonet/dpaa: fix the mbuf packet type if zero
Ashish Jain [Wed, 10 Jan 2018 10:46:24 +0000 (16:16 +0530)]
net/dpaa: fix the mbuf packet type if zero

Populate the mbuf field packet_type which is required
for calculating checksum while transmitting frames

Fixes: 8cffdcbe85aa ("net/dpaa: support scattered Rx")
Cc: stable@dpdk.org
Signed-off-by: Ashish Jain <ashish.jain@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agonet/dpaa: fix uninitialized and unused variables
Hemant Agrawal [Wed, 10 Jan 2018 10:46:23 +0000 (16:16 +0530)]
net/dpaa: fix uninitialized and unused variables

This patch fixes the issues reported by NXP's internal
coverity build.

Fixes: 05ba55bc2b1a ("net/dpaa: add packet dump for debugging")
Fixes: 37f9b54bd3cf ("net/dpaa: support Tx and Rx queue setup")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agonet/sfc: change license to BSD-3-Clause
Andrew Rybchenko [Mon, 8 Jan 2018 13:35:35 +0000 (13:35 +0000)]
net/sfc: change license to BSD-3-Clause

Change license from BSD-2-Clause to BSD-3-Clause.
Bump copyright year.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agonet/sfc/base: change license to BSD-3-Clause
Andrew Rybchenko [Mon, 8 Jan 2018 13:35:34 +0000 (13:35 +0000)]
net/sfc/base: change license to BSD-3-Clause

Change license from BSD-2-Clause-FreeBSD to BSD-3-Clause.
Bump copyright year.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agonet/sfc: support more options for a number of Tx descriptors
Andrew Rybchenko [Tue, 9 Jan 2018 20:24:55 +0000 (20:24 +0000)]
net/sfc: support more options for a number of Tx descriptors

The number of Tx descriptors is not used as HW Tx ring size any more.
It simply defines maximum fill level.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
6 years agonet/sfc: support more options for a number of Rx descriptors
Andrew Rybchenko [Tue, 9 Jan 2018 20:24:54 +0000 (20:24 +0000)]
net/sfc: support more options for a number of Rx descriptors

The number of Rx descriptors is not used as HW Rx ring size any more.
It simply defines maximum fill level.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
6 years agonet/sfc: use Tx queue max fill level calculated on init
Andrew Rybchenko [Tue, 9 Jan 2018 20:24:53 +0000 (20:24 +0000)]
net/sfc: use Tx queue max fill level calculated on init

Prepare to support more options for number of Tx descriptors.

libefx-based datapath is updated just for completeness to
make code more readable and less error-prone.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
6 years agonet/sfc: use Rx queue max fill level calculated on init
Andrew Rybchenko [Tue, 9 Jan 2018 20:24:52 +0000 (20:24 +0000)]
net/sfc: use Rx queue max fill level calculated on init

Prepare to support more options for number of Rx descriptors.

libefx-based datapath is updated just for completeness to
make code more readable and less error-prone.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
6 years agonet/sfc: make Tx free threshold check datapath specific
Andrew Rybchenko [Tue, 9 Jan 2018 20:24:51 +0000 (20:24 +0000)]
net/sfc: make Tx free threshold check datapath specific

EFX_TXQ_LIMIT is libefx-specifics and it should not be used
for other Tx datapaths implementations (e.g. EF10 native).

EF10 native Tx datapath has its own understanding of the maximum
TxQ fill level imposed by EvQ clear strategy and space reserved
for Tx error and flush events.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
6 years agonet/sfc: make refill threshold check Rx datapath specific
Andrew Rybchenko [Tue, 9 Jan 2018 20:24:50 +0000 (20:24 +0000)]
net/sfc: make refill threshold check Rx datapath specific

EFX_RXQ_LIMIT is libefx-specifics and it should not be used
for other Rx datapaths implementations (e.g. EF10 native).

EF10 native Rx datapath has its own understanding of the maximum
RxQ fill level imposed by EvQ clear strategy and space reserved
for Rx error and flush events.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
6 years agonet/avf: enable Rx interrupt
Jingjing Wu [Wed, 10 Jan 2018 13:02:06 +0000 (21:02 +0800)]
net/avf: enable Rx interrupt

Update the doc for the AVF features either.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
6 years agonet/avf: enable bulk allocate Rx
Wenzhuo Lu [Wed, 10 Jan 2018 13:02:05 +0000 (21:02 +0800)]
net/avf: enable bulk allocate Rx

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
6 years agonet/avf: enable SSE Rx Tx
Jingjing Wu [Wed, 10 Jan 2018 13:02:04 +0000 (21:02 +0800)]
net/avf: enable SSE Rx Tx

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
6 years agonet/i40e: support AVF basic interface
Jingjing Wu [Wed, 10 Jan 2018 13:02:03 +0000 (21:02 +0800)]
net/i40e: support AVF basic interface

Enable Virtchnl offload Caps negotiation and RSS_PF offload
to support AVF basic interface.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
6 years agonet/avf: enable ops to check queue info and status
Jingjing Wu [Wed, 10 Jan 2018 13:02:02 +0000 (21:02 +0800)]
net/avf: enable ops to check queue info and status

 - rxq_info_get
 - txq_info_get
 - rx_queue_count
 - rx_descriptor_status
 - tx_descriptor_status

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
6 years agonet/avf: enable ops for MTU setting
Jingjing Wu [Wed, 10 Jan 2018 13:02:01 +0000 (21:02 +0800)]
net/avf: enable ops for MTU setting

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
6 years agonet/avf: enable ops for RSS setting
Jingjing Wu [Wed, 10 Jan 2018 13:02:00 +0000 (21:02 +0800)]
net/avf: enable ops for RSS setting

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
6 years agonet/avf: enable MAC VLAN and promisc ops
Jingjing Wu [Wed, 10 Jan 2018 13:01:59 +0000 (21:01 +0800)]
net/avf: enable MAC VLAN and promisc ops

 - promiscuous_enable
 - promiscuous_disable
 - allmulticast_enable
 - allmulticast_disable
 - mac_addr_add
 - mac_addr_remove
 - mac_addr_set
 - vlan_filter_set
 - vlan_offload_set

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
6 years agonet/avf: support stats
Jingjing Wu [Wed, 10 Jan 2018 13:01:58 +0000 (21:01 +0800)]
net/avf: support stats

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
6 years agonet/avf: enable link status update
Jingjing Wu [Wed, 10 Jan 2018 13:01:57 +0000 (21:01 +0800)]
net/avf: enable link status update

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
6 years agonet/avf: enable basic Rx Tx
Wenzhuo Lu [Wed, 10 Jan 2018 13:01:56 +0000 (21:01 +0800)]
net/avf: enable basic Rx Tx

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
6 years agonet/avf: enable queue and device
Jingjing Wu [Wed, 10 Jan 2018 13:01:55 +0000 (21:01 +0800)]
net/avf: enable queue and device

enable device and queue setup ops like:

 - dev_configure
 - dev_start
 - dev_stop
 - dev_close
 - dev_infos_get
 - rx_queue_start
 - rx_queue_stop
 - tx_queue_start
 - tx_queue_stop
 - rx_queue_setup
 - rx_queue_release
 - tx_queue_setup
 - tx_queue_release

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
6 years agonet/avf: initialize PMD
Jingjing Wu [Wed, 10 Jan 2018 13:01:54 +0000 (21:01 +0800)]
net/avf: initialize PMD

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
6 years agonet/avf/base: add base code for avf PMD
Jingjing Wu [Wed, 10 Jan 2018 13:01:53 +0000 (21:01 +0800)]
net/avf/base: add base code for avf PMD

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
6 years agonet/mlx4: convert to new Rx offloads API
Shahaf Shuler [Wed, 10 Jan 2018 09:17:03 +0000 (11:17 +0200)]
net/mlx4: convert to new Rx offloads API

Ethdev Rx offloads API has changed since:

commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")

This commit support the new Rx offloads API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
6 years agonet/mlx4: convert to new Tx offloads API
Shahaf Shuler [Wed, 10 Jan 2018 09:17:02 +0000 (11:17 +0200)]
net/mlx4: convert to new Tx offloads API

Ethdev Tx offloads API has changed since:

commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")

This commit support the new Tx offloads API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
6 years agonet/mlx5: convert to new Rx offloads API
Shahaf Shuler [Wed, 10 Jan 2018 09:17:01 +0000 (11:17 +0200)]
net/mlx5: convert to new Rx offloads API

Ethdev Rx offloads API has changed since:

commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")

This commit support the new Rx offloads API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
6 years agonet/mlx5: convert to new Tx offloads API
Shahaf Shuler [Wed, 10 Jan 2018 09:17:00 +0000 (11:17 +0200)]
net/mlx5: convert to new Tx offloads API

Ethdev Tx offloads API has changed since:

commit cba7f53b717d ("ethdev: introduce Tx queue offloads API")

This commit support the new Tx offloads API.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
6 years agonet/mlx5: rename counter set in configuration
Nelio Laranjeiro [Wed, 10 Jan 2018 09:16:59 +0000 (11:16 +0200)]
net/mlx5: rename counter set in configuration

Counter_set is a counter used for flows when its support is available.
Renaming it to flow counter.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
6 years agonet/mlx5: add device configuration structure
Shahaf Shuler [Wed, 10 Jan 2018 09:16:58 +0000 (11:16 +0200)]
net/mlx5: add device configuration structure

Move device configuration and features capabilities to its own structure.
This structure is filled by mlx5_pci_probe(), outside of this function
it should be treated as *read only*.

This configuration struct will be used for the Tx/Rx queue setup to
select the Tx/Rx queue parameters based on the user configuration and
device capabilities.
In addition it will be used by the burst selection function to decide
on the best pkt burst to be used.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
6 years agonet/mlx5: change pkt burst select function prototype
Shahaf Shuler [Wed, 10 Jan 2018 09:16:57 +0000 (11:16 +0200)]
net/mlx5: change pkt burst select function prototype

Change the function prototype to return the function pointer of the
selected Tx/Rx burst function instead of assigning it directly to the
device context.

Such change will enable to use those select functions to query the burst
function that will be selected according to the device configuration.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
6 years agonet/mlx5: fix overwriting bit-fields in SW Rx queue
Yongseok Koh [Tue, 9 Jan 2018 17:38:50 +0000 (09:38 -0800)]
net/mlx5: fix overwriting bit-fields in SW Rx queue

Bit-fields in mlx5_rxq_data can be changed on the fly by a control plane -
e.g. rxq->mark. However, vectorized Rx uses a bit-field to mark pending
errors. Even if one bit is written, consequence is to write the whole
integer and this can cause a synchronization issue - two entities write to
a same block without locking. As the pending_err bit is entirely internal
use for the datapath, this can be replaced with a local variable.

Fixes: 6cb559d67b83 ("net/mlx5: add vectorized Rx/Tx burst for x86")
Fixes: 570acdb1da8a ("net/mlx5: add vectorized Rx/Tx burst for ARM")
Cc: stable@dpdk.org
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
6 years agonet/mlx4: verify Tx max sges
Moti Haimovsky [Thu, 4 Jan 2018 16:12:03 +0000 (18:12 +0200)]
net/mlx4: verify Tx max sges

Max number of Tx scatter-gather entries is a property of the device
and is queried at init. This value was not changed in a while and
most probably will not be changed in the future, Therefore and
in order to enhance Tx performance, the Tx max-sge value is hardcoded
in mlx4 PRM code.
This patch adds a verification that the above assumption still holds
and that the hardcoded value is still supported by the mlx4 hardware.

Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agodoc: describe raw mode of FDIR in testpmd
Kirill Rybalchenko [Thu, 23 Nov 2017 16:15:01 +0000 (16:15 +0000)]
doc: describe raw mode of FDIR in testpmd

Add description of raw flow type mode for flow_director_filter
command in testpmd. Modify description of flow type parameter
for functions set_hash_global_config, set_hash_input_set and
set_fdir_input_set.

Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
6 years agoapp/testpmd: add raw flow type mode for FDIR
Kirill Rybalchenko [Thu, 23 Nov 2017 16:15:00 +0000 (16:15 +0000)]
app/testpmd: add raw flow type mode for FDIR

Add possibility to load file with raw packet and set it as a
template for FDIR setup.

Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
6 years agonet/i40e: fix VSI MAC filter on primary address change
Olivier Matz [Wed, 3 Jan 2018 14:29:23 +0000 (15:29 +0100)]
net/i40e: fix VSI MAC filter on primary address change

When primary address mac is changed, the mac filters were not updated in
the VSI with the new mac addr and incoming packets with this destination
address are dropped by the hardware filters.

This patch removes the VSI mac filter for the previous mac address and
adds a new one for new mac address.

Fixes: e18e01e92c29 ("i40e: support default MAC address setting")
Cc: stable@dpdk.org
Signed-off-by: Laurent Hardy <laurent.hardy@6wind.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
6 years agonet/i40e: add AVX2 Rx function
Bruce Richardson [Tue, 9 Jan 2018 14:32:54 +0000 (14:32 +0000)]
net/i40e: add AVX2 Rx function

Add a new Rx function using AVX2 instructions for higher
performance. For now, this functionality is limited to platforms
with Intel Xeon Scalable Processor(SP). The function to be used
is selected at runtime, not just at compile-time.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
6 years agonet/i40e: add AVX2 Tx function
Bruce Richardson [Tue, 9 Jan 2018 14:32:53 +0000 (14:32 +0000)]
net/i40e: add AVX2 Tx function

Add a new Tx function using AVX2 instructions for higher
performance. For now, this functionality is limited to platforms
with Intel Xeon Scalable Processor(SP). The function to be used
is selected at runtime, not just at compile-time.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
6 years agonet/ixgbe/base: update README file
Qiming Yang [Wed, 10 Jan 2018 16:04:39 +0000 (00:04 +0800)]
net/ixgbe/base: update README file

Update README file to specify the version of drops.

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
6 years agonet/ixgbe/base: add media type of fixed fiber
Qiming Yang [Wed, 10 Jan 2018 16:04:38 +0000 (00:04 +0800)]
net/ixgbe/base: add media type of fixed fiber

This patch adds new media type support of fixed fiber.

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
6 years agonet/ixgbe/base: update annotations
Qiming Yang [Wed, 10 Jan 2018 16:04:37 +0000 (00:04 +0800)]
net/ixgbe/base: update annotations

This patch mainly adds/removes comments for function parameters
that were missing or no longer needed.

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
6 years agonet/ixgbe/base: clear sync register during init
Qiming Yang [Wed, 10 Jan 2018 16:04:36 +0000 (00:04 +0800)]
net/ixgbe/base: clear sync register during init

This patch clears software resource bits in synchronization
register and updates host interface resource bit error case for
X540. It also fixes compile warnings of using GCC 7.

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
6 years agonet/ixgbe/base: use 2 bytes for flash read command
Qiming Yang [Wed, 10 Jan 2018 16:04:35 +0000 (00:04 +0800)]
net/ixgbe/base: use 2 bytes for flash read command

With this patch, it uses 2 bytes of buffer reading, as required
for flash read command. It also adds definitions for LESM module.

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
6 years agonet/ixgbe/base: add PHY read and write
Qiming Yang [Wed, 10 Jan 2018 16:04:34 +0000 (00:04 +0800)]
net/ixgbe/base: add PHY read and write

This patch adds lockless read/write support for clause 22 PHY,
together with some enhancements for link speed and return value
handling.

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
6 years agonet/ixgbe/base: increase the timeout
Qiming Yang [Wed, 10 Jan 2018 16:04:33 +0000 (00:04 +0800)]
net/ixgbe/base: increase the timeout

Increase SECRX_RDY polling frequency and semaphore timeout which
fixes the FWSW.PT check in ixgbe_mng_present().

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
6 years agonet/ixgbe/base: add functions to get version info
Qiming Yang [Wed, 10 Jan 2018 16:04:32 +0000 (00:04 +0800)]
net/ixgbe/base: add functions to get version info

Add common functions for getting OEM product version, option
ROM version, and ETrack id.

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
6 years agonet/i40e/base: update base code info
Qi Zhang [Tue, 9 Jan 2018 20:30:22 +0000 (15:30 -0500)]
net/i40e/base: update base code info

Update README file to specify the version of drop.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
6 years agonet/i40e/base: rename a field
Qi Zhang [Tue, 9 Jan 2018 20:30:21 +0000 (15:30 -0500)]
net/i40e/base: rename a field

Rename virtchnl_vf_resource's vf_offload_flags to vf_cap_flags.
The new name is more generic, so more than just offloading
capabilities can be added.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
6 years agonet/i40e/base: fix unaligned data issue
Qi Zhang [Tue, 9 Jan 2018 20:30:20 +0000 (15:30 -0500)]
net/i40e/base: fix unaligned data issue

This fix prevents errors or warnings while accessing unaligned 32-bit
data words on non-x86 platforms during getting link info from firmware.

Fixes: e8228f1a16b7 ("net/i40e/base: report supported link modes")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
6 years agonet/i40e/base: fix reading LLDP configuration
Qi Zhang [Tue, 9 Jan 2018 20:30:19 +0000 (15:30 -0500)]
net/i40e/base: fix reading LLDP configuration

Previous method for reading LLDP config was based on hard-coded offsets.
It happened to work, because of structured architecture of the NVM memory.
In the new approach, known as FLAT, we need to calculate the absolute
address, instead of using relative values. Needed defines for memory
location were added.

Fixes: 8db9e2a1b232 ("i40e: base driver")
CC: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
6 years agonet/i40e/base: fix compile issue for GCC 6.3
Qi Zhang [Tue, 9 Jan 2018 20:30:18 +0000 (15:30 -0500)]
net/i40e/base: fix compile issue for GCC 6.3

When using GCC 6.3.0 and EXTRA_CFLAGS=-Og, the compiler is not smart
enough to see that when you have an integrated VF that just one of the
if statemets has to be true so that ntu is always set. Fix the way that
the code is for integrated VFs so that the compiler won't complain.

Fixes: 9783eb15eb98 ("i40e/base: wrap the register definitions for PF and VF")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
6 years agonet/i40e/base: add AQ critical error type
Qi Zhang [Tue, 9 Jan 2018 20:30:17 +0000 (15:30 -0500)]
net/i40e/base: add AQ critical error type

The FW has the ability to return a critical error on every AQ command.
So add the new return type as critical error to sync with firmware.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
6 years agonet/i40e/base: add rearrange process AQ command
Qi Zhang [Tue, 9 Jan 2018 20:30:16 +0000 (15:30 -0500)]
net/i40e/base: add rearrange process AQ command

Add new AQ command that help to inform software how advanced
rearrangement process is.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
6 years agonet/i40e/base: enhance loopback AQ command
Qi Zhang [Tue, 9 Jan 2018 20:30:15 +0000 (15:30 -0500)]
net/i40e/base: enhance loopback AQ command

Enhanced loopback AQ command to allow variety of loopback modes.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
6 years agonet/i40e/base: add defines for flat NVM
Qi Zhang [Tue, 9 Jan 2018 20:30:14 +0000 (15:30 -0500)]
net/i40e/base: add defines for flat NVM

New control bits were defined for flat NVM structure.
One for pointing which NVM bank is currently used and
one used as indicator of structure type.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
6 years agonet/i40e/base: fix link LED blink
Qi Zhang [Tue, 9 Jan 2018 20:30:13 +0000 (15:30 -0500)]
net/i40e/base: fix link LED blink

This fix solves an issue occurring while calling i40e_led_set function
from the driver with "blink" parameter set as TRUE. This call resulted
in Activity LED blinking instead of Link LED, which may lead to errors
in physically identyfying the port, since Activity LED may be blinking
for different reasons aswell.

Fixes: 51b27bc5d898 ("i40e/base: update LED blinking")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
6 years agonet/i40e/base: enable AQ event get in NVM update
Qi Zhang [Tue, 9 Jan 2018 20:30:12 +0000 (15:30 -0500)]
net/i40e/base: enable AQ event get in NVM update

This patch adds new I40E_NVMUPD_GET_AQ_EVENT state
to allow retrieval of AdminQ events as a result.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
6 years agonet/i40e/base: add NVM update preservation flags
Qi Zhang [Tue, 9 Jan 2018 20:30:11 +0000 (15:30 -0500)]
net/i40e/base: add NVM update preservation flags

Add preservation flags support on X722 devices for NVM update AdminQ
function wrapper. Add new parameter and handling to nvm update admin
queue function intended to allow nvmupdate tool to configure the
preservation flags in the AdminQ command.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>