From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [dpdk-stable] [PATCH v3] net/tap: fix flow and port commands Date: Mon, 18 Sep 2017 20:35:55 +0100 Message-ID: References: <0e18a611-3b35-6624-013b-59c72f71307b@6wind.com> <1505601158-21256-1-git-send-email-ophirmu@mellanox.com> <30b8c47b-9f44-881e-ee71-7b6e2abc5da1@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Adrien Mazarguil , dev@dpdk.org, Thomas Monjalon , Olga Shern , stable@dpdk.org To: Pascal Mazon , Ophir Munk Return-path: In-Reply-To: <30b8c47b-9f44-881e-ee71-7b6e2abc5da1@6wind.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 9/18/2017 8:46 AM, Pascal Mazon wrote: > > On 17/09/2017 00:32, Ophir Munk wrote: >> 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: stable@dpdk.org >> >> Signed-off-by: Ophir Munk > Hi, > > Your reasons to keep *dev in pmd_internals are good enough for me! > > The rest of the patch looks fine. > > Acked-by: Pascal Mazon Applied to dpdk-next-net/master, thanks. (Welcome Ophir!)