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 9D7484592F; Sat, 7 Sep 2024 16:55:21 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DCA6240609; Sat, 7 Sep 2024 16:55:06 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 2511040652 for ; Sat, 7 Sep 2024 16:55:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725720905; 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=1Df65+N2n5UlBlvb6TlE4f9GER1spznODZuuJWRrLa4=; b=ISG/9OpLIChqXhf0ln4jgi73Yuq93P+IOXMuK5NfyHxuattP3aGzYdfA3MPddKVGZTllhm dcDg0cRmigotf3lSHDtrND3mKyGWJDGyFe1Z3yODIOkIDCh8oNMePPLaVwHRLP7NJ8fcI9 OyvgUTHgzf3yJb6ST6vH0vziyX20Kuo= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-191-L7oXUWwwMhOrxzuIzYg6CQ-1; Sat, 07 Sep 2024 10:55:02 -0400 X-MC-Unique: L7oXUWwwMhOrxzuIzYg6CQ-1 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 919D81955D47; Sat, 7 Sep 2024 14:55:01 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.226.65]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C32C71956086; Sat, 7 Sep 2024 14:54:59 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: Andrew Rybchenko , Vijay Kumar Srivastava Subject: [PATCH 05/11] drivers: reuse default logtype for SFC drivers Date: Sat, 7 Sep 2024 16:54:25 +0200 Message-ID: <20240907145433.1479091-6-david.marchand@redhat.com> In-Reply-To: <20240907145433.1479091-1-david.marchand@redhat.com> References: <20240907145433.1479091-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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 Nothing is fixed here, just reuse the value coming from the build framework rather than use a fixed string that may get wrong in the future. Signed-off-by: David Marchand --- drivers/net/sfc/sfc_log.h | 7 ++----- drivers/vdpa/sfc/sfc_vdpa_log.h | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/net/sfc/sfc_log.h b/drivers/net/sfc/sfc_log.h index 10a9ce6ced..b92b358927 100644 --- a/drivers/net/sfc/sfc_log.h +++ b/drivers/net/sfc/sfc_log.h @@ -13,9 +13,6 @@ /** Generic driver log type */ extern int sfc_logtype_driver; -/** Common log type name prefix */ -#define SFC_LOGTYPE_PREFIX "pmd.net.sfc." - /** Log PMD generic message, add a prefix and a line break */ #define SFC_GENERIC_LOG(level, ...) \ rte_log(RTE_LOG_ ## level, sfc_logtype_driver, \ @@ -23,10 +20,10 @@ extern int sfc_logtype_driver; RTE_FMT_TAIL(__VA_ARGS__ ,))) /** Name prefix for the per-device log type used to report basic information */ -#define SFC_LOGTYPE_MAIN_STR SFC_LOGTYPE_PREFIX "main" +#define SFC_LOGTYPE_MAIN_STR RTE_STR(RTE_LOG_DEFAULT_LOGTYPE) ".main" /** Device MCDI log type name prefix */ -#define SFC_LOGTYPE_MCDI_STR SFC_LOGTYPE_PREFIX "mcdi" +#define SFC_LOGTYPE_MCDI_STR RTE_STR(RTE_LOG_DEFAULT_LOGTYPE) ".mcdi" #define SFC_LOG_PREFIX_MAX 32 diff --git a/drivers/vdpa/sfc/sfc_vdpa_log.h b/drivers/vdpa/sfc/sfc_vdpa_log.h index 6c0101dbb4..1104e7de43 100644 --- a/drivers/vdpa/sfc/sfc_vdpa_log.h +++ b/drivers/vdpa/sfc/sfc_vdpa_log.h @@ -8,9 +8,6 @@ /** Generic driver log type */ extern int sfc_vdpa_logtype_driver; -/** Common log type name prefix */ -#define SFC_VDPA_LOGTYPE_PREFIX "pmd.vdpa.sfc." - /** Log PMD generic message, add a prefix and a line break */ #define SFC_VDPA_GENERIC_LOG(level, ...) \ rte_log(RTE_LOG_ ## level, sfc_vdpa_logtype_driver, \ @@ -18,10 +15,10 @@ extern int sfc_vdpa_logtype_driver; RTE_FMT_TAIL(__VA_ARGS__ ,))) /** Name prefix for the per-device log type used to report basic information */ -#define SFC_VDPA_LOGTYPE_MAIN_STR SFC_VDPA_LOGTYPE_PREFIX "main" +#define SFC_VDPA_LOGTYPE_MAIN_STR RTE_STR(RTE_LOG_DEFAULT_LOGTYPE) ".main" /** Device MCDI log type name prefix */ -#define SFC_VDPA_LOGTYPE_MCDI_STR SFC_VDPA_LOGTYPE_PREFIX "mcdi" +#define SFC_VDPA_LOGTYPE_MCDI_STR RTE_STR(RTE_LOG_DEFAULT_LOGTYPE) ".mcdi" #define SFC_VDPA_LOG_PREFIX_MAX 32 -- 2.46.0