netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Jakub Kicinski <kuba@kernel.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org, andrew@lunn.ch,
	jiri@resnulli.us, mkubecek@suse.cz, dsahern@kernel.org,
	pablo@netfilter.org
Subject: Re: [PATCH net-next 8/9] genetlink: use per-op policy for CTRL_CMD_GETPOLICY
Date: Thu, 01 Oct 2020 23:10:10 +0200	[thread overview]
Message-ID: <131f3d344499ec58fa653a8d7c15e646ff8f98d0.camel@sipsolutions.net> (raw)
In-Reply-To: <20201001140911.795b7662@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>

On Thu, 2020-10-01 at 14:09 -0700, Jakub Kicinski wrote:
> On Thu, 01 Oct 2020 22:55:09 +0200 Johannes Berg wrote:
> > On Thu, 2020-10-01 at 11:30 -0700, Jakub Kicinski wrote:
> > > Wire up per-op policy for CTRL_CMD_GETPOLICY.
> > > This saves us a call to genlmsg_parse() and will soon allow
> > > dumping this policy.  
> > 
> > Hmm. Probably should've asked this before - I think the code makes
> > perfect sense, but I'm not sure how "this" follows?
> > 
> > I mean, we could've saved the genlmsg_parse() call before, with much the
> > same patch, having the per-op policy doesn't really have any bearing for
> > that? It was just using a different policy - the family one - instead of
> > the per-op one, but ...
> > 
> > Am I missing something?
> 
> Hm, not as far as I can tell, I was probably typing out the message
> fast cause the commit is kinda obivious.
> 
> Looking at the code again now I can't tell why it was calling
> genlmsg_parse() in the first place. LMK if you remember if there 
> was a reason.

Quite possibly it was just old code? I _think_, but didn't check now,
that the parsing for dumpit was added later. Hence the "don't parse"
validate flag, because it wasn't always done and thus would've accepted
any kind of junk as input ...

johannes


  reply	other threads:[~2020-10-01 21:10 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-01 18:30 [PATCH net-next 0/9] genetlink: support per-command policy dump Jakub Kicinski
2020-10-01 18:30 ` [PATCH net-next 1/9] genetlink: reorg struct genl_family Jakub Kicinski
2020-10-01 18:30 ` [PATCH net-next 2/9] genetlink: add small version of ops Jakub Kicinski
2020-10-01 18:30 ` [PATCH net-next 3/9] genetlink: move to smaller ops wherever possible Jakub Kicinski
2020-10-01 18:30 ` [PATCH net-next 4/9] genetlink: add a structure for dump state Jakub Kicinski
2020-10-01 20:46   ` Johannes Berg
2020-10-01 18:30 ` [PATCH net-next 5/9] genetlink: use .start callback for dumppolicy Jakub Kicinski
2020-10-01 18:30 ` [PATCH net-next 6/9] genetlink: bring back per op policy Jakub Kicinski
2020-10-01 18:30 ` [PATCH net-next 7/9] taskstats: move specifying netlink policy back to ops Jakub Kicinski
2020-10-01 20:48   ` Johannes Berg
2020-10-01 18:30 ` [PATCH net-next 8/9] genetlink: use per-op policy for CTRL_CMD_GETPOLICY Jakub Kicinski
2020-10-01 20:55   ` Johannes Berg
2020-10-01 21:09     ` Jakub Kicinski
2020-10-01 21:10       ` Johannes Berg [this message]
2020-10-01 18:30 ` [PATCH net-next 9/9] genetlink: allow dumping command-specific policy Jakub Kicinski
2020-10-01 21:03   ` Johannes Berg
2020-10-01 21:11     ` Jakub Kicinski

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=131f3d344499ec58fa653a8d7c15e646ff8f98d0.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=mkubecek@suse.cz \
    --cc=netdev@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).