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 100BC42D26; Thu, 22 Jun 2023 19:44:49 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9FEEC40DDA; Thu, 22 Jun 2023 19:44:48 +0200 (CEST) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by mails.dpdk.org (Postfix) with ESMTP id 743D6406BA for ; Thu, 22 Jun 2023 19:44:46 +0200 (CEST) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 177655C00C8; Thu, 22 Jun 2023 13:44:46 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 22 Jun 2023 13:44:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1687455886; x=1687542286; bh=kwZsyRU63xejLpFX/Z5x7un/ZJxptC5xHHO N1+iYugU=; b=vrEN0P6LfKkoPuWqYHh/hLZWl+Jwz9qmSE3dwEKGuK6xUKwSl+H +K3ePGjGM9Wwo5vD+irPtWeWve3Jr1GTtF0deW2DXcdYF2NpkKdGS0ZLI7KvLRcl EfICU+CcYNRceqdbDi7aK5wtH6jEQHVOUH54fbNsFH4jBejE8PKDFyz/g2KtaReZ kfYEyWsI0W/z/lZ3J4BqGW2k1Mq+BMq2rFnBQkXQUvyclL79VpRAvykwq+Wy6Fch 1BA9zFw2ogFHmBKGZSLAVeN8GEYysMQgT9FDgDn4MYHFUAh6MQCNLTjfmdK1SuPC Ey0KqH5tG3NC35qjDJni531g/G1/C0nqyTw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1687455886; x=1687542286; bh=kwZsyRU63xejLpFX/Z5x7un/ZJxptC5xHHO N1+iYugU=; b=mRBtXW3lfmMiitUTcxLptNrpF9sHGrYVRC9qBUKWJSafkc1eynS TNh1pQXHuZm+qz40PehT4kr/G/RaA51Q/LUbT/XT/TDdeiTlZDN0VzOJpWTBD+Dn bz32mhnWYVH0VxPH+9jWHFLFysRqTB1hGoDjQIwZnSVpmEgjOYR37g4c9wCe4rp3 keA6WTz4XUD4/8O7ToMjttldFyf/kqfdvCdhmCDbH2ZvYTd/r5rhHI/e5aVSkm5u jWNor0CBI05VQfkdmF7SeE+NeqEKY3o5wwnK/1yIxZ/tZD4z5FYOyTWzGShh7bmF Y+4bR6kKbQX+9y+NopekjW2XSO/DEOx/02g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrgeeguddgudduhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhho mhgrshcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqne cuggftrfgrthhtvghrnheptdejieeifeehtdffgfdvleetueeffeehueejgfeuteeftddt ieekgfekudehtdfgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 22 Jun 2023 13:44:45 -0400 (EDT) From: Thomas Monjalon To: Volodymyr Fialko Cc: dev@dpdk.org, cristian.dumitrescu@intel.com, jerinj@marvell.com, anoobj@marvell.com Subject: Re: [PATCH v3] bitmap: add scan from offset function Date: Thu, 22 Jun 2023 19:44:43 +0200 Message-ID: <2597786.7s5MMGUR32@thomas> In-Reply-To: <20230621100105.3742249-1-vfialko@marvell.com> References: <20230613154013.2648333-1-vfialko@marvell.com> <20230621100105.3742249-1-vfialko@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 21/06/2023 12:01, Volodymyr Fialko: > Currently, in the case when we search for a bit set after a particular > value, the bitmap has to be scanned from the beginning and > rte_bitmap_scan() has to be called multiple times until we hit the value. > > Add a new rte_bitmap_scan_from_offset() function to initialize scan > state at the given offset and perform scan, this will allow getting > the next set bit after certain offset within one scan call. > > Signed-off-by: Volodymyr Fialko > --- > v2: > - added rte_bitmap_scan_from_offset > v3 > - added note for internal use only for init_at function [...] > +/** > + * @warning > + * @b EXPERIMENTAL: this API may change without prior notice. > + * > + * Bitmap initialize internal scan pointers at the given position for the scan function. > + * > + * Note: for private/internal use, for public: > + * @see rte_bitmap_scan_from_offset() > + * > + * @param bmp > + * Handle to bitmap instance > + * @param pos > + * Bit position to start scan > + */ > +__rte_experimental > +static inline void > +__rte_bitmap_scan_init_at(struct rte_bitmap *bmp, uint32_t pos) I think it should marked with __rte_internal instead of experimental.