diff options
author | Zhu Lingshan <lingshan.zhu@intel.com> | 2021-08-12 06:24:54 +0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2021-09-05 23:23:07 +0300 |
commit | 6b5df347c6482f57b0d8f0569b86fb8fcd90d168 (patch) | |
tree | 92b18179dd5a8b50c6e296f5f7b5b860ada84f11 /drivers/vdpa/ifcvf/ifcvf_base.h | |
parent | 30326f9577342aac257ed9c036608de666b06389 (diff) | |
download | linux-6b5df347c6482f57b0d8f0569b86fb8fcd90d168.tar.xz |
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>
Diffstat (limited to 'drivers/vdpa/ifcvf/ifcvf_base.h')
-rw-r--r-- | drivers/vdpa/ifcvf/ifcvf_base.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/vdpa/ifcvf/ifcvf_base.h b/drivers/vdpa/ifcvf/ifcvf_base.h index 2996db0da490..1601e87870da 100644 --- a/drivers/vdpa/ifcvf/ifcvf_base.h +++ b/drivers/vdpa/ifcvf/ifcvf_base.h @@ -106,6 +106,12 @@ struct ifcvf_lm_cfg { struct ifcvf_vring_lm_cfg vring_lm_cfg[IFCVF_MAX_QUEUE_PAIRS]; }; +struct ifcvf_vdpa_mgmt_dev { + struct vdpa_mgmt_dev mdev; + struct ifcvf_adapter *adapter; + struct pci_dev *pdev; +}; + int ifcvf_init_hw(struct ifcvf_hw *hw, struct pci_dev *dev); int ifcvf_start_hw(struct ifcvf_hw *hw); void ifcvf_stop_hw(struct ifcvf_hw *hw); |