1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2018 Advanced Micro Devices, Inc. All rights reserved.
5 #ifndef _CCP_PMD_PRIVATE_H_
6 #define _CCP_PMD_PRIVATE_H_
8 #include <rte_cryptodev.h>
10 #define CRYPTODEV_NAME_CCP_PMD crypto_ccp
12 #define CCP_LOG_ERR(fmt, args...) \
13 RTE_LOG(ERR, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \
14 RTE_STR(CRYPTODEV_NAME_CCP_PMD), \
15 __func__, __LINE__, ## args)
17 #ifdef RTE_LIBRTE_CCP_DEBUG
18 #define CCP_LOG_INFO(fmt, args...) \
19 RTE_LOG(INFO, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \
20 RTE_STR(CRYPTODEV_NAME_CCP_PMD), \
21 __func__, __LINE__, ## args)
23 #define CCP_LOG_DBG(fmt, args...) \
24 RTE_LOG(DEBUG, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \
25 RTE_STR(CRYPTODEV_NAME_CCP_PMD), \
26 __func__, __LINE__, ## args)
28 #define CCP_LOG_INFO(fmt, args...)
29 #define CCP_LOG_DBG(fmt, args...)
32 /**< Maximum queue pairs supported by CCP PMD */
33 #define CCP_PMD_MAX_QUEUE_PAIRS 1
34 #define CCP_NB_MAX_DESCRIPTORS 1024
35 #define CCP_MAX_BURST 64
37 /* private data structure for each CCP crypto device */
39 unsigned int max_nb_qpairs; /**< Max number of queue pairs */
40 unsigned int max_nb_sessions; /**< Max number of sessions */
41 uint8_t crypto_num_dev; /**< Number of working crypto devices */
44 /**< device specific operations function pointer structure */
45 extern struct rte_cryptodev_ops *ccp_pmd_ops;
48 ccp_cpu_pmd_enqueue_burst(void *queue_pair,
49 struct rte_crypto_op **ops,
52 ccp_cpu_pmd_dequeue_burst(void *queue_pair,
53 struct rte_crypto_op **ops,
56 #endif /* _CCP_PMD_PRIVATE_H_ */