-static LIST_HEAD(vxlan_ports);
-
-static struct vxlan_port *vxlan_port_exists(struct net *net, __be16 port)
-{
- struct vxlan_port *vxlan_port;
-
- list_for_each_entry(vxlan_port, &vxlan_ports, list) {
- if (vxlan_port->port == port &&
- net_eq(sock_net(vxlan_port->vxlan_rcv_socket->sk), net))
- return vxlan_port;
- }
-
- return NULL;
-}
-
-static inline struct vxlanhdr *vxlan_hdr(const struct sk_buff *skb)
-{
- return (struct vxlanhdr *)(udp_hdr(skb) + 1);
-}
-
-/* Compute source port for outgoing packet.
- * Currently we use the flow hash.
- */
-static u16 get_src_port(struct sk_buff *skb)
-{
- int low;
- int high;
- unsigned int range;
- u32 hash = OVS_CB(skb)->flow->hash;
-
- inet_get_local_port_range(&low, &high);
- range = (high - low) + 1;
- return (((u64) hash * range) >> 32) + low;
-}
-
-static struct sk_buff *vxlan_build_header(const struct vport *vport,
- const struct tnl_mutable_config *mutable,
- struct dst_entry *dst,
- struct sk_buff *skb,
- int tunnel_hlen)