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 2D5D5A052A; Tue, 26 Jan 2021 10:19:55 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 13E471412EA; Tue, 26 Jan 2021 10:19:55 +0100 (CET) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mails.dpdk.org (Postfix) with ESMTP id D5C0B1412DF; Tue, 26 Jan 2021 10:19:52 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 24669D6E; Tue, 26 Jan 2021 01:19:52 -0800 (PST) Received: from net-arm-thunderx2-03.shanghai.arm.com (net-arm-thunderx2-03.shanghai.arm.com [10.169.208.206]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id B264A3F66B; Tue, 26 Jan 2021 01:19:49 -0800 (PST) From: Joyce Kong To: maxime.coquelin@redhat.com, i.maximets@ovn.org, ruifeng.wang@arm.com, honnappa.nagarahalli@arm.com Cc: dev@dpdk.org, nd@arm.com, stable@dpdk.org Date: Tue, 26 Jan 2021 17:17:36 +0800 Message-Id: <20210126091736.55586-1-joyce.kong@arm.com> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v1] net/virtio: fix compiling issue for vectorized NEON path 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 Sender: "dev" In file included from ../drivers/net/virtio/virtio_rxtx_packed.c:22:0: ../drivers/net/virtio/virtio_rxtx_packed_neon.h: In function ‘virtqueue_enqueue_batch_packed_vec’: ../drivers/net/virtio/virtio_rxtx_packed_neon.h:74:2: warning: implicit declaration of function ‘vreinterpretq_p128_u32’ [-Wimplicit-function-declaration] poly128_t cmp1 = vreinterpretq_p128_u32(~vceqq_u32(ref_seg, def_ref_seg)); ^ The message shows ‘vreinterpretq_p128_u32’ instrisic is not supported because an old version gcc (gcc 4.8.5) was used. So fix the issue with implementing the logic with other intrinsics. Bugzilla ID: 621 Fixes: 530887469350 ("net/virtio: add vectorized packed ring NEON Tx") Fixes: 5971ce5e2a59 ("net/virtio: add vectorized packed ring NEON Rx") Cc: stable@dpdk.org Signed-off-by: Joyce Kong --- drivers/net/virtio/virtio_rxtx_packed_neon.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/virtio/virtio_rxtx_packed_neon.h b/drivers/net/virtio/virtio_rxtx_packed_neon.h index 01c77b712..00dd04277 100644 --- a/drivers/net/virtio/virtio_rxtx_packed_neon.h +++ b/drivers/net/virtio/virtio_rxtx_packed_neon.h @@ -71,8 +71,8 @@ virtqueue_enqueue_batch_packed_vec(struct virtnet_tx *txvq, uint32x4_t def_ref_seg = vdupq_n_u32(0x10001); /* Check refcnt and nb_segs. */ uint32x4_t ref_seg = vreinterpretq_u32_u8(vqtbl2q_u8(mbuf, ref_seg_msk)); - poly128_t cmp1 = vreinterpretq_p128_u32(~vceqq_u32(ref_seg, def_ref_seg)); - if (unlikely(cmp1)) + uint64x2_t cmp1 = vreinterpretq_u64_u32(~vceqq_u32(ref_seg, def_ref_seg)); + if (unlikely(vgetq_lane_u64(cmp1, 0) || vgetq_lane_u64(cmp1, 1))) return -1; /* Check headroom is enough. */ @@ -225,10 +225,10 @@ virtqueue_dequeue_batch_packed_vec(struct virtnet_rx *rxvq, if (vq->vq_packed.used_wrap_counter) v_used_flag = vdupq_n_u32(PACKED_FLAGS_MASK); - poly128_t desc_stats = vreinterpretq_p128_u32(~vceqq_u32(v_flag, v_used_flag)); + uint64x2_t desc_stats = vreinterpretq_u64_u32(~vceqq_u32(v_flag, v_used_flag)); /* Check all descs are used. */ - if (desc_stats) + if (unlikely(vgetq_lane_u64(desc_stats, 0) || vgetq_lane_u64(desc_stats, 1))) return -1; /* Load 2 mbuf pointers per time. */ -- 2.30.0