]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: core: Create a generic function to register / unregister traps
authorNogah Frankel <nogahf@mellanox.com>
Fri, 25 Nov 2016 09:33:30 +0000 (10:33 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 26 Nov 2016 02:22:14 +0000 (21:22 -0500)
commit49b186933acf9f59c3eaf50a158a0eab06837025
treef9ef6011d77ff8f3676c9775ed20d3baba9a020b
parent4a3bdbb4a431cdb85f86868cf46db9bf28195499
mlxsw: core: Create a generic function to register / unregister traps

We have 2 types of HW traps to handle, rx traps and events.
The registration workflow for both is very similar. So it only make
sense to create one function to handle both.

This patch creates a struct to hold the data for both cases. It also
creates a registration and an un-registration functions that get this
generic struct as input.

Signed-off-by: Nogah Frankel <nogahf@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/core.c
drivers/net/ethernet/mellanox/mlxsw/core.h