Skip to contentSkip to conversation

Bad TCP timestamps on non-PC platforms

DISCUSSION Alex Dubov 4 participants 5 messages Jan 10, 2011

Subsystems (2)
lore
Share & tools
lore

Alex Dubov

author
#0 lore raw
Quoted 3 lines
Quoted 3 lines

You dont give new informations ;)

Some additional information (my wireshark was not validating checksums, so I missed the real culprit).

It so appears, that when timestamps are enabled on my dev board, TCP checksum in SYN packet turns out to be incorrect. That's why those packets are dropped by the remote side. When TCP timestamps are disabled, checksums are correct.

Any ideas where this particular problem may originate?

#1 lore raw
Quoted 7 lines · On Sun, 9 Jan 2011 19:41:13 -0800 (PST) Alex Dubov <[email protected]> wrote:
Quoted 3 lines
Quoted 3 lines

You dont give new informations ;)

Some additional information (my wireshark was not validating checksums, so I missed the real culprit).

Quoted 6 lines

It so appears, that when timestamps are enabled on my dev board, TCP checksum in SYN packet turns out to be incorrect. That's why those packets are dropped by the remote side. When TCP timestamps are disabled, checksums are correct.

Any ideas where this particular problem may originate?

Is there a bug in checksum offload in the driver? Does the hardware correctly handle checksum of packets that are unaligned or whose length is an odd number of bytes?

If the hardware can't do checksum correctly, the driver should either disable checksum offload or in worst case copy the packet to a new buffer that is in a known safe place.

author
#2 lore raw
Quoted 9 lines
Quoted 2 lines

Any ideas where this particular problem may

originate?

Is there a bug in checksum offload in the driver? Does the hardware correctly handle checksum of packets that are
unaligned or whose length is an odd number of bytes?

Quoted 5 lines

If the hardware can't do checksum correctly, the driver should either
disable checksum offload or in worst case copy the packet to a new
buffer that is in a known safe place.

I managed to work around the issue by clearing the NETIF_F_IP_CSUM feature flag of the gianfar network driver, so it appears the bug is indeed somewhere there.

#3 lore raw
Quoted 14 lines · Alex Dubov
Quoted 8 lines
Quoted 1 line

Any ideas where this particular problem may

originate?

Is there a bug in checksum offload in the driver? Does the hardware correctly handle checksum of packets that are
unaligned or whose length is an odd number of bytes?

Quoted 5 lines

If the hardware can't do checksum correctly, the driver should either
disable checksum offload or in worst case copy the packet to a new
buffer that is in a known safe place.

Quoted 4 lines

I managed to work around the issue by clearing the NETIF_F_IP_CSUM feature flag of the gianfar network driver, so it appears the bug is indeed somewhere there.

Its incredible how TCP timestamps can be "usual suspects" ;)

maintainer
#4 lore raw

From: Eric Dumazet <[email protected]>
Date: Mon, 10 Jan 2011 08:07:56 +0100

Quoted 7 lines · Alex Dubov
Quoted 4 lines

I managed to work around the issue by clearing the NETIF_F_IP_CSUM feature flag of the gianfar network driver, so it appears the bug is indeed somewhere there.

Its incredible how TCP timestamps can be "usual suspects" ;)

Or RTC chips! :-)