Skip to content

RFC udp and configurable gro

Willem de Bruijn netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest8 patches 22 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8gro: convert device offloads to net_offloadinclude/linux/netdevice.h include/net/protocol.h net/core/dev.c+51 -780 replies
2/8gro: deduplicate gro_completedrivers/net/geneve.c include/linux/netdevice.h net/8021q/vlan.c +6 more+31 -1070 replies
3/8gro: add net_gro_receivedrivers/net/geneve.c include/linux/netdevice.h net/8021q/vlan.c +6 more+36 -360 replies
4/8ipv6: remove offload exception for hopoptsinclude/linux/netdevice.h net/ipv6/exthdrs_offload.c net/ipv6/ip6_offload.c+36 -260 replies
5/8net: deconstify net_offloadinclude/linux/netdevice.h include/net/protocol.h net/core/dev.c +13 more+44 -462 replies
6/8net: make gro configurabledrivers/net/vxlan.c include/linux/netdevice.h net/core/dev.c +4 more+97 -44 replies
7/8udp: gro behind static keyinclude/net/udp.h net/ipv4/udp.c net/ipv4/udp_offload.c +2 more+6 -49 replies
8/8udp: add groinclude/uapi/linux/udp.h net/ipv4/udp.c net/ipv4/udp_offload.c+76 -70 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH net-next RFC 0/8] udp and configurable gro

From: Willem de Bruijn <[email protected]>

This is a *very rough* draft. Mainly for discussion while we also look at another partially overlapping approach [1].

Reduce UDP receive cost for bulk traffic by enabling datagram coalescing with GRO.

Before adding more GRO callbacks, make GRO configurable by the administrator to optionally reduce the attack surface of this early receive path. See also [2].

Introduce sysctls net.(core|ipv4|ipv6).gro that expose the table of protocols for which GRO is support. Allow the administrator to disable individual entries in the table.

To have a single infrastructure, convert dev_offloads to the table-based approach to existing inet(6)_offloads. Additional small benefit is that ipv6 will no longer take two list lookups to find.

Patch 1 converts dev_offloads to the infra of inet(6)_offloads Patch 2 deduplicates gro_complete logic now that all share infra Patch 3 does the same for gro_receive, in anticipation of adding
a branch to check whether gro_receive is enabled
Patch 4 harmonizes ipv6 header opts, so that those, too can be
optionally disabled.
Patch 5 makes inet(6)_offloads non-const to allow disabling a flag Patch 6 introduces the administrative sysctl
Patch 7 avoids udp gro cost if no udp gro callback is register Patch 8 introduces udp gro

[1] http://patchwork.ozlabs.org/project/netdev/list/?series=65741
[2] http://vger.kernel.org/netconf2017_files/rx_hardening_and_udp_gso.pdf

Willem de Bruijn (8):
gro: convert device offloads to net_offload
gro: deduplicate gro_complete
gro: add net_gro_receive
ipv6: remove offload exception for hopopts
net: deconstify net_offload
net: make gro configurable
udp: gro behind static key
udp: add gro

 drivers/net/geneve.c       |  11 +---
 drivers/net/vxlan.c        |   8 +++
 include/linux/netdevice.h  |  64 +++++++++++++++++++--
 include/net/protocol.h     |  19 ++-----
 include/net/udp.h          |   2 +
 include/uapi/linux/udp.h   |   1 +
 net/8021q/vlan.c           |  12 +---
 net/core/dev.c             | 112 ++++++++-----------------------------
 net/core/sysctl_net_core.c |  60 ++++++++++++++++++++
 net/ethernet/eth.c         |  13 +----
 net/ipv4/af_inet.c         |  21 ++-----
 net/ipv4/esp4_offload.c    |   2 +-
 net/ipv4/fou.c             |  41 ++++----------
 net/ipv4/gre_offload.c     |  26 ++++-----
 net/ipv4/protocol.c        |  10 ++--
 net/ipv4/sysctl_net_ipv4.c |   7 +++
 net/ipv4/tcp_offload.c     |   2 +-
 net/ipv4/udp.c             |  73 +++++++++++++++++++++++-
 net/ipv4/udp_offload.c     |  19 +++----
 net/ipv6/esp6_offload.c    |   2 +-
 net/ipv6/exthdrs_offload.c |  17 +++++-
 net/ipv6/ip6_offload.c     |  69 +++++++++--------------
 net/ipv6/protocol.c        |  10 ++--
 net/ipv6/sysctl_net_ipv6.c |   8 +++
 net/ipv6/tcpv6_offload.c   |   2 +-
 net/ipv6/udp.c             |   2 +-
 net/ipv6/udp_offload.c     |   4 +-
 net/sctp/offload.c         |   2 +-
 28 files changed, 344 insertions(+), 275 deletions(-)
Signature · 1 line
2.19.0.397.gdd90340f6a-goog