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 889A6A09E4; Thu, 28 Jan 2021 17:46:28 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E5430188A1E; Thu, 28 Jan 2021 17:46:24 +0100 (CET) Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by mails.dpdk.org (Postfix) with ESMTP id EC93F4067A; Thu, 28 Jan 2021 17:46:20 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id BA975F51; Thu, 28 Jan 2021 11:46:19 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Thu, 28 Jan 2021 11:46:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm3; bh= Mp2oI7zqIOvFeP0oCG0s1byLFbVjPyKfe6EjGla2KQc=; b=HIK0y/IqRT0Fci+e y7KYTRQwQcanAFi8JSlw0L/Cx5RUInZ7fk8xPf7LiH7Q47BWdMbJfJ5HxgDKebso x7stf8d2y1yCz1/PA6X2c7wBny1O0zHy9HAxZElCOpj6mUCYMNL5pPD6tFSMAn2C uEBbOpN4jCMSyMZM9Ma71+h8kMjmg4FcSpA7CRwFq23bk8pqPd5XmerV8ozbSHqA 574KMPCfJ3eBlaBvmkzeqFARzElORt+dWh83LFzm4Fedr3ilxSDkQ0K1LZYQWGzy Tq198yKFTcsl5lmaZdTWtb3W4UuaXfR8qFQPojxbveCPkkjzOYWC/EajAuk6Eit7 y1gvJg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=Mp2oI7zqIOvFeP0oCG0s1byLFbVjPyKfe6EjGla2K Qc=; b=TtsS0V+4Z0p/7QH3hTpCgVARHm1/Nm7ceoZ6MpJNGYhEPaJcvD6rMbBi7 Xi2EMdE5rmTKfm8nqrDL/G0SC/Riu/vvzEUE8BIgqnepm9ATNhYqV7zxsd2KywlM v6r88cVikIRpDITKYlbpRyWwQisXnuV6QzUGhaG+1V/mnQsKFvI7zF88gUYVW2Ze atqw5wb8+2sJOlSWZm8uSA8QpZcGdz3iGG/WN+QJFm9AJTOYg4HuXcSG1Kl4HpKW PXYvAq3Jb4C5L5GmfI/cUvH2XgK50WDBUwGJKAa7e5ezO08Ph3TaSKAZl9xCiQv6 Jv71tO3ZrROjQDVrhAIFRaxg+fNMw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfedtgdeludcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf frrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdejueei iedvffegheenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhho nhdrnhgvth X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 16B2D24005D; Thu, 28 Jan 2021 11:46:18 -0500 (EST) From: Thomas Monjalon To: David Marchand , Bruce Richardson Cc: techboard@dpdk.org, dev Date: Thu, 28 Jan 2021 17:46:16 +0100 Message-ID: <3903937.VWLc1O45Db@thomas> In-Reply-To: <20210128151649.GJ899@bricha3-MOBL.ger.corp.intel.com> References: <20210114110606.21142-1-bruce.richardson@intel.com> <20210128141610.GI899@bricha3-MOBL.ger.corp.intel.com> <20210128151649.GJ899@bricha3-MOBL.ger.corp.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [dpdk-techboard] [PATCH v6 2/8] eal: fix error attribute use for clang 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" 28/01/2021 16:16, Bruce Richardson: > On Thu, Jan 28, 2021 at 02:16:10PM +0000, Bruce Richardson wrote: > > On Thu, Jan 28, 2021 at 02:36:25PM +0100, David Marchand wrote: > > > On Thu, Jan 28, 2021 at 12:20 PM Bruce Richardson > > > wrote: > > > > > If the compiler has neither error or diagnose_if support, an internal > > > > > API can be called without ALLOW_INTERNAL_API. > > > > > I prefer a build error complaining on an unknown attribute rather than > > > > > silence a check. > > > > > > > > > > I.e. > > > > > > > > > > #ifndef ALLOW_INTERNAL_API > > > > > > > > > > #if __has_attribute(diagnose_if) /* For clang */ > > > > > #define __rte_internal \ > > > > > __attribute__((diagnose_if(1, "Symbol is not public ABI", "error"), \ > > > > > section(".text.internal"))) > > > > > > > > > > #else > > > > > #define __rte_internal \ > > > > > __attribute__((error("Symbol is not public ABI"), \ > > > > > section(".text.internal"))) > > > > > > > > > > #endif > > > > > > > > > > #else /* ALLOW_INTERNAL_API */ > > > > > > > > > > #define __rte_internal \ > > > > > section(".text.internal"))) > > > > > > > > > > #endif > > > > > > > > > > > > > Would this not mean that if someone was using a compiler that supported > > > > neither that they could never include any header file which contained any > > > > internal functions? I'd rather err on the side of allowing this, on the > > > > basis that the symbol should be already documented as internal and this is > > > > only an additional sanity check. > > > > > > - Still not a fan. > > > We will never know about those compilers behavior, like how we caught > > > the clang issue and found an alternative. > > > > > > > So I understand, but I'm still concerned about breaking something that was > > previously working. It's one thing a DPDK developer catching issues with > > clang, quite another a user catching it when trying to build their own > > application. > > > > We probably need some other opinions on this one. > > > Adding Tech-board to see if we can get some more thoughts on this before I do > another revision of this set. What are the alternatives?