public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Dimitris Michailidis <dm@chelsio•com>
To: David Miller <davem@davemloft•net>, netdev@vger•kernel.org
Subject: Rx checksum offload for fragments
Date: Tue, 27 Jul 2010 15:56:44 -0700	[thread overview]
Message-ID: <4C4F642C.1090901@chelsio.com> (raw)

I am looking at a problem with the cxgb4 driver related to Rx checksum 
offload and IPv6 fragments.  For IP/IPv6 fragments the device provides the 
L4 checksum without the pseudo-header, which the driver passes in skb->csum 
and sets CHECKSUM_COMPLETE.  This works for IP fragments but triggers errors 
  from netdev_rx_csum_fault for IPv6.  The errors are because of this code 
in ip6_frag_queue:

	if (skb->ip_summed == CHECKSUM_COMPLETE) {
		const unsigned char *nh = skb_network_header(skb);
		skb->csum = csum_sub(skb->csum,
			             csum_partial(nh, (u8 *)(fhdr + 1) - nh,
                                                   0));
	}

which subtracts the checksum for the L3 headers (that HW does not include in 
the first place).  AFAICS IPv4 does not make a similar adjustment to 
skb->csum for its header.  Am I missing something here or do IP and IPv6 
interpret CHECKSUM_COMPLETE differently?  And what should the driver do?

                 reply	other threads:[~2010-07-27 22:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4C4F642C.1090901@chelsio.com \
    --to=dm@chelsio$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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