From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 59F5F1B03F for ; Fri, 19 Jan 2018 18:54:55 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Jan 2018 09:54:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,382,1511856000"; d="scan'208";a="167531017" Received: from tanjianf-mobl.ccr.corp.intel.com (HELO [10.255.24.247]) ([10.255.24.247]) by orsmga004.jf.intel.com with ESMTP; 19 Jan 2018 09:54:52 -0800 To: Yuanhan Liu , Zhihong Wang References: <1516388570-42634-1-git-send-email-zhihong.wang@intel.com> <20180119144254.GQ29540@yliu-mob> Cc: dev@dpdk.org From: "Tan, Jianfeng" Message-ID: <6637c690-e659-ef2f-a077-d2a8e5f8b120@intel.com> Date: Sat, 20 Jan 2018 01:54:52 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20180119144254.GQ29540@yliu-mob> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] vhost: fix ANY_LAYOUT declaration 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: Fri, 19 Jan 2018 17:54:55 -0000 On 1/19/2018 10:42 PM, Yuanhan Liu wrote: > On Fri, Jan 19, 2018 at 02:02:50PM -0500, Zhihong Wang wrote: >> The VIRTIO_F_ANY_LAYOUT feature indicates the device accepts arbitrary >> descriptor layouts. The vhost-user lib already supports it, but the >> feature declaration is missing. This patch fixes the mismatch. > I remembered there was a long discussion one year ago, that we can't > blindly set this feature, as this flag is reserved (thus should not > be set) for virtio 1.0. We might need to read that old thread again. But as you said, this flag is reserved for 1.0, but not used for other purpose yet. So that the feature is negotiated does not affect anything, no? > > We should set it when v1.0 is not enabled. But in fact, vhost kernel reports supported feature bits consisting of ANY_LAYOUT and VERSION_1. > However, as you know, v1.0 is also enabled by default in DPDK vhost-user. Even v1.0 is used, the feature negotiated between virtio-net (kernel) and vhost kernel indeed contains ANY_LAYOUT. I suppose we shall do as the de-facto way. Thanks, Jianfeng > > --yliu >> Signed-off-by: Zhihong Wang >> --- >> lib/librte_vhost/vhost.h | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h >> index b2bf0e8..57a9bea 100644 >> --- a/lib/librte_vhost/vhost.h >> +++ b/lib/librte_vhost/vhost.h >> @@ -170,6 +170,7 @@ struct vhost_msg { >> >> /* Features supported by this builtin vhost-user net driver. */ >> #define VIRTIO_NET_SUPPORTED_FEATURES ((1ULL << VIRTIO_NET_F_MRG_RXBUF) | \ >> + (1ULL << VIRTIO_F_ANY_LAYOUT) | \ >> (1ULL << VIRTIO_NET_F_CTRL_VQ) | \ >> (1ULL << VIRTIO_NET_F_CTRL_RX) | \ >> (1ULL << VIRTIO_NET_F_GUEST_ANNOUNCE) | \ >> -- >> 2.7.5