From: Julian Anastasov <ja@ssi.bg> To: netdev@vger.kernel.org Cc: linux-sctp@vger.kernel.org, YueHaibing <yuehaibing@huawei.com> Subject: [PATCHv2 RFC net-next 7/7] net: pending_confirm is not used anymore Date: Sat, 28 Jan 2017 16:26:18 +0200 [thread overview] Message-ID: <1485613578-19973-8-git-send-email-ja@ssi.bg> (raw) In-Reply-To: <1485613578-19973-1-git-send-email-ja@ssi.bg> 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: 5110effee8fd ("net: Do delayed neigh confirmation.") Fixes: f2bb4bedf35d ("ipv4: Cache output routes in fib_info nexthops.") Signed-off-by: Julian Anastasov <ja@ssi.bg> --- include/net/dst.h | 14 ++------------ net/core/dst.c | 1 - 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/include/net/dst.h b/include/net/dst.h index 3a3b34b..84a1043 100644 --- a/include/net/dst.h +++ b/include/net/dst.h @@ -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 @@ -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 @@ -440,7 +440,6 @@ 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, @@ -448,15 +447,6 @@ static inline int dst_neigh_output(struct dst_entry *dst, struct neighbour *n, { 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); diff --git a/net/core/dst.c b/net/core/dst.c index b5cbbe0..960e503 100644 --- a/net/core/dst.c +++ b/net/core/dst.c @@ -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); -- 1.9.3
WARNING: multiple messages have this Message-ID (diff)
From: Julian Anastasov <ja@ssi.bg> To: netdev@vger.kernel.org Cc: linux-sctp@vger.kernel.org, YueHaibing <yuehaibing@huawei.com> Subject: [PATCHv2 RFC net-next 7/7] net: pending_confirm is not used anymore Date: Sat, 28 Jan 2017 14:26:18 +0000 [thread overview] Message-ID: <1485613578-19973-8-git-send-email-ja@ssi.bg> (raw) In-Reply-To: <1485613578-19973-1-git-send-email-ja@ssi.bg> 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: 5110effee8fd ("net: Do delayed neigh confirmation.") Fixes: f2bb4bedf35d ("ipv4: Cache output routes in fib_info nexthops.") Signed-off-by: Julian Anastasov <ja@ssi.bg> --- include/net/dst.h | 14 ++------------ net/core/dst.c | 1 - 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/include/net/dst.h b/include/net/dst.h index 3a3b34b..84a1043 100644 --- a/include/net/dst.h +++ b/include/net/dst.h @@ -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 @@ -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 @@ -440,7 +440,6 @@ 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, @@ -448,15 +447,6 @@ static inline int dst_neigh_output(struct dst_entry *dst, struct neighbour *n, { 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); diff --git a/net/core/dst.c b/net/core/dst.c index b5cbbe0..960e503 100644 --- a/net/core/dst.c +++ b/net/core/dst.c @@ -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); -- 1.9.3
next prev parent reply other threads:[~2017-01-28 14:27 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-01-28 14:26 [PATCHv2 RFC net-next 0/7] net: dst_confirm replacement Julian Anastasov 2017-01-28 14:26 ` Julian Anastasov 2017-01-28 14:26 ` [PATCHv2 RFC net-next 1/7] sock: add sk_dst_pending_confirm flag Julian Anastasov 2017-01-28 14:26 ` Julian Anastasov 2017-01-28 14:26 ` [PATCHv2 RFC net-next 2/7] net: add dst_pending_confirm flag to skbuff Julian Anastasov 2017-01-28 14:26 ` Julian Anastasov 2017-01-28 14:26 ` [PATCHv2 RFC net-next 3/7] sctp: add dst_pending_confirm flag Julian Anastasov 2017-01-28 14:26 ` Julian Anastasov 2017-01-30 14:45 ` Neil Horman 2017-01-30 14:45 ` Neil Horman 2017-01-28 14:26 ` [PATCHv2 RFC net-next 4/7] tcp: replace dst_confirm with sk_dst_confirm Julian Anastasov 2017-01-28 14:26 ` Julian Anastasov 2017-01-29 19:27 ` Eric Dumazet 2017-01-29 19:27 ` Eric Dumazet 2017-01-28 14:26 ` [PATCHv2 RFC net-next 5/7] net: add confirm_neigh method to dst_ops Julian Anastasov 2017-01-28 14:26 ` Julian Anastasov 2017-01-28 14:26 ` [PATCHv2 RFC net-next 6/7] net: use dst_confirm_neigh for UDP, RAW, ICMP, L2TP Julian Anastasov 2017-01-28 14:26 ` Julian Anastasov 2017-01-28 14:26 ` Julian Anastasov [this message] 2017-01-28 14:26 ` [PATCHv2 RFC net-next 7/7] net: pending_confirm is not used anymore Julian Anastasov 2017-01-30 15:13 ` [PATCHv2 RFC net-next 0/7] net: dst_confirm replacement David Miller 2017-01-30 15:13 ` David Miller 2017-01-31 21:53 ` Julian Anastasov 2017-01-31 21:53 ` Julian Anastasov
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1485613578-19973-8-git-send-email-ja@ssi.bg \ --to=ja@ssi.bg \ --cc=linux-sctp@vger.kernel.org \ --cc=netdev@vger.kernel.org \ --cc=yuehaibing@huawei.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.