aboutsummaryrefslogtreecommitdiffstats
path: root/app/test-pmd/cmdline_flow.c
diff options
context:
space:
mode:
authorLuca Boccassi <luca.boccassi@gmail.com>2018-11-14 11:13:11 +0000
committerLuca Boccassi <luca.boccassi@gmail.com>2018-11-14 11:13:28 +0000
commit8a853e3f0275efc8b05cb195085d45946942744a (patch)
treef7b349012231726c54fedd6c19f9cbf8234a4458 /app/test-pmd/cmdline_flow.c
parent88fab00d4402af240c1b7cc2566133aece115488 (diff)
New upstream version 18.11-rc3upstream/18.11-rc3
Change-Id: I958b9d019027ef049bd992b3968a667f3ae382ae Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
Diffstat (limited to 'app/test-pmd/cmdline_flow.c')
-rw-r--r--app/test-pmd/cmdline_flow.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 91e2e350..23ea7cc8 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -3248,15 +3248,26 @@ parse_vc_action_rss(struct context *ctx, const struct token *token,
.func = RTE_ETH_HASH_FUNCTION_DEFAULT,
.level = 0,
.types = rss_hf,
- .key_len = 0,
+ .key_len = sizeof(action_rss_data->key),
.queue_num = RTE_MIN(nb_rxq, ACTION_RSS_QUEUE_NUM),
- .key = NULL,
+ .key = action_rss_data->key,
.queue = action_rss_data->queue,
},
+ .key = "testpmd's default RSS hash key, "
+ "override it for better balancing",
.queue = { 0 },
};
for (i = 0; i < action_rss_data->conf.queue_num; ++i)
action_rss_data->queue[i] = i;
+ if (!port_id_is_invalid(ctx->port, DISABLED_WARN) &&
+ ctx->port != (portid_t)RTE_PORT_ALL) {
+ struct rte_eth_dev_info info;
+
+ rte_eth_dev_info_get(ctx->port, &info);
+ action_rss_data->conf.key_len =
+ RTE_MIN(sizeof(action_rss_data->key),
+ info.hash_key_size);
+ }
action->conf = &action_rss_data->conf;
return ret;
}