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 9ADCC45B42; Tue, 15 Oct 2024 16:13:21 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4BE0B40270; Tue, 15 Oct 2024 16:13:21 +0200 (CEST) Received: from fhigh-a8-smtp.messagingengine.com (fhigh-a8-smtp.messagingengine.com [103.168.172.159]) by mails.dpdk.org (Postfix) with ESMTP id AC500400D6 for ; Tue, 15 Oct 2024 16:13:19 +0200 (CEST) Received: from phl-compute-03.internal (phl-compute-03.phl.internal [10.202.2.43]) by mailfhigh.phl.internal (Postfix) with ESMTP id 3C802114009B; Tue, 15 Oct 2024 10:13:19 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-03.internal (MEProxy); Tue, 15 Oct 2024 10:13:19 -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:subject:subject:to:to; s=fm2; t=1729001599; x=1729087999; bh=izEMspM8ZKlB7vxbha+tVmRNgdZZ/wtXjDrPAXObXq8=; b= csayPOyz6Is0iOyZvIrjfWN6R3kPVQouzkZTm+Elw0UTkXssjLBgBWdJuIXB3ABT DX5stxNopURZjfnZFpqrpbCtgFZ343lphf7kitbROmlbgRENPL7nV0GdiWbbqH7y gMgprS5cKX0nXp8KBZUCKncDwmXQpLcdeYXUDosDoq+aFq8JIryljDV2a1gvTDUr dE0tpP9FZDqeg23D890037u/K+1b3dqLtBJhU9+y5/yE56dNwi2AimI0bUCsSHIZ itVtBnvOtdKC2HLgSF9a+ADGv2hvMb3/CddvqgPxEdOjCXl0qSRggkqNwL/IkjdP bjUAu62YPmxcaJqsFfG6aQ== 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:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1729001599; x= 1729087999; bh=izEMspM8ZKlB7vxbha+tVmRNgdZZ/wtXjDrPAXObXq8=; b=B dK/dBa7hDYmBGxbcfKyRcN8THc00dBwD8Oor3V2Gix4TlozrzNprgeAGOzpQGD1J 18ycL3rLJ9tAUZnGMFKF5Gz85QfY1aSOrtexPP23W/mo1sljq4XdiU3Rn35X8TMF +uTvo9v0ngsxmwQE5Bx3TeaztLV0TsaILDoRgq7pwyxEXiMHymERMwKsN04SvYJO 5sjXIF5SSZHTOOXsWOt1DECK1/MclHaD7kd0b25rvHqVOcUOP7l5HyWoNxRF2MCA NsVQMMEyF0AJzJny6MTV0o6vfxFMKclYkQhrk2bIn3RFt+VLmcd5kz94iTAQO+NK 4bMWRlgpRTUR3n042zQ9Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdegjedgjeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhephffvvefufffkjghfggfgtgesthhqredttddtjeen ucfhrhhomhepvfhhohhmrghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrg hlohhnrdhnvghtqeenucggtffrrghtthgvrhhnpeegtddtleejjeegffekkeektdejvedt heevtdekiedvueeuvdeiuddvleevjeeujeenucevlhhushhtvghrufhiiigvpedtnecurf grrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtpdhn sggprhgtphhtthhopeejpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehmsgessh hmrghrthhshhgrrhgvshihshhtvghmshdrtghomhdprhgtphhtthhopegurghvihgurdhm rghrtghhrghnugesrhgvughhrghtrdgtohhmpdhrtghpthhtohepuggvvhesughpughkrd horhhgpdhrtghpthhtohepsghruhgtvgdrrhhitghhrghrughsohhnsehinhhtvghlrdgt ohhmpdhrtghpthhtohepkhhtrhgrhihnohhrsehrvgguhhgrthdrtghomhdprhgtphhtth hopehmrghtthhirghsrdhrohhnnhgslhhomhesvghrihgtshhsohhnrdgtohhmpdhrtghp thhtoheprhhorhgvthiilhgrsehlihhnuhigrdhmihgtrhhoshhofhhtrdgtohhm X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 15 Oct 2024 10:13:17 -0400 (EDT) From: Thomas Monjalon To: Morten =?UTF-8?B?QnLDuHJ1cA==?= Cc: David Marchand , dev@dpdk.org, bruce.richardson@intel.com, ktraynor@redhat.com, Mattias =?UTF-8?B?UsO2bm5ibG9t?= , Tyler Retzlaff Subject: Re: [PATCH 2/3] bitset: fix build for GCC without experimental API Date: Tue, 15 Oct 2024 16:13:15 +0200 Message-ID: <10943298.zapYfy813O@thomas> In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35E9F7DE@smartserver.smartshare.dk> References: <20241015121046.2556695-1-david.marchand@redhat.com> <20241015121046.2556695-3-david.marchand@redhat.com> <98CBD80474FA8B44BF855DF32C47DC35E9F7DE@smartserver.smartshare.dk> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 15/10/2024 14:53, Morten Br=C3=B8rup: > > From: David Marchand [mailto:david.marchand@redhat.com] > > @@ -255,7 +255,13 @@ __rte_experimental > > static inline bool > > rte_bitset_test(const uint64_t *bitset, size_t bit_num) > > { > > +#ifdef ALLOW_EXPERIMENTAL_API > > return __RTE_BITSET_DELEGATE(rte_bit_test, bitset, bit_num); > > +#else > > + RTE_SET_USED(bitset); > > + RTE_SET_USED(bit_num); > > + return false; > > +#endif > > } >=20 > This looks wrong! The API is exposed, but does nothing. Yes, this is what we did already in the past for other experimental functio= ns called from inline functions. There is no choice, the compiler is hitting the warning. > It is possible to build without ALLOW_EXPERIMENTAL_API; the compiler will= emit warnings when using experimental APIs. Yes it is possible to build, but it is not said it should work the same. > If those compiler warnings are not handled as errors, the compiled applic= ation will be full of bugs. Yes, that's why there are warnings. We may document it better but that's the behavior we have for years. There is no easy solution, and making experimental functions work without defining ALLOW_EXPERIMENTAL_API is not a really interesting goal. I think the word "allow" suggests it is not supposed to work if not allowed. It would be more interesting to make sure the users understand why we have this flag and how to enable it. I propose adding some docs, and mentioning ALLOW_EXPERIMENTAL_API in the the __rte_experimental message in rte_compat.h.