vDPA/ifcvf: implement management netlink framework for ifcvf
authorZhu Lingshan <lingshan.zhu@intel.com>
Thu, 12 Aug 2021 03:24:54 +0000 (11:24 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Sun, 5 Sep 2021 20:23:07 +0000 (16:23 -0400)
commit6b5df347c6482f57b0d8f0569b86fb8fcd90d168
tree92b18179dd5a8b50c6e296f5f7b5b860ada84f11
parent30326f9577342aac257ed9c036608de666b06389
vDPA/ifcvf: implement management netlink framework for ifcvf

This commit implements the management netlink framework for ifcvf,
including register and add / remove a device

It works with iproute2:
[root@localhost lszhu]# vdpa mgmtdev show -jp
{
    "mgmtdev": {
        "pci/0000:01:00.5": {
            "supported_classes": [ "net" ]
        },
        "pci/0000:01:00.6": {
            "supported_classes": [ "net" ]
        }
    }
}

[root@localhost lszhu]# vdpa dev add mgmtdev pci/0000:01:00.5 name vdpa0
[root@localhost lszhu]# vdpa dev add mgmtdev pci/0000:01:00.6 name vdpa1

Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Link: https://lore.kernel.org/r/20210812032454.24486-3-lingshan.zhu@intel.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vdpa/ifcvf/ifcvf_base.h
drivers/vdpa/ifcvf/ifcvf_main.c