Subject: Re: [RFC PATCH net-next] net: split rt_genid for ipv4 and ipv6

From: Steffen Klassert <[email-masked]>
Date: Mon, 22 Jul 2013 12:53:55 +0200

On Mon, Jul 22, 2013 at 01:43:30PM +0800, Fan Du wrote:
> 
> -static inline void rt_genid_bump(struct net *net)
> +#if IS_ENABLED(CONFIG_IPV6)
> +static inline int rt_genid_ipv6(struct net *net)
>  {
> -	atomic_inc(&net->rt_genid);
> +	return atomic_read(&net->rt_genid_ipv6);
> +}
> +
> +static inline void rt_genid_bump_ipv6(struct net *net)
> +{
> +	atomic_inc(&net->rt_genid_ipv6);
> +}
> +#endif
> +

I think this will introduce a compile error if ipv6 is
not enabled because you use rt_genid_bump_ipv6() in
the generic IPsec code.

> +static inline void rt_genid_bump_all(struct net *net)
> +{
> +	atomic_inc(&net->rt_genid_ipv4);
> +#if IS_ENABLED(CONFIG_IPV6)
> +	atomic_inc(&net->rt_genid_ipv6);
> +#endif
>  }
> 

Function is unused.

The rest looks ok.