]> git.proxmox.com Git - ovs.git/commitdiff
datapath: Remove compat vxlan_src_port().
authorJesse Gross <jesse@nicira.com>
Fri, 6 Feb 2015 23:19:38 +0000 (15:19 -0800)
committerJesse Gross <jesse@nicira.com>
Fri, 20 Feb 2015 19:00:31 +0000 (11:00 -0800)
vxlan_src_port() has been replaced with the more generic
udp_flow_src_port() upstream. We already have a backport for this and
it is used everywhere where this is needed, so we can remove the
dead vxlan_src_port() function.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Thomas Graf <tgraf@noironetworks.com>
datapath/linux/compat/include/net/vxlan.h
datapath/linux/compat/vxlan.c

index d30de3127e71734bceb31e141015b06ec3323819..7270eb153088b9ba97fcd319a2bbfdc569bf0333 100644 (file)
@@ -140,8 +140,5 @@ int vxlan_xmit_skb(struct vxlan_sock *vs,
                   __be16 src_port, __be16 dst_port,
                   struct vxlan_metadata *md, bool xnet, u32 vxflags);
 
-#define vxlan_src_port rpl_vxlan_src_port
-__be16 vxlan_src_port(__u16 port_min, __u16 port_max, struct sk_buff *skb);
-
 #endif /* !HAVE_VXLAN_METADATA */
 #endif
index 84a039cf5d8c7d1e27dd4fc0a893e1ea83882bf7..73294e56543577df69bd8b67080cc104703e2ada 100644 (file)
@@ -161,24 +161,6 @@ static void vxlan_set_owner(struct sock *sk, struct sk_buff *skb)
        skb->destructor = vxlan_sock_put;
 }
 
-/* Compute source port for outgoing packet
- *   first choice to use L4 flow hash since it will spread
- *     better and maybe available from hardware
- *   secondary choice is to use jhash on the Ethernet header
- */
-__be16 vxlan_src_port(__u16 port_min, __u16 port_max, struct sk_buff *skb)
-{
-       unsigned int range = (port_max - port_min) + 1;
-       u32 hash;
-
-       hash = skb_get_hash(skb);
-       if (!hash)
-               hash = jhash(skb->data, 2 * ETH_ALEN,
-                            (__force u32) skb->protocol);
-
-       return htons((((u64) hash * range) >> 32) + port_min);
-}
-
 static void vxlan_gso(struct sk_buff *skb)
 {
        int udp_offset = skb_transport_offset(skb);