Commit Graph

6984 Commits

Author SHA1 Message Date
Keith Wiles
6b38b2725c net/tap: fix multi-queue support
At the same time remove the code which created the first device queue
at probe time. Now all queues are created during queue setup calls.

Fixes: 02f96a0a82 ("net/tap: add TUN/TAP device PMD")

Signed-off-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
2017-02-10 12:25:49 +01:00
Keith Wiles
f4f0b1bc13 net/tap: remove unused variable
Signed-off-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
2017-02-10 12:25:49 +01:00
Keith Wiles
c1f2e8c78c net/tap: remove redundant file descriptor array
Signed-off-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
2017-02-10 12:25:49 +01:00
Keith Wiles
0f22423470 net/tap: fix guide for device name
Fixes: 02f96a0a82 ("net/tap: add TUN/TAP device PMD")

Signed-off-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
2017-02-10 12:25:49 +01:00
Wei Zhao
a50c11629c net/ixgbe: fix VXLAN parsing for flow director
VNI of VXLAN is parsed wrongly. The root cause is that
VNI array in VXLAN item also uses network byte ordering.

Fixes: 11777435c7 ("net/ixgbe: parse flow director filter")
Cc: stable@dpdk.org

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
2017-02-10 12:25:49 +01:00
Wei Zhao
37ed39b4e6 net/ixgbe: add TCI mask check for flow director
Add more check on the tci mask of VLAN and VXLAN parser
in fdir filter rule pattern parser. If such check not added,
it maybe cause error in fdir configuration set check.

Fixes: 11777435c7 ("net/ixgbe: parse flow director filter")
Cc: stable@dpdk.org

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
2017-02-10 12:25:49 +01:00
John Daley
ed6e564c21 net/enic: fix memory leak with oversized Tx packets
If a packet send is attempted with a packet larger than the NIC
is capable of processing (9208) it will be dropped with no
completion descriptor returned or completion index update, which
will lead to an mbuf leak and eventual hang.

Drop and count oversized Tx packets in the Tx burst function and
dereference/free the mbuf without sending it to the NIC.

Since the maximum Rx and Tx packet sizes are different on enic
and are now both being used, make the define ENIC_DEFAULT_MAX_PKT_SIZE
be 2 defines, one for Rx and one for Tx.

Fixes: fefed3d1e6 ("enic: new driver")
Cc: stable@dpdk.org

Signed-off-by: John Daley <johndale@cisco.com>
2017-02-10 12:25:49 +01:00
Pascal Mazon
123c42a487 net/tap: support promiscuous and allmulticast
Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
2017-02-10 12:25:49 +01:00
Pascal Mazon
f457b472b1 net/tap: add link up and down operations
Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
2017-02-10 12:25:49 +01:00
Pascal Mazon
7835953870 net/tap: display name after parsing
The probe parses for user-defined iface name. Let's use that value.

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
2017-02-10 12:25:49 +01:00
Pascal Mazon
634dbc7aa7 net/tap: keep kernel-assigned MAC address
There's no point in having a different internal MAC address than the one
provided by the kernel when creating the netdevice.

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
2017-02-10 12:25:49 +01:00
Pascal Mazon
455c14e974 net/tap: skip overwritten file descriptor assignment
pmd->fds[0], pmd->rxq[0] and pmd->txq[0] are set a couple of lines after
the for loop that initializes them to -1.

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
2017-02-10 12:25:49 +01:00
Pascal Mazon
f48a8d6797 net/tap: fix log level of errors
Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
2017-02-10 12:25:48 +01:00
Pascal Mazon
542594d3fb net/tap: fix name
dev->data->name contains the device name, e.g. "net_tap0".
dev->data->dev_private->name contains the actual iface name,
e.g. "dtap0".

In any case, the name must to be consistent with the tun_alloc() call in
eth_dev_tap_create().

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
2017-02-10 12:25:48 +01:00
Nélio Laranjeiro
8fcd6c2cf1 net/mlx5: fix inline WQE consumption
For some sizes of packets, the number of bytes copied in the work queue
element could be greater than the available size of the inline.  In such
situation it could consume one more work queue element where it should
not.

Fixes: 0e8679fcdd ("net/mlx5: fix inline logic")
Cc: stable@dpdk.org

Reported-by: Elad Persiko <eladpe@mellanox.com>
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-02-10 12:25:48 +01:00
Nélio Laranjeiro
f04f1d5156 net/mlx5: fix Tx WQE corruption caused by starvation
Fixes an issue which may occurs with the inline feature activated and a
packet greater than the max_inline requested.

In such situation, more work request elements can be consumed and in the
worst case override some still handled by the NIC, this can result in
sending garbage on the network or putting the work queue in error.

Fixes: 2a66cf3789 ("net/mlx5: support inline send")
Cc: stable@dpdk.org

Reported-by: Elad Persiko <eladpe@mellanox.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2017-02-10 12:25:48 +01:00
Nélio Laranjeiro
0d637a34cb net/mlx5: fix ethernet header re-writing
First two bytes of the Ethernet header was written twice at the same place.

Fixes: b8fe952ec5 ("net/mlx5: prepare Tx vectorization")

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-02-10 12:25:48 +01:00
Ivan Malov
e9ddf37a50 net/sfc: fix setting empty multicast list
The patch is to fix sfc_set_mc_addr_list() behaviour in order
to make it accept an empty multicast address list thus making
it possible to remove multicast addresses inserted previously

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

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-02-10 12:25:48 +01:00
Nélio Laranjeiro
05d7777b6f net/mlx5: fix flow rule creation if ports are stopped
Adding a flow when the port is stopped ends in an inconsistent situation
where the queue can receive traffic when it should not.
Record new rules and apply them as soon as the port is started.

Fixes: 2097d0d1e2 ("net/mlx5: support basic flow items and actions")

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-02-10 12:25:48 +01:00
Nélio Laranjeiro
6194f53bb3 net/mlx5: fix verification of mark action
A configuration structure for the MARK action must always be specified.

Fixes: ea3bc3b1df ("net/mlx5: support mark flow action")

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-02-10 12:25:48 +01:00
Nélio Laranjeiro
8978c13e54 net/mlx5: use flow API default masks
Default masks were introduced in the API after its implementation in this
PMD.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-02-10 12:25:48 +01:00
Shahaf Shuler
a9f2fbc42f net/mlx5: fix inconsistent link status
Querying the link status can end up being in an inconsistent state,
like the port is reporting speed although it is down.

For this case another query is scheduled.

A race condition can occur between the scheduled query and link
status interrupt handlers.

When the scheduled query by-pass interrupt handlers, the link status
will be stuck in an inconsistent state.

This patch addresses the race condition by not blocking link status
queries in case delayed query is used.

Fixes: 198a3c339a ("mlx5: handle link status interrupts")
Cc: stable@dpdk.org

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-02-10 12:25:48 +01:00
Yong Wang
511a4c74b8 pci: fix UIO interrupt file descriptor check before close
The "dev->intr_handle.fd" is possibly a negative value while it is
passed as an argument to function "close". Fix the check to the fd.

Fixes: 5a60a7ffc8 ("pci: introduce functions to alloc and free uio resource")

Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
2017-02-10 14:23:27 +01:00
Ido Barnea
b392e9871d net/virtio: add speed capability
The chosen fake capability (10G) is consistent with the reported
link speed in virtio_dev_link_update():
	link.link_speed = SPEED_10G;

The feature is not marked in doc/guides/nics/features/virtio.ini
because it is only a fake value.

Signed-off-by: Ido Barnea <ibarnea@cisco.com>
[Thomas: comments added]
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2017-02-10 12:06:16 +01:00
Jianfeng Tan
18aea6b6f8 doc: postpone ABI changes in igb_uio
This ABI changes to remove iomem and ioport mapping in igb_uio. The
purpose of this changes was to fix a bug: when DPDK app crashes,
those devices by igb_uio are not stopped either DPDK PMD driver or
igb_uio driver.

Then it has been pointed out by Stephen Hemminger that it has
backward compatibility issue: cannot run old version DPDK on
modified igb_uio.

However, we still have not figure out a new way to fix this bug
without this change. Let's postpone this deprecation announcement
in case this change cannot be avoided.

Fixes: 3bac1dbc1e ("doc: announce iomem and ioport removal from igb_uio")

Suggested-by: Stephen Hemminger <stephen@networkplumber.org>
Suggested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Suggested-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-02-10 11:49:17 +01:00
Jianfeng Tan
0ba3870e75 doc: add guide to use virtio-user as exceptional path
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
2017-02-10 11:49:16 +01:00
Jianfeng Tan
50665deebd doc: add guide to use virtio-user for container networking
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
2017-02-10 11:49:16 +01:00
Ferruh Yigit
ab12f71b31 mk: move PMD libraries linking to applications
Some PMDs provide device specific APIs. Bond and xenvirt are existing
samples for this.

And since these are PMD libraries, there are two options on how to link
them for shared library build:

1- They can be linked to all applications by default, using common
rte.app.mk file.

2- They can be explicitly linked to applications that use device
specific API.

Currently option one is in use, this patch switches to the option two.

Moves library linking to the Makefile of application Makefile that uses
device specific API.

This prevent these PMD libraries to be a dependency to applications
that don't use these device specific APIs.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-02-10 11:03:27 +01:00
Ferruh Yigit
04bdcb3255 app/testpmd: use LDLIBS in makefile
_LDLIBS is for internal usage, convert to LDLIBS usage.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-02-09 23:12:55 +01:00
Ferruh Yigit
36b846a91b mk: link more libraries without --whole-archive
During app build with static library, some libraries wrapped with
--whole-archive compiler flag.

Wrapped libraries are mainly PMD libraries, this is required because PMD
APIs not called directly but run through callbacks registered via
constructor functions.

Also some set of libraries, depends to the PMD libraries needs this,
because of same reason.

All the libraries used by a plugin (any driver) must be in
--whole-archive to ensure that every symbols will be available for the
plugin.

But other libraries can be out of this flag, and this saves some bytes
in final binary.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2017-02-09 22:50:19 +01:00
Qiming Yang
20541112a9 examples/ethtool: display bus information
This patch enhances the ethtool example to support to show
bus information, in the same way that the Linux kernel
ethtool does.

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Remy Horton <remy.horton@intel.com>
2017-02-09 22:32:52 +01:00
Alan Dewar
3b780b9e9e sched: fix crash when freeing port
Prevent a segmentation fault in rte_sched_port_free by only accessing
the port structure after the NULL pointer check has been made.

Fixes: 7b3c4f35 ("sched: fix releasing enqueued packets")
Cc: stable@dpdk.org

Signed-off-by: Alan Dewar <adewar@brocade.com>
Signed-off-by: Jan Blunck <jblunck@infradead.org>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2017-02-09 18:46:52 +01:00
Patrick MacArthur
811b6b2506 vfio: fix file descriptor leak in multi-process
When a secondary process wants access to the VFIO container file
descriptor, the primary process calls vfio_get_container_fd() which
always opens an entirely new file descriptor on /dev/vfio/vfio.
However, once the file descriptor has been passed to the subprocess, it
is effectively duplicated, meaning that the copy of the file descriptor
in the primary process is no longer needed.  However, the primary
process does not close the duplicate fd, which results in a resource
leak.

This can be reproduced by starting a primary process with a small
RLIMIT_NOFILE limit configured to use VFIO for at least one device, and
repeatedly launching secondary processes until the file descriptor limit
is exceeded.

Fix the resource leak by closing the local vfio container file
descriptor after passing it to the secondary process.

Fixes: 2f4adfad0a ("vfio: add multiprocess support")
Cc: stable@dpdk.org

Signed-off-by: Patrick MacArthur <patrick@patrickmacarthur.net>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
2017-02-09 18:39:30 +01:00
Daniel Mrzyglod
42537ad1b9 app/crypto-perf: fix FreeBSD build
This patch fixes error: implicit declaration of function 'getline'

Fixes: f8be1786b1 ("app/crypto-perf: introduce performance test application")

Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
2017-02-09 16:42:12 +01:00
Nelio Laranjeiro
304eedb605 doc: add flow API to features list
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-02-09 16:42:12 +01:00
Jiayu Hu
82d39f28c1 doc: add xstats to virtio features list
Currently, extended statistics has been supported by virtio. But there
are no corresponding document updates. Therefore, this patch is to update
the document for virtio xstats feature.

Fixes: 76d4c652e0 ("virtio: add extended stats")

Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Acked-by: Remy Horton <remy.horton@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2017-02-09 16:14:44 +01:00
Olivier Matz
604a69493d doc: add known issue for virtio TSO with clones
Document the issue with Tso on shared packets.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
2017-02-09 16:05:29 +01:00
John Daley
e736083b5d doc: update release notes for enic driver
Signed-off-by: John Daley <johndale@cisco.com>
2017-02-09 15:58:51 +01:00
Ferruh Yigit
a6090630f4 doc: automate examples file list for API
These files are linked to API documentation as usage samples, list of
files created automatically during doc creation.

Remove manually updated old one.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2017-02-08 19:12:08 +01:00
Matej Vido
304ca3e3b2 maintainers: update email address
Signed-off-by: Matej Vido <matejvido@gmail.com>
2017-02-08 18:43:31 +01:00
Adrien Mazarguil
42b89383e0 maintainers: update mlx4/mlx5
Promote Nelio as additional maintainer for mlx4 and mlx5 PMDs.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Olga Shern <olgas@mellanox.com>
2017-02-08 18:41:19 +01:00
Yuanhan Liu
9f16c4c786 maintainers: split virtio and vhost
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2017-02-08 18:41:16 +01:00
Yuanhan Liu
b098e97a92 maintainers: update for virtio
Huawei has left DPDK team for months, and he hasn't showed up since
then. Remove him.

Cc: Huawei Xie <huawei.xie@intel.com>
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
2017-02-08 18:41:05 +01:00
John McNamara
2ae4a997b8 doc: add guidelines on stable and lts releases
Add document explaining the current Stable and LTS process.

Signed-off-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2017-02-08 15:33:36 +01:00
Anders Roxell
90816e2c45 pkg: remove xen-devel for aarch64
Disable xen-devel since it just got available for aarch64 in Fedora 25.

Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
2017-02-07 23:47:42 +01:00
Anders Roxell
9f9cb6fe9a pkg: support aarch64
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
2017-02-07 23:47:07 +01:00
Thomas Monjalon
5b243cbab2 version: 17.02-rc2
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2017-01-30 23:47:11 +01:00
Ferruh Yigit
26fb45a328 doc: add device specific API
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-01-30 23:47:11 +01:00
Keith Wiles
0002ca582d net/tap: fix invalid queue file descriptor
Rx and Tx queues share the common tap file descriptor, but save this
value separately.

Setting up Rx/Tx queue sets up both queues, release_queue close the
tap file but update file descriptor only for that queue.

This makes other queue's file descriptor invalid.

As a workaround, prevent release_queue callback to be called by default.

This is done by separating Rx/Tx setup functions, so that each only
setup its own queue, this prevents rte_eth_rx/tx_queue_setup() calling
release_queue before setup_queue.

Fixes: 02f96a0a82 ("net/tap: add TUN/TAP device PMD")

Signed-off-by: Keith Wiles <keith.wiles@intel.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-01-30 22:18:27 +01:00
Ferruh Yigit
f2462150ec drivers/net: remove redundant new line from logs
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2017-01-30 22:18:27 +01:00