Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next 0/5] udp: Flow dissection for tunnels
@ 2016-10-12 23:25 Tom Herbert
  2016-10-12 23:25 ` [PATCH net-next 1/5] udp: Add socket lookup functions with noref Tom Herbert
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Tom Herbert @ 2016-10-12 23:25 UTC (permalink / raw)
  To: davem, netdev; +Cc: kernel-team

Now that we have a means to perform a UDP socket lookup without taking
a reference, it is feasible to have flow dissector crack open UDP
encapsulated packets. Generally, we would expect that the UDP source
port or the flow label in IPv6 would contain enough entropy about
the encapsulated flow. However, there will be cases, such as a static
UDP tunnel with fixed ports, where dissecting the encapsulated packet
is valuable.

The model is here is similar to that implemented for UDP GRO. A
tunnel implementation (e.g. GUE) may set a flow_dissect function
in the udp_sk. In __skb_flow_dissect a case has been added for
UDP to check if there is a socket with flow_dissect set. If there
is the function is called. The (per tunnel implementation)
function can parse the encapsulation headers and return the
next protocol for __skb_flow_dissect to process and it's position
in nhoff.

Since performing a UDP lookup on every packet might be expensive
I added a static key check to bypass the lookup if there are no
sockets with flow_dissect set. I should mention that doing the
lookup wasn't particularly a big hit anyway.

Fou/gue was modified to perform tunnel dissection. This is enabled
on each listener socket via a netlink configuration option.

Tested:

Running 200 streams with TCP_RR.

GRE/GUE variable source port (baseline)
RSS distributes packets, RFS is effective
1211702 tps
147/241/442 50/90/99% latencies
87.95 CPU utilization

GRE/GUE fixed source port
All packets to one CPU, RFS is ineffective
173680 tps
1170/1377/1853 50/90/99% latencies
7.42 CPU utilization

GRE/GUE fixed source port with deep hash enabled
All packets to one CPU, but now RFS is effective
730359 tps
263/325/464 50/90/99% latencies
38.25% CPU utilization (Interrupting CPU is maxed out)


Tom Herbert (5):
  udp: Add socket lookup functions with noref
  udp: UDP flow dissector
  udp: Add UDP flow dissection functions to IPv4 and IPv6
  udp: UDP tunnel flow dissection infrastructure
  fou: Support flow dissection

 include/linux/netdevice.h    |  5 +++
 include/linux/udp.h          |  7 +++++
 include/net/flow_dissector.h |  8 +++++
 include/net/udp.h            | 12 ++++++++
 include/net/udp_tunnel.h     |  5 +++
 include/uapi/linux/fou.h     |  1 +
 net/core/flow_dissector.c    | 73 ++++++++++++++++++++++++++++++++++++++++++--
 net/ipv4/fou.c               | 68 ++++++++++++++++++++++++++++++++++++++++-
 net/ipv4/udp.c               | 11 +++++++
 net/ipv4/udp_offload.c       | 39 +++++++++++++++++++++++
 net/ipv4/udp_tunnel.c        |  5 +++
 net/ipv6/udp.c               | 10 ++++++
 net/ipv6/udp_offload.c       | 38 +++++++++++++++++++++++
 13 files changed, 279 insertions(+), 3 deletions(-)

-- 
2.9.3

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

end of thread, other threads:[~2016-10-14 15:03 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-12 23:25 [PATCH net-next 0/5] udp: Flow dissection for tunnels Tom Herbert
2016-10-12 23:25 ` [PATCH net-next 1/5] udp: Add socket lookup functions with noref Tom Herbert
2016-10-12 23:25 ` [PATCH net-next 2/5] udp: UDP flow dissector Tom Herbert
2016-10-12 23:25 ` [PATCH net-next 3/5] udp: Add UDP flow dissection functions to IPv4 and IPv6 Tom Herbert
2016-10-12 23:25 ` [PATCH net-next 4/5] udp: UDP tunnel flow dissection infrastructure Tom Herbert
2016-10-12 23:25 ` [PATCH net-next 5/5] fou: Support flow dissection Tom Herbert
2016-10-13 19:17 ` [PATCH net-next 0/5] udp: Flow dissection for tunnels David Miller
2016-10-13 19:29   ` Tom Herbert
2016-10-14 15:03     ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox