63b19f527d70f4e3b68d11576f6484a34b97811a
[dpdk.git] / drivers / net / igc / igc_txrx.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2020 Intel Corporation
3  */
4
5 #ifndef _IGC_TXRX_H_
6 #define _IGC_TXRX_H_
7
8 #include "igc_ethdev.h"
9
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13
14 /*
15  * RX/TX function prototypes
16  */
17 void eth_igc_tx_queue_release(void *txq);
18 void eth_igc_rx_queue_release(void *rxq);
19 void igc_dev_clear_queues(struct rte_eth_dev *dev);
20 int eth_igc_rx_queue_setup(struct rte_eth_dev *dev, uint16_t rx_queue_id,
21                 uint16_t nb_rx_desc, unsigned int socket_id,
22                 const struct rte_eth_rxconf *rx_conf,
23                 struct rte_mempool *mb_pool);
24
25 uint32_t eth_igc_rx_queue_count(struct rte_eth_dev *dev,
26                 uint16_t rx_queue_id);
27
28 int eth_igc_rx_descriptor_done(void *rx_queue, uint16_t offset);
29
30 int eth_igc_rx_descriptor_status(void *rx_queue, uint16_t offset);
31
32 int eth_igc_tx_descriptor_status(void *tx_queue, uint16_t offset);
33
34 int eth_igc_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
35                 uint16_t nb_desc, unsigned int socket_id,
36                 const struct rte_eth_txconf *tx_conf);
37 int eth_igc_tx_done_cleanup(void *txqueue, uint32_t free_cnt);
38
39 int igc_rx_init(struct rte_eth_dev *dev);
40 void igc_tx_init(struct rte_eth_dev *dev);
41 void
42 igc_hw_rss_hash_set(struct igc_hw *hw, struct rte_eth_rss_conf *rss_conf);
43 void eth_igc_rxq_info_get(struct rte_eth_dev *dev, uint16_t queue_id,
44         struct rte_eth_rxq_info *qinfo);
45 void eth_igc_txq_info_get(struct rte_eth_dev *dev, uint16_t queue_id,
46         struct rte_eth_txq_info *qinfo);
47
48 #ifdef __cplusplus
49 }
50 #endif
51
52 #endif /* _IGC_TXRX_H_ */