From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id AADEC1F1C for ; Tue, 22 May 2018 12:33:35 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 May 2018 03:33:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,429,1520924400"; d="scan'208";a="41271041" Received: from sivswdev01.ir.intel.com (HELO localhost.localdomain) ([10.237.217.45]) by fmsmga007.fm.intel.com with ESMTP; 22 May 2018 03:33:33 -0700 From: Fiona Trahe To: dev@dpdk.org Cc: pablo.de.lara.guarch@intel.com, fiona.trahe@intel.com, Shally.Verma@cavium.com, ahmed.mansour@nxp.com, ashish.gupta@caviumnetworks.com Date: Tue, 22 May 2018 11:33:30 +0100 Message-Id: <1526985210-13587-1-git-send-email-fiona.trahe@intel.com> X-Mailer: git-send-email 1.7.0.7 Subject: [dpdk-dev] [PATCH] lib/compress: clarify when it's ok to clear private_xform data X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 10:33:37 -0000 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 --- lib/librte_compressdev/rte_compressdev.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) 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); -- 1.7.0.7