From patchwork Sat Feb 24 08:21:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 137151 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 23C1843BBD; Sat, 24 Feb 2024 09:24:11 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3C92F402ED; Sat, 24 Feb 2024 09:23:56 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 4B195402CC for ; Sat, 24 Feb 2024 09:22:12 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 4D9E620B74C2; Sat, 24 Feb 2024 00:22:11 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 4D9E620B74C2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1708762931; bh=KIcBZuSyclC5wESrYqxGvTee2yjHZnxqZZG1TxnoLEs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=V6pHjLGW8DDuIrV0+XakqMYtmyX7jMkGXUp9QA2yjY1b0g7O1d9i5OtsuM4Pp3M6z eJIOOPUlm+A8ojYagK/DrlmLY52Nc9aldVqof7MBPzJnuOiNA6dUJEjvfWwevFLMLX tq4g4lTLMfNUEP375LihffGVvCDSGkfzyyUivSZ8= 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 02/22] mbuf: expand rte markers empty when building with MSVC Date: Sat, 24 Feb 2024 00:21:47 -0800 Message-Id: <1708762927-14126-3-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. Use __rte_marker to expand RTE_MARKER fields empty in rte_mbuf struct. Make slight adjustment to cacheline1 __rte_cache_min_aligned as to continue maintaining correct alignment with or without the marker expanding empty. Signed-off-by: Tyler Retzlaff --- lib/mbuf/rte_mbuf_core.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/mbuf/rte_mbuf_core.h b/lib/mbuf/rte_mbuf_core.h index 5688683..4bf4587 100644 --- a/lib/mbuf/rte_mbuf_core.h +++ b/lib/mbuf/rte_mbuf_core.h @@ -464,7 +464,7 @@ enum { * The generic rte_mbuf, containing a packet mbuf. */ struct rte_mbuf { - RTE_MARKER cacheline0; + __rte_marker(RTE_MARKER, cacheline0) void *buf_addr; /**< Virtual address of segment buffer. */ #if RTE_IOVA_IN_MBUF @@ -487,7 +487,7 @@ struct rte_mbuf { #endif /* next 8 bytes are initialised on RX descriptor rearm */ - RTE_MARKER64 rearm_data; + __rte_marker(RTE_MARKER64, rearm_data) uint16_t data_off; /** @@ -514,7 +514,7 @@ struct rte_mbuf { uint64_t ol_flags; /**< Offload features. */ /* remaining bytes are set on RX when pulling packet from descriptor */ - RTE_MARKER rx_descriptor_fields1; + __rte_marker(RTE_MARKER, rx_descriptor_fields1) /* * The packet type, which is the combination of outer/inner L2, L3, L4 @@ -595,8 +595,8 @@ struct rte_mbuf { struct rte_mempool *pool; /**< Pool from which mbuf was allocated. */ /* second cache line - fields only used in slow path or on TX */ - RTE_MARKER cacheline1 __rte_cache_min_aligned; - + __rte_cache_min_aligned + __rte_marker(RTE_MARKER, cacheline1) #if RTE_IOVA_IN_MBUF /** * Next segment of scattered packet. Must be NULL in the last