net/sfc: do not use RSS context if it is not required

RSS action with only one destination queue and no specific settings
for hash types and key does not require dedicated RSS context and
may be simplified to QUEUE action.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
This commit is contained in:
Andrew Rybchenko 2018-04-26 17:48:57 +01:00 committed by Ferruh Yigit
parent ead63dd318
commit 3cefef5491

View File

@ -1295,6 +1295,17 @@ sfc_flow_parse_rss(struct sfc_adapter *sa,
if (action_rss->level)
return -EINVAL;
/*
* Dummy RSS action with only one queue and no specific settings
* for hash types and key does not require dedicated RSS context
* and may be simplified to single queue action.
*/
if (action_rss->queue_num == 1 && action_rss->types == 0 &&
action_rss->key_len == 0) {
flow->spec.template.efs_dmaq_id = rxq_hw_index_min;
return 0;
}
if (action_rss->types) {
int rc;