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 D447D45946; Mon, 9 Sep 2024 08:55:57 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 76B89402BE; Mon, 9 Sep 2024 08:55:57 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 29230402A8 for ; Mon, 9 Sep 2024 08:55:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725864954; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AhZdaIwo7sNIdFGEO9Z/Is+xJcWpOuavTZBg6iy33w4=; b=bhWJJGoTCkR0v+lCPdX4UbSAQTT2d2+v5RBk/8yXzHzLZzCFAX0D4jzh9pejGB7e4kwv9W zUnSz/KcC9h01D3+xcCWiae3XOZ5w+v8t0vzLbCUKqG2l9QjnJ2HhrmYsajcggg2bxJe/p FZmV4tB3bx5xflFeQrwQen0boJ/qESw= Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-394-47dKYSuyOyaz4CNmOP3V1Q-1; Mon, 09 Sep 2024 02:55:53 -0400 X-MC-Unique: 47dKYSuyOyaz4CNmOP3V1Q-1 Received: by mail-lj1-f197.google.com with SMTP id 38308e7fff4ca-2f6575fbedeso29994191fa.0 for ; Sun, 08 Sep 2024 23:55:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725864952; x=1726469752; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AhZdaIwo7sNIdFGEO9Z/Is+xJcWpOuavTZBg6iy33w4=; b=Ud3rpZzY63zbDlTJPnklakKuvmZq968q7w2F1uDljJRKhJflg1bpF/UGyPLTy32mg/ 43J9IINd1ixU2PBd0EsHud+n+tsQCg7sZYBMrSMEazAklZ4Ur9qBXxFNHI+HX82i5KQT JjqdWQ3iSiVHLq8gxautdh6JWAZiAb6C+4m5z0cGq8CMll0i6NDP9xVYIgjFDm35zhq0 was5Fj90TojMbWTHfxmqelQ7seLTPJfG3dv27CmPNmuwU7KpCBDTdrSJPridQVhSvcLi cCFakTaIO79KPpDq3q9pvC4NzZi1iSBJbtxQ7AXS5El24GucCRpSDCBVmWpaGWg9+n1Z bpfQ== X-Gm-Message-State: AOJu0YxkczqIVukSbeh2P34F3i/yh7vMrogAf4zAMxOLbF5k+ZEAYzFb ejStmIddEpJW5EIYcukB4WAJVqmLhY991qQt4BBEnf3giqZjbv14YfqxUGbvs2Voh+7gKbmurOG KilWnqy9RndkA84/21JMhBWMLxJIA6QDC6iZUYtzuwa6QAovNh37NniWQZn6wgBNdagFsZi4aMD ajAa68HohyZriK9xA= X-Received: by 2002:a05:6512:3b2c:b0:536:628d:20e with SMTP id 2adb3069b0e04-536628d0309mr1461265e87.29.1725864951727; Sun, 08 Sep 2024 23:55:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHd0eRQRdooYbQ7Vdyim4wNzzTsMXj+xfWqMGGLtjzX8pIpwHuiQnA951Rkngq3i1s8v3fBzNbs9Vr+IEt2aEc= X-Received: by 2002:a05:6512:3b2c:b0:536:628d:20e with SMTP id 2adb3069b0e04-536628d0309mr1461183e87.29.1725864951113; Sun, 08 Sep 2024 23:55:51 -0700 (PDT) MIME-Version: 1.0 References: <20240907145433.1479091-1-david.marchand@redhat.com> <20240907145433.1479091-12-david.marchand@redhat.com> <28656e64-5684-452b-8df8-f60d7ce44e02@oktetlabs.ru> In-Reply-To: <28656e64-5684-452b-8df8-f60d7ce44e02@oktetlabs.ru> From: David Marchand Date: Mon, 9 Sep 2024 08:55:39 +0200 Message-ID: Subject: Re: [PATCH 11/11] drivers: use per line logging in helpers To: Andrew Rybchenko 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 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Sun, Sep 8, 2024 at 10:55=E2=80=AFAM 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_E= FX: It is possible to keep it unchanged by defining RTE_LOGTYPE_sfc_efx is you want to stick to it. --=20 David Marchand