From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5276E43BA3; Sat, 24 Feb 2024 09:26:00 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5A1EA42E16; Sat, 24 Feb 2024 09:24:17 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id E6D7B402EB for ; Sat, 24 Feb 2024 09:22:13 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 764AE20B74D5; Sat, 24 Feb 2024 00:22:11 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 764AE20B74D5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1708762932; bh=43J41FUN8U97ef9HAWZHV2AQLsuA5wCPXesxdNMpgMw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AH/NSVLtJl7D6wOb+T7m14AEbpYsce0d575SgwiT0ePY9VUzFEZiz3YGZQ6npDUZa 8JcjVF6kz5R1c2YJxGn4bCgr4kuA3GyEaYDELex18N2OptJAyR+PLs26oGQVjh+ENK tLiGQ7dz9HUwKXS578UzQj+MCJQ/jP2jtEd8LNNE= 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 21/22] net/thunderx: use mbuf descriptor accessors Date: Sat, 24 Feb 2024 00:22:06 -0800 Message-Id: <1708762927-14126-22-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 new rte_mbuf_rearm_data and rte_mbuf_rx_descriptor_fields1 accessors that provide a compatible type pointer without using the marker fields. Signed-off-by: Tyler Retzlaff --- drivers/net/thunderx/nicvf_ethdev.c | 4 +--- drivers/net/thunderx/nicvf_rxtx.h | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c index 609d95d..722751c 100644 --- a/drivers/net/thunderx/nicvf_ethdev.c +++ b/drivers/net/thunderx/nicvf_ethdev.c @@ -1306,7 +1306,6 @@ enum nicvf_link_speed { static inline void nicvf_rxq_mbuf_setup(struct nicvf_rxq *rxq) { - uintptr_t p; struct rte_mbuf mb_def; struct nicvf *nic = rxq->nic; @@ -1328,8 +1327,7 @@ enum nicvf_link_speed { /* Prevent compiler reordering: rearm_data covers previous fields */ rte_compiler_barrier(); - p = (uintptr_t)&mb_def.rearm_data; - rxq->mbuf_initializer.value = *(uint64_t *)p; + rxq->mbuf_initializer.value = *rte_mbuf_rearm_data(&mb_def); } static int diff --git a/drivers/net/thunderx/nicvf_rxtx.h b/drivers/net/thunderx/nicvf_rxtx.h index 4b83e33..7c07cde 100644 --- a/drivers/net/thunderx/nicvf_rxtx.h +++ b/drivers/net/thunderx/nicvf_rxtx.h @@ -66,7 +66,7 @@ static inline uint16_t __attribute__((const)) #else init.value += apad; #endif - *(uint64_t *)(&pkt->rearm_data) = init.value; + *rte_mbuf_rearm_data(pkt) = init.value; } static inline void @@ -80,7 +80,7 @@ static inline uint16_t __attribute__((const)) init.value += apad; #endif init.fields.nb_segs = nb_segs; - *(uint64_t *)(&pkt->rearm_data) = init.value; + *rte_mbuf_rearm_data(pkt) = init.value; } uint32_t nicvf_dev_rx_queue_count(void *rx_queue); -- 1.8.3.1