/Linux-v5.4/drivers/net/ethernet/mellanox/mlxsw/ |
D | spectrum_flower.c | 19 struct mlxsw_sp_acl_rule_info *rulei, in mlxsw_sp_flower_parse_actions() argument 31 err = mlxsw_sp_acl_rulei_act_count(mlxsw_sp, rulei, extack); in mlxsw_sp_flower_parse_actions() 38 err = mlxsw_sp_acl_rulei_act_terminate(rulei); in mlxsw_sp_flower_parse_actions() 45 err = mlxsw_sp_acl_rulei_act_drop(rulei); in mlxsw_sp_flower_parse_actions() 52 err = mlxsw_sp_acl_rulei_act_trap(rulei); in mlxsw_sp_flower_parse_actions() 70 err = mlxsw_sp_acl_rulei_act_jump(rulei, group_id); in mlxsw_sp_flower_parse_actions() 90 rulei->egress_bind_blocker = 1; in mlxsw_sp_flower_parse_actions() 94 err = mlxsw_sp_acl_rulei_act_fid_set(mlxsw_sp, rulei, in mlxsw_sp_flower_parse_actions() 100 err = mlxsw_sp_acl_rulei_act_fwd(mlxsw_sp, rulei, in mlxsw_sp_flower_parse_actions() 114 err = mlxsw_sp_acl_rulei_act_mirror(mlxsw_sp, rulei, in mlxsw_sp_flower_parse_actions() [all …]
|
D | spectrum_acl.c | 68 struct mlxsw_sp_acl_rule_info *rulei; member 440 struct mlxsw_sp_acl_rule_info *rulei; in mlxsw_sp_acl_rulei_create() local 443 rulei = kzalloc(sizeof(*rulei), GFP_KERNEL); in mlxsw_sp_acl_rulei_create() 444 if (!rulei) in mlxsw_sp_acl_rulei_create() 448 rulei->act_block = afa_block; in mlxsw_sp_acl_rulei_create() 449 return rulei; in mlxsw_sp_acl_rulei_create() 452 rulei->act_block = mlxsw_afa_block_create(acl->mlxsw_sp->afa); in mlxsw_sp_acl_rulei_create() 453 if (IS_ERR(rulei->act_block)) { in mlxsw_sp_acl_rulei_create() 454 err = PTR_ERR(rulei->act_block); in mlxsw_sp_acl_rulei_create() 457 rulei->action_created = 1; in mlxsw_sp_acl_rulei_create() [all …]
|
D | spectrum1_acl_tcam.c | 18 struct mlxsw_sp_acl_rule_info *rulei; member 64 struct mlxsw_sp_acl_rule_info *rulei; in mlxsw_sp1_acl_ctcam_region_catchall_add() local 70 rulei = mlxsw_sp_acl_rulei_create(mlxsw_sp->acl, NULL); in mlxsw_sp1_acl_ctcam_region_catchall_add() 71 if (IS_ERR(rulei)) { in mlxsw_sp1_acl_ctcam_region_catchall_add() 72 err = PTR_ERR(rulei); in mlxsw_sp1_acl_ctcam_region_catchall_add() 75 err = mlxsw_sp_acl_rulei_act_continue(rulei); in mlxsw_sp1_acl_ctcam_region_catchall_add() 78 err = mlxsw_sp_acl_rulei_commit(rulei); in mlxsw_sp1_acl_ctcam_region_catchall_add() 84 rulei, false); in mlxsw_sp1_acl_ctcam_region_catchall_add() 87 region->catchall.rulei = rulei; in mlxsw_sp1_acl_ctcam_region_catchall_add() 93 mlxsw_sp_acl_rulei_destroy(rulei); in mlxsw_sp1_acl_ctcam_region_catchall_add() [all …]
|
D | spectrum2_mr_tcam.c | 142 mlxsw_sp2_mr_tcam_rule_parse4(struct mlxsw_sp_acl_rule_info *rulei, in mlxsw_sp2_mr_tcam_rule_parse4() argument 145 mlxsw_sp_acl_rulei_keymask_buf(rulei, MLXSW_AFK_ELEMENT_SRC_IP_0_31, in mlxsw_sp2_mr_tcam_rule_parse4() 148 mlxsw_sp_acl_rulei_keymask_buf(rulei, MLXSW_AFK_ELEMENT_DST_IP_0_31, in mlxsw_sp2_mr_tcam_rule_parse4() 154 mlxsw_sp2_mr_tcam_rule_parse6(struct mlxsw_sp_acl_rule_info *rulei, in mlxsw_sp2_mr_tcam_rule_parse6() argument 157 mlxsw_sp_acl_rulei_keymask_buf(rulei, MLXSW_AFK_ELEMENT_SRC_IP_96_127, in mlxsw_sp2_mr_tcam_rule_parse6() 160 mlxsw_sp_acl_rulei_keymask_buf(rulei, MLXSW_AFK_ELEMENT_SRC_IP_64_95, in mlxsw_sp2_mr_tcam_rule_parse6() 163 mlxsw_sp_acl_rulei_keymask_buf(rulei, MLXSW_AFK_ELEMENT_SRC_IP_32_63, in mlxsw_sp2_mr_tcam_rule_parse6() 166 mlxsw_sp_acl_rulei_keymask_buf(rulei, MLXSW_AFK_ELEMENT_SRC_IP_0_31, in mlxsw_sp2_mr_tcam_rule_parse6() 169 mlxsw_sp_acl_rulei_keymask_buf(rulei, MLXSW_AFK_ELEMENT_DST_IP_96_127, in mlxsw_sp2_mr_tcam_rule_parse6() 172 mlxsw_sp_acl_rulei_keymask_buf(rulei, MLXSW_AFK_ELEMENT_DST_IP_64_95, in mlxsw_sp2_mr_tcam_rule_parse6() [all …]
|
D | spectrum_acl_ctcam.c | 43 struct mlxsw_sp_acl_rule_info *rulei, in mlxsw_sp_acl_ctcam_region_entry_insert() argument 55 err = mlxsw_sp_acl_tcam_priority_get(mlxsw_sp, rulei, &priority, in mlxsw_sp_acl_ctcam_region_entry_insert() 65 mlxsw_afk_encode(afk, region->key_info, &rulei->values, key, mask); in mlxsw_sp_acl_ctcam_region_entry_insert() 72 act_set = mlxsw_afa_block_first_set(rulei->act_block); in mlxsw_sp_acl_ctcam_region_entry_insert() 192 struct mlxsw_sp_acl_rule_info *rulei, in mlxsw_sp_acl_ctcam_entry_add() argument 203 rulei, fillup_priority); in mlxsw_sp_acl_ctcam_entry_add() 227 struct mlxsw_sp_acl_rule_info *rulei) in mlxsw_sp_acl_ctcam_entry_action_replace() argument 231 rulei->act_block, in mlxsw_sp_acl_ctcam_entry_action_replace() 232 rulei->priority); in mlxsw_sp_acl_ctcam_entry_action_replace()
|
D | spectrum_acl_atcam.c | 383 struct mlxsw_sp_acl_rule_info *rulei) in mlxsw_sp_acl_atcam_region_entry_insert() argument 392 err = mlxsw_sp_acl_tcam_priority_get(mlxsw_sp, rulei, &priority, true); in mlxsw_sp_acl_atcam_region_entry_insert() 401 kvdl_index = mlxsw_afa_block_first_kvdl_index(rulei->act_block); in mlxsw_sp_acl_atcam_region_entry_insert() 447 struct mlxsw_sp_acl_rule_info *rulei) in mlxsw_sp_acl_atcam_region_entry_action_replace() argument 456 err = mlxsw_sp_acl_tcam_priority_get(mlxsw_sp, rulei, &priority, true); in mlxsw_sp_acl_atcam_region_entry_action_replace() 459 kvdl_index = mlxsw_afa_block_first_kvdl_index(rulei->act_block); in mlxsw_sp_acl_atcam_region_entry_action_replace() 475 struct mlxsw_sp_acl_rule_info *rulei) in __mlxsw_sp_acl_atcam_entry_add() argument 484 mlxsw_afk_encode(afk, region->key_info, &rulei->values, in __mlxsw_sp_acl_atcam_entry_add() 529 rulei); in __mlxsw_sp_acl_atcam_entry_add() 563 struct mlxsw_sp_acl_rule_info *rulei) in __mlxsw_sp_acl_atcam_entry_action_replace() argument [all …]
|
D | spectrum_acl_tcam.h | 38 struct mlxsw_sp_acl_rule_info *rulei, 57 struct mlxsw_sp_acl_rule_info *rulei); 60 struct mlxsw_sp_acl_rule_info *rulei); 129 struct mlxsw_sp_acl_rule_info *rulei, 138 struct mlxsw_sp_acl_rule_info *rulei); 230 struct mlxsw_sp_acl_rule_info *rulei); 238 struct mlxsw_sp_acl_rule_info *rulei);
|
D | spectrum2_acl_tcam.c | 203 struct mlxsw_sp_acl_rule_info *rulei) in mlxsw_sp2_acl_tcam_entry_add() argument 209 entry->act_block = rulei->act_block; in mlxsw_sp2_acl_tcam_entry_add() 212 rulei); in mlxsw_sp2_acl_tcam_entry_add() 230 struct mlxsw_sp_acl_rule_info *rulei) in mlxsw_sp2_acl_tcam_entry_action_replace() argument 235 entry->act_block = rulei->act_block; in mlxsw_sp2_acl_tcam_entry_action_replace() 238 &entry->aentry, rulei); in mlxsw_sp2_acl_tcam_entry_action_replace()
|
D | spectrum.h | 696 void mlxsw_sp_acl_rulei_destroy(struct mlxsw_sp_acl_rule_info *rulei); 697 int mlxsw_sp_acl_rulei_commit(struct mlxsw_sp_acl_rule_info *rulei); 698 void mlxsw_sp_acl_rulei_priority(struct mlxsw_sp_acl_rule_info *rulei, 700 void mlxsw_sp_acl_rulei_keymask_u32(struct mlxsw_sp_acl_rule_info *rulei, 703 void mlxsw_sp_acl_rulei_keymask_buf(struct mlxsw_sp_acl_rule_info *rulei, 707 int mlxsw_sp_acl_rulei_act_continue(struct mlxsw_sp_acl_rule_info *rulei); 708 int mlxsw_sp_acl_rulei_act_jump(struct mlxsw_sp_acl_rule_info *rulei, 710 int mlxsw_sp_acl_rulei_act_terminate(struct mlxsw_sp_acl_rule_info *rulei); 711 int mlxsw_sp_acl_rulei_act_drop(struct mlxsw_sp_acl_rule_info *rulei); 712 int mlxsw_sp_acl_rulei_act_trap(struct mlxsw_sp_acl_rule_info *rulei); [all …]
|
D | spectrum_acl_tcam.c | 97 struct mlxsw_sp_acl_rule_info *rulei, in mlxsw_sp_acl_tcam_priority_get() argument 112 if (rulei->priority >= max_priority) in mlxsw_sp_acl_tcam_priority_get() 116 *priority = max_priority - rulei->priority; in mlxsw_sp_acl_tcam_priority_get() 254 struct mlxsw_sp_acl_rule_info *rulei; member 1109 entry->priv, ventry->rulei); in mlxsw_sp_acl_tcam_entry_create() 1134 struct mlxsw_sp_acl_rule_info *rulei) in mlxsw_sp_acl_tcam_entry_action_replace() argument 1139 entry->priv, rulei); in mlxsw_sp_acl_tcam_entry_action_replace() 1156 struct mlxsw_sp_acl_rule_info *rulei) in mlxsw_sp_acl_tcam_ventry_add() argument 1162 vchunk = mlxsw_sp_acl_tcam_vchunk_get(mlxsw_sp, vgroup, rulei->priority, in mlxsw_sp_acl_tcam_ventry_add() 1163 &rulei->values.elusage); in mlxsw_sp_acl_tcam_ventry_add() [all …]
|