DPDK  20.05.0-rc0
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 extern const char **rte_cyptodev_names;
28 
29 /* Logging Macros */
30 
31 #define CDEV_LOG_ERR(...) \
32  RTE_LOG(ERR, CRYPTODEV, \
33  RTE_FMT("%s() line %u: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
34  __func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__,)))
35 
36 #define CDEV_LOG_INFO(...) \
37  RTE_LOG(INFO, CRYPTODEV, \
38  RTE_FMT(RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
39  RTE_FMT_TAIL(__VA_ARGS__,)))
40 
41 #define CDEV_LOG_DEBUG(...) \
42  RTE_LOG(DEBUG, CRYPTODEV, \
43  RTE_FMT("%s() line %u: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
44  __func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__,)))
45 
46 #define CDEV_PMD_TRACE(...) \
47  RTE_LOG(DEBUG, CRYPTODEV, \
48  RTE_FMT("[%s] %s: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
49  dev, __func__, RTE_FMT_TAIL(__VA_ARGS__,)))
50 
64 #define rte_crypto_op_ctod_offset(c, t, o) \
65  ((t)((char *)(c) + (o)))
66 
78 #define rte_crypto_op_ctophys_offset(c, o) \
79  (rte_iova_t)((c)->phys_addr + (o))
80 
85  uint16_t min;
86  uint16_t max;
87  uint16_t increment;
93 };
94 
102  union {
103  struct {
106  uint16_t block_size;
116  } auth;
118  struct {
121  uint16_t block_size;
127  } cipher;
129  struct {
132  uint16_t block_size;
142  } aead;
143  };
144 };
145 
154  uint32_t op_types;
157  __extension__
158  union {
163  };
164 };
165 
172 };
173 
174 
181  union {
186  };
187 };
188 
191  enum rte_crypto_sym_xform_type type;
192  union {
193  enum rte_crypto_cipher_algorithm cipher;
194  enum rte_crypto_auth_algorithm auth;
195  enum rte_crypto_aead_algorithm aead;
196  } algo;
197 };
198 
207 };
208 
220 rte_cryptodev_sym_capability_get(uint8_t dev_id,
221  const struct rte_cryptodev_sym_capability_idx *idx);
222 
233 __rte_experimental
235 rte_cryptodev_asym_capability_get(uint8_t dev_id,
236  const struct rte_cryptodev_asym_capability_idx *idx);
237 
250 int
252  const struct rte_cryptodev_symmetric_capability *capability,
253  uint16_t key_size, uint16_t iv_size);
254 
268 int
270  const struct rte_cryptodev_symmetric_capability *capability,
271  uint16_t key_size, uint16_t digest_size, uint16_t iv_size);
272 
287 int
289  const struct rte_cryptodev_symmetric_capability *capability,
290  uint16_t key_size, uint16_t digest_size, uint16_t aad_size,
291  uint16_t iv_size);
292 
303 __rte_experimental
304 int
306  const struct rte_cryptodev_asymmetric_xform_capability *capability,
307  enum rte_crypto_asym_op_type op_type);
308 
319 __rte_experimental
320 int
322  const struct rte_cryptodev_asymmetric_xform_capability *capability,
323  uint16_t modlen);
324 
336 int
338  const char *algo_string);
339 
351 int
353  const char *algo_string);
354 
366 int
368  const char *algo_string);
369 
381 __rte_experimental
382 int
384  const char *xform_string);
385 
386 
388 #define RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST() \
389  { RTE_CRYPTO_OP_TYPE_UNDEFINED }
390 
391 
400 #define RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO (1ULL << 0)
401 
402 #define RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO (1ULL << 1)
403 
404 #define RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING (1ULL << 2)
405 
406 #define RTE_CRYPTODEV_FF_CPU_SSE (1ULL << 3)
407 
408 #define RTE_CRYPTODEV_FF_CPU_AVX (1ULL << 4)
409 
410 #define RTE_CRYPTODEV_FF_CPU_AVX2 (1ULL << 5)
411 
412 #define RTE_CRYPTODEV_FF_CPU_AESNI (1ULL << 6)
413 
414 #define RTE_CRYPTODEV_FF_HW_ACCELERATED (1ULL << 7)
415 
418 #define RTE_CRYPTODEV_FF_CPU_AVX512 (1ULL << 8)
419 
420 #define RTE_CRYPTODEV_FF_IN_PLACE_SGL (1ULL << 9)
421 
424 #define RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT (1ULL << 10)
425 
428 #define RTE_CRYPTODEV_FF_OOP_SGL_IN_LB_OUT (1ULL << 11)
429 
433 #define RTE_CRYPTODEV_FF_OOP_LB_IN_SGL_OUT (1ULL << 12)
434 
437 #define RTE_CRYPTODEV_FF_OOP_LB_IN_LB_OUT (1ULL << 13)
438 
439 #define RTE_CRYPTODEV_FF_CPU_NEON (1ULL << 14)
440 
441 #define RTE_CRYPTODEV_FF_CPU_ARM_CE (1ULL << 15)
442 
443 #define RTE_CRYPTODEV_FF_SECURITY (1ULL << 16)
444 
445 #define RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_EXP (1ULL << 17)
446 
447 #define RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_QT (1ULL << 18)
448 
449 #define RTE_CRYPTODEV_FF_DIGEST_ENCRYPTED (1ULL << 19)
450 
451 #define RTE_CRYPTODEV_FF_ASYM_SESSIONLESS (1ULL << 20)
452 
453 #define RTE_CRYPTODEV_FF_SYM_CPU_CRYPTO (1ULL << 21)
454 
466 extern const char *
467 rte_cryptodev_get_feature_name(uint64_t flag);
468 
471  const char *driver_name;
472  uint8_t driver_id;
473  struct rte_device *device;
475  uint64_t feature_flags;
490  struct {
491  unsigned max_nb_sessions;
496  } sym;
497 };
498 
499 #define RTE_CRYPTODEV_DETACHED (0)
500 #define RTE_CRYPTODEV_ATTACHED (1)
501 
507 };
508 
511  uint32_t nb_descriptors;
516 };
517 
527 typedef void (*rte_cryptodev_cb_fn)(uint8_t dev_id,
528  enum rte_cryptodev_event_type event, void *cb_arg);
529 
530 
533  uint64_t enqueued_count;
535  uint64_t dequeued_count;
542 };
543 
544 #define RTE_CRYPTODEV_NAME_MAX_LEN (64)
545 
556 extern int
557 rte_cryptodev_get_dev_id(const char *name);
558 
569 extern const char *
570 rte_cryptodev_name_get(uint8_t dev_id);
571 
579 extern uint8_t
580 rte_cryptodev_count(void);
581 
590 extern uint8_t
591 rte_cryptodev_device_count_by_driver(uint8_t driver_id);
592 
604 uint8_t
605 rte_cryptodev_devices_get(const char *driver_name, uint8_t *devices,
606  uint8_t nb_devices);
607 /*
608  * Return the NUMA socket to which a device is connected
609  *
610  * @param dev_id
611  * The identifier of the device
612  * @return
613  * The NUMA socket id to which the device is connected or
614  * a default of zero if the socket could not be determined.
615  * -1 if returned is the dev_id value is out of range.
616  */
617 extern int
618 rte_cryptodev_socket_id(uint8_t dev_id);
619 
622  int socket_id;
623  uint16_t nb_queue_pairs;
625  uint64_t ff_disable;
632 };
633 
648 extern int
649 rte_cryptodev_configure(uint8_t dev_id, struct rte_cryptodev_config *config);
650 
666 extern int
667 rte_cryptodev_start(uint8_t dev_id);
668 
675 extern void
676 rte_cryptodev_stop(uint8_t dev_id);
677 
687 extern int
688 rte_cryptodev_close(uint8_t dev_id);
689 
711 extern int
712 rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
713  const struct rte_cryptodev_qp_conf *qp_conf, int socket_id);
714 
722 extern uint16_t
723 rte_cryptodev_queue_pair_count(uint8_t dev_id);
724 
725 
737 extern int
738 rte_cryptodev_stats_get(uint8_t dev_id, struct rte_cryptodev_stats *stats);
739 
745 extern void
746 rte_cryptodev_stats_reset(uint8_t dev_id);
747 
761 extern void
762 rte_cryptodev_info_get(uint8_t dev_id, struct rte_cryptodev_info *dev_info);
763 
764 
778 extern int
779 rte_cryptodev_callback_register(uint8_t dev_id,
780  enum rte_cryptodev_event_type event,
781  rte_cryptodev_cb_fn cb_fn, void *cb_arg);
782 
796 extern int
797 rte_cryptodev_callback_unregister(uint8_t dev_id,
798  enum rte_cryptodev_event_type event,
799  rte_cryptodev_cb_fn cb_fn, void *cb_arg);
800 
801 
802 typedef uint16_t (*dequeue_pkt_burst_t)(void *qp,
803  struct rte_crypto_op **ops, uint16_t nb_ops);
806 typedef uint16_t (*enqueue_pkt_burst_t)(void *qp,
807  struct rte_crypto_op **ops, uint16_t nb_ops);
813 struct rte_cryptodev_callback;
814 
816 TAILQ_HEAD(rte_cryptodev_cb_list, rte_cryptodev_callback);
817 
829  uint64_t feature_flags;
834  uint8_t driver_id;
837  struct rte_cryptodev_cb_list link_intr_cbs;
843  __extension__
844  uint8_t attached : 1;
847 
848 void *
849 rte_cryptodev_get_sec_ctx(uint8_t dev_id);
850 
859  uint8_t dev_id;
861  uint8_t socket_id;
866  __extension__
867  uint8_t dev_started : 1;
872  void **queue_pairs;
874  uint16_t nb_queue_pairs;
877  void *dev_private;
880 
881 extern struct rte_cryptodev *rte_cryptodevs;
918 static inline uint16_t
919 rte_cryptodev_dequeue_burst(uint8_t dev_id, uint16_t qp_id,
920  struct rte_crypto_op **ops, uint16_t nb_ops)
921 {
922  struct rte_cryptodev *dev = &rte_cryptodevs[dev_id];
923 
924  nb_ops = (*dev->dequeue_burst)
925  (dev->data->queue_pairs[qp_id], ops, nb_ops);
926 
927  return nb_ops;
928 }
929 
961 static inline uint16_t
962 rte_cryptodev_enqueue_burst(uint8_t dev_id, uint16_t qp_id,
963  struct rte_crypto_op **ops, uint16_t nb_ops)
964 {
965  struct rte_cryptodev *dev = &rte_cryptodevs[dev_id];
966 
967  return (*dev->enqueue_burst)(
968  dev->data->queue_pairs[qp_id], ops, nb_ops);
969 }
970 
971 
977  uint64_t opaque_data;
979  uint16_t nb_drivers;
981  uint16_t user_data_sz;
983  __extension__ struct {
984  void *data;
985  uint16_t refcnt;
986  } sess_data[0];
988 };
989 
992  __extension__ void *sess_private_data[0];
994 };
995 
1022 __rte_experimental
1023 struct rte_mempool *
1024 rte_cryptodev_sym_session_pool_create(const char *name, uint32_t nb_elts,
1025  uint32_t elt_size, uint32_t cache_size, uint16_t priv_size,
1026  int socket_id);
1027 
1039 
1049 __rte_experimental
1052 
1065 int
1067 
1080 __rte_experimental
1081 int
1083 
1100 int
1101 rte_cryptodev_sym_session_init(uint8_t dev_id,
1102  struct rte_cryptodev_sym_session *sess,
1103  struct rte_crypto_sym_xform *xforms,
1104  struct rte_mempool *mempool);
1105 
1121 __rte_experimental
1122 int
1123 rte_cryptodev_asym_session_init(uint8_t dev_id,
1124  struct rte_cryptodev_asym_session *sess,
1125  struct rte_crypto_asym_xform *xforms,
1126  struct rte_mempool *mempool);
1127 
1142 int
1143 rte_cryptodev_sym_session_clear(uint8_t dev_id,
1144  struct rte_cryptodev_sym_session *sess);
1145 
1156 __rte_experimental
1157 int
1158 rte_cryptodev_asym_session_clear(uint8_t dev_id,
1159  struct rte_cryptodev_asym_session *sess);
1160 
1168 unsigned int
1170 
1182 __rte_experimental
1183 unsigned int
1185  struct rte_cryptodev_sym_session *sess);
1186 
1193 __rte_experimental
1194 unsigned int
1196 
1208 unsigned int
1210 
1221 __rte_experimental
1222 unsigned int
1224 
1233 int rte_cryptodev_driver_id_get(const char *name);
1234 
1243 const char *rte_cryptodev_driver_name_get(uint8_t driver_id);
1244 
1257 __rte_experimental
1258 int
1260  struct rte_cryptodev_sym_session *sess,
1261  void *data,
1262  uint16_t size);
1263 
1274 __rte_experimental
1275 void *
1277  struct rte_cryptodev_sym_session *sess);
1278 
1291 __rte_experimental
1292 uint32_t
1294  struct rte_cryptodev_sym_session *sess, union rte_crypto_sym_ofs ofs,
1295  struct rte_crypto_sym_vec *vec);
1296 
1297 #ifdef __cplusplus
1298 }
1299 #endif
1300 
1301 #endif /* _RTE_CRYPTODEV_H_ */
rte_cryptodev_devices_get
uint8_t rte_cryptodev_devices_get(const char *driver_name, uint8_t *devices, uint8_t nb_devices)
rte_cryptodev_dequeue_burst
static uint16_t rte_cryptodev_dequeue_burst(uint8_t dev_id, uint16_t qp_id, struct rte_crypto_op **ops, uint16_t nb_ops)
Definition: rte_cryptodev.h:919
rte_cryptodev_info
Definition: rte_cryptodev.h:470
rte_cryptodev_data::name
char name[RTE_CRYPTODEV_NAME_MAX_LEN]
Definition: rte_cryptodev.h:863
rte_cryptodev_info::min_mbuf_headroom_req
uint16_t min_mbuf_headroom_req
Definition: rte_cryptodev.h:484
rte_cryptodev_stats::enqueued_count
uint64_t enqueued_count
Definition: rte_cryptodev.h:533
rte_cryptodev_asym_session_init
__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)
rte_cryptodev_info::max_nb_queue_pairs
unsigned max_nb_queue_pairs
Definition: rte_cryptodev.h:481
rte_crypto_param_range::increment
uint16_t increment
Definition: rte_cryptodev.h:87
rte_crypto_cipher_algorithm
rte_crypto_cipher_algorithm
Definition: rte_crypto_sym.h:91
rte_cryptodev_asym_session_free
__rte_experimental int rte_cryptodev_asym_session_free(struct rte_cryptodev_asym_session *sess)
rte_crypto_sym_ofs
Definition: rte_crypto_sym.h:80
rte_cryptodev_capabilities
Definition: rte_cryptodev.h:176
rte_cryptodev_enqueue_burst
static uint16_t rte_cryptodev_enqueue_burst(uint8_t dev_id, uint16_t qp_id, struct rte_crypto_op **ops, uint16_t nb_ops)
Definition: rte_cryptodev.h:962
rte_cryptodev_sym_capability_idx
Definition: rte_cryptodev.h:190
rte_cryptodev_qp_conf::mp_session_private
struct rte_mempool * mp_session_private
Definition: rte_cryptodev.h:514
rte_cryptodev::data
struct rte_cryptodev_data * data
Definition: rte_cryptodev.h:825
rte_crypto.h
rte_cryptodev
Definition: rte_cryptodev.h:819
rte_cryptodev_data::dev_started
__extension__ uint8_t dev_started
Definition: rte_cryptodev.h:867
rte_cryptodev_driver_id_get
int rte_cryptodev_driver_id_get(const char *name)
rte_cryptodev_info_get
void rte_cryptodev_info_get(uint8_t dev_id, struct rte_cryptodev_info *dev_info)
rte_mempool::name
char name[RTE_MEMZONE_NAMESIZE]
Definition: rte_mempool.h:222
rte_cryptodev_asym_capability_idx::type
enum rte_crypto_asym_xform_type type
Definition: rte_cryptodev.h:205
rte_cryptodev_asymmetric_xform_capability::op_types
uint32_t op_types
Definition: rte_cryptodev.h:154
rte_cryptodev_sym_capability_get
const struct rte_cryptodev_symmetric_capability * rte_cryptodev_sym_capability_get(uint8_t dev_id, const struct rte_cryptodev_sym_capability_idx *idx)
RTE_CRYPTODEV_EVENT_MAX
Definition: rte_cryptodev.h:506
rte_cryptodev_symmetric_capability::key_size
struct rte_crypto_param_range key_size
Definition: rte_cryptodev.h:108
rte_cryptodev_asym_xform_capability_check_optype
__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)
rte_cryptodev_symmetric_capability::digest_size
struct rte_crypto_param_range digest_size
Definition: rte_cryptodev.h:110
RTE_CRYPTODEV_EVENT_ERROR
Definition: rte_cryptodev.h:505
rte_cryptodev_sym_session_pool_create
__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)
rte_cryptodev_stop
void rte_cryptodev_stop(uint8_t dev_id)
RTE_CRYPTODEV_EVENT_UNKNOWN
Definition: rte_cryptodev.h:504
rte_cryptodev_callback_unregister
int rte_cryptodev_callback_unregister(uint8_t dev_id, enum rte_cryptodev_event_type event, rte_cryptodev_cb_fn cb_fn, void *cb_arg)
rte_cryptodev_sym_session::nb_drivers
uint16_t nb_drivers
Definition: rte_cryptodev.h:979
rte_cryptodev_sym_capability_check_cipher
int rte_cryptodev_sym_capability_check_cipher(const struct rte_cryptodev_symmetric_capability *capability, uint16_t key_size, uint16_t iv_size)
rte_cryptodev_capabilities::asym
struct rte_cryptodev_asymmetric_capability asym
Definition: rte_cryptodev.h:184
dequeue_pkt_burst_t
uint16_t(* dequeue_pkt_burst_t)(void *qp, struct rte_crypto_op **ops, uint16_t nb_ops)
Definition: rte_cryptodev.h:802
rte_cryptodev_symmetric_capability::iv_size
struct rte_crypto_param_range iv_size
Definition: rte_cryptodev.h:114
rte_cryptodev_sym_cpu_crypto_process
__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_CRYPTODEV_NAME_MAX_LEN
#define RTE_CRYPTODEV_NAME_MAX_LEN
Definition: rte_cryptodev.h:544
rte_cryptodev_callback_register
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_cryptodev_symmetric_capability::auth
struct rte_cryptodev_symmetric_capability::@121::@123 auth
rte_cryptodev_queue_pair_setup
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_cryptodev_sym_session::user_data_sz
uint16_t user_data_sz
Definition: rte_cryptodev.h:981
rte_cryptodev_config::ff_disable
uint64_t ff_disable
Definition: rte_cryptodev.h:625
rte_cryptodev_asym_capability_get
__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_cryptodev_qp_conf
Definition: rte_cryptodev.h:510
rte_cryptodev_asymmetric_xform_capability::xform_type
enum rte_crypto_asym_xform_type xform_type
Definition: rte_cryptodev.h:151
__rte_cache_aligned
#define __rte_cache_aligned
Definition: rte_common.h:367
rte_crypto_op
Definition: rte_crypto.h:78
rte_cryptodev_sym_session_set_user_data
__rte_experimental int rte_cryptodev_sym_session_set_user_data(struct rte_cryptodev_sym_session *sess, void *data, uint16_t size)
rte_cryptodev::enqueue_burst
enqueue_pkt_burst_t enqueue_burst
Definition: rte_cryptodev.h:822
rte_cryptodev_stats::dequeue_err_count
uint64_t dequeue_err_count
Definition: rte_cryptodev.h:540
rte_cryptodev::dequeue_burst
dequeue_pkt_burst_t dequeue_burst
Definition: rte_cryptodev.h:820
rte_crypto_asym_op_type
rte_crypto_asym_op_type
Definition: rte_crypto_asym.h:104
rte_crypto_asym_xform_type
rte_crypto_asym_xform_type
Definition: rte_crypto_asym.h:60
rte_crypto_param_range::max
uint16_t max
Definition: rte_cryptodev.h:86
rte_cryptodev_sym_session::sess_data
__extension__ struct rte_cryptodev_sym_session::@132 sess_data[0]
rte_cryptodev_info::min_mbuf_tailroom_req
uint16_t min_mbuf_tailroom_req
Definition: rte_cryptodev.h:487
rte_cryptodev_capabilities::op
enum rte_crypto_op_type op
Definition: rte_cryptodev.h:177
rte_cryptodev_asym_get_private_session_size
__rte_experimental unsigned int rte_cryptodev_asym_get_private_session_size(uint8_t dev_id)
rte_cryptodev_info::device
struct rte_device * device
Definition: rte_cryptodev.h:473
rte_cryptodev_asymmetric_xform_capability
Definition: rte_cryptodev.h:150
rte_cryptodev_data::dev_private
void * dev_private
Definition: rte_cryptodev.h:877
rte_crypto_sym_vec
Definition: rte_crypto_sym.h:57
rte_cryptodev_driver_name_get
const char * rte_cryptodev_driver_name_get(uint8_t driver_id)
rte_cryptodev_sym_session_clear
int rte_cryptodev_sym_session_clear(uint8_t dev_id, struct rte_cryptodev_sym_session *sess)
rte_cryptodev_sym_session_free
int rte_cryptodev_sym_session_free(struct rte_cryptodev_sym_session *sess)
rte_cryptodev_info::feature_flags
uint64_t feature_flags
Definition: rte_cryptodev.h:475
rte_cryptodev_asym_get_xform_enum
__rte_experimental int rte_cryptodev_asym_get_xform_enum(enum rte_crypto_asym_xform_type *xform_enum, const char *xform_string)
rte_crypto_op_type
rte_crypto_op_type
Definition: rte_crypto.h:29
rte_cryptodev_configure
int rte_cryptodev_configure(uint8_t dev_id, struct rte_cryptodev_config *config)
rte_cryptodev_cb_fn
void(* rte_cryptodev_cb_fn)(uint8_t dev_id, enum rte_cryptodev_event_type event, void *cb_arg)
Definition: rte_cryptodev.h:527
rte_cryptodev_event_type
rte_cryptodev_event_type
Definition: rte_cryptodev.h:503
rte_cryptodev_asym_session_create
__rte_experimental struct rte_cryptodev_asym_session * rte_cryptodev_asym_session_create(struct rte_mempool *mempool)
rte_crypto_aead_algorithm
rte_crypto_aead_algorithm
Definition: rte_crypto_sym.h:407
rte_cryptodev_stats::dequeued_count
uint64_t dequeued_count
Definition: rte_cryptodev.h:535
rte_common.h
rte_cryptodev_symmetric_capability::block_size
uint16_t block_size
Definition: rte_cryptodev.h:106
rte_cryptodev_sym_get_private_session_size
unsigned int rte_cryptodev_sym_get_private_session_size(uint8_t dev_id)
rte_cryptodev_sym_session_create
struct rte_cryptodev_sym_session * rte_cryptodev_sym_session_create(struct rte_mempool *mempool)
rte_cryptodev_data::dev_id
uint8_t dev_id
Definition: rte_cryptodev.h:859
enqueue_pkt_burst_t
uint16_t(* enqueue_pkt_burst_t)(void *qp, struct rte_crypto_op **ops, uint16_t nb_ops)
Definition: rte_cryptodev.h:806
rte_cryptodev_close
int rte_cryptodev_close(uint8_t dev_id)
rte_cryptodev_sym_session_init
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)
rte_cryptodev_asym_session_clear
__rte_experimental int rte_cryptodev_asym_session_clear(uint8_t dev_id, struct rte_cryptodev_asym_session *sess)
rte_cryptodev::dev_ops
struct rte_cryptodev_ops * dev_ops
Definition: rte_cryptodev.h:827
rte_cryptodev_asym_capability_idx
Definition: rte_cryptodev.h:204
rte_cryptodev::link_intr_cbs
struct rte_cryptodev_cb_list link_intr_cbs
Definition: rte_cryptodev.h:837
rte_cryptodev_sym_capability_check_aead
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_cryptodev_start
int rte_cryptodev_start(uint8_t dev_id)
rte_cryptodev_asym_session
Definition: rte_cryptodev.h:991
rte_cryptodev_sym_get_existing_header_session_size
__rte_experimental unsigned int rte_cryptodev_sym_get_existing_header_session_size(struct rte_cryptodev_sym_session *sess)
rte_crypto_sym_xform
Definition: rte_crypto_sym.h:501
rte_cryptodev_stats_get
int rte_cryptodev_stats_get(uint8_t dev_id, struct rte_cryptodev_stats *stats)
rte_cryptodev_data::socket_id
uint8_t socket_id
Definition: rte_cryptodev.h:861
rte_mempool
Definition: rte_mempool.h:216
TAILQ_HEAD
TAILQ_HEAD(rte_cryptodev_cb_list, rte_cryptodev_callback)
rte_cryptodev::device
struct rte_device * device
Definition: rte_cryptodev.h:831
rte_cryptodev_config::socket_id
int socket_id
Definition: rte_cryptodev.h:622
rte_cryptodev_stats::enqueue_err_count
uint64_t enqueue_err_count
Definition: rte_cryptodev.h:538
rte_cryptodev::security_ctx
void * security_ctx
Definition: rte_cryptodev.h:840
RTE_STD_C11
#define RTE_STD_C11
Definition: rte_common.h:40
rte_cryptodev_sym_session_get_user_data
__rte_experimental void * rte_cryptodev_sym_session_get_user_data(struct rte_cryptodev_sym_session *sess)
rte_cryptodev::attached
__extension__ uint8_t attached
Definition: rte_cryptodev.h:844
rte_cryptodev_data::queue_pairs
void ** queue_pairs
Definition: rte_cryptodev.h:872
rte_cryptodev_sym_session
Definition: rte_cryptodev.h:976
rte_crypto_sym_xform_type
rte_crypto_sym_xform_type
Definition: rte_crypto_sym.h:485
rte_cryptodev_asymmetric_xform_capability::modlen
struct rte_crypto_param_range modlen
Definition: rte_cryptodev.h:159
rte_cryptodev_config::nb_queue_pairs
uint16_t nb_queue_pairs
Definition: rte_cryptodev.h:623
rte_cryptodev_device_count_by_driver
uint8_t rte_cryptodev_device_count_by_driver(uint8_t driver_id)
rte_cryptodev::feature_flags
uint64_t feature_flags
Definition: rte_cryptodev.h:829
rte_cryptodev_name_get
const char * rte_cryptodev_name_get(uint8_t dev_id)
rte_cryptodev_get_dev_id
int rte_cryptodev_get_dev_id(const char *name)
rte_kvargs.h
rte_crypto_param_range
Definition: rte_cryptodev.h:84
rte_cryptodev_info::driver_id
uint8_t driver_id
Definition: rte_cryptodev.h:472
rte_cryptodev_stats
Definition: rte_cryptodev.h:532
rte_cryptodev_info::driver_name
const char * driver_name
Definition: rte_cryptodev.h:471
rte_crypto_auth_algorithm
rte_crypto_auth_algorithm
Definition: rte_crypto_sym.h:250
rte_cryptodev_sym_session::opaque_data
uint64_t opaque_data
Definition: rte_cryptodev.h:977
rte_cryptodev_data::session_pool
struct rte_mempool * session_pool
Definition: rte_cryptodev.h:870
rte_cryptodev_asym_xform_capability_check_modlen
__rte_experimental int rte_cryptodev_asym_xform_capability_check_modlen(const struct rte_cryptodev_asymmetric_xform_capability *capability, uint16_t modlen)
rte_cryptodev_symmetric_capability::algo
enum rte_crypto_auth_algorithm algo
Definition: rte_cryptodev.h:104
rte_cryptodevs
struct rte_cryptodev * rte_cryptodevs
rte_cryptodev_count
uint8_t rte_cryptodev_count(void)
rte_cryptodev_data::nb_queue_pairs
uint16_t nb_queue_pairs
Definition: rte_cryptodev.h:874
rte_cryptodev_stats_reset
void rte_cryptodev_stats_reset(uint8_t dev_id)
rte_cryptodev_symmetric_capability::aad_size
struct rte_crypto_param_range aad_size
Definition: rte_cryptodev.h:112
rte_cryptodev_asym_get_header_session_size
__rte_experimental unsigned int rte_cryptodev_asym_get_header_session_size(void)
rte_crypto_param_range::min
uint16_t min
Definition: rte_cryptodev.h:85
rte_cryptodev_ops
Definition: rte_cryptodev_pmd.h:321
rte_cryptodev_qp_conf::mp_session
struct rte_mempool * mp_session
Definition: rte_cryptodev.h:512
rte_device
Definition: rte_dev.h:104
rte_mempool::cache_size
uint32_t cache_size
Definition: rte_mempool.h:233
rte_cryptodev_get_feature_name
const char * rte_cryptodev_get_feature_name(uint64_t flag)
rte_cryptodev_get_aead_algo_enum
int rte_cryptodev_get_aead_algo_enum(enum rte_crypto_aead_algorithm *algo_enum, const char *algo_string)
rte_cryptodev_sym_get_header_session_size
unsigned int rte_cryptodev_sym_get_header_session_size(void)
rte_cryptodev_qp_conf::nb_descriptors
uint32_t nb_descriptors
Definition: rte_cryptodev.h:511
rte_cryptodev_capabilities::sym
struct rte_cryptodev_symmetric_capability sym
Definition: rte_cryptodev.h:182
rte_cryptodev_asymmetric_capability
Definition: rte_cryptodev.h:170
rte_cryptodev_get_cipher_algo_enum
int rte_cryptodev_get_cipher_algo_enum(enum rte_crypto_cipher_algorithm *algo_enum, const char *algo_string)
rte_cryptodev_config
Definition: rte_cryptodev.h:621
rte_cryptodev_info::capabilities
const struct rte_cryptodev_capabilities * capabilities
Definition: rte_cryptodev.h:478
rte_cryptodev_symmetric_capability::xform_type
enum rte_crypto_sym_xform_type xform_type
Definition: rte_cryptodev.h:99
rte_mempool::socket_id
int socket_id
Definition: rte_mempool.h:231
rte_cryptodev_info::max_nb_sessions
unsigned max_nb_sessions
Definition: rte_cryptodev.h:491
rte_cryptodev_sym_capability_check_auth
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)
rte_cryptodev_symmetric_capability
Definition: rte_cryptodev.h:98
rte_crypto_asym_xform
Definition: rte_crypto_asym.h:400
rte_cryptodev_data
Definition: rte_cryptodev.h:858
rte_mempool::elt_size
uint32_t elt_size
Definition: rte_mempool.h:236
rte_cryptodev_symmetric_capability::cipher
struct rte_cryptodev_symmetric_capability::@121::@124 cipher
rte_cryptodev::driver_id
uint8_t driver_id
Definition: rte_cryptodev.h:834
rte_cryptodev_asym_session::sess_private_data
__extension__ void * sess_private_data[0]
Definition: rte_cryptodev.h:992
rte_dev.h
rte_cryptodev_get_auth_algo_enum
int rte_cryptodev_get_auth_algo_enum(enum rte_crypto_auth_algorithm *algo_enum, const char *algo_string)
rte_cryptodev_queue_pair_count
uint16_t rte_cryptodev_queue_pair_count(uint8_t dev_id)