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 28AB0A04EF; Wed, 3 Jun 2020 01:04:00 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CC1DC1BFB4; Wed, 3 Jun 2020 01:03:48 +0200 (CEST) Received: from mail-lj1-f193.google.com (mail-lj1-f193.google.com [209.85.208.193]) by dpdk.org (Postfix) with ESMTP id 098C51BEE5 for ; Wed, 3 Jun 2020 01:03:47 +0200 (CEST) Received: by mail-lj1-f193.google.com with SMTP id c17so283209lji.11 for ; Tue, 02 Jun 2020 16:03:47 -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=lJHWEEQaQbUJA8MgJCyWn++X35W1QEdvMAdJlCjLYYiiiusF41kPUjfDAp7e+/7hpt CQlVDvJ+3k3fjyOiUBfGO7fe9lxWiWxTnwFWr2hiqoCzoxy7VVwHE6DyviaC22BFUTlN GDL6cksGvuK+w/fd8Qt4zRqP5+dDMu18dL7KhaP6+dgpC+0exHasl0ZrsGSzYDdlViRh Z1NnVSEQinpBD3MxzDp1JJRRrracRI2PZ5Ik54FAKm4V71WvQTpIniJtH51kDIvQJE4d 0xYQJ6NtCqfAQ742+dHJG2DJlatfDfI9mM/jcjNGKgG+0+OuwRqQoE77S9P6+uGbY5T4 NqIg== 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=V6IJJ19rOUzFBOFGmJlDOYgREpNr2YAyRmNHR6Kaa3LoAKZ/1VFrBg4Sdy2Nt7GPHC G/TlNW8x/0+cGzrrvxubXc0zPaEze0ZAS5VIw/7PRw6nwPYeDUcaxaPuD83pXMijel4X yqul4KSF9Kbf9KKneI2xQnpr0Y0W5j7Gqk7rgXt53YB9ab/OGd7clmWfTtl0oIs7DAqw 9GMrFJ0LnPwTng5MjhC3oU8VQ79/MV/1VLodcqAR9btsKJ8091Lhcw4RIxxSK/HJMBzj 30scvXQh5OxMA2A3xjB1b6pgxndElh0gX6api8N4KYO8GAFZ5fOXi5h6XG0IM+CILyy/ fz0A== X-Gm-Message-State: AOAM533gQOimQxvlnnPyBuNrlVSeK4fwpqrgeT/ZS53Z3cf9jxAxmTVL zyH3qm3bSBhL4vbqYtVThxaNcxAgHDiyOw== X-Google-Smtp-Source: ABdhPJzBcL5IoMsGMCC0MigUUIkaWoXvTYACZfHQGeA6U16Xozij8N0132eXJnvZNeCA+EgyvcYWwQ== X-Received: by 2002:a2e:b712:: with SMTP id j18mr565950ljo.157.1591139026402; Tue, 02 Jun 2020 16:03:46 -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 s18sm67471ljj.63.2020.06.02.16.03.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2020 16:03:45 -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: Wed, 3 Jun 2020 02:03:19 +0300 Message-Id: <20200602230329.17838-2-dmitry.kozliuk@gmail.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200602230329.17838-1-dmitry.kozliuk@gmail.com> References: <20200525003720.6410-1-dmitry.kozliuk@gmail.com> <20200602230329.17838-1-dmitry.kozliuk@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v6 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