]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - include/net/neighbour.h
net: Do delayed neigh confirmation.
[mirror_ubuntu-zesty-kernel.git] / include / net / neighbour.h
index 6cdfeedb650b6620c1915ec87608b63a2c3605ba..344d8988842a527fbec3bffc674cda865f67b15c 100644 (file)
@@ -202,9 +202,16 @@ extern struct neighbour *  neigh_lookup(struct neigh_table *tbl,
 extern struct neighbour *      neigh_lookup_nodev(struct neigh_table *tbl,
                                                   struct net *net,
                                                   const void *pkey);
-extern struct neighbour *      neigh_create(struct neigh_table *tbl,
+extern struct neighbour *      __neigh_create(struct neigh_table *tbl,
+                                              const void *pkey,
+                                              struct net_device *dev,
+                                              bool want_ref);
+static inline struct neighbour *neigh_create(struct neigh_table *tbl,
                                             const void *pkey,
-                                            struct net_device *dev);
+                                            struct net_device *dev)
+{
+       return __neigh_create(tbl, pkey, dev, true);
+}
 extern void                    neigh_destroy(struct neighbour *neigh);
 extern int                     __neigh_event_send(struct neighbour *neigh, struct sk_buff *skb);
 extern int                     neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new, 
@@ -302,12 +309,6 @@ static inline struct neighbour * neigh_clone(struct neighbour *neigh)
 
 #define neigh_hold(n)  atomic_inc(&(n)->refcnt)
 
-static inline void neigh_confirm(struct neighbour *neigh)
-{
-       if (neigh)
-               neigh->confirmed = jiffies;
-}
-
 static inline int neigh_event_send(struct neighbour *neigh, struct sk_buff *skb)
 {
        unsigned long now = jiffies;
@@ -351,15 +352,6 @@ static inline int neigh_hh_output(struct hh_cache *hh, struct sk_buff *skb)
        return dev_queue_xmit(skb);
 }
 
-static inline int neigh_output(struct neighbour *n, struct sk_buff *skb)
-{
-       struct hh_cache *hh = &n->hh;
-       if ((n->nud_state & NUD_CONNECTED) && hh->hh_len)
-               return neigh_hh_output(hh, skb);
-       else
-               return n->output(n, skb);
-}
-
 static inline struct neighbour *
 __neigh_lookup(struct neigh_table *tbl, const void *pkey, struct net_device *dev, int creat)
 {