From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by dpdk.org (Postfix) with ESMTP id E184B4C77 for ; Tue, 26 Feb 2019 22:34:33 +0100 (CET) Received: by mail-pl1-f195.google.com with SMTP id y5so6849222plk.8 for ; Tue, 26 Feb 2019 13:34:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=tM2FBJtCGqLbR2tDEn0Rts17RV6MzwcUez7IXfhTXIA=; b=rrid/WcPNoY4D7QDW5Vh1OGf76bziVSAKmrbWZNGLYUCKWEKdiMbkixLUwNG6rZyJg kypUbks3NePtnMe/fb1xWvIztOV3yWO/O6qYEPu+hBIm3nkqx4wVsYfgkBAGvcnV4MhX NQFbhKzXLKJ6nho6K87TINnvLB3/ZDlID8xIYxsVuygv/Dyvp2ivMYV8kYijSXc5dtjs ZvQwvjhrZlFxRJQwqHGRLeHjJ2ZP/v2AidHvjl9zu7ziZIRyz7oyJmm0bTi72gebZEpU bkpNW46/yf522eoicNcFXQtDD3ghYTK/HKcPXzBaPV5nOoCfdLmefYwMVIP1Bkpr3Ac+ 3+Ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=tM2FBJtCGqLbR2tDEn0Rts17RV6MzwcUez7IXfhTXIA=; b=lvq/ZyFapI39lJv3OP9KyA6EPtmL7K9SOpm/i4hZd6fZRHxRc294tiMNesILy19oMf 8vHgCZB63KEqx886igyQBwZwAA1yNHZfV+X4KVs09WOeFrORryF5zKWpjv7QBSFGx4VJ Xhdn9aA+13JTd9Q/HiRa+08Jawm+5r6bdG1ShYdHz3zc8TbrqCZvVGLsLZ29Zcuteiea Xk5uxKA+CH8IjoPpy6LopP8XQMnzJPGkEAWNcwK2UlRh+zQSCbu3ZauPFTRsuNffha3k dDElrKkgSkQvFCvyqPQcxUQMSLIOvtR8n2yr4NB78NFAqquB+A5SMIJx+YDcsS8f0F+i 4bsw== X-Gm-Message-State: AHQUAuaHs3sXQqAFQE8Uwy/oumqeTmwHocJ5hT+KbB3Q8c7NFql7/6pL g/l38TZm6EkZrcuxmuDNpYYL/S6OF1A= X-Google-Smtp-Source: AHgI3IZQDZhWiJfJEdafZQxMFdHhNM1hot/Bk0fptCvMAIYGeCGo8hr9WLriiPpV3YCNJBwxlTNWJA== X-Received: by 2002:a17:902:22f:: with SMTP id 44mr683891plc.249.1551216872748; Tue, 26 Feb 2019 13:34:32 -0800 (PST) Received: from shemminger-XPS-13-9360.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id h75sm22191108pfd.150.2019.02.26.13.34.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Feb 2019 13:34:31 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Tue, 26 Feb 2019 13:34:23 -0800 Message-Id: <20190226213424.10567-5-stephen@networkplumber.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190226213424.10567-1-stephen@networkplumber.org> References: <20190226213424.10567-1-stephen@networkplumber.org> Subject: [dpdk-dev] [PATCH 4/5] eal: remove RTE_PMD_DEBUG_TRACE 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: Tue, 26 Feb 2019 21:34:34 -0000 The RTE_PMD_DEBUG_TRACE was only enabled for EVENTDEV_DEBUG and that configuration is now handled by RTE_EDEV_LOG macros. Signed-off-by: Stephen Hemminger --- lib/librte_eal/common/include/rte_dev.h | 41 ++----------------------- 1 file changed, 2 insertions(+), 39 deletions(-) diff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h index 5e16a4f86b70..3cad4bce57bf 100644 --- a/lib/librte_eal/common/include/rte_dev.h +++ b/lib/librte_eal/common/include/rte_dev.h @@ -43,52 +43,15 @@ typedef void (*rte_dev_event_cb_fn)(const char *device_name, enum rte_dev_event_type event, void *cb_arg); -__attribute__((format(printf, 2, 0))) -static inline void -rte_pmd_debug_trace(const char *func_name, const char *fmt, ...) -{ - va_list ap; - - va_start(ap, fmt); - - { - char buffer[vsnprintf(NULL, 0, fmt, ap) + 1]; - - va_end(ap); - - va_start(ap, fmt); - vsnprintf(buffer, sizeof(buffer), fmt, ap); - va_end(ap); - - rte_log(RTE_LOG_ERR, RTE_LOGTYPE_PMD, "%s: %s", - func_name, buffer); - } -} - -/* - * Enable RTE_PMD_DEBUG_TRACE() when at least one component relying on the - * RTE_*_RET() macros defined below is compiled in debug mode. - */ -#if defined(RTE_LIBRTE_EVENTDEV_DEBUG) -#define RTE_PMD_DEBUG_TRACE(...) \ - rte_pmd_debug_trace(__func__, __VA_ARGS__) -#else -#define RTE_PMD_DEBUG_TRACE(...) (void)0 -#endif - /* Macros to check for invalid function pointers */ #define RTE_FUNC_PTR_OR_ERR_RET(func, retval) do { \ - if ((func) == NULL) { \ - RTE_PMD_DEBUG_TRACE("Function not supported\n"); \ + if ((func) == NULL) \ return retval; \ - } \ } while (0) #define RTE_FUNC_PTR_OR_RET(func) do { \ - if ((func) == NULL) { \ - RTE_PMD_DEBUG_TRACE("Function not supported\n"); \ + if ((func) == NULL) \ return; \ - } \ } while (0) /** -- 2.17.1