Subject: Re: [PATCH 07/25] netns ct: per-netns expectations

From: Patrick McHardy <[email-masked]>
Date: Mon, 23 Jun 2008 12:27:53 +0200

Alexey Dobriyan wrote:
> Make per-netns expectation count, expectation hash.
> 
> netns of expectations is netns of its master conntrack.
> This way expectation is not bloated with netns pointer and something
> is seriously wrong anyway if those two differ.
> 
> +static inline struct net *exp_net(struct nf_conntrack_expect *exp)
> +{
> +#ifdef CONFIG_NET_NS
> +	return exp->master->ct_net;	/* by definition */
> +#else
> +	return &init_net;
> +#endif
> +}

nf_ct_exp_net() or nf_ct_expect_net() please.

> --- a/net/netfilter/nf_conntrack_expect.c
> +++ b/net/netfilter/nf_conntrack_expect.c
> @@ -28,17 +28,12 @@
>  #include <net/netfilter/nf_conntrack_helper.h>
>  #include <net/netfilter/nf_conntrack_tuple.h>
>  
> -struct hlist_head *nf_ct_expect_hash __read_mostly;
> -EXPORT_SYMBOL_GPL(nf_ct_expect_hash);
> -
>  unsigned int nf_ct_expect_hsize __read_mostly;
>  EXPORT_SYMBOL_GPL(nf_ct_expect_hsize);

This one also needs to be in the namespace I think. BTW, are
module parameters also per namespace?