1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2018 Aquantia Corporation
5 #ifndef _ATLANTIC_ETHDEV_H_
6 #define _ATLANTIC_ETHDEV_H_
8 #include "rte_ethdev.h"
10 #include "atl_types.h"
11 #include "hw_atl/hw_atl_utils.h"
13 #define ATL_DEV_PRIVATE_TO_HW(adapter) \
14 (&((struct atl_adapter *)adapter)->hw)
16 #define ATL_DEV_TO_ADAPTER(dev) \
17 ((struct atl_adapter *)(dev)->data->dev_private)
21 * Structure to store private data for each driver instance (for each port).
25 struct aq_hw_cfg_s hw_cfg;
29 * RX/TX function prototypes
31 void atl_rx_queue_release(void *rxq);
33 int atl_rx_queue_setup(struct rte_eth_dev *dev, uint16_t rx_queue_id,
34 uint16_t nb_rx_desc, unsigned int socket_id,
35 const struct rte_eth_rxconf *rx_conf,
36 struct rte_mempool *mb_pool);
38 int atl_rx_init(struct rte_eth_dev *dev);
39 int atl_tx_init(struct rte_eth_dev *dev);
41 int atl_start_queues(struct rte_eth_dev *dev);
42 int atl_stop_queues(struct rte_eth_dev *dev);
43 void atl_free_queues(struct rte_eth_dev *dev);
45 int atl_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id);
46 int atl_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id);
49 uint16_t atl_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
52 uint16_t atl_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
55 uint16_t atl_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
58 #endif /* _ATLANTIC_ETHDEV_H_ */