1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright(c) 2016 Intel Corporation 3 */ 4 5 #ifndef _NULL_CRYPTO_PMD_PRIVATE_H_ 6 #define _NULL_CRYPTO_PMD_PRIVATE_H_ 7 8 #define CRYPTODEV_NAME_NULL_PMD crypto_null 9 /**< Null crypto PMD device name */ 10 11 int null_logtype_driver; 12 13 #define NULL_LOG(level, fmt, ...) \ 14 rte_log(RTE_LOG_ ## level, null_logtype_driver, \ 15 "%s() line %u: "fmt "\n", __func__, __LINE__, \ 16 ## __VA_ARGS__) 17 18 19 /** private data structure for each NULL crypto device */ 20 struct null_crypto_private { 21 unsigned max_nb_qpairs; /**< Max number of queue pairs */ 22 unsigned max_nb_sessions; /**< Max number of sessions */ 23 }; 24 25 /** NULL crypto queue pair */ 26 struct null_crypto_qp { 27 uint16_t id; 28 /**< Queue Pair Identifier */ 29 char name[RTE_CRYPTODEV_NAME_MAX_LEN]; 30 /**< Unique Queue Pair Name */ 31 struct rte_ring *processed_pkts; 32 /**< Ring for placing process packets */ 33 struct rte_mempool *sess_mp; 34 /**< Session Mempool */ 35 struct rte_cryptodev_stats qp_stats; 36 /**< Queue pair statistics */ 37 } __rte_cache_aligned; 38 39 40 /** NULL crypto private session structure */ 41 struct null_crypto_session { 42 uint32_t reserved; 43 } __rte_cache_aligned; 44 45 /** Set and validate NULL crypto session parameters */ 46 extern int 47 null_crypto_set_session_parameters(struct null_crypto_session *sess, 48 const struct rte_crypto_sym_xform *xform); 49 50 /** device specific operations function pointer structure */ 51 extern struct rte_cryptodev_ops *null_crypto_pmd_ops; 52 53 #endif /* _NULL_CRYPTO_PMD_PRIVATE_H_ */ 54