DPDK  21.02.0
rte_cryptodev_scheduler_operations.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2017 Intel Corporation
3  */
4 
5 #ifndef _RTE_CRYPTO_SCHEDULER_OPERATIONS_H
6 #define _RTE_CRYPTO_SCHEDULER_OPERATIONS_H
7 
8 #include <rte_cryptodev.h>
9 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
14 typedef int (*rte_cryptodev_scheduler_worker_attach_t)(
15  struct rte_cryptodev *dev, uint8_t worker_id);
16 typedef int (*rte_cryptodev_scheduler_worker_detach_t)(
17  struct rte_cryptodev *dev, uint8_t worker_id);
18 
19 typedef int (*rte_cryptodev_scheduler_start_t)(struct rte_cryptodev *dev);
20 typedef int (*rte_cryptodev_scheduler_stop_t)(struct rte_cryptodev *dev);
21 
22 typedef int (*rte_cryptodev_scheduler_config_queue_pair)(
23  struct rte_cryptodev *dev, uint16_t qp_id);
24 
25 typedef int (*rte_cryptodev_scheduler_create_private_ctx)(
26  struct rte_cryptodev *dev);
27 
28 typedef int (*rte_cryptodev_scheduler_config_option_set)(
29  struct rte_cryptodev *dev,
30  uint32_t option_type,
31  void *option);
32 
33 typedef int (*rte_cryptodev_scheduler_config_option_get)(
34  struct rte_cryptodev *dev,
35  uint32_t option_type,
36  void *option);
37 
38 struct rte_cryptodev_scheduler_ops {
39  rte_cryptodev_scheduler_worker_attach_t worker_attach;
40  rte_cryptodev_scheduler_worker_attach_t worker_detach;
41 
42  rte_cryptodev_scheduler_start_t scheduler_start;
43  rte_cryptodev_scheduler_stop_t scheduler_stop;
44 
45  rte_cryptodev_scheduler_config_queue_pair config_queue_pair;
46 
47  rte_cryptodev_scheduler_create_private_ctx create_private_ctx;
48 
49  rte_cryptodev_scheduler_config_option_set option_set;
50  rte_cryptodev_scheduler_config_option_get option_get;
51 };
52 
53 #ifdef __cplusplus
54 }
55 #endif
56 #endif /* _RTE_CRYPTO_SCHEDULER_OPERATIONS_H */