1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright(c) 2018 Intel Corporation 3 */ 4 5 #ifndef _INCLUDE_SYM_C_H_ 6 #define _INCLUDE_SYM_C_H_ 7 8 #include <stdint.h> 9 #include <sys/queue.h> 10 11 #include <rte_cryptodev.h> 12 13 #include "common.h" 14 15 struct cryptodev { 16 TAILQ_ENTRY(cryptodev) node; 17 char name[NAME_SIZE]; 18 uint16_t dev_id; 19 uint32_t n_queues; 20 struct rte_mempool *mp_create; 21 struct rte_mempool *mp_init; 22 }; 23 24 TAILQ_HEAD(cryptodev_list, cryptodev); 25 26 int 27 cryptodev_init(void); 28 29 struct cryptodev * 30 cryptodev_find(const char *name); 31 32 struct cryptodev * 33 cryptodev_next(struct cryptodev *cryptodev); 34 35 struct cryptodev_params { 36 const char *dev_name; 37 uint32_t dev_id; /**< Valid only when *dev_name* is NULL. */ 38 uint32_t n_queues; 39 uint32_t queue_size; 40 uint32_t session_pool_size; 41 }; 42 43 struct cryptodev * 44 cryptodev_create(const char *name, struct cryptodev_params *params); 45 46 #endif 47