From patchwork Thu Feb 8 22:18:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jon Maxwell X-Patchwork-Id: 198606 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp485751dyd; Thu, 8 Feb 2024 14:18:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IEbYyZUrTzLryP1eazqnOvx+shTC+RhrtVOsCsanrHW4uzMgMXCnezhDTKHOmulsmaLBeAm X-Received: by 2002:a05:651c:4d0:b0:2d0:a037:b93d with SMTP id e16-20020a05651c04d000b002d0a037b93dmr524247lji.41.1707430720047; Thu, 08 Feb 2024 14:18:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707430720; cv=pass; d=google.com; s=arc-20160816; b=mcuqlcjyvZwpzGrWg/f+V2ZZA+TttB8ykbc50t70lobNwEE0GgkRhL9Ko5nKz9uMPj 0Bz6u1eldD7TcDpuqRsbUBHM380wIQK5es8gwzgnWLOUBoKUCbKM4K4bi9gxvNEx5JpM 2Wl5O4vkPX6yCzDdtuCE2hYYoTkQKGPwfO6DzpQ7/1qNnB5RE/PF94cTfTWgR1/1yHjp 8s3avNdYpwDxfjT4N4fq3haVg6+f5lKzr8mrBwdBP4UlQ6pldCMeU2AZkzooxMN01SRa Qg0BweD0x9OuRYp+OxJ9tDx39sM/bMBes/LpTGGQlEVN11T83zWkQIaQTuXM6akP6EJn h4iQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=iwUfftNo0NrpRr9BW99q1MRWWjsnNNeYwX3VFPATbF0=; fh=OBCBpfUwSWK9I+KBANB9f6fP9/7DVuiTd6b/B5bKWM8=; b=q8EMgTfgbTqdoQ+Yy8I4udUK8kq4BRdGGp4cbqWzTx+ERRYTkPhn4xF2SkSODOVgjh tNM0Jaxu+5aAc9sDm/CZaj+YKUSi7rdvIdrORa5sFpNRuCPmJUjaRMExUxjCKktv4j6t PKSxwwXPbgxRvctLISz+ssLCH3opWf3RKPL58ofavwXqwz47SUQnVA1UDwZaX44yndFy fEvQfoOMhv2Q1t9yA6ya23Q3J8bIT6poNWFAR7V3pvVQmdrUetNnPvwxcpc6INybqSJ0 IUZ+b8rvuCeFc6eqUNr/ke/kct6O4R4dcw8d1viK9JVmhG5lz/dfFIfEojNVS8A9UQE+ CldA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=TUccSAqf; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-58770-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58770-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com X-Forwarded-Encrypted: i=2; AJvYcCVC8ma2sxvdtrkWDbeesoTyUn/ouDos+Lizq9dJNvASyVn1wXVmqiFg2Xg/3ALwLHWiVe49oO4M3iH6Ys9aKMWEwLPLNw== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id s28-20020a056402037c00b005612b46f8d3si149268edw.488.2024.02.08.14.18.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 14:18:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-58770-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=TUccSAqf; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-58770-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58770-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 6F7F31F2D958 for ; Thu, 8 Feb 2024 22:18:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8C06D50249; Thu, 8 Feb 2024 22:18:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="TUccSAqf" Received: from mail-oo1-f42.google.com (mail-oo1-f42.google.com [209.85.161.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 34B2E4F60B; Thu, 8 Feb 2024 22:18:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707430695; cv=none; b=rNUX2ULDMuC8Da38YxYud/6qMUnNKFv6CMG73DBYmaajPfCy5qZElwZlwKzICggX3FNahJApGog5+x8IzDNA8lKNW3KDuJcNsiP88IDL20UyTwWKsp0SEa1US5zgmR5FGdGdzOWdCv2JYnnXgsyKld1pWRFofLEdWYO87p5HrlQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707430695; c=relaxed/simple; bh=eZfOaA18/gD76auvKG0RWees9lys9unypghBGicS/4g=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=McDnXFEuoCCEhASz6nHWszJMHwEKsWQtCiB0HmKk2wBjhpI3PTB/ewdWCJf5Pd9MUIQy/FqjSRa6Kndfpq8kVIPUM7BRcyceVElLpct1LpYjHMYP/Rqm0JYXNsVJnqyuvFAi/kI3X1jOLaEz+YlAopdpLZZxtXSQAKW8G48Q43w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=TUccSAqf; arc=none smtp.client-ip=209.85.161.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oo1-f42.google.com with SMTP id 006d021491bc7-58e256505f7so162441eaf.3; Thu, 08 Feb 2024 14:18:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707430693; x=1708035493; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=iwUfftNo0NrpRr9BW99q1MRWWjsnNNeYwX3VFPATbF0=; b=TUccSAqfDKqhq3xDnq9I9pBWBaDlEPyBRfYiGhqVxe+hLsarmKmNgx/TjOCL84RBO5 t8iXF+QqM85VbG/cXn2lUFHoOjxakg8Y4XouzEojHlkVoCGXClU9rcNBmF28KOhxI3uX gN9aOZtrMbAeZpJ5BXzy/m2+GqGefyYMgfxZoTBhoQsqsMOt463/Bw+eY/xMWuUMMJ0J 8F70BJQ19iN09Ado5lDvbw/kHzu1JjRZKyqorZuELcluY6ElTxW5BAado0zHD6QpltAY SU5CrRZ+64QS/jWUanwslRxlMV1AXs3yYZpyJBvjsM4Oe2wEv7v947LV3UqV7n0FOaFR vT0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707430693; x=1708035493; 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=iwUfftNo0NrpRr9BW99q1MRWWjsnNNeYwX3VFPATbF0=; b=CaYf+dQUy32L47iidHQCEBdXhux4epeZ2U88clIMm4cTnwfMP9dCgzyVDTZF3aVlI8 3HtL650jv4wkN3ZefVQDXUHqWjqhE5drYjOME+HzoOE/P94plQnlPrtn2+zCSIXoV2pw xzRewahKPQrDl1jnLRznBU0HGZOWs+9fOUHRIWNaRKbb3n6CZF8CdTDJd6IxgEaafds5 OPoR+/c3ZaBZLNf3TYqoH2LSd01OdpSqO/2Hr7aMAO3xTV4ITGcR7YB6hb3IaDYLBAWO R3GsglYNdMZs3ln7ZiQZ0SYjafkG/SVaoqwEGY/ABetoqT+BMlYVaiezLmRnTRwcxHd5 iHIg== X-Gm-Message-State: AOJu0Yzm1WH3i6/JyxxWOb8fQ0bECQub8jLSdewBHbHuPre6bB9E5ZDg MzqtP9RiwIL7TYCoW9COgFbFuL7qrQzVYnId8Us9XvSvCWl3Y3vT X-Received: by 2002:a05:6358:705:b0:176:4aae:515c with SMTP id e5-20020a056358070500b001764aae515cmr537147rwj.17.1707430693047; Thu, 08 Feb 2024 14:18:13 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWuaCC7NasFoFwnfc5VwhJsaN7nRE6k6KcjVXTXpE6c3TgL6v+X4baYfhWT7R5qD+JOUmHQ/q8eCaTKTWmD50Tekw2zXXxSfJeUBJ4ruZ1xbreiWyAndHTP0ZrEwDqrJHRxbT3p0JhmiFuWKDg08OO7ziS6I6u6tgXhPA1qX7+ak7YGiMn6ULYveUAnt0/VqNzOILiR6jtSAa+Z+/mUsViAI6oyPvgrUSHHJ16JJLLV6Pg4OZ8+A2bexRKavVABOOv1NrGbkrb070kW90QIIifg6BGhSTX5FxdTw9pMhWj925aOwEQRBgYgJj0= Received: from jmaxwell.com ([203.220.178.35]) by smtp.gmail.com with ESMTPSA id x37-20020a056a000be500b006e06e418c88sm253752pfu.216.2024.02.08.14.18.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 14:18:12 -0800 (PST) From: Jon Maxwell To: jesse.brandeburg@intel.com Cc: anthony.l.nguyen@intel.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, jmaxwell37@gmail.com Subject: [net-next v2] intel: make module parameters readable in sys filesystem Date: Fri, 9 Feb 2024 09:18:02 +1100 Message-Id: <20240208221802.131087-1-jmaxwell37@gmail.com> X-Mailer: git-send-email 2.39.3 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790370874720705696 X-GMAIL-MSGID: 1790370874720705696 v2: Remove the "debug" module parameter as per Andrew Lunns suggestion. It's not really needed as ethtool msglvl can control that. Linux users sometimes need an easy way to check current values of module parameters. For example the module may be manually reloaded with different parameters. Make these visible and readable in the /sys filesystem to allow that. Signed-off-by: Jon Maxwell --- drivers/net/ethernet/intel/e100.c | 4 ++-- drivers/net/ethernet/intel/igb/igb_main.c | 2 +- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/intel/e100.c b/drivers/net/ethernet/intel/e100.c index 01f0f12035caeb7ca1657387538fcebf5c608322..3fcb8daaa2437fa3fe7b98ba9f606dbbb1844e58 100644 --- a/drivers/net/ethernet/intel/e100.c +++ b/drivers/net/ethernet/intel/e100.c @@ -171,8 +171,8 @@ static int debug = 3; static int eeprom_bad_csum_allow = 0; static int use_io = 0; module_param(debug, int, 0); -module_param(eeprom_bad_csum_allow, int, 0); -module_param(use_io, int, 0); +module_param(eeprom_bad_csum_allow, int, 0444); +module_param(use_io, int, 0444); MODULE_PARM_DESC(debug, "Debug level (0=none,...,16=all)"); MODULE_PARM_DESC(eeprom_bad_csum_allow, "Allow bad eeprom checksums"); MODULE_PARM_DESC(use_io, "Force use of i/o access mode"); diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index 4df8d4153aa5f5ce7ac9dd566180d552be9f5b4f..31d0a43a908c0a4eab4fe1147064a5f5677c9f0b 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c @@ -202,7 +202,7 @@ static struct notifier_block dca_notifier = { #endif #ifdef CONFIG_PCI_IOV static unsigned int max_vfs; -module_param(max_vfs, uint, 0); +module_param(max_vfs, uint, 0444); MODULE_PARM_DESC(max_vfs, "Maximum number of virtual functions to allocate per physical function"); #endif /* CONFIG_PCI_IOV */ diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index bd541527c8c74d6922e8683e2f4493d9b361f67b..9d26ff82a397d4939cf7adea78c217e4071aa166 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -147,13 +147,13 @@ static struct notifier_block dca_notifier = { #ifdef CONFIG_PCI_IOV static unsigned int max_vfs; -module_param(max_vfs, uint, 0); +module_param(max_vfs, uint, 0444); MODULE_PARM_DESC(max_vfs, "Maximum number of virtual functions to allocate per physical function - default is zero and maximum value is 63. (Deprecated)"); #endif /* CONFIG_PCI_IOV */ static bool allow_unsupported_sfp; -module_param(allow_unsupported_sfp, bool, 0); +module_param(allow_unsupported_sfp, bool, 0444); MODULE_PARM_DESC(allow_unsupported_sfp, "Allow unsupported and untested SFP+ modules on 82599-based adapters");