dpdk.git
6 years agovhost: fix error code check when creating thread
Olivier Matz [Fri, 8 Dec 2017 10:19:49 +0000 (11:19 +0100)]
vhost: fix error code check when creating thread

On error, pthread_create() returns a positive number (errno).
Fix the test on the return value.

Fixes: af1475918124 ("vhost: introduce API to start a specific driver")
Fixes: e623e0c6d8a5 ("vhost: add reconnect ability")
Cc: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Jens Freimann <jfreimann@redhat.com>
6 years agonet/virtio: init MTU in case no control channel
Zhike Wang [Fri, 5 Jan 2018 10:28:06 +0000 (02:28 -0800)]
net/virtio: init MTU in case no control channel

The max_mtu is kept as zero in case no CRTL channel, which leads
to failure when calling virtio_mtu_set().

Signed-off-by: Zhike Wang <wangzhike@jd.com>
Acked-by: Zhiyong Yang <zhiyong.yang@intel.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
6 years agovhost: add reconnect thread name for client mode
Tonghao Zhang [Fri, 5 Jan 2018 14:10:39 +0000 (06:10 -0800)]
vhost: add reconnect thread name for client mode

This patch adds the name for vhost-user reconnect thread.
It can help us to know whether the thread is running.

Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
6 years agovhost: support virtqueue interrupt/notification suppression
Junjie Chen [Tue, 9 Jan 2018 11:03:48 +0000 (06:03 -0500)]
vhost: support virtqueue interrupt/notification suppression

The driver can suppress interrupt when VIRTIO_F_EVENT_IDX feature bit is
negotiated. The driver set vring flags to 0, and MAY use used_event in
available ring to advise device interrupt util reach an index specified
by used_event. The device ignore the lower bit of vring flags, and send
an interrupt when index reach used_event.

The device can suppress notification in a manner analogous to the ways
driver suppress interrupt. The device manipulates flags or avail_event in
the used ring in the same way the driver manipulates flags or used_event in
available ring.

Signed-off-by: Junjie Chen <junjie.j.chen@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Tested-by: Lei Yao <lei.a.yao@intel.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
6 years agonet/mlx5: fix calculation of flow ID flag
Yongseok Koh [Thu, 11 Jan 2018 07:57:53 +0000 (23:57 -0800)]
net/mlx5: fix calculation of flow ID flag

PKT_RX_FDIR_ID should be set only if flow_tag is neither non-zero nor
MLX5_FLOW_MARK_DEFAULT.

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
Reported-by: Xueming Li <xuemingl@mellanox.com>
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Xueming Li <xuemingl@mellanox.com>
6 years agonet/mlx5: fix missing attribute size for drop action
Yongseok Koh [Wed, 10 Jan 2018 17:50:38 +0000 (09:50 -0800)]
net/mlx5: fix missing attribute size for drop action

Adding the size of ibv_flow_spec_action_drop is missing. This can cause
overflow when converting rte_flow to ibv_flow and thus corrupt memory.

Fixes: 8086cf08b2f0 ("net/mlx5: handle RSS hash configuration in RSS flow")
Cc: stable@dpdk.org
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
6 years agonet/mlx5: fix deadlock of link status alarm
Yongseok Koh [Wed, 10 Jan 2018 17:46:49 +0000 (09:46 -0800)]
net/mlx5: fix deadlock of link status alarm

If mlx5_dev_link_status_handler() is executed while canceling the alarm,
deadlock can happen because rte_eal_alarm_cancel() waits for all callbackes
to finish execution and both calls are protected by priv->lock.

Fixes: 198a3c339a8f ("mlx5: handle link status interrupts")
Cc: stable@dpdk.org
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
6 years agonet/e1000: fix mailbox interrupt handler
Qi Zhang [Wed, 27 Dec 2017 20:22:30 +0000 (15:22 -0500)]
net/e1000: fix mailbox interrupt handler

Mailbox interrupt handler only takecare of the PF reset notification,
for other message mbx->ops.read should not be called since it gets
chance to break the foreground VF to PF communication.

Fixes: 316f4f1adc2e ("net/igb: support VF mailbox interrupt for link up/down")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
6 years agonet/ixgbe: fix mailbox interrupt handler
Qi Zhang [Wed, 27 Dec 2017 20:22:29 +0000 (15:22 -0500)]
net/ixgbe: fix mailbox interrupt handler

Mailbox interrupt handler only takes care of PF reset notification, for
other message ixgbe_read_mbx should not be called since it gets chance
to break the foreground VF to PF communication.
This can be simply repeated by 'testpmd>rx_vlan rm all 0'.

Fixes: 77234603fba0 ("net/ixgbe: support VF mailbox interrupt for link up/down")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
6 years agonet/e1000: add device ID for 82579LM support
Markus Theil [Fri, 13 Oct 2017 16:32:18 +0000 (18:32 +0200)]
net/e1000: add device ID for 82579LM support

This patch adds the PCI device ID for Intel 82579LM support.

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
6 years agonet/e1000: always enable receive and transmit
Chas Williams [Fri, 20 Oct 2017 03:23:39 +0000 (23:23 -0400)]
net/e1000: always enable receive and transmit

The transmit and receive controller state machines are only enabled after
receiving an interrupt and the link status is now valid.  If an adapter
is being used in conjunction with NC-SI, network controller sideband
interface, the adapter may never get a link state change interrupt since
the adapter's PHY is always link up and never changes state.

To fix this, always enable and disable the transmit and receive with
.dev_start and .dev_stop.  This is a better match for what is typically
done with the other PMD's.  Since we may never get an interrupt to check
the link state, we also poll once at the end of .dev_start to get the
current link status.

Signed-off-by: Chas Williams <chas3@att.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
6 years agonet/i40e: fix VF reset stats crash
David Harton [Thu, 11 Jan 2018 15:13:58 +0000 (10:13 -0500)]
net/i40e: fix VF reset stats crash

Calling i40evf_dev_xstats_reset can sometimes crash. Fixed issue
by checking return code before using pstats.

Fixes: 8210e9e0d805 ("net/i40e: fix clear xstats bug in VF")
Cc: stable@dpdk.org
Signed-off-by: David Harton <dharton@cisco.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Wei Zhao <wei.zhao1@intel.com>
6 years agonet/i40e: fix port segmentation fault when restart
Wei Zhao [Fri, 12 Jan 2018 06:59:19 +0000 (14:59 +0800)]
net/i40e: fix port segmentation fault when restart

This patch will go into the process of clear all queue region
related configuration when dev stop even if there is no queue region
command before, so this is a bug, it may cause error. So add code
to check if there is queue configuration exist when flush queue
region config and remove this process when device stop. Queue region
clear only do when device initialization or PMD get flush command.

Fixes: 7cbecc2f7424 ("net/i40e: support queue region set and flush")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
6 years agonet/i40e: fix setting MAC address of VF
Beilei Xing [Tue, 9 Jan 2018 10:37:44 +0000 (18:37 +0800)]
net/i40e: fix setting MAC address of VF

New MAC address is copied to dev->data->mac_addrs[0] before calling
setting MAC address ops. So it will fail when deleting
dev->data->mac_addrs[0]. Deleting hw->mac.addr will fix the issue.

Fixes: 943c2d899a0c ("net/i40e: set VF MAC from VF")
Cc: stable@dpdk.org
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
6 years agonet/ixgbe: fix max queue number for VF
Yanglong Wu [Tue, 9 Jan 2018 06:32:05 +0000 (14:32 +0800)]
net/ixgbe: fix max queue number for VF

VF can't run in multiple queue mode, if nb_q_per_pool is set to 1.
Nb_q_per_pool is passed through to max_rx_q and max_tx_q in VF.
So if nb_q_per_pool is equal to 1, max_rx_q and max_tx_q shouldn't
be more than 1, otherwise VF multiple queue mode will fail.

RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool is the Max number of queue can be
used in VF, that would be assigned as IXGBE_MAX_RX_QUEUE_NUM /
RTE_ETH_DEV_SRIOV(dev).active, so that assigning nb_q_per_pool  as 1
when PF is in ETH_MQ_RX_NONE, which will make VF can just use only 1
queue, is not right.

Fixes: 27b609cbd1c6 ("ethdev: move the multi-queue mode check to specific drivers")
Cc: stable@dpdk.org
Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
6 years agonet/i40e: move RSS to flow API
Wei Zhao [Wed, 10 Jan 2018 02:10:26 +0000 (10:10 +0800)]
net/i40e: move RSS to flow API

Rte_flow was defined to include RSS, this patch moves i40e
existing RSS to rte_flow. The old RSS configuration is kept
as it was, and can be deprecated in the future.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
6 years agoapp/testpmd: add configuration for input set
Beilei Xing [Mon, 8 Jan 2018 03:09:14 +0000 (11:09 +0800)]
app/testpmd: add configuration for input set

This patch adds command to configure input set for RSS,
FDIR, and FDIR flexible payload.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
6 years agonet/i40e: support input set configuration
Beilei Xing [Mon, 8 Jan 2018 03:09:13 +0000 (11:09 +0800)]
net/i40e: support input set configuration

This patch supports getting/setting input set info for
RSS, FDIR, and FDIR flexible payload. It also adds some
helper functions for input set configuration.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
6 years agonet/mrvl: keep shadow Txqs inside PMD Txq
Natalie Samsonov [Thu, 11 Jan 2018 15:35:43 +0000 (16:35 +0100)]
net/mrvl: keep shadow Txqs inside PMD Txq

Change shadow queues allocation from port/core to txq/core.
Use array of shadow queues (one per lcore) for each tx queue object to
avoid data corruption when few tx queues are handled by one lcore and
buffers that were not sent yet, can be released and used for receive.

Fixes: 0ddc9b815b11 ("net/mrvl: add net PMD skeleton")
Cc: stable@dpdk.org
Signed-off-by: Natalie Samsonov <nsamsono@marvell.com>
6 years agonet/mrvl: fix shadow queue tail and size calculations
Natalie Samsonov [Thu, 11 Jan 2018 15:35:42 +0000 (16:35 +0100)]
net/mrvl: fix shadow queue tail and size calculations

Reset skip_buf after use to avoid wrong tail and size calculations.

Fixes: afb4d0d0bf91 ("net/mrvl: add Rx/Tx support")
Cc: stable@dpdk.org
Signed-off-by: Natalie Samsonov <nsamsono@marvell.com>
6 years agonet/mrvl: fix oversize bpool handling
Natalie Samsonov [Thu, 11 Jan 2018 15:35:41 +0000 (16:35 +0100)]
net/mrvl: fix oversize bpool handling

Don't return mbuf to dpdk pool if failed to get buffer from the bpool.
Fix maximum bpool size calculation to prevent unnecessary bpool
oversize cases when working with small rx queues.

Fixes: 0ddc9b815b11 ("net/mrvl: add net PMD skeleton")
Cc: stable@dpdk.org
Signed-off-by: Natalie Samsonov <nsamsono@marvell.com>
6 years agonet/mrvl: fix HIF objects allocation
Natalie Samsonov [Thu, 11 Jan 2018 15:35:40 +0000 (16:35 +0100)]
net/mrvl: fix HIF objects allocation

1. Add checking for non-EAL threads.

2. Create hif objects on first use since sometimes on probe not all
   lcores are initialized and can be added later.
   In this case the hif objects for later cores were not created and
   this caused system crash.

Fixes: 0ddc9b815b11 ("net/mrvl: add net PMD skeleton")
Cc: stable@dpdk.org
Signed-off-by: Natalie Samsonov <nsamsono@marvell.com>
6 years agonet/mrvl: fix multiple probe
Natalie Samsonov [Thu, 11 Jan 2018 15:35:39 +0000 (16:35 +0100)]
net/mrvl: fix multiple probe

MUSDK library initialization and cleanup should be done once.
This commit fixes that by doing necessary initialization once the first
port is probed and cleanup once the last port is removed.

Fixes: 0ddc9b815b11 ("net/mrvl: add net PMD skeleton")
Cc: stable@dpdk.org
Signed-off-by: Natalie Samsonov <nsamsono@marvell.com>
6 years agonet/bnxt: remove useless copy when setting MAC address
Olivier Matz [Wed, 3 Jan 2018 13:32:59 +0000 (14:32 +0100)]
net/bnxt: remove useless copy when setting MAC address

This operation is already done by the ethdev layer, it should not
be done by the driver.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
6 years agonet/vmxnet3: remove useless copy when setting MAC address
Olivier Matz [Wed, 3 Jan 2018 13:32:20 +0000 (14:32 +0100)]
net/vmxnet3: remove useless copy when setting MAC address

This operation is already done by the ethdev layer, it should not
be done by the driver.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/tap: remove unused kernel version definitions
Stephen Hemminger [Wed, 27 Dec 2017 18:28:36 +0000 (10:28 -0800)]
net/tap: remove unused kernel version definitions

The TAP device does not use these definitions in current version.
And kernel version is not the correct way to detect features.

Fixes: 7c2d03d65f5e ("net/tap: remove Linux version check")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agobus/fslmc: support scanned device count
Shreyansh Jain [Tue, 2 Jan 2018 13:08:38 +0000 (18:38 +0530)]
bus/fslmc: support scanned device count

FSLMC bus detects a multiple type of logical objects representing
components of the datapath.

Using the type of device, a newly introduced API
rte_fslmc_get_device_count can return the count of devices
scanned of that device type.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
6 years agonet/failsafe: improve Rx sub-devices iteration
Matan Azrad [Tue, 19 Dec 2017 17:14:29 +0000 (17:14 +0000)]
net/failsafe: improve Rx sub-devices iteration

Connecting the sub-devices each other by cyclic linked list can help to
iterate over them by Rx burst functions because there is no need to
check the sub-devices ring wraparound.

Create the aforementioned linked-list and change the Rx burst functions
iteration accordingly.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
6 years agonet/failsafe: mitigate data plane atomic operations
Matan Azrad [Tue, 19 Dec 2017 17:14:28 +0000 (17:14 +0000)]
net/failsafe: mitigate data plane atomic operations

Fail-safe uses atomic operations to protect sub-device close operation
calling by host thread in removal time while the removed sub-device
burst functions are still in process by application threads.

Using "set" atomic operations is a little bit more efficient than "add"
or "sub" atomic operations because "set" shouldn't read the value and
in fact, it does not need a special atomic mechanism in x86 platforms.

Replace "add 1" and "sub 1" atomic operations by "set 1" and "set 0"
atomic operations.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
6 years agonet/failsafe: fix Rx safe check compiler hint
Matan Azrad [Tue, 19 Dec 2017 17:14:27 +0000 (17:14 +0000)]
net/failsafe: fix Rx safe check compiler hint

failsafe_rx_burst function is used when there are no sub-devices or at
least one of them has been removed, on the other hand, when all the
sub-devices are present, failsafe_rx_burst_fast function is used.

So it's really expected that some of the sub-devices will be unsafe for
Rx burst in failsafe_rx_burst execution.

Remove unlikely compiler hint from fs_rx_unsafe calling.

Fixes: a46f8d584eb8 ("net/failsafe: add fail-safe PMD")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
6 years agonet/bonding: add ethdev ops function for MTU set
Sharmila Podury [Thu, 11 Jan 2018 19:12:44 +0000 (11:12 -0800)]
net/bonding: add ethdev ops function for MTU set

Set the MTU for bonding device by calling .mtu_set for all
the slaves. Set the MTU only if all slaves support .mtu_set,
and there is no error returned from any slave.

Signed-off-by: Sharmila Podury <sharmila.podury@att.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
6 years agonet/pcap: fix the NUMA id display in logs
Vipin Varghese [Fri, 22 Dec 2017 04:38:20 +0000 (10:08 +0530)]
net/pcap: fix the NUMA id display in logs

On single NUMA device the log information shows as boundary value
instead of -1. The change brings in unsigned to signed.

Fixes: 4c173302c307 ("pcap: add new driver")

Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
6 years agonet/enic: remove a conditional from the Tx path
John Daley [Wed, 10 Jan 2018 09:17:12 +0000 (01:17 -0800)]
net/enic: remove a conditional from the Tx path

The VLAN insert flag and VLAN tag used in the VIC write descriptor
can be set unconditionally.

Signed-off-by: John Daley <johndale@cisco.com>
Reviewed-by: Hyong Youb Kim <hyonkim@cisco.com>
6 years agonet/enic: use TSO flags
John Daley [Wed, 10 Jan 2018 09:17:11 +0000 (01:17 -0800)]
net/enic: use TSO flags

Depend on the tx_offload flags in the mbuf to determine the length
of the headers instead of looking into the packet itself.

Signed-off-by: John Daley <johndale@cisco.com>
Reviewed-by: Hyong Youb Kim <hyonkim@cisco.com>
6 years agonet/enic: use BSD-3-Clause
Hyong Youb Kim [Wed, 10 Jan 2018 09:17:10 +0000 (01:17 -0800)]
net/enic: use BSD-3-Clause

enic is currently using BSD-2-Clause, whereas the DPDK approved
license is BSD-3-Clause. So replace license text with BSD-3-Clause.

Remove LICENSE as it is redundant.

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
6 years agonet/enic: use dynamic log types
Hyong Youb Kim [Wed, 10 Jan 2018 09:17:09 +0000 (01:17 -0800)]
net/enic: use dynamic log types

"pmd.enic.init" replaces CONFIG_RTE_LIBRTE_ENIC_DEBUG
"pmd.enic.flow" replaces CONFIG_RTE_LIBRTE_ENIC_DEBUG_FLOW

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
6 years agonet/enic: refill only the address of the RQ descriptor
Hyong Youb Kim [Wed, 10 Jan 2018 09:17:08 +0000 (01:17 -0800)]
net/enic: refill only the address of the RQ descriptor

Once the RQ descriptors are initialized (enic_alloc_rx_queue_mbufs),
their length_type does not change during normal RX
operations. rx_pkt_burst only needs to reset their address field for
newly allocated mbufs.

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
6 years agonet/enic: remove a couple unnecessary statements
Hyong Youb Kim [Wed, 10 Jan 2018 09:17:07 +0000 (01:17 -0800)]
net/enic: remove a couple unnecessary statements

No need to zero ol_flags as it is overwritten at the end of the
function. No need to check for EOP as the caller (enic_recv_pkts) has
already checked it.

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
6 years agonet/enic: remove remaining header-split code
Hyong Youb Kim [Wed, 10 Jan 2018 09:17:06 +0000 (01:17 -0800)]
net/enic: remove remaining header-split code

Header splitting has been disabled at least since the following
commit. Remove the remaining code to avoid confusion.

commit 947d860c821f ("enic: improve Rx performance")

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
6 years agonet/enic: fix L4 Rx ptype comparison
Hyong Youb Kim [Wed, 10 Jan 2018 09:17:04 +0000 (01:17 -0800)]
net/enic: fix L4 Rx ptype comparison

For non-UDP/TCP packets, enic may wrongly set PKT_RX_L4_CKSUM_BAD in
ol_flags. The comparison that checks if a packet is UDP or TCP assumes
that RTE_PTYPE_L4 values are bit flags, but they are not. For example,
the following evaluates to true because NONFRAG is 0x600 and UDP is
0x200, and causes the current code to think the packet is UDP.

!!(RTE_PTYPE_L4_NONFRAG & RTE_PTYPE_L4_UDP)

So, fix this by comparing the packet type against UDP and TCP
individually.

Fixes: 453d15059b58 ("net/enic: use new Rx checksum flags")
Cc: stable@dpdk.org
Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
6 years agonet/enic: do not set checksum unknown offload flag
Hyong Youb Kim [Wed, 10 Jan 2018 09:17:05 +0000 (01:17 -0800)]
net/enic: do not set checksum unknown offload flag

PKT_RX_IP_CKSUM_UNKNOWN and PKT_RX_L4_CKSUM_UNKNOWN are zeros, so no
need to set them.

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
6 years agonet/enic: use the new ethdev offloads API
Hyong Youb Kim [Wed, 10 Jan 2018 09:17:03 +0000 (01:17 -0800)]
net/enic: use the new ethdev offloads API

The following commits deprecate the use of the offload bit fields
(e.g. header_split) in rte_eth_rxmode and txq_flags in rte_eth_txconf.

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

For enic, the required changes are mechanical. Use the new 'offloads'
field in rxmode instead of the bit fields. And, no changes required
with respect to txq_flags, as enic does not use it at all.

Per-queue RX offload capabilities are not set, as all offloads are
per-port at the moment.

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
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>