From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id E16941B733 for ; Tue, 3 Apr 2018 16:42:35 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Apr 2018 07:42:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,401,1517904000"; d="scan'208";a="43044248" Received: from tanjianf-mobl.ccr.corp.intel.com (HELO [10.255.27.107]) ([10.255.27.107]) by fmsmga004.fm.intel.com with ESMTP; 03 Apr 2018 07:42:33 -0700 To: Maxime Coquelin , "Zhang, Roy Fan" , "Wodkowski, PawelX" , "dev@dpdk.org" References: <20180326095114.11605-1-roy.fan.zhang@intel.com> <1522327975-28769-1-git-send-email-roy.fan.zhang@intel.com> <1522327975-28769-2-git-send-email-roy.fan.zhang@intel.com> <9F7182E3F746AB4EA17801C148F3C60433107799@IRSMSX101.ger.corp.intel.com> Cc: "jianjay.zhou@huawei.com" From: "Tan, Jianfeng" Message-ID: Date: Tue, 3 Apr 2018 22:42:32 +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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v4 1/8] lib/librte_vhost: add external backend 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: Tue, 03 Apr 2018 14:42:36 -0000 On 4/3/2018 9:44 PM, Maxime Coquelin wrote: > Hi Pawel, Fan, > > On 04/01/2018 09:53 PM, Zhang, Roy Fan wrote: >> Hi Pawel, >> >>> -----Original Message----- >>> From: Wodkowski, PawelX >>> Sent: Thursday, March 29, 2018 2:48 PM >>> To: Zhang, Roy Fan ; dev@dpdk.org >>> Cc: maxime.coquelin@redhat.com; jianjay.zhou@huawei.com; Tan, Jianfeng >>> >>> Subject: RE: [dpdk-dev] [PATCH v4 1/8] lib/librte_vhost: add external >>> backend support >>> >>>> -----Original Message----- >>>> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Fan Zhang >>>> Sent: Thursday, March 29, 2018 2:53 PM >>>> To: dev@dpdk.org >>>> Cc: maxime.coquelin@redhat.com; jianjay.zhou@huawei.com; Tan, >>> Jianfeng >>>> >>>> Subject: [dpdk-dev] [PATCH v4 1/8] lib/librte_vhost: add external >>>> backend support >>>> >>>> This patch adds external backend support to vhost library. The patch >>>> provides new APIs for the external backend to register pre and post >>>> vhost-user message handlers. >>>> >>>> Signed-off-by: Fan Zhang >>>> --- >>>> lib/librte_vhost/rte_vhost.h | 64 >>>> +++++++++++++++++++++++++++++++++- >>>> lib/librte_vhost/rte_vhost_version.map | 6 ++++ >>>> lib/librte_vhost/vhost.c | 17 ++++++++- >>>> lib/librte_vhost/vhost.h | 8 +++-- >>>> lib/librte_vhost/vhost_user.c | 33 +++++++++++++++++- >>>> 5 files changed, 123 insertions(+), 5 deletions(-) >>>> >>>> diff --git a/lib/librte_vhost/rte_vhost.h >>>> b/lib/librte_vhost/rte_vhost.h index d332069..b902c44 100644 >>>> --- a/lib/librte_vhost/rte_vhost.h >>>> +++ b/lib/librte_vhost/rte_vhost.h >>>> @@ -1,5 +1,5 @@ > > > >> >>>> + * @param require_reply >>>> + * If the handler requires sending a reply, this varaible shall be >>>> +written 1, >>>> + * otherwise 0. >>>> + * @return >>>> + * 0 on success, -1 on failure >>>> + */ >>>> +typedef int (*rte_vhost_msg_post_handle)(int vid, void *msg, >>>> + uint32_t *require_reply); >>>> + >>> >>> What mean 'Message pointer' Is this const for us? Is this payload? >>> Making >>> msg 'void *' is not a way to go here. Those pre and post handlers >>> need to see >>> exactly the same structures like vhost_user.c file. Otherwise we can >>> get into >>> troubles when ABI changes. >> >> It is the pointer to the vhost_user message. It cannot be const as >> the backend >> may change the payload. >> >>> >>> Also you can easily merge pre and post handlers into one handler >>> with one >>> Parameter describing what phase of message processing we are now. >>> >> >> No I don't think so. To do so it will be quite unclear in the future >> as we are >> using one function to do two totally different things. > > Time is running out for v18.05 integration deadline (April 6th), and > we haven't reached a consensus. > > Except this API point, I think vhost-crypto is at the right level. > Since vhost-crypto lives in librte_vhost, I propose Fan cooks an > intermediate solution that does not need API change. > > Doing this, we postpone the API change to v18.08, so we have time to > discuss what the right API should be. Once agreed, vhost-crypto moves to > the new API. > > Pawel, Jianfeng, Fan, is it fine for you? +1. This can avoid blocking this patch set, and give more time for discussing new APIs and external structs. Thanks, Jianfeng > > Thanks, > Maxime