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 DC9EAA00BE; Wed, 29 Apr 2020 01:50:37 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B2BCC1D64B; Wed, 29 Apr 2020 01:50:37 +0200 (CEST) Received: from mail-lj1-f194.google.com (mail-lj1-f194.google.com [209.85.208.194]) by dpdk.org (Postfix) with ESMTP id 1C4921D640 for ; Wed, 29 Apr 2020 01:50:25 +0200 (CEST) Received: by mail-lj1-f194.google.com with SMTP id f18so657597lja.13 for ; Tue, 28 Apr 2020 16:50:25 -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=RvuRCYijj8xUyRRgPAM4hK/PSNFzhbAn6q5SjpvfqZM=; b=inVMfrn+Gky2Xu/OiSixw/FNV3MsQIrijWTrZMC3tcfuG1UNysa4hsWFFD00FMqXZJ YrhPguPfaguXKoiUhHLFkNMErZzlHSqWJuB/ctgcVMf+qM0P9FPS1nQLNUngJ4iV2Eax YTsX7qhO7QbWVPAbJk1sWIlyFj69e70imUP/MUOA079UWPjPkWL5KW2wZi/qojr/Eeu7 E8NKX+zHZZM3FGmUMMzg11fnrMz1UO8Hehu8l71ObeyF6GZNktVkY57QDMqyz0AHwnr2 KFggLBfLVROv29wQKv62HLqUPjloGX8AsWhiyy/ifMbaCQmek2DvPTJTzjhM0ZT8bWr9 YNBg== 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=RvuRCYijj8xUyRRgPAM4hK/PSNFzhbAn6q5SjpvfqZM=; b=Pp1wzI/ElRvh0pYjDUE7bIQtIvY3i3uzK3aBKCpcI6aJYdebB5MwCJhKcPejXCsfdV LHRi0h3W6Fpk8PIw7G6kHMdP08CnP3XfSSjJJz6OO6qyxOa2CXaz0WYcGH+vqMMnELeu RmvFGhnIbNJU7TyYbBWIULdojiLjvz/CGxuxLYEy4tvMBJGTNMO0Xb3Qs6pZsSt1GHAY c1oIK+R5AJdfN1TwC/XUHwI7MCBpoXia+S0CMdcICYi6kLWzj/n79iZq0fADf+xezx/A Ghr1hf9e8oK8loWt4WabuNcrbsqtlAkJ/Nnd3ZBWlY6COmckTjcUjv/mxiJdAOyykqXS Fagw== X-Gm-Message-State: AGi0PuYD74KbQqnLchKHBx1LOWd7IiaIr+UDrxU3875KRU7GpwJHa/TW Wc7zQ8lHEzBq2373EXi3myFWWh6s/KE= X-Google-Smtp-Source: APiQypI8PYRev6CTf1eQGYOIiVa2PWJbuNGehr31T+HXgc142ukABONyzBM4BZ19DrCk9jj+BlnEHQ== X-Received: by 2002:a2e:b6cf:: with SMTP id m15mr18540128ljo.168.1588117824051; Tue, 28 Apr 2020 16:50:24 -0700 (PDT) Received: from localhost.localdomain (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.googlemail.com with ESMTPSA id g10sm183339lfc.95.2020.04.28.16.50.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Apr 2020 16:50:23 -0700 (PDT) From: Dmitry Kozlyuk To: dev@dpdk.org Cc: "Dmitry Malloy (MESHCHANINOV)" , Narcisa Ana Maria Vasile , Fady Bader , Tal Shnaiderman , Dmitry Kozlyuk , Jerin Jacob , John McNamara , Marko Kovacevic , Anatoly Burakov Date: Wed, 29 Apr 2020 02:50:08 +0300 Message-Id: <20200428235015.2820677-2-dmitry.kozliuk@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200428235015.2820677-1-dmitry.kozliuk@gmail.com> References: <20200410164342.1194634-1-dmitry.kozliuk@gmail.com> <20200428235015.2820677-1-dmitry.kozliuk@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v4 1/8] 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. Document API change in release notes. Suggested-by: Jerin Jacob Signed-off-by: Dmitry Kozlyuk --- doc/guides/rel_notes/release_20_05.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_05.rst b/doc/guides/rel_notes/release_20_05.rst index b124c3f28..76ba59220 100644 --- a/doc/guides/rel_notes/release_20_05.rst +++ b/doc/guides/rel_notes/release_20_05.rst @@ -225,6 +225,8 @@ Removed Items Also, make sure to start the actual text at the margin. ========================================================= +* ``enum rte_page_sizes`` is removed, ``RTE_PGSIZE_*`` constants are kept. + API 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.1