mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-29 15:43:59 +08:00
mlxsw: reg: Configure RIF to forward IPv4 multicast packets by default
Turn on two bits on the Spectrum RIF configuration: - IPv4 multicast: when a multicast packet arrives on a RIF, send it to go through multicast routes lookup. - IPv4 multicast forwarding enable: when multicast packet arrives on a RIF, allow it to be forwarded by multicast routes. If this bit is not set, multicast packets will go through multicast routing lookup but will be dropped at the egress of the ports. 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>
This commit is contained in:
parent
4fc92846f6
commit
4af5964e58
@ -3991,6 +3991,12 @@ MLXSW_ITEM32(reg, ritr, ipv4, 0x00, 29, 1);
|
||||
*/
|
||||
MLXSW_ITEM32(reg, ritr, ipv6, 0x00, 28, 1);
|
||||
|
||||
/* reg_ritr_ipv4_mc
|
||||
* IPv4 multicast routing enable.
|
||||
* Access: RW
|
||||
*/
|
||||
MLXSW_ITEM32(reg, ritr, ipv4_mc, 0x00, 27, 1);
|
||||
|
||||
enum mlxsw_reg_ritr_if_type {
|
||||
/* VLAN interface. */
|
||||
MLXSW_REG_RITR_VLAN_IF,
|
||||
@ -4048,6 +4054,14 @@ MLXSW_ITEM32(reg, ritr, ipv4_fe, 0x04, 29, 1);
|
||||
*/
|
||||
MLXSW_ITEM32(reg, ritr, ipv6_fe, 0x04, 28, 1);
|
||||
|
||||
/* reg_ritr_ipv4_mc_fe
|
||||
* IPv4 Multicast Forwarding Enable.
|
||||
* When disabled, forwarding is blocked but local traffic (traps and IP to me)
|
||||
* will be enabled.
|
||||
* Access: RW
|
||||
*/
|
||||
MLXSW_ITEM32(reg, ritr, ipv4_mc_fe, 0x04, 27, 1);
|
||||
|
||||
/* reg_ritr_lb_en
|
||||
* Loop-back filter enable for unicast packets.
|
||||
* If the flag is set then loop-back filter for unicast packets is
|
||||
@ -4270,11 +4284,13 @@ static inline void mlxsw_reg_ritr_pack(char *payload, bool enable,
|
||||
mlxsw_reg_ritr_enable_set(payload, enable);
|
||||
mlxsw_reg_ritr_ipv4_set(payload, 1);
|
||||
mlxsw_reg_ritr_ipv6_set(payload, 1);
|
||||
mlxsw_reg_ritr_ipv4_mc_set(payload, 1);
|
||||
mlxsw_reg_ritr_type_set(payload, type);
|
||||
mlxsw_reg_ritr_op_set(payload, op);
|
||||
mlxsw_reg_ritr_rif_set(payload, rif);
|
||||
mlxsw_reg_ritr_ipv4_fe_set(payload, 1);
|
||||
mlxsw_reg_ritr_ipv6_fe_set(payload, 1);
|
||||
mlxsw_reg_ritr_ipv4_mc_fe_set(payload, 1);
|
||||
mlxsw_reg_ritr_lb_en_set(payload, 1);
|
||||
mlxsw_reg_ritr_virtual_router_set(payload, vr_id);
|
||||
mlxsw_reg_ritr_mtu_set(payload, mtu);
|
||||
|
Loading…
Reference in New Issue
Block a user