All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Neal P. Murphy" <neal.p.murphy@alum.wpi.edu>
To: "netfilter@vger.kernel.org" <netfilter@vger.kernel.org>
Subject: Re: (discussion) Why are "flow tables" syntactically unique?
Date: Wed, 22 Mar 2017 13:32:27 -0400	[thread overview]
Message-ID: <20170322133227.5e2d3fbb@playground> (raw)
In-Reply-To: <20170322162557.GA23457@salvia>

On Wed, 22 Mar 2017 17:25:57 +0100
Pablo Neira Ayuso <pablo@netfilter.org> wrote:

> On Sat, Mar 18, 2017 at 12:59:18AM +0000, Robert White wrote:
> > So this doesn't rate a bug, but it did confuse me.
> > 
> > Flow tables are always named, but they don't conform to the way sets, maps,
> > and dictionaries work in terms of "add" and "delete" and all that.
> > 
> > They are also "flow tables" instead of one word like "flows" or "throttle"
> > or something.
> > 
> > It seems weird to just have these break the syntactic expectations.
> > 
> > I think, long-term, that picking a one word designator like "rate" or
> > "gauge" and making them syntactically similar to sets with a type and flags
> > at the table level, and using @name syntax or having them be unnamed in
> > place, would make much more sense.
> > 
> > It's especially confusing since "list map tablename mapname" and "list flow
> > table tablename flowname" are so similar in function but have a different
> > word count and are not orthogonal to add and delete and clear etc.
> > 
> > So if they were just like sets this would be so much less confusing.
> > 
> > table ip example {
> >   gauge dhcp_throttle {
> >     type ipv4_addr . inet_service
> >     flags whatever, whateverelse
> >   }
> 
> This would provide a way to restore flow table between reboots, so we
> could even per populate them with elements.
> 
> >   chain dhcp_traffic {
> >     gauge { ip saddr limit over 200/day } drop
> >     gauge @dhcp_throttle { ip saddr . udp dport limit 3/second } accept
> 
> This would resolve the inconsistency, yes.
> 
> I would still stick to 'flow table' instead of 'gauge'. I was never
> comfortable with the fact that we overload 'table' with more semantics
> (given we already have tables in nf_tables).

Instead of gauge, would meter, track, watch, or measure work better (and be a little more self-documenting)?

N

  reply	other threads:[~2017-03-22 17:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-18  0:59 (discussion) Why are "flow tables" syntactically unique? Robert White
2017-03-22 16:25 ` Pablo Neira Ayuso
2017-03-22 17:32   ` Neal P. Murphy [this message]
     [not found] <pw1bjeso6tf5c3ckw3b6stgk.1490201457124@email.android.com>
2017-03-23  8:23 ` Robert White

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=20170322133227.5e2d3fbb@playground \
    --to=neal.p.murphy@alum.wpi.edu \
    --cc=netfilter@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.