From: Chris Wright <chrisw@redhat.com>
To: "Richardson, Bruce" <bruce.richardson@intel.com>
Cc: dev <dev@dpdk.org>
Subject: Re: [dpdk-dev] l2fwd not working on PF while working on VF
Date: Wed, 9 Apr 2014 09:25:13 -0700 [thread overview]
Message-ID: <20140409162513.GK17094@x220.localdomain> (raw)
In-Reply-To: <59AF69C657FD0841A61C55336867B5B01A9FA0C0@IRSMSX103.ger.corp.intel.com>
* 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 <do drivers in
kernel rant>). Any reason not to do this w/ igb_uio...e.g.
thanks,
-chris
---
From: Chris Wright <chrisw@redhat.com>
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 <chrisw@redhat.com>
---
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))
prev parent reply other threads:[~2014-04-09 16:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-09 14:03 Tomasz K
2014-04-09 15:10 ` Richardson, Bruce
2014-04-09 15:21 ` Tomasz K
2014-04-09 16:25 ` Chris Wright [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140409162513.GK17094@x220.localdomain \
--to=chrisw@redhat.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).