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 9633F58CF for ; Sat, 3 Dec 2016 11:47:08 +0100 (CET) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga105.fm.intel.com with ESMTP; 03 Dec 2016 02:47:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,735,1477983600"; d="scan'208";a="38554798" Received: from dpdk7.bj.intel.com ([172.16.182.76]) by fmsmga006.fm.intel.com with ESMTP; 03 Dec 2016 02:47:06 -0800 From: Qiming Yang To: dev@dpdk.org Cc: Qiming Yang Date: Sat, 3 Dec 2016 18:43:01 +0800 Message-Id: <1480761783-36467-2-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 1/3] net/e1000: 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:09 -0000 Signed-off-by: Qiming Yang --- config/common_base | 1 + drivers/net/e1000/e1000_logs.h | 7 +++++++ drivers/net/e1000/em_rxtx.c | 10 +++++----- drivers/net/e1000/igb_rxtx.c | 10 +++++----- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/config/common_base b/config/common_base index 4bff83a..46e9797 100644 --- a/config/common_base +++ b/config/common_base @@ -143,6 +143,7 @@ CONFIG_RTE_LIBRTE_EM_PMD=y CONFIG_RTE_LIBRTE_IGB_PMD=y CONFIG_RTE_LIBRTE_E1000_DEBUG_INIT=n CONFIG_RTE_LIBRTE_E1000_DEBUG_RX=n +CONFIG_RTE_LIBRTE_E1000_DEBUG_RX_FREE=n CONFIG_RTE_LIBRTE_E1000_DEBUG_TX=n CONFIG_RTE_LIBRTE_E1000_DEBUG_TX_FREE=n CONFIG_RTE_LIBRTE_E1000_DEBUG_DRIVER=n diff --git a/drivers/net/e1000/e1000_logs.h b/drivers/net/e1000/e1000_logs.h index 81e7bf5..407c245 100644 --- a/drivers/net/e1000/e1000_logs.h +++ b/drivers/net/e1000/e1000_logs.h @@ -50,6 +50,13 @@ #define PMD_RX_LOG(level, fmt, args...) do { } while(0) #endif +#ifdef RTE_LIBRTE_E1000_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_E1000_DEBUG_TX #define PMD_TX_LOG(level, fmt, args...) \ RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args) diff --git a/drivers/net/e1000/em_rxtx.c b/drivers/net/e1000/em_rxtx.c index 41f51c0..673af85 100644 --- a/drivers/net/e1000/em_rxtx.c +++ b/drivers/net/e1000/em_rxtx.c @@ -721,7 +721,7 @@ eth_em_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); @@ -806,7 +806,7 @@ eth_em_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, @@ -901,7 +901,7 @@ eth_em_recv_scattered_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++; @@ -1051,7 +1051,7 @@ eth_em_recv_scattered_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, @@ -1391,7 +1391,7 @@ eth_em_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id) uint32_t desc = 0; if (rx_queue_id >= dev->data->nb_rx_queues) { - PMD_RX_LOG(DEBUG, "Invalid RX queue_id=%d", rx_queue_id); + PMD_RX_LOG(ERR, "Invalid RX queue_id=%d", rx_queue_id); return 0; } diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c index dbd37ac..b8e67c7 100644 --- a/drivers/net/e1000/igb_rxtx.c +++ b/drivers/net/e1000/igb_rxtx.c @@ -832,7 +832,7 @@ eth_igb_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++; @@ -919,7 +919,7 @@ eth_igb_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, @@ -1015,7 +1015,7 @@ eth_igb_recv_scattered_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++; @@ -1174,7 +1174,7 @@ eth_igb_recv_scattered_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, @@ -1830,7 +1830,7 @@ igb_is_vmdq_supported(const struct rte_eth_dev *dev) case e1000_i210: case e1000_i211: default: - PMD_INIT_LOG(ERR, "Cannot support VMDq feature"); + PMD_INIT_LOG(WARNING, "Cannot support VMDq feature"); return 0; } } -- 2.7.4