Message ID | 1530712550-18099-2-git-send-email-anoob.joseph@caviumnetworks.com (mailing list archive) |
---|---|
State | Superseded, archived |
Delegated to: | Pablo de Lara Guarch |
Headers | show |
Series | add head/tailroom requirement for crypto PMDs | expand |
Context | Check | Description |
---|---|---|
ci/checkpatch | success | coding style OK |
ci/Intel-compilation | success | Compilation OK |
Hi Anoob, > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Anoob Joseph > Sent: Wednesday, July 4, 2018 2:56 PM > To: Doherty, Declan <declan.doherty@intel.com>; De Lara Guarch, Pablo > <pablo.de.lara.guarch@intel.com> > Cc: Anoob Joseph <anoob.joseph@caviumnetworks.com>; Akhil Goyal > <akhil.goyal@nxp.com>; Ankur Dwivedi > <ankur.dwivedi@caviumnetworks.com>; Jerin Jacob > <jerin.jacob@caviumnetworks.com>; Narayana Prasad > <narayanaprasad.athreya@caviumnetworks.com>; dev@dpdk.org > Subject: [dpdk-dev] [PATCH v1 1/3] cryptodev: add min headroom and tailroom > requirement > > Enabling crypto devs to specify the minimum headroom and tailroom it expects > in the mbuf. For net PMDs, standard headroom has to be honoured by > applications, which is not strictly followed for crypto devs. This prevents crypto > devs from using free space in mbuf (available as > head/tailroom) for internal requirements in crypto operations. Addition of > head/tailroom requirement will help PMDs to communicate such requirements > to the application. > > The availability and use of head/tailroom is an optimization if the hardware > supports use of head/tailroom for crypto-op info. For devices that do not > support using the head/tailroom, they can continue to operate without any > performance-drop. > > Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com> > --- > v1: > * Removed deprecation notice > * Updated release note > * Renamed new fields to have 'mbuf' in the name > * Changed the type of new fields to uint16_t (instead of uint32_t) > > doc/guides/rel_notes/release_18_08.rst | 6 ++++++ > lib/librte_cryptodev/rte_cryptodev.h | 6 ++++++ > 2 files changed, 12 insertions(+) > > diff --git a/doc/guides/rel_notes/release_18_08.rst > b/doc/guides/rel_notes/release_18_08.rst > index 5bc23c5..fae0d26 100644 > --- a/doc/guides/rel_notes/release_18_08.rst > +++ b/doc/guides/rel_notes/release_18_08.rst > @@ -70,6 +70,12 @@ ABI Changes > Also, make sure to start the actual text at the margin. > ========================================================= > > +* cryptodev: Additional fields in rte_cryptodev_info. > + > + Two new fields of type ``uint16_t`` added in ``rte_cryptodev_info`` > + structure: ``min_mbuf_headroom_req`` and ``min_mbuf_tailroom_req``. > + These parameters specify the recommended headroom and tailroom for > + mbufs to be processed by the PMD. I think the "cryptodev scheduler PMD" needs changes to take these new parameters into consideration. Scheduler_pmd_info_get should return the maximum number of these two fields on all the slaves (like what's done with max number of sessions). We need to close the subtree today, with all API changes done. Will you have time to make this change today? Thanks! Pablo
Hi Pablo, I'll look into this and will give you an updated patch. Thanks, Anoob On 10-07-2018 15:56, De Lara Guarch, Pablo wrote: > External Email > > Hi Anoob, > >> -----Original Message----- >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Anoob Joseph >> Sent: Wednesday, July 4, 2018 2:56 PM >> To: Doherty, Declan <declan.doherty@intel.com>; De Lara Guarch, Pablo >> <pablo.de.lara.guarch@intel.com> >> Cc: Anoob Joseph <anoob.joseph@caviumnetworks.com>; Akhil Goyal >> <akhil.goyal@nxp.com>; Ankur Dwivedi >> <ankur.dwivedi@caviumnetworks.com>; Jerin Jacob >> <jerin.jacob@caviumnetworks.com>; Narayana Prasad >> <narayanaprasad.athreya@caviumnetworks.com>; dev@dpdk.org >> Subject: [dpdk-dev] [PATCH v1 1/3] cryptodev: add min headroom and tailroom >> requirement >> >> Enabling crypto devs to specify the minimum headroom and tailroom it expects >> in the mbuf. For net PMDs, standard headroom has to be honoured by >> applications, which is not strictly followed for crypto devs. This prevents crypto >> devs from using free space in mbuf (available as >> head/tailroom) for internal requirements in crypto operations. Addition of >> head/tailroom requirement will help PMDs to communicate such requirements >> to the application. >> >> The availability and use of head/tailroom is an optimization if the hardware >> supports use of head/tailroom for crypto-op info. For devices that do not >> support using the head/tailroom, they can continue to operate without any >> performance-drop. >> >> Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com> >> --- >> v1: >> * Removed deprecation notice >> * Updated release note >> * Renamed new fields to have 'mbuf' in the name >> * Changed the type of new fields to uint16_t (instead of uint32_t) >> >> doc/guides/rel_notes/release_18_08.rst | 6 ++++++ >> lib/librte_cryptodev/rte_cryptodev.h | 6 ++++++ >> 2 files changed, 12 insertions(+) >> >> diff --git a/doc/guides/rel_notes/release_18_08.rst >> b/doc/guides/rel_notes/release_18_08.rst >> index 5bc23c5..fae0d26 100644 >> --- a/doc/guides/rel_notes/release_18_08.rst >> +++ b/doc/guides/rel_notes/release_18_08.rst >> @@ -70,6 +70,12 @@ ABI Changes >> Also, make sure to start the actual text at the margin. >> ========================================================= >> >> +* cryptodev: Additional fields in rte_cryptodev_info. >> + >> + Two new fields of type ``uint16_t`` added in ``rte_cryptodev_info`` >> + structure: ``min_mbuf_headroom_req`` and ``min_mbuf_tailroom_req``. >> + These parameters specify the recommended headroom and tailroom for >> + mbufs to be processed by the PMD. > I think the "cryptodev scheduler PMD" needs changes to take these new parameters into consideration. > Scheduler_pmd_info_get should return the maximum number of these two fields on all the slaves > (like what's done with max number of sessions). > > We need to close the subtree today, with all API changes done. Will you have time to make this change today? > > Thanks! > Pablo >
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst index 5bc23c5..fae0d26 100644 --- a/doc/guides/rel_notes/release_18_08.rst +++ b/doc/guides/rel_notes/release_18_08.rst @@ -70,6 +70,12 @@ ABI Changes Also, make sure to start the actual text at the margin. ========================================================= +* cryptodev: Additional fields in rte_cryptodev_info. + + Two new fields of type ``uint16_t`` added in ``rte_cryptodev_info`` + structure: ``min_mbuf_headroom_req`` and ``min_mbuf_tailroom_req``. These + parameters specify the recommended headroom and tailroom for mbufs to be + processed by the PMD. Removed Items ------------- diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h index 92ce6d4..4e5b5b4 100644 --- a/lib/librte_cryptodev/rte_cryptodev.h +++ b/lib/librte_cryptodev/rte_cryptodev.h @@ -382,6 +382,12 @@ struct rte_cryptodev_info { unsigned max_nb_queue_pairs; /**< Maximum number of queues pairs supported by device. */ + uint16_t min_mbuf_headroom_req; + /**< Minimum mbuf headroom required by device */ + + uint16_t min_mbuf_tailroom_req; + /**< Minimum mbuf tailroom required by device */ + struct { unsigned max_nb_sessions; /**< Maximum number of sessions supported by device. */
Enabling crypto devs to specify the minimum headroom and tailroom it expects in the mbuf. For net PMDs, standard headroom has to be honoured by applications, which is not strictly followed for crypto devs. This prevents crypto devs from using free space in mbuf (available as head/tailroom) for internal requirements in crypto operations. Addition of head/tailroom requirement will help PMDs to communicate such requirements to the application. The availability and use of head/tailroom is an optimization if the hardware supports use of head/tailroom for crypto-op info. For devices that do not support using the head/tailroom, they can continue to operate without any performance-drop. Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com> --- v1: * Removed deprecation notice * Updated release note * Renamed new fields to have 'mbuf' in the name * Changed the type of new fields to uint16_t (instead of uint32_t) doc/guides/rel_notes/release_18_08.rst | 6 ++++++ lib/librte_cryptodev/rte_cryptodev.h | 6 ++++++ 2 files changed, 12 insertions(+)