From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id C6445B0C2 for ; Fri, 13 Jun 2014 21:48:37 +0200 (CEST) Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s5DJmp4I028208 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 13 Jun 2014 15:48:51 -0400 Received: from x220.localdomain ([10.3.113.19]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id s5DJmnbb003486; Fri, 13 Jun 2014 15:48:49 -0400 Date: Fri, 13 Jun 2014 12:48:49 -0700 From: Chris Wright To: "Richardson, Bruce" Message-ID: <20140613194849.GB1384@x220.localdomain> References: <20140606235028.189345212@networkplumber.org> <2240300.rVk2eNDOWK@xps13> <20140613102440.19537123@nehalam.linuxnetplumber.net> <20140613175137.GS1384@x220.localdomain> <59AF69C657FD0841A61C55336867B5B01AA36117@IRSMSX103.ger.corp.intel.com> <20140613181403.GT1384@x220.localdomain> <59AF69C657FD0841A61C55336867B5B01AA3616B@IRSMSX103.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <59AF69C657FD0841A61C55336867B5B01AA3616B@IRSMSX103.ger.corp.intel.com> User-Agent: Mutt/1.5.21+63 (2f2ebc24920d) (2011-07-01) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH] igb_uio: cap max VFs at 7 to reserve one for PF X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jun 2014 19:48:38 -0000 * Richardson, Bruce (bruce.richardson@intel.com) wrote: > > -----Original Message----- > > From: Chris Wright [mailto:chrisw@redhat.com] > > Sent: Friday, June 13, 2014 11:14 AM > > To: Richardson, Bruce > > Cc: Chris Wright; Stephen Hemminger; Thomas Monjalon; dev@dpdk.org > > Subject: Re: [PATCH] igb_uio: cap max VFs at 7 to reserve one for PF > > > > * Richardson, Bruce (bruce.richardson@intel.com) wrote: > > > > > > > > > > -----Original Message----- > > > > From: Chris Wright [mailto:chrisw@redhat.com] > > > > Sent: Friday, June 13, 2014 10:52 AM > > > > To: Richardson, Bruce; Stephen Hemminger > > > > Cc: Thomas Monjalon; dev@dpdk.org > > > > Subject: [PATCH] igb_uio: cap max VFs at 7 to reserve one for PF > > > > > > > > To keep from confusing users, cap max VFs at 7, despite PCI SR-IOV config > > > > space showing a max of 8. This reserves a queue pair for the PF. > > > > > > > > This issue was cited here: > > > > > > > > http://dpdk.org/ml/archives/dev/2014-April/001832.html > > > > > > > > Cc: Bruce Richardson > > > > Cc: Stephen Hemminger > > > > Signed-off-by: Chris Wright > > > > --- > > > > > > > > This is what Linux kernel driver does. I have only > > > > compile tested it. Stephen sending to you and Bruce > > > > in case you want to Ack and add to your current queue. > > > > > > > > > > Sorry, NAK - at least for this implementation. > > > > Oh, that's fine. > > > > > Hardcoding this to 7 is a bad idea, as the actual max number of VFs supported > > will depend on the actual hardware used. For someone using an 82599, they can > > have up to 64 VFs, or 63+PF, so limiting so 7 in that case is a major reduction in > > capability. What might work there is querying the max number of VFs and > > limiting to max - 1. > > > > But this is igb_uio, not 82599 (ixgbe). > > igb_uio is used as the supporting kernel module for both the e1000/igb and ixgbe pmd implementations (as well as for the forthcoming i40e pmd). Despite the name, it's not just for igb-based NICs. Oh, right, sorry, was looking at pmd side for each driver. > > > However, even with that, I would suggest that any limit should be possible to > > override. It's entirely possible that someone max actually want to reserve the > > full number of VFs, either because they don't want to use the NIC on the host at > > all, or because they are happy to use a VF on the host instead. Module > > parameter to allow override might work - and information on it could be added > > to the error message when we limit the VFs inside the driver. > > > > It's been a while since I've looked at this, but my recollection is > > the PF must be there (basic mailbox handling, for example). > > > > Would you rather a simple warning message as a hint? > > I'm not sure about the PF still needing to be there or not - I'm not an expert in that area, so you may indeed be right. > However, as for this patch, I'd probably be ok for now with a version that queried the max_vfs and limited based on that. If in future we do need to add an override it should be trivial to add later-on. I'll look at that idea. thanks, -chris