Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Jan 2017 08:17:33 -0700
From:      Sean Bruno <sbruno@freebsd.org>
To:        Matthew Macy <mmacy@nextbsd.org>, =?UTF-8?Q?Olivier_Cochard-Labb=c3=a9?= <olivier@cochard.me>
Cc:        "freebsd-net@freebsd.org" <freebsd-net@freebsd.org>, "freebsd-current@freebsd.org" <freebsd-current@freebsd.org>
Subject:   Re: HEADS-UP: IFLIB implementations of sys/dev/e1000 em, lem, igb pending
Message-ID:  <574a7ac7-4842-9518-8286-a4d89a9f7a27@freebsd.org>
In-Reply-To: <1598d97bf2a.c6bcb76838987.6501340920645175463@nextbsd.org>
References:  <30f21c75-d3a2-edcd-1999-d5ed9f970c06@freebsd.org> <b000a957-8d17-a04d-6275-0d3920aa8a17@freebsd.org> <CA%2Bq%2BTcramTrYgYT-s%2B=aBZzRJV8FmKQqGt=1twPhLBR7AoXkcQ@mail.gmail.com> <1598d97bf2a.c6bcb76838987.6501340920645175463@nextbsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--3xRIfR4hHTsqOg8lK9xvHtQsBq0dsLW7a
Content-Type: multipart/mixed; boundary="jOcuW0rdPk7diIb8EiUt34UHcmCK2AQmC";
 protected-headers="v1"
From: Sean Bruno <sbruno@freebsd.org>
To: Matthew Macy <mmacy@nextbsd.org>,
 =?UTF-8?Q?Olivier_Cochard-Labb=c3=a9?= <olivier@cochard.me>
Cc: "freebsd-net@freebsd.org" <freebsd-net@freebsd.org>,
 "freebsd-current@freebsd.org" <freebsd-current@freebsd.org>
Message-ID: <574a7ac7-4842-9518-8286-a4d89a9f7a27@freebsd.org>
Subject: Re: HEADS-UP: IFLIB implementations of sys/dev/e1000 em, lem, igb
 pending
References: <30f21c75-d3a2-edcd-1999-d5ed9f970c06@freebsd.org>
 <b000a957-8d17-a04d-6275-0d3920aa8a17@freebsd.org>
 <CA+q+TcramTrYgYT-s+=aBZzRJV8FmKQqGt=1twPhLBR7AoXkcQ@mail.gmail.com>
 <1598d97bf2a.c6bcb76838987.6501340920645175463@nextbsd.org>
In-Reply-To: <1598d97bf2a.c6bcb76838987.6501340920645175463@nextbsd.org>

--jOcuW0rdPk7diIb8EiUt34UHcmCK2AQmC
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable



On 01/11/17 05:54, Matthew Macy wrote:
>=20
>=20
>=20
>  ---- On Wed, 11 Jan 2017 01:23:46 -0800 Olivier Cochard-Labb=C3=A9 <ol=
ivier@cochard.me> wrote ----=20
>  > On Tue, Jan 10, 2017 at 4:31 AM, Sean Bruno <sbruno@freebsd.org> wro=
te:
>  >=20
>  > >
>  > > I've updated sys/dev/e1000 at svn R311849 to match Matt Macy's wor=
k 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 t=
hings
>  > > that I may have broken.
>  > >
>  > >
>  > >
>  > =E2=80=8BI've got problem with this new drivers regarding number of =
queues used on
>  > a Netgate RCC-VE 4860 (Intel i354 NIC).
>  > =E2=80=8BOnly one queue in place of 4 (on a 4 cores proc) previously=
: Performance
>  > drops dramatically.
>  >=20

>  > igb2: <Intel(R) PRO/1000 PCI-Express Network Driver> port 0x3000-0x3=
01f 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
>=20
> It has the wrong msix bar for your device. I'll look in to it.
>=20


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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- sys/net/iflib.c	(revision 311875)
+++ sys/net/iflib.c	(working copy)
@@ -4721,7 +4721,7 @@
 	if_softc_ctx_t scctx =3D &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 =3D scctx->isc_ntxqsets;
 	iflib_num_rx_queues =3D scctx->isc_nrxqsets;
@@ -4729,6 +4729,16 @@
 	device_printf(dev, "msix_init qsets capped at %d\n", iflib_num_tx_queue=
s);
 =09
 	bar =3D 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 =3D pci_read_config(dev, bar, 4);
+	if (use_different_bar =3D=3D 0)
+		bar +=3D 4;
+
 	admincnt =3D sctx->isc_admin_intrcnt;
 	/* Override by tuneable */
 	if (enable_msix =3D=3D 0)




--jOcuW0rdPk7diIb8EiUt34UHcmCK2AQmC--

--3xRIfR4hHTsqOg8lK9xvHtQsBq0dsLW7a
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQGTBAEBCgB9FiEEuq1GMucSHejSCZfdEgHvyh5yfmQFAlh2TI1fFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEJB
QUQ0NjMyRTcxMjFERThEMjA5OTdERDEyMDFFRkNBMUU3MjdFNjQACgkQEgHvyh5y
fmTrTwf/bVWrOFm8VV+v/QmGEIJYfhUCKaSRVx/4l7hKIXYf6ImPGMhDb7YC4Bmp
kKXdG1RenZwmwogOzRfsyCFDZFZmjv42NIuuFwl6AFh2u3sYuWWaYjXLw15S5jea
u7fOzTfMdxPs9BeBZzaKSZtOqHJHHV46u9z6gL3Aimg5+a4XouuFo3Zhfvgeqegi
7+l08gL21LEgQ/3pQPfQ5xIcP7nyBTxWJGDwlLW6DZREst/uahRvl5akDC/lfhgF
cF1rinUZDqVXTkJTh6iS7SEsPFI6r+szkfjVZz5LMIyTkGqg6GteqbOwQtRsTEaZ
S9e0CN7n7iTsU6XftMwj5VyjAqGbag==
=GdV1
-----END PGP SIGNATURE-----

--3xRIfR4hHTsqOg8lK9xvHtQsBq0dsLW7a--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?574a7ac7-4842-9518-8286-a4d89a9f7a27>