From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP; 10 Jan 2017 18:30:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,345,1477983600"; d="scan'208,217";a="51837413" Received: from shwdeisgchi083.ccr.corp.intel.com (HELO [10.239.67.193]) ([10.239.67.193]) by fmsmga005.fm.intel.com with ESMTP; 10 Jan 2017 18:30:47 -0800 To: Jason Wang , 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> Cc: yuanhan.liu@linux.intel.com, ferruh.yigit@intel.com, cunming.liang@intel.com From: "Tan, Jianfeng" Message-ID: <271f1854-8cd8-8671-95ed-79cfa52d8ad7@intel.com> Date: Wed, 11 Jan 2017 10:30:46 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <46af618f-c01b-3571-78fc-12d10859a4a1@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.15 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:30:50 -0000 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