1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2016 Intel Corporation
5 #ifndef _NULL_CRYPTO_PMD_PRIVATE_H_
6 #define _NULL_CRYPTO_PMD_PRIVATE_H_
8 #define CRYPTODEV_NAME_NULL_PMD crypto_null
9 /**< Null crypto PMD device name */
11 #define NULL_CRYPTO_LOG_ERR(fmt, args...) \
12 RTE_LOG(ERR, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \
13 RTE_STR(CRYPTODEV_NAME_NULL_PMD), \
14 __func__, __LINE__, ## args)
16 #ifdef RTE_LIBRTE_NULL_CRYPTO_DEBUG
17 #define NULL_CRYPTO_LOG_INFO(fmt, args...) \
18 RTE_LOG(INFO, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \
19 RTE_STR(CRYPTODEV_NAME_NULL_PMD), \
20 __func__, __LINE__, ## args)
22 #define NULL_CRYPTO_LOG_DBG(fmt, args...) \
23 RTE_LOG(DEBUG, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \
24 RTE_STR(CRYPTODEV_NAME_NULL_PMD), \
25 __func__, __LINE__, ## args)
27 #define NULL_CRYPTO_LOG_INFO(fmt, args...)
28 #define NULL_CRYPTO_LOG_DBG(fmt, args...)
32 /** private data structure for each NULL crypto device */
33 struct null_crypto_private {
34 unsigned max_nb_qpairs; /**< Max number of queue pairs */
35 unsigned max_nb_sessions; /**< Max number of sessions */
38 /** NULL crypto queue pair */
39 struct null_crypto_qp {
41 /**< Queue Pair Identifier */
42 char name[RTE_CRYPTODEV_NAME_MAX_LEN];
43 /**< Unique Queue Pair Name */
44 struct rte_ring *processed_pkts;
45 /**< Ring for placing process packets */
46 struct rte_mempool *sess_mp;
47 /**< Session Mempool */
48 struct rte_cryptodev_stats qp_stats;
49 /**< Queue pair statistics */
50 } __rte_cache_aligned;
53 /** NULL crypto private session structure */
54 struct null_crypto_session {
56 } __rte_cache_aligned;
58 /** Set and validate NULL crypto session parameters */
60 null_crypto_set_session_parameters(struct null_crypto_session *sess,
61 const struct rte_crypto_sym_xform *xform);
63 /** device specific operations function pointer structure */
64 extern struct rte_cryptodev_ops *null_crypto_pmd_ops;
66 #endif /* _NULL_CRYPTO_PMD_PRIVATE_H_ */