netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Tom Herbert <tom@herbertland.com>,
	Jesse Brandeburg <jesse.brandeburg@gmail.com>
Cc: Linux Kernel Network Developers <netdev@vger.kernel.org>
Subject: Re: [RFC PATCH] Fix false positives in can_checksum_protocol()
Date: Tue, 29 Sep 2015 08:12:58 +0100	[thread overview]
Message-ID: <1443510778.4674.123.camel@infradead.org> (raw)
In-Reply-To: <CALx6S35f8hWfBktvou9B41EwFoODYZJZyfetOdLmeeLcuMHT9A@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1606 bytes --]

On Mon, 2015-09-28 at 20:04 -0700, Tom Herbert wrote:
> 
> > I've been pondering a bit of a redesign in this space.  I think the
> > skb struct should be explicit in its instructions to hardware for
> > which offloads to do for each packet.
> >
> > In this way, the stack would be *directly* telling the drivers what to
> > do (and what not to do), solving all sorts of bugs and really improving
> > driver reliability and implementation.
> >
> Doesn't CHECKSUM_PARTIAL with csum_offset and csum_start already tell
> the driver unambiguously what to do wrt checksum offload?

Right. That's precisely what we *do* have. But as things stand, we
can't *use* it to its full capability.

It's fine for decent devices which can handle such explicit
instructions (advertised by the NETIF_F_HW_CSUM feature).

The problem is the crappy devices that can *only* checksum UDP and TCP
frames, advertised with the NETIF_F_IP{V6,}_CSUM features. We make a
primitive attempt *not* to feed arbitrary checksum requests to such
hardware. But we fail — we end up feeding *all* Legacy IP packets to a
NETIF_F_IP_CSUM device, and *all* IPv6 packets to a NETIF_F_IPV6_CSUM
device, regardless of whether they're *actually* TCP or UDP packets.

That's the problem I'm trying to solve. And then we *can* make full use
of the generic checksum offload (I had it working for ICMPv6 at one
point: http://lists.openwall.net/netdev/2013/01/14/38 ).

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse@intel.com                              Intel Corporation


[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5691 bytes --]

  reply	other threads:[~2015-09-29  7:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-25 12:55 [RFC PATCH] Fix false positives in can_checksum_protocol() David Woodhouse
2015-09-28 17:03 ` Tom Herbert
2015-09-28 18:27   ` David Woodhouse
2015-09-28 19:13     ` Tom Herbert
2015-09-28 19:26       ` David Woodhouse
2015-09-28 19:37         ` Tom Herbert
2015-09-29  1:38           ` Jesse Brandeburg
2015-09-29  3:04             ` Tom Herbert
2015-09-29  7:12               ` David Woodhouse [this message]
2015-09-29 22:52                 ` Tom Herbert
2015-10-05 11:16                   ` David Woodhouse
2015-10-05 16:23                     ` Tom Herbert
2015-10-05 18:28                       ` Rustad, Mark D
2015-10-05 20:22                       ` David Woodhouse
2015-09-29  7:08           ` David Woodhouse

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=1443510778.4674.123.camel@infradead.org \
    --to=dwmw2@infradead.org \
    --cc=jesse.brandeburg@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=tom@herbertland.com \
    /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).