[dpdk-users] query on m_src buffer in crypto_op buffer

De Lara Guarch, Pablo pablo.de.lara.guarch at intel.com
Tue Jan 10 17:19:33 CET 2017


Hi Rajesh,

> -----Original Message-----
> From: users [mailto:users-bounces at dpdk.org] On Behalf Of rajesh kumar
> Sent: Monday, January 09, 2017 7:00 AM
> To: users at dpdk.org
> Subject: [dpdk-users] query on m_src buffer in crypto_op buffer
> 
> Hi All,
> As part of our development crypto frame work we want to make use of
> AES-NI instruction set from Intel i7 boxes for crypto operations. Want to
> know whether m_src under crypto_op buffer which is op->sym->m_src has
> to be pointed to ethernet header or any other header. This is to do
> cryptographic operations on the packet received. From the l2fwd sample
> application i could see this is pointed to ethernet header. Can i copy the
> data from the ipheader and do the crypto operations since ESP data will
> start after this only.Please provide your valuable inputs.

m_src has to point at a mbuf, and then internally, it gets the address of the
start of the packet with rte_pktmbuf_mtod.

Since, L2fwd-crypto app handles IP packets, the start of the packet is the
Ethernet header, but only the payload is intended to be encrypted.
Therefore, op->sym->cipher.data.offset = ipdata_offset, where ipdata_offset
is the length of the Ethernet and IP headers.

So, all you need to do is adjust this offset (and length) for ciphering 
and authentication.

Thanks,
Pablo

> Thanks,Rajesh


More information about the users mailing list