dpdk.git
6 years agonet/sfc: use default FEC mode
Andrew Rybchenko [Tue, 10 Apr 2018 12:48:25 +0000 (13:48 +0100)]
net/sfc: use default FEC mode

All FEC modes are supported and allowed, but none are explicitly
requested.

This effectively means that FEC mode is determined solely form cable
requirements and link partner capabilities / requirements.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/i40e: fix using error set function
Wei Zhao [Mon, 9 Apr 2018 02:26:32 +0000 (10:26 +0800)]
net/i40e: fix using error set function

There is a specific function to set error for flow configuration,
so change to use that function.

Fixes: ecad87d22383 ("net/i40e: move RSS to flow API")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
6 years agonet/i40e: add comment and clean code for flow RSS
Wei Zhao [Wed, 11 Apr 2018 03:24:32 +0000 (11:24 +0800)]
net/i40e: add comment and clean code for flow RSS

This patch add comment for flow rss parse function in order
to explain some important info. This patch also delete some
useless code for queue index check for RSS queue region
configuration.

Fixes: ecad87d22383 ("net/i40e: move RSS to flow API")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
6 years agonet/vhost: fix invalid state
Junjie Chen [Wed, 11 Apr 2018 17:02:32 +0000 (13:02 -0400)]
net/vhost: fix invalid state

dev_start sets *dev_attached* after setup queues, this sets device to
invalid state since no frontend is attached. Also destroy_device set
*started* to zero which makes *allow_queuing* always zero until dev_start
get called again. Actually, we should not determine queues existence by
*dev_attached* but by queues pointers or other separated variable(s).

Fixes: 30a701a53737 ("net/vhost: fix crash when creating vdev dynamically")
Cc: stable@dpdk.org
Signed-off-by: Junjie Chen <junjie.j.chen@intel.com>
Tested-by: Jens Freimann <jfreimann@redhat.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
6 years agonet/vhost: insert/strip VLAN header in software
Jan Blunck [Thu, 29 Mar 2018 16:05:07 +0000 (12:05 -0400)]
net/vhost: insert/strip VLAN header in software

This lets the vhost driver handle the VLAN header like the virtio driver
in software.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
6 years agoethdev: return diagnostic when setting MAC address
Olivier Matz [Wed, 11 Apr 2018 16:32:51 +0000 (18:32 +0200)]
ethdev: return diagnostic when setting MAC address

Change the prototype and the behavior of dev_ops->eth_mac_addr_set(): a
return code is added to notify the caller (librte_ether) if an error
occurred in the PMD.

The new default MAC address is now copied in dev->data->mac_addrs[0]
only if the operation is successful.

The patch also updates all the PMDs accordingly.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
6 years agonet/mlx5: fix link status initialization
Shahaf Shuler [Tue, 10 Apr 2018 06:13:36 +0000 (09:13 +0300)]
net/mlx5: fix link status initialization

Following commit 7ba5320baa32 ("net/mlx5: fix link status behavior")
The initial link status is no longer set as part of the port start.

When LSC interrupts are enabled, ethdev layer reads the link status
directly from the device data instead of using the PMD callback.
This may cause application to query the link as down while in fact it was
already up before the DPDK application start (and no interrupt to fix
it).

Fixes: 7ba5320baa32 ("net/mlx5: fix link status behavior")
Cc: stable@dpdk.org
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
6 years agonet/mlx4: support CRC strip toggling
Ophir Munk [Sun, 25 Mar 2018 20:19:29 +0000 (20:19 +0000)]
net/mlx4: support CRC strip toggling

Previous to this commit mlx4 CRC stripping was executed by default and
there was no verbs API to disable it.

Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agonet/ixgbe: allow setting 2.5G and 5G speeds on X550
Martin Weiser [Fri, 26 Jan 2018 09:30:24 +0000 (10:30 +0100)]
net/ixgbe: allow setting 2.5G and 5G speeds on X550

This patch adds support for explicitly selecting 2.5G and 5G speeds on
X550.

Signed-off-by: Martin Weiser <martin.weiser@allegro-packets.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
6 years agonet/i40e: fix DDP profile DEL operation
Beilei Xing [Wed, 7 Feb 2018 08:40:59 +0000 (16:40 +0800)]
net/i40e: fix DDP profile DEL operation

Customized info will be updated when processing DDP package,
including PCYPE/PTYPE/protocol. Previously, the customized info
is updated without any check for package operation - ADD or DEL,
but only covers ADD operation. In this situation, even if a package
is being removed, new PCTYPE/PTYPE/protocol will still be created,
it will cause wrong parsing for SW. This patch cleans new
PCTYPE/PTYPE/protocol created when a package is being removed.

Fixes: e163c18a15b0 ("net/i40e: update ptype and pctype info")
Cc: stable@dpdk.org
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
6 years agodoc: add driver limitation for vhost dequeue zero copy
Junjie Chen [Wed, 14 Mar 2018 16:24:16 +0000 (12:24 -0400)]
doc: add driver limitation for vhost dequeue zero copy

In vhost-switch example, when binding nic to vfio-pci with iommu enabled,
dequeue zero copy cannot work in VM2NIC mode due to no iommu dma mapping
is setup for guest memory currently.

Signed-off-by: Junjie Chen <junjie.j.chen@intel.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
6 years agonet/virtio-user: support server mode
Zhiyong Yang [Fri, 6 Apr 2018 09:25:54 +0000 (17:25 +0800)]
net/virtio-user: support server mode

In a container environment if the vhost-user backend restarts, there's
no way for it to reconnect to virtio-user. To address this, support for
server mode is added. In this mode the socket file is created by virtio-
user, which the backend then connects to. This means that if the backend
restarts, it can reconnect to virtio-user and continue communications.

With current implementation, LSC is enabled at virtio-user side to
support to accept the coming connection.

Server mode virtio-user only supports to work with vhost-user.

Release note is updated in this patch.

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
6 years agoexamples/vhost_crypto: add sample application
Fan Zhang [Thu, 5 Apr 2018 16:01:36 +0000 (17:01 +0100)]
examples/vhost_crypto: add sample application

This patch adds vhost_crypto sample application to DPDK.

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Jay Zhou <jianjay.zhou@huawei.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
6 years agovhost/crypto: add public function implementation
Fan Zhang [Thu, 5 Apr 2018 16:01:34 +0000 (17:01 +0100)]
vhost/crypto: add public function implementation

This patch adds public API implementation to vhost crypto.

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Jay Zhou <jianjay.zhou@huawei.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
6 years agovhost/crypto: add request handler
Fan Zhang [Thu, 5 Apr 2018 16:01:33 +0000 (17:01 +0100)]
vhost/crypto: add request handler

This patch adds the implementation that parses virtio crypto request
to dpdk crypto operation.

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Jay Zhou <jianjay.zhou@huawei.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
6 years agovhost/crypto: add session message handler
Fan Zhang [Thu, 5 Apr 2018 16:01:32 +0000 (17:01 +0100)]
vhost/crypto: add session message handler

This patch adds session message handler to vhost crypto.

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Jay Zhou <jianjay.zhou@huawei.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
6 years agovhost/crypto: add user message structure
Fan Zhang [Thu, 5 Apr 2018 16:01:31 +0000 (17:01 +0100)]
vhost/crypto: add user message structure

This patch adds virtio-crypto spec user message structure to
vhost_user.

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Jay Zhou <jianjay.zhou@huawei.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
6 years agovhost/crypto: add vhost-user message handlers
Fan Zhang [Thu, 5 Apr 2018 16:01:30 +0000 (17:01 +0100)]
vhost/crypto: add vhost-user message handlers

Previously, vhost library lacks the support to the vhost backend
other than net such as adding private data or registering vhost-user
message handlers. This patch fills the gap by adding data pointer and
vhost-user pre and post message handlers to vhost library.

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Jay Zhou <jianjay.zhou@huawei.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
6 years agovhost: add virtio crypto header file
Jay Zhou [Thu, 5 Apr 2018 14:37:33 +0000 (22:37 +0800)]
vhost: add virtio crypto header file

Since the linux kernel header file virtio_crypto.h has been merged
in 4.9, if we include this header file directly, compilation will be
failed in the old kernels' environment, e.g. the vhost crypto backend
series.
Adding virtio_crypto.h in librte_vhost to make old kernels happy.

Signed-off-by: Jay Zhou <jianjay.zhou@huawei.com>
Signed-off-by: Lei Gong <arei.gonglei@huawei.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
6 years agoapp/testpmd: make use of per-PMD Tx/Rx parameters
Remy Horton [Tue, 10 Apr 2018 09:43:19 +0000 (10:43 +0100)]
app/testpmd: make use of per-PMD Tx/Rx parameters

The optimal values of several transmission & reception related
parameters, such as burst sizes, descriptor ring sizes, and number
of queues, varies between different network interface devices. This
patch allows testpmd to make use of per-PMD tuned parameter values.

Signed-off-by: Remy Horton <remy.horton@intel.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
6 years agonet/i40e: add Tx/Rx tuning parameters
Remy Horton [Tue, 10 Apr 2018 09:43:18 +0000 (10:43 +0100)]
net/i40e: add Tx/Rx tuning parameters

The optimal values of several transmission & reception related
parameters, such as burst sizes, descriptor ring sizes, and number
of queues, varies between different network interface devices. This
patch allows individual PMDs to specify preferred parameter values.

Signed-off-by: Remy Horton <remy.horton@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/e1000: add Tx/Rx tuning parameters
Remy Horton [Tue, 10 Apr 2018 09:43:17 +0000 (10:43 +0100)]
net/e1000: add Tx/Rx tuning parameters

The optimal values of several transmission & reception related
parameters, such as burst sizes, descriptor ring sizes, and number
of queues, varies between different network interface devices. This
patch allows individual PMDs to specify preferred parameter values.

Signed-off-by: Remy Horton <remy.horton@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoethdev: support PMD-tuned Tx/Rx parameters
Remy Horton [Tue, 10 Apr 2018 09:43:16 +0000 (10:43 +0100)]
ethdev: support PMD-tuned Tx/Rx parameters

The optimal values of several transmission & reception related
parameters, such as burst sizes, descriptor ring sizes, and number
of queues, varies between different network interface devices. This
patch allows individual PMDs to specify preferred parameter values.

Signed-off-by: Remy Horton <remy.horton@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
6 years agoethdev: fix link status query
Shahaf Shuler [Tue, 10 Apr 2018 06:16:31 +0000 (09:16 +0300)]
ethdev: fix link status query

When application works with LSC interrupts the ethdev layer skips
the PMD callback and update according to the link status exists on
device data. It is because it assumes the link status on the device data
is the correct one since any link change is processed by the application.

As multiple PMDs install the link status interrupt handler only on port
start and uninstall it on port stop, the link status may be incorrect in
case the query is called after port stop or before port start.

Fixing the query implementation to use the PMD callback for such cases.

Fixes: b77d21cc2364 ("ethdev: add link status get/set helper functions")
Cc: stable@dpdk.org
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
6 years agoethdev: replace bus specific struct with generic dev
Ferruh Yigit [Mon, 9 Apr 2018 12:09:38 +0000 (13:09 +0100)]
ethdev: replace bus specific struct with generic dev

Public struct rte_eth_dev_info has a "struct rte_pci_device" field in it
although it is common for all ethdev in all buses.

Replacing pci specific struct with generic device struct and updating
places that are using pci device in a way to get this information from
generic device.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@6wind.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
6 years agoapp/testpmd: add commands to set loopback mode
Andrew Rybchenko [Mon, 9 Apr 2018 11:58:59 +0000 (12:58 +0100)]
app/testpmd: add commands to set loopback mode

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/sfc: support loopback mode configuration
Andrew Rybchenko [Mon, 9 Apr 2018 11:58:58 +0000 (12:58 +0100)]
net/sfc: support loopback mode configuration

All loopback modes are listed in efx_loopback_type_t.
Available loopback modes are listed per link speed in
the enc_loopback_types member of the efx_nic_cfg_t.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
6 years agonet/sfc/base: fix comparison always true warning
Andrew Rybchenko [Mon, 9 Apr 2018 11:58:57 +0000 (12:58 +0100)]
net/sfc/base: fix comparison always true warning

Loopback type used as bit index has efx_loopback_type_t type
which is enum. clang complains that it is always true when it
is compared with qword (64 bit) bits number boundary.

Fixes: 9ee64bd404fc ("net/sfc/base: import loopback control")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/bnx2x: convert to new Rx offloads API
Harish Patil [Mon, 9 Apr 2018 05:37:41 +0000 (22:37 -0700)]
net/bnx2x: convert to new Rx offloads API

Ethdev RX offloads API has changed since:
commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API")

This patch makes use of DEV_RX_OFFLOAD_JUMBO_FRAME offload flag
to advertise jumbo frame support.

Signed-off-by: Harish Patil <harish.patil@cavium.com>
6 years agonet/qede: update PMD version to 2.8.0.1
Rasesh Mody [Mon, 9 Apr 2018 04:48:10 +0000 (21:48 -0700)]
net/qede: update PMD version to 2.8.0.1

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: support packet pacing
Rasesh Mody [Mon, 9 Apr 2018 04:48:09 +0000 (21:48 -0700)]
net/qede/base: support packet pacing

Add packet pacing support for PFs.
ecore client can request for enabling packet pacing at init time,
if requested then ecore is going to skip MCoS and SRIOV configurations.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: fix to support OVLAN mode
Rasesh Mody [Mon, 9 Apr 2018 04:48:08 +0000 (21:48 -0700)]
net/qede/base: fix to support OVLAN mode

This fix allows driver to program NIC configuration to support OVLAN
mode in multi-function scenario

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: add APIs for xcvr
Rasesh Mody [Mon, 9 Apr 2018 04:48:07 +0000 (21:48 -0700)]
net/qede/base: add APIs for xcvr

Add API to query transceiver info and to retrieve link speed.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: add stats counter for link state
Rasesh Mody [Mon, 9 Apr 2018 04:48:06 +0000 (21:48 -0700)]
net/qede/base: add stats counter for link state

Add link_change_count counter to track number of link state transitions

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: refine error handling
Rasesh Mody [Mon, 9 Apr 2018 04:48:05 +0000 (21:48 -0700)]
net/qede/base: refine error handling

Adjust the verbosity of the log messages and add preventive checks for
errors.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: support MFW for driver load timeout
Rasesh Mody [Mon, 9 Apr 2018 04:48:04 +0000 (21:48 -0700)]
net/qede/base: support MFW for driver load timeout

Add SPQ timeout base driver parameter support management FW timeout values
other than default and none. Have fallback mechanism for old MFWs.
Reduce the default timeout to 1 sec.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: allow changing VF MAC address
Rasesh Mody [Mon, 9 Apr 2018 04:48:03 +0000 (21:48 -0700)]
net/qede/base: allow changing VF MAC address

This patch allows VF to change its own MAC address regardless of MAC set
by PF

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: add new chain API
Rasesh Mody [Mon, 9 Apr 2018 04:48:02 +0000 (21:48 -0700)]
net/qede/base: add new chain API

Add new API ecore_chain_set_cons() and fix page index setting in
ecore_chain_set_prod(). The new API is for future use.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: semantic changes
Rasesh Mody [Mon, 9 Apr 2018 04:48:01 +0000 (21:48 -0700)]
net/qede/base: semantic changes

The changes included in this patch are for
 - formatting
 - comment rework/additions
 - relocate FW info, version related code
 - convert:
    __le16 to u16
    __le32 to u32 etc.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: upgrade FW to 8.33.12.0
Rasesh Mody [Mon, 9 Apr 2018 04:48:00 +0000 (21:48 -0700)]
net/qede/base: upgrade FW to 8.33.12.0

This patch adds changes to support new firmware 8.33.12.0. The changes
consist of FW bug fixes and enhancements.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: add DMAE sanity check
Rasesh Mody [Mon, 9 Apr 2018 04:47:59 +0000 (21:47 -0700)]
net/qede/base: add DMAE sanity check

Add DMA engine sanity check during the engine initialization and before
PF initialization

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: protect DMAE transactions
Rasesh Mody [Mon, 9 Apr 2018 04:47:58 +0000 (21:47 -0700)]
net/qede/base: protect DMAE transactions

Protect DMAE transactions with a spinlock instead of a mutex

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede/base: use path ID for HW init
Rasesh Mody [Mon, 9 Apr 2018 04:47:57 +0000 (21:47 -0700)]
net/qede/base: use path ID for HW init

Use the path ID as the phase ID when running the engine phase of the
HW init

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/bnxt: switch to the new offload API
Ajit Khaparde [Sat, 7 Apr 2018 17:40:55 +0000 (10:40 -0700)]
net/bnxt: switch to the new offload API

Update bnxt PMD to new ethdev offloads API.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agonet/bnxt: fix Rx drop setting
Ajit Khaparde [Sat, 7 Apr 2018 17:40:54 +0000 (10:40 -0700)]
net/bnxt: fix Rx drop setting

If Rx descriptors are not available, pkts are dropped by default.
Fix rx_drop_en setting in bnxt_dev_info_get_op to reflect it.

Fixes: 0a6d2a720078 ("net/bnxt: get device infos")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agodoc: add timestamp offload to mlx5 features
Yongseok Koh [Mon, 2 Apr 2018 17:01:22 +0000 (10:01 -0700)]
doc: add timestamp offload to mlx5 features

Fixes: 78c7406b7b5a ("net/mlx5: add Rx HW timestamp")
Cc: stable@dpdk.org
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agonet/mlx5: add parameter for Netlink support in VF
NĂ©lio Laranjeiro [Thu, 5 Apr 2018 15:07:21 +0000 (17:07 +0200)]
net/mlx5: add parameter for Netlink support in VF

All Netlink request the PMD will do can also be done by a iproute2 command
line interface, enabling VF behavior configuration without having to modify
the application nor reaching PMD limits (e.g. MAC address number limit).

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agonet/mlx5: use Netlink to enable promisc/allmulti mode
NĂ©lio Laranjeiro [Thu, 5 Apr 2018 15:07:20 +0000 (17:07 +0200)]
net/mlx5: use Netlink to enable promisc/allmulti mode

VF devices are not able to receive promisc or allmulti traffic unless it
fully requests it though Netlink.  This will cause the request to be
processed by the PF which will handle the request and enable it.

This requires the VF to be trusted by the PF.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agonet/mlx5: use Netlink to add/remove MAC addresses
NĂ©lio Laranjeiro [Thu, 5 Apr 2018 15:07:19 +0000 (17:07 +0200)]
net/mlx5: use Netlink to add/remove MAC addresses

VF devices are not able to receive traffic unless it fully requests it
though Netlink.  This will cause the request to be processed by the PF
which will add/remove the MAC address to the VF table if the VF is trusted.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agonet/ixgbe: update link status on start
Chas Williams [Tue, 13 Feb 2018 22:56:18 +0000 (17:56 -0500)]
net/ixgbe: update link status on start

dev->data->eth_link isn't updated until the first interrupt. If a
link is carrier down, then this interrupt may never happen. Before we
finished starting the PMD, call ixgbe_dev_link_update() to ensure we
have a valid status.

Signed-off-by: Chas Williams <chas3@att.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
6 years agonet/ixgbe: fix busy wait during checking link status
Chas Williams [Thu, 1 Feb 2018 22:39:07 +0000 (17:39 -0500)]
net/ixgbe: fix busy wait during checking link status

If we haven't set wait_to_complete, there is no need to busy wait
until we have a link status.  Applications, like bonding, use the
wait_to_complete flag to indicate that they will be doing their own
busy wait and will likely be polling again shortly.

Fixes: dc66e5fd01b9 ("net/ixgbe: improve link state check on VF")
Cc: stable@dpdk.org
Signed-off-by: Chas Williams <chas3@att.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
6 years agonet/i40e: fix flow RSS queue index check
Wei Zhao [Wed, 4 Apr 2018 08:06:03 +0000 (16:06 +0800)]
net/i40e: fix flow RSS queue index check

There need a queue index check for RSS queue region
in order to aviod error from configuration.

Fixes: ecad87d22383 ("net/i40e: move RSS to flow API")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
6 years agonet/i40e: fix flow RSS queue region
Wei Zhao [Tue, 3 Apr 2018 06:09:08 +0000 (14:09 +0800)]
net/i40e: fix flow RSS queue region

Queue region comparison error in configuration parameters.

Fixes: ecad87d22383 ("net/i40e: move RSS to flow API")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
6 years agonet/e1000: add MAC address set to em
Chas Williams [Mon, 19 Feb 2018 00:39:55 +0000 (19:39 -0500)]
net/e1000: add MAC address set to em

Based on the equivalent code in the igb driver.

Signed-off-by: Chas Williams <chas3@att.com>
Reviewed-by: David Marchand <david.marchand@6wind.com>
Acked-by: Wei Zhao <wei.zhao1@intel.com>
6 years agodoc: sort qede feature list
Ferruh Yigit [Thu, 22 Mar 2018 18:17:46 +0000 (18:17 +0000)]
doc: sort qede feature list

Sort list to be same order as default.ini. No value changed.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/sfc: support choice of FW subvariant without Tx checksum
Andrew Rybchenko [Wed, 4 Apr 2018 14:23:57 +0000 (15:23 +0100)]
net/sfc: support choice of FW subvariant without Tx checksum

If running FW variant supports subvariant without checksumming
on transmit and all transmit queues do not use checksumming,
it may be disabled.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: support FW subvariant choice
Andrew Rybchenko [Wed, 4 Apr 2018 14:23:56 +0000 (15:23 +0100)]
net/sfc/base: support FW subvariant choice

If DPDK application or OS does not need checksumming on transmit,
it may be disabled in firmware to achieve higher packet rates.
Choice must be done before VIS allocation and is allowed if
no other non-preboot and firmware subvariant-unaware drivers are
attached.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
6 years agonet/sfc/base: report no Tx checksum FW subvariant support
Andrew Rybchenko [Wed, 4 Apr 2018 14:23:55 +0000 (15:23 +0100)]
net/sfc/base: report no Tx checksum FW subvariant support

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
6 years agonet/sfc/base: add firmware subvariant aware driver option
Andrew Rybchenko [Wed, 4 Apr 2018 14:23:54 +0000 (15:23 +0100)]
net/sfc/base: add firmware subvariant aware driver option

FW subvariants allow to tweak NIC global features. For example,
if no drivers require checksumming on transmit, it may be disabled
in FW to increase packet rate.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
6 years agonet/sfc/base: update MCDI headers
Andrew Rybchenko [Wed, 4 Apr 2018 14:23:53 +0000 (15:23 +0100)]
net/sfc/base: update MCDI headers

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/tap: add tun log and documentation
Vipin Varghese [Mon, 2 Apr 2018 21:37:48 +0000 (03:07 +0530)]
net/tap: add tun log and documentation

The changes add TUN|TAP specific logs and documentation support.

Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
6 years agonet/tap: support tun
Vipin Varghese [Mon, 2 Apr 2018 21:37:47 +0000 (03:07 +0530)]
net/tap: support tun

The change adds functional TUN PMD logic to the existing TAP PMD.
TUN PMD can be initialized with 'net_tunX' where 'X' represents unique id.
PMD supports argument interface, while MAC address and remote are not
supported.

Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
6 years agodoc: update enic guide and features
Hyong Youb Kim [Wed, 4 Apr 2018 23:54:55 +0000 (16:54 -0700)]
doc: update enic guide and features

Documentation updates including for 1400 series VIC adapters.

Remove VLAN filter from the features file as the driver does not
support that API. Hardware does support VLAN filtering, but it is not
controlled through the driver.

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
6 years agonet/enic: support drop flow action
Hyong Youb Kim [Wed, 4 Apr 2018 23:54:54 +0000 (16:54 -0700)]
net/enic: support drop flow action

1330 and 1400 series adapters support the drop action. Check for its
availability and set the necessary flag when creating NIC filters.

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
6 years agonet/enic: fix crash on MTU update with non-setup queues
John Daley [Wed, 4 Apr 2018 23:54:53 +0000 (16:54 -0700)]
net/enic: fix crash on MTU update with non-setup queues

The enic code called from rte_eth_dev_set_mtu() was assuming that the
Rx queues are already set up via a call to rte_eth_tx_queue_setup().
OVS calls rte_eth_dev_set_mtu() before rte_eth_rx_queue_setup() and
a null pointer was dereferenced.

Fixes: c3e09182bcd6 ("net/enic: support scatter Rx in MTU update")
Cc: stable@dpdk.org
Signed-off-by: John Daley <johndale@cisco.com>
Reviewed-by: Hyong Youb Kim <hyonkim@cisco.com>
6 years agonet/enic: support UDP RSS on 1400 series adapters
John Daley [Wed, 4 Apr 2018 23:54:52 +0000 (16:54 -0700)]
net/enic: support UDP RSS on 1400 series adapters

Recent models support IPv4/IPv6 UDP RSS. There is no control bit to
enable UDP RSS alone. Instead, the NIC enables/disables TCP and UDP
RSS together.

Signed-off-by: John Daley <johndale@cisco.com>
Reviewed-by: Hyong Youb Kim <hyonkim@cisco.com>
6 years agonet/enic: do not flush descriptor cache when opening vNIC
Hyong Youb Kim [Wed, 4 Apr 2018 23:54:50 +0000 (16:54 -0700)]
net/enic: do not flush descriptor cache when opening vNIC

The firmware on new hardware models flushes the global descriptor
cache by default. Use CMD_OPENF_IG_DESCCACHE to avoid cache
flushing. This flag has no effect on older models.

Suggested-by: Govindarajulu Varadarajan <gvaradar@cisco.com>
Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
6 years agonet/axgbe: support meson build
Ravi Kumar [Fri, 6 Apr 2018 12:36:51 +0000 (08:36 -0400)]
net/axgbe: support meson build

Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
6 years agonet/axgbe: add workaround for ethernet training
Ravi Kumar [Fri, 6 Apr 2018 12:36:50 +0000 (08:36 -0400)]
net/axgbe: add workaround for ethernet training

Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
6 years agonet/axgbe: support 32-bit build mode
Ravi Kumar [Fri, 6 Apr 2018 12:36:49 +0000 (08:36 -0400)]
net/axgbe: support 32-bit build mode

Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
6 years agonet/axgbe: support generic Rx/Tx stats
Ravi Kumar [Fri, 6 Apr 2018 12:36:48 +0000 (08:36 -0400)]
net/axgbe: support generic Rx/Tx stats

This patch adds support for port statistics api defined
for ethernet PMDs.

Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
6 years agonet/axgbe: support promiscuous mode
Ravi Kumar [Fri, 6 Apr 2018 12:36:47 +0000 (08:36 -0400)]
net/axgbe: support promiscuous mode

This patch enables promiscuous and multicast support for AXGBE PMD.

Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
6 years agonet/axgbe: add configure flow control while link adjustment
Ravi Kumar [Fri, 6 Apr 2018 12:36:46 +0000 (08:36 -0400)]
net/axgbe: add configure flow control while link adjustment

Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
6 years agonet/axgbe: add link status update
Ravi Kumar [Fri, 6 Apr 2018 12:36:45 +0000 (08:36 -0400)]
net/axgbe: add link status update

Added support to update device link status atomically.

Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
6 years agodoc: add guide for AMD axgbe Ethernet PMD
Ravi Kumar [Fri, 6 Apr 2018 12:36:44 +0000 (08:36 -0400)]
doc: add guide for AMD axgbe Ethernet PMD

Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
6 years agonet/axgbe: add Rx/Tx data path
Ravi Kumar [Fri, 6 Apr 2018 12:36:43 +0000 (08:36 -0400)]
net/axgbe: add Rx/Tx data path

Supported scalar implementation for RX data path.
Supported scalar and vector implementation for TX data path.

Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
6 years agonet/axgbe: add DMA programming and start/stop
Ravi Kumar [Fri, 6 Apr 2018 12:36:42 +0000 (08:36 -0400)]
net/axgbe: add DMA programming and start/stop

This patch adds support to program DMA and DPDK device start
and stop apis.

Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
6 years agonet/axgbe: add Rx/Tx setup
Ravi Kumar [Fri, 6 Apr 2018 12:36:41 +0000 (08:36 -0400)]
net/axgbe: add Rx/Tx setup

Add support for data path setup apis defined for PMDs.

Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
6 years agonet/axgbe: add interrupt handler for autonegotiation
Ravi Kumar [Fri, 6 Apr 2018 12:36:40 +0000 (08:36 -0400)]
net/axgbe: add interrupt handler for autonegotiation

Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
6 years agonet/axgbe: add phy programming APIs
Ravi Kumar [Fri, 6 Apr 2018 12:36:39 +0000 (08:36 -0400)]
net/axgbe: add phy programming APIs

Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
6 years agonet/axgbe: add phy init and related APIs
Ravi Kumar [Fri, 6 Apr 2018 12:36:38 +0000 (08:36 -0400)]
net/axgbe: add phy init and related APIs

Added device phy initialization, read/write and other
maintenance apis to be used within PMD.

Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
6 years agonet/axgbe: add structs for MAC init and reset
Ravi Kumar [Fri, 6 Apr 2018 12:36:37 +0000 (08:36 -0400)]
net/axgbe: add structs for MAC init and reset

Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
6 years agonet/axgbe: add phy register map and helper macros
Ravi Kumar [Fri, 6 Apr 2018 12:36:36 +0000 (08:36 -0400)]
net/axgbe: add phy register map and helper macros

Added phy related register definitions.

Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
6 years agonet/axgbe: add register map and related macros
Ravi Kumar [Fri, 6 Apr 2018 12:36:35 +0000 (08:36 -0400)]
net/axgbe: add register map and related macros

Added DMA and MAC related register definitions.

Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
6 years agonet/axgbe: add minimal init and uninit support
Ravi Kumar [Fri, 6 Apr 2018 12:36:34 +0000 (08:36 -0400)]
net/axgbe: add minimal init and uninit support

Add ethernet poll mode driver for AMD 10G devices embedded in
AMD EPYC™ EMBEDDED 3000 family processors.

Signed-off-by: Ravi Kumar <ravi1.kumar@amd.com>
6 years agonet/tap: fix memcpy with incorrect size
Pavan Nikhilesh [Fri, 6 Apr 2018 11:30:31 +0000 (17:00 +0530)]
net/tap: fix memcpy with incorrect size

Fix incorrect sizeof operation being used for getting mac addr size.

Found while compiling with arm64 clang.
drivers/net/tap/rte_eth_tap.c:1410:40: error: argument to 'sizeof' in
    'memcpy' call is the same pointer type 'struct ether_addr *' as the
    destination; expected 'struct ether_addr' or an explicit length
    [-Werror,-Wsizeof-pointer-memaccess]
       rte_memcpy(&pmd->eth_addr, mac_addr, sizeof(mac_addr));
                  ~~~~~~~~~~~~~~            ^~~~~~~~~~~~~~~~

Fixes: bcab6c1d27fa ("net/tap: allow user MAC to be passed as args")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Zhiyong Yang <zhiyong.yang@intel.com>
6 years agonet/nfp: support new HW offloads API
Alejandro Lucero [Thu, 15 Mar 2018 14:30:37 +0000 (14:30 +0000)]
net/nfp: support new HW offloads API

In next 18.05 the old hw offload API will be removed. This patch adds
support for just the new hw offload API.

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
6 years agonet/nfp: remove files
Alejandro Lucero [Thu, 5 Apr 2018 14:42:47 +0000 (15:42 +0100)]
net/nfp: remove files

New CPP interface makes NSPU interface obsolete. These files are
not needed anymore.

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
6 years agodoc: update NFP guide
Alejandro Lucero [Thu, 5 Apr 2018 14:42:46 +0000 (15:42 +0100)]
doc: update NFP guide

New CPP interface changes the way firmware upload is managed by
the PMD. It also supports different firmware file names for
having specific firmware applications per card.

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
6 years agonet/nfp: use new CPP interface
Alejandro Lucero [Thu, 5 Apr 2018 14:42:45 +0000 (15:42 +0100)]
net/nfp: use new CPP interface

PF PMD support was based on NSPU interface. This patch changes the
PMD for using the new CPP user space interface which gives more
flexibility for adding new functionalities.

This change just affects initialization with the datapath being the
same than before.

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
6 years agonet/nfp: support CPP
Alejandro Lucero [Thu, 5 Apr 2018 14:42:44 +0000 (15:42 +0100)]
net/nfp: support CPP

CPP refers to the internal NFP Command Push Pull bus. This patch allows
to create CPP commands from user space allowing to access any single
part of the chip.

This CPP interface is the base for having other functionalities like
mutexes when accessing specific chip components, chip resources management,
firmware upload or using the NSP, an embedded arm processor which can
perform tasks on demand.

NSP was the previous only way for doing things in the chip by the PMD,
where a NSPU interface was used for commands like firmware upload or
port link configuration. CPP interface supersedes NSPU, but it is still
possible to use NSP through CPP.

CPP interface adds a great flexibility for doing things like extended
stats or firmware debugging.

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
6 years agonet/szedata2: implement dynamic logging
Matej Vido [Wed, 4 Apr 2018 13:46:35 +0000 (15:46 +0200)]
net/szedata2: implement dynamic logging

Signed-off-by: Matej Vido <vido@cesnet.cz>
6 years agonet/szedata2: convert license headers to SPDX tags
Matej Vido [Wed, 4 Apr 2018 13:45:47 +0000 (15:45 +0200)]
net/szedata2: convert license headers to SPDX tags

Signed-off-by: Matej Vido <vido@cesnet.cz>
6 years agonet/szedata2: fix format string for PCI address
Matej Vido [Wed, 4 Apr 2018 13:42:21 +0000 (15:42 +0200)]
net/szedata2: fix format string for PCI address

For fscanf() function SCN macros should be used but PRI macros were
wrongly used.
Also use correct sizes of variables for read values.

Fixes: 83556fd2c0fc ("szedata2: change to physical device type")
Cc: stable@dpdk.org
Signed-off-by: Matej Vido <vido@cesnet.cz>
6 years agonet/szedata2: add stat of mbuf allocation failures
Matej Vido [Wed, 4 Apr 2018 13:42:20 +0000 (15:42 +0200)]
net/szedata2: add stat of mbuf allocation failures

Signed-off-by: Matej Vido <vido@cesnet.cz>
6 years agonet/szedata2: use dynamically allocated queues
Matej Vido [Wed, 4 Apr 2018 13:42:19 +0000 (15:42 +0200)]
net/szedata2: use dynamically allocated queues

Previously the queues were the part of private data structure of the
Ethernet device.
Now the queues are allocated at setup thus numa-aware allocation is
possible.

Signed-off-by: Matej Vido <vido@cesnet.cz>
6 years agonet/szedata2: fix total stats
Matej Vido [Wed, 4 Apr 2018 13:42:18 +0000 (15:42 +0200)]
net/szedata2: fix total stats

Counters from all queues have to be summed up for total stats
even though the number of queue stats counters is not sufficient.

Fixes: 83556fd2c0fc ("szedata2: change to physical device type")
Cc: stable@dpdk.org
Signed-off-by: Matej Vido <vido@cesnet.cz>
6 years agonet/bonding: switch to new offloading API
Ferruh Yigit [Thu, 22 Mar 2018 18:13:24 +0000 (18:13 +0000)]
net/bonding: switch to new offloading API

Switch to new ethdev offloading API.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
6 years agonet/bonding: clear started state if start fails
Chas Williams [Fri, 23 Mar 2018 17:05:32 +0000 (13:05 -0400)]
net/bonding: clear started state if start fails

There are several error paths where the bonding device may not start.
Clear dev_started before we return if we take one of these paths.

Fixes: 2efb58cbab6e ("bond: new link bonding library")
Cc: stable@dpdk.org
Signed-off-by: Chas Williams <chas3@att.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
6 years agonet/bonding: fix setting VLAN ID on slave ports
Chas Williams [Tue, 3 Apr 2018 16:01:22 +0000 (12:01 -0400)]
net/bonding: fix setting VLAN ID on slave ports

The pos returned is just the offset of the slab.  You need to use this
to offset the bits in the slab.

Fixes: c771e4ef38 ("net/bonding: enable slave VLAN filter")
Cc: stable@dpdk.org
Signed-off-by: Chas Williams <chas3@att.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>