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 47786A0032; Fri, 1 Oct 2021 12:34:08 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C93A84067A; Fri, 1 Oct 2021 12:34:07 +0200 (CEST) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by mails.dpdk.org (Postfix) with ESMTP id 9AE2C40040 for ; Fri, 1 Oct 2021 12:34:06 +0200 (CEST) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 232D55C00CD; Fri, 1 Oct 2021 06:34:06 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Fri, 01 Oct 2021 06:34:06 -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=fm2; bh= WvS9JyiocXRjajrxMu878zD3gmSYky6vw9q9z25oLVc=; b=JcG/id5ThfD9xPS3 PsGZMWRcrhCtNloOXRoPuXYdQIuh6Sqwp3hl5hTbUEk3ltTe6g7kGJi7bsF31qvN WIqAHiUZ6nnEQFsqHKdojY/YgBW4epG5Xj12Tal/0NynJI8JkB4fZuGKOYe3JvAm 5GrSbPrG8uJAOmNRYyqW1FkNdhS1xajRIwhSRZSveGWEJk/p1VqDGsmL6Ffv5Nvc SoOjPLj8TXlx/zhgziz3xEyyjbpfzh83WcQTbExxh8qDni/+VTPJhhRJt7Fpg/mD zBM/VpJA1W8hsuQ3/k1COalvGrkFzu+3v61H/KNISDmasx3QnGg1Cd4ccLKulfQT 9/CXBQ== 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=WvS9JyiocXRjajrxMu878zD3gmSYky6vw9q9z25oL Vc=; b=fPr8+m/6Y/wSWqZer2bh/6VuTYDfDHB+WrFTQQLFLabmnjzWBhQZuJqgQ SrpJGlvsZ0N35Qv5LBZ8kKY6yAD9SDhGeFDOltBZhI1TVkCQhk1XewhqjqV+EnL0 mJSi5uAIM/K2Nz9ifdEFUAYfq+rtcOTa9Epf9kRj4xydz3mLmN26+rXQusyDfJuZ F8xeWPOfc/l2+XFmVYtGpbTNpGVOYXHAI4WrH30jUOiWZM/ims5+YGzKohqSPhNF YXzIFk9HK+GnaRSu/vzeMTOuFaCGYPbAQnhM1DBWO4770oIZ/XDh2r35lYtSYLca WGXB8kjTh80PP8nS9hetvsxLmurXw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudekiedgvdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepffdvffejueetleefieeludduuefgteejleevfeekjeefieegheet ffdvkeefgedunecuffhomhgrihhnpeguphgukhdrohhrghenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghlohhn rdhnvght X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 1 Oct 2021 06:34:04 -0400 (EDT) From: Thomas Monjalon To: William Tu Cc: dev@dpdk.org, Dmitry.Kozliuk@gmail.com, Nick Connolly , Omar Cardona , Pallavi Kadam , Narcisa Ana Maria Vasile , david.marchand@redhat.com Date: Fri, 01 Oct 2021 12:34:03 +0200 Message-ID: <7741954.Wt8OvWAyAo@thomas> In-Reply-To: <20210920201111.GA7448@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <20210823130343.87247-1-u9012063@gmail.com> <20210824162103.32783-1-u9012063@gmail.com> <20210920201111.GA7448@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v9] eal: remove sys/queue.h from public headers 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" 20/09/2021 22:11, Narcisa Ana Maria Vasile: > On Tue, Aug 24, 2021 at 04:21:03PM +0000, William Tu wrote: > > Currently there are some public headers that include 'sys/queue.h', which > > is not POSIX, but usually provided by the Linux/BSD system library. > > (Not in POSIX.1, POSIX.1-2001, or POSIX.1-2008. Present on the BSDs.) > > The file is missing on Windows. During the Windows build, DPDK uses a > > bundled copy, so building a DPDK library works fine. But when OVS or other > > applications use DPDK as a library, because some DPDK public headers > > include 'sys/queue.h', on Windows, it triggers an error due to no such > > file. > > > > One solution is to install the 'lib/eal/windows/include/sys/queue.h' into > > Windows environment, such as [1]. However, this means DPDK exports the > > functionalities of 'sys/queue.h' into the environment, which might cause > > symbols, macros, headers clashing with other applications. > > > > The patch fixes it by removing the "#include " from > > DPDK public headers, so programs including DPDK headers don't depend > > on the system to provide 'sys/queue.h'. When these public headers use > > macros such as TAILQ_xxx, we replace it by the ones with RTE_ prefix. > > For Windows, we copy the definitions from to rte_os.h > > in Windows EAL. Note that these RTE_ macros are compatible with > > , both at the level of API (to use with > > macros in C files) and ABI (to avoid breaking it). > > > > Additionally, the TAILQ_FOREACH_SAFE is not part of , > > the patch replaces it with RTE_TAILQ_FOREACH_SAFE. > > > > [1] http://mails.dpdk.org/archives/dev/2021-August/216304.html > > > > Suggested-by: Nick Connolly > > Suggested-by: Dmitry Kozliuk > > Acked-by: Dmitry Kozliuk > > Signed-off-by: William Tu > > --- > Acked-by: Narcisa Vasile Applied, thanks. Note: I had to add a sys/queue.h include in iavf which is now enabled for Windows.