From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [dpdk-stable] [PATCH v4] net/tap: fix device removal when no queues exist Date: Mon, 21 May 2018 16:12:33 +0100 Message-ID: <60b60ef5-82a5-e8cf-c065-5eb95a83c962@intel.com> References: <1526632068-7467-1-git-send-email-ophirmu@mellanox.com> <1526889273-14691-1-git-send-email-ophirmu@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: "dev@dpdk.org" , Pascal Mazon , Thomas Monjalon , Olga Shern , Shahaf Shuler , "stable@dpdk.org" To: "Wiles, Keith" , Ophir Munk Return-path: In-Reply-To: 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 5/21/2018 1:52 PM, Wiles, Keith wrote: > > >> On May 21, 2018, at 2:54 AM, Ophir Munk 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@dpdk.org >> >> Signed-off-by: Ophir Munk >> --- >> 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 Applied to dpdk-next-net/master, thanks.