DPDK  20.11.0
rte_vhost_crypto.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2017-2018 Intel Corporation
3  */
4 
5 #ifndef _VHOST_CRYPTO_H_
6 #define _VHOST_CRYPTO_H_
7 
8 #define VHOST_CRYPTO_MBUF_POOL_SIZE (8192)
9 #define VHOST_CRYPTO_MAX_BURST_SIZE (64)
10 #define VHOST_CRYPTO_MAX_DATA_SIZE (4096)
11 #define VHOST_CRYPTO_SESSION_MAP_ENTRIES (1024)
13 #define VIRTIO_CRYPTO_MAX_NUM_BURST_VQS (64)
14 #define VHOST_CRYPTO_MAX_IV_LEN (32)
15 #define VHOST_CRYPTO_MAX_N_DESC (32)
16 
17 enum rte_vhost_crypto_zero_copy {
18  RTE_VHOST_CRYPTO_ZERO_COPY_DISABLE = 0,
19  RTE_VHOST_CRYPTO_ZERO_COPY_ENABLE = 1,
20  RTE_VHOST_CRYPTO_MAX_ZERO_COPY_OPTIONS
21 };
22 
31 __rte_experimental
32 int
33 rte_vhost_crypto_driver_start(const char *path);
34 
53 __rte_experimental
54 int
55 rte_vhost_crypto_create(int vid, uint8_t cryptodev_id,
56  struct rte_mempool *sess_pool,
57  struct rte_mempool *sess_priv_pool,
58  int socket_id);
59 
69 __rte_experimental
70 int
71 rte_vhost_crypto_free(int vid);
72 
84 __rte_experimental
85 int
86 rte_vhost_crypto_set_zero_copy(int vid, enum rte_vhost_crypto_zero_copy option);
87 
105 __rte_experimental
106 uint16_t
107 rte_vhost_crypto_fetch_requests(int vid, uint32_t qid,
108  struct rte_crypto_op **ops, uint16_t nb_ops);
127 __rte_experimental
128 uint16_t
129 rte_vhost_crypto_finalize_requests(struct rte_crypto_op **ops,
130  uint16_t nb_ops, int *callfds, uint16_t *nb_callfds);
131 
132 #endif
rte_crypto_op
Definition: rte_crypto.h:78
rte_mempool
Definition: rte_mempool.h:207