From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 1B844A034F;
	Sun, 21 Feb 2021 15:28:29 +0100 (CET)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 8DECD22A2AE;
	Sun, 21 Feb 2021 15:28:28 +0100 (CET)
Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com
 [209.85.208.174])
 by mails.dpdk.org (Postfix) with ESMTP id 6126422A265
 for <dev@dpdk.org>; Sun, 21 Feb 2021 15:28:27 +0100 (CET)
Received: by mail-lj1-f174.google.com with SMTP id o16so44622633ljj.11
 for <dev@dpdk.org>; Sun, 21 Feb 2021 06:28:27 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=26H+J9HFHkH0S5KrUGoJ+wJMVCb0e1UBONiAdT8Im/A=;
 b=a4s2APgXKTAOuY0QqogByw8lLdqxc3iWmPYKe23mtFdrNZtD+/dwSJTYRxON8ny7kO
 KIQ86cFCKqBdVLV9NOe6xs9rD+C+No+dRZaJiteRV5D+Y4GJfckHXAbRGF81HfZLZc/3
 QWHwWloYhr0YAIgtCTN0zl5sH7beZMegE5ApoTovPhKml96KsgXOzpxZAVM7R9c/JFc/
 s4WoVf/PFDsHk1fX+87RYAlc7YfR0SPj8gg9Kt7zKNzRmQf6nT15Tgdx1kpsGHCQZnb8
 NVBV499HKF1HiMShg5VR3PHKNGqgjsSq/2MBJnSY6V3jNc27ynqN0DYLLsfuMN8NJt/1
 Nxfg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=26H+J9HFHkH0S5KrUGoJ+wJMVCb0e1UBONiAdT8Im/A=;
 b=X0U60a/qUhsUeNDHtPtjj0eHH+FBLUY++sWN7P5a3IMOtnrQeEFNbiorAYs/BPZtcG
 9rtpCMFmiVtOI/BsL0eDg/16xqdUMNoINcWfCjmhpdXyHEPeN3my1jsH1aGdU8YQeKRy
 2PNiTH+kH5IWbWnYggVe34EZE4iJLPdJCB2phjKHPF13kyZ3QbgnZia4FeQ/0yZAH/bt
 JumNg7xuH4l7DX7dNDeDUKeVnxEIU4Rwbi7ybWU2HZCMzG94TjiV7zCEZPNspMsX37R0
 b27QhIesZJLwHou8L63evOh+9KHDfAAWQZ+va1VCSnrv6JXy69GLLk+ItldrEGFJyKqq
 rcyA==
X-Gm-Message-State: AOAM530sTvbKVCQPup8YXI61JQB3lpIfp51nqrG8zGVCSb24486XySCN
 Mp9/vFoL7dZItqPpERiqUOYPwp9LJFm20oGu
X-Google-Smtp-Source: ABdhPJzAjOJ+jhxrd4wtK7rh5PrpYMqqpHbUWwU7kc8HvEgzkAmbAqorN6G4rORxPFf1LpWB4azA3g==
X-Received: by 2002:a2e:9510:: with SMTP id f16mr9938276ljh.352.1613917706606; 
 Sun, 21 Feb 2021 06:28:26 -0800 (PST)
Received: from localhost.localdomain (broadband-37-110-65-23.ip.moscow.rt.ru.
 [37.110.65.23])
 by smtp.gmail.com with ESMTPSA id a30sm1569885lfo.56.2021.02.21.06.28.25
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sun, 21 Feb 2021 06:28:26 -0800 (PST)
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
To: dev@dpdk.org
Cc: Tal Shnaiderman <talshn@nvidia.com>,
 Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>,
 Narcisa Ana Maria Vasile <navasile@linux.microsoft.com>,
 Dmitry Malloy <dmitrym@microsoft.com>,
 Pallavi Kadam <pallavi.kadam@intel.com>,
 Tyler Retzlaff <roretzla@microsoft.com>,
 Nick Connolly <nick.connolly@mayadata.io>
Date: Sun, 21 Feb 2021 17:28:12 +0300
Message-Id: <20210221142819.6769-1-dmitry.kozliuk@gmail.com>
X-Mailer: git-send-email 2.29.2
In-Reply-To: <20210221012831.14643-1-dmitry.kozliuk@gmail.com>
References: <20210221012831.14643-1-dmitry.kozliuk@gmail.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Subject: [dpdk-dev] [PATCH v3 0/7] eal/windows: do not expose POSIX symbols
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

On Windows, rte_os.h contains a small POSIX compatibility set of
functions and macros. Exposing it from EAL can break consumer own POSIX
compatibility layer and is against standards in general.

First define required wrappers, then fix POSIX dependencies in
Windows-enabled libraries and drivers, then eliminate POSIX symbols from
Windows EAL API. Commits are arranged so that they all compile and are
limited in scope; patches 5, 6, 7 can be squashed if needed.

No "Fixes" tags, because it's really an enhancement,
preventing issues rather then solving direct ones.

v3:
    * Fix indentation in 3/7 (Tal Shnaiderman).
    * Fix build failures in 6/7 and 7/7 (Tal Shnaiderman).
v2:
    * Fix compilation issues in 3/7 and 6/7 (self).

Dmitry Kozlyuk (7):
  eal: add wrappers for POSIX string functions
  eal: add macro for maximum path length
  eal: add sleep API
  eal: add asprintf() internal wrapper
  lib: remove POSIX dependencies
  drivers: remove POSIX dependencies
  eal/windows: do not expose POSIX symbols

 doc/guides/rel_notes/release_21_05.rst        |  9 ++
 drivers/bus/pci/private.h                     |  2 +-
 drivers/bus/vdev/vdev.c                       |  4 +-
 drivers/bus/vdev/vdev_params.c                |  3 +-
 drivers/common/mlx5/mlx5_common_pci.c         |  6 +-
 drivers/common/mlx5/mlx5_common_pci.h         |  1 +
 drivers/net/i40e/i40e_ethdev.c                | 56 +++++------
 drivers/net/mlx5/mlx5.c                       |  4 +
 lib/librte_cmdline/cmdline.c                  |  1 +
 lib/librte_eal/common/eal_common_config.c     |  2 +-
 lib/librte_eal/common/eal_common_dev.c        |  6 +-
 lib/librte_eal/common/eal_common_devargs.c    |  7 +-
 lib/librte_eal/common/eal_common_errno.c      |  4 +
 lib/librte_eal/common/eal_common_fbarray.c    |  8 +-
 lib/librte_eal/common/eal_common_lcore.c      |  2 +-
 lib/librte_eal/common/eal_common_log.c        |  5 +-
 lib/librte_eal/common/eal_common_options.c    | 42 ++++----
 lib/librte_eal/common/eal_common_timer.c      |  5 +-
 lib/librte_eal/common/eal_common_trace.c      |  2 +-
 lib/librte_eal/common/eal_common_trace_ctf.c  |  4 +-
 .../common/eal_common_trace_utils.c           | 13 +--
 lib/librte_eal/common/eal_filesystem.h        |  8 +-
 lib/librte_eal/common/eal_hugepages.h         |  2 +-
 lib/librte_eal/common/eal_internal_cfg.h      |  2 +-
 lib/librte_eal/common/eal_private.h           | 23 +++++
 lib/librte_eal/common/eal_trace.h             |  2 +-
 lib/librte_eal/freebsd/include/rte_os.h       |  6 +-
 lib/librte_eal/include/rte_string_fns.h       | 42 ++++++++
 lib/librte_eal/include/rte_thread.h           | 11 +++
 lib/librte_eal/linux/include/rte_os.h         |  6 +-
 lib/librte_eal/rte_eal_exports.def            |  2 +
 lib/librte_eal/unix/rte_thread.c              | 10 +-
 lib/librte_eal/version.map                    |  3 +
 lib/librte_eal/windows/eal.c                  | 30 ++++++
 lib/librte_eal/windows/eal_thread.c           |  9 +-
 lib/librte_eal/windows/include/dirent.h       | 21 ++--
 lib/librte_eal/windows/include/rte_os.h       | 99 ++-----------------
 lib/librte_ethdev/rte_class_eth.c             |  2 +-
 lib/librte_ethdev/rte_ethdev.c                |  2 +-
 lib/librte_kvargs/rte_kvargs.c                | 17 ++--
 40 files changed, 275 insertions(+), 208 deletions(-)

-- 
2.29.2