From owner-svn-src-head@freebsd.org Tue Apr 4 21:03:35 2017 Return-Path: Delivered-To: svn-src-head@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 8FCF0D2F974; Tue, 4 Apr 2017 21:03:35 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 471F687B; Tue, 4 Apr 2017 21:03:35 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v34L3YOx078463; Tue, 4 Apr 2017 21:03:34 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v34L3YU9078461; Tue, 4 Apr 2017 21:03:34 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201704042103.v34L3YU9078461@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Tue, 4 Apr 2017 21:03:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316502 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Apr 2017 21:03:35 -0000 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;