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/loopback.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/loopback.c')
-rw-r--r-- | drivers/net/loopback.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c index 958450124dec..b7d438a367f3 100644 --- a/drivers/net/loopback.c +++ b/drivers/net/loopback.c | |||
@@ -145,6 +145,7 @@ static void loopback_dev_free(struct net_device *dev) | |||
145 | 145 | ||
146 | static const struct net_device_ops loopback_ops = { | 146 | static const struct net_device_ops loopback_ops = { |
147 | .ndo_init = loopback_dev_init, | 147 | .ndo_init = loopback_dev_init, |
148 | .ndo_start_xmit= loopback_xmit, | ||
148 | .ndo_get_stats = loopback_get_stats, | 149 | .ndo_get_stats = loopback_get_stats, |
149 | }; | 150 | }; |
150 | 151 | ||
@@ -155,7 +156,6 @@ static const struct net_device_ops loopback_ops = { | |||
155 | static void loopback_setup(struct net_device *dev) | 156 | static void loopback_setup(struct net_device *dev) |
156 | { | 157 | { |
157 | dev->mtu = (16 * 1024) + 20 + 20 + 12; | 158 | dev->mtu = (16 * 1024) + 20 + 20 + 12; |
158 | dev->hard_start_xmit = loopback_xmit; | ||
159 | dev->hard_header_len = ETH_HLEN; /* 14 */ | 159 | dev->hard_header_len = ETH_HLEN; /* 14 */ |
160 | dev->addr_len = ETH_ALEN; /* 6 */ | 160 | dev->addr_len = ETH_ALEN; /* 6 */ |
161 | dev->tx_queue_len = 0; | 161 | dev->tx_queue_len = 0; |