]> git.karo-electronics.de Git - linux-beck.git/commitdiff
bridge: define some min/max/default ageing time constants
authorScott Feldman <sfeldma@gmail.com>
Wed, 23 Sep 2015 15:39:16 +0000 (08:39 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 23 Sep 2015 21:35:58 +0000 (14:35 -0700)
Signed-off-by: Scott Feldman <sfeldma@gmail.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/if_bridge.h
net/bridge/br_device.c

index dad8b00beed27220856985c984e620d88cafd736..a338a688ee4a4237eb938ff71627bbd5aafa442a 100644 (file)
@@ -46,6 +46,12 @@ struct br_ip_list {
 #define BR_LEARNING_SYNC       BIT(9)
 #define BR_PROXYARP_WIFI       BIT(10)
 
+/* values as per ieee8021QBridgeFdbAgingTime */
+#define BR_MIN_AGEING_TIME     (10 * HZ)
+#define BR_MAX_AGEING_TIME     (1000000 * HZ)
+
+#define BR_DEFAULT_AGEING_TIME (300 * HZ)
+
 extern void brioctl_set(int (*ioctl_hook)(struct net *, unsigned int, void __user *));
 
 typedef int br_should_route_hook_t(struct sk_buff *skb);
index 6ed2feb51e3c7ae3d0f0fd629d6e147549b5fa54..2f81624a82578360ec08a20c8817231b838f478c 100644 (file)
@@ -391,7 +391,7 @@ void br_dev_setup(struct net_device *dev)
        br->bridge_max_age = br->max_age = 20 * HZ;
        br->bridge_hello_time = br->hello_time = 2 * HZ;
        br->bridge_forward_delay = br->forward_delay = 15 * HZ;
-       br->ageing_time = 300 * HZ;
+       br->ageing_time = BR_DEFAULT_AGEING_TIME;
 
        br_netfilter_rtable_init(br);
        br_stp_timer_init(br);