From owner-svn-src-stable-7@FreeBSD.ORG Fri Sep 24 17:56:12 2010 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 851E31065673; Fri, 24 Sep 2010 17:56:12 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 59DAF8FC18; Fri, 24 Sep 2010 17:56:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8OHuCxj033739; Fri, 24 Sep 2010 17:56:12 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8OHuCNr033737; Fri, 24 Sep 2010 17:56:12 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201009241756.o8OHuCNr033737@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 24 Sep 2010 17:56:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213108 - stable/7/sys/dev/bge X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Sep 2010 17:56:12 -0000 Author: yongari Date: Fri Sep 24 17:56:12 2010 New Revision: 213108 URL: http://svn.freebsd.org/changeset/base/213108 Log: MFC r211594: Load tunable from loader.conf(5) instead of device.hints(5). Modified: stable/7/sys/dev/bge/if_bge.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/bge/if_bge.c ============================================================================== --- stable/7/sys/dev/bge/if_bge.c Fri Sep 24 17:53:32 2010 (r213107) +++ stable/7/sys/dev/bge/if_bge.c Fri Sep 24 17:56:12 2010 (r213108) @@ -4894,6 +4894,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)); @@ -4913,6 +4915,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 @@ -4925,13 +4928,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;