All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Parkin <tparkin@katalix.com>
To: Ben Hutchings <bhutchings@solarflare.com>
Cc: netdev@vger.kernel.org, jchapman@katalix.com
Subject: Re: [PATCH] l2tp: avoid checksum offload for fragmented packets
Date: Wed, 5 Jun 2013 10:41:11 +0100	[thread overview]
Message-ID: <20130605094111.GB2522@raven> (raw)
In-Reply-To: <1370270652.1918.14.camel@bwh-desktop.uk.level5networks.com>

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

On Mon, Jun 03, 2013 at 03:44:12PM +0100, Ben Hutchings wrote:
> On Mon, 2013-06-03 at 08:49 +0100, Tom Parkin wrote:
> > Hardware offload for UDP datagram checksum calculation doesn't work with
> > fragmented IP packets -- the device will note the fragmentation and leave the
> > UDP checksum well alone.
> > 
> > As such, if we expect the L2TP packet to be fragmented by the IP layer we need
> > to perform the UDP checksum ourselves in software (ref: net/ipv4/udp.c).
> >
> > This change modifies the L2TP xmit path to fallback to software checksum
> > calculation if the L2TP packet + IP header exceeds the tunnel device MTU.
> [...]
> 
> Surely this should be done in the IP stack when fragmenting, not in any
> particular client?
> 

Hmm, that's a good question.

I'm not sure it makes sense to push this down into the IP layer, though.  Since 
it's the UDP checksum we're calculating, it seems reasonable to handle it at 
the UDP layer (which is where L2TP sits when using UDP encapsulation).

If you're worried about reproducing similar code in both UDP and L2TP
I can see where you're coming from, but since UDP uses corking and
L2TP doesn't the data transmit path is quite dissimilar.  We could
probably do some work to share the code, but it doesn't seem worth it
for the amount of sharing we'd be able to achieve.
-- 
Tom Parkin
Katalix Systems Ltd
http://www.katalix.com
Catalysts for your Embedded Linux software development

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

  reply	other threads:[~2013-06-05  9:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-03  7:49 [PATCH] l2tp: avoid checksum offload for fragmented packets Tom Parkin
2013-06-03  7:49 ` Tom Parkin
2013-06-03 14:44   ` Ben Hutchings
2013-06-05  9:41     ` Tom Parkin [this message]
2013-06-05 12:57       ` Ben Hutchings
2013-06-11  8:00         ` Tom Parkin
2013-06-11  8:16           ` David Miller

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=20130605094111.GB2522@raven \
    --to=tparkin@katalix.com \
    --cc=bhutchings@solarflare.com \
    --cc=jchapman@katalix.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 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.