summaryrefslogtreecommitdiff
path: root/nest/protocol.h
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2023-01-31 13:07:46 +0100
committerMaria Matejka <mq@ucw.cz>2023-02-02 15:57:21 +0100
commitc354e8f4c199ca7dec441394156d18badac71b81 (patch)
treed5a0c43215603bef858699aa49678e27894893f8 /nest/protocol.h
parent64e08775251960a2b009fc35a084610c9c4c4909 (diff)
Interface updates are asynchronous
Instead of propagating interface updates as they are loaded from kernel, they are enqueued and all the notifications are called from a protocol-specific event. This change allows to break the locking loop between protocols and interfaces. Anyway, this change is based on v2 branch to keep the changes between v2 and v3 smaller.
Diffstat (limited to 'nest/protocol.h')
-rw-r--r--nest/protocol.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/nest/protocol.h b/nest/protocol.h
index 9fbe9158..6d5714a7 100644
--- a/nest/protocol.h
+++ b/nest/protocol.h
@@ -171,6 +171,7 @@ struct proto {
struct rte_src *main_source; /* Primary route source */
struct iface *vrf; /* Related VRF instance, NULL if global */
TLIST_LIST(proto_neigh) neighbors; /* List of neighbor structures */
+ struct iface_subscription iface_sub; /* Interface notification subscription */
const char *name; /* Name of this instance (== cf->name) */
u32 debug; /* Debugging flags */
@@ -210,10 +211,7 @@ struct proto {
* feed_end Notify channel about finish of route feeding.
*/
- void (*if_notify)(struct proto *, unsigned flags, struct iface *i);
- void (*ifa_notify)(struct proto *, unsigned flags, struct ifa *a);
void (*rt_notify)(struct proto *, struct channel *, struct network *net, struct rte *new, struct rte *old);
- void (*neigh_notify)(struct neighbor *neigh);
int (*preexport)(struct channel *, struct rte *rt);
void (*reload_routes)(struct channel *);
void (*feed_begin)(struct channel *, int initial);