Netdev List
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Kyle Hubert <khubert@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: SW csum errors
Date: Mon, 14 Oct 2013 13:58:59 -0700	[thread overview]
Message-ID: <20131014135859.74f38507@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <CAJoZ4U3yCrGW=5TO5z0FL2HQ+thZVzVfiPOTxTGKBuR=njadOg@mail.gmail.com>

On Mon, 14 Oct 2013 16:13:15 -0400
Kyle Hubert <khubert@gmail.com> wrote:

> My problem is rather specific. I am working on an RDMA device, and we
> have full end to end reliability. However, one of the initial spins of
> our chip had some errors, since fixed, where the csum was unreliable.
> So, we did exactly what Dave Miller warned not to do in the linked
> message. We ran outgoing IP packets through the SKB checksum
> function.. Unfortunately, we occasionally saw NFS csum errors on full
> MTU packets.
> 
> Here is his response:
> 
> http://marc.info/?l=linux-netdev&m=128286758300676&w=2
> 
> Relevant portion:
> 
> "
> Paged SKBs can have references to page cache pages and similar.  These
> can be updated asynchronously to the transmit, there is no locking at
> all to freeze the contents, and therefore full checksum offload is
> required to support SG correctly.
> 
> So don't get the idea to do the checksum in software in the infiniband
> layer, and advertize hw checksumming support, to get around this :-)
> "
> 
> Now that those chips have long gone, I am left pondering about these
> packets "corrupted" before the device transfers them. Can I get more
> information about these paged SKBs with asynchronous modifications?
> How does NFS use them?

You would have to either mark the pages as copy on write or copy the data.
Setting COW is expensive because you have to coordinate with other CPU's
on SMP. Not sure exactly how.

You can demonstrate this with either sendfile() or NFS where underlying
file contents are being modified while packet is in the queue.

  parent reply	other threads:[~2013-10-14 20:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-14 20:13 SW csum errors Kyle Hubert
2013-10-14 20:40 ` Eric Dumazet
2013-10-14 20:58 ` Stephen Hemminger [this message]
2013-10-16 15:10   ` Kyle Hubert
2013-10-16 15:24     ` Eric Dumazet
2013-10-16 15:58       ` Kyle Hubert

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=20131014135859.74f38507@nehalam.linuxnetplumber.net \
    --to=stephen@networkplumber.org \
    --cc=khubert@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox