svn commit: r222407 - stable/8/sys/netinet
Author: lstewart Date: Sat May 28 07:23:26 2011 New Revision: 222407 URL: http://svn.freebsd.org/changeset/base/222407 Log: MFC r216753,217221: Add a new sack hint to track the most recent and highest sacked sequence number. This will be used by the incoming Enhanced RTT Khelp module. Sponsored by: FreeBSD Foundation Submitted by: David Hayes Reviewed by: bz and others (as part of a larger patch) Modified: stable/8/sys/netinet/tcp_input.c stable/8/sys/netinet/tcp_sack.c stable/8/sys/netinet/tcp_var.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/netinet/tcp_input.c == --- stable/8/sys/netinet/tcp_input.cSat May 28 06:56:09 2011 (r222406) +++ stable/8/sys/netinet/tcp_input.cSat May 28 07:23:26 2011 (r222407) @@ -1365,6 +1365,7 @@ tcp_do_segment(struct mbuf *m, struct tc short ostate = 0; #endif thflags = th->th_flags; + tp->sackhint.last_sack_ack = 0; /* * If this is either a state-changing packet or current state isn't Modified: stable/8/sys/netinet/tcp_sack.c == --- stable/8/sys/netinet/tcp_sack.c Sat May 28 06:56:09 2011 (r222406) +++ stable/8/sys/netinet/tcp_sack.c Sat May 28 07:23:26 2011 (r222407) @@ -425,6 +425,7 @@ tcp_sack_doack(struct tcpcb *tp, struct * are received. */ sblkp = &sack_blocks[num_sack_blks - 1];/* Last SACK block */ + tp->sackhint.last_sack_ack = sblkp->end; if (SEQ_LT(tp->snd_fack, sblkp->start)) { /* * The highest SACK block is beyond fack. Append new SACK Modified: stable/8/sys/netinet/tcp_var.h == --- stable/8/sys/netinet/tcp_var.h Sat May 28 06:56:09 2011 (r222406) +++ stable/8/sys/netinet/tcp_var.h Sat May 28 07:23:26 2011 (r222407) @@ -70,8 +70,8 @@ struct sackhole { struct sackhint { struct sackhole *nexthole; int sack_bytes_rexmit; + tcp_seq last_sack_ack; /* Most recent/largest sacked ack */ - int ispare; /* explicit pad for 64bit alignment */ uint64_t_pad[2];/* 1 sacked_bytes, 1 TBD */ }; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r222407 - stable/8/sys/netinet
On 05/28/11 17:23, Lawrence Stewart wrote: Author: lstewart Date: Sat May 28 07:23:26 2011 New Revision: 222407 URL: http://svn.freebsd.org/changeset/base/222407 Log: MFC r216753,217221: Add a new sack hint to track the most recent and highest sacked sequence number. This will be used by the incoming Enhanced RTT Khelp module. I should have added: The MFCed code was tweaked to preserve the ABI of the 8-STABLE branch with respect to "struct tcpcb" by consuming some of the padding within the sackhint struct. Cheers, Lawrence ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r222408 - in stable/8/sys: netinet sys
Author: lstewart Date: Sat May 28 08:13:39 2011 New Revision: 222408 URL: http://svn.freebsd.org/changeset/base/222408 Log: MFC r216758,217252: - Add some helper hook points to the TCP stack. The hooks allow Khelp modules to access inbound/outbound events and associated data for established TCP connections. The hooks only run if at least one hook function is registered for the hook point, ensuring the impact on the stack is effectively nil when no TCP Khelp modules are loaded. struct tcp_hhook_data is passed as contextual data to any registered Khelp module hook functions. - Add an OSD (Object Specific Data) pointer to struct tcpcb to allow Khelp modules to associate per-connection data with the TCP control block. - Tweak the MFCed code to preserve the ABI of the 8-STABLE branch with respect to "struct tcpcb" by consuming some of the padding within the struct. - Bump __FreeBSD_version to 802506. In collaboration with:David Hayes and Grenville Armitage Sponsored by: FreeBSD Foundation Reviewed by: bz, others along the way Modified: stable/8/sys/netinet/tcp_input.c stable/8/sys/netinet/tcp_output.c stable/8/sys/netinet/tcp_subr.c stable/8/sys/netinet/tcp_var.h stable/8/sys/sys/param.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/netinet/tcp_input.c == --- stable/8/sys/netinet/tcp_input.cSat May 28 07:23:26 2011 (r222407) +++ stable/8/sys/netinet/tcp_input.cSat May 28 08:13:39 2011 (r222408) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include /* for proc0 declaration */ @@ -219,6 +220,8 @@ static void inline cc_ack_received(struc static void inline cc_conn_init(struct tcpcb *tp); static void inline cc_post_recovery(struct tcpcb *tp, struct tcphdr *th); static void inline tcp_fields_to_host(struct tcphdr *); +static void inline hhook_run_tcp_est_in(struct tcpcb *tp, + struct tcphdr *th, struct tcpopt *to); #ifdef TCP_SIGNATURE static void inline tcp_fields_to_net(struct tcphdr *); static int inline tcp_signature_verify_input(struct mbuf *, int, int, @@ -240,6 +243,24 @@ kmod_tcpstat_inc(int statnum) } /* + * Wrapper for the TCP established input helper hook. + */ +static void inline +hhook_run_tcp_est_in(struct tcpcb *tp, struct tcphdr *th, struct tcpopt *to) +{ + struct tcp_hhook_data hhook_data; + + if (V_tcp_hhh[HHOOK_TCP_EST_IN]->hhh_nhooks > 0) { + hhook_data.tp = tp; + hhook_data.th = th; + hhook_data.to = to; + + hhook_run_hooks(V_tcp_hhh[HHOOK_TCP_EST_IN], &hhook_data, + tp->osd); + } +} + +/* * CC wrapper hook functions */ static void inline @@ -1583,6 +1604,10 @@ tcp_do_segment(struct mbuf *m, struct tc } tcp_xmit_bandwidth_limit(tp, th->th_ack); acked = BYTES_THIS_ACK(tp, th); + + /* Run HHOOK_TCP_ESTABLISHED_IN helper hooks. */ + hhook_run_tcp_est_in(tp, th, &to); + TCPSTAT_INC(tcps_rcvackpack); TCPSTAT_ADD(tcps_rcvackbyte, acked); sbdrop(&so->so_snd, acked); @@ -2297,6 +2322,10 @@ tcp_do_segment(struct mbuf *m, struct tc ((to.to_flags & TOF_SACK) || !TAILQ_EMPTY(&tp->snd_holes))) tcp_sack_doack(tp, &to, th->th_ack); + + /* Run HHOOK_TCP_ESTABLISHED_IN helper hooks. */ + hhook_run_tcp_est_in(tp, th, &to); + if (SEQ_LEQ(th->th_ack, tp->snd_una)) { if (tlen == 0 && tiwin == tp->snd_wnd) { TCPSTAT_INC(tcps_rcvdupack); Modified: stable/8/sys/netinet/tcp_output.c == --- stable/8/sys/netinet/tcp_output.c Sat May 28 07:23:26 2011 (r222407) +++ stable/8/sys/netinet/tcp_output.c Sat May 28 08:13:39 2011 (r222408) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -126,9 +127,33 @@ SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, &VNET_NAME(tcp_autosndbuf_max), 0, "Max size of automatic send buffer"); +static void inline hhook_run_tcp_est_out(struct tcpcb *tp, + struct tcphdr *th, struct tcpopt *to, +
svn commit: r222409 - in stable/8/sys/modules: . khelp
Author: lstewart Date: Sat May 28 08:20:25 2011 New Revision: 222409 URL: http://svn.freebsd.org/changeset/base/222409 Log: MFC r217773: Add build infrastructure for Khelp modules. Sponsored by: FreeBSD Foundation Reviewed by: bz Added: stable/8/sys/modules/khelp/ - copied from r217773, head/sys/modules/khelp/ Modified: stable/8/sys/modules/Makefile Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/modules/Makefile == --- stable/8/sys/modules/Makefile Sat May 28 08:13:39 2011 (r222408) +++ stable/8/sys/modules/Makefile Sat May 28 08:20:25 2011 (r222409) @@ -152,6 +152,7 @@ SUBDIR= ${_3dfx} \ jme \ joy \ kbdmux \ + khelp \ krpc \ ksyms \ le \ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r222410 - in stable/8/sys: modules/khelp modules/khelp/h_ertt netinet/khelp
Author: lstewart Date: Sat May 28 08:24:22 2011 New Revision: 222410 URL: http://svn.freebsd.org/changeset/base/222410 Log: MFC 217806: Import the ERTT (Enhanced Round Trip Time) Khelp module. ERTT uses the Khelp/Hhook KPIs to hook into the TCP stack and maintain a per-connection, low noise estimate of the instantaneous RTT. ERTT's implementation is robust even in the face of delayed acknowledgements and/or TSO being in use for a connection. A high quality, low noise RTT estimate is a requirement for applications such as delay-based congestion control, for which we will be importing some algorithm implementations shortly. In collaboration with:David Hayes and Grenville Armitage Sponsored by: FreeBSD Foundation Reviewed by: bz and others along the way Added: stable/8/sys/modules/khelp/h_ertt/ - copied from r217806, head/sys/modules/khelp/h_ertt/ stable/8/sys/netinet/khelp/ - copied from r217806, head/sys/netinet/khelp/ Modified: stable/8/sys/modules/khelp/Makefile Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/modules/khelp/Makefile == --- stable/8/sys/modules/khelp/Makefile Sat May 28 08:20:25 2011 (r222409) +++ stable/8/sys/modules/khelp/Makefile Sat May 28 08:24:22 2011 (r222410) @@ -1,5 +1,5 @@ # $FreeBSD$ -SUBDIR= +SUBDIR=h_ertt .include ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r222411 - in stable/8/sys: modules/cc modules/cc/cc_vegas netinet/cc
Author: lstewart Date: Sat May 28 08:28:37 2011 New Revision: 222411 URL: http://svn.freebsd.org/changeset/base/222411 Log: MFC r218152,218156: Import a clean-room implementation of the VEGAS congestion control algorithm based on the paper "TCP Vegas: end to end congestion avoidance on a global internet" by Brakmo and Peterson. It is implemented as a kernel module compatible with the recently committed modular congestion control framework. VEGAS uses network delay as a congestion indicator and unlike regular loss-based algorithms, attempts to keep the network operating with stable queuing delays and no congestion losses. By keeping network buffers used along the path within a set range, queuing delays are kept low while maintaining high throughput. In collaboration with:David Hayes and Grenville Armitage Sponsored by: FreeBSD Foundation Reviewed by: bz and others along the way Added: stable/8/sys/modules/cc/cc_vegas/ - copied from r218152, head/sys/modules/cc/cc_vegas/ stable/8/sys/netinet/cc/cc_vegas.c - copied, changed from r218152, head/sys/netinet/cc/cc_vegas.c Modified: stable/8/sys/modules/cc/Makefile Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/modules/cc/Makefile == --- stable/8/sys/modules/cc/MakefileSat May 28 08:24:22 2011 (r222410) +++ stable/8/sys/modules/cc/MakefileSat May 28 08:28:37 2011 (r222411) @@ -1,6 +1,7 @@ # $FreeBSD$ SUBDIR=cc_cubic \ - cc_htcp + cc_htcp \ + cc_vegas .include Copied and modified: stable/8/sys/netinet/cc/cc_vegas.c (from r218152, head/sys/netinet/cc/cc_vegas.c) == --- head/sys/netinet/cc/cc_vegas.c Tue Feb 1 06:17:00 2011 (r218152, copy source) +++ stable/8/sys/netinet/cc/cc_vegas.c Sat May 28 08:28:37 2011 (r222411) @@ -41,7 +41,7 @@ * based on L. S. Brakmo and L. L. Peterson, "TCP Vegas: end to end congestion * avoidance on a global internet", IEEE J. Sel. Areas Commun., vol. 13, no. 8, * pp. 1465-1480, Oct. 1995. The original Vegas duplicate ack policy has not - * been implemented, since clock ticks are not as course as they were (i.e. + * been implemented, since clock ticks are not as coarse as they were (i.e. * 500ms) when Vegas was designed. Also, packets are timed once per RTT as in * the original paper. * ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r222412 - in stable/8/sys: modules/cc modules/cc/cc_hd netinet/cc
Author: lstewart Date: Sat May 28 08:32:17 2011 New Revision: 222412 URL: http://svn.freebsd.org/changeset/base/222412 Log: MFC 218153: Import a clean-room implementation of the Hamilton-Delay (HD) congestion control algorithm based on the paper "A strategy for fair coexistence of loss and delay-based congestion control algorithms" by Budzisz, Stanojevic, Shorten and Baker. It is implemented as a kernel module compatible with the recently committed modular congestion control framework. HD uses a probabilistic approach to reacting to delay-based congestion. The probability of reducing cwnd is zero when the queuing delay is very small, increasing to a maximum at a set threshold, then back down to zero again when the queuing delay is high. Normal operation keeps the queuing delay below the set threshold. However, since loss-based congestion control algorithms push the queuing delay high when probing for bandwidth, having the probability of reducing cwnd drop back to zero for high delays allows HD to compete with loss-based algorithms. In collaboration with:David Hayes and Grenville Armitage Sponsored by: FreeBSD Foundation Reviewed by: bz and others along the way Added: stable/8/sys/modules/cc/cc_hd/ - copied from r218153, head/sys/modules/cc/cc_hd/ stable/8/sys/netinet/cc/cc_hd.c - copied unchanged from r218153, head/sys/netinet/cc/cc_hd.c Modified: stable/8/sys/modules/cc/Makefile Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/modules/cc/Makefile == --- stable/8/sys/modules/cc/MakefileSat May 28 08:28:37 2011 (r222411) +++ stable/8/sys/modules/cc/MakefileSat May 28 08:32:17 2011 (r222412) @@ -1,6 +1,7 @@ # $FreeBSD$ SUBDIR=cc_cubic \ + cc_hd \ cc_htcp \ cc_vegas Copied: stable/8/sys/netinet/cc/cc_hd.c (from r218153, head/sys/netinet/cc/cc_hd.c) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/netinet/cc/cc_hd.c Sat May 28 08:32:17 2011 (r222412, copy of r218153, head/sys/netinet/cc/cc_hd.c) @@ -0,0 +1,254 @@ +/*- + * Copyright (c) 2009-2010 + * Swinburne University of Technology, Melbourne, Australia + * Copyright (c) 2010 Lawrence Stewart + * Copyright (c) 2010-2011 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed at the Centre for Advanced Internet + * Architectures, Swinburne University, by David Hayes and Lawrence Stewart, + * made possible in part by a grant from the Cisco University Research Program + * Fund at Community Foundation Silicon Valley. + * + * Portions of this software were developed at the Centre for Advanced Internet + * Architectures, Swinburne University of Technology, Melbourne, Australia by + * David Hayes under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * An implementation of the Hamilton Institute's delay-based congestion control + * algorithm for FreeBSD, based on "A strategy for fair coexistence of loss and + * delay-based congestion control algorithms," by L. Budzisz, R. Stanojevic, R. + * Shorten, and F. Baker, IEEE Commun. Lett., vol. 13, no. 7, pp. 555--557, Jul. + * 2009. + * + * Originally released as part of the NewTCP research project at
svn commit: r222413 - in stable/8/sys: modules/cc modules/cc/cc_chd netinet/cc
Author: lstewart Date: Sat May 28 08:34:30 2011 New Revision: 222413 URL: http://svn.freebsd.org/changeset/base/222413 Log: MFC 218155: Import an implementation of the CAIA-Hamilton-Delay (CHD) congestion control algorithm described in the paper "Improved coexistence and loss tolerance for delay based TCP congestion control" by Hayes and Armitage. It is implemented as a kernel module compatible with the recently committed modular congestion control framework. CHD enhances the approach taken by the Hamilton-Delay (HD) algorithm to provide tolerance to non-congestion related packet loss and improvements to coexistence with loss-based congestion control algorithms. A key idea in improving coexistence with loss-based congestion control algorithms is the use of a shadow window, which attempts to track how NewReno's congestion window (cwnd) would evolve. At the next packet loss congestion event, CHD uses the shadow window to correct cwnd in a way that reduces the amount of unfairness CHD experiences when competing with loss-based algorithms. In collaboration with:David Hayes and Grenville Armitage Sponsored by: FreeBSD Foundation Reviewed by: bz and others along the way Added: stable/8/sys/modules/cc/cc_chd/ - copied from r218155, head/sys/modules/cc/cc_chd/ stable/8/sys/netinet/cc/cc_chd.c - copied unchanged from r218155, head/sys/netinet/cc/cc_chd.c Modified: stable/8/sys/modules/cc/Makefile Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/modules/cc/Makefile == --- stable/8/sys/modules/cc/MakefileSat May 28 08:32:17 2011 (r222412) +++ stable/8/sys/modules/cc/MakefileSat May 28 08:34:30 2011 (r222413) @@ -1,6 +1,7 @@ # $FreeBSD$ -SUBDIR=cc_cubic \ +SUBDIR=cc_chd \ + cc_cubic \ cc_hd \ cc_htcp \ cc_vegas Copied: stable/8/sys/netinet/cc/cc_chd.c (from r218155, head/sys/netinet/cc/cc_chd.c) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/netinet/cc/cc_chd.cSat May 28 08:34:30 2011 (r222413, copy of r218155, head/sys/netinet/cc/cc_chd.c) @@ -0,0 +1,497 @@ +/*- + * Copyright (c) 2009-2010 + * Swinburne University of Technology, Melbourne, Australia + * Copyright (c) 2010-2011 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed at the Centre for Advanced Internet + * Architectures, Swinburne University, by David Hayes and Lawrence Stewart, + * made possible in part by a grant from the Cisco University Research Program + * Fund at Community Foundation Silicon Valley. + * + * Portions of this software were developed at the Centre for Advanced Internet + * Architectures, Swinburne University of Technology, Melbourne, Australia by + * David Hayes under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * An implementation of the CAIA-Hamilton delay based congestion control + * algorithm, based on "Improved coexistence and loss tolerance for delay based + * TCP congestion control" by D. A. Hayes and G. Armitage., in 35th Annual IEEE + * Conference on Local Computer Networks (LCN 2010), Denver, Colorado, USA, + * 11-14 October 2010. + * + * Originally released as part of the NewTCP re
svn commit: r222415 - in stable/8: etc/mtree share/examples share/examples/kld share/examples/kld/khelp
Author: lstewart Date: Sat May 28 08:43:24 2011 New Revision: 222415 URL: http://svn.freebsd.org/changeset/base/222415 Log: MFC r218545,218914: Add an example Khelp module, which will be referenced in the forthcoming Khelp documentation. Sponsored by: FreeBSD Foundation Discussed with: David Hayes Added: stable/8/share/examples/kld/khelp/ - copied from r218545, head/share/examples/kld/khelp/ Modified: stable/8/etc/mtree/BSD.usr.dist stable/8/share/examples/Makefile stable/8/share/examples/kld/Makefile Directory Properties: stable/8/etc/ (props changed) stable/8/share/examples/ (props changed) stable/8/share/examples/cvsup/ (props changed) Modified: stable/8/etc/mtree/BSD.usr.dist == --- stable/8/etc/mtree/BSD.usr.dist Sat May 28 08:37:03 2011 (r222414) +++ stable/8/etc/mtree/BSD.usr.dist Sat May 28 08:43:24 2011 (r222415) @@ -240,6 +240,8 @@ fwimage .. .. +khelp +.. syscall module .. Modified: stable/8/share/examples/Makefile == --- stable/8/share/examples/MakefileSat May 28 08:37:03 2011 (r222414) +++ stable/8/share/examples/MakefileSat May 28 08:43:24 2011 (r222415) @@ -98,6 +98,9 @@ XFILES= BSD_daemon/FreeBSD.pfa \ kld/firmware/fwconsumer/fw_consumer.c \ kld/firmware/fwimage/Makefile \ kld/firmware/fwimage/firmware.img \ + kld/khelp/Makefile \ + kld/khelp/README \ + kld/khelp/h_example.c \ kld/syscall/Makefile \ kld/syscall/module/Makefile \ kld/syscall/module/syscall.c \ Modified: stable/8/share/examples/kld/Makefile == --- stable/8/share/examples/kld/MakefileSat May 28 08:37:03 2011 (r222414) +++ stable/8/share/examples/kld/MakefileSat May 28 08:43:24 2011 (r222415) @@ -67,6 +67,6 @@ # $FreeBSD$ # -SUBDIR=cdev dyn_sysctl firmware syscall +SUBDIR=cdev dyn_sysctl firmware khelp syscall .include ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r222416 - in releng: 7.3 7.3/contrib/bind9/lib/dns 7.3/sys/conf 7.4 7.4/contrib/bind9/lib/dns 7.4/sys/conf 8.1 8.1/contrib/bind9/lib/dns 8.1/sys/conf 8.2 8.2/contrib/bind9/lib/dns 8.2/s...
Author: simon Date: Sat May 28 08:44:39 2011 New Revision: 222416 URL: http://svn.freebsd.org/changeset/base/222416 Log: Fix an off by one which can result in a assertion failure in BIND related to large RRSIG RRsets and Negative Caching. This can cause named to crash. Security: FreeBSD-SA-11:02.bind Security: CVE-2011-1910 Security: https://www.isc.org/software/bind/advisories/cve-2011-1910 Obtained from:ISC Approved by: so (simon) Modified: releng/7.3/UPDATING releng/7.3/contrib/bind9/lib/dns/ncache.c releng/7.3/sys/conf/newvers.sh releng/7.4/UPDATING releng/7.4/contrib/bind9/lib/dns/ncache.c releng/7.4/sys/conf/newvers.sh releng/8.1/UPDATING releng/8.1/contrib/bind9/lib/dns/ncache.c releng/8.1/sys/conf/newvers.sh releng/8.2/UPDATING releng/8.2/contrib/bind9/lib/dns/ncache.c releng/8.2/sys/conf/newvers.sh Modified: releng/7.3/UPDATING == --- releng/7.3/UPDATING Sat May 28 08:43:24 2011(r222415) +++ releng/7.3/UPDATING Sat May 28 08:44:39 2011(r222416) @@ -8,6 +8,10 @@ Items affecting the ports and packages s /usr/ports/UPDATING. Please read that file before running portupgrade. +20110528: p6 FreeBSD-SA-11:02.bind + Fix BIND remote DoS with large RRSIG RRsets and negative + caching. + 20110420: p5 FreeBSD-SA-11:01.mountd Fix CIDR parsing bug in mountd ACLs. Modified: releng/7.3/contrib/bind9/lib/dns/ncache.c == --- releng/7.3/contrib/bind9/lib/dns/ncache.c Sat May 28 08:43:24 2011 (r222415) +++ releng/7.3/contrib/bind9/lib/dns/ncache.c Sat May 28 08:44:39 2011 (r222416) @@ -160,7 +160,7 @@ dns_ncache_add(dns_message_t *message, d */ isc_buffer_availableregion(&buffer, &r); - if (r.length < 2) + if (r.length < 3) return (ISC_R_NOSPACE); isc_buffer_putuint16(&buffer, rdataset->type); Modified: releng/7.3/sys/conf/newvers.sh == --- releng/7.3/sys/conf/newvers.sh Sat May 28 08:43:24 2011 (r222415) +++ releng/7.3/sys/conf/newvers.sh Sat May 28 08:44:39 2011 (r222416) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="7.3" -BRANCH="RELEASE-p5" +BRANCH="RELEASE-p6" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/7.4/UPDATING == --- releng/7.4/UPDATING Sat May 28 08:43:24 2011(r222415) +++ releng/7.4/UPDATING Sat May 28 08:44:39 2011(r222416) @@ -8,6 +8,10 @@ Items affecting the ports and packages s /usr/ports/UPDATING. Please read that file before running portupgrade. +20110528: p2 FreeBSD-SA-11:02.bind + Fix BIND remote DoS with large RRSIG RRsets and negative + caching. + 20110420: p1 FreeBSD-SA-11:01.mountd Fix CIDR parsing bug in mountd ACLs. Modified: releng/7.4/contrib/bind9/lib/dns/ncache.c == --- releng/7.4/contrib/bind9/lib/dns/ncache.c Sat May 28 08:43:24 2011 (r222415) +++ releng/7.4/contrib/bind9/lib/dns/ncache.c Sat May 28 08:44:39 2011 (r222416) @@ -175,7 +175,7 @@ dns_ncache_add(dns_message_t *message, d */ isc_buffer_availableregion(&buffer, &r); - if (r.length < 2) + if (r.length < 3) return (ISC_R_NOSPACE); isc_buffer_putuint16(&buffer, rdataset->type); Modified: releng/7.4/sys/conf/newvers.sh == --- releng/7.4/sys/conf/newvers.sh Sat May 28 08:43:24 2011 (r222415) +++ releng/7.4/sys/conf/newvers.sh Sat May 28 08:44:39 2011 (r222416) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="7.4" -BRANCH="RELEASE-p1" +BRANCH="RELEASE-p2" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: r
svn commit: r222417 - in head/sys/boot: common forth i386/loader ia64/common pc98/loader powerpc/ofw powerpc/ps3 sparc64/loader
Author: julian Date: Sat May 28 08:50:38 2011 New Revision: 222417 URL: http://svn.freebsd.org/changeset/base/222417 Log: New boot loader menus from Devin Teske. Discussed on hackers and recommended for inclusion into 9.0 at the devsummit. All support email to devin dteske at vicor dot ignoreme dot com . Submitted by: dteske at vicor dot ignoreme dot com Reviewed by: me and many others Added: head/sys/boot/forth/beastie.4th.8 (contents, props changed) head/sys/boot/forth/brand.4th (contents, props changed) head/sys/boot/forth/brand.4th.8 (contents, props changed) head/sys/boot/forth/check-password.4th (contents, props changed) head/sys/boot/forth/check-password.4th.8 (contents, props changed) head/sys/boot/forth/color.4th (contents, props changed) head/sys/boot/forth/color.4th.8 (contents, props changed) head/sys/boot/forth/delay.4th (contents, props changed) head/sys/boot/forth/delay.4th.8 (contents, props changed) head/sys/boot/forth/menu-commands.4th (contents, props changed) head/sys/boot/forth/menu.4th (contents, props changed) head/sys/boot/forth/menu.4th.8 (contents, props changed) head/sys/boot/forth/menu.rc (contents, props changed) head/sys/boot/forth/shortcuts.4th (contents, props changed) head/sys/boot/forth/version.4th (contents, props changed) head/sys/boot/forth/version.4th.8 (contents, props changed) Modified: head/sys/boot/common/Makefile.inc head/sys/boot/forth/beastie.4th head/sys/boot/forth/loader.4th head/sys/boot/forth/loader.conf.5 head/sys/boot/forth/loader.rc head/sys/boot/forth/support.4th head/sys/boot/i386/loader/Makefile head/sys/boot/ia64/common/Makefile head/sys/boot/pc98/loader/Makefile head/sys/boot/powerpc/ofw/Makefile head/sys/boot/powerpc/ps3/Makefile head/sys/boot/sparc64/loader/Makefile Modified: head/sys/boot/common/Makefile.inc == --- head/sys/boot/common/Makefile.inc Sat May 28 08:44:39 2011 (r222416) +++ head/sys/boot/common/Makefile.inc Sat May 28 08:50:38 2011 (r222417) @@ -44,8 +44,15 @@ SRCS+= pnp.c # Forth interpreter .if defined(BOOT_FORTH) SRCS+= interp_forth.c +MAN+= ../forth/beastie.4th.8 +MAN+= ../forth/brand.4th.8 +MAN+= ../forth/check-password.4th.8 +MAN+= ../forth/color.4th.8 +MAN+= ../forth/delay.4th.8 MAN+= ../forth/loader.conf.5 MAN+= ../forth/loader.4th.8 +MAN+= ../forth/menu.4th.8 +MAN+= ../forth/version.4th.8 .endif .if defined(BOOT_PROMPT_123) Modified: head/sys/boot/forth/beastie.4th == --- head/sys/boot/forth/beastie.4th Sat May 28 08:44:39 2011 (r222416) +++ head/sys/boot/forth/beastie.4th Sat May 28 08:50:38 2011 (r222417) @@ -1,7 +1,8 @@ \ Copyright (c) 2003 Scott Long \ Copyright (c) 2003 Aleksander Fafula +\ Copyright (c) 2006-2011 Devin Teske \ All rights reserved. -\ +\ \ Redistribution and use in source and binary forms, with or without \ modification, are permitted provided that the following conditions \ are met: @@ -10,7 +11,7 @@ \ 2. Redistributions in binary form must reproduce the above copyright \notice, this list of conditions and the following disclaimer in the \documentation and/or other materials provided with the distribution. -\ +\ \ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND \ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE \ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -22,35 +23,24 @@ \ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY \ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF \ SUCH DAMAGE. -\ +\ \ $FreeBSD$ marker task-beastie.4th -include /boot/screen.4th -include /boot/frames.4th +include /boot/color.4th +include /boot/delay.4th -hide +variable logoX +variable logoY -variable menuidx -variable menubllt -variable menuX -variable menuY -variable promptwidth - -variable bootkey -variable bootacpikey -variable bootsafekey -variable bootverbosekey -variable bootsinglekey -variable escapekey -variable rebootkey - -46 constant dot - -\ The BSD Daemon. He is 19 rows high and 34 columns wide -: beastie-logo ( x y -- ) -2dup at-xy ." [1;31m,," 1+ +\ Initialize logo placement to defaults +46 logoX ! +4 logoY ! + +: beastie-logo ( x y -- ) \ color BSD mascot (19 rows x 34 columns) + +2dup at-xy ." [31m,," 1+ 2dup at-xy ." /()`" 1+ 2dup at-xy ." \ \___ / |" 1+ 2dup at-xy ." /- [37m_[31m `-/ '" 1+ @@ -59,7 +49,7 @@ variable rebootkey 2dup at-xy ." [34mO O [37m) [31m/|" 1+ 2dup at-xy ." [37m`-^--'[31m`< '" 1+ 2dup at-xy ."(_.) _ ) /" 1+ -2dup at-xy ." `.___/`/
svn commit: r222418 - in head: tools/regression/usr.bin/printf usr.bin/printf
Author: jilles Date: Sat May 28 11:37:47 2011 New Revision: 222418 URL: http://svn.freebsd.org/changeset/base/222418 Log: printf: Allow multibyte characters for ' form, avoid negative codes. Examples: LC_ALL=en_US.UTF-8 printf '%d\n' $(printf \'\\303\\244) LC_ALL=en_US.ISO8859-1 printf '%d\n' $(printf \'\\344) Both of these should print 228. Like some other shells, incomplete or invalid multibyte characters yield the value of the first byte without a warning. Note that there is no general way to go back from the character code to the character. Added: head/tools/regression/usr.bin/printf/regress.l1.out (contents, props changed) head/tools/regression/usr.bin/printf/regress.l2.out (contents, props changed) Modified: head/tools/regression/usr.bin/printf/regress.sh head/usr.bin/printf/printf.1 head/usr.bin/printf/printf.c Added: head/tools/regression/usr.bin/printf/regress.l1.out == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/printf/regress.l1.out Sat May 28 11:37:47 2011(r222418) @@ -0,0 +1 @@ +228 Added: head/tools/regression/usr.bin/printf/regress.l2.out == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/printf/regress.l2.out Sat May 28 11:37:47 2011(r222418) @@ -0,0 +1 @@ +228 Modified: head/tools/regression/usr.bin/printf/regress.sh == --- head/tools/regression/usr.bin/printf/regress.sh Sat May 28 08:50:38 2011(r222417) +++ head/tools/regression/usr.bin/printf/regress.sh Sat May 28 11:37:47 2011(r222418) @@ -2,11 +2,13 @@ REGRESSION_START($1) -echo '1..9' +echo '1..11' REGRESSION_TEST(`b', `printf "abc%b%b" "def\n" "\cghi"') REGRESSION_TEST(`d', `printf "%d,%5d,%.5d,%0*d,%.*d\n" 123 123 123 5 123 5 123') REGRESSION_TEST(`f', `printf "%f,%-8.3f,%f,%f\n" +42.25 -42.25 inf nan') +REGRESSION_TEST(`l1', `LC_ALL=en_US.ISO8859-1 printf "%d\n" $(printf \"\\344)') +REGRESSION_TEST(`l2', `LC_ALL=en_US.UTF-8 printf "%d\n" $(printf \"\\303\\244)') REGRESSION_TEST(`m1', `printf "%c%%%d\0\045\n" abc \"abc') REGRESSION_TEST(`m2', `printf "abc\n\cdef"') REGRESSION_TEST(`m3', `printf "%%%s\n" abc def ghi jkl') Modified: head/usr.bin/printf/printf.1 == --- head/usr.bin/printf/printf.1Sat May 28 08:50:38 2011 (r222417) +++ head/usr.bin/printf/printf.1Sat May 28 11:37:47 2011 (r222418) @@ -31,7 +31,7 @@ .\"@(#)printf.18.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd April 25, 2011 +.Dd May 28, 2011 .Dt PRINTF 1 .Os .Sh NAME @@ -68,8 +68,7 @@ otherwise it is evaluated as a C constan A leading plus or minus sign is allowed. .It If the leading character is a single or double quote, the value is the -.Tn ASCII -code of the next character. +character code of the next character. .El .Pp The format string is reused as often as necessary to satisfy the Modified: head/usr.bin/printf/printf.c == --- head/usr.bin/printf/printf.cSat May 28 08:50:38 2011 (r222417) +++ head/usr.bin/printf/printf.cSat May 28 11:37:47 2011 (r222418) @@ -58,6 +58,7 @@ static const char rcsid[] = #include #include #include +#include #ifdef SHELL #define main printfcmd @@ -537,10 +538,23 @@ static int asciicode(void) { int ch; + wchar_t wch; + mbstate_t mbs; - ch = **gargv; - if (ch == '\'' || ch == '"') - ch = (*gargv)[1]; + ch = (unsigned char)**gargv; + if (ch == '\'' || ch == '"') { + memset(&mbs, 0, sizeof(mbs)); + switch (mbrtowc(&wch, *gargv + 1, MB_LEN_MAX, &mbs)) { + case (size_t)-2: + case (size_t)-1: + wch = (unsigned char)gargv[0][1]; + break; + case 0: + wch = 0; + break; + } + ch = wch; + } ++gargv; return (ch); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r222419 - in stable/8/share/man: man4 man9
Author: lstewart Date: Sat May 28 13:48:49 2011 New Revision: 222419 URL: http://svn.freebsd.org/changeset/base/222419 Log: MFC r218912,218945,220237: - Add new man pages for the modular congestion control, Khelp and Hhook frameworks (cc.4, cc.9, khelp.9 and hhook.9). - Add new man pages for each available congestion control algorithm (cc_chd.4, cc_cubic.4, cc_hd.4, cc_htcp.4, cc_newreno.4 and cc_vegas.4). - Add a new man page for the Enhanced Round Trip Time (ERTT) Khelp module (h_ertt.4). - Update the TCP (tcp.4) man page to mention the TCP_CONGESTION socket option, cross reference to cc.4 and remove references to the retired "net.inet.tcp.newreno" sysctl MIB variable. In collaboration with:David Hayes and Grenville Armitage Sponsored by: FreeBSD Foundation Added: stable/8/share/man/man4/cc.4 - copied, changed from r218912, head/share/man/man4/cc.4 stable/8/share/man/man4/cc_chd.4 - copied, changed from r218912, head/share/man/man4/cc_chd.4 stable/8/share/man/man4/cc_cubic.4 - copied unchanged from r218912, head/share/man/man4/cc_cubic.4 stable/8/share/man/man4/cc_hd.4 - copied unchanged from r218912, head/share/man/man4/cc_hd.4 stable/8/share/man/man4/cc_htcp.4 - copied unchanged from r218912, head/share/man/man4/cc_htcp.4 stable/8/share/man/man4/cc_newreno.4 - copied unchanged from r218912, head/share/man/man4/cc_newreno.4 stable/8/share/man/man4/cc_vegas.4 - copied unchanged from r218912, head/share/man/man4/cc_vegas.4 stable/8/share/man/man4/h_ertt.4 - copied unchanged from r218912, head/share/man/man4/h_ertt.4 stable/8/share/man/man9/cc.9 - copied unchanged from r218912, head/share/man/man9/cc.9 stable/8/share/man/man9/hhook.9 - copied unchanged from r218912, head/share/man/man9/hhook.9 stable/8/share/man/man9/khelp.9 - copied unchanged from r218912, head/share/man/man9/khelp.9 Modified: stable/8/share/man/man4/Makefile stable/8/share/man/man4/tcp.4 stable/8/share/man/man9/Makefile Directory Properties: stable/8/share/man/ (props changed) stable/8/share/man/man1/ (props changed) stable/8/share/man/man3/ (props changed) stable/8/share/man/man4/ (props changed) stable/8/share/man/man5/ (props changed) stable/8/share/man/man7/ (props changed) stable/8/share/man/man8/ (props changed) stable/8/share/man/man9/ (props changed) Modified: stable/8/share/man/man4/Makefile == --- stable/8/share/man/man4/MakefileSat May 28 11:37:47 2011 (r222418) +++ stable/8/share/man/man4/MakefileSat May 28 13:48:49 2011 (r222419) @@ -67,6 +67,13 @@ MAN= aac.4 \ cardbus.4 \ carp.4 \ cas.4 \ + cc.4 \ + cc_chd.4 \ + cc_cubic.4 \ + cc_hd.4 \ + cc_htcp.4 \ + cc_newreno.4 \ + cc_vegas.4 \ ccd.4 \ cd.4 \ cdce.4 \ @@ -127,6 +134,7 @@ MAN=aac.4 \ gif.4 \ gpib.4 \ gre.4 \ + h_ertt.4 \ harp.4 \ hatm.4 \ hfa.4 \ Copied and modified: stable/8/share/man/man4/cc.4 (from r218912, head/share/man/man4/cc.4) == --- head/share/man/man4/cc.4Mon Feb 21 11:56:11 2011(r218912, copy source) +++ stable/8/share/man/man4/cc.4Sat May 28 13:48:49 2011 (r222419) @@ -65,8 +65,6 @@ MIB: .Bl -tag -width ".Va available" .It Va available Read-only list of currently available congestion control algorithms by name. -.El -.Bl -tag -width ".Va algorithm" .It Va algorithm Returns the current default congestion control algorithm when read, and changes the default when set. Copied and modified: stable/8/share/man/man4/cc_chd.4 (from r218912, head/share/man/man4/cc_chd.4) == --- head/share/man/man4/cc_chd.4Mon Feb 21 11:56:11 2011 (r218912, copy source) +++ stable/8/share/man/man4/cc_chd.4Sat May 28 13:48:49 2011 (r222419) @@ -58,6 +58,7 @@ do not cause cwnd to be reduced. .It CHD uses a shadow window to help regain lost transmission opportunities when competing with loss-based TCP flows. +.El .Sh MIB Variables The algorithm exposes the following tunable variables in the .Va net.inet.tcp.cc.chd Copied: stable/8/share/man/man4/cc_cubic.4 (from r218912, head/share/man/man4/cc_cubic.4) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/share/man/man4/cc_cubic.4 Sat May 28 13:48:49 2011 (r222419, copy of r218912, head/share/man/man4/cc_cubic.4) @@ -0,0 +1,114 @@ +.\" +.\" Copyright (c) 2009 Lawrence Stewart +.\" Copyright (c) 2010-2011 The FreeBSD Foundation +.\" All rights reser
svn commit: r222420 - in stable/8: share/man/man4 share/man/man9 sys/kern sys/netinet sys/netinet/cc sys/netinet/khelp sys/sys
Author: lstewart Date: Sat May 28 13:54:19 2011 New Revision: 222420 URL: http://svn.freebsd.org/changeset/base/222420 Log: MFC r220560: Use the full and proper company name for Swinburne University of Technology throughout the source tree. Requested by: Grenville Armitage, Director of CAIA at Swinburne University of Technology Modified: stable/8/share/man/man4/cc.4 stable/8/share/man/man4/cc_chd.4 stable/8/share/man/man4/cc_cubic.4 stable/8/share/man/man4/cc_hd.4 stable/8/share/man/man4/cc_htcp.4 stable/8/share/man/man4/cc_newreno.4 stable/8/share/man/man4/cc_vegas.4 stable/8/share/man/man4/h_ertt.4 stable/8/share/man/man4/siftr.4 stable/8/share/man/man9/cc.9 stable/8/share/man/man9/hhook.9 stable/8/share/man/man9/khelp.9 stable/8/sys/kern/kern_hhook.c stable/8/sys/kern/kern_khelp.c stable/8/sys/netinet/cc.h stable/8/sys/netinet/cc/cc.c stable/8/sys/netinet/cc/cc_chd.c stable/8/sys/netinet/cc/cc_cubic.c stable/8/sys/netinet/cc/cc_cubic.h stable/8/sys/netinet/cc/cc_hd.c stable/8/sys/netinet/cc/cc_htcp.c stable/8/sys/netinet/cc/cc_module.h stable/8/sys/netinet/cc/cc_newreno.c stable/8/sys/netinet/cc/cc_vegas.c stable/8/sys/netinet/khelp/h_ertt.c stable/8/sys/netinet/khelp/h_ertt.h stable/8/sys/netinet/siftr.c stable/8/sys/netinet/tcp_input.c stable/8/sys/sys/hhook.h stable/8/sys/sys/khelp.h stable/8/sys/sys/module_khelp.h Directory Properties: stable/8/share/man/ (props changed) stable/8/share/man/man1/ (props changed) stable/8/share/man/man3/ (props changed) stable/8/share/man/man4/ (props changed) stable/8/share/man/man5/ (props changed) stable/8/share/man/man7/ (props changed) stable/8/share/man/man8/ (props changed) stable/8/share/man/man9/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/share/man/man4/cc.4 == --- stable/8/share/man/man4/cc.4Sat May 28 13:48:49 2011 (r222419) +++ stable/8/share/man/man4/cc.4Sat May 28 13:54:19 2011 (r222420) @@ -3,8 +3,9 @@ .\" All rights reserved. .\" .\" This documentation was written at the Centre for Advanced Internet -.\" Architectures, Swinburne University, Melbourne, Australia by David Hayes and -.\" Lawrence Stewart under sponsorship from the FreeBSD Foundation. +.\" Architectures, Swinburne University of Technology, Melbourne, Australia by +.\" David Hayes and Lawrence Stewart under sponsorship from the FreeBSD +.\" Foundation. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -93,10 +94,10 @@ modular congestion control framework fir .Fx 9.0 . .Pp The framework was first released in 2007 by James Healy and Lawrence Stewart -whilst working on the NewTCP research project at Swinburne University's Centre -for Advanced Internet Architectures, Melbourne, Australia, which was made -possible in part by a grant from the Cisco University Research Program Fund at -Community Foundation Silicon Valley. +whilst working on the NewTCP research project at Swinburne University of +Technology's Centre for Advanced Internet Architectures, Melbourne, Australia, +which was made possible in part by a grant from the Cisco University Research +Program Fund at Community Foundation Silicon Valley. More details are available at: .Pp http://caia.swin.edu.au/urp/newtcp/ Modified: stable/8/share/man/man4/cc_chd.4 == --- stable/8/share/man/man4/cc_chd.4Sat May 28 13:48:49 2011 (r222419) +++ stable/8/share/man/man4/cc_chd.4Sat May 28 13:54:19 2011 (r222420) @@ -3,8 +3,8 @@ .\" All rights reserved. .\" .\" This documentation was written at the Centre for Advanced Internet -.\" Architectures, Swinburne University, Melbourne, Australia by David Hayes -.\" under sponsorship from the FreeBSD Foundation. +.\" Architectures, Swinburne University of Technology, Melbourne, Australia by +.\" David Hayes under sponsorship from the FreeBSD Foundation. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -115,8 +115,8 @@ congestion control module first appeared .Fx 9.0 . .Pp The module was first released in 2010 by David Hayes whilst working on the -NewTCP research project at Swinburne University's Centre for Advanced Internet -Architectures, Melbourne, Australia. +NewTCP research project at Swinburne University of Technology's Centre for +Advanced Internet Architectures, Melbourne, Australia. More details are available at: .Pp
svn commit: r222421 - head/usr.bin/printf
Author: jilles Date: Sat May 28 14:32:47 2011 New Revision: 222421 URL: http://svn.freebsd.org/changeset/base/222421 Log: printf(1): Document that %c and precision for %b/%s use bytes, not chars. This means these features do not work as expected with multibyte characters. This perhaps less than ideal behaviour matches printf(3) and is specified by POSIX. Modified: head/usr.bin/printf/printf.1 Modified: head/usr.bin/printf/printf.1 == --- head/usr.bin/printf/printf.1Sat May 28 13:54:19 2011 (r222420) +++ head/usr.bin/printf/printf.1Sat May 28 14:32:47 2011 (r222421) @@ -171,7 +171,7 @@ A `\-' overrides a `0' if both are used; .It "Field Width:" An optional digit string specifying a .Em field width ; -if the output string has fewer characters than the field width it will +if the output string has fewer bytes than the field width it will be blank-padded on the left (or right, if the left-adjustment indicator has been given) to make up the field width (note that a leading zero is a flag, but an embedded zero is part of a field width); @@ -185,7 +185,7 @@ for .Cm e and .Cm f -formats, or the maximum number of characters to be printed +formats, or the maximum number of bytes to be printed from a string; if the digit string is missing, the precision is treated as zero; .It Format: @@ -271,15 +271,15 @@ and .Ql nan , respectively. .It Cm c -The first character of +The first byte of .Ar argument is printed. .It Cm s -Characters from the string +Bytes from the string .Ar argument -are printed until the end is reached or until the number of characters +are printed until the end is reached or until the number of bytes indicated by the precision specification is reached; however if the -precision is 0 or missing, all characters in the string are printed. +precision is 0 or missing, the string is printed entirely. .It Cm b As for .Cm s , @@ -346,6 +346,17 @@ to interpret the dash as a program argum .Nm -- must be used before .Ar format . +.Pp +If the locale contains multibyte characters +(such as UTF-8), +the +.Cm c +format and +.Cm b +and +.Cm s +formats with a precision +may not operate as expected. .Sh BUGS Since the floating point numbers are translated from .Tn ASCII ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r222422 - head/sys/ufs/ffs
Author: mckusick Date: Sat May 28 15:07:29 2011 New Revision: 222422 URL: http://svn.freebsd.org/changeset/base/222422 Log: Due to a lag in updating the fs_pendinginodes count, we cannot depend on it to decide whether we should try to reclaim inodes when we run short. Discovered by: Peter Holm Modified: head/sys/ufs/ffs/ffs_alloc.c Modified: head/sys/ufs/ffs/ffs_alloc.c == --- head/sys/ufs/ffs/ffs_alloc.cSat May 28 14:32:47 2011 (r222421) +++ head/sys/ufs/ffs/ffs_alloc.cSat May 28 15:07:29 2011 (r222422) @@ -1022,7 +1022,7 @@ dup_alloc: (*vpp)->v_op = &ffs_vnodeops1; return (0); noinodes: - if (fs->fs_pendinginodes > 0 && reclaimed == 0) { + if (reclaimed == 0) { reclaimed = 1; softdep_request_cleanup(fs, pvp, cred, FLUSH_INODES_WAIT); goto retry; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r222423 - head/sbin/newfs
Author: mckusick Date: Sat May 28 15:14:50 2011 New Revision: 222423 URL: http://svn.freebsd.org/changeset/base/222423 Log: Update the manual page to reflect the new 32K/4K defaults. Reminded by: Ivan Voras Modified: head/sbin/newfs/newfs.8 Modified: head/sbin/newfs/newfs.8 == --- head/sbin/newfs/newfs.8 Sat May 28 15:07:29 2011(r222422) +++ head/sbin/newfs/newfs.8 Sat May 28 15:14:50 2011(r222423) @@ -28,7 +28,7 @@ .\" @(#)newfs.88.6 (Berkeley) 5/3/95 .\" $FreeBSD$ .\" -.Dd February 22, 2011 +.Dd May 25, 2011 .Dt NEWFS 8 .Os .Sh NAME @@ -112,7 +112,7 @@ for more details on how to set this opti The block size of the file system, in bytes. It must be a power of 2. The -default size is 16384 bytes, and the smallest allowable size is 4096 bytes. +default size is 32768 bytes, and the smallest allowable size is 4096 bytes. The optimal block:fragment ratio is 8:1. Other ratios are possible, but are not recommended, and may produce poor results. @@ -143,7 +143,7 @@ ranging in value between .Ar blocksize Ns /8 and .Ar blocksize . -The default is 2048 bytes. +The default is 4096 bytes. .It Fl g Ar avgfilesize The expected average file size for the file system. .It Fl h Ar avgfpdir @@ -279,7 +279,7 @@ Creates a new ufs file system on .Pa ad3s1a . The .Nm -utility will use a block size of 16384 bytes, a fragment size of 2048 bytes +utility will use a block size of 32768 bytes, a fragment size of 4096 bytes and the largest possible number of blocks per cylinders group. These values tend to produce better performance for most applications than the historical defaults ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r222424 - head/sys/dev/ath/ath_hal/ar9002
Author: adrian Date: Sat May 28 15:43:56 2011 New Revision: 222424 URL: http://svn.freebsd.org/changeset/base/222424 Log: Fix AR9287 operation when >1 TX chain is enabled. I didn't pick this up with the initial commit because I was only testing with 11bg. Modified: head/sys/dev/ath/ath_hal/ar9002/ar9287_reset.c Modified: head/sys/dev/ath/ath_hal/ar9002/ar9287_reset.c == --- head/sys/dev/ath/ath_hal/ar9002/ar9287_reset.c Sat May 28 15:14:50 2011(r222423) +++ head/sys/dev/ath/ath_hal/ar9002/ar9287_reset.c Sat May 28 15:43:56 2011(r222424) @@ -185,6 +185,7 @@ ar9287SetPowerPerRateTable(struct ath_ha break; case 2: scaledPower -= REDUCE_SCALED_POWER_BY_TWO_CHAIN; + break; default: return AH_FALSE; /* Unsupported number of chains */ } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r222423 - head/sbin/newfs
On 2011-05-28 17:14, Kirk McKusick wrote: > Author: mckusick > Date: Sat May 28 15:14:50 2011 > New Revision: 222423 > URL: http://svn.freebsd.org/changeset/base/222423 > > Log: > Update the manual page to reflect the new 32K/4K defaults. > > Reminded by: Ivan Voras > > Modified: > head/sbin/newfs/newfs.8 > See docs/157354 as well. http://www.freebsd.org/cgi/query-pr.cgi?pr=157354 Regards! -- Niclas ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r222425 - head/usr.sbin/bsdinstall/scripts
Author: nwhitehorn Date: Sat May 28 16:15:46 2011 New Revision: 222425 URL: http://svn.freebsd.org/changeset/base/222425 Log: Fix shell-based partitioning. Modified: head/usr.sbin/bsdinstall/scripts/auto Modified: head/usr.sbin/bsdinstall/scripts/auto == --- head/usr.sbin/bsdinstall/scripts/auto Sat May 28 15:43:56 2011 (r222424) +++ head/usr.sbin/bsdinstall/scripts/auto Sat May 28 16:15:46 2011 (r222425) @@ -105,7 +105,7 @@ case $? in 1) # Shell clear echo "Use this shell to set up partitions for the new system. When finished, mount the system at $BSDINSTALL_CHROOT and place an fstab file for the new system at $PATH_FSTAB. Then type 'exit'. You can also enter the partition editor at any time by entering 'bsdinstall partedit'." - sh + sh 2>&1 ;; 3) # Manual bsdinstall partedit || error ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r222426 - head/sys/powerpc/mpc85xx
Author: marcel Date: Sat May 28 16:30:24 2011 New Revision: 222426 URL: http://svn.freebsd.org/changeset/base/222426 Log: Remove unused defines. They're distracting... Modified: head/sys/powerpc/mpc85xx/mpc85xx.h Modified: head/sys/powerpc/mpc85xx/mpc85xx.h == --- head/sys/powerpc/mpc85xx/mpc85xx.h Sat May 28 16:15:46 2011 (r222425) +++ head/sys/powerpc/mpc85xx/mpc85xx.h Sat May 28 16:30:24 2011 (r222426) @@ -67,11 +67,6 @@ #defineOCP85XX_PORDEVSR2 (CCSRBAR_VA + 0xe0014) -#defineOCP85XX_DEVDISR (CCSRBAR_VA + 0xe0070) -#defineOCP85XX_DEVDISR_PCIE0 0x2000 -#defineOCP85XX_DEVDISR_PCIE1 0x0400 -#defineOCP85XX_DEVDISR_PCIE2 0x0200 - /* * Status Registers. */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r222428 - head/sys/powerpc/mpc85xx
Author: marcel Date: Sat May 28 19:14:16 2011 New Revision: 222428 URL: http://svn.freebsd.org/changeset/base/222428 Log: o Determine the number of LAWs in a way the is future proof. Only the MPC8555(E) has 8 LAWs, so don't make that the default case. Current processors have 12 LAWs so use that as the default instead. o Determine the target ID of the PCI/PCI-X and PCI-E controllers in a way that's more future proof. There's almost a perfect mapping from HC register offset to target ID, so use that as the default. Handle the MPC8548(E) specially, since it has a non-standard target ID for the PCI-E controller. Don't worry about whether the processor implements the target ID here, because we should not get called for PCI/PCI-X or PCI-E host controllers that don't exist. Modified: head/sys/powerpc/mpc85xx/mpc85xx.c Modified: head/sys/powerpc/mpc85xx/mpc85xx.c == --- head/sys/powerpc/mpc85xx/mpc85xx.c Sat May 28 17:13:15 2011 (r222427) +++ head/sys/powerpc/mpc85xx/mpc85xx.c Sat May 28 19:14:16 2011 (r222428) @@ -69,12 +69,13 @@ law_getmax(void) uint32_t ver; ver = SVR_VER(mfspr(SPR_SVR)); - if (ver == SVR_MPC8572E || ver == SVR_MPC8572) - return (12); - else if (ver == SVR_MPC8548E || ver == SVR_MPC8548) - return (10); - else + if (ver == SVR_MPC8555E || ver == SVR_MPC8555) return (8); + if (ver == SVR_MPC8548E || ver == SVR_MPC8548 || + ver == SVR_MPC8533E || ver == SVR_MPC8533) + return (10); + + return (12); } #define_LAW_SR(trgt,size) (0x8000 | (trgt << 20) | (ffsl(size) - 2)) @@ -152,10 +153,16 @@ law_pci_target(struct resource *res, int trgt = 1; break; case 0xa000: - if (ver == SVR_MPC8572E || ver == SVR_MPC8572) - trgt = 2; + if (ver == SVR_MPC8548E || ver == SVR_MPC8548) + trgt = 3; else + trgt = 2; + break; + case 0xb000: + if (ver == SVR_MPC8548E || ver == SVR_MPC8548) rv = EINVAL; + else + trgt = 3; break; default: rv = ENXIO; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r221853 - in head/sys: dev/md dev/null sys vm
On Friday 13 May 2011 20:48:01 Matthew D Fleming wrote: > Author: mdf > Date: Fri May 13 18:48:00 2011 > New Revision: 221853 > URL: http://svn.freebsd.org/changeset/base/221853 > > Log: > Usa a globally visible region of zeros for both /dev/zero and the md > device. There are likely other kernel uses of "blob of zeros" than can > be converted. > > Reviewed by:alc > MFC after: 1 week > This change seems to reduce /dev/zero performance by 68% as measured by this command: dd if=/dev/zero of=/dev/null bs=64k count=10. x dd-8-stable + dd-9-current +-+ |+| |+| |+| |+x x| |+ x x x| |A |MA_|| +-+ N Min MaxMedian AvgStddev x 5 1.2573578e+10 1.3156063e+10 1.2827355e+10 1.290079e+10 2.4951207e+08 + 5 4.1271391e+09 4.1453925e+09 4.1295157e+09 4.1328097e+09 7487363.6 Difference at 95.0% confidence -8.76798e+09 +/- 2.57431e+08 -67.9647% +/- 1.99547% (Student's t, pooled s = 1.76511e+08) This particular measurement was against 8-stable but the results are the same for -current just before this commit. Basically througput drops from ~13GB/sec to 4GB/sec. Hardware is a Phenom II X4 945 with 8GB of 800Mhz DDR2 memory. FreeBSD/amd64 is installed. This processor has 6MB of L3 cache. To me it looks like it's not able to cache the zeroes anymore. Is this intentional? I tried to change ZERO_REGION_SIZE back to 64K but that didn't help. Regards, Pieter de Goeje ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r222429 - in head/sys: conf powerpc/powermac
Author: nwhitehorn Date: Sat May 28 21:13:22 2011 New Revision: 222429 URL: http://svn.freebsd.org/changeset/base/222429 Log: Factor out the SMU fan management code into a new module (powermac_thermal) that will connect all of the various sensors and fan control modules on Apple hardware with software-controlled fans (e.g. all G5 systems). MFC after:1 month Added: head/sys/powerpc/powermac/powermac_thermal.c (contents, props changed) head/sys/powerpc/powermac/powermac_thermal.h (contents, props changed) Modified: head/sys/conf/files.powerpc head/sys/powerpc/powermac/smu.c Modified: head/sys/conf/files.powerpc == --- head/sys/conf/files.powerpc Sat May 28 19:14:16 2011(r222428) +++ head/sys/conf/files.powerpc Sat May 28 21:13:22 2011(r222429) @@ -150,6 +150,7 @@ powerpc/powermac/macgpio.c optionalpowe powerpc/powermac/macio.c optionalpowermac pci powerpc/powermac/openpic_macio.c optional powermac pci powerpc/powermac/platform_powermac.c optional powermac +powerpc/powermac/powermac_thermal.c optional powermac powerpc/powermac/pswitch.c optionalpowermac pswitch powerpc/powermac/pmu.c optionalpowermac pmu powerpc/powermac/smu.c optionalpowermac smu Added: head/sys/powerpc/powermac/powermac_thermal.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/powerpc/powermac/powermac_thermal.cSat May 28 21:13:22 2011(r222429) @@ -0,0 +1,176 @@ +/*- + * Copyright (c) 2009-2011 Nathan Whitehorn + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "powermac_thermal.h" + +static void fan_management_proc(void); +static void pmac_therm_manage_fans(void); + +static struct proc *pmac_them_proc; +static int enable_pmac_thermal = 1; + +static struct kproc_desc pmac_therm_kp = { + "pmac_thermal", + fan_management_proc, + &pmac_them_proc +}; + +SYSINIT(pmac_therm_setup, SI_SUB_KTHREAD_IDLE, SI_ORDER_ANY, kproc_start, +&pmac_therm_kp); +SYSCTL_INT(_machdep, OID_AUTO, manage_fans, CTLFLAG_RW | CTLFLAG_TUN, +&enable_pmac_thermal, 1, "Enable automatic fan management"); +MALLOC_DEFINE(M_PMACTHERM, "pmactherm", "Powermac Thermal Management"); + +struct pmac_fan_le { + struct pmac_fan *fan; + int last_val; + SLIST_ENTRY(pmac_fan_le)entries; +}; +struct pmac_sens_le { + struct pmac_therm *sensor; + int last_val; + SLIST_ENTRY(pmac_sens_le) entries; +}; +static SLIST_HEAD(pmac_fans, pmac_fan_le) fans = SLIST_HEAD_INITIALIZER(fans); +static SLIST_HEAD(pmac_sensors, pmac_sens_le) sensors = +SLIST_HEAD_INITIALIZER(sensors); + +static void +fan_management_proc(void) +{ + /* Nothing to manage? */ + if (SLIST_EMPTY(&fans)) + return; + + while (1) { + pmac_therm_manage_fans(); + pause("pmac_therm", hz); + } +} + +static void +pmac_therm_manage_fans(void) +{ + struct pmac_sens_le *sensor; + struct pmac_fan_le *fan; + int average_excess, max_excess_zone, frac_excess; + int nsens, nsens_zone; + + if (!enable_pmac_thermal) + return; + + /* Read all the sensors */ + SLIST_FOREACH(sensor, &sensors, entries
svn commit: r222430 - head/sys/powerpc/powermac
Author: nwhitehorn Date: Sat May 28 21:54:18 2011 New Revision: 222430 URL: http://svn.freebsd.org/changeset/base/222430 Log: Require an error instead of a timeout to decide the new-style fan commands won't work. This prevents a busy system from making smu(4) suddenly decide its fans use the old-style command set. MFC after:3 days Modified: head/sys/powerpc/powermac/smu.c Modified: head/sys/powerpc/powermac/smu.c == --- head/sys/powerpc/powermac/smu.c Sat May 28 21:13:22 2011 (r222429) +++ head/sys/powerpc/powermac/smu.c Sat May 28 21:54:18 2011 (r222430) @@ -662,7 +662,7 @@ smu_fan_set_rpm(struct smu_fan *fan, int cmd.data[3] = rpm & 0xff; error = smu_run_cmd(smu, &cmd, 1); - if (error) + if (error && error != EWOULDBLOCK) fan->old_style = 1; } @@ -695,7 +695,7 @@ smu_fan_read_rpm(struct smu_fan *fan) cmd.data[1] = fan->reg; error = smu_run_cmd(smu, &cmd, 1); - if (error) + if (error && error != EWOULDBLOCK) fan->old_style = 1; rpm = (cmd.data[0] << 8) | cmd.data[1]; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r222431 - head/sys/powerpc/powermac
Author: nwhitehorn Date: Sat May 28 22:11:22 2011 New Revision: 222431 URL: http://svn.freebsd.org/changeset/base/222431 Log: Adapt smusat(4) to use powermac_thermal. This provides automatic fan management on dual- and quad-core Powermac G5s, and the last G5 iMacs. Modified: head/sys/powerpc/powermac/smusat.c Modified: head/sys/powerpc/powermac/smusat.c == --- head/sys/powerpc/powermac/smusat.c Sat May 28 21:54:18 2011 (r222430) +++ head/sys/powerpc/powermac/smusat.c Sat May 28 22:11:22 2011 (r222431) @@ -43,9 +43,13 @@ __FBSDID("$FreeBSD$"); #include #include +#include + struct smu_sensor { + struct pmac_therm therm; + device_t dev; + cell_t reg; - charlocation[32]; enum { SMU_CURRENT_SENSOR, SMU_VOLTAGE_SENSOR, @@ -57,6 +61,7 @@ struct smu_sensor { static int smusat_probe(device_t); static int smusat_attach(device_t); static int smusat_sensor_sysctl(SYSCTL_HANDLER_ARGS); +static int smusat_sensor_read(struct smu_sensor *sens); MALLOC_DEFINE(M_SMUSAT, "smusat", "SMU Sattelite Sensors"); @@ -135,14 +140,16 @@ smusat_attach(device_t dev) char sysctl_name[40], sysctl_desc[40]; const char *units; + sens->dev = dev; sens->reg = 0; OF_getprop(child, "reg", &sens->reg, sizeof(sens->reg)); if (sens->reg < 0x30) continue; - sens->reg -= 0x30; - OF_getprop(child, "location", sens->location, - sizeof(sens->location)); + + OF_getprop(child, "zone", &sens->therm.zone, sizeof(int)); + OF_getprop(child, "location", sens->therm.name, + sizeof(sens->therm.name)); OF_getprop(child, "device_type", type, sizeof(type)); @@ -162,17 +169,27 @@ smusat_attach(device_t dev) continue; } - for (i = 0; i < strlen(sens->location); i++) { - sysctl_name[i] = tolower(sens->location[i]); + for (i = 0; i < strlen(sens->therm.name); i++) { + sysctl_name[i] = tolower(sens->therm.name[i]); if (isspace(sysctl_name[i])) sysctl_name[i] = '_'; } sysctl_name[i] = 0; - sprintf(sysctl_desc,"%s (%s)", sens->location, units); + sprintf(sysctl_desc,"%s (%s)", sens->therm.name, units); SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(sensroot_oid), OID_AUTO, sysctl_name, CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, - sc->sc_nsensors, smusat_sensor_sysctl, "I", sysctl_desc); + sc->sc_nsensors, smusat_sensor_sysctl, + (sens->type == SMU_TEMP_SENSOR) ? "IK" : "I", sysctl_desc); + + if (sens->type == SMU_TEMP_SENSOR) { + /* Make up some numbers */ + sens->therm.target_temp = 500 + 2732; /* 50 C */ + sens->therm.max_temp = 900 + 2732; /* 90 C */ + sens->therm.read = + (int (*)(struct pmac_therm *))smusat_sensor_read; + pmac_thermal_sensor_register(&sens->therm); + } sens++; sc->sc_nsensors++; @@ -198,11 +215,13 @@ smusat_updatecache(device_t dev) } static int -smusat_sensor_read(device_t dev, struct smu_sensor *sens, int *val) +smusat_sensor_read(struct smu_sensor *sens) { int value; + device_t dev; struct smusat_softc *sc; + dev = sens->dev; sc = device_get_softc(dev); if (time_uptime - sc->sc_last_update > 1) @@ -215,8 +234,8 @@ smusat_sensor_read(device_t dev, struct case SMU_TEMP_SENSOR: /* 16.16 */ value <<= 10; - /* Kill the .16 */ - value >>= 16; + /* From 16.16 to 0.1 C */ + value = 10*(value >> 16) + 2732; break; case SMU_VOLTAGE_SENSOR: /* 16.16 */ @@ -235,8 +254,7 @@ smusat_sensor_read(device_t dev, struct break; } - *val = value; - return (0); + return (value); } static int @@ -251,9 +269,9 @@ smusat_sensor_sysctl(SYSCTL_HANDLER_ARGS sc = device_get_softc(dev); sens = &sc->sc_sensors[arg2]; - error = smusat_sensor_read(dev, sens, &value); - if (error != 0) - return (error); + value = smusat_sensor_read(sens); + if (value < 0) + return (EBUSY); error = sysctl_handle_int(oidp, &value, 0, req); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org
svn commit: r222432 - in head/sys/dev/ath: . ath_hal/ar9002
Author: adrian Date: Sun May 29 00:17:13 2011 New Revision: 222432 URL: http://svn.freebsd.org/changeset/base/222432 Log: Teach if_ath about devices which have short-GI in 20MHz channel modes. This has been disabled until now because there hasn't been any supported device which has this feature. Since the AR9287 is the first device to support it, and since now the HAL has functional AR9287+11n support, flip this on. Modified: head/sys/dev/ath/ath_hal/ar9002/ar9287_attach.c head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/ath_hal/ar9002/ar9287_attach.c == --- head/sys/dev/ath/ath_hal/ar9002/ar9287_attach.c Sat May 28 22:11:22 2011(r222431) +++ head/sys/dev/ath/ath_hal/ar9002/ar9287_attach.c Sun May 29 00:17:13 2011(r222432) @@ -439,9 +439,14 @@ ar9287FillCapabilityInfo(struct ath_hal /* Disable this so Block-ACK works correctly */ pCap->halHasRxSelfLinkedTail = AH_FALSE; pCap->halPSPollBroken = AH_FALSE; + + /* Hardware supports (at least) single-stream STBC TX/RX */ pCap->halRxStbcSupport = 1; pCap->halTxStbcSupport = 1; + /* Hardware supports short-GI w/ 20MHz */ + pCap->halHTSGI20Support = 1; + return AH_TRUE; } Modified: head/sys/dev/ath/if_ath.c == --- head/sys/dev/ath/if_ath.c Sat May 28 22:11:22 2011(r222431) +++ head/sys/dev/ath/if_ath.c Sun May 29 00:17:13 2011(r222432) @@ -627,13 +627,22 @@ ath_attach(u_int16_t devid, struct ath_s | IEEE80211_HTC_AMPDU /* A-MPDU tx/rx */ | IEEE80211_HTC_AMSDU /* A-MSDU tx/rx */ | IEEE80211_HTCAP_MAXAMSDU_3839 /* max A-MSDU length */ - /* At the present time, the hardware doesn't support short-GI in 20mhz mode */ -#if 0 - | IEEE80211_HTCAP_SHORTGI20 /* short GI in 20MHz */ -#endif | IEEE80211_HTCAP_SMPS_OFF; /* SM power save off */ ; + /* +* Enable short-GI for HT20 only if the hardware +* advertises support. +* Notably, anything earlier than the AR9287 doesn't. +*/ + if ((ath_hal_getcapability(ah, + HAL_CAP_HT20_SGI, 0, NULL) == HAL_OK) && + (wmodes & HAL_MODE_HT20)) { + device_printf(sc->sc_dev, + "[HT] enabling short-GI in 20MHz mode\n"); + ic->ic_htcaps |= IEEE80211_HTCAP_SHORTGI20; + } + if (wmodes & HAL_MODE_HT40) ic->ic_htcaps |= IEEE80211_HTCAP_CHWIDTH40 | IEEE80211_HTCAP_SHORTGI40; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r222433 - in head/sys/powerpc: booke include
Author: marcel Date: Sun May 29 00:27:42 2011 New Revision: 222433 URL: http://svn.freebsd.org/changeset/base/222433 Log: o Add system versions for the P4040(E) and P4080(E). o In bare_probe(), change the logic that determines the maximum number of processors/cores into a switch statement and take advantage of the fact that bit 3 of the SVR value indicates whether we're running on a security enabled version. Since we don't care about that here, mask the bit. All -E versions are taken care of automatically. Modified: head/sys/powerpc/booke/platform_bare.c head/sys/powerpc/include/spr.h Modified: head/sys/powerpc/booke/platform_bare.c == --- head/sys/powerpc/booke/platform_bare.c Sun May 29 00:17:13 2011 (r222432) +++ head/sys/powerpc/booke/platform_bare.c Sun May 29 00:27:42 2011 (r222433) @@ -104,13 +104,22 @@ bare_probe(platform_t plat) int i, law_max, tgt; ver = SVR_VER(mfspr(SPR_SVR)); - - if (ver == SVR_MPC8572E || ver == SVR_MPC8572 || - ver == SVR_P1020E || ver == SVR_P1020 || - ver == SVR_P2020E || ver == SVR_P2020) + switch (ver & ~0x0008) {/* Mask Security Enabled bit */ + case SVR_P4080: + maxcpu = 8; + break; + case SVR_P4040: + maxcpu = 4; + break; + case SVR_MPC8572: + case SVR_P1020: + case SVR_P2020: maxcpu = 2; - else + break; + default: maxcpu = 1; + break; + } /* * Clear local access windows. Skip DRAM entries, so we don't shoot Modified: head/sys/powerpc/include/spr.h == --- head/sys/powerpc/include/spr.h Sun May 29 00:17:13 2011 (r222432) +++ head/sys/powerpc/include/spr.h Sun May 29 00:27:42 2011 (r222433) @@ -662,6 +662,10 @@ #define SVR_P2010E 0x80eb #define SVR_P2020 0x80e2 #define SVR_P2020E 0x80ea +#define SVR_P4040 0x8200 +#define SVR_P4040E 0x8208 +#define SVR_P4080 0x8201 +#define SVR_P4080E 0x8209 #defineSVR_VER(svr)(((svr) >> 16) & 0x) #defineSPR_PID00x030 /* ..8 Process ID Register 0 */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r222434 - head/sys/powerpc/include
Author: marcel Date: Sun May 29 00:40:59 2011 New Revision: 222434 URL: http://svn.freebsd.org/changeset/base/222434 Log: The P4080 has 8 cores. Bump MAXCPU to 8 to match. Modified: head/sys/powerpc/include/param.h Modified: head/sys/powerpc/include/param.h == --- head/sys/powerpc/include/param.hSun May 29 00:27:42 2011 (r222433) +++ head/sys/powerpc/include/param.hSun May 29 00:40:59 2011 (r222434) @@ -68,7 +68,7 @@ #endif #if defined(SMP) || defined(KLD_MODULE) -#defineMAXCPU 4 +#defineMAXCPU 8 #else #defineMAXCPU 1 #endif /* SMP || KLD_MODULE */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r222434 - head/sys/powerpc/include
On 05/28/11 19:40, Marcel Moolenaar wrote: Author: marcel Date: Sun May 29 00:40:59 2011 New Revision: 222434 URL: http://svn.freebsd.org/changeset/base/222434 Log: The P4080 has 8 cores. Bump MAXCPU to 8 to match. Can we just bump this straight to 32, like on other archs? We're very near to supporting many-way POWER6 and POWER7 systems anyway, and a single-socket POWER7 can already have 32 CPUs. -Nathan ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r222434 - head/sys/powerpc/include
On May 28, 2011, at 5:42 PM, Nathan Whitehorn wrote: > On 05/28/11 19:40, Marcel Moolenaar wrote: >> Author: marcel >> Date: Sun May 29 00:40:59 2011 >> New Revision: 222434 >> URL: http://svn.freebsd.org/changeset/base/222434 >> >> Log: >> The P4080 has 8 cores. Bump MAXCPU to 8 to match. > > Can we just bump this straight to 32, like on other archs? We're very near to > supporting many-way POWER6 and POWER7 systems anyway, and a single-socket > POWER7 can already have 32 CPUs. We could, but I'm not sure I should be concerned about the "scaling" of the various arrays in the kernel due to MAXCPU. This with an eye on small embedded devices that do 2-way SMP. I've never liked this constant anyway to be honest. It's either too big or too small. I don't think it'll ever be right :-) -- Marcel Moolenaar mar...@xcllnt.net ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r222436 - stable/8/sys/dev/hwpmc
Author: attilio Date: Sun May 29 02:09:09 2011 New Revision: 222436 URL: http://svn.freebsd.org/changeset/base/222436 Log: MFC r222002: Do not use memory barrier when is not necessary. Modified: stable/8/sys/dev/hwpmc/hwpmc_mod.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/hwpmc/hwpmc_mod.c == --- stable/8/sys/dev/hwpmc/hwpmc_mod.c Sun May 29 00:59:38 2011 (r222435) +++ stable/8/sys/dev/hwpmc/hwpmc_mod.c Sun May 29 02:09:09 2011 (r222436) @@ -4083,7 +4083,7 @@ pmc_process_interrupt(int cpu, struct pm done: /* mark CPU as needing processing */ - atomic_set_rel_int(&pmc_cpumask, (1 << cpu)); + atomic_set_int(&pmc_cpumask, (1 << cpu)); return (error); } @@ -4193,7 +4193,7 @@ pmc_process_samples(int cpu) break; if (ps->ps_nsamples == PMC_SAMPLE_INUSE) { /* Need a rescan at a later time. */ - atomic_set_rel_int(&pmc_cpumask, (1 << cpu)); + atomic_set_int(&pmc_cpumask, (1 << cpu)); break; } @@ -4782,7 +4782,7 @@ pmc_cleanup(void) PMCDBG(MOD,INI,0, "%s", "cleanup"); /* switch off sampling */ - atomic_store_rel_int(&pmc_cpumask, 0); + pmc_cpumask = 0; pmc_intr = NULL; sx_xlock(&pmc_sx); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r222437 - stable/8/sys/kern
Author: attilio Date: Sun May 29 02:10:57 2011 New Revision: 222437 URL: http://svn.freebsd.org/changeset/base/222437 Log: MFC r01: Fill the whole cpuset_t, not only the first object. Modified: stable/8/sys/kern/kern_cpuset.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/kern/kern_cpuset.c == --- stable/8/sys/kern/kern_cpuset.c Sun May 29 02:09:09 2011 (r222436) +++ stable/8/sys/kern/kern_cpuset.c Sun May 29 02:10:57 2011 (r222437) @@ -681,7 +681,7 @@ cpuset_thread0(void) * cpuset_create() due to NULL parent. */ set = uma_zalloc(cpuset_zone, M_WAITOK | M_ZERO); - set->cs_mask.__bits[0] = -1; + CPU_FILL(&set->cs_mask); LIST_INIT(&set->cs_children); LIST_INSERT_HEAD(&cpuset_ids, set, cs_link); set->cs_ref = 1; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r222438 - head/sys/netinet
Author: qingli Date: Sun May 29 02:21:35 2011 New Revision: 222438 URL: http://svn.freebsd.org/changeset/base/222438 Log: Supply the LLE_STATIC flag bit to in_ifscurb() when scrubbing interface address so that proper clean up will take place in the routing code. This patch fixes the bootp panic on startup problem. Also, added more error handling and logging code in function in_scrubprefix(). MFC after:5 days Modified: head/sys/netinet/in.c Modified: head/sys/netinet/in.c == --- head/sys/netinet/in.c Sun May 29 02:10:57 2011(r222437) +++ head/sys/netinet/in.c Sun May 29 02:21:35 2011(r222438) @@ -548,7 +548,7 @@ in_control(struct socket *so, u_long cmd * is the same as before, then the call is * un-necessarily executed here. */ - in_ifscrub(ifp, ia, 0); + in_ifscrub(ifp, ia, LLE_STATIC); ia->ia_sockmask = ifra->ifra_mask; ia->ia_sockmask.sin_family = AF_INET; ia->ia_subnetmask = @@ -557,7 +557,7 @@ in_control(struct socket *so, u_long cmd } if ((ifp->if_flags & IFF_POINTOPOINT) && (ifra->ifra_dstaddr.sin_family == AF_INET)) { - in_ifscrub(ifp, ia, 0); + in_ifscrub(ifp, ia, LLE_STATIC); ia->ia_dstaddr = ifra->ifra_dstaddr; maskIsNew = 1; /* We lie; but the effect's the same */ } @@ -1179,14 +1179,20 @@ in_scrubprefix(struct in_ifaddr *target, && (ia->ia_ifp->if_type != IFT_CARP)) { ifa_ref(&ia->ia_ifa); IN_IFADDR_RUNLOCK(); - rtinit(&(target->ia_ifa), (int)RTM_DELETE, + error = rtinit(&(target->ia_ifa), (int)RTM_DELETE, rtinitflags(target)); - target->ia_flags &= ~IFA_ROUTE; - + if (error == 0) + target->ia_flags &= ~IFA_ROUTE; + else + log(LOG_INFO, "in_scrubprefix: err=%d, old prefix delete failed\n", + error); error = rtinit(&ia->ia_ifa, (int)RTM_ADD, rtinitflags(ia) | RTF_UP); if (error == 0) ia->ia_flags |= IFA_ROUTE; + else + log(LOG_INFO, "in_scrubprefix: err=%d, new prefix add failed\n", + error); ifa_free(&ia->ia_ifa); return (error); } @@ -1210,9 +1216,12 @@ in_scrubprefix(struct in_ifaddr *target, /* * As no-one seem to have this prefix, we can remove the route. */ - rtinit(&(target->ia_ifa), (int)RTM_DELETE, rtinitflags(target)); - target->ia_flags &= ~IFA_ROUTE; - return (0); + error = rtinit(&(target->ia_ifa), (int)RTM_DELETE, rtinitflags(target)); + if (error == 0) + target->ia_flags &= ~IFA_ROUTE; + else + log(LOG_INFO, "in_scrubprefix: err=%d, prefix delete failed\n", error); + return (error); } #undef rtinitflags ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r221853 - in head/sys: dev/md dev/null sys vm
On Sat, May 28, 2011 at 12:03 PM, Pieter de Goeje wrote: > On Friday 13 May 2011 20:48:01 Matthew D Fleming wrote: >> Author: mdf >> Date: Fri May 13 18:48:00 2011 >> New Revision: 221853 >> URL: http://svn.freebsd.org/changeset/base/221853 >> >> Log: >> Usa a globally visible region of zeros for both /dev/zero and the md >> device. There are likely other kernel uses of "blob of zeros" than can >> be converted. >> >> Reviewed by: alc >> MFC after: 1 week >> > > This change seems to reduce /dev/zero performance by 68% as measured by this > command: dd if=/dev/zero of=/dev/null bs=64k count=10. > > x dd-8-stable > + dd-9-current > +-+ > |+ | > |+ | > |+ | > |+ x x| > |+ x x x| > |A |MA_|| > +-+ > N Min Max Median Avg Stddev > x 5 1.2573578e+10 1.3156063e+10 1.2827355e+10 1.290079e+10 2.4951207e+08 > + 5 4.1271391e+09 4.1453925e+09 4.1295157e+09 4.1328097e+09 7487363.6 > Difference at 95.0% confidence > -8.76798e+09 +/- 2.57431e+08 > -67.9647% +/- 1.99547% > (Student's t, pooled s = 1.76511e+08) > > This particular measurement was against 8-stable but the results are the same > for -current just before this commit. Basically througput drops from > ~13GB/sec to 4GB/sec. > > Hardware is a Phenom II X4 945 with 8GB of 800Mhz DDR2 memory. FreeBSD/amd64 > is installed. This processor has 6MB of L3 cache. > > To me it looks like it's not able to cache the zeroes anymore. Is this > intentional? I tried to change ZERO_REGION_SIZE back to 64K but that didn't > help. Hmm. I don't have access to my FreeBSD box over the weekend, but I'll run this on my box when I get back to work. Meanwhile you could try setting ZERO_REGION_SIZE to PAGE_SIZE and I think that will restore things to the original performance. Cheers, matthew ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"