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 C1C99439BE; Thu, 25 Jan 2024 09:13:58 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 61CFB402E1; Thu, 25 Jan 2024 09:13:58 +0100 (CET) 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 DBEA04029B for ; Thu, 25 Jan 2024 09:13:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1706170436; 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=lArrfBxO341CVzJLmO5eAIj9KF+/vmgiFnoaoLZ23T0=; b=LpYzTfFD460U6UvzLhJzyAzXTobE81qKY4gHMZQoem5q0iQWa0VbhHuHLEwQzkMDyU2GBc Dz1qZLyVcoTe85aiZoHob7Vucmxr8VPKRGyxJsOm7oR5It6PL1cl8ZiIeKR28hZ/9WyxX9 /tKK/ntASJzc5YApbcwzyv0PgwHKRjA= Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-256-OOGT67HqOM25PpiONNI1WQ-1; Thu, 25 Jan 2024 03:13:54 -0500 X-MC-Unique: OOGT67HqOM25PpiONNI1WQ-1 Received: by mail-lf1-f71.google.com with SMTP id 2adb3069b0e04-5100d033f56so1507999e87.0 for ; Thu, 25 Jan 2024 00:13:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706170433; x=1706775233; 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=lArrfBxO341CVzJLmO5eAIj9KF+/vmgiFnoaoLZ23T0=; b=OlVLZDr+uorID+7XaCpyOcd7Fe6xYqxyOvLa1l1KP5o3tGhfHjuvsS7+yw+mi2NFwJ fDl7u9pFhTDyoy36nJTixJYXeTlI3zwsIjkUF2d/vgV1gq/sohOpJrRyh8kKGNEuSiGu ceNHq+oWvcIrSCHU0tjSca4tpRggLFrFznADPxAgAXsgJJ3cHgs7nIkdrwn5hv5Taqse TLgRLrx87e4LGXVVOGBnOaIBx3qKd2H0VaawDL6+GHDiPmHTfYWaBUynmGkBF+5QplV3 HM0OHKbdOC5Q4yo19Kkc7n3tvgLJpBZsGcwikFIUbPHbGs0QbpHr7KnKQzFJ9XVw8EQL 4Eew== X-Gm-Message-State: AOJu0Yw7v4wmc+yYOlAkg13VPWJB9/IQI6FAvn44sj/kjfnkHR/G2K2W 98zbwF62/fWJD0j5USbU0cn4/hITWAEcD19Azh3pGGz+aWZuGGfrlziwX0V5N2gWRx0P8qnHNCH sccPc7VjkAJOqMeO+rYW2Ej1N6ZAHAJ343PmBiHlMfJXEMpt6XGBNAwPlmn9qkIibdonDEUPpaQ Er0EpnLe4kpaVHexU= X-Received: by 2002:ac2:5a5a:0:b0:50e:630d:7364 with SMTP id r26-20020ac25a5a000000b0050e630d7364mr233837lfn.28.1706170433462; Thu, 25 Jan 2024 00:13:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IHFGVBPea4RG1iyMCSBRliGvTUq6oP6TiL5450itqRMr0hKrRUOF4zAL7dZ8WCjWSiHAddSPd/xWaXKAPVm9To= X-Received: by 2002:ac2:5a5a:0:b0:50e:630d:7364 with SMTP id r26-20020ac25a5a000000b0050e630d7364mr233816lfn.28.1706170433173; Thu, 25 Jan 2024 00:13:53 -0800 (PST) MIME-Version: 1.0 References: <20240124120450.546364-1-david.marchand@redhat.com> <98CBD80474FA8B44BF855DF32C47DC35E9F18F@smartserver.smartshare.dk> In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35E9F18F@smartserver.smartshare.dk> From: David Marchand Date: Thu, 25 Jan 2024 09:13:41 +0100 Message-ID: Subject: Re: [PATCH] lib: remove duplicate prefix in logs To: =?UTF-8?Q?Morten_Br=C3=B8rup?= Cc: dev@dpdk.org, Thomas Monjalon , Chengwen Feng , Kevin Laatz , Bruce Richardson , Elena Agostini , Jerin Jacob , Kiran Kumar K , Nithin Dabilpuram , Zhirun Yan , Pavan Nikhilesh , Ciara Power , Maxime Coquelin , Chenbo Xia , Andrew Rybchenko 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 Wed, Jan 24, 2024 at 1:17=E2=80=AFPM Morten Br=C3=B8rup wrote: > > diff --git a/lib/dmadev/rte_dmadev.c b/lib/dmadev/rte_dmadev.c > > index 5953a77bd6..dbaa14f262 100644 > > --- a/lib/dmadev/rte_dmadev.c > > +++ b/lib/dmadev/rte_dmadev.c > > @@ -35,8 +35,7 @@ RTE_LOG_REGISTER_DEFAULT(rte_dma_logtype, INFO); > > #define RTE_LOGTYPE_DMA rte_dma_logtype > > > > #define RTE_DMA_LOG(level, ...) \ > > - RTE_LOG_LINE(level, DMA, RTE_FMT("dma: " RTE_FMT_HEAD(__VA_ARGS__ > > ,), \ > > - RTE_FMT_TAIL(__VA_ARGS__ ,))) > > + RTE_LOG_LINE(level, DMA, "" __VA_ARGS__) > > > > int > > rte_dma_dev_max(size_t dev_max) > > diff --git a/lib/gpudev/gpudev.c b/lib/gpudev/gpudev.c > > index de8291151f..1c2011b856 100644 > > --- a/lib/gpudev/gpudev.c > > +++ b/lib/gpudev/gpudev.c > > @@ -20,8 +20,7 @@ RTE_LOG_REGISTER_DEFAULT(gpu_logtype, NOTICE); > > #define RTE_LOGTYPE_GPUDEV gpu_logtype > > > > #define GPU_LOG(level, ...) \ > > - RTE_LOG_LINE(level, GPUDEV, RTE_FMT("gpu: " > > RTE_FMT_HEAD(__VA_ARGS__ ,), \ > > - RTE_FMT_TAIL(__VA_ARGS__ ,))) > > + RTE_LOG_LINE(level, GPUDEV, "" __VA_ARGS__) > > Suggestion: > GPUDEV -> GPU, like DMA, not DMADEV. I had not checked before, but for consistency, I would go the other way aro= und. $ for dir in lib/*dev; do git grep RTE_LOG_LINE $dir; done lib/bbdev/rte_bbdev.c: RTE_LOG_LINE(level, BBDEV, "" __VA_ARGS__) lib/compressdev/rte_compressdev_internal.h: RTE_LOG_LINE(level, COMPRESSDEV, "%s(): " fmt, __func__, ## args) lib/cryptodev/rte_cryptodev.h: RTE_LOG_LINE(ERR, CRYPTODEV, \ lib/cryptodev/rte_cryptodev.h: RTE_LOG_LINE(INFO, CRYPTODEV, "" __VA_ARGS_= _) lib/cryptodev/rte_cryptodev.h: RTE_LOG_LINE(DEBUG, CRYPTODEV, \ lib/cryptodev/rte_cryptodev.h: RTE_LOG_LINE(DEBUG, CRYPTODEV, \ lib/dmadev/rte_dmadev.c: RTE_LOG_LINE(level, DMA, "" __VA_ARGS__) lib/ethdev/rte_ethdev.h: RTE_LOG_LINE(level, ETHDEV, "" __VA_ARGS__) lib/eventdev/eventdev_pmd.h: RTE_LOG_LINE(ERR, EVENTDEV, \ lib/eventdev/eventdev_pmd.h: RTE_LOG_LINE(DEBUG, EVENTDEV, \ lib/eventdev/rte_event_timer_adapter.c: RTE_LOG_LINE(level, logtype, \ lib/gpudev/gpudev.c: RTE_LOG_LINE(level, GPUDEV, "" __VA_ARGS__) lib/mldev/rte_mldev.h: RTE_LOG_LINE(level, MLDEV, "%s(): " fmt, __func__, ##args) lib/rawdev/rte_rawdev_pmd.h: RTE_LOG_LINE(level, RAWDEV, "%s(): " fmt, __func__, ##args) lib/regexdev/rte_regexdev.h: RTE_LOG_LINE(level, REGEXDEV, "" __VA_ARGS_= _) --=20 David Marchand