1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2015-2018 Intel Corporation
8 #include <rte_cryptodev_pmd.h>
9 #include <rte_memzone.h>
11 #include "qat_common.h"
12 #include "qat_device.h"
13 #include "qat_crypto_capabilities.h"
16 * This macro rounds up a number to a be a multiple of
17 * the alignment when the alignment is a power of 2
19 #define ALIGN_POW2_ROUNDUP(num, align) \
20 (((num) + (align) - 1) & ~((align) - 1))
21 #define QAT_64_BTYE_ALIGN_MASK (~0x3f)
23 struct qat_sym_session;
25 struct qat_sym_op_cookie {
26 struct qat_sgl qat_sgl_src;
27 struct qat_sgl qat_sgl_dst;
28 phys_addr_t qat_sgl_src_phys_addr;
29 phys_addr_t qat_sgl_dst_phys_addr;
33 qat_sym_build_request(void *in_op, uint8_t *out_msg,
34 void *op_cookie, enum qat_device_gen qat_dev_gen);
37 qat_sym_process_response(void **op, uint8_t *resp,
38 __rte_unused void *op_cookie, enum qat_device_gen qat_dev_gen);
40 void qat_sym_stats_get(struct rte_cryptodev *dev,
41 struct rte_cryptodev_stats *stats);
42 void qat_sym_stats_reset(struct rte_cryptodev *dev);
44 int qat_sym_qp_setup(struct rte_cryptodev *dev, uint16_t queue_pair_id,
45 const struct rte_cryptodev_qp_conf *rx_conf, int socket_id,
46 struct rte_mempool *session_pool);
47 int qat_sym_qp_release(struct rte_cryptodev *dev,
48 uint16_t queue_pair_id);
52 qat_sym_pmd_enqueue_op_burst(void *qp, struct rte_crypto_op **ops,
56 qat_sym_pmd_dequeue_op_burst(void *qp, struct rte_crypto_op **ops,
59 #endif /* _QAT_SYM_H_ */