[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151211111904.GB5665@breakpoint.cc>
Date: Fri, 11 Dec 2015 12:19:04 +0100
From: Florian Westphal <fw@...len.de>
To: Tom Herbert <tom@...bertland.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org, kernel-team@...com
Subject: Re: [PATCH net-next v4 4/4] ila: Add generic ILA translation facility
Tom Herbert <tom@...bertland.com> wrote:
> +static struct nf_hook_ops ila_nf_hook_ops[] __read_mostly = {
> + {
> + .hook = ila_nf_input,
> + .pf = NFPROTO_IPV6,
> + .hooknum = NF_INET_PRE_ROUTING,
> + .priority = -1,
[..]
> +int ila_xlat_init(void)
[..]
> + for (; nf_hook < ARRAY_SIZE(ila_nf_hook_ops); nf_hook++) {
> + ret = nf_register_hook(&ila_nf_hook_ops[nf_hook]);
Nit:
We have nf_register_hooks() which does "all or none" registration
for you.
How likely is it that ILA is done in initial ns only on setups with
lots of net namespaces?
The problem with "nf_register_hook(s)" is that the hooks are placed
in all namespaces & inherited by all newly created namespaces.
So if we do ILA in init ns it & pass such skbs to other netns
it would be preferable to use nf_register_net_hooks in a namespace
once the first ila translation is added within that namespace.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists