2011-05-07 04:37:27

by Wu, Xia

[permalink] [raw]
Subject: How to disable TCP checksum calculation?

Hi, ALL,
I'm studying TCP transporting efficiency. Now I want to disable TCP checksum calculation, but I cannot find the right way to disable it. Who can give me a help on how to disable TCP checksum on Linux?

Thanks
xia


2011-05-07 08:08:28

by Alexander Clouter

[permalink] [raw]
Subject: Re: How to disable TCP checksum calculation?

Wu, Xia <[email protected]> wrote:
>
> I'm studying TCP transporting efficiency. Now I want to disable TCP
> checksum calculation, but I cannot find the right way to disable it.
> Who can give me a help on how to disable TCP checksum on Linux?
>
Look at using TCP checksum offloading to see the effects:

http://en.wikipedia.org/wiki/TCP_Offload_Engine

----
berk:/home/alex# ethtool -k eth0
Offload parameters for eth0:
rx-checksumming: on
tx-checksumming: on
scatter-gather: on
tcp-segmentation-offload: on
udp-fragmentation-offload: off
generic-segmentation-offload: on
generic-receive-offload: on
large-receive-offload: off
rx-vlan-offload: on
tx-vlan-offload: on
ntuple-filters: off
receive-hashing: on
----

Cheers

--
Alexander Clouter
.sigmonster says: Dental health is next to mental health.

2011-05-07 13:38:53

by Eric Dumazet

[permalink] [raw]
Subject: Re: How to disable TCP checksum calculation?

Le samedi 07 mai 2011 à 08:28 +0100, Alexander Clouter a écrit :


> Wu, Xia <[email protected]> wrote:
> >
> > I'm studying TCP transporting efficiency. Now I want to disable TCP
> > checksum calculation, but I cannot find the right way to disable it.
> > Who can give me a help on how to disable TCP checksum on Linux?
> >
> Look at using TCP checksum offloading to see the effects:
>
> http://en.wikipedia.org/wiki/TCP_Offload_Engine
>
> ----
> berk:/home/alex# ethtool -k eth0
> Offload parameters for eth0:
...


Not sure what We meant here. TCP standard requires checksums to be set,
you cannot 'disable it'. Only possible thing in linux stack is to
offload tcp checksum computation to network card, if hardware permits
it.

By the way, the loopback interface (lo) pretends to support this
feature, so we dont compute tcp checksums for loopback.