[dpdk-dev] [PATCH v4 2/4] cryptodev: support asymmetric operations

Trahe, Fiona fiona.trahe at intel.com
Fri Jul 6 15:41:03 CEST 2018


Hi Shally, Umesh,

> -----Original Message-----
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Shally Verma
> Sent: Tuesday, July 3, 2018 4:24 PM
> To: De Lara Guarch, Pablo <pablo.de.lara.guarch at intel.com>
> Cc: dev at dpdk.org; pathreya at caviumnetworks.com; nmurthy at caviumnetworks.com; Umesh Kartha
> <umesh.kartha at caviumnetworks.com>; Sunila Sahu <sunila.sahu at caviumnetworks.com>; Ashish
> Gupta <ashish.gupta at caviumnetworks.com>
> Subject: [dpdk-dev] [PATCH v4 2/4] cryptodev: support asymmetric operations


//snip//
> +
> +int __rte_experimental
> +rte_cryptodev_asym_session_set_private_data(
> +					struct rte_cryptodev_asym_session *sess,
> +					void *data,
> +					uint16_t size)
> +{
> +	uint16_t off_set = sizeof(void *) * nb_drivers;
> +	uint8_t *private_data_present = (uint8_t *)sess + off_set;
> +
> +	if (sess == NULL)
> +		return -EINVAL;
> +
> +	*private_data_present = 1;
> +	off_set += sizeof(uint8_t);
> +	rte_memcpy((uint8_t *)sess + off_set, data, size);
> +	return 0;
> +}
> +
> +void * __rte_experimental
> +rte_cryptodev_asym_session_get_app_private_data(
> +				struct rte_cryptodev_asym_session *sess)
[Fiona] The set api should be renamed if the get function is renamed. 
However, I'd suggest leaving out these functions unless they're really needed for asymm.
Are they just here for consistency with the sym functions?
The sym functions are still experimental and I think the names should be changed to
use user_data instead of private_data.
I've just sent a patch to the mailing list about this - it would be better to resolve that naming
issue first and add corresponding fns later to this api if needed. 


More information about the dev mailing list