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 A3C5445F5B; Fri, 27 Dec 2024 20:44:57 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9673E4021F; Fri, 27 Dec 2024 20:44:57 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id BC78D40144 for ; Fri, 27 Dec 2024 20:44:56 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 1A9F2203EC3A; Fri, 27 Dec 2024 11:44:56 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 1A9F2203EC3A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1735328696; bh=eiu4JlTGfooV5OO2PZvgCu8R26/20mqJKqirfQfH0nU=; h=From:To:Cc:Subject:Date:From; b=AB/ilQoe+wenWRZx98+QiCx2vUkkZLqr+2P1nj5T6zufq64Au/QuEqbiSea1Q9zNz uCxDkwgkt4nSQBCyW9ybDBQbTkAcYozsrtwJJMbHdyoscWmtmg4z7viOsmsbRhWoKP w35N/fGAk0Q5QyFRJiPOLLBUu50TiVqhOYG8NfT8= From: Andre Muezerie To: Bruce Richardson , Konstantin Ananyev , Vamsi Attunuru Cc: dev@dpdk.org, Andre Muezerie Subject: [PATCH] drivers/net: use intrinsic to access content of __m128i Date: Fri, 27 Dec 2024 11:44:44 -0800 Message-Id: <1735328684-10684-1-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 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 Compiler intrinsics should be used to access/manipulate contents of __m128i. Existing code results in the error below when compiled with MSVC: ../drivers/net/octeon_ep/cnxk_ep_rx_sse.c(61): error C2440: 'type cast': cannot convert from '__m128i' to 'rte_xmm_t' The fix is to use an intrinsic instead. This compiles fine with gcc, clang and msvc. Signed-off-by: Andre Muezerie --- drivers/net/octeon_ep/cnxk_ep_rx_sse.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/octeon_ep/cnxk_ep_rx_sse.c b/drivers/net/octeon_ep/cnxk_ep_rx_sse.c index fbd1f73c1e..bbc4490f49 100644 --- a/drivers/net/octeon_ep/cnxk_ep_rx_sse.c +++ b/drivers/net/octeon_ep/cnxk_ep_rx_sse.c @@ -58,10 +58,10 @@ cnxk_ep_process_pkts_vec_sse(struct rte_mbuf **rx_pkts, struct otx_ep_droq *droq s23 = _mm_shuffle_epi8(s23, cpy_mask); /* Store packet length and data length to mbuf. */ - *(uint64_t *)&m0->pkt_len = ((rte_xmm_t)s01).u64[0]; - *(uint64_t *)&m1->pkt_len = ((rte_xmm_t)s01).u64[1]; - *(uint64_t *)&m2->pkt_len = ((rte_xmm_t)s23).u64[0]; - *(uint64_t *)&m3->pkt_len = ((rte_xmm_t)s23).u64[1]; + *(uint64_t *)&m0->pkt_len = _mm_extract_epi64(s01, 0); + *(uint64_t *)&m1->pkt_len = _mm_extract_epi64(s01, 1); + *(uint64_t *)&m2->pkt_len = _mm_extract_epi64(s23, 0); + *(uint64_t *)&m3->pkt_len = _mm_extract_epi64(s23, 1); /* Reset rearm data. */ *(uint64_t *)&m0->rearm_data = droq->rearm_data; -- 2.47.0.vfs.0.3