From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5104641C58; Fri, 10 Feb 2023 03:47:28 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 38EAB40EE6; Fri, 10 Feb 2023 03:47:28 +0100 (CET) Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) by mails.dpdk.org (Postfix) with ESMTP id 5C7BF40EE3 for ; Fri, 10 Feb 2023 03:47:27 +0100 (CET) Received: by mail-pf1-f176.google.com with SMTP id t17so2671276pfj.0 for ; Thu, 09 Feb 2023 18:47:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=xmSmZK2b8hHKt2JE2NOAuJjHWvb3/ngYpfwIn0Aqmwg=; b=kkcKGa9sX5EAEyBsu8vdqs72V219ETKrQZJIAIAnZ3c/SEibEFE/A23ZlOSCp4q1Pn QZjh0H1fWoJcsE0+5BfRxUkFaS+sHmy/FEI5hZBqH//v0j0YDLiq9QrKlKRdUmL9rtZh utCPctDeOdOelThWNDKL/YwOiIVw6MxwV7201wi+rqnl/JUK0b19OI1iQcXTRtuEPm8X lE+LGKsSxz6JzFLdsHAoT5Hi4McSjvEd4GzRr5nI+EAg3ukqChU7I9RuUYXEZh0jsVp+ xk+3Kko91VrfZHhuAX1hHaXecCbeaGfQD9bnVYHVv1kkaN4QmXxiEnB4MVTKTXY88v/f UmEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xmSmZK2b8hHKt2JE2NOAuJjHWvb3/ngYpfwIn0Aqmwg=; b=VoFx7OUGEE+Rh6gS9ZDsQ26FYX73HKaAF0YLC2/syfWMIcQDWyV4fIJrP3HfD5r0E1 B6w+UVkuDgUjxxyl2pr7QKC3AHyD38NQ0/f4frmJyCi2HGaMBqL2d+7b8inTT3wc+hxu 8t9YY/YkqgVgWEduln7LzqEkU+znepF9ux9pKr1KxHZEU4Z4bS90pmnLNn5HowAx0Fbf 01SmvKQ6lAL6aZE6I1nodPmlj0a1Qq1SZJ1vGmzCxf2Qev63YVCFeqIWXyct2RrkSd7C ZXuobhuSPa/4pXXXGRAau7YSAHfNSAtnnaUNt0HWgk/kPcs35MCQzxz7EpjBXuJTvePH zYHQ== X-Gm-Message-State: AO0yUKW56JR6vaoWEL6p3q78dCE0kpzaWvo4EF+a5YhXehVqtGw9VQeK FyV+TdPgklmGlZH2RLf1NGP2tA== X-Google-Smtp-Source: AK7set8Juvu5j9/ixhtZoLqsqw7/SHZzjUtEH8xxOBG4ds651EVOtdVv5Xd0wFySP3zdkBSliDgQvA== X-Received: by 2002:a62:1415:0:b0:5a8:4ba7:5841 with SMTP id 21-20020a621415000000b005a84ba75841mr5628345pfu.25.1675997246580; Thu, 09 Feb 2023 18:47:26 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id v23-20020aa78097000000b00587c11bc925sm2107632pff.168.2023.02.09.18.47.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Feb 2023 18:47:26 -0800 (PST) Date: Thu, 9 Feb 2023 18:47:24 -0800 From: Stephen Hemminger To: fengchengwen Cc: , Byron Marohn , Yipeng Wang Subject: Re: [PATCH v3 03/16] efd: replace RTE_LOGTYPE_EFD with local type Message-ID: <20230209184724.790f7b7f@hermes.local> In-Reply-To: <150b6b50-8c3a-c253-8aa0-7c4780e709d8@huawei.com> References: <20230207204151.1503491-1-stephen@networkplumber.org> <20230210010724.890413-1-stephen@networkplumber.org> <20230210010724.890413-4-stephen@networkplumber.org> <150b6b50-8c3a-c253-8aa0-7c4780e709d8@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Fri, 10 Feb 2023 10:03:47 +0800 fengchengwen wrote: > On 2023/2/10 9:07, Stephen Hemminger wrote: > > Replace all uses of global logtype with a local log type. > > Do not break message formats across source lines. > > > > Signed-off-by: Stephen Hemminger > > --- > > ... > > > }; > > EAL_REGISTER_TAILQ(rte_efd_tailq); > > > > +RTE_LOG_REGISTER_DEFAULT(efd_logtype, INFO); > > + > > +#define EFD_LOG(level, fmt, args...) \ > > + rte_log(RTE_LOG_ ## level, efd_logtype, "%s(): " fmt "\n", __func__, ##args) > > + > > /** Internal permutation array used to shuffle bins into pseudorandom groups */ > > const uint32_t efd_bin_to_group[EFD_CHUNK_NUM_BIN_TO_GROUP_SETS][EFD_CHUNK_NUM_BINS] = { > > { > > @@ -509,13 +514,12 @@ rte_efd_create(const char *name, uint32_t max_num_rules, uint32_t key_len, > > efd_list = RTE_TAILQ_CAST(rte_efd_tailq.head, rte_efd_list); > > > > if (online_cpu_socket_bitmask == 0) { > > - RTE_LOG(ERR, EFD, "At least one CPU socket must be enabled " > > - "in the bitmask\n"); > > + EFD_LOG(ERR, "At least one CPU socket must be enabled in the bitmask"); > > Hi Stephen, > > Original output will be: EFD: At least one CPU ... > and new output will be: rte_efd_create(): At least one CPU ... > > The new output don't have EFD (module or lib name), logs of the EFD module cannot be easily > filtered, althought new have function name, but will may not contains module name. > > Suggest add module name in EFD_LOG: > #define EFD_LOG(level, fmt, args...) \ > rte_log(RTE_LOG_ ## level, efd_logtype, "EFD: %s(): " fmt "\n", __func__, ##args) Thought that the function name was more precise that the module name. It is what most drivers do.