diff mbox

[net-next-2.6] bonding: remove meaningless /sys/module/bonding/parameters entries.

Message ID 1293978915-29674-1-git-send-email-nicolas.2p.debian@free.fr
State Rejected, archived
Delegated to: David Miller
Headers show

Commit Message

Nicolas de Pesloüan Jan. 2, 2011, 2:35 p.m. UTC
Only two bonding parameters are exposed in /sys/module/bonding:

num_grat_arp
num_unsol_na

Those values are not module global, but per device.

The per device values are available in /sys/class/net/<device>/bonding.

The values exposed in /sys/module/bonding are those given at module load time
and only used as default values when creating a device. They are read-only and
cannot change in any way.

As such, they are mostly meaningless.
---
 drivers/net/bonding/bond_main.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Comments

David Miller Jan. 3, 2011, 7:32 p.m. UTC | #1
From: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
Date: Sun,  2 Jan 2011 15:35:15 +0100

> Only two bonding parameters are exposed in /sys/module/bonding:
> 
> num_grat_arp
> num_unsol_na
> 
> Those values are not module global, but per device.
> 
> The per device values are available in /sys/class/net/<device>/bonding.
> 
> The values exposed in /sys/module/bonding are those given at module load time
> and only used as default values when creating a device. They are read-only and
> cannot change in any way.
> 
> As such, they are mostly meaningless.

First, you forgot to provide a proper "Signed-off-by: " line in your
patch submission, please read Documentation/SubmittingPatches

Secondly, you can't remove these, people might be using them.  It
could be useful, for example, to debug problems with passing module
parameters in.  This is the one way to find out what actually got
passed to the module when it loaded.

Therefore I'm not applying this patch, sorry.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Nicolas de Pesloüan Jan. 3, 2011, 7:59 p.m. UTC | #2
Le 03/01/2011 20:32, David Miller a écrit :
> From: Nicolas de Pesloüan<nicolas.2p.debian@free.fr>
> Date: Sun,  2 Jan 2011 15:35:15 +0100
>
>> Only two bonding parameters are exposed in /sys/module/bonding:
>>
>> num_grat_arp
>> num_unsol_na
>>
>> Those values are not module global, but per device.
>>
>> The per device values are available in /sys/class/net/<device>/bonding.
>>
>> The values exposed in /sys/module/bonding are those given at module load time
>> and only used as default values when creating a device. They are read-only and
>> cannot change in any way.
>>
>> As such, they are mostly meaningless.
>
> First, you forgot to provide a proper "Signed-off-by: " line in your
> patch submission, please read Documentation/SubmittingPatches

Oups, you are right. I forgot it.

> Secondly, you can't remove these, people might be using them.  It
> could be useful, for example, to debug problems with passing module
> parameters in.  This is the one way to find out what actually got
> passed to the module when it loaded.

I perfectly understand this.

The bonding module supports 19 different parameters, but only two are exposed into 
/sys/modules/bonding. Also, only one of those parameters is global to the module (max_bonds). All 
other parameters are in fact per device and exposed (read and write if appropriate) in 
/sys/class/net/<device>/bonding.

As there is no good reason to have only those two parameters exposed into /sys/modules/bonding, we 
should remove them or add all the other one. Due to the lack of real global meaning for those two, I 
thought removing them was the right option.

> Therefore I'm not applying this patch, sorry.

Anyway, thanks.

	Nicolas.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index b1025b8..b7fd966 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -116,9 +116,9 @@  module_param(max_bonds, int, 0);
 MODULE_PARM_DESC(max_bonds, "Max number of bonded devices");
 module_param(tx_queues, int, 0);
 MODULE_PARM_DESC(tx_queues, "Max number of transmit queues (default = 16)");
-module_param(num_grat_arp, int, 0644);
+module_param(num_grat_arp, int, 0);
 MODULE_PARM_DESC(num_grat_arp, "Number of gratuitous ARP packets to send on failover event");
-module_param(num_unsol_na, int, 0644);
+module_param(num_unsol_na, int, 0);
 MODULE_PARM_DESC(num_unsol_na, "Number of unsolicited IPv6 Neighbor Advertisements packets to send on failover event");
 module_param(miimon, int, 0);
 MODULE_PARM_DESC(miimon, "Link check interval in milliseconds");