Skip to contentSkip to conversation

app/testpmd: fix setting RSS queue rule failure on fedora30

PATCH Applied Haiyue Wang 4 participants 5 messages Jun 25, 2019 – Jul 4, 2019

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 app/testpmd: fix setting RSS queue rule failure on fedora30

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")
---
 app/test-pmd/cmdline_flow.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
app/test-pmd/cmdline_flow.c +5 -4
index 201bd9d..4a083d4 100644
@@ -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) {
Signature · 1 line
2.7.4
#1 lore raw
Quoted 19 lines · Haiyue Wang

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)

Quoted 4 lines

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?

Quoted 6 lines
Fixes d0ad8648b1c5 ("app/testpmd: fix RSS flow action configuration")

---

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

Quoted 20 lines

app/test-pmd/cmdline_flow.c | 9 +++++----

1 file changed, 5 insertions(+), 4 deletions(-)
app/test-pmd/cmdline_flow.c +1 -1
index 201bd9d..4a083d4 100644
@@ -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,

app/test-pmd/cmdline_flow.c parse_vc_action_rss_queue(struct context *ctx, const struct token *token, · line 3403

Quoted 10 lines
app/test-pmd/cmdline_flow.c +4 -3
-		      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 <[email protected]>

Thanks,
Xiaolong

Quoted 3 lines
Signature · 1 line
2.7.4
#2 lore raw

Hi

Quoted 27 lines

-----Original Message-----
From: Ye, Xiaolong
Sent: Tuesday, July 2, 2019 21:01
To: Wang, Haiyue <[email protected]>
Cc: [email protected]; [email protected]
Subject: Re: [dpdk-dev] [PATCH v2] app/testpmd: fix setting RSS queue rule failure on fedora30

Quoted 19 lines · Haiyue Wang

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)

Quoted 8 lines
Quoted 4 lines

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.

Quoted 9 lines
Quoted 6 lines
Fixes d0ad8648b1c5 ("app/testpmd: fix RSS flow action configuration")

---

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

Got it, will notice next time, thanks!

Quoted 40 lines
Quoted 21 lines

app/test-pmd/cmdline_flow.c | 9 +++++----

1 file changed, 5 insertions(+), 4 deletions(-)
app/test-pmd/cmdline_flow.c +1 -1
index 201bd9d..4a083d4 100644
@@ -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,

app/test-pmd/cmdline_flow.c parse_vc_action_rss_queue(struct context *ctx, const struct token *token, · line 3403

Quoted 10 lines
app/test-pmd/cmdline_flow.c +4 -3
-		      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 <[email protected]>

Thanks,
Xiaolong

Quoted 3 lines

--
2.7.4

Reviewed-by Xiaolong Ye Acked-by
#3 lore raw

<snip>

Quoted 38 lines
Quoted 23 lines

Subject: Re: [dpdk-dev] [PATCH v2] app/testpmd: fix setting RSS queue rule failure on fedora30

Quoted 19 lines · Haiyue Wang

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)

Quoted 8 lines
Quoted 4 lines

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.

Quoted 6 lines
Quoted 6 lines
Fixes d0ad8648b1c5 ("app/testpmd: fix RSS flow action

configuration")
Cc: [email protected]

<snip>

Applied
#4 lore raw
Quoted 39 lines · Bernard

<snip>

Quoted 37 lines
Quoted 23 lines

Subject: Re: [dpdk-dev] [PATCH v2] app/testpmd: fix setting RSS queue rule failure on fedora30

Quoted 19 lines · Haiyue Wang

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)

Quoted 8 lines
Quoted 4 lines

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.

Quoted 5 lines
Quoted 5 lines
Fixes d0ad8648b1c5 ("app/testpmd: fix RSS flow action

configuration")
Cc: [email protected]

Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

<snip>

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