[V2] pipeline: fix check against max number of learner table timeouts

Message ID 20220616091455.25347-1-cristian.dumitrescu@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series [V2] pipeline: fix check against max number of learner table timeouts |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-abi-testing success Testing PASS

Commit Message

Cristian Dumitrescu June 16, 2022, 9:14 a.m. UTC
  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

Thomas Monjalon June 20, 2022, 2:07 p.m. UTC | #1
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.
  

Patch

diff --git a/lib/pipeline/rte_swx_pipeline.c b/lib/pipeline/rte_swx_pipeline.c
index b4b44ad897..659d8726d1 100644
--- a/lib/pipeline/rte_swx_pipeline.c
+++ b/lib/pipeline/rte_swx_pipeline.c
@@ -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));