Re: HEADS-UP: IFLIB implementations of sys/dev/e1000 em, lem, igb pending

From: Sean Bruno <sbruno_at_freebsd.org>
Date: Wed, 11 Jan 2017 08:17:33 -0700
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_at_ 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)
_at__at_ -4721,7 +4721,7 _at__at_
 	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;
_at__at_ -4729,6 +4729,16 _at__at_
 	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)




Received on Wed Jan 11 2017 - 14:17:39 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:09 UTC