All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
To: Akhil Goyal <akhil.goyal@nxp.com>
Cc: "Doherty, Declan" <declan.doherty@intel.com>,
	Abhinandan Gujjar <abhinandan.gujjar@intel.com>,
	dev@dpdk.org, narender.vangati@intel.com,
	Nikhil Rao <nikhil.rao@intel.com>,
	Gage Eads <gage.eads@intel.com>,
	hemant.agrawal@nxp.com, nidadavolu.murthy@cavium.com,
	nithin.dabilpuram@cavium.com, narayanaprasad.athreya@cavium.com
Subject: Re: [RFC] eventdev: add crypto adapter API header
Date: Wed, 13 Dec 2017 23:07:53 +0530	[thread overview]
Message-ID: <20171213173752.GB3462@jerin> (raw)
In-Reply-To: <b28f2e29-a4e4-0102-f609-a948c68fb7fb@nxp.com>

-----Original Message-----
> Date: Wed, 13 Dec 2017 19:52:24 +0530
> From: Akhil Goyal <akhil.goyal@nxp.com>
> To: Jerin Jacob <jerin.jacob@caviumnetworks.com>, "Doherty, Declan"
>  <declan.doherty@intel.com>
> CC: Abhinandan Gujjar <abhinandan.gujjar@intel.com>, dev@dpdk.org,
>  narender.vangati@intel.com, Nikhil Rao <nikhil.rao@intel.com>, Gage Eads
>  <gage.eads@intel.com>, hemant.agrawal@nxp.com,
>  nidadavolu.murthy@cavium.com, nithin.dabilpuram@cavium.com,
>  narayanaprasad.athreya@cavium.com
> Subject: Re: [RFC] eventdev: add crypto adapter API header
> User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101
>  Thunderbird/52.5.0
> 
> Hi Jerin,

Hi Akhil,

> On 12/13/2017 4:56 PM, Jerin Jacob wrote:
> > -----Original Message-----
> > > Date: Wed, 13 Dec 2017 11:03:06 +0000
> > > From: "Doherty, Declan" <declan.doherty@intel.com>
> > > To: Jerin Jacob <jerin.jacob@caviumnetworks.com>, Abhinandan Gujjar
> > >   <abhinandan.gujjar@intel.com>
> > > CC: dev@dpdk.org, narender.vangati@intel.com, Nikhil Rao
> > >   <nikhil.rao@intel.com>, Gage Eads <gage.eads@intel.com>,
> > >   hemant.agrawal@nxp.com, nidadavolu.murthy@cavium.com,
> > >   nithin.dabilpuram@cavium.com, narayanaprasad.athreya@cavium.com
> > > Subject: Re: [RFC] eventdev: add crypto adapter API header
> > > User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101
> > >   Thunderbird/52.5.0
> > > 
> > > On 29/11/2017 11:41 AM, Jerin Jacob wrote:
> > > > -----Original Message-----
> > > 
> > > ...
> > > 
> > > > 
> > > > Adding Declan and Hemant.
> > > > > IMO, RTE_EVENT_CRYPTO_ENQ_MULTI_EVENTQ may not be very useful
> > > > from application perceptive as the scope is very limited.
> > > > In real world use cases, we will be attaching destination event queue information
> > > > to the session, not to the queue pair.
> > > > 
> > > > 
> > > > IMO, RTE_EVENT_CRYPTO_ENQ_MBUF_MULTI_EVENTQ scheme may not very
> > > > convenient for application writers as
> > > > # it relies on mbuf private area memory. So it has additional memory alloc/free
> > > > requirements.
> > > > # additional overhead for application/PMD to write/read the event queue metadata
> > > > information per packet.
> > > > 
> > > > Since we already have meta data structure in the crypto
> > > > area, How about adding the destination event queue attributes
> > > > in the PMD crypto session area and for, _session less_, we can add it
> > > > in rte_crypto_op stricture? This will help in:
> > > > 
> > > > # Offloading HW specific meta data generation for event queue attributes
> > > > to slow path.
> > > > # From the application perspective, most likely the event queue parameters
> > > > will be different for each session not per packet nor per event queue
> > > > pair.
> > > > 
> > > 
> > > Hey Jerin,
> > 
> > Hey Declan,
> > 
> > > 
> > > given my limited experience with eventdev, your proposed approach in general
> > > makes sense to me, in that a packet flow having crypto processing done will
> > > always be forwarded the same next stage event queue. So storing this state
> > > in the crypto session, or crypto op in the case of sessionless ops, seems
> > > sensible.
> > > 
> > > > Something like below to share my view. Exact details may be we can work it out.
> > > > 
> > > 
> > > I terms of your proposed changes below, my main concern would be introducing
> > > dependencies on the eventdev library into cryptodev, as with this new crypto
> > > adpater you will have a dependency on cryptodev in eventdev.
> > 
> > I agree with your dependency concern.
> > 
> > > 
> > > I think the best approach would be to support opaque metadata in both the
> > > crypto op and crypto session structures, as this would allow other uses
> > > cases to be supported which aren't specific to eventdev to also store
> > > metadata across cryptodev processing.
> > 
> > Make sense. Just to add, adding a pointer would be overhead. I think, we
> > can reserve a few bytes as byte array and then later typecast with
> > eventdev api in eventdev library.
> > 
> > uint8_t eventdev_metadata[SOMEBYTES];
> > 
> > Thoughts?
> I believe only 1 uint64 is sufficient. The metadata that we need here is
> rte_event which is 2 uint64 and the second one is mbuf. Since mbuf is
> already part of rte_crypto_sym_op, we do not need it.

Yes.

> 
> So only a pointer/uint64 is required.

I would say uint64_t, as the pointer is 32bit in 32bit systems.IMO, We need
have reserved metadata(uint64_t) for eventdev(not generic). 

  reply	other threads:[~2017-12-13 17:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-09  6:54 [RFC] eventdev: add crypto adapter API header Abhinandan Gujjar
2017-11-29 11:41 ` Jerin Jacob
2017-12-13 11:03   ` Doherty, Declan
2017-12-13 11:26     ` Jerin Jacob
2017-12-13 12:28       ` Nithin Dabilpuram
2017-12-13 14:29         ` Akhil Goyal
2017-12-13 14:22       ` Akhil Goyal
2017-12-13 17:37         ` Jerin Jacob [this message]
2017-12-13 23:35   ` Eads, Gage
2017-12-14  2:49     ` Jerin Jacob
2017-12-14 18:52       ` Eads, Gage
2017-12-18  6:30         ` Jerin Jacob
2017-12-18 16:33           ` Eads, Gage
2017-12-19  8:47             ` Jerin Jacob

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=20171213173752.GB3462@jerin \
    --to=jerin.jacob@caviumnetworks.com \
    --cc=abhinandan.gujjar@intel.com \
    --cc=akhil.goyal@nxp.com \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=gage.eads@intel.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=narayanaprasad.athreya@cavium.com \
    --cc=narender.vangati@intel.com \
    --cc=nidadavolu.murthy@cavium.com \
    --cc=nikhil.rao@intel.com \
    --cc=nithin.dabilpuram@cavium.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.