Date: Mon, 30 Oct 2017 21:08:12 +0000 (UTC) From: Stephen Hurd <shurd@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325166 - head/sys/net Message-ID: <201710302108.v9UL8CMP071651@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: shurd Date: Mon Oct 30 21:08:12 2017 New Revision: 325166 URL: https://svnweb.freebsd.org/changeset/base/325166 Log: Avoid enabling MSI-X if MSI-X is disabled globally It was reported on the community call that with hw.pci.enable_msix=0, iflib would enable MSI-X on the device and attempt to use it, which caused issues. Test the sysctl explicitly and do not enable MSI-X if it's disabled globally. Reviewed by: sbruno Approved by: sbruno (mentor) Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D12805 Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Mon Oct 30 20:58:57 2017 (r325165) +++ head/sys/net/iflib.c Mon Oct 30 21:08:12 2017 (r325166) @@ -5260,6 +5260,19 @@ iflib_msix_init(if_ctx_t ctx) bar = ctx->ifc_softc_ctx.isc_msix_bar; admincnt = sctx->isc_admin_intrcnt; + /* Override by global tuneable */ + { + int i; + size_t len = sizeof(i); + err = kernel_sysctlbyname(curthread, "hw.pci.enable_msix", &i, &len, NULL, 0, NULL, 0); + if (err == 0) { + if (i == 0) + goto msi; + } + else { + device_printf(dev, "unable to read hw.pci.enable_msix."); + } + } /* Override by tuneable */ if (scctx->isc_disable_msix) goto msi;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710302108.v9UL8CMP071651>