From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 08DA268A5 for ; Sat, 3 Dec 2016 11:47:09 +0100 (CET) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga105.fm.intel.com with ESMTP; 03 Dec 2016 02:47:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,735,1477983600"; d="scan'208";a="38554809" Received: from dpdk7.bj.intel.com ([172.16.182.76]) by fmsmga006.fm.intel.com with ESMTP; 03 Dec 2016 02:47:08 -0800 From: Qiming Yang To: dev@dpdk.org Cc: Qiming Yang Date: Sat, 3 Dec 2016 18:43:03 +0800 Message-Id: <1480761783-36467-4-git-send-email-qiming.yang@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1480761783-36467-1-git-send-email-qiming.yang@intel.com> References: <1480761783-36467-1-git-send-email-qiming.yang@intel.com> Subject: [dpdk-dev] [PATCH 3/3] net/ixgbe: optimize Rx/Tx log message level X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2016 10:47:10 -0000 Signed-off-by: Qiming Yang --- 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