netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: mtu_expires variable
       [not found] <Pine.GSO.4.10.10305162243050.13822-100000@tigre.dcc.unicamp.br>
@ 2003-05-19  0:40 ` Randy.Dunlap
  2003-05-19  1:32   ` David S. Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Randy.Dunlap @ 2003-05-19  0:40 UTC (permalink / raw)
  To: Felipe Massia Pereira; +Cc: linux-net, netdev

On Fri, 16 May 2003 23:16:03 -0300 (EST) Felipe Massia Pereira <massia@ic.unicamp.br> wrote:   [on LKML]

| Hello,
| 
| I've been searching for the exact meaning of this variable through
| Documentation and I've found just empty descriptions (to be filled in, in
| Advanced Linux Routing HOWTO, and nothing also in
| Documentation/networking/ip-sysctl.txt). I've tried also to read the
| kernel source code (net/ipv4/route.c) but I could not figure out what they
| mean.

What kernel version?
And this question would be better asked/answered on either
linux-net or netdev mailing lists, so I've replied to those.

It (ip_rt_mtu_expires variable) appears not to be used very much.

| I've came accross this var because we want to do some experiments in class
| with Path MTU discovery.  But it happens that MTU is recorded between
| experiments (and it's what we expect: that the stack does not do a PMTU
| every time). BTW where is the PMTU value kept? Is MTU value recorded for
| each destination or for each route?
| 
| So it would be nice if we could make the value found in a experiment to be
| forgotten by the kernel so the students could execute the ping several
| times. (ping -c 2 -m want ...) Is mtu_expires what we're looking for?

Maybe someone else can answer this...

| We tried to "echo 1 > /proc/sys/net/ipv4/route/mtu_expires" considering
| that it's expressed in seconds. The usual value is 600. But I've read that
| it's expressed in jiffies. Jiffies occur 100 times per sec on a PC, is it?
| So the value 600 on a PC means 6 seconds?

In 2.4.x there are 100 jiffies / second on a PC (x86 arch).
However, /proc/sys/net/ipv4/route/mtu_expires is hiding this HZ
conversion factor from us, so that the value is expressed in seconds
and not in jiffies, so 600 is 600 seconds = 10 minutes.

--
~Randy

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

* Re: mtu_expires variable
  2003-05-19  0:40 ` mtu_expires variable Randy.Dunlap
@ 2003-05-19  1:32   ` David S. Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David S. Miller @ 2003-05-19  1:32 UTC (permalink / raw)
  To: rddunlap; +Cc: massia, linux-net, netdev

   From: "Randy.Dunlap" <rddunlap@osdl.org>
   Date: Sun, 18 May 2003 17:40:24 -0700

   On Fri, 16 May 2003 23:16:03 -0300 (EST) Felipe Massia Pereira <massia@ic.unicamp.br> wrote:   [on LKML]
   
   | I've came accross this var because we want to do some experiments in class
   | with Path MTU discovery.  But it happens that MTU is recorded between
   | experiments (and it's what we expect: that the stack does not do a PMTU
   | every time). BTW where is the PMTU value kept? Is MTU value recorded for
   | each destination or for each route?
   | 
   | So it would be nice if we could make the value found in a experiment to be
   | forgotten by the kernel so the students could execute the ping several
   | times. (ping -c 2 -m want ...) Is mtu_expires what we're looking for?
   
   Maybe someone else can answer this...
   
PMTU is stored at routing cache entries (inside of the dst_entry part
of the rtable).  If routing cache entry is flushed, this information
is forgotten.  Also, PMTUs are expired periodically, and this is
controlled by calling dst_set_expires() which expires the entry
at ip_rt_mtu_expires jiffies into the future.

You can use a hammer to force all PMTU information to be forgotten
by flushing entire routing cache, this is done via:

echo "0" >/proc/sys/net/ipv4/route/flush

   | We tried to "echo 1 > /proc/sys/net/ipv4/route/mtu_expires" considering
   | that it's expressed in seconds. The usual value is 600. But I've read that
   | it's expressed in jiffies. Jiffies occur 100 times per sec on a PC, is it?
   | So the value 600 on a PC means 6 seconds?
   
   In 2.4.x there are 100 jiffies / second on a PC (x86 arch).
   However, /proc/sys/net/ipv4/route/mtu_expires is hiding this HZ
   conversion factor from us, so that the value is expressed in seconds
   and not in jiffies, so 600 is 600 seconds = 10 minutes.
   
This is correct, the user's value is converted into jiffies and
stored into ip_rt_mtu_expires.

BUT!  This only takes effect for NEW pmtu information gathered.
It does not apply to existing ones.  Best idea is to flush the
routing cache after such a change.

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

end of thread, other threads:[~2003-05-19  1:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <Pine.GSO.4.10.10305162243050.13822-100000@tigre.dcc.unicamp.br>
2003-05-19  0:40 ` mtu_expires variable Randy.Dunlap
2003-05-19  1:32   ` David S. Miller

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