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 <mjs@voltanet.io>
This commit is contained in:
Mark Stapp 2018-12-13 14:15:27 -05:00
parent 5418f988cf
commit 6dd7b84894
2 changed files with 2 additions and 0 deletions

View File

@ -2362,6 +2362,7 @@ static void rib_queue_init(struct zebra_t *zebra)
/* XXX: TODO: These should be runtime configurable via vty */ /* XXX: TODO: These should be runtime configurable via vty */
zebra->ribq->spec.max_retries = 3; zebra->ribq->spec.max_retries = 3;
zebra->ribq->spec.hold = ZEBRA_RIB_PROCESS_HOLD_TIME; zebra->ribq->spec.hold = ZEBRA_RIB_PROCESS_HOLD_TIME;
zebra->ribq->spec.retry = ZEBRA_RIB_PROCESS_RETRY_TIME;
if (!(zebra->mq = meta_queue_new())) { if (!(zebra->mq = meta_queue_new())) {
flog_err(EC_ZEBRA_WQ_NONEXISTENT, flog_err(EC_ZEBRA_WQ_NONEXISTENT,

View File

@ -184,6 +184,7 @@ struct zebra_t {
/* rib work queue */ /* rib work queue */
#define ZEBRA_RIB_PROCESS_HOLD_TIME 10 #define ZEBRA_RIB_PROCESS_HOLD_TIME 10
#define ZEBRA_RIB_PROCESS_RETRY_TIME 5
struct work_queue *ribq; struct work_queue *ribq;
struct meta_queue *mq; struct meta_queue *mq;