zebra: Fix the metaq to be aware of all routing protocols we could see

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2017-06-07 15:43:23 -04:00
parent 9d693a54fa
commit 43cf4ba452
2 changed files with 24 additions and 14 deletions

View File

@ -99,7 +99,7 @@ struct route_entry
/* meta-queue structure:
* sub-queue 0: connected, kernel
* sub-queue 1: static
* sub-queue 2: RIP, RIPng, OSPF, OSPF6, IS-IS
* sub-queue 2: RIP, RIPng, OSPF, OSPF6, IS-IS, EIGRP, NHRP
* sub-queue 3: iBGP, eBGP
* sub-queue 4: any other origin (if any)
*/

View File

@ -1845,19 +1845,29 @@ meta_queue_process (struct work_queue *dummy, void *data)
* Map from rib types to queue type (priority) in meta queue
*/
static const u_char meta_queue_map[ZEBRA_ROUTE_MAX] = {
[ZEBRA_ROUTE_SYSTEM] = 4,
[ZEBRA_ROUTE_KERNEL] = 0,
[ZEBRA_ROUTE_CONNECT] = 0,
[ZEBRA_ROUTE_STATIC] = 1,
[ZEBRA_ROUTE_RIP] = 2,
[ZEBRA_ROUTE_RIPNG] = 2,
[ZEBRA_ROUTE_OSPF] = 2,
[ZEBRA_ROUTE_OSPF6] = 2,
[ZEBRA_ROUTE_ISIS] = 2,
[ZEBRA_ROUTE_NHRP] = 2,
[ZEBRA_ROUTE_BGP] = 3,
[ZEBRA_ROUTE_HSLS] = 4,
[ZEBRA_ROUTE_TABLE] = 1,
[ZEBRA_ROUTE_SYSTEM] = 4,
[ZEBRA_ROUTE_KERNEL] = 0,
[ZEBRA_ROUTE_CONNECT] = 0,
[ZEBRA_ROUTE_STATIC] = 1,
[ZEBRA_ROUTE_RIP] = 2,
[ZEBRA_ROUTE_RIPNG] = 2,
[ZEBRA_ROUTE_OSPF] = 2,
[ZEBRA_ROUTE_OSPF6] = 2,
[ZEBRA_ROUTE_ISIS] = 2,
[ZEBRA_ROUTE_BGP] = 3,
[ZEBRA_ROUTE_PIM] = 4, // Shouldn't happen but for safety
[ZEBRA_ROUTE_EIGRP] = 2,
[ZEBRA_ROUTE_NHRP] = 2,
[ZEBRA_ROUTE_HSLS] = 4,
[ZEBRA_ROUTE_OLSR] = 4,
[ZEBRA_ROUTE_TABLE] = 1,
[ZEBRA_ROUTE_LDP] = 4,
[ZEBRA_ROUTE_VNC] = 3,
[ZEBRA_ROUTE_VNC_DIRECT] = 3,
[ZEBRA_ROUTE_VNC_DIRECT_RH] = 3,
[ZEBRA_ROUTE_BGP_DIRECT] = 3,
[ZEBRA_ROUTE_BGP_DIRECT_EXT] = 3,
[ZEBRA_ROUTE_ALL] = 4, // Shouldn't happen but for safety
};
/* Look into the RN and queue it into one or more priority queues,