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 /net/core/neighbour.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 'net/core/neighbour.c')
-rw-r--r-- | net/core/neighbour.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index cca6a55909eb..9c3717a23cf7 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
@@ -1327,9 +1327,9 @@ struct neigh_parms *neigh_parms_alloc(struct net_device *dev, | |||
1327 | struct neigh_table *tbl) | 1327 | struct neigh_table *tbl) |
1328 | { | 1328 | { |
1329 | struct neigh_parms *p, *ref; | 1329 | struct neigh_parms *p, *ref; |
1330 | struct net *net; | 1330 | struct net *net = dev_net(dev); |
1331 | const struct net_device_ops *ops = dev->netdev_ops; | ||
1331 | 1332 | ||
1332 | net = dev_net(dev); | ||
1333 | ref = lookup_neigh_params(tbl, net, 0); | 1333 | ref = lookup_neigh_params(tbl, net, 0); |
1334 | if (!ref) | 1334 | if (!ref) |
1335 | return NULL; | 1335 | return NULL; |
@@ -1341,7 +1341,7 @@ struct neigh_parms *neigh_parms_alloc(struct net_device *dev, | |||
1341 | p->reachable_time = | 1341 | p->reachable_time = |
1342 | neigh_rand_reach_time(p->base_reachable_time); | 1342 | neigh_rand_reach_time(p->base_reachable_time); |
1343 | 1343 | ||
1344 | if (dev->neigh_setup && dev->neigh_setup(dev, p)) { | 1344 | if (ops->ndo_neigh_setup && ops->ndo_neigh_setup(dev, p)) { |
1345 | kfree(p); | 1345 | kfree(p); |
1346 | return NULL; | 1346 | return NULL; |
1347 | } | 1347 | } |