X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=sidebyside;f=drivers%2Fnet%2Fifc%2Fifcvf_vdpa.c;h=da4667ba54e1c68b78eabf463534c72345c50959;hb=ac466a1d6c7892cc835e1ccbcdc83336c2f44701;hp=9c562def05f5588cf03e40b8955b3f09f4564dd3;hpb=0adf23adcbb521cd45e2eb88e15aa57317828433;p=dpdk.git diff --git a/drivers/net/ifc/ifcvf_vdpa.c b/drivers/net/ifc/ifcvf_vdpa.c index 9c562def05..da4667ba54 100644 --- a/drivers/net/ifc/ifcvf_vdpa.c +++ b/drivers/net/ifc/ifcvf_vdpa.c @@ -136,15 +136,19 @@ 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 i; + int i, ret; internal->vfio_dev_fd = -1; internal->vfio_group_fd = -1; internal->vfio_container_fd = -1; rte_pci_device_name(&dev->addr, devname, RTE_DEV_NAME_MAX_LEN); - rte_vfio_get_group_num(rte_pci_get_sysfs_path(), devname, + ret = rte_vfio_get_group_num(rte_pci_get_sysfs_path(), devname, &iommu_group_num); + if (ret <= 0) { + DRV_LOG(ERR, "%s failed to get IOMMU group", devname); + return -1; + } internal->vfio_container_fd = rte_vfio_container_create(); if (internal->vfio_container_fd < 0)