On Wed, Oct 30, 2024 at 05:53:09PM +0100, Kory Maincent wrote: > From: Kory Maincent (Dent Project) <kory.maincent@xxxxxxxxxxx> > > Introduce support for the ethnl_info_init_ntf helper function to enable > initialization of ethtool notifications outside of the netlink.c file. > This change allows for more flexible notification handling. > > Signed-off-by: Kory Maincent <kory.maincent@xxxxxxxxxxx> > --- > > changes in v2: > - new patch. > --- > net/ethtool/netlink.c | 5 +++++ > net/ethtool/netlink.h | 2 ++ > 2 files changed, 7 insertions(+) > > diff --git a/net/ethtool/netlink.c b/net/ethtool/netlink.c > index e3f0ef6b851b..808cc8096f93 100644 > --- a/net/ethtool/netlink.c > +++ b/net/ethtool/netlink.c > @@ -805,6 +805,11 @@ static void ethnl_default_notify(struct net_device *dev, unsigned int cmd, > typedef void (*ethnl_notify_handler_t)(struct net_device *dev, unsigned int cmd, > const void *data); > > +void ethnl_info_init_ntf(struct genl_info *info, u8 cmd) > +{ > + genl_info_init_ntf(info, ðtool_genl_family, cmd); > +} > + I've not looked at the users yet. Does this need EXPORT_SYMBOL_GPL()? Andrew