Skip to content

Commit

Permalink
net: pending_confirm is not used anymore
Browse files Browse the repository at this point in the history
When same struct dst_entry can be used for many different
neighbours we can not use it for pending confirmations.
As last step, we can remove the pending_confirm flag.

Reported-by: YueHaibing <yuehaibing@huawei.com>
Fixes: 5110eff ("net: Do delayed neigh confirmation.")
Fixes: f2bb4be ("ipv4: Cache output routes in fib_info nexthops.")
Signed-off-by: Julian Anastasov <ja@ssi.bg>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Julian Anastasov authored and davem330 committed Feb 7, 2017
1 parent 0dec879 commit 51ce8bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
14 changes: 2 additions & 12 deletions include/net/dst.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ struct dst_entry {
#define DST_XFRM_QUEUE 0x0100
#define DST_METADATA 0x0200

unsigned short pending_confirm;

short error;

/* A non-zero value of dst->obsolete forces by-hand validation
Expand All @@ -78,6 +76,8 @@ struct dst_entry {
#define DST_OBSOLETE_KILL -2
unsigned short header_len; /* more space at head required */
unsigned short trailer_len; /* space to reserve at tail */
unsigned short __pad3;

#ifdef CONFIG_IP_ROUTE_CLASSID
__u32 tclassid;
#else
Expand Down Expand Up @@ -440,23 +440,13 @@ static inline void dst_rcu_free(struct rcu_head *head)

static inline void dst_confirm(struct dst_entry *dst)
{
dst->pending_confirm = 1;
}

static inline int dst_neigh_output(struct dst_entry *dst, struct neighbour *n,
struct sk_buff *skb)
{
const struct hh_cache *hh;

if (dst->pending_confirm) {
unsigned long now = jiffies;

dst->pending_confirm = 0;
/* avoid dirtying neighbour */
if (n->confirmed != now)
n->confirmed = now;
}

hh = &n->hh;
if ((n->nud_state & NUD_CONNECTED) && hh->hh_len)
return neigh_hh_output(hh, skb);
Expand Down
1 change: 0 additions & 1 deletion net/core/dst.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ void dst_init(struct dst_entry *dst, struct dst_ops *ops,
dst->__use = 0;
dst->lastuse = jiffies;
dst->flags = flags;
dst->pending_confirm = 0;
dst->next = NULL;
if (!(flags & DST_NOCOUNT))
dst_entries_add(ops, 1);
Expand Down

0 comments on commit 51ce8bd

Please sign in to comment.