DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Stojaczyk, Dariusz" <dariusz.stojaczyk@intel.com>
To: "Bie, Tiwei" <tiwei.bie@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"Wang, Zhihong" <zhihong.wang@intel.com>,
	"Liang, Cunming" <cunming.liang@intel.com>,
	Maxime Coquelin <maxime.coquelin@redhat.com>,
	"Harris, James R" <james.r.harris@intel.com>,
	"Liu, Changpeng" <changpeng.liu@intel.com>
Subject: Re: [dpdk-dev] [PATCH v2] vhost: add external message handling callbacks to the public API
Date: Wed, 16 Jan 2019 12:22:10 +0000	[thread overview]
Message-ID: <FBE7E039FA50BF47A673AD0BD3CD56A84626CF21@HASMSX105.ger.corp.intel.com> (raw)
In-Reply-To: <20190115112213.GA15290@dpdk-tbie.sh.intel.com>



> -----Original Message-----
> From: Bie, Tiwei
> Sent: Tuesday, January 15, 2019 12:22 PM
> To: Stojaczyk, Dariusz <dariusz.stojaczyk@intel.com>
> Cc: dev@dpdk.org; Wang, Zhihong <zhihong.wang@intel.com>; Liang,
> Cunming <cunming.liang@intel.com>; Maxime Coquelin
> <maxime.coquelin@redhat.com>; Harris, James R
> <james.r.harris@intel.com>; Liu, Changpeng <changpeng.liu@intel.com>
> Subject: Re: [PATCH v2] vhost: add external message handling callbacks to
> the public API
> 
> On Mon, Jan 14, 2019 at 05:28:29AM +0100, Darek Stojaczyk wrote:
> > External message callbacks are used e.g. by vhost crypto
> > to parse crypto-specific vhost-user messages.
> >
> > We are now publishing the API to register those callbacks,
> > so that other backends outside of DPDK can use them as well.
> >
> > Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
> > ---
> >  lib/librte_vhost/rte_vhost.h | 66
> ++++++++++++++++++++++++++++++++++++
> >  lib/librte_vhost/vhost.c     | 13 +++++++
> >  lib/librte_vhost/vhost.h     | 54 ++---------------------------
> >  3 files changed, 81 insertions(+), 52 deletions(-)
> >
> > diff --git a/lib/librte_vhost/rte_vhost.h b/lib/librte_vhost/rte_vhost.h
> > index d280ac420..a11f9ca04 100644
> > --- a/lib/librte_vhost/rte_vhost.h
> > +++ b/lib/librte_vhost/rte_vhost.h
> > @@ -111,6 +111,56 @@ struct rte_vhost_vring {
> >  	uint16_t		size;
> >  };
> >
> > +/* The possible results of a message handling function */
> 
> Better to change /* to /**, so doxygen can generate doc for it.

Ack

> 
> > +enum vh_result {
> > +	/* Message handling failed */
> > +	VH_RESULT_ERR   = -1,
> > +	/* Message handling successful */
> > +	VH_RESULT_OK    =  0,
> > +	/* Message handling successful and reply prepared */
> > +	VH_RESULT_REPLY =  1,
> > +};
> 
> Maybe better to prefix with rte_ and RTE_?
> How about rte_vhost_result and RTE_VHOST_RESULT_*?

Ack

> 
> > +
> [...]
> >
> > +/**
> > + * Register external message handling callbacks
> > + *
> > + * @param vid
> > + *  vhost device ID
> > + * @param ops
> > + *  virtio external callbacks to register
> > + * @param ctx
> > + *  additional context passed to the callbacks
> > + * @return
> > + *  0 on success, -1 on failure
> > + */
> > +int __rte_experimental
> > +rte_vhost_extern_callback_register(int vid,
> > +		struct rte_vhost_user_extern_ops const * const ops, void
> *ctx);
> 
> This symbol also needs to be added to the .map file
> for shared library.

Ack

> 
> For the rest,
> Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>

Thanks,
D.

  reply	other threads:[~2019-01-16 12:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-14  4:28 Darek Stojaczyk
2019-01-15 11:22 ` Tiwei Bie
2019-01-16 12:22   ` Stojaczyk, Dariusz [this message]
2019-01-17 15:32 ` [dpdk-dev] [PATCH v3] " Darek Stojaczyk
2019-01-21  8:25   ` Maxime Coquelin
2019-02-08 18:04   ` Maxime Coquelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=FBE7E039FA50BF47A673AD0BD3CD56A84626CF21@HASMSX105.ger.corp.intel.com \
    --to=dariusz.stojaczyk@intel.com \
    --cc=changpeng.liu@intel.com \
    --cc=cunming.liang@intel.com \
    --cc=dev@dpdk.org \
    --cc=james.r.harris@intel.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=tiwei.bie@intel.com \
    --cc=zhihong.wang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).