DPDK patches and discussions
 help / color / mirror / Atom feed
From: Akhil Goyal <akhil.goyal@nxp.com>
To: "Medvedkin, Vladimir" <vladimir.medvedkin@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: Radu Nicolau <radu.nicolau@intel.com>
Subject: Re: [dpdk-dev] [PATCH] examples/ipsec-secgw: fix session mempool initialisation
Date: Thu, 29 Oct 2020 15:06:32 +0000	[thread overview]
Message-ID: <VI1PR04MB31683183147E51FF86B6B1DDE6140@VI1PR04MB3168.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <9a255269-dcc7-bed3-fddd-cf5c3d348551@intel.com>

> Hi Akhil,
> 
> On 28/10/2020 12:30, Akhil Goyal wrote:
> > Hi Vladimir,
> >
> >> -----Original Message-----
> >> From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
> >> Sent: Tuesday, October 27, 2020 7:34 PM
> >> To: dev@dpdk.org
> >> Cc: Akhil Goyal <akhil.goyal@nxp.com>; Radu Nicolau
> <radu.nicolau@intel.com>
> >> Subject: [PATCH] examples/ipsec-secgw: fix session mempool initialisation
> >>
> >> Creation of a session mempool may fail in the case of a single lcore
> >> and a low number of SA.
> >>
> >
> > I am not able to understand the reason why the number need to be increased.
> > Could you please explain?
> >
> 
> Sure. Starting ipsec-secgw with 4 configured SA with single lcore fails
> with:
> 
> CRYPTODEV: rte_cryptodev_sym_session_pool_create() line 1420:
> rte_cryptodev_sym_session_pool_create(name=sess_mp_0) failed,
> rte_errno=22
> 
> In case when there is only one lcore and number of configures SA less
> then (0.5 * CDEV_MP_CACHE_SZ) then creation of the mempool fails with
> EINVAL. This is because the number of requested items is less than
> (cache size * 1.5)
> 
> from rte_mempool_create_empty():
> 
>          /* asked cache too big */
>          if (cache_size > RTE_MEMPOOL_CACHE_MAX_SIZE ||
>              CALC_CACHE_FLUSHTHRESH(cache_size) > n) {
>                  rte_errno = EINVAL;
>                  return NULL;
>          }
> 
> , where n is nb_sess and CALC_CACHE_FLUSHTHRESH(cache_size) is just (1.5
> * cache_size). This was mentioned in rte_mempool_create() documentation:
> @param cache_size
> ...
>   *   This argument must be lower or equal to
>   *   RTE_MEMPOOL_CACHE_MAX_SIZE and n / 1.5.
> ...
> 
Applied to dpdk-next-crypto

Patch description updated as per the explanation.

Acked-by: Akhil Goyal <akhil.goyal@nxp.com>

Thanks.

      reply	other threads:[~2020-10-29 15:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-27 14:03 Vladimir Medvedkin
2020-10-28 12:30 ` Akhil Goyal
2020-10-28 12:53   ` Medvedkin, Vladimir
2020-10-29 15:06     ` Akhil Goyal [this message]

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=VI1PR04MB31683183147E51FF86B6B1DDE6140@VI1PR04MB3168.eurprd04.prod.outlook.com \
    --to=akhil.goyal@nxp.com \
    --cc=dev@dpdk.org \
    --cc=radu.nicolau@intel.com \
    --cc=vladimir.medvedkin@intel.com \
    /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).