DPDK patches and discussions
 help / color / mirror / Atom feed
From: Akhil Goyal <akhil.goyal@nxp.com>
To: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "Nicolau, Radu" <radu.nicolau@intel.com>,
	"Zhang, Roy Fan" <roy.fan.zhang@intel.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] examples/ipsec-secgw: fix pool usage for security session
Date: Tue, 23 Apr 2019 12:28:19 +0000	[thread overview]
Message-ID: <VI1PR04MB4893692749B6BD38849A10B5E6230@VI1PR04MB4893.eurprd04.prod.outlook.com> (raw)
Message-ID: <20190423122819.oI2zoz91SlDJm9x2vpnCZxLCxElc7IIsV3qy0rrFH0g@z> (raw)
In-Reply-To: <2601191342CEEE43887BDE71AB9772580148A9B044@irsmsx105.ger.corp.intel.com>

> 
> 
> 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.

  parent reply	other threads:[~2019-04-23 12:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-22 14:39 Akhil Goyal
2019-04-22 14:39 ` Akhil Goyal
2019-04-23 11:49 ` Ananyev, Konstantin
2019-04-23 11:49   ` Ananyev, Konstantin
2019-04-23 12:28   ` Akhil Goyal [this message]
2019-04-23 12:28     ` Akhil Goyal
2019-04-23 12:19 ` [dpdk-dev] [PATCH v2] " Akhil Goyal
2019-04-23 12:19   ` Akhil Goyal
2019-04-23 12:32   ` Ananyev, Konstantin
2019-04-23 12:32     ` Ananyev, Konstantin
2019-04-23 12:58     ` Akhil Goyal
2019-04-23 12:58       ` Akhil Goyal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=VI1PR04MB4893692749B6BD38849A10B5E6230@VI1PR04MB4893.eurprd04.prod.outlook.com \
    --to=akhil.goyal@nxp.com \
    --cc=dev@dpdk.org \
    --cc=konstantin.ananyev@intel.com \
    --cc=radu.nicolau@intel.com \
    --cc=roy.fan.zhang@intel.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).