diff options
author | Zhu Lingshan <lingshan.zhu@intel.com> | 2021-08-18 12:57:14 +0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2021-09-05 23:23:07 +0300 |
commit | 90d1936681bc469824c6dfeda701efc884d3b448 (patch) | |
tree | de14168f831b30accd9e5f78a5aa4c63e3d682b2 /drivers/vdpa/ifcvf/ifcvf_main.c | |
parent | 2ddae773c93bbcb0678ae819551f1750a505edec (diff) | |
download | linux-90d1936681bc469824c6dfeda701efc884d3b448.tar.xz |
vDPA/ifcvf: enable multiqueue and control vq
This commit enbales multi-queue and control vq
features for ifcvf
Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com>
Link: https://lore.kernel.org/r/20210818095714.3220-3-lingshan.zhu@intel.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'drivers/vdpa/ifcvf/ifcvf_main.c')
-rw-r--r-- | drivers/vdpa/ifcvf/ifcvf_main.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c index 37675c93b1ff..bfc3d7d40c09 100644 --- a/drivers/vdpa/ifcvf/ifcvf_main.c +++ b/drivers/vdpa/ifcvf/ifcvf_main.c @@ -174,17 +174,12 @@ static u64 ifcvf_vdpa_get_features(struct vdpa_device *vdpa_dev) struct ifcvf_adapter *adapter = vdpa_to_adapter(vdpa_dev); struct ifcvf_hw *vf = vdpa_to_vf(vdpa_dev); struct pci_dev *pdev = adapter->pdev; - + u32 type = vf->dev_type; u64 features; - switch (vf->dev_type) { - case VIRTIO_ID_NET: - features = ifcvf_get_features(vf) & IFCVF_NET_SUPPORTED_FEATURES; - break; - case VIRTIO_ID_BLOCK: + if (type == VIRTIO_ID_NET || type == VIRTIO_ID_BLOCK) features = ifcvf_get_features(vf); - break; - default: + else { features = 0; IFCVF_ERR(pdev, "VIRTIO ID %u not supported\n", vf->dev_type); } |