flow_dissector: remove unused functions
authorWANG Cong <xiyou.wangcong@gmail.com>
Tue, 1 Aug 2017 20:18:09 +0000 (13:18 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 2 Aug 2017 17:50:03 +0000 (10:50 -0700)
They are introduced by commit f70ea018da06
("net: Add functions to get skb->hash based on flow structures")
but never gets used in tree.

Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/skbuff.h
net/core/flow_dissector.c

index 6f9f1b2715ecf2f03520d4d6f0ea942a569a973f..be76082f48aab264bf9cf8413f30a8b1169f3ea9 100644 (file)
@@ -1158,8 +1158,6 @@ static inline __u32 skb_get_hash(struct sk_buff *skb)
        return skb->hash;
 }
 
-__u32 __skb_get_hash_flowi6(struct sk_buff *skb, const struct flowi6 *fl6);
-
 static inline __u32 skb_get_hash_flowi6(struct sk_buff *skb, const struct flowi6 *fl6)
 {
        if (!skb->l4_hash && !skb->sw_hash) {
@@ -1172,20 +1170,6 @@ static inline __u32 skb_get_hash_flowi6(struct sk_buff *skb, const struct flowi6
        return skb->hash;
 }
 
-__u32 __skb_get_hash_flowi4(struct sk_buff *skb, const struct flowi4 *fl);
-
-static inline __u32 skb_get_hash_flowi4(struct sk_buff *skb, const struct flowi4 *fl4)
-{
-       if (!skb->l4_hash && !skb->sw_hash) {
-               struct flow_keys keys;
-               __u32 hash = __get_hash_from_flowi4(fl4, &keys);
-
-               __skb_set_sw_hash(skb, hash, flow_keys_have_l4(&keys));
-       }
-
-       return skb->hash;
-}
-
 __u32 skb_get_hash_perturb(const struct sk_buff *skb, u32 perturb);
 
 static inline __u32 skb_get_hash_raw(const struct sk_buff *skb)
index fc5fc4594c908049c5141858338848c8d12eb0d5..0cc672aba1f00e58ecdaa83d6fdc1d53ef9eec19 100644 (file)
@@ -998,51 +998,6 @@ __u32 skb_get_hash_perturb(const struct sk_buff *skb, u32 perturb)
 }
 EXPORT_SYMBOL(skb_get_hash_perturb);
 
-__u32 __skb_get_hash_flowi6(struct sk_buff *skb, const struct flowi6 *fl6)
-{
-       struct flow_keys keys;
-
-       memset(&keys, 0, sizeof(keys));
-
-       memcpy(&keys.addrs.v6addrs.src, &fl6->saddr,
-              sizeof(keys.addrs.v6addrs.src));
-       memcpy(&keys.addrs.v6addrs.dst, &fl6->daddr,
-              sizeof(keys.addrs.v6addrs.dst));
-       keys.control.addr_type = FLOW_DISSECTOR_KEY_IPV6_ADDRS;
-       keys.ports.src = fl6->fl6_sport;
-       keys.ports.dst = fl6->fl6_dport;
-       keys.keyid.keyid = fl6->fl6_gre_key;
-       keys.tags.flow_label = (__force u32)fl6->flowlabel;
-       keys.basic.ip_proto = fl6->flowi6_proto;
-
-       __skb_set_sw_hash(skb, flow_hash_from_keys(&keys),
-                         flow_keys_have_l4(&keys));
-
-       return skb->hash;
-}
-EXPORT_SYMBOL(__skb_get_hash_flowi6);
-
-__u32 __skb_get_hash_flowi4(struct sk_buff *skb, const struct flowi4 *fl4)
-{
-       struct flow_keys keys;
-
-       memset(&keys, 0, sizeof(keys));
-
-       keys.addrs.v4addrs.src = fl4->saddr;
-       keys.addrs.v4addrs.dst = fl4->daddr;
-       keys.control.addr_type = FLOW_DISSECTOR_KEY_IPV4_ADDRS;
-       keys.ports.src = fl4->fl4_sport;
-       keys.ports.dst = fl4->fl4_dport;
-       keys.keyid.keyid = fl4->fl4_gre_key;
-       keys.basic.ip_proto = fl4->flowi4_proto;
-
-       __skb_set_sw_hash(skb, flow_hash_from_keys(&keys),
-                         flow_keys_have_l4(&keys));
-
-       return skb->hash;
-}
-EXPORT_SYMBOL(__skb_get_hash_flowi4);
-
 u32 __skb_get_poff(const struct sk_buff *skb, void *data,
                   const struct flow_keys *keys, int hlen)
 {