On Wed, Sep 26, 2018 at 08:21:16PM +0300, Leon Romanovsky wrote: > > I showed you, it is using a string for NEWLINK, which is what we are > > copying. > > You showed me IFLA_INFO_KIND, which was introduce to filter link dumps. > dc599f76c22b ("net: Add support for filtering link dump by master device and kind") No, that commit is just adding some support to dump_ifinfo. The IFLA_INFO_KIND has existed since day 1 of NEWLINK and is used to lookup the link driver: static int rtnl_newlink(struct sk_buff *skb, struct nlmsghdr *nlh, struct netlink_ext_ack *extack) { if (linkinfo[IFLA_INFO_KIND]) { nla_strlcpy(kind, linkinfo[IFLA_INFO_KIND], sizeof(kind)); ops = rtnl_link_ops_get(kind); Which is exactly the pattern we need to follow. Jason