[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1318996187.19139.8.camel@edumazet-laptop>
Date: Wed, 19 Oct 2011 05:49:47 +0200
From: Eric Dumazet <eric.dumazet@...il.com>
To: Gao feng <gaofeng@...fujitsu.com>
Cc: davem@...emloft.net, kuznet@....inr.ac.ru, jmorris@...ei.org,
netdev@...r.kernel.org
Subject: Re: [PATCH] route:ip_rt_frag_needed always return unzero
Le mercredi 19 octobre 2011 à 09:34 +0800, Gao feng a écrit :
> 2011.10.18 17:23, Eric Dumazet wrote:
> > Le mardi 18 octobre 2011 à 15:04 +0800, Gao feng a écrit :
> >> int function ip_rt_frag_need,if peer is null,
> >> there is no need to do ipprot->err_handler.
> >> I am right?
> >>
> >> Signed-off-by: Gao feng <gaofeng@...fujitsu.com>
> >> ---
> >> net/ipv4/route.c | 2 +-
> >> 1 files changed, 1 insertions(+), 1 deletions(-)
> >>
> >> diff --git a/net/ipv4/route.c b/net/ipv4/route.c
> >> index 075212e..6cde0fa 100644
> >> --- a/net/ipv4/route.c
> >> +++ b/net/ipv4/route.c
> >> @@ -1574,7 +1574,7 @@ unsigned short ip_rt_frag_needed(struct net *net, const struct iphdr *iph,
> >>
> >> atomic_inc(&__rt_peer_genid);
> >> }
> >> - return est_mtu ? : new_mtu;
> >> + return est_mtu;
> >> }
> >>
> >> static void check_peer_pmtu(struct dst_entry *dst, struct inet_peer *peer)
> >
> > No idea why you want this, your changelog is a bit cryptic :)
> >
> > Wont this bypass the raw_icmp_error(skb, protocol, info);
> > call in icmp_unreach() as well ?
> >
> >
>
> thanks Eric!
>
> I mean that the pmtu is update by inet_peer->pmtu_learned as I know.
> so in function ip_rt_frag_needed,
> if inet_peer is null or someting else make the setting of inet_peer->pmtu_learned failed.
> there is no need to call function tcp_v4_err.
>
> the call stack is
> icmp_unreach
> |
> |--->ip_rt_frag_needed(fill inet_peer)
> |
> |--->raw_icmp_error()
> |
> |--->ipprot->err_handler(tcp_v4_err or something else)
> |
> |--->tcp_v4_err(frag need icmp is triggered by tcp packet)
> |
> |--->do_pmtu_discovery
> (in this function both __sk_dst_check or dst->ops->update_pmtu
> need struct inet_peer to update pmtu)
>
> so,I think when set inet_peer->pmtu_learned failed,
> in func icmp_unreach we should goto out immediately.
>
> And it's confuse me that why func ping_err and udp_err not update the pmtu?
> What I miss?
You dont answer my question : After your patch, we now dont call
raw_icmp_error() anymore. Why is is valid ?
Not finding/create inet_peer is very unlikely : This occurs only under
high stress and out of memory condition. Is it really happening on your
machines ?
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists