From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 0E7062BD3 for ; Wed, 13 Mar 2019 06:56:45 +0100 (CET) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Mar 2019 22:56:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,473,1544515200"; d="scan'208";a="122222395" Received: from dpdk-tbie.sh.intel.com ([10.67.104.173]) by orsmga007.jf.intel.com with ESMTP; 12 Mar 2019 22:56:43 -0700 Date: Wed, 13 Mar 2019 13:56:33 +0800 From: Tiwei Bie To: Maxime Coquelin Cc: dev@dpdk.org, changpeng.liu@intel.com, i.maximets@samsung.com, dariusz.stojaczyk@intel.com Message-ID: <20190313055633.GA8308@dpdk-tbie.sh.intel.com> References: <20190312145410.570-1-maxime.coquelin@redhat.com> <20190312145410.570-2-maxime.coquelin@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190312145410.570-2-maxime.coquelin@redhat.com> User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-dev] [PATCH 1/2] vhost: add API to set protocol features flags 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, 13 Mar 2019 05:56:46 -0000 On Tue, Mar 12, 2019 at 03:54:09PM +0100, Maxime Coquelin wrote: > rte_vhost_driver_set_protocol_features API is to be used > by external backends to advertize vhost-user protocol > features it supports. > > It has to be called after rte_vhost_driver_register() and > before rte_vhost_driver_start(). > > Example of usage to advertize VHOST_USER_PROTOCOL_F_FOOBAR > protocol feature: > > const char *path = "/tmp/vhost-user"; > uint64_t protocol_features; > rte_vhost_driver_register(path, 0); > rte_vhost_driver_get_protocol_features(path, &protocol_features); > protocol_features |= VHOST_USER_PROTOCOL_F_FOOBAR; > rte_vhost_driver_set_protocol_features(path, protocol_features); > rte_vhost_driver_start(path); > > Signed-off-by: Maxime Coquelin > Tested-by: Darek Stojaczyk > --- > lib/librte_vhost/rte_vhost.h | 14 ++++++++++++++ > lib/librte_vhost/rte_vhost_version.map | 1 + > lib/librte_vhost/socket.c | 14 ++++++++++++++ > 3 files changed, 29 insertions(+) Reviewed-by: Tiwei Bie