Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5DBEC39AEA for ; Fri, 1 Mar 2024 18:49:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.12 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709318948; cv=none; b=k3w986GbjK2iQWCLOewNu5tK9U8HoQU3Lnjpb3XIoDpvhl4nJbsuuV4dF+vQhhpjeCdqwCPQd+a7G/+HR37R1GkpypUtHsLzZtoUAhkSnkh+2X5H3tBbm6+F7fcI4DULfL1CauD7rzmHfbxIiDbtPifxGs362VGrAlsK4/ywDpw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709318948; c=relaxed/simple; bh=diKTYoM9EX0EsS81vwzbZ/W/nLmiOB0HhoflRmzB4zQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ROIoyhb312cr0sXezyf13giJqXfIt6TyYTF/teQ/YS+hdQUGd51G9URuyXwMyy2AiObAX7LfQcHJH88IiD6ysf8fuzG1nZuZWt5QCJYIwbj1QciUkzA876wLUvMj7dgG8f6WflshRGp5Db6oE80yhjg73eq+rdn4MpkAfb5KFh4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=ZmDKWogF; arc=none smtp.client-ip=198.175.65.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="ZmDKWogF" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709318946; x=1740854946; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=diKTYoM9EX0EsS81vwzbZ/W/nLmiOB0HhoflRmzB4zQ=; b=ZmDKWogFWeSH9OMSoVTsXCWeJsxLdvHNK1q86K7TBgdB3VerUbEUrCsw OV5171Eed+PmEYkK4USZdevlZQTRLX0sROVZ4hVNM+nx6k/wxlVVmFMus S+dl+D8z+yIk7bm5Pp80MOi4Csca8oIq/l1tLBSvAD9FQSSFZ4ofILN51 IwVJNOT2lu04orkc2l2OSO83V0l+9B5QPU94K0bYvENPO8epR+dX9DwnB S67qBoSTjS9Iu8KxPuV+nF2XEN6XVwK8V1Bc8SExEeSFpF4/J10MpVW65 4wqP7dj4ZuT9EE1cIQb5olCEHLQs6xowzzDvC4Vv/62dIhe9rfdacL21E Q==; X-IronPort-AV: E=McAfee;i="6600,9927,11000"; a="15303326" X-IronPort-AV: E=Sophos;i="6.06,196,1705392000"; d="scan'208";a="15303326" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Mar 2024 10:49:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,196,1705392000"; d="scan'208";a="8205845" Received: from anguy11-upstream.jf.intel.com ([10.166.9.133]) by fmviesa009.fm.intel.com with ESMTP; 01 Mar 2024 10:49:04 -0800 From: Tony Nguyen To: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, edumazet@google.com, netdev@vger.kernel.org Cc: Jon Maxwell , anthony.l.nguyen@intel.com, Jacob Keller , Pucha Himasekhar Reddy Subject: [PATCH net-next v2 1/4] intel: make module parameters readable in sys filesystem Date: Fri, 1 Mar 2024 10:48:02 -0800 Message-ID: <20240301184806.2634508-2-anthony.l.nguyen@intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240301184806.2634508-1-anthony.l.nguyen@intel.com> References: <20240301184806.2634508-1-anthony.l.nguyen@intel.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Jon Maxwell 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. But don't make the "debug" module parameter visible as debugging is enabled via ethtool msglvl. Signed-off-by: Jon Maxwell Reviewed-by: Jacob Keller Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/e100.c | 4 ++-- drivers/net/ethernet/intel/igb/igb_main.c | 2 +- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/intel/e100.c b/drivers/net/ethernet/intel/e100.c index 01f0f12035ca..3fcb8daaa243 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 cebb44f51d5f..244d50cbcc4b 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 e23c3614fb10..6d8268be01d4 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -153,7 +153,7 @@ MODULE_PARM_DESC(max_vfs, #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"); -- 2.41.0