+ initial edition of meta-queue for RIB updates processing (bug #431)
diff --git a/zebra/rib.h b/zebra/rib.h
index 9621f2c..887ed3c 100644
--- a/zebra/rib.h
+++ b/zebra/rib.h
@@ -40,7 +40,7 @@
{
/* Status Flags for the *route_node*, but kept in the head RIB.. */
u_char rn_status;
-#define RIB_ROUTE_QUEUED (1 << 0)
+#define RIB_ROUTE_QUEUED(x) (1 << (x))
/* Link list. */
struct rib *next;
@@ -83,6 +83,20 @@
u_char nexthop_fib_num;
};
+/* meta-queue structure:
+ * sub-queue 0: connected, kernel
+ * sub-queue 1: static
+ * sub-queue 2: RIP, RIPng, OSPF, OSPF6, IS-IS
+ * sub-queue 3: iBGP, eBGP
+ * sub-queue 4: any other origin (if any)
+ */
+#define MQ_SIZE 5
+struct meta_queue
+{
+ struct list *subq[MQ_SIZE];
+ u_int32_t size; /* sum of lengths of all subqueues */
+};
+
/* Static route information. */
struct static_ipv4
{