[dpdk-dev] [PATCH v4 08/10] ipsec: helper functions to group completed crypto-ops

Ananyev, Konstantin konstantin.ananyev at intel.com
Thu Dec 20 14:00:14 CET 2018



> > +
> > +/**
> > + * Take crypto-op as an input and extract pointer to related ipsec session.
> > + * @param cop
> > + *   The address of an input *rte_crypto_op* structure.
> > + * @return
> > + *   The pointer to the related *rte_ipsec_session* structure.
> > + */
> > +static inline __rte_experimental struct rte_ipsec_session *
> > +rte_ipsec_ses_from_crypto(const struct rte_crypto_op *cop)
> __rte_experimental placement not correct

You mean why not: 
static inline struct rte_ipsec_session * __rte_experimental
?
Then checkpatch will complain about the space after '*'.
BTW why do you think current definition is wrong?

> > +{
> > +	const struct rte_security_session *ss;
> > +	const struct rte_cryptodev_sym_session *cs;
> > +
> > +	if (cop->sess_type == RTE_CRYPTO_OP_SECURITY_SESSION) {
> > +		ss = cop->sym[0].sec_session;
> > +		return (void *)(uintptr_t)ss->opaque_data;
> > +	} else if (cop->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
> > +		cs = cop->sym[0].session;
> > +		return (void *)(uintptr_t)cs->opaque_data;
> > +	}
> > +	return NULL;
> > +}
> > +


More information about the dev mailing list