summaryrefslogtreecommitdiff
path: root/zebra/rib.h
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2020-10-01 14:58:37 -0400
committerIgor Ryzhov <iryzhov@nfware.com>2020-10-07 11:01:16 +0300
commit56724b7fb989c990cbbab9ccabd96d02b0e43f85 (patch)
tree2d62e05bd60a17b6782fd3425cb05bcff818ad6e /zebra/rib.h
parentc534e81d2cf3052d0959f19a602f3eca53b38fb4 (diff)
zebra: Make connected routes their own entry on the meta_q
During quick ifdown / ifup events from the linux kernel there exists a situation where a prefix that has both a kernel route and a static route can queued up on the meta-q. If the static route happens to point at a connected route for nexthop resolution and we receive a series of quick up/down events *after* the static route and kernel route are queued up for rib reprocessing. Since the static route and kernel route are queued on meta-q 1 and the connected route is also on meta-q 1 there exists a situation where the connected route will be resolved after the static route fails to resolve, leaving the static route in a unresolved state. Add a new queue level and put connected routes on their own level, since they are the fundamental building blocks of pretty much all the other routes. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'zebra/rib.h')
-rw-r--r--zebra/rib.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/zebra/rib.h b/zebra/rib.h
index be680a112f..38f8029791 100644
--- a/zebra/rib.h
+++ b/zebra/rib.h
@@ -165,13 +165,15 @@ struct route_entry {
/* meta-queue structure:
* sub-queue 0: nexthop group objects
- * sub-queue 1: connected, kernel
- * sub-queue 2: static
- * sub-queue 3: RIP, RIPng, OSPF, OSPF6, IS-IS, EIGRP, NHRP
- * sub-queue 4: iBGP, eBGP
- * sub-queue 5: any other origin (if any)
+ * sub-queue 1: connected
+ * sub-queue 2: kernel
+ * sub-queue 3: static
+ * sub-queue 4: RIP, RIPng, OSPF, OSPF6, IS-IS, EIGRP, NHRP
+ * sub-queue 5: iBGP, eBGP
+ * sub-queue 6: any other origin (if any) typically those that
+ * don't generate routes
*/
-#define MQ_SIZE 6
+#define MQ_SIZE 7
struct meta_queue {
struct list *subq[MQ_SIZE];
uint32_t size; /* sum of lengths of all subqueues */