Date: Tue, 4 Apr 2017 21:03:34 +0000 (UTC) From: Sean Bruno <sbruno@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316502 - head/sys/net Message-ID: <201704042103.v34L3YU9078461@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sbruno Date: Tue Apr 4 21:03:34 2017 New Revision: 316502 URL: https://svnweb.freebsd.org/changeset/base/316502 Log: Allow MSIX to be turned off by tuneable per interface, per driver. Sponsored by: Limelight Networks Modified: head/sys/net/iflib.c head/sys/net/iflib.h Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Tue Apr 4 20:03:57 2017 (r316501) +++ head/sys/net/iflib.c Tue Apr 4 21:03:34 2017 (r316502) @@ -521,8 +521,6 @@ rxd_info_zero(if_rxd_info_t ri) #define MAX_SINGLE_PACKET_FRACTION 12 #define IF_BAD_DMA (bus_addr_t)-1 -static int enable_msix = 1; - #define CTX_ACTIVE(ctx) ((if_getdrvflags((ctx)->ifc_ifp) & IFF_DRV_RUNNING)) #define CTX_LOCK_INIT(_sc, _name) mtx_init(&(_sc)->ifc_mtx, _name, "iflib ctx lock", MTX_DEF) @@ -5187,7 +5185,7 @@ iflib_msix_init(if_ctx_t ctx) bar = ctx->ifc_softc_ctx.isc_msix_bar; admincnt = sctx->isc_admin_intrcnt; /* Override by tuneable */ - if (enable_msix == 0) + if (scctx->isc_disable_msix) goto msi; /* @@ -5428,6 +5426,9 @@ iflib_add_device_sysctl_pre(if_ctx_t ctx SYSCTL_ADD_U16(ctx_list, oid_list, OID_AUTO, "override_qs_enable", CTLFLAG_RWTUN, &ctx->ifc_sysctl_qs_eq_override, 0, "permit #txq != #rxq"); + SYSCTL_ADD_INT(ctx_list, oid_list, OID_AUTO, "disable_msix", + CTLFLAG_RWTUN, &ctx->ifc_softc_ctx.isc_disable_msix, 0, + "disable MSIX (default 0)"); /* XXX change for per-queue sizes */ SYSCTL_ADD_PROC(ctx_list, oid_list, OID_AUTO, "override_ntxds", Modified: head/sys/net/iflib.h ============================================================================== --- head/sys/net/iflib.h Tue Apr 4 20:03:57 2017 (r316501) +++ head/sys/net/iflib.h Tue Apr 4 21:03:34 2017 (r316502) @@ -216,6 +216,7 @@ typedef struct if_softc_ctx { iflib_intr_mode_t isc_intr; uint16_t isc_max_frame_size; /* set at init time by driver */ pci_vendor_info_t isc_vendor_info; /* set by iflib prior to attach_pre */ + int isc_disable_msix; if_txrx_t isc_txrx; } *if_softc_ctx_t;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201704042103.v34L3YU9078461>