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 51912A0C52; Fri, 13 Aug 2021 03:11:18 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D296540151; Fri, 13 Aug 2021 03:11:17 +0200 (CEST) Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) by mails.dpdk.org (Postfix) with ESMTP id E5BE74014D for ; Fri, 13 Aug 2021 03:11:16 +0200 (CEST) Received: by mail-pl1-f177.google.com with SMTP id w6so2744596plg.9 for ; Thu, 12 Aug 2021 18:11:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=d+rKbGokx6Zt5MxBQRxIN1I93/GhNWU79F3BG/+KKfA=; b=VSYtgktoBlfHd/9MTyQNEJ4/kM3cTN3RTJMmfcFaKKvWkkVDkIhJxvxBbIfedKpFLh qJjCCDSwiY3NxKxMFdZBQ4OzwTSDviX3kE6UN4YvXhih9vcnG6VNkwcSgoz+kO+2gvG+ S6TPGnqaRX88T4hOMfDDLnoB+MYk3jlHdJmNPBxn5Owgg2XGY2MaD1vN+KgjOkuHef7C o9iAOhwnIFesLX6lGKlLckUTIER5DkZwrafaBuAYQhLSIyyU+sXFmrf80VyOuyiTDBXJ 9gLEtBEilpAoc91uCeuM3hqEBMn69gXfkfsYV9unF6cN+qYmT62CL94jM9OUTVijZzU/ +ANA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=d+rKbGokx6Zt5MxBQRxIN1I93/GhNWU79F3BG/+KKfA=; b=HoormudsZdWwwyEVZtWX70VTGEb5WiAJu/zbnP3yEVHlRyx57Rwi6NJjdR+cP9Tr9x sN+wv8fgQ4fucPBc/qnFisJVU3LLfXURRJqbp9GGWxtdmvq40pqgmNNVIB3+iCUj6U8P usRsMgHJdwjHiH0sS0QpPhsqAl50/0SUCVka3EbXOW1IkH/T2moSxTeAJ8yeeQh48HQL 5QVrZYtZjarXGnAaOgzrPEwg0/9RVboz9H6al2rhwGRqmRsolX27ulGGN+hetjMKpVur KCr0Fobe+40ZRpwyqzzfSwkwR6aQ16kOLZJcLWeLoqBI8AuVHw9vdn2c0/W0C37pnJ7I +eXw== X-Gm-Message-State: AOAM532+3E6EYhbkh+TgiV4ZolyKVufR1LDizGVxoFJNZDeWP5MF5IKv DCzIBPoj+FwbOCaKOtIi4xgb1Q== X-Google-Smtp-Source: ABdhPJw5orjZLf2cJ9MxYsSFNkoLGsnQITyhB4F0IJ7ZQbKDjavWEE3yajv4vPiZo4q6pXlFYZxuhw== X-Received: by 2002:a17:90a:c705:: with SMTP id o5mr6992900pjt.55.1628817075870; Thu, 12 Aug 2021 18:11:15 -0700 (PDT) Received: from hermes.local (204-195-33-123.wavecable.com. [204.195.33.123]) by smtp.gmail.com with ESMTPSA id p30sm4758013pfh.116.2021.08.12.18.11.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Aug 2021 18:11:15 -0700 (PDT) Date: Thu, 12 Aug 2021 18:11:12 -0700 From: Stephen Hemminger To: William Tu Cc: dev@dpdk.org, Dmitry.Kozliuk@gmail.com, nick.connolly@mayadata.io Message-ID: <20210812181112.65f2438f@hermes.local> In-Reply-To: <20210813010250.87528-1-u9012063@gmail.com> References: <20210812200528.60743-1-u9012063@gmail.com> <20210813010250.87528-1-u9012063@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 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.