Skip to contentSkip to conversation

fm10k: add debug info for actual Rx/Tx func

PATCH Superseded Chen Jing D(Mark) 3 participants 6 messages Nov 24, 2015 – Nov 27, 2015 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fm10k: add debug info for actual Rx/Tx func

From: "Chen Jing D(Mark)" <[email protected]>

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.

---
 drivers/net/fm10k/fm10k_ethdev.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
drivers/net/fm10k/fm10k_ethdev.c +9 -1
index 7f5c852..34dd55c 100644
@@ -2402,13 +2402,16 @@ fm10k_set_tx_function(struct rte_eth_dev *dev)
 	}
 
 	if (use_sse) {
+		PMD_INIT_LOG(ERR, "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(ERR, "Use regular Tx func");
+	}
 }
 
 static void __attribute__((cold))
@@ -2432,6 +2435,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(ERR, "Use vector Rx func");
+	else
+		PMD_INIT_LOG(ERR, "Use regular Rx func");
+
 	for (i = 0; i < dev->data->nb_rx_queues; i++) {
 		struct fm10k_rx_queue *rxq = dev->data->rx_queues[i];
 
Signature · 1 line
1.7.7.6
#1 lore raw

2015-11-24 14:00, Chen Jing D:

Quoted 2 lines

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

[...]

drivers/net/fm10k/fm10k_ethdev.c fm10k_set_rx_function(struct rte_eth_dev *dev) · line 2441

Quoted 4 lines
drivers/net/fm10k/fm10k_ethdev.c +4 -0
+	if (rx_using_sse)
+		PMD_INIT_LOG(ERR, "Use vector Rx func");
+	else
+		PMD_INIT_LOG(ERR, "Use regular Rx func");

debug info != LOG(ERR

#2 lore raw
Quoted 10 lines · On Tue, 24 Nov 2015 11:32:46 +0100 Thomas Monjalon <[email protected]>…

2015-11-24 14:00, Chen Jing D:

Quoted 2 lines

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

[...]

drivers/net/fm10k/fm10k_ethdev.c fm10k_set_rx_function(struct rte_eth_dev *dev) · line 2441

Quoted 4 lines
drivers/net/fm10k/fm10k_ethdev.c +4 -0
+	if (rx_using_sse)
+		PMD_INIT_LOG(ERR, "Use vector Rx func");
+	else
+		PMD_INIT_LOG(ERR, "Use regular Rx func");

debug info != LOG(ERR

Really should be DEBUG.
Developers need to remember you don't wan to see those log messages in a production system.

#3 lore raw
Quoted 22 lines

-----Original Message-----
From: Stephen Hemminger [mailto:[email protected]]
Sent: Wednesday, November 25, 2015 12:42 AM
To: Thomas Monjalon
Cc: Chen, Jing D; [email protected]
Subject: Re: [dpdk-dev] [PATCH] fm10k: add debug info for actual Rx/Tx func

Quoted 10 lines · On Tue, 24 Nov 2015 11:32:46 +0100 Thomas Monjalon <[email protected]>…

2015-11-24 14:00, Chen Jing D:

Quoted 2 lines

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

[...]

drivers/net/fm10k/fm10k_ethdev.c fm10k_set_rx_function(struct rte_eth_dev *dev) · line 2441

Quoted 4 lines
drivers/net/fm10k/fm10k_ethdev.c +4 -0
+	if (rx_using_sse)
+		PMD_INIT_LOG(ERR, "Use vector Rx func");
+	else
+		PMD_INIT_LOG(ERR, "Use regular Rx func");

debug info != LOG(ERR

Quoted 3 lines

Really should be DEBUG.
Developers need to remember you don't wan to see those log messages in a production system.

Thanks for the comments. I'll change accordingly.

#4 lore raw

PATCH v2 1/1 fm10k: add debug info for actual Rx/Tx func

In reply to Chen Jing D(Mark)

From: "Chen Jing D(Mark)" <[email protected]>

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.

---
 drivers/net/fm10k/fm10k_ethdev.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
drivers/net/fm10k/fm10k_ethdev.c +9 -1
index 0dd56d2..4f23ce3 100644
@@ -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];
 
Signature · 1 line
1.7.7.6
#5 lore raw

2015-11-27 09:54, Chen Jing D:

Quoted 10 lines

From: "Chen Jing D(Mark)" <[email protected]>

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.

Applied, thanks