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 77E5BA0032; Fri, 1 Oct 2021 09:28:13 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 09CA54067A; Fri, 1 Oct 2021 09:28:13 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id 4ACBB40040 for ; Fri, 1 Oct 2021 09:28:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633073291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=NyN9wGuj6qMbB95mX16463lWvX+Ma7xI5XkicH/f3no=; b=A30uVkNZvNUuxJqxcq55mMJv0IjDvgLgNUM/kVfhEC+4ld9iaz4OwqjJ1HFcA4MtFRm4nO GbkGtuTO/AdGJSIRaJ6AAdVSuPU9/uY1iazUlepHziXIns2yA/2sKrwm73qWT4QoP3+d1u bI2IEX7o3dXrfJ3z3xmognbUeBAgcR0= Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-157-wxLHTdK0MMSonOEuy4Om9g-1; Fri, 01 Oct 2021 03:28:09 -0400 X-MC-Unique: wxLHTdK0MMSonOEuy4Om9g-1 Received: by mail-lf1-f71.google.com with SMTP id d22-20020a0565123d1600b003fd0097d747so8161633lfv.2 for ; Fri, 01 Oct 2021 00:28:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NyN9wGuj6qMbB95mX16463lWvX+Ma7xI5XkicH/f3no=; b=eTqrHzNHNCk+Y2+Awq6br7uNymadQw+KLbw1m4zPr0NMl8riPoLuWXN8hxw6mxdYtV Z4mF87tBNO6PAODMNJz6pDLllj4Mc8ldoERuySpAxouJD+2LO6AhtMo8UJJLBS8lxWP8 qbM5WAakq5vd38Jj2xIG8sxcxcyIOlbnX8IAhKifPHZoV0wtGufGWV+47SVn+WpvCVIM AKumBHut3qspmvmFiNgC8EhpOqO/aslb+7H72rcoPMvBwckzfYhss6rEqTEtWfLJdh61 wiz4qY9hATSpDnuDvqjDkcxGvuSCJalJm/1MDyThtsNoUVSz6tW4MAYIVHwEcp9TmZ+7 SRBA== X-Gm-Message-State: AOAM532Grb3d+ysVfud6/ObsjKoJbCgg+Gf/eTCLuG7eMGgICNLpVeBi LS9sffeJazouoOXFceY9FUjjakm1Bdxq6pudEeb8bVfQ+Xk3FUqiLvVGVLTI/KGi/GkjO6jkfWe b+Y8Px4FZTcpmPoKkTFM= X-Received: by 2002:a05:6512:370f:: with SMTP id z15mr3997672lfr.484.1633073288321; Fri, 01 Oct 2021 00:28:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz34AWo/L0gQsoAuTwPRYY9n8aFBc4Pk2j31oLmUtsv2Idwr2qjLkU9v0HO7mrodKMnV5tzY7Vxxu3CtJ9tPHg= X-Received: by 2002:a05:6512:370f:: with SMTP id z15mr3997651lfr.484.1633073288101; Fri, 01 Oct 2021 00:28:08 -0700 (PDT) MIME-Version: 1.0 References: <20210823130343.87247-1-u9012063@gmail.com> <20210824162103.32783-1-u9012063@gmail.com> <20210920201111.GA7448@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> In-Reply-To: From: David Marchand Date: Fri, 1 Oct 2021 09:27:57 +0200 Message-ID: To: William Tu Cc: Narcisa Ana Maria Vasile , Thomas Monjalon , dpdk-dev , Dmitry Kozliuk , Nick Connolly , Omar Cardona , Pallavi Kadam Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" 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" Hello William, On Fri, Oct 1, 2021 at 12:17 AM William Tu wrote: > > On Mon, Sep 20, 2021 at 1:11 PM Narcisa Ana Maria Vasile > wrote: > > > > 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 > Hi Thomas, > Ping to see if the patch can be applied? $ grep -rE '\<(|S)(CIRCLEQ|LIST|SIMPLEQ|TAILQ)_' build/install/include/ build/install/include/rte_tailq.h: * first parameter passed to TAILQ_HEAD macro) build/install/include/rte_crypto_sym.h: * - LIST_END should not be added to this enum build/install/include/rte_crypto_sym.h: * - LIST_END should not be added to this enum build/install/include/rte_crypto_sym.h: * - LIST_END should not be added to this enum build/install/include/rte_os.h:#define RTE_TAILQ_HEAD(name, type) TAILQ_HEAD(name, type) build/install/include/rte_os.h:#define RTE_TAILQ_ENTRY(type) TAILQ_ENTRY(type) build/install/include/rte_os.h:#define RTE_TAILQ_FOREACH(var, head, field) TAILQ_FOREACH(var, head, field) build/install/include/rte_os.h:#define RTE_TAILQ_FIRST(head) TAILQ_FIRST(head) build/install/include/rte_os.h:#define RTE_TAILQ_NEXT(elem, field) TAILQ_NEXT(elem, field) build/install/include/rte_os.h:#define RTE_STAILQ_HEAD(name, type) STAILQ_HEAD(name, type) build/install/include/rte_os.h:#define RTE_STAILQ_ENTRY(type) STAILQ_ENTRY(type) LGTM. I just have a concern that headers get broken again if we have no check. Could buildtools/chkincs do the job (if we make this check work on Windows)? -- David Marchand