> 
> 
> Looks good to me , but seems incomplete.
> I think we also need to:
> static int32_t
> cryptodevs_init(void)
> {
>    ...
> 
>         /* create session pools for eth devices that implement security */
>         RTE_ETH_FOREACH_DEV(port_id) {
>                 if ((enabled_port_mask & (1 << port_id)) &&
>                                 rte_eth_dev_get_sec_ctx(port_id)) {
>                         int socket_id = rte_eth_dev_socket_id(port_id);
> 
>   -                      if (!socket_ctx[socket_id].session_pool) {
>  +                      if (!socket_ctx[socket_id].session_priv_pool) {
>                                 char mp_name[RTE_MEMPOOL_NAMESIZE];
>                                 struct rte_mempool *sess_mp;
> 
>                                 snprintf(mp_name, RTE_MEMPOOL_NAMESIZE,
>                                                 "sess_mp_%u", socket_id);
>                                 sess_mp = rte_mempool_create(mp_name,
>                                                 (CDEV_MP_NB_OBJS * 2),
>                                                 max_sess_sz,
>                                                 CDEV_MP_CACHE_SZ,
>                                                 0, NULL, NULL, NULL,
>                                                 NULL, socket_id,
>                                                 0);
>                                 if (sess_mp == NULL)
>                                         rte_exit(EXIT_FAILURE,
>                                                 "Cannot create session pool "
>                                                 "on socket %d\n", socket_id);
>                                 else
>                                         printf("Allocated session pool "
>                                                 "on socket %d\n", socket_id);
> -                               socket_ctx[socket_id].session_pool = sess_mp;
> +                               socket_ctx[socket_id].session_priv_pool = 
> sess_mp;
> 
>                         }
>                 }
>         }
> 
> Konstantin

Thanks,
Will be sending a v2 soon.

Reply via email to