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 14C0941D3E; Thu, 23 Feb 2023 04:10:26 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F0324431A7; Thu, 23 Feb 2023 04:10:25 +0100 (CET) Received: from mail-pj1-f42.google.com (mail-pj1-f42.google.com [209.85.216.42]) by mails.dpdk.org (Postfix) with ESMTP id 25F7740DF6 for ; Thu, 23 Feb 2023 04:10:25 +0100 (CET) Received: by mail-pj1-f42.google.com with SMTP id pt11so11985372pjb.1 for ; Wed, 22 Feb 2023 19:10:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=no6IWHRCKhfwI1pzRF0uXvMYmnibqLj+uatVJVRfdWU=; b=zNBMwSSjitz/fGHmTMd596rdtzhYcAJl7ervz/KrCuTuJK/lI1S3JjMfne1fv45si+ YHd/KOgjyJ5CXL7o+HvAHpJxUKO1bICFkazaw9RwUmX9VFCa6+eP6bohN8AE5OxJcAIz l5gHDSZ4zjjx8Mv5vu+HBDP4JEifBClz6mF6aQGaalD+2lraWotaKGHzgUgJYSD8ZHDs G+rHU/19A2uGdTtCGRcOQxEYLViSzux19E5lTRbcLHTr8167JhOumAcxeIWjIFAer4Kq xvop+oCndRzb1taVBUaF3j5BOaRRRiALAK19y9lrIHDcDvgY2emuOddZHfGmiXoJ0ISi tekA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=no6IWHRCKhfwI1pzRF0uXvMYmnibqLj+uatVJVRfdWU=; b=HNK1CShVYDqcoUEQPXGBOLkOc4lFIooOPmOlS/OpyDPopGQ5N9naLu9o1cRTVa8USi ZyTxvTp4lUg9qR7FcpEsDZqcnKkSE05WiPLvbJZMOFYIQL1WxxZctbBA2q92bTtSJ6JT NsQkBrZYMcWHbgcDyIS7i8IlbZuBlU/xWyuaQLfWynN6ZItsMWgDGqWRusFVYuk6Kj3r r4CCa6wgOU3CzTL6yBChfn6DwmDdH3DzxR7f6NPEPqmVAymebGF7zcGyfm50gG/h0a/8 yV/OWFMcSf14ER6B9daXIPfs81OMRtFRsTpFQGcRsjy1iAnEsrrpq7Y9Q4fqYKyshnfz hHbQ== X-Gm-Message-State: AO0yUKUEuhJ2WH1Rn6B7geRjQ0BJRWN4cr6iCYz70Jd4Kc9cJOgntyZI esDByxpoYPH5kU5fS0sTfqVKBFEBwhdZvk4spMk= X-Google-Smtp-Source: AK7set+13YOJ3QWdQcusKaza1Oyt+oz4x3IusRHK82+EuDdNKgpeQO8fIAybi5q7H9tYMtBaKkPGVg== X-Received: by 2002:a17:90a:8001:b0:236:5eca:d495 with SMTP id b1-20020a17090a800100b002365ecad495mr11561899pjn.48.1677121823825; Wed, 22 Feb 2023 19:10:23 -0800 (PST) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id g6-20020a170902c38600b0019719f752c5sm2541747plg.59.2023.02.22.19.10.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Feb 2023 19:10:23 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Andrew Rybchenko , Vijay Kumar Srivastava Subject: [PATCH] net/sfc: replace of RTE_LOGTYPE_PMD Date: Wed, 22 Feb 2023 19:10:20 -0800 Message-Id: <20230223031021.167490-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 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 The static LOGTYPE PMD will go away in the future. Replace its use in the sfc driver with the same static type as is already used in RTE_LOG_REGISTER macro. These drivers are trying to do things that other drivers are not in creating log types. IMHO it should follow the other driver usage pattern. But this patch leaves the special code. Signed-off-by: Stephen Hemminger --- drivers/net/sfc/sfc_ethdev.c | 2 +- drivers/vdpa/sfc/sfc_vdpa.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c index 2ec743ebce4a..320043145495 100644 --- a/drivers/net/sfc/sfc_ethdev.c +++ b/drivers/net/sfc/sfc_ethdev.c @@ -3231,5 +3231,5 @@ RTE_INIT(sfc_driver_register_logtype) ret = rte_log_register_type_and_pick_level(SFC_LOGTYPE_PREFIX "driver", RTE_LOG_NOTICE); - sfc_logtype_driver = (ret < 0) ? RTE_LOGTYPE_PMD : ret; + sfc_logtype_driver = (ret < 0) ? RTE_LOGTYPE_EAL : ret; } diff --git a/drivers/vdpa/sfc/sfc_vdpa.c b/drivers/vdpa/sfc/sfc_vdpa.c index 53f598facc75..bd6ecde4507f 100644 --- a/drivers/vdpa/sfc/sfc_vdpa.c +++ b/drivers/vdpa/sfc/sfc_vdpa.c @@ -180,12 +180,12 @@ sfc_vdpa_register_logtype(const struct rte_pci_addr *pci_addr, ++lt_prefix_str_size; /* Reserve space for prefix separator */ lt_str_size_max = lt_prefix_str_size + PCI_PRI_STR_SIZE + 1; } else { - return RTE_LOGTYPE_PMD; + return RTE_LOGTYPE_EAL; } lt_str = rte_zmalloc("logtype_str", lt_str_size_max, 0); if (lt_str == NULL) - return RTE_LOGTYPE_PMD; + return RTE_LOGTYPE_EAL; strncpy(lt_str, lt_prefix_str, lt_prefix_str_size); lt_str[lt_prefix_str_size - 1] = '.'; @@ -196,7 +196,7 @@ sfc_vdpa_register_logtype(const struct rte_pci_addr *pci_addr, ret = rte_log_register_type_and_pick_level(lt_str, ll_default); rte_free(lt_str); - return ret < 0 ? RTE_LOGTYPE_PMD : ret; + return ret < 0 ? RTE_LOGTYPE_EAL : ret; } static int -- 2.39.1