1 /* SPDX-License-Identifier: BSD-3-Clause
8 #define HIF_CLIENT_QUEUES_MAX 16
9 #define HIF_RX_PKT_MIN_SIZE RTE_CACHE_LINE_SIZE
11 * HIF_TX_DESC_NT value should be always greter than 4,
12 * Otherwise HIF_TX_POLL_MARK will become zero.
14 #define HIF_RX_DESC_NT 64
15 #define HIF_TX_DESC_NT 2048
23 /*structure to store client queue info */
25 struct rx_queue_desc *base;
31 struct tx_queue_desc *base;
36 /*Structure to store the client info */
39 struct hif_rx_queue rx_q[HIF_CLIENT_QUEUES_MAX];
41 struct hif_tx_queue tx_q[HIF_CLIENT_QUEUES_MAX];
44 /*HIF hardware buffer descriptor */
67 /* To store registered clients in hif layer */
68 struct hif_client client[HIF_CLIENTS_MAX];
71 void *descr_baseaddr_v;
72 unsigned long descr_baseaddr_p;
74 struct hif_desc *rx_base;
77 void *rx_buf_addr[HIF_RX_DESC_NT];
78 void *rx_buf_vaddr[HIF_RX_DESC_NT];
79 int rx_buf_len[HIF_RX_DESC_NT];
81 unsigned int client_id;
82 unsigned int client_ctrl;
86 struct hif_desc *tx_base;
92 struct hif_desc_sw tx_sw_queue[HIF_TX_DESC_NT];
93 int32_t epoll_fd; /**< File descriptor created for interrupt polling */
95 /* tx_lock synchronizes hif packet tx as well as pfe_hif structure access */
96 rte_spinlock_t tx_lock;
97 /* lock synchronizes hif rx queue processing */
99 struct rte_device *dev;
102 int pfe_hif_init(struct pfe *pfe);
103 void pfe_hif_exit(struct pfe *pfe);
104 void pfe_hif_rx_idle(struct pfe_hif *hif);
106 #endif /* _PFE_HIF_H_ */