[v3] lib/hash: setting the maximum reclamation size

Message ID 20240513163553.1221308-1-aomeryamac@gmail.com (mailing list archive)
State Accepted
Delegated to: David Marchand
Headers
Series [v3] lib/hash: setting the maximum reclamation size |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/intel-Functional success Functional PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-sample-apps-testing success Testing PASS
ci/iol-broadcom-Performance fail Performance Testing issues
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-compile-arm64-testing success Testing PASS

Commit Message

Abdullah Ömer Yamaç May 13, 2024, 4:35 p.m. UTC
  Set the maximum reclamation size to user provided value

Fixes: 769b2de7fb52 ("hash: implement RCU resources reclamation")
Cc: stable@dpdk.org
Cc: dharmik.thakkar@arm.com
Cc: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Cc: Yipeng Wang <yipeng1.wang@intel.com>
Cc: Sameh Gobriel <sameh.gobriel@intel.com>
Cc: Bruce Richardson <bruce.richardson@intel.com>
Cc: Vladimir Medvedkin <vladimir.medvedkin@intel.com>

Signed-off-by: Abdullah Ömer Yamaç <aomeryamac@gmail.com>
---
 lib/hash/rte_cuckoo_hash.c | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Honnappa Nagarahalli May 14, 2024, 8:52 p.m. UTC | #1
> On May 13, 2024, at 11:35 AM, Abdullah Ömer Yamaç <aomeryamac@gmail.com> wrote:
> 
> Set the maximum reclamation size to user provided value
> 
> Fixes: 769b2de7fb52 ("hash: implement RCU resources reclamation")
> Cc: stable@dpdk.org
> Cc: dharmik.thakkar@arm.com
> Cc: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
> Cc: Yipeng Wang <yipeng1.wang@intel.com>
> Cc: Sameh Gobriel <sameh.gobriel@intel.com>
> Cc: Bruce Richardson <bruce.richardson@intel.com>
> Cc: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
> 
> Signed-off-by: Abdullah Ömer Yamaç <aomeryamac@gmail.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>

> ---
> lib/hash/rte_cuckoo_hash.c | 1 +
> 1 file changed, 1 insertion(+)
> 
> diff --git a/lib/hash/rte_cuckoo_hash.c b/lib/hash/rte_cuckoo_hash.c
> index 9cf94645f6..f7f0fdfd21 100644
> --- a/lib/hash/rte_cuckoo_hash.c
> +++ b/lib/hash/rte_cuckoo_hash.c
> @@ -1557,6 +1557,7 @@ rte_hash_rcu_qsbr_add(struct rte_hash *h, struct rte_hash_rcu_config *cfg)
> if (params.size == 0)
> params.size = total_entries;
> params.trigger_reclaim_limit = cfg->trigger_reclaim_limit;
> + params.max_reclaim_size = cfg->max_reclaim_size;
> if (params.max_reclaim_size == 0)
> params.max_reclaim_size = RTE_HASH_RCU_DQ_RECLAIM_MAX;
> params.esize = sizeof(struct __rte_hash_rcu_dq_entry);
> -- 
> 2.34.1
>
  
David Marchand June 18, 2024, 2:09 p.m. UTC | #2
On Tue, May 14, 2024 at 10:52 PM Honnappa Nagarahalli
<Honnappa.Nagarahalli@arm.com> wrote:
> > On May 13, 2024, at 11:35 AM, Abdullah Ömer Yamaç <aomeryamac@gmail.com> wrote:
> >
> > Set the maximum reclamation size to user provided value
> >
> > Fixes: 769b2de7fb52 ("hash: implement RCU resources reclamation")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Abdullah Ömer Yamaç <aomeryamac@gmail.com>
> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>

Applied, thanks.
  

Patch

diff --git a/lib/hash/rte_cuckoo_hash.c b/lib/hash/rte_cuckoo_hash.c
index 9cf94645f6..f7f0fdfd21 100644
--- a/lib/hash/rte_cuckoo_hash.c
+++ b/lib/hash/rte_cuckoo_hash.c
@@ -1557,6 +1557,7 @@  rte_hash_rcu_qsbr_add(struct rte_hash *h, struct rte_hash_rcu_config *cfg)
 		if (params.size == 0)
 			params.size = total_entries;
 		params.trigger_reclaim_limit = cfg->trigger_reclaim_limit;
+		params.max_reclaim_size = cfg->max_reclaim_size;
 		if (params.max_reclaim_size == 0)
 			params.max_reclaim_size = RTE_HASH_RCU_DQ_RECLAIM_MAX;
 		params.esize = sizeof(struct __rte_hash_rcu_dq_entry);