netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phil Sutter <phil@nwl.cc>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Jeremy Sowden <jeremy@azazel.net>,
	Netfilter Devel <netfilter-devel@vger.kernel.org>
Subject: Re: [PATCH nft 2/4] py: add missing output flags.
Date: Thu, 24 Oct 2019 11:20:52 +0200	[thread overview]
Message-ID: <20191024092052.GP26123@orbyte.nwl.cc> (raw)
In-Reply-To: <20191023203833.aidczbpuxokywu6i@salvia>

Hi,

On Wed, Oct 23, 2019 at 10:38:33PM +0200, Pablo Neira Ayuso wrote:
> On Tue, Oct 22, 2019 at 09:58:53PM +0100, Jeremy Sowden wrote:
> > `terse` and `numeric_time` are missing from the `output_flags` dict.
> > Add them and getters and setters for them.
> 
> LGTM.
> 
> @Phil, is this fine with you? I let you decide on this.

I just pushed it. Could you please update Patchwork? I'm not allowed to.

> BTW, would it make sense at some point to remove all the getter/setter
> per option and use the setter/getter flags approach as in libnftables?

Well, from a compat standpoint we can't remove them. The benefit of
those setter/getter methods is the clean interface (user's don't have to
memorize flag names) and the semantics of returning the old value. The
latter comes in handy when changing flags temporarily.

One could change the private __{g,s}et_output_flag() methods though and
make them similar to {g,s}et_debug() methods which probably resemble the
syntax you're looking for.

Cheers, Phil

  reply	other threads:[~2019-10-24  9:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-22 20:58 [PATCH nft 0/4] Output Flag Fixes Jeremy Sowden
2019-10-22 20:58 ` [PATCH nft 1/4] doc: add missing output flag documentation Jeremy Sowden
2019-10-23 20:36   ` Pablo Neira Ayuso
2019-10-22 20:58 ` [PATCH nft 2/4] py: add missing output flags Jeremy Sowden
2019-10-23 20:38   ` Pablo Neira Ayuso
2019-10-24  9:20     ` Phil Sutter [this message]
2019-10-24  9:35       ` Pablo Neira Ayuso
2019-10-24 15:56         ` Phil Sutter
2019-10-24 16:23           ` Pablo Neira Ayuso
2019-10-24  9:14   ` Phil Sutter
2019-10-22 20:58 ` [PATCH nft 3/4] main: add missing `OPT_NUMERIC_PROTO` long option Jeremy Sowden
2019-10-23 20:42   ` Pablo Neira Ayuso
2019-10-22 20:58 ` [PATCH nft 4/4] main: remove duplicate output flag assignment Jeremy Sowden
2019-10-23 20:42   ` Pablo Neira Ayuso

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=20191024092052.GP26123@orbyte.nwl.cc \
    --to=phil@nwl.cc \
    --cc=jeremy@azazel.net \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.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).