netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Patrick McHardy <kaber@trash.net>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: nft netdev family bindings
Date: Tue, 9 Jun 2015 12:52:45 +0200	[thread overview]
Message-ID: <20150609105245.GA2811@salvia> (raw)
In-Reply-To: <20150609092318.GA25651@acer.localdomain>

On Tue, Jun 09, 2015 at 11:23:19AM +0200, Patrick McHardy wrote:
> On 08.06, Pablo Neira Ayuso wrote:
[...]
> > Then, the idea would to iterate over the list of netdevs that the user
> > indicates, eg.
> > 
> > table netdev ingress {
> >         device { eth0, eth1\; }
> > 
> >         ...
> > }
> > 
> > and register the same chain hooks for each device in the list.
> > 
> > I can go after this and cook a patch for this. The merge window is
> > still open so we can modify the semantics of the existing netlink
> > NFTA_TABLE_DEV attribute in David's net-next tree.
> 
> My idea was to have the base chains bind to a device, then we can
> create shared chains and jump to them from the base chain:
> 
> table netdev ingress {
> 	chain eth0 {
> 		hook eth0 ingress;
> 		jump shared_chain;
> 	}
> 	chain eth1 {
> 		hook eth1 ingress;
> 		jump shared_chain;
> 	}
> 	chain shared_chain {
> 		...
> 	}
> }
> 
> I think if we treat the table namespace global, than the hook and base
> chain is the natural place to specify the device since this is where
> the packets actually enter.

We can also achieve this sharing with the approach I describe above, I
don't see any limitation on that.

If the user doesn't want to share any set and chain, he creates a
separate table so there's a clear separation between namespaces.
Thus, we don't allow user to make convoluted configurations in
scenarios where he doesn't need to share anything.

  reply	other threads:[~2015-06-09 10:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-05 13:35 nft netdev family bindings Patrick McHardy
2015-06-05 15:58 ` Pablo Neira Ayuso
2015-06-05 15:59   ` Patrick McHardy
2015-06-05 16:47     ` Patrick McHardy
2015-06-08 11:40       ` Pablo Neira Ayuso
2015-06-09  9:23         ` Patrick McHardy
2015-06-09 10:52           ` Pablo Neira Ayuso [this message]
2015-06-09 10:57             ` Patrick McHardy
2015-06-09 11:46               ` Pablo Neira Ayuso
2015-06-09 12:13                 ` Patrick McHardy
2015-06-10 14:02                   ` Pablo Neira Ayuso
2015-06-10 15:37                     ` Patrick McHardy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150609105245.GA2811@salvia \
    --to=pablo@netfilter.org \
    --cc=kaber@trash.net \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).