Commit Graph

2485 Commits

Author SHA1 Message Date
Andrew Rybchenko
5688520075 net/sfc: implement simple EF10 native Tx datapath
The datapath does not support VLAN insertion, TSO and multi-segment
mbufs.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-04-04 18:59:43 +02:00
Andrew Rybchenko
ea2ed84c2f net/sfc: make multi-segment support a Tx datapath feature
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-04-04 18:59:43 +02:00
Andrew Rybchenko
8b00f426eb net/sfc: implement EF10 native Tx datapath
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: David Riddoch <driddoch@solarflare.com>
2017-04-04 18:59:43 +02:00
Andrew Rybchenko
7a4d44a639 net/sfc: make TSO a datapath-dependent feature
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-04-04 18:59:43 +02:00
Andrew Rybchenko
45cbb96c06 net/sfc: make VLAN insertion a datapath-dependent feature
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-04-04 18:59:43 +02:00
Andrew Rybchenko
dbdc82416b net/sfc: factor out libefx-based Tx datapath
Split control and datapath to make datapath substitutable and
possibly reusable with alternative control path.

libefx-based Tx datapath is bound to libefx control path, but
it should be possible to use other datapaths with alternative
control path(s).

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-04-04 18:59:43 +02:00
Andrew Rybchenko
638bddc99f net/sfc: implement EF10 native Rx datapath
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: David Riddoch <driddoch@solarflare.com>
2017-04-04 18:59:42 +02:00
Andrew Rybchenko
f1d2d9360f net/sfc: remove few conditions in Rx queue refill
If Rx refill threshold guarantees that refill happens for one or
more bulks, less checks may be done on refill.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-04-04 18:59:42 +02:00
Andrew Rybchenko
99a4949ff7 net/sfc: make Rx scatter a datapath-dependent feature
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-04-04 18:59:42 +02:00
Andrew Rybchenko
df1bfde4ff net/sfc: factor out libefx-based Rx datapath
Split control and datapath to make datapath substitutable and
possibly reusable with alternative control path.

libefx-based Rx datapath is bound to libefx control path, but
other datapaths should be possible to use with alternative
control path(s).

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-04-04 18:59:42 +02:00
Andrew Rybchenko
b762eca9dd net/sfc: do not use Rx queue control state on datapath
Rx queue flags should keep the information required on datapath.

It is a preparation to split control and data paths.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-04-04 18:59:42 +02:00
Andrew Rybchenko
ad2a75c1bb net/sfc: emphasis that RSS hash flag is an Rx queue flag
Style fix to establish namespace for Rx queue flag defines.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-04-04 18:59:42 +02:00
Andrew Rybchenko
7965557ede net/sfc: use different callbacks for event queues
Use different sets of libefx EvQ callbacks for management,
transmit and receive event queue. It makes event handling
more robust against unexpected events.

Also it is required for alternative datapath support.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-04-04 18:59:42 +02:00
Vasily Philipov
46d5736a70 net/mlx4: support basic flow items and actions
Adding support for the next items: eth, vlan, ipv4, udp, tcp and for the
next actions: queue, drop

Signed-off-by: Vasily Philipov <vasilyf@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-04-04 18:59:42 +02:00
Vasily Philipov
58610cdde8 net/mlx4: split the definitions to the header file
Make priv_lock/priv_unlock functions and some other structs/defines visible
from different source files by placing them into mlx4.h header.

Signed-off-by: Vasily Philipov <vasilyf@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-04-04 18:59:42 +02:00
Gaetan Rivet
3fca2ab597 net/mlx4: update link status upon probing with LSC
If LSC interrupts are enabled, the application expects the link_update
ops to be executed by the PMD itself.

No link status change event is received upon probing, therefore the link
status update must be forced.

Fixes: c4da6caa42 ("mlx4: handle link status interrupts")
Cc: stable@dpdk.org

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-04-04 18:59:42 +02:00
Jerin Jacob
fc2c80148e net/thunderx: fix build on FreeBSD
SIMPLEQ_* operations are not available in FreeBSD. Replacing
with equivalent STAILQ_* operations.

Fixes: f2546f8e51 ("net/thunderx/base: add functions to store qsets")

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-04-04 18:59:41 +02:00
Jerin Jacob
6d76fde7db net/thunderx: fix 32-bit build
Fixes: e438796617 ("net/thunderx: add PMD skeleton")

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-04-04 18:59:41 +02:00
Andrew Rybchenko
244cfa79a4 net/sfc: add missing BSD license line and update year
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-04-04 18:59:41 +02:00
Yongseok Koh
6ce84bd889 net/mlx5: add enhanced multi-packet send for ConnectX-5
ConnectX-5 supports enhanced version of multi-packet send (MPS). An MPS Tx
descriptor can carry multiple packets either by including pointers of
packets or by inlining packets. Inlining packet data can be helpful to
better utilize PCIe bandwidth. In addition, Enhanced MPS supports hybrid
mode - mixing inlined packets and pointers in a descriptor. This feature is
enabled by default if supported by HW.

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
2017-04-04 18:59:41 +02:00
Nélio Laranjeiro
c2c6ddd51d net/mlx5: limit flow API rules to one tunnel
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-04-04 18:59:41 +02:00
Ivan Malov
83fef46a22 net/sfc: add callback to retrieve FW version
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
2017-04-04 18:59:41 +02:00
Ivan Malov
ba6afee9a8 net/sfc/base: add advanced function to extract FW version
Some libefx-based drivers might need this functionality to
indicate DPCPU FW IDs as part of FW version info to assist
experienced users.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
2017-04-04 18:59:41 +02:00
Wenzhuo Lu
92717a8e9b net/i40e: fix broadcast promiscuous mode setting
When setting up the VSIs, MAC filter is used for
receiving MAC broadcast packets.
We should follow it to implement the broadcast
promiscuous mode setting.

Fixes: 61fff9b4c6 ("net/i40e: set VF broadcast mode from PF")
Cc: stable@dpdk.org

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 18:59:41 +02:00
Chas Williams
04df93d1ed net/vmxnet3: fix queue size changes
If the user reconfigures the queue size, then the previously allocated
memzone may potentially be too small.  Release the memzone when a queue
is released and allocate a new one each time a queue is setup.

While here convert to rte_eth_dma_zone_reserve() which does basically
the same things as the private function.

Fixes: dfaff37fc4 ("vmxnet3: import new vmxnet3 poll mode driver implementation")
Cc: stable@dpdk.org

Signed-off-by: Chas Williams <ciwillia@brocade.com>
Acked-by: Jan Blunck <jblunck@infradead.org>
Acked-by: Shrikrishna Khare <skhare@vmware.com>
2017-04-04 18:59:41 +02:00
Pascal Mazon
2d3ebfeea9 net/tap: add flow control management
A tap netdevice does not support flow control; ensure nothing but
RTE_FC_NONE mode can be set.

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-04-04 18:59:41 +02:00
Pascal Mazon
0849ac3b61 net/tap: add packet type management
Advertise packet types supported by the librte_net.

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-04-04 18:59:40 +02:00
Pascal Mazon
730651c27c net/tap: add multicast addresses management
A tap netdevice actually receives every packet, without any filtering
whatsoever. There is no need for any multicast address registration
to receive multicast packets.

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-04-04 18:59:40 +02:00
Pascal Mazon
4a25714ad9 net/tap: add speed capabilities
Tap PMD is flexible, it supports any speed.

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-04-04 18:59:40 +02:00
Pascal Mazon
e5dc143a42 net/tap: add MTU management
The MTU is assigned to the tap netdevice according to the argument, but
packet transmission and reception just write/read on an fd with the
default limit being the socket buffer size.

As a new rte_eth_dev_data is allocated during tap device init, ensure it
is set again dev->data->mtu.
Once the actual netdevice is created via tun_alloc(), make sure to apply
the desired MTU to the netdevice.

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-04-04 18:59:40 +02:00
Pascal Mazon
f76d46b4ff net/tap: add MAC address management
As soon as the netdevice is created, update pmd->mac_addr with its
actual MAC address.

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-04-04 18:59:40 +02:00
Pascal Mazon
73cf55c8bd net/tap: refactor ioctl calls
Create a socket for ioctl at tap device creation instead of opening it
and closing it every call to tap_link_set_flags().

Use a common tap_ioctl() function that can be extended for various uses
(such as MTU change, MAC address change, ...).

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-04-04 18:59:40 +02:00
Pascal Mazon
9d4aabe66a net/tap: remove NO-ARP setting
There is no reason not to support ARP on a tap netdevice. Remove
IFF_NOARP flags.
Focus on IFF_UP when a link status change is required.

Fixes: f457b472b1 ("net/tap: add link up and down operations")

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-04-04 18:59:40 +02:00
Ivan Malov
223a29a25e net/sfc: add VFs to the table of PCI IDs for supported NICs
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
2017-04-04 18:59:40 +02:00
Ivan Malov
4650ed44c1 net/sfc: support MCDI proxy
The patch is to add support for MCDI proxy which comes in
useful, particularly, while running over VF: few commands
will normally fail with EPERM, but in some cases the host
driver (i.e. running over the corresponding PF, typically,
within a hypervisor) may set itself as a proxy to conduct
authorization for the commands coming from VFs; these are
forwarded to the corresponding access control application
which may decline or approve authorization by replying to
the requests; all in all, the guest driver has to process
the replies forwarded back by the firmware MC in order to
give up gracefully (by setting return code which could be
understood by 'libefx') or re-issue the original commands

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
2017-04-04 18:59:40 +02:00
Ivan Malov
f5258439ee net/sfc: avoid failure on port start if Rx mode is rejected
If Rx mode is unacceptable, in particular, when promiscuous
or all-multicast filters are not allowed while running over
PCI function which is not a member of appropriate privilege
groups, the driver has to cope with the failures gracefully

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
2017-04-04 18:59:40 +02:00
Ivan Malov
178fc0d327 net/sfc: poll MAC stats if periodic DMA is not supported
If periodic DMA statistics feature is absent (particularly,
while running over VF), the PMD must provide an ability to
cope with it using explicit update requests which are kept
restrained according to 'stats_update_period_ms' parameter

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
2017-04-04 18:59:40 +02:00
Ivan Malov
e56fa9c23e net/sfc: add kvarg control for MAC statistics update period
The patch is to make MAC statistics update interval tunable
by means of 'stats_update_period_ms' kvarg parameter making
it possible to use values different from 1000 ms in case of
SFN8xxx boards provided that firmware version is 6.2.1.1033

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
2017-04-04 18:59:40 +02:00
Andrew Rybchenko
fe8e3dc248 net/sfc/base: do not ignore MAC stats update period
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-04-04 18:59:40 +02:00
Yong Wang
1207f3f722 net/ena: fix return of hash control flushing
In function ena_com_set_hash_ctrl(), the return value is assigned to
"ret" variable, but it is not returned. Fix it by adding the return.

Fixes: 99ecfbf845 ("ena: import communication layer")
Cc: stable@dpdk.org

Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
Acked-by: Jan Medala <jan@semihalf.com>
2017-04-04 18:59:40 +02:00
Yong Wang
70153557a9 net/ena: remove redundant variable
Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
Acked-by: Jan Medala <jan@semihalf.com>
2017-04-04 18:59:39 +02:00
Johan Samuelsson
8dc7358b28 net/pcap: fix using mbuf after freeing it
Fixes: 2269e7e815 ("pcap: add Rx and Tx byte counters")
Cc: stable@dpdk.org

Signed-off-by: Johan Samuelsson <johan.xb.samuelsson@ericsson.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-04-04 18:59:39 +02:00
Olivier Matz
e3efd85bf9 net/i40e: fix error log in descriptor done function
It's not queue identifier but a descriptor identifier.

Fixes: 4861cde461 ("i40e: new poll mode driver")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
2017-04-04 18:59:39 +02:00
Shahaf Shuler
3c7d44af25 net/mlx5: support user space Rx interrupt event
Implement rxq interrupt callbacks

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2017-04-04 18:59:39 +02:00
Adrien Mazarguil
a0d8e807d9 net/tap: add Rx trigger
This commit adds a signal-based trigger to the Rx burst function in order
to avoid unnecessary system calls while Rx queues are empty.

Triggered Rx bursts put less pressure on the kernel, free up CPU resources
for applications and result in a noticeable performance improvement when
sharing CPU threads with other PMDs.

Measuring the traffic forwarding rate between two physical devices in
testpmd (IO mode, single thread, 64B packets) before and after adding two
tap PMD instances (4 ports total) that do not process any traffic and
comparing results yields:

Without Rx trigger:

 -15% (--burst=32)
 -62% (--burst=1)

With Rx trigger:

 -0.3% (--burst=32)
 -6% (--burst=1)

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
2017-04-04 18:59:39 +02:00
Adrien Mazarguil
d3668acb7b net/tap: remove redundant syscall on Tx
Polling the Tx queue file descriptor before writing to it is not mandatory
since it is configured as non-blocking.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
2017-04-04 18:59:39 +02:00
Jerin Jacob
34c2e7026f net/thunderx: check data offset alignment requirement
nicvf HW expects the DMA address of the packet data to be
aligned with cache line size.

Packet data offset is a function of struct mbuf size,
mbuf private size and headroom. mbuf private size can
be changed from the application in pool creation, this
check detects HW alignment requirement constraint in pmd
start function.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-04 18:59:39 +02:00
Allain Legacy
0934b7f12a net/e1000: advertise offload capabilities for the EM PMD
The hardware offload capabilities are not being advertised for the EM PMD.
Because of this, applications that only enable these features if the device
advertises them will never do so.

Normally this is not an issue since normal packet processing should work
even if hardware offload is not available.  But, in older versions of
Virtual Box the e1000 device emulation (Intel PRO/1000 MT Desktop 82540EM)
assumes that it should enable VLAN stripping even if the driver does not
request it.  This means that any ingress packets that have a VLAN tag will
be stripped.  Since the application did not request to enable VLAN
stripping it is not expecting these packets so they are not processed as
VLAN packets.

Regardless of the Virtual Box issue, the driver should be advertising
supported capabilities as is done in other drivers.

Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 18:59:39 +02:00
Ivan Malov
295f647a38 net/sfc: set multicast address list in started state only
According to 'libefx' API requirements, one is allowed to
apply multicast address list to the port in started state
only, otherwise the new array should be copied to a local
storage in order to be applied during the next port start

Coverity issue: 141296
Fixes: 0fa0070e43 ("net/sfc: support multicast addresses list controls")

Fixes: e9ddf37a50 ("net/sfc: fix setting empty multicast list")
Cc: stable@dpdk.org

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
2017-04-04 18:59:23 +02:00
Roman Zhukov
8cb45c97d3 net/sfc: add unknown unicast/multicast match in flow API
Support individual/group destination address match (unknown unicast
and all-multicast correspondingly in terms of firmware).

Signed-off-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
2017-04-04 18:59:15 +02:00