diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2008-11-20 23:14:53 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-20 23:14:53 -0500 |
commit | 008298231abbeb91bc7be9e8b078607b816d1a4a (patch) | |
tree | 8cb0c17720086ef97c614b96241f06aa63ce8511 /drivers/net/macvlan.c | |
parent | 6ab33d51713d6d60c7677c0d020910a8cb37e513 (diff) |
netdev: add more functions to netdevice ops
This patch moves neigh_setup and hard_start_xmit into the network device ops
structure. For bisection, fix all the previously converted drivers as well.
Bonding driver took the biggest hit on this.
Added a prefetch of the hard_start_xmit in the fast path to try and reduce
any impact this would have.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/macvlan.c')
-rw-r--r-- | drivers/net/macvlan.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c index d00ea444e0a3..e8879217a1d2 100644 --- a/drivers/net/macvlan.c +++ b/drivers/net/macvlan.c | |||
@@ -140,7 +140,7 @@ static struct sk_buff *macvlan_handle_frame(struct sk_buff *skb) | |||
140 | return NULL; | 140 | return NULL; |
141 | } | 141 | } |
142 | 142 | ||
143 | static int macvlan_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | 143 | static int macvlan_start_xmit(struct sk_buff *skb, struct net_device *dev) |
144 | { | 144 | { |
145 | const struct macvlan_dev *vlan = netdev_priv(dev); | 145 | const struct macvlan_dev *vlan = netdev_priv(dev); |
146 | unsigned int len = skb->len; | 146 | unsigned int len = skb->len; |
@@ -365,6 +365,7 @@ static const struct net_device_ops macvlan_netdev_ops = { | |||
365 | .ndo_init = macvlan_init, | 365 | .ndo_init = macvlan_init, |
366 | .ndo_open = macvlan_open, | 366 | .ndo_open = macvlan_open, |
367 | .ndo_stop = macvlan_stop, | 367 | .ndo_stop = macvlan_stop, |
368 | .ndo_start_xmit = macvlan_start_xmit, | ||
368 | .ndo_change_mtu = macvlan_change_mtu, | 369 | .ndo_change_mtu = macvlan_change_mtu, |
369 | .ndo_change_rx_flags = macvlan_change_rx_flags, | 370 | .ndo_change_rx_flags = macvlan_change_rx_flags, |
370 | .ndo_set_mac_address = macvlan_set_mac_address, | 371 | .ndo_set_mac_address = macvlan_set_mac_address, |
@@ -377,7 +378,6 @@ static void macvlan_setup(struct net_device *dev) | |||
377 | ether_setup(dev); | 378 | ether_setup(dev); |
378 | 379 | ||
379 | dev->netdev_ops = &macvlan_netdev_ops; | 380 | dev->netdev_ops = &macvlan_netdev_ops; |
380 | dev->hard_start_xmit = macvlan_hard_start_xmit; | ||
381 | dev->destructor = free_netdev; | 381 | dev->destructor = free_netdev; |
382 | dev->header_ops = &macvlan_hard_header_ops, | 382 | dev->header_ops = &macvlan_hard_header_ops, |
383 | dev->ethtool_ops = &macvlan_ethtool_ops; | 383 | dev->ethtool_ops = &macvlan_ethtool_ops; |