netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* question: update_pmtu doesn't update dst mtu
@ 2014-04-03 11:57 Ilya V. Matveychikov
  0 siblings, 0 replies; 11+ messages in thread
From: Ilya V. Matveychikov @ 2014-04-03 11:57 UTC (permalink / raw)
  To: netdev

Hello,

Is this a place where I can post questions not the patches? If so, can anybody
explain me what the problem I have when trying to update dst PMTU value.

So, the scheme is the following:

                  skb->dst                   rt(pmtu)
IN_DEV (MTU 1500) -------> TUNNEL (MTU 1440) -------> OUT_DEV (MTU 1500)

I have a simple tunnel_xmit function that handles all the packets that goes
trough the tunnel. So, I have an skb with valid skb->dst value (filled earlier
in ip_input_route_noref).

Next, when encapsulation is done, I needed to get an output route for the packet
(rt at the scheme). At this point I know that the output route may have a PMTU
value that is different from the OUT_DEV->mtu. So, I'm trying to update the
input skb->dst route's PMTU with the update_pmtu function. It seems that all is
OK, but when I trying to get the dst mtu value (using dst_mtu(skb_dst(skb))) I
always get the value of 1440 (TUNNEL's MTU):

tunnel_xmit:
    ...
    pmtu = dst_mtu(&rt->dst) - OVERHEAD; // pmtu = 1300, for example
    skb_dst(skb)->ops->update_pmtu(skb_dst(skb), NULL, skb, pmtu);
    // dst_mtu(skb_dst(skb)) still returns 1440

Looking through the code gives me that rt_pmtu is always 0 for the skb->dst
entry and ipv4_mtu that called via the dst->ops->mtu() uses dev->mtu :(

So, the question is what I missed when trying to dynamically tunning tunnel's
input route path MTU?

Thanks :)

^ permalink raw reply	[flat|nested] 11+ messages in thread
* question: update_pmtu doesn't update dst mtu
@ 2014-04-03 11:37 Ilya V. Matveychikov
  2014-04-03 11:58 ` Hannes Frederic Sowa
  0 siblings, 1 reply; 11+ messages in thread
From: Ilya V. Matveychikov @ 2014-04-03 11:37 UTC (permalink / raw)
  To: netdev

Hello,

Is this a place where I can post questions not the patches? If so, can anybody
explain me what the problem I have when trying to update dst PMTU value.

So, the scheme is the following:

                  skb->dst                   rt(pmtu)
IN_DEV (MTU 1500) -------> TUNNEL (MTU 1440) -------> OUT_DEV (MTU 1500)

I have a simple tunnel_xmit function that handles all the packets that goes
trough the tunnel. So, I have an skb with valid skb->dst value (filled earlier
in ip_input_route_noref).

Next, when encapsulation is done, I needed to get an output route for the packet
(rt at the scheme). At this point I know that the output route may have a PMTU
value that is different from the OUT_DEV->mtu. So, I'm trying to update the
input skb->dst route's PMTU with the update_pmtu function. It seems that all is
OK, but when I trying to get the dst mtu value (using dst_mtu(skb_dst(skb))) I
always get the value of 1440 (TUNNEL's MTU):

tunnel_xmit:
    ...
    pmtu = dst_mtu(&rt->dst) - OVERHEAD; // pmtu = 1300, for example
    skb_dst(skb)->ops->update_pmtu(skb_dst(skb), NULL, skb, pmtu);
    // dst_mtu(skb_dst(skb)) still returns 1440

Looking through the code gives me that rt_pmtu is always 0 for the skb->dst
entry and ipv4_mtu that called via the dst->ops->mtu() uses dev->mtu :(

So, the question is what I missed when trying to dynamically tunning tunnel's
input route path MTU?

Thanks :)

-- 
Ilya V. Matveychikov

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

end of thread, other threads:[~2014-04-10  8:28 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-03 11:57 question: update_pmtu doesn't update dst mtu Ilya V. Matveychikov
  -- strict thread matches above, loose matches on Subject: below --
2014-04-03 11:37 Ilya V. Matveychikov
2014-04-03 11:58 ` Hannes Frederic Sowa
2014-04-03 12:07   ` Ilya V. Matveychikov
2014-04-03 12:14     ` Hannes Frederic Sowa
2014-04-03 12:27       ` Ilya V. Matveychikov
2014-04-08  9:03         ` Ilya V. Matveychikov
2014-04-08 14:57           ` Hannes Frederic Sowa
2014-04-09  8:17             ` Ilya V. Matveychikov
2014-04-09 20:30               ` Hannes Frederic Sowa
2014-04-10  8:28                 ` Ilya V. Matveychikov

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