X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fngbe%2Fngbe_ethdev.h;h=c039e7dcc3068b8cc6759f76c82227953b93e7a3;hb=63abf8d292252193db075e3264cceb3f6817ed79;hp=6d9aa5e593a16261aaedc133cf7657da3c7001bd;hpb=43b7e5ea60ac2ecb96be0a31dec717b857a64f27;p=dpdk.git diff --git a/drivers/net/ngbe/ngbe_ethdev.h b/drivers/net/ngbe/ngbe_ethdev.h index 6d9aa5e593..c039e7dcc3 100644 --- a/drivers/net/ngbe/ngbe_ethdev.h +++ b/drivers/net/ngbe/ngbe_ethdev.h @@ -13,7 +13,10 @@ #define NGBE_FLAG_MACSEC ((uint32_t)(1 << 3)) #define NGBE_FLAG_NEED_LINK_CONFIG ((uint32_t)(1 << 4)) +#define NGBE_QUEUE_ITR_INTERVAL_DEFAULT 500 /* 500us */ + #define NGBE_MISC_VEC_ID RTE_INTR_VEC_ZERO_OFFSET +#define NGBE_RX_VEC_START RTE_INTR_VEC_RXTX_OFFSET /* structure for interrupt relative data */ struct ngbe_interrupt { @@ -59,13 +62,54 @@ ngbe_dev_intr(struct rte_eth_dev *dev) return intr; } -void ngbe_dev_rx_queue_release(void *rxq); +/* + * Rx/Tx function prototypes + */ +void ngbe_dev_clear_queues(struct rte_eth_dev *dev); + +void ngbe_dev_free_queues(struct rte_eth_dev *dev); + +void ngbe_dev_rx_queue_release(struct rte_eth_dev *dev, uint16_t qid); + +void ngbe_dev_tx_queue_release(struct rte_eth_dev *dev, uint16_t qid); int ngbe_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t rx_queue_id, uint16_t nb_rx_desc, unsigned int socket_id, const struct rte_eth_rxconf *rx_conf, struct rte_mempool *mb_pool); +int ngbe_dev_tx_queue_setup(struct rte_eth_dev *dev, uint16_t tx_queue_id, + uint16_t nb_tx_desc, unsigned int socket_id, + const struct rte_eth_txconf *tx_conf); + +int ngbe_dev_rx_init(struct rte_eth_dev *dev); + +void ngbe_dev_tx_init(struct rte_eth_dev *dev); + +int ngbe_dev_rxtx_start(struct rte_eth_dev *dev); + +void ngbe_dev_save_rx_queue(struct ngbe_hw *hw, uint16_t rx_queue_id); +void ngbe_dev_store_rx_queue(struct ngbe_hw *hw, uint16_t rx_queue_id); +void ngbe_dev_save_tx_queue(struct ngbe_hw *hw, uint16_t tx_queue_id); +void ngbe_dev_store_tx_queue(struct ngbe_hw *hw, uint16_t tx_queue_id); + +int ngbe_dev_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id); + +int ngbe_dev_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id); + +int ngbe_dev_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id); + +int ngbe_dev_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id); + +uint16_t ngbe_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, + uint16_t nb_pkts); + +uint16_t ngbe_xmit_pkts_simple(void *tx_queue, struct rte_mbuf **tx_pkts, + uint16_t nb_pkts); + +void ngbe_set_ivar_map(struct ngbe_hw *hw, int8_t direction, + uint8_t queue, uint8_t msix_vector); + int ngbe_dev_link_update_share(struct rte_eth_dev *dev, int wait_to_complete); @@ -82,4 +126,9 @@ ngbe_dev_link_update_share(struct rte_eth_dev *dev, #define NGBE_DEFAULT_RX_HTHRESH 8 #define NGBE_DEFAULT_RX_WTHRESH 0 +#define NGBE_DEFAULT_TX_FREE_THRESH 32 +#define NGBE_DEFAULT_TX_PTHRESH 32 +#define NGBE_DEFAULT_TX_HTHRESH 0 +#define NGBE_DEFAULT_TX_WTHRESH 0 + #endif /* _NGBE_ETHDEV_H_ */