[09/21] net/cpfl: support basic Rx data path
Checks
Commit Message
Add basic Rx support in split queue mode and single queue mode.
Signed-off-by: Mingxia Liu <mingxia.liu@intel.com>
---
drivers/net/cpfl/cpfl_ethdev.c | 2 ++
drivers/net/cpfl/cpfl_rxtx.c | 11 +++++++++++
drivers/net/cpfl/cpfl_rxtx.h | 1 +
3 files changed, 14 insertions(+)
@@ -251,6 +251,8 @@ cpfl_dev_start(struct rte_eth_dev *dev)
goto err_mtu;
}
+ cpfl_set_rx_function(dev);
+
ret = idpf_vc_ena_dis_vport(vport, true);
if (ret != 0) {
PMD_DRV_LOG(ERR, "Failed to enable vport");
@@ -734,3 +734,14 @@ cpfl_stop_queues(struct rte_eth_dev *dev)
PMD_DRV_LOG(WARNING, "Fail to stop Tx queue %d", i);
}
}
+
+void
+cpfl_set_rx_function(struct rte_eth_dev *dev)
+{
+ struct idpf_vport *vport = dev->data->dev_private;
+
+ if (vport->rxq_model == VIRTCHNL2_QUEUE_MODEL_SPLIT)
+ dev->rx_pkt_burst = idpf_splitq_recv_pkts;
+ else
+ dev->rx_pkt_burst = idpf_singleq_recv_pkts;
+}
@@ -37,4 +37,5 @@ int cpfl_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id);
int cpfl_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id);
void cpfl_dev_tx_queue_release(struct rte_eth_dev *dev, uint16_t qid);
void cpfl_dev_rx_queue_release(struct rte_eth_dev *dev, uint16_t qid);
+void cpfl_set_rx_function(struct rte_eth_dev *dev);
#endif /* _CPFL_RXTX_H_ */