[dpdk-users] [dpdk-dev] cryptodev - thread, cryptodev, session, queue-pair mapping .

Sergio Gonzalez Monroy sergio.gonzalez.monroy at intel.com
Wed May 24 10:47:54 CEST 2017


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:


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

More information about the users mailing list