From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Viktorin Subject: Re: [PATCH 10/15] vfio: extract setup logic out of pci_vfio_map_resource Date: Tue, 10 May 2016 14:58:26 +0200 Message-ID: <20160510145826.637af9a5@jvn> References: <1461937456-22943-1-git-send-email-viktorin@rehivetech.com> <1461937456-22943-11-git-send-email-viktorin@rehivetech.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: "dev@dpdk.org" , David Marchand , "Wiles, Keith" , Santosh Shukla , "Stephen Hemminger" To: "Burakov, Anatoly" Return-path: Received: from wes1-so2.wedos.net (wes1-so2.wedos.net [46.28.106.16]) by dpdk.org (Postfix) with ESMTP id A1B589AB2 for ; Tue, 10 May 2016 14:58:22 +0200 (CEST) In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, 10 May 2016 11:53:21 +0000 "Burakov, Anatoly" wrote: > 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 for this catch, I'll check. I've rebased the patch set once because there were some changes to the original VFIO code. Hope for no more such rebasing. Regards Jan > > Thanks, > Anatoly -- Jan Viktorin E-mail: Viktorin@RehiveTech.com System Architect Web: www.RehiveTech.com RehiveTech Brno, Czech Republic