All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qiming Yang <qiming.yang@intel.com>
To: dev@dpdk.org
Cc: Qiming Yang <qiming.yang@intel.com>
Subject: [PATCH 3/3] net/ixgbe: optimize Rx/Tx log message level
Date: Sat,  3 Dec 2016 18:43:03 +0800	[thread overview]
Message-ID: <1480761783-36467-4-git-send-email-qiming.yang@intel.com> (raw)
In-Reply-To: <1480761783-36467-1-git-send-email-qiming.yang@intel.com>

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
---
 drivers/net/ixgbe/ixgbe_logs.h |  7 +++++++
 drivers/net/ixgbe/ixgbe_rxtx.c | 14 +++++++-------
 2 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_logs.h b/drivers/net/ixgbe/ixgbe_logs.h
index 53ba42d..68e47fd 100644
--- a/drivers/net/ixgbe/ixgbe_logs.h
+++ b/drivers/net/ixgbe/ixgbe_logs.h
@@ -50,6 +50,13 @@
 #define PMD_RX_LOG(level, fmt, args...) do { } while(0)
 #endif
 
+#ifdef RTE_LIBRTE_IXGBE_DEBUG_RX_FREE
+#define PMD_RX_FREE_LOG(level, fmt, args...) \
+	RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
+#else
+#define PMD_RX_FREE_LOG(level, fmt, args...) do { } while (0)
+#endif
+
 #ifdef RTE_LIBRTE_IXGBE_DEBUG_TX
 #define PMD_TX_LOG(level, fmt, args...) \
 	RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index b2d9f45..b52c793 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -1560,7 +1560,7 @@ rx_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 		if (ixgbe_rx_alloc_bufs(rxq, true) != 0) {
 			int i, j;
 
-			PMD_RX_LOG(DEBUG, "RX mbuf alloc failed port_id=%u "
+			PMD_RX_LOG(ERR, "RX mbuf alloc failed port_id=%u "
 				   "queue_id=%u", (unsigned) rxq->port_id,
 				   (unsigned) rxq->queue_id);
 
@@ -1701,7 +1701,7 @@ ixgbe_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 
 		nmb = rte_mbuf_raw_alloc(rxq->mb_pool);
 		if (nmb == NULL) {
-			PMD_RX_LOG(DEBUG, "RX mbuf alloc failed port_id=%u "
+			PMD_RX_LOG(ERR, "RX mbuf alloc failed port_id=%u "
 				   "queue_id=%u", (unsigned) rxq->port_id,
 				   (unsigned) rxq->queue_id);
 			rte_eth_devices[rxq->port_id].data->rx_mbuf_alloc_failed++;
@@ -1799,7 +1799,7 @@ ixgbe_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 	 */
 	nb_hold = (uint16_t) (nb_hold + rxq->nb_rx_hold);
 	if (nb_hold > rxq->rx_free_thresh) {
-		PMD_RX_LOG(DEBUG, "port_id=%u queue_id=%u rx_tail=%u "
+		PMD_RX_FREE_LOG(DEBUG, "port_id=%u queue_id=%u rx_tail=%u "
 			   "nb_hold=%u nb_rx=%u",
 			   (unsigned) rxq->port_id, (unsigned) rxq->queue_id,
 			   (unsigned) rx_id, (unsigned) nb_hold,
@@ -1972,7 +1972,7 @@ ixgbe_recv_pkts_lro(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts,
 		if (!bulk_alloc) {
 			nmb = rte_mbuf_raw_alloc(rxq->mb_pool);
 			if (nmb == NULL) {
-				PMD_RX_LOG(DEBUG, "RX mbuf alloc failed "
+				PMD_RX_LOG(ERR, "RX mbuf alloc failed "
 						  "port_id=%u queue_id=%u",
 					   rxq->port_id, rxq->queue_id);
 
@@ -1989,7 +1989,7 @@ ixgbe_recv_pkts_lro(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts,
 						    next_rdt);
 				nb_hold -= rxq->rx_free_thresh;
 			} else {
-				PMD_RX_LOG(DEBUG, "RX bulk alloc failed "
+				PMD_RX_FREE_LOG(DEBUG, "RX bulk alloc failed "
 						  "port_id=%u queue_id=%u",
 					   rxq->port_id, rxq->queue_id);
 
@@ -2152,7 +2152,7 @@ ixgbe_recv_pkts_lro(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts,
 	 * hardware point of view...
 	 */
 	if (!bulk_alloc && nb_hold > rxq->rx_free_thresh) {
-		PMD_RX_LOG(DEBUG, "port_id=%u queue_id=%u rx_tail=%u "
+		PMD_RX_FREE_LOG(DEBUG, "port_id=%u queue_id=%u rx_tail=%u "
 			   "nb_hold=%u nb_rx=%u",
 			   rxq->port_id, rxq->queue_id, rx_id, nb_hold, nb_rx);
 
@@ -4763,7 +4763,7 @@ ixgbe_setup_loopback_link_82599(struct ixgbe_hw *hw)
 	if (ixgbe_verify_lesm_fw_enabled_82599(hw)) {
 		if (hw->mac.ops.acquire_swfw_sync(hw, IXGBE_GSSR_MAC_CSR_SM) !=
 				IXGBE_SUCCESS) {
-			PMD_INIT_LOG(ERR, "Could not enable loopback mode");
+			PMD_INIT_LOG(WARNING, "Could not enable loopback mode");
 			/* ignore error */
 			return;
 		}
-- 
2.7.4

  parent reply	other threads:[~2016-12-03 10:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-03 10:43 [PATCH 0/3] net: optimize Rx/Tx log message level Qiming Yang
2016-12-03 10:43 ` [PATCH 1/3] net/e1000: " Qiming Yang
2016-12-06 22:41   ` Stephen Hemminger
2016-12-03 10:43 ` [PATCH 2/3] net/i40e: " Qiming Yang
2016-12-03 10:43 ` Qiming Yang [this message]
2016-12-06 10:51 ` [PATCH 0/3] net: " Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1480761783-36467-4-git-send-email-qiming.yang@intel.com \
    --to=qiming.yang@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.