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 835CF43A57; Sat, 3 Feb 2024 05:12:49 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BCD1642E3B; Sat, 3 Feb 2024 05:12:46 +0100 (CET) Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) by mails.dpdk.org (Postfix) with ESMTP id 6F15E4028C for ; Sat, 3 Feb 2024 05:12:44 +0100 (CET) Received: by mail-pj1-f50.google.com with SMTP id 98e67ed59e1d1-295d22bd625so2058288a91.1 for ; Fri, 02 Feb 2024 20:12:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1706933563; x=1707538363; 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=3HOib+8tzdCrRytFnpv0KFU/PRM7P44Xkb3Uj5kG2sjP9JYiCI/fZZU/WRRfc9cKmt RE3p/FIden9bG8vCCskNrk3vNaRALiWdRMeNb+nOa8Mm3Gqsw65emupvL8HSZ+a3ny6U avY4lYsQ/Ec8kjhhwCQp2lH68Md7wLTN27F7/5mIHqw4vImzwYWmjuiHDUuqxsHxD/OF uH1T2R4X5pu4OcybtdKJ3pX0KnE/10GNnb8hi8psSTWg/CiqdYcA6TBPBz11etOXpYGq zm/aWDKX9q3gMvuKAH1zGRPV94/QqO+vicyY64vkGkT2/eRy5U2njyvKE6hZqoyQxxyL q39g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706933563; x=1707538363; 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=mh12FDW5ToYkwy1RkXdEHYlLWAVR0/hJovSA/qT1xZAOyHKS9nj9ANeQzPGvpFVnRL ikKTJV3t+vOPFFTKDAJ4xrX5OmhZPf0rH/r2UXd1J3BtSj4DgpJEMX/5uTjspn0DlhSG g6YhOBmVtndiIFyUtoPMHuHwDSKYnIcMS91+Fq8adXhLGJ1FSGqmOEnhRYuXibSHgvjm OOI1lFQtSTGVfFQcpEX4AQOXOdMm0XKI5x8OtpVP19SAagz7LFnmErLUWkWILPHNh6L+ dmZqGrcl8BlraN1km6lsLgvxxcOj/U2K/YHJvGm56r8U9biOkDehEMxglVqSKRyavzPx ByiA== X-Gm-Message-State: AOJu0YwS735cFmsBTcrNQeFjgTF2nO0K4dTSgc6bGeNdwfS+G2aSfoYj /EVh7kGb6w+/XUkDZ5HfaMR0cHfN+M1rT7rQD0xPAnFmjUZSQLkEIBYfcd5B55zgXQdff3kvxKj 5Kok= X-Google-Smtp-Source: AGHT+IFnLh3P/pkboEFd3WJXYkCvRGVTIP1M8iafusSg75RWkyJMy6xlUSzXnZN3Z2qnI+HPf5ILHg== X-Received: by 2002:a17:903:22cd:b0:1d9:4d3f:cbf6 with SMTP id y13-20020a17090322cd00b001d94d3fcbf6mr4314353plg.48.1706933563645; Fri, 02 Feb 2024 20:12:43 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCWIyoiazHDEGXyeWc7v8ni6tNOhKN8VkyKBmSZ6pkMl+ouo2U6MK4W5bJLkIUMz16y8aNjBJxWF7cs4p+tW5eQU/FvcI+5bf/bVvYGnCg== Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id mf11-20020a170902fc8b00b001d94a3f398esm2361800plb.141.2024.02.02.20.12.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 20:12:43 -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:11:34 -0800 Message-ID: <20240203041230.285599-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240203041230.285599-1-stephen@networkplumber.org> References: <20231213014408.612051-1-stephen@networkplumber.org> <20240203041230.285599-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