netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: Question about linux kernel commit: "net/ipv6: move metrics from dst to rt6_info"
       [not found] <AM6PR07MB56397A8BC53D9A525BC9C489F2F00@AM6PR07MB5639.eurprd07.prod.outlook.com>
@ 2019-07-10 12:27 ` David Ahern
  2019-07-10 12:59   ` Jan Szewczyk
  0 siblings, 1 reply; 5+ messages in thread
From: David Ahern @ 2019-07-10 12:27 UTC (permalink / raw)
  To: Jan Szewczyk, davem; +Cc: netdev

[ adding netdev so others can chime in ]

On 7/10/19 2:28 AM, Jan Szewczyk wrote:
> Hi guys!
> 
> We can see different behavior of one of our commands that supposed to
> show pmtu information.
> 
> It’s using netlink message RTM_GETROUTE to get the information and in
> Linux kernel version 4.12 after sending big packet (and triggering
> “packet too big”) there is an entry with PMTU and expiration time.
> 
> In the version 4.18 unfortunately the entry looks different and there is
> no PMTU information.

Can you try with 4.19.58 (latest stable release for 4.19)? Perhaps there
was a bugfix that is missing from 4.18.

The kernel has 2 commands under tools/testing/selftests/net -- pmtu.sh
and icmp_redirect.sh -- that verify exceptions are created and use 'ip
ro get' to verify the mtu.


> 
> I can see that in your commit
> https://github.com/torvalds/linux/commit/d4ead6b34b67fd711639324b6465a050bcb197d4,
> these lines disappeared from route.c:
> 
>  
> 
>      if (rt->rt6i_pmtu)
> 
>            metrics[RTAX_MTU - 1] = rt->rt6i_pmtu;
> 
>  
> 
> I’m very beginner in linux kernel code, can you help me and tell me if
> that could cause this different behavior?
> 
>  
> 
>  
> 
> BR,
> 
> Jan Szewczyk
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: Question about linux kernel commit: "net/ipv6: move metrics from dst to rt6_info"
  2019-07-10 12:27 ` Question about linux kernel commit: "net/ipv6: move metrics from dst to rt6_info" David Ahern
@ 2019-07-10 12:59   ` Jan Szewczyk
  2019-07-10 19:09     ` Stefano Brivio
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Szewczyk @ 2019-07-10 12:59 UTC (permalink / raw)
  To: David Ahern, davem; +Cc: netdev

Hi!
I digged up a little further and maybe it's not a problem with MTU itself. I checked every entry I get from RTM_GETROUTE netlink message and after triggering "too big packet" by pinging ipv6address I get exactly the same messages on 4.12 and 4.18, except that the one with that pinged ipv6address is missing on 4.18 at all. What is weird - it's visible when running "ip route get to ipv6address". Do you know why there is a mismatch there?

It's not easy for me to check this behavior on 4.19, because we have a pretty complex system here, but maybe I could try to reproduce it locally on some virtual box and check if it behaves the same.

Thanks for the tip about the testing tools, I'll try to use them.

BR,
Jan Szewczyk

-----Original Message-----
From: David Ahern <dsahern@gmail.com> 
Sent: Wednesday, July 10, 2019 14:28
To: Jan Szewczyk <jan.szewczyk@ericsson.com>; davem@davemloft.net
Cc: netdev@vger.kernel.org
Subject: Re: Question about linux kernel commit: "net/ipv6: move metrics from dst to rt6_info"

[ adding netdev so others can chime in ]

On 7/10/19 2:28 AM, Jan Szewczyk wrote:
> Hi guys!
> 
> We can see different behavior of one of our commands that supposed to 
> show pmtu information.
> 
> It's using netlink message RTM_GETROUTE to get the information and in 
> Linux kernel version 4.12 after sending big packet (and triggering 
> "packet too big") there is an entry with PMTU and expiration time.
> 
> In the version 4.18 unfortunately the entry looks different and there 
> is no PMTU information.

Can you try with 4.19.58 (latest stable release for 4.19)? Perhaps there was a bugfix that is missing from 4.18.

The kernel has 2 commands under tools/testing/selftests/net -- pmtu.sh and icmp_redirect.sh -- that verify exceptions are created and use 'ip ro get' to verify the mtu.


> 
> I can see that in your commit
> https://protect2.fireeye.com/url?k=5be21a17-07361dbb-5be25a8c-8667c4af
> e13e-f99413291ecbed59&q=1&u=https%3A%2F%2Fgithub.com%2Ftorvalds%2Flinu
> x%2Fcommit%2Fd4ead6b34b67fd711639324b6465a050bcb197d4,
> these lines disappeared from route.c:
> 
>  
> 
>      if (rt->rt6i_pmtu)
> 
>            metrics[RTAX_MTU - 1] = rt->rt6i_pmtu;
> 
>  
> 
> I'm very beginner in linux kernel code, can you help me and tell me if 
> that could cause this different behavior?
> 
>  
> 
>  
> 
> BR,
> 
> Jan Szewczyk
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Question about linux kernel commit: "net/ipv6: move metrics from dst to rt6_info"
  2019-07-10 12:59   ` Jan Szewczyk
@ 2019-07-10 19:09     ` Stefano Brivio
  2019-07-10 19:13       ` David Ahern
  0 siblings, 1 reply; 5+ messages in thread
From: Stefano Brivio @ 2019-07-10 19:09 UTC (permalink / raw)
  To: Jan Szewczyk
  Cc: David Ahern, davem, netdev, Wei Wang, Martin KaFai Lau, Eric Dumazet

Jan,

On Wed, 10 Jul 2019 12:59:41 +0000
Jan Szewczyk <jan.szewczyk@ericsson.com> wrote:

> Hi!
> I digged up a little further and maybe it's not a problem with MTU
> itself. I checked every entry I get from RTM_GETROUTE netlink message
> and after triggering "too big packet" by pinging ipv6address I get
> exactly the same messages on 4.12 and 4.18, except that the one with
> that pinged ipv6address is missing on 4.18 at all. What is weird -
> it's visible when running "ip route get to ipv6address". Do you know
> why there is a mismatch there?

If I understand you correctly, an implementation equivalent to 'ip -6
route list show' (using the NLM_F_DUMP flag) won't show the so-called
route exception, while 'ip -6 route get' shows it.

If that's the case: that was broken by commit 2b760fcf5cfb ("ipv6: hook
up exception table to store dst cache") that landed in 4.15, and fixed
by net-next commit 1e47b4837f3b ("ipv6: Dump route exceptions if
requested"). For more details, see the log of this commit itself.

-- 
Stefano

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Question about linux kernel commit: "net/ipv6: move metrics from dst to rt6_info"
  2019-07-10 19:09     ` Stefano Brivio
@ 2019-07-10 19:13       ` David Ahern
  2019-07-11  7:41         ` Jan Szewczyk
  0 siblings, 1 reply; 5+ messages in thread
From: David Ahern @ 2019-07-10 19:13 UTC (permalink / raw)
  To: Stefano Brivio, Jan Szewczyk
  Cc: davem, netdev, Wei Wang, Martin KaFai Lau, Eric Dumazet

On 7/10/19 1:09 PM, Stefano Brivio wrote:
> Jan,
> 
> On Wed, 10 Jul 2019 12:59:41 +0000
> Jan Szewczyk <jan.szewczyk@ericsson.com> wrote:
> 
>> Hi!
>> I digged up a little further and maybe it's not a problem with MTU
>> itself. I checked every entry I get from RTM_GETROUTE netlink message
>> and after triggering "too big packet" by pinging ipv6address I get
>> exactly the same messages on 4.12 and 4.18, except that the one with
>> that pinged ipv6address is missing on 4.18 at all. What is weird -
>> it's visible when running "ip route get to ipv6address". Do you know
>> why there is a mismatch there?
> 
> If I understand you correctly, an implementation equivalent to 'ip -6
> route list show' (using the NLM_F_DUMP flag) won't show the so-called
> route exception, while 'ip -6 route get' shows it.
> 
> If that's the case: that was broken by commit 2b760fcf5cfb ("ipv6: hook
> up exception table to store dst cache") that landed in 4.15, and fixed
> by net-next commit 1e47b4837f3b ("ipv6: Dump route exceptions if
> requested"). For more details, see the log of this commit itself.
> 

ah, good point. My mind locked on RTM_GETROUTE as a specific route
request not a dump.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: Question about linux kernel commit: "net/ipv6: move metrics from dst to rt6_info"
  2019-07-10 19:13       ` David Ahern
@ 2019-07-11  7:41         ` Jan Szewczyk
  0 siblings, 0 replies; 5+ messages in thread
From: Jan Szewczyk @ 2019-07-11  7:41 UTC (permalink / raw)
  To: David Ahern, Stefano Brivio
  Cc: davem, netdev, Wei Wang, Martin KaFai Lau, Eric Dumazet

Hi guys!

Yes, that's exactly it! Thank you very much, so now I know what is happening 😊.

Thanks again for your help!

BR,
Jan Szewczyk

-----Original Message-----
From: David Ahern <dsahern@gmail.com> 
Sent: Wednesday, July 10, 2019 21:13
To: Stefano Brivio <sbrivio@redhat.com>; Jan Szewczyk <jan.szewczyk@ericsson.com>
Cc: davem@davemloft.net; netdev@vger.kernel.org; Wei Wang <weiwan@google.com>; Martin KaFai Lau <kafai@fb.com>; Eric Dumazet <edumazet@google.com>
Subject: Re: Question about linux kernel commit: "net/ipv6: move metrics from dst to rt6_info"

On 7/10/19 1:09 PM, Stefano Brivio wrote:
> Jan,
> 
> On Wed, 10 Jul 2019 12:59:41 +0000
> Jan Szewczyk <jan.szewczyk@ericsson.com> wrote:
> 
>> Hi!
>> I digged up a little further and maybe it's not a problem with MTU 
>> itself. I checked every entry I get from RTM_GETROUTE netlink message 
>> and after triggering "too big packet" by pinging ipv6address I get 
>> exactly the same messages on 4.12 and 4.18, except that the one with 
>> that pinged ipv6address is missing on 4.18 at all. What is weird - 
>> it's visible when running "ip route get to ipv6address". Do you know 
>> why there is a mismatch there?
> 
> If I understand you correctly, an implementation equivalent to 'ip -6 
> route list show' (using the NLM_F_DUMP flag) won't show the so-called 
> route exception, while 'ip -6 route get' shows it.
> 
> If that's the case: that was broken by commit 2b760fcf5cfb ("ipv6: 
> hook up exception table to store dst cache") that landed in 4.15, and 
> fixed by net-next commit 1e47b4837f3b ("ipv6: Dump route exceptions if 
> requested"). For more details, see the log of this commit itself.
> 

ah, good point. My mind locked on RTM_GETROUTE as a specific route request not a dump.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-07-11  7:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <AM6PR07MB56397A8BC53D9A525BC9C489F2F00@AM6PR07MB5639.eurprd07.prod.outlook.com>
2019-07-10 12:27 ` Question about linux kernel commit: "net/ipv6: move metrics from dst to rt6_info" David Ahern
2019-07-10 12:59   ` Jan Szewczyk
2019-07-10 19:09     ` Stefano Brivio
2019-07-10 19:13       ` David Ahern
2019-07-11  7:41         ` Jan Szewczyk

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).