Skip to content

Commit a43da82

Browse files
pmachatadavem330
authored andcommitted
mlxsw: reg: Add mlxsw_reg_ralue_act_ip2me_tun_pack()
To implement IP-in-IP decapsulation, Spectrum uses LPM entries of type IP2ME with tunnel validity bit and tunnel pointer set. The necessary register fields are already available, so add a function to pack the RALUE as appropriate. Signed-off-by: Petr Machata <[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 6c4153b commit a43da82

File tree

1 file changed

+9
-0
lines changed
  • drivers/net/ethernet/mellanox/mlxsw

1 file changed

+9
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5054,6 +5054,15 @@ mlxsw_reg_ralue_act_ip2me_pack(char *payload)
50545054
MLXSW_REG_RALUE_ACTION_TYPE_IP2ME);
50555055
}
50565056

5057+
static inline void
5058+
mlxsw_reg_ralue_act_ip2me_tun_pack(char *payload, u32 tunnel_ptr)
5059+
{
5060+
mlxsw_reg_ralue_action_type_set(payload,
5061+
MLXSW_REG_RALUE_ACTION_TYPE_IP2ME);
5062+
mlxsw_reg_ralue_ip2me_v_set(payload, 1);
5063+
mlxsw_reg_ralue_ip2me_tunnel_ptr_set(payload, tunnel_ptr);
5064+
}
5065+
50575066
/* RAUHT - Router Algorithmic LPM Unicast Host Table Register
50585067
* ----------------------------------------------------------
50595068
* The RAUHT register is used to configure and query the Unicast Host table in

0 commit comments

Comments
 (0)