Tom Herbert <t...@herbertland.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 majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html