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 77CCC4596C; Thu, 12 Sep 2024 10:28:00 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0BEBB40ED3; Thu, 12 Sep 2024 10:27:33 +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 3337F41143 for ; Thu, 12 Sep 2024 10:27:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1726129650; 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=RsgkzK8c9t0Jxn8tXLsRrAi19Z4JQL/sCm9ZtRRgPfI=; b=duV4TOh+/0mw4AVqghlBScA+7uU3/loc6mZlLP8V5lwu/17BKGCVoLkgOy7kyG8ezFQekK fwSOjGPsiK34dwhKRqDyVVOeG2L9IbSkbC22AXt99I+0nEakcBim+eUjuvFaFogTqOv/zs 5JJy/mpC7hSXQeDkOUs+Gjvjw2CzY9Y= 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-131-JfOyCgwSNLqoHyMIV8zJWA-1; Thu, 12 Sep 2024 04:27:29 -0400 X-MC-Unique: JfOyCgwSNLqoHyMIV8zJWA-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 E26DA196CE0C; Thu, 12 Sep 2024 08:27:28 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.224.230]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A7D04195608A; Thu, 12 Sep 2024 08:27:27 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= Subject: [PATCH v2 09/14] event/dsw: use a dynamic logtype Date: Thu, 12 Sep 2024 10:26:35 +0200 Message-ID: <20240912082643.1532679-10-david.marchand@redhat.com> In-Reply-To: <20240912082643.1532679-1-david.marchand@redhat.com> References: <20240907145433.1479091-1-david.marchand@redhat.com> <20240912082643.1532679-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 Register a logtype for this driver and stop logging as EVENTDEV. Signed-off-by: David Marchand --- drivers/event/dsw/dsw_evdev.c | 1 + drivers/event/dsw/dsw_evdev.h | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/event/dsw/dsw_evdev.c b/drivers/event/dsw/dsw_evdev.c index 0dea1091e3..8a1a2db8ac 100644 --- a/drivers/event/dsw/dsw_evdev.c +++ b/drivers/event/dsw/dsw_evdev.c @@ -493,3 +493,4 @@ static struct rte_vdev_driver evdev_dsw_pmd_drv = { }; RTE_PMD_REGISTER_VDEV(EVENTDEV_NAME_DSW_PMD, evdev_dsw_pmd_drv); +RTE_LOG_REGISTER_DEFAULT(event_dsw_logtype, NOTICE); diff --git a/drivers/event/dsw/dsw_evdev.h b/drivers/event/dsw/dsw_evdev.h index c9bf4f8b6b..fe4ddb3e30 100644 --- a/drivers/event/dsw/dsw_evdev.h +++ b/drivers/event/dsw/dsw_evdev.h @@ -302,9 +302,10 @@ dsw_pmd_priv(const struct rte_eventdev *eventdev) return eventdev->data->dev_private; } +extern int event_dsw_logtype; +#define RTE_LOGTYPE_EVENT_DSW event_dsw_logtype #define DSW_LOG_DP(level, fmt, args...) \ - RTE_LOG_DP(level, EVENTDEV, "[%s] %s() line %u: " fmt, \ - DSW_PMD_NAME, \ + RTE_LOG_DP(level, EVENT_DSW, "%s() line %u: " fmt, \ __func__, __LINE__, ## args) #define DSW_LOG_DP_PORT(level, port_id, fmt, args...) \ -- 2.46.0