From: Alex Dubov <oakad@yahoo.com> Date: 2011-01-06 07:02:27
Greetings.
I'm dealing with 2.6.37-rc7 kernel on MPC8548 platform.
It so appears, that recent kernels have sysctl_tcp_timestamps set to "1"
by default.
On embedded platforms, where real time clock is initialized lately or
absent outright, this causes TSval field of outgoing TCP packets to be
set to some garbage value, in my case in the vicinity of 0xffffffff. As a
result, other Linux machines silently drop such packets, preventing normal
completion of network boot or any other TCP dependent operation.
Therefore, I feel, two changes are necessary (I can send in a patch):
1. Make sysctl_tcp_timestamps value config-time selectable (it must be
disabled by default on machines without RTC).
2. When re-enabling tcp_timestamps through sysctl, reset the timestamp
counter to the current system clock value.
And an optional, tricky one:
3. Postpone TCP timestamp counter initialization until RTC is actually
available (if RTC is connected to i2c bus, TCP is initialized well ahead
of it).
From: Eric Dumazet <hidden> Date: 2011-01-06 08:09:21
Le mercredi 05 janvier 2011 à 22:55 -0800, Alex Dubov a écrit :
Greetings.
I'm dealing with 2.6.37-rc7 kernel on MPC8548 platform.
It so appears, that recent kernels have sysctl_tcp_timestamps set to "1"
by default.
On embedded platforms, where real time clock is initialized lately or
absent outright, this causes TSval field of outgoing TCP packets to be
set to some garbage value, in my case in the vicinity of 0xffffffff. As a
result, other Linux machines silently drop such packets, preventing normal
completion of network boot or any other TCP dependent operation.
Therefore, I feel, two changes are necessary (I can send in a patch):
1. Make sysctl_tcp_timestamps value config-time selectable (it must be
disabled by default on machines without RTC).
2. When re-enabling tcp_timestamps through sysctl, reset the timestamp
counter to the current system clock value.
And an optional, tricky one:
3. Postpone TCP timestamp counter initialization until RTC is actually
available (if RTC is connected to i2c bus, TCP is initialized well ahead
of it).
I am trying to understand the problem, but I guess you hit something not
related to RTC at all.
#define tcp_time_stamp ((__u32)(jiffies))
#define INITIAL_JIFFIES ((unsigned long)(unsigned int) (-300*HZ))
jiffies can be ZERO 300 seconds after boot.
It should not matter with RFC1323. Some TCP session could in theory be
done without TCP timestamps being activated (because SYN paquet would
carry a ZERO tsval/tsecr), but this should not prevents normal network
operation.
Are you sure the "other linux machines" dont have
strange /etc/sysctl.conf settings ?
From: David Miller <davem@davemloft.net> Date: 2011-01-06 16:44:04
From: Alex Dubov <oakad@yahoo.com>
Date: Wed, 5 Jan 2011 22:55:43 -0800 (PST)
On embedded platforms, where real time clock is initialized lately or
absent outright, this causes TSval field of outgoing TCP packets to be
set to some garbage value, in my case in the vicinity of 0xffffffff.
The TCP timestamp is set from "jiffies", not from the RTC clock.
From: Alex Dubov <oakad@yahoo.com> Date: 2011-01-07 01:55:36
Sorry for the awful synopsis of my problem. I never cease to amaze myself
at how bad those usually turn up. :-)
What I really meant to write is:
I have a dev board running 2.6.37-rc7. Normal kernel config, nothing fancy.
Remote machines are just usual linux boxes in constant operation (I tried
several of those).
UDP/DHCP works correctly all the time, so ethernet side is probably ok.
When tcp_timestamps are enabled, SYN packets from dev board just get
ignored by the remote side. I see them arrive in wireshark, but nothing
else happens.
When I disable tcp_timestamps on the dev board everything works.
The problem is reproducible every single time.
The only difference is the "Options" block of the SYN packets.
If timestamps are not really to blame, then it probably window scale
parameters. That's what I see on a usual dropped packet:
Options: (20 bytes)
Maximum segment size: 1460 bytes
SACK permitted
Timestamps: TSval 4294893842, TSecr 0
NOP
Window scale: 5 (multiply by 32)
From: Eric Dumazet <hidden> Date: 2011-01-07 02:11:26
Le jeudi 06 janvier 2011 à 17:55 -0800, Alex Dubov a écrit :
Sorry for the awful synopsis of my problem. I never cease to amaze myself
at how bad those usually turn up. :-)
What I really meant to write is:
I have a dev board running 2.6.37-rc7. Normal kernel config, nothing fancy.
Remote machines are just usual linux boxes in constant operation (I tried
several of those).
UDP/DHCP works correctly all the time, so ethernet side is probably ok.
When tcp_timestamps are enabled, SYN packets from dev board just get
ignored by the remote side. I see them arrive in wireshark, but nothing
else happens.
When I disable tcp_timestamps on the dev board everything works.
The problem is reproducible every single time.
The only difference is the "Options" block of the SYN packets.
If timestamps are not really to blame, then it probably window scale
parameters. That's what I see on a usual dropped packet:
Options: (20 bytes)
Maximum segment size: 1460 bytes
SACK permitted
Timestamps: TSval 4294893842, TSecr 0
NOP
Window scale: 5 (multiply by 32)
You dont give new informations ;)
I asked if you could give information on the other side : The bug is to
drop this legal packet.
uname -a
sysctl -a | grep tcp
From: Alex Dubov <oakad@yahoo.com> Date: 2011-01-07 06:39:41
You dont give new informations ;)
I asked if you could give information on the other side :
The bug is to
drop this legal packet.
uname -a
sysctl -a | grep tcp