From owner-svn-src-all@FreeBSD.ORG Sat Oct 19 06:30:21 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E32A941E; Sat, 19 Oct 2013 06:30:21 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9A35E28E1; Sat, 19 Oct 2013 06:30:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r9J6ULER026194; Sat, 19 Oct 2013 06:30:21 GMT (envelope-from hiren@svn.freebsd.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r9J6ULTR026192; Sat, 19 Oct 2013 06:30:21 GMT (envelope-from hiren@svn.freebsd.org) Message-Id: <201310190630.r9J6ULTR026192@svn.freebsd.org> From: Hiren Panchasara Date: Sat, 19 Oct 2013 06:30:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r256759 - in stable/9/sys/dev: e1000 ixgbe X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 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: Sat, 19 Oct 2013 06:30:22 -0000 Author: hiren Date: Sat Oct 19 06:30:20 2013 New Revision: 256759 URL: http://svnweb.freebsd.org/changeset/base/256759 Log: MFC: r256069 Expose system level ixgbe sysctls. Device level sysctls are already exposed as dev.ix. Fixing the case where number of queues for igb is auto-tuned and hw.igb.num_queues does not return current/updated value. Modified: stable/9/sys/dev/e1000/if_igb.c stable/9/sys/dev/ixgbe/ixgbe.c Modified: stable/9/sys/dev/e1000/if_igb.c ============================================================================== --- stable/9/sys/dev/e1000/if_igb.c Fri Oct 18 23:19:27 2013 (r256758) +++ stable/9/sys/dev/e1000/if_igb.c Sat Oct 19 06:30:20 2013 (r256759) @@ -2883,6 +2883,9 @@ igb_setup_msix(struct adapter *adapter) if (queues > maxqueues) queues = maxqueues; + /* reflect correct sysctl value */ + igb_num_queues = queues; + /* ** One vector (RX/TX pair) per queue ** plus an additional for Link interrupt Modified: stable/9/sys/dev/ixgbe/ixgbe.c ============================================================================== --- stable/9/sys/dev/ixgbe/ixgbe.c Fri Oct 18 23:19:27 2013 (r256758) +++ stable/9/sys/dev/ixgbe/ixgbe.c Sat Oct 19 06:30:20 2013 (r256759) @@ -234,6 +234,9 @@ MODULE_DEPEND(ixgbe, ether, 1, 1, 1); ** TUNEABLE PARAMETERS: */ +static SYSCTL_NODE(_hw, OID_AUTO, ix, CTLFLAG_RD, 0, + "IXGBE driver parameters"); + /* ** AIM: Adaptive Interrupt Moderation ** which means that the interrupt rate @@ -242,17 +245,29 @@ MODULE_DEPEND(ixgbe, ether, 1, 1, 1); */ static int ixgbe_enable_aim = TRUE; TUNABLE_INT("hw.ixgbe.enable_aim", &ixgbe_enable_aim); +SYSCTL_INT(_hw_ix, OID_AUTO, enable_aim, CTLFLAG_RW, &ixgbe_enable_aim, 0, + "Enable adaptive interrupt moderation"); static int ixgbe_max_interrupt_rate = (4000000 / IXGBE_LOW_LATENCY); TUNABLE_INT("hw.ixgbe.max_interrupt_rate", &ixgbe_max_interrupt_rate); +SYSCTL_INT(_hw_ix, OID_AUTO, max_interrupt_rate, CTLFLAG_RDTUN, + &ixgbe_max_interrupt_rate, 0, "Maximum interrupts per second"); /* How many packets rxeof tries to clean at a time */ static int ixgbe_rx_process_limit = 256; TUNABLE_INT("hw.ixgbe.rx_process_limit", &ixgbe_rx_process_limit); +SYSCTL_INT(_hw_ix, OID_AUTO, rx_process_limit, CTLFLAG_RDTUN, + &ixgbe_rx_process_limit, 0, + "Maximum number of received packets to process at a time," + "-1 means unlimited"); /* How many packets txeof tries to clean at a time */ static int ixgbe_tx_process_limit = 256; TUNABLE_INT("hw.ixgbe.tx_process_limit", &ixgbe_tx_process_limit); +SYSCTL_INT(_hw_ix, OID_AUTO, tx_process_limit, CTLFLAG_RDTUN, + &ixgbe_tx_process_limit, 0, + "Maximum number of sent packets to process at a time," + "-1 means unlimited"); /* ** Smart speed setting, default to on @@ -269,6 +284,8 @@ static int ixgbe_smart_speed = ixgbe_sma */ static int ixgbe_enable_msix = 1; TUNABLE_INT("hw.ixgbe.enable_msix", &ixgbe_enable_msix); +SYSCTL_INT(_hw_ix, OID_AUTO, enable_msix, CTLFLAG_RDTUN, &ixgbe_enable_msix, 0, + "Enable MSI-X interrupts"); /* * Number of Queues, can be set to 0, @@ -278,6 +295,8 @@ TUNABLE_INT("hw.ixgbe.enable_msix", &ixg */ static int ixgbe_num_queues = 0; TUNABLE_INT("hw.ixgbe.num_queues", &ixgbe_num_queues); +SYSCTL_INT(_hw_ix, OID_AUTO, num_queues, CTLFLAG_RDTUN, &ixgbe_num_queues, 0, + "Number of queues to configure, 0 indicates autoconfigure"); /* ** Number of TX descriptors per ring, @@ -286,10 +305,14 @@ TUNABLE_INT("hw.ixgbe.num_queues", &ixgb */ static int ixgbe_txd = PERFORM_TXD; TUNABLE_INT("hw.ixgbe.txd", &ixgbe_txd); +SYSCTL_INT(_hw_ix, OID_AUTO, txd, CTLFLAG_RDTUN, &ixgbe_txd, 0, + "Number of receive descriptors per queue"); /* Number of RX descriptors per ring */ static int ixgbe_rxd = PERFORM_RXD; TUNABLE_INT("hw.ixgbe.rxd", &ixgbe_rxd); +SYSCTL_INT(_hw_ix, OID_AUTO, rxd, CTLFLAG_RDTUN, &ixgbe_rxd, 0, + "Number of receive descriptors per queue"); /* ** Defining this on will allow the use @@ -2442,6 +2465,9 @@ ixgbe_setup_msix(struct adapter *adapter else if ((ixgbe_num_queues == 0) && (queues > 8)) queues = 8; + /* reflect correct sysctl value */ + ixgbe_num_queues = queues; + /* ** Want one vector (RX/TX pair) per queue ** plus an additional for Link.