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 E5C7CA0093; Mon, 15 Jun 2020 02:44:17 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C51B64C8B; Mon, 15 Jun 2020 02:44:17 +0200 (CEST) Received: from mail-lj1-f196.google.com (mail-lj1-f196.google.com [209.85.208.196]) by dpdk.org (Postfix) with ESMTP id 0451449E0 for ; Mon, 15 Jun 2020 02:44:03 +0200 (CEST) Received: by mail-lj1-f196.google.com with SMTP id 9so17104802ljc.8 for ; Sun, 14 Jun 2020 17:44:03 -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=Wo7UMW/kz2WBu66kayDiu9sVzaczM6fJ1aGaRO7qddY=; b=mNGRBHZTVKaSO7Z8zG19mAiC+cezVrh10rhybkF6EcUf5cq3U05QxoYsvJi8vzFEJg 04veT9ZXghvSyfWHAcFh4yZHsqAPEzlF2D0q0PZ9aj4iSoaIrbPWKRupOwAoy+3I86xs IUiX0CcqdM+Nui/sGE9q1ua9GghuSlMJHL3rhdkXHmDRD9D1C48ljyrsGg0WL1unBXId xt1PthBjHDL6/DfQsHjhdjo17LSha1HMqvVxz3Stw4pn6i/pbCvq3VdKXJbMVZWhw36q GjyIxKNcGWCRE/0KUJ5mVX8VlEYTfH/R/QBi0cx+8gku0oBAURS8GfSofpv4Y4oFs38c Nplg== 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=Wo7UMW/kz2WBu66kayDiu9sVzaczM6fJ1aGaRO7qddY=; b=FIgmnhW7h4PZw2w/wKvnlIr6RwKEbid56gsd9ILljBqSb5ed2xoW0ZuUC34KwjQ/g2 UUypHXtxm0QIwIoZ278pIucAC7hSR4oGphzKxkJ2Z6MXoANwaYHH/HCKLv3ZAS3t/v4D pzIAdOvds4t9LhlzV15w0u3+Y1nxhn4xwj8+kJ212RCzhdEj7wZMucoiYfTudhJy4ACC AHkSMhfH5EkY54noBtWwMfd6F5XLdjT4NorLpmhcFGlVgbIGYFdBG9RIWtwLF2w3LNHj veBV6WUgpYowHmUR2ADfR+zDhzbmU2okkRjaixnAddPLc8DfWC1LI2ULAlbTJeQmM89x AQzQ== X-Gm-Message-State: AOAM530SKwd7zkFCAH1fvtyNOBeqYCQOeZ0kQPJcVM2NxRCc109uBHUt Uv/wJckgRlcXneRTyEQ85O1eR93NjQsRTQ== X-Google-Smtp-Source: ABdhPJz/Pp/mgWfj1Dv7nygQq4bVjV1KDLNCNgu2sjBw1dqhW9C2AAM0KxFsnnQ6fhD9PK2W8ch+ew== X-Received: by 2002:a2e:9192:: with SMTP id f18mr12480885ljg.383.1592181843353; Sun, 14 Jun 2020 17:44:03 -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 f19sm4176342lfk.24.2020.06.14.17.44.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Jun 2020 17:44:02 -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, 15 Jun 2020 03:43:43 +0300 Message-Id: <20200615004354.14380-2-dmitry.kozliuk@gmail.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200615004354.14380-1-dmitry.kozliuk@gmail.com> References: <20200610142730.31376-1-dmitry.kozliuk@gmail.com> <20200615004354.14380-1-dmitry.kozliuk@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v9 01/12] 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 dee4ccbb5..86d240213 100644 --- a/doc/guides/rel_notes/release_20_08.rst +++ b/doc/guides/rel_notes/release_20_08.rst @@ -91,6 +91,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