examples/pipeline: fix build
[dpdk.git] / lib / cryptodev / rte_cryptodev.h
index 1d7bd07..585cee2 100644 (file)
@@ -20,9 +20,7 @@ extern "C" {
 
 #include "rte_kvargs.h"
 #include "rte_crypto.h"
-#include "rte_dev.h"
 #include <rte_common.h>
-#include <rte_config.h>
 #include <rte_rcu_qsbr.h>
 
 #include "rte_cryptodev_trace_fp.h"
@@ -170,7 +168,13 @@ struct rte_cryptodev_asymmetric_xform_capability {
        /**< Transform type: RSA/MODEXP/DH/DSA/MODINV */
 
        uint32_t op_types;
-       /**< bitmask for supported rte_crypto_asym_op_type */
+       /**<
+        * Bitmask for supported rte_crypto_asym_op_type or
+        * rte_crypto_asym_ke_type. Which enum is used is determined
+        * by the rte_crypto_asym_xform_type. For key exchange algorithms
+        * like Diffie-Hellman it is rte_crypto_asym_ke_type, for others
+        * it is rte_crypto_asym_op_type.
+        */
 
        __extension__
        union {
@@ -996,14 +1000,19 @@ rte_cryptodev_sym_session_create(struct rte_mempool *mempool);
  *                   processed with this session
  * @param   mp       mempool to allocate asymmetric session
  *                   objects from
+ * @param   session  void ** for session to be used
+ *
  * @return
- *  - On success return pointer to asym-session
- *  - On failure returns NULL
+ *  - 0 on success.
+ *  - -EINVAL on invalid arguments.
+ *  - -ENOMEM on memory error for session allocation.
+ *  - -ENOTSUP if device doesn't support session configuration.
  */
 __rte_experimental
-void *
+int
 rte_cryptodev_asym_session_create(uint8_t dev_id,
-               struct rte_crypto_asym_xform *xforms, struct rte_mempool *mp);
+               struct rte_crypto_asym_xform *xforms, struct rte_mempool *mp,
+               void **session);
 
 /**
  * Frees symmetric crypto session header, after checking that all
@@ -1266,6 +1275,28 @@ __rte_experimental
 int
 rte_cryptodev_get_raw_dp_ctx_size(uint8_t dev_id);
 
+/**
+ * Set session event meta data
+ *
+ * @param      dev_id          The device identifier.
+ * @param      sess            Crypto or security session.
+ * @param      op_type         Operation type.
+ * @param      sess_type       Session type.
+ * @param      ev_mdata        Pointer to the event crypto meta data
+ *                             (aka *union rte_event_crypto_metadata*)
+ * @param      size            Size of ev_mdata.
+ *
+ * @return
+ *  - On success, zero.
+ *  - On failure, a negative value.
+ */
+__rte_experimental
+int
+rte_cryptodev_session_event_mdata_set(uint8_t dev_id, void *sess,
+       enum rte_crypto_op_type op_type,
+       enum rte_crypto_op_sess_type sess_type,
+       void *ev_mdata, uint16_t size);
+
 /**
  * Union of different crypto session types, including session-less xform
  * pointer.