From owner-svn-src-all@FreeBSD.ORG Sun Aug 22 01:15:36 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0830F106566C; Sun, 22 Aug 2010 01:15:36 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id BBF9A8FC13; Sun, 22 Aug 2010 01:15:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o7M1DS2G026492; Sat, 21 Aug 2010 19:13:28 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 21 Aug 2010 19:13:34 -0600 (MDT) Message-Id: <20100821.191334.655406241928302946.imp@bsdimp.com> To: yongari@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <201008212313.o7LNDGpH083604@svn.freebsd.org> References: <201008212313.o7LNDGpH083604@svn.freebsd.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r211594 - head/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2010 01:15:36 -0000 In message: <201008212313.o7LNDGpH083604@svn.freebsd.org> Pyun YongHyeon writes: : Author: yongari : Date: Sat Aug 21 23:13:16 2010 : New Revision: 211594 : URL: http://svn.freebsd.org/changeset/base/211594 : : Log: : Load tunable from loader.conf(5) instead of device.hints(5). Why the move? Warner : Modified: : head/sys/dev/bge/if_bge.c : : Modified: head/sys/dev/bge/if_bge.c : ============================================================================== : --- head/sys/dev/bge/if_bge.c Sat Aug 21 22:23:22 2010 (r211593) : +++ head/sys/dev/bge/if_bge.c Sat Aug 21 23:13:16 2010 (r211594) : @@ -4898,6 +4898,8 @@ bge_add_sysctls(struct bge_softc *sc) : struct sysctl_ctx_list *ctx; : struct sysctl_oid_list *children, *schildren; : struct sysctl_oid *tree; : + char tn[32]; : + int unit; : : ctx = device_get_sysctl_ctx(sc->bge_dev); : children = SYSCTL_CHILDREN(device_get_sysctl_tree(sc->bge_dev)); : @@ -4917,6 +4919,7 @@ bge_add_sysctls(struct bge_softc *sc) : : #endif : : + unit = device_get_unit(sc->bge_dev); : /* : * A common design characteristic for many Broadcom client controllers : * is that they only support a single outstanding DMA read operation : @@ -4929,13 +4932,13 @@ bge_add_sysctls(struct bge_softc *sc) : * performance is about 850Mbps. However forcing coalescing mbufs : * consumes a lot of CPU cycles, so leave it off by default. : */ : + sc->bge_forced_collapse = 0; : + snprintf(tn, sizeof(tn), "dev.bge.%d.forced_collapse", unit); : + TUNABLE_INT_FETCH(tn, &sc->bge_forced_collapse); : SYSCTL_ADD_INT(ctx, children, OID_AUTO, "forced_collapse", : CTLFLAG_RW, &sc->bge_forced_collapse, 0, : "Number of fragmented TX buffers of a frame allowed before " : "forced collapsing"); : - resource_int_value(device_get_name(sc->bge_dev), : - device_get_unit(sc->bge_dev), "forced_collapse", : - &sc->bge_forced_collapse); : : if (BGE_IS_5705_PLUS(sc)) : return; :