common/sfc_efx/base: add max MAE counters to limits
authorIgor Romanov <igor.romanov@oktetlabs.ru>
Fri, 2 Jul 2021 08:39:45 +0000 (11:39 +0300)
committerDavid Marchand <david.marchand@redhat.com>
Tue, 20 Jul 2021 10:20:31 +0000 (12:20 +0200)
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
drivers/common/sfc_efx/base/efx_mae.c

index 628e61e..b2301b8 100644 (file)
@@ -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
index 10a96ac..47e809a 100644 (file)
@@ -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);