Skip to content

Commit c011ec1

Browse files
yotamgidavem330
authored andcommitted
mlxsw: spectrum: Add the multicast routing offloading logic
Add the multicast router offloading logic, which is in charge of handling the VIF and MFC notifications and translating it to the hardware logic API. The offloading logic has to overcome several obstacles in order to safely comply with the kernel multicast router user API: - It must keep track of the mapping between VIFs to netdevices. The user can add an MFC cache entry pointing to a VIF, delete the VIF and add re-add it with a different netdevice. The offloading logic has to handle this in order to be compatible with the kernel logic. - It must keep track of the mapping between netdevices to spectrum RIFs, as the current hardware implementation assume having a RIF for every port in a multicast router. - It must handle routes pointing to pimreg device to be trapped to the kernel, as the packet should be delivered to userspace. - It must handle routes pointing tunnel VIFs. The current implementation does not support multicast forwarding to tunnels, thus routes that point to a tunnel should be trapped to the kernel. - It must be aware of proxy multicast routes, which include both (*,*) routes and duplicate routes. Currently proxy routes are not offloaded and trigger the abort mechanism: removal of all routes from hardware and triggering the traffic to go through the kernel. The multicast routing offloading logic also updates the counters of the offloaded MFC routes in a periodic work. Signed-off-by: Yotam Gigi <[email protected]> Reviewed-by: Ido Schimmel <[email protected]> Signed-off-by: Jiri Pirko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 478e4c2 commit c011ec1

File tree

4 files changed

+1150
-1
lines changed

4 files changed

+1150
-1
lines changed

drivers/net/ethernet/mellanox/mlxsw/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ mlxsw_spectrum-objs := spectrum.o spectrum_buffers.o \
1717
spectrum_kvdl.o spectrum_acl_tcam.o \
1818
spectrum_acl.o spectrum_flower.o \
1919
spectrum_cnt.o spectrum_fid.o \
20-
spectrum_ipip.o spectrum_acl_flex_actions.o
20+
spectrum_ipip.o spectrum_acl_flex_actions.o \
21+
spectrum_mr.o
2122
mlxsw_spectrum-$(CONFIG_MLXSW_SPECTRUM_DCB) += spectrum_dcb.o
2223
mlxsw_spectrum-$(CONFIG_NET_DEVLINK) += spectrum_dpipe.o
2324
obj-$(CONFIG_MLXSW_MINIMAL) += mlxsw_minimal.o

drivers/net/ethernet/mellanox/mlxsw/spectrum.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ struct mlxsw_sp {
153153
struct mlxsw_sp_sb *sb;
154154
struct mlxsw_sp_bridge *bridge;
155155
struct mlxsw_sp_router *router;
156+
struct mlxsw_sp_mr *mr;
156157
struct mlxsw_afa *afa;
157158
struct mlxsw_sp_acl *acl;
158159
struct mlxsw_sp_fid_core *fid_core;

0 commit comments

Comments
 (0)