netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phil Oester <kernel@linuxace.com>
To: netdev@vger.kernel.org
Subject: [PATCH][BONDING] Add max_bonds kernel parameter
Date: Fri, 29 Feb 2008 10:51:30 -0800	[thread overview]
Message-ID: <20080229185130.GA28138@linuxace.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2 bytes --]




[-- Attachment #2: patch-maxbonds --]
[-- Type: text/plain, Size: 1586 bytes --]

commit eb8694ab0a53343ebb45abeb2a9568d6267fa2f2
Author: Phil Oester <kernel@linuxace.com>
Date:   Fri Feb 29 13:26:34 2008 -0500

    The bonding driver (and initscripts) seem to assume everyone loads bonding
    as a module.  So when compiled into the kernel, changing the max_bonds
    parameter can only be done in the source code.
    
    Below adds a kernel command line parameter to change max_bonds when
    compiled in.
    
    Phil
    
    Signed-off-by: Phil Oester <kernel@linuxace.com>

diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 9a5b665..4b21045 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1071,6 +1071,10 @@ and is between 256 and 4096 characters. It is defined in the file
 			(machvec) in a generic kernel.
 			Example: machvec=hpzx1_swiotlb
 
+	max_bonds=	[NET] Maximum number of bonded devices which can be
+			created and the default number of devices which
+			will be created automatically at boot.
+
 	max_loop=	[LOOP] Maximum number of loopback devices that can
 			be mounted
 			Format: <1-256>
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 0942d82..64597d8 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -5032,3 +5032,12 @@ MODULE_SUPPORTED_DEVICE("most ethernet devices");
  * End:
  */
 
+#ifndef MODULE
+static int __init max_bonds_setup(char *str)
+{
+        max_bonds = simple_strtol(str, NULL, 0);
+        return 1;
+}
+
+__setup("max_bonds=", max_bonds_setup);
+#endif

             reply	other threads:[~2008-02-29 18:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-29 18:51 Phil Oester [this message]
2008-02-29 19:03 ` [PATCH][BONDING] Add max_bonds kernel parameter Jay Vosburgh
2008-02-29 19:31   ` Phil Oester

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080229185130.GA28138@linuxace.com \
    --to=kernel@linuxace.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).