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 9BD5A4238D; Mon, 9 Jan 2023 18:36:28 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4338E40689; Mon, 9 Jan 2023 18:36:28 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 5B4B440150 for ; Mon, 9 Jan 2023 18:36:27 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id A0DB520B92AA; Mon, 9 Jan 2023 09:36:26 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com A0DB520B92AA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1673285786; bh=icaxDzZH/iERRfEJtJ2MRS7aqUJVSvM93O1etsbvtEY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VSECajxeObXELsPJmM6mcWQUwuEQccxUBDwxt7+x8D1rFpnjNBToijaRWbSYUM8xn UoOpoiYFG6Nc5PUV3uGU8gqqCcSSPBBVG5fndhWfql/Wqnmenqy1i3+Xbw+2oI6bqc CAQhyszR9GekmZbkYrnQq5oarpRH2WuCu3beo1/U= From: Tyler Retzlaff To: dev@dpdk.org Cc: thomas@monjalon.net, mb@smartsharesystems.com, bruce.richardson@intel.com, Tyler Retzlaff Subject: [PATCH v4 0/2] eal: provide leading and trailing zero bit count abstraction Date: Mon, 9 Jan 2023 09:36:22 -0800 Message-Id: <1673285784-14394-1-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1669246997-30592-1-git-send-email-roretzla@linux.microsoft.com> References: <1669246997-30592-1-git-send-email-roretzla@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Move existing bit manipulation, log and npow functions from rte_common.h to rte_bitops.h Provide leading and trailing zero bit count functions to abstract away compiler specific implementations. Include basic unit test for new leading/trailing zero bit count functions. v4: * combine unit test commit into function addition commit v3: * rename to use 32/64 instead of l/ll suffixes * add new functions to rte_bitops.h instead of new header * move other bit functions from rte_common.h to rte_bitops.h v2: * use unsigned int instead of unsigned (checkpatches) * match multiple include guard naming convention to rte_common.h * add explicit extern "C" linkage to rte_bitcount.h note: not really needed but checkpatches required * add missing space around '-' Tyler Retzlaff (2): eal: move bit operation functions from common to bitops header eal: provide leading and trailing zero bit count abstraction app/test/meson.build | 2 + app/test/test_bitcount.c | 71 +++++++ app/test/test_common.c | 1 + lib/eal/common/rte_reciprocal.c | 1 + lib/eal/include/rte_bitops.h | 460 ++++++++++++++++++++++++++++++++++++++++ lib/eal/include/rte_common.h | 293 ------------------------- 6 files changed, 535 insertions(+), 293 deletions(-) create mode 100644 app/test/test_bitcount.c -- Series-acked-by: Morten Brørup Series-acked-by: Bruce Richardson