netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tom Herbert <tom@herbertland.com>
To: <davem@davemloft.net>, <netdev@vger.kernel.org>
Cc: <kernel-team@fb.com>
Subject: [PATCH net-next 0/8] udp: GRO in UDP sockets
Date: Tue, 5 Apr 2016 08:22:48 -0700	[thread overview]
Message-ID: <1459869776-2090500-1-git-send-email-tom@herbertland.com> (raw)

This patch set adds GRO functions (gro_receive and gro_complete) to UDP
sockets and removes udp_offload infrastructure.

Add GRO functions (gro_receive and gro_complete) to UDP sockets. In
udp_gro_receive and udp_gro_complete a socket lookup is done instead of
looking up the port number in udp_offloads.  If a socket is found and
there are GRO functions for it then those are called. This feature
allows binding GRO functions to more than just a port number.
Eventually, we will be able to use this technique to allow application
defined GRO for an application protocol by attaching BPF porgrams to UDP
sockets for doing GRO.

In order to implement these functions, we added exported
udp6_lib_lookup_skb and udp4_lib_lookup_skb functions in ipv4/udp.c and
ipv6/udp.c. Also, inet_iif and references to skb_dst() were changed to
check that dst is set in skbuf before derefencing. In the GRO path there
is now a UDP socket lookup performed before dst is set, to the get the
device in that case we simply use skb->dev.

Tested:

Ran various combinations of VXLAN and GUE TCP_STREAM and TCP_RR tests.
Did not see any material regression.

Tom Herbert (8):
  net: Checks skb_dst to be NULL in inet_iif
  udp: Add udp6_lib_lookup_skb and udp4_lib_lookup_skb
  udp: Add GRO functions to UDP socket
  udp: Add socket based GRO and config
  vxlan: change vxlan to use UDP socket GRO
  fou: change to use UDP socket GRO
  geneve: change to use UDP socket GRO
  udp: Remove udp_offloads

 drivers/net/geneve.c      |  28 ++++--------
 drivers/net/vxlan.c       |  30 ++++--------
 include/linux/netdevice.h |  17 -------
 include/linux/udp.h       |   8 ++++
 include/net/protocol.h    |   3 --
 include/net/route.h       |   7 +--
 include/net/udp.h         |  11 ++++-
 include/net/udp_tunnel.h  |   7 +++
 include/net/vxlan.h       |   1 -
 net/ipv4/fou.c            |  48 +++++++-------------
 net/ipv4/udp.c            |  13 ++++++
 net/ipv4/udp_offload.c    | 113 ++++++++--------------------------------------
 net/ipv4/udp_tunnel.c     |   2 +
 net/ipv6/Makefile         |   5 +-
 net/ipv6/af_inet6.c       |   8 ++++
 net/ipv6/ip6_offload.c    |   2 -
 net/ipv6/ip6_offload.h    |   3 +-
 net/ipv6/udp.c            |  13 ++++++
 net/ipv6/udp_offload.c    |  11 +++--
 19 files changed, 129 insertions(+), 201 deletions(-)

-- 
2.8.0.rc2

             reply	other threads:[~2016-04-05 15:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-05 15:22 Tom Herbert [this message]
2016-04-05 15:22 ` [PATCH net-next 1/8] net: Checks skb_dst to be NULL in inet_iif Tom Herbert
2016-04-05 15:22 ` [PATCH net-next 2/8] udp: Add udp6_lib_lookup_skb and udp4_lib_lookup_skb Tom Herbert
2016-04-05 15:22 ` [PATCH net-next 3/8] udp: Add GRO functions to UDP socket Tom Herbert
2016-04-05 15:22 ` [PATCH net-next 4/8] udp: Add socket based GRO and config Tom Herbert
2016-04-05 15:22 ` [PATCH net-next 5/8] vxlan: change vxlan to use UDP socket GRO Tom Herbert
2016-04-05 15:22 ` [PATCH net-next 6/8] fou: change " Tom Herbert
2016-04-05 15:22 ` [PATCH net-next 7/8] geneve: " Tom Herbert
2016-04-05 15:22 ` [PATCH net-next 8/8] udp: Remove udp_offloads Tom Herbert
2016-04-07 20:54 ` [PATCH net-next 0/8] udp: GRO in UDP sockets David Miller

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=1459869776-2090500-1-git-send-email-tom@herbertland.com \
    --to=tom@herbertland.com \
    --cc=davem@davemloft.net \
    --cc=kernel-team@fb.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).