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 9C33943E86; Tue, 16 Apr 2024 18:06:53 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1B33940268; Tue, 16 Apr 2024 18:06:53 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 3FAFD40262 for ; Tue, 16 Apr 2024 18:06:52 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1086) id 8FA1120FD465; Tue, 16 Apr 2024 09:06:51 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 8FA1120FD465 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1713283611; bh=fcrYf+HLKIQeeZ6jw4vgnRjHHshWspK49ZdD1rtyyWc=; h=From:To:Cc:Subject:Date:From; b=q+6t5QV2CVnzssMMMDxAI8tW26fwRJIiSfC8K+22151RjQhVhPBy+IyB7tYTiHK8c uWbzvh9C+i0tihdLP6AMdKcy0we/QPw5OHMnZQxsNx55RbN8hAOMHPMfjrq41ZV4ER cTPFcJWTy4oelliOEGa+yvlHsSa9RnfYCPxRrLbM= From: Tyler Retzlaff To: dev@dpdk.org Cc: Bruce Richardson , Sameh Gobriel , Vladimir Medvedkin , Yipeng Wang , Tyler Retzlaff Subject: [PATCH] hash: cast away atomic qualification Date: Tue, 16 Apr 2024 09:06:49 -0700 Message-Id: <1713283609-32101-1-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 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 rte_free accepts only non-cva qualified arguments so cast away RTE_ATOMIC qualification for tbl_chng_cnt and h->tbl_chng_cnt when calling rte_free. Signed-off-by: Tyler Retzlaff --- lib/hash/rte_cuckoo_hash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/hash/rte_cuckoo_hash.c b/lib/hash/rte_cuckoo_hash.c index 9cf9464..b31a3d9 100644 --- a/lib/hash/rte_cuckoo_hash.c +++ b/lib/hash/rte_cuckoo_hash.c @@ -481,7 +481,7 @@ struct rte_hash * rte_free(buckets); rte_free(buckets_ext); rte_free(k); - rte_free(tbl_chng_cnt); + rte_free((void *)(uintptr_t)tbl_chng_cnt); rte_free(ext_bkt_to_free); return NULL; } @@ -526,7 +526,7 @@ struct rte_hash * rte_free(h->key_store); rte_free(h->buckets); rte_free(h->buckets_ext); - rte_free(h->tbl_chng_cnt); + rte_free((void *)(uintptr_t)h->tbl_chng_cnt); rte_free(h->ext_bkt_to_free); rte_free(h->hash_rcu_cfg); rte_free(h); -- 1.8.3.1