Lines Matching refs:vrf_dev
142 static void vrf_tx_error(struct net_device *vrf_dev, struct sk_buff *skb) in vrf_tx_error() argument
144 vrf_dev->stats.tx_errors++; in vrf_tx_error()
538 struct net_device *vrf_dev) in vrf_process_v4_outbound() argument
543 struct net *net = dev_net(vrf_dev); in vrf_process_v4_outbound()
553 fl4.flowi4_oif = vrf_dev->ifindex; in vrf_process_v4_outbound()
571 if (rt->dst.dev == vrf_dev) in vrf_process_v4_outbound()
572 return vrf_local_xmit(skb, vrf_dev, &rt->dst); in vrf_process_v4_outbound()
587 vrf_dev->stats.tx_errors++; in vrf_process_v4_outbound()
594 vrf_tx_error(vrf_dev, skb); in vrf_process_v4_outbound()
632 struct net_device *vrf_dev = skb->dev; in vrf_finish_direct() local
634 if (!list_empty(&vrf_dev->ptype_all) && in vrf_finish_direct()
638 ether_addr_copy(eth->h_source, vrf_dev->dev_addr); in vrf_finish_direct()
643 dev_queue_xmit_nit(skb, vrf_dev); in vrf_finish_direct()
700 static struct sk_buff *vrf_ip6_out_redirect(struct net_device *vrf_dev, in vrf_ip6_out_redirect() argument
703 struct net_vrf *vrf = netdev_priv(vrf_dev); in vrf_ip6_out_redirect()
718 vrf_tx_error(vrf_dev, skb); in vrf_ip6_out_redirect()
765 static struct sk_buff *vrf_ip6_out_direct(struct net_device *vrf_dev, in vrf_ip6_out_direct() argument
769 struct net *net = dev_net(vrf_dev); in vrf_ip6_out_direct()
772 skb->dev = vrf_dev; in vrf_ip6_out_direct()
775 skb, NULL, vrf_dev, vrf_ip6_out_direct_finish); in vrf_ip6_out_direct()
786 static struct sk_buff *vrf_ip6_out(struct net_device *vrf_dev, in vrf_ip6_out() argument
796 if (qdisc_tx_is_default(vrf_dev) || in vrf_ip6_out()
798 return vrf_ip6_out_direct(vrf_dev, sk, skb); in vrf_ip6_out()
800 return vrf_ip6_out_redirect(vrf_dev, skb); in vrf_ip6_out()
855 static struct sk_buff *vrf_ip6_out(struct net_device *vrf_dev, in vrf_ip6_out() argument
937 static struct sk_buff *vrf_ip_out_redirect(struct net_device *vrf_dev, in vrf_ip_out_redirect() argument
940 struct net_vrf *vrf = netdev_priv(vrf_dev); in vrf_ip_out_redirect()
955 vrf_tx_error(vrf_dev, skb); in vrf_ip_out_redirect()
1002 static struct sk_buff *vrf_ip_out_direct(struct net_device *vrf_dev, in vrf_ip_out_direct() argument
1006 struct net *net = dev_net(vrf_dev); in vrf_ip_out_direct()
1009 skb->dev = vrf_dev; in vrf_ip_out_direct()
1012 skb, NULL, vrf_dev, vrf_ip_out_direct_finish); in vrf_ip_out_direct()
1023 static struct sk_buff *vrf_ip_out(struct net_device *vrf_dev, in vrf_ip_out() argument
1034 if (qdisc_tx_is_default(vrf_dev) || in vrf_ip_out()
1036 return vrf_ip_out_direct(vrf_dev, sk, skb); in vrf_ip_out()
1038 return vrf_ip_out_redirect(vrf_dev, skb); in vrf_ip_out()
1042 static struct sk_buff *vrf_l3_out(struct net_device *vrf_dev, in vrf_l3_out() argument
1049 return vrf_ip_out(vrf_dev, sk, skb); in vrf_l3_out()
1051 return vrf_ip6_out(vrf_dev, sk, skb); in vrf_l3_out()
1305 static void vrf_ip6_input_dst(struct sk_buff *skb, struct net_device *vrf_dev, in vrf_ip6_input_dst() argument
1317 struct net *net = dev_net(vrf_dev); in vrf_ip6_input_dst()
1320 rt6 = vrf_ip6_route_lookup(net, vrf_dev, &fl6, ifindex, skb, in vrf_ip6_input_dst()
1331 static struct sk_buff *vrf_ip6_rcv(struct net_device *vrf_dev, in vrf_ip6_rcv() argument
1344 skb->dev = vrf_dev; in vrf_ip6_rcv()
1345 skb->skb_iif = vrf_dev->ifindex; in vrf_ip6_rcv()
1351 vrf_ip6_input_dst(skb, vrf_dev, orig_iif); in vrf_ip6_rcv()
1358 vrf_rx_stats(vrf_dev, skb->len); in vrf_ip6_rcv()
1359 skb->dev = vrf_dev; in vrf_ip6_rcv()
1360 skb->skb_iif = vrf_dev->ifindex; in vrf_ip6_rcv()
1362 if (!list_empty(&vrf_dev->ptype_all)) { in vrf_ip6_rcv()
1364 dev_queue_xmit_nit(skb, vrf_dev); in vrf_ip6_rcv()
1372 vrf_ip6_input_dst(skb, vrf_dev, orig_iif); in vrf_ip6_rcv()
1374 skb = vrf_rcv_nfhook(NFPROTO_IPV6, NF_INET_PRE_ROUTING, skb, vrf_dev); in vrf_ip6_rcv()
1380 static struct sk_buff *vrf_ip6_rcv(struct net_device *vrf_dev, in vrf_ip6_rcv() argument
1387 static struct sk_buff *vrf_ip_rcv(struct net_device *vrf_dev, in vrf_ip_rcv() argument
1390 skb->dev = vrf_dev; in vrf_ip_rcv()
1391 skb->skb_iif = vrf_dev->ifindex; in vrf_ip_rcv()
1405 vrf_rx_stats(vrf_dev, skb->len); in vrf_ip_rcv()
1407 if (!list_empty(&vrf_dev->ptype_all)) { in vrf_ip_rcv()
1409 dev_queue_xmit_nit(skb, vrf_dev); in vrf_ip_rcv()
1413 skb = vrf_rcv_nfhook(NFPROTO_IPV4, NF_INET_PRE_ROUTING, skb, vrf_dev); in vrf_ip_rcv()
1419 static struct sk_buff *vrf_l3_rcv(struct net_device *vrf_dev, in vrf_l3_rcv() argument
1425 return vrf_ip_rcv(vrf_dev, skb); in vrf_l3_rcv()
1427 return vrf_ip6_rcv(vrf_dev, skb); in vrf_l3_rcv()
1753 const struct net_device *vrf_dev, in vrf_fill_slave_info() argument
1756 struct net_vrf *vrf = netdev_priv(vrf_dev); in vrf_fill_slave_info()
1793 struct net_device *vrf_dev; in vrf_device_event() local
1798 vrf_dev = netdev_master_upper_dev_get(dev); in vrf_device_event()
1799 vrf_del_slave(vrf_dev, dev); in vrf_device_event()