From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 73E62A046B for ; Sat, 29 Jun 2019 18:14:08 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C9EA237B0; Sat, 29 Jun 2019 18:14:06 +0200 (CEST) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id AB2612C60 for ; Sat, 29 Jun 2019 18:14:03 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 2D2BC20EB0; Sat, 29 Jun 2019 12:14:01 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sat, 29 Jun 2019 12:14:01 -0400 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=mesmtp; bh=gdj2kEzTw0Ek1Fass56aILJFBkq4pdhvmxPA8inDfjo=; b=ctgyhcq0ozTw PxRekdpWH/EmSt1wkxzJlqcGED0kqPAzVF8Pz9ObCRXlTeeViqiM4q7TmghJgfKm qqSbJLDg5IkW/fuFfzq6AuMQ+q+YZVTDkaUUpX9CqPrb/dxwpAqFbBRs9Fql//XX VXziroWz0bMvxoU1hlMit6FKdrJweWE= 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=fm3; bh=gdj2kEzTw0Ek1Fass56aILJFBkq4pdhvmxPA8inDf jo=; b=prweUnjsGo8OBm5Gpckh8A6EWABkIr9lGXNeGWF6GEYFi7CSsMkQCRAW/ 8cmnUpjhNPtlgGdOj07O3zKX6wLu30ESsuiCLRYbPIaF7H1p87dAvzOFn/xI6O5m 9QHbq3lRO6F8h4woait9VwJF6H/Z+YjFCl3JDmhI5I9+qgbfu2TPBH3UheYFkBo5 lw4I1LYwrl7FpgkXl6hMlj1N2UnEcDnJ/rw2U6Il/C9/v3Xlj9XZHZOWsTQzYjqE 4Kpr8ebk7mH01fKgOcgyz0UERjXdy9UHbxOrcIBc5MbiUWbd36znxhpV5MHphgE9 fxX49ERm+GjdK93/m0np/N3GVqvSw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrvddvgdellecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkph epjeejrddufeegrddvtdefrddukeegnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhho mhgrshesmhhonhhjrghlohhnrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd 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 519278005B; Sat, 29 Jun 2019 12:13:59 -0400 (EDT) From: Thomas Monjalon To: David Marchand Cc: dev@dpdk.org, nhorman@tuxdriver.com, adrien.mazarguil@6wind.com, stephen@networkplumber.org Date: Sat, 29 Jun 2019 18:13:58 +0200 Message-ID: <3633624.cieMKMvx7x@xps> In-Reply-To: <1561809533-6545-11-git-send-email-david.marchand@redhat.com> References: <1561635235-22238-1-git-send-email-david.marchand@redhat.com> <1561809533-6545-1-git-send-email-david.marchand@redhat.com> <1561809533-6545-11-git-send-email-david.marchand@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v2 10/10] enforce __rte_experimental at the start of symbol declarations X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" 29/06/2019 13:58, David Marchand: > Special mention for rte_mbuf_data_addr_default(): > > There is either a bug or a (not yet understood) issue with gcc. > gcc won't drop this inline when unused and rte_mbuf_data_addr_default() > calls rte_mbuf_buf_addr() which itself is experimental. > This results in a build warning when not accepting experimental apis > from sources just including rte_mbuf.h. > > For this specific case, we hide the call to rte_mbuf_buf_addr() under > the ALLOW_EXPERIMENTAL_API flag. [...] > -static inline char * __rte_experimental > -rte_mbuf_data_addr_default(struct rte_mbuf *mb) > +__rte_experimental > +static inline char * > +rte_mbuf_data_addr_default(struct rte_mbuf *mb __rte_unused) > { > + /* gcc complains about calling this experimental function even > + * when not using it. Hide it with ALLOW_EXPERIMENTAL_API. > + */ > +#ifdef ALLOW_EXPERIMENTAL_API > return rte_mbuf_buf_addr(mb, mb->pool) + RTE_PKTMBUF_HEADROOM; > +#else > + return NULL; > +#endif > } Doxygen is confused by having __rte_unused at the end: lib/librte_mbuf/rte_mbuf.h:876: warning: argument 'mb' of command @param is not found in the argument list of rte_mbuf_data_addr_default(struct rte_mbuf *mb __rte_unused) lib/librte_mbuf/rte_mbuf.h:889: warning: The following parameters of rte_mbuf_data_addr_default(struct rte_mbuf *mb __rte_unused) are not documented: parameter '__rte_unused' I move __rte_unused at the beginning while merging.