From: Jiri Pirko <jiri@resnulli.us>
To: Jakub Kicinski <kuba@kernel.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
pabeni@redhat.com, johannes@sipsolutions.net
Subject: Re: [PATCH net-next 00/10] genetlink: provide struct genl_info to dumps
Date: Thu, 10 Aug 2023 10:30:50 +0200 [thread overview]
Message-ID: <ZNSgOt91RerMMhXV@nanopsycho> (raw)
In-Reply-To: <20230809182648.1816537-1-kuba@kernel.org>
Wed, Aug 09, 2023 at 08:26:38PM CEST, kuba@kernel.org wrote:
>One of the biggest (which is not to say only) annoyances with genetlink
>handling today is that doit and dumpit need some of the same information,
>but it is passed to them in completely different structs.
>
>The implementations commonly end up writing a _fill() method which
>populates a message and have to pass at least 6 parameters. 3 of which
>are extracted manually from request info.
>
>After a lot of umming and ahing I decided to populate struct genl_info
>for dumps, without trying to factor out only the common parts.
>This makes the adoption easiest.
>
>In the future we may add a new version of dump which takes
>struct genl_info *info as the second argument, instead of
That would be very nice. I'm dreaming about that for quite some time :)
>struct netlink_callback *cb. For now developers have to call
>genl_info_dump(cb) to get the info.
>
>Typical genetlink families no longer get exposed to netlink protocol
>internals like pid and seq numbers.
>
>Jakub Kicinski (10):
> genetlink: use push conditional locking info dumpit/done
> genetlink: make genl_info->nlhdr const
> genetlink: remove userhdr from struct genl_info
> genetlink: add struct genl_info to struct genl_dumpit_info
> genetlink: use attrs from struct genl_info
> genetlink: add a family pointer to struct genl_info
> genetlink: add genlmsg_iput() API
> netdev-genl: use struct genl_info for reply construction
> ethtool: netlink: simplify arguments to ethnl_default_parse()
> ethtool: netlink: always pass genl_info to .prepare_data
>
> drivers/block/drbd/drbd_nl.c | 9 +--
> drivers/net/wireguard/netlink.c | 2 +-
> include/net/genetlink.h | 72 +++++++++++++++++--
> net/core/netdev-genl.c | 15 ++--
> net/devlink/health.c | 2 +-
> net/devlink/leftover.c | 6 +-
> net/ethtool/channels.c | 2 +-
> net/ethtool/coalesce.c | 6 +-
> net/ethtool/debug.c | 2 +-
> net/ethtool/eee.c | 2 +-
> net/ethtool/eeprom.c | 9 ++-
> net/ethtool/features.c | 2 +-
> net/ethtool/fec.c | 2 +-
> net/ethtool/linkinfo.c | 2 +-
> net/ethtool/linkmodes.c | 2 +-
> net/ethtool/linkstate.c | 2 +-
> net/ethtool/mm.c | 2 +-
> net/ethtool/module.c | 5 +-
> net/ethtool/netlink.c | 31 ++++-----
> net/ethtool/netlink.h | 2 +-
> net/ethtool/pause.c | 5 +-
> net/ethtool/phc_vclocks.c | 2 +-
> net/ethtool/plca.c | 4 +-
> net/ethtool/privflags.c | 2 +-
> net/ethtool/pse-pd.c | 6 +-
> net/ethtool/rings.c | 5 +-
> net/ethtool/rss.c | 3 +-
> net/ethtool/stats.c | 5 +-
> net/ethtool/strset.c | 2 +-
> net/ethtool/tsinfo.c | 2 +-
> net/ethtool/tunnels.c | 2 +-
> net/ethtool/wol.c | 5 +-
> net/ieee802154/nl802154.c | 4 +-
> net/ncsi/ncsi-netlink.c | 2 +-
> net/ncsi/ncsi-netlink.h | 2 +-
> net/netlink/genetlink.c | 119 +++++++++++++++-----------------
> net/nfc/netlink.c | 4 +-
> net/openvswitch/conntrack.c | 2 +-
> net/openvswitch/datapath.c | 29 ++++----
> net/openvswitch/meter.c | 10 +--
> net/tipc/netlink_compat.c | 4 +-
> net/tipc/node.c | 4 +-
> net/tipc/socket.c | 2 +-
> net/tipc/udp_media.c | 2 +-
> 44 files changed, 226 insertions(+), 178 deletions(-)
>
>--
>2.41.0
>
next prev parent reply other threads:[~2023-08-10 8:30 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-09 18:26 [PATCH net-next 00/10] genetlink: provide struct genl_info to dumps Jakub Kicinski
2023-08-09 18:26 ` [PATCH net-next 01/10] genetlink: use push conditional locking info dumpit/done Jakub Kicinski
2023-08-09 20:56 ` Johannes Berg
2023-08-10 6:54 ` Jiri Pirko
2023-08-09 18:26 ` [PATCH net-next 02/10] genetlink: make genl_info->nlhdr const Jakub Kicinski
2023-08-10 8:22 ` Jiri Pirko
2023-08-09 18:26 ` [PATCH net-next 03/10] genetlink: remove userhdr from struct genl_info Jakub Kicinski
2023-08-09 20:59 ` Johannes Berg
2023-08-09 22:02 ` Jakub Kicinski
2023-08-10 8:26 ` Jiri Pirko
2023-08-09 18:26 ` [PATCH net-next 04/10] genetlink: add struct genl_info to struct genl_dumpit_info Jakub Kicinski
2023-08-10 8:33 ` Jiri Pirko
2023-08-09 18:26 ` [PATCH net-next 05/10] genetlink: use attrs from struct genl_info Jakub Kicinski
2023-08-09 21:04 ` Johannes Berg
2023-08-10 6:17 ` Miquel Raynal
2023-08-10 8:35 ` Jiri Pirko
2023-08-09 18:26 ` [PATCH net-next 06/10] genetlink: add a family pointer to " Jakub Kicinski
2023-08-09 18:26 ` [PATCH net-next 07/10] genetlink: add genlmsg_iput() API Jakub Kicinski
2023-08-10 9:07 ` Jiri Pirko
2023-08-10 16:13 ` Jakub Kicinski
2023-08-10 16:42 ` Jiri Pirko
2023-08-09 18:26 ` [PATCH net-next 08/10] netdev-genl: use struct genl_info for reply construction Jakub Kicinski
2023-08-10 9:10 ` Jiri Pirko
2023-08-09 18:26 ` [PATCH net-next 09/10] ethtool: netlink: simplify arguments to ethnl_default_parse() Jakub Kicinski
2023-08-10 9:12 ` Jiri Pirko
2023-08-09 18:26 ` [PATCH net-next 10/10] ethtool: netlink: always pass genl_info to .prepare_data Jakub Kicinski
2023-08-10 18:40 ` Vladimir Oltean
2023-08-10 8:30 ` Jiri Pirko [this message]
2023-08-10 16:14 ` [PATCH net-next 00/10] genetlink: provide struct genl_info to dumps Jakub Kicinski
2023-08-10 16:43 ` Jiri Pirko
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=ZNSgOt91RerMMhXV@nanopsycho \
--to=jiri@resnulli.us \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=johannes@sipsolutions.net \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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).