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 F1EEF68BE for ; Wed, 9 Apr 2014 18:23:37 +0200 (CEST) Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s39GPEYu022314 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 9 Apr 2014 12:25:14 -0400 Received: from x220.localdomain (ovpn-113-180.phx2.redhat.com [10.3.113.180]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id s39GPDah031098; Wed, 9 Apr 2014 12:25:13 -0400 Date: Wed, 9 Apr 2014 09:25:13 -0700 From: Chris Wright To: "Richardson, Bruce" Message-ID: <20140409162513.GK17094@x220.localdomain> References: <59AF69C657FD0841A61C55336867B5B01A9FA0C0@IRSMSX103.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <59AF69C657FD0841A61C55336867B5B01A9FA0C0@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.22 Cc: dev Subject: Re: [dpdk-dev] l2fwd not working on PF while working on VF 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: Wed, 09 Apr 2014 16:23:38 -0000 * Richardson, Bruce (bruce.richardson@intel.com) wrote: > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Tomasz K > > Sent: Wednesday, April 09, 2014 3:04 PM > > To: dev > > Subject: [dpdk-dev] l2fwd not working on PF while working on VF > > > > Dear All > > > > I have a setup with Intel 82576 DPDK NIC. > > For one of the available DPDK ports i have created 8 VFs using igb_uio based on > > steps presented in programmers guide. Some of them are attached to VM, some > > maybe used on host > > > > After some tests with l2fwd application i found out that it is not working for PF, > > but works perfectly for any VF (both on host and in VM). > > How many queues are being allocated to each VF? According to the datasheet, the 82576 NIC has only got 16 RX and TX queues, so if you have 8 VF's with 2 RX and TX queues allocated to each, you may have no remaining queues left for the PF to use on the host. BTW, Linux driver caps VFs at 7 for this reason (#include ). Any reason not to do this w/ igb_uio...e.g. thanks, -chris --- From: Chris Wright 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. Signed-off-by: Chris Wright --- lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c index 6db8a4a..096fb01 100644 --- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c +++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c @@ -130,6 +130,12 @@ store_max_vfs(struct device *dev, struct device_attribute *attr, if (0 != strict_strtoul(buf, 0, &max_vfs)) return -EINVAL; + /* reserve a queue pair for PF */ + if (max_vfs > 7) { + dev_warn(&pdev->dev, "Maxixum of 7 VFs per PF, using max\n"); + max_vfs = 7; + } + if (0 == max_vfs) pci_disable_sriov(pdev); else if (0 == local_pci_num_vf(pdev))