DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Trahe, Fiona" <fiona.trahe@intel.com>
To: "Doherty, Declan" <declan.doherty@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v2 2/2] cryptodev: change burst API to be crypto	op oriented
Date: Mon, 22 Feb 2016 18:56:24 +0000	[thread overview]
Message-ID: <348A99DA5F5B7549AA880327E580B43588F711CA@IRSMSX101.ger.corp.intel.com> (raw)
In-Reply-To: <1455879670-31446-3-git-send-email-declan.doherty@intel.com>

Hi Declan,

Bug + fix below

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Declan Doherty
> Sent: Friday, February 19, 2016 11:01 AM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH v2 2/2] cryptodev: change burst API to be crypto op
> oriented
> 
> This patch modifies the crypto burst enqueue/dequeue APIs to operate on bursts
> rte_crypto_op's rather than the current implementation which operates on
> rte_mbuf bursts, this simplifies the burst processing in the crypto PMDs and the
> use of crypto operations in general.
> 
> This change set also continues the separation of the symmetric operation
> parameters
> from the more general operation parameters, this will simplify the integration of
> asymmetric crypto operations in the future.
> 
> As well as the changes to the crypto APIs this patch adds functions for managing
> rte_crypto_op pools to the cryptodev API. It modifies the existing PMDs, unit
> tests and sample application to work with the modified APIs.
> 
> Finally this change set removes the now unused rte_mbuf_offload library.
>
>Signed-off-by: Declan Doherty <declan.doherty@intel.com>



diff --git a/lib/librte_cryptodev/rte_crypto.h b/lib/librte_cryptodev/rte_crypto.h
//snip
+ * Returns a pointer to the private data of a crypto operation if
+ * that operation has enough capacity for requested size.
+ *
+ * @param	op	crypto operation.
+ * @param	size	size of space requested in private data.
+ *
+ * @returns
+ * - if sufficient space available returns pointer to start of private data
+ * - if insufficient space returns NULL
+ */
+static inline void *
+__rte_crypto_op_get_priv_data(struct rte_crypto_op *op, uint32_t size)
+{
+	uint32_t priv_size;
+
+	if (likely(op->mempool != NULL)) {
+		priv_size = __rte_crypto_op_get_priv_data_size(op->mempool);
+
+		if (likely(priv_size >= size))
+			return (void *)((op + 1) +
+					sizeof(struct rte_crypto_sym_op));

Jumping by rte_crypto_op increments, should be byte increments, i.e.

			return (void *)((uint8_t *)(op + 1) +
					sizeof(struct rte_crypto_sym_op));


+	}
+
+	return NULL;
+}

  parent reply	other threads:[~2016-02-22 18:56 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-30 13:07 [dpdk-dev] [PATCH] cryptodev: API change to rte_crypto_op bursts Declan Doherty
2016-02-08 17:50 ` Trahe, Fiona
2016-02-19 11:01 ` [dpdk-dev] [PATCH v2 0/2] cryptodev API changes Declan Doherty
2016-02-19 11:01   ` [dpdk-dev] [PATCH v2 1/2] cryptodev: API tidy and changes to support future extensions Declan Doherty
2016-02-19 11:01   ` [dpdk-dev] [PATCH v2 2/2] cryptodev: change burst API to be crypto op oriented Declan Doherty
2016-02-22 11:17     ` Trahe, Fiona
2016-02-22 18:23     ` Trahe, Fiona
2016-02-22 18:56     ` Trahe, Fiona [this message]
2016-02-26 17:30   ` [dpdk-dev] [PATCH v3 0/2] cryptodev API changes Declan Doherty
2016-02-26 17:30     ` [dpdk-dev] [PATCH v3 1/2] cryptodev: API tidy and changes to support future extensions Declan Doherty
2016-02-26 17:30     ` [dpdk-dev] [PATCH v3 2/2] cryptodev: change burst API to be crypto op oriented Declan Doherty
2016-02-29 16:00     ` [dpdk-dev] [PATCH v3 0/2] cryptodev API changes Declan Doherty
2016-02-29 16:52     ` [dpdk-dev] [PATCH v4 " Declan Doherty
2016-02-29 16:52       ` [dpdk-dev] [PATCH v4 1/2] cryptodev: API tidy and changes to support future extensions Declan Doherty
2016-03-04 14:43         ` Thomas Monjalon
2016-02-29 16:52       ` [dpdk-dev] [PATCH v4 2/2] cryptodev: change burst API to be crypto op oriented Declan Doherty
2016-02-29 17:47       ` [dpdk-dev] [PATCH v4 0/2] cryptodev API changes Trahe, Fiona
2016-03-04 17:17       ` [dpdk-dev] [PATCH v5 " Fiona Trahe
2016-03-04 17:38         ` Thomas Monjalon
2016-03-04 17:43           ` Trahe, Fiona
2016-03-04 17:45             ` Thomas Monjalon
2016-03-04 18:01               ` Trahe, Fiona
2016-03-04 17:39         ` Trahe, Fiona
2016-03-15  6:48         ` Cao, Min
2016-03-04 17:17       ` [dpdk-dev] [PATCH v5 1/2] This patch splits symmetric specific definitions and functions away from the common crypto APIs to facilitate the future extension and expansion of the cryptodev framework, in order to allow asymmetric crypto operations to be introduced at a later date, as well as to clean the logical structure of the public includes. The patch also introduces the _sym prefix to symmetric specific structure and functions to improve clarity in the API Fiona Trahe
2016-03-04 17:17       ` [dpdk-dev] [PATCH v5 2/2] This patch modifies the crypto burst enqueue/dequeue APIs to operate on bursts rte_crypto_op's rather than the current implementation which operates on rte_mbuf bursts, this simplifies the burst processing in the crypto PMDs and the use of crypto operations in general Fiona Trahe
2016-03-04 18:29       ` [dpdk-dev] [PATCH v6 0/2] cryptodev API changes Fiona Trahe
2016-03-07 11:50         ` [dpdk-dev] [PATCH v7 " Fiona Trahe
2016-03-07 13:23           ` De Lara Guarch, Pablo
2016-03-07 13:53           ` Jain, Deepak K
2016-03-10 13:42           ` [dpdk-dev] [PATCH v8 0/5] " Fiona Trahe
2016-03-10 14:05             ` De Lara Guarch, Pablo
2016-03-10 15:41             ` [dpdk-dev] [PATCH v9 " Fiona Trahe
2016-03-10 16:14               ` Thomas Monjalon
2016-03-10 15:41             ` [dpdk-dev] [PATCH v9 1/5] cryptodev: code cleanup Fiona Trahe
2016-03-10 15:41             ` [dpdk-dev] [PATCH v9 2/5] cryptodev: refactor to partition common from symmetric-specific code Fiona Trahe
2016-03-10 15:41             ` [dpdk-dev] [PATCH v9 3/5] cryptodev: remove unused phys_addr field from key Fiona Trahe
2016-03-10 15:41             ` [dpdk-dev] [PATCH v9 4/5] cryptodev: change burst API to be crypto op oriented Fiona Trahe
2016-03-10 16:03               ` Thomas Monjalon
2016-03-10 16:13                 ` Trahe, Fiona
2016-03-10 15:41             ` [dpdk-dev] [PATCH v9 5/5] mbuf_offload: remove library Fiona Trahe
2016-03-14  8:59             ` [dpdk-dev] [PATCH v8 0/5] cryptodev API changes Cao, Min
2016-03-10 13:42           ` [dpdk-dev] [PATCH v8 1/5] cryptodev: code cleanup Fiona Trahe
2016-03-10 13:42           ` [dpdk-dev] [PATCH v8 2/5] cryptodev: refactor to partition common from symmetric-specific code Fiona Trahe
2016-03-10 13:42           ` [dpdk-dev] [PATCH v8 3/5] cryptodev: remove unused phys_addr field from key Fiona Trahe
2016-03-10 13:43           ` [dpdk-dev] [PATCH v8 4/5] cryptodev: change burst API to be crypto op oriented Fiona Trahe
2016-03-10 14:03             ` Thomas Monjalon
2016-03-10 13:43           ` [dpdk-dev] [PATCH v8 5/5] mbuf_offload: remove library Fiona Trahe
2016-03-15  5:21           ` [dpdk-dev] [PATCH v7 0/2] cryptodev API changes Cao, Min
2016-03-07 11:50         ` [dpdk-dev] [PATCH v7 1/2] cryptodev: API tidy and changes to support future extensions Fiona Trahe
2016-03-08 14:10           ` Thomas Monjalon
2016-03-10 10:30             ` Trahe, Fiona
2016-03-07 11:50         ` [dpdk-dev] [PATCH v7 2/2] cryptodev: change burst API to be crypto op oriented Fiona Trahe
2016-03-08 14:32           ` Thomas Monjalon
2016-03-09 12:55             ` Trahe, Fiona
2016-03-10 10:28               ` Trahe, Fiona
2016-03-15  6:46         ` [dpdk-dev] [PATCH v6 0/2] cryptodev API changes Cao, Min
2016-03-04 18:29       ` [dpdk-dev] [PATCH v6 1/2] cryptodev: API tidy and changes to support future extensions Fiona Trahe
2016-03-04 18:29       ` [dpdk-dev] [PATCH v6 2/2] cryptodev: change burst API to be crypto op oriented Fiona Trahe
2016-03-15  6:57       ` [dpdk-dev] [PATCH v4 0/2] cryptodev API changes Cao, Min
2016-03-15  7:07     ` [dpdk-dev] [PATCH v3 " Cao, Min
2016-03-15  7:48   ` [dpdk-dev] [PATCH v2 " Cao, Min

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=348A99DA5F5B7549AA880327E580B43588F711CA@IRSMSX101.ger.corp.intel.com \
    --to=fiona.trahe@intel.com \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    /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).