[dpdk-dev] [PATCH 10/15] vfio: extract setup logic out of pci_vfio_map_resource

Burakov, Anatoly anatoly.burakov at intel.com
Tue May 10 13:53:21 CEST 2016


Hi Jan,


>  	/*
> -	 * at this point, we know at least one port on this device is bound to
> VFIO,
> -	 * so we can proceed to try and set this particular port up
> -	 */
> -
> -	/* check if the group is viable */
> -	ret = ioctl(vfio_group_fd, VFIO_GROUP_GET_STATUS,
> &group_status);
> -	if (ret) {
> -		RTE_LOG(ERR, EAL, "  %s cannot get group status, "
> -				"error %i (%s)\n", pci_addr, errno,
> strerror(errno));
> -		close(vfio_group_fd);
> -		clear_current_group();
> -		return -1;
> -	} else if (!(group_status.flags & VFIO_GROUP_FLAGS_VIABLE)) {
> -		RTE_LOG(ERR, EAL, "  %s VFIO group is not viable!\n",
> pci_addr);
> -		close(vfio_group_fd);
> -		clear_current_group();
> -		return -1;
> -	}
> -

I think you've lost this bit when moving things around. I can't find any viability checks in eal_vfio.c

Thanks,
Anatoly


More information about the dev mailing list