All of lore.kernel.org
 help / color / mirror / Atom feed
* [net PATCH v2 0/2] Fixes for GRO and GRE tunnels
@ 2016-04-04 16:27 Alexander Duyck
  2016-04-04 16:28 ` [net PATCH v2 1/2] GRE: Disable segmentation offloads w/ CSUM and we are encapsulated via FOU Alexander Duyck
  2016-04-04 16:31 ` [net PATCH v2 2/2] ipv4/GRO: Make GRO conform to RFC 6864 Alexander Duyck
  0 siblings, 2 replies; 25+ messages in thread
From: Alexander Duyck @ 2016-04-04 16:27 UTC (permalink / raw)
  To: herbert, tom, jesse, alexander.duyck, edumazet, netdev, davem

This pair of patches addresses a few issues I have discovered over the last
week or so concerning GRO and GRE tunnels.

The first patch addresses an item I called out as an issue with FOU/GUE
encapsulating GRE, and I finally had a chance to test it and verify that
the code concerning it was broken so I took the opportunity to fix it so
that we cannot generate a FOU/GUE frame that is encapsulating a GRE tunnel
with checksum while requesting TSO/GSO for the frame.

The second patch actually addresses something I realized was an issue if we
feed a tunnel through GRO and back out through GSO.  Specifically it was
possible for GRO to generate overlapping IPv4 ID ranges as the outer IP IDs
were being ignored for tunnels.  Ignoring the IP IDs like this should only
be valid if the DF bit is set.  This is normally the case for IPIP, SIT,
and GRE tunnels, but not so for UDP tunnels.  In the case that the DF bit
is not set we store off the fact that there was a delta from what we were
expecting and when we hit the inner-most header we validate the value as to
avoid generating a frame which could lead to an IP ID collision on packets
that could eventually be fragmented.  A side effect is that the inner-most
IP ID test is relaxed as well, but the worst case scenario is that we GRO a
frame with a throw-away ID sequence anyway so if anything segmenting such a
frame with the wrong IP IDs should have no negative effects.

v2: Updated RFC 6864 patch so that we only support one of two modes.  Either
    the IP ID is incrementing, or it is fixed at a specific value with DF bit
    set.

---

Alexander Duyck (2):
      GRE: Disable segmentation offloads w/ CSUM and we are encapsulated via FOU
      ipv4/GRO: Make GRO conform to RFC 6864


 include/linux/netdevice.h |    5 ++++-
 net/core/dev.c            |    2 ++
 net/ipv4/af_inet.c        |   25 ++++++++++++++++++-------
 net/ipv4/fou.c            |    6 ++++++
 net/ipv4/gre_offload.c    |    8 ++++++++
 net/ipv4/ip_gre.c         |   13 ++++++++++---
 net/ipv6/ip6_offload.c    |    3 ---
 7 files changed, 48 insertions(+), 14 deletions(-)

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

end of thread, other threads:[~2016-04-06 19:30 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-04 16:27 [net PATCH v2 0/2] Fixes for GRO and GRE tunnels Alexander Duyck
2016-04-04 16:28 ` [net PATCH v2 1/2] GRE: Disable segmentation offloads w/ CSUM and we are encapsulated via FOU Alexander Duyck
2016-04-04 16:31 ` [net PATCH v2 2/2] ipv4/GRO: Make GRO conform to RFC 6864 Alexander Duyck
2016-04-05  0:38   ` subashab
2016-04-05  3:44   ` Herbert Xu
2016-04-05  4:26     ` Alexander Duyck
2016-04-05  4:32       ` Herbert Xu
2016-04-05 15:07         ` Edward Cree
2016-04-05 15:36           ` Tom Herbert
2016-04-05 17:06             ` Edward Cree
2016-04-05 17:38               ` Tom Herbert
2016-04-06  0:04             ` Marcelo Ricardo Leitner
2016-04-05 23:45           ` David Miller
2016-04-06 11:21             ` Edward Cree
2016-04-06 13:53               ` Tom Herbert
2016-04-06 14:26                 ` Edward Cree
2016-04-06 15:39                   ` Eric Dumazet
2016-04-06 15:55                     ` Edward Cree
2016-04-06 16:03                       ` Eric Dumazet
2016-04-06 15:43                 ` David Miller
2016-04-06 17:42                   ` Tom Herbert
2016-04-06 19:30                     ` David Miller
2016-04-05 15:52         ` Alexander Duyck
2016-04-05 16:30           ` Eric Dumazet
2016-04-05 16:45             ` Alexander Duyck

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.