netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: Pierre Louis Aublin <pierre-louis.aublin@inria.fr>
Cc: netdev@vger.kernel.org
Subject: Re: loopback interface - why checksum on header?
Date: Sat, 23 Jul 2011 09:40:23 -0700	[thread overview]
Message-ID: <20110723094023.7c0e91f3@nehalam.ftrdhcpuser.net> (raw)
In-Reply-To: <4E2AF71A.6080703@inria.fr>

On Sat, 23 Jul 2011 18:30:18 +0200
Pierre Louis Aublin <pierre-louis.aublin@inria.fr> wrote:

> Hello everybody
> 
> I am wondering why the checksum of packets sent through the loopback 
> interface is computed on the header only.
> If I understand correctly, it is assumed that a message cannot be 
> corrupted in RAM, thus there is no need to verify the integrity of the 
> whole message.
> However, in that case, there is also no need to compute it on the header.
> Consequently, why is it not the case?
> 
> Thank you in advance
> Pierre Louis Aublin

Linux doesn't bother worrying about the cost of IPv4 header checksum.
The expense of checksumming is the overhead of taking the cache miss
to read the data. Since the header is going to be read anyway, doing
the checksum is equivalent to prefetching the header.

      reply	other threads:[~2011-07-23 16:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-23 16:30 loopback interface - why checksum on header? Pierre Louis Aublin
2011-07-23 16:40 ` Stephen Hemminger [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=20110723094023.7c0e91f3@nehalam.ftrdhcpuser.net \
    --to=shemminger@vyatta.com \
    --cc=netdev@vger.kernel.org \
    --cc=pierre-louis.aublin@inria.fr \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).