HEADS-UP: IFLIB implementations of sys/dev/e1000 em, lem, igb pending
Sean Bruno
sbruno at freebsd.org
Wed Jan 11 15:17:39 UTC 2017
On 01/11/17 05:54, Matthew Macy wrote:
>
>
>
> ---- On Wed, 11 Jan 2017 01:23:46 -0800 Olivier Cochard-Labbé <olivier at cochard.me> wrote ----
> > On Tue, Jan 10, 2017 at 4:31 AM, Sean Bruno <sbruno at freebsd.org> wrote:
> >
> > >
> > > I've updated sys/dev/e1000 at svn R311849 to match Matt Macy's work on
> > > IFLIB in the kernel.
> > >
> > > At this point, the driver deviates from Intel's code dramatically and
> > > you now get to yell directly into the freebsd-net@ megaphone for things
> > > that I may have broken.
> > >
> > >
> > >
> > I've got problem with this new drivers regarding number of queues used on
> > a Netgate RCC-VE 4860 (Intel i354 NIC).
> > Only one queue in place of 4 (on a 4 cores proc) previously: Performance
> > drops dramatically.
> >
> > igb2: <Intel(R) PRO/1000 PCI-Express Network Driver> port 0x3000-0x301f mem
> > 0xdfea0000-0xdfebffff,0xdff24000-0xdff27fff irq 18 at device 20.0 on pci0
> > igb2: attach_pre capping queues at 8
> > igb2: using 1024 tx descriptors and 1024 rx descriptors
> > igb2: msix_init qsets capped at 8
> > igb2: Unable to map MSIX table
>
> It has the wrong msix bar for your device. I'll look in to it.
>
Olivier:
Give this a quick try. This isn't the correct way to do this, but I
want to see if I'm on the right path:
Index: sys/net/iflib.c
===================================================================
--- sys/net/iflib.c (revision 311875)
+++ sys/net/iflib.c (working copy)
@@ -4721,7 +4721,7 @@
if_softc_ctx_t scctx = &ctx->ifc_softc_ctx;
int vectors, queues, rx_queues, tx_queues, queuemsgs, msgs;
int iflib_num_tx_queues, iflib_num_rx_queues;
- int err, admincnt, bar;
+ int err, admincnt, bar, use_different_bar;
iflib_num_tx_queues = scctx->isc_ntxqsets;
iflib_num_rx_queues = scctx->isc_nrxqsets;
@@ -4729,6 +4729,16 @@
device_printf(dev, "msix_init qsets capped at %d\n", iflib_num_tx_queues);
bar = ctx->ifc_softc_ctx.isc_msix_bar;
+
+ /*
+ ** Some new devices, as with ixgbe, now may
+ ** use a different BAR, so we need to keep
+ ** track of which is used.
+ */
+ use_different_bar = pci_read_config(dev, bar, 4);
+ if (use_different_bar == 0)
+ bar += 4;
+
admincnt = sctx->isc_admin_intrcnt;
/* Override by tuneable */
if (enable_msix == 0)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 618 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-net/attachments/20170111/f95a26ba/attachment.sig>
More information about the freebsd-net
mailing list