From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id BEBE0A04B3; Mon, 11 Nov 2019 09:15:07 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 325872986; Mon, 11 Nov 2019 09:15:07 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 13B2F2904 for ; Mon, 11 Nov 2019 09:15:04 +0100 (CET) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Nov 2019 00:15:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,291,1569308400"; d="scan'208";a="207055072" Received: from dpdk-virtio-tbie-2.sh.intel.com (HELO ___) ([10.67.104.74]) by orsmga006.jf.intel.com with ESMTP; 11 Nov 2019 00:15:03 -0800 Date: Mon, 11 Nov 2019 16:15:44 +0800 From: Tiwei Bie To: Stephen Hemminger Cc: Maxime Coquelin , Zhihong Wang , dev@dpdk.org Message-ID: <20191111081543.GA12998@___> References: <20191108154407.0bd8734d@hermes.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20191108154407.0bd8734d@hermes.lan> User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-dev] vtap0 device creation (bug)? 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, Nov 08, 2019 at 03:44:07PM -0800, Stephen Hemminger wrote: > When I create a virtio-user device with rte_hotplug it creates a kernel device (ie vtap0). > This is normal an the device has ifindex N. > > But later when device is configured an started the original vtap0 device is deleted > and a new one is created (with ifindex N+1). This seems like a bug, if nothing > else it unnecessary overhead and link flapping for routing daemons. > > Noticed only while tracking down a bug where after vtap was created the > address was being set, but then disappearing. > > Is this intentional? Is it documented? Thanks for catching this. I think it's caused by the fact that tapfds will be closed each time when the queue pairs are disabled [1]. We may need a way to keep tapfds open to fix it. [1] https://github.com/DPDK/dpdk/blob/6bbc5a923625/drivers/net/virtio/virtio_user/vhost_kernel.c#L333-L338 Thanks, Tiwei