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 06632A0C43; Wed, 11 Aug 2021 20:14:19 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9BED74014D; Wed, 11 Aug 2021 20:14:19 +0200 (CEST) Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) by mails.dpdk.org (Postfix) with ESMTP id 98BD140042 for ; Wed, 11 Aug 2021 20:14:18 +0200 (CEST) Received: by mail-lj1-f171.google.com with SMTP id n7so6159231ljq.0 for ; Wed, 11 Aug 2021 11:14:18 -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=zdY+kGkgyJPEztmfR34YlVZC3JQ1cPb3j0MIs2IoqHc=; b=hql9OOC6CEtw1H62ID+bbVT3xneZKdINww9dMvB6AffAx/X3I9d+/AxRipqcSHD5MW m5FEs/YzI5LCKDiXSFHGIOSBNnpbyQui8H/Ir08RYcuE8EVX3dMQjfQNeGcP5jHFE/0W lloulg2nBQNvIKi+iksaaQm7QNURnJPonZtGdYQtPLck1X5RCevhUExOcyGSuZ7L7ZZS jBnejLkQjWgYvNsFzi69RHah6+37A6u/6sMhOUJxt+abBgMaK+XR89++wfqXJXjG4xx1 +yBOBOE22mvaTwmoTfs7GuredQsRZGFUOrHwmlvgLKfmzsWMqW+3bgsqG8S7hYbbohZw VH7Q== 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=zdY+kGkgyJPEztmfR34YlVZC3JQ1cPb3j0MIs2IoqHc=; b=a5Yp9uf6xCKCBOXfEHzOmUDmvJ/IRYpiPJw/ptFDo7l/Sde8AMlZjNOlvgqgJnPhHR dOSsEqXRiESqKvZyfrEb2G6j5kDfgfp8zcS6zujj3KZrwR/rNg5Ftv3bKndUWfgSoJQD EHoboOPLpNnJaWaBEErhgHoY3NSPZcP3styH7M9gHaVRYT6Bu2mEoslhWiFMu5xgwz3o guZ5ym6Duw2vAZfR8x9JGFuwfHiMsYV1LbzE6NwPVYoGbR87HatFV79Zcq97WGwD0STr 7UaGuSXViG2CLuw/2FpVlGugFv6/idjlwqQLw54CCG7Zh9oKxXffQr3DWpBw48uzKTSq ubVw== X-Gm-Message-State: AOAM532aG8cWr0/jDwk9OuZ1PV3DD9QzTD92VJJrIyp016MTg/7zClC7 L3OgkwkvQQxf/AsaqMK7SLkUk5y+tD/1om1fbRI= X-Google-Smtp-Source: ABdhPJxbG/iIAvbtosgwgMKwczSjV9GjLsfeZmPSQA2B4pfQLyc0QxOO31FgVRjJBApPb1dDSQv1ttBax96s4xBKg5A= X-Received: by 2002:a2e:96d0:: with SMTP id d16mr16229682ljj.279.1628705658126; Wed, 11 Aug 2021 11:14:18 -0700 (PDT) MIME-Version: 1.0 References: <20210811204627.213-1-u9012063@gmail.com> <20210811185018.4d363f6c@sovereign> In-Reply-To: <20210811185018.4d363f6c@sovereign> From: William Tu Date: Wed, 11 Aug 2021 11:13:41 -0700 Message-ID: To: Dmitry Kozlyuk Cc: dpdk-dev , nick.connolly@mayadata.io, Bruce Richardson , David Marchand , Ray Kinsella , Tyler Retzlaff Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCHv2] include: fix sys/queue.h. 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 Wed, Aug 11, 2021 at 8:50 AM Dmitry Kozlyuk wrote: > > Hi William, > > 2021-08-11 20:46 (UTC+0000), William Tu: > > Currently there are a couple of header files include 'sys/queue.h', > > which is a POSIX functionality. When compiling DPDK with OVS on > > Windows, we encountered issues such as, found the missing header. > > In file included from ../lib/dpdk.c:27: > > C:\temp\dpdk\include\rte_log.h:24:10: fatal error: 'sys/queue.h' file > > not found > > > > The patch fixes it by 1) removing the #include from > > a couple of headers, replace it with #include , and > > 2) include sys/queue.h in the rte_os.h. As a result, for Linux/BSD, > > it is using the sys/queue.h from its POSIX library, and for Windows, > > DPDK will use the bundled sys/queue.h. > > > > 1) fixes the case that DPDK library shouldn't export POSIX functionality > > into the environment (symbols, macros, headers etc), which cause definitions > > clashing with the application. > > 2) fixes the case that DPDK should depend only on the C library and not > > require POSIX functionality from the underlying system. > > Sorry, this is not exactly what was suggested here: > > http://inbox.dpdk.org/dev/20210811013325.34c36220@sovereign/ > > The point was not to install . Its full content is not needed > for DPDK interface, only for implementation. Public headers only need a > handful of macros for list/tailq heads and links. Those macros should be > provided by DPDK, with RTE_ prefix. For Linux and FreeBSD it will just be: > > #include > #define RTE_TAILQ_ENTRY(type) TAILQ_ENTRY(type) > /* ... */ > > For Windows you would have to copy definitions from > to some public header, seems OK. All public headers that need > macros must have them replaced with RTE_ version. > Implementation remains unchanged. No new files need to be installed, > because when DPDK is built on Windows, it uses the bundled , > and when it is installed, only RTE_ macros you created are visible. > > Macro documentation should clearly state that they are compatible with system > for Linux and FreeBSD, and for Windows they are compatible with > the version used during build. > > +Bruce, David, Ray, Tyler to confirm/object the idea. > > > There are still a couple of headers using sys/queue.h, ex: > > rte_bus_pci.h. Since it's not been used in Windows yet, we can > > fix them later. > > Another item I think of is a checkpatch rule to prohibit TAILQ_xxx, etc > macro in public headers after replacing them all. > > > Suggested-by: Nick Connolly > > Suggested-by: Dmitry Kozliuk > > Signed-off-by: William Tu > > --- > > v1->v2: > > - follow the suggestion by Nick and Dmitry > > - http://mails.dpdk.org/archives/dev/2021-August/216304.html > > Please send new versions as replies to the previous ones: > > git send-email --in-reply-to MSGID ... > > https://doc.dpdk.org/guides/contributing/patches.html Hi Dmitry, Thanks! I see your point now. I will work on the next patch. William