[dpdk-dev] [PATCH v3 3/7] cryptodev: move inline APIs into separate structure

Ananyev, Konstantin konstantin.ananyev at intel.com
Tue Oct 19 16:27:43 CEST 2021



> -----Original Message-----
> From: Akhil Goyal <gakhil at marvell.com>
> Sent: Tuesday, October 19, 2021 12:50 PM
> To: Ananyev, Konstantin <konstantin.ananyev at intel.com>; dev at dpdk.org
> Cc: thomas at monjalon.net; david.marchand at redhat.com; hemant.agrawal at nxp.com; Anoob Joseph <anoobj at marvell.com>; De Lara
> Guarch, Pablo <pablo.de.lara.guarch at intel.com>; Trahe, Fiona <fiona.trahe at intel.com>; Doherty, Declan <declan.doherty at intel.com>;
> matan at nvidia.com; g.singh at nxp.com; Zhang, Roy Fan <roy.fan.zhang at intel.com>; jianjay.zhou at huawei.com; asomalap at amd.com;
> ruifeng.wang at arm.com; Nicolau, Radu <radu.nicolau at intel.com>; ajit.khaparde at broadcom.com; Nagadheeraj Rottela
> <rnagadheeraj at marvell.com>; Ankur Dwivedi <adwivedi at marvell.com>; Power, Ciara <ciara.power at intel.com>; Troy, Rebecca
> <rebecca.troy at intel.com>
> Subject: RE: [PATCH v3 3/7] cryptodev: move inline APIs into separate structure
> 
> > > diff --git a/lib/cryptodev/rte_cryptodev_core.h
> > b/lib/cryptodev/rte_cryptodev_core.h
> > > index 1633e55889..e9e9a44b3c 100644
> > > --- a/lib/cryptodev/rte_cryptodev_core.h
> > > +++ b/lib/cryptodev/rte_cryptodev_core.h
> > > @@ -25,6 +25,35 @@ typedef uint16_t (*enqueue_pkt_burst_t)(void *qp,
> > >  		struct rte_crypto_op **ops,	uint16_t nb_ops);
> > >  /**< Enqueue packets for processing on queue pair of a device. */
> > >
> > > +/**
> > > + * @internal
> > > + * Structure used to hold opaque pointers to internal ethdev Rx/Tx
> > > + * queues data.
> > > + * The main purpose to expose these pointers at all - allow compiler
> > > + * to fetch this data for fast-path cryptodev inline functions in advance.
> > > + */
> > > +struct rte_cryptodev_qpdata {
> > > +	/** points to array of internal queue pair data pointers. */
> > > +	void **data;
> > > +	/** points to array of enqueue callback data pointers */
> > > +	struct rte_cryptodev_cb_rcu *enq_cb;
> > > +	/** points to array of dequeue callback data pointers */
> > > +	struct rte_cryptodev_cb_rcu *deq_cb;
> > > +};
> > > +
> > > +struct rte_crypto_fp_ops {
> > > +	/** PMD enqueue burst function. */
> > > +	enqueue_pkt_burst_t enqueue_burst;
> > > +	/** PMD dequeue burst function. */
> > > +	dequeue_pkt_burst_t dequeue_burst;
> > > +	/** Internal queue pair data pointers. */
> > > +	struct rte_cryptodev_qpdata qp;
> > > +	/** Reserved for future ops. */
> > > +	uintptr_t reserved[4];
> >
> > I think it has to be uintptr_t reserved[3];
> > 2 function pointers + 3 data pointers +3 reserved pointers.
> > Otherwise it will occupy extra 64B line.
> 
> Yep, I missed decrementing it. Thanks. Will update in v4.

Ok.

> Please review others also and ack if no comments.

I looked through other patches in this set.
All looks good to me.
With the nit above fixed:
Series Acked-by: Konstantin Ananyev <konstantin.ananyev at intel.com>

> We need to close all the patches(including the control path)
> by tomorrow EOD.


More information about the dev mailing list