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 A060CA0C46; Mon, 20 Sep 2021 22:11:14 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2637340DF7; Mon, 20 Sep 2021 22:11:14 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id BD28940DF5 for ; Mon, 20 Sep 2021 22:11:12 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1059) id D54AE2089D8C; Mon, 20 Sep 2021 13:11:11 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com D54AE2089D8C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1632168671; bh=vFvuzC6iU9Q5UDkzJ/HDCe4UXD4jERlHgoGkFCZRkwk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XxUwVs9S6z2exaQrn0QHBTm5gDrACtg5FPFqsPHW/WilAH1sz3ZnZhY8owtWruo6G QA8tBLqLNu1RTfIkluXFQfaqJ0wkYOUbKbxZGRIY+CzjM2Maou7fWm+MtNoJ9Sz4Nr lGS+cqJQtZtp3Uf3LWPYcdY1So1oZkbPRok33Lg8= Date: Mon, 20 Sep 2021 13:11:11 -0700 From: Narcisa Ana Maria Vasile To: William Tu Cc: dev@dpdk.org, Dmitry.Kozliuk@gmail.com, Nick Connolly , Omar Cardona , Pallavi Kadam Message-ID: <20210920201111.GA7448@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <20210823130343.87247-1-u9012063@gmail.com> <20210824162103.32783-1-u9012063@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210824162103.32783-1-u9012063@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) 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" 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