From owner-freebsd-net@freebsd.org Wed Jan 11 15:17:39 2017 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2427FCAA62B; Wed, 11 Jan 2017 15:17:39 +0000 (UTC) (envelope-from sbruno@freebsd.org) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F3DF01C4A; Wed, 11 Jan 2017 15:17:38 +0000 (UTC) (envelope-from sbruno@freebsd.org) Received: from [192.168.0.6] (67-0-248-244.albq.qwest.net [67.0.248.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id E0B301928BA; Wed, 11 Jan 2017 15:17:36 +0000 (UTC) Subject: Re: HEADS-UP: IFLIB implementations of sys/dev/e1000 em, lem, igb pending To: Matthew Macy , =?UTF-8?Q?Olivier_Cochard-Labb=c3=a9?= References: <30f21c75-d3a2-edcd-1999-d5ed9f970c06@freebsd.org> <1598d97bf2a.c6bcb76838987.6501340920645175463@nextbsd.org> Cc: "freebsd-net@freebsd.org" , "freebsd-current@freebsd.org" From: Sean Bruno Message-ID: <574a7ac7-4842-9518-8286-a4d89a9f7a27@freebsd.org> Date: Wed, 11 Jan 2017 08:17:33 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <1598d97bf2a.c6bcb76838987.6501340920645175463@nextbsd.org> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="3xRIfR4hHTsqOg8lK9xvHtQsBq0dsLW7a" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 15:17:39 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --3xRIfR4hHTsqOg8lK9xvHtQsBq0dsLW7a Content-Type: multipart/mixed; boundary="jOcuW0rdPk7diIb8EiUt34UHcmCK2AQmC"; protected-headers="v1" From: Sean Bruno To: Matthew Macy , =?UTF-8?Q?Olivier_Cochard-Labb=c3=a9?= Cc: "freebsd-net@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> <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 wrote ----=20 > > On Tue, Jan 10, 2017 at 4:31 AM, Sean Bruno 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: 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--