From patchwork Wed Mar 10 23:24:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 88914 X-Patchwork-Delegate: david.marchand@redhat.com 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 E05F1A056A; Thu, 11 Mar 2021 00:24:27 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7D4AA406A2; Thu, 11 Mar 2021 00:24:27 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id E5EE740689 for ; Thu, 11 Mar 2021 00:24:26 +0100 (CET) Received: from linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net (linux.microsoft.com [13.77.154.182]) by linux.microsoft.com (Postfix) with ESMTPSA id 1FFBB208CFB6; Wed, 10 Mar 2021 15:24:26 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 1FFBB208CFB6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1615418666; bh=8wg6rdbv6f3yCLiahRUoPcXcnPGcCBZICV28s7H1Z8k=; h=From:To:Cc:Subject:Date:From; b=QA3Wo/60Gq9/aO3YJYJKpJ04j8oUW0uXzp0vksiz+Chd8ShUMw66NJcgiWIo6OeCY HOukrZv5XEuvtuq+q2zs8dhW5jI6nSZgTfDoyAL/KRsLqTwx5O+8aq3v0jU2QKTHAo ow0fns0B2x3pCMFibbYCoMZb1I1tPpX6jjgqxcHw= From: Tyler Retzlaff To: dev@dpdk.org Cc: ranjit.menon@intel.com, anatoly.burakov@intel.com Date: Wed, 10 Mar 2021 15:24:10 -0800 Message-Id: <1615418650-19513-1-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-dev] [PATCH] doc: propose correction rte_bsf64 return type declaration 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 Sender: "dev" It is clear from the change that introduced the rte_bsf64 inline function and an evaluation of usage that the initial revision was intended to return uint32_t and not int. It is proposed the return type of int be changed to uint32_t. -static inline int +static inline uint32_t rte_bsf64(uint64_t v) { return (uint32_t)__builtin_ctzll(v); } Signed-off-by: Tyler Retzlaff --- doc/guides/rel_notes/deprecation.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 64629e064..7ba86024a 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -17,6 +17,9 @@ Deprecation Notices * eal: The function ``rte_eal_remote_launch`` will return new error codes after read or write error on the pipe, instead of calling ``rte_panic``. +* eal: The inline function ``rte_bsf64`` will be changed to return ``uint32_t`` + instead of ``int`` as originally intended. + * rte_atomicNN_xxx: These APIs do not take memory order parameter. This does not allow for writing optimized code for all the CPU architectures supported in DPDK. DPDK will adopt C11 atomic operations semantics and provide wrappers