Lines Matching refs:vrf_dev

135 static void vrf_tx_error(struct net_device *vrf_dev, struct sk_buff *skb)  in vrf_tx_error()  argument
137 vrf_dev->stats.tx_errors++; in vrf_tx_error()
507 struct net_device *vrf_dev) in vrf_process_v4_outbound() argument
512 struct net *net = dev_net(vrf_dev); in vrf_process_v4_outbound()
522 fl4.flowi4_l3mdev = vrf_dev->ifindex; in vrf_process_v4_outbound()
539 if (rt->dst.dev == vrf_dev) in vrf_process_v4_outbound()
540 return vrf_local_xmit(skb, vrf_dev, &rt->dst); in vrf_process_v4_outbound()
555 vrf_dev->stats.tx_errors++; in vrf_process_v4_outbound()
562 vrf_tx_error(vrf_dev, skb); in vrf_process_v4_outbound()
601 struct net_device *vrf_dev = skb->dev; in vrf_finish_direct() local
603 if (!list_empty(&vrf_dev->ptype_all) && in vrf_finish_direct()
607 ether_addr_copy(eth->h_source, vrf_dev->dev_addr); in vrf_finish_direct()
612 dev_queue_xmit_nit(skb, vrf_dev); in vrf_finish_direct()
669 static struct sk_buff *vrf_ip6_out_redirect(struct net_device *vrf_dev, in vrf_ip6_out_redirect() argument
672 struct net_vrf *vrf = netdev_priv(vrf_dev); in vrf_ip6_out_redirect()
687 vrf_tx_error(vrf_dev, skb); in vrf_ip6_out_redirect()
734 static struct sk_buff *vrf_ip6_out_direct(struct net_device *vrf_dev, in vrf_ip6_out_direct() argument
738 struct net *net = dev_net(vrf_dev); in vrf_ip6_out_direct()
741 skb->dev = vrf_dev; in vrf_ip6_out_direct()
744 skb, NULL, vrf_dev, vrf_ip6_out_direct_finish); in vrf_ip6_out_direct()
755 static struct sk_buff *vrf_ip6_out(struct net_device *vrf_dev, in vrf_ip6_out() argument
765 if (qdisc_tx_is_default(vrf_dev) || in vrf_ip6_out()
767 return vrf_ip6_out_direct(vrf_dev, sk, skb); in vrf_ip6_out()
769 return vrf_ip6_out_redirect(vrf_dev, skb); in vrf_ip6_out()
824 static struct sk_buff *vrf_ip6_out(struct net_device *vrf_dev, in vrf_ip6_out() argument
899 static struct sk_buff *vrf_ip_out_redirect(struct net_device *vrf_dev, in vrf_ip_out_redirect() argument
902 struct net_vrf *vrf = netdev_priv(vrf_dev); in vrf_ip_out_redirect()
917 vrf_tx_error(vrf_dev, skb); in vrf_ip_out_redirect()
964 static struct sk_buff *vrf_ip_out_direct(struct net_device *vrf_dev, in vrf_ip_out_direct() argument
968 struct net *net = dev_net(vrf_dev); in vrf_ip_out_direct()
971 skb->dev = vrf_dev; in vrf_ip_out_direct()
974 skb, NULL, vrf_dev, vrf_ip_out_direct_finish); in vrf_ip_out_direct()
985 static struct sk_buff *vrf_ip_out(struct net_device *vrf_dev, in vrf_ip_out() argument
996 if (qdisc_tx_is_default(vrf_dev) || in vrf_ip_out()
998 return vrf_ip_out_direct(vrf_dev, sk, skb); in vrf_ip_out()
1000 return vrf_ip_out_redirect(vrf_dev, skb); in vrf_ip_out()
1004 static struct sk_buff *vrf_l3_out(struct net_device *vrf_dev, in vrf_l3_out() argument
1011 return vrf_ip_out(vrf_dev, sk, skb); in vrf_l3_out()
1013 return vrf_ip6_out(vrf_dev, sk, skb); in vrf_l3_out()
1210 struct net_device *vrf_dev, u16 proto) in vrf_prepare_mac_header() argument
1218 err = skb_cow_head(skb, LL_RESERVED_SPACE(vrf_dev)); in vrf_prepare_mac_header()
1232 ether_addr_copy(eth->h_dest, vrf_dev->dev_addr); in vrf_prepare_mac_header()
1233 ether_addr_copy(eth->h_source, vrf_dev->dev_addr); in vrf_prepare_mac_header()
1256 struct net_device *vrf_dev, in vrf_add_mac_header_if_unset() argument
1262 return vrf_prepare_mac_header(skb, vrf_dev, proto); in vrf_add_mac_header_if_unset()
1312 static void vrf_ip6_input_dst(struct sk_buff *skb, struct net_device *vrf_dev, in vrf_ip6_input_dst() argument
1324 struct net *net = dev_net(vrf_dev); in vrf_ip6_input_dst()
1327 rt6 = vrf_ip6_route_lookup(net, vrf_dev, &fl6, ifindex, skb, in vrf_ip6_input_dst()
1338 static struct sk_buff *vrf_ip6_rcv(struct net_device *vrf_dev, in vrf_ip6_rcv() argument
1351 skb->dev = vrf_dev; in vrf_ip6_rcv()
1352 skb->skb_iif = vrf_dev->ifindex; in vrf_ip6_rcv()
1358 vrf_ip6_input_dst(skb, vrf_dev, orig_iif); in vrf_ip6_rcv()
1367 vrf_rx_stats(vrf_dev, skb->len); in vrf_ip6_rcv()
1368 skb->dev = vrf_dev; in vrf_ip6_rcv()
1369 skb->skb_iif = vrf_dev->ifindex; in vrf_ip6_rcv()
1371 if (!list_empty(&vrf_dev->ptype_all)) { in vrf_ip6_rcv()
1374 err = vrf_add_mac_header_if_unset(skb, vrf_dev, in vrf_ip6_rcv()
1379 dev_queue_xmit_nit(skb, vrf_dev); in vrf_ip6_rcv()
1388 vrf_ip6_input_dst(skb, vrf_dev, orig_iif); in vrf_ip6_rcv()
1390 skb = vrf_rcv_nfhook(NFPROTO_IPV6, NF_INET_PRE_ROUTING, skb, vrf_dev); in vrf_ip6_rcv()
1396 static struct sk_buff *vrf_ip6_rcv(struct net_device *vrf_dev, in vrf_ip6_rcv() argument
1403 static struct sk_buff *vrf_ip_rcv(struct net_device *vrf_dev, in vrf_ip_rcv() argument
1408 skb->dev = vrf_dev; in vrf_ip_rcv()
1409 skb->skb_iif = vrf_dev->ifindex; in vrf_ip_rcv()
1423 vrf_rx_stats(vrf_dev, skb->len); in vrf_ip_rcv()
1425 if (!list_empty(&vrf_dev->ptype_all)) { in vrf_ip_rcv()
1428 err = vrf_add_mac_header_if_unset(skb, vrf_dev, ETH_P_IP, in vrf_ip_rcv()
1432 dev_queue_xmit_nit(skb, vrf_dev); in vrf_ip_rcv()
1437 skb = vrf_rcv_nfhook(NFPROTO_IPV4, NF_INET_PRE_ROUTING, skb, vrf_dev); in vrf_ip_rcv()
1443 static struct sk_buff *vrf_l3_rcv(struct net_device *vrf_dev, in vrf_l3_rcv() argument
1449 return vrf_ip_rcv(vrf_dev, skb); in vrf_l3_rcv()
1451 return vrf_ip6_rcv(vrf_dev, skb); in vrf_l3_rcv()
1779 const struct net_device *vrf_dev, in vrf_fill_slave_info() argument
1782 struct net_vrf *vrf = netdev_priv(vrf_dev); in vrf_fill_slave_info()
1819 struct net_device *vrf_dev; in vrf_device_event() local
1824 vrf_dev = netdev_master_upper_dev_get(dev); in vrf_device_event()
1825 vrf_del_slave(vrf_dev, dev); in vrf_device_event()