Displaying 14 results from an estimated 14 matches for "hello_time".
2007 Apr 18
4
[Bridge] [Patch] [2.6.7] Bridge - Fix BPDU message_age
...*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.max_age = br->max_age;
bpdu.hello_time = br->hello_time;
bpdu.forward_delay = br->forward_delay;
- br_send_config_bpdu(p, &bpdu);
-
- p->topology_change_ack = 0;
- p->config_pending = 0;
-
- mod_timer(&p->hold_timer, jiffies + BR_HOLD_TIME);
+ if (bpdu.message_age < br->max_age) {
+ br_send_config_bpdu...
2007 Apr 18
0
[Bridge] setting STP values via brctl
I have been playing around with the STP settings of brctl and saw
something strange.
I was setting the hello time, so I executed the following:
# brctl sethello br0 30
Then I had a look at the value that was set:
# cat /sys/class/net/br0/bridge/hello_time
2999
Much bigger than expected.
I started looking at the source. In the libbridge/libbridge_devif.c
file of brctl, we have the following routine:
int br_set_bridge_hello_time(const char *br, struct timeval *tv)
{
return br_set(br, "hello_time", __tv_to_jiffies(tv),...
2007 Apr 18
0
[Bridge] STP Explanation
...= 0x02; //convention
unsigned char bpdu_type;
} bpdu_header;
typedef struct
{
bpdu_flag flags;
unsigned char root_id[8];
unsigned char root_path_cost[4];
unsigned char bridge_id[8];
unsigned char port_id[2];
unsigned char message_age[2];
unsigned char max_age[2];
unsigned char hello_time[2];
unsigned char forward_delay[2];
} bpdu_body;
typedef struct
{
bpdu_header hdr;
bpdu_body body;
unsigned char ver_1_len[2];// ?
}bpdu;
--------------------------------------------------------------------------------------------------------------------------
but i'm perplex with t...
2007 Apr 18
0
[Bridge] [PATCH] Fix deadlock in br_stp_disable_bridge
Looks like somebody forgot to use the _bh spin_lock variant. We ran into a
deadlock where br->hello_timer expired while br_stp_disable_br() walked
br->port_list. Anush can provide you with a test program.
Patch against 2.6.16-rc3 inlined.
diff -rup linux-2.6.16-rc3/net/bridge/br_stp_if.c
linux-2.6.16-rc3-brfix/net/bridge/br_stp_if.c
--- linux-2.6.16-rc3/net/bridge/br_stp_if.c 2006-02-12 16:2...
2007 Apr 18
0
[Bridge] [PATCH] Fix deadlock in br_stp_disable_bridge (2nd try)
Looks like somebody forgot to use the _bh spin_lock variant. We ran into a
deadlock where br->hello_timer expired while br_stp_disable_br() walked
br->port_list. Anush can provide you with a test program.
Patch against 2.6.16-rc3 inlined.
Signed-off-by: Adrian Drzewiecki
diff -rup linux-2.6.16-rc3/net/bridge/br_stp_if.c
linux-2.6.16-rc3-brfix/net/bridge/br_stp_if.c
--- linux-2.6.16-rc3/net/bri...
2007 Apr 18
0
[Bridge] [PATCH 2.6] Fix message age in bridge STP config packets
..._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)
+ + MESSAGE_AGE_INCR;
}
bpdu.max_age = br->max_age;
bpdu.hello_time = br->hello_time;
bpdu.forward_delay = br->forward_delay;
- br_send_config_bpdu(p, &bpdu);
-
- p->topology_change_ack = 0;
- p->config_pending = 0;
-
- mod_timer(&p->hold_timer, jiffies + BR_HOLD_TIME);
+ if (bpdu.message_age < br->max_age) {
+ br_send_config_bpdu...
2007 Apr 18
1
[Bridge] [PATCH 2.4] Bridge STP message age
...ed long age;
root = br_get_port(br, br->root_port);
- age = br_timer_get_residue(&root->message_age_timer) + 1;
- bpdu.message_age = age;
+ bpdu.message_age = br_timer_get_residue(&root->message_age_timer)
+ + MESSAGE_AGE_INCR;
}
bpdu.max_age = br->max_age;
bpdu.hello_time = br->hello_time;
bpdu.forward_delay = br->forward_delay;
- br_send_config_bpdu(p, &bpdu);
+ if (bpdu.message_age < br->max_age) {
+ br_send_config_bpdu(p, &bpdu);
- p->topology_change_ack = 0;
- p->config_pending = 0;
- br_timer_set(&p->hold_timer, jiffies);...
2007 Apr 18
2
[Bridge] [RFC] bridge kernel API change
..._ADD_BRIDGE
del bridge - SIOCBR_DEL_BRIDGE
add if - SIOCBR_ADD_IF
delete if - SIOCBR_DEL_IF
get bridge info - /sys/class/bridge/brX/
get port list - /sys/class/bridge/brX/ports/*
set bridge forward delay - /sys/class/bridge/brX/forward_delay
set bridge hello time - /sys/class/bridge/brX/hello_time
set bridge max age - /sys/class/bridge/brX/max_age
set ageing time - /sys/class/bridge/brX/ageing_time
set gc interval - deprecated does nothing anymore
set get port info - /sys/class/bridge/brX/ports/ethX/*
set bridge stp state - /sys/class/bridge/brX/stp
set bridge priority - /sys/class/b...
2007 Apr 18
1
[Bridge] STP Explanation (2)
...bpdu->bpdu_body.bridge_id.addr[5];
buf[32] = (bpdu->bpdu_body.port_id >> 8) & 0xFF;
buf[33] = bpdu->bpdu_body.port_id & 0xFF;
br_set_ticks(buf+34, bpdu->bpdu_body.message_age);
br_set_ticks(buf+36, bpdu->bpdu_body.max_age);
br_set_ticks(buf+38, bpdu->bpdu_body.hello_time);
br_set_ticks(buf+40, bpdu->bpdu_body.forward_delay);
br_send_bpdu(p, buf, 42);
}
-------------------------------------------------------------------------
I also modified the following function like this :
------------------------------------------------------------------------------
/* cal...
2023 May 15
5
[Bridge] [PATCH net-next 1/2] bridge: Add a limit on FDB entries
...ERIER_STATE,
+ IFLA_BR_FDB_MAX_ENTRIES,
__IFLA_BR_MAX,
};
diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c
index 8eca8a5c80c6..d455a28df7c9 100644
--- a/net/bridge/br_device.c
+++ b/net/bridge/br_device.c
@@ -528,6 +528,8 @@ void br_dev_setup(struct net_device *dev)
br->bridge_hello_time = br->hello_time = 2 * HZ;
br->bridge_forward_delay = br->forward_delay = 15 * HZ;
br->bridge_ageing_time = br->ageing_time = BR_DEFAULT_AGEING_TIME;
+ br->fdb_n_entries = 0;
+ br->fdb_max_entries = 0;
dev->max_mtu = ETH_MAX_MTU;
br_netfilter_rtable_init(br);
diff...
2023 May 15
3
[Bridge] [PATCH net-next 1/2] bridge: Add a limit on FDB entries
...__IFLA_BR_MAX,
> };
>
> diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c
> index 8eca8a5c80c6..d455a28df7c9 100644
> --- a/net/bridge/br_device.c
> +++ b/net/bridge/br_device.c
> @@ -528,6 +528,8 @@ void br_dev_setup(struct net_device *dev)
> br->bridge_hello_time = br->hello_time = 2 * HZ;
> br->bridge_forward_delay = br->forward_delay = 15 * HZ;
> br->bridge_ageing_time = br->ageing_time = BR_DEFAULT_AGEING_TIME;
> + br->fdb_n_entries = 0;
> + br->fdb_max_entries = 0;
Unnecessary, the private area is already cleared....
2007 Apr 18
0
[Bridge] [PATCH] (4/11) bridge - ioctl cleanup and consolidation
...k_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_is_root_bridge(br))
br->hello_time = br->bridge_hello_time;
spin_unlock_bh(&br->lock);
@@ -141,7 +170,7 @@
return -EPERM;
spin_lock_bh(&br->lock);
- br->bridge_ma...
2013 Aug 26
0
[PATCH] bridge: separate querier and query timer into IGMP/IPv4 and MLD/IPv6 ones
...st multicast_querier_timer;
- struct timer_list multicast_query_timer;
+ struct timer_list ip4_multicast_querier_timer;
+ struct timer_list ip6_multicast_querier_timer;
+ struct timer_list ip4_multicast_query_timer;
+ struct timer_list ip6_multicast_query_timer;
#endif
struct timer_list hello_timer;
@@ -503,11 +509,31 @@ static inline bool br_multicast_is_router(struct net_bridge *br)
timer_pending(&br->multicast_router_timer));
}
-static inline bool br_multicast_querier_exists(struct net_bridge *br)
+static inline bool br_ip4_multicast_querier_exists(struct net_bridge *br)
{
-...
2013 Jan 09
16
[Bridge] [PATCH net-next V5 00/14] Add basic VLAN support to bridges
This series of patches provides an ability to add VLANs to the bridge
ports. This is similar to what can be found in most switches. The bridge
port may have any number of VLANs added to it including vlan 0 priority tagged
traffic. When vlans are added to the port, only traffic tagged with particular
vlan will forwarded over this port. Additionally, vlan ids are added to FDB
entries and become