netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Or Gerlitz <ogerlitz@mellanox.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, hkchu@google.com, edumazet@google.com,
	herbert@gondor.apana.org.au, yanb@mellanox.com,
	shlomop@mellanox.com, therbert@google.com,
	Or Gerlitz <ogerlitz@mellanox.com>
Subject: [PATCH net-next V5 0/3] net: Add GRO support for UDP encapsulating protocols
Date: Mon, 20 Jan 2014 13:59:18 +0200	[thread overview]
Message-ID: <1390219161-9881-1-git-send-email-ogerlitz@mellanox.com> (raw)

This series adds GRO handlers for protocols that do UDP encapsulation, with the
intent of being able to coalesce packets which encapsulate packets belonging to
the same TCP session.

For GRO purposes, the destination UDP port takes the role of the ether type
field in the ethernet header or the next protocol in the IP header.

The UDP GRO handler will only attempt to coalesce packets whose destination
port is registered to have gro handler.

The patches done against net-next 75e4364f67 "net: stmmac: fix NULL pointer 
dereference in stmmac_get_tx_hwtstamp"

Or.

v4 --> v5 changes:
  - followed Eric's directives to avoid using atomic get/put ops on the
    udp gro receive and complete callbacks and instead keep the rcu_read_lock
    when calling the next handler on the chain.

v3 --> v4 changes:

  - applied feedback from Tom on some micro-optimizations that save 
    branches and goto directives in the udp gro logic

 - applied feedback from Eric on correct RCU programming for the 
   add/remove flow of the upper protocols udp gro handlers


v2 --> v3 changes:

 - moved to use linked list to store the udp gro handlers, this solves the
   problem of consuming 512KB of memory for the handlers.

 - use a mark on the skb GRO CB data to disallow running the udp gro_receive twice
   on a packet, this solves the problem of udp encapsulated packets whose inner VM
   packet is udp and happen to carry a port which has registered offloads - and flush it.

 - invoke the udp offload protocol registration and de-registration from the vxlan driver
   in a sleepable context 


Or Gerlitz (3):
  net: Add GRO support for UDP encapsulating protocols
  net: Export gro_find_by_type helpers
  net: Add GRO support for vxlan traffic

 drivers/net/vxlan.c       |  117 ++++++++++++++++++++++++++++++++++--
 include/linux/netdevice.h |   10 +++-
 include/net/protocol.h    |    3 +
 include/net/vxlan.h       |    1 +
 net/core/dev.c            |    3 +
 net/ipv4/udp_offload.c    |  143 +++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 269 insertions(+), 8 deletions(-)

             reply	other threads:[~2014-01-20 11:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-20 11:59 Or Gerlitz [this message]
2014-01-20 11:59 ` [PATCH V5 net-next 1/3] net: Add GRO support for UDP encapsulating protocols Or Gerlitz
2014-01-20 11:59 ` [PATCH V5 net-next 2/3] net: Export gro_find_by_type helpers Or Gerlitz
2014-01-20 11:59 ` [PATCH V5 net-next 3/3] net: Add GRO support for vxlan traffic Or Gerlitz
2014-01-22  2:05 ` [PATCH net-next V5 0/3] net: Add GRO support for UDP encapsulating protocols 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=1390219161-9881-1-git-send-email-ogerlitz@mellanox.com \
    --to=ogerlitz@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=hkchu@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=shlomop@mellanox.com \
    --cc=therbert@google.com \
    --cc=yanb@mellanox.com \
    /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).