[dpdk-dev] [dpdk-stable] [PATCH v4] net/tap: fix device removal when no queues exist

Ferruh Yigit ferruh.yigit at intel.com
Mon May 21 17:12:33 CEST 2018


On 5/21/2018 1:52 PM, Wiles, Keith wrote:
> 
> 
>> On May 21, 2018, at 2:54 AM, Ophir Munk <ophirmu at mellanox.com> wrote:
>>
>> TAP device is created following its first queue creation. Multiple
>> queues can be added or removed over time. In Linux terminology those
>> are file descriptors which are opened or closed over time. As long as
>> the number of opened file descriptors is positive - TAP device will
>> appear as a Linux device. In case all queues are released (the
>> equivalent of all file descriptors being closed) the TAP device will
>> be removed. This can lead to abnormalities in different scenarios
>> where the TAP device should exist even if all its queues are released.
>> In order to make TAP existence independent of its number of queues -
>> an extra file descriptor is opened on TAP creation and is closed on
>> TAP closure. Its only purpose is to serve as a keep-alive mechanism
>> for the TAP device.
>>
>> Fixes: bf7b7f437b49 ("net/tap: create netdevice during probing")
>> Cc: stable at dpdk.org
>>
>> Signed-off-by: Ophir Munk <ophirmu at mellanox.com>
>> ---
>> v1:
>> Initial release
>> v2:
>> Reword commit message (a fixing patch)
>> v3:
>> Following review comments (return value of ka_fd)
>> and commit message typo fixing
>> v4:
>> Explicit setting pmd->ka_fd = -1 in eth_dev_tap_create()
>>
> 
> Acked by: Keith Wiles <keith.wiles at intel.com>

Applied to dpdk-next-net/master, thanks.


More information about the dev mailing list