DPDK usage discussions
 help / color / mirror / Atom feed
From: "De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>
To: rajesh kumar <rajeshisbest@yahoo.co.in>,
	"users@dpdk.org" <users@dpdk.org>
Subject: Re: [dpdk-users] query on m_src buffer in crypto_op buffer
Date: Tue, 10 Jan 2017 16:19:33 +0000	[thread overview]
Message-ID: <E115CCD9D858EF4F90C690B0DCB4D897476C17A9@IRSMSX108.ger.corp.intel.com> (raw)
In-Reply-To: <842265879.1377278.1483945224790@mail.yahoo.com>

Hi Rajesh,

> -----Original Message-----
> From: users [mailto:users-bounces@dpdk.org] On Behalf Of rajesh kumar
> Sent: Monday, January 09, 2017 7:00 AM
> To: users@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

  reply	other threads:[~2017-01-10 16:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <842265879.1377278.1483945224790.ref@mail.yahoo.com>
2017-01-09  7:00 ` rajesh kumar
2017-01-10 16:19   ` De Lara Guarch, Pablo [this message]
2017-01-11  0:44     ` rajesh kumar

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=E115CCD9D858EF4F90C690B0DCB4D897476C17A9@IRSMSX108.ger.corp.intel.com \
    --to=pablo.de.lara.guarch@intel.com \
    --cc=rajeshisbest@yahoo.co.in \
    --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).