macvlan.c (4bc71cb983fd2844e603bf633df2bb53385182d2) | macvlan.c (cb2d0f3e968bff7c6d262aca3e3ab8d4184e69b2) |
---|---|
1/* 2 * Copyright (c) 2007 Patrick McHardy <kaber@trash.net> 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License as 6 * published by the Free Software Foundation; either version 2 of 7 * the License, or (at your option) any later version. 8 * --- 225 unchanged lines hidden (view full) --- 234 if (is_multicast_ether_addr(eth->h_dest)) { 235 macvlan_broadcast(skb, port, dev, MACVLAN_MODE_BRIDGE); 236 goto xmit_world; 237 } 238 239 dest = macvlan_hash_lookup(port, eth->h_dest); 240 if (dest && dest->mode == MACVLAN_MODE_BRIDGE) { 241 /* send to lowerdev first for its network taps */ | 1/* 2 * Copyright (c) 2007 Patrick McHardy <kaber@trash.net> 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License as 6 * published by the Free Software Foundation; either version 2 of 7 * the License, or (at your option) any later version. 8 * --- 225 unchanged lines hidden (view full) --- 234 if (is_multicast_ether_addr(eth->h_dest)) { 235 macvlan_broadcast(skb, port, dev, MACVLAN_MODE_BRIDGE); 236 goto xmit_world; 237 } 238 239 dest = macvlan_hash_lookup(port, eth->h_dest); 240 if (dest && dest->mode == MACVLAN_MODE_BRIDGE) { 241 /* send to lowerdev first for its network taps */ |
242 vlan->forward(vlan->lowerdev, skb); | 242 dev_forward_skb(vlan->lowerdev, skb); |
243 244 return NET_XMIT_SUCCESS; 245 } 246 } 247 248xmit_world: 249 skb->ip_summed = ip_summed; 250 skb_set_dev(skb, vlan->lowerdev); --- 287 unchanged lines hidden (view full) --- 538 snprintf(drvinfo->driver, 32, "macvlan"); 539 snprintf(drvinfo->version, 32, "0.1"); 540} 541 542static int macvlan_ethtool_get_settings(struct net_device *dev, 543 struct ethtool_cmd *cmd) 544{ 545 const struct macvlan_dev *vlan = netdev_priv(dev); | 243 244 return NET_XMIT_SUCCESS; 245 } 246 } 247 248xmit_world: 249 skb->ip_summed = ip_summed; 250 skb_set_dev(skb, vlan->lowerdev); --- 287 unchanged lines hidden (view full) --- 538 snprintf(drvinfo->driver, 32, "macvlan"); 539 snprintf(drvinfo->version, 32, "0.1"); 540} 541 542static int macvlan_ethtool_get_settings(struct net_device *dev, 543 struct ethtool_cmd *cmd) 544{ 545 const struct macvlan_dev *vlan = netdev_priv(dev); |
546 547 return __ethtool_get_settings(vlan->lowerdev, cmd); | 546 return dev_ethtool_get_settings(vlan->lowerdev, cmd); |
548} 549 550static const struct ethtool_ops macvlan_ethtool_ops = { 551 .get_link = ethtool_op_get_link, 552 .get_settings = macvlan_ethtool_get_settings, 553 .get_drvinfo = macvlan_ethtool_get_drvinfo, 554}; 555 556static const struct net_device_ops macvlan_netdev_ops = { 557 .ndo_init = macvlan_init, 558 .ndo_uninit = macvlan_uninit, 559 .ndo_open = macvlan_open, 560 .ndo_stop = macvlan_stop, 561 .ndo_start_xmit = macvlan_start_xmit, 562 .ndo_change_mtu = macvlan_change_mtu, 563 .ndo_change_rx_flags = macvlan_change_rx_flags, 564 .ndo_set_mac_address = macvlan_set_mac_address, | 547} 548 549static const struct ethtool_ops macvlan_ethtool_ops = { 550 .get_link = ethtool_op_get_link, 551 .get_settings = macvlan_ethtool_get_settings, 552 .get_drvinfo = macvlan_ethtool_get_drvinfo, 553}; 554 555static const struct net_device_ops macvlan_netdev_ops = { 556 .ndo_init = macvlan_init, 557 .ndo_uninit = macvlan_uninit, 558 .ndo_open = macvlan_open, 559 .ndo_stop = macvlan_stop, 560 .ndo_start_xmit = macvlan_start_xmit, 561 .ndo_change_mtu = macvlan_change_mtu, 562 .ndo_change_rx_flags = macvlan_change_rx_flags, 563 .ndo_set_mac_address = macvlan_set_mac_address, |
565 .ndo_set_rx_mode = macvlan_set_multicast_list, | 564 .ndo_set_multicast_list = macvlan_set_multicast_list, |
566 .ndo_get_stats64 = macvlan_dev_get_stats64, 567 .ndo_validate_addr = eth_validate_addr, 568 .ndo_vlan_rx_add_vid = macvlan_vlan_rx_add_vid, 569 .ndo_vlan_rx_kill_vid = macvlan_vlan_rx_kill_vid, 570}; 571 572void macvlan_common_setup(struct net_device *dev) 573{ --- 300 unchanged lines hidden --- | 565 .ndo_get_stats64 = macvlan_dev_get_stats64, 566 .ndo_validate_addr = eth_validate_addr, 567 .ndo_vlan_rx_add_vid = macvlan_vlan_rx_add_vid, 568 .ndo_vlan_rx_kill_vid = macvlan_vlan_rx_kill_vid, 569}; 570 571void macvlan_common_setup(struct net_device *dev) 572{ --- 300 unchanged lines hidden --- |