net/virtio: fix compiling issue for vectorized NEON path
PATCH 1/1 net/virtio: fix compiling issue for vectorized NEON path
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
--- drivers/net/virtio/virtio_rxtx_packed_neon.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/net/virtio/virtio_rxtx_packed_neon.h +4 -4
@@ -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. */
Signature · 1 line
2.30.0
Quoted 11 lines · Joyce Kong
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_tcmp1 =vreinterpretq_p128_u32(~vceqq_u32(ref_seg, def_ref_seg)); ^The message shows ‘vreinterpretq_p128_u32’ instrisic is not supported
intrinsic*
Quoted 7 lines
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")
No reason to copy [email protected].
Signature · 1 line
David Marchand
PATCH v2 1/1 net/virtio: fix compiling issue for vectorized NEON path
In reply to Joyce KongIn 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
--- drivers/net/virtio/virtio_rxtx_packed_neon.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/net/virtio/virtio_rxtx_packed_neon.h +4 -4
@@ -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. */
Signature · 1 line
2.30.0
Quoted 70 lines
-----Original Message-----
From: Joyce Kong <[email protected]>
Sent: Tuesday, January 26, 2021 5:58 PM
To: [email protected]; [email protected]; [email protected]; Ruifeng Wang <[email protected]>; Honnappa Nagarahalli <[email protected]>
Cc: [email protected]; nd <[email protected]>; Subhi Masri <[email protected]>
Subject: [PATCH v2] net/virtio: fix compiling issue for vectorized NEON pathIn 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_tcmp1 =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 <[email protected]>Signed-off-by Joyce Kong <[email protected]>--- drivers/net/virtio/virtio_rxtx_packed_neon.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/net/virtio/virtio_rxtx_packed_neon.h +1
-2@@ -71,8 +71,8 @@ virtqueue_enqueue_batch_packed_vec(structvirtnet_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));drivers/net/virtio/virtio_rxtx_packed_neon.h +5
-3+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. */ --
Quoted 1 line
2.30.0
Hi Subhi,
Quoted 42 lines · Joyce Kong
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_tcmp1 =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 <[email protected]>Signed-off-by Joyce Kong <[email protected]>--- drivers/net/virtio/virtio_rxtx_packed_neon.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/net/virtio/virtio_rxtx_packed_neon.h +2
-2@@ -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 );
drivers/net/virtio/virtio_rxtx_packed_neon.h virtqueue_dequeue_batch_packed_vec(struct virtnet_rx *rxvq, · line 234
Quoted 10 lines
drivers/net/virtio/virtio_rxtx_packed_neon.h +2
-2-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?
Thanks,
Maxime
Subhi Masri
Tested-byHi,
Quoted 76 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]>
Sent: Wednesday, January 27, 2021 10:44 AM
To: Subhi Masri <[email protected]>
Cc: [email protected]; [email protected]; Joyce Kong <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH v2] net/virtio: fix compiling issue for vectorized NEON pathExternal email: Use caution opening links or attachments
Hi Subhi,
drivers/net/virtio/virtio_rxtx_packed_neon.h virtqueue_enqueue_batch_packed_vec(struct
Quoted 29 lines · Joyce Kong
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_tcmp1 =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 <[email protected]>Signed-off-by Joyce Kong <[email protected]>--- drivers/net/virtio/virtio_rxtx_packed_neon.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/net/virtio/virtio_rxtx_packed_neon.h +0
-0@@ -71,8 +71,8 @@ virtqueue_enqueue_batch_packed_vec(struct
virtnet_tx*txvq,drivers/net/virtio/virtio_rxtx_packed_neon.h virtqueue_enqueue_batch_packed_vec(struct virtnet_tx *txvq,
Quoted 3 lines
drivers/net/virtio/virtio_rxtx_packed_neon.h +0
-0uint32x4_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));drivers/net/virtio/virtio_rxtx_packed_neon.h virtqueue_enqueue_batch_packed_vec(struct · line 74
Quoted 1 line
drivers/net/virtio/virtio_rxtx_packed_neon.h +0
-1- poly128_t cmp1 = vreinterpretq_p128_u32(~vceqq_u32(ref_seg,
def_ref_seg));drivers/net/virtio/virtio_rxtx_packed_neon.h virtqueue_enqueue_batch_packed_vec(struct · line 74
Quoted 2 lines
drivers/net/virtio/virtio_rxtx_packed_neon.h +1
-1-if (unlikely (cmp1)) + uint64x2_t cmp1 = vreinterpretq_u64_u32(~vceqq_u32(ref_seg,
def_ref_seg));drivers/net/virtio/virtio_rxtx_packed_neon.h virtqueue_dequeue_batch_packed_vec(struct
Quoted 6 lines
drivers/net/virtio/virtio_rxtx_packed_neon.h +2
-0+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,drivers/net/virtio/virtio_rxtx_packed_neon.h virtqueue_dequeue_batch_packed_vec(struct virtnet_rx *rxvq,
Quoted 4 lines
drivers/net/virtio/virtio_rxtx_packed_neon.h +0
-1if (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));Quoted 9 lines
drivers/net/virtio/virtio_rxtx_packed_neon.h +4
-1+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 ;
Quoted 5 lines
Quoted 2 lines
/* Load 2 mbuf pointers per time. */Can you confirm the patch works for you?
Yes it does , you can add my tag.
Quoted 2 lines
Thanks,
Maxime
Regards,
Subhi Masri
Quoted 78 lines · Subhi Masri
Hi,
Quoted 76 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]>
Sent: Wednesday, January 27, 2021 10:44 AM
To: Subhi Masri <[email protected]>
Cc: [email protected]; [email protected]; Joyce Kong <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH v2] net/virtio: fix compiling issue for vectorized NEON pathExternal email: Use caution opening links or attachments
Hi Subhi,
drivers/net/virtio/virtio_rxtx_packed_neon.h virtqueue_enqueue_batch_packed_vec(struct
Quoted 29 lines · Joyce Kong
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_tcmp1 =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 <[email protected]>Signed-off-by Joyce Kong <[email protected]>--- drivers/net/virtio/virtio_rxtx_packed_neon.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/net/virtio/virtio_rxtx_packed_neon.h +0
-0@@ -71,8 +71,8 @@ virtqueue_enqueue_batch_packed_vec(struct
virtnet_tx*txvq,drivers/net/virtio/virtio_rxtx_packed_neon.h virtqueue_enqueue_batch_packed_vec(struct virtnet_tx *txvq,
Quoted 3 lines
drivers/net/virtio/virtio_rxtx_packed_neon.h +0
-0uint32x4_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));drivers/net/virtio/virtio_rxtx_packed_neon.h virtqueue_enqueue_batch_packed_vec(struct · line 74
Quoted 1 line
drivers/net/virtio/virtio_rxtx_packed_neon.h +0
-1- poly128_t cmp1 = vreinterpretq_p128_u32(~vceqq_u32(ref_seg,
def_ref_seg));drivers/net/virtio/virtio_rxtx_packed_neon.h virtqueue_enqueue_batch_packed_vec(struct · line 74
Quoted 2 lines
drivers/net/virtio/virtio_rxtx_packed_neon.h +1
-1-if (unlikely (cmp1)) + uint64x2_t cmp1 = vreinterpretq_u64_u32(~vceqq_u32(ref_seg,
def_ref_seg));drivers/net/virtio/virtio_rxtx_packed_neon.h virtqueue_dequeue_batch_packed_vec(struct
Quoted 6 lines
drivers/net/virtio/virtio_rxtx_packed_neon.h +2
-0+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,drivers/net/virtio/virtio_rxtx_packed_neon.h virtqueue_dequeue_batch_packed_vec(struct virtnet_rx *rxvq,
Quoted 4 lines
drivers/net/virtio/virtio_rxtx_packed_neon.h +0
-1if (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));Quoted 9 lines
drivers/net/virtio/virtio_rxtx_packed_neon.h +4
-1+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 ;
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
/* 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 <[email protected]>
Thanks!
Maxime
Quoted 7 lines
Quoted 2 lines
Thanks,
MaximeRegards,
Subhi Masri
Quoted 42 lines · Joyce Kong
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_tcmp1 =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 <[email protected]>Signed-off-by Joyce Kong <[email protected]>--- drivers/net/virtio/virtio_rxtx_packed_neon.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/net/virtio/virtio_rxtx_packed_neon.h +2
-2@@ -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 );
drivers/net/virtio/virtio_rxtx_packed_neon.h virtqueue_dequeue_batch_packed_vec(struct virtnet_rx *rxvq, · line 234
Quoted 10 lines
drivers/net/virtio/virtio_rxtx_packed_neon.h +2
-2-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. */
Thanks,
Maxime
Maxime Coquelin
AppliedQuoted 14 lines · Joyce Kong
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_tcmp1 =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
Quoted 9 lines
Fixes 530887469350 ("net/virtio: add vectorized packed ring NEON Tx")Fixes 5971ce5e2a59 ("net/virtio: add vectorized packed ring NEON Rx")Reported-by Subhi Masri <[email protected]>Signed-off-by Joyce Kong <[email protected]>--- drivers/net/virtio/virtio_rxtx_packed_neon.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
Applied to dpdk-next-virtio/main.
Thanks,
Maxime