netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/5] udp: Generalize GSO for UDP tunnels
@ 2014-09-26 16:22 Tom Herbert
  2014-09-26 16:22 ` [PATCH net-next 1/5] udp: Generalize skb_udp_segment Tom Herbert
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Tom Herbert @ 2014-09-26 16:22 UTC (permalink / raw)
  To: davem, netdev

This patch set generalizes the UDP tunnel segmentation functions so
that they can work with various protocol encapsulations. The primary
change is to set the inner_protocol field in the skbuff when creating
the encapsulated packet, and then in skb_udp_tunnel_segment this data
is used to determine the function for segmenting the encapsulated
packet. The inner_protocol field is overloaded to take either an
Ethertype or IP protocol.

The inner_protocol is set on transmit using skb_set_inner_ipproto or
skb_set_inner_protocol functions. VXLAN and IP tunnels (for fou GSO)
were modified to call these.

Notes:
  - GSO for GRE/UDP where GRE checksum is enabled does not work.
    Handling this will require some special case code.
  - Software GSO now supports many varieties of encapsulation with
    SKB_GSO_UDP_TUNNEL{_CSUM}. We still need a mechanism to query
    for device support of particular combinations (I intend to
    add ndo_gso_check for that).
  - MPLS seems to be the only previous user of inner_protocol. I don't
    believe these patches can affect that. For supporting GSO with
    MPLS over UDP, the inner_protocol should be set using the
    helper functions in this patch.
  - GSO for L2TP/UDP should also be straightforward now.

Tested GRE, IPIP, and SIT over fou as well as VLXAN. This was
done using 200 TCP_STREAMs in netperf.

 GRE
    IPv4, FOU, UDP checksum enabled
      TCP_STREAM TSO enabled on tun interface
        14.04% TX CPU utilization
        13.17% RX CPU utilization
        9211 Mbps
      TCP_STREAM TSO disabled on tun interface
        27.82% TX CPU utilization
        25.41% RX CPU utilization
        9336 Mbps
    IPv4, FOU, UDP checksum disabled
      TCP_STREAM TSO enabled on tun interface
        13.14% TX CPU utilization
        23.18% RX CPU utilization
        9277 Mbps
      TCP_STREAM TSO disabled on tun interface
        30.00% TX CPU utilization
        31.28% RX CPU utilization
        9327 Mbps

  IPIP
    FOU, UDP checksum enabled
      TCP_STREAM TSO enabled on tun interface
        15.28% TX CPU utilization
        13.92% RX CPU utilization
        9342 Mbps
      TCP_STREAM TSO disabled on tun interface
        27.82% TX CPU utilization
        25.41% RX CPU utilization
        9336 Mbps
    FOU, UDP checksum disabled
      TCP_STREAM TSO enabled on tun interface
        15.08% TX CPU utilization
        24.64% RX CPU utilization
        9226 Mbps
      TCP_STREAM TSO disabled on tun interface
        30.00% TX CPU utilization
        31.28% RX CPU utilization
        9327 Mbps

  SIT
    FOU, UDP checksum enabled
      TCP_STREAM TSO enabled on tun interface
        14.47% TX CPU utilization
        14.58% RX CPU utilization
        9106 Mbps
      TCP_STREAM TSO disabled on tun interface
        31.82% TX CPU utilization
        30.82% RX CPU utilization
        9204 Mbps
    FOU, UDP checksum disabled
      TCP_STREAM TSO enabled on tun interface
        15.70% TX CPU utilization
        27.93% RX CPU utilization
        9097 Mbps
      TCP_STREAM TSO disabled on tun interface
        33.48% TX CPU utilization
        37.36% RX CPU utilization
        9197 Mbps

   VXLAN
      TCP_STREAM TSO enabled on tun interface
        16.42% TX CPU utilization
        23.66% RX CPU utilization
        9081 Mbps
      TCP_STREAM TSO disabled on tun interface
        30.32% TX CPU utilization
        30.55% RX CPU utilization
        9185 Mbps

   Baseline (no encp, TSO and LRO enabled)
      TCP_STREAM
        11.85% TX CPU utilization
        15.13% RX CPU utilization
        9452 Mbps

Tom Herbert (5):
  udp: Generalize skb_udp_segment
  sit: Set inner IP protocol in sit
  ipip: Set inner IP protocol in ipip
  gre: Set inner protocol in v4 and v6 GRE transmit
  vxlan: Set inner protocol before transmit

 drivers/net/vxlan.c    |  4 ++++
 include/linux/skbuff.h | 26 +++++++++++++++++++++++--
 include/net/udp.h      |  3 ++-
 net/core/skbuff.c      |  1 +
 net/ipv4/ip_gre.c      |  2 ++
 net/ipv4/ipip.c        |  2 ++
 net/ipv4/udp_offload.c | 51 +++++++++++++++++++++++++++++++++++++++++++++-----
 net/ipv6/ip6_gre.c     |  8 ++++++--
 net/ipv6/sit.c         |  4 ++++
 net/ipv6/udp_offload.c |  2 +-
 10 files changed, 92 insertions(+), 11 deletions(-)

-- 
2.1.0.rc2.206.gedb03e5

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

end of thread, other threads:[~2014-09-30  5:02 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-26 16:22 [PATCH net-next 0/5] udp: Generalize GSO for UDP tunnels Tom Herbert
2014-09-26 16:22 ` [PATCH net-next 1/5] udp: Generalize skb_udp_segment Tom Herbert
2014-09-26 16:22 ` [PATCH net-next 2/5] sit: Set inner IP protocol in sit Tom Herbert
2014-09-26 16:22 ` [PATCH net-next 3/5] ipip: Set inner IP protocol in ipip Tom Herbert
2014-09-26 16:22 ` [PATCH net-next 4/5] gre: Set inner protocol in v4 and v6 GRE transmit Tom Herbert
2014-09-30  5:02   ` Simon Horman
2014-09-26 16:22 ` [PATCH net-next 5/5] vxlan: Set inner protocol before transmit Tom Herbert
2014-09-26 20:16 ` [PATCH net-next 0/5] udp: Generalize GSO for UDP tunnels Or Gerlitz
2014-09-26 23:04   ` Tom Herbert
2014-09-27 19:26     ` Or Gerlitz
2014-09-29  3:59       ` Tom Herbert
2014-09-29 20:43 ` David Miller

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