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 0550C2C39 for ; Wed, 20 Mar 2019 05:55:04 +0100 (CET) X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Mar 2019 21:55:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,247,1549958400"; d="scan'208";a="156564790" Received: from dpdk-tbie.sh.intel.com ([10.67.104.173]) by fmsmga001.fm.intel.com with ESMTP; 19 Mar 2019 21:55:02 -0700 Date: Wed, 20 Mar 2019 12:54:48 +0800 From: Tiwei Bie To: Maxime Coquelin Cc: dev@dpdk.org, i.maximets@samsung.com, changpeng.liu@intel.com, dariusz.stojaczyk@intel.com Message-ID: <20190320045447.GA26570@dpdk-tbie.sh.intel.com> References: <20190319105417.16890-1-maxime.coquelin@redhat.com> <20190319105417.16890-3-maxime.coquelin@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190319105417.16890-3-maxime.coquelin@redhat.com> User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-dev] [PATCH v3 2/2] vhost: support requests only handled by external backend 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, 20 Mar 2019 04:55:05 -0000 On Tue, Mar 19, 2019 at 11:54:17AM +0100, Maxime Coquelin wrote: > External backends may have specific requests to handle, and so > we don't want the vhost-user lib to handle these requests as > errors. > > This patch also changes the experimental API by introducing > RTE_VHOST_MSG_RESULT_NOT_HANDLED so that vhost-user lib > can report an error if a message is handled neither by > the vhost-user library nor by the external backend. > > The logic changes a bit so that if the callback returns > with ERR, OK or REPLY, it is considered the message > is handled by the external backend so it won't be > handled by the vhost-user library. > It is still possible for an external backend to listen > to requests that have to be handled by the vhost-user > library like SET_MEM_TABLE, but the callback have to > return NOT_HANDLED in that case. > > Vhost-crypto backend is ialso adapted to this API change. > > Suggested-by: Ilya Maximets > Signed-off-by: Maxime Coquelin > Tested-by: Darek Stojaczyk > --- > lib/librte_vhost/rte_vhost.h | 39 ++++++---------- > lib/librte_vhost/vhost_crypto.c | 10 +++- > lib/librte_vhost/vhost_user.c | 82 +++++++++++++++++++++------------ > 3 files changed, 73 insertions(+), 58 deletions(-) Reviewed-by: Tiwei Bie From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 15D79A00E6 for ; Wed, 20 Mar 2019 05:55:07 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B2D722C60; Wed, 20 Mar 2019 05:55:06 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 0550C2C39 for ; Wed, 20 Mar 2019 05:55:04 +0100 (CET) X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Mar 2019 21:55:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,247,1549958400"; d="scan'208";a="156564790" Received: from dpdk-tbie.sh.intel.com ([10.67.104.173]) by fmsmga001.fm.intel.com with ESMTP; 19 Mar 2019 21:55:02 -0700 Date: Wed, 20 Mar 2019 12:54:48 +0800 From: Tiwei Bie To: Maxime Coquelin Cc: dev@dpdk.org, i.maximets@samsung.com, changpeng.liu@intel.com, dariusz.stojaczyk@intel.com Message-ID: <20190320045447.GA26570@dpdk-tbie.sh.intel.com> References: <20190319105417.16890-1-maxime.coquelin@redhat.com> <20190319105417.16890-3-maxime.coquelin@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline In-Reply-To: <20190319105417.16890-3-maxime.coquelin@redhat.com> User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-dev] [PATCH v3 2/2] vhost: support requests only handled by external backend 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190320045448.yIfpRx-U_NHgC2MV-MRWCOFmaMStIfXkjx1OoUecQOs@z> On Tue, Mar 19, 2019 at 11:54:17AM +0100, Maxime Coquelin wrote: > External backends may have specific requests to handle, and so > we don't want the vhost-user lib to handle these requests as > errors. > > This patch also changes the experimental API by introducing > RTE_VHOST_MSG_RESULT_NOT_HANDLED so that vhost-user lib > can report an error if a message is handled neither by > the vhost-user library nor by the external backend. > > The logic changes a bit so that if the callback returns > with ERR, OK or REPLY, it is considered the message > is handled by the external backend so it won't be > handled by the vhost-user library. > It is still possible for an external backend to listen > to requests that have to be handled by the vhost-user > library like SET_MEM_TABLE, but the callback have to > return NOT_HANDLED in that case. > > Vhost-crypto backend is ialso adapted to this API change. > > Suggested-by: Ilya Maximets > Signed-off-by: Maxime Coquelin > Tested-by: Darek Stojaczyk > --- > lib/librte_vhost/rte_vhost.h | 39 ++++++---------- > lib/librte_vhost/vhost_crypto.c | 10 +++- > lib/librte_vhost/vhost_user.c | 82 +++++++++++++++++++++------------ > 3 files changed, 73 insertions(+), 58 deletions(-) Reviewed-by: Tiwei Bie