summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.h
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@mellanox.com>2020-08-03 19:11:38 +0300
committerDavid S. Miller <davem@davemloft.net>2020-08-03 18:06:46 -0700
commit869c7be940e50aa14845fcdb7a9d67c18be7e27a (patch)
tree47c9ae090c97784a0a4a7a7f1f90d91c2340f8d7 /drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.h
parent36d1fd687d56d807cc65210f14712349919c13e8 (diff)
mlxsw: spectrum_trap: Allow for per-ASIC traps initialization
Subsequent patches will need to register different traps for Spectrum-1 and Spectrum-2 onwards. Enable that by invoking a per-ASIC operation during traps initialization. Reviewed-by: Petr Machata <petrm@mellanox.com> Reviewed-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Petr Machata <petrm@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_trap.h')
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.h
index 4ae5212b9a48..b8df684bedef 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.h
@@ -27,6 +27,9 @@ struct mlxsw_sp_trap_ops {
int (*groups_init)(struct mlxsw_sp *mlxsw_sp,
const struct mlxsw_sp_trap_group_item **arr,
size_t *p_groups_count);
+ int (*traps_init)(struct mlxsw_sp *mlxsw_sp,
+ const struct mlxsw_sp_trap_item **arr,
+ size_t *p_traps_count);
};
extern const struct mlxsw_sp_trap_ops mlxsw_sp1_trap_ops;