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

Akhil Goyal akhil.goyal at nxp.com
Fri Dec 21 13:37:25 CET 2018



On 12/20/2018 6:30 PM, Ananyev, Konstantin wrote:
>
>>> +
>>> +/**
>>> + * 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
> ?
yes
> Then checkpatch will complain about the space after '*'.
ok
> BTW why do you think current definition is wrong?
this is how it is being used in the rest of the code.
>
>>> +{
>>> +	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