From: Ivan Malov Date: Tue, 1 Feb 2022 08:49:57 +0000 (+0300) Subject: net/sfc: use non-static queue span limit in flow action RSS X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=f6d230535b0ec4bad666b2311e62c1b2bfa002c7;p=dpdk.git net/sfc: use non-static queue span limit in flow action RSS 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 --- 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;