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 <je...@nicira.com>
---
 datapath/linux/compat/include/net/vxlan.h |  3 ---
 datapath/linux/compat/vxlan.c             | 18 ------------------
 2 files changed, 21 deletions(-)

diff --git a/datapath/linux/compat/include/net/vxlan.h 
b/datapath/linux/compat/include/net/vxlan.h
index d30de31..7270eb1 100644
--- a/datapath/linux/compat/include/net/vxlan.h
+++ b/datapath/linux/compat/include/net/vxlan.h
@@ -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
diff --git a/datapath/linux/compat/vxlan.c b/datapath/linux/compat/vxlan.c
index 84a039c..73294e5 100644
--- a/datapath/linux/compat/vxlan.c
+++ b/datapath/linux/compat/vxlan.c
@@ -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);
-- 
1.9.1

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to