diff mbox

[dpdk-dev,v2] fm10k: add debug info for actual Rx/Tx func

Message ID 1448589252-16195-1-git-send-email-jing.d.chen@intel.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Chen, Jing D Nov. 27, 2015, 1:54 a.m. UTC
From: "Chen Jing D(Mark)" <jing.d.chen@intel.com>

After introducing vPMD feature, fm10k driver will select best
Rx/Tx in running time. Original implementation selects Rx/Tx
silently without notifications.

This patch adds debug info to notify user what actual Rx/Tx
func are used.

Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
---
 drivers/net/fm10k/fm10k_ethdev.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

Comments

Thomas Monjalon Nov. 27, 2015, 6:53 p.m. UTC | #1
2015-11-27 09:54, Chen Jing D:
> From: "Chen Jing D(Mark)" <jing.d.chen@intel.com>
> 
> After introducing vPMD feature, fm10k driver will select best
> Rx/Tx in running time. Original implementation selects Rx/Tx
> silently without notifications.
> 
> This patch adds debug info to notify user what actual Rx/Tx
> func are used.
> 
> Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>

Applied, thanks
diff mbox

Patch

diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index 0dd56d2..4f23ce3 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -2458,13 +2458,16 @@  fm10k_set_tx_function(struct rte_eth_dev *dev)
 	}
 
 	if (use_sse) {
+		PMD_INIT_LOG(DEBUG, "Use vector Tx func");
 		for (i = 0; i < dev->data->nb_tx_queues; i++) {
 			txq = dev->data->tx_queues[i];
 			fm10k_txq_vec_setup(txq);
 		}
 		dev->tx_pkt_burst = fm10k_xmit_pkts_vec;
-	} else
+	} else {
 		dev->tx_pkt_burst = fm10k_xmit_pkts;
+		PMD_INIT_LOG(DEBUG, "Use regular Tx func");
+	}
 }
 
 static void __attribute__((cold))
@@ -2488,6 +2491,11 @@  fm10k_set_rx_function(struct rte_eth_dev *dev)
 		(dev->rx_pkt_burst == fm10k_recv_scattered_pkts_vec ||
 		dev->rx_pkt_burst == fm10k_recv_pkts_vec);
 
+	if (rx_using_sse)
+		PMD_INIT_LOG(DEBUG, "Use vector Rx func");
+	else
+		PMD_INIT_LOG(DEBUG, "Use regular Rx func");
+
 	for (i = 0; i < dev->data->nb_rx_queues; i++) {
 		struct fm10k_rx_queue *rxq = dev->data->rx_queues[i];