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 03545A052A; Wed, 27 Jan 2021 12:53:06 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DBE02140CF0; Wed, 27 Jan 2021 12:53:05 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mails.dpdk.org (Postfix) with ESMTP id 46FAE140CEE for ; Wed, 27 Jan 2021 12:53:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611748384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=khDuHcqk3cM15qEL/qtCR5xgQf/yELyaSN5WwIU949s=; b=AEiAkjWaWqDuONhie4kGVaxoa2aFbd5PtNEuan6KtWunjc/ai50o6G7wKDbIyDUXmEibNx bZszOPVJoqSSTIg+wfwNn+G3BT6Ym8w8wDi/2+nPPTZAAaXWry1ebO4wKsy9vyUuxLL39e dSSNfJ6rv5dYSnxVqCXxcaZDQN2bvBg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-160-hrTcH8BMMBSUKWkt0AH6_Q-1; Wed, 27 Jan 2021 06:53:02 -0500 X-MC-Unique: hrTcH8BMMBSUKWkt0AH6_Q-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2161010054FF; Wed, 27 Jan 2021 11:53:01 +0000 (UTC) Received: from [10.36.110.31] (unknown [10.36.110.31]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8311510016F7; Wed, 27 Jan 2021 11:52:56 +0000 (UTC) To: Subhi Masri Cc: "dev@dpdk.org" , "nd@arm.com" , Joyce Kong , "david.marchand@redhat.com" , "honnappa.nagarahalli@arm.com" , "ruifeng.wang@arm.com" , "i.maximets@ovn.org" References: <20210126091736.55586-1-joyce.kong@arm.com> <20210126095743.53040-1-joyce.kong@arm.com> From: Maxime Coquelin Message-ID: <507b414b-fad5-a8ee-565a-1d05e7776e3f@redhat.com> Date: Wed, 27 Jan 2021 12:52:54 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v2] 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" On 1/27/21 11:37 AM, Subhi Masri wrote: > Hi, > >> -----Original Message----- >> From: Maxime Coquelin >> Sent: Wednesday, January 27, 2021 10:44 AM >> To: Subhi Masri >> Cc: dev@dpdk.org; nd@arm.com; Joyce Kong ; >> david.marchand@redhat.com; honnappa.nagarahalli@arm.com; >> ruifeng.wang@arm.com; i.maximets@ovn.org >> Subject: Re: [PATCH v2] net/virtio: fix compiling issue for vectorized NEON >> path >> >> External email: Use caution opening links or attachments >> >> >> Hi Subhi, >> >> On 1/26/21 10:57 AM, Joyce Kong wrote: >>> 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’ intrinsic is not supported >>> because an old version gcc (gcc 4.8.5) is 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") >>> >>> Reported-by: Subhi Masri >>> 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. */ >>> >> >> Can you confirm the patch works for you? >> > Yes it does , you can add my tag. > Tested-by: Subhi Masri Thanks! Maxime >> Thanks, >> Maxime > > > Regards, > Subhi Masri >