From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 610531B168; Mon, 21 May 2018 14:52:29 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 May 2018 05:52:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,426,1520924400"; d="scan'208";a="56160634" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga004.fm.intel.com with ESMTP; 21 May 2018 05:52:27 -0700 Received: from fmsmsx117.amr.corp.intel.com ([169.254.3.235]) by FMSMSX103.amr.corp.intel.com ([169.254.2.228]) with mapi id 14.03.0319.002; Mon, 21 May 2018 05:52:27 -0700 From: "Wiles, Keith" To: Ophir Munk CC: "dev@dpdk.org" , Pascal Mazon , Thomas Monjalon , Olga Shern , Shahaf Shuler , "stable@dpdk.org" Thread-Topic: [PATCH v4] net/tap: fix device removal when no queues exist Thread-Index: AQHT8NkGaXFLYXCYq0y9BSJM5Il5TKQ6mMoA Date: Mon, 21 May 2018 12:52:26 +0000 Message-ID: References: <1526632068-7467-1-git-send-email-ophirmu@mellanox.com> <1526889273-14691-1-git-send-email-ophirmu@mellanox.com> In-Reply-To: <1526889273-14691-1-git-send-email-ophirmu@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.254.53.246] Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v4] net/tap: fix device removal when no queues exist X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 12:52:30 -0000 > On May 21, 2018, at 2:54 AM, Ophir Munk wrote: >=20 > 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. >=20 > Fixes: bf7b7f437b49 ("net/tap: create netdevice during probing") > Cc: stable@dpdk.org >=20 > 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 =3D -1 in eth_dev_tap_create() >=20 Acked by: Keith Wiles Regards, Keith