netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Michal Kubecek <mkubecek@suse.cz>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
	David Ahern <dsahern@gmail.com>,
	Johannes Berg <johannes.berg@intel.com>,
	Jiri Pirko <jiri@mellanox.com>,
	Pablo Neira Ayuso <pablo@netfilter.org>,
	Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>,
	Florian Westphal <fw@strlen.de>,
	netfilter-devel@vger.kernel.org
Subject: Re: [RFC PATCH net-next 0/3] make nla_nest_start() add NLA_F_NESTED flag
Date: Thu, 25 Apr 2019 11:08:46 +0200	[thread overview]
Message-ID: <20190425090846.GC3951@nanopsycho> (raw)
In-Reply-To: <cover.1556140270.git.mkubecek@suse.cz>

Wed, Apr 24, 2019 at 11:34:21PM CEST, mkubecek@suse.cz wrote:
>One of the comments in recent review of the ethtool netlink series pointed
>out that proposed ethnl_nest_start() helper which adds NLA_F_NESTED to
>second argument of nla_nest_start() is not really specific to ethtool
>netlink code. That is hard to argue with as closer inspection revealed that
>exactly the same helper already exists in ipset code (except it's a macro
>rather than an inline function).
>
>Another observation was that even if NLA_F_NESTED flag was introduced in
>2007, only few netlink based interfaces set it in kernel generated messages
>and even many recently added APIs omit it. That is unfortunate as without
>the flag, message parsers not familiar with attribute semantics cannot
>recognize nested attributes and do not see message structure; this affects
>e.g. wireshark dissector or mnl_nlmsg_fprintf() from libmnl.
>
>This is why I'm suggesting to rename existing nla_nest_start() to different
>name (nla_nest_start_noflag) and reintroduce nla_nest_start() as a wrapper
>adding NLA_F_NESTED flag. This is implemented in first patch which is
>mostly generated by spatch. Second patch drops ipset helper macros which
>lose their purpose. Third patch cleans up minor coding style issues found
>by checkpatch.pl in first patch.
>
>If this approach is considered too intrusive, we can leave nla_nest_start()
>untouched and simply add a wrapper adding NLA_F_NESTED but that would
>probably preserve the state when even most new code doesn't set the flag.

I like this. Long overdue...

      parent reply	other threads:[~2019-04-25  9:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-24 21:34 [RFC PATCH net-next 0/3] make nla_nest_start() add NLA_F_NESTED flag Michal Kubecek
2019-04-24 21:34 ` [RFC PATCH net-next 1/3] netlink: " Michal Kubecek
2019-04-24 21:34 ` [RFC PATCH net-next 2/3] ipset: drop ipset_nest_start() and ipset_nest_end() Michal Kubecek
2019-04-24 21:34 ` [RFC PATCH net-next 3/3] net: fix two coding style issues Michal Kubecek
2019-04-25  9:08 ` Jiri Pirko [this message]

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=20190425090846.GC3951@nanopsycho \
    --to=jiri@resnulli.us \
    --cc=davem@davemloft.net \
    --cc=dsahern@gmail.com \
    --cc=fw@strlen.de \
    --cc=jiri@mellanox.com \
    --cc=johannes.berg@intel.com \
    --cc=kadlec@blackhole.kfki.hu \
    --cc=mkubecek@suse.cz \
    --cc=netdev@vger.kernel.org \
    --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).