From ce1511f4b8f305eddd8d928ae0ddd6e335407230 Mon Sep 17 00:00:00 2001 From: Harshad Narayane Date: Thu, 16 Jun 2022 10:14:55 +0100 Subject: [PATCH] pipeline: fix check maximum learner table timeouts Fix comparison used to check against the maximum number of learner table timeouts. Fixes: e2ecc53582fb ("pipeline: improve learner table timers") Signed-off-by: Harshad Narayane Signed-off-by: Cristian Dumitrescu --- lib/pipeline/rte_swx_pipeline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pipeline/rte_swx_pipeline.c b/lib/pipeline/rte_swx_pipeline.c index 5c3406f0cf..066356684e 100644 --- a/lib/pipeline/rte_swx_pipeline.c +++ b/lib/pipeline/rte_swx_pipeline.c @@ -8845,7 +8845,7 @@ rte_swx_pipeline_learner_config(struct rte_swx_pipeline *p, /* Any other checks. */ CHECK(size, EINVAL); CHECK(timeout, EINVAL); - CHECK(n_timeouts && (n_timeouts < RTE_SWX_TABLE_LEARNER_N_KEY_TIMEOUTS_MAX), EINVAL); + CHECK(n_timeouts && (n_timeouts <= RTE_SWX_TABLE_LEARNER_N_KEY_TIMEOUTS_MAX), EINVAL); /* Memory allocation. */ l = calloc(1, sizeof(struct learner)); -- 2.39.5