Skip to content

Commit de7a0f8

Browse files
dsaherndavem330
authored andcommitted
net: Remove unused get_hash_from_flow functions
__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>
1 parent 5e18b9c commit de7a0f8

2 files changed

Lines changed: 0 additions & 32 deletions

File tree

‎include/net/flow.h‎

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -222,20 +222,4 @@ static inline unsigned int flow_key_size(u16 family)
222222

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

225-
static inline __u32 get_hash_from_flowi6(const struct flowi6 *fl6)
226-
{
227-
struct flow_keys keys;
228-
229-
return __get_hash_from_flowi6(fl6, &keys);
230-
}
231-
232-
__u32 __get_hash_from_flowi4(const struct flowi4 *fl4, struct flow_keys *keys);
233-
234-
static inline __u32 get_hash_from_flowi4(const struct flowi4 *fl4)
235-
{
236-
struct flow_keys keys;
237-
238-
return __get_hash_from_flowi4(fl4, &keys);
239-
}
240-
241225
#endif

‎net/core/flow_dissector.c‎

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1341,22 +1341,6 @@ __u32 __get_hash_from_flowi6(const struct flowi6 *fl6, struct flow_keys *keys)
13411341
}
13421342
EXPORT_SYMBOL(__get_hash_from_flowi6);
13431343

1344-
__u32 __get_hash_from_flowi4(const struct flowi4 *fl4, struct flow_keys *keys)
1345-
{
1346-
memset(keys, 0, sizeof(*keys));
1347-
1348-
keys->addrs.v4addrs.src = fl4->saddr;
1349-
keys->addrs.v4addrs.dst = fl4->daddr;
1350-
keys->control.addr_type = FLOW_DISSECTOR_KEY_IPV4_ADDRS;
1351-
keys->ports.src = fl4->fl4_sport;
1352-
keys->ports.dst = fl4->fl4_dport;
1353-
keys->keyid.keyid = fl4->fl4_gre_key;
1354-
keys->basic.ip_proto = fl4->flowi4_proto;
1355-
1356-
return flow_hash_from_keys(keys);
1357-
}
1358-
EXPORT_SYMBOL(__get_hash_from_flowi4);
1359-
13601344
static const struct flow_dissector_key flow_keys_dissector_keys[] = {
13611345
{
13621346
.key_id = FLOW_DISSECTOR_KEY_CONTROL,

0 commit comments

Comments
 (0)