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 A361BA0C52; Fri, 13 Aug 2021 03:37:32 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2B0C540151; Fri, 13 Aug 2021 03:37:32 +0200 (CEST) Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) by mails.dpdk.org (Postfix) with ESMTP id 044FB4014D for ; Fri, 13 Aug 2021 03:37:30 +0200 (CEST) Received: by mail-pl1-f175.google.com with SMTP id e19so9802964pla.10 for ; Thu, 12 Aug 2021 18:37:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=PvDz3vRX4mQDOPREXHkwV5pq866kdX+g2liVUVpp1oc=; b=g5H43cQmpC49Tb1mimh9fFs17T70dWd0ufQuZymVfVhhqwaUc2p+w19cpa6y/DkLq+ PVd7vkr+pVU2altFWJpURVp2SuIldPrkAH+wrA5871ySBu2CA+r1gIyAEmpFo3FjHcoi WJgnObJ6rIU4WEf1hwcNcZ4IOtQn06/h3K6KTh191VLD+Sksm0kIJbslQvTWi5jzbEbk SrYMe1GFjcG7vmZycggIDRsKwsiPaH5/uYliBsI+sHzAXg7lxnIZyu+NwX4LitbHEYbl nOzbWLC5g35J3qydPfK1svzBTCbizHkzUC3tk66mHAmspG902DKLX8KLichXE1yu3PBY CWBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=PvDz3vRX4mQDOPREXHkwV5pq866kdX+g2liVUVpp1oc=; b=sfOVYmyHqDN/y9uTOU3IszHUJV/4Hb9/n+qVOesF3Vj//JsV42gtnsPr3dAsb7noIB ifV1lQ79nqXtuJZ+BPJFjmXWvqKo9nCQD+n/43Tobp2lk5SR2bnGJ+b4gaEi7d1aZ+I2 O1a4isXJ0pf44IBw0CQd+SCIPAn6N3Cln3mcAnsx2W/GOCKeaii4sIjvcKKsF5NAmxxV hnxJkD7cn2sD8gWM/XR1MH4XMNo2jzVZtBpxoip8BhaMFa5Y3EqBe1LUIYp0xs67Me+3 g00vYYmVJm43WshuN1Xm2noYBkSEiqdLcm6VY9PIxH7ED55aHYLKuXzF12/GC760fiFp hqBg== X-Gm-Message-State: AOAM530CDQiUrdAKAZXtnjVNT2h6JKcVzvde0jXQYv1ITxBXaHJP1awP 6A5ejPn8U7MlgWreNnaEVuSN0kn6GlUf/Pw/8Vk= X-Google-Smtp-Source: ABdhPJyA9LLKxCbyqQqqlEwuST2R5LQghokJpIWaeKz7n1VSlFVVgL01RPzvccM51A/ekL6aDHcLDb1J6F9q576rMtM= X-Received: by 2002:aa7:8c14:0:b029:3e0:235a:5d58 with SMTP id c20-20020aa78c140000b02903e0235a5d58mr6018pfd.57.1628818650108; Thu, 12 Aug 2021 18:37:30 -0700 (PDT) MIME-Version: 1.0 References: <20210812200528.60743-1-u9012063@gmail.com> <20210813010250.87528-1-u9012063@gmail.com> <20210812181112.65f2438f@hermes.local> In-Reply-To: <20210812181112.65f2438f@hermes.local> From: William Tu Date: Thu, 12 Aug 2021 18:36:53 -0700 Message-ID: To: Stephen Hemminger Cc: dpdk-dev , Dmitry Kozliuk , Nick Connolly Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCHv4] 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 Thu, Aug 12, 2021 at 6:11 PM Stephen Hemminger wrote: > > On Fri, 13 Aug 2021 01:02:50 +0000 > William Tu wrote: > > > Currently there are some public headers that include 'sys/queue.h', which > > is not POSIX, but usually provided by 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 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 error due to no such file. > > > > One solution is to installl the 'lib/eal/windows/include/sys/queue.h' into > > Windows environment, such as [1]. However, this means DPDK exports the > > functinoalities 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 system to provide 'sys/queue.h'. When these public headers use > > macros such as TAILQ_xxx, we replace it with RTE_ prefix. > > For Windows, we copy the definitions from to rte_os.h > > under windows. Note that these RTE_ macros are compatible with > > , only 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. > > With this patch, all the public headers no longer have > > "#include " or "TAILQ_xxx" macros. > > > Please run a spell checker on the commit message if you resubmit. OK, will do it, thanks! William