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 5AD574373D; Mon, 18 Dec 2023 20:26:49 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 65FC240E25; Mon, 18 Dec 2023 20:26:44 +0100 (CET) Received: from mail-pg1-f181.google.com (mail-pg1-f181.google.com [209.85.215.181]) by mails.dpdk.org (Postfix) with ESMTP id 3DF42402D8 for ; Mon, 18 Dec 2023 20:26:43 +0100 (CET) Received: by mail-pg1-f181.google.com with SMTP id 41be03b00d2f7-5c6839373f8so2303584a12.0 for ; Mon, 18 Dec 2023 11:26:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1702927602; x=1703532402; 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=ETMSWg7u+hsEdbW5MCy15xv2cHajpOTmIV4a+7RkcEVBVrWCUg711Ewi0kqrnAeq2G /CTHA7rEL/jFxig1GCygGKM0G73xWWc9ZB/PBF6ordB5WxpRZfX4J+RhSrFUE6wGv0Q3 HPWhKIZr9sYry820va86Nw2w68tVTTE6GjNCbuPAz7soXjkVcs0pXhEcYmQsmLrxg6T4 NQa1EszSNsdUUnN8zLmn1yPpNE2mfIrIh4Ky3OwP1m7KMYAJo5yqH0/RwwDOLzBXReFy VE3wQLTOmCnvOuZYn8cEewDEUnnYuaLzxNYkM98hv5F80CJWe+kQsgIM862S+602qoiN oXog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702927602; x=1703532402; 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=fChK4rbAqSkpf6ucuKRbTm40A2dRC7BjkbiEiLOMWbfatgtyNQHOpXzqMICNlUxHEf fzN+pV9Zn2wCpScN+TcKPBETCgbEGGl3mss2WHtA6rt7aa7XZfCinsnotySiLA0/1RX2 SxIFCJu4ksmMyTVe4kmzj3agnkidG0LreDvpR+5E+/RUilgXC3fIFmB8TMiR2QsFQuU0 p506dPqnig0G4xHTMn0ryITn1CSLWIbuEogxncbNEtdtened27K6hPvZBWNZdogkTFT5 tI1cfR6NrKSzKpkHKyfBTat+o7vg3uyCpJU5JtcuQO1S3xlBjH6O1udvnkvCUkO97iG1 +gLg== X-Gm-Message-State: AOJu0YxwA7F0BBn7HKZw/SfAjboDdptgtOi6O8ORFqYNpPwx3V045ymK Bpp0dwYK1VPUm3sb6MHvEziHFggHUU58tjZ1cY7o4A== X-Google-Smtp-Source: AGHT+IHEmZ1KDNRNw5nDxtxQYel1sEFef1Iv7I/FsN909PC3LGXIKUfllCx//Ilc2IC6f9BkFQZjCg== X-Received: by 2002:a17:90a:cc0a:b0:28b:6acb:855c with SMTP id b10-20020a17090acc0a00b0028b6acb855cmr3667926pju.27.1702927602261; Mon, 18 Dec 2023 11:26:42 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id p17-20020a170903249100b001cfbe348ca5sm19410284plw.187.2023.12.18.11.26.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 11:26:41 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v4 01/17] common/sfc_efx: remove use of PMD logtype Date: Mon, 18 Dec 2023 11:22:17 -0800 Message-ID: <20231218192631.699267-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231218192631.699267-1-stephen@networkplumber.org> References: <20231213014408.612051-1-stephen@networkplumber.org> <20231218192631.699267-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