DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v1] net/virtio: fix compiling issue for vectorized NEON path
@ 2021-01-26  9:17 Joyce Kong
  2021-01-26  9:25 ` [dpdk-dev] [dpdk-stable] " David Marchand
  2021-01-26  9:57 ` [dpdk-dev] [PATCH v2] " Joyce Kong
  0 siblings, 2 replies; 9+ messages in thread
From: Joyce Kong @ 2021-01-26  9:17 UTC (permalink / raw)
  To: maxime.coquelin, i.maximets, ruifeng.wang, honnappa.nagarahalli
  Cc: dev, nd, stable

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 <joyce.kong@arm.com>
---
 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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [dpdk-stable] [PATCH v1] net/virtio: fix compiling issue for vectorized NEON path
  2021-01-26  9:17 [dpdk-dev] [PATCH v1] net/virtio: fix compiling issue for vectorized NEON path Joyce Kong
@ 2021-01-26  9:25 ` David Marchand
  2021-01-26  9:57 ` [dpdk-dev] [PATCH v2] " Joyce Kong
  1 sibling, 0 replies; 9+ messages in thread
From: David Marchand @ 2021-01-26  9:25 UTC (permalink / raw)
  To: Joyce Kong
  Cc: Maxime Coquelin, Ilya Maximets,
	Ruifeng Wang (Arm Technology China),
	Honnappa Nagarahalli, dev, nd, subhim

On Tue, Jan 26, 2021 at 10:20 AM Joyce Kong <joyce.kong@arm.com> 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’ instrisic is not supported

intrinsic*

> 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

No reason to copy stable@dpdk.org.

Cc: reporter.

-- 
David Marchand


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [dpdk-dev] [PATCH v2] net/virtio: fix compiling issue for vectorized NEON path
  2021-01-26  9:17 [dpdk-dev] [PATCH v1] net/virtio: fix compiling issue for vectorized NEON path Joyce Kong
  2021-01-26  9:25 ` [dpdk-dev] [dpdk-stable] " David Marchand
@ 2021-01-26  9:57 ` Joyce Kong
  2021-01-27  5:18   ` Ruifeng Wang
                     ` (3 more replies)
  1 sibling, 4 replies; 9+ messages in thread
From: Joyce Kong @ 2021-01-26  9:57 UTC (permalink / raw)
  To: maxime.coquelin, david.marchand, i.maximets, ruifeng.wang,
	honnappa.nagarahalli
  Cc: dev, nd, Subhi Masri

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 <subhim@nvidia.com>
Signed-off-by: Joyce Kong <joyce.kong@arm.com>
---
 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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH v2] net/virtio: fix compiling issue for vectorized NEON path
  2021-01-26  9:57 ` [dpdk-dev] [PATCH v2] " Joyce Kong
@ 2021-01-27  5:18   ` Ruifeng Wang
  2021-01-27  8:44   ` Maxime Coquelin
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: Ruifeng Wang @ 2021-01-27  5:18 UTC (permalink / raw)
  To: Joyce Kong, maxime.coquelin, david.marchand, i.maximets,
	Honnappa Nagarahalli
  Cc: dev, nd, Subhi Masri, nd

> -----Original Message-----
> From: Joyce Kong <joyce.kong@arm.com>
> Sent: Tuesday, January 26, 2021 5:58 PM
> To: maxime.coquelin@redhat.com; david.marchand@redhat.com;
> i.maximets@ovn.org; Ruifeng Wang <Ruifeng.Wang@arm.com>; Honnappa
> Nagarahalli <Honnappa.Nagarahalli@arm.com>
> Cc: dev@dpdk.org; nd <nd@arm.com>; Subhi Masri <subhim@nvidia.com>
> Subject: [PATCH v2] 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’ 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 <subhim@nvidia.com>
> Signed-off-by: Joyce Kong <joyce.kong@arm.com>
> ---
>  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

Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH v2] net/virtio: fix compiling issue for vectorized NEON path
  2021-01-26  9:57 ` [dpdk-dev] [PATCH v2] " Joyce Kong
  2021-01-27  5:18   ` Ruifeng Wang
@ 2021-01-27  8:44   ` Maxime Coquelin
  2021-01-27 10:37     ` Subhi Masri
  2021-01-27 10:43   ` Maxime Coquelin
  2021-01-27 12:01   ` Maxime Coquelin
  3 siblings, 1 reply; 9+ messages in thread
From: Maxime Coquelin @ 2021-01-27  8:44 UTC (permalink / raw)
  To: Subhi Masri
  Cc: dev, nd, Joyce Kong, david.marchand, honnappa.nagarahalli,
	ruifeng.wang, i.maximets

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 <subhim@nvidia.com>
> Signed-off-by: Joyce Kong <joyce.kong@arm.com>
> ---
>  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?

Thanks,
Maxime


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH v2] net/virtio: fix compiling issue for vectorized NEON path
  2021-01-27  8:44   ` Maxime Coquelin
@ 2021-01-27 10:37     ` Subhi Masri
  2021-01-27 11:52       ` Maxime Coquelin
  0 siblings, 1 reply; 9+ messages in thread
From: Subhi Masri @ 2021-01-27 10:37 UTC (permalink / raw)
  To: Maxime Coquelin
  Cc: dev, nd, Joyce Kong, david.marchand, honnappa.nagarahalli,
	ruifeng.wang, i.maximets

Hi,

> -----Original Message-----
> From: Maxime Coquelin <maxime.coquelin@redhat.com>
> Sent: Wednesday, January 27, 2021 10:44 AM
> To: Subhi Masri <subhim@nvidia.com>
> Cc: dev@dpdk.org; nd@arm.com; Joyce Kong <joyce.kong@arm.com>;
> 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 <subhim@nvidia.com>
> > Signed-off-by: Joyce Kong <joyce.kong@arm.com>
> > ---
> >  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 <subhim@nvidia.com>
> Thanks,
> Maxime


Regards,
Subhi Masri


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH v2] net/virtio: fix compiling issue for vectorized NEON path
  2021-01-26  9:57 ` [dpdk-dev] [PATCH v2] " Joyce Kong
  2021-01-27  5:18   ` Ruifeng Wang
  2021-01-27  8:44   ` Maxime Coquelin
@ 2021-01-27 10:43   ` Maxime Coquelin
  2021-01-27 12:01   ` Maxime Coquelin
  3 siblings, 0 replies; 9+ messages in thread
From: Maxime Coquelin @ 2021-01-27 10:43 UTC (permalink / raw)
  To: Joyce Kong, david.marchand, i.maximets, ruifeng.wang,
	honnappa.nagarahalli
  Cc: dev, nd, Subhi Masri



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 <subhim@nvidia.com>
> Signed-off-by: Joyce Kong <joyce.kong@arm.com>
> ---
>  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. */
> 

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH v2] net/virtio: fix compiling issue for vectorized NEON path
  2021-01-27 10:37     ` Subhi Masri
@ 2021-01-27 11:52       ` Maxime Coquelin
  0 siblings, 0 replies; 9+ messages in thread
From: Maxime Coquelin @ 2021-01-27 11:52 UTC (permalink / raw)
  To: Subhi Masri
  Cc: dev, nd, Joyce Kong, david.marchand, honnappa.nagarahalli,
	ruifeng.wang, i.maximets



On 1/27/21 11:37 AM, Subhi Masri wrote:
> Hi,
> 
>> -----Original Message-----
>> From: Maxime Coquelin <maxime.coquelin@redhat.com>
>> Sent: Wednesday, January 27, 2021 10:44 AM
>> To: Subhi Masri <subhim@nvidia.com>
>> Cc: dev@dpdk.org; nd@arm.com; Joyce Kong <joyce.kong@arm.com>;
>> 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 <subhim@nvidia.com>
>>> Signed-off-by: Joyce Kong <joyce.kong@arm.com>
>>> ---
>>>  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 <subhim@nvidia.com>

Thanks!
Maxime

>> Thanks,
>> Maxime
> 
> 
> Regards,
> Subhi Masri
> 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH v2] net/virtio: fix compiling issue for vectorized NEON path
  2021-01-26  9:57 ` [dpdk-dev] [PATCH v2] " Joyce Kong
                     ` (2 preceding siblings ...)
  2021-01-27 10:43   ` Maxime Coquelin
@ 2021-01-27 12:01   ` Maxime Coquelin
  3 siblings, 0 replies; 9+ messages in thread
From: Maxime Coquelin @ 2021-01-27 12:01 UTC (permalink / raw)
  To: Joyce Kong, david.marchand, i.maximets, ruifeng.wang,
	honnappa.nagarahalli
  Cc: dev, nd, Subhi Masri



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 <subhim@nvidia.com>
> Signed-off-by: Joyce Kong <joyce.kong@arm.com>
> ---
>  drivers/net/virtio/virtio_rxtx_packed_neon.h | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 

Applied to dpdk-next-virtio/main.

Thanks,
Maxime


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-01-29  9:45 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-26  9:17 [dpdk-dev] [PATCH v1] net/virtio: fix compiling issue for vectorized NEON path Joyce Kong
2021-01-26  9:25 ` [dpdk-dev] [dpdk-stable] " David Marchand
2021-01-26  9:57 ` [dpdk-dev] [PATCH v2] " Joyce Kong
2021-01-27  5:18   ` Ruifeng Wang
2021-01-27  8:44   ` Maxime Coquelin
2021-01-27 10:37     ` Subhi Masri
2021-01-27 11:52       ` Maxime Coquelin
2021-01-27 10:43   ` Maxime Coquelin
2021-01-27 12:01   ` Maxime Coquelin

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git