DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v2] app/testpmd: fix setting RSS queue rule failure on fedora30
@ 2019-06-25 10:38 Haiyue Wang
  2019-07-02 13:00 ` Ye Xiaolong
  0 siblings, 1 reply; 5+ messages in thread
From: Haiyue Wang @ 2019-06-25 10:38 UTC (permalink / raw)
  To: dev; +Cc: Haiyue Wang, stable

Declare a local variable 'arg' to hold the pointer to ARGS_ENTRY_ARB,
otherwise, the pop 'arg' in 'parse_int' holds wrong data like 'arg->
offset = 5912737, arg->size = 0', this caused the parse failure.

If calling like 'push_args(ctx, ARGS_ENTRY_ARB..)', the below code for
assgining 'offset & size' will be missed for some gcc optimization.

parse_vc_action_rss_queue
    29c5:	c5 f9 ef c0          	vpxor  %xmm0,%xmm0,%xmm0
    29c9:	43 8d 44 24 68       	lea    0x68(%r12,%r12,1),%eax
    29ce:	48 c7 44 24 20 00 00 	movq   $0x0,0x20(%rsp)
    29d5:	00 00
    29d7:	c5 f8 29 44 24 10    	vmovaps %xmm0,0x10(%rsp)
    29dd:	89 44 24 18          	mov    %eax,0x18(%rsp)
    29e1:	48 63 83 0c 01 00 00 	movslq 0x10c(%rbx),%rax
    29e8:	c7 44 24 1c 02 00 00 	movl   $0x2,0x1c(%rsp)
    29ef:	00
    29f0:	c5 f8 29 04 24       	vmovaps %xmm0,(%rsp)

The above assembly code is from this modification with:
    gcc version 9.1.1 20190503 (Red Hat 9.1.1-1) (GCC)
    Fedora release 30 (Thirty)
    5.1.11-300.fc30.x86_64

Fixes: d0ad8648b1c5 ("app/testpmd: fix RSS flow action configuration")
Cc: stable@dpdk.org

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
---
 app/test-pmd/cmdline_flow.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 201bd9d..4a083d4 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -3378,6 +3378,7 @@ parse_vc_action_rss_queue(struct context *ctx, const struct token *token,
 {
 	static const enum index next[] = NEXT_ENTRY(ACTION_RSS_QUEUE);
 	struct action_rss_data *action_rss_data;
+	const struct arg *arg;
 	int ret;
 	int i;
 
@@ -3393,10 +3394,10 @@ parse_vc_action_rss_queue(struct context *ctx, const struct token *token,
 	}
 	if (i >= ACTION_RSS_QUEUE_NUM)
 		return -1;
-	if (push_args(ctx,
-		      ARGS_ENTRY_ARB(offsetof(struct action_rss_data, queue) +
-				     i * sizeof(action_rss_data->queue[i]),
-				     sizeof(action_rss_data->queue[i]))))
+	arg = ARGS_ENTRY_ARB(offsetof(struct action_rss_data, queue) +
+			     i * sizeof(action_rss_data->queue[i]),
+			     sizeof(action_rss_data->queue[i]));
+	if (push_args(ctx, arg))
 		return -1;
 	ret = parse_int(ctx, token, str, len, NULL, 0);
 	if (ret < 0) {
-- 
2.7.4


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

* Re: [dpdk-dev] [PATCH v2] app/testpmd: fix setting RSS queue rule failure on fedora30
  2019-07-02 13:00 ` Ye Xiaolong
@ 2019-07-02  6:21   ` Wang, Haiyue
  2019-07-03 15:23     ` Iremonger, Bernard
  0 siblings, 1 reply; 5+ messages in thread
From: Wang, Haiyue @ 2019-07-02  6:21 UTC (permalink / raw)
  To: Ye, Xiaolong; +Cc: dev, stable

Hi

> -----Original Message-----
> From: Ye, Xiaolong
> Sent: Tuesday, July 2, 2019 21:01
> To: Wang, Haiyue <haiyue.wang@intel.com>
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v2] app/testpmd: fix setting RSS queue rule failure on fedora30
> 
> On 06/25, Haiyue Wang wrote:
> >Declare a local variable 'arg' to hold the pointer to ARGS_ENTRY_ARB,
> >otherwise, the pop 'arg' in 'parse_int' holds wrong data like 'arg->
> >offset = 5912737, arg->size = 0', this caused the parse failure.
> >
> >If calling like 'push_args(ctx, ARGS_ENTRY_ARB..)', the below code for
> >assgining 'offset & size' will be missed for some gcc optimization.
> >
> >parse_vc_action_rss_queue
> >    29c5:	c5 f9 ef c0          	vpxor  %xmm0,%xmm0,%xmm0
> >    29c9:	43 8d 44 24 68       	lea    0x68(%r12,%r12,1),%eax
> >    29ce:	48 c7 44 24 20 00 00 	movq   $0x0,0x20(%rsp)
> >    29d5:	00 00
> >    29d7:	c5 f8 29 44 24 10    	vmovaps %xmm0,0x10(%rsp)
> >    29dd:	89 44 24 18          	mov    %eax,0x18(%rsp)
> >    29e1:	48 63 83 0c 01 00 00 	movslq 0x10c(%rbx),%rax
> >    29e8:	c7 44 24 1c 02 00 00 	movl   $0x2,0x1c(%rsp)
> >    29ef:	00
> >    29f0:	c5 f8 29 04 24       	vmovaps %xmm0,(%rsp)
> >
> >The above assembly code is from this modification with:
> >    gcc version 9.1.1 20190503 (Red Hat 9.1.1-1) (GCC)
> >    Fedora release 30 (Thirty)
> >    5.1.11-300.fc30.x86_64
> 
> Do you mean without your patch, the above assembly code (for assgining offset & size)
> is missing, after apply this patch, it would show up?
> 
Yes.
> >
> >Fixes: d0ad8648b1c5 ("app/testpmd: fix RSS flow action configuration")
> >Cc: stable@dpdk.org
> >
> >Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
> >---
> 
> Minor nit, better to reply the v2 to v1 and add some changelog after the `---`
> mark.
Got it, will notice next time, thanks!
> 
> > app/test-pmd/cmdline_flow.c | 9 +++++----
> > 1 file changed, 5 insertions(+), 4 deletions(-)
> >
> >diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
> >index 201bd9d..4a083d4 100644
> >--- a/app/test-pmd/cmdline_flow.c
> >+++ b/app/test-pmd/cmdline_flow.c
> >@@ -3378,6 +3378,7 @@ parse_vc_action_rss_queue(struct context *ctx, const struct token *token,
> > {
> > 	static const enum index next[] = NEXT_ENTRY(ACTION_RSS_QUEUE);
> > 	struct action_rss_data *action_rss_data;
> >+	const struct arg *arg;
> > 	int ret;
> > 	int i;
> >
> >@@ -3393,10 +3394,10 @@ parse_vc_action_rss_queue(struct context *ctx, const struct token *token,
> > 	}
> > 	if (i >= ACTION_RSS_QUEUE_NUM)
> > 		return -1;
> >-	if (push_args(ctx,
> >-		      ARGS_ENTRY_ARB(offsetof(struct action_rss_data, queue) +
> >-				     i * sizeof(action_rss_data->queue[i]),
> >-				     sizeof(action_rss_data->queue[i]))))
> >+	arg = ARGS_ENTRY_ARB(offsetof(struct action_rss_data, queue) +
> >+			     i * sizeof(action_rss_data->queue[i]),
> >+			     sizeof(action_rss_data->queue[i]));
> >+	if (push_args(ctx, arg))
> > 		return -1;
> > 	ret = parse_int(ctx, token, str, len, NULL, 0);
> > 	if (ret < 0) {
> 
> For the patch, Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
> 
> Thanks,
> Xiaolong
> 
> >--
> >2.7.4
> >

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

* Re: [dpdk-dev] [PATCH v2] app/testpmd: fix setting RSS queue rule failure on fedora30
  2019-06-25 10:38 [dpdk-dev] [PATCH v2] app/testpmd: fix setting RSS queue rule failure on fedora30 Haiyue Wang
@ 2019-07-02 13:00 ` Ye Xiaolong
  2019-07-02  6:21   ` Wang, Haiyue
  0 siblings, 1 reply; 5+ messages in thread
From: Ye Xiaolong @ 2019-07-02 13:00 UTC (permalink / raw)
  To: Haiyue Wang; +Cc: dev, stable

On 06/25, Haiyue Wang wrote:
>Declare a local variable 'arg' to hold the pointer to ARGS_ENTRY_ARB,
>otherwise, the pop 'arg' in 'parse_int' holds wrong data like 'arg->
>offset = 5912737, arg->size = 0', this caused the parse failure.
>
>If calling like 'push_args(ctx, ARGS_ENTRY_ARB..)', the below code for
>assgining 'offset & size' will be missed for some gcc optimization.
>
>parse_vc_action_rss_queue
>    29c5:	c5 f9 ef c0          	vpxor  %xmm0,%xmm0,%xmm0
>    29c9:	43 8d 44 24 68       	lea    0x68(%r12,%r12,1),%eax
>    29ce:	48 c7 44 24 20 00 00 	movq   $0x0,0x20(%rsp)
>    29d5:	00 00
>    29d7:	c5 f8 29 44 24 10    	vmovaps %xmm0,0x10(%rsp)
>    29dd:	89 44 24 18          	mov    %eax,0x18(%rsp)
>    29e1:	48 63 83 0c 01 00 00 	movslq 0x10c(%rbx),%rax
>    29e8:	c7 44 24 1c 02 00 00 	movl   $0x2,0x1c(%rsp)
>    29ef:	00
>    29f0:	c5 f8 29 04 24       	vmovaps %xmm0,(%rsp)
>
>The above assembly code is from this modification with:
>    gcc version 9.1.1 20190503 (Red Hat 9.1.1-1) (GCC)
>    Fedora release 30 (Thirty)
>    5.1.11-300.fc30.x86_64

Do you mean without your patch, the above assembly code (for assgining offset & size)
is missing, after apply this patch, it would show up?

>
>Fixes: d0ad8648b1c5 ("app/testpmd: fix RSS flow action configuration")
>Cc: stable@dpdk.org
>
>Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
>---

Minor nit, better to reply the v2 to v1 and add some changelog after the `---`
mark.

> app/test-pmd/cmdline_flow.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
>diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
>index 201bd9d..4a083d4 100644
>--- a/app/test-pmd/cmdline_flow.c
>+++ b/app/test-pmd/cmdline_flow.c
>@@ -3378,6 +3378,7 @@ parse_vc_action_rss_queue(struct context *ctx, const struct token *token,
> {
> 	static const enum index next[] = NEXT_ENTRY(ACTION_RSS_QUEUE);
> 	struct action_rss_data *action_rss_data;
>+	const struct arg *arg;
> 	int ret;
> 	int i;
> 
>@@ -3393,10 +3394,10 @@ parse_vc_action_rss_queue(struct context *ctx, const struct token *token,
> 	}
> 	if (i >= ACTION_RSS_QUEUE_NUM)
> 		return -1;
>-	if (push_args(ctx,
>-		      ARGS_ENTRY_ARB(offsetof(struct action_rss_data, queue) +
>-				     i * sizeof(action_rss_data->queue[i]),
>-				     sizeof(action_rss_data->queue[i]))))
>+	arg = ARGS_ENTRY_ARB(offsetof(struct action_rss_data, queue) +
>+			     i * sizeof(action_rss_data->queue[i]),
>+			     sizeof(action_rss_data->queue[i]));
>+	if (push_args(ctx, arg))
> 		return -1;
> 	ret = parse_int(ctx, token, str, len, NULL, 0);
> 	if (ret < 0) {

For the patch, Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>

Thanks,
Xiaolong

>-- 
>2.7.4
>

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

* Re: [dpdk-dev] [PATCH v2] app/testpmd: fix setting RSS queue rule failure on fedora30
  2019-07-02  6:21   ` Wang, Haiyue
@ 2019-07-03 15:23     ` Iremonger, Bernard
  2019-07-04 23:01       ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
  0 siblings, 1 reply; 5+ messages in thread
From: Iremonger, Bernard @ 2019-07-03 15:23 UTC (permalink / raw)
  To: Wang, Haiyue, Ye, Xiaolong; +Cc: dev, stable


<snip>
> > Subject: Re: [dpdk-dev] [PATCH v2] app/testpmd: fix setting RSS queue
> > rule failure on fedora30
> >
> > On 06/25, Haiyue Wang wrote:
> > >Declare a local variable 'arg' to hold the pointer to ARGS_ENTRY_ARB,
> > >otherwise, the pop 'arg' in 'parse_int' holds wrong data like 'arg->
> > >offset = 5912737, arg->size = 0', this caused the parse failure.
> > >
> > >If calling like 'push_args(ctx, ARGS_ENTRY_ARB..)', the below code
> > >for assgining 'offset & size' will be missed for some gcc optimization.
> > >
> > >parse_vc_action_rss_queue
> > >    29c5:	c5 f9 ef c0          	vpxor  %xmm0,%xmm0,%xmm0
> > >    29c9:	43 8d 44 24 68       	lea    0x68(%r12,%r12,1),%eax
> > >    29ce:	48 c7 44 24 20 00 00 	movq   $0x0,0x20(%rsp)
> > >    29d5:	00 00
> > >    29d7:	c5 f8 29 44 24 10    	vmovaps %xmm0,0x10(%rsp)
> > >    29dd:	89 44 24 18          	mov    %eax,0x18(%rsp)
> > >    29e1:	48 63 83 0c 01 00 00 	movslq 0x10c(%rbx),%rax
> > >    29e8:	c7 44 24 1c 02 00 00 	movl   $0x2,0x1c(%rsp)
> > >    29ef:	00
> > >    29f0:	c5 f8 29 04 24       	vmovaps %xmm0,(%rsp)
> > >
> > >The above assembly code is from this modification with:
> > >    gcc version 9.1.1 20190503 (Red Hat 9.1.1-1) (GCC)
> > >    Fedora release 30 (Thirty)
> > >    5.1.11-300.fc30.x86_64
> >
> > Do you mean without your patch, the above assembly code (for assgining
> > offset & size) is missing, after apply this patch, it would show up?
> >
> Yes.
> > >
> > >Fixes: d0ad8648b1c5 ("app/testpmd: fix RSS flow action
> > >configuration")
> > >Cc: stable@dpdk.org
> > >
> > >Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
<snip>

Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Bernard Iremonge <bernard.iremonger@intel.com>

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

* Re: [dpdk-dev] [dpdk-stable] [PATCH v2] app/testpmd: fix setting RSS queue rule failure on fedora30
  2019-07-03 15:23     ` Iremonger, Bernard
@ 2019-07-04 23:01       ` Ferruh Yigit
  0 siblings, 0 replies; 5+ messages in thread
From: Ferruh Yigit @ 2019-07-04 23:01 UTC (permalink / raw)
  To: Iremonger, Bernard, Wang, Haiyue, Ye, Xiaolong; +Cc: dev, stable

On 7/3/2019 4:23 PM, Iremonger, Bernard wrote:
> 
> <snip>
>>> Subject: Re: [dpdk-dev] [PATCH v2] app/testpmd: fix setting RSS queue
>>> rule failure on fedora30
>>>
>>> On 06/25, Haiyue Wang wrote:
>>>> Declare a local variable 'arg' to hold the pointer to ARGS_ENTRY_ARB,
>>>> otherwise, the pop 'arg' in 'parse_int' holds wrong data like 'arg->
>>>> offset = 5912737, arg->size = 0', this caused the parse failure.
>>>>
>>>> If calling like 'push_args(ctx, ARGS_ENTRY_ARB..)', the below code
>>>> for assgining 'offset & size' will be missed for some gcc optimization.
>>>>
>>>> parse_vc_action_rss_queue
>>>>    29c5:	c5 f9 ef c0          	vpxor  %xmm0,%xmm0,%xmm0
>>>>    29c9:	43 8d 44 24 68       	lea    0x68(%r12,%r12,1),%eax
>>>>    29ce:	48 c7 44 24 20 00 00 	movq   $0x0,0x20(%rsp)
>>>>    29d5:	00 00
>>>>    29d7:	c5 f8 29 44 24 10    	vmovaps %xmm0,0x10(%rsp)
>>>>    29dd:	89 44 24 18          	mov    %eax,0x18(%rsp)
>>>>    29e1:	48 63 83 0c 01 00 00 	movslq 0x10c(%rbx),%rax
>>>>    29e8:	c7 44 24 1c 02 00 00 	movl   $0x2,0x1c(%rsp)
>>>>    29ef:	00
>>>>    29f0:	c5 f8 29 04 24       	vmovaps %xmm0,(%rsp)
>>>>
>>>> The above assembly code is from this modification with:
>>>>    gcc version 9.1.1 20190503 (Red Hat 9.1.1-1) (GCC)
>>>>    Fedora release 30 (Thirty)
>>>>    5.1.11-300.fc30.x86_64
>>>
>>> Do you mean without your patch, the above assembly code (for assgining
>>> offset & size) is missing, after apply this patch, it would show up?
>>>
>> Yes.
>>>>
>>>> Fixes: d0ad8648b1c5 ("app/testpmd: fix RSS flow action
>>>> configuration")
>>>> Cc: stable@dpdk.org
>>>>
>>>> Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
> <snip>
> 
> Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
> Acked-by: Bernard Iremonge <bernard.iremonger@intel.com>
> 

Applied to dpdk-next-net/master, thanks.

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

end of thread, other threads:[~2019-07-04 23:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-25 10:38 [dpdk-dev] [PATCH v2] app/testpmd: fix setting RSS queue rule failure on fedora30 Haiyue Wang
2019-07-02 13:00 ` Ye Xiaolong
2019-07-02  6:21   ` Wang, Haiyue
2019-07-03 15:23     ` Iremonger, Bernard
2019-07-04 23:01       ` [dpdk-dev] [dpdk-stable] " 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).