netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: netdev@vger.kernel.org
Cc: eric.dumazet@gmail.com
Subject: [PATCH 0/2] Fix handling of GRO skbs in forwarding path
Date: Sat, 25 Jan 2014 23:48:45 +0100	[thread overview]
Message-ID: <1390690127-559-1-git-send-email-fw@strlen.de> (raw)

Marcelo Ricardo Leitner reported problems when the forwarding link
path has a lower mtu than the incoming link if the inbound interface
supports GRO.

Currently GSO/GRO skbs bypass all dst MTU checks, i.e. forwarding of
such skbs fails in case the outgoing link mtu is smaller than the one
of the incoming interface: We neither generate an icmp error nor will
the packet be fragmented if ipv4 would permit it.

The first patch moves part of Eric Dumazets skb_gso_seglen helper from
sch_tbf to skbuff core for re-use in forwarding path.

The 2nd change then alters forwarding path to handle GRO skbs.

It is not 100% correct, since the icmp error will contain the headers
of the GRO skb instead of the original/segmented one, but it seems to
work fine in my (limited) tests.

Software segmentation is done for ipv4 if the DF bit is not set.

If you think this is -next material just set patchwork state to
"deferred", I'll resend then once -next is open again.

 include/linux/skbuff.h |   18 +++++++++++++++
 net/core/skbuff.c      |   26 +++++++++++++++++++++
 net/ipv4/ip_forward.c  |   58 +++++++++++++++++++++++++++++++++++++++++++++++--
 net/ipv6/ip6_output.c  |   18 +++++++++++++--
 net/sched/sch_tbf.c    |   12 ++--------
 5 files changed, 119 insertions(+), 13 deletions(-)

             reply	other threads:[~2014-01-25 22:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-25 22:48 Florian Westphal [this message]
2014-01-25 22:48 ` [PATCH 1/2] net: add and use skb_gso_transport_seglen() Florian Westphal
2014-01-26  1:28   ` Eric Dumazet
2014-01-26  9:19     ` Florian Westphal
2014-01-25 22:48 ` [PATCH 2/2] net: ip, ipv6: handle gso skbs in forwarding path Florian Westphal
2014-01-26  1:37   ` Eric Dumazet
2014-01-26  9:22     ` Florian Westphal

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=1390690127-559-1-git-send-email-fw@strlen.de \
    --to=fw@strlen.de \
    --cc=eric.dumazet@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;
as well as URLs for NNTP newsgroup(s).