From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id BD87BA00C5; Tue, 1 Feb 2022 09:50:18 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ADAC941C3D; Tue, 1 Feb 2022 09:50:09 +0100 (CET) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 704F140698 for ; Tue, 1 Feb 2022 09:50:06 +0100 (CET) Received: from bree.oktetlabs.ru (bree.oktetlabs.ru [192.168.34.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPS id 0E53042; Tue, 1 Feb 2022 11:50:06 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 0E53042 Authentication-Results: shelob.oktetlabs.ru/0E53042; dkim=none; dkim-atps=neutral From: Ivan Malov To: dev@dpdk.org Cc: Andrew Rybchenko , Andy Moreton Subject: [PATCH 3/8] net/sfc: use non-static queue span limit in flow action RSS Date: Tue, 1 Feb 2022 11:49:57 +0300 Message-Id: <20220201085002.320102-4-ivan.malov@oktetlabs.ru> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220201085002.320102-1-ivan.malov@oktetlabs.ru> References: <20220201085002.320102-1-ivan.malov@oktetlabs.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On EF10 boards, the limit on how many queues an RSS context can address is 64. On EF100 boards, this parameter may vary. Signed-off-by: Ivan Malov Reviewed-by: Andrew Rybchenko Reviewed-by: Andy Moreton --- drivers/net/sfc/sfc_flow_rss.c | 8 ++++++-- drivers/net/sfc/sfc_flow_rss.h | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/net/sfc/sfc_flow_rss.c b/drivers/net/sfc/sfc_flow_rss.c index 17876f11c1..1c94333b62 100644 --- a/drivers/net/sfc/sfc_flow_rss.c +++ b/drivers/net/sfc/sfc_flow_rss.c @@ -21,10 +21,13 @@ int sfc_flow_rss_attach(struct sfc_adapter *sa) { + const efx_nic_cfg_t *encp = efx_nic_cfg_get(sa->nic); struct sfc_flow_rss *flow_rss = &sa->flow_rss; sfc_log_init(sa, "entry"); + flow_rss->qid_span_max = encp->enc_rx_scale_indirection_max_nqueues; + TAILQ_INIT(&flow_rss->ctx_list); sfc_log_init(sa, "done"); @@ -46,6 +49,7 @@ sfc_flow_rss_parse_conf(struct sfc_adapter *sa, struct sfc_flow_rss_conf *out, uint16_t *sw_qid_minp) { struct sfc_adapter_shared * const sas = sfc_sa2shared(sa); + const struct sfc_flow_rss *flow_rss = &sa->flow_rss; const struct sfc_rss *ethdev_rss = &sas->rss; uint16_t sw_qid_min; uint16_t sw_qid_max; @@ -156,9 +160,9 @@ sfc_flow_rss_parse_conf(struct sfc_adapter *sa, out->qid_span = sw_qid_max - sw_qid_min + 1; - if (out->qid_span > EFX_MAXRSS) { + if (out->qid_span > flow_rss->qid_span_max) { sfc_err(sa, "flow-rss: parse: queue ID span %u is too large; MAX=%u", - out->qid_span, EFX_MAXRSS); + out->qid_span, flow_rss->qid_span_max); return EINVAL; } diff --git a/drivers/net/sfc/sfc_flow_rss.h b/drivers/net/sfc/sfc_flow_rss.h index cb2355ab67..e9f798a8f3 100644 --- a/drivers/net/sfc/sfc_flow_rss.h +++ b/drivers/net/sfc/sfc_flow_rss.h @@ -42,6 +42,8 @@ struct sfc_flow_rss_ctx { TAILQ_HEAD(sfc_flow_rss_ctx_list, sfc_flow_rss_ctx); struct sfc_flow_rss { + unsigned int qid_span_max; + unsigned int bounce_tbl[EFX_RSS_TBL_SIZE]; struct sfc_flow_rss_ctx_list ctx_list; -- 2.30.2