1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright(c) 2019 Intel Corporation. 3 */ 4 5 #ifndef _RTE_PMD_NTB_H_ 6 #define _RTE_PMD_NTB_H_ 7 8 /* App needs to set/get these attrs */ 9 #define NTB_QUEUE_SZ_NAME "queue_size" 10 #define NTB_QUEUE_NUM_NAME "queue_num" 11 #define NTB_TOPO_NAME "topo" 12 #define NTB_LINK_STATUS_NAME "link_status" 13 #define NTB_SPEED_NAME "speed" 14 #define NTB_WIDTH_NAME "width" 15 #define NTB_MW_CNT_NAME "mw_count" 16 #define NTB_DB_CNT_NAME "db_count" 17 #define NTB_SPAD_CNT_NAME "spad_count" 18 19 #define NTB_MAX_DESC_SIZE 1024 20 #define NTB_MIN_DESC_SIZE 64 21 22 struct ntb_dev_info { 23 uint32_t ntb_hdr_size; 24 /**< memzone needs to be mw size align or not. */ 25 uint8_t mw_size_align; 26 uint8_t mw_cnt; 27 uint64_t *mw_size; 28 }; 29 30 struct ntb_dev_config { 31 uint16_t num_queues; 32 uint16_t queue_size; 33 uint8_t mz_num; 34 const struct rte_memzone **mz_list; 35 }; 36 37 struct ntb_queue_conf { 38 uint16_t nb_desc; 39 uint16_t tx_free_thresh; 40 struct rte_mempool *rx_mp; 41 }; 42 43 #endif /* _RTE_PMD_NTB_H_ */ 44