aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/neighbour.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-07-02 05:21:03 -0400
committerDavid S. Miller <davem@davemloft.net>2012-07-05 04:03:06 -0400
commit5110effee8fde2edfacac9cd12a9960ab2dc39ea (patch)
treef74fff97af20ffdf805fedc56f0c8f88bbef2df7 /include/net/neighbour.h
parent60d354ebebd9d0f760cb6c3b9f53a7ade0f8cd0e (diff)
net: Do delayed neigh confirmation.
When a dst_confirm() happens, mark the confirmation as pending in the dst. Then on the next packet out, when we have the neigh in-hand, do the update. This removes the dependency in dst_confirm() of dst's having an attached neigh. While we're here, remove the explicit 'dst' NULL check, all except 2 or 3 call sites ensure it's not NULL. So just fix those cases up. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/neighbour.h')
-rw-r--r--include/net/neighbour.h15
1 files changed, 0 insertions, 15 deletions
diff --git a/include/net/neighbour.h b/include/net/neighbour.h
index e1d18bdeebb8..344d8988842a 100644
--- a/include/net/neighbour.h
+++ b/include/net/neighbour.h
@@ -309,12 +309,6 @@ static inline struct neighbour * neigh_clone(struct neighbour *neigh)
309 309
310#define neigh_hold(n) atomic_inc(&(n)->refcnt) 310#define neigh_hold(n) atomic_inc(&(n)->refcnt)
311 311
312static inline void neigh_confirm(struct neighbour *neigh)
313{
314 if (neigh)
315 neigh->confirmed = jiffies;
316}
317
318static inline int neigh_event_send(struct neighbour *neigh, struct sk_buff *skb) 312static inline int neigh_event_send(struct neighbour *neigh, struct sk_buff *skb)
319{ 313{
320 unsigned long now = jiffies; 314 unsigned long now = jiffies;
@@ -358,15 +352,6 @@ static inline int neigh_hh_output(struct hh_cache *hh, struct sk_buff *skb)
358 return dev_queue_xmit(skb); 352 return dev_queue_xmit(skb);
359} 353}
360 354
361static inline int neigh_output(struct neighbour *n, struct sk_buff *skb)
362{
363 struct hh_cache *hh = &n->hh;
364 if ((n->nud_state & NUD_CONNECTED) && hh->hh_len)
365 return neigh_hh_output(hh, skb);
366 else
367 return n->output(n, skb);
368}
369
370static inline struct neighbour * 355static inline struct neighbour *
371__neigh_lookup(struct neigh_table *tbl, const void *pkey, struct net_device *dev, int creat) 356__neigh_lookup(struct neigh_table *tbl, const void *pkey, struct net_device *dev, int creat)
372{ 357{