From: Satoru SATOH <satoru.satoh@gmail.com>
To: netdev@vger.kernel.org
Subject: Re: [PATCH][IP] Make use of the inline function dst_metric_locked()
Date: Wed, 30 Apr 2008 11:53:31 +0900 [thread overview]
Message-ID: <4817DF2B.1080701@gmail.com> (raw)
In-Reply-To: <20080429.182443.154118887.davem@davemloft.net>
# Resend it. I think it fixed.
I found some parts inline function dst_metric_locked should be used but
not. The following patch fixes these.
Signed-off-by: Satoru SATOH <satoru.satoh@gmail.com>
include/net/ip.h | 2 +-
net/ipv4/route.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/net/ip.h b/include/net/ip.h
index 6d7bcd5..3b40bc2 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -210,7 +210,7 @@ int ip_dont_fragment(struct sock *sk, struct dst_entry *dst)
{
return (inet_sk(sk)->pmtudisc == IP_PMTUDISC_DO ||
(inet_sk(sk)->pmtudisc == IP_PMTUDISC_WANT &&
- !(dst_metric(dst, RTAX_LOCK)&(1<<RTAX_MTU))));
+ !(dst_metric_locked(dst, RTAX_MTU))));
}
extern void __ip_select_ident(struct iphdr *iph, struct dst_entry *dst, int more);
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index ce25a13..2fd69b5 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1607,7 +1607,7 @@ static void rt_set_nexthop(struct rtable *rt, struct fib_result *res, u32 itag)
sizeof(rt->u.dst.metrics));
if (fi->fib_mtu == 0) {
rt->u.dst.metrics[RTAX_MTU-1] = rt->u.dst.dev->mtu;
- if (rt->u.dst.metrics[RTAX_LOCK-1] & (1 << RTAX_MTU) &&
+ if (dst_metric_locked(&rt->u.dst, RTAX_MTU) &&
rt->rt_gateway != rt->rt_dst &&
rt->u.dst.dev->mtu > 576)
rt->u.dst.metrics[RTAX_MTU-1] = 576;
next prev parent reply other threads:[~2008-04-30 2:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-30 1:18 [PATCH][IP] Make use of the inline function dst_metric_locked() Satoru SATOH
2008-04-30 1:24 ` David Miller
2008-04-30 2:53 ` Satoru SATOH [this message]
2008-04-30 4:10 ` Wang Chen
2008-05-05 3:44 ` Satoru SATOH
2008-05-05 5:13 ` David Miller
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=4817DF2B.1080701@gmail.com \
--to=satoru.satoh@gmail.com \
--cc=netdev@vger.kernel.org \
/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: link
Be 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.