mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-20 21:29:58 +07:00
mlxsw: acl: Change trap ACL action to get the trap_id as a parameter
Allow the trap ACL action to be configured with different traps. This allows the multicast router offloading code to use that same ACL action with the multicast router traps. By using different traps, the multicast router can have different trap policies and can handle the packet differently. Signed-off-by: Yotam Gigi <yotamg@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
4b8a79ff27
commit
9cb3fa940e
@ -712,7 +712,7 @@ int mlxsw_afa_block_append_drop(struct mlxsw_afa_block *block)
|
||||
}
|
||||
EXPORT_SYMBOL(mlxsw_afa_block_append_drop);
|
||||
|
||||
int mlxsw_afa_block_append_trap(struct mlxsw_afa_block *block)
|
||||
int mlxsw_afa_block_append_trap(struct mlxsw_afa_block *block, u16 trap_id)
|
||||
{
|
||||
char *act = mlxsw_afa_block_append_action(block,
|
||||
MLXSW_AFA_TRAPDISC_CODE,
|
||||
@ -722,7 +722,7 @@ int mlxsw_afa_block_append_trap(struct mlxsw_afa_block *block)
|
||||
return -ENOBUFS;
|
||||
mlxsw_afa_trapdisc_pack(act, MLXSW_AFA_TRAPDISC_TRAP_ACTION_TRAP,
|
||||
MLXSW_AFA_TRAPDISC_FORWARD_ACTION_DISCARD,
|
||||
MLXSW_TRAP_ID_ACL0);
|
||||
trap_id);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(mlxsw_afa_block_append_trap);
|
||||
|
@ -60,7 +60,7 @@ u32 mlxsw_afa_block_first_set_kvdl_index(struct mlxsw_afa_block *block);
|
||||
void mlxsw_afa_block_continue(struct mlxsw_afa_block *block);
|
||||
void mlxsw_afa_block_jump(struct mlxsw_afa_block *block, u16 group_id);
|
||||
int mlxsw_afa_block_append_drop(struct mlxsw_afa_block *block);
|
||||
int mlxsw_afa_block_append_trap(struct mlxsw_afa_block *block);
|
||||
int mlxsw_afa_block_append_trap(struct mlxsw_afa_block *block, u16 trap_id);
|
||||
int mlxsw_afa_block_append_fwd(struct mlxsw_afa_block *block,
|
||||
u8 local_port, bool in_port);
|
||||
int mlxsw_afa_block_append_vlan_modify(struct mlxsw_afa_block *block,
|
||||
|
@ -396,7 +396,8 @@ int mlxsw_sp_acl_rulei_act_drop(struct mlxsw_sp_acl_rule_info *rulei)
|
||||
|
||||
int mlxsw_sp_acl_rulei_act_trap(struct mlxsw_sp_acl_rule_info *rulei)
|
||||
{
|
||||
return mlxsw_afa_block_append_trap(rulei->act_block);
|
||||
return mlxsw_afa_block_append_trap(rulei->act_block,
|
||||
MLXSW_TRAP_ID_ACL0);
|
||||
}
|
||||
|
||||
int mlxsw_sp_acl_rulei_act_fwd(struct mlxsw_sp *mlxsw_sp,
|
||||
|
Loading…
Reference in New Issue
Block a user