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 4530743A57; Sat, 3 Feb 2024 05:11:44 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E20C3402DC; Sat, 3 Feb 2024 05:11:38 +0100 (CET) Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) by mails.dpdk.org (Postfix) with ESMTP id 98B574027E for ; Sat, 3 Feb 2024 05:11:37 +0100 (CET) Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-1d934c8f8f7so25252565ad.2 for ; Fri, 02 Feb 2024 20:11:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1706933496; x=1707538296; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YyBqO/sb6UeQ4NeBuhZ1nXTlTFjLIN4jayiZCG0GWMs=; b=M2dCtsXBcezO0j0r9vmSMmXXj7xpyV3KMQHBSx4cbk2aNEsrluFd6X1smQ0K8aQKwO v0wxJMmaGgIg8QnYEbyxUaBxUHGwRsVsb/mOxcXYcwpEdJBmOJbGjI7awctDMpkQDJ3r GoqvRiy0fivYIVC4YrVuZOBoVJd4LYZcUH0F1aTKLSy4sF8Jjo3yRatwzufbBfXA5JYu 4nZZsgEkuoH8Whv8mpUaomIgWpJ4M9gLPS38YvMDURhfc//AUP3z8DZ/1RzY/uerHfrE Q7yKfcXtUsSoWQ0PJcsM/iPp9wc4Szz9daK9R+PWq4vFocI0pcIA41qZ2mimOEp+mD8d MJJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706933496; x=1707538296; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YyBqO/sb6UeQ4NeBuhZ1nXTlTFjLIN4jayiZCG0GWMs=; b=d6oQ6tdoN7dEd9Fmwi4VBlZZW8gsZsL5msE+W4uEynFaAa91bYJHvgKbAnmRhGxevs 7tqTmSShnoZZhRO5ZYRdeoPFmLhRo2YVszCgFjf8b39jZjqn0WDoWKwFbgxrux4fdFaj WSnrvQ5GphCtSdRyxBYG0op8gF1rWpnkTvlnKx/Z/E4psaDtV6xgiqZNEt47qWPsoH4p BqbNtvuXBN6AkeOxsEIs3pJ4orrxN/EDkw338hm8rraX3NFRFk8GPO9xG2rkmgttSBc1 vTkyNHEhYR6M7eVdDTII8q6JUIKxev/Je1hYz8vipf9frFc7QLPkRqG92+YIEcqgwEqw rz8w== X-Gm-Message-State: AOJu0YzxYe/XckgmQ1JCKPjQD0Bo2aQikUYkdCT5SSpta0cRUVbhjV8S 9oGswetNtZ+N75Yz0G5YK8PspPFy6BR8H3YxnsV4SUe5M/ffTd3OYFF+9BcrPuB6KbDG5Qc+C5r Lbc0= X-Google-Smtp-Source: AGHT+IHhDlYft9rJ62SAyyI6Moa3jX/yPcuGQImcTqoBTQM8/WXTxBucEUCDJDC7z4AojieqidDYNQ== X-Received: by 2002:a17:902:8602:b0:1d3:45c8:bc0f with SMTP id f2-20020a170902860200b001d345c8bc0fmr7134309plo.46.1706933496552; Fri, 02 Feb 2024 20:11:36 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCV55oR7FYTfcynQzp7MvsXcAKoJSqDNXPLw2dQHTuYia2JGydho0xG7X5syVTY/1D7OfT35cVj4LF4gYOPpBJfH5c/3uy1DgIzIahQM7A== Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id lq13-20020a170903144d00b001d95d47cce4sm2354386plb.138.2024.02.02.20.11.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 20:11:36 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Andrew Rybchenko Subject: [PATCH v7 01/19] common/sfc_efx: remove use of PMD logtype Date: Fri, 2 Feb 2024 20:10:06 -0800 Message-ID: <20240203041125.285232-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240203041125.285232-1-stephen@networkplumber.org> References: <20231213014408.612051-1-stephen@networkplumber.org> <20240203041125.285232-1-stephen@networkplumber.org> 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 This code was implemented in a slightly different manner than all the other logging code (for no good reason). Make it the same and handle errors in same way as other drivers. Signed-off-by: Stephen Hemminger --- drivers/common/sfc_efx/sfc_efx.c | 11 ++--------- drivers/common/sfc_efx/sfc_efx_log.h | 2 +- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/common/sfc_efx/sfc_efx.c b/drivers/common/sfc_efx/sfc_efx.c index 2dc5545760b8..5eeffb065b0d 100644 --- a/drivers/common/sfc_efx/sfc_efx.c +++ b/drivers/common/sfc_efx/sfc_efx.c @@ -15,7 +15,7 @@ #include "sfc_efx_log.h" #include "sfc_efx.h" -uint32_t sfc_efx_logtype; +int sfc_efx_logtype; static int sfc_efx_kvarg_dev_class_handler(__rte_unused const char *key, @@ -117,11 +117,4 @@ sfc_efx_family(struct rte_pci_device *pci_dev, return rc; } -RTE_INIT(sfc_efx_register_logtype) -{ - int ret; - - ret = rte_log_register_type_and_pick_level("pmd.common.sfc_efx", - RTE_LOG_NOTICE); - sfc_efx_logtype = (ret < 0) ? RTE_LOGTYPE_PMD : ret; -} +RTE_LOG_REGISTER_DEFAULT(sfc_efx_logtype, NOTICE); diff --git a/drivers/common/sfc_efx/sfc_efx_log.h b/drivers/common/sfc_efx/sfc_efx_log.h index 694455c1b14e..1519ebdc175f 100644 --- a/drivers/common/sfc_efx/sfc_efx_log.h +++ b/drivers/common/sfc_efx/sfc_efx_log.h @@ -11,7 +11,7 @@ #define _SFC_EFX_LOG_H_ /** Generic driver log type */ -extern uint32_t sfc_efx_logtype; +extern int sfc_efx_logtype; /** Log message, add a prefix and a line break */ #define SFC_EFX_LOG(level, ...) \ -- 2.43.0