path: root/drivers/net/mlx5/mlx5_rxtx.c
diff options
authorOphir Munk <>2017-09-16 22:32:38 +0000
committerFerruh Yigit <>2017-10-06 02:49:48 +0200
commitf46900d03823aff1cb636a2f889caeee99c721b2 (patch)
treefa0d7796b8be1f55a7524911d5ba1da45675d4bc /drivers/net/mlx5/mlx5_rxtx.c
parente19e163d27dfc342bf58e49c605fededa6cfc6fb (diff)
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: 02f96a0a82d1 ("net/tap: add TUN/TAP device PMD") Fixes: bf7b7f437b49 ("net/tap: create netdevice during probing") Fixes: de96fe68ae95 ("net/tap: add basic flow API patterns and actions") Cc: Signed-off-by: Ophir Munk <> Acked-by: Pascal Mazon <>
Diffstat (limited to 'drivers/net/mlx5/mlx5_rxtx.c')
0 files changed, 0 insertions, 0 deletions