summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOphir Munk <ophirmu@mellanox.com>2018-11-03 15:54:45 +0000
committerFerruh Yigit <ferruh.yigit@intel.com>2018-11-05 15:01:25 +0100
commita4391f8bae85db0153e1f101c21c61151573baad (patch)
tree1b35a4b41a959e2c52ddd2e78c5ceb0af39627c6
parent892cfadd59361ebbe3f66c8a79e3b7f933aa2f60 (diff)
downloaddpdk-a4391f8bae85db0153e1f101c21c61151573baad.zip
dpdk-a4391f8bae85db0153e1f101c21c61151573baad.tar.gz
dpdk-a4391f8bae85db0153e1f101c21c61151573baad.tar.xz
app/testpmd: set default RSS key as null
When creating an RSS rule without specifying a key (see [1]) it is expected that the device will use the default key. A NULL key is used to indicate to a PMD it should use its default key, however testpmd assigns a non-NULL dummy key (see [2]) instead. This does not enable testing any PMD behavior when the RSS key is not specified. This commit fixes this limitation by setting key to NULL. [1] RSS rule example without specifying a key: flow create 0 ingress <pattern> / end actions rss queues 0 1 end / end [2] Testpmd default key assignment: .key= "testpmd's default RSS hash key, " "override it for better balancing" Signed-off-by: Ophir Munk <ophirmu@mellanox.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
-rw-r--r--app/test-pmd/cmdline_flow.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 23ea7cc..91e2e35 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -3248,26 +3248,15 @@ parse_vc_action_rss(struct context *ctx, const struct token *token,
.func = RTE_ETH_HASH_FUNCTION_DEFAULT,
.level = 0,
.types = rss_hf,
- .key_len = sizeof(action_rss_data->key),
+ .key_len = 0,
.queue_num = RTE_MIN(nb_rxq, ACTION_RSS_QUEUE_NUM),
- .key = action_rss_data->key,
+ .key = NULL,
.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;
}