]> git.droids-corp.org - dpdk.git/commitdiff
pipeline: fix check maximum learner table timeouts
authorHarshad Narayane <harshad.suresh.narayane@intel.com>
Thu, 16 Jun 2022 09:14:55 +0000 (10:14 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 20 Jun 2022 14:06:41 +0000 (16:06 +0200)
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 <harshad.suresh.narayane@intel.com>
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
lib/pipeline/rte_swx_pipeline.c

index 5c3406f0cfee9a2afea5810876a8660144922ab6..066356684e66c6ec23c0ead6de2b1e7c7065ef79 100644 (file)
@@ -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));