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 extern int null_logtype_driver; 12 #define RTE_LOGTYPE_NULL_DRIVER null_logtype_driver 13 14 #define NULL_LOG(level, ...) \ 15 RTE_LOG_LINE_PREFIX(level, NULL_DRIVER, "%s() line %u: ", \ 16 __func__ RTE_LOG_COMMA __LINE__, __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 }; 23 24 /** NULL crypto queue pair */ 25 struct __rte_cache_aligned null_crypto_qp { 26 uint16_t id; 27 /**< Queue Pair Identifier */ 28 char name[RTE_CRYPTODEV_NAME_MAX_LEN]; 29 /**< Unique Queue Pair Name */ 30 struct rte_ring *processed_pkts; 31 /**< Ring for placing process packets */ 32 struct rte_mempool *sess_mp; 33 /**< Session Mempool */ 34 struct rte_cryptodev_stats qp_stats; 35 /**< Queue pair statistics */ 36 }; 37 38 39 /** NULL crypto private session structure */ 40 struct __rte_cache_aligned null_crypto_session { 41 uint32_t reserved; 42 }; 43 44 /** Set and validate NULL crypto session parameters */ 45 extern int 46 null_crypto_set_session_parameters(struct null_crypto_session *sess, 47 const struct rte_crypto_sym_xform *xform); 48 49 /** device specific operations function pointer structure */ 50 extern struct rte_cryptodev_ops *null_crypto_pmd_ops; 51 52 #endif /* _NULL_CRYPTO_PMD_PRIVATE_H_ */ 53