DPDK patches and discussions
 help / color / mirror / Atom feed
From: Declan Doherty <declan.doherty@intel.com>
To: "dev@dpdk.org" <dev@dpdk.org>,
	Olivier MATZ <olivier.matz@6wind.com>,
	Thomas Monjalon <thomas.monjalon@6wind.com>
Subject: [dpdk-dev] [RFC] cryptodev: Change burst APIs to crypto operation oriented
Date: Tue, 12 Jan 2016 18:11:14 +0000	[thread overview]
Message-ID: <569541C2.60302@intel.com> (raw)

In this rfc I'm looking to get some feedback on a proposal to change the 
cryptodev burst API from the current implementation of accepting burst 
of rte_mbuf's to a burst API based on rte_crypto_op's.

-static inline uint16_t
-rte_cryptodev_dequeue_burst(uint8_t dev_id, uint16_t qp_id,
-               struct rte_mbuf **pkts, uint16_t nb_pkts)
+static inline uint16_t
+rte_cryptodev_dequeue_op_burst(uint8_t dev_id, uint16_t qp_id,
+               struct rte_crypto_op **ops, uint16_t nb_ops)


-static inline uint16_t
-rte_cryptodev_dequeue_burst(uint8_t dev_id, uint16_t qp_id,
-               struct rte_mbuf **pkts, uint16_t nb_pkts)
+ static inline uint16_t
+rte_cryptodev_dequeue_op_burst(uint8_t dev_id, uint16_t qp_id,
+               struct rte_crypto_op **ops, uint16_t nb_ops)


The motivation for these changes are to address the concerns
raise in the discussion of the rte_mbuf_offload library patch
(http://dpdk.org/ml/archives/dev/2015-November/028247.html) by both 
Thomas and Olivier. By changing to an API which accepts bursts of 
rte_crypto_op structures we are no longer need to have a specific field 
in the rte_mbuf for offload operations and instead with a small 
modification to the rte_crypto_op structure by adding a field for the 
source rte_mbuf on which the crypto operation is going to be performed 
the same functionality can be performed. This will break the current 
dependency between the rte_mbuf and the rte_mbuf_offload library and by 
proxy the rte_cyptodev library.

struct rte_crypto_op {
         enum rte_crypto_op_sess_type type;
         enum rte_crypto_op_status status;

+       struct rte_mbuf *m_src; /**< source mbuf */
	struct rte_mbuf *m_dst; /**< Destination mbuf */

....
}

Another advantage of this approach is that it simplifies and speeds up
the processing of bursts within crypto PMDs as they no longer have to 
search for the crypto operation within the rte_mbuf_offload structure 
and can instead just operate on the crypto operation directly.


Regarding the rte_mbuf_offload library I think that it should be removed 
and that we can look adding a more general solution for managing 
external metadata to the rte_mbuf library when that functionality is 
required.

             reply	other threads:[~2016-01-12 18:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-12 18:11 Declan Doherty [this message]
2016-01-18 14:31 ` Olivier MATZ

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=569541C2.60302@intel.com \
    --to=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=olivier.matz@6wind.com \
    --cc=thomas.monjalon@6wind.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).