From patchwork Sat Feb 24 08:21:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 137149 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1CBBD43BBD; Sat, 24 Feb 2024 09:23:54 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DBB05415D7; Sat, 24 Feb 2024 09:23:52 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 29029402BB for ; Sat, 24 Feb 2024 09:22:12 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 3D71E20B74C1; Sat, 24 Feb 2024 00:22:11 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 3D71E20B74C1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1708762931; bh=A7jdsqx1qrIsoUt2sezwVgyjjbtTh5oQSTEZDNaMyO0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hEU/4oSLOmAG3tp39jjWLKyu125LfP0Yf/xtG5YBnU4W+SFsvXsnHwdCI4KHCUFaE xPjr3Yu4KcvWWqCLe9NVKCOWB2uJbE8tPD30DBKr35xAUCOMmfHRsEI2ITx7RCFi53 uf9EHHnPoFCwApopgID+j0HXO1z78EwNd/9Nd9nk= From: Tyler Retzlaff To: dev@dpdk.org Cc: Ajit Khaparde , Andrew Boyer , Andrew Rybchenko , Bruce Richardson , Chenbo Xia , Chengwen Feng , Dariusz Sosnowski , David Christensen , Hyong Youb Kim , Jerin Jacob , Jie Hai , Jingjing Wu , John Daley , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Maciej Czekaj , Matan Azrad , Maxime Coquelin , Nithin Dabilpuram , Ori Kam , Ruifeng Wang , Satha Rao , Somnath Kotur , Suanming Mou , Sunil Kumar Kori , Viacheslav Ovsiienko , Yisen Zhuang , Yuying Zhang , mb@smartsharesystems.com, Tyler Retzlaff Subject: [PATCH v5 01/22] eal: provide macro to expand marker extensions Date: Sat, 24 Feb 2024 00:21:46 -0800 Message-Id: <1708762927-14126-2-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1708762927-14126-1-git-send-email-roretzla@linux.microsoft.com> References: <1706657173-26166-1-git-send-email-roretzla@linux.microsoft.com> <1708762927-14126-1-git-send-email-roretzla@linux.microsoft.com> X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org RTE_MARKER typedefs are a GCC extension unsupported by MSVC. Provide a new macro __rte_marker(type, name) that may be used to expand RTE_MARKER empty in struct definitions when building with MSVC. Signed-off-by: Tyler Retzlaff --- lib/eal/include/rte_common.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/eal/include/rte_common.h b/lib/eal/include/rte_common.h index 1cc1222..60d81a2 100644 --- a/lib/eal/include/rte_common.h +++ b/lib/eal/include/rte_common.h @@ -578,7 +578,11 @@ static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void) /*********** Structure alignment markers ********/ -#ifndef RTE_TOOLCHAIN_MSVC +#ifdef RTE_TOOLCHAIN_MSVC + +#define __rte_marker(type, name) + +#else /** Generic marker for any place in a structure. */ __extension__ typedef void *RTE_MARKER[0]; @@ -591,6 +595,8 @@ static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void) /** Marker for 8B alignment in a structure. */ __extension__ typedef uint64_t RTE_MARKER64[0]; +#define __rte_marker(type, name) type name; + #endif /*********** Macros for calculating min and max **********/