From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Wang Subject: Re: [PATCH v2 5/7] net/virtio_user: add vhost kernel support Date: Wed, 11 Jan 2017 10:45:14 +0800 Message-ID: <9e829d5c-4eef-6ffe-746a-75c8908f6d1c@redhat.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> <271f1854-8cd8-8671-95ed-79cfa52d8ad7@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Cc: yuanhan.liu@linux.intel.com, ferruh.yigit@intel.com, cunming.liang@intel.com To: "Tan, Jianfeng" , dev@dpdk.org Return-path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 9ABE0201 for ; Wed, 11 Jan 2017 03:45:20 +0100 (CET) In-Reply-To: <271f1854-8cd8-8671-95ed-79cfa52d8ad7@intel.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" On 2017年01月11日 10:30, Tan, Jianfeng wrote: > > 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? If you want to keep it enabled, no need. But if you want to disable one specific queue (which I believe is the case of !enable?), you need to call it. Thanks > > Thanks, > Jianfeng