search for: br_is_root_bridge

Displaying 7 results from an estimated 7 matches for "br_is_root_bridge".

2007 Apr 18
4
[Bridge] [Patch] [2.6.7] Bridge - Fix BPDU message_age
...t/bridge/br_stp.c ============================================================= --- linux-2.6.7/net/bridge/br_stp.c.orig 2004-06-17 20:17:27.000000000 +0530 +++ linux-2.6.7/net/bridge/br_stp.c 2004-06-22 19:32:49.015908632 +0530 @@ -161,20 +161,19 @@ void br_transmit_config(struct net_bridg if (!br_is_root_bridge(br)) { struct net_bridge_port *root = br_get_port(br, br->root_port); - bpdu.max_age = root->message_age_timer.expires - jiffies; - - if (bpdu.max_age <= 0) bpdu.max_age = 1; + bpdu.message_age = br->max_age - + (root->message_age_timer.expires - jiffies) + 1; } bpdu...
2007 Apr 18
1
[Bridge] [PATCH 2.4] Bridge STP message age
...t;br_private.h" #include "br_private_stp.h" - +/* since time values in bpdu are in jiffies and then scaled (1/256) + * before sending, make sure that is at least one. + */ +#define MESSAGE_AGE_INCR ((HZ < 256) ? 1 : (HZ/256)) /* called under ioctl_lock or bridge lock */ int br_is_root_bridge(struct net_bridge *br) @@ -160,24 +163,26 @@ bpdu.root_path_cost = br->root_path_cost; bpdu.bridge_id = br->bridge_id; bpdu.port_id = p->port_id; - bpdu.message_age = 0; - if (!br_is_root_bridge(br)) { + if (br_is_root_bridge(br)) + bpdu.message_age = 0; + else { struct net_brid...
2007 Apr 18
0
[Bridge] [PATCH 2.6] Fix message age in bridge STP config packets
...nst char *br_port_state_names[] = { [BR_STATE_DISABLED] = "disabled", [BR_STATE_LISTENING] = "listening", @@ -157,24 +162,25 @@ bpdu.root_path_cost = br->root_path_cost; bpdu.bridge_id = br->bridge_id; bpdu.port_id = p->port_id; - bpdu.message_age = 0; - if (!br_is_root_bridge(br)) { + if (br_is_root_bridge(br)) + bpdu.message_age = 0; + else { struct net_bridge_port *root = br_get_port(br, br->root_port); - bpdu.max_age = root->message_age_timer.expires - jiffies; - - if (bpdu.max_age <= 0) bpdu.max_age = 1; + bpdu.message_age = br->max_age + -...
2007 Apr 18
0
[Bridge] [PATCH] (4/11) bridge - ioctl cleanup and consolidation
...oid *)args[1], indices, num*sizeof(int))) num = -EFAULT; kfree(indices); return num; @@ -119,7 +148,7 @@ return -EPERM; spin_lock_bh(&br->lock); - br->bridge_forward_delay = clock_t_to_jiffies(arg0); + br->bridge_forward_delay = clock_t_to_jiffies(args[1]); if (br_is_root_bridge(br)) br->forward_delay = br->bridge_forward_delay; spin_unlock_bh(&br->lock); @@ -130,7 +159,7 @@ return -EPERM; spin_lock_bh(&br->lock); - br->bridge_hello_time = clock_t_to_jiffies(arg0); + br->bridge_hello_time = clock_t_to_jiffies(args[1]); if (br_...
2007 Apr 18
0
[Bridge] setting STP values via brctl
...TIME); } Note the tv_to_jiffies() call. Then, I looked in the kernel file linux/net/bridge/br_sysfs_br.c at the following function: static void set_hello_time(struct net_bridge *br, unsigned long val) { unsigned long t = clock_t_to_jiffies(val); br->hello_time = t; if (br_is_root_bridge(br)) br->bridge_hello_time = t; } Note the clock_t_to_jiffies() call. Are we converting the time in brctl to jiffies and then when it enters the kernel, we again change the value again to jiffies? Or have I misses something completely? --joubert
2007 Apr 18
0
[Bridge] [PATCH] typo in br_stp.c: propgating -> propagating
Hi. I'm not subscribed, so please Cc: me. This trivial patch fixes a typo that irritates me every time I boot.. --- linux-2.5.orig/net/bridge/br_stp.c 2004-07-19 14:43:44.000000000 +0300 +++ linux-2.5/net/bridge/br_stp.c 2004-07-19 14:53:15.000000000 +0300 @@ -299,7 +299,7 @@ int isroot = br_is_root_bridge(br); pr_info("%s: topology change detected, %s\n", br->dev->name, - isroot ? "propgating" : "sending tcn bpdu"); + isroot ? "propagating" : "sending tcn bpdu"); if (isroot) { br->topology_change = 1;
2007 Apr 18
1
[Bridge] [BRIDGE] Unaligned access on IA64 when comparing ethernet addresses
From: Evgeny Kravtsunov <emkravts@openvz.org> compare_ether_addr() implicitly requires that the addresses passed are 2-bytes aligned in memory. This is not true for br_stp_change_bridge_id() and br_stp_recalculate_bridge_id() in which one of the addresses is unsigned char *, and thus may not be 2-bytes aligned. Signed-off-by: Evgeny Kravtsunov <emkravts@openvz.org> Signed-off-by: