1*2d9fd380Sjfb8856606 /* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0) 2*2d9fd380Sjfb8856606 * Copyright(c) 2018-2019 Pensando Systems, Inc. All rights reserved. 3*2d9fd380Sjfb8856606 */ 4*2d9fd380Sjfb8856606 5*2d9fd380Sjfb8856606 #ifndef _IONIC_RXTX_H_ 6*2d9fd380Sjfb8856606 #define _IONIC_RXTX_H_ 7*2d9fd380Sjfb8856606 8*2d9fd380Sjfb8856606 #include <rte_mbuf.h> 9*2d9fd380Sjfb8856606 10*2d9fd380Sjfb8856606 struct ionic_rx_service { 11*2d9fd380Sjfb8856606 /* cb in */ 12*2d9fd380Sjfb8856606 struct rte_mbuf **rx_pkts; 13*2d9fd380Sjfb8856606 uint16_t nb_pkts; 14*2d9fd380Sjfb8856606 /* cb out */ 15*2d9fd380Sjfb8856606 uint16_t nb_rx; 16*2d9fd380Sjfb8856606 }; 17*2d9fd380Sjfb8856606 18*2d9fd380Sjfb8856606 uint16_t ionic_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, 19*2d9fd380Sjfb8856606 uint16_t nb_pkts); 20*2d9fd380Sjfb8856606 uint16_t ionic_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, 21*2d9fd380Sjfb8856606 uint16_t nb_pkts); 22*2d9fd380Sjfb8856606 uint16_t ionic_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, 23*2d9fd380Sjfb8856606 uint16_t nb_pkts); 24*2d9fd380Sjfb8856606 25*2d9fd380Sjfb8856606 int ionic_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t rx_queue_id, 26*2d9fd380Sjfb8856606 uint16_t nb_desc, uint32_t socket_id, 27*2d9fd380Sjfb8856606 const struct rte_eth_rxconf *rx_conf, struct rte_mempool *mp); 28*2d9fd380Sjfb8856606 void ionic_dev_rx_queue_release(void *rxq); 29*2d9fd380Sjfb8856606 int ionic_dev_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id); 30*2d9fd380Sjfb8856606 int ionic_dev_rx_queue_stop(struct rte_eth_dev *eth_dev, uint16_t rx_queue_id); 31*2d9fd380Sjfb8856606 32*2d9fd380Sjfb8856606 int ionic_dev_tx_queue_setup(struct rte_eth_dev *dev, uint16_t tx_queue_id, 33*2d9fd380Sjfb8856606 uint16_t nb_desc, uint32_t socket_id, 34*2d9fd380Sjfb8856606 const struct rte_eth_txconf *tx_conf); 35*2d9fd380Sjfb8856606 void ionic_dev_tx_queue_release(void *tx_queue); 36*2d9fd380Sjfb8856606 int ionic_dev_tx_queue_stop(struct rte_eth_dev *eth_dev, uint16_t tx_queue_id); 37*2d9fd380Sjfb8856606 int ionic_dev_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id); 38*2d9fd380Sjfb8856606 39*2d9fd380Sjfb8856606 void ionic_rxq_info_get(struct rte_eth_dev *dev, uint16_t queue_id, 40*2d9fd380Sjfb8856606 struct rte_eth_rxq_info *qinfo); 41*2d9fd380Sjfb8856606 void ionic_txq_info_get(struct rte_eth_dev *dev, uint16_t queue_id, 42*2d9fd380Sjfb8856606 struct rte_eth_txq_info *qinfo); 43*2d9fd380Sjfb8856606 44*2d9fd380Sjfb8856606 #endif /* _IONIC_RXTX_H_ */ 45