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 9C2EC43C03; Tue, 27 Feb 2024 06:43:43 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8DB8842ED7; Tue, 27 Feb 2024 06:42:31 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 594C642E29 for ; Tue, 27 Feb 2024 06:41:43 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id C7ADA20B74D3; Mon, 26 Feb 2024 21:41:41 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com C7ADA20B74D3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1709012501; bh=u4Hpx6TXmnVLV5OjQVFA1oRAHgS0KFkdXS6GeSBxts8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jQKDUhVp+sEyotb1KoPguExni3oj9MEJwqOFFVt4eCJKHuPuUCpj0AcxEE9O1X558 nQ30vQ4eQxzYp0xDLM7KO0Xh5wZ0J0FpLLAyh5mkmZ5rU9FE/OmTsM6L/bSkL+mVnz pkbrxsdA+qOOCqlzMsQAB3+uOgLsGHLxI9woRFOo= 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 v6 19/23] examples/dma: use mbuf descriptor accessor Date: Mon, 26 Feb 2024 21:41:35 -0800 Message-Id: <1709012499-12813-20-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1709012499-12813-1-git-send-email-roretzla@linux.microsoft.com> References: <1706657173-26166-1-git-send-email-roretzla@linux.microsoft.com> <1709012499-12813-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_rx_descriptor_fields1 accessor that provides a compatible type pointer without using the marker field. Signed-off-by: Tyler Retzlaff --- examples/dma/dmafwd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/dma/dmafwd.c b/examples/dma/dmafwd.c index f4a0bff..54991f6 100644 --- a/examples/dma/dmafwd.c +++ b/examples/dma/dmafwd.c @@ -294,9 +294,10 @@ struct dma_bufs { pktmbuf_metadata_copy(const struct rte_mbuf *src, struct rte_mbuf *dst) { dst->data_off = src->data_off; - memcpy(&dst->rx_descriptor_fields1, &src->rx_descriptor_fields1, + memcpy(rte_mbuf_rx_descriptor_fields1(dst), + rte_mbuf_rx_descriptor_fields1((struct rte_mbuf *)(uintptr_t)src), offsetof(struct rte_mbuf, buf_len) - - offsetof(struct rte_mbuf, rx_descriptor_fields1)); + offsetof(struct rte_mbuf, data_off)); } /* Copy packet data */ -- 1.8.3.1