net/atlantic: implement core logic for Tx/Rx
[dpdk.git] / drivers / net / atlantic / atl_ethdev.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2018 Aquantia Corporation
3  */
4
5 #ifndef _ATLANTIC_ETHDEV_H_
6 #define _ATLANTIC_ETHDEV_H_
7 #include <rte_errno.h>
8 #include "rte_ethdev.h"
9
10 #include "atl_types.h"
11 #include "hw_atl/hw_atl_utils.h"
12
13 #define ATL_DEV_PRIVATE_TO_HW(adapter) \
14         (&((struct atl_adapter *)adapter)->hw)
15
16 /*
17  * Structure to store private data for each driver instance (for each port).
18  */
19 struct atl_adapter {
20         struct aq_hw_s             hw;
21         struct aq_hw_cfg_s         hw_cfg;
22 };
23
24 /*
25  * RX/TX function prototypes
26  */
27 int atl_rx_init(struct rte_eth_dev *dev);
28 int atl_tx_init(struct rte_eth_dev *dev);
29
30 uint16_t atl_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
31                 uint16_t nb_pkts);
32
33 uint16_t atl_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
34                 uint16_t nb_pkts);
35
36 uint16_t atl_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
37                 uint16_t nb_pkts);
38
39 #endif /* _ATLANTIC_ETHDEV_H_ */