Go to file
Ophir Munk f46900d038 net/tap: fix flow and port commands
This commit fixes two bugs related to tap devices. The first bug occurs
when executing in testpmd the following flow rule assuming tap device has
4 rx and tx pair queues
"flow create 0 ingress pattern eth / end actions queue index 5 / end"
This command will report on success and will print ""Flow rule #0 created"
although it should have failed as queue index number 5 does not exist

The second bug occurs when executing in testpmd "port start all" following
a port configuration. Assuming 1 pair of rx and tx queues an error is
reported: "Fail to start port 0"

Before this commit a fixed max number (16) of rx and tx queue pairs were
created on startup where the file descriptors (fds) of rx and tx pairs were
identical.  As a result in the first bug queue index 5 existed because the
tap device was created with 16 rx and tx queue pairs regardless of the
configured number of queues. In the second bug when tap device was started
tx fd was closed before opening it and executing ioctl() on it. However
closing the sole fd of the device caused ioctl to fail with "No such
device".

This commit creates the configured number of rx and tx queue pairs (up to
max 16) and assigns a unique fd to each queue. It was written to solve the
first bug and was found as the right fix for the second bug as well.

Fixes: 02f96a0a82 ("net/tap: add TUN/TAP device PMD")
Fixes: bf7b7f437b ("net/tap: create netdevice during probing")
Fixes: de96fe68ae ("net/tap: add basic flow API patterns and actions")
Cc: stable@dpdk.org

Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
2017-10-06 02:49:48 +02:00
app app/testpmd: remove unnecessary void casts 2017-10-06 02:49:48 +02:00
buildtools buildtools: zero elf info variable in pmdinfogen 2017-09-14 14:20:41 +02:00
config net/mlx4: remove Tx inline compilation option 2017-10-06 02:49:47 +02:00
devtools devtools: fix version search with git < 2.7.0 2017-09-22 15:42:24 +02:00
doc net/sfc: free mbufs in bulks on simple EF10 Tx reap 2017-10-06 02:49:48 +02:00
drivers net/tap: fix flow and port commands 2017-10-06 02:49:48 +02:00
examples examples/vm_power_manager: add per-core turbo CLI 2017-09-22 16:35:13 +02:00
lib eal: fix auxv open check for ARM and PPC 2017-10-06 00:15:43 +02:00
mk mk: add sensible default target with defconfig 2017-08-05 10:27:04 +02:00
pkg version: 17.08.0 2017-08-08 20:01:40 +02:00
test test: fix assignment operation 2017-10-06 02:49:48 +02:00
usertools update Cavium Inc copyright headers 2017-07-08 17:43:49 +02:00
.gitattributes improve git diff 2016-11-13 15:25:12 +01:00
.gitignore devtools: add tags and cscope index generation 2017-04-30 12:57:04 +02:00
GNUmakefile mk: do not build tests by default 2017-02-28 16:04:18 +01:00
LICENSE.GPL doc: GPL/LGPL licenses 2013-07-25 14:43:06 +02:00
LICENSE.LGPL doc: fix file format (dos to unix) 2013-09-06 11:43:07 +02:00
MAINTAINERS doc: create different features files for NFP drivers 2017-10-06 02:49:48 +02:00
Makefile remove trailing whitespaces 2014-06-11 00:29:34 +02:00
README doc: add readme file 2015-12-13 22:06:58 +01:00

DPDK is a set of libraries and drivers for fast packet processing.
It supports many processor architectures and both FreeBSD and Linux.

The DPDK uses the Open Source BSD license for the core libraries and
drivers. The kernel components are GPLv2 licensed.

Please check the doc directory for release notes,
API documentation, and sample application information.

For questions and usage discussions, subscribe to: users@dpdk.org
Report bugs and issues to the development mailing list: dev@dpdk.org