netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Yurij M. Plotnikov" <Yurij.Plotnikov@oktetlabs.ru>
To: Ben Hutchings <bhutchings@solarflare.com>
Cc: netdev@vger.kernel.org,
	"Alexandra N. Kossovsky" <Alexandra.Kossovsky@oktetlabs.ru>
Subject: Re: PMTU discovery is broken on kernel 3.7.1 for UDP sockets
Date: Wed, 19 Dec 2012 18:27:26 +0400	[thread overview]
Message-ID: <50D1CECE.7090706@oktetlabs.ru> (raw)
In-Reply-To: <1355924119.2676.6.camel@bwh-desktop.uk.solarflarecom.com>

On 12/19/12 17:35, Ben Hutchings wrote:
> On Wed, 2012-12-19 at 17:10 +0400, Yurij M. Plotnikov wrote:
>    
>> On kernel 3.7.1 I get strange behaviour of IP_MTU_DISCOVER socket
>> option. The behaviour in case of IP_PMTUDISC_DO and IP_PMTUDISC_WANT
>> values of IP_MTU_DISCOVER socket option on SOCK_DGRAM socket are the
>> same and packet is always sent with "Don't Fragment" bit in case of
>> IP_PMTUDISC_WANT. Also, the value of IP_MTU socket option is not updated.
>>      
> You could try reverting:
>
> commit ee9a8f7ab2edf801b8b514c310455c94acc232f6
> Author: Steffen Klassert<steffen.klassert@secunet.com>
> Date:   Mon Oct 8 00:56:54 2012 +0000
>
>      ipv4: Don't report stale pmtu values to userspace
>
>      We report cached pmtu values even if they are already expired.
>      Change this to not report these values after they are expired
>      and fix a race in the expire time calculation, as suggested by
>      Eric Dumazet.
>
> Still, PMTU information is not supposed to expire for 10 minutes...
>
>    
With reverted commit there is no such problem on 3.7.1: IP_MTU is 
updated and DF is set only for the first packet in case of 
IP_PMTUDISC_WANT.
> [...]
>    
>> On eth2 on host_B and on eth1 on host_C change MTU from 1500 to 750.
>> Wait for a while.
>>
>> 9. send(6, lenght=1400) ->  1400 // the packet is sent with "Don't
>> Fragment" bit, tcpdump on eth1 on host_B shows it
>> 10. sleep(5);
>> 11. send(6, length=1400) ->  -1 with EMSGSIZE
>> 12. sleep(5);
>> 13. getsockopt(6,IP_MTU) ->  0 // Returns that MTU is 1500 once again. So
>> value is not updated.
>>      
> [...]
>
> What if you read this option immediately before the sleep(5)?
>    
It still returns that MTU is 1500.

Yurij.

  reply	other threads:[~2012-12-19 14:27 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-19 13:10 PMTU discovery is broken on kernel 3.7.1 for UDP sockets Yurij M. Plotnikov
2012-12-19 13:35 ` Ben Hutchings
2012-12-19 14:27   ` Yurij M. Plotnikov [this message]
2012-12-19 19:37     ` Ben Hutchings
2012-12-20  7:14       ` Yurij M. Plotnikov
2012-12-20  7:34       ` Steffen Klassert
2012-12-20 11:22         ` Yurij M. Plotnikov
2012-12-20 12:35           ` Steffen Klassert
2012-12-21 10:22             ` Steffen Klassert
2013-01-14  8:26               ` Yurij M. Plotnikov
2013-01-14 12:52                 ` Steffen Klassert
2013-01-18  8:11                 ` Steffen Klassert
2013-01-18  8:14                   ` [RFC PATCH 1/3] ipv4: Invalidate the socket cached route on pmtu events if possible Steffen Klassert
2013-01-18 19:38                     ` David Miller
2013-01-19  0:54                     ` Julian Anastasov
2013-01-21  6:43                       ` Steffen Klassert
2013-01-18  8:15                   ` [RFC PATCH 2/3] ipv4: Add a socket release callback for datagram sockets Steffen Klassert
2013-01-18 19:39                     ` David Miller
2013-01-18  8:16                   ` [RFC PATCH 3/3] xfrm4: Invalidate all ipv4 routes on IPsec pmtu events Steffen Klassert
2013-01-18 19:39                     ` David Miller
2013-01-21  6:48                       ` Steffen Klassert
2013-01-21 12:04                       ` Steffen Klassert
2013-01-21 11:31                   ` PMTU discovery is broken on kernel 3.7.1 for UDP sockets Yurij M. Plotnikov
2013-01-21 11:38                     ` Steffen Klassert

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=50D1CECE.7090706@oktetlabs.ru \
    --to=yurij.plotnikov@oktetlabs.ru \
    --cc=Alexandra.Kossovsky@oktetlabs.ru \
    --cc=bhutchings@solarflare.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).