All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Hutchings <bhutchings@solarflare.com>
To: Kevin Spiteri <kspiteri@ieee.org>
Cc: netdev@vger.kernel.org
Subject: Re: TCP checksum error on local device
Date: Wed, 9 Jul 2008 16:38:38 +0100	[thread overview]
Message-ID: <20080709153836.GL28029@solarflare.com> (raw)
In-Reply-To: <4874D936.9020100@ieee.org>

Kevin Spiteri wrote:
[...]
> I saw the behaviour as strange because only the segment containing data 
> had an incorrect TCP checksum, all other segments (SYN, SYN ACK, ACKs 
> without data and FIN ACK) had a correct TCP checksum.
> 
> Also, the incorrect checksum field seems to depend on the IP address and 
> the packet length, but not on the port number, sequence/acknowledgement 
> number or data content. Thus, the incorrect checksum is the same when 
> the sample is run repeatedly, it only changes when the data length 
> and/or IP address are changed.
[...]

The TCP/IP stack will unconditionally start calculating a checksum as it
prepares some of the headers.  Then at a later stage it checks the checksum
capability of the destination route/device (checksum calculation may be
offloaded or unnecessary) and decides whether to update the TCP checksum to
include the rest of the packet, including the payload.

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.

      reply	other threads:[~2008-07-09 15:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-09 14:34 TCP checksum error on local device Kevin Spiteri
2008-07-09 15:10 ` Kristof Provost
2008-07-09 15:28   ` Kevin Spiteri
2008-07-09 15:38     ` Ben Hutchings [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080709153836.GL28029@solarflare.com \
    --to=bhutchings@solarflare.com \
    --cc=kspiteri@ieee.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.