From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Tan, Jianfeng" Subject: Re: [PATCH v2 5/7] net/virtio_user: add vhost kernel support Date: Wed, 11 Jan 2017 10:30:46 +0800 Message-ID: <271f1854-8cd8-8671-95ed-79cfa52d8ad7@intel.com> References: <1480689075-66977-1-git-send-email-jianfeng.tan@intel.com> <1482477266-39199-1-git-send-email-jianfeng.tan@intel.com> <1482477266-39199-6-git-send-email-jianfeng.tan@intel.com> <46af618f-c01b-3571-78fc-12d10859a4a1@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: yuanhan.liu@linux.intel.com, ferruh.yigit@intel.com, cunming.liang@intel.com To: Jason Wang , dev@dpdk.org Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id CCFFF11C5 for ; Wed, 11 Jan 2017 03:30:49 +0100 (CET) In-Reply-To: <46af618f-c01b-3571-78fc-12d10859a4a1@redhat.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Jason, On 1/9/2017 12:39 PM, Jason Wang wrote: >> + if (!enable) { >> + if (dev->tapfds[pair_idx]) { >> + close(dev->tapfds[pair_idx]); >> + dev->tapfds[pair_idx] = -1; >> + } >> + return vhost_kernel_set_backend(vhostfd, -1); > > If this is used to for thing like ethtool -L in guest, we should use > TUNSETQUEUE here. To make it clear, why we need to ioctl(..., TUNSETQUEUE, ...) here. According to Linux/Documentation/networking/tuntap.txt, "A new ioctl(TUNSETQUEUE) were introduced to enable or disable a queue. When calling it with IFF_DETACH_QUEUE flag, the queue were disabled. And when calling it with IFF_ATTACH_QUEUE flag, the queue were enabled. The queue were enabled by default after it was created through TUNSETIFF." As it's enabled by default, do you still see the necessity to call it explicitly? Thanks, Jianfeng