]> git.baikalelectronics.ru Git - kernel.git/commit
udp: Add function to make source port for UDP tunnels
authorTom Herbert <therbert@google.com>
Wed, 2 Jul 2014 04:32:39 +0000 (21:32 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 8 Jul 2014 04:14:21 +0000 (21:14 -0700)
commitd4282863fd0504c30095d718c7ae9650161dbfe8
treef2c030ea28fc30a42f740b9ac4da0edc32924831
parent86003a3fb6709cdb7ea18207fa1a05d23e6a5bc1
udp: Add function to make source port for UDP tunnels

This patch adds udp_flow_src_port function which is intended to be
a common function that UDP tunnel implementations call to set the source
port. The source port is chosen so that a hash over the outer headers
(IP addresses and UDP ports) acts as suitable hash for the flow of the
encapsulated packet. In this manner, UDP encapsulation works with RSS
and ECMP based wrt the inner flow.

Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/udp.h