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 B86B5A051F; Wed, 10 Jun 2020 16:27:59 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 977E55F2F; Wed, 10 Jun 2020 16:27:52 +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 731032B89 for ; Wed, 10 Jun 2020 16:27:49 +0200 (CEST) Received: by mail-lf1-f65.google.com with SMTP id c12so1562609lfc.10 for ; Wed, 10 Jun 2020 07:27:49 -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=VV6Fl7GckxRpEgcRicD2Vg1upjcMUql+ZOBXkwbgNfA6ECH0u0SG05Uwpwtmgh+UCD iZwllI6a8fXgi6fJcij2CfMcPvBxF7KLaAP/v219P17/fB2AtpCt2kv6tPncpUd7QzAK 7CCVrSgvdzNNvoB3EUZSnZq7TISipV+cYKi+1Tzd75azxjk2zcZx0hlKjdlwsyboVI6T d+0v4NUjarYJED7bd5rMM+OIG8WxD5n9rot0sTrSuXX0HF7wdse2+3wolCDqt2NSRia7 pqbpnmmXq+rdOX8xRD6ztEjOmO2WyFmEdUGnUO8LpPxDnKIkQ20DPICZYSZN8Qt0TKVr J90w== 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=VsC49ocnOXmzeIocW5tEBGXo6LH9CU2kCcm7zjlfwpl/dOS2yBE6C/jtxntoA6EUJn smDeWLTFrIAF4LDzlMh5RRJFIgE8prJXGu+LY/QgFAsf813ofsMVKsOuxOikd/VtGTxi 3locOUuy6dO7lJYTOuzjHxohjYWASjvmi8iphSkqL01CjbRBWzwfoh71VuZa+ziY4b2B wMGq+GDldnqajajbdNzk5YiJ6plJTRpRrjWBsVarbdJYPKd2chu9nLWNb/dNrzcHrG/n CfjsrTAeusWuJugYvGiY8JtJG3ogjAGdaLDt2aF8xkdZ/owWUQqkmhb8Sscs5NRhDMUm RdZQ== X-Gm-Message-State: AOAM533iVzvPn8yvI+lyHTwRUpse42EyLacK1bkzm88EFu6CanhQ/Q8B VoWyVyOb6udtgh956x0Z7i3KIzGRBk8T8g== X-Google-Smtp-Source: ABdhPJxPdNjjtFf7oWxoatCiuijteYNiEgs6yGNEmM+PIh91G1csfKfuyrT/Ph8DcMMUd1/yPR7+aQ== X-Received: by 2002:ac2:4d1c:: with SMTP id r28mr1874110lfi.45.1591799268873; Wed, 10 Jun 2020 07:27:48 -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 j12sm5051733ljg.15.2020.06.10.07.27.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jun 2020 07:27:47 -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, 10 Jun 2020 17:27:20 +0300 Message-Id: <20200610142730.31376-2-dmitry.kozliuk@gmail.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200610142730.31376-1-dmitry.kozliuk@gmail.com> References: <20200608074153.29611-1-dmitry.kozliuk@gmail.com> <20200610142730.31376-1-dmitry.kozliuk@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v8 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