diff mbox series

[v3,17/20] common/sfc_efx/base: add max MAE counters to limits

Message ID 20210618134032.1922012-18-andrew.rybchenko@oktetlabs.ru (mailing list archive)
State Superseded
Delegated to: David Marchand
Headers show
Series net/sfc: support flow API COUNT action | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Andrew Rybchenko June 18, 2021, 1:40 p.m. UTC
From: Igor Romanov <igor.romanov@oktetlabs.ru>

The information about the maximum number of MAE counters is
crucial to the counter support in the driver.

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
---
 drivers/common/sfc_efx/base/efx.h     | 1 +
 drivers/common/sfc_efx/base/efx_mae.c | 1 +
 2 files changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/drivers/common/sfc_efx/base/efx.h b/drivers/common/sfc_efx/base/efx.h
index d3cf9fe571..21fd151b70 100644
--- a/drivers/common/sfc_efx/base/efx.h
+++ b/drivers/common/sfc_efx/base/efx.h
@@ -4093,6 +4093,7 @@  typedef struct efx_mae_limits_s {
 	uint32_t			eml_max_n_outer_prios;
 	uint32_t			eml_encap_types_supported;
 	uint32_t			eml_encap_header_size_limit;
+	uint32_t			eml_max_n_counters;
 } efx_mae_limits_t;
 
 LIBEFX_API
diff --git a/drivers/common/sfc_efx/base/efx_mae.c b/drivers/common/sfc_efx/base/efx_mae.c
index b0e6fadd46..67d1c22037 100644
--- a/drivers/common/sfc_efx/base/efx_mae.c
+++ b/drivers/common/sfc_efx/base/efx_mae.c
@@ -374,6 +374,7 @@  efx_mae_get_limits(
 	emlp->eml_encap_types_supported = maep->em_encap_types_supported;
 	emlp->eml_encap_header_size_limit =
 	    MC_CMD_MAE_ENCAP_HEADER_ALLOC_IN_HDR_DATA_MAXNUM_MCDI2;
+	emlp->eml_max_n_counters = maep->em_max_ncounters;
 
 	return (0);