genetlink: provide struct genl_info to dumps
Status from this message: This series was applied to netdev/net-next.git (main)
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest10 patches 2 repliesApplied 10/10
- v210 patches 7 repliesSuperseded
- v110 patches 19 repliesSuperseded
Changes in v3 from the cover letter
- correct the condition in ethtool code (patch 10)
v2: https://lore.kernel.org/all/[email protected]/
- replace the GENL_INFO_NTF() macro with init helper
- fix the commit messages
v1: https://lore.kernel.org/all/[email protected]/
Patches in v3 All 10 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/10 | genetlink: push conditional locking into dumpit/donenet/ | +35 | 0 replies | Applied |
| 2/10 | genetlink: make genl_info->nlhdr constinclude/ net/ net/ | +3 | 0 replies | Applied |
| 3/10 | genetlink: remove userhdr from struct genl_infodrivers/ include/ net/ +4 more | +33 | 1 reply | Applied |
| 4/10 | genetlink: add struct genl_info to struct genl_dumpit_infoinclude/ net/ | +22 | 0 replies | Applied |
| 5/10 | genetlink: use attrs from struct genl_infodrivers/ include/ net/ +10 more | +20 | 0 replies | Applied |
| 6/10 | genetlink: add a family pointer to struct genl_infoinclude/ net/ | +14 | 0 replies | Applied |
| 7/10 | genetlink: add genlmsg_iput() APIinclude/ | +53 | 0 replies | Applied |
| 8/10 | netdev-genl: use struct genl_info for reply constructionnet/ | +8 | 0 replies | Applied |
| 9/10 | ethtool: netlink: simplify arguments to ethnl_default_parse()net/ | +9 | 0 replies | Applied |
| 10/10 | ethtool: netlink: always pass genl_info to .prepare_datanet/ net/ net/ +22 more | +47 | 1 reply | Applied |
Reviews trailers per patch
All 10 patches have a Reviewed-by or Acked-by.
| Patch | Johannes Berg | Jiri Pirko | Miquel Raynal | Vladimir Oltean | Aaron Conole |
|---|---|---|---|---|---|
| 1/10 | R-b | R-b | |||
| 2/10 | R-b | ||||
| 3/10 | R-b | R-b | R-b | ||
| 4/10 | R-b | ||||
| 5/10 | R-b | R-b | R-b | ||
| 6/10 | R-b | ||||
| 7/10 | R-b | ||||
| 8/10 | R-b | ||||
| 9/10 | R-b | ||||
| 10/10 | R-b | R-b T-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.
Cover letter [PATCH net-next v3 00/10] genetlink: provide struct genl_info to dumps
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 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.
v3:
- correct the condition in ethtool code (patch 10)
v2: https://lore.kernel.org/all/[email protected]/
- replace the GENL_INFO_NTF() macro with init helper
- fix the commit messages
v1: https://lore.kernel.org/all/[email protected]/
Jakub Kicinski (10):
genetlink: push conditional locking into 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 | 76 ++++++++++++++++++-- net/core/netdev-genl.c | 17 +++-- 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 | 33 ++++----- 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, 234 insertions(+), 178 deletions(-)
Signature · 1 line
2.41.0