xref: /dpdk/examples/ip_pipeline/cryptodev.h (revision 1edccebcccdbe600dc0a3a418fae68336648a87e)
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 };
21 
22 TAILQ_HEAD(cryptodev_list, cryptodev);
23 
24 int
25 cryptodev_init(void);
26 
27 struct cryptodev *
28 cryptodev_find(const char *name);
29 
30 struct cryptodev *
31 cryptodev_next(struct cryptodev *cryptodev);
32 
33 struct cryptodev_params {
34 	const char *dev_name;
35 	uint32_t dev_id; /**< Valid only when *dev_name* is NULL. */
36 	uint32_t n_queues;
37 	uint32_t queue_size;
38 };
39 
40 struct cryptodev *
41 cryptodev_create(const char *name, struct cryptodev_params *params);
42 
43 #endif
44