From 5ea39eaa96625ec8274703b1eb2c8f59042a8a32 Mon Sep 17 00:00:00 2001 From: "Ondrej Zajicek (work)" Date: Mon, 9 Sep 2019 02:55:32 +0200 Subject: Nest: Use bitmaps to keep track of exported routes Use a hierarchical bitmap in a routing table to assign ids to routes, and then use bitmaps (indexed by route id) in channels to keep track whether routes were exported. This avoids unreliable and inefficient re-evaluation of filters for old routes in order to determine whether they were exported. --- nest/protocol.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'nest/protocol.h') diff --git a/nest/protocol.h b/nest/protocol.h index c664c1e6..e4ec7fa2 100644 --- a/nest/protocol.h +++ b/nest/protocol.h @@ -507,6 +507,7 @@ struct channel { struct rtable *table; const struct filter *in_filter; /* Input filter */ const struct filter *out_filter; /* Output filter */ + struct bmap export_map; /* Keeps track which routes passed export filter */ struct channel_limit rx_limit; /* Receive limit (for in_keep_filtered) */ struct channel_limit in_limit; /* Input limit */ struct channel_limit out_limit; /* Output limit */ @@ -514,6 +515,7 @@ struct channel { struct event *feed_event; /* Event responsible for feeding */ struct fib_iterator feed_fit; /* Routing table iterator used during feeding */ struct proto_stats stats; /* Per-channel protocol statistics */ + u32 refeed_count; /* Number of routes exported during refeed regardless of out_limit */ u8 net_type; /* Routing table network type (NET_*), 0 for undefined */ u8 ra_mode; /* Mode of received route advertisements (RA_*) */ -- cgit v1.2.3