dpdk.git
6 years agonet/qede: add devargs to disable NPAR Tx switching
Rasesh Mody [Wed, 28 Mar 2018 00:15:53 +0000 (17:15 -0700)]
net/qede: add devargs to disable NPAR Tx switching

Added a run-time argument npar_tx_switching to enable/disable
Tx switching for multi-fucntion devices (NPAR).
Rename vf_txswitch option to vf_tx_switching.

Sample usage to disable Tx switching for NPAR or VF is something like...

 -w 05:00.0,npar_tx_switching=0 -w 05:00.1,npar_tx_switching=0
 -w 05:00.0,vf_tx_switching=0 -w 05:00.1,vf_tx_switching=0

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/qede: enable IPGRE offload support
Harish Patil [Wed, 28 Mar 2018 00:15:52 +0000 (17:15 -0700)]
net/qede: enable IPGRE offload support

Signed-off-by: Harish Patil <harish.patil@cavium.com>
6 years agonet/qede: convert to new Rx/Tx offloads API
Harish Patil [Wed, 28 Mar 2018 00:15:51 +0000 (17:15 -0700)]
net/qede: convert to new Rx/Tx offloads API

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

This patch makes use of new offload flags as suggested and fix
the default RX/TX configuration. Also indent the code properly
around those changes.

Signed-off-by: Harish Patil <harish.patil@cavium.com>
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
6 years agonet/mrvl: rename PMD as mvpp2
Natalie Samsonov [Mon, 26 Mar 2018 14:38:50 +0000 (16:38 +0200)]
net/mrvl: rename PMD as mvpp2

The name "mrvl" for Marvell PMD driver for PPv2 Marvell PPv2
(Packet Processor v2) 1/10 Gbps adapter is too generic and causes
problem for adding new PMD drivers for other Marvell devices.
Changed to "mvpp2" for specific Marvell PPv2 PMD.

This patch doesn't introduce any change except renaming.

Signed-off-by: Natalie Samsonov <nsamsono@marvell.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/sfc: support Medford2 family adapters
Andrew Rybchenko [Wed, 21 Mar 2018 13:51:32 +0000 (13:51 +0000)]
net/sfc: support Medford2 family adapters

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
6 years agonet/sfc: support runtime VI window size
Andrew Rybchenko [Wed, 21 Mar 2018 13:51:31 +0000 (13:51 +0000)]
net/sfc: support runtime VI window size

Medford2 uses a configurable VI window size, and requires
updates to register accesses to use a runtime VI window size
rather than the *_STEP register constants used for earlier
controllers.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
6 years agonet/sfc: support link speeds up to 100G
Andrew Rybchenko [Wed, 21 Mar 2018 13:51:30 +0000 (13:51 +0000)]
net/sfc: support link speeds up to 100G

Add 25G, 50G and 100G.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
6 years agonet/avf: fix link autoneg value
Ferruh Yigit [Fri, 9 Mar 2018 17:56:31 +0000 (17:56 +0000)]
net/avf: fix link autoneg value

Intention of the logic is:
If ETH_LINK_SPEED_FIXED is set in dev_conf, set link_autoneg to
ETH_LINK_FIXED, else set it to ETH_LINK_AUTONEG

ETH_LINK_SPEED_FIXED value is 1, and ETH_LINK_FIXED is 0;

Current logic is broken, fix it according above values.

Fixes: 48de41ca11f0 ("net/avf: enable link status update")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
6 years agonet/i40e: fix support DDP packages group 0xff
Kirill Rybalchenko [Thu, 22 Feb 2018 18:01:39 +0000 (18:01 +0000)]
net/i40e: fix support DDP packages group 0xff

Group ID 0xFF indicates that packages does not change parser
graph so compatible with any other packages.

Fixes: b1ec717bfff5 ("net/i40e: fix multiple DDP packages conflict")
Cc: stable@dpdk.org
Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
6 years agonet/i40e: add log when setting input set
Beilei Xing [Sun, 11 Feb 2018 06:55:50 +0000 (14:55 +0800)]
net/i40e: add log when setting input set

This patch adds log when setting input set since global
configuration is changed.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Reviewed-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
6 years agonet/ixgbe: fix intr callback unregister by adding retry
Yunjian Wang [Wed, 21 Mar 2018 12:28:10 +0000 (20:28 +0800)]
net/ixgbe: fix intr callback unregister by adding retry

The nic's interrupt source has some active callbacks, when
the port hotplug. Add a retry to give more port's a chance
to uninit before returning an error.

Fixes: 2866c5f1b87e ("ixgbe: support port hotplug")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
6 years agovhost: do not generate signal when sendmsg fails
Tiwei Bie [Tue, 6 Mar 2018 10:43:25 +0000 (18:43 +0800)]
vhost: do not generate signal when sendmsg fails

More precisely, do not generate a SIGPIPE signal if the peer
has closed the connection. Otherwise, it will terminate the
process by default. As a library, we should avoid terminating
the application process when error happens and just need to
return with an error.

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
6 years agovhost: support sending fds via slave channel
Tiwei Bie [Tue, 6 Mar 2018 10:43:26 +0000 (18:43 +0800)]
vhost: support sending fds via slave channel

This function will be used to send fds to QEMU via slave channel.

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
6 years agonet/virtio: add check for cvq
Zhiyong Yang [Wed, 21 Mar 2018 03:03:41 +0000 (11:03 +0800)]
net/virtio: add check for cvq

Add checking for cvq to judge if virtio_ack_link_announce should be called.
The existing code doesn't cause issue, and add the checking just to look
more reasonable.

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
6 years agonet/virtio: fix queues pointer check
Zhiyong Yang [Wed, 21 Mar 2018 03:03:40 +0000 (11:03 +0800)]
net/virtio: fix queues pointer check

It is necessary to add pointer checking because in some case the
code will cause crash. For example, the code goes here before
memory allocation of rxvq is finished.

Fixes: 7365504f77e3 ("net/virtio: support guest announce")
Cc: stable@dpdk.org
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
6 years agonet/virtio-user: specify MAC of the tap
Ning Li [Fri, 29 Dec 2017 03:38:42 +0000 (11:38 +0800)]
net/virtio-user: specify MAC of the tap

When using virtio-user with vhost-kernel to exchange
packet with kernel networking stack, application can
set the MAC of the tap interface via parameter.

Signed-off-by: Ning Li <muziding001@163.com>
Reviewed-by: Seán Harte <seanbh@gmail.com>
Tested-by: Seán Harte <seanbh@gmail.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
6 years agonet/cxgbe: convert to SPDX license tags
Rahul Lakkireddy [Sat, 10 Mar 2018 22:48:30 +0000 (04:18 +0530)]
net/cxgbe: convert to SPDX license tags

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
6 years agonet/cxgbe: support setting MAC address
Kumar Sanghvi [Sat, 10 Mar 2018 22:48:27 +0000 (04:18 +0530)]
net/cxgbe: support setting MAC address

Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
6 years agonet/cxgbe: add VF port statistics
Kumar Sanghvi [Sat, 10 Mar 2018 22:48:26 +0000 (04:18 +0530)]
net/cxgbe: add VF port statistics

Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
6 years agonet/cxgbe: update Tx and Rx path for VF
Kumar Sanghvi [Sat, 10 Mar 2018 22:48:25 +0000 (04:18 +0530)]
net/cxgbe: update Tx and Rx path for VF

On TX path, add fw_eth_tx_pkt_vm_wr to transmit packets over VF.
Use is_pf4() to correctly calculate the work request size and
offsets within the work request.  On RX path, use pktshift to adjust
data offset within the mbuf.

Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
6 years agonet/cxgbe: enable RSS for VF
Kumar Sanghvi [Sat, 10 Mar 2018 22:48:24 +0000 (04:18 +0530)]
net/cxgbe: enable RSS for VF

Query firmware and configure RSS for VF.

Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
6 years agonet/cxgbe: initialize SGE and queues for VF
Kumar Sanghvi [Sat, 10 Mar 2018 22:48:23 +0000 (04:18 +0530)]
net/cxgbe: initialize SGE and queues for VF

Query firmware and initialize SGE parameters and enable queue
allocation for VF.  Calculate pcie channel and queue congestion
management for VF.

Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
6 years agonet/cxgbe: add probe to initialize VF devices
Kumar Sanghvi [Sat, 10 Mar 2018 22:48:22 +0000 (04:18 +0530)]
net/cxgbe: add probe to initialize VF devices

Add probe to initialize VF devices.  Separate init/de-init paths
for PF and VF.  Do firmware state initialization wrt VF and retrieve
various operational parameters by querying firmware.  Finally configure
and initialize ports.

Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
6 years agonet/cxgbe: add base for enabling VF ports
Kumar Sanghvi [Sat, 10 Mar 2018 22:48:21 +0000 (04:18 +0530)]
net/cxgbe: add base for enabling VF ports

Add base to enable VF ports in subsequent patches.

Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
6 years agonet/cxgbe: add VF firmware mailbox
Kumar Sanghvi [Sat, 10 Mar 2018 22:48:20 +0000 (04:18 +0530)]
net/cxgbe: add VF firmware mailbox

Add firmware mailbox communication support for VF.  Add is_pf4()
to check if driver is attached to PF4.  Use is_pf4() to determine
whether to use PF or VF mailbox communication.

Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
6 years agonet/cxgbe: add skeleton VF driver
Kumar Sanghvi [Sat, 10 Mar 2018 22:48:19 +0000 (04:18 +0530)]
net/cxgbe: add skeleton VF driver

Add minimal VF driver.  Declare functions common to both PF and VF
functionality in separate header file and import the header file.

Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
6 years agonet/avp: convert to SPDX license tags
Allain Legacy [Wed, 28 Mar 2018 16:55:06 +0000 (11:55 -0500)]
net/avp: convert to SPDX license tags

As per the following commit the AVP files maintained by Wind River are
converted to use the SPDX license tag format.

    commit a4862c9e1a98 ("license: introduce SPDX identifiers")

Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/liquidio: move to new offload API
Shijith Thotton [Wed, 28 Mar 2018 06:51:06 +0000 (12:21 +0530)]
net/liquidio: move to new offload API

Make use of new offloads member instead of bit fields in port Rx conf.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
6 years agonet/mlx5: fix RSS key length query
Shahaf Shuler [Mon, 26 Mar 2018 10:12:19 +0000 (13:12 +0300)]
net/mlx5: fix RSS key length query

The RSS key length returned by rte_eth_dev_info_get command was taken
from the
PMD private structure. This structure initialization was done only after
the port configuration.

Considering Mellanox device supports only 40B long RSS key, reporting
the fixed number instead.

Fixes: 29c1d8bb3e79 ("net/mlx5: handle a single RSS hash key for all protocols")
Cc: stable@dpdk.org
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
6 years agonet/mlx5: enforce RSS key length limitation
Shahaf Shuler [Mon, 26 Mar 2018 10:12:18 +0000 (13:12 +0300)]
net/mlx5: enforce RSS key length limitation

RSS hash key must be 40 Bytes long.

Cc: stable@dpdk.org
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
6 years agonet/mlx5: setup RSS regardless of queue count
Dahir Osman [Wed, 21 Mar 2018 12:47:51 +0000 (13:47 +0100)]
net/mlx5: setup RSS regardless of queue count

In some environments it is desirable to have the NIC perform RSS
normally on the packet regardless of the number of queues configured.
The RSS hash result that is stored in the mbuf can then be used by
the application to make decisions about how to distribute workloads
to threads, secondary processes, or even virtual machines if the
application is a virtual switch.  This change to the mlx5 driver
aligns with how other drivers in the Intel family work.

Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Tested-by: Allain Legacy <allain.legacy@windriver.com>
6 years agonet/mlx5: fix icc build
Nélio Laranjeiro [Mon, 19 Mar 2018 10:42:16 +0000 (11:42 +0100)]
net/mlx5: fix icc build

Remove the second declaration of device_attr [1] inside the loop as well as
the query_device_ex() which has already been done outside of the loop.

[1] https://dpdk.org/ml/archives/dev/2018-March/091744.html

Fixes: 9a761de8ea14 ("net/mlx5: flow counter support")
Cc: stable@dpdk.org
Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/mlx5: fix TSO enablement
Shahaf Shuler [Thu, 15 Mar 2018 11:00:05 +0000 (13:00 +0200)]
net/mlx5: fix TSO enablement

TSO should be set if either of the TSO offload flags is requested.

Fixes: dbccb4cddcd2 ("net/mlx5: convert to new Tx offloads API")
Cc: stable@dpdk.org
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
6 years agonet/igb: fix flow RSS queue index
Wei Zhao [Wed, 21 Mar 2018 07:18:10 +0000 (15:18 +0800)]
net/igb: fix flow RSS queue index

Igb has a bug about queue index for rss rule flow configuration
when set redirection table.

Fixes: 424ae915baf0 ("net/e1000: 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: Wenzhuo Lu <wenzhuo.lu@intel.com>
6 years agonet/i40evf: add multicast MAC address filtering
Olivier Matz [Thu, 25 Jan 2018 14:36:22 +0000 (15:36 +0100)]
net/i40evf: add multicast MAC address filtering

Add support the set_mc_addr_list device operation in the i40evf PMD.

The configured addresses are stored in the device private area, so
they can be flushed before adding new ones.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
6 years agonet/i40e: fix flow RSS configuration error
Wei Zhao [Mon, 26 Mar 2018 01:11:39 +0000 (09:11 +0800)]
net/i40e: fix flow RSS configuration error

I40e needs a protection for rss rule flow configuration
after a rule is set for a port.

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 intr callback unregister by adding retry
Yunjian Wang [Tue, 20 Mar 2018 07:01:24 +0000 (15:01 +0800)]
net/i40e: fix intr callback unregister by adding retry

The nic's interrupt source has some active callbacks, when
the port hotplug. Add a retry to give more port's a chance
to uninit before returning an error.

Fixes: d42aaf30008b ("i40e: support port hotplug")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
6 years agonet/sfc: add device parameter to choose FW variant
Roman Zhukov [Mon, 26 Mar 2018 12:50:36 +0000 (13:50 +0100)]
net/sfc: add device parameter to choose FW variant

Add support of choice the preferred firmware variant to use in device
parameters.

Signed-off-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: add values for RxDPCPU firmware id recognition
Roman Zhukov [Mon, 26 Mar 2018 12:50:35 +0000 (13:50 +0100)]
net/sfc/base: add values for RxDPCPU firmware id recognition

Signed-off-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/sfc/base: support choosing firmware variant
Gautam Dawar [Mon, 26 Mar 2018 12:50:34 +0000 (13:50 +0100)]
net/sfc/base: support choosing firmware variant

Signed-off-by: Gautam Dawar <gdawar@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agonet/bnxt: fix flow director with same cmd different queue
Somnath Kotur [Mon, 26 Mar 2018 03:22:06 +0000 (08:52 +0530)]
net/bnxt: fix flow director with same cmd different queue

When user reissues same flow director cmd with a different queue
update the existing filter to redirect flow to the new desired
queue as destination just like the other filters like 5 tuple and
generic flow.

Fixes: 2d64da097aa0 ("net/bnxt: support FDIR")
Cc: stable@dpdk.org
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
6 years agonet/sfc: fix type of opaque pointer in perf profile handler
Roman Zhukov [Sat, 24 Mar 2018 06:42:23 +0000 (06:42 +0000)]
net/sfc: fix type of opaque pointer in perf profile handler

The 'opaque' pointer in handler function is the last argument
of sfc_kvargs_process() function and it is pointer to the adapter
'evq_flags' that has a uint32_t type. So 'value' must be pointer
to uint32_t.

Fixes: c22d3c508e0c ("net/sfc: support parameter to choose performance profile")
Cc: stable@dpdk.org
Signed-off-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agoethdev: fix queue start
Qi Zhang [Thu, 22 Mar 2018 12:59:01 +0000 (20:59 +0800)]
ethdev: fix queue start

Device must be started before start any queue.

Fixes: 0748be2cf9a2 ("ethdev: queue start and stop")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
6 years agoethdev: return named opaque type instead of void pointer
Ferruh Yigit [Tue, 20 Mar 2018 16:34:04 +0000 (16:34 +0000)]
ethdev: return named opaque type instead of void pointer

"struct rte_eth_rxtx_callback" is defined as internal data structure and
used as named opaque type.

So the functions that are adding callbacks can return objects in this
type instead of void pointer.

Also const qualifier added to "struct rte_eth_rxtx_callback *" to
protect it better from application modification.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
6 years agonet/avp: conform to new ethdev offload API
Allain Legacy [Mon, 19 Mar 2018 13:48:01 +0000 (08:48 -0500)]
net/avp: conform to new ethdev offload API

This change updates the AVP driver to conform with the new ethdev
offload API.  As per these commits:

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

Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
6 years agonet/sfc: fix mbuf data alignment calculation
Andrew Rybchenko [Mon, 19 Mar 2018 07:50:11 +0000 (07:50 +0000)]
net/sfc: fix mbuf data alignment calculation

Unlike ffs() rte_bsf32() counts bit position from 0.

Fixes: 0c7a0c35f24c ("net/sfc: calculate Rx buffer size which may be used")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
6 years agoethdev: remove unused struct forward declaration
Ferruh Yigit [Fri, 16 Mar 2018 11:14:50 +0000 (11:14 +0000)]
ethdev: remove unused struct forward declaration

Fixes: 331c447ad913 ("ethdev: separate internal structures into own header")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
6 years agoethdev: support dynamic logging
Ferruh Yigit [Tue, 13 Mar 2018 11:07:23 +0000 (11:07 +0000)]
ethdev: support dynamic logging

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Shreyansh Jain <shreyansh.jain@nxp.com>
6 years agonet/dpaa: prefer defines for link speed values
Ferruh Yigit [Fri, 9 Mar 2018 17:59:03 +0000 (17:59 +0000)]
net/dpaa: prefer defines for link speed values

Use existing defines instead of hardcoded vales.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
6 years agonet/bnxt: fix LRO disable
Ajit Khaparde [Wed, 28 Feb 2018 22:12:36 +0000 (14:12 -0800)]
net/bnxt: fix LRO disable

When the vnic_tpa_cfg HWRM command is sent to the FW,
we are not passing the VNIC ID in case of disable.
This can cause the FW to return an error.
Correct VNIC ID needs to be passed for both enable and disable.

Fixes: 0958d8b6435d ("net/bnxt: support LRO")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
6 years agoethdev: fix port id storage
Ferruh Yigit [Fri, 9 Mar 2018 11:27:48 +0000 (11:27 +0000)]
ethdev: fix port id storage

port_id is now 16bits, update function parameter according.

Fixes: 4c270218aa26 ("ethdev: support security APIs")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
6 years agonet/sfc: add dynamic log level for MCDI messages
Ivan Malov [Wed, 21 Mar 2018 11:28:21 +0000 (11:28 +0000)]
net/sfc: add dynamic log level for MCDI messages

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
6 years agonet/sfc: remove dedicated init log parameter
Ivan Malov [Wed, 21 Mar 2018 11:28:20 +0000 (11:28 +0000)]
net/sfc: remove dedicated init log parameter

The previous patches in the set convert per-port
logging to use NOTICE level and make this level default.
This provides the possibility to remove the dedicated
toggle for init-related messages and merge init logging
with the main log type. In order to keep these logs silent
by default, INFO level should be used.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
6 years agonet/sfc: prepare to merge init logs with main log type
Ivan Malov [Wed, 21 Mar 2018 11:28:19 +0000 (11:28 +0000)]
net/sfc: prepare to merge init logs with main log type

Conversion to dynamic logging done in the previous patches
makes it possible to simplify internal controls for init
logging. This patch allows to prepare for such a change.
It makes init-unrelated messages use NOTICE level so that
the following patch will be able to convert init logging
to use INFO level and remain silent by default.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
6 years agonet/sfc: support per-port dynamic logging
Ivan Malov [Wed, 21 Mar 2018 11:28:18 +0000 (11:28 +0000)]
net/sfc: support per-port dynamic logging

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
6 years agonet/sfc: support driver-wide dynamic logging
Ivan Malov [Wed, 21 Mar 2018 11:28:17 +0000 (11:28 +0000)]
net/sfc: support driver-wide dynamic logging

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
6 years agoeal: register log type and pick level from args
Ivan Malov [Wed, 21 Mar 2018 11:28:16 +0000 (11:28 +0000)]
eal: register log type and pick level from args

Dynamic log types are registered on RTE_INIT() step.
This allows one to set log levels by EAL options on
application launch. However, this does not allow to
manage log types if they are created during runtime.

EAL does not store log levels and types passed from
the command line. Thus, they cannot be picked later.
This is an obvious flaw since it would be better to
be able to pick levels for dynamic types registered
for runtime-determined facilities such as NIC ports.

This patch provides a mechanism to store log levels
passed from EAL options and adds an API to register
log types and pick levels from the internal storage.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/mlx5: refuse empty VLAN flow specification
Nélio Laranjeiro [Tue, 13 Mar 2018 14:17:39 +0000 (15:17 +0100)]
net/mlx5: refuse empty VLAN flow specification

Verbs specification doesn't help to distinguish between packets having an
VLAN and those which do not have, this ends by having flow rule which does
not react as the user expects e.g.

 flow create 0 ingress pattern eth / vlan / end action queue index 0 / end
 flow create 0 ingress pattern eth / end action queue index 1 / end

are colliding in Verbs definition as in both rule are matching packets with
or without VLAN.
For this reason, the VLAN specification must not be empty, otherwise the
PMD has to refuse it.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
6 years agonet/mlx5: improve flow error explanation
Nélio Laranjeiro [Tue, 13 Mar 2018 14:17:38 +0000 (15:17 +0100)]
net/mlx5: improve flow error explanation

Fill the error context in conversion function to provide a better reason on
why it cannot be done to the user.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
6 years agonet/mlx5: change tunnel flow priority
Nélio Laranjeiro [Tue, 13 Mar 2018 14:17:36 +0000 (15:17 +0100)]
net/mlx5: change tunnel flow priority

Packet matching inner and outer flow rules are caught by the first one
added in the device as both flows are configured with the same priority.
To avoid such situation, the inner flow can have an higher priority than
the outer ones as their pattern matching will otherwise collide.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
6 years agonet/mlx5: fix link status to use wait to complete
Nélio Laranjeiro [Mon, 12 Mar 2018 13:43:19 +0000 (14:43 +0100)]
net/mlx5: fix link status to use wait to complete

Wait to complete is present to let the application get a correct status
when it requires it, it should not be ignored.

Fixes: e313ef4c2fe8 ("net/mlx5: fix link state on device start")
Fixes: cb8faed7dde8 ("mlx5: support link status update")
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agonet/mlx5: fix link status behavior
Nélio Laranjeiro [Mon, 12 Mar 2018 13:43:18 +0000 (14:43 +0100)]
net/mlx5: fix link status behavior

This behavior is mixed between what should be handled by the application
and what is under PMD responsibility.

According to DPDK API:
- link_update() should only query the link status [1]
- link_set_{up,down}() should only set the link to the according status [1]
- dev_{start,stop}() should enable/disable traffic reception/emission [2]

On this PMD, the link status is retrieved from the net device associated
owned by the Linux Kernel, it does not means that even when this interface
is down, the PMD cannot send/receive traffic from the NIC those two
information are unrelated, until the physical port is active and has a
link, the PMD can receive/send traffic on the wire.

According to DPDK API, calling the rte_eth_dev_start() even when the Linux
interface link is down is then possible and allowed, as the traffic will
flow between the DPDK application and the Physical port.

This also means that a synchronization between the Linux interface and the
DPDK application remains under the DPDK application responsibility.

To handle such synchronization the application should behave as the
following scheme, to start:

 rte_eth_get_link(port_id, &link);
 if (link.link_status == ETH_DOWN)
rte_eth_dev_set_link_up(port_id);
 rte_eth_dev_start(port_id);

Taking in account the possible returned values for each function.

and to stop:

 rte_eth_dev_stop(port_id);
 rte_eth_dev_set_link_down(port_id);

The application should also set the LSC interrupt callbacks to catch and
behave accordingly when the administrator set the Linux device down/up.
The same callbacks are called when the link on the medium falls/raise.

[1] https://dpdk.org/browse/dpdk/tree/lib/librte_ether/rte_ethdev_core.h
[2] https://dpdk.org/browse/dpdk/tree/lib/librte_ether/rte_ethdev.h#n1677

Fixes: c7bf62255edf ("net/mlx5: fix handling link status event")
Fixes: e313ef4c2fe8 ("net/mlx5: fix link state on device start")
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
6 years agonet/mlx5: remove kernel version check
Nélio Laranjeiro [Mon, 12 Mar 2018 13:43:17 +0000 (14:43 +0100)]
net/mlx5: remove kernel version check

Kernel version check was introduced in
commit 3a49ffe38a95 ("net/mlx5: fix link status query")
due to a bug fixed by
commit ef09a7fc7620 ("net/mlx5: fix inconsistent link status query")

This patch restore the previous behavior as described in Linux API.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agonet/mlx5: fix ARM build
Yongseok Koh [Wed, 14 Mar 2018 17:51:48 +0000 (10:51 -0700)]
net/mlx5: fix ARM build

rdma-core v16 has a bug. The following compilation error occurs on ARM
hosts.

In file included
from drivers/net/mlx5/mlx5_glue.h:16:0,
from drivers/net/mlx5/mlx5_glue.c:11:
/usr/include/infiniband/mlx5dv.h:144:2: error: unknown type name 'off_t'
off_t   uar_mmap_offset;
^

As a temporary fix, sys/types.h is included in PMD. This has been fixed in
rdma-core v17. This can be removed when all the Linux distros are shipped
with rdma-core v17 or back-ported fix. As of now, RedHat 7.5 is known to
have rdma-core v16.

Cc: stable@dpdk.org
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agonet/mlx5: fix existing file removal
Xueming Li [Fri, 16 Mar 2018 15:22:27 +0000 (23:22 +0800)]
net/mlx5: fix existing file removal

There is no guarantee that the file won't be removed by external
user/application between the stat() and remove() syscalls, remove() will
fail if the file no longer exists.

Fixes: f8b9a3bad467 ("net/mlx5: install a socket to exchange a file descriptor")
Cc: stable@dpdk.org
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
6 years agonet/mlx5: use dynamic logging
Nélio Laranjeiro [Tue, 13 Mar 2018 09:23:56 +0000 (10:23 +0100)]
net/mlx5: use dynamic logging

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agonet/mlx5: use port id in PMD log
Nélio Laranjeiro [Tue, 13 Mar 2018 09:23:55 +0000 (10:23 +0100)]
net/mlx5: use port id in PMD log

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agonet/mlx5: standardize on negative errno values
Nélio Laranjeiro [Mon, 5 Mar 2018 12:21:06 +0000 (13:21 +0100)]
net/mlx5: standardize on negative errno values

Set rte_errno systematically as well.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agonet/mlx5: change non failing function return values
Nélio Laranjeiro [Mon, 5 Mar 2018 12:21:05 +0000 (13:21 +0100)]
net/mlx5: change non failing function return values

These functions return int although they are not supposed to fail,
resulting in unnecessary checks in their callers.
Some are returning error where is should be a boolean.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agonet/mlx5: prefix all functions with mlx5
Nélio Laranjeiro [Mon, 5 Mar 2018 12:21:04 +0000 (13:21 +0100)]
net/mlx5: prefix all functions with mlx5

This change removes the need to distinguish unlocked priv_*() functions
which are therefore renamed using a mlx5_*() prefix for consistency.

At the same time, all functions from mlx5 uses a pointer to the ETH device
instead of the one to the PMD private data.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agonet/mlx5: remove control path locks
Nélio Laranjeiro [Mon, 5 Mar 2018 12:21:03 +0000 (13:21 +0100)]
net/mlx5: remove control path locks

In priv struct only the memory region needs to be protected against
concurrent access between the control plane and the data plane.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agonet/mlx5: remove useless empty lines
Nélio Laranjeiro [Mon, 5 Mar 2018 12:21:02 +0000 (13:21 +0100)]
net/mlx5: remove useless empty lines

Some empty lines have been added in the middle of the code without any
reason.  This commit removes them.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agonet/mlx5: add missing function documentation
Nélio Laranjeiro [Mon, 5 Mar 2018 12:21:01 +0000 (13:21 +0100)]
net/mlx5: add missing function documentation

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agonet/mlx5: normalize function prototypes
Nélio Laranjeiro [Mon, 5 Mar 2018 12:21:00 +0000 (13:21 +0100)]
net/mlx5: normalize function prototypes

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agonet/mlx5: mark parameters with unused attribute
Nélio Laranjeiro [Mon, 5 Mar 2018 12:20:59 +0000 (13:20 +0100)]
net/mlx5: mark parameters with unused attribute

Replaces all (void)foo; by __rte_unused macro except when variables are
under #if statements.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agonet/mlx5: name parameters in function prototypes
Nélio Laranjeiro [Mon, 5 Mar 2018 12:20:58 +0000 (13:20 +0100)]
net/mlx5: name parameters in function prototypes

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agonet/mlx5: fix sriov flag
Nélio Laranjeiro [Mon, 5 Mar 2018 12:20:57 +0000 (13:20 +0100)]
net/mlx5: fix sriov flag

priv_get_num_vfs() was used to help the PMD in prefetching the mbuf in
datapath when the PMD was behaving in VF mode.
This knowledge is no more used.

Fixes: 528a9fbec6de ("net/mlx5: support ConnectX-5 devices")
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
6 years agonet/mrvl: fix Rx descriptors number
Tomasz Duszynski [Thu, 15 Mar 2018 12:12:21 +0000 (13:12 +0100)]
net/mrvl: fix Rx descriptors number

Since filling hardware buffer pool (bpool) is Rx related
constant describing maximum number of rx descriptors
instead of maximum number of Tx descriptors should be used.

Fixes: 0ddc9b815b11 ("net/mrvl: add net PMD skeleton")
Cc: stable@dpdk.org
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
6 years agonet/mrvl: fix typo in log message
Tomasz Duszynski [Mon, 19 Mar 2018 12:37:22 +0000 (13:37 +0100)]
net/mrvl: fix typo in log message

Show appropriate log message in case Tx offloads are either
not supported or missing.

Fixes: 7d8f6c20cc7c ("net/mrvl: switch to the new Tx offload API")
Cc: stable@dpdk.org
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
6 years agonet/tap: allow user MAC to be passed as args
Vipin Varghese [Mon, 12 Mar 2018 21:53:52 +0000 (03:23 +0530)]
net/tap: allow user MAC to be passed as args

Allow TAP PMD to pass user desired MAC address as argument.
The argument value is processed as string delimited by  ':',
is parsed and converted to HEX MAC address after validation.

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/null: support bulk allocation
Mallesh Koujalagi [Thu, 8 Mar 2018 23:40:41 +0000 (15:40 -0800)]
net/null: support bulk allocation

Bulk allocation of multiple mbufs increased more than ~2%  and less
than 8% throughput on single core (1.8 GHz), based on usage for example
1: Testpmd case: Two null devices with copy 8% improvement.
    testpmd -c 0x3 -n 4 --socket-mem 1024,1024
--vdev 'eth_null0,size=64,copy=1' --vdev 'eth_null1,size=64,copy=1'
-- -i -a --coremask=0x2 --txrst=64 --txfreet=64 --txd=256
--rxd=256 --rxfreet=64 --burst=64 --txpt=64 --txq=1 --rxq=1 --numa
2. Ovs switch case: 2% improvement.
$VSCTL add-port ovs-br dpdk1 -- set Interface dpdk1 type=dpdk \
        options:dpdk-devargs=eth_null0,size=64,copy=1
$VSCTL add-port ovs-br dpdk2 -- set Interface dpdk2 type=dpdk \
        options:dpdk-devargs=eth_null1,size=64,copy=1

Signed-off-by: Mallesh Koujalagi <malleshx.koujalagi@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/null: set different MAC address for each device
Mallesh Koujalagi [Wed, 7 Mar 2018 03:31:54 +0000 (19:31 -0800)]
net/null: set different MAC address for each device

Previously all null devices were getting MAC address "00:00:00:00:00:00"

After attaching two Null device to OVS, seeing "00.00.00.00.00.00" mac
address for both null devices.

Fix this issue, by setting different mac address.

Signed-off-by: Mallesh Koujalagi <malleshx.koujalagi@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/bonding: set MTU on slave configure
Chas Williams [Fri, 23 Feb 2018 04:01:21 +0000 (23:01 -0500)]
net/bonding: set MTU on slave configure

When a slave is configured make sure that the slave's MTU
matches the bonding's idea of the MTU.

Signed-off-by: Chas Williams <chas3@att.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
6 years agonet/enic: use link status helper functions
Stephen Hemminger [Fri, 26 Jan 2018 02:01:51 +0000 (18:01 -0800)]
net/enic: use link status helper functions

Use new rte_eth_linkstatus_get/set helper functions to handle link
status update.

This driver was not doing atomic update of link status information.
And the return value was different than others.
The hardware also does not do autonegotiation (at least on Linux).

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/octeontx: use link status helper functions
Stephen Hemminger [Fri, 26 Jan 2018 02:01:50 +0000 (18:01 -0800)]
net/octeontx: use link status helper functions

Use new rte_eth_linkstatus_get/set helper functions to handle link
status update.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/szedata2: use link status helper functions
Stephen Hemminger [Fri, 26 Jan 2018 02:01:49 +0000 (18:01 -0800)]
net/szedata2: use link status helper functions

Yet another driver which was not returing correct value on
link change.

Use new rte_eth_linkstatus_get/set helper functions to handle link
status update.

Since this driver can't be built on x86 could not even
do a compile test.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/thunderx: use link status helper functions
Stephen Hemminger [Fri, 26 Jan 2018 02:01:48 +0000 (18:01 -0800)]
net/thunderx: use link status helper functions

Use new rte_eth_linkstatus_get/set helper functions to handle link
status update.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/liquidio: use link status helper functions
Stephen Hemminger [Fri, 26 Jan 2018 02:01:47 +0000 (18:01 -0800)]
net/liquidio: use link status helper functions

Use new rte_eth_linkstatus_get/set helper functions to handle link
status update.
And cleanup the logic in the the link update routine.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Tested-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/i40e: use link status helper functions
Stephen Hemminger [Fri, 26 Jan 2018 02:01:46 +0000 (18:01 -0800)]
net/i40e: use link status helper functions

Use new rte_eth_linkstatus_get/set helper functions to handle link
status update.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/sfc: use link status helper functions
Stephen Hemminger [Fri, 26 Jan 2018 02:01:45 +0000 (18:01 -0800)]
net/sfc: use link status helper functions

Use new rte_eth_linkstatus_get/set helper functions to handle link
status update.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/ixgbe: use link status helper functions
Stephen Hemminger [Fri, 26 Jan 2018 02:01:44 +0000 (18:01 -0800)]
net/ixgbe: use link status helper functions

Use new rte_eth_linkstatus_get/set helper functions to handle link
status update.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/e1000: use link status helper functions
Stephen Hemminger [Fri, 26 Jan 2018 02:01:43 +0000 (18:01 -0800)]
net/e1000: use link status helper functions

Use new rte_eth_linkstatus_get/set helper functions to handle link
status update.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/nfp: use link status helper functions
Stephen Hemminger [Fri, 26 Jan 2018 02:01:42 +0000 (18:01 -0800)]
net/nfp: use link status helper functions

Use new rte_eth_linkstatus_get/set helper functions to handle link
status update.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/dpaa2: use link status helper functions
Stephen Hemminger [Fri, 26 Jan 2018 02:01:41 +0000 (18:01 -0800)]
net/dpaa2: use link status helper functions

Use new rte_eth_linkstatus_get/set helper functions to handle link
status update.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/vmxnet3: use link status helper functions
Stephen Hemminger [Fri, 26 Jan 2018 02:01:40 +0000 (18:01 -0800)]
net/vmxnet3: use link status helper functions

Use new rte_eth_linkstatus_get/set helper functions to handle link
status update.
Also remove no longer necessary include of rte_atomic.h

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/virtio: use link status helper functions
Stephen Hemminger [Fri, 26 Jan 2018 02:01:39 +0000 (18:01 -0800)]
net/virtio: use link status helper functions

Use new rte_eth_linkstatus_get/set helper functions to handle link
status update.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoethdev: add link status get/set helper functions
Stephen Hemminger [Fri, 26 Jan 2018 02:01:38 +0000 (18:01 -0800)]
ethdev: add link status get/set helper functions

Many drivers are all doing copy/paste of the same code to atomically
update the link status. Reduce duplication, and allow for future
changes by having common function for this.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agoeal: introduce atomic exchange operation
Stephen Hemminger [Fri, 26 Jan 2018 02:01:37 +0000 (18:01 -0800)]
eal: introduce atomic exchange operation

To handle atomic update of link status (64 bit), every driver
was doing its own version using cmpset.
Atomic exchange is a useful primitive in its own right;
therefore make it a EAL routine.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
6 years agonet/mrvl: add Tx queue start/stop
Tomasz Duszynski [Thu, 15 Mar 2018 07:52:04 +0000 (08:52 +0100)]
net/mrvl: add Tx queue start/stop

Add Tx queue start/stop feature.

Signed-off-by: Natalie Samsonov <nsamsono@marvell.com>
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
6 years agonet/mrvl: add Rx flow control
Tomasz Duszynski [Thu, 15 Mar 2018 07:52:03 +0000 (08:52 +0100)]
net/mrvl: add Rx flow control

Add Rx side flow control support.

Signed-off-by: Natalie Samsonov <nsamsono@marvell.com>
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>