From patchwork Tue Jan 10 19:46:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 121789 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DE39942395; Tue, 10 Jan 2023 20:46:44 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C7CB640E25; Tue, 10 Jan 2023 20:46:44 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 791EB4021E for ; Tue, 10 Jan 2023 20:46:43 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id BF1F620B92AE; Tue, 10 Jan 2023 11:46:42 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com BF1F620B92AE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1673380002; bh=2l/Hz2YsXavfuCKE5SLpKi4NwTBT1dxq9vH18rz4T2M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eZ3u+sJ+1cvXYHoTg4OhDrz14yX+Qy2wYx7IeGaZDkitulEjs+KJD0HP8C0kO0elE 4zbsYTGoLyJy6gWWa5MPx14Uyc1teepoPYZ06ryk3q42BgXrUxdcq2tffDSg+hq1Fl MlFDWLb100X/QxLlMxV7xmPZQM1cuqPD43OwCUiY= From: Tyler Retzlaff To: dev@dpdk.org Cc: thomas@monjalon.net, mb@smartsharesystems.com, bruce.richardson@intel.com, ferruh.yigit@amd.com, Tyler Retzlaff Subject: [PATCH v6 0/2] eal: provide leading and trailing zero bit count abstraction Date: Tue, 10 Jan 2023 11:46:39 -0800 Message-Id: <1673380001-16558-1-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1669241687-18810-1-git-send-email-roretzla@linux.microsoft.com> References: <1669241687-18810-1-git-send-email-roretzla@linux.microsoft.com> MIME-Version: 1.0 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 v6: * remove stray #include v5: * fix implementation of msvc versions of rte_clz{32,64} incorrect use of _BitscanReverse{,64} index. * fix and expand unit test to exercise full range of counting over uint{32,64}_t input values. (which would have caught above mistake). * reduce commit title length * correct commit author 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 common to bitops header eal: provide leading and trailing zero bit count abstraction app/test/meson.build | 2 + app/test/test_bitcount.c | 93 ++++++++ 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, 557 insertions(+), 293 deletions(-) create mode 100644 app/test/test_bitcount.c