Lines Matching refs:parms

16 	return tun->parms;  in mlxsw_sp_ipip_netdev_parms4()
24 return tun->parms; in mlxsw_sp_ipip_netdev_parms6()
27 static bool mlxsw_sp_ipip_parms4_has_ikey(const struct ip_tunnel_parm *parms) in mlxsw_sp_ipip_parms4_has_ikey() argument
29 return !!(parms->i_flags & TUNNEL_KEY); in mlxsw_sp_ipip_parms4_has_ikey()
32 static bool mlxsw_sp_ipip_parms6_has_ikey(const struct __ip6_tnl_parm *parms) in mlxsw_sp_ipip_parms6_has_ikey() argument
34 return !!(parms->i_flags & TUNNEL_KEY); in mlxsw_sp_ipip_parms6_has_ikey()
37 static bool mlxsw_sp_ipip_parms4_has_okey(const struct ip_tunnel_parm *parms) in mlxsw_sp_ipip_parms4_has_okey() argument
39 return !!(parms->o_flags & TUNNEL_KEY); in mlxsw_sp_ipip_parms4_has_okey()
42 static bool mlxsw_sp_ipip_parms6_has_okey(const struct __ip6_tnl_parm *parms) in mlxsw_sp_ipip_parms6_has_okey() argument
44 return !!(parms->o_flags & TUNNEL_KEY); in mlxsw_sp_ipip_parms6_has_okey()
47 static u32 mlxsw_sp_ipip_parms4_ikey(const struct ip_tunnel_parm *parms) in mlxsw_sp_ipip_parms4_ikey() argument
49 return mlxsw_sp_ipip_parms4_has_ikey(parms) ? in mlxsw_sp_ipip_parms4_ikey()
50 be32_to_cpu(parms->i_key) : 0; in mlxsw_sp_ipip_parms4_ikey()
53 static u32 mlxsw_sp_ipip_parms6_ikey(const struct __ip6_tnl_parm *parms) in mlxsw_sp_ipip_parms6_ikey() argument
55 return mlxsw_sp_ipip_parms6_has_ikey(parms) ? in mlxsw_sp_ipip_parms6_ikey()
56 be32_to_cpu(parms->i_key) : 0; in mlxsw_sp_ipip_parms6_ikey()
59 static u32 mlxsw_sp_ipip_parms4_okey(const struct ip_tunnel_parm *parms) in mlxsw_sp_ipip_parms4_okey() argument
61 return mlxsw_sp_ipip_parms4_has_okey(parms) ? in mlxsw_sp_ipip_parms4_okey()
62 be32_to_cpu(parms->o_key) : 0; in mlxsw_sp_ipip_parms4_okey()
65 static u32 mlxsw_sp_ipip_parms6_okey(const struct __ip6_tnl_parm *parms) in mlxsw_sp_ipip_parms6_okey() argument
67 return mlxsw_sp_ipip_parms6_has_okey(parms) ? in mlxsw_sp_ipip_parms6_okey()
68 be32_to_cpu(parms->o_key) : 0; in mlxsw_sp_ipip_parms6_okey()
72 mlxsw_sp_ipip_parms4_saddr(const struct ip_tunnel_parm *parms) in mlxsw_sp_ipip_parms4_saddr() argument
74 return (union mlxsw_sp_l3addr) { .addr4 = parms->iph.saddr }; in mlxsw_sp_ipip_parms4_saddr()
78 mlxsw_sp_ipip_parms6_saddr(const struct __ip6_tnl_parm *parms) in mlxsw_sp_ipip_parms6_saddr() argument
80 return (union mlxsw_sp_l3addr) { .addr6 = parms->laddr }; in mlxsw_sp_ipip_parms6_saddr()
84 mlxsw_sp_ipip_parms4_daddr(const struct ip_tunnel_parm *parms) in mlxsw_sp_ipip_parms4_daddr() argument
86 return (union mlxsw_sp_l3addr) { .addr4 = parms->iph.daddr }; in mlxsw_sp_ipip_parms4_daddr()
90 mlxsw_sp_ipip_parms6_daddr(const struct __ip6_tnl_parm *parms) in mlxsw_sp_ipip_parms6_daddr() argument
92 return (union mlxsw_sp_l3addr) { .addr6 = parms->raddr }; in mlxsw_sp_ipip_parms6_daddr()
153 struct ip_tunnel_parm parms = mlxsw_sp_ipip_netdev_parms4(ol_dev); in mlxsw_sp_ipip_netdev_parms_init_gre4() local
157 .saddr = mlxsw_sp_ipip_parms4_saddr(&parms), in mlxsw_sp_ipip_netdev_parms_init_gre4()
158 .daddr = mlxsw_sp_ipip_parms4_daddr(&parms), in mlxsw_sp_ipip_netdev_parms_init_gre4()
159 .link = parms.link, in mlxsw_sp_ipip_netdev_parms_init_gre4()
160 .ikey = mlxsw_sp_ipip_parms4_ikey(&parms), in mlxsw_sp_ipip_netdev_parms_init_gre4()
161 .okey = mlxsw_sp_ipip_parms4_okey(&parms), in mlxsw_sp_ipip_netdev_parms_init_gre4()
191 struct ip_tunnel_parm parms; in mlxsw_sp_ipip_decap_config_gre4() local
197 parms = mlxsw_sp_ipip_netdev_parms4(ipip_entry->ol_dev); in mlxsw_sp_ipip_decap_config_gre4()
198 has_ikey = mlxsw_sp_ipip_parms4_has_ikey(&parms); in mlxsw_sp_ipip_decap_config_gre4()
199 ikey = mlxsw_sp_ipip_parms4_ikey(&parms); in mlxsw_sp_ipip_decap_config_gre4()
242 bool inherit_ttl = tunnel->parms.iph.ttl == 0; in mlxsw_sp_ipip_can_offload_gre4()
243 bool inherit_tos = tunnel->parms.iph.tos & 0x1; in mlxsw_sp_ipip_can_offload_gre4()
245 return (tunnel->parms.i_flags & ~okflags) == 0 && in mlxsw_sp_ipip_can_offload_gre4()
246 (tunnel->parms.o_flags & ~okflags) == 0 && in mlxsw_sp_ipip_can_offload_gre4()
255 struct ip_tunnel_parm parms = mlxsw_sp_ipip_netdev_parms4(ol_dev); in mlxsw_sp_ipip_ol_loopback_config_gre4() local
258 lb_ipipt = mlxsw_sp_ipip_parms4_has_okey(&parms) ? in mlxsw_sp_ipip_ol_loopback_config_gre4()
263 .okey = mlxsw_sp_ipip_parms4_okey(&parms), in mlxsw_sp_ipip_ol_loopback_config_gre4()
276 const struct mlxsw_sp_ipip_parms *old_parms = &ipip_entry->parms; in mlxsw_sp_ipip_ol_netdev_change_gre()
322 ipip_entry->parms = *new_parms; in mlxsw_sp_ipip_ol_netdev_change_gre()
368 struct mlxsw_sp_ipip_parms parms = {0}; in mlxsw_sp1_ipip_netdev_parms_init_gre6() local
371 return parms; in mlxsw_sp1_ipip_netdev_parms_init_gre6()
454 struct __ip6_tnl_parm parms = mlxsw_sp_ipip_netdev_parms6(ol_dev); in mlxsw_sp2_ipip_netdev_parms_init_gre6() local
458 .saddr = mlxsw_sp_ipip_parms6_saddr(&parms), in mlxsw_sp2_ipip_netdev_parms_init_gre6()
459 .daddr = mlxsw_sp_ipip_parms6_daddr(&parms), in mlxsw_sp2_ipip_netdev_parms_init_gre6()
460 .link = parms.link, in mlxsw_sp2_ipip_netdev_parms_init_gre6()
461 .ikey = mlxsw_sp_ipip_parms6_ikey(&parms), in mlxsw_sp2_ipip_netdev_parms_init_gre6()
462 .okey = mlxsw_sp_ipip_parms6_okey(&parms), in mlxsw_sp2_ipip_netdev_parms_init_gre6()
492 struct __ip6_tnl_parm parms; in mlxsw_sp2_ipip_decap_config_gre6() local
497 parms = mlxsw_sp_ipip_netdev_parms6(ipip_entry->ol_dev); in mlxsw_sp2_ipip_decap_config_gre6()
498 has_ikey = mlxsw_sp_ipip_parms6_has_ikey(&parms); in mlxsw_sp2_ipip_decap_config_gre6()
499 ikey = mlxsw_sp_ipip_parms6_ikey(&parms); in mlxsw_sp2_ipip_decap_config_gre6()
540 struct __ip6_tnl_parm parms = mlxsw_sp_ipip_netdev_parms6(ol_dev); in mlxsw_sp2_ipip_ol_loopback_config_gre6() local
543 lb_ipipt = mlxsw_sp_ipip_parms6_has_okey(&parms) ? in mlxsw_sp2_ipip_ol_loopback_config_gre6()
548 .okey = mlxsw_sp_ipip_parms6_okey(&parms), in mlxsw_sp2_ipip_ol_loopback_config_gre6()
690 return dev_get_by_index_rcu(net, tun4->parms.link); in mlxsw_sp_ipip_netdev_ul_dev_get()
693 return dev_get_by_index_rcu(net, tun6->parms.link); in mlxsw_sp_ipip_netdev_ul_dev_get()