From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A04014401B; Mon, 13 May 2024 17:34:35 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5D0DB40608; Mon, 13 May 2024 17:34:35 +0200 (CEST) Received: from mail-oa1-f49.google.com (mail-oa1-f49.google.com [209.85.160.49]) by mails.dpdk.org (Postfix) with ESMTP id DC9F3402CD for ; Mon, 13 May 2024 17:34:34 +0200 (CEST) Received: by mail-oa1-f49.google.com with SMTP id 586e51a60fabf-23ee34c33ceso2984391fac.3 for ; Mon, 13 May 2024 08:34:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715614474; x=1716219274; darn=dpdk.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=3hOr/9bCG0EvOgygUEwj6eq2qeI7ycDLifNZBDGGWXE=; b=hODxqSz/4HXhWgEtw88zN+MImSSazVSqQ/4zNNwEaZM3iMFedXfxOAYyWv6d0aqutQ B3EWr0bs2Y3Le3oh8sHXtsRHAWzlKApwoNXFQl8oFC1TCix+BJx0e0KPwwY1x7kEHBbW UNVNpzBCXFiZ2BiH2MehLZ939090PpfMgBDBHCB1jT4VDrOL+ZgHOdVsGcC8YfdbT/zW zB1j0gZqeoY0VlmwZK3BGNVMewU9sbhkAcS7/5vTz65f+tNAiQRvRxhoYGkmrPNKAFr+ P9mW1+VMsYobq/kJNHJ1Jlk5SOXcd5ZDBiUvNaiykWdXc0dXtSPKeDCGxV1gI8SN38o4 r4uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715614474; x=1716219274; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3hOr/9bCG0EvOgygUEwj6eq2qeI7ycDLifNZBDGGWXE=; b=TEyqBUbLGAP+KPMldc06vznfQ72Gn17flg53PGAZn24o8hJ5IjU5Mha9zzMRl9lc0z l/m/SyMPRE/dR5p2OeVIOTMvztfDuWBplH9wClaLaBRA/lqIG38nP6BCiyvxQCipq94K 8Hne4agWLZwuIZwYAJmEPjRMaUZ7PaM+1erc8TMsIKOG9cMwfBv5IK2Zz8sVQ9glOS8p q0apFjOHXxjY6adpjIxDQVrTKm3z2dq9CEdkw0NeOf5mogZmat8YmIKwLTMeOTAn3bBf rbgK2PxhnBbw+FKR7I4MF8cQZtCeuHoLsItkt48c2OTNLqOfDHt+lGncK11hwqcqTdwv tU5Q== X-Gm-Message-State: AOJu0YzqpUAN7YORBvBs+taO7Gu0omequTSNmVjdsQsRcOC6H2j7i/Q8 3OOWDfovYfTaunXGwtVVTTgglQVyNJEWn7CutKAgBharVEfrMKfmL++FJn4XMUdpR83J9LbAkO+ Fnn5lkNF/SS/Ar2PO1JOuzFQR7dM= X-Google-Smtp-Source: AGHT+IHHOrDiXfXG7t4N16QZou0NwG0C0cojNPczy4wQuE9dTvvvgfOMngwMJesjDoIbRXNXVNKM66pEffMKHFup3nM= X-Received: by 2002:a05:6870:b296:b0:23d:49de:970e with SMTP id 586e51a60fabf-24172fca44bmr11800036fac.53.1715614473840; Mon, 13 May 2024 08:34:33 -0700 (PDT) MIME-Version: 1.0 References: <20240427195418.1034591-1-aomeryamac@gmail.com> <278F162C-737E-4B26-81D3-7FF221E60BAE@arm.com> In-Reply-To: <278F162C-737E-4B26-81D3-7FF221E60BAE@arm.com> From: =?UTF-8?B?QWJkdWxsYWggw5ZtZXIgWWFtYcOn?= Date: Mon, 13 May 2024 18:34:23 +0300 Message-ID: Subject: Re: [PATCH v5] lib/hash: add defer queue reclaim API To: Honnappa Nagarahalli Cc: "dev@dpdk.org" , "stephen@networkplumber.org" Content-Type: multipart/alternative; boundary="00000000000048ef370618579ffe" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org --00000000000048ef370618579ffe Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello, That's my mistake and I will discard the lookup part. While I was implementing these parts, I thought that readers should not be in a quiescent state, and I just wanted to make sure that these values were in use and the reader was in the critical section. Thanks I will fix ASAP On Mon, May 13, 2024 at 8:25=E2=80=AFAM Honnappa Nagarahalli < Honnappa.Nagarahalli@arm.com> wrote: > Hi Abdullah, > This looks good, except for one comment inline. > > > On Apr 27, 2024, at 2:54=E2=80=AFPM, Abdullah =C3=96mer Yama=C3=A7 > wrote: > > > > This patch adds a new feature to the hash library to allow the user to > > reclaim the defer queue. This is useful when the user wants to force > > reclaim resources that are not being used. This API is only available > > if the RCU is enabled. > > > > Signed-off-by: Abdullah =C3=96mer Yama=C3=A7 > > --- > > app/test/test_hash.c | 90 ++++++++++++++++++++++++++++++++++++++ > > lib/hash/rte_cuckoo_hash.c | 21 +++++++++ > > lib/hash/rte_hash.h | 25 +++++++++++ > > lib/hash/version.map | 7 +++ > > 4 files changed, 143 insertions(+) > > > > diff --git a/app/test/test_hash.c b/app/test/test_hash.c > > index d586878a22..e763d0503f 100644 > > --- a/app/test/test_hash.c > > +++ b/app/test/test_hash.c > > @@ -2183,6 +2183,93 @@ test_hash_rcu_qsbr_sync_mode(uint8_t ext_bkt) > > > > } > > > > +/* > > + * rte_hash_rcu_qsbr_dq_reclaim unit test. > > + */ > > +static int test_hash_rcu_qsbr_dq_reclaim(void) > > +{ > > + size_t sz; > > + int32_t status; > > + unsigned int total_entries =3D 8; > > + unsigned int freed, pending, available; > > + uint32_t reclaim_keys[8] =3D {10, 11, 12, 13, 14, 15, 16, 17}; > > + struct rte_hash_rcu_config rcu_cfg =3D {0}; > > + struct rte_hash_parameters hash_params =3D { > > + .name =3D "test_hash_rcu_qsbr_dq_reclaim", > > + .entries =3D total_entries, > > + .key_len =3D sizeof(uint32_t), > > + .hash_func =3D NULL, > > + .hash_func_init_val =3D 0, > > + .socket_id =3D 0, > > + }; > > + > > + hash_params.extra_flag =3D RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY_LF; > > + > > + g_qsv =3D NULL; > > + g_handle =3D NULL; > > + > > + printf("\n# Running RCU QSBR DQ mode, reclaim defer queue functional > test\n"); > > + > > + g_handle =3D rte_hash_create(&hash_params); > > + RETURN_IF_ERROR_RCU_QSBR(g_handle =3D=3D NULL, "Hash creation failed"= ); > > + > > + /* Create RCU QSBR variable */ > > + sz =3D rte_rcu_qsbr_get_memsize(RTE_MAX_LCORE); > > + g_qsv =3D (struct rte_rcu_qsbr *)rte_zmalloc_socket(NULL, sz, > RTE_CACHE_LINE_SIZE, > > + SOCKET_ID_ANY); > > + RETURN_IF_ERROR_RCU_QSBR(g_qsv =3D=3D NULL, "RCU QSBR variable creati= on > failed"); > > + > > + status =3D rte_rcu_qsbr_init(g_qsv, RTE_MAX_LCORE); > > + RETURN_IF_ERROR_RCU_QSBR(status !=3D 0, "RCU QSBR variable > initialization failed"); > > + > > + rcu_cfg.v =3D g_qsv; > > + rcu_cfg.dq_size =3D total_entries; > > + rcu_cfg.mode =3D RTE_HASH_QSBR_MODE_DQ; > > + > > + /* Attach RCU QSBR to hash table */ > > + status =3D rte_hash_rcu_qsbr_add(g_handle, &rcu_cfg); > > + RETURN_IF_ERROR_RCU_QSBR(status !=3D 0, "Attach RCU QSBR to hash tabl= e > failed"); > > + > > + /* Register pseudo reader */ > > + status =3D rte_rcu_qsbr_thread_register(g_qsv, 0); > > + RETURN_IF_ERROR_RCU_QSBR(status !=3D 0, "RCU QSBR thread registration > failed"); > > + rte_rcu_qsbr_thread_online(g_qsv, 0); > > + > > + /* Fill half of the hash table */ > > + for (size_t i =3D 0; i < total_entries / 2; i++) > > + status =3D rte_hash_add_key(g_handle, &reclaim_keys[i]); > > + > > + /* Lookup inserted elements*/ > > + for (size_t i =3D 0; i < total_entries / 2; i++) > > + rte_hash_lookup(g_handle, &reclaim_keys[i]); > Why do we need to lookup the entries? > > > + > > + /* Try to put these elements into the defer queue*/ > > + for (size_t i =3D 0; i < total_entries / 2; i++) > > + rte_hash_del_key(g_handle, &reclaim_keys[i]); > > + > > + /* Reader quiescent */ > > + rte_rcu_qsbr_quiescent(g_qsv, 0); > > + > > + status =3D rte_hash_add_key(g_handle, &reclaim_keys[0]); > > + RETURN_IF_ERROR_RCU_QSBR(status < 0, "failed to add key (pos[%u]=3D%d= )", > 0, status); > > + > > + /* This should be (total_entries / 2) + 1 (last add) */ > > + unsigned int hash_size =3D rte_hash_count(g_handle); > > + > > + /* Freed size should be (total_entries / 2) */ > > + rte_hash_rcu_qsbr_dq_reclaim(g_handle, &freed, &pending, &available); > > + > > + rte_hash_free(g_handle); > > + rte_free(g_qsv); > > + > > + if (hash_size !=3D (total_entries / 2 + 1) || freed !=3D (total_entri= es / > 2)) { > > + printf("Failed to reclaim defer queue\n"); > > + return -1; > > + } > > + > > + return 0; > > +} > > + > > /* > > * Do all unit and performance tests. > > */ > > @@ -2261,6 +2348,9 @@ test_hash(void) > > if (test_hash_rcu_qsbr_sync_mode(1) < 0) > > return -1; > > > > + if (test_hash_rcu_qsbr_dq_reclaim() < 0) > > + return -1; > > + > > return 0; > > } > > > > diff --git a/lib/hash/rte_cuckoo_hash.c b/lib/hash/rte_cuckoo_hash.c > > index 9cf94645f6..52ccada12a 100644 > > --- a/lib/hash/rte_cuckoo_hash.c > > +++ b/lib/hash/rte_cuckoo_hash.c > > @@ -1588,6 +1588,27 @@ rte_hash_rcu_qsbr_add(struct rte_hash *h, struct > rte_hash_rcu_config *cfg) > > return 0; > > } > > > > +int rte_hash_rcu_qsbr_dq_reclaim(struct rte_hash *h, unsigned int > *freed, unsigned int *pending, > > + unsigned int *available) > > +{ > > + int ret; > > + > > + if (h =3D=3D NULL || h->hash_rcu_cfg =3D=3D NULL) { > > + HASH_LOG(ERR, "Invalid input parameter"); > > + rte_errno =3D EINVAL; > > + return 1; > > + } > > + > > + ret =3D rte_rcu_qsbr_dq_reclaim(h->dq, > h->hash_rcu_cfg->max_reclaim_size, freed, pending, > > + available); > > + if (ret !=3D 0) { > > + HASH_LOG(ERR, "%s: could not reclaim the defer queue in hash table", > __func__); > > + return 1; > > + } > > + > > + return 0; > > +} > > + > > static inline void > > remove_entry(const struct rte_hash *h, struct rte_hash_bucket *bkt, > > unsigned int i) > > diff --git a/lib/hash/rte_hash.h b/lib/hash/rte_hash.h > > index 7ecc021111..e1e0375fd5 100644 > > --- a/lib/hash/rte_hash.h > > +++ b/lib/hash/rte_hash.h > > @@ -674,6 +674,31 @@ rte_hash_iterate(const struct rte_hash *h, const > void **key, void **data, uint32 > > */ > > int rte_hash_rcu_qsbr_add(struct rte_hash *h, struct rte_hash_rcu_confi= g > *cfg); > > > > +/** > > + * Reclaim resources from the defer queue. > > + * This API reclaim the resources from the defer queue if rcu is > enabled. > > + * > > + * @param h > > + * The hash object to reclaim resources. > > + * @param freed > > + * Number of resources that were freed. > > + * @param pending > > + * Number of resources pending on the defer queue. > > + * This number might not be accurate if multi-thread safety is > configured. > > + * @param available > > + * Number of resources that can be added to the defer queue. > > + * This number might not be accurate if multi-thread safety is > configured. > > + * @return > > + * On success - 0 > > + * On error - 1 with error code set in rte_errno. > > + * Possible rte_errno codes are: > > + * - EINVAL - invalid pointer > > + */ > > +__rte_experimental > > +int rte_hash_rcu_qsbr_dq_reclaim(struct rte_hash *h, unsigned int > *freed, > > + unsigned int *pending, > > + unsigned int *available); > > + > > #ifdef __cplusplus > > } > > #endif > > diff --git a/lib/hash/version.map b/lib/hash/version.map > > index 6f4bcdb71b..d348dd9196 100644 > > --- a/lib/hash/version.map > > +++ b/lib/hash/version.map > > @@ -53,3 +53,10 @@ INTERNAL { > > rte_thash_gfni_stub; > > rte_thash_gfni_bulk_stub; > > }; > > + > > +EXPERIMENTAL { > > + global: > > + > > + # added in 24.07 > > + rte_hash_rcu_qsbr_dq_reclaim; > > +}; > > -- > > 2.34.1 > > > > IMPORTANT NOTICE: The contents of this email and any attachments are > confidential and may also be privileged. If you are not the intended > recipient, please notify the sender immediately and do not disclose the > contents to any other person, use it for any purpose, or store or copy th= e > information in any medium. Thank you. > --00000000000048ef370618579ffe Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello,
That's my mistake and I will discard the loo= kup part. While I was implementing these parts, I thought that readers shou= ld not be in a quiescent state, and I just wanted to make sure that these v= alues were in use and the reader=C2=A0was in the critical section.=C2=A0
Thanks I will fix ASAP

On Mon, May 13, 2024 at 8:25=E2=80=AFAM Honnappa= Nagarahalli <Honnappa.N= agarahalli@arm.com> wrote:
Hi Abdullah,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 This looks good, except for one comment inline.=

> On Apr 27, 2024, at 2:54=E2=80=AFPM, Abdullah =C3=96mer Yama=C3=A7 <= ;aomeryamac@gmail= .com> wrote:
>
> This patch adds a new feature to the hash library to allow the user to=
> reclaim the defer queue. This is useful when the user wants to force > reclaim resources that are not being used. This API is only available<= br> > if the RCU is enabled.
>
> Signed-off-by: Abdullah =C3=96mer Yama=C3=A7 <aomeryamac@gmail.com>
> ---
> app/test/test_hash.c=C2=A0 =C2=A0 =C2=A0 =C2=A0| 90 ++++++++++++++++++= ++++++++++++++++++++
> lib/hash/rte_cuckoo_hash.c | 21 +++++++++
> lib/hash/rte_hash.h=C2=A0 =C2=A0 =C2=A0 =C2=A0 | 25 +++++++++++
> lib/hash/version.map=C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 7 +++
> 4 files changed, 143 insertions(+)
>
> diff --git a/app/test/test_hash.c b/app/test/test_hash.c
> index d586878a22..e763d0503f 100644
> --- a/app/test/test_hash.c
> +++ b/app/test/test_hash.c
> @@ -2183,6 +2183,93 @@ test_hash_rcu_qsbr_sync_mode(uint8_t ext_bkt) >
> }
>
> +/*
> + * rte_hash_rcu_qsbr_dq_reclaim unit test.
> + */
> +static int test_hash_rcu_qsbr_dq_reclaim(void)
> +{
> + size_t sz;
> + int32_t status;
> + unsigned int total_entries =3D 8;
> + unsigned int freed, pending, available;
> + uint32_t reclaim_keys[8] =3D {10, 11, 12, 13, 14, 15, 16, 17};
> + struct rte_hash_rcu_config rcu_cfg =3D {0};
> + struct rte_hash_parameters hash_params =3D {
> +=C2=A0 =C2=A0 .name =3D "test_hash_rcu_qsbr_dq_reclaim", > +=C2=A0 =C2=A0 .entries =3D total_entries,
> +=C2=A0 =C2=A0 .key_len =3D sizeof(uint32_t),
> +=C2=A0 =C2=A0 .hash_func =3D NULL,
> +=C2=A0 =C2=A0 .hash_func_init_val =3D 0,
> +=C2=A0 =C2=A0 .socket_id =3D 0,
> + };
> +
> + hash_params.extra_flag =3D RTE_HASH_EXTRA_FLAGS_RW_CONCURRENCY_LF; > +
> + g_qsv =3D NULL;
> + g_handle =3D NULL;
> +
> + printf("\n# Running RCU QSBR DQ mode, reclaim defer queue funct= ional test\n");
> +
> + g_handle =3D rte_hash_create(&hash_params);
> + RETURN_IF_ERROR_RCU_QSBR(g_handle =3D=3D NULL, "Hash creation f= ailed");
> +
> + /* Create RCU QSBR variable */
> + sz =3D rte_rcu_qsbr_get_memsize(RTE_MAX_LCORE);
> + g_qsv =3D (struct rte_rcu_qsbr *)rte_zmalloc_socket(NULL, sz, RTE_CA= CHE_LINE_SIZE,
> +=C2=A0 SOCKET_ID_ANY);
> + RETURN_IF_ERROR_RCU_QSBR(g_qsv =3D=3D NULL, "RCU QSBR variable = creation failed");
> +
> + status =3D rte_rcu_qsbr_init(g_qsv, RTE_MAX_LCORE);
> + RETURN_IF_ERROR_RCU_QSBR(status !=3D 0, "RCU QSBR variable init= ialization failed");
> +
> + rcu_cfg.v =3D g_qsv;
> + rcu_cfg.dq_size =3D total_entries;
> + rcu_cfg.mode =3D RTE_HASH_QSBR_MODE_DQ;
> +
> + /* Attach RCU QSBR to hash table */
> + status =3D rte_hash_rcu_qsbr_add(g_handle, &rcu_cfg);
> + RETURN_IF_ERROR_RCU_QSBR(status !=3D 0, "Attach RCU QSBR to has= h table failed");
> +
> + /* Register pseudo reader */
> + status =3D rte_rcu_qsbr_thread_register(g_qsv, 0);
> + RETURN_IF_ERROR_RCU_QSBR(status !=3D 0, "RCU QSBR thread regist= ration failed");
> + rte_rcu_qsbr_thread_online(g_qsv, 0);
> +
> + /* Fill half of the hash table */
> + for (size_t i =3D 0; i < total_entries / 2; i++)
> + status =3D rte_hash_add_key(g_handle, &reclaim_keys[i]);
> +
> + /* Lookup inserted elements*/
> + for (size_t i =3D 0; i < total_entries / 2; i++)
> + rte_hash_lookup(g_handle, &reclaim_keys[i]);
Why do we need to lookup the entries?

> +
> + /* Try to put these elements into the defer queue*/
> + for (size_t i =3D 0; i < total_entries / 2; i++)
> + rte_hash_del_key(g_handle, &reclaim_keys[i]);
> +
> + /* Reader quiescent */
> + rte_rcu_qsbr_quiescent(g_qsv, 0);
> +
> + status =3D rte_hash_add_key(g_handle, &reclaim_keys[0]);
> + RETURN_IF_ERROR_RCU_QSBR(status < 0, "failed to add key (pos= [%u]=3D%d)", 0, status);
> +
> + /* This should be (total_entries / 2) + 1 (last add) */
> + unsigned int hash_size =3D rte_hash_count(g_handle);
> +
> + /* Freed size should be (total_entries / 2) */
> + rte_hash_rcu_qsbr_dq_reclaim(g_handle, &freed, &pending, &am= p;available);
> +
> + rte_hash_free(g_handle);
> + rte_free(g_qsv);
> +
> + if (hash_size !=3D (total_entries / 2 + 1) || freed !=3D (total_entr= ies / 2)) {
> + printf("Failed to reclaim defer queue\n");
> + return -1;
> + }
> +
> + return 0;
> +}
> +
> /*
> * Do all unit and performance tests.
> */
> @@ -2261,6 +2348,9 @@ test_hash(void)
> if (test_hash_rcu_qsbr_sync_mode(1) < 0)
> return -1;
>
> + if (test_hash_rcu_qsbr_dq_reclaim() < 0)
> + return -1;
> +
> return 0;
> }
>
> diff --git a/lib/hash/rte_cuckoo_hash.c b/lib/hash/rte_cuckoo_hash.c > index 9cf94645f6..52ccada12a 100644
> --- a/lib/hash/rte_cuckoo_hash.c
> +++ b/lib/hash/rte_cuckoo_hash.c
> @@ -1588,6 +1588,27 @@ rte_hash_rcu_qsbr_add(struct rte_hash *h, struc= t rte_hash_rcu_config *cfg)
> return 0;
> }
>
> +int rte_hash_rcu_qsbr_dq_reclaim(struct rte_hash *h, unsigned int *fr= eed, unsigned int *pending,
> + unsigned int *available)
> +{
> + int ret;
> +
> + if (h =3D=3D NULL || h->hash_rcu_cfg =3D=3D NULL) {
> + HASH_LOG(ERR, "Invalid input parameter");
> + rte_errno =3D EINVAL;
> + return 1;
> + }
> +
> + ret =3D rte_rcu_qsbr_dq_reclaim(h->dq, h->hash_rcu_cfg->max= _reclaim_size, freed, pending,
> +=C2=A0 =C2=A0 =C2=A0 available);
> + if (ret !=3D 0) {
> + HASH_LOG(ERR, "%s: could not reclaim the defer queue in hash ta= ble", __func__);
> + return 1;
> + }
> +
> + return 0;
> +}
> +
> static inline void
> remove_entry(const struct rte_hash *h, struct rte_hash_bucket *bkt, > unsigned int i)
> diff --git a/lib/hash/rte_hash.h b/lib/hash/rte_hash.h
> index 7ecc021111..e1e0375fd5 100644
> --- a/lib/hash/rte_hash.h
> +++ b/lib/hash/rte_hash.h
> @@ -674,6 +674,31 @@ rte_hash_iterate(const struct rte_hash *h, const = void **key, void **data, uint32
> */
> int rte_hash_rcu_qsbr_add(struct rte_hash *h, struct rte_hash_rcu_conf= ig *cfg);
>
> +/**
> + * Reclaim resources from the defer queue.
> + * This API reclaim the resources from the defer queue if rcu is enab= led.
> + *
> + * @param h
> + *=C2=A0 =C2=A0The hash object to reclaim resources.
> + * @param freed
> + *=C2=A0 =C2=A0Number of resources that were freed.
> + * @param pending
> + *=C2=A0 =C2=A0Number of resources pending on the defer queue.
> + *=C2=A0 =C2=A0This number might not be accurate if multi-thread safe= ty is configured.
> + * @param available
> + *=C2=A0 =C2=A0Number of resources that can be added to the defer que= ue.
> + *=C2=A0 =C2=A0This number might not be accurate if multi-thread safe= ty is configured.
> + * @return
> + *=C2=A0 =C2=A0On success - 0
> + *=C2=A0 =C2=A0On error - 1 with error code set in rte_errno.
> + *=C2=A0 =C2=A0Possible rte_errno codes are:
> + *=C2=A0 =C2=A0- EINVAL - invalid pointer
> + */
> +__rte_experimental
> +int rte_hash_rcu_qsbr_dq_reclaim(struct rte_hash *h, unsigned int *fr= eed,
> +=C2=A0 =C2=A0 unsigned int *pending,
> +=C2=A0 =C2=A0 unsigned int *available);
> +
> #ifdef __cplusplus
> }
> #endif
> diff --git a/lib/hash/version.map b/lib/hash/version.map
> index 6f4bcdb71b..d348dd9196 100644
> --- a/lib/hash/version.map
> +++ b/lib/hash/version.map
> @@ -53,3 +53,10 @@ INTERNAL {
> rte_thash_gfni_stub;
> rte_thash_gfni_bulk_stub;
> };
> +
> +EXPERIMENTAL {
> + global:
> +
> + # added in 24.07
> + rte_hash_rcu_qsbr_dq_reclaim;
> +};
> --
> 2.34.1
>

IMPORTANT NOTICE: The contents of this email and any attachments are confid= ential and may also be privileged. If you are not the intended recipient, p= lease notify the sender immediately and do not disclose the contents to any= other person, use it for any purpose, or store or copy the information in = any medium. Thank you.
--00000000000048ef370618579ffe--