From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 650B91B4AA for ; Thu, 29 Nov 2018 14:22:14 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BFC7D3082129; Thu, 29 Nov 2018 13:22:13 +0000 (UTC) Received: from ktraynor.remote.csb (ovpn-117-230.ams2.redhat.com [10.36.117.230]) by smtp.corp.redhat.com (Postfix) with ESMTP id 522331001F50; Thu, 29 Nov 2018 13:22:11 +0000 (UTC) From: Kevin Traynor To: Rasesh Mody Cc: Stephen Hemminger , dpdk stable Date: Thu, 29 Nov 2018 13:20:17 +0000 Message-Id: <20181129132128.7609-17-ktraynor@redhat.com> In-Reply-To: <20181129132128.7609-1-ktraynor@redhat.com> References: <20181129132128.7609-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Thu, 29 Nov 2018 13:22:13 +0000 (UTC) Subject: [dpdk-stable] patch 'net/bnx2x: fix dynamic logging' has been queued to stable release 18.08.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Nov 2018 13:22:14 -0000 Hi, FYI, your patch has been queued to stable release 18.08.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/08/18. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. If the code is different (ie: not only metadata diffs), due for example to a change in context or macro names, please double check it. Thanks. Kevin Traynor --- >>From 416f760dbfe770be9207c9f25385c6b8bb77a2f6 Mon Sep 17 00:00:00 2001 From: Rasesh Mody Date: Thu, 8 Nov 2018 21:19:26 +0000 Subject: [PATCH] net/bnx2x: fix dynamic logging [ upstream commit 853c782496534446f60189be2516c4bb933f11df ] Use rte_log() rather than RTE_LOG() for dynamic logging. Rearrange dynamic log types to the top and configurable log types to bottom. Remove unused RTE_LIBRTE_BNX2X_DEBUG_TX_FREE Fixes: ba7eeb035a5f ("net/bnx2x: fix logging to include device name") Signed-off-by: Rasesh Mody Acked-by: Stephen Hemminger --- drivers/net/bnx2x/bnx2x_logs.h | 35 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/drivers/net/bnx2x/bnx2x_logs.h b/drivers/net/bnx2x/bnx2x_logs.h index 753bccdf4..f0cf69c16 100644 --- a/drivers/net/bnx2x/bnx2x_logs.h +++ b/drivers/net/bnx2x/bnx2x_logs.h @@ -11,12 +11,22 @@ extern int bnx2x_logtype_init; #define PMD_INIT_LOG(level, sc, fmt, args...) \ - RTE_LOG(level, PMD, \ + rte_log(RTE_LOG_ ## level, bnx2x_logtype_init, \ "[bnx2x_pmd: %s] %s() " fmt "\n", (sc)->devinfo.name, __func__, ##args) #define PMD_INIT_FUNC_TRACE(sc) PMD_INIT_LOG(DEBUG, sc, " >>") +extern int bnx2x_logtype_driver; +#define PMD_DRV_LOG_RAW(level, sc, fmt, args...) \ + rte_log(RTE_LOG_ ## level, bnx2x_logtype_driver, \ + "[%s:%d(%s)] " fmt, __func__, __LINE__, \ + (sc)->devinfo.name ? (sc)->devinfo.name : "", ## args) + +#define PMD_DRV_LOG(level, sc, fmt, args...) \ + PMD_DRV_LOG_RAW(level, sc, fmt "\n", ## args) + #ifdef RTE_LIBRTE_BNX2X_DEBUG_RX #define PMD_RX_LOG(level, fmt, args...) \ - RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args) + rte_log(RTE_LOG_ ## level, bnx2x_logtype_driver, \ + "%s(): " fmt "\n", __func__, ## args) #else #define PMD_RX_LOG(level, fmt, args...) do { } while(0) @@ -25,27 +35,14 @@ extern int bnx2x_logtype_init; #ifdef RTE_LIBRTE_BNX2X_DEBUG_TX #define PMD_TX_LOG(level, fmt, args...) \ - RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args) + rte_log(RTE_LOG_ ## level, bnx2x_logtype_driver, \ + "%s(): " fmt "\n", __func__, ## args) #else #define PMD_TX_LOG(level, fmt, args...) do { } while(0) #endif -#ifdef RTE_LIBRTE_BNX2X_DEBUG_TX_FREE -#define PMD_TX_FREE_LOG(level, fmt, args...) \ - RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args) -#else -#define PMD_TX_FREE_LOG(level, fmt, args...) do { } while(0) -#endif - -extern int bnx2x_logtype_driver; -#define PMD_DRV_LOG_RAW(level, sc, fmt, args...) \ - RTE_LOG(level, PMD, "[%s:%d(%s)] " fmt, __func__, __LINE__, \ - (sc)->devinfo.name ? (sc)->devinfo.name : "", ## args) - -#define PMD_DRV_LOG(level, sc, fmt, args...) \ - PMD_DRV_LOG_RAW(level, sc, fmt "\n", ## args) - #ifdef RTE_LIBRTE_BNX2X_DEBUG_PERIODIC #define PMD_DEBUG_PERIODIC_LOG(level, sc, fmt, args...) \ - RTE_LOG(level, PMD, "%s(%s): " fmt "\n", __func__, \ + rte_log(RTE_LOG_ ## level, bnx2x_logtype_driver, \ + "%s(%s): " fmt "\n", __func__, \ (sc)->devinfo.name ? (sc)->devinfo.name : "", ## args) #else -- 2.19.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-29 13:11:35.443701579 +0000 +++ 0016-net-bnx2x-fix-dynamic-logging.patch 2018-11-29 13:11:34.000000000 +0000 @@ -1,14 +1,15 @@ -From 853c782496534446f60189be2516c4bb933f11df Mon Sep 17 00:00:00 2001 +From 416f760dbfe770be9207c9f25385c6b8bb77a2f6 Mon Sep 17 00:00:00 2001 From: Rasesh Mody Date: Thu, 8 Nov 2018 21:19:26 +0000 Subject: [PATCH] net/bnx2x: fix dynamic logging +[ upstream commit 853c782496534446f60189be2516c4bb933f11df ] + Use rte_log() rather than RTE_LOG() for dynamic logging. Rearrange dynamic log types to the top and configurable log types to bottom. Remove unused RTE_LIBRTE_BNX2X_DEBUG_TX_FREE Fixes: ba7eeb035a5f ("net/bnx2x: fix logging to include device name") -Cc: stable@dpdk.org Signed-off-by: Rasesh Mody Acked-by: Stephen Hemminger