DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Jain, Deepak K" <deepak.k.jain@intel.com>
To: dev@dpdk.org
Cc: declan.doherty@intel.com, john.griffin@intel.com,
	fiona.trahe@intel.com, pablo.de.lara.guarch@intel.com,
	deepak.k.jain@intel.com
Subject: [dpdk-dev] [PATCH 1/4] cryptodev: add rte_crypto_op_bulk_free function
Date: Thu, 16 Jun 2016 20:49:00 +0100	[thread overview]
Message-ID: <1466106543-209204-2-git-send-email-deepak.k.jain@intel.com> (raw)
In-Reply-To: <1466106543-209204-1-git-send-email-deepak.k.jain@intel.com>

From: Declan Doherty <declan.doherty@intel.com>

Adding rte_crypto_op_bulk_free to free up the ops in bulk
so as to expect improvement in performance.

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
---
 lib/librte_cryptodev/rte_crypto.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/lib/librte_cryptodev/rte_crypto.h b/lib/librte_cryptodev/rte_crypto.h
index 5bc3eaa..31abbdc 100644
--- a/lib/librte_cryptodev/rte_crypto.h
+++ b/lib/librte_cryptodev/rte_crypto.h
@@ -328,6 +328,21 @@ rte_crypto_op_free(struct rte_crypto_op *op)
 }
 
 /**
+ * free crypto operation structure
+ * If operation has been allocate from a rte_mempool, then the operation will
+ * be returned to the mempool.
+ *
+ * @param	op	symmetric crypto operation
+ */
+static inline void
+rte_crypto_op_bulk_free(struct rte_mempool *mpool, struct rte_crypto_op **ops,
+		uint16_t nb_ops)
+{
+	if (ops != NULL)
+		rte_mempool_put_bulk(mpool, (void * const *)ops, nb_ops);
+}
+
+/**
  * Allocate a symmetric crypto operation in the private data of an mbuf.
  *
  * @param	m	mbuf which is associated with the crypto operation, the
-- 
2.5.5

  reply	other threads:[~2016-06-16 19:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-16 19:48 [dpdk-dev] [PATCH 0/4] Extending cryptodev Performance tests Jain, Deepak K
2016-06-16 19:49 ` Jain, Deepak K [this message]
2016-06-20  9:45   ` [dpdk-dev] [PATCH 1/4] cryptodev: add rte_crypto_op_bulk_free function Thomas Monjalon
2016-06-20 14:30     ` Jain, Deepak K
2016-06-16 19:49 ` [dpdk-dev] [PATCH 2/4] app/test: adding Snow3g performance test Jain, Deepak K
2016-06-16 19:49 ` [dpdk-dev] [PATCH 3/4] app/test: updating AES SHA " Jain, Deepak K
2016-06-16 19:49 ` [dpdk-dev] [PATCH 4/4] app/test: typo fixing Jain, Deepak K
2016-06-16 22:13 ` [dpdk-dev] [PATCH 0/4] Extending cryptodev Performance tests De Lara Guarch, Pablo
2016-06-20 14:32 ` [dpdk-dev] [PATCH v2 0/3] " Jain, Deepak K
2016-06-20 14:32   ` [dpdk-dev] [PATCH v2 1/3] app/test: adding Snow3g performance test Jain, Deepak K
2016-06-20 14:32   ` [dpdk-dev] [PATCH v2 2/3] app/test: updating AES SHA " Jain, Deepak K
2016-06-20 14:32   ` [dpdk-dev] [PATCH v2 3/3] app/test: typo fixing Jain, Deepak K
2016-06-20 15:08 ` [dpdk-dev] [PATCH v3 0/3] Extending cryptodev Performance tests Jain, Deepak K
2016-06-20 15:08   ` [dpdk-dev] [PATCH v3 1/3] app/test: adding Snow3g performance test Jain, Deepak K
2016-06-20 15:08   ` [dpdk-dev] [PATCH v3 2/3] app/test: updating AES SHA " Jain, Deepak K
2016-06-20 15:08   ` [dpdk-dev] [PATCH v3 3/3] app/test: typo fixing Jain, Deepak K
2016-06-20 15:24   ` [dpdk-dev] [PATCH v3 0/3] Extending cryptodev Performance tests Thomas Monjalon

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=1466106543-209204-2-git-send-email-deepak.k.jain@intel.com \
    --to=deepak.k.jain@intel.com \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=fiona.trahe@intel.com \
    --cc=john.griffin@intel.com \
    --cc=pablo.de.lara.guarch@intel.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 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).