[dpdk-dev] lib/compress: clarify when it's ok to clear private_xform data

Message ID 1526985210-13587-1-git-send-email-fiona.trahe@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Pablo de Lara Guarch
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Fiona Trahe May 22, 2018, 10:33 a.m. UTC
  As the private_xform data can be shared by many operations
and across queue_pairs, it would be performance impacting
for PMDs to track inflights associated with one. It makes
more sense to push the responsibility to the application to
keep track of its usage and only delete the private_xform when
there are no more ops using it.

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
---
 lib/librte_compressdev/rte_compressdev.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
  

Comments

De Lara Guarch, Pablo May 22, 2018, 11:07 a.m. UTC | #1
> -----Original Message-----
> From: Trahe, Fiona
> Sent: Tuesday, May 22, 2018 11:34 AM
> To: dev@dpdk.org
> Cc: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Trahe, Fiona
> <fiona.trahe@intel.com>; Shally.Verma@cavium.com;
> ahmed.mansour@nxp.com; ashish.gupta@caviumnetworks.com
> Subject: [PATCH] lib/compress: clarify when it's ok to clear private_xform data
> 
> As the private_xform data can be shared by many operations and across
> queue_pairs, it would be performance impacting for PMDs to track inflights
> associated with one. It makes more sense to push the responsibility to the
> application to keep track of its usage and only delete the private_xform when
> there are no more ops using it.
> 
> Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>

Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
  
De Lara Guarch, Pablo May 22, 2018, 12:44 p.m. UTC | #2
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of De Lara Guarch, Pablo
> Sent: Tuesday, May 22, 2018 12:08 PM
> To: Trahe, Fiona <fiona.trahe@intel.com>; dev@dpdk.org
> Cc: Shally.Verma@cavium.com; ahmed.mansour@nxp.com;
> ashish.gupta@caviumnetworks.com
> Subject: Re: [dpdk-dev] [PATCH] lib/compress: clarify when it's ok to clear
> private_xform data
> 
> 
> 
> > -----Original Message-----
> > From: Trahe, Fiona
> > Sent: Tuesday, May 22, 2018 11:34 AM
> > To: dev@dpdk.org
> > Cc: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Trahe,
> > Fiona <fiona.trahe@intel.com>; Shally.Verma@cavium.com;
> > ahmed.mansour@nxp.com; ashish.gupta@caviumnetworks.com
> > Subject: [PATCH] lib/compress: clarify when it's ok to clear
> > private_xform data
> >
> > As the private_xform data can be shared by many operations and across
> > queue_pairs, it would be performance impacting for PMDs to track
> > inflights associated with one. It makes more sense to push the
> > responsibility to the application to keep track of its usage and only
> > delete the private_xform when there are no more ops using it.
> >
> > Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
> 
> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

Applied to dpdk-next-crypto.
Thanks,

Pablo
  

Patch

diff --git a/lib/librte_compressdev/rte_compressdev.h b/lib/librte_compressdev/rte_compressdev.h
index c86035f..5b4fca4 100644
--- a/lib/librte_compressdev/rte_compressdev.h
+++ b/lib/librte_compressdev/rte_compressdev.h
@@ -516,6 +516,8 @@  struct rte_compressdev_config {
 
 /**
  * This should clear the private_xform and return it to the device's mempool.
+ * It is the application's responsibility to ensure that private_xform data
+ * is not cleared while there are still in-flight operations using it.
  *
  * @param dev_id
  *   Compress device identifier
@@ -527,7 +529,6 @@  struct rte_compressdev_config {
  *  - 0 if successful
  *  - <0 in error cases
  *  - Returns -EINVAL if input parameters are invalid.
- *  - Returns -EBUSY if can't free private_xform due to inflight operations
  */
 int __rte_experimental
 rte_compressdev_private_xform_free(uint8_t dev_id, void *private_xform);