From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0FFF64E35B; Wed, 11 Jan 2017 02:45:21 +0000 (UTC) Received: from [10.72.5.47] (vpn1-5-47.pek2.redhat.com [10.72.5.47]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v0B2jFjQ002613 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 10 Jan 2017 21:45:18 -0500 To: "Tan, Jianfeng" , dev@dpdk.org 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> Cc: yuanhan.liu@linux.intel.com, ferruh.yigit@intel.com, cunming.liang@intel.com From: Jason Wang Message-ID: <9e829d5c-4eef-6ffe-746a-75c8908f6d1c@redhat.com> Date: Wed, 11 Jan 2017 10:45:14 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <271f1854-8cd8-8671-95ed-79cfa52d8ad7@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 11 Jan 2017 02:45:21 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH v2 5/7] net/virtio_user: add vhost kernel support 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: Wed, 11 Jan 2017 02:45:20 -0000 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