Merge pull request #692 from donaldsharp/meta_queue_fix

zebra: Fix the metaq to be aware of all routing protocols we could see
This commit is contained in:
Jafar Al-Gharaibeh 2017-06-08 10:41:57 -05:00 committed by GitHub
commit ce7fce36bd
3 changed files with 28 additions and 15 deletions

View File

@ -39,7 +39,10 @@
# #
# Long description: Full description, but should try fit on a line. # Long description: Full description, but should try fit on a line.
#### ####
#
# If you add a new routing protocol here, make sure you go update
# meta_queue_map in zebra_rib.c
#
## type cname daemon C 4 6 short help ## type cname daemon C 4 6 short help
ZEBRA_ROUTE_SYSTEM, system, NULL, 'X', 0, 0, "Reserved" ZEBRA_ROUTE_SYSTEM, system, NULL, 'X', 0, 0, "Reserved"
ZEBRA_ROUTE_KERNEL, kernel, zebra, 'K', 1, 1, "kernel route" ZEBRA_ROUTE_KERNEL, kernel, zebra, 'K', 1, 1, "kernel route"

View File

@ -99,7 +99,7 @@ struct route_entry
/* meta-queue structure: /* meta-queue structure:
* sub-queue 0: connected, kernel * sub-queue 0: connected, kernel
* sub-queue 1: static * 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 3: iBGP, eBGP
* sub-queue 4: any other origin (if any) * 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 * Map from rib types to queue type (priority) in meta queue
*/ */
static const u_char meta_queue_map[ZEBRA_ROUTE_MAX] = { static const u_char meta_queue_map[ZEBRA_ROUTE_MAX] = {
[ZEBRA_ROUTE_SYSTEM] = 4, [ZEBRA_ROUTE_SYSTEM] = 4,
[ZEBRA_ROUTE_KERNEL] = 0, [ZEBRA_ROUTE_KERNEL] = 0,
[ZEBRA_ROUTE_CONNECT] = 0, [ZEBRA_ROUTE_CONNECT] = 0,
[ZEBRA_ROUTE_STATIC] = 1, [ZEBRA_ROUTE_STATIC] = 1,
[ZEBRA_ROUTE_RIP] = 2, [ZEBRA_ROUTE_RIP] = 2,
[ZEBRA_ROUTE_RIPNG] = 2, [ZEBRA_ROUTE_RIPNG] = 2,
[ZEBRA_ROUTE_OSPF] = 2, [ZEBRA_ROUTE_OSPF] = 2,
[ZEBRA_ROUTE_OSPF6] = 2, [ZEBRA_ROUTE_OSPF6] = 2,
[ZEBRA_ROUTE_ISIS] = 2, [ZEBRA_ROUTE_ISIS] = 2,
[ZEBRA_ROUTE_NHRP] = 2, [ZEBRA_ROUTE_BGP] = 3,
[ZEBRA_ROUTE_BGP] = 3, [ZEBRA_ROUTE_PIM] = 4, // Shouldn't happen but for safety
[ZEBRA_ROUTE_HSLS] = 4, [ZEBRA_ROUTE_EIGRP] = 2,
[ZEBRA_ROUTE_TABLE] = 1, [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, /* Look into the RN and queue it into one or more priority queues,