1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(C) 2021 Marvell.
5 #ifndef _RTE_CRYPTODEV_CORE_H_
6 #define _RTE_CRYPTODEV_CORE_H_
11 * RTE Crypto Device internal header.
13 * This header contains internal data types. But they are still part of the
14 * public API because they are used by inline functions in the published API.
16 * Applications should not use these directly.
20 typedef uint16_t (*dequeue_pkt_burst_t)(void *qp,
21 struct rte_crypto_op **ops, uint16_t nb_ops);
22 /**< Dequeue processed packets from queue pair of a device. */
24 typedef uint16_t (*enqueue_pkt_burst_t)(void *qp,
25 struct rte_crypto_op **ops, uint16_t nb_ops);
26 /**< Enqueue packets for processing on queue pair of a device. */
30 * Structure used to hold opaque pointers to internal ethdev Rx/Tx
32 * The main purpose to expose these pointers at all - allow compiler
33 * to fetch this data for fast-path cryptodev inline functions in advance.
35 struct rte_cryptodev_qpdata {
36 /** points to array of internal queue pair data pointers. */
38 /** points to array of enqueue callback data pointers */
39 struct rte_cryptodev_cb_rcu *enq_cb;
40 /** points to array of dequeue callback data pointers */
41 struct rte_cryptodev_cb_rcu *deq_cb;
44 struct rte_crypto_fp_ops {
45 /** PMD enqueue burst function. */
46 enqueue_pkt_burst_t enqueue_burst;
47 /** PMD dequeue burst function. */
48 dequeue_pkt_burst_t dequeue_burst;
49 /** Internal queue pair data pointers. */
50 struct rte_cryptodev_qpdata qp;
51 /** Reserved for future ops. */
52 uintptr_t reserved[3];
53 } __rte_cache_aligned;
55 extern struct rte_crypto_fp_ops rte_crypto_fp_ops[RTE_CRYPTO_MAX_DEVS];
58 * The pool of rte_cryptodev structures.
60 extern struct rte_cryptodev *rte_cryptodevs;
62 #endif /* _RTE_CRYPTODEV_CORE_H_ */