Re: [PATCH 03/53] netns xfrm: add struct xfrm_state::xs_net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Alexey Dobriyan <adobriyan@xxxxxxxxx>
Date: Tue, 25 Nov 2008 20:26:35 +0300

> To avoid unnecessary complications with passing netns around.
> 
> * set once, very early after allocating
> * once set, never changes
> 
> For a while create every xfrm_state in init_net.
> 
> Signed-off-by: Alexey Dobriyan <adobriyan@xxxxxxxxx>

Applied.

> @@ -223,6 +226,11 @@ struct xfrm_state
>  	void			*data;
>  };
>  
> +static inline struct net *xs_net(struct xfrm_state *x)
> +{
> +	return read_pnet(&x->xs_net);
> +}
> +
>  /* xflags - make enum if more show up */

Look mom, no ifdefs!  Amazing!
_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/containers

[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux