mlxsw: spectrum_router: Add multicast routes notification handling functionality
commitd42b0965b1d4fe0808a2103a3f7c015515b1112e
authorYotam Gigi <yotamg@mellanox.com>
Wed, 27 Sep 2017 06:23:20 +0000 (27 08:23 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 27 Sep 2017 18:33:28 +0000 (27 11:33 -0700)
treea3596f2583df5aceb01bc1b47bb53a2bc4f01c90
parent7e50d435759accec4e17764a8d5a1ef63b79ffd6
mlxsw: spectrum_router: Add multicast routes notification handling functionality

Add functionality for calling the multicast routing offloading logic upon
MFC and VIF add and delete notifications. In addition, call the multicast
routing upon RIF addition and deletion events.

As the multicast routing offload logic may sleep, the actual calls are done
in a deferred work. To ensure the MFC object is not freed in that interval,
a reference is held to it. In case of a failure, the abort mechanism is
used, which ejects all the routes from the hardware and triggers the
traffic to flow through the kernel.

Note: At that stage, the FIB notifications are still ignored, and will be
enabled in a further patch.

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>
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c