From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id 5602A9605 for ; Thu, 26 Apr 2018 18:49:19 +0200 (CEST) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (webmail.solarflare.com [12.187.104.26]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1-us1.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTPS id 3F58914005C for ; Thu, 26 Apr 2018 16:49:18 +0000 (UTC) Received: from sfocexch01r.SolarFlarecom.com (10.20.40.34) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Thu, 26 Apr 2018 09:49:05 -0700 Received: from ocex03.SolarFlarecom.com (10.20.40.36) by sfocexch01r.SolarFlarecom.com (10.20.40.34) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Thu, 26 Apr 2018 09:49:03 -0700 Received: from opal.uk.solarflarecom.com (10.17.10.1) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1044.25 via Frontend Transport; Thu, 26 Apr 2018 09:49:03 -0700 Received: from uklogin.uk.solarflarecom.com (uklogin.uk.solarflarecom.com [10.17.10.10]) by opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id w3QGn2dK004561 for ; Thu, 26 Apr 2018 17:49:02 +0100 Received: from uklogin.uk.solarflarecom.com (localhost.localdomain [127.0.0.1]) by uklogin.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id w3QGn2bd032371 for ; Thu, 26 Apr 2018 17:49:02 +0100 From: Andrew Rybchenko To: Date: Thu, 26 Apr 2018 17:48:57 +0100 Message-ID: <1524761337-32313-1-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.2.3 MIME-Version: 1.0 Content-Type: text/plain X-MDID: 1524761358-UiSH2jisLtre Subject: [dpdk-dev] [PATCH] net/sfc: do not use RSS context if it is not required X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2018 16:49:19 -0000 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 41b5987b2..b7e54d77f 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.14.1