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 AC02F41C58; Fri, 10 Feb 2023 03:03:52 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 56F5B40EE6; Fri, 10 Feb 2023 03:03:52 +0100 (CET) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by mails.dpdk.org (Postfix) with ESMTP id 5DDAC40EE3 for ; Fri, 10 Feb 2023 03:03:50 +0100 (CET) Received: from dggpeml500024.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4PCcRw5CzRzJsGX; Fri, 10 Feb 2023 10:02:04 +0800 (CST) Received: from [10.67.100.224] (10.67.100.224) by dggpeml500024.china.huawei.com (7.185.36.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Fri, 10 Feb 2023 10:03:47 +0800 Subject: Re: [PATCH v3 03/16] efd: replace RTE_LOGTYPE_EFD with local type To: Stephen Hemminger , CC: Byron Marohn , Yipeng Wang References: <20230207204151.1503491-1-stephen@networkplumber.org> <20230210010724.890413-1-stephen@networkplumber.org> <20230210010724.890413-4-stephen@networkplumber.org> From: fengchengwen Message-ID: <150b6b50-8c3a-c253-8aa0-7c4780e709d8@huawei.com> Date: Fri, 10 Feb 2023 10:03:47 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <20230210010724.890413-4-stephen@networkplumber.org> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.100.224] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpeml500024.china.huawei.com (7.185.36.10) X-CFilter-Loop: Reflected 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 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) Thanks. > return NULL; > } > ...