* [dpdk-dev] [PATCH v2] examples/l3fwd: fix NEON instructions
@ 2017-10-30 7:31 Guduri Prathyusha
2017-10-30 7:36 ` Jianbo Liu
0 siblings, 1 reply; 4+ messages in thread
From: Guduri Prathyusha @ 2017-10-30 7:31 UTC (permalink / raw)
To: tomasz.kantecki; +Cc: Jianbo.Liu, guduriprathyusha, dev, Guduri Prathyusha
To group consecutive packets with same destination port in bursts of 4
neon intrinsic data types dp1 and dp2 are calculated such that if
dst_port[]={a,b,c,d,e,f,g,h,i...} dp1 should contain: <a,b,c,d> and
dp2 should contain: <b,c,d,e> in the first iteration. dp1 should
be <e,f,g,h> and dp2 should be <f,g,h,i> in the next iteration.
Whereas the existing code incorrectly calculates dp1 as <d,e,f,g> from
second iteration.
This patch fixes the incorrect ARM NEON instructions on dp1.
Fixes: 569b290cdb36 ("examples/l3fwd: add NEON implementation")
Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
---
v2:
* fix as suggested by Jianbo Liu
---
examples/l3fwd/l3fwd_neon.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/l3fwd/l3fwd_neon.h b/examples/l3fwd/l3fwd_neon.h
index 42d50d3c2..4bc161394 100644
--- a/examples/l3fwd/l3fwd_neon.h
+++ b/examples/l3fwd/l3fwd_neon.h
@@ -192,7 +192,7 @@ send_packets_multi(struct lcore_conf *qconf, struct rte_mbuf **pkts_burst,
* dp1:
* <d[j], d[j+1], d[j+2], d[j+3], ... >
*/
- dp1 = vextq_u16(dp1, dp1, FWDSTEP - 1);
+ dp1 = vextq_u16(dp2, dp1, FWDSTEP - 1);
}
/*
--
2.14.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH v2] examples/l3fwd: fix NEON instructions
2017-10-30 7:31 [dpdk-dev] [PATCH v2] examples/l3fwd: fix NEON instructions Guduri Prathyusha
@ 2017-10-30 7:36 ` Jianbo Liu
2017-11-02 10:33 ` Jerin Jacob
0 siblings, 1 reply; 4+ messages in thread
From: Jianbo Liu @ 2017-10-30 7:36 UTC (permalink / raw)
To: Guduri Prathyusha; +Cc: tomasz.kantecki, guduriprathyusha, dev
The 10/30/2017 13:01, Guduri Prathyusha wrote:
> To group consecutive packets with same destination port in bursts of 4
> neon intrinsic data types dp1 and dp2 are calculated such that if
> dst_port[]={a,b,c,d,e,f,g,h,i...} dp1 should contain: <a,b,c,d> and
> dp2 should contain: <b,c,d,e> in the first iteration. dp1 should
> be <e,f,g,h> and dp2 should be <f,g,h,i> in the next iteration.
>
> Whereas the existing code incorrectly calculates dp1 as <d,e,f,g> from
> second iteration.
>
> This patch fixes the incorrect ARM NEON instructions on dp1.
>
> Fixes: 569b290cdb36 ("examples/l3fwd: add NEON implementation")
>
> Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
Acked-by: Jianbo Liu <jianbo.liu@arm.com>
> ---
>
> v2:
>
> * fix as suggested by Jianbo Liu
> ---
> examples/l3fwd/l3fwd_neon.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/examples/l3fwd/l3fwd_neon.h b/examples/l3fwd/l3fwd_neon.h
> index 42d50d3c2..4bc161394 100644
> --- a/examples/l3fwd/l3fwd_neon.h
> +++ b/examples/l3fwd/l3fwd_neon.h
> @@ -192,7 +192,7 @@ send_packets_multi(struct lcore_conf *qconf, struct rte_mbuf **pkts_burst,
> * dp1:
> * <d[j], d[j+1], d[j+2], d[j+3], ... >
> */
> - dp1 = vextq_u16(dp1, dp1, FWDSTEP - 1);
> + dp1 = vextq_u16(dp2, dp1, FWDSTEP - 1);
> }
>
> /*
> --
> 2.14.1
>
--
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH v2] examples/l3fwd: fix NEON instructions
2017-10-30 7:36 ` Jianbo Liu
@ 2017-11-02 10:33 ` Jerin Jacob
2017-11-07 8:05 ` Ferruh Yigit
0 siblings, 1 reply; 4+ messages in thread
From: Jerin Jacob @ 2017-11-02 10:33 UTC (permalink / raw)
To: Jianbo Liu
Cc: Guduri Prathyusha, tomasz.kantecki, guduriprathyusha, dev, thomas
-----Original Message-----
> Date: Mon, 30 Oct 2017 15:36:15 +0800
> From: Jianbo Liu <Jianbo.Liu@arm.com>
> To: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
> CC: tomasz.kantecki@intel.com, guduriprathyusha@gmail.com, dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v2] examples/l3fwd: fix NEON instructions
> User-Agent: Mutt/1.5.21 (2010-09-15)
>
> The 10/30/2017 13:01, Guduri Prathyusha wrote:
> > To group consecutive packets with same destination port in bursts of 4
> > neon intrinsic data types dp1 and dp2 are calculated such that if
> > dst_port[]={a,b,c,d,e,f,g,h,i...} dp1 should contain: <a,b,c,d> and
> > dp2 should contain: <b,c,d,e> in the first iteration. dp1 should
> > be <e,f,g,h> and dp2 should be <f,g,h,i> in the next iteration.
> >
> > Whereas the existing code incorrectly calculates dp1 as <d,e,f,g> from
> > second iteration.
> >
> > This patch fixes the incorrect ARM NEON instructions on dp1.
> >
> > Fixes: 569b290cdb36 ("examples/l3fwd: add NEON implementation")
> >
> > Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
>
> Acked-by: Jianbo Liu <jianbo.liu@arm.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Cc: Thomas Monjalon <thomas@monjalon.net> to add this patch in RC3
>
> > ---
> >
> > v2:
> >
> > * fix as suggested by Jianbo Liu
> > ---
> > examples/l3fwd/l3fwd_neon.h | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/examples/l3fwd/l3fwd_neon.h b/examples/l3fwd/l3fwd_neon.h
> > index 42d50d3c2..4bc161394 100644
> > --- a/examples/l3fwd/l3fwd_neon.h
> > +++ b/examples/l3fwd/l3fwd_neon.h
> > @@ -192,7 +192,7 @@ send_packets_multi(struct lcore_conf *qconf, struct rte_mbuf **pkts_burst,
> > * dp1:
> > * <d[j], d[j+1], d[j+2], d[j+3], ... >
> > */
> > - dp1 = vextq_u16(dp1, dp1, FWDSTEP - 1);
> > + dp1 = vextq_u16(dp2, dp1, FWDSTEP - 1);
> > }
> >
> > /*
> > --
> > 2.14.1
> >
>
> --
> IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH v2] examples/l3fwd: fix NEON instructions
2017-11-02 10:33 ` Jerin Jacob
@ 2017-11-07 8:05 ` Ferruh Yigit
0 siblings, 0 replies; 4+ messages in thread
From: Ferruh Yigit @ 2017-11-07 8:05 UTC (permalink / raw)
To: Jerin Jacob, Jianbo Liu
Cc: Guduri Prathyusha, tomasz.kantecki, guduriprathyusha, dev, thomas
On 11/2/2017 3:33 AM, Jerin Jacob wrote:
> -----Original Message-----
>> Date: Mon, 30 Oct 2017 15:36:15 +0800
>> From: Jianbo Liu <Jianbo.Liu@arm.com>
>> To: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
>> CC: tomasz.kantecki@intel.com, guduriprathyusha@gmail.com, dev@dpdk.org
>> Subject: Re: [dpdk-dev] [PATCH v2] examples/l3fwd: fix NEON instructions
>> User-Agent: Mutt/1.5.21 (2010-09-15)
>>
>> The 10/30/2017 13:01, Guduri Prathyusha wrote:
>>> To group consecutive packets with same destination port in bursts of 4
>>> neon intrinsic data types dp1 and dp2 are calculated such that if
>>> dst_port[]={a,b,c,d,e,f,g,h,i...} dp1 should contain: <a,b,c,d> and
>>> dp2 should contain: <b,c,d,e> in the first iteration. dp1 should
>>> be <e,f,g,h> and dp2 should be <f,g,h,i> in the next iteration.
>>>
>>> Whereas the existing code incorrectly calculates dp1 as <d,e,f,g> from
>>> second iteration.
>>>
>>> This patch fixes the incorrect ARM NEON instructions on dp1.
>>>
>>> Fixes: 569b290cdb36 ("examples/l3fwd: add NEON implementation")
>>>
>>> Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
>>
>> Acked-by: Jianbo Liu <jianbo.liu@arm.com>
>
> Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Applied to dpdk/master, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-11-07 8:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-30 7:31 [dpdk-dev] [PATCH v2] examples/l3fwd: fix NEON instructions Guduri Prathyusha
2017-10-30 7:36 ` Jianbo Liu
2017-11-02 10:33 ` Jerin Jacob
2017-11-07 8:05 ` Ferruh Yigit
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).