lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1405419341-31510-3-git-send-email-vfalico@gmail.com>
Date:	Tue, 15 Jul 2014 12:15:41 +0200
From:	Veaceslav Falico <vfalico@...il.com>
To:	netdev@...r.kernel.org
Cc:	Veaceslav Falico <vfalico@...il.com>,
	Jay Vosburgh <j.vosburgh@...il.com>,
	Andy Gospodarek <andy@...yhouse.net>
Subject: [PATCH net-next 2/2] bonding: make hard-coded defines configurable at build

CC: Jay Vosburgh <j.vosburgh@...il.com>
CC: Andy Gospodarek <andy@...yhouse.net>
Signed-off-by: Veaceslav Falico <vfalico@...il.com>
---
 drivers/net/bonding/Kconfig   | 16 ++++++++++++++++
 drivers/net/bonding/bonding.h |  6 +++---
 2 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/drivers/net/bonding/Kconfig b/drivers/net/bonding/Kconfig
index 7b1a0fa..28fb3af 100644
--- a/drivers/net/bonding/Kconfig
+++ b/drivers/net/bonding/Kconfig
@@ -15,3 +15,19 @@ menuconfig BONDING
 
 	  To compile this driver as a module, choose M here: the module
 	  will be called bonding.
+
+if BONDING
+
+config BOND_MAX_VLAN_ENCAP
+	int "Maximum number of stacked vlans on top of bonding"
+	default "2"
+
+config BOND_MAX_ARP_TARGETS
+	int "Maximum number of ip targets arp monitor supports"
+	default "16"
+
+config BOND_DEFAULT_MIIMON
+	int "Default miimon monitoring frequency in milliseconds"
+	default "100"
+
+endif
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h
index 0b4d9cd..119ce68 100644
--- a/drivers/net/bonding/bonding.h
+++ b/drivers/net/bonding/bonding.h
@@ -36,10 +36,10 @@
 
 #define bond_version DRV_DESCRIPTION ": v" DRV_VERSION " (" DRV_RELDATE ")\n"
 
-#define BOND_MAX_VLAN_ENCAP	2
-#define BOND_MAX_ARP_TARGETS	16
+#define BOND_MAX_VLAN_ENCAP	CONFIG_BOND_MAX_VLAN_ENCAP
+#define BOND_MAX_ARP_TARGETS	CONFIG_BOND_MAX_ARP_TARGETS
 
-#define BOND_DEFAULT_MIIMON	100
+#define BOND_DEFAULT_MIIMON	CONFIG_BOND_DEFAULT_MIIMON
 
 /*
  * Less bad way to call ioctl from within the kernel; this needs to be
-- 
1.8.4

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ