netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] l2tp: avoid checksum offload for fragmented packets
@ 2013-05-16 17:04 Tom Parkin
  2013-05-16 17:04 ` Tom Parkin
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Parkin @ 2013-05-16 17:04 UTC (permalink / raw)
  To: netdev; +Cc: jchapman, Tom Parkin

UDP encapsulated L2TP data is currently subject to checksum errors if hardware
checksum offload is used, and the packet is fragmented.

This patch works around this issue by falling back to software checksumming if
the packet looks like it might fragment.

The problem with this approach (and the "RFC" part) is that we don't know how
big the IP header will be for the packet.  If we guess at the worst-case
scenario of 60b we can be sure to avoid checksum errors, but we may also be
using expensive software checksums in some cases where we don't really need
to.

Any suggestions on a better approach to solving this problem?  Should we be
using socket corking similar to the UDP code so that we can examine whether
the IP layer fragmented the packet after calling ip_append_data?

Tom Parkin (1):
  l2tp: avoid checksum offload for fragmented packets

 net/l2tp/l2tp_core.c |   53 ++++++++++++++++++++++++++++++--------------------
 1 file changed, 32 insertions(+), 21 deletions(-)

-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-05-29 17:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-16 17:04 [RFC] l2tp: avoid checksum offload for fragmented packets Tom Parkin
2013-05-16 17:04 ` Tom Parkin
2013-05-27 18:58   ` Benjamin LaHaise
2013-05-29 17:15     ` Tom Parkin

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).