mlxsw: spectrum: Add the multicast routing hardware logic
authorYotam Gigi <yotamg@mellanox.com>
Wed, 27 Sep 2017 06:23:18 +0000 (08:23 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 27 Sep 2017 18:33:28 +0000 (11:33 -0700)
commit0e14c7777acb6d58250cb746685dde0a74d60fe8
tree7e3b2ae27d31f518e6f209b60e4ca3abc52ff633
parentc011ec1bbfd69e091ca8d77e13fc251a07be57dc
mlxsw: spectrum: Add the multicast routing hardware logic

Implement the multicast routing hardware API introduced in previous patch
for the specific spectrum hardware.

The spectrum hardware multicast routes are written using the RMFT2 register
and point to an ACL flexible action set. The actions used for multicast
routes are:
 - Counter action, which allows counting bytes and packets on multicast
   routes.
 - Multicast route action, which provide RPF check and do the actual packet
   duplication to a list of RIFs.
 - Trap action, in the case the route action specified by the called is
   trap.

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/Makefile
drivers/net/ethernet/mellanox/mlxsw/spectrum.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_mr_tcam.c [new file with mode: 0644]
drivers/net/ethernet/mellanox/mlxsw/spectrum_mr_tcam.h [new file with mode: 0644]