return -ENXIO;
}
+ bnx2x_dev_rxtx_init_dummy(dev);
return 0;
}
PMD_DRV_LOG(ERR, sc, "rte_intr_enable failed");
}
- ret = bnx2x_dev_rx_init(dev);
- if (ret != 0) {
- PMD_DRV_LOG(DEBUG, sc, "bnx2x_dev_rx_init returned error code");
- return -3;
- }
+ bnx2x_dev_rxtx_init(dev);
bnx2x_print_device_info(sc);
PMD_INIT_FUNC_TRACE(sc);
+ bnx2x_dev_rxtx_init_dummy(dev);
+
if (IS_PF(sc)) {
rte_intr_disable(&sc->pci_dev->intr_handle);
rte_intr_callback_unregister(&sc->pci_dev->intr_handle,
txq->tx_bd_tail = 0;
txq->tx_bd_head = 0;
txq->nb_tx_avail = txq->nb_tx_desc;
- dev->tx_pkt_burst = bnx2x_xmit_pkts;
dev->data->tx_queues[queue_idx] = txq;
if (!sc->tx_queues) sc->tx_queues = dev->data->tx_queues;
return nb_rx;
}
-int
-bnx2x_dev_rx_init(struct rte_eth_dev *dev)
+static uint16_t
+bnx2x_rxtx_pkts_dummy(__rte_unused void *p_rxq,
+ __rte_unused struct rte_mbuf **rx_pkts,
+ __rte_unused uint16_t nb_pkts)
{
- dev->rx_pkt_burst = bnx2x_recv_pkts;
-
return 0;
}
+void bnx2x_dev_rxtx_init_dummy(struct rte_eth_dev *dev)
+{
+ dev->rx_pkt_burst = bnx2x_rxtx_pkts_dummy;
+ dev->tx_pkt_burst = bnx2x_rxtx_pkts_dummy;
+}
+
+void bnx2x_dev_rxtx_init(struct rte_eth_dev *dev)
+{
+ dev->rx_pkt_burst = bnx2x_recv_pkts;
+ dev->tx_pkt_burst = bnx2x_xmit_pkts;
+}
+
void
bnx2x_dev_clear_queues(struct rte_eth_dev *dev)
{
void bnx2x_dev_rx_queue_release(void *rxq);
void bnx2x_dev_tx_queue_release(void *txq);
-int bnx2x_dev_rx_init(struct rte_eth_dev *dev);
+void bnx2x_dev_rxtx_init(struct rte_eth_dev *dev);
+void bnx2x_dev_rxtx_init_dummy(struct rte_eth_dev *dev);
void bnx2x_dev_clear_queues(struct rte_eth_dev *dev);
#endif /* _BNX2X_RXTX_H_ */