]> git.proxmox.com Git - mirror_frr.git/commitdiff
zebra: use a small retry timeout for the rib workqueue
authorMark Stapp <mjs@voltanet.io>
Thu, 13 Dec 2018 19:15:27 +0000 (14:15 -0500)
committerMark Stapp <mjs@voltanet.io>
Thu, 13 Dec 2018 19:15:27 +0000 (14:15 -0500)
In the zebra rib processing workqueue, set a small timeout
so that we will wait a short time if the queue into the
async dataplane is full. This helps avoid a situation where
the zebra main pthread constantly retries rib work without
giving the dataplane pthread a chance to make progress.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
zebra/zebra_rib.c
zebra/zserv.h

index f2d07310eed10914e6bd28d21cc3837f78e99b03..9f1374af573261b85b8cfc301c6eb291e0a09b9b 100644 (file)
@@ -2362,6 +2362,7 @@ static void rib_queue_init(struct zebra_t *zebra)
        /* XXX: TODO: These should be runtime configurable via vty */
        zebra->ribq->spec.max_retries = 3;
        zebra->ribq->spec.hold = ZEBRA_RIB_PROCESS_HOLD_TIME;
+       zebra->ribq->spec.retry = ZEBRA_RIB_PROCESS_RETRY_TIME;
 
        if (!(zebra->mq = meta_queue_new())) {
                flog_err(EC_ZEBRA_WQ_NONEXISTENT,
index f7967f54f00b18e6afa5da7b5e4db12950ad21bd..fe1dbdbfe48e2f2edf5eee3709090415cdd4d56f 100644 (file)
@@ -184,6 +184,7 @@ struct zebra_t {
 
 /* rib work queue */
 #define ZEBRA_RIB_PROCESS_HOLD_TIME 10
+#define ZEBRA_RIB_PROCESS_RETRY_TIME 5
        struct work_queue *ribq;
        struct meta_queue *mq;