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 D072D432CC; Wed, 8 Nov 2023 00:38:56 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A994542DC0; Wed, 8 Nov 2023 00:38:31 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 5869F410E3 for ; Wed, 8 Nov 2023 00:38:23 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 19C6E20B74C7; Tue, 7 Nov 2023 15:38:21 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 19C6E20B74C7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1699400302; bh=hq/EiDp3vI9Cp6bD90Ccv748l6CY9oHzLLUrelrWjaw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Erl9d1ULH5IHHjb9M6+ppCk4jHRxv51dO5ty+JFOnfsCDRETnToeM2NWR2jP8Wit0 sSnJWO3DZD9ye3BZeQqsVcIlDelAQ/kq3fakonsGQFVfAKVrfNUpQLkLNZqbk9MJGN 5gY0N1eGLjjT++JFq1S1ZzVlNhYGWT3pjbuM+Wfo= From: Tyler Retzlaff To: dev@dpdk.org Cc: Bruce Richardson , Cristian Dumitrescu , David Hunt , Honnappa Nagarahalli , Ruifeng Wang , Sameh Gobriel , Tyler Retzlaff , Vladimir Medvedkin , Yipeng Wang , mb@smartsharesystems.com Subject: [PATCH v3 7/7] hash: use abstracted bit count functions Date: Tue, 7 Nov 2023 15:38:20 -0800 Message-Id: <1699400300-22545-8-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1699400300-22545-1-git-send-email-roretzla@linux.microsoft.com> References: <1698887132-5347-1-git-send-email-roretzla@linux.microsoft.com> <1699400300-22545-1-git-send-email-roretzla@linux.microsoft.com> 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 Use rte_popcount64 instead of __builtin_popcountl where the argument type passed to the intrinsic was 64-bits. 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 19ee53a..ccdc3b9 100644 --- a/lib/hash/rte_cuckoo_hash.c +++ b/lib/hash/rte_cuckoo_hash.c @@ -2357,7 +2357,7 @@ struct rte_hash * __rte_hash_lookup_bulk(h, keys, num_keys, positions, hit_mask, data); /* Return number of hits */ - return __builtin_popcountl(*hit_mask); + return rte_popcount64(*hit_mask); } @@ -2474,7 +2474,7 @@ struct rte_hash * positions, hit_mask, data); /* Return number of hits */ - return __builtin_popcountl(*hit_mask); + return rte_popcount64(*hit_mask); } int32_t -- 1.8.3.1