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 12F15A0C47; Tue, 10 Aug 2021 23:06:01 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 87D174114F; Tue, 10 Aug 2021 23:06:00 +0200 (CEST) Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) by mails.dpdk.org (Postfix) with ESMTP id 596AA40686 for ; Tue, 10 Aug 2021 23:05:59 +0200 (CEST) Received: by mail-wr1-f42.google.com with SMTP id l18so28145984wrv.5 for ; Tue, 10 Aug 2021 14:05:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mayadata-io.20150623.gappssmtp.com; s=20150623; h=from:subject:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=ffCYEYZRyNcHReTjoFca3IGaWPX4IMviJMzKyE4vK3A=; b=tpD69CI4xtn8DkMgc54HuCvjvLguqzUaLTRyZ3RzXUrRlVIABx0FR5aC+1hRB3zxc2 hl8OCgicTHjnVBugTpOnVzYeUmtTfTTWb/oEwoAaaFaA8kGHlr8lEYARKifpguuFKIpI GxwvYwOR7KK26feC8KdtqyS9vVLDR5Q2LVU2IGhNX9lMa4W7OOEie6N0o9zT/CkCeI8j RlltquKJzXf/Dwf+NlAho3E/FSar6s2R8dvgjQ7zNmZrYhFeb4rhI1JWdtkogsNPKD/W rgKdXRasjPcaiJAvhBhHKuH67082Qxp6HvdJVLiHVN2jCpFCGIEDBdRibVduHExEgpFe fC0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=ffCYEYZRyNcHReTjoFca3IGaWPX4IMviJMzKyE4vK3A=; b=bs2fZcADkf5e3nhbhsizYTmNgtA8aTh7Z+eWpdtTRQZEdkUPxBbgYHaDC4rQ0KhTeJ ab7B1DG+GrWJ9vG+fjhO+t67WafeNhW6UrpkVVO6W8uP3TPreH8B5xznGjWClu1Wpnbd xSgTfGtRA1L6IANpQwWY3WM7P2KVIdu/vhLfWEV84RK+5ZJUfk/Go7ATkmFJFzdujeDO A5uzEa8lSHxFF7la5uOtLZuk9i5IiDNr389iytkHp9mO7FQz0nBLC4Wvcp6Nd4dnMhfJ ybYPeeLs0iC8LmhMKmbBoc2g+qpdc1w4sasH3EFAzIGbbwIiDbTdA7i+rgyvTFpPr9bm LwwA== X-Gm-Message-State: AOAM5319v+MJzsYppGVH5NlFcZXsa0n64Xj02ZtIcamwu2YgxmJnUdMQ qGS7aRG7SQUgsrE5UGx4JjNTuQ== X-Google-Smtp-Source: ABdhPJz8iSXOypxj6T3c3ylFmm00hNOsDn/9o/wg5ZRPoMWMXKJRzN1OTSfU4pghD+ol2td4CGOstw== X-Received: by 2002:a5d:544b:: with SMTP id w11mr53526wrv.197.1628629558990; Tue, 10 Aug 2021 14:05:58 -0700 (PDT) Received: from [192.168.0.57] (cpc98320-croy25-2-0-cust77.19-2.cable.virginm.net. [80.235.134.78]) by smtp.gmail.com with ESMTPSA id t23sm3891178wmi.32.2021.08.10.14.05.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 10 Aug 2021 14:05:58 -0700 (PDT) From: Nick Connolly X-Google-Original-From: Nick Connolly To: William Tu , dev@dpdk.org Cc: dmitry.kozliuk@gmail.com, sergey.madaminov@gmail.com References: <20210805173345.1085-1-u9012063@gmail.com> Message-ID: Date: Tue, 10 Aug 2021 22:05:56 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <20210805173345.1085-1-u9012063@gmail.com> Content-Language: en-GB Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [dpdk-dev] [PATCH] eal/windows: add 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" > diff --git a/lib/eal/windows/include/meson.build b/lib/eal/windows/include/meson.build > index b3534b025f..875cc1cf0d 100644 > --- a/lib/eal/windows/include/meson.build > +++ b/lib/eal/windows/include/meson.build > @@ -8,3 +8,7 @@ headers += files( > 'rte_virt2phys.h', > 'rte_windows.h', > ) > + > +sys_headers = [] > +subdir('sys') > +install_headers(sys_headers, subdir: 'sys') > diff --git a/lib/eal/windows/include/sys/meson.build b/lib/eal/windows/include/sys/meson.build > new file mode 100644 > index 0000000000..6896cbf678 > --- /dev/null > +++ b/lib/eal/windows/include/sys/meson.build > @@ -0,0 +1,6 @@ > +# SPDX-License-Identifier: BSD-3-Clause > +# Copyright 2021 VMware, Inc > + > +sys_headers += files( > + 'queue.h', > +) Hi William, If I've understood this change correctly it will create a sys/queue.h header in the build/include folder. This seems like a reasonable approach to handle missing functionality, but unfortunately it is problematic. An application that links against DPDK is likely to be dealing with similar issues with missing functionality and providing a definition in the DPDK includes can conflict with the approach taken by the application (in this instance there could be two versions of sys/queue.h in the include paths leading to ambiguity). After discussion, the approach adopted by the DPDK community is that: * DPDK should depend only on the C library and not require POSIX functionality from the underlying system (headers, definitions etc). Missing functionality should be implemented within the DPDK code. * DPDK should not export POSIX functionality into the environment (symbols, macros, headers etc) to avoid these definitions clashing with the application. In this instance, it seems that rte_log.h depends upon the system having sys/queue.h which is not a standard C dependency. The appropriate response here (based on the above approach) is to remove the sys/queue.h dependency from rte_log.h and ensure that it only depends upon rte_* definitions contained within the DPDK. Regards, Nick