From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) by dpdk.org (Postfix) with ESMTP id 2B7761B9B8 for ; Fri, 14 Dec 2018 22:58:03 +0100 (CET) Received: by mail-pf1-f196.google.com with SMTP id w73so3428870pfk.10 for ; Fri, 14 Dec 2018 13:58:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Wan64q9p42nRiRrPMX9Qu5fc21bo0JzPIBM8vxYNvnQ=; b=lJ/9XB6hmFmiwEqHiSnqY0vQn+z7DbTJkU3mibBkh4EcmmZqf5fO8ePf0TcuGzroom dIEUCkPsgnsVsuBYbFAEHB8ZQhfH1f5X5RnkHq0Nj3o+B/66NFf7VuYWuz66Bbtlawax vYcHuYfvbfa1VKFQuqHE2iYBkmru4UFchPKsGBXPC2r8xmh+Ky4V4/lGUIIWU1OQRTDk 8odoZ4SV+d/mMSs4xoN4mXCE3m+Jlz07Xzr3lA4Vyj/2ojJmOsinjvw8p+Y74cCZzcN5 n/SeB3EBW6pMgKe+oGWYVRQJh8qwETk4XBtGHkfiLn0EZXRPRGT0puu27mWfFa8wK035 XDKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Wan64q9p42nRiRrPMX9Qu5fc21bo0JzPIBM8vxYNvnQ=; b=JhOJVl4VS9ok24saqlNs62iwzfpbLW3vVMZZnry98gnRO6O9eYzU4D+eto5ztogx7A Kh83vbEHAXDDweYW3zKIypJ2dlgN5wILgga76FecVUlgmamiYLNQXko54OLj5I5iRIws i7X3uR8IuEKn7cgiskNWxkXKKiCidUNzEUEfsfhw05/s3RBvlu1W94nW6QB11FxjlILe wDCGW2kvLB0P1OJK6cFW7W3L12irey2rHJjHYuERnrvj2kK41Ui1IRY9iDgw7F+2SWhy mjFWOyBUFYuLzToj1mzHIupOKdtDDayTdSgqKI+sRTJyNfR4rtr4TWFdcZcx/BZenpWO SLzw== X-Gm-Message-State: AA+aEWbiQlWke2QzIYEDWbM/0MzFD2CiygOkj4wQfFOQYNVhrLDSUWy8 /3Uhm+YOjP1QVAf04BFVwDYbmA== X-Google-Smtp-Source: AFSGD/UQ9zzRU8Y53OF0V83gRSewATsAHRlRfvvPui7AAiovR3q1ps2kGY5ek4P43jPvIwHRyZP7jg== X-Received: by 2002:a62:6143:: with SMTP id v64mr4412011pfb.142.1544824682042; Fri, 14 Dec 2018 13:58:02 -0800 (PST) Received: from xeon-e3 (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id y6sm12383521pfd.104.2018.12.14.13.58.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 14 Dec 2018 13:58:01 -0800 (PST) Date: Fri, 14 Dec 2018 13:57:59 -0800 From: Stephen Hemminger To: Jeff Shaw Cc: Mattias =?UTF-8?B?UsO2bm5ibG9t?= , dev@dpdk.org Message-ID: <20181214135759.02f97f36@xeon-e3> In-Reply-To: <20181214212007.GA6612@ae13-28.jf.intel.com> References: <20181214163827.9403-1-jeffrey.b.shaw@intel.com> <20181214190713.GB9964@ae13-28.jf.intel.com> <3a573b56-6ea0-812c-4641-830fbd3c59cc@ericsson.com> <20181214125055.1153c38c@xeon-e3> <20181214212007.GA6612@ae13-28.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] eal: simplify 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: Fri, 14 Dec 2018 21:58:03 -0000 On Fri, 14 Dec 2018 13:20:07 -0800 Jeff Shaw wrote: > On Fri, Dec 14, 2018 at 12:50:55PM -0800, Stephen Hemminger wrote: > > Use rte_log directly, eliminating no longer used rte_pmd_dev_trace > > function. This removes variable length array which is problem on > > Windows and other compilers not doing C99. > > > > Also, drop unused RTE_PROC_PRIMARY macros. > > > > Reported-by: Jeff Shaw > > Signed-off-by: Stephen Hemminger > > --- > > lib/librte_eal/common/include/rte_dev.h | 43 ++----------------------- > > 1 file changed, 3 insertions(+), 40 deletions(-) > > > > diff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h > > index a9724dc9181c..e496da440028 100644 > > --- a/lib/librte_eal/common/include/rte_dev.h > > +++ b/lib/librte_eal/common/include/rte_dev.h > > @@ -43,54 +43,17 @@ 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); > > - } > > -} > > - > > Will this break applications that try to use this function? Because it is not > a documented function, is there no guarantee it will be present? It shouldn't be visible as part of EAL. Any code that was built that had old MACRO would still run (ABI compatible) because it was inline.