* Validation of forward_delay seems wrong...
@ 2019-07-02 20:47 Andrew Lunn
2019-07-02 21:19 ` Nikolay Aleksandrov
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Lunn @ 2019-07-02 20:47 UTC (permalink / raw)
To: Nikolay Aleksandrov; +Cc: Roopa Prabhu, bridge, netdev
Hi Nikolay
The man page says that the bridge forward_delay is in units of
seconds, and should be between 2 and 30.
I've tested on a couple of different kernel versions, and this appears
to be not working correctly:
ip link set br0 type bridge forward_delay 2
RTNETLINK answers: Numerical result out of range
ip link set br0 type bridge forward_delay 199
RTNETLINK answers: Numerical result out of range
ip link set br0 type bridge forward_delay 200
#
ip link set br0 type bridge forward_delay 3000
#
ip link set br0 type bridge forward_delay 3001
RTNETLINK answers: Numerical result out of range
I've not checked what delay is actually being used here, but clearly
something is mixed up.
grep HZ .config
CONFIG_HZ_PERIODIC=y
# CONFIG_NO_HZ_IDLE is not set
# CONFIG_NO_HZ_FULL is not set
# CONFIG_NO_HZ is not set
CONFIG_HZ_FIXED=0
CONFIG_HZ_100=y
# CONFIG_HZ_200 is not set
# CONFIG_HZ_250 is not set
# CONFIG_HZ_300 is not set
# CONFIG_HZ_500 is not set
# CONFIG_HZ_1000 is not set
CONFIG_HZ=100
Thanks
Andrew
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Validation of forward_delay seems wrong...
2019-07-02 20:47 Validation of forward_delay seems wrong Andrew Lunn
@ 2019-07-02 21:19 ` Nikolay Aleksandrov
2019-07-02 21:21 ` Nikolay Aleksandrov
2019-07-02 21:35 ` Andrew Lunn
0 siblings, 2 replies; 4+ messages in thread
From: Nikolay Aleksandrov @ 2019-07-02 21:19 UTC (permalink / raw)
To: Andrew Lunn; +Cc: Roopa Prabhu, bridge, netdev
On 02/07/2019 23:47, Andrew Lunn wrote:
> Hi Nikolay
>
> The man page says that the bridge forward_delay is in units of
> seconds, and should be between 2 and 30.
>
> I've tested on a couple of different kernel versions, and this appears
> to be not working correctly:
>
> ip link set br0 type bridge forward_delay 2
> RTNETLINK answers: Numerical result out of range
>
> ip link set br0 type bridge forward_delay 199
> RTNETLINK answers: Numerical result out of range
>
> ip link set br0 type bridge forward_delay 200
> #
>
> ip link set br0 type bridge forward_delay 3000
> #
>
> ip link set br0 type bridge forward_delay 3001
> RTNETLINK answers: Numerical result out of range
>
> I've not checked what delay is actually being used here, but clearly
> something is mixed up.
>
> grep HZ .config
> CONFIG_HZ_PERIODIC=y
> # CONFIG_NO_HZ_IDLE is not set
> # CONFIG_NO_HZ_FULL is not set
> # CONFIG_NO_HZ is not set
> CONFIG_HZ_FIXED=0
> CONFIG_HZ_100=y
> # CONFIG_HZ_200 is not set
> # CONFIG_HZ_250 is not set
> # CONFIG_HZ_300 is not set
> # CONFIG_HZ_500 is not set
> # CONFIG_HZ_1000 is not set
> CONFIG_HZ=100
>
> Thanks
> Andrew
>
Hi Andrew,
The man page is wrong, these have been in USER_HZ scaled clock_t format from the beginning.
TBH a lot of the time/delay bridge config options are messed up like that.
We've been discussing adding special _ms versions in iproute2 to make them
more user-friendly and understandable. Will cook a patch for the man page.
Cheers,
Nik
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Validation of forward_delay seems wrong...
2019-07-02 21:19 ` Nikolay Aleksandrov
@ 2019-07-02 21:21 ` Nikolay Aleksandrov
2019-07-02 21:35 ` Andrew Lunn
1 sibling, 0 replies; 4+ messages in thread
From: Nikolay Aleksandrov @ 2019-07-02 21:21 UTC (permalink / raw)
To: Andrew Lunn; +Cc: Roopa Prabhu, bridge, netdev
On 03/07/2019 00:19, Nikolay Aleksandrov wrote:
> On 02/07/2019 23:47, Andrew Lunn wrote:
>> Hi Nikolay
>>
>> The man page says that the bridge forward_delay is in units of
>> seconds, and should be between 2 and 30.
>>
>> I've tested on a couple of different kernel versions, and this appears
>> to be not working correctly:
>>
>> ip link set br0 type bridge forward_delay 2
>> RTNETLINK answers: Numerical result out of range
>>
>> ip link set br0 type bridge forward_delay 199
>> RTNETLINK answers: Numerical result out of range
>>
>> ip link set br0 type bridge forward_delay 200
>> #
>>
>> ip link set br0 type bridge forward_delay 3000
>> #
>>
>> ip link set br0 type bridge forward_delay 3001
>> RTNETLINK answers: Numerical result out of range
>>
>> I've not checked what delay is actually being used here, but clearly
>> something is mixed up.
>>
>> grep HZ .config
>> CONFIG_HZ_PERIODIC=y
>> # CONFIG_NO_HZ_IDLE is not set
>> # CONFIG_NO_HZ_FULL is not set
>> # CONFIG_NO_HZ is not set
>> CONFIG_HZ_FIXED=0
>> CONFIG_HZ_100=y
>> # CONFIG_HZ_200 is not set
>> # CONFIG_HZ_250 is not set
>> # CONFIG_HZ_300 is not set
>> # CONFIG_HZ_500 is not set
>> # CONFIG_HZ_1000 is not set
>> CONFIG_HZ=100
>>
>> Thanks
>> Andrew
>>
>
> Hi Andrew,
> The man page is wrong, these have been in USER_HZ scaled clock_t format from the beginning.
> TBH a lot of the time/delay bridge config options are messed up like that.
> We've been discussing adding special _ms versions in iproute2 to make them
> more user-friendly and understandable. Will cook a patch for the man page.
>
> Cheers,
> Nik
>
>
Err, I meant it is seconds just scaled, if it wasn't clear.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Validation of forward_delay seems wrong...
2019-07-02 21:19 ` Nikolay Aleksandrov
2019-07-02 21:21 ` Nikolay Aleksandrov
@ 2019-07-02 21:35 ` Andrew Lunn
1 sibling, 0 replies; 4+ messages in thread
From: Andrew Lunn @ 2019-07-02 21:35 UTC (permalink / raw)
To: Nikolay Aleksandrov; +Cc: Roopa Prabhu, bridge, netdev
> Hi Andrew,
> The man page is wrong, these have been in USER_HZ scaled clock_t format from the beginning.
> TBH a lot of the time/delay bridge config options are messed up like that.
Hi Nikola
Yes, that is a mess.
arch/alpha/include/asm/param.h:# define USER_HZ 1024
arch/ia64/include/asm/param.h:# define USER_HZ HZ
include/asm-generic/param.h:# define USER_HZ 100
And ia64 does
# define HZ CONFIG_HZ
So it seems pretty hard for user space to get this right in a generic
fashion.
Andrew
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-07-03 1:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-02 20:47 Validation of forward_delay seems wrong Andrew Lunn
2019-07-02 21:19 ` Nikolay Aleksandrov
2019-07-02 21:21 ` Nikolay Aleksandrov
2019-07-02 21:35 ` Andrew Lunn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox