4 * Copyright (c) 2015-2017 Atomic Rules LLC
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
11 * * Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * * Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in
15 * the documentation and/or other materials provided with the
17 * * Neither the name of copyright holder nor the names of its
18 * contributors may be used to endorse or promote products derived
19 * from this software without specific prior written permission.
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 #ifndef _ARK_ETHDEV_RX_H_
35 #define _ARK_ETHDEV_RX_H_
40 #include <rte_mempool.h>
41 #include <rte_ethdev.h>
44 int eth_ark_dev_rx_queue_setup(struct rte_eth_dev *dev,
47 unsigned int socket_id,
48 const struct rte_eth_rxconf *rx_conf,
49 struct rte_mempool *mp);
50 uint32_t eth_ark_dev_rx_queue_count(struct rte_eth_dev *dev,
51 uint16_t rx_queue_id);
52 int eth_ark_rx_stop_queue(struct rte_eth_dev *dev, uint16_t queue_id);
53 int eth_ark_rx_start_queue(struct rte_eth_dev *dev, uint16_t queue_id);
54 uint16_t eth_ark_recv_pkts_noop(void *rx_queue, struct rte_mbuf **rx_pkts,
56 uint16_t eth_ark_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
58 void eth_ark_dev_rx_queue_release(void *rx_queue);
59 void eth_rx_queue_stats_get(void *vqueue, struct rte_eth_stats *stats);
60 void eth_rx_queue_stats_reset(void *vqueue);
61 void eth_ark_rx_dump_queue(struct rte_eth_dev *dev, uint16_t queue_id,
63 void eth_ark_udm_force_close(struct rte_eth_dev *dev);