From 3cefef5491fb4007e0efdceed770d8f64fb723ee Mon Sep 17 00:00:00 2001 From: Andrew Rybchenko Date: Thu, 26 Apr 2018 17:48:57 +0100 Subject: [PATCH] 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 Reviewed-by: Roman Zhukov --- drivers/net/sfc/sfc_flow.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/net/sfc/sfc_flow.c b/drivers/net/sfc/sfc_flow.c index 41b5987b2e..b7e54d77f7 100644 --- a/drivers/net/sfc/sfc_flow.c +++ b/drivers/net/sfc/sfc_flow.c @@ -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; -- 2.20.1