From 6dd7b8489409f40dc6c91ae6de2da27fee6b093c Mon Sep 17 00:00:00 2001 From: Mark Stapp Date: Thu, 13 Dec 2018 14:15:27 -0500 Subject: [PATCH] zebra: use a small retry timeout for the rib workqueue 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 --- zebra/zebra_rib.c | 1 + zebra/zserv.h | 1 + 2 files changed, 2 insertions(+) diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index f2d07310ee..9f1374af57 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -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, diff --git a/zebra/zserv.h b/zebra/zserv.h index f7967f54f0..fe1dbdbfe4 100644 --- a/zebra/zserv.h +++ b/zebra/zserv.h @@ -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; -- 2.39.5