DPDK patches and discussions
 help / color / mirror / Atom feed
From: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
To: Srinivasreddy R <srinivasreddy4390@gmail.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	users@dpdk.org
Subject: Re: [dpdk-dev] cryptodev - thread, cryptodev, session, queue-pair mapping .
Date: Wed, 24 May 2017 09:47:54 +0100	[thread overview]
Message-ID: <ea5b5792-3d05-5ce6-c989-dbe890066cd8@intel.com> (raw)
In-Reply-To: <CAJP4VWj2PT6eqerG7B0v2stG4Yaf+eErDjwA_McyztEQ-72RJQ@mail.gmail.com>

Hi,

There are different ways you can do this.

You have an approach in examples/ipsec-secgw where each thread/lcore 
uses a hash table for the device/queue mapping for the crypto algorithms 
combinations (key).
The session is 1:1 to SA, so it just keeps a pointer in the SA struct. 
This holds true in the context of the example given that each SA has to 
be processed by a single core, which means in a device.
If you were to do something more complex, like processing the same SA 
across multiple crypto PMDs, you would need to keep a mapping of each 
device's session for the same SA.

You may be interested in the following change for the next release where 
the same session could be used by multiple devices:
http://dpdk.org/dev/patchwork/patch/24091/

Thanks,
Sergio

On 24/05/2017 08:23, Srinivasreddy R wrote:
> Hi All,
>
> I have multiple ports,multiple hardware queues. so multiple threads are
> polling on single port .
> I am using multiple crypto devices ,each crypto device has max of 8
> queue_pairs.
>
> when i add a SA , i need to create a session on a crypto device.
>
> can some suggest how can i maintain a mapping between thread , crypto
> session ,crypto device , crypto queue_pairs .
>
> thanks
> srinivas

      reply	other threads:[~2017-05-24  8:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-24  7:23 Srinivasreddy R
2017-05-24  8:47 ` Sergio Gonzalez Monroy [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=ea5b5792-3d05-5ce6-c989-dbe890066cd8@intel.com \
    --to=sergio.gonzalez.monroy@intel.com \
    --cc=dev@dpdk.org \
    --cc=srinivasreddy4390@gmail.com \
    --cc=users@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).