lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180302140900.GA27478@splinter>
Date:   Fri, 2 Mar 2018 16:09:00 +0200
From:   Ido Schimmel <idosch@...sch.org>
To:     David Ahern <dsahern@...il.com>
Cc:     netdev@...r.kernel.org, davem@...emloft.net,
        roopa@...ulusnetworks.com, nikolay@...ulusnetworks.com,
        tom@...bertland.com
Subject: Re: [PATCH v2 net-next 09/10] net: Remove unused get_hash_from_flow
 functions

On Thu, Mar 01, 2018 at 07:29:49PM -0800, David Ahern wrote:
> __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@...il.com>

Reviewed-by: Ido Schimmel <idosch@...lanox.com>

One nit below.

> ---
>  include/net/flow.h        | 15 ---------------
>  net/core/flow_dissector.c | 16 ----------------
>  2 files changed, 31 deletions(-)
> 
> diff --git a/include/net/flow.h b/include/net/flow.h
> index 64e7ee9cb980..b3982de26e81 100644
> --- a/include/net/flow.h
> +++ b/include/net/flow.h
> @@ -221,21 +221,6 @@ 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
> diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c
> index 559db9ea8d86..d29f09bc5ff9 100644
> --- a/net/core/flow_dissector.c
> +++ b/net/core/flow_dissector.c
> @@ -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)

Need to remove the declaration from include/net/flow.h

> -{
> -	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,
> -- 
> 2.11.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ