diff options
author | Jiri Pirko <jiri@mellanox.com> | 2020-02-25 11:45:23 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-02-25 20:05:55 +0100 |
commit | 6d19d2bdc8a15b8212c530edd806cfee283ac734 (patch) | |
tree | 51a061e18a1201afb4acaefcbc32e891a221533d /drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c | |
parent | mlxsw: core_acl_flex_actions: Add trap with userdef action (diff) | |
download | linux-6d19d2bdc8a15b8212c530edd806cfee283ac734.tar.xz linux-6d19d2bdc8a15b8212c530edd806cfee283ac734.zip |
mlxsw: core_acl_flex_actions: Implement flow_offload action cookie offload
Track cookies coming down to driver by flow_offload.
Assign a cookie_index to each unique cookie binary. Use previously
defined "Trap with userdef" flex action to ask HW to pass cookie_index
alongside with the dropped packets.
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c index abd749adb0f5..36b264798f04 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c @@ -536,9 +536,12 @@ int mlxsw_sp_acl_rulei_act_terminate(struct mlxsw_sp_acl_rule_info *rulei) } int mlxsw_sp_acl_rulei_act_drop(struct mlxsw_sp_acl_rule_info *rulei, - bool ingress) + bool ingress, + const struct flow_action_cookie *fa_cookie, + struct netlink_ext_ack *extack) { - return mlxsw_afa_block_append_drop(rulei->act_block, ingress); + return mlxsw_afa_block_append_drop(rulei->act_block, ingress, + fa_cookie, extack); } int mlxsw_sp_acl_rulei_act_trap(struct mlxsw_sp_acl_rule_info *rulei) |