[3/8] net/sfc: use non-static queue span limit in flow action RSS
Checks
Commit Message
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 <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
---
drivers/net/sfc/sfc_flow_rss.c | 8 ++++++--
drivers/net/sfc/sfc_flow_rss.h | 2 ++
2 files changed, 8 insertions(+), 2 deletions(-)
@@ -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;
}
@@ -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;