X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fifc%2Fifcvf_vdpa.c;h=97a57f182b9b55d3263afc1da9b52c9f5dde4159;hb=4a5140ab17d29e77eefa47b5cb514238e8e0c132;hp=0d237ae40ccb36bde1cfa6bfc556c6456b560ee8;hpb=3e2923cffac1459a65f5584cc851d27b0ed0865c;p=dpdk.git diff --git a/drivers/net/ifc/ifcvf_vdpa.c b/drivers/net/ifc/ifcvf_vdpa.c index 0d237ae40c..97a57f182b 100644 --- a/drivers/net/ifc/ifcvf_vdpa.c +++ b/drivers/net/ifc/ifcvf_vdpa.c @@ -112,7 +112,6 @@ ifcvf_vfio_setup(struct ifcvf_internal *internal) struct rte_pci_device *dev = internal->pdev; char devname[RTE_DEV_NAME_MAX_LEN] = {0}; int iommu_group_num; - int ret = 0; int i; internal->vfio_dev_fd = -1; @@ -146,9 +145,8 @@ ifcvf_vfio_setup(struct ifcvf_internal *internal) internal->hw.mem_resource[i].len = internal->pdev->mem_resource[i].len; } - ret = ifcvf_init_hw(&internal->hw, internal->pdev); - return ret; + return 0; err: rte_vfio_container_destroy(internal->vfio_container_fd); @@ -720,7 +718,7 @@ ifcvf_get_protocol_features(int did __rte_unused, uint64_t *features) return 0; } -struct rte_vdpa_dev_ops ifcvf_ops = { +static struct rte_vdpa_dev_ops ifcvf_ops = { .get_queue_num = ifcvf_get_queue_num, .get_features = ifcvf_get_vdpa_features, .get_protocol_features = ifcvf_get_protocol_features, @@ -758,6 +756,9 @@ ifcvf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, if (ifcvf_vfio_setup(internal) < 0) return -1; + if (ifcvf_init_hw(&internal->hw, internal->pdev) < 0) + return -1; + internal->max_queues = IFCVF_MAX_QUEUES; features = ifcvf_get_features(&internal->hw); internal->features = (features &