DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Verma, Shally" <Shally.Verma@cavium.com>
To: Fiona Trahe <fiona.trahe@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "akhil.goyal@nxp.com" <akhil.goyal@nxp.com>,
	"tomaszx.jozwiak@intel.com" <tomaszx.jozwiak@intel.com>,
	"Gupta, Ashish" <Ashish.Gupta@cavium.com>,
	"lee.daly@intel.com" <lee.daly@intel.com>
Subject: Re: [dpdk-dev] [PATCH 1/2] compressdev: add api to bulk free ops
Date: Tue, 20 Nov 2018 05:20:54 +0000	[thread overview]
Message-ID: <SN6PR07MB5152A402F9E4FC485B3DBC1CF0D90@SN6PR07MB5152.namprd07.prod.outlook.com> (raw)
In-Reply-To: <1542665411-23489-2-git-send-email-fiona.trahe@intel.com>



>-----Original Message-----
>From: Fiona Trahe <fiona.trahe@intel.com>
>Sent: 20 November 2018 03:40
>To: dev@dpdk.org
>Cc: akhil.goyal@nxp.com; tomaszx.jozwiak@intel.com; Verma, Shally <Shally.Verma@cavium.com>; Gupta, Ashish
><Ashish.Gupta@cavium.com>; lee.daly@intel.com; fiona.trahe@intel.com
>Subject: [PATCH 1/2] compressdev: add api to bulk free ops
>
>External Email
>
>There's an API to bulk allocate operations,
>this adds a corresponding bulk free API.
>
>
>Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>

Acked-by: Shally Verma <shally.verma@caviumnetworks.com>

>---
> lib/librte_compressdev/rte_comp.c                  | 12 ++++++++++++
> lib/librte_compressdev/rte_comp.h                  | 14 ++++++++++++++
> lib/librte_compressdev/rte_compressdev_version.map |  1 +
> 3 files changed, 27 insertions(+)
>
>diff --git a/lib/librte_compressdev/rte_comp.c b/lib/librte_compressdev/rte_comp.c
>index 4634c12..06e3d44 100644
>--- a/lib/librte_compressdev/rte_comp.c
>+++ b/lib/librte_compressdev/rte_comp.c
>@@ -213,3 +213,15 @@ rte_comp_op_free(struct rte_comp_op *op)
>        if (op != NULL && op->mempool != NULL)
>                rte_mempool_put(op->mempool, op);
> }
>+
>+void __rte_experimental
>+rte_comp_op_bulk_free(struct rte_comp_op **ops, uint16_t nb_ops)
>+{
>+       uint16_t i;
>+
>+       for (i = 0; i < nb_ops; i++) {
>+               if (ops[i] != NULL && ops[i]->mempool != NULL)
>+                       rte_mempool_put(ops[i]->mempool, ops[i]);
>+               ops[i] = NULL;
>+       }
>+}
>diff --git a/lib/librte_compressdev/rte_comp.h b/lib/librte_compressdev/rte_comp.h
>index 395ce29..c2b3de8 100644
>--- a/lib/librte_compressdev/rte_comp.h
>+++ b/lib/librte_compressdev/rte_comp.h
>@@ -467,6 +467,20 @@ void __rte_experimental
> rte_comp_op_free(struct rte_comp_op *op);
>
> /**
>+ * Bulk free operation structures
>+ * If operations have been allocated from an rte_mempool, then the operations
>+ * will be returned to the mempool.
>+ * The array entry will be cleared.
>+ *
>+ * @param ops
>+ *   Array of Compress operations
>+ * @param nb_ops
>+ *   Number of operations to free
>+ */
>+void __rte_experimental
>+rte_comp_op_bulk_free(struct rte_comp_op **ops, uint16_t nb_ops);
>+
>+/**
>  * Get the name of a compress service feature flag
>  *
>  * @param flag
>diff --git a/lib/librte_compressdev/rte_compressdev_version.map b/lib/librte_compressdev/rte_compressdev_version.map
>index 6f900b6..13a047e 100644
>--- a/lib/librte_compressdev/rte_compressdev_version.map
>+++ b/lib/librte_compressdev/rte_compressdev_version.map
>@@ -32,6 +32,7 @@ EXPERIMENTAL {
>        rte_comp_get_feature_name;
>        rte_comp_op_alloc;
>        rte_comp_op_bulk_alloc;
>+       rte_comp_op_bulk_free;
>        rte_comp_op_free;
>        rte_comp_op_pool_create;
>
>--
>2.7.4

  reply	other threads:[~2018-11-20  5:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-19 22:10 [dpdk-dev] [PATCH 0/2] compressdev: add bulk op free API Fiona Trahe
2018-11-19 22:10 ` [dpdk-dev] [PATCH 1/2] compressdev: add api to bulk free ops Fiona Trahe
2018-11-20  5:20   ` Verma, Shally [this message]
2018-11-19 22:10 ` [dpdk-dev] [PATCH 2/2] test/compress: use bulk free operations api Fiona Trahe
2018-11-20  5:20   ` Verma, Shally
2018-11-22 10:45   ` Daly, Lee
2018-12-18 10:20 ` [dpdk-dev] [PATCH 0/2] compressdev: add bulk op free API Akhil Goyal

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=SN6PR07MB5152A402F9E4FC485B3DBC1CF0D90@SN6PR07MB5152.namprd07.prod.outlook.com \
    --to=shally.verma@cavium.com \
    --cc=Ashish.Gupta@cavium.com \
    --cc=akhil.goyal@nxp.com \
    --cc=dev@dpdk.org \
    --cc=fiona.trahe@intel.com \
    --cc=lee.daly@intel.com \
    --cc=tomaszx.jozwiak@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).