Skip to content

Commit

Permalink
bridge: define some min/max/default ageing time constants
Browse files Browse the repository at this point in the history
Signed-off-by: Scott Feldman <[email protected]>
Acked-by: Jiri Pirko <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
scottfeldman authored and davem330 committed Sep 23, 2015
1 parent 4c66049 commit a79e88d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions include/linux/if_bridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion net/bridge/br_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a79e88d

Please sign in to comment.