Hi Fan,

> -----Original Message-----
> From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Fan Zhang
> Sent: Tuesday, December 11, 2018 3:34 AM
> To: dev@dpdk.org
> Cc: akhil.go...@nxp.com; Ananyev, Konstantin <konstantin.anan...@intel.com>
> Subject: [dpdk-dev] [PATCH v2 2/2] cryptodev: change symmetric session 
> structure
> 
> This patch changes the symmetric session structure of cryptodev.
> The symmetric session now contains extra information for secure
> access purposes. The patch also includes the updates to the
> PMDs, test applications, and examples to fit the change.
> 
> Signed-off-by: Fan Zhang <roy.fan.zh...@intel.com>
> ---


> 
//snip////
>  int
>  rte_cryptodev_sym_session_init(uint8_t dev_id,
>               struct rte_cryptodev_sym_session *sess,
> @@ -1160,12 +1206,15 @@ rte_cryptodev_sym_session_init(uint8_t dev_id,
>               return -EINVAL;
> 
>       index = dev->driver_id;
> +     if (index > sess->nb_drivers)
> +             return -EINVAL;
[Fiona] This should be <=


> -
>  unsigned int
>  rte_cryptodev_sym_get_header_session_size(void)
>  {
>       /*
> -      * Header contains pointers to the private data
> +      * Header contains all dpointers to the private data
[Fiona] typo. And comment should be updated as it also 
now contains more than just a flag


>        * of all registered drivers, and a flag which
>        * indicates presence of user data
>        */
> -     return ((sizeof(void *) * nb_drivers) + sizeof(uint8_t));
> +     struct rte_cryptodev_sym_session s = {0};
> +     s.nb_drivers = nb_drivers;
> +     s.user_data_sz = 0;
[Fiona] Why is a get_header_session_size fn initialising fields in the session?
Doesn't seem right?

Reply via email to