Re: [RFC WIP 1/2] RDMA/Core: add RDMA_NLDEV_CMD_NEWLINK/DELLLINK support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux