Commit 38f47210 authored by Ondřej Zajíček's avatar Ondřej Zajíček
Browse files

Babel: Avoid batch seqno updates

parent 5ee69d11
...@@ -760,6 +760,13 @@ babel_send_update_(struct babel_iface *ifa, btime changed, struct fib *rtable) ...@@ -760,6 +760,13 @@ babel_send_update_(struct babel_iface *ifa, btime changed, struct fib *rtable)
{ {
struct babel_proto *p = ifa->proto; struct babel_proto *p = ifa->proto;
/* Update increase was requested */
if (p->update_seqno_inc)
{
p->update_seqno++;
p->update_seqno_inc = 0;
}
FIB_WALK(rtable, struct babel_entry, e) FIB_WALK(rtable, struct babel_entry, e)
{ {
struct babel_route *r = e->selected_out; struct babel_route *r = e->selected_out;
...@@ -1299,8 +1306,8 @@ babel_handle_seqno_request(union babel_msg *m, struct babel_iface *ifa) ...@@ -1299,8 +1306,8 @@ babel_handle_seqno_request(union babel_msg *m, struct babel_iface *ifa)
/* Seqno is larger; check if we own the router id */ /* Seqno is larger; check if we own the router id */
if (msg->router_id == p->router_id) if (msg->router_id == p->router_id)
{ {
/* Ours; update seqno and trigger global update */ /* Ours; seqno increase and trigger global update */
p->update_seqno++; p->update_seqno_inc = 1;
babel_trigger_update(p); babel_trigger_update(p);
} }
else else
......
...@@ -139,6 +139,7 @@ struct babel_proto { ...@@ -139,6 +139,7 @@ struct babel_proto {
list interfaces; /* Interfaces we really know about (struct babel_iface) */ list interfaces; /* Interfaces we really know about (struct babel_iface) */
u64 router_id; u64 router_id;
u16 update_seqno; /* To be increased on request */ u16 update_seqno; /* To be increased on request */
u8 update_seqno_inc; /* Request for update_seqno increase */
u8 triggered; /* For triggering global updates */ u8 triggered; /* For triggering global updates */
slab *route_slab; slab *route_slab;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment