mlxsw: spectrum: Extract work-scheduling into a new function
authorPetr Machata <petrm@mellanox.com>
Tue, 31 Jul 2018 22:37:36 +0000 (00:37 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 1 Aug 2018 16:52:30 +0000 (09:52 -0700)
commit1f65a33fc7e22de96055778b0e4f214e005291e7
tree7ba203f6ad7bdf7938d2c21f233055d0cf754b6e
parentd18c5d1995aa322b722fa731397e28ebcd00b3c6
mlxsw: spectrum: Extract work-scheduling into a new function

The boilerplate to schedule NETEVENT_IPV4_MPATH_HASH_UPDATE and
NETEVENT_IPV6_MPATH_HASH_UPDATE handling is almost equivalent to that of
NETEVENT_IPV4_FWD_UPDATE_PRIORITY_UPDATE that's coming in the next
patch. The only difference is which actual worker function should be
called. Extract this boilerplate into a named function in order to allow
reuse.

Signed-off-by: Petr Machata <petrm@mellanox.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c