Commit 4b08c3e6 authored by Amit Cohen's avatar Amit Cohen Committed by David S. Miller
Browse files

mlxsw: reg: Add a function to fill IPv6 unicast FDB entries



Add a function to fill IPv6 unicast FDB entries. Use the common function
for common fields.

Unlike IPv4 entries, the underlay IP address is not filled in the
register payload, but instead a pointer to KVDL is used.

Signed-off-by: default avatarAmit Cohen <amcohen@nvidia.com>
Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1fd85416
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -528,6 +528,19 @@ mlxsw_reg_sfd_uc_tunnel_pack4(char *payload, int rec_index,
				     MLXSW_REG_SFD_UC_TUNNEL_PROTOCOL_IPV4);
}

static inline void
mlxsw_reg_sfd_uc_tunnel_pack6(char *payload, int rec_index, const char *mac,
			      u16 fid, enum mlxsw_reg_sfd_rec_action action,
			      u32 uip_ptr)
{
	mlxsw_reg_sfd_uc_tunnel_uip_lsb_set(payload, rec_index, uip_ptr);
	/* Only static policy is supported for IPv6 unicast tunnel entry. */
	mlxsw_reg_sfd_uc_tunnel_pack(payload, rec_index,
				     MLXSW_REG_SFD_REC_POLICY_STATIC_ENTRY,
				     mac, fid, action,
				     MLXSW_REG_SFD_UC_TUNNEL_PROTOCOL_IPV6);
}

enum mlxsw_reg_tunnel_port {
	MLXSW_REG_TUNNEL_PORT_NVE,
	MLXSW_REG_TUNNEL_PORT_VPLS,