[dpdk-dev,1/2] app/testpmd: fix empty list of RSS queues for flow

Message ID 20180503115818.19744-1-adrien.mazarguil@6wind.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Adrien Mazarguil May 3, 2018, 11:59 a.m. UTC
  Since the commit referenced below, specifying a RSS action without any
queues (e.g. "actions rss queues end / end") does not override the default
set automatically generated by testpmd.

In short, one cannot instantiate a RSS action with 0 target queues anymore
in order to determine how PMDs react (hint: this is currently undocumented
so they may reject it, however ideally they should interpret it as a
default setting like for other fields where empty values stand for
"defaults".)

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

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
 app/test-pmd/cmdline_flow.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Comments

Ferruh Yigit May 9, 2018, 7:17 p.m. UTC | #1
On 5/3/2018 12:59 PM, Adrien Mazarguil wrote:
> Since the commit referenced below, specifying a RSS action without any
> queues (e.g. "actions rss queues end / end") does not override the default
> set automatically generated by testpmd.
> 
> In short, one cannot instantiate a RSS action with 0 target queues anymore
> in order to determine how PMDs react (hint: this is currently undocumented
> so they may reject it, however ideally they should interpret it as a
> default setting like for other fields where empty values stand for
> "defaults".)
> 
> Fixes: d0ad8648b1c5 ("app/testpmd: fix RSS flow action configuration")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>

For series,
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
  
Ferruh Yigit May 9, 2018, 9:14 p.m. UTC | #2
On 5/9/2018 8:17 PM, Ferruh Yigit wrote:
> On 5/3/2018 12:59 PM, Adrien Mazarguil wrote:
>> Since the commit referenced below, specifying a RSS action without any
>> queues (e.g. "actions rss queues end / end") does not override the default
>> set automatically generated by testpmd.
>>
>> In short, one cannot instantiate a RSS action with 0 target queues anymore
>> in order to determine how PMDs react (hint: this is currently undocumented
>> so they may reject it, however ideally they should interpret it as a
>> default setting like for other fields where empty values stand for
>> "defaults".)
>>
>> Fixes: d0ad8648b1c5 ("app/testpmd: fix RSS flow action configuration")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
> 
> For series,
> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

Series applied to dpdk-next-net/master, thanks.
  

Patch

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 5754e7858..f4ea0a5cf 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -2896,7 +2896,7 @@  parse_vc_action_rss_queue(struct context *ctx, const struct token *token,
 	i = ctx->objdata >> 16;
 	if (!strcmp_partial("end", str, len)) {
 		ctx->objdata &= 0xffff;
-		return len;
+		goto end;
 	}
 	if (i >= ACTION_RSS_QUEUE_NUM)
 		return -1;
@@ -2916,6 +2916,7 @@  parse_vc_action_rss_queue(struct context *ctx, const struct token *token,
 	if (ctx->next_num == RTE_DIM(ctx->next))
 		return -1;
 	ctx->next[ctx->next_num++] = next;
+end:
 	if (!ctx->object)
 		return len;
 	action_rss_data = ctx->object;