netdev
[Top] [All Lists]

Re: ip -6 route shows incorrect route expiry times

To: Patrick McHardy <kaber@xxxxxxxxx>
Subject: Re: ip -6 route shows incorrect route expiry times
From: "David S. Miller" <davem@xxxxxxxxxxxxx>
Date: Sun, 30 Jan 2005 18:37:22 -0800
Cc: yoshfuji@xxxxxxxxxxxxxx, rmk@xxxxxxxxxxxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: <41FD14E4.8010305@trash.net>
References: <20050130160840.C25000@flint.arm.linux.org.uk> <20050131.012910.117562374.yoshfuji@linux-ipv6.org> <41FD14E4.8010305@trash.net>
Sender: netdev-bounce@xxxxxxxxxxx
On Sun, 30 Jan 2005 18:09:56 +0100
Patrick McHardy <kaber@xxxxxxxxx> wrote:

> >Kernel exports in USER_HZ.
> >iproute2 seem to convert it again; workaround is to do "export HZ=100".
> >
> I've sent this fix to Stephen yesterday.

"HZ" should be defined in userspace as 100.
Only the kernel should ever be able to see other settings.
That is true even if userspace includes kernel headers.  For example,
on sparc64 asm/param.h does this:

#ifdef __KERNEL__
# define HZ             1000    /* Internal kernel timer frequency */
# define USER_HZ        100     /* .. some user interfaces are in "ticks" */
# define CLOCKS_PER_SEC (USER_HZ)
#endif

#ifndef HZ
#define HZ 100
#endif

<Prev in Thread] Current Thread [Next in Thread>