Thread (8 messages) 8 messages, 3 authors, 2015-12-18

Re: [PATCH net-next v4 4/4] ila: Add generic ILA translation facility

From: Florian Westphal <fw@strlen.de>
Date: 2015-12-11 11:19:10

Tom Herbert [off-list ref] 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help