-
- Downloads
Merge branch 'devlink-code-split-and-structured-instance-walk'
Jakub Kicinski says: ==================== devlink: code split and structured instance walk Split devlink.c into a handful of files, trying to keep the "core" code away from all the command-specific implementations. The core code has been quite scattered until now. Going forward we can consider using a source file per-subobject, I think that it's quite beneficial to newcomers (based on relative ease with which folks contribute to ethtool vs devlink). But this series doesn't split everything out, yet - partially due to backporting concerns, but mostly due to lack of time. Bulk of the netlink command handling is left in a leftover.c file. Introduce a context structure for dumps, and use it to store the devlink instance ID of the last dumped devlink instance. This means we don't have to restart the walk from 0 each time. Finally - introduce a "structured walk". A centralized dump handler in devlink/netlink.c which walks the devlink instances, deals with refcounting/locking, simplifying the per-object implementations quite a bit. Inspired by the ethtool code. v1: https://lore.kernel.org/all/20230104041636.226398-1-kuba@kernel.org/ RFC: https://lore.kernel.org/all/20221215020155.1619839-1-kuba@kernel.org/ ==================== Link: https://lore.kernel.org/r/20230105040531.353563-1-kuba@kernel.org Signed-off-by:Jakub Kicinski <kuba@kernel.org>
No related branches found
No related tags found
Showing
- MAINTAINERS 1 addition, 1 deletionMAINTAINERS
- include/linux/netlink.h 4 additions, 0 deletionsinclude/linux/netlink.h
- net/Makefile 1 addition, 0 deletionsnet/Makefile
- net/core/Makefile 0 additions, 1 deletionnet/core/Makefile
- net/devlink/Makefile 3 additions, 0 deletionsnet/devlink/Makefile
- net/devlink/core.c 345 additions, 0 deletionsnet/devlink/core.c
- net/devlink/devl_internal.h 207 additions, 0 deletionsnet/devlink/devl_internal.h
- net/devlink/leftover.c 357 additions, 1103 deletionsnet/devlink/leftover.c
- net/devlink/netlink.c 242 additions, 0 deletionsnet/devlink/netlink.c
- net/netfilter/nf_conntrack_netlink.c 1 addition, 1 deletionnet/netfilter/nf_conntrack_netlink.c
Loading
Please register or sign in to comment