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 4722145946; Mon, 9 Sep 2024 09:23:22 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 33EAB40A79; Mon, 9 Sep 2024 09:23:22 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 6219840A77 for ; Mon, 9 Sep 2024 09:23:21 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 1AF6A50 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1725866600; bh=8ZFeEKerLLmhK4HmOqLXtkN/YSqSiWwQ1wGDYxKpxuo=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=X4ugI7hPAaZERdHwOsmteBSX4ayQnaaNQexspdX434ka2EnuiumLobdvyC3BmW4Gs nqpkFNypplUu7fRV6CptYazy9k0vzfLQ30RN9iSLF2RbdTZfq/roPvId36dt+J0gzP 4vhgjW7e/rpCFWm0Deq9JkS/+0GAAK8g7pjcugTI= Received: from [192.168.38.17] (aros.oktetlabs.ru [192.168.38.17]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 1AF6A50; Mon, 9 Sep 2024 10:23:20 +0300 (MSK) Message-ID: Date: Mon, 9 Sep 2024 10:23:10 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 11/11] drivers: use per line logging in helpers To: David Marchand Cc: dev@dpdk.org, Thomas Monjalon , Nicolas Chautru , Gagandeep Singh , Hemant Agrawal , Parav Pandit , Xueming Li , Nipun Gupta , Nikhil Agarwal , Sachin Saxena , Rosen Xu , Tomasz Duszynski , Chengwen Feng , Long Li , Wei Hu , Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao , Harman Kalra , Anoob Joseph , Jingjing Wu , Chaoyong He , Nagadheeraj Rottela , Srikanth Jampala , Kai Ji , Lee Daly , Pablo de Lara , Fan Zhang , Ashish Gupta , Zhangfei Gao , Sunila Sahu , Jack Bond-Preston , Ajit Khaparde , Raveendra Padasalagi , Vikas Gupta , Michael Shamis , Liron Himi , Jay Zhou , Bruce Richardson , Kevin Laatz , Conor Walsh , Gowrishankar Muthukrishnan , Vidya Sagar Velumuri , =?UTF-8?Q?Mattias_R=C3=B6nnblom?= , Jerin Jacob , Pavan Nikhilesh , Liang Ma , Peter Mccarthy , Harry van Haaren , Elena Agostini , "John W. Linville" , Ciara Loftus , Maryam Tahhan , Igor Russkikh , Steven Webster , Matt Peters , Selwin Sebastian , Julien Aube , Somnath Kotur , Wathsala Vithanage , Konstantin Ananyev , Shai Brandes , Evgeny Schemeilin , Ron Beider , Amit Bernstein , Wajeeh Atrash , Apeksha Gupta , John Daley , Hyong Youb Kim , Gaetan Rivet , Jeroen de Borst , Rushil Gupta , Joshua Washington , Ziyang Xuan , Xiaoyun Wang , Jie Hai , Yisen Zhuang , Jakub Grajciar , Matan Azrad , Viacheslav Ovsiienko , Zyta Szpak , Martin Spinler , Jiawen Wu , Tetsuya Mukawa , Vamsi Attunuru , Cristian Dumitrescu , Stephen Hemminger , Maciej Czekaj , Jian Wang , Maxime Coquelin , Chenbo Xia , Jochen Behrens , Jakub Palider References: <20240907145433.1479091-1-david.marchand@redhat.com> <20240907145433.1479091-12-david.marchand@redhat.com> <28656e64-5684-452b-8df8-f60d7ce44e02@oktetlabs.ru> Content-Language: en-US From: Andrew Rybchenko Organization: OKTET Labs In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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 9/9/24 09:55, David Marchand wrote: > On Sun, Sep 8, 2024 at 10:55 AM Andrew Rybchenko > wrote: >> >> On 9/7/24 17:54, David Marchand wrote: >>> Use RTE_LOG_LINE in existing macros that append a \n. >>> >>> Signed-off-by: David Marchand >> >> [snip] >> >>> diff --git a/drivers/common/sfc_efx/sfc_efx_log.h b/drivers/common/sfc_efx/sfc_efx_log.h >>> index 1519ebdc17..b41ef3490b 100644 >>> --- a/drivers/common/sfc_efx/sfc_efx_log.h >>> +++ b/drivers/common/sfc_efx/sfc_efx_log.h >>> @@ -12,11 +12,10 @@ >>> >>> /** Generic driver log type */ >>> extern int sfc_efx_logtype; >>> +#define RTE_LOGTYPE_SFC_EFX sfc_efx_logtype >>> >>> /** Log message, add a prefix and a line break */ >>> #define SFC_EFX_LOG(level, ...) \ >>> - rte_log(RTE_LOG_ ## level, sfc_efx_logtype, \ >>> - RTE_FMT("sfc_efx: " RTE_FMT_HEAD(__VA_ARGS__ ,) "\n", \ >> >> Is "sfc_efx: " prefix dropped intentionally? Or should >> RTE_LOG_LINE_PREFIX be used? > > By moving to the RTE_LOG macro (and friends), a prefix is > automatically appended via the log type. > #define RTE_LOG(l, t, ...) \ > rte_log(RTE_LOG_ ## l, \ > RTE_LOGTYPE_ ## t, # t ": " __VA_ARGS__) > > So here, the logs prefix is not dropped, but changed from sfc_efx: to SFC_EFX: > > It is possible to keep it unchanged by defining RTE_LOGTYPE_sfc_efx is > you want to stick to it. Many thanks for explanation. I've lost it from my view on reviewing. for common/sfc_efx: Acked-by: Andrew Rybchenko