Lines Matching refs:vrf
182 struct net_vrf *vrf; in vrf_map_elem_get_vrf_ifindex() local
187 vrf = list_first_entry(me_head, struct net_vrf, me_list); in vrf_map_elem_get_vrf_ifindex()
189 return vrf->ifindex; in vrf_map_elem_get_vrf_ifindex()
261 struct net_vrf *vrf = netdev_priv(dev); in vrf_map_register_dev() local
263 u32 table_id = vrf->tb_id; in vrf_map_register_dev()
302 list_add(&vrf->me_list, &me->vrf_list); in vrf_map_register_dev()
320 struct net_vrf *vrf = netdev_priv(dev); in vrf_map_unregister_dev() local
321 u32 table_id = vrf->tb_id; in vrf_map_unregister_dev()
331 list_del(&vrf->me_list); in vrf_map_unregister_dev()
692 struct net_vrf *vrf = netdev_priv(vrf_dev); in vrf_ip6_out_redirect() local
698 rt6 = rcu_dereference(vrf->rt6); in vrf_ip6_out_redirect()
793 static void vrf_rt6_release(struct net_device *dev, struct net_vrf *vrf) in vrf_rt6_release() argument
795 struct rt6_info *rt6 = rtnl_dereference(vrf->rt6); in vrf_rt6_release()
799 RCU_INIT_POINTER(vrf->rt6, NULL); in vrf_rt6_release()
817 struct net_vrf *vrf = netdev_priv(dev); in vrf_rt6_create() local
826 vrf->fib6_table = fib6_new_table(net, vrf->tb_id); in vrf_rt6_create()
827 if (!vrf->fib6_table) in vrf_rt6_create()
837 rcu_assign_pointer(vrf->rt6, rt6); in vrf_rt6_create()
851 static void vrf_rt6_release(struct net_device *dev, struct net_vrf *vrf) in vrf_rt6_release() argument
922 struct net_vrf *vrf = netdev_priv(vrf_dev); in vrf_ip_out_redirect() local
928 rth = rcu_dereference(vrf->rth); in vrf_ip_out_redirect()
1040 static void vrf_rtable_release(struct net_device *dev, struct net_vrf *vrf) in vrf_rtable_release() argument
1042 struct rtable *rth = rtnl_dereference(vrf->rth); in vrf_rtable_release()
1046 RCU_INIT_POINTER(vrf->rth, NULL); in vrf_rtable_release()
1063 struct net_vrf *vrf = netdev_priv(dev); in vrf_rtable_create() local
1066 if (!fib_new_table(dev_net(dev), vrf->tb_id)) in vrf_rtable_create()
1076 rcu_assign_pointer(vrf->rth, rth); in vrf_rtable_create()
1165 struct net_vrf *vrf = netdev_priv(dev); in vrf_dev_uninit() local
1167 vrf_rtable_release(dev, vrf); in vrf_dev_uninit()
1168 vrf_rt6_release(dev, vrf); in vrf_dev_uninit()
1173 struct net_vrf *vrf = netdev_priv(dev); in vrf_dev_init() local
1190 vrf_rtable_release(dev, vrf); in vrf_dev_init()
1207 struct net_vrf *vrf = netdev_priv(dev); in vrf_fib_table() local
1209 return vrf->tb_id; in vrf_fib_table()
1328 struct net_vrf *vrf = netdev_priv(dev); in vrf_ip6_route_lookup() local
1330 return ip6_pol_route(net, vrf->fib6_table, ifindex, fl6, skb, flags); in vrf_ip6_route_lookup()
1726 struct net_vrf *vrf = netdev_priv(dev); in vrf_newlink() local
1737 vrf->tb_id = nla_get_u32(data[IFLA_VRF_TABLE]); in vrf_newlink()
1738 if (vrf->tb_id == RT_TABLE_UNSPEC) { in vrf_newlink()
1754 vrf->ifindex = dev->ifindex; in vrf_newlink()
1788 struct net_vrf *vrf = netdev_priv(dev); in vrf_fillinfo() local
1790 return nla_put_u32(skb, IFLA_VRF_TABLE, vrf->tb_id); in vrf_fillinfo()
1803 struct net_vrf *vrf = netdev_priv(vrf_dev); in vrf_fill_slave_info() local
1805 if (nla_put_u32(skb, IFLA_VRF_PORT_TABLE, vrf->tb_id)) in vrf_fill_slave_info()