netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-next v2] intel: make module parameters readable in sys filesystem
@ 2024-02-08 22:18 Jon Maxwell
  2024-02-09 17:19 ` Andrew Lunn
  0 siblings, 1 reply; 3+ messages in thread
From: Jon Maxwell @ 2024-02-08 22:18 UTC (permalink / raw)
  To: jesse.brandeburg
  Cc: anthony.l.nguyen, davem, edumazet, kuba, pabeni, intel-wired-lan,
	netdev, linux-kernel, jmaxwell37

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 <jmaxwell37@gmail.com>
---
 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");
 
-- 
2.39.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [net-next v2] intel: make module parameters readable in sys filesystem
  2024-02-08 22:18 [net-next v2] intel: make module parameters readable in sys filesystem Jon Maxwell
@ 2024-02-09 17:19 ` Andrew Lunn
  2024-02-13  3:17   ` Jonathan Maxwell
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Lunn @ 2024-02-09 17:19 UTC (permalink / raw)
  To: Jon Maxwell
  Cc: jesse.brandeburg, anthony.l.nguyen, davem, edumazet, kuba,
	pabeni, intel-wired-lan, netdev, linux-kernel

On Fri, Feb 09, 2024 at 09:18:02AM +1100, Jon Maxwell wrote:
> v2: Remove the "debug" module parameter as per Andrew Lunns suggestion.
>     It's not really needed as ethtool msglvl can control that.

It is normal to places comments like the above under the ---. In its
current place, it will be part of the commit message. Under the --- it
gets dropped when the patch is applied.

    Andrew

---
pw-bot: cr

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [net-next v2] intel: make module parameters readable in sys filesystem
  2024-02-09 17:19 ` Andrew Lunn
@ 2024-02-13  3:17   ` Jonathan Maxwell
  0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Maxwell @ 2024-02-13  3:17 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: jesse.brandeburg, anthony.l.nguyen, davem, edumazet, kuba,
	pabeni, intel-wired-lan, netdev, linux-kernel

On Sat, Feb 10, 2024 at 4:19 AM Andrew Lunn <andrew@lunn.ch> wrote:
>
> On Fri, Feb 09, 2024 at 09:18:02AM +1100, Jon Maxwell wrote:
> > v2: Remove the "debug" module parameter as per Andrew Lunns suggestion.
> >     It's not really needed as ethtool msglvl can control that.
>
> It is normal to places comments like the above under the ---. In its
> current place, it will be part of the commit message. Under the --- it
> gets dropped when the patch is applied.
>

Thanks Andrew I will resubmit tomorrow with that change.

>     Andrew
>
> ---
> pw-bot: cr

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-02-13  3:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-08 22:18 [net-next v2] intel: make module parameters readable in sys filesystem Jon Maxwell
2024-02-09 17:19 ` Andrew Lunn
2024-02-13  3:17   ` Jonathan Maxwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).