From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 7207742DC2;
	Mon,  3 Jul 2023 14:17:36 +0200 (CEST)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 5046940EF0;
	Mon,  3 Jul 2023 14:17:36 +0200 (CEST)
Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com
 [66.111.4.26]) by mails.dpdk.org (Postfix) with ESMTP id 41A2A40ED5
 for <dev@dpdk.org>; Mon,  3 Jul 2023 14:17:35 +0200 (CEST)
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41])
 by mailout.nyi.internal (Postfix) with ESMTP id A88D05C02A1;
 Mon,  3 Jul 2023 08:17:34 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute1.internal (MEProxy); Mon, 03 Jul 2023 08:17:34 -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=
 1688386654; x=1688473054; bh=YkmcFHdCT0i2PvdkoVOTa8CW1mGhE7ve97A
 +z7TBP8g=; b=uvahjifx4j+DzQdzQVOIFYH6imL0KnvYVSOXqP1J2CaM2Vxvfzx
 o3I4vsVVMPJ6wkYp1oo4QBTGrt/TiUN8vFNoW2eleaJ/3IubGl5EFh9uu/iLEGFg
 A0ZF4XuKmO7EOBYA1kiFK5HR0WQHbW+drOgJRbNctIHei9wobZ7lqpN4Oj3x2c+c
 zTNeBZwS/SfY5ffhrhHEs6IJwwz+a/BH8BPfFj5wBY6BrhGlEUrkZO3QazV2seLC
 2f6f+PDdPXAaz8b8FeYvh0V3QAwxSPD6LBsYV2yMJXMIid3kR43uWpt8hdMJRAKX
 WxGdjaDzUpGswPNtX9fqf4enrq08MV4hZgw==
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=
 1688386654; x=1688473054; bh=YkmcFHdCT0i2PvdkoVOTa8CW1mGhE7ve97A
 +z7TBP8g=; b=e0Zp7NiI73EyfeA2nSgDTr6YnfaFakzAZ1TDqZzr+U+2bdstXHY
 J07+V5Ej4yMRkx1vlwjTmnNkaQ74jUxHDHc6sOk+MDYIsVPhYXHnH2z6UlEN3/3x
 yTrmJ1S6gpIbEmzGys+rtWqiGK36+UAe/6kUfLR9gNB8L3KOAZ3WA54seMqsoy/m
 lFQxi1m5SDteRkDKKHf7bz8HsQ7FaaePA+8+qsySSk6DMebAslylnE3a0P1FTEch
 JhxVblfe2qoBTglyzbzz+UmfBs/2k6drekC3NbxqtXpoC/7W9NcqYnjs307ZRzf4
 Zqm6/35Ix/2gOfO6NAbzhXKQfZTe7UphLvA==
X-ME-Sender: <xms:XryiZN0N7sM6l7fB7DgV3iyXIf2WHauWIPmdy4DvT9MKJKpol8RQfQ>
 <xme:XryiZEGRggIwOzl1JU7v9UUmynMNlDDprJPgeRm520x_B0Q_vHB7cSNqtwAp3xVq2
 -zArrQ-7VRwsTFytw>
X-ME-Received: <xmr:XryiZN6WZJ2mgU1VUuPSymU4QT091fuMgW1RBWhxPbTOxHTW_pd7pFYSu_DrnHM1I9DPWpT4UjNnaAmZ61ctApL4Xw>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedruddvgdeglecutefuodetggdotefrodftvf
 curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu
 uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc
 fjughrpefhvfevufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr
 shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg
 ftrfgrthhtvghrnhepjeejffffgfffkeefffelgfekleetjeffleeludeghfehleffteeh
 veduffdugfdvnecuffhomhgrihhnpeguphgukhdrohhrghenucevlhhushhtvghrufhiii
 gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghlohhn
 rdhnvght
X-ME-Proxy: <xmx:XryiZK0c60BePZx3ORHEn-X2WPpGw0smXj3MyQzTiD1DBAwa8QMUyA>
 <xmx:XryiZAFonpEmGfkQoYf5IwqSePN8faN8RjYn2MXK4Oi08xdbc06fYA>
 <xmx:XryiZL_KtZGM6vAxPb32PhAhr5mXvhRFMyozND4uDjthF9HGLPxLNQ>
 <xmx:XryiZEApn4Ult3OpJUuRUp_-jbDWyQMXuHAVfdSpJH_kyRnM_7RAiA>
Feedback-ID: i47234305:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon,
 3 Jul 2023 08:17:33 -0400 (EDT)
From: Thomas Monjalon <thomas@monjalon.net>
To: "Dumitrescu, Cristian" <cristian.dumitrescu@intel.com>,
 Volodymyr Fialko <vfialko@marvell.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
 Jerin Jacob Kollanukkaran <jerinj@marvell.com>,
 Anoob Joseph <anoobj@marvell.com>
Subject: Re: [EXT] Re: [PATCH v3] bitmap: add scan from offset function
Date: Mon, 03 Jul 2023 14:17:32 +0200
Message-ID: <4492074.LvFx2qVVIh@thomas>
In-Reply-To: <MW2PR18MB22826B9C863863A363A131A6A829A@MW2PR18MB2282.namprd18.prod.outlook.com>
References: <20230613154013.2648333-1-vfialko@marvell.com>
 <5946701.lOV4Wx5bFT@thomas>
 <MW2PR18MB22826B9C863863A363A131A6A829A@MW2PR18MB2282.namprd18.prod.outlook.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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

03/07/2023 14:02, Volodymyr Fialko:
> 
> > -----Original Message-----
> > From: Thomas Monjalon <thomas@monjalon.net>
> > Sent: Monday, July 3, 2023 1:51 PM
> > To: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>; Volodymyr Fialko <vfialko@marvell.com>
> > Cc: dev@dpdk.org; Jerin Jacob Kollanukkaran <jerinj@marvell.com>; Anoob Joseph
> > <anoobj@marvell.com>
> > Subject: [EXT] Re: [PATCH v3] bitmap: add scan from offset function
> > 
> > External Email
> > 
> > ----------------------------------------------------------------------
> > 03/07/2023 12:56, Volodymyr Fialko:
> > > Since it's header-only library, there is issue with using __rte_intenal (appeared in v4).
> > 
> > What is the issue?
> 
> From V4 ci build failure(http://mails.dpdk.org/archives/test-report/2023-July/421235.html):
> 	In file included from ../examples/ipsec-secgw/event_helper.c:6:
> 	../lib/eal/include/rte_bitmap.h:645:2: error: Symbol is not public ABI
> 	        __rte_bitmap_scan_init_at(bmp, offset);
>  	       ^
> 	../lib/eal/include/rte_bitmap.h:150:1: note: from 'diagnose_if' attribute on '__rte_bitmap_scan_init_at':
> 	__rte_internal
> 	^~~~~~~~~~~~~~
> 	../lib/eal/include/rte_compat.h:42:16: note: expanded from macro '__rte_internal'	
> 	__attribute__((diagnose_if(1, "Symbol is not public ABI", "error"), \
>               		^           ~
> 	1 error generated.

OK I see.
So we should give up with __rte_internal for inline functions.
As it is not supposed to be exposed to the applications,
I think we can skip the __rte_experimental flag.

> > > Even if the function itself is not used directly, it get's included to the other public files.
> > > It explains why other functions in this library does not have the rte_internal prefix, but the double
> > underscores.
> > > So, should I simply remove __rte_internal from v4, or there's another approach to resolve this
> > issue(beside creating .c file)?
> > >
> > > /Volodymyr
> > >
> > > > -----Original Message-----
> > > > From: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>
> > > > Sent: Friday, June 23, 2023 2:41 PM
> > > > To: Thomas Monjalon <thomas@monjalon.net>; Volodymyr Fialko
> > > > <vfialko@marvell.com>
> > > > Cc: dev@dpdk.org; Jerin Jacob Kollanukkaran <jerinj@marvell.com>;
> > > > Anoob Joseph <anoobj@marvell.com>
> > > > Subject: [EXT] RE: [PATCH v3] bitmap: add scan from offset function
> > > >
> > > > External Email
> > > >
> > > > --------------------------------------------------------------------
> > > > --
> > > >
> > > >
> > > > > -----Original Message-----
> > > > > From: Thomas Monjalon <thomas@monjalon.net>
> > > > > Sent: Thursday, June 22, 2023 6:45 PM
> > > > > To: Volodymyr Fialko <vfialko@marvell.com>
> > > > > Cc: dev@dpdk.org; Dumitrescu, Cristian
> > > > > <cristian.dumitrescu@intel.com>; jerinj@marvell.com;
> > > > > anoobj@marvell.com
> > > > > Subject: Re: [PATCH v3] bitmap: add scan from offset function
> > > > >
> > > > > 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 <vfialko@marvell.com>
> > > > > > ---
> > > > > > 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.
> > > > >
> > > > >
> > > >
> > > >
> > > > +1
> > >
> > 
> > 
> > 
> > 
> 
>