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

rajesh kumar rajeshisbest at yahoo.co.in
Wed Jan 11 01:44:26 CET 2017


Hi Pablo,
Thank you for the clarification. So as i understood from you mail we can update either from ethernet header or from ip_header. If included with ethernet header ipdata_offset will be length of ethernet + ip header. if i include only from ip_header then ipdata_offset will be length of ip header alone.  DPDK crypto api will not be touching anything on the ethernet and ip headers.Since in my application code i will getting packet after processing the ethernet header so i want to copy from ipheader.Also after processing from the crypto device we will receive the packet in the same m_src buffer depending on how we updated.Please clarify me of my understanding is correct.
thanks,
Rajesh 

    On Tuesday, January 10, 2017 9:49 PM, "De Lara Guarch, Pablo" <pablo.de.lara.guarch at intel.com> wrote:
 

 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