DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [RFC] cryptodev: Change burst APIs to crypto operation oriented
@ 2016-01-12 18:11 Declan Doherty
  2016-01-18 14:31 ` Olivier MATZ
  0 siblings, 1 reply; 2+ messages in thread
From: Declan Doherty @ 2016-01-12 18:11 UTC (permalink / raw)
  To: dev, Olivier MATZ, Thomas Monjalon

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-18 14:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-12 18:11 [dpdk-dev] [RFC] cryptodev: Change burst APIs to crypto operation oriented Declan Doherty
2016-01-18 14:31 ` Olivier MATZ

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).