pipeline: fix comparison

Message ID 20220613115239.27838-1-cristian.dumitrescu@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series pipeline: fix comparison |

Checks

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

Commit Message

Cristian Dumitrescu June 13, 2022, 11:52 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 15, 2022, 7:06 p.m. UTC | #1
13/06/2022 13:52, 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")

The title is not informative about what is fixed.
Please give a bit of scope so people experiencing an issue
will know it is fixed.
You can at least give the words "learner table timers"
and maybe "check of maximum".
  
Cristian Dumitrescu June 16, 2022, 9:17 a.m. UTC | #2
> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Wednesday, June 15, 2022 8:06 PM
> To: Suresh Narayane, Harshad <harshad.suresh.narayane@intel.com>;
> Dumitrescu, Cristian <cristian.dumitrescu@intel.com>
> Cc: dev@dpdk.org
> Subject: Re: [PATCH] pipeline: fix comparison
> 
> 13/06/2022 13:52, 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")
> 
> The title is not informative about what is fixed.
> Please give a bit of scope so people experiencing an issue
> will know it is fixed.
> You can at least give the words "learner table timers"
> and maybe "check of maximum".
> 
> 

Thanks, Thomas, done in V2 just sent out:
https://patches.dpdk.org/project/dpdk/list/?series=23562

Regards,
Cristian
  

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));