Skip to content

Commit

Permalink
net: Remove unused get_hash_from_flow functions
Browse files Browse the repository at this point in the history
__get_hash_from_flowi6 is still used for flowlabels, but the IPv4
variant and the wrappers to both are not used. Remove them.

Signed-off-by: David Ahern <dsahern@gmail.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David Ahern authored and David S. Miller committed Mar 4, 2018
1 parent 5e18b9c commit de7a0f8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 32 deletions.
16 changes: 0 additions & 16 deletions include/net/flow.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,20 +222,4 @@ static inline unsigned int flow_key_size(u16 family)

__u32 __get_hash_from_flowi6(const struct flowi6 *fl6, struct flow_keys *keys);

static inline __u32 get_hash_from_flowi6(const struct flowi6 *fl6)
{
struct flow_keys keys;

return __get_hash_from_flowi6(fl6, &keys);
}

__u32 __get_hash_from_flowi4(const struct flowi4 *fl4, struct flow_keys *keys);

static inline __u32 get_hash_from_flowi4(const struct flowi4 *fl4)
{
struct flow_keys keys;

return __get_hash_from_flowi4(fl4, &keys);
}

#endif
16 changes: 0 additions & 16 deletions net/core/flow_dissector.c
Original file line number Diff line number Diff line change
Expand Up @@ -1341,22 +1341,6 @@ __u32 __get_hash_from_flowi6(const struct flowi6 *fl6, struct flow_keys *keys)
}
EXPORT_SYMBOL(__get_hash_from_flowi6);

__u32 __get_hash_from_flowi4(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;

return flow_hash_from_keys(keys);
}
EXPORT_SYMBOL(__get_hash_from_flowi4);

static const struct flow_dissector_key flow_keys_dissector_keys[] = {
{
.key_id = FLOW_DISSECTOR_KEY_CONTROL,
Expand Down

0 comments on commit de7a0f8

Please sign in to comment.