DPDK  20.11.8
rte_cryptodev.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2015-2020 Intel Corporation.
3  */
4 
5 #ifndef _RTE_CRYPTODEV_H_
6 #define _RTE_CRYPTODEV_H_
7 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
21 #include "rte_kvargs.h"
22 #include "rte_crypto.h"
23 #include "rte_dev.h"
24 #include <rte_common.h>
25 #include <rte_config.h>
26 
27 #include "rte_cryptodev_trace_fp.h"
28 
29 extern const char **rte_cyptodev_names;
30 
31 /* Logging Macros */
32 
33 #define CDEV_LOG_ERR(...) \
34  RTE_LOG(ERR, CRYPTODEV, \
35  RTE_FMT("%s() line %u: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
36  __func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__,)))
37 
38 #define CDEV_LOG_INFO(...) \
39  RTE_LOG(INFO, CRYPTODEV, \
40  RTE_FMT(RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
41  RTE_FMT_TAIL(__VA_ARGS__,)))
42 
43 #define CDEV_LOG_DEBUG(...) \
44  RTE_LOG(DEBUG, CRYPTODEV, \
45  RTE_FMT("%s() line %u: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
46  __func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__,)))
47 
48 #define CDEV_PMD_TRACE(...) \
49  RTE_LOG(DEBUG, CRYPTODEV, \
50  RTE_FMT("[%s] %s: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
51  dev, __func__, RTE_FMT_TAIL(__VA_ARGS__,)))
52 
66 #define rte_crypto_op_ctod_offset(c, t, o) \
67  ((t)((char *)(c) + (o)))
68 
80 #define rte_crypto_op_ctophys_offset(c, o) \
81  (rte_iova_t)((c)->phys_addr + (o))
82 
87  uint16_t min;
88  uint16_t max;
89  uint16_t increment;
95 };
96 
104  union {
105  struct {
108  uint16_t block_size;
118  } auth;
120  struct {
123  uint16_t block_size;
129  } cipher;
131  struct {
134  uint16_t block_size;
144  } aead;
145  };
146 };
147 
156  uint32_t op_types;
159  __extension__
160  union {
165  };
166 };
167 
174 };
175 
176 
179  enum rte_crypto_op_type op;
183  union {
188  };
189 };
190 
193  enum rte_crypto_sym_xform_type type;
194  union {
195  enum rte_crypto_cipher_algorithm cipher;
196  enum rte_crypto_auth_algorithm auth;
197  enum rte_crypto_aead_algorithm aead;
198  } algo;
199 };
200 
209 };
210 
223  const struct rte_cryptodev_sym_capability_idx *idx);
224 
235 __rte_experimental
238  const struct rte_cryptodev_asym_capability_idx *idx);
239 
252 int
254  const struct rte_cryptodev_symmetric_capability *capability,
255  uint16_t key_size, uint16_t iv_size);
256 
270 int
272  const struct rte_cryptodev_symmetric_capability *capability,
273  uint16_t key_size, uint16_t digest_size, uint16_t iv_size);
274 
289 int
291  const struct rte_cryptodev_symmetric_capability *capability,
292  uint16_t key_size, uint16_t digest_size, uint16_t aad_size,
293  uint16_t iv_size);
294 
305 __rte_experimental
306 int
308  const struct rte_cryptodev_asymmetric_xform_capability *capability,
309  enum rte_crypto_asym_op_type op_type);
310 
321 __rte_experimental
322 int
324  const struct rte_cryptodev_asymmetric_xform_capability *capability,
325  uint16_t modlen);
326 
338 int
340  const char *algo_string);
341 
353 int
355  const char *algo_string);
356 
368 int
370  const char *algo_string);
371 
383 __rte_experimental
384 int
386  const char *xform_string);
387 
388 
390 #define RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST() \
391  { RTE_CRYPTO_OP_TYPE_UNDEFINED }
392 
393 
402 #define RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO (1ULL << 0)
404 #define RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO (1ULL << 1)
406 #define RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING (1ULL << 2)
408 #define RTE_CRYPTODEV_FF_CPU_SSE (1ULL << 3)
410 #define RTE_CRYPTODEV_FF_CPU_AVX (1ULL << 4)
412 #define RTE_CRYPTODEV_FF_CPU_AVX2 (1ULL << 5)
414 #define RTE_CRYPTODEV_FF_CPU_AESNI (1ULL << 6)
416 #define RTE_CRYPTODEV_FF_HW_ACCELERATED (1ULL << 7)
420 #define RTE_CRYPTODEV_FF_CPU_AVX512 (1ULL << 8)
422 #define RTE_CRYPTODEV_FF_IN_PLACE_SGL (1ULL << 9)
426 #define RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT (1ULL << 10)
430 #define RTE_CRYPTODEV_FF_OOP_SGL_IN_LB_OUT (1ULL << 11)
435 #define RTE_CRYPTODEV_FF_OOP_LB_IN_SGL_OUT (1ULL << 12)
439 #define RTE_CRYPTODEV_FF_OOP_LB_IN_LB_OUT (1ULL << 13)
441 #define RTE_CRYPTODEV_FF_CPU_NEON (1ULL << 14)
443 #define RTE_CRYPTODEV_FF_CPU_ARM_CE (1ULL << 15)
445 #define RTE_CRYPTODEV_FF_SECURITY (1ULL << 16)
447 #define RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_EXP (1ULL << 17)
449 #define RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_QT (1ULL << 18)
451 #define RTE_CRYPTODEV_FF_DIGEST_ENCRYPTED (1ULL << 19)
453 #define RTE_CRYPTODEV_FF_ASYM_SESSIONLESS (1ULL << 20)
455 #define RTE_CRYPTODEV_FF_SYM_CPU_CRYPTO (1ULL << 21)
457 #define RTE_CRYPTODEV_FF_SYM_SESSIONLESS (1ULL << 22)
459 #define RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATA (1ULL << 23)
461 #define RTE_CRYPTODEV_FF_SYM_RAW_DP (1ULL << 24)
473 extern const char *
475 
477 /* Structure rte_cryptodev_info 8< */
479  const char *driver_name;
480  uint8_t driver_id;
481  struct rte_device *device;
483  uint64_t feature_flags;
498  struct {
499  unsigned max_nb_sessions;
504  } sym;
505 };
506 /* >8 End of structure rte_cryptodev_info. */
507 
508 #define RTE_CRYPTODEV_DETACHED (0)
509 #define RTE_CRYPTODEV_ATTACHED (1)
510 
516 };
517 
519 /* Structure rte_cryptodev_qp_conf 8<*/
521  uint32_t nb_descriptors;
526 };
527 /* >8 End of structure rte_cryptodev_qp_conf. */
528 
538 typedef void (*rte_cryptodev_cb_fn)(uint8_t dev_id,
539  enum rte_cryptodev_event_type event, void *cb_arg);
540 
541 
544  uint64_t enqueued_count;
546  uint64_t dequeued_count;
553 };
554 
555 #define RTE_CRYPTODEV_NAME_MAX_LEN (64)
567 extern int
568 rte_cryptodev_get_dev_id(const char *name);
569 
580 extern const char *
581 rte_cryptodev_name_get(uint8_t dev_id);
582 
590 extern uint8_t
592 
601 extern uint8_t
603 
615 uint8_t
616 rte_cryptodev_devices_get(const char *driver_name, uint8_t *devices,
617  uint8_t nb_devices);
618 /*
619  * Return the NUMA socket to which a device is connected
620  *
621  * @param dev_id
622  * The identifier of the device
623  * @return
624  * The NUMA socket id to which the device is connected or
625  * a default of zero if the socket could not be determined.
626  * -1 if returned is the dev_id value is out of range.
627  */
628 extern int
629 rte_cryptodev_socket_id(uint8_t dev_id);
630 
632 /* Structure rte_cryptodev_config 8< */
634  int socket_id;
635  uint16_t nb_queue_pairs;
637  uint64_t ff_disable;
644 };
645 /* >8 End of structure rte_cryptodev_config. */
646 
661 extern int
662 rte_cryptodev_configure(uint8_t dev_id, struct rte_cryptodev_config *config);
663 
679 extern int
680 rte_cryptodev_start(uint8_t dev_id);
681 
688 extern void
689 rte_cryptodev_stop(uint8_t dev_id);
690 
700 extern int
701 rte_cryptodev_close(uint8_t dev_id);
702 
724 extern int
725 rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
726  const struct rte_cryptodev_qp_conf *qp_conf, int socket_id);
727 
741 __rte_experimental
742 int
743 rte_cryptodev_get_qp_status(uint8_t dev_id, uint16_t queue_pair_id);
744 
752 extern uint16_t
754 
755 
767 extern int
768 rte_cryptodev_stats_get(uint8_t dev_id, struct rte_cryptodev_stats *stats);
769 
775 extern void
777 
791 extern void
792 rte_cryptodev_info_get(uint8_t dev_id, struct rte_cryptodev_info *dev_info);
793 
794 
808 extern int
810  enum rte_cryptodev_event_type event,
811  rte_cryptodev_cb_fn cb_fn, void *cb_arg);
812 
826 extern int
828  enum rte_cryptodev_event_type event,
829  rte_cryptodev_cb_fn cb_fn, void *cb_arg);
830 
831 
832 typedef uint16_t (*dequeue_pkt_burst_t)(void *qp,
833  struct rte_crypto_op **ops, uint16_t nb_ops);
836 typedef uint16_t (*enqueue_pkt_burst_t)(void *qp,
837  struct rte_crypto_op **ops, uint16_t nb_ops);
843 struct rte_cryptodev_callback;
844 
846 TAILQ_HEAD(rte_cryptodev_cb_list, rte_cryptodev_callback);
847 
859  uint64_t feature_flags;
864  uint8_t driver_id;
867  struct rte_cryptodev_cb_list link_intr_cbs;
873  __extension__
874  uint8_t attached : 1;
877 
878 void *
879 rte_cryptodev_get_sec_ctx(uint8_t dev_id);
880 
889  uint8_t dev_id;
891  uint8_t socket_id;
896  __extension__
897  uint8_t dev_started : 1;
902  void **queue_pairs;
904  uint16_t nb_queue_pairs;
907  void *dev_private;
910 
911 extern struct rte_cryptodev *rte_cryptodevs;
948 static inline uint16_t
949 rte_cryptodev_dequeue_burst(uint8_t dev_id, uint16_t qp_id,
950  struct rte_crypto_op **ops, uint16_t nb_ops)
951 {
952  struct rte_cryptodev *dev = &rte_cryptodevs[dev_id];
953 
954  nb_ops = (*dev->dequeue_burst)
955  (dev->data->queue_pairs[qp_id], ops, nb_ops);
956 
957  rte_cryptodev_trace_dequeue_burst(dev_id, qp_id, (void **)ops, nb_ops);
958  return nb_ops;
959 }
960 
992 static inline uint16_t
993 rte_cryptodev_enqueue_burst(uint8_t dev_id, uint16_t qp_id,
994  struct rte_crypto_op **ops, uint16_t nb_ops)
995 {
996  struct rte_cryptodev *dev = &rte_cryptodevs[dev_id];
997 
998  rte_cryptodev_trace_enqueue_burst(dev_id, qp_id, (void **)ops, nb_ops);
999  return (*dev->enqueue_burst)(
1000  dev->data->queue_pairs[qp_id], ops, nb_ops);
1001 }
1002 
1003 
1009  uint64_t opaque_data;
1011  uint16_t nb_drivers;
1013  uint16_t user_data_sz;
1015  __extension__ struct {
1016  void *data;
1017  uint16_t refcnt;
1018  } sess_data[0];
1020 };
1021 
1024  __extension__ void *sess_private_data[0];
1026 };
1027 
1054 __rte_experimental
1055 struct rte_mempool *
1056 rte_cryptodev_sym_session_pool_create(const char *name, uint32_t nb_elts,
1057  uint32_t elt_size, uint32_t cache_size, uint16_t priv_size,
1058  int socket_id);
1059 
1071 
1081 __rte_experimental
1084 
1097 int
1099 
1112 __rte_experimental
1113 int
1115 
1132 int
1134  struct rte_cryptodev_sym_session *sess,
1135  struct rte_crypto_sym_xform *xforms,
1136  struct rte_mempool *mempool);
1137 
1153 __rte_experimental
1154 int
1156  struct rte_cryptodev_asym_session *sess,
1157  struct rte_crypto_asym_xform *xforms,
1158  struct rte_mempool *mempool);
1159 
1174 int
1176  struct rte_cryptodev_sym_session *sess);
1177 
1188 __rte_experimental
1189 int
1191  struct rte_cryptodev_asym_session *sess);
1192 
1200 unsigned int
1202 
1214 __rte_experimental
1215 unsigned int
1217  struct rte_cryptodev_sym_session *sess);
1218 
1225 __rte_experimental
1226 unsigned int
1228 
1240 unsigned int
1242 
1253 __rte_experimental
1254 unsigned int
1256 
1265 int rte_cryptodev_driver_id_get(const char *name);
1266 
1275 const char *rte_cryptodev_driver_name_get(uint8_t driver_id);
1276 
1289 __rte_experimental
1290 int
1292  struct rte_cryptodev_sym_session *sess,
1293  void *data,
1294  uint16_t size);
1295 
1306 __rte_experimental
1307 void *
1309  struct rte_cryptodev_sym_session *sess);
1310 
1323 __rte_experimental
1324 uint32_t
1326  struct rte_cryptodev_sym_session *sess, union rte_crypto_sym_ofs ofs,
1327  struct rte_crypto_sym_vec *vec);
1328 
1338 __rte_experimental
1339 int
1341 
1347  struct rte_cryptodev_sym_session *crypto_sess;
1348  struct rte_crypto_sym_xform *xform;
1349  struct rte_security_session *sec_sess;
1350 };
1351 
1378  void *qp, uint8_t *drv_ctx, struct rte_crypto_sym_vec *vec,
1379  union rte_crypto_sym_ofs ofs, void *user_data[], int *enqueue_status);
1380 
1403  void *qp, uint8_t *drv_ctx, struct rte_crypto_vec *data_vec,
1404  uint16_t n_data_vecs, union rte_crypto_sym_ofs ofs,
1405  struct rte_crypto_va_iova_ptr *iv,
1406  struct rte_crypto_va_iova_ptr *digest,
1407  struct rte_crypto_va_iova_ptr *aad_or_auth_iv,
1408  void *user_data);
1409 
1421 typedef int (*cryptodev_sym_raw_operation_done_t)(void *qp, uint8_t *drv_ctx,
1422  uint32_t n);
1423 
1433 typedef uint32_t (*rte_cryptodev_raw_get_dequeue_count_t)(void *user_data);
1434 
1443 typedef void (*rte_cryptodev_raw_post_dequeue_t)(void *user_data,
1444  uint32_t index, uint8_t is_op_success);
1445 
1484 typedef uint32_t (*cryptodev_sym_raw_dequeue_burst_t)(void *qp,
1485  uint8_t *drv_ctx,
1486  rte_cryptodev_raw_get_dequeue_count_t get_dequeue_count,
1487  rte_cryptodev_raw_post_dequeue_t post_dequeue,
1488  void **out_user_data, uint8_t is_user_data_array,
1489  uint32_t *n_success, int *dequeue_status);
1490 
1514 typedef void * (*cryptodev_sym_raw_dequeue_t)(
1515  void *qp, uint8_t *drv_ctx, int *dequeue_status,
1516  enum rte_crypto_op_status *op_status);
1517 
1524  void *qp_data;
1525 
1527  cryptodev_sym_raw_enqueue_burst_t enqueue_burst;
1530  cryptodev_sym_raw_dequeue_burst_t dequeue_burst;
1532 
1533  /* Driver specific context data */
1534  __extension__ uint8_t drv_ctx_data[];
1535 };
1536 
1560 __rte_experimental
1561 int
1562 rte_cryptodev_configure_raw_dp_ctx(uint8_t dev_id, uint16_t qp_id,
1563  struct rte_crypto_raw_dp_ctx *ctx,
1564  enum rte_crypto_op_sess_type sess_type,
1565  union rte_cryptodev_session_ctx session_ctx,
1566  uint8_t is_update);
1567 
1592 __rte_experimental
1593 uint32_t
1595  struct rte_crypto_sym_vec *vec, union rte_crypto_sym_ofs ofs,
1596  void **user_data, int *enqueue_status);
1597 
1618 __rte_experimental
1619 static __rte_always_inline int
1621  struct rte_crypto_vec *data_vec, uint16_t n_data_vecs,
1622  union rte_crypto_sym_ofs ofs,
1623  struct rte_crypto_va_iova_ptr *iv,
1624  struct rte_crypto_va_iova_ptr *digest,
1625  struct rte_crypto_va_iova_ptr *aad_or_auth_iv,
1626  void *user_data)
1627 {
1628  return (*ctx->enqueue)(ctx->qp_data, ctx->drv_ctx_data, data_vec,
1629  n_data_vecs, ofs, iv, digest, aad_or_auth_iv, user_data);
1630 }
1631 
1642 __rte_experimental
1643 int
1645  uint32_t n);
1646 
1685 __rte_experimental
1686 uint32_t
1688  rte_cryptodev_raw_get_dequeue_count_t get_dequeue_count,
1689  rte_cryptodev_raw_post_dequeue_t post_dequeue,
1690  void **out_user_data, uint8_t is_user_data_array,
1691  uint32_t *n_success, int *dequeue_status);
1692 
1716 __rte_experimental
1717 static __rte_always_inline void *
1719  int *dequeue_status, enum rte_crypto_op_status *op_status)
1720 {
1721  return (*ctx->dequeue)(ctx->qp_data, ctx->drv_ctx_data, dequeue_status,
1722  op_status);
1723 }
1724 
1734 __rte_experimental
1735 int
1737  uint32_t n);
1738 
1739 #ifdef __cplusplus
1740 }
1741 #endif
1742 
1743 #endif /* _RTE_CRYPTODEV_H_ */
#define __rte_cache_aligned
Definition: rte_common.h:405
#define RTE_STD_C11
Definition: rte_common.h:40
#define __rte_always_inline
Definition: rte_common.h:231
rte_crypto_op_sess_type
Definition: rte_crypto.h:62
rte_crypto_op_type
Definition: rte_crypto.h:29
rte_crypto_op_status
Definition: rte_crypto.h:39
rte_crypto_asym_op_type
rte_crypto_asym_xform_type
rte_crypto_auth_algorithm
rte_crypto_sym_xform_type
rte_crypto_aead_algorithm
rte_crypto_cipher_algorithm
static uint16_t rte_cryptodev_dequeue_burst(uint8_t dev_id, uint16_t qp_id, struct rte_crypto_op **ops, uint16_t nb_ops)
int rte_cryptodev_close(uint8_t dev_id)
rte_cryptodev_event_type
@ RTE_CRYPTODEV_EVENT_ERROR
@ RTE_CRYPTODEV_EVENT_UNKNOWN
@ RTE_CRYPTODEV_EVENT_MAX
uint16_t(* enqueue_pkt_burst_t)(void *qp, struct rte_crypto_op **ops, uint16_t nb_ops)
uint8_t rte_cryptodev_devices_get(const char *driver_name, uint8_t *devices, uint8_t nb_devices)
__rte_experimental int rte_cryptodev_get_raw_dp_ctx_size(uint8_t dev_id)
uint8_t rte_cryptodev_count(void)
static uint16_t rte_cryptodev_enqueue_burst(uint8_t dev_id, uint16_t qp_id, struct rte_crypto_op **ops, uint16_t nb_ops)
int rte_cryptodev_start(uint8_t dev_id)
__rte_experimental int rte_cryptodev_sym_session_set_user_data(struct rte_cryptodev_sym_session *sess, void *data, uint16_t size)
static __rte_experimental __rte_always_inline void * rte_cryptodev_raw_dequeue(struct rte_crypto_raw_dp_ctx *ctx, int *dequeue_status, enum rte_crypto_op_status *op_status)
__rte_experimental uint32_t rte_cryptodev_sym_cpu_crypto_process(uint8_t dev_id, struct rte_cryptodev_sym_session *sess, union rte_crypto_sym_ofs ofs, struct rte_crypto_sym_vec *vec)
__rte_experimental unsigned int rte_cryptodev_asym_get_private_session_size(uint8_t dev_id)
__rte_experimental int rte_cryptodev_asym_session_free(struct rte_cryptodev_asym_session *sess)
unsigned int rte_cryptodev_sym_get_private_session_size(uint8_t dev_id)
int rte_cryptodev_get_auth_algo_enum(enum rte_crypto_auth_algorithm *algo_enum, const char *algo_string)
void rte_cryptodev_stop(uint8_t dev_id)
int rte_cryptodev_sym_session_init(uint8_t dev_id, struct rte_cryptodev_sym_session *sess, struct rte_crypto_sym_xform *xforms, struct rte_mempool *mempool)
int rte_cryptodev_callback_unregister(uint8_t dev_id, enum rte_cryptodev_event_type event, rte_cryptodev_cb_fn cb_fn, void *cb_arg)
uint16_t(* dequeue_pkt_burst_t)(void *qp, struct rte_crypto_op **ops, uint16_t nb_ops)
int rte_cryptodev_sym_capability_check_auth(const struct rte_cryptodev_symmetric_capability *capability, uint16_t key_size, uint16_t digest_size, uint16_t iv_size)
int rte_cryptodev_configure(uint8_t dev_id, struct rte_cryptodev_config *config)
int rte_cryptodev_callback_register(uint8_t dev_id, enum rte_cryptodev_event_type event, rte_cryptodev_cb_fn cb_fn, void *cb_arg)
__rte_experimental uint32_t rte_cryptodev_raw_enqueue_burst(struct rte_crypto_raw_dp_ctx *ctx, struct rte_crypto_sym_vec *vec, union rte_crypto_sym_ofs ofs, void **user_data, int *enqueue_status)
uint16_t rte_cryptodev_queue_pair_count(uint8_t dev_id)
void(* rte_cryptodev_cb_fn)(uint8_t dev_id, enum rte_cryptodev_event_type event, void *cb_arg)
const char * rte_cryptodev_get_feature_name(uint64_t flag)
uint32_t(* cryptodev_sym_raw_enqueue_burst_t)(void *qp, uint8_t *drv_ctx, struct rte_crypto_sym_vec *vec, union rte_crypto_sym_ofs ofs, void *user_data[], int *enqueue_status)
void rte_cryptodev_stats_reset(uint8_t dev_id)
unsigned int rte_cryptodev_sym_get_header_session_size(void)
static __rte_experimental __rte_always_inline int rte_cryptodev_raw_enqueue(struct rte_crypto_raw_dp_ctx *ctx, struct rte_crypto_vec *data_vec, uint16_t n_data_vecs, union rte_crypto_sym_ofs ofs, struct rte_crypto_va_iova_ptr *iv, struct rte_crypto_va_iova_ptr *digest, struct rte_crypto_va_iova_ptr *aad_or_auth_iv, void *user_data)
__rte_experimental int rte_cryptodev_configure_raw_dp_ctx(uint8_t dev_id, uint16_t qp_id, struct rte_crypto_raw_dp_ctx *ctx, enum rte_crypto_op_sess_type sess_type, union rte_cryptodev_session_ctx session_ctx, uint8_t is_update)
const char * rte_cryptodev_name_get(uint8_t dev_id)
void(* rte_cryptodev_raw_post_dequeue_t)(void *user_data, uint32_t index, uint8_t is_op_success)
__rte_experimental unsigned int rte_cryptodev_asym_get_header_session_size(void)
__rte_experimental void * rte_cryptodev_sym_session_get_user_data(struct rte_cryptodev_sym_session *sess)
int rte_cryptodev_driver_id_get(const char *name)
int rte_cryptodev_get_dev_id(const char *name)
int rte_cryptodev_sym_session_clear(uint8_t dev_id, struct rte_cryptodev_sym_session *sess)
__rte_experimental uint32_t rte_cryptodev_raw_dequeue_burst(struct rte_crypto_raw_dp_ctx *ctx, rte_cryptodev_raw_get_dequeue_count_t get_dequeue_count, rte_cryptodev_raw_post_dequeue_t post_dequeue, void **out_user_data, uint8_t is_user_data_array, uint32_t *n_success, int *dequeue_status)
int rte_cryptodev_stats_get(uint8_t dev_id, struct rte_cryptodev_stats *stats)
int rte_cryptodev_get_cipher_algo_enum(enum rte_crypto_cipher_algorithm *algo_enum, const char *algo_string)
__rte_experimental int rte_cryptodev_asym_session_clear(uint8_t dev_id, struct rte_cryptodev_asym_session *sess)
uint32_t(* rte_cryptodev_raw_get_dequeue_count_t)(void *user_data)
__rte_experimental int rte_cryptodev_asym_session_init(uint8_t dev_id, struct rte_cryptodev_asym_session *sess, struct rte_crypto_asym_xform *xforms, struct rte_mempool *mempool)
#define RTE_CRYPTODEV_NAME_MAX_LEN
void *(* cryptodev_sym_raw_dequeue_t)(void *qp, uint8_t *drv_ctx, int *dequeue_status, enum rte_crypto_op_status *op_status)
int(* cryptodev_sym_raw_enqueue_t)(void *qp, uint8_t *drv_ctx, struct rte_crypto_vec *data_vec, uint16_t n_data_vecs, union rte_crypto_sym_ofs ofs, struct rte_crypto_va_iova_ptr *iv, struct rte_crypto_va_iova_ptr *digest, struct rte_crypto_va_iova_ptr *aad_or_auth_iv, void *user_data)
int rte_cryptodev_sym_capability_check_aead(const struct rte_cryptodev_symmetric_capability *capability, uint16_t key_size, uint16_t digest_size, uint16_t aad_size, uint16_t iv_size)
__rte_experimental int rte_cryptodev_raw_enqueue_done(struct rte_crypto_raw_dp_ctx *ctx, uint32_t n)
__rte_experimental struct rte_mempool * rte_cryptodev_sym_session_pool_create(const char *name, uint32_t nb_elts, uint32_t elt_size, uint32_t cache_size, uint16_t priv_size, int socket_id)
TAILQ_HEAD(rte_cryptodev_cb_list, rte_cryptodev_callback)
int rte_cryptodev_sym_capability_check_cipher(const struct rte_cryptodev_symmetric_capability *capability, uint16_t key_size, uint16_t iv_size)
uint8_t rte_cryptodev_device_count_by_driver(uint8_t driver_id)
__rte_experimental int rte_cryptodev_asym_xform_capability_check_optype(const struct rte_cryptodev_asymmetric_xform_capability *capability, enum rte_crypto_asym_op_type op_type)
uint32_t(* cryptodev_sym_raw_dequeue_burst_t)(void *qp, uint8_t *drv_ctx, rte_cryptodev_raw_get_dequeue_count_t get_dequeue_count, rte_cryptodev_raw_post_dequeue_t post_dequeue, void **out_user_data, uint8_t is_user_data_array, uint32_t *n_success, int *dequeue_status)
struct rte_cryptodev_sym_session * rte_cryptodev_sym_session_create(struct rte_mempool *mempool)
int rte_cryptodev_get_aead_algo_enum(enum rte_crypto_aead_algorithm *algo_enum, const char *algo_string)
__rte_experimental unsigned int rte_cryptodev_sym_get_existing_header_session_size(struct rte_cryptodev_sym_session *sess)
__rte_experimental struct rte_cryptodev_asym_session * rte_cryptodev_asym_session_create(struct rte_mempool *mempool)
__rte_experimental int rte_cryptodev_get_qp_status(uint8_t dev_id, uint16_t queue_pair_id)
__rte_experimental const struct rte_cryptodev_asymmetric_xform_capability * rte_cryptodev_asym_capability_get(uint8_t dev_id, const struct rte_cryptodev_asym_capability_idx *idx)
__rte_experimental int rte_cryptodev_raw_dequeue_done(struct rte_crypto_raw_dp_ctx *ctx, uint32_t n)
int rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id, const struct rte_cryptodev_qp_conf *qp_conf, int socket_id)
__rte_experimental int rte_cryptodev_asym_xform_capability_check_modlen(const struct rte_cryptodev_asymmetric_xform_capability *capability, uint16_t modlen)
int(* cryptodev_sym_raw_operation_done_t)(void *qp, uint8_t *drv_ctx, uint32_t n)
const struct rte_cryptodev_symmetric_capability * rte_cryptodev_sym_capability_get(uint8_t dev_id, const struct rte_cryptodev_sym_capability_idx *idx)
void rte_cryptodev_info_get(uint8_t dev_id, struct rte_cryptodev_info *dev_info)
__rte_experimental int rte_cryptodev_asym_get_xform_enum(enum rte_crypto_asym_xform_type *xform_enum, const char *xform_string)
int rte_cryptodev_sym_session_free(struct rte_cryptodev_sym_session *sess)
const char * rte_cryptodev_driver_name_get(uint8_t driver_id)
struct rte_cryptodev * rte_cryptodevs
enum rte_crypto_asym_xform_type type
__extension__ void * sess_private_data[0]
struct rte_crypto_param_range modlen
enum rte_crypto_asym_xform_type xform_type
enum rte_crypto_op_type op
struct rte_cryptodev_symmetric_capability sym
struct rte_cryptodev_asymmetric_capability asym
struct rte_mempool * session_pool
__extension__ uint8_t dev_started
char name[RTE_CRYPTODEV_NAME_MAX_LEN]
unsigned max_nb_queue_pairs
struct rte_device * device
uint16_t min_mbuf_headroom_req
const struct rte_cryptodev_capabilities * capabilities
uint16_t min_mbuf_tailroom_req
const char * driver_name
unsigned max_nb_sessions
struct rte_mempool * mp_session_private
struct rte_mempool * mp_session
uint64_t enqueue_err_count
uint64_t dequeue_err_count
__extension__ struct rte_cryptodev_sym_session::@146 sess_data[0]
enum rte_crypto_auth_algorithm algo
struct rte_cryptodev_symmetric_capability::@135::@138 cipher
struct rte_crypto_param_range iv_size
struct rte_crypto_param_range digest_size
struct rte_cryptodev_symmetric_capability::@135::@137 auth
struct rte_crypto_param_range aad_size
struct rte_crypto_param_range key_size
enum rte_crypto_sym_xform_type xform_type
uint8_t driver_id
void * security_ctx
enqueue_pkt_burst_t enqueue_burst
struct rte_cryptodev_data * data
struct rte_device * device
__extension__ uint8_t attached
struct rte_cryptodev_ops * dev_ops
uint64_t feature_flags
dequeue_pkt_burst_t dequeue_burst
struct rte_cryptodev_cb_list link_intr_cbs
char name[RTE_MEMZONE_NAMESIZE]
Definition: rte_mempool.h:214
uint32_t cache_size
Definition: rte_mempool.h:225
uint32_t elt_size
Definition: rte_mempool.h:228