From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id AB2C5A00C3; Mon, 8 Jun 2020 09:42:16 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 846891BE9E; Mon, 8 Jun 2020 09:42:07 +0200 (CEST) Received: from mail-lf1-f65.google.com (mail-lf1-f65.google.com [209.85.167.65]) by dpdk.org (Postfix) with ESMTP id 2BE26255 for ; Mon, 8 Jun 2020 09:42:05 +0200 (CEST) Received: by mail-lf1-f65.google.com with SMTP id 202so9600446lfe.5 for ; Mon, 08 Jun 2020 00:42:05 -0700 (PDT) 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=Den6qHvEDm3JsYc4oA4k/jcYceD/ng2EEQBQTWAPhoc=; b=KLGLYLU6L34IAEvtgTtQ67+Xuth72DPHjDU53O/gaEk4wNWchDOQ8m1wtIGHh0CpVC 7O7etlAzX1pjx1H/sxjtM9XrLrOVG8x93RHuuwLlnw6fON1EHA95Nn+Iguv+He5WKeTZ Y+Be0C7hm3d/O77F0suko2wMYim8I4TbWYhIumydLf5Rln7oezF8inV98FUePwamSJNX dpLE+NFRxqiR66fejTTEoqPF21lG/NbAGvBwTWEKVMao5YsO0LCy5OYBYKEMWvqk3R9M rc9GCSikyVWAKwmF+n8FdAd2n7SFIemtfmkm4+hwcQ9KrzmGwRi+EcOjTumQ/t3/dRGo J7Fw== 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=Den6qHvEDm3JsYc4oA4k/jcYceD/ng2EEQBQTWAPhoc=; b=t+PDWo33NGlbmuzuvq3J/uXb85e8QmCebqzVuXC4P0C9WtkbkUIvEmzp/uaYQ8IbWx aDuv8ST9le4+zrDTmLfQ8Pyi6foabTjY+2LLbQ/XoTsy9CFwbIfsMSOSNDFN0em8zmPw cmdbFCJ0pMyfvffE4Jp05lk/9c8zvHI9L7WF0SBLuE2BgUf1FRac+UxNfOEF3HHLMXgo YZeHAMvhJ9Lljpo3v5wHM5fsmwbLeTlYrlAqDnZMeNAcztOD5g6Z5kOtZNyCF0Pk57rk wTK4skoN/DCzYyxnL+7lN093Ngq2WW9mRZbLyeI/D8OMV5L/IhtQAJFEsPi4eo3UgBQ+ cEuQ== X-Gm-Message-State: AOAM5338N/8C82xAq9a9fPdr09cbatAj6fLBeFI92kCO8lb0zyDnAtSr 2JMKA5DAIbpAY87tYnMh3Whgj9FkFdKsmQ== X-Google-Smtp-Source: ABdhPJxbMof2Hpchek76/43AZ2APT6Pub7PgqQHN1N5DwLBUs5zCX3gnpZ8GfvVvoqPpqpv/R7Y9kw== X-Received: by 2002:a19:6554:: with SMTP id c20mr11892923lfj.140.1591602124535; Mon, 08 Jun 2020 00:42:04 -0700 (PDT) Received: from localhost.localdomain (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id y18sm4207785lfk.16.2020.06.08.00.42.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jun 2020 00:42:03 -0700 (PDT) From: Dmitry Kozlyuk To: dev@dpdk.org Cc: Dmitry Malloy , Narcisa Ana Maria Vasile , Fady Bader , Tal Shnaiderman , Dmitry Kozlyuk , Jerin Jacob , John McNamara , Marko Kovacevic , Anatoly Burakov Date: Mon, 8 Jun 2020 10:41:43 +0300 Message-Id: <20200608074153.29611-2-dmitry.kozliuk@gmail.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200608074153.29611-1-dmitry.kozliuk@gmail.com> References: <20200602230329.17838-1-dmitry.kozliuk@gmail.com> <20200608074153.29611-1-dmitry.kozliuk@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v7 01/11] eal: replace rte_page_sizes with a set of constants X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" Clang on Windows follows MS ABI where enum values are limited to 2^31-1. Enum rte_page_sizes has members valued above this limit, which get wrapped to zero, resulting in compilation error (duplicate values in enum). Using MS ABI is mandatory for Windows EAL to call Win32 APIs. Remove rte_page_sizes and replace its values with #define's. This enumeration is not used in public API, so there's no ABI breakage. Announce API changes for 20.08 in documentation. Suggested-by: Jerin Jacob Signed-off-by: Dmitry Kozlyuk --- doc/guides/rel_notes/release_20_08.rst | 2 ++ lib/librte_eal/include/rte_memory.h | 23 ++++++++++------------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/doc/guides/rel_notes/release_20_08.rst b/doc/guides/rel_notes/release_20_08.rst index 39064afbe..2041a29b9 100644 --- a/doc/guides/rel_notes/release_20_08.rst +++ b/doc/guides/rel_notes/release_20_08.rst @@ -85,6 +85,8 @@ API Changes Also, make sure to start the actual text at the margin. ========================================================= +* ``rte_page_sizes`` enumeration is replaced with ``RTE_PGSIZE_xxx`` defines. + ABI Changes ----------- diff --git a/lib/librte_eal/include/rte_memory.h b/lib/librte_eal/include/rte_memory.h index 3d8d0bd69..65374d53a 100644 --- a/lib/librte_eal/include/rte_memory.h +++ b/lib/librte_eal/include/rte_memory.h @@ -24,19 +24,16 @@ extern "C" { #include #include -__extension__ -enum rte_page_sizes { - RTE_PGSIZE_4K = 1ULL << 12, - RTE_PGSIZE_64K = 1ULL << 16, - RTE_PGSIZE_256K = 1ULL << 18, - RTE_PGSIZE_2M = 1ULL << 21, - RTE_PGSIZE_16M = 1ULL << 24, - RTE_PGSIZE_256M = 1ULL << 28, - RTE_PGSIZE_512M = 1ULL << 29, - RTE_PGSIZE_1G = 1ULL << 30, - RTE_PGSIZE_4G = 1ULL << 32, - RTE_PGSIZE_16G = 1ULL << 34, -}; +#define RTE_PGSIZE_4K (1ULL << 12) +#define RTE_PGSIZE_64K (1ULL << 16) +#define RTE_PGSIZE_256K (1ULL << 18) +#define RTE_PGSIZE_2M (1ULL << 21) +#define RTE_PGSIZE_16M (1ULL << 24) +#define RTE_PGSIZE_256M (1ULL << 28) +#define RTE_PGSIZE_512M (1ULL << 29) +#define RTE_PGSIZE_1G (1ULL << 30) +#define RTE_PGSIZE_4G (1ULL << 32) +#define RTE_PGSIZE_16G (1ULL << 34) #define SOCKET_ID_ANY -1 /**< Any NUMA socket. */ -- 2.25.4