From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 4C3EB5A44 for ; Wed, 4 Jan 2017 08:06:17 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP; 03 Jan 2017 23:06:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,458,1477983600"; d="scan'208";a="804911737" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by FMSMGA003.fm.intel.com with ESMTP; 03 Jan 2017 23:06:16 -0800 Date: Wed, 4 Jan 2017 15:08:03 +0800 From: Yuanhan Liu To: "Tan, Jianfeng" Cc: "dev@dpdk.org" , "Yigit, Ferruh" , "Liang, Cunming" Message-ID: <20170104070803.GJ21228@yliu-dev.sh.intel.com> References: <1483502366-140154-1-git-send-email-jianfeng.tan@intel.com> <1483502366-140154-4-git-send-email-jianfeng.tan@intel.com> <20170104060238.GG21228@yliu-dev.sh.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH v3 3/7] net/virtio_user: move vhost user specific code 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, 04 Jan 2017 07:06:18 -0000 On Wed, Jan 04, 2017 at 06:46:34AM +0000, Tan, Jianfeng wrote: > Hi Yuanhan, > > > -----Original Message----- > > From: Yuanhan Liu [mailto:yuanhan.liu@linux.intel.com] > > Sent: Wednesday, January 4, 2017 2:03 PM > > To: Tan, Jianfeng > > Cc: dev@dpdk.org; Yigit, Ferruh; Liang, Cunming > > Subject: Re: [PATCH v3 3/7] net/virtio_user: move vhost user specific code > > > > On Wed, Jan 04, 2017 at 03:59:22AM +0000, Jianfeng Tan wrote: > > > To support vhost kernel as the backend of net_virtio_user in coming > > > patches, we move vhost_user specific structs and macros into > > > vhost_user.c, and only keep common definitions in vhost.h. > > > > > > Besides, remove VHOST_USER_MQ feature check. > > > > Again, I have to ask, why? You don't only remove the check, also, you > > removed this feature setting, which seems to break the MQ support? > > I have answered it here: > http://dpdk.org/ml/archives/dev/2016-December/053520.html I thought we have made some agreements :/ > > To be more clear, VHOST_USER_MQ is a not-well-defined macro: #define VHOST_USER_MQ (1ULL << VHOST_USER_F_PROTOCOL_FEATURES), > which is a feature bit in vhost user protocol. Yes, it's again named wrongly. > According to QEMU/ docs/specs/vhost-user.txt, "If VHOST_USER_F_PROTOCOL_FEATURES has not been negotiated, the ring is initialized in an enabled state. " > > But our DPDK vhost library does not take care of this feature bit. > Just make this as default: the ring is initialized in an disabled state. And our virtio_user with vhost-user does send VHOST_USER_SET_VRING_ENABLE to enable each queue pair. VHOST_USER_F_PROTOCOL_FEATURES is a fundamental feature for quite many vhost-user extended features, including the MQ. If it's not set, the MQ should not work. It may still work in your case, becase you made an assumtion that the vhost backend supports the MQ feature (which is true in nowadays, as the feature has been there for a quite while). However, that's not an assumtion you can take while adding the vhost-user MQ support at that time. And such feature bit (including the PROTOCOL_F_MQ) makes sure that we will not try to enable MQ with and older vhost backend that doesn't have the support. Put simply, this feature is needed, and as the feature name states, it's needed only for vhost-user. --yliu > > So I think it's not necessary to add it back. > > How do you think? > > Thanks, > Jianfeng > > > > > --yliu