[V2] pipeline: fix check against max number of learner table timeouts
Checks
Commit Message
From: Harshad Narayane <harshad.suresh.narayane@intel.com>
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 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
16/06/2022 11:14, Cristian Dumitrescu:
> From: Harshad Narayane <harshad.suresh.narayane@intel.com>
>
> 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>
Applied, thanks.
@@ -8848,7 +8848,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));