MLXSW_CORE_RES_GET
mlxsw_core->max_ports = MLXSW_CORE_RES_GET(mlxsw_core,
*p_max_lag = MLXSW_CORE_RES_GET(mlxsw_core, MAX_LAG);
MLXSW_CORE_RES_GET(mlxsw_core, MAX_LAG_MEMBERS);
return MLXSW_CORE_RES_GET(mlxsw_core, MAX_LAG_MEMBERS) * lag_id +
for (i = 0; i < MLXSW_CORE_RES_GET(mlxsw_core, MAX_LAG_MEMBERS); i++) {
MLXSW_CORE_RES_GET(mlxsw_core, CQE_V2))
MLXSW_CORE_RES_GET(mlxsw_core, CQE_V1))
MLXSW_CORE_RES_GET(mlxsw_core, CQE_V0)) ||
u16 max_fid = MLXSW_CORE_RES_GET(mlxsw_core, FID);
max_cpu_policers = MLXSW_CORE_RES_GET(mlxsw_core, MAX_CPU_POLICERS);
max_trap_groups = MLXSW_CORE_RES_GET(mlxsw_core, MAX_TRAP_GROUPS);
max_cpu_policers = MLXSW_CORE_RES_GET(mlxsw_core, MAX_CPU_POLICERS);
max_policers = MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_CPU_POLICERS);
u32 single_size_min = MLXSW_CORE_RES_GET(mlxsw_core,
u32 double_size_min = MLXSW_CORE_RES_GET(mlxsw_core,
u32 kvd_size = MLXSW_CORE_RES_GET(mlxsw_core, KVD_SIZE);
kvd_size = MLXSW_CORE_RES_GET(mlxsw_core, KVD_SIZE);
kvd_size = MLXSW_CORE_RES_GET(mlxsw_core, KVD_SIZE);
max_span = MLXSW_CORE_RES_GET(mlxsw_core, MAX_SPAN);
max_rif_mac_profiles = MLXSW_CORE_RES_GET(mlxsw_core,
max_rifs = MLXSW_CORE_RES_GET(mlxsw_core, MAX_RIFS);
max = MLXSW_CORE_RES_GET(mlxsw_core, ACL_MAX_L4_PORT_RANGE);
double_size = MLXSW_CORE_RES_GET(mlxsw_core, KVD_SIZE) -
*p_single_size = MLXSW_CORE_RES_GET(mlxsw_core, KVD_SIZE) -
if (*p_single_size < MLXSW_CORE_RES_GET(mlxsw_core, KVD_SINGLE_MIN_SIZE) ||
*p_double_size < MLXSW_CORE_RES_GET(mlxsw_core, KVD_DOUBLE_MIN_SIZE) ||
MLXSW_CORE_RES_GET(mlxsw_core, KVD_SIZE) < *p_linear_size)
max_lag_members = MLXSW_CORE_RES_GET(mlxsw_sp->core,
kvdl_max_size = MLXSW_CORE_RES_GET(mlxsw_core, KVD_SIZE) -
MLXSW_CORE_RES_GET(mlxsw_core, KVD_SINGLE_MIN_SIZE) -
MLXSW_CORE_RES_GET(mlxsw_core, KVD_DOUBLE_MIN_SIZE);
max_tcam_rules = MLXSW_CORE_RES_GET(mlxsw_sp->core, ACL_MAX_TCAM_RULES);
tcam->kvdl_count = MLXSW_CORE_RES_GET(mlxsw_sp->core,
acl->afk = mlxsw_afk_create(MLXSW_CORE_RES_GET(mlxsw_sp->core,
max_lkey_id = MLXSW_CORE_RES_GET(mlxsw_sp->core, ACL_MAX_LARGE_KEY_ID);
max_regions = MLXSW_CORE_RES_GET(mlxsw_sp->core, ACL_MAX_REGIONS);
bf_bank_size = 1 << MLXSW_CORE_RES_GET(mlxsw_sp->core, ACL_MAX_BF_LOG);
max_tcam_rules = MLXSW_CORE_RES_GET(mlxsw_sp->core, ACL_MAX_TCAM_RULES);
size = MLXSW_CORE_RES_GET(mlxsw_sp->core, ACL_ERPT_ENTRIES_2KB);
size = MLXSW_CORE_RES_GET(mlxsw_sp->core, ACL_ERPT_ENTRIES_4KB);
size = MLXSW_CORE_RES_GET(mlxsw_sp->core, ACL_ERPT_ENTRIES_8KB);
size = MLXSW_CORE_RES_GET(mlxsw_sp->core, ACL_ERPT_ENTRIES_12KB);
erpt_bank_size = MLXSW_CORE_RES_GET(mlxsw_sp->core,
erp_core->num_erp_banks = MLXSW_CORE_RES_GET(mlxsw_sp->core,
mlxsw_sp->afa = mlxsw_afa_create(MLXSW_CORE_RES_GET(mlxsw_sp->core,
max_tcam_regions = MLXSW_CORE_RES_GET(mlxsw_sp->core,
max_regions = MLXSW_CORE_RES_GET(mlxsw_sp->core, ACL_MAX_REGIONS);
max_groups = MLXSW_CORE_RES_GET(mlxsw_sp->core, ACL_MAX_GROUPS);
tcam->max_group_size = MLXSW_CORE_RES_GET(mlxsw_sp->core,
max_priority = MLXSW_CORE_RES_GET(mlxsw_sp->core, KVD_SIZE) - 1;
mlxsw_sp->sb->cell_size = MLXSW_CORE_RES_GET(mlxsw_sp->core, CELL_SIZE);
mlxsw_sp->sb->sb_size = MLXSW_CORE_RES_GET(mlxsw_sp->core,
max_headroom_size = MLXSW_CORE_RES_GET(mlxsw_sp->core,
if (size > MLXSW_CORE_RES_GET(mlxsw_sp->core,
pool_size = MLXSW_CORE_RES_GET(mlxsw_core, COUNTER_POOL_SIZE);
bank_size = MLXSW_CORE_RES_GET(mlxsw_core, COUNTER_BANK_SIZE);
rif_count = MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_RIFS);
for (i = 0; i < MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_RIFS); i++) {
return MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_RIFS);
rif_count = MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_RIFS);
for (; i < MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_RIFS); i++) {
for (i = 0; i < MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_RIFS); i++) {
for (i = 0; i < MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_RIFS); i++) {
max_profiles = MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_NVE_FLOOD_PRF);
int erif_list_entries = MLXSW_CORE_RES_GET(mlxsw_sp->core,
max = MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_NVE_MC_ENTRIES_IPV4);
max = MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_NVE_MC_ENTRIES_IPV6);
pgt->end_index = MLXSW_CORE_RES_GET(mlxsw_sp->core, PGT_SIZE);
global_policers = MLXSW_CORE_RES_GET(mlxsw_core, MAX_GLOBAL_POLICERS);
cpu_policers = MLXSW_CORE_RES_GET(mlxsw_core, MAX_CPU_POLICERS);
family->start_index = MLXSW_CORE_RES_GET(core, MAX_CPU_POLICERS);
family->end_index = MLXSW_CORE_RES_GET(core, MAX_GLOBAL_POLICERS);
max = MLXSW_CORE_RES_GET(core, ACL_MAX_L4_PORT_RANGE);
if (p->max > MLXSW_CORE_RES_GET(mlxsw_sp->core,
max_vrs = MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_VRS);
MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_RIFS), -1);
u64 max_rifs = MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_RIFS);
MLXSW_CORE_RES_GET(core, MAX_RIF_MAC_PROFILES);
int max_rifs = MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_RIFS);
max_rifs = MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_RIFS);
u64 max_rifs = MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_RIFS);
max_trees = MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_LPM_TREES);
int max_vrs = MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_VRS);
int max_vrs = MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_VRS);
int max_rifs = MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_RIFS);
int max_vrs = MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_VRS);
int max_vrs = MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_VRS);
entries_count = MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_SPAN);
max_lag_members = MLXSW_CORE_RES_GET(mlxsw_sp->core,
max_lag_members = MLXSW_CORE_RES_GET(mlxsw_sp->core,