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 43422A04EF; Mon, 25 May 2020 02:37:49 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CC1051D5FD; Mon, 25 May 2020 02:37:42 +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 0CD8C1D5F1 for ; Mon, 25 May 2020 02:37:39 +0200 (CEST) Received: by mail-lj1-f193.google.com with SMTP id z6so18908348ljm.13 for ; Sun, 24 May 2020 17:37:39 -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=EvhbOAriLajJcuoYpe63DNPvh5xak8wUjerNUQV6tAg=; b=kAz9W6pQpii3OvWTcYfaC3hxcJQtvecl+YjTZAY5NSxmzCU5hm9+LhN2WDKGmy9Yua sKah8Sjy/iLVk5N0xyomvddCnwY4bRp0lgZntD5Tr4oE14YOpyChnj2Wq8QlsEgPQhf3 r2x5yO3nLhuPwu4nwsubZ194aiCk+Ovj8oRJWqsk4aiW5YGZs2pccoXYrCdET+7e/T5S RSbhN4NDAAyNrj5aTCLWLL4qB1R1FCruJ55SEUOY9xmoCe+eBeeapNlwDDMq3XZAdXg6 OZo5xng9c9sCn8A06AWvAwKvQTD9kdrMHkygVTiDAZ3sVY7NxoK/EnhfKr/Ulvz61vTa bsaQ== 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=EvhbOAriLajJcuoYpe63DNPvh5xak8wUjerNUQV6tAg=; b=fxHE7uqK0XxHUz8deDwFU+c7D5PXLdipHKSvfMh8oLkJOhiwSmr9uoUPytKmVXfIPX ub1VV5ENlmk4/BCxSKq3iU2n133hMsyh+DmZ5vgtMXKFjD1pg780CCpHoSyTINx4aX+3 kA7KSbsUL3FRej7XOp0FXuq6LjsyAz+P7Nc717KTWFB2WOQeFWhADdhCpc25vBmlMHkz V8GjlfNBdRwD0IPMwrgoWI6ovwPNMMKqzy/z5IEApNeEGna9stqJkgzPBfufD6TISnKT 20NPC/cUfnW9aXq41bS8MPbn6OblaZ4jhqmwRkPSPf32BCPT6PzJ6x77gcuORI0CkbDe lwzQ== X-Gm-Message-State: AOAM533cnwq35Ri+/qTKsWAwsNiaMTo/9hNQ9gPWjLlU/xLo31WpxokZ +TMs0sZm9OZVtXFn9im5d/GsW6M1eRTHWA== X-Google-Smtp-Source: ABdhPJzTCmxpZqpMvKlQLFoS5qZ+jPnwkDSZGqZkhERLN+u/tZvLXT3txwvUFsNWq/gDmmT9N7JSlA== X-Received: by 2002:a05:651c:2c1:: with SMTP id f1mr9882172ljo.440.1590367059431; Sun, 24 May 2020 17:37:39 -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 n8sm4279526lfb.20.2020.05.24.17.37.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 May 2020 17:37:38 -0700 (PDT) From: Dmitry Kozlyuk To: dev@dpdk.org Cc: Dmitry Malloy , Narcisa Ana Maria Vasile , Fady Bader , Tal Shnaiderman , Dmitry Kozlyuk , Jerin Jacob , Anatoly Burakov Date: Mon, 25 May 2020 03:37:10 +0300 Message-Id: <20200525003720.6410-2-dmitry.kozliuk@gmail.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200525003720.6410-1-dmitry.kozliuk@gmail.com> References: <20200428235015.2820677-1-dmitry.kozliuk@gmail.com> <20200525003720.6410-1-dmitry.kozliuk@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v5 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. Suggested-by: Jerin Jacob Signed-off-by: Dmitry Kozlyuk --- Release notes for 20.08 don't exits yet, so not adding anything. lib/librte_eal/include/rte_memory.h | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) 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