From owner-svn-src-user@FreeBSD.ORG Sun Sep 4 14:09:59 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 675AD106564A; Sun, 4 Sep 2011 14:09:59 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 570A28FC12; Sun, 4 Sep 2011 14:09:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p84E9xkS094335; Sun, 4 Sep 2011 14:09:59 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p84E9xnL094333; Sun, 4 Sep 2011 14:09:59 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201109041409.p84E9xnL094333@svn.freebsd.org> From: Adrian Chadd Date: Sun, 4 Sep 2011 14:09:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225373 - user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Sep 2011 14:09:59 -0000 Author: adrian Date: Sun Sep 4 14:09:59 2011 New Revision: 225373 URL: http://svn.freebsd.org/changeset/base/225373 Log: When RX'ing a high throughput UDP stream, NF calibration loads will almost always fail. For now, just drop the number of times we try the NF load to a low value. I'll have to investigate splitting the longcal into two halves and pushing the NF threshold cap (ie loading in -50 dBm) code into something which occurs in a second phase, rather than doing this tight loop. Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Sun Sep 4 13:07:02 2011 (r225372) +++ user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Sun Sep 4 14:09:59 2011 (r225373) @@ -642,7 +642,15 @@ ar5416LoadNF(struct ath_hal *ah, const s OS_REG_SET_BIT(ah, AR_PHY_AGC_CONTROL, AR_PHY_AGC_CONTROL_NF); /* Wait for load to complete, should be fast, a few 10s of us. */ - if (! ar5212WaitNFCalComplete(ah, 1000)) { + /* + * XXX For now, don't be so aggressive in waiting for the NF + * XXX load to complete. A very busy 11n RX load will cause this + * XXX to always fail; so just leave it. + * XXX Later on we may wish to split longcal into two parts - one to do + * XXX the initial longcal, and one to load in an updated NF value + * XXX once it's finished - say, by checking it every 500ms. + */ + if (! ar5212WaitNFCalComplete(ah, 5)) { /* * We timed out waiting for the noisefloor to load, probably due to an * in-progress rx. Simply return here and allow the load plenty of time From owner-svn-src-user@FreeBSD.ORG Sun Sep 4 14:53:41 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9055C106566C; Sun, 4 Sep 2011 14:53:41 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 47A128FC12; Sun, 4 Sep 2011 14:53:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p84ErfWN095876; Sun, 4 Sep 2011 14:53:41 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p84ErfHO095874; Sun, 4 Sep 2011 14:53:41 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201109041453.p84ErfHO095874@svn.freebsd.org> From: Adrian Chadd Date: Sun, 4 Sep 2011 14:53:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225376 - user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Sep 2011 14:53:41 -0000 Author: adrian Date: Sun Sep 4 14:53:40 2011 New Revision: 225376 URL: http://svn.freebsd.org/changeset/base/225376 Log: hide this behind NFCAL debugging. Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Sun Sep 4 14:30:22 2011 (r225375) +++ user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Sun Sep 4 14:53:40 2011 (r225376) @@ -660,7 +660,7 @@ ar5416LoadNF(struct ath_hal *ah, const s * here, the baseband nf cal will just be capped by our present * noisefloor until the next calibration timer. */ - HALDEBUG(ah, HAL_DEBUG_UNMASKABLE, "Timeout while waiting for " + HALDEBUG(ah, HAL_DEBUG_NFCAL, "Timeout while waiting for " "nf to load: AR_PHY_AGC_CONTROL=0x%x\n", OS_REG_READ(ah, AR_PHY_AGC_CONTROL)); return; From owner-svn-src-user@FreeBSD.ORG Sun Sep 4 14:55:51 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC5B3106564A; Sun, 4 Sep 2011 14:55:51 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AC3E88FC0A; Sun, 4 Sep 2011 14:55:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p84Etpxo095983; Sun, 4 Sep 2011 14:55:51 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p84EtpwW095981; Sun, 4 Sep 2011 14:55:51 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201109041455.p84EtpwW095981@svn.freebsd.org> From: Adrian Chadd Date: Sun, 4 Sep 2011 14:55:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225377 - user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Sep 2011 14:55:51 -0000 Author: adrian Date: Sun Sep 4 14:55:51 2011 New Revision: 225377 URL: http://svn.freebsd.org/changeset/base/225377 Log: Commit some RX interrupt mitigation values which work better on this board. I should really make this runtime configurable. Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Sun Sep 4 14:53:40 2011 (r225376) +++ user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Sun Sep 4 14:55:51 2011 (r225377) @@ -357,11 +357,12 @@ ar5416Reset(struct ath_hal *ah, HAL_OPMO */ OS_REG_WRITE(ah, AR_OBS, 8); -#ifdef AH_AR5416_INTERRUPT_MITIGATION OS_REG_WRITE(ah, AR_MIRT, 0); - OS_REG_RMW_FIELD(ah, AR_RIMT, AR_RIMT_LAST, 500); - OS_REG_RMW_FIELD(ah, AR_RIMT, AR_RIMT_FIRST, 2000); +#ifdef AH_AR5416_INTERRUPT_MITIGATION + + OS_REG_RMW_FIELD(ah, AR_RIMT, AR_RIMT_LAST, 250); + OS_REG_RMW_FIELD(ah, AR_RIMT, AR_RIMT_FIRST, 700); OS_REG_RMW_FIELD(ah, AR_TIMT, AR_TIMT_LAST, 300); OS_REG_RMW_FIELD(ah, AR_TIMT, AR_TIMT_FIRST, 750); #endif From owner-svn-src-user@FreeBSD.ORG Sun Sep 4 14:58:58 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E700106566B; Sun, 4 Sep 2011 14:58:58 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F29438FC13; Sun, 4 Sep 2011 14:58:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p84Ewvbu096102; Sun, 4 Sep 2011 14:58:57 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p84EwvcJ096100; Sun, 4 Sep 2011 14:58:57 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201109041458.p84EwvcJ096100@svn.freebsd.org> From: Adrian Chadd Date: Sun, 4 Sep 2011 14:58:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225378 - user/adrian/if_ath_tx/sys/dev/ath X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Sep 2011 14:58:58 -0000 Author: adrian Date: Sun Sep 4 14:58:57 2011 New Revision: 225378 URL: http://svn.freebsd.org/changeset/base/225378 Log: A previous commit from me used the aggregate length for packet completion. This made for some very bad performing 11n throughput because the rate used for selection (ie, the first frame length) didn't match up with the rate completion (ie, the aggregate length.) For now, just use the frame length of the first frame. This results in better throughput - which isn't 100% reliable, but it's better than what I'm currently seeing. Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c Sun Sep 4 14:55:51 2011 (r225377) +++ user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c Sun Sep 4 14:58:57 2011 (r225378) @@ -2741,10 +2741,13 @@ ath_tx_comp_aggr_error(struct ath_softc /* * Update rate control - all frames have failed. + * + * XXX use the length in the first frame in the series; + * XXX just so things are consistent for now. */ ath_tx_update_ratectrl(sc, ni, bf_first->bf_state.bfs_rc, &bf_first->bf_status.ds_txstat, - bf_first->bf_state.bfs_al, + bf_first->bf_state.bfs_pktlen, bf_first->bf_state.bfs_nframes, bf_first->bf_state.bfs_nframes); /* Retry all subframes */ @@ -2872,7 +2875,11 @@ ath_tx_aggr_comp_aggr(struct ath_softc * * has been completed and freed. */ ts = bf_first->bf_status.ds_txstat; - pktlen = bf_first->bf_state.bfs_al; + /* + * XXX for now, use the first frame in the aggregate for + * XXX rate control completion; it's at least consistent. + */ + pktlen = bf_first->bf_state.bfs_pktlen; /* * handle errors first From owner-svn-src-user@FreeBSD.ORG Sun Sep 4 16:26:44 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3166D1065675; Sun, 4 Sep 2011 16:26:44 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 16C778FC12; Sun, 4 Sep 2011 16:26:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p84GQhKM098671; Sun, 4 Sep 2011 16:26:43 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p84GQhcw098669; Sun, 4 Sep 2011 16:26:43 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201109041626.p84GQhcw098669@svn.freebsd.org> From: Gabor Kovesdan Date: Sun, 4 Sep 2011 16:26:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225379 - user/gabor/tre-integration/tools/test/regex/printheur X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Sep 2011 16:26:44 -0000 Author: gabor Date: Sun Sep 4 16:26:43 2011 New Revision: 225379 URL: http://svn.freebsd.org/changeset/base/225379 Log: - Add a simple test program to generate and print out regex heuristics Added: user/gabor/tre-integration/tools/test/regex/printheur/ user/gabor/tre-integration/tools/test/regex/printheur/Makefile (contents, props changed) user/gabor/tre-integration/tools/test/regex/printheur/printheur.c (contents, props changed) Added: user/gabor/tre-integration/tools/test/regex/printheur/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/gabor/tre-integration/tools/test/regex/printheur/Makefile Sun Sep 4 16:26:43 2011 (r225379) @@ -0,0 +1,11 @@ +# $FreeBSD$ +.PATH: ${.CURDIR}/../../../../contrib/tre/lib + +PROG= printheur +NO_MAN= yes +SRCS= printheur.c tre-heuristic.c tre-fastmatch.c hashtable.c + +CFLAGS+= -I${.CURDIR}/../../../../contrib/tre/lib \ + -I${.CURDIR}/../../../../include + +.include Added: user/gabor/tre-integration/tools/test/regex/printheur/printheur.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/gabor/tre-integration/tools/test/regex/printheur/printheur.c Sun Sep 4 16:26:43 2011 (r225379) @@ -0,0 +1,76 @@ +/*- + * Copyright (C) 2011 Gabor Kovesdan + * 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 "config.h" +#include "tre-heuristic.h" +#include "tre-internal.h" + +int +main(int argc, char *argv[]) +{ + heur_t h; + wchar_t *pat; + size_t siz; + int cflags, ret; + + siz = strlen(argv[1]); + pat = malloc(sizeof(wint_t) * (siz + 1)); + if (pat == NULL) + return (EXIT_FAILURE); + siz = mbstowcs(pat, argv[1], siz); + + while ((ret = getopt(argc, argv, "E")) != -1) + switch(ret) { + case 'E': + cflags |= REG_EXTENDED; + break; + default: + printf("Usage: %s [-E]\n", getprogname()); + exit(EXIT_FAILURE); + } + + ret = tre_compile_heur(&h, pat, siz, 0); + if (ret != 0) { + printf("No heuristic available.\n"); + exit (EXIT_SUCCESS); + } + + printf("%s\n", h.prefix ? "Prefix heuristic" : "Normal heuristic"); + printf("Start heuristic: %s\n", h.start->pattern); + if (!h.prefix) + printf("End heuristic: %s\n", h.end->pattern); + + return (EXIT_SUCCESS); +} From owner-svn-src-user@FreeBSD.ORG Mon Sep 5 00:10:37 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5323106564A; Mon, 5 Sep 2011 00:10:37 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C4A7D8FC0A; Mon, 5 Sep 2011 00:10:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p850Abww012449; Mon, 5 Sep 2011 00:10:37 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p850AbAG012446; Mon, 5 Sep 2011 00:10:37 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201109050010.p850AbAG012446@svn.freebsd.org> From: Adrian Chadd Date: Mon, 5 Sep 2011 00:10:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225381 - user/adrian/if_ath_tx/sys/dev/ath X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Sep 2011 00:10:37 -0000 Author: adrian Date: Mon Sep 5 00:10:37 2011 New Revision: 225381 URL: http://svn.freebsd.org/changeset/base/225381 Log: Migrate the rate control selection out from the packet setup code and instead call it just before the packet is TXed. For non-aggregate packets, call it just before the frame is queued to hardware. For aggregate packets, call it on the first frame in the aggregate list so the aggregate code itself has a rate control selection to use when building the aggregate. This allows for some useful behaviour: * rate selection is now not done per-frame when doing aggregation. Aggregation only requires a rate lookup for the first frame. The rest are ignored. * The rate control module now gets a more "balanced" idea of how many times findrate is called versus completion. Beforehand, findrate would be called for each frame, but completion would be called for the entire aggregate. * software retransmission now allows for a new rate lookup - that way the retransmits aren't done using the same failing rates. This improves the aggregate throughput stability but it doesn't fix things entirely - primarily because ath_rate_sample is still making some very poor rate control decisions (eg dipping down to single-stream rates and trying MCS14/15 when it doesn't work.) Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c user/adrian/if_ath_tx/sys/dev/ath/if_athvar.h Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c Sun Sep 4 22:06:32 2011 (r225380) +++ user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c Mon Sep 5 00:10:37 2011 (r225381) @@ -824,6 +824,43 @@ ath_tx_setds(struct ath_softc *sc, struc } /* + * Do a rate lookup. + * + * This performs a rate lookup for the given ath_buf only if it's required. + * Non-data frames and raw frames don't require it. + * + * This populates the primary and MRR entries; MRR values are + * then disabled later on if something requires it (eg RTS/CTS on + * pre-11n chipsets. + * + * This needs to be done before the RTS/CTS fields are calculated + * as they may depend upon the rate chosen. + */ +static void +ath_tx_do_ratelookup(struct ath_softc *sc, struct ath_buf *bf) +{ + uint8_t rate, rix; + int try0; + + if (! bf->bf_state.bfs_doratelookup) + return; + + ATH_NODE_LOCK(ATH_NODE(bf->bf_node)); + ath_rate_findrate(sc, ATH_NODE(bf->bf_node), bf->bf_state.bfs_shpream, + bf->bf_state.bfs_pktlen, &rix, &try0, &rate); + /* XXX only do this if MRR is enabled for this frame? */ + /* XXX and blank the rest if not? */ + ath_rate_getxtxrates(sc, ATH_NODE(bf->bf_node), rix, + bf->bf_state.bfs_rc); + ATH_NODE_UNLOCK(ATH_NODE(bf->bf_node)); + + sc->sc_txrix = rix; /* for LED blinking */ + sc->sc_lastdatarix = rix; /* for fast frames */ + bf->bf_state.bfs_try0 = try0; + bf->bf_state.bfs_txrate0 = rate; +} + +/* * Set the rate control fields in the given descriptor based on * the bf_state fields and node state. * @@ -886,6 +923,8 @@ ath_tx_xmit_normal(struct ath_softc *sc, ATH_TXQ_LOCK_ASSERT(txq); /* Setup the descriptor before handoff */ + ath_tx_do_ratelookup(sc, bf); + ath_tx_rate_fill_rcflags(sc, bf); ath_tx_set_rtscts(sc, bf); ath_tx_setds(sc, bf); ath_tx_set_ratectrl(sc, bf->bf_node, bf); @@ -908,8 +947,8 @@ ath_tx_normal_setup(struct ath_softc *sc struct ieee80211com *ic = ifp->if_l2com; const struct chanAccParams *cap = &ic->ic_wme.wme_chanParams; int error, iswep, ismcast, isfrag, ismrr; - int keyix, hdrlen, pktlen, try0; - u_int8_t rix, txrate; + int keyix, hdrlen, pktlen, try0 = 0; + u_int8_t rix = 0, txrate = 0; struct ath_desc *ds; struct ath_txq *txq; struct ieee80211_frame *wh; @@ -1029,14 +1068,12 @@ ath_tx_normal_setup(struct ath_softc *sc txrate |= rt->info[rix].shortPreamble; try0 = ATH_TXMAXTRY; /* XXX?too many? */ } else { - ATH_NODE_LOCK(an); - ath_rate_findrate(sc, an, shortPreamble, pktlen, - &rix, &try0, &txrate); - ATH_NODE_UNLOCK(an); - sc->sc_txrix = rix; /* for LED blinking */ - sc->sc_lastdatarix = rix; /* for fast frames */ - if (try0 != ATH_TXMAXTRY) - ismrr = 1; + /* + * Do rate lookup on each TX, rather than using + * the hard-coded TX information decided here. + */ + ismrr = 1; + bf->bf_state.bfs_doratelookup = 1; } if (cap->cap_wmeParams[pri].wmep_noackPolicy) flags |= HAL_TXDESC_NOACK; @@ -1240,19 +1277,6 @@ ath_tx_normal_setup(struct ath_softc *sc bf->bf_state.bfs_ctsduration = 0; bf->bf_state.bfs_ismrr = ismrr; - /* - * Setup the multi-rate retry state only when we're - * going to use it. This assumes ath_hal_setuptxdesc - * initializes the descriptors (so we don't have to) - * when the hardware supports multi-rate retry and - * we don't use it. - */ - if (ismrr) { - ATH_NODE_LOCK(an); - ath_rate_getxtxrates(sc, an, rix, bf->bf_state.bfs_rc); - ATH_NODE_UNLOCK(an); - } - return 0; } @@ -1362,12 +1386,6 @@ ath_tx_start(struct ath_softc *sc, struc /* At this point m0 could have changed! */ m0 = bf->bf_m; - /* - * ath_tx_normal_setup() has done the single and multi-rate - * retry rate lookup for us. Fill in the rcflags based on - * that. - */ - ath_tx_rate_fill_rcflags(sc, bf); #if 1 /* * If it's a multicast frame, do a direct-dispatch to the @@ -2000,6 +2018,8 @@ ath_tx_xmit_aggr(struct ath_softc *sc, s } /* Direct dispatch to hardware */ + ath_tx_do_ratelookup(sc, bf); + ath_tx_rate_fill_rcflags(sc, bf); ath_tx_set_rtscts(sc, bf); ath_tx_setds(sc, bf); ath_tx_set_ratectrl(sc, bf->bf_node, bf); @@ -3145,6 +3165,8 @@ ath_tx_tid_hw_queue_aggr(struct ath_soft __func__); ATH_TXQ_REMOVE(tid, bf, bf_list); bf->bf_state.bfs_aggr = 0; + ath_tx_do_ratelookup(sc, bf); + ath_tx_rate_fill_rcflags(sc, bf); ath_tx_set_rtscts(sc, bf); ath_tx_setds(sc, bf); ath_tx_chaindesclist(sc, bf); @@ -3157,8 +3179,19 @@ ath_tx_tid_hw_queue_aggr(struct ath_soft goto queuepkt; } - /* Don't lock the TID - ath_tx_form_aggr will lock as needed */ TAILQ_INIT(&bf_q); + + /* + * Do a rate control lookup on the first frame in the + * list. The rate control code needs that to occur + * before it can determine whether to TX. + * It's inaccurate because the rate control code doesn't + * really "do" aggregate lookups, so it only considers + * the size of the first frame. + */ + ath_tx_do_ratelookup(sc, bf); + ath_tx_rate_fill_rcflags(sc, bf); + status = ath_tx_form_aggr(sc, an, tid, &bf_q); DPRINTF(sc, ATH_DEBUG_SW_TX_AGGR, @@ -3204,6 +3237,13 @@ ath_tx_tid_hw_queue_aggr(struct ath_soft sc->sc_aggr_stats.aggr_aggr_pkt++; /* + * Update the rate and rtscts information based on the + * rate decision made by the rate control code; + * the first frame in the aggregate needs it. + */ + ath_tx_set_rtscts(sc, bf); + + /* * Setup the relevant descriptor fields * for aggregation. The first descriptor * already points to the rest in the chain. @@ -3296,6 +3336,8 @@ ath_tx_tid_hw_queue_norm(struct ath_soft bf->bf_comp = ath_tx_normal_comp; /* Program descriptors + rate control */ + ath_tx_do_ratelookup(sc, bf); + ath_tx_rate_fill_rcflags(sc, bf); ath_tx_set_rtscts(sc, bf); ath_tx_setds(sc, bf); ath_tx_chaindesclist(sc, bf); Modified: user/adrian/if_ath_tx/sys/dev/ath/if_athvar.h ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/if_athvar.h Sun Sep 4 22:06:32 2011 (r225380) +++ user/adrian/if_ath_tx/sys/dev/ath/if_athvar.h Mon Sep 5 00:10:37 2011 (r225381) @@ -214,6 +214,7 @@ struct ath_buf { int bfs_istxfrag:1; /* is fragmented */ int bfs_ismrr:1; /* do multi-rate TX retry */ int bfs_doprot:1; /* do RTS/CTS based protection */ + int bfs_doratelookup:1; /* do rate lookup before each TX */ int bfs_nfl; /* next fragment length */ /* From owner-svn-src-user@FreeBSD.ORG Mon Sep 5 06:11:18 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0164B106564A; Mon, 5 Sep 2011 06:11:18 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E495B8FC13; Mon, 5 Sep 2011 06:11:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p856BHxn023459; Mon, 5 Sep 2011 06:11:17 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p856BHGA023457; Mon, 5 Sep 2011 06:11:17 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201109050611.p856BHGA023457@svn.freebsd.org> From: Adrian Chadd Date: Mon, 5 Sep 2011 06:11:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225383 - user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Sep 2011 06:11:18 -0000 Author: adrian Date: Mon Sep 5 06:11:17 2011 New Revision: 225383 URL: http://svn.freebsd.org/changeset/base/225383 Log: Make the default rate choice semi 11n aware. There's a couple of bugs here which I'm trying to fix: * There's a bit of code which marks all larger size bins as having failures if a smaller bin has a failure. * If there's no large packet TX (say I'm doing an iperf TCP test in the opposite direction) then the 1600-byte bins all get marked with both TX failures and _successive_ TX failures. * Thus when it's time to TX a large packet, all the rates are marked as invalid. This commit fixes the first problem - that the default rate selection was simply choosing the highest MCS rate (and thus MCS15 was being used on a two stream NIC) and so things like DHCP may take a few retransmits. It also fixes the problem where all those MCS rates are slowly marked as invalid by failures in small packets; the only rate left over is the base rate (6mbit for 11a). This doesn't fix a related problem - where subsequent TXes doesn't ever probe the higher rates. Because the successive failures exist, those rates aren't ever selected. pick_sample_rate() should be trying those after a while - 10 seconds by default. Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c Mon Sep 5 03:43:43 2011 (r225382) +++ user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c Mon Sep 5 06:11:17 2011 (r225383) @@ -320,6 +320,96 @@ ath_rate_update_static_rix(struct ath_so } } +/* + * Pick a non-HT rate to begin using. + */ +static int +ath_rate_pick_seed_rate_legacy(struct ath_softc *sc, struct ath_node *an, + int frameLen) +{ +#define DOT11RATE(ix) (rt->info[ix].dot11Rate & IEEE80211_RATE_VAL) +#define MCS(ix) (rt->info[ix].dot11Rate | IEEE80211_RATE_MCS) +#define RATE(ix) (DOT11RATE(ix) / 2) + int rix = -1; + const HAL_RATE_TABLE *rt = sc->sc_currates; + struct sample_node *sn = ATH_NODE_SAMPLE(an); + const int size_bin = size_to_bin(frameLen); + + /* no packet has been sent successfully yet */ + for (rix = rt->rateCount-1; rix > 0; rix--) { + if ((sn->ratemask & (1<info[rix].phy == IEEE80211_T_HT) + continue; + + /* + * Pick the highest rate <= 36 Mbps + * that hasn't failed. + */ + if (DOT11RATE(rix) <= 72 && + sn->stats[size_bin][rix].successive_failures == 0) { + break; + } + } + return rix; +#undef RATE +#undef MCS +#undef DOT11RATE +} + +/* + * Pick a HT rate to begin using. + * + * Don't use any non-HT rates; only consider HT rates. + */ +static int +ath_rate_pick_seed_rate_ht(struct ath_softc *sc, struct ath_node *an, + int frameLen) +{ +#define DOT11RATE(ix) (rt->info[ix].dot11Rate & IEEE80211_RATE_VAL) +#define MCS(ix) (rt->info[ix].dot11Rate | IEEE80211_RATE_MCS) +#define RATE(ix) (DOT11RATE(ix) / 2) + int rix = -1, ht_rix = -1; + const HAL_RATE_TABLE *rt = sc->sc_currates; + struct sample_node *sn = ATH_NODE_SAMPLE(an); + const int size_bin = size_to_bin(frameLen); + + /* no packet has been sent successfully yet */ + for (rix = rt->rateCount-1; rix > 0; rix--) { + /* Skip rates we can't use */ + if ((sn->ratemask & (1<info[rix].phy == IEEE80211_T_HT) + ht_rix = rix; + + /* Skip non-HT rates */ + if (rt->info[rix].phy != IEEE80211_T_HT) + continue; + + /* + * Pick a medium-speed rate regardless of stream count + * which has not seen any failures. Higher rates may fail; + * we'll try them later. + */ + if (((MCS(rix) & 0x7) <= 4) && + sn->stats[size_bin][rix].successive_failures == 0) { + break; + } + } + + /* + * If all the MCS rates have successive failures, rix should be + * > 0; otherwise use the lowest MCS rix (hopefully MCS 0.) + */ + return MAX(rix, ht_rix); +#undef RATE +#undef MCS +#undef DOT11RATE +} void @@ -379,20 +469,13 @@ ath_rate_findrate(struct ath_softc *sc, change_rates = 0; if (!sn->packets_sent[size_bin] || best_rix == -1) { /* no packet has been sent successfully yet */ - for (rix = rt->rateCount-1; rix > 0; rix--) { - if ((sn->ratemask & (1<stats[size_bin][rix].successive_failures == 0) { - break; - } - } change_rates = 1; - best_rix = rix; + if (an->an_node.ni_flags & IEEE80211_NODE_HT) + best_rix = + ath_rate_pick_seed_rate_ht(sc, an, frameLen); + else + best_rix = + ath_rate_pick_seed_rate_legacy(sc, an, frameLen); } else if (sn->packets_sent[size_bin] < 20) { /* let the bit-rate switch quickly during the first few packets */ change_rates = 1; From owner-svn-src-user@FreeBSD.ORG Mon Sep 5 07:36:17 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26A99106564A; Mon, 5 Sep 2011 07:36:17 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 158028FC16; Mon, 5 Sep 2011 07:36:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p857aGeA026074; Mon, 5 Sep 2011 07:36:16 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p857aGXY026072; Mon, 5 Sep 2011 07:36:16 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201109050736.p857aGXY026072@svn.freebsd.org> From: Adrian Chadd Date: Mon, 5 Sep 2011 07:36:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225385 - user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Sep 2011 07:36:17 -0000 Author: adrian Date: Mon Sep 5 07:36:16 2011 New Revision: 225385 URL: http://svn.freebsd.org/changeset/base/225385 Log: Fix the ht40/preamble flag, I had those around the wrong way. Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.h Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.h ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.h Mon Sep 5 06:54:13 2011 (r225384) +++ user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.h Mon Sep 5 07:36:16 2011 (r225385) @@ -198,9 +198,8 @@ static unsigned calc_usecs_unicast_packe if (rts) /* SIFS + CTS */ ctsduration += rt->info[cix].spAckDuration; - /* XXX assumes short preamble */ - /* XXX assumes HT/20; the node info isn't yet available here */ - ctsduration += ath_hal_pkt_txtime(sc->sc_ah, rt, length, rix, 0, is_ht40); + /* XXX no shortgi flag yet? */ + ctsduration += ath_hal_pkt_txtime(sc->sc_ah, rt, length, rix, is_ht40, 0); if (cts) /* SIFS + ACK */ ctsduration += rt->info[cix].spAckDuration; @@ -209,9 +208,8 @@ static unsigned calc_usecs_unicast_packe } tt += t_difs; - /* XXX assumes short preamble */ - /* XXX assumes HT/20; the node info isn't yet available here */ - tt += (long_retries+1)*ath_hal_pkt_txtime(sc->sc_ah, rt, length, rix, 0, is_ht40); + /* XXX no shortgi flag yet? */ + tt += (long_retries+1)*ath_hal_pkt_txtime(sc->sc_ah, rt, length, rix, is_ht40, 0); tt += (long_retries+1)*(t_sifs + rt->info[rix].spAckDuration); for (x = 0; x <= short_retries + long_retries; x++) { From owner-svn-src-user@FreeBSD.ORG Mon Sep 5 08:44:47 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59A5D1065672; Mon, 5 Sep 2011 08:44:47 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 47A358FC1C; Mon, 5 Sep 2011 08:44:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p858ilNw028328; Mon, 5 Sep 2011 08:44:47 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p858ilf9028326; Mon, 5 Sep 2011 08:44:47 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201109050844.p858ilf9028326@svn.freebsd.org> From: Adrian Chadd Date: Mon, 5 Sep 2011 08:44:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225389 - user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Sep 2011 08:44:47 -0000 Author: adrian Date: Mon Sep 5 08:44:46 2011 New Revision: 225389 URL: http://svn.freebsd.org/changeset/base/225389 Log: Begin teaching sample about MCS stuff. The basic differences include: * the "goodness" function is based purely on the average tx time calculation. For 11bg and 11a, the "best" tx time for a given rate is roughly half of the previous rate. So the metric of "is the best rate tx time better than double the current rate tx time" doesn't work for MCS. * 2-stream MCS rates have slightly higher best TX times than one-stream rates. This commit begins to flesh out some more average tx time based calculations, but it allows MCS rate avg times to be slightly higher than the "best", as long as the MCS rate is larger. This is absolutely not correct - as higher MCS rate doesn't at all mean "better throughput" but it at least means it'll be considered. This now finds and settles on an MCS rate that's giving a low average tx time, rather than wildly oscillating all over the place. The problem now is that the average TX time calculation in update_stats() doesn't take into account the aggregate frame behaviour, so any successful subframe will mean the average TX time will stay quite low. I'll address this in a followup commit. Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c Mon Sep 5 08:41:57 2011 (r225388) +++ user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c Mon Sep 5 08:44:46 2011 (r225389) @@ -196,9 +196,23 @@ pick_best_rate(struct ath_node *an, cons if (sn->stats[size_bin][rix].successive_failures > 3) continue; - if (best_rate_tt == 0 || tt < best_rate_tt) { - best_rate_tt = tt; - best_rate_rix = rix; + if (! (an->an_node.ni_flags & IEEE80211_NODE_HT)) { + if (best_rate_tt == 0 || tt <= best_rate_tt) { + best_rate_tt = tt; + best_rate_rix = rix; + } + } + + /* + * Since 2 stream rates have slightly higher TX times, + * allow a little bit of leeway. This should later + * be abstracted out and properly handled. + */ + if (an->an_node.ni_flags & IEEE80211_NODE_HT) { + if (best_rate_tt == 0 || (tt * 8 <= best_rate_tt * 10)) { + best_rate_tt = tt; + best_rate_rix = rix; + } } } return (best_rate_tt ? best_rate_rix : -1); @@ -257,6 +271,28 @@ pick_sample_rate(struct sample_softc *ss goto nextrate; } + /* + * When doing aggregation, successive failures don't happen + * as often, as sometimes some of the sub-frames get through. + * + * If the sample rix average tx time is greater than the + * average tx time of the current rix, don't immediately use + * the rate for sampling. + */ + if (an->an_node.ni_flags & IEEE80211_NODE_HT) { + if ((sn->stats[size_bin][rix].average_tx_time * 10 > + sn->stats[size_bin][current_rix].average_tx_time * 9) && + (ticks - sn->stats[size_bin][rix].last_tx < ssc->stale_failure_timeout)) { + mask &= ~(1< 11M for non-HT rates */ if (! (an->an_node.ni_flags & IEEE80211_NODE_HT)) { if (DOT11RATE(rix) > 2*11 && rix > current_rix + 2) { @@ -453,7 +489,9 @@ ath_rate_findrate(struct ath_softc *sc, if (sn->sample_tt[size_bin] < average_tx_time * (sn->packets_since_sample[size_bin]*ssc->sample_rate/100)) { rix = pick_sample_rate(ssc, an, rt, size_bin); IEEE80211_NOTE(an->an_node.ni_vap, IEEE80211_MSG_RATECTL, - &an->an_node, "size %u sample rate %d %s current rate %d %s", + &an->an_node, "att %d sample_tt %d size %u sample rate %d %s current rate %d %s", + average_tx_time, + sn->sample_tt[size_bin], bin_to_size(size_bin), dot11rate(rt, rix), dot11rate_label(rt, rix), @@ -478,13 +516,49 @@ ath_rate_findrate(struct ath_softc *sc, ath_rate_pick_seed_rate_legacy(sc, an, frameLen); } else if (sn->packets_sent[size_bin] < 20) { /* let the bit-rate switch quickly during the first few packets */ + IEEE80211_NOTE(an->an_node.ni_vap, + IEEE80211_MSG_RATECTL, &an->an_node, + "%s: switching quickly..", __func__); change_rates = 1; } else if (ticks - ssc->min_switch > sn->ticks_since_switch[size_bin]) { /* min_switch seconds have gone by */ + IEEE80211_NOTE(an->an_node.ni_vap, + IEEE80211_MSG_RATECTL, &an->an_node, + "%s: min_switch %d > ticks_since_switch %d..", + __func__, ticks - ssc->min_switch, sn->ticks_since_switch[size_bin]); change_rates = 1; - } else if (2*average_tx_time < sn->stats[size_bin][sn->current_rix[size_bin]].average_tx_time) { + } else if ((! (an->an_node.ni_flags & IEEE80211_NODE_HT)) && + (2*average_tx_time < sn->stats[size_bin][sn->current_rix[size_bin]].average_tx_time)) { /* the current bit-rate is twice as slow as the best one */ + IEEE80211_NOTE(an->an_node.ni_vap, + IEEE80211_MSG_RATECTL, &an->an_node, + "%s: 2x att (= %d) < cur_rix att %d", + __func__, + 2 * average_tx_time, sn->stats[size_bin][sn->current_rix[size_bin]].average_tx_time); change_rates = 1; + } else if ((an->an_node.ni_flags & IEEE80211_NODE_HT)) { + int cur_rix = sn->current_rix[size_bin]; + int cur_att = sn->stats[size_bin][cur_rix].average_tx_time; + /* + * If the node is HT, upgrade it if the MCS rate is + * higher and the average tx time is within 20% of + * the current rate. It can fail a little. + * + * This is likely not optimal! + */ +#if 0 + printf("cur rix/att %x/%d, best rix/att %x/%d\n", + MCS(cur_rix), cur_att, MCS(best_rix), average_tx_time); +#endif + if ((MCS(best_rix) > MCS(cur_rix)) && + (average_tx_time * 8) <= (cur_att * 10)) { + IEEE80211_NOTE(an->an_node.ni_vap, + IEEE80211_MSG_RATECTL, &an->an_node, + "%s: HT: best_rix 0x%d > cur_rix 0x%x, average_tx_time %d, cur_att %d", + __func__, + MCS(best_rix), MCS(cur_rix), average_tx_time, cur_att); + change_rates = 1; + } } sn->packets_since_sample[size_bin]++; From owner-svn-src-user@FreeBSD.ORG Mon Sep 5 09:31:27 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2031B106564A; Mon, 5 Sep 2011 09:31:27 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E952F8FC0C; Mon, 5 Sep 2011 09:31:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p859VQsS029735; Mon, 5 Sep 2011 09:31:26 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p859VQil029733; Mon, 5 Sep 2011 09:31:26 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201109050931.p859VQil029733@svn.freebsd.org> From: Adrian Chadd Date: Mon, 5 Sep 2011 09:31:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225390 - user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Sep 2011 09:31:27 -0000 Author: adrian Date: Mon Sep 5 09:31:26 2011 New Revision: 225390 URL: http://svn.freebsd.org/changeset/base/225390 Log: Add a work-around for 11n aggregation packet behaviour and the lack of correct average tx time calculation. The average tx time calculation doesn't take into account the sub-frame success rate. This means that in some instances, the success rate may be lower than useful (say, around 60-70%) but because the A-MPDU frame was partially successful, the calculated TX time is low. I'm not sure what the correct behaviour should be, but for now, just enforce that the packet TX success rate must be higher. Note: this is NOT correct (ie, a slightly higher failure rate is ok if the aggregate throughput/latency is better.) Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c Mon Sep 5 08:44:46 2011 (r225389) +++ user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c Mon Sep 5 09:31:26 2011 (r225390) @@ -170,12 +170,13 @@ pick_best_rate(struct ath_node *an, cons int size_bin, int require_acked_before) { struct sample_node *sn = ATH_NODE_SAMPLE(an); - int best_rate_rix, best_rate_tt; + int best_rate_rix, best_rate_tt, best_rate_pct; uint32_t mask; - int rix, tt; + int rix, tt, pct; best_rate_rix = 0; best_rate_tt = 0; + best_rate_pct = 0; for (mask = sn->ratemask, rix = 0; mask != 0; mask >>= 1, rix++) { if ((mask & 1) == 0) /* not a supported rate */ continue; @@ -192,14 +193,40 @@ pick_best_rate(struct ath_node *an, cons !sn->stats[size_bin][rix].packets_acked)) continue; + /* Calculate percentage if possible */ + if (sn->stats[size_bin][rix].total_packets > 0) { + pct = + (100 * sn->stats[size_bin][rix].packets_acked) / + sn->stats[size_bin][rix].total_packets; + } else { + /* XXX for now, assume 95% ok */ + pct = 95; + } + /* don't use a bit-rate that has been failing */ if (sn->stats[size_bin][rix].successive_failures > 3) continue; + /* + * For HT, Don't use a bit rate that has a higher failure + * rate than the current. + * + * XXX This isn't optimal! + */ + if (an->an_node.ni_flags & IEEE80211_NODE_HT) { + if (best_rate_pct > pct) + continue; + } + + /* + * For non-MCS rates, use the current average txtime for + * comparison. + */ if (! (an->an_node.ni_flags & IEEE80211_NODE_HT)) { if (best_rate_tt == 0 || tt <= best_rate_tt) { best_rate_tt = tt; best_rate_rix = rix; + best_rate_pct = pct; } } @@ -212,6 +239,7 @@ pick_best_rate(struct ath_node *an, cons if (best_rate_tt == 0 || (tt * 8 <= best_rate_tt * 10)) { best_rate_tt = tt; best_rate_rix = rix; + best_rate_pct = pct; } } } From owner-svn-src-user@FreeBSD.ORG Mon Sep 5 09:39:35 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A92091065670; Mon, 5 Sep 2011 09:39:35 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 97E898FC19; Mon, 5 Sep 2011 09:39:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p859dZkf030012; Mon, 5 Sep 2011 09:39:35 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p859dZcr030010; Mon, 5 Sep 2011 09:39:35 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201109050939.p859dZcr030010@svn.freebsd.org> From: Adrian Chadd Date: Mon, 5 Sep 2011 09:39:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225391 - user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Sep 2011 09:39:35 -0000 Author: adrian Date: Mon Sep 5 09:39:35 2011 New Revision: 225391 URL: http://svn.freebsd.org/changeset/base/225391 Log: Disable the code which also sets the successive_retries field for the larger size buckets. This is causing issues with 11n TX where aggregate frames can sometimes entirely fail. This started marking other rates as unavailable. Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c Mon Sep 5 09:31:26 2011 (r225390) +++ user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c Mon Sep 5 09:39:35 2011 (r225391) @@ -742,9 +742,17 @@ update_stats(struct ath_softc *sc, struc (tt * (100 - ssc->smoothing_rate))) / 100; } + /* + * XXX Don't mark the higher bit rates as also having failed; as this + * unfortunately stops those rates from being tasted when trying to + * TX. This happens with 11n aggregation. + */ if (nframes == nbad) { +#if 0 int y; +#endif sn->stats[size_bin][rix0].successive_failures += nbad; +#if 0 for (y = size_bin+1; y < NUM_PACKET_SIZE_BINS; y++) { /* * Also say larger packets failed since we @@ -756,6 +764,7 @@ update_stats(struct ath_softc *sc, struc sn->stats[y][rix0].tries += tries; sn->stats[y][rix0].total_packets += nframes; } +#endif } else { sn->stats[size_bin][rix0].packets_acked += (nframes - nbad); sn->stats[size_bin][rix0].successive_failures = 0; From owner-svn-src-user@FreeBSD.ORG Mon Sep 5 10:09:53 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3E3A1065689; Mon, 5 Sep 2011 10:09:53 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B32648FC18; Mon, 5 Sep 2011 10:09:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p85A9rS3031035; Mon, 5 Sep 2011 10:09:53 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p85A9r6a031033; Mon, 5 Sep 2011 10:09:53 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201109051009.p85A9r6a031033@svn.freebsd.org> From: Adrian Chadd Date: Mon, 5 Sep 2011 10:09:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225393 - user/adrian/if_ath_tx/sys/dev/ath X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Sep 2011 10:09:53 -0000 Author: adrian Date: Mon Sep 5 10:09:53 2011 New Revision: 225393 URL: http://svn.freebsd.org/changeset/base/225393 Log: Hacky work around for now - disable the last rate series entry when forming aggregates. This is a very low MCS rate in all MCS instances and the 4ms frame length limit ends up being quite low. Thus larger aggregates don't get a chance to form. This isn't optimal.. Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c Mon Sep 5 09:49:28 2011 (r225392) +++ user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c Mon Sep 5 10:09:53 2011 (r225393) @@ -3190,6 +3190,8 @@ ath_tx_tid_hw_queue_aggr(struct ath_soft * the size of the first frame. */ ath_tx_do_ratelookup(sc, bf); + bf->bf_state.bfs_rc[3].rix = 0; + bf->bf_state.bfs_rc[3].tries = 0; ath_tx_rate_fill_rcflags(sc, bf); status = ath_tx_form_aggr(sc, an, tid, &bf_q); From owner-svn-src-user@FreeBSD.ORG Mon Sep 5 15:11:01 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BDDAF10656B9; Mon, 5 Sep 2011 15:11:01 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AC78E8FC12; Mon, 5 Sep 2011 15:11:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p85FB1rj042844; Mon, 5 Sep 2011 15:11:01 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p85FB1J2042841; Mon, 5 Sep 2011 15:11:01 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201109051511.p85FB1J2042841@svn.freebsd.org> From: Adrian Chadd Date: Mon, 5 Sep 2011 15:11:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225401 - user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Sep 2011 15:11:01 -0000 Author: adrian Date: Mon Sep 5 15:11:01 2011 New Revision: 225401 URL: http://svn.freebsd.org/changeset/base/225401 Log: Begin fleshing out an EWMA packet rate percentage figure and use that when considering the best rate. This is a more optimal figure than using the overall percentage, which doesn't adapt quickly over time. This is a lot more stable than before (between 100-130mbit on my netbook) but as the rate sampling for MCS still samples (almost) all rates, performance can jump quite a bit. Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.h Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c Mon Sep 5 14:37:59 2011 (r225400) +++ user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c Mon Sep 5 15:11:01 2011 (r225401) @@ -195,9 +195,7 @@ pick_best_rate(struct ath_node *an, cons /* Calculate percentage if possible */ if (sn->stats[size_bin][rix].total_packets > 0) { - pct = - (100 * sn->stats[size_bin][rix].packets_acked) / - sn->stats[size_bin][rix].total_packets; + pct = sn->stats[size_bin][rix].ewma_pct; } else { /* XXX for now, assume 95% ok */ pct = 95; @@ -683,6 +681,71 @@ ath_rate_setupxtxdesc(struct ath_softc * s3code, sched->t3); /* series 3 */ } +/* + * Update the EWMA percentage. + * + * This is a simple hack to track an EWMA based on the current + * rate scenario. For the rate codes which failed, this will + * record a 0% against it. For the rate code which succeeded, + * EWMA will record the nbad*100/nframes percentage against it. + */ +static void +update_ewma_stats(struct ath_softc *sc, struct ath_node *an, + int frame_size, + int rix0, int tries0, + int rix1, int tries1, + int rix2, int tries2, + int rix3, int tries3, + int short_tries, int tries, int status, + int nframes, int nbad) +{ + struct sample_node *sn = ATH_NODE_SAMPLE(an); + struct sample_softc *ssc = ATH_SOFTC_SAMPLE(sc); + const int size_bin = size_to_bin(frame_size); + int tries_so_far; + int pct; + int rix = rix0; + + /* Calculate percentage based on current rate */ + if (nframes == 0) + nframes = nbad = 1; + pct = ((nframes - nbad) * 1000) / nframes; + + /* Figure out which rate index succeeded */ + tries_so_far = tries0; + + if (tries1 && tries_so_far < tries) { + tries_so_far += tries1; + rix = rix1; + /* XXX bump ewma pct */ + } + + if (tries2 && tries_so_far < tries) { + tries_so_far += tries2; + rix = rix2; + /* XXX bump ewma pct */ + } + + if (tries3 && tries_so_far < tries) { + rix = rix3; + /* XXX bump ewma pct */ + } + + /* rix is the successful rate, update EWMA for final rix */ + if (sn->stats[size_bin][rix].total_packets < + ssc->smoothing_minpackets) { + /* just average the first few packets */ + int a_pct = (sn->stats[size_bin][rix].packets_acked * 1000) / + (sn->stats[size_bin][rix].total_packets); + sn->stats[size_bin][rix0].ewma_pct = a_pct; + } else { + /* use a ewma */ + sn->stats[size_bin][rix0].ewma_pct = + ((sn->stats[size_bin][rix0].ewma_pct * ssc->smoothing_rate) + + (pct * (100 - ssc->smoothing_rate))) / 100; + } +} + static void update_stats(struct ath_softc *sc, struct ath_node *an, int frame_size, @@ -852,6 +915,14 @@ ath_rate_tx_complete(struct ath_softc *s 0, 0, short_tries, long_tries, status, nframes, nbad); + update_ewma_stats(sc, an, frame_size, + final_rix, long_tries, + 0, 0, + 0, 0, + 0, 0, + short_tries, long_tries, status, + nframes, nbad); + } else { int finalTSIdx = ts->ts_finaltsi; int i; @@ -938,6 +1009,16 @@ ath_rate_tx_complete(struct ath_softc *s status, nframes, nbad); } + + update_ewma_stats(sc, an, frame_size, + rc[0].rix, rc[0].tries, + rc[1].rix, rc[1].tries, + rc[2].rix, rc[2].tries, + rc[3].rix, rc[3].tries, + short_tries, long_tries, + long_tries > rc[0].tries, + nframes, nbad); + } } @@ -1059,6 +1140,7 @@ ath_rate_ctl_reset(struct ath_softc *sc, sn->stats[y][rix].total_packets = 0; sn->stats[y][rix].packets_acked = 0; sn->stats[y][rix].last_tx = 0; + sn->stats[y][rix].ewma_pct = 0; sn->stats[y][rix].perfect_tx_time = calc_usecs_unicast_packet(sc, size, rix, 0, 0, @@ -1124,12 +1206,14 @@ sample_stats(void *arg, struct ieee80211 for (y = 0; y < NUM_PACKET_SIZE_BINS; y++) { if (sn->stats[y][rix].total_packets == 0) continue; - printf("[%2u %s:%4u] %8d:%-8d (%3d%%) T %8d F %4d avg %5u last %u\n", + printf("[%2u %s:%4u] %8d:%-8d (%3d%%) (EWMA %3d.%1d%%) T %8d F %4d avg %5u last %u\n", dot11rate(rt, rix), dot11rate_label(rt, rix), bin_to_size(y), sn->stats[y][rix].total_packets, sn->stats[y][rix].packets_acked, (100*sn->stats[y][rix].packets_acked)/sn->stats[y][rix].total_packets, + sn->stats[y][rix].ewma_pct / 10, + sn->stats[y][rix].ewma_pct % 10, sn->stats[y][rix].tries, sn->stats[y][rix].successive_failures, sn->stats[y][rix].average_tx_time, Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.h ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.h Mon Sep 5 14:37:59 2011 (r225400) +++ user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.h Mon Sep 5 15:11:01 2011 (r225401) @@ -51,6 +51,7 @@ struct sample_softc { int max_successive_failures; int stale_failure_timeout; /* how long to honor max_successive_failures */ int min_switch; /* min time between rate changes */ + int min_good_pct; /* min good percentage for a rate to be considered */ }; #define ATH_SOFTC_SAMPLE(sc) ((struct sample_softc *)sc->sc_rc) @@ -58,8 +59,9 @@ struct rate_stats { unsigned average_tx_time; int successive_failures; int tries; - int total_packets; - int packets_acked; + int total_packets; /* pkts total since assoc */ + int packets_acked; /* pkts acked since assoc */ + int ewma_pct; /* EWMA percentage */ unsigned perfect_tx_time; /* transmit time for 0 retries */ int last_tx; }; From owner-svn-src-user@FreeBSD.ORG Mon Sep 5 15:21:19 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10AAB106564A; Mon, 5 Sep 2011 15:21:19 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DAB838FC0A; Mon, 5 Sep 2011 15:21:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p85FLIx9043205; Mon, 5 Sep 2011 15:21:18 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p85FLIex043203; Mon, 5 Sep 2011 15:21:18 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201109051521.p85FLIex043203@svn.freebsd.org> From: Adrian Chadd Date: Mon, 5 Sep 2011 15:21:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225402 - user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Sep 2011 15:21:19 -0000 Author: adrian Date: Mon Sep 5 15:21:18 2011 New Revision: 225402 URL: http://svn.freebsd.org/changeset/base/225402 Log: As a temporary workaround, treat MCS error rates 5% higher than the best rate as "ok" when picking a best rate. This is all a hack to avoid having to implement the "correct" solution, whatever that is. For example, minstrel calculates a predicted A-MPDU throughput value based on the average A-MPDU sub-frame count and per-rate TX success probability. This, along with lowering sample_stats to 2 from 10 (ie, spend 2% of TX time trying to sample alternate rates) seems to keep my TCP TX mostly stable at around 120-130mbit for my testing. TODO: * The EWMA doesn't raise quickly enough and seems a bit wrong, eg: [ 0 MCS: 250] 329:329 (100%) (EWMA 63.6%) T 22 F 0 avg 407 last 19144 .. how'd the EWMA come out to be 63% given a 100% success rate overall? It made an incorrect judgement early on and hasn't yet had enough time to correct it. The sampling of other MCS rates is also not optimal - it shouldn't try sampling all of them during the sample interval. Instead, come up with a more intelligent way of picking the MCS rates to sample. Finally, comparing MCS rates by number is incorrect. This really should compare the per-rate throughput value, as higher MCS rate != higher throughput. But, as said above, this is "good enough" for local testing. It shouldn't be merged into -HEAD like this. Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c Mon Sep 5 15:11:01 2011 (r225401) +++ user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c Mon Sep 5 15:21:18 2011 (r225402) @@ -206,13 +206,15 @@ pick_best_rate(struct ath_node *an, cons continue; /* - * For HT, Don't use a bit rate that has a higher failure - * rate than the current. + * For HT, Don't use a bit rate that is much more + * lossy than the best. * - * XXX This isn't optimal! + * XXX this isn't optimal; it's just designed to + * eliminate rates that are going to be obviously + * worse. */ if (an->an_node.ni_flags & IEEE80211_NODE_HT) { - if (best_rate_pct > pct) + if (best_rate_pct > (pct + 50)) continue; } From owner-svn-src-user@FreeBSD.ORG Tue Sep 6 02:31:57 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF187106564A; Tue, 6 Sep 2011 02:31:57 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7CFBF8FC14; Tue, 6 Sep 2011 02:31:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p862Vv8s064159; Tue, 6 Sep 2011 02:31:57 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p862VviT064155; Tue, 6 Sep 2011 02:31:57 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201109060231.p862VviT064155@svn.freebsd.org> From: Adrian Chadd Date: Tue, 6 Sep 2011 02:31:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225411 - user/adrian/if_ath_tx/sys/dev/ath X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Sep 2011 02:31:58 -0000 Author: adrian Date: Tue Sep 6 02:31:57 2011 New Revision: 225411 URL: http://svn.freebsd.org/changeset/base/225411 Log: Add some debugging to keep track when TX buffers are either busy or missing. Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath.c user/adrian/if_ath_tx/sys/dev/ath/if_ath_sysctl.c user/adrian/if_ath_tx/sys/dev/ath/if_athioctl.h Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath.c ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/if_ath.c Tue Sep 6 01:42:49 2011 (r225410) +++ user/adrian/if_ath_tx/sys/dev/ath/if_ath.c Tue Sep 6 02:31:57 2011 (r225411) @@ -1860,6 +1860,15 @@ _ath_getbuf_locked(struct ath_softc *sc) ATH_TXBUF_LOCK_ASSERT(sc); bf = TAILQ_FIRST(&sc->sc_txbuf); + if (bf == NULL) { + sc->sc_stats.ast_tx_getnobuf++; + } else { + if (bf->bf_flags & ATH_BUF_BUSY) { + sc->sc_stats.ast_tx_getbusybuf++; + bf = NULL; + } + } + if (bf != NULL && (bf->bf_flags & ATH_BUF_BUSY) == 0) TAILQ_REMOVE(&sc->sc_txbuf, bf, bf_list); else Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_sysctl.c ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/if_ath_sysctl.c Tue Sep 6 01:42:49 2011 (r225410) +++ user/adrian/if_ath_tx/sys/dev/ath/if_ath_sysctl.c Tue Sep 6 02:31:57 2011 (r225411) @@ -313,6 +313,9 @@ ath_sysctl_txagg(SYSCTL_HANDLER_ARGS) if (param != 1) return 0; + printf("no tx bufs (empty list): %d\n", sc->sc_stats.ast_tx_getnobuf); + printf("no tx bufs (was busy): %d\n", sc->sc_stats.ast_tx_getbusybuf); + printf("aggr single packet: %d\n", sc->sc_aggr_stats.aggr_single_pkt); printf("aggr single packet w/ BAW closed: %d\n", Modified: user/adrian/if_ath_tx/sys/dev/ath/if_athioctl.h ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/if_athioctl.h Tue Sep 6 01:42:49 2011 (r225410) +++ user/adrian/if_ath_tx/sys/dev/ath/if_athioctl.h Tue Sep 6 02:31:57 2011 (r225411) @@ -149,6 +149,8 @@ struct ath_stats { u_int32_t ast_tx_data_underrun; u_int32_t ast_tx_delim_underrun; u_int32_t ast_tx_aggrfail; /* aggregate TX failed in its entirety */ + u_int32_t ast_tx_getnobuf; + u_int32_t ast_tx_getbusybuf; u_int32_t ast_tx_intr; u_int32_t ast_rx_intr; u_int32_t ast_pad[7]; From owner-svn-src-user@FreeBSD.ORG Tue Sep 6 03:17:11 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74474106566C; Tue, 6 Sep 2011 03:17:11 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 64E368FC08; Tue, 6 Sep 2011 03:17:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p863HB3Y065882; Tue, 6 Sep 2011 03:17:11 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p863HB1e065880; Tue, 6 Sep 2011 03:17:11 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201109060317.p863HB1e065880@svn.freebsd.org> From: Doug Barton Date: Tue, 6 Sep 2011 03:17:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225412 - user/dougb/portmaster X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Sep 2011 03:17:11 -0000 Author: dougb Date: Tue Sep 6 03:17:11 2011 New Revision: 225412 URL: http://svn.freebsd.org/changeset/base/225412 Log: The -a option needs the same check as -r Modified: user/dougb/portmaster/portmaster Modified: user/dougb/portmaster/portmaster ============================================================================== --- user/dougb/portmaster/portmaster Tue Sep 6 02:31:57 2011 (r225411) +++ user/dougb/portmaster/portmaster Tue Sep 6 03:17:11 2011 (r225412) @@ -748,7 +748,8 @@ unset -f packages_init cross_idx test_co # Update based on options chosen above if [ "$$" -eq "$PM_PARENT_PID" ]; then # Continue error checking in parent only - [ -n "$PM_URB" -a -n "$1" ] && fail 'The -r option is not compatible with other updates' + [ -n "$PM_URB" -o -n "$UPDATE_ALL" ] && [ -n "$1" ] && + fail 'The -[ar] options are not compatible with other updates' if [ -n "$PM_PACKAGES" -o -n "$PM_PACKAGES_BUILD" ]; then [ `/sbin/sysctl -n kern.osreldate 2>/dev/null` -lt 600400 ] && From owner-svn-src-user@FreeBSD.ORG Tue Sep 6 05:06:49 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A228A106566C; Tue, 6 Sep 2011 05:06:49 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 92C1F8FC0C; Tue, 6 Sep 2011 05:06:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p8656nQ7069250; Tue, 6 Sep 2011 05:06:49 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p8656nwc069248; Tue, 6 Sep 2011 05:06:49 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201109060506.p8656nwc069248@svn.freebsd.org> From: Adrian Chadd Date: Tue, 6 Sep 2011 05:06:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225413 - user/adrian/if_ath_tx/sys/dev/ath X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Sep 2011 05:06:49 -0000 Author: adrian Date: Tue Sep 6 05:06:49 2011 New Revision: 225413 URL: http://svn.freebsd.org/changeset/base/225413 Log: Two fixes: * Clarify the software queue handling a little better; * Don't add a frame to the BAW if it's not in the BAW - specifically, NULL frames. Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c Tue Sep 6 03:17:11 2011 (r225412) +++ user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c Tue Sep 6 05:06:49 2011 (r225413) @@ -2032,8 +2032,10 @@ ath_tx_xmit_aggr(struct ath_softc *sc, s tid->hwq_depth++; /* Add to BAW */ - ath_tx_addto_baw(sc, an, tid, bf); - bf->bf_state.bfs_addedbaw = 1; + if (bf->bf_state.bfs_dobaw) { + ath_tx_addto_baw(sc, an, tid, bf); + bf->bf_state.bfs_addedbaw = 1; + } /* Set completion handler, multi-frame aggregate or not */ bf->bf_comp = ath_tx_aggr_comp; @@ -2085,10 +2087,14 @@ ath_tx_swq(struct ath_softc *sc, struct } else if (ath_tx_ampdu_pending(sc, an, tid)) { /* AMPDU pending; queue */ ATH_TXQ_INSERT_TAIL(atid, bf, bf_list); - } else if (txq->axq_depth < sc->sc_hwq_limit && - ath_tx_ampdu_running(sc, an, tid)) { - /* AMPDU running, attempt direct dispatch */ - ath_tx_xmit_aggr(sc, an, bf); + } else if (ath_tx_ampdu_running(sc, an, tid)) { + /* AMPDU running, attempt direct dispatch if possible */ + if (txq->axq_depth < sc->sc_hwq_limit) + ath_tx_xmit_aggr(sc, an, bf); + else { + ATH_TXQ_INSERT_TAIL(atid, bf, bf_list); + ath_tx_tid_sched(sc, an, atid); + } } else if (txq->axq_depth < sc->sc_hwq_limit) { /* AMPDU not running, attempt direct dispatch */ ath_tx_xmit_normal(sc, txq, bf); From owner-svn-src-user@FreeBSD.ORG Tue Sep 6 15:12:51 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DEE091065670; Tue, 6 Sep 2011 15:12:51 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CE2918FC08; Tue, 6 Sep 2011 15:12:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p86FCpgT089714; Tue, 6 Sep 2011 15:12:51 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p86FCpji089712; Tue, 6 Sep 2011 15:12:51 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201109061512.p86FCpji089712@svn.freebsd.org> From: Adrian Chadd Date: Tue, 6 Sep 2011 15:12:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225423 - user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Sep 2011 15:12:52 -0000 Author: adrian Date: Tue Sep 6 15:12:51 2011 New Revision: 225423 URL: http://svn.freebsd.org/changeset/base/225423 Log: Fix some typos, eep. Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c Tue Sep 6 14:49:38 2011 (r225422) +++ user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c Tue Sep 6 15:12:51 2011 (r225423) @@ -739,11 +739,11 @@ update_ewma_stats(struct ath_softc *sc, /* just average the first few packets */ int a_pct = (sn->stats[size_bin][rix].packets_acked * 1000) / (sn->stats[size_bin][rix].total_packets); - sn->stats[size_bin][rix0].ewma_pct = a_pct; + sn->stats[size_bin][rix].ewma_pct = a_pct; } else { /* use a ewma */ - sn->stats[size_bin][rix0].ewma_pct = - ((sn->stats[size_bin][rix0].ewma_pct * ssc->smoothing_rate) + + sn->stats[size_bin][rix].ewma_pct = + ((sn->stats[size_bin][rix].ewma_pct * ssc->smoothing_rate) + (pct * (100 - ssc->smoothing_rate))) / 100; } } From owner-svn-src-user@FreeBSD.ORG Tue Sep 6 16:37:03 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B56E106564A; Tue, 6 Sep 2011 16:37:03 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 00F9E8FC13; Tue, 6 Sep 2011 16:37:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p86Gb2cr092479; Tue, 6 Sep 2011 16:37:02 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p86Gb20j092476; Tue, 6 Sep 2011 16:37:02 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201109061637.p86Gb20j092476@svn.freebsd.org> From: Adrian Chadd Date: Tue, 6 Sep 2011 16:37:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225424 - user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Sep 2011 16:37:03 -0000 Author: adrian Date: Tue Sep 6 16:37:02 2011 New Revision: 225424 URL: http://svn.freebsd.org/changeset/base/225424 Log: Convert some packet fields to 64 bit values. Since I can now tx/rx ~ 18,000 pps, the 32 bit counters overflow the percentage calculations in a relatively easily obtained period of time (hours.) So given the likely uptime of some 802.11 links will be measured in days if not weeks, assume it'll overflow in the real world. Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.h Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c Tue Sep 6 15:12:51 2011 (r225423) +++ user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c Tue Sep 6 16:37:02 2011 (r225424) @@ -1208,15 +1208,15 @@ sample_stats(void *arg, struct ieee80211 for (y = 0; y < NUM_PACKET_SIZE_BINS; y++) { if (sn->stats[y][rix].total_packets == 0) continue; - printf("[%2u %s:%4u] %8d:%-8d (%3d%%) (EWMA %3d.%1d%%) T %8d F %4d avg %5u last %u\n", + printf("[%2u %s:%4u] %8ju:%-8ju (%3d%%) (EWMA %3d.%1d%%) T %8ju F %4d avg %5u last %u\n", dot11rate(rt, rix), dot11rate_label(rt, rix), bin_to_size(y), - sn->stats[y][rix].total_packets, - sn->stats[y][rix].packets_acked, - (100*sn->stats[y][rix].packets_acked)/sn->stats[y][rix].total_packets, + (uintmax_t) sn->stats[y][rix].total_packets, + (uintmax_t) sn->stats[y][rix].packets_acked, + (int) ((100*sn->stats[y][rix].packets_acked)/sn->stats[y][rix].total_packets), sn->stats[y][rix].ewma_pct / 10, sn->stats[y][rix].ewma_pct % 10, - sn->stats[y][rix].tries, + (uintmax_t) sn->stats[y][rix].tries, sn->stats[y][rix].successive_failures, sn->stats[y][rix].average_tx_time, ticks - sn->stats[y][rix].last_tx); Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.h ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.h Tue Sep 6 15:12:51 2011 (r225423) +++ user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.h Tue Sep 6 16:37:02 2011 (r225424) @@ -58,9 +58,9 @@ struct sample_softc { struct rate_stats { unsigned average_tx_time; int successive_failures; - int tries; - int total_packets; /* pkts total since assoc */ - int packets_acked; /* pkts acked since assoc */ + uint64_t tries; + uint64_t total_packets; /* pkts total since assoc */ + uint64_t packets_acked; /* pkts acked since assoc */ int ewma_pct; /* EWMA percentage */ unsigned perfect_tx_time; /* transmit time for 0 retries */ int last_tx; From owner-svn-src-user@FreeBSD.ORG Tue Sep 6 17:21:40 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B3FE106566C; Tue, 6 Sep 2011 17:21:40 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 45E098FC15; Tue, 6 Sep 2011 17:21:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p86HLeGa094350; Tue, 6 Sep 2011 17:21:40 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p86HLeDp094345; Tue, 6 Sep 2011 17:21:40 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201109061721.p86HLeDp094345@svn.freebsd.org> From: Attilio Rao Date: Tue, 6 Sep 2011 17:21:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225425 - in user/attilio/vmcontention: . contrib/bind9 contrib/bind9/bin/check contrib/bind9/bin/confgen contrib/bind9/bin/dig contrib/bind9/bin/dig/include/dig contrib/bind9/bin/dnsse... X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Sep 2011 17:21:40 -0000 Author: attilio Date: Tue Sep 6 17:21:39 2011 New Revision: 225425 URL: http://svn.freebsd.org/changeset/base/225425 Log: MFC (for sucking in aflags in vm) Added: user/attilio/vmcontention/contrib/bind9/RELEASE-NOTES-BIND-9.8.1.html - copied unchanged from r225423, head/contrib/bind9/RELEASE-NOTES-BIND-9.8.1.html user/attilio/vmcontention/contrib/bind9/RELEASE-NOTES-BIND-9.8.1.pdf - copied unchanged from r225423, head/contrib/bind9/RELEASE-NOTES-BIND-9.8.1.pdf user/attilio/vmcontention/contrib/bind9/RELEASE-NOTES-BIND-9.8.1.txt - copied unchanged from r225423, head/contrib/bind9/RELEASE-NOTES-BIND-9.8.1.txt user/attilio/vmcontention/contrib/bind9/bin/named/include/dlz/ - copied from r225423, head/contrib/bind9/bin/named/include/dlz/ user/attilio/vmcontention/contrib/bind9/bin/named/unix/dlz_dlopen_driver.c - copied unchanged from r225423, head/contrib/bind9/bin/named/unix/dlz_dlopen_driver.c user/attilio/vmcontention/contrib/bind9/lib/dns/include/dns/dlz_dlopen.h - copied unchanged from r225423, head/contrib/bind9/lib/dns/include/dns/dlz_dlopen.h user/attilio/vmcontention/contrib/bind9/release-notes.css - copied unchanged from r225423, head/contrib/bind9/release-notes.css user/attilio/vmcontention/share/man/man9/vm_page_aflag.9 - copied unchanged from r225423, head/share/man/man9/vm_page_aflag.9 user/attilio/vmcontention/sys/mips/nlm/bus_space_rmi_pci.c - copied unchanged from r225423, head/sys/mips/nlm/bus_space_rmi_pci.c user/attilio/vmcontention/sys/mips/nlm/hal/haldefs.h - copied unchanged from r225423, head/sys/mips/nlm/hal/haldefs.h user/attilio/vmcontention/sys/mips/nlm/hal/pcibus.h - copied unchanged from r225423, head/sys/mips/nlm/hal/pcibus.h user/attilio/vmcontention/sys/mips/nlm/hal/usb.h - copied unchanged from r225423, head/sys/mips/nlm/hal/usb.h user/attilio/vmcontention/sys/mips/nlm/intern_dev.c - copied unchanged from r225423, head/sys/mips/nlm/intern_dev.c user/attilio/vmcontention/sys/mips/nlm/uart_cpu_xlp.c - copied unchanged from r225423, head/sys/mips/nlm/uart_cpu_xlp.c user/attilio/vmcontention/sys/mips/nlm/uart_pci_xlp.c - copied unchanged from r225423, head/sys/mips/nlm/uart_pci_xlp.c user/attilio/vmcontention/sys/mips/nlm/usb_init.c - copied unchanged from r225423, head/sys/mips/nlm/usb_init.c user/attilio/vmcontention/sys/mips/nlm/xlp_pci.c - copied unchanged from r225423, head/sys/mips/nlm/xlp_pci.c Deleted: user/attilio/vmcontention/share/man/man9/vm_page_flag.9 user/attilio/vmcontention/sys/mips/nlm/hal/cop0.h user/attilio/vmcontention/sys/mips/nlm/hal/mmio.h user/attilio/vmcontention/sys/mips/nlm/iodi.c user/attilio/vmcontention/sys/mips/nlm/uart_cpu_mips_xlp.c Modified: user/attilio/vmcontention/ObsoleteFiles.inc user/attilio/vmcontention/contrib/bind9/CHANGES user/attilio/vmcontention/contrib/bind9/COPYRIGHT user/attilio/vmcontention/contrib/bind9/Makefile.in user/attilio/vmcontention/contrib/bind9/README user/attilio/vmcontention/contrib/bind9/bin/check/named-checkconf.c user/attilio/vmcontention/contrib/bind9/bin/confgen/ddns-confgen.c user/attilio/vmcontention/contrib/bind9/bin/confgen/rndc-confgen.c user/attilio/vmcontention/contrib/bind9/bin/dig/dig.c user/attilio/vmcontention/contrib/bind9/bin/dig/dighost.c user/attilio/vmcontention/contrib/bind9/bin/dig/host.c user/attilio/vmcontention/contrib/bind9/bin/dig/include/dig/dig.h user/attilio/vmcontention/contrib/bind9/bin/dig/nslookup.c user/attilio/vmcontention/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.8 user/attilio/vmcontention/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.c user/attilio/vmcontention/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.docbook user/attilio/vmcontention/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.html user/attilio/vmcontention/contrib/bind9/bin/dnssec/dnssec-keygen.c user/attilio/vmcontention/contrib/bind9/bin/dnssec/dnssec-settime.8 user/attilio/vmcontention/contrib/bind9/bin/dnssec/dnssec-settime.c user/attilio/vmcontention/contrib/bind9/bin/dnssec/dnssec-settime.docbook user/attilio/vmcontention/contrib/bind9/bin/dnssec/dnssec-settime.html user/attilio/vmcontention/contrib/bind9/bin/dnssec/dnssec-signzone.c user/attilio/vmcontention/contrib/bind9/bin/named/Makefile.in user/attilio/vmcontention/contrib/bind9/bin/named/client.c user/attilio/vmcontention/contrib/bind9/bin/named/config.c user/attilio/vmcontention/contrib/bind9/bin/named/controlconf.c user/attilio/vmcontention/contrib/bind9/bin/named/include/named/globals.h user/attilio/vmcontention/contrib/bind9/bin/named/interfacemgr.c user/attilio/vmcontention/contrib/bind9/bin/named/logconf.c user/attilio/vmcontention/contrib/bind9/bin/named/main.c user/attilio/vmcontention/contrib/bind9/bin/named/query.c user/attilio/vmcontention/contrib/bind9/bin/named/server.c user/attilio/vmcontention/contrib/bind9/bin/named/statschannel.c user/attilio/vmcontention/contrib/bind9/bin/named/unix/Makefile.in user/attilio/vmcontention/contrib/bind9/bin/named/unix/os.c user/attilio/vmcontention/contrib/bind9/bin/named/update.c user/attilio/vmcontention/contrib/bind9/bin/named/xfrout.c user/attilio/vmcontention/contrib/bind9/bin/named/zoneconf.c user/attilio/vmcontention/contrib/bind9/bin/nsupdate/nsupdate.c user/attilio/vmcontention/contrib/bind9/bin/rndc/rndc.c user/attilio/vmcontention/contrib/bind9/bin/tools/genrandom.8 user/attilio/vmcontention/contrib/bind9/bin/tools/genrandom.docbook user/attilio/vmcontention/contrib/bind9/bin/tools/genrandom.html user/attilio/vmcontention/contrib/bind9/config.h.in user/attilio/vmcontention/contrib/bind9/configure.in user/attilio/vmcontention/contrib/bind9/doc/arm/Bv9ARM-book.xml user/attilio/vmcontention/contrib/bind9/doc/arm/Bv9ARM.ch01.html user/attilio/vmcontention/contrib/bind9/doc/arm/Bv9ARM.ch03.html user/attilio/vmcontention/contrib/bind9/doc/arm/Bv9ARM.ch04.html user/attilio/vmcontention/contrib/bind9/doc/arm/Bv9ARM.ch05.html user/attilio/vmcontention/contrib/bind9/doc/arm/Bv9ARM.ch06.html user/attilio/vmcontention/contrib/bind9/doc/arm/Bv9ARM.ch07.html user/attilio/vmcontention/contrib/bind9/doc/arm/Bv9ARM.ch08.html user/attilio/vmcontention/contrib/bind9/doc/arm/Bv9ARM.ch09.html user/attilio/vmcontention/contrib/bind9/doc/arm/Bv9ARM.html user/attilio/vmcontention/contrib/bind9/doc/arm/Bv9ARM.pdf user/attilio/vmcontention/contrib/bind9/doc/arm/man.arpaname.html user/attilio/vmcontention/contrib/bind9/doc/arm/man.ddns-confgen.html user/attilio/vmcontention/contrib/bind9/doc/arm/man.dig.html user/attilio/vmcontention/contrib/bind9/doc/arm/man.dnssec-dsfromkey.html user/attilio/vmcontention/contrib/bind9/doc/arm/man.dnssec-keyfromlabel.html user/attilio/vmcontention/contrib/bind9/doc/arm/man.dnssec-keygen.html user/attilio/vmcontention/contrib/bind9/doc/arm/man.dnssec-revoke.html user/attilio/vmcontention/contrib/bind9/doc/arm/man.dnssec-settime.html user/attilio/vmcontention/contrib/bind9/doc/arm/man.dnssec-signzone.html user/attilio/vmcontention/contrib/bind9/doc/arm/man.genrandom.html user/attilio/vmcontention/contrib/bind9/doc/arm/man.host.html user/attilio/vmcontention/contrib/bind9/doc/arm/man.isc-hmac-fixup.html user/attilio/vmcontention/contrib/bind9/doc/arm/man.named-checkconf.html user/attilio/vmcontention/contrib/bind9/doc/arm/man.named-checkzone.html user/attilio/vmcontention/contrib/bind9/doc/arm/man.named-journalprint.html user/attilio/vmcontention/contrib/bind9/doc/arm/man.named.html user/attilio/vmcontention/contrib/bind9/doc/arm/man.nsec3hash.html user/attilio/vmcontention/contrib/bind9/doc/arm/man.nsupdate.html user/attilio/vmcontention/contrib/bind9/doc/arm/man.rndc-confgen.html user/attilio/vmcontention/contrib/bind9/doc/arm/man.rndc.conf.html user/attilio/vmcontention/contrib/bind9/doc/arm/man.rndc.html user/attilio/vmcontention/contrib/bind9/doc/misc/options user/attilio/vmcontention/contrib/bind9/lib/bind9/api user/attilio/vmcontention/contrib/bind9/lib/bind9/check.c user/attilio/vmcontention/contrib/bind9/lib/dns/Makefile.in user/attilio/vmcontention/contrib/bind9/lib/dns/acl.c user/attilio/vmcontention/contrib/bind9/lib/dns/adb.c user/attilio/vmcontention/contrib/bind9/lib/dns/api user/attilio/vmcontention/contrib/bind9/lib/dns/cache.c user/attilio/vmcontention/contrib/bind9/lib/dns/client.c user/attilio/vmcontention/contrib/bind9/lib/dns/diff.c user/attilio/vmcontention/contrib/bind9/lib/dns/dispatch.c user/attilio/vmcontention/contrib/bind9/lib/dns/dlz.c user/attilio/vmcontention/contrib/bind9/lib/dns/dns64.c user/attilio/vmcontention/contrib/bind9/lib/dns/dnssec.c user/attilio/vmcontention/contrib/bind9/lib/dns/dst_api.c user/attilio/vmcontention/contrib/bind9/lib/dns/dst_openssl.h user/attilio/vmcontention/contrib/bind9/lib/dns/gssapi_link.c user/attilio/vmcontention/contrib/bind9/lib/dns/gssapictx.c user/attilio/vmcontention/contrib/bind9/lib/dns/include/dns/Makefile.in user/attilio/vmcontention/contrib/bind9/lib/dns/include/dns/acl.h user/attilio/vmcontention/contrib/bind9/lib/dns/include/dns/cache.h user/attilio/vmcontention/contrib/bind9/lib/dns/include/dns/db.h user/attilio/vmcontention/contrib/bind9/lib/dns/include/dns/dlz.h user/attilio/vmcontention/contrib/bind9/lib/dns/include/dns/dnssec.h user/attilio/vmcontention/contrib/bind9/lib/dns/include/dns/masterdump.h user/attilio/vmcontention/contrib/bind9/lib/dns/include/dns/rdataset.h user/attilio/vmcontention/contrib/bind9/lib/dns/include/dns/resolver.h user/attilio/vmcontention/contrib/bind9/lib/dns/include/dns/sdlz.h user/attilio/vmcontention/contrib/bind9/lib/dns/include/dns/zone.h user/attilio/vmcontention/contrib/bind9/lib/dns/include/dst/dst.h user/attilio/vmcontention/contrib/bind9/lib/dns/journal.c user/attilio/vmcontention/contrib/bind9/lib/dns/master.c user/attilio/vmcontention/contrib/bind9/lib/dns/masterdump.c user/attilio/vmcontention/contrib/bind9/lib/dns/message.c user/attilio/vmcontention/contrib/bind9/lib/dns/name.c user/attilio/vmcontention/contrib/bind9/lib/dns/ncache.c user/attilio/vmcontention/contrib/bind9/lib/dns/nsec.c user/attilio/vmcontention/contrib/bind9/lib/dns/nsec3.c user/attilio/vmcontention/contrib/bind9/lib/dns/openssl_link.c user/attilio/vmcontention/contrib/bind9/lib/dns/openssldsa_link.c user/attilio/vmcontention/contrib/bind9/lib/dns/opensslrsa_link.c user/attilio/vmcontention/contrib/bind9/lib/dns/rbt.c user/attilio/vmcontention/contrib/bind9/lib/dns/rbtdb.c user/attilio/vmcontention/contrib/bind9/lib/dns/rbtdb.h user/attilio/vmcontention/contrib/bind9/lib/dns/rcode.c user/attilio/vmcontention/contrib/bind9/lib/dns/rdata.c user/attilio/vmcontention/contrib/bind9/lib/dns/rdatalist.c user/attilio/vmcontention/contrib/bind9/lib/dns/rdataset.c user/attilio/vmcontention/contrib/bind9/lib/dns/rdataslab.c user/attilio/vmcontention/contrib/bind9/lib/dns/request.c user/attilio/vmcontention/contrib/bind9/lib/dns/resolver.c user/attilio/vmcontention/contrib/bind9/lib/dns/sdb.c user/attilio/vmcontention/contrib/bind9/lib/dns/sdlz.c user/attilio/vmcontention/contrib/bind9/lib/dns/spnego.c user/attilio/vmcontention/contrib/bind9/lib/dns/ssu_external.c user/attilio/vmcontention/contrib/bind9/lib/dns/time.c user/attilio/vmcontention/contrib/bind9/lib/dns/tkey.c user/attilio/vmcontention/contrib/bind9/lib/dns/tsig.c user/attilio/vmcontention/contrib/bind9/lib/dns/ttl.c user/attilio/vmcontention/contrib/bind9/lib/dns/validator.c user/attilio/vmcontention/contrib/bind9/lib/dns/view.c user/attilio/vmcontention/contrib/bind9/lib/dns/xfrin.c user/attilio/vmcontention/contrib/bind9/lib/dns/zone.c user/attilio/vmcontention/contrib/bind9/lib/dns/zt.c user/attilio/vmcontention/contrib/bind9/lib/export/dns/Makefile.in user/attilio/vmcontention/contrib/bind9/lib/export/irs/Makefile.in user/attilio/vmcontention/contrib/bind9/lib/export/isccfg/Makefile.in user/attilio/vmcontention/contrib/bind9/lib/export/samples/nsprobe.c user/attilio/vmcontention/contrib/bind9/lib/irs/api user/attilio/vmcontention/contrib/bind9/lib/irs/getnameinfo.c user/attilio/vmcontention/contrib/bind9/lib/irs/resconf.c user/attilio/vmcontention/contrib/bind9/lib/isc/Makefile.in user/attilio/vmcontention/contrib/bind9/lib/isc/api user/attilio/vmcontention/contrib/bind9/lib/isc/heap.c user/attilio/vmcontention/contrib/bind9/lib/isc/httpd.c user/attilio/vmcontention/contrib/bind9/lib/isc/include/isc/file.h user/attilio/vmcontention/contrib/bind9/lib/isc/include/isc/task.h user/attilio/vmcontention/contrib/bind9/lib/isc/include/isc/taskpool.h user/attilio/vmcontention/contrib/bind9/lib/isc/include/isc/util.h user/attilio/vmcontention/contrib/bind9/lib/isc/log.c user/attilio/vmcontention/contrib/bind9/lib/isc/netaddr.c user/attilio/vmcontention/contrib/bind9/lib/isc/powerpc/include/isc/atomic.h user/attilio/vmcontention/contrib/bind9/lib/isc/radix.c user/attilio/vmcontention/contrib/bind9/lib/isc/rwlock.c user/attilio/vmcontention/contrib/bind9/lib/isc/sha1.c user/attilio/vmcontention/contrib/bind9/lib/isc/sha2.c user/attilio/vmcontention/contrib/bind9/lib/isc/sockaddr.c user/attilio/vmcontention/contrib/bind9/lib/isc/string.c user/attilio/vmcontention/contrib/bind9/lib/isc/task.c user/attilio/vmcontention/contrib/bind9/lib/isc/taskpool.c user/attilio/vmcontention/contrib/bind9/lib/isc/timer.c user/attilio/vmcontention/contrib/bind9/lib/isc/unix/dir.c user/attilio/vmcontention/contrib/bind9/lib/isc/unix/file.c user/attilio/vmcontention/contrib/bind9/lib/isc/unix/include/isc/stdtime.h user/attilio/vmcontention/contrib/bind9/lib/isc/unix/socket.c user/attilio/vmcontention/contrib/bind9/lib/isc/unix/stdio.c user/attilio/vmcontention/contrib/bind9/lib/isc/unix/time.c user/attilio/vmcontention/contrib/bind9/lib/isccc/Makefile.in user/attilio/vmcontention/contrib/bind9/lib/isccfg/Makefile.in user/attilio/vmcontention/contrib/bind9/lib/isccfg/aclconf.c user/attilio/vmcontention/contrib/bind9/lib/isccfg/api user/attilio/vmcontention/contrib/bind9/lib/isccfg/include/isccfg/aclconf.h user/attilio/vmcontention/contrib/bind9/lib/isccfg/namedconf.c user/attilio/vmcontention/contrib/bind9/lib/isccfg/parser.c user/attilio/vmcontention/contrib/bind9/lib/lwres/api user/attilio/vmcontention/contrib/bind9/lib/lwres/assert_p.h user/attilio/vmcontention/contrib/bind9/lib/lwres/herror.c user/attilio/vmcontention/contrib/bind9/lib/lwres/lwconfig.c user/attilio/vmcontention/contrib/bind9/lib/lwres/man/lwres.html user/attilio/vmcontention/contrib/bind9/lib/lwres/man/lwres_buffer.html user/attilio/vmcontention/contrib/bind9/lib/lwres/man/lwres_config.html user/attilio/vmcontention/contrib/bind9/lib/lwres/man/lwres_context.html user/attilio/vmcontention/contrib/bind9/lib/lwres/man/lwres_gabn.html user/attilio/vmcontention/contrib/bind9/lib/lwres/man/lwres_gai_strerror.html user/attilio/vmcontention/contrib/bind9/lib/lwres/man/lwres_getaddrinfo.html user/attilio/vmcontention/contrib/bind9/lib/lwres/man/lwres_gethostent.html user/attilio/vmcontention/contrib/bind9/lib/lwres/man/lwres_getipnode.html user/attilio/vmcontention/contrib/bind9/lib/lwres/man/lwres_getnameinfo.html user/attilio/vmcontention/contrib/bind9/lib/lwres/man/lwres_getrrsetbyname.html user/attilio/vmcontention/contrib/bind9/lib/lwres/man/lwres_gnba.html user/attilio/vmcontention/contrib/bind9/lib/lwres/man/lwres_hstrerror.html user/attilio/vmcontention/contrib/bind9/lib/lwres/man/lwres_inetntop.html user/attilio/vmcontention/contrib/bind9/lib/lwres/man/lwres_noop.html user/attilio/vmcontention/contrib/bind9/lib/lwres/man/lwres_packet.html user/attilio/vmcontention/contrib/bind9/lib/lwres/man/lwres_resutil.html user/attilio/vmcontention/contrib/bind9/lib/lwres/print.c user/attilio/vmcontention/contrib/bind9/make/rules.in user/attilio/vmcontention/contrib/bind9/version user/attilio/vmcontention/lib/bind/config.h user/attilio/vmcontention/lib/libarchive/archive_read_support_format_iso9660.c user/attilio/vmcontention/lib/libmemstat/memstat_uma.c user/attilio/vmcontention/libexec/rtld-elf/rtld.c user/attilio/vmcontention/libexec/rtld-elf/rtld_printf.c user/attilio/vmcontention/sbin/fsck_ffs/dir.c user/attilio/vmcontention/sbin/fsck_ffs/main.c user/attilio/vmcontention/sbin/mdmfs/mdmfs.8 user/attilio/vmcontention/sbin/mdmfs/mdmfs.c user/attilio/vmcontention/sbin/mount/mount.c user/attilio/vmcontention/share/doc/bind9/Makefile user/attilio/vmcontention/share/man/man3/queue.3 user/attilio/vmcontention/share/man/man4/ata.4 user/attilio/vmcontention/share/man/man4/wlan.4 user/attilio/vmcontention/share/man/man9/Makefile user/attilio/vmcontention/share/misc/committers-doc.dot user/attilio/vmcontention/sys/amd64/amd64/pmap.c user/attilio/vmcontention/sys/arm/arm/pmap.c user/attilio/vmcontention/sys/boot/forth/menu.4th user/attilio/vmcontention/sys/boot/forth/menu.4th.8 user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c user/attilio/vmcontention/sys/conf/newvers.sh user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5416/ar5416.ini user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c user/attilio/vmcontention/sys/dev/coretemp/coretemp.c user/attilio/vmcontention/sys/dev/ichwd/ichwd.c user/attilio/vmcontention/sys/dev/ixgbe/ixgbe.c user/attilio/vmcontention/sys/dev/smc/if_smc.c user/attilio/vmcontention/sys/dev/sound/usb/uaudio.c user/attilio/vmcontention/sys/dev/usb/quirk/usb_quirk.c user/attilio/vmcontention/sys/dev/usb/storage/umass.c user/attilio/vmcontention/sys/dev/usb/usb_device.c user/attilio/vmcontention/sys/dev/usb/usb_device.h user/attilio/vmcontention/sys/dev/usb/usb_dynamic.c user/attilio/vmcontention/sys/dev/usb/usb_dynamic.h user/attilio/vmcontention/sys/dev/usb/usb_freebsd.h user/attilio/vmcontention/sys/dev/usb/usb_msctest.c user/attilio/vmcontention/sys/dev/usb/usb_msctest.h user/attilio/vmcontention/sys/dev/usb/usbdi.h user/attilio/vmcontention/sys/dev/xen/console/console.c user/attilio/vmcontention/sys/fs/nfsserver/nfs_nfsdport.c user/attilio/vmcontention/sys/fs/tmpfs/tmpfs_vnops.c user/attilio/vmcontention/sys/i386/i386/pmap.c user/attilio/vmcontention/sys/i386/xen/pmap.c user/attilio/vmcontention/sys/ia64/ia64/pmap.c user/attilio/vmcontention/sys/kern/kern_racct.c user/attilio/vmcontention/sys/kern/kern_rctl.c user/attilio/vmcontention/sys/kern/subr_kdb.c user/attilio/vmcontention/sys/kern/uipc_shm.c user/attilio/vmcontention/sys/mips/conf/XLP user/attilio/vmcontention/sys/mips/conf/XLP64 user/attilio/vmcontention/sys/mips/conf/XLPN32 user/attilio/vmcontention/sys/mips/mips/pmap.c user/attilio/vmcontention/sys/mips/nlm/board.c user/attilio/vmcontention/sys/mips/nlm/board.h user/attilio/vmcontention/sys/mips/nlm/bus_space_rmi.c user/attilio/vmcontention/sys/mips/nlm/clock.h user/attilio/vmcontention/sys/mips/nlm/cms.c user/attilio/vmcontention/sys/mips/nlm/files.xlp user/attilio/vmcontention/sys/mips/nlm/hal/bridge.h user/attilio/vmcontention/sys/mips/nlm/hal/cop2.h user/attilio/vmcontention/sys/mips/nlm/hal/cpucontrol.h user/attilio/vmcontention/sys/mips/nlm/hal/fmn.c user/attilio/vmcontention/sys/mips/nlm/hal/fmn.h user/attilio/vmcontention/sys/mips/nlm/hal/iomap.h user/attilio/vmcontention/sys/mips/nlm/hal/mips-extns.h user/attilio/vmcontention/sys/mips/nlm/hal/mmu.h user/attilio/vmcontention/sys/mips/nlm/hal/pic.h user/attilio/vmcontention/sys/mips/nlm/hal/sys.h user/attilio/vmcontention/sys/mips/nlm/hal/uart.h user/attilio/vmcontention/sys/mips/nlm/interrupt.h user/attilio/vmcontention/sys/mips/nlm/intr_machdep.c user/attilio/vmcontention/sys/mips/nlm/mpreset.S user/attilio/vmcontention/sys/mips/nlm/msgring.h user/attilio/vmcontention/sys/mips/nlm/uart_bus_xlp_iodi.c user/attilio/vmcontention/sys/mips/nlm/xlp.h user/attilio/vmcontention/sys/mips/nlm/xlp_machdep.c user/attilio/vmcontention/sys/net/if_bridge.c user/attilio/vmcontention/sys/nfsserver/nfs_serv.c user/attilio/vmcontention/sys/powerpc/aim/mmu_oea.c user/attilio/vmcontention/sys/powerpc/aim/mmu_oea64.c user/attilio/vmcontention/sys/powerpc/booke/pmap.c user/attilio/vmcontention/sys/powerpc/powerpc/mmu_if.m user/attilio/vmcontention/sys/rpc/clnt_dg.c user/attilio/vmcontention/sys/security/mac/mac_framework.h user/attilio/vmcontention/sys/security/mac/mac_policy.h user/attilio/vmcontention/sys/security/mac/mac_posix_shm.c user/attilio/vmcontention/sys/security/mac_biba/mac_biba.c user/attilio/vmcontention/sys/security/mac_mls/mac_mls.c user/attilio/vmcontention/sys/security/mac_stub/mac_stub.c user/attilio/vmcontention/sys/security/mac_test/mac_test.c user/attilio/vmcontention/sys/sparc64/sparc64/pmap.c user/attilio/vmcontention/sys/sys/param.h user/attilio/vmcontention/sys/vm/swap_pager.c user/attilio/vmcontention/sys/vm/vm_fault.c user/attilio/vmcontention/sys/vm/vm_mmap.c user/attilio/vmcontention/sys/vm/vm_object.c user/attilio/vmcontention/sys/vm/vm_page.c user/attilio/vmcontention/sys/vm/vm_page.h user/attilio/vmcontention/sys/vm/vm_pageout.c user/attilio/vmcontention/sys/vm/vnode_pager.c user/attilio/vmcontention/tools/tools/netrate/netblast/netblast.c user/attilio/vmcontention/tools/tools/netrate/netsend/netsend.c user/attilio/vmcontention/usr.sbin/bsdinstall/scripts/mirrorselect user/attilio/vmcontention/usr.sbin/mfiutil/mfi_volume.c user/attilio/vmcontention/usr.sbin/mfiutil/mfiutil.8 user/attilio/vmcontention/usr.sbin/named/Makefile Directory Properties: user/attilio/vmcontention/ (props changed) user/attilio/vmcontention/cddl/contrib/opensolaris/ (props changed) user/attilio/vmcontention/contrib/bind9/ (props changed) user/attilio/vmcontention/contrib/binutils/ (props changed) user/attilio/vmcontention/contrib/bzip2/ (props changed) user/attilio/vmcontention/contrib/compiler-rt/ (props changed) user/attilio/vmcontention/contrib/dialog/ (props changed) user/attilio/vmcontention/contrib/ee/ (props changed) user/attilio/vmcontention/contrib/expat/ (props changed) user/attilio/vmcontention/contrib/file/ (props changed) user/attilio/vmcontention/contrib/gcc/ (props changed) user/attilio/vmcontention/contrib/gdb/ (props changed) user/attilio/vmcontention/contrib/gdtoa/ (props changed) user/attilio/vmcontention/contrib/gnu-sort/ (props changed) user/attilio/vmcontention/contrib/groff/ (props changed) user/attilio/vmcontention/contrib/less/ (props changed) user/attilio/vmcontention/contrib/libpcap/ (props changed) user/attilio/vmcontention/contrib/libstdc++/ (props changed) user/attilio/vmcontention/contrib/llvm/ (props changed) user/attilio/vmcontention/contrib/llvm/tools/clang/ (props changed) user/attilio/vmcontention/contrib/ncurses/ (props changed) user/attilio/vmcontention/contrib/netcat/ (props changed) user/attilio/vmcontention/contrib/ntp/ (props changed) user/attilio/vmcontention/contrib/one-true-awk/ (props changed) user/attilio/vmcontention/contrib/openbsm/ (props changed) user/attilio/vmcontention/contrib/openpam/ (props changed) user/attilio/vmcontention/contrib/pf/ (props changed) user/attilio/vmcontention/contrib/sendmail/ (props changed) user/attilio/vmcontention/contrib/tcpdump/ (props changed) user/attilio/vmcontention/contrib/tcsh/ (props changed) user/attilio/vmcontention/contrib/tnftp/ (props changed) user/attilio/vmcontention/contrib/top/ (props changed) user/attilio/vmcontention/contrib/top/install-sh (props changed) user/attilio/vmcontention/contrib/tzcode/stdtime/ (props changed) user/attilio/vmcontention/contrib/tzcode/zic/ (props changed) user/attilio/vmcontention/contrib/tzdata/ (props changed) user/attilio/vmcontention/contrib/wpa/ (props changed) user/attilio/vmcontention/contrib/xz/ (props changed) user/attilio/vmcontention/crypto/openssh/ (props changed) user/attilio/vmcontention/crypto/openssl/ (props changed) user/attilio/vmcontention/gnu/lib/ (props changed) user/attilio/vmcontention/gnu/usr.bin/binutils/ (props changed) user/attilio/vmcontention/gnu/usr.bin/cc/cc_tools/ (props changed) user/attilio/vmcontention/gnu/usr.bin/gdb/ (props changed) user/attilio/vmcontention/lib/libc/ (props changed) user/attilio/vmcontention/lib/libc/stdtime/ (props changed) user/attilio/vmcontention/lib/libutil/ (props changed) user/attilio/vmcontention/lib/libz/ (props changed) user/attilio/vmcontention/sbin/ (props changed) user/attilio/vmcontention/sbin/ipfw/ (props changed) user/attilio/vmcontention/share/mk/bsd.arch.inc.mk (props changed) user/attilio/vmcontention/share/zoneinfo/ (props changed) user/attilio/vmcontention/sys/ (props changed) user/attilio/vmcontention/sys/amd64/include/xen/ (props changed) user/attilio/vmcontention/sys/boot/ (props changed) user/attilio/vmcontention/sys/boot/i386/efi/ (props changed) user/attilio/vmcontention/sys/boot/ia64/efi/ (props changed) user/attilio/vmcontention/sys/boot/ia64/ski/ (props changed) user/attilio/vmcontention/sys/boot/powerpc/boot1.chrp/ (props changed) user/attilio/vmcontention/sys/boot/powerpc/ofw/ (props changed) user/attilio/vmcontention/sys/cddl/contrib/opensolaris/ (props changed) user/attilio/vmcontention/sys/conf/ (props changed) user/attilio/vmcontention/sys/contrib/dev/acpica/ (props changed) user/attilio/vmcontention/sys/contrib/octeon-sdk/ (props changed) user/attilio/vmcontention/sys/contrib/pf/ (props changed) user/attilio/vmcontention/sys/contrib/x86emu/ (props changed) user/attilio/vmcontention/usr.bin/calendar/ (props changed) user/attilio/vmcontention/usr.bin/csup/ (props changed) user/attilio/vmcontention/usr.bin/procstat/ (props changed) user/attilio/vmcontention/usr.sbin/ndiscvt/ (props changed) user/attilio/vmcontention/usr.sbin/rtadvctl/ (props changed) user/attilio/vmcontention/usr.sbin/rtadvd/ (props changed) user/attilio/vmcontention/usr.sbin/zic/ (props changed) Modified: user/attilio/vmcontention/ObsoleteFiles.inc ============================================================================== --- user/attilio/vmcontention/ObsoleteFiles.inc Tue Sep 6 16:37:02 2011 (r225424) +++ user/attilio/vmcontention/ObsoleteFiles.inc Tue Sep 6 17:21:39 2011 (r225425) @@ -38,20 +38,26 @@ # xargs -n1 | sort | uniq -d; # done +# 20110831: atomic page flags operations +OLD_FILES+=usr/share/man/man9/vm_page_flag.9.gz +OLD_FILES+=usr/share/man/man9/vm_page_flag_clear.9.gz +OLD_FILES+=usr/share/man/man9/vm_page_flag_set.9.gz # 20110828: library version bump for 9.0 +OLD_LIBS+=lib/libcam.so.5 +OLD_LIBS+=lib/libpcap.so.7 OLD_LIBS+=lib/libufs.so.5 OLD_LIBS+=usr/lib/libbsnmp.so.5 OLD_LIBS+=usr/lib/libdwarf.so.2 OLD_LIBS+=usr/lib/libopie.so.6 -OLD_LIBS+=usr/lib/libpcap.so.7 OLD_LIBS+=usr/lib/librtld_db.so.1 OLD_LIBS+=usr/lib/libtacplus.so.4 .if ${TARGET_ARCH} == "amd64" +OLD_LIBS+=usr/lib32/libcam.so.5 +OLD_LIBS+=usr/lib32/libpcap.so.7 OLD_LIBS+=usr/lib32/libufs.so.5 OLD_LIBS+=usr/lib32/libbsnmp.so.5 OLD_LIBS+=usr/lib32/libdwarf.so.2 OLD_LIBS+=usr/lib32/libopie.so.6 -OLD_LIBS+=usr/lib32/libpcap.so.7 OLD_LIBS+=usr/lib32/librtld_db.so.1 OLD_LIBS+=usr/lib32/libtacplus.so.4 .endif Modified: user/attilio/vmcontention/contrib/bind9/CHANGES ============================================================================== --- user/attilio/vmcontention/contrib/bind9/CHANGES Tue Sep 6 16:37:02 2011 (r225424) +++ user/attilio/vmcontention/contrib/bind9/CHANGES Tue Sep 6 17:21:39 2011 (r225425) @@ -1,28 +1,60 @@ - --- 9.8.0-P4 released --- + --- 9.8.1 released --- -3124. [bug] Use an rdataset attribute flag to indicate - negative-cache records rather than using rrtype 0; - this will prevent problems when that rrtype is - used in actual DNS packets. [RT #24777] + --- 9.8.1rc1 released --- + +3141. [bug] Silence spurious "zone serial (0) unchanged" messages + associated with empty zones. [RT #25079] + +3138. [bug] Address memory leaks and out-of-order operations when + shutting named down. [RT #25210] + +3136. [func] Add RFC 1918 reverse zones to the list of built-in + empty zones switched on by the 'empty-zones-enable' + option. [RT #24990] + + Note: empty-zones-enable must be "yes;" or a empty + zone needs to be disabled in named.conf for RFC 1918 + zones to be activated. This requirement may be + removed in future releases. + +3135. [port] FreeBSD: workaround broken IPV6_USE_MIN_MTU processing. + See http://www.freebsd.org/cgi/query-pr.cgi?pr=158307 + [RT #24950] + +3134. [bug] Improve the accuracy of dnssec-signzone's signing + statistics. [RT #16030] + + --- 9.8.1b3 released --- + +3133. [bug] Change #3114 was incomplete. [RT #24577] + +3131. [tuning] Improve scalability by allocating one zone task + per 100 zones at startup time, rather than using a + fixed-size task table. [RT #24406] + +3129. [bug] Named could crash on 'rndc reconfig' when + allow-new-zones was set to yes and named ACLs + were used. [RT #22739] - --- 9.8.0-P3 released (withdrawn) --- + --- 9.8.1b2 released --- 3126. [security] Using DNAME record to generate replacements caused - RPZ to exit with a assertion failure. [RT #23766] + RPZ to exit with a assertion failure. [RT #24766] 3125. [security] Using wildcard CNAME records as a replacement with RPZ caused named to exit with a assertion failure. [RT #24715] +3124. [bug] Use an rdataset attribute flag to indicate + negative-cache records rather than using rrtype 0; + this will prevent problems when that rrtype is + used in actual DNS packets. [RT #24777] + 3123. [security] Change #2912 exposed a latent flaw in dns_rdataset_totext() that could cause named to crash with an assertion failure. [RT #24777] -3115. [bug] Named could fail to return requested data when - following a CNAME that points into the same zone. - [RT #2445] - - --- 9.8.0-P2 released --- +3122. [cleanup] dnssec-settime: corrected usage message. [RT #24664] 3121. [security] An authoritative name server sending a negative response containing a very large RRset could @@ -33,12 +65,256 @@ that validated insecure without using DLV and had DS records in the parent zone. [RT #24631] - --- 9.8.0-P1 released --- +3119. [bug] When rolling to a new DNSSEC key, a private-type + record could be created and never marked complete. + [RT #23253] + +3118. [bug] nsupdate could dump core on shutdown when using + SIG(0) keys. [RT #24604] + +3117. [cleanup] Remove doc and parser references to the + never-implemented 'auto-dnssec create' option. + [RT #24533] + +3115. [bug] Named could fail to return requested data when + following a CNAME that points into the same zone. + [RT #24455] + +3114. [bug] Retain expired RRSIGs in dynamic zones if key is + inactive and there is no replacement key. [RT #23136] + +3113. [doc] Document the relationship between serial-query-rate + and NOTIFY messages. + + --- 9.8.1b1 released --- + +3112. [doc] Add missing descriptions of the update policy name + types "ms-self", "ms-subdomain", "krb5-self" and + "krb5-subdomain", which allow machines to update + their own records, to the BIND 9 ARM. + +3111. [bug] Improved consistency checks for dnssec-enable and + dnssec-validation, added test cases to the + checkconf system test. [RT #24398] + +3110. [bug] dnssec-signzone: Wrong error message could appear + when attempting to sign with no KSK. [RT #24369] + +3107. [bug] dnssec-signzone: Report the correct number of ZSKs + when using -x. [RT #20852] + +3105. [bug] GOST support can be suppressed by "configure + --without-gost" [RT #24367] + +3104. [bug] Better support for cross-compiling. [RT #24367] + +3103. [bug] Configuring 'dnssec-validation auto' in a view + instead of in the options statement could trigger + an assertion failure in named-checkconf. [RT #24382] + +3101. [bug] Zones using automatic key maintenance could fail + to check the key repository for updates. [RT #23744] 3100. [security] Certain response policy zone configurations could trigger an INSIST when receiving a query of type RRSIG. [RT #24280] +3099. [test] "dlz" system test now runs but gives R:SKIPPED if + not compiled with --with-dlz-filesystem. [RT #24146] + +3098. [bug] DLZ zones were answering without setting the AA bit. + [RT #24146] + +3097. [test] Add a tool to test handling of malformed packets. + [RT #24096] + +3096. [bug] Set KRB5_KTNAME before calling log_cred() in + dst_gssapi_acceptctx(). [RT #24004] + +3095. [bug] Handle isolated reserved ports in the port range. + [RT #23957] + +3094. [doc] Expand dns64 documentation. + +3093. [bug] Fix gssapi/kerberos dependencies [RT #23836] + +3092. [bug] Signatures for records at the zone apex could go + stale due to an incorrect timer setting. [RT #23769] + +3091. [bug] Fixed a bug in which zone keys that were published + and then subsequently activated could fail to trigger + automatic signing. [RT #22911] + +3090. [func] Make --with-gssapi default [RT #23738] + +3088. [bug] Remove bin/tests/system/logfileconfig/ns1/named.conf + and add setup.sh in order to resolve changing + named.conf issue. [RT #23687] + +3087. [bug] DDNS updates using SIG(0) with update-policy match + type "external" could cause a crash. [RT #23735] + +3086. [bug] Running dnssec-settime -f on an old-style key will + now force an update to the new key format even if no + other change has been specified, using "-P now -A now" + as default values. [RT #22474] + +3083. [bug] NOTIFY messages were not being sent when generating + a NSEC3 chain incrementally. [RT #23702] + +3082. [port] strtok_r is threads only. [RT #23747] + +3081. [bug] Failure of DNAME substitution did not return + YXDOMAIN. [RT #23591] + +3080. [cleanup] Replaced compile time constant by STDTIME_ON_32BITS. + [RT #23587] + +3079. [bug] Handle isc_event_allocate failures in t_tasks. + [RT #23572] + +3078. [func] Added a new include file with function typedefs + for the DLZ "dlopen" driver. [RT #23629] + +3077. [bug] zone.c:zone_refreshkeys() incorrectly called + dns_zone_attach(), use zone->irefs instead. [RT #23303] + +3075. [bug] dns_dnssec_findzonekeys{2} used a inconsistant + timestamp when determining which keys are active. + [RT #23642] + +3074. [bug] Make the adb cache read through for zone data and + glue learn for zone named is authoritative for. + [RT #22842] + +3073. [bug] managed-keys changes were not properly being recorded. + [RT #20256] + +3072. [bug] dns_dns64_aaaaok() potential NULL pointer dereference. + [RT #20256] + +3071. [bug] has_nsec could be used unintialised in + update.c:next_active. [RT #20256] + +3070. [bug] dnssec-signzone potential NULL pointer dereference. + [RT #20256] + +3069. [cleanup] Silence warnings messages from clang static analysis. + [RT #20256] + +3068. [bug] Named failed to build with a OpenSSL without engine + support. [RT #23473] + +3067. [bug] ixfr-from-differences {master|slave}; failed to + select the master/slave zones. [RT #23580] + +3066. [func] The DLZ "dlopen" driver is now built by default, + no longer requiring a configure option. To + disable it, use "configure --without-dlopen". + (Note: driver not supported on win32.) [RT #23467] + +3065. [bug] RRSIG could have time stamps too far in the future. + [RT #23356] + +3064. [bug] powerpc: add sync instructions to the end of atomic + operations. [RT #23469] + +3063. [contrib] More verbose error reporting from DLZ LDAP. [RT #23402] + +3059. [test] Added a regression test for change #3023. + +3058. [bug] Cause named to terminate at startup or rndc reconfig/ + reload to fail, if a log file specified in the conf + file isn't a plain file. [RT #22771] + +3057. [bug] "rndc secroots" would abort after the first error + and so could miss some views. [RT #23488] + +3054. [bug] Added elliptic curve support check in + GOST OpenSSL engine detection. [RT #23485] + +3053. [bug] Under a sustained high query load with a finite + max-cache-size, it was possible for cache memory + to be exhausted and not recovered. [RT #23371] + +3052. [test] Fixed last autosign test report. [RT #23256] + +3051. [bug] NS records obsure DNAME records at the bottom of the + zone if both are present. [RT #23035] + +3050. [bug] The autosign system test was timing dependent. + Wait for the initial autosigning to complete + before running the rest of the test. [RT #23035] + +3049. [bug] Save and restore the gid when creating creating + named.pid at startup. [RT #23290] + +3048. [bug] Fully separate view key mangement. [RT #23419] + +3047. [bug] DNSKEY NODATA responses not cached fixed in + validator.c. Tests added to dnssec system test. + [RT #22908] + +3046. [bug] Use RRSIG original TTL to compute validated RRset + and RRSIG TTL. [RT #23332] + +3044. [bug] Hold the socket manager lock while freeing the socket. + [RT #23333] + +3043. [test] Merged in the NetBSD ATF test framework (currently + version 0.12) for development of future unit tests. + Use configure --with-atf to build ATF internally + or configure --with-atf=prefix to use an external + copy. [RT #23209] + +3042. [bug] dig +trace could fail attempting to use IPv6 + addresses on systems with only IPv4 connectivity. + [RT #23297] + +3041. [bug] dnssec-signzone failed to generate new signatures on + ttl changes. [RT #23330] + +3040. [bug] Named failed to validate insecure zones where a node + with a CNAME existed between the trust anchor and the + top of the zone. [RT #23338] + +3038. [bug] Install . [RT #23342] + +3037. [doc] Update COPYRIGHT to contain all the individual + copyright notices that cover various parts. + +3036. [bug] Check built-in zone arguments to see if the zone + is re-usable or not. [RT #21914] + +3035. [cleanup] Simplify by using strlcpy. [RT #22521] + +3034. [cleanup] nslookup: use strlcpy instead of safecopy. [RT #22521] + +3033. [cleanup] Add two INSIST(bucket != DNS_ADB_INVALIDBUCKET). + [RT #22521] + +3032. [bug] rdatalist.c: add missing REQUIREs. [RT #22521] + +3031. [bug] dns_rdataclass_format() handle a zero sized buffer. + [RT #22521] + +3030. [bug] dns_rdatatype_format() handle a zero sized buffer. + [RT #22521] + +3029. [bug] isc_netaddr_format() handle a zero sized buffer. + [RT #22521] + +3028. [bug] isc_sockaddr_format() handle a zero sized buffer. + [RT #22521] + +3027. [bug] Add documented REQUIREs to cfg_obj_asnetprefix() to + catch NULL pointer dereferences before they happen. + [RT #22521] + +3026. [bug] lib/isc/httpd.c: check that we have enough space + after calling grow_headerspace() and if not + re-call grow_headerspace() until we do. [RT #22521] + --- 9.8.0 released --- 3025. [bug] Fixed a possible deadlock due to zone resigning. @@ -51,8 +327,8 @@ receiving multiple AXFR response messages that were not all TSIG-signed. [RT #23254] -3022. [bug] Fixed rpz SERVFAILs after failed zone transfers - [RT #23246] +3022. [bug] Fixed rpz SERVFAILs after failed zone transfers + [RT #23246] 3021. [bug] Change #3010 was incomplete. [RT #22296] @@ -86,7 +362,7 @@ 'resolver-query-timeout' option, which specifies a max time in seconds. 0 means 'default' and anything longer than 30 will be silently set to 30. [RT #22852] - + 3010. [bug] Fixed a bug where "rndc reconfig" stopped the timer for refreshing managed-keys. [RT #22296] @@ -436,7 +712,7 @@ 2927. [placeholder] 2926. [placeholder] -h + 2925. [bug] Named failed to accept uncachable negative responses from insecure zones. [RT# 21555] @@ -495,7 +771,7 @@ h 2905. [port] aix: set use_atomic=yes with native compiler. [RT #21402] -2904. [bug] When using DLV, sub-zones of the zones in the DLV, +2904. [bug] When using DLV, sub-zones of the zones in the DLV, could be incorrectly marked as insecure instead of secure leading to negative proofs failing. This was a unintended outcome from change 2890. [RT# 21392] @@ -783,7 +1059,7 @@ h [RT #20710] 2812. [bug] Make sure updates can't result in a zone with - NSEC-only keys and NSEC3 records. [RT 20748] + NSEC-only keys and NSEC3 records. [RT #20748] 2811. [cleanup] Add "rndc sign" to list of commands in rndc usage output. [RT #20733] @@ -864,7 +1140,7 @@ h 2790. [bug] Handle DS queries to stub zones. [RT #20440] -2789. [bug] Fixed an INSIST in dispatch.c [RT #20576] +2789. [bug] Fixed an INSIST in dispatch.c [RT #20576] 2788. [bug] dnssec-signzone could sign with keys that were not requested [RT #20625] @@ -1760,7 +2036,7 @@ h 2529. [cleanup] Upgrade libtool to silence complaints from recent version of autoconf. [RT #18657] -2528. [cleanup] Silence spurious configure warning about +2528. [cleanup] Silence spurious configure warning about --datarootdir [RT #19096] 2527. [placeholder] @@ -2045,13 +2321,13 @@ h 2441. [bug] isc_radix_insert() could copy radix tree nodes incompletely. [RT #18573] -2440. [bug] named-checkconf used an incorrect test to determine +2440. [bug] named-checkconf used an incorrect test to determine if an ACL was set to none. -2439. [bug] Potential NULL dereference in dns_acl_isanyornone(). +2439. [bug] Potential NULL dereference in dns_acl_isanyornone(). [RT #18559] -2438. [bug] Timeouts could be logged incorrectly under win32. +2438. [bug] Timeouts could be logged incorrectly under win32. 2437. [bug] Sockets could be closed too early, leading to inconsistent states in the socket module. [RT #18298] @@ -2065,7 +2341,7 @@ h 2433. [tuning] Set initial timeout to 800ms. -2432. [bug] More Windows socket handling improvements. Stop +2432. [bug] More Windows socket handling improvements. Stop using I/O events and use IO Completion Ports throughout. Rewrite the receive path logic to make it easier to support multiple simultaneous @@ -2100,7 +2376,7 @@ h epoll and /dev/poll to be selected at compile time. [RT #18277] -2423. [security] Randomize server selection on queries, so as to +2423. [security] Randomize server selection on queries, so as to make forgery a little more difficult. Instead of always preferring the server with the lowest RTT, pick a server with RTT within the same 128 @@ -2114,7 +2390,7 @@ h Use caution: this option may not work for some operating systems without rebuilding named. -2420. [bug] Windows socket handling cleanup. Let the io +2420. [bug] Windows socket handling cleanup. Let the io completion event send out canceled read/write done events, which keeps us from writing to memory we no longer have ownership of. Add debugging @@ -2436,8 +2712,8 @@ h 2316. [port] Missing #include in lib/dns/gssapictx.c. [RT #17513] -2315. [bug] Used incorrect address family for mapped IPv4 - addresses in acl.c. [RT #17519] +2315. [bug] Used incorrect address family for mapped IPv4 + addresses in acl.c. [RT #17519] 2314. [bug] Uninitialized memory use on error path in bin/named/lwdnoop.c. [RT #17476] @@ -2448,14 +2724,14 @@ h 2312. [cleanup] Silence Coverity warning in lib/isc/unix/socket.c. [RT #17458] -2311. [bug] IPv6 addresses could match IPv4 ACL entries and - vice versa. [RT #17462] +2311. [bug] IPv6 addresses could match IPv4 ACL entries and + vice versa. [RT #17462] 2310. [bug] dig, host, nslookup: flush stdout before emitting debug/fatal messages. [RT #17501] -2309. [cleanup] Fix Coverity warnings in lib/dns/acl.c and iptable.c. - [RT #17455] +2309. [cleanup] Fix Coverity warnings in lib/dns/acl.c and iptable.c. + [RT #17455] 2308. [cleanup] Silence Coverity warning in bin/named/controlconf.c. [RT #17495] @@ -2507,7 +2783,7 @@ h 2292. [bug] Log if the working directory is not writable. [RT #17312] -2291. [bug] PR_SET_DUMPABLE may be set too late. Also report +2291. [bug] PR_SET_DUMPABLE may be set too late. Also report failure to set PR_SET_DUMPABLE. [RT #17312] 2290. [bug] Let AD in the query signal that the client wants AD @@ -2545,7 +2821,7 @@ h 2280. [func] Allow the experimental http server to be reached over IPv6 as well as IPv4. [RT #17332] -2279. [bug] Use setsockopt(SO_NOSIGPIPE), when available, +2279. [bug] Use setsockopt(SO_NOSIGPIPE), when available, to protect applications from receiving spurious SIGPIPE signals when using the resolver. @@ -2580,9 +2856,9 @@ h --- 9.5.0b1 released --- -2267. [bug] Radix tree node_num value could be set incorrectly, - causing positive ACL matches to look like negative - ones. [RT #17311] +2267. [bug] Radix tree node_num value could be set incorrectly, + causing positive ACL matches to look like negative + ones. [RT #17311] 2266. [bug] client.c:get_clientmctx() returned the same mctx once the pool of mctx's was filled. [RT #17218] @@ -2598,7 +2874,7 @@ h 2262. [bug] Error status from all but the last view could be lost. [RT #17292] -2261. [bug] Fix memory leak with "any" and "none" ACLs [RT #17272] +2261. [bug] Fix memory leak with "any" and "none" ACLs [RT #17272] 2260. [bug] Reported wrong clients-per-query when increasing the value. [RT #17236] Modified: user/attilio/vmcontention/contrib/bind9/COPYRIGHT ============================================================================== --- user/attilio/vmcontention/contrib/bind9/COPYRIGHT Tue Sep 6 16:37:02 2011 (r225424) +++ user/attilio/vmcontention/contrib/bind9/COPYRIGHT Tue Sep 6 17:21:39 2011 (r225425) @@ -13,9 +13,15 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -$Id: COPYRIGHT,v 1.17 2011-01-04 23:47:13 tbox Exp $ +$Id: COPYRIGHT,v 1.17.14.1 2011-02-22 06:34:47 marka Exp $ -Portions Copyright (C) 1996-2001 Nominum, Inc. + Portions of this code release fall under one or more of the + following Copyright notices. Please see individual source + files for details. + + For binary releases also see: OpenSSL-LICENSE. + +Copyright (C) 1996-2001 Nominum, Inc. Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above @@ -28,3 +34,485 @@ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + ----------------------------------------------------------------------------- + +Copyright (C) 1995-2000 by Network Associates, Inc. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND ISC AND NETWORK ASSOCIATES DISCLAIMS +ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE +FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + ----------------------------------------------------------------------------- + +Copyright (C) 2002 Stichting NLnet, Netherlands, stichting@nlnet.nl. + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the +above copyright notice and this permission notice appear in all +copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND STICHTING NLNET +DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL +STICHTING NLNET BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE +USE OR PERFORMANCE OF THIS SOFTWARE. + +The development of Dynamically Loadable Zones (DLZ) for Bind 9 was +conceived and contributed by Rob Butler. + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the +above copyright notice and this permission notice appear in all +copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND ROB BUTLER +DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL +ROB BUTLER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE +USE OR PERFORMANCE OF THIS SOFTWARE. + + ----------------------------------------------------------------------------- + +Copyright (c) 1987, 1990, 1993, 1994 + The Regents of the University of California. 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. +3. All advertising materials mentioning features or use of this software + must display the following acknowledgement: + This product includes software developed by the University of + California, Berkeley and its contributors. +4. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. + + ----------------------------------------------------------------------------- + +Copyright (C) The Internet Society 2005. This version of +this module is part of RFC 4178; see the RFC itself for +full legal notices. + +(The above copyright notice is per RFC 3978 5.6 (a), q.v.) + + ----------------------------------------------------------------------------- + +Copyright (c) 2004 Masarykova universita +(Masaryk University, Brno, Czech Republic) +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. + +3. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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. + + ----------------------------------------------------------------------------- + +Copyright (c) 1997 - 2003 Kungliga Tekniska Högskolan +(Royal Institute of Technology, Stockholm, Sweden). +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. + +3. Neither the name of the Institute nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE INSTITUTE 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 INSTITUTE 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. + + ----------------------------------------------------------------------------- + +Copyright (c) 1998 Doug Rabson +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. + + ----------------------------------------------------------------------------- + +Copyright ((c)) 2002, Rice University +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * 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. + + * Neither the name of Rice University (RICE) nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + +This software is provided by RICE and the contributors on an "as is" +basis, without any representations or warranties of any kind, express +or implied including, but not limited to, representations or +warranties of non-infringement, merchantability or fitness for a +particular purpose. In no event shall RICE 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. + + ----------------------------------------------------------------------------- + +Copyright (c) 1993 by Digital Equipment Corporation. + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies, and that +the name of Digital Equipment Corporation not be used in advertising or +publicity pertaining to distribution of the document or software without +specific, written prior permission. + +THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT +CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + + ----------------------------------------------------------------------------- + +Copyright 2000 Aaron D. Gifford. 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. +3. Neither the name of the copyright holder nor the names of contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) AND CONTRIBUTOR(S) ``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(S) OR CONTRIBUTOR(S) 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. + + ----------------------------------------------------------------------------- + +Copyright (c) 1998 Doug Rabson. +Copyright (c) 2001 Jake Burkholder. +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. + + ----------------------------------------------------------------------------- + +Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. +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. +3. Neither the name of the project nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE PROJECT 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 PROJECT 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. + + ----------------------------------------------------------------------------- + +Copyright (c) 1999-2000 by Nortel Networks Corporation + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND NORTEL NETWORKS DISCLAIMS +ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NORTEL NETWORKS +BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + + ----------------------------------------------------------------------------- + +Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved. + +By using this file, you agree to the terms and conditions set forth bellow. + + LICENSE TERMS AND CONDITIONS + +The following License Terms and Conditions apply, unless a different +license is obtained from Japan Network Information Center ("JPNIC"), +a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, +Chiyoda-ku, Tokyo 101-0047, Japan. + +1. Use, Modification and Redistribution (including distribution of any + modified or derived work) in source and/or binary forms is permitted + under this License Terms and Conditions. + +2. Redistribution of source code must retain the copyright notices as they + appear in each source code file, this License Terms and Conditions. + +3. Redistribution in binary form must reproduce the Copyright Notice, + this License Terms and Conditions, in the documentation and/or other + materials provided with the distribution. For the purposes of binary + distribution the "Copyright Notice" refers to the following language: + "Copyright (c) 2000-2002 Japan Network Information Center. All rights + reserved." + +4. The name of JPNIC may not be used to endorse or promote products + derived from this Software without specific prior written approval of + JPNIC. + +5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC + "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 JPNIC 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 DAMAGES. + + ----------------------------------------------------------------------------- + +Copyright (C) 2004 Nominet, Ltd. + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND NOMINET DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + + ----------------------------------------------------------------------------- + +Portions Copyright RSA Security Inc. + +License to copy and use this software is granted provided that it is +identified as "RSA Security Inc. PKCS #11 Cryptographic Token Interface +(Cryptoki)" in all material mentioning or referencing this software. + +License is also granted to make and use derivative works provided that +such works are identified as "derived from the RSA Security Inc. PKCS #11 +Cryptographic Token Interface (Cryptoki)" in all material mentioning or +referencing the derived work. + +RSA Security Inc. makes no representations concerning either the +merchantability of this software or the suitability of this software for +any particular purpose. It is provided "as is" without express or implied +warranty of any kind. + + ----------------------------------------------------------------------------- + +Copyright (c) 1996, David Mazieres +Copyright (c) 2008, Damien Miller + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Wed Sep 7 07:24:47 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16516106564A; Wed, 7 Sep 2011 07:24:47 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 05A348FC0A; Wed, 7 Sep 2011 07:24:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p877Oki2020595; Wed, 7 Sep 2011 07:24:46 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p877OkkZ020593; Wed, 7 Sep 2011 07:24:46 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201109070724.p877OkkZ020593@svn.freebsd.org> From: Adrian Chadd Date: Wed, 7 Sep 2011 07:24:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225432 - user/adrian/if_ath_tx/sys/dev/ath X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Sep 2011 07:24:47 -0000 Author: adrian Date: Wed Sep 7 07:24:46 2011 New Revision: 225432 URL: http://svn.freebsd.org/changeset/base/225432 Log: Correct the retry bit handling during software TX retransmission. * only update the bit if retries == 0; * if the retry bit is set, resync the descriptor Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c Wed Sep 7 03:00:58 2011 (r225431) +++ user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c Wed Sep 7 07:24:46 2011 (r225432) @@ -2533,11 +2533,16 @@ ath_tx_set_retry(struct ath_softc *sc, s { struct ieee80211_frame *wh; + wh = mtod(bf->bf_m, struct ieee80211_frame *); + /* Only update/resync if needed */ + if (bf->bf_state.bfs_isretried == 0) { + wh->i_fc[1] |= IEEE80211_FC1_RETRY; + bus_dmamap_sync(sc->sc_dmat, bf->bf_dmamap, + BUS_DMASYNC_PREWRITE); + } sc->sc_stats.ast_tx_swretries++; bf->bf_state.bfs_isretried = 1; bf->bf_state.bfs_retries ++; - wh = mtod(bf->bf_m, struct ieee80211_frame *); - wh->i_fc[1] |= IEEE80211_FC1_RETRY; } static struct ath_buf * From owner-svn-src-user@FreeBSD.ORG Wed Sep 7 12:53:19 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D919106566C; Wed, 7 Sep 2011 12:53:19 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E69698FC08; Wed, 7 Sep 2011 12:53:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p87CrIcc039408; Wed, 7 Sep 2011 12:53:18 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p87CrI3a039403; Wed, 7 Sep 2011 12:53:18 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201109071253.p87CrI3a039403@svn.freebsd.org> From: Gabor Kovesdan Date: Wed, 7 Sep 2011 12:53:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225434 - in user/gabor/tre-integration: contrib/tre/lib include X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Sep 2011 12:53:19 -0000 Author: gabor Date: Wed Sep 7 12:53:18 2011 New Revision: 225434 URL: http://svn.freebsd.org/changeset/base/225434 Log: - Make the heuristic code loosly coupled to the fast matcher by providing properly escaped patterns instead of using an internal flag - Add some struct fields for escaped dots, forgotten in a previous commit Modified: user/gabor/tre-integration/contrib/tre/lib/tre-fastmatch.c user/gabor/tre-integration/contrib/tre/lib/tre-heuristic.c user/gabor/tre-integration/include/fastmatch.h user/gabor/tre-integration/include/regex.h Modified: user/gabor/tre-integration/contrib/tre/lib/tre-fastmatch.c ============================================================================== --- user/gabor/tre-integration/contrib/tre/lib/tre-fastmatch.c Wed Sep 7 07:52:45 2011 (r225433) +++ user/gabor/tre-integration/contrib/tre/lib/tre-fastmatch.c Wed Sep 7 12:53:18 2011 (r225434) @@ -263,6 +263,15 @@ static int fastcmp(const void *, const b } \ } +#ifdef TRE_DEBUG +#define DPRINT_BMGS(len, fmt_str, sh) \ + for (int i = 0; i < len; i++) \ + DPRINT((fmt_str, i, sh[i])); +#else +#define DPRINT_BMGS(len, fmt_str, sh) \ + do { } while(/*CONSTCOND*/0) +#endif + /* * Fills in the good suffix table for SB/MB strings. */ @@ -276,6 +285,7 @@ static int fastcmp(const void *, const b fg->sbmGs[0] = 1; \ else \ _FILL_BMGS(fg->sbmGs, fg->pattern, fg->len, false); \ + DPRINT_BMGS(fg->len, "GS shift for pos %d is %d\n", fg->sbmGs); \ } /* @@ -291,6 +301,8 @@ static int fastcmp(const void *, const b fg->bmGs[0] = 1; \ else \ _FILL_BMGS(fg->bmGs, fg->wpattern, fg->wlen, true); \ + DPRINT_BMGS(fg->wlen, "GS shift (wide) for pos %d is %d\n", \ + fg->bmGs); \ } #define _FILL_BMGS(arr, pat, plen, wide) \ @@ -496,121 +508,99 @@ tre_compile_fast(fastmatch_t *fg, const continue; \ } while (0) - /* - * Used for heuristic, only beginning ^, trailing $ and . are treated - * as special. - */ - if (cflags & _REG_HEUR) + for (int i = 0; i < n; i++) { - for (int i = 0; i < n; i++) - switch (pat[i]) - { - case TRE_CHAR('.'): - fg->hasdot = i; + switch (pat[i]) + { + case TRE_CHAR('\\'): + if (escaped) STORE_CHAR; - break; - case TRE_CHAR('$'): - if (i == n - 1) - fg->eol = true; - else - STORE_CHAR; - break; - default: + else + escaped = true; + continue; + case TRE_CHAR('['): + if (escaped) STORE_CHAR; - } - } - else - for (int i = 0; i < n; i++) - { - switch (pat[i]) - { - case TRE_CHAR('\\'): - if (escaped) - STORE_CHAR; - else - escaped = true; - break; - case TRE_CHAR('['): - if (escaped) - STORE_CHAR; - else - goto badpat; - break; - case TRE_CHAR('*'): - if (escaped || (!(cflags & REG_EXTENDED) && (i == 0))) - STORE_CHAR; - else - goto badpat; - break; - case TRE_CHAR('+'): - case TRE_CHAR('?'): - if ((cflags & REG_EXTENDED) && (i == 0)) - continue; - else if ((cflags & REG_EXTENDED) ^ !escaped) - STORE_CHAR; - else - goto badpat; - case TRE_CHAR('.'): - if (escaped) - { - if (!_escmap) - _escmap = xmalloc(n * sizeof(bool)); - if (!_escmap) - { - xfree(tmp); - return REG_ESPACE; - } - _escmap[i] = true; - STORE_CHAR; - } - else - { - fg->hasdot = i; - STORE_CHAR; - } - break; - case TRE_CHAR('^'): + else + goto badpat; + continue; + case TRE_CHAR('*'): + if (escaped || (!(cflags & REG_EXTENDED) && (i == 0))) STORE_CHAR; - break; - case TRE_CHAR('$'): - if (!escaped && (i == n - 1)) - fg->eol = true; - else - STORE_CHAR; - break; - case TRE_CHAR('('): - if ((cflags & REG_EXTENDED) ^ escaped) - goto badpat; - else - STORE_CHAR; - break; - case TRE_CHAR('{'): - if (escaped && (i == 0)) - STORE_CHAR; - else if (!(cflags & REG_EXTENDED) && (i == 0)) - STORE_CHAR; - else if ((cflags & REG_EXTENDED) && (i == 0)) - continue; - else - goto badpat; - break; - case TRE_CHAR('|'): - if ((cflags & REG_EXTENDED) ^ (!escaped)) - goto badpat; - else - STORE_CHAR; - break; - default: - if (escaped) - goto badpat; - else + else + goto badpat; + continue; + case TRE_CHAR('+'): + case TRE_CHAR('?'): + if ((cflags & REG_EXTENDED) && (i == 0)) + continue; + else if ((cflags & REG_EXTENDED) ^ !escaped) + STORE_CHAR; + else + goto badpat; + continue; + case TRE_CHAR('.'): + if (escaped) + { + if (!_escmap) + _escmap = xmalloc(n * sizeof(bool)); + if (!_escmap) + { + xfree(tmp); + return REG_ESPACE; + } + _escmap[i] = true; + STORE_CHAR; + } + else + { + fg->hasdot = i; STORE_CHAR; - } - continue; + } + continue; + case TRE_CHAR('^'): + STORE_CHAR; + continue; + case TRE_CHAR('$'): + if (!escaped && (i == n - 1)) + fg->eol = true; + else + STORE_CHAR; + continue; + case TRE_CHAR('('): + if ((cflags & REG_EXTENDED) ^ escaped) + goto badpat; + else + STORE_CHAR; + continue; + case TRE_CHAR('{'): + if (!(cflags & REG_EXTENDED) ^ escaped) + STORE_CHAR; + else if (!(cflags & REG_EXTENDED) && (i == 0)) + STORE_CHAR; + else if ((cflags & REG_EXTENDED) && (i == 0)) + continue; + else + goto badpat; + continue; + case TRE_CHAR('|'): + if ((cflags & REG_EXTENDED) ^ escaped) + goto badpat; + else + STORE_CHAR; + continue; + default: + if (escaped) + goto badpat; + else + STORE_CHAR; + continue; + } + continue; badpat: - xfree(tmp); - return REG_BADPAT; - } + xfree(tmp); + return REG_BADPAT; + } /* * The pattern has been processed and copied to tmp as a literal string Modified: user/gabor/tre-integration/contrib/tre/lib/tre-heuristic.c ============================================================================== --- user/gabor/tre-integration/contrib/tre/lib/tre-heuristic.c Wed Sep 7 07:52:45 2011 (r225433) +++ user/gabor/tre-integration/contrib/tre/lib/tre-heuristic.c Wed Sep 7 12:53:18 2011 (r225434) @@ -127,11 +127,14 @@ goto end_segment; \ } while (0) -#define STORE_CHAR \ +#define STORE_CHAR(esc) \ do \ { \ - escaped = false; \ + if (esc) \ + heur[pos++] = TRE_CHAR('\\'); \ heur[pos++] = regex[i]; \ + escaped = false; \ + continue; \ } while (0) @@ -178,11 +181,13 @@ tre_compile_heur(heur_t *h, const tre_ch * bracket is escaped. */ case TRE_CHAR('['): - PARSE_BRACKETS; if (escaped) - STORE_CHAR; + STORE_CHAR(true); else - heur[pos++] = TRE_CHAR('.'); + { + PARSE_BRACKETS; + heur[pos++] = TRE_CHAR('.'); + } continue; /* @@ -192,9 +197,9 @@ tre_compile_heur(heur_t *h, const tre_ch */ case TRE_CHAR('{'): if (escaped && (i == 1)) - STORE_CHAR; + STORE_CHAR(true); else if ((i == 0) && !(cflags & REG_EXTENDED)) - STORE_CHAR; + STORE_CHAR(true); else if ((i == 0) && (cflags & REG_EXTENDED)) continue; @@ -205,7 +210,7 @@ tre_compile_heur(heur_t *h, const tre_ch END_SEGMENT; } else - STORE_CHAR; + STORE_CHAR(cflags & REG_EXTENDED); continue; /* @@ -213,11 +218,13 @@ tre_compile_heur(heur_t *h, const tre_ch * otherwise treated as a normal character. */ case TRE_CHAR('('): - PARSE_UNIT('(', ')'); if (escaped ^ (cflags & REG_EXTENDED)) - END_SEGMENT; + { + PARSE_UNIT('(', ')'); + END_SEGMENT; + } else - STORE_CHAR; + STORE_CHAR(cflags & REG_EXTENDED); continue; /* @@ -227,9 +234,9 @@ tre_compile_heur(heur_t *h, const tre_ch */ case TRE_CHAR('\\'): if (escaped) - STORE_CHAR; + STORE_CHAR(true); else - escaped = !escaped; + escaped = true; continue; /* @@ -240,7 +247,7 @@ tre_compile_heur(heur_t *h, const tre_ch */ case TRE_CHAR('*'): if (escaped || (!(cflags & REG_EXTENDED) && (i == 0))) - STORE_CHAR; + STORE_CHAR(true); else if ((i != 0)) { pos--; @@ -262,7 +269,7 @@ tre_compile_heur(heur_t *h, const tre_ch else if ((cflags & REG_EXTENDED) ^ escaped) END_SEGMENT; else - STORE_CHAR; + STORE_CHAR(cflags & REG_EXTENDED); continue; /* @@ -281,7 +288,7 @@ tre_compile_heur(heur_t *h, const tre_ch END_SEGMENT; } else - STORE_CHAR; + STORE_CHAR(true); continue; /* @@ -296,7 +303,7 @@ tre_compile_heur(heur_t *h, const tre_ch else if (!(cflags & REG_EXTENDED) && escaped) END_SEGMENT; else - STORE_CHAR; + STORE_CHAR(cflags & REG_EXTENDED); continue; /* @@ -304,10 +311,7 @@ tre_compile_heur(heur_t *h, const tre_ch * cannot handle it. */ case TRE_CHAR('.'): - if (escaped) - END_SEGMENT; - else - STORE_CHAR; + STORE_CHAR(escaped); continue; /* @@ -319,7 +323,7 @@ tre_compile_heur(heur_t *h, const tre_ch if (escaped) END_SEGMENT; else - STORE_CHAR; + STORE_CHAR(false); continue; } } @@ -352,7 +356,7 @@ end_segment: goto space1; } - ret = tre_compile_fast(h->start, heur, pos, _REG_HEUR); + ret = tre_compile_fast(h->start, heur, pos, 0); if (ret != REG_OK) { errcode = REG_BADPAT; @@ -386,7 +390,7 @@ end_segment: goto space2; } - ret = tre_compile_fast(h->end, heur, pos, _REG_HEUR); + ret = tre_compile_fast(h->end, heur, pos, 0); if (ret != REG_OK) { xfree(h->end); Modified: user/gabor/tre-integration/include/fastmatch.h ============================================================================== --- user/gabor/tre-integration/include/fastmatch.h Wed Sep 7 07:52:45 2011 (r225433) +++ user/gabor/tre-integration/include/fastmatch.h Wed Sep 7 12:53:18 2011 (r225434) @@ -12,10 +12,12 @@ typedef struct { size_t wlen; size_t len; wchar_t *wpattern; + bool *wescmap; int hasdot; int qsBc[UCHAR_MAX + 1]; int *bmGs; char *pattern; + bool *escmap; int defBc; void *qsBc_table; int *sbmGs; Modified: user/gabor/tre-integration/include/regex.h ============================================================================== --- user/gabor/tre-integration/include/regex.h Wed Sep 7 07:52:45 2011 (r225433) +++ user/gabor/tre-integration/include/regex.h Wed Sep 7 12:53:18 2011 (r225434) @@ -110,7 +110,6 @@ typedef enum { #define REG_PEND (REG_UNGREEDY << 1) #define REG_GNU (REG_PEND << 1) #define REG_WORD (REG_GNU << 1) -#define _REG_HEUR (REG_WORD << 1) /* POSIX tre_regexec() flags. */ #define REG_NOTBOL 1 From owner-svn-src-user@FreeBSD.ORG Wed Sep 7 13:01:26 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE298106566B; Wed, 7 Sep 2011 13:01:26 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DD52A8FC13; Wed, 7 Sep 2011 13:01:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p87D1QGB039701; Wed, 7 Sep 2011 13:01:26 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p87D1Q5r039697; Wed, 7 Sep 2011 13:01:26 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201109071301.p87D1Q5r039697@svn.freebsd.org> From: Gabor Kovesdan Date: Wed, 7 Sep 2011 13:01:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225435 - user/gabor/grep/trunk/regex X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Sep 2011 13:01:27 -0000 Author: gabor Date: Wed Sep 7 13:01:26 2011 New Revision: 225435 URL: http://svn.freebsd.org/changeset/base/225435 Log: - Merge some fixes from TRE - Silence some warnings Modified: user/gabor/grep/trunk/regex/fastmatch.h user/gabor/grep/trunk/regex/hashtable.c user/gabor/grep/trunk/regex/tre-fastmatch.c Modified: user/gabor/grep/trunk/regex/fastmatch.h ============================================================================== --- user/gabor/grep/trunk/regex/fastmatch.h Wed Sep 7 12:53:18 2011 (r225434) +++ user/gabor/grep/trunk/regex/fastmatch.h Wed Sep 7 13:01:26 2011 (r225435) @@ -12,10 +12,12 @@ typedef struct { size_t wlen; size_t len; wchar_t *wpattern; + bool *wescmap; int hasdot; int qsBc[UCHAR_MAX + 1]; int *bmGs; char *pattern; + bool *escmap; int defBc; void *qsBc_table; int *sbmGs; Modified: user/gabor/grep/trunk/regex/hashtable.c ============================================================================== --- user/gabor/grep/trunk/regex/hashtable.c Wed Sep 7 12:53:18 2011 (r225434) +++ user/gabor/grep/trunk/regex/hashtable.c Wed Sep 7 13:01:26 2011 (r225435) @@ -27,6 +27,7 @@ #include "glue.h" #include +#include #include #include @@ -60,9 +61,8 @@ hashtable { hashtable *tbl; - DPRINT(("hashtable_init: table_size %lu, key_size %lu, value_size %lu\n", - (unsigned long)table_size, (unsigned long)key_size, - (unsigned long)value_size)); + DPRINT(("hashtable_init: table_size %zu, key_size %zu, value_size %zu\n", + table_size, key_size, value_size)); tbl = malloc(sizeof(hashtable)); if (tbl == NULL) @@ -111,7 +111,7 @@ hashtable_put(hashtable *tbl, const void } hash = hash32_buf(key, tbl->key_size, hash) % tbl->table_size; - DPRINT(("hashtable_put: calculated hash %lu\n", hash)); + DPRINT(("hashtable_put: calculated hash %" PRIu32 "\n", hash)); /* * On hash collision entries are inserted at the next free space, @@ -125,15 +125,15 @@ hashtable_put(hashtable *tbl, const void else if (memcmp(tbl->entries[hash]->key, key, tbl->key_size) == 0) { memcpy(tbl->entries[hash]->value, value, tbl->value_size); - DPRINT(("hashtable_put: effective location is %lu, " - "entry updated\n", hash)); + DPRINT(("hashtable_put: effective location is %" PRIu32 + ", entry updated\n", hash)); return (HASH_UPDATED); } if (++hash == tbl->table_size) hash = 0; } - DPRINT(("hashtable_put: effective location is %lu\n", hash)); + DPRINT(("hashtable_put: effective location is %" PRIu32 "\n", hash)); tbl->entries[hash] = malloc(sizeof(hashtable_entry)); if (tbl->entries[hash] == NULL) @@ -186,7 +186,7 @@ static hashtable_entry return (NULL); else if (memcmp(key, tbl->entries[hash]->key, tbl->key_size) == 0) { - DPRINT(("hashtable_lookup: entry found at location %lu\n", hash)); + DPRINT(("hashtable_lookup: entry found at location %" PRIu32 "\n", hash)); return (&tbl->entries[hash]); } Modified: user/gabor/grep/trunk/regex/tre-fastmatch.c ============================================================================== --- user/gabor/grep/trunk/regex/tre-fastmatch.c Wed Sep 7 12:53:18 2011 (r225434) +++ user/gabor/grep/trunk/regex/tre-fastmatch.c Wed Sep 7 13:01:26 2011 (r225435) @@ -42,7 +42,7 @@ #include "tre-fastmatch.h" #include "xmalloc.h" -static int fastcmp(const void *, const void *, size_t, +static int fastcmp(const void *, const bool *, const void *, size_t, tre_str_type_t, bool, bool); #define FAIL_COMP(errcode) \ @@ -102,11 +102,13 @@ static int fastcmp(const void *, const v switch (type) \ { \ case STR_WIDE: \ - mismatch = fastcmp(fg->wpattern, startptr, fg->wlen, type, \ + mismatch = fastcmp(fg->wpattern, fg->wescmap, startptr, \ + fg->wlen, type, \ fg->icase, fg->newline); \ break; \ default: \ - mismatch = fastcmp(fg->pattern, startptr, fg->len, type, \ + mismatch = fastcmp(fg->pattern, fg->escmap, startptr, \ + fg->len, type, \ fg->icase, fg->newline); \ } \ @@ -206,15 +208,16 @@ static int fastcmp(const void *, const v fg->qsBc[i] = fg->len - fg->hasdot; \ for (int i = fg->hasdot + 1; i < fg->len; i++) \ { \ - fg->qsBc[fg->pattern[i]] = fg->len - i; \ - DPRINT(("BC shift for char %c is %d\n", fg->pattern[i], \ + fg->qsBc[(unsigned char)fg->pattern[i]] = fg->len - i; \ + DPRINT(("BC shift for char %c is %zu\n", fg->pattern[i], \ fg->len - i)); \ if (fg->icase) \ { \ - char c = islower(fg->pattern[i]) ? toupper(fg->pattern[i]) \ - : tolower(fg->pattern[i]); \ - fg->qsBc[c] = fg->len - i; \ - DPRINT(("BC shift for char %c is %d\n", c, fg->len - i)); \ + char c = islower((unsigned char)fg->pattern[i]) ? \ + toupper((unsigned char)fg->pattern[i]) : \ + tolower((unsigned char)fg->pattern[i]); \ + fg->qsBc[(unsigned char)c] = fg->len - i; \ + DPRINT(("BC shift for char %c is %zu\n", c, fg->len - i)); \ } \ } @@ -244,7 +247,7 @@ static int fastcmp(const void *, const v r = hashtable_put(fg->qsBc_table, &fg->wpattern[i], &k); \ if ((r == HASH_FAIL) || (r == HASH_FULL)) \ FAIL_COMP(REG_ESPACE); \ - DPRINT(("BC shift for wide char %lc is %d\n", fg->wpattern[i], \ + DPRINT(("BC shift for wide char %lc is %zu\n", fg->wpattern[i], \ fg->wlen - i)); \ if (fg->icase) \ { \ @@ -253,11 +256,20 @@ static int fastcmp(const void *, const v r = hashtable_put(fg->qsBc_table, &wc, &k); \ if ((r == HASH_FAIL) || (r == HASH_FULL)) \ FAIL_COMP(REG_ESPACE); \ - DPRINT(("BC shift for wide char %lc is %d\n", wc, \ + DPRINT(("BC shift for wide char %lc is %zu\n", wc, \ fg->wlen - i)); \ } \ } +#ifdef _GREP_DEBUG +#define DPRINT_BMGS(len, fmt_str, sh) \ + for (int i = 0; i < len; i++) \ + DPRINT((fmt_str, i, sh[i])); +#else +#define DPRINT_BMGS(len, fmt_str, sh) \ + do { } while(/*CONSTCOND*/0) +#endif + /* * Fills in the good suffix table for SB/MB strings. */ @@ -271,6 +283,7 @@ static int fastcmp(const void *, const v fg->sbmGs[0] = 1; \ else \ _FILL_BMGS(fg->sbmGs, fg->pattern, fg->len, false); \ + DPRINT_BMGS(fg->len, "GS shift for pos %d is %d\n", fg->sbmGs); \ } /* @@ -286,6 +299,8 @@ static int fastcmp(const void *, const v fg->bmGs[0] = 1; \ else \ _FILL_BMGS(fg->bmGs, fg->wpattern, fg->wlen, true); \ + DPRINT_BMGS(fg->wlen, "GS shift (wide) for pos %d is %d\n", \ + fg->bmGs); \ } #define _FILL_BMGS(arr, pat, plen, wide) \ @@ -428,7 +443,7 @@ tre_compile_literal(fastmatch_t *fg, con SAVE_PATTERN(pat, n, fg->pattern, fg->len); #endif - DPRINT(("tre_compile_literal: pattern: %s, len %u, icase: %c, word: %c, " + DPRINT(("tre_compile_literal: pattern: %s, len %zu, icase: %c, word: %c, " "newline %c\n", fg->pattern, fg->len, fg->icase ? 'y' : 'n', fg->word ? 'y' : 'n', fg->newline ? 'y' : 'n')); @@ -452,6 +467,7 @@ tre_compile_fast(fastmatch_t *fg, const tre_char_t *tmp; size_t pos = 0; bool escaped = false; + bool *_escmap = NULL; INIT_COMP; @@ -490,111 +506,101 @@ tre_compile_fast(fastmatch_t *fg, const continue; \ } while (0) - /* - * Used for heuristic, only beginning ^, trailing $ and . are treated - * as special. - */ - if (cflags & _REG_HEUR) + for (int i = 0; i < n; i++) { - for (int i = 0; i < n; i++) - switch (pat[i]) - { - case TRE_CHAR('.'): - fg->hasdot = i; + switch (pat[i]) + { + case TRE_CHAR('\\'): + if (escaped) STORE_CHAR; - break; - case TRE_CHAR('$'): - if (i == n - 1) - fg->eol = true; - else - STORE_CHAR; - break; - default: + else + escaped = true; + continue; + case TRE_CHAR('['): + if (escaped) STORE_CHAR; - } - } - else - for (int i = 0; i < n; i++) - { - switch (pat[i]) - { - case TRE_CHAR('\\'): - if (escaped) - STORE_CHAR; - else - escaped = true; - break; - case TRE_CHAR('['): - if (escaped) - STORE_CHAR; - else - goto badpat; - break; - case TRE_CHAR('*'): - if (escaped || (!(cflags & REG_EXTENDED) && (i == 0))) - STORE_CHAR; - else - goto badpat; - break; - case TRE_CHAR('+'): - case TRE_CHAR('?'): - if ((cflags & REG_EXTENDED) && (i == 0)) - continue; - else if ((cflags & REG_EXTENDED) ^ !escaped) - STORE_CHAR; - else - goto badpat; - case TRE_CHAR('.'): - if (escaped) - goto badpat; - else - { - fg->hasdot = true; - STORE_CHAR; - } - break; - case TRE_CHAR('^'): + else + goto badpat; + continue; + case TRE_CHAR('*'): + if (escaped || (!(cflags & REG_EXTENDED) && (i == 0))) STORE_CHAR; - break; - case TRE_CHAR('$'): - if (!escaped && (i == n - 1)) - fg->eol = true; - else - STORE_CHAR; - break; - case TRE_CHAR('('): - if ((cflags & REG_EXTENDED) ^ escaped) - goto badpat; - else - STORE_CHAR; - break; - case TRE_CHAR('{'): - if (escaped && (i == 0)) - STORE_CHAR; - else if (!(cflags & REG_EXTENDED) && (i == 0)) - STORE_CHAR; - else if ((cflags & REG_EXTENDED) && (i == 0)) - continue; - else - goto badpat; - break; - case TRE_CHAR('|'): - if ((cflags & REG_EXTENDED) ^ (!escaped)) - goto badpat; - else - STORE_CHAR; - break; - default: - if (escaped) - goto badpat; - else + else + goto badpat; + continue; + case TRE_CHAR('+'): + case TRE_CHAR('?'): + if ((cflags & REG_EXTENDED) && (i == 0)) + continue; + else if ((cflags & REG_EXTENDED) ^ !escaped) + STORE_CHAR; + else + goto badpat; + continue; + case TRE_CHAR('.'): + if (escaped) + { + if (!_escmap) + _escmap = xmalloc(n * sizeof(bool)); + if (!_escmap) + { + xfree(tmp); + return REG_ESPACE; + } + _escmap[i] = true; + STORE_CHAR; + } + else + { + fg->hasdot = i; STORE_CHAR; - } - continue; + } + continue; + case TRE_CHAR('^'): + STORE_CHAR; + continue; + case TRE_CHAR('$'): + if (!escaped && (i == n - 1)) + fg->eol = true; + else + STORE_CHAR; + continue; + case TRE_CHAR('('): + if ((cflags & REG_EXTENDED) ^ escaped) + goto badpat; + else + STORE_CHAR; + continue; + case TRE_CHAR('{'): + if (!(cflags & REG_EXTENDED) ^ escaped) + STORE_CHAR; + else if (!(cflags & REG_EXTENDED) && (i == 0)) + STORE_CHAR; + else if ((cflags & REG_EXTENDED) && (i == 0)) + continue; + else + goto badpat; + continue; + case TRE_CHAR('|'): + if ((cflags & REG_EXTENDED) ^ escaped) + goto badpat; + else + STORE_CHAR; + continue; + default: + if (escaped) + goto badpat; + else + STORE_CHAR; + continue; + } + continue; badpat: - xfree(tmp); - return REG_BADPAT; - } + xfree(tmp); + DPRINT(("tre_compile_fast: compilation of pattern failed, falling" + "back to NFA\n")); + return REG_BADPAT; + } /* * The pattern has been processed and copied to tmp as a literal string @@ -603,14 +609,38 @@ badpat: */ #ifdef TRE_WCHAR SAVE_PATTERN(tmp, pos, fg->wpattern, fg->wlen); + fg->wescmap = _escmap; STORE_MBS_PAT; + if (fg->wescmap != NULL) + { + bool escaped = false; + + fg->escmap = xmalloc(fg->len * sizeof(bool)); + if (!fg->escmap) + { + tre_free_fast(fg); + return REG_ESPACE; + } + + for (int i = 0; i < fg->len; i++) + if (fg->pattern[i] == '\\') + escaped = ! escaped; + else if (fg->pattern[i] == '.' && escaped) + { + fg->escmap[i] = true; + escaped = false; + } + else + escaped = false; + } #else SAVE_PATTERN(tmp, pos, fg->pattern, fg->len); + fg->escmap = _escmap; #endif xfree(tmp); - DPRINT(("tre_compile_fast: pattern: %s, len %u, bol %c, eol %c, " + DPRINT(("tre_compile_fast: pattern: %s, len %zu, bol %c, eol %c, " "icase: %c, word: %c, newline %c\n", fg->pattern, fg->len, fg->bol ? 'y' : 'n', fg->eol ? 'y' : 'n', fg->icase ? 'y' : 'n', fg->word ? 'y' : 'n', @@ -703,7 +733,7 @@ tre_match_fast(const fastmatch_t *fg, co const tre_char_t *str_wide = data; /* Calculate length if unspecified. */ - if (len == (unsigned)-1) + if (len == (size_t)-1) switch (type) { case STR_WIDE: @@ -822,10 +852,14 @@ tre_free_fast(fastmatch_t *fg) hashtable_free(fg->qsBc_table); if (!fg->hasdot) xfree(fg->bmGs); + if (fg->wescmap) + xfree(fg->wescmap); xfree(fg->wpattern); #endif if (!fg->hasdot) xfree(fg->sbmGs); + if (fg->escmap) + xfree(fg->escmap); xfree(fg->pattern); } @@ -835,7 +869,7 @@ tre_free_fast(fastmatch_t *fg) * REG_OK on success */ static inline int -fastcmp(const void *pat, const void *data, size_t len, +fastcmp(const void *pat, const bool *escmap, const void *data, size_t len, tre_str_type_t type, bool icase, bool newline) { const char *str_byte = data; @@ -851,7 +885,7 @@ fastcmp(const void *pat, const void *dat case STR_WIDE: /* Check dot */ - if (pat_wide[i] == TRE_CHAR('.') && + if (pat_wide[i] == TRE_CHAR('.') && (!escmap || !escmap[i]) && (!newline || (str_wide[i] != TRE_CHAR('\n')))) continue; @@ -862,7 +896,7 @@ fastcmp(const void *pat, const void *dat break; default: /* Check dot */ - if (pat_byte[i] == '.' && + if (pat_byte[i] == '.' && (!escmap || !escmap[i]) && (!newline || (str_byte[i] != '\n'))) continue; From owner-svn-src-user@FreeBSD.ORG Wed Sep 7 13:26:20 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5EEB106564A; Wed, 7 Sep 2011 13:26:20 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A5B3B8FC23; Wed, 7 Sep 2011 13:26:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p87DQKt7040488; Wed, 7 Sep 2011 13:26:20 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p87DQKeR040485; Wed, 7 Sep 2011 13:26:20 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201109071326.p87DQKeR040485@svn.freebsd.org> From: Gabor Kovesdan Date: Wed, 7 Sep 2011 13:26:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225436 - in user/gabor/grep/trunk: . regex X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Sep 2011 13:26:20 -0000 Author: gabor Date: Wed Sep 7 13:26:20 2011 New Revision: 225436 URL: http://svn.freebsd.org/changeset/base/225436 Log: - Fix some warnings Modified: user/gabor/grep/trunk/grep.c user/gabor/grep/trunk/regex/fastmatch.c Modified: user/gabor/grep/trunk/grep.c ============================================================================== --- user/gabor/grep/trunk/grep.c Wed Sep 7 13:01:26 2011 (r225435) +++ user/gabor/grep/trunk/grep.c Wed Sep 7 13:26:20 2011 (r225436) @@ -234,7 +234,7 @@ add_pattern(char *pat, size_t len) /* Check if we can do a shortcut */ if (len == 0) { matchall = true; - for (int i = 0; i < patterns; i++) { + for (unsigned int i = 0; i < patterns; i++) { free(pattern[i].pat); } pattern = grep_realloc(pattern, sizeof(struct pat)); Modified: user/gabor/grep/trunk/regex/fastmatch.c ============================================================================== --- user/gabor/grep/trunk/regex/fastmatch.c Wed Sep 7 13:01:26 2011 (r225435) +++ user/gabor/grep/trunk/regex/fastmatch.c Wed Sep 7 13:26:20 2011 (r225436) @@ -183,7 +183,9 @@ tre_fastfree(fastmatch_t *preg) size_t offset = pmatch[0].rm_so; \ int ret; \ \ - if ((len != (unsigned)-1) && (pmatch[0].rm_eo > len)) \ + if ((pmatch[0].rm_so < 0) || (pmatch[0].rm_eo < 0)) \ + return REG_NOMATCH; \ + if ((len != (unsigned)-1) && ((unsigned long)pmatch[0].rm_eo > len))\ return REG_NOMATCH; \ if ((long long)pmatch[0].rm_eo - pmatch[0].rm_so < 0) \ return REG_NOMATCH; \ From owner-svn-src-user@FreeBSD.ORG Wed Sep 7 14:04:51 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2C131065670; Wed, 7 Sep 2011 14:04:51 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C23868FC0C; Wed, 7 Sep 2011 14:04:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p87E4pOZ041957; Wed, 7 Sep 2011 14:04:51 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p87E4pfo041955; Wed, 7 Sep 2011 14:04:51 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201109071404.p87E4pfo041955@svn.freebsd.org> From: Gabor Kovesdan Date: Wed, 7 Sep 2011 14:04:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225437 - user/gabor/grep/trunk/regex X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Sep 2011 14:04:51 -0000 Author: gabor Date: Wed Sep 7 14:04:51 2011 New Revision: 225437 URL: http://svn.freebsd.org/changeset/base/225437 Log: - Correct BC shift Modified: user/gabor/grep/trunk/regex/tre-fastmatch.c Modified: user/gabor/grep/trunk/regex/tre-fastmatch.c ============================================================================== --- user/gabor/grep/trunk/regex/tre-fastmatch.c Wed Sep 7 13:26:20 2011 (r225436) +++ user/gabor/grep/trunk/regex/tre-fastmatch.c Wed Sep 7 14:04:51 2011 (r225437) @@ -142,7 +142,7 @@ static int fastcmp(const void *, const b mismatch -= u; \ v = fg->wlen - 1 - mismatch; \ r = hashtable_get(fg->qsBc_table, \ - &((tre_char_t *)startptr)[mismatch + 1], &bc); \ + &str_wide[j + fg->wlen], &bc); \ gs = fg->bmGs[mismatch]; \ } \ bc = (r == HASH_OK) ? bc : fg->defBc; \ @@ -158,7 +158,7 @@ static int fastcmp(const void *, const b v = fg->len - 1 - mismatch; \ gs = fg->sbmGs[mismatch]; \ } \ - bc = fg->qsBc[((unsigned char *)startptr)[mismatch + 1]]; \ + bc = fg->qsBc[((unsigned char *)str_byte)[j + fg->len]]; \ DPRINT(("tre_fast_match: mismatch on character %c, " \ "BC %d, GS %d\n", \ ((unsigned char *)startptr)[mismatch + 1], bc, gs)); \ From owner-svn-src-user@FreeBSD.ORG Wed Sep 7 14:20:36 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6DA221065677; Wed, 7 Sep 2011 14:20:36 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5DCE58FC18; Wed, 7 Sep 2011 14:20:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p87EKaWZ042570; Wed, 7 Sep 2011 14:20:36 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p87EKaAF042567; Wed, 7 Sep 2011 14:20:36 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201109071420.p87EKaAF042567@svn.freebsd.org> From: Gabor Kovesdan Date: Wed, 7 Sep 2011 14:20:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225438 - user/gabor/grep/trunk/regex X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Sep 2011 14:20:36 -0000 Author: gabor Date: Wed Sep 7 14:20:36 2011 New Revision: 225438 URL: http://svn.freebsd.org/changeset/base/225438 Log: - Fix some warnings Modified: user/gabor/grep/trunk/regex/fastmatch.h user/gabor/grep/trunk/regex/tre-fastmatch.c Modified: user/gabor/grep/trunk/regex/fastmatch.h ============================================================================== --- user/gabor/grep/trunk/regex/fastmatch.h Wed Sep 7 14:04:51 2011 (r225437) +++ user/gabor/grep/trunk/regex/fastmatch.h Wed Sep 7 14:20:36 2011 (r225438) @@ -13,7 +13,7 @@ typedef struct { size_t len; wchar_t *wpattern; bool *wescmap; - int hasdot; + unsigned int hasdot; int qsBc[UCHAR_MAX + 1]; int *bmGs; char *pattern; Modified: user/gabor/grep/trunk/regex/tre-fastmatch.c ============================================================================== --- user/gabor/grep/trunk/regex/tre-fastmatch.c Wed Sep 7 14:04:51 2011 (r225437) +++ user/gabor/grep/trunk/regex/tre-fastmatch.c Wed Sep 7 14:20:36 2011 (r225438) @@ -206,7 +206,7 @@ static int fastcmp(const void *, const b #define FILL_QSBC \ for (unsigned int i = 0; i <= UCHAR_MAX; i++) \ fg->qsBc[i] = fg->len - fg->hasdot; \ - for (int i = fg->hasdot + 1; i < fg->len; i++) \ + for (unsigned int i = fg->hasdot + 1; i < fg->len; i++) \ { \ fg->qsBc[(unsigned char)fg->pattern[i]] = fg->len - i; \ DPRINT(("BC shift for char %c is %zu\n", fg->pattern[i], \ From owner-svn-src-user@FreeBSD.ORG Wed Sep 7 14:37:52 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27573106566B; Wed, 7 Sep 2011 14:37:52 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F1D438FC0A; Wed, 7 Sep 2011 14:37:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p87EbpiX043184; Wed, 7 Sep 2011 14:37:51 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p87Ebpgk043181; Wed, 7 Sep 2011 14:37:51 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201109071437.p87Ebpgk043181@svn.freebsd.org> From: Gabor Kovesdan Date: Wed, 7 Sep 2011 14:37:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225439 - user/gabor/grep/trunk/regex X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Sep 2011 14:37:52 -0000 Author: gabor Date: Wed Sep 7 14:37:51 2011 New Revision: 225439 URL: http://svn.freebsd.org/changeset/base/225439 Log: - Fix warnings Modified: user/gabor/grep/trunk/regex/fastmatch.h user/gabor/grep/trunk/regex/tre-fastmatch.c Modified: user/gabor/grep/trunk/regex/fastmatch.h ============================================================================== --- user/gabor/grep/trunk/regex/fastmatch.h Wed Sep 7 14:20:36 2011 (r225438) +++ user/gabor/grep/trunk/regex/fastmatch.h Wed Sep 7 14:37:51 2011 (r225439) @@ -15,12 +15,12 @@ typedef struct { bool *wescmap; unsigned int hasdot; int qsBc[UCHAR_MAX + 1]; - int *bmGs; + unsigned int *bmGs; char *pattern; bool *escmap; int defBc; void *qsBc_table; - int *sbmGs; + unsigned int *sbmGs; const char *re_endp; /* flags */ Modified: user/gabor/grep/trunk/regex/tre-fastmatch.c ============================================================================== --- user/gabor/grep/trunk/regex/tre-fastmatch.c Wed Sep 7 14:20:36 2011 (r225438) +++ user/gabor/grep/trunk/regex/tre-fastmatch.c Wed Sep 7 14:37:51 2011 (r225439) @@ -315,7 +315,7 @@ static int fastcmp(const void *, const b wp = xmalloc(plen * sizeof(tre_char_t)); \ if (wp == NULL) \ return REG_ESPACE; \ - for (int i = 0; i < plen; i++) \ + for (unsigned int i = 0; i < plen; i++) \ wp[i] = towlower(pat[i]); \ _CALC_BMGS(arr, wp, plen); \ xfree(wp); \ @@ -330,7 +330,7 @@ static int fastcmp(const void *, const b p = xmalloc(plen); \ if (p == NULL) \ return REG_ESPACE; \ - for (int i = 0; i < plen; i++) \ + for (unsigned int i = 0; i < plen; i++) \ p[i] = tolower(pat[i]); \ _CALC_BMGS(arr, p, plen); \ xfree(p); \ @@ -365,15 +365,15 @@ static int fastcmp(const void *, const b } \ } \ \ - for (int i = 0; i < plen; i++) \ + for (unsigned int i = 0; i < plen; i++) \ arr[i] = plen; \ g = 0; \ for (int i = plen - 1; i >= 0; i--) \ if (suff[i] == i + 1) \ - for(; g < plen - 1 - i; g++) \ + for(; (unsigned long)g < plen - 1 - i; g++) \ if (arr[g] == plen) \ arr[g] = plen - 1 - i; \ - for (int i = 0; i <= plen - 2; i++) \ + for (unsigned int i = 0; i <= plen - 2; i++) \ arr[plen - 1 - suff[i]] = plen - 1 - i; \ \ xfree(suff); \ @@ -506,7 +506,7 @@ tre_compile_fast(fastmatch_t *fg, const continue; \ } while (0) - for (int i = 0; i < n; i++) + for (unsigned int i = 0; i < n; i++) { switch (pat[i]) { @@ -622,7 +622,7 @@ badpat: return REG_ESPACE; } - for (int i = 0; i < fg->len; i++) + for (unsigned int i = 0; i < fg->len; i++) if (fg->pattern[i] == '\\') escaped = ! escaped; else if (fg->pattern[i] == '.' && escaped) From owner-svn-src-user@FreeBSD.ORG Thu Sep 8 00:55:49 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C64E106566B; Thu, 8 Sep 2011 00:55:49 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F0B588FC0A; Thu, 8 Sep 2011 00:55:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p880tm9K062757; Thu, 8 Sep 2011 00:55:48 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p880tmls062755; Thu, 8 Sep 2011 00:55:48 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201109080055.p880tmls062755@svn.freebsd.org> From: Adrian Chadd Date: Thu, 8 Sep 2011 00:55:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225443 - user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Sep 2011 00:55:49 -0000 Author: adrian Date: Thu Sep 8 00:55:48 2011 New Revision: 225443 URL: http://svn.freebsd.org/changeset/base/225443 Log: Fix casting issue Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c Thu Sep 8 00:45:28 2011 (r225442) +++ user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c Thu Sep 8 00:55:48 2011 (r225443) @@ -1213,7 +1213,8 @@ sample_stats(void *arg, struct ieee80211 bin_to_size(y), (uintmax_t) sn->stats[y][rix].total_packets, (uintmax_t) sn->stats[y][rix].packets_acked, - (int) ((100*sn->stats[y][rix].packets_acked)/sn->stats[y][rix].total_packets), + (int) ((sn->stats[y][rix].packets_acked * 100ULL) / + sn->stats[y][rix].total_packets), sn->stats[y][rix].ewma_pct / 10, sn->stats[y][rix].ewma_pct % 10, (uintmax_t) sn->stats[y][rix].tries, From owner-svn-src-user@FreeBSD.ORG Thu Sep 8 12:19:58 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE497106566B; Thu, 8 Sep 2011 12:19:58 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 93A198FC1D; Thu, 8 Sep 2011 12:19:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p88CJw4N090488; Thu, 8 Sep 2011 12:19:58 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p88CJw6Z090486; Thu, 8 Sep 2011 12:19:58 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201109081219.p88CJw6Z090486@svn.freebsd.org> From: Adrian Chadd Date: Thu, 8 Sep 2011 12:19:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225447 - user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Sep 2011 12:19:58 -0000 Author: adrian Date: Thu Sep 8 12:19:58 2011 New Revision: 225447 URL: http://svn.freebsd.org/changeset/base/225447 Log: Add txq stop debugging; always memzero the 11n descriptors before chaining. * To help me trace down some ath txq device timeout issues, print out some TXQ state before the TXQ is halted. * Always memzero the descriptor in ar5416ChainTxDesc(). It was being called for the non-first descriptor in a (sub) frame. Problem is, I'm calling this function first, and THEN setting up the first descriptor, because of the way that ar5416ChainTxDesc() overwrites some fields that ar5416SetupFirstTxDesc() sets up. It's quite possible that ar5416SetupFirstTxDesc() should be called first; and ar5416ChainTxDesc() should be modified to merge in these changes rather than overwrite them. If I decide this, I'll revert this part of the patch. Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c Thu Sep 8 09:33:49 2011 (r225446) +++ user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c Thu Sep 8 12:19:58 2011 (r225447) @@ -41,6 +41,14 @@ ar5416StopTxDma(struct ath_hal *ah, u_in HALASSERT(AH5212(ah)->ah_txq[q].tqi_type != HAL_TX_QUEUE_INACTIVE); + HALDEBUG(ah, HAL_DEBUG_TXQUEUE, + "%s: Q(%d) QTXDP: 0x%.8x, QSTS: 0x%.8x, TXE: 0x%.8x, TXD: 0x%.8x\n", + __func__, q, + OS_REG_READ(ah, AR_QTXDP(q)), + OS_REG_READ(ah, AR_QSTS(q)), + OS_REG_READ(ah, AR_Q_TXE), + OS_REG_READ(ah, AR_Q_TXD)); + OS_REG_WRITE(ah, AR_Q_TXD, 1 << q); for (i = STOP_DMA_TIMEOUT/STOP_DMA_ITER; i != 0; i--) { if (ar5212NumTxPending(ah, q) == 0) @@ -350,9 +358,16 @@ ar5416ChainTxDesc(struct ath_hal *ah, st isaggr = 1; } - if (!firstSeg) { - OS_MEMZERO(ds->ds_hw, AR5416_DESC_TX_CTL_SZ); - } + /* + * Since this function is called before any of the other + * descriptor setup functions (at least in this particular + * 802.11n aggregation implementation), always bzero() the + * descriptor. Previously this would be done for all but + * the first segment. + * XXX TODO: figure out why; perhaps I'm using this slightly + * XXX incorrectly. + */ + OS_MEMZERO(ds->ds_hw, AR5416_DESC_TX_CTL_SZ); ads->ds_ctl0 = (pktLen & AR_FrameLen); ads->ds_ctl1 = (type << AR_FrameType_S) From owner-svn-src-user@FreeBSD.ORG Thu Sep 8 23:59:17 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E74C1065672; Thu, 8 Sep 2011 23:59:17 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 141428FC1D; Thu, 8 Sep 2011 23:59:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p88NxGBs012714; Thu, 8 Sep 2011 23:59:16 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p88NxGg8012712; Thu, 8 Sep 2011 23:59:16 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201109082359.p88NxGg8012712@svn.freebsd.org> From: Adrian Chadd Date: Thu, 8 Sep 2011 23:59:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225453 - user/adrian/if_ath_tx/sys/dev/ath X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Sep 2011 23:59:17 -0000 Author: adrian Date: Thu Sep 8 23:59:16 2011 New Revision: 225453 URL: http://svn.freebsd.org/changeset/base/225453 Log: * Printing the TX flags field ("F") needed fixing - it was printing an 04 in front, rather than using 04 as part of the field description. * Add support to dump a chain of aggregate buffers, rather than a single buffer. This is suboptimal as the calls to ieee80211_dump_pkt() only dump the first mbuf chain, rather than all aggregate packets. I'll have to fix this up before I commit it to -HEAD. Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_debug.c Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_debug.c ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/if_ath_debug.c Thu Sep 8 23:46:07 2011 (r225452) +++ user/adrian/if_ath_tx/sys/dev/ath/if_ath_debug.c Thu Sep 8 23:59:16 2011 (r225453) @@ -123,33 +123,37 @@ ath_printrxbuf(struct ath_softc *sc, con } void -ath_printtxbuf(struct ath_softc *sc, const struct ath_buf *bf, +ath_printtxbuf(struct ath_softc *sc, const struct ath_buf *first_bf, u_int qnum, u_int ix, int done) { - const struct ath_tx_status *ts = &bf->bf_status.ds_txstat; + const struct ath_tx_status *ts = &first_bf->bf_last->bf_status.ds_txstat; + const struct ath_buf *bf = first_bf; struct ath_hal *ah = sc->sc_ah; const struct ath_desc *ds; int i; printf("Q%u[%3u]", qnum, ix); - for (i = 0, ds = bf->bf_desc; i < bf->bf_nseg; i++, ds++) { - printf(" (DS.V:%p DS.P:%p) L:%08x D:%08x F:04%x%s\n" - " %08x %08x %08x %08x %08x %08x\n", - ds, (const struct ath_desc *)bf->bf_daddr + i, - ds->ds_link, ds->ds_data, bf->bf_txflags, - !done ? "" : (ts->ts_status == 0) ? " *" : " !", - ds->ds_ctl0, ds->ds_ctl1, - ds->ds_hw[0], ds->ds_hw[1], ds->ds_hw[2], ds->ds_hw[3]); - if (ah->ah_magic == 0x20065416) { - printf(" %08x %08x %08x %08x %08x %08x %08x %08x\n", - ds->ds_hw[4], ds->ds_hw[5], ds->ds_hw[6], - ds->ds_hw[7], ds->ds_hw[8], ds->ds_hw[9], - ds->ds_hw[10],ds->ds_hw[11]); - printf(" %08x %08x %08x %08x %08x %08x %08x %08x\n", - ds->ds_hw[12],ds->ds_hw[13],ds->ds_hw[14], - ds->ds_hw[15],ds->ds_hw[16],ds->ds_hw[17], - ds->ds_hw[18], ds->ds_hw[19]); + while (bf != NULL) { + for (i = 0, ds = bf->bf_desc; i < bf->bf_nseg; i++, ds++) { + printf(" (DS.V:%p DS.P:%p) L:%08x D:%08x F:%04x%s\n" + " %08x %08x %08x %08x %08x %08x\n", + ds, (const struct ath_desc *)bf->bf_daddr + i, + ds->ds_link, ds->ds_data, bf->bf_txflags, + !done ? "" : (ts->ts_status == 0) ? " *" : " !", + ds->ds_ctl0, ds->ds_ctl1, + ds->ds_hw[0], ds->ds_hw[1], ds->ds_hw[2], ds->ds_hw[3]); + if (ah->ah_magic == 0x20065416) { + printf(" %08x %08x %08x %08x %08x %08x %08x %08x\n", + ds->ds_hw[4], ds->ds_hw[5], ds->ds_hw[6], + ds->ds_hw[7], ds->ds_hw[8], ds->ds_hw[9], + ds->ds_hw[10],ds->ds_hw[11]); + printf(" %08x %08x %08x %08x %08x %08x %08x %08x\n", + ds->ds_hw[12],ds->ds_hw[13],ds->ds_hw[14], + ds->ds_hw[15],ds->ds_hw[16],ds->ds_hw[17], + ds->ds_hw[18], ds->ds_hw[19]); + } } + bf = bf->bf_next; } } From owner-svn-src-user@FreeBSD.ORG Fri Sep 9 04:40:20 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CFE0B106567C; Fri, 9 Sep 2011 04:40:20 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A57BF8FC0C; Fri, 9 Sep 2011 04:40:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p894eK8t021670; Fri, 9 Sep 2011 04:40:20 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p894eKhw021668; Fri, 9 Sep 2011 04:40:20 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201109090440.p894eKhw021668@svn.freebsd.org> From: Adrian Chadd Date: Fri, 9 Sep 2011 04:40:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225455 - user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Sep 2011 04:40:20 -0000 Author: adrian Date: Fri Sep 9 04:40:20 2011 New Revision: 225455 URL: http://svn.freebsd.org/changeset/base/225455 Log: I've been seeing situations where the TX queue has validly completed packets in it. This shouldn't occur - the hardware should've sent an interrupt to signal that a TX completion had occured. So on a hunch, I decided to shuffle the interrupt mitigation bits up a bit, because I figured that the hardware may be sending a TX mitigation interrupt but not asserting TXOK at the time. This seems to be doing the "right" thing - ie, at the time the mitigation timer expiry has occured, the AR_ISR_S0/AR_ISR_S1/AR_ISR_S2 registers seem to have the correct TX queue interrupt cause bits set; as they would stay set (once set) until AR_ISR_RAC is read. I'm going to have to chase this up with the MAC guys at Atheros to see exactly what the correct behaviour is. (Now there are still device timeout messages, but with an empty TX queue- this signifies a different problem.) Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c Fri Sep 9 01:39:19 2011 (r225454) +++ user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c Fri Sep 9 04:40:20 2011 (r225455) @@ -118,10 +118,21 @@ ar5416GetPendingInterrupts(struct ath_ha return AH_FALSE; } + /* + * XXX TODO: see whether the hardware signals AR_ISR_RXOK + * even if RX interrupt mitigation is enabled (but then + * doesn't trigger an interrupt per RX packet) - which means + * we'll be setting HAL_INT_RX even before the RX mitigation + * timers have expired. + * + * XXX TODO: do the same for the TX interrupts and TX interrupt + * mitigation. + */ + *masked = isr & HAL_INT_COMMON; - if (isr & (AR_ISR_RXOK | AR_ISR_RXERR)) + if (isr & (AR_ISR_RXOK | AR_ISR_RXERR | AR_ISR_RXMINTR | AR_ISR_RXINTM)) *masked |= HAL_INT_RX; - if (isr & (AR_ISR_TXOK | AR_ISR_TXDESC | AR_ISR_TXERR | AR_ISR_TXEOL)) { + if (isr & (AR_ISR_TXOK | AR_ISR_TXDESC | AR_ISR_TXERR | AR_ISR_TXEOL | AR_ISR_TXMINTR | AR_ISR_TXINTM)) { *masked |= HAL_INT_TX; isr0 = OS_REG_READ(ah, AR_ISR_S0_S); ahp->ah_intrTxqs |= MS(isr0, AR_ISR_S0_QCU_TXOK); @@ -138,13 +149,6 @@ ar5416GetPendingInterrupts(struct ath_ha *masked |= HAL_INT_TIM_TIMER; } - /* Interrupt Mitigation on AR5416 */ -#ifdef AH_AR5416_INTERRUPT_MITIGATION - if (isr & (AR_ISR_RXMINTR | AR_ISR_RXINTM)) - *masked |= HAL_INT_RX; - if (isr & (AR_ISR_TXMINTR | AR_ISR_TXINTM)) - *masked |= HAL_INT_TX; -#endif *masked |= mask2; } From owner-svn-src-user@FreeBSD.ORG Fri Sep 9 04:41:15 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E11E106564A; Fri, 9 Sep 2011 04:41:15 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4DF6B8FC17; Fri, 9 Sep 2011 04:41:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p894fFDU021738; Fri, 9 Sep 2011 04:41:15 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p894fFE1021736; Fri, 9 Sep 2011 04:41:15 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201109090441.p894fFE1021736@svn.freebsd.org> From: Adrian Chadd Date: Fri, 9 Sep 2011 04:41:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225456 - user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5212 X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Sep 2011 04:41:15 -0000 Author: adrian Date: Fri Sep 9 04:41:14 2011 New Revision: 225456 URL: http://svn.freebsd.org/changeset/base/225456 Log: Disable the current debugging and add something of my own; just to point out if something stupid is occuring. This shouldn't be merged back into -HEAD. Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c Fri Sep 9 04:40:20 2011 (r225455) +++ user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c Fri Sep 9 04:41:14 2011 (r225456) @@ -522,7 +522,11 @@ ar5212StartTxDma(struct ath_hal *ah, u_i HALASSERT(AH5212(ah)->ah_txq[q].tqi_type != HAL_TX_QUEUE_INACTIVE); - HALDEBUG(ah, HAL_DEBUG_TXQUEUE, "%s: queue %u\n", __func__, q); +// HALDEBUG(ah, HAL_DEBUG_TXQUEUE, "%s: queue %u\n", __func__, q); + if (OS_REG_READ(ah, AR_Q_TXD) & (1 << q)) { + ath_hal_printf(ah, "%s: TXQ: %d: disabled?\n", + __func__, q); + } /* Check to be sure we're not enabling a q that has its TXD bit set. */ HALASSERT((OS_REG_READ(ah, AR_Q_TXD) & (1 << q)) == 0); From owner-svn-src-user@FreeBSD.ORG Fri Sep 9 04:42:12 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9BB8C106564A; Fri, 9 Sep 2011 04:42:12 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8BD268FC12; Fri, 9 Sep 2011 04:42:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p894gCcl021800; Fri, 9 Sep 2011 04:42:12 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p894gC4Z021798; Fri, 9 Sep 2011 04:42:12 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201109090442.p894gC4Z021798@svn.freebsd.org> From: Adrian Chadd Date: Fri, 9 Sep 2011 04:42:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225457 - user/adrian/if_ath_tx/sys/dev/ath X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Sep 2011 04:42:12 -0000 Author: adrian Date: Fri Sep 9 04:42:11 2011 New Revision: 225457 URL: http://svn.freebsd.org/changeset/base/225457 Log: .. add this little gem of a reminder. Yes, why is sc_lastrx being updated in the TX handler? Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath.c Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath.c ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/if_ath.c Fri Sep 9 04:41:14 2011 (r225456) +++ user/adrian/if_ath_tx/sys/dev/ath/if_ath.c Fri Sep 9 04:42:11 2011 (r225457) @@ -4455,6 +4455,7 @@ ath_tx_proc_q0(void *arg, int npending) struct ifnet *ifp = sc->sc_ifp; if (txqactive(sc->sc_ah, 0) && ath_tx_processq(sc, &sc->sc_txq[0])) + /* XXX why is lastrx updated in tx code? */ sc->sc_lastrx = ath_hal_gettsf64(sc->sc_ah); if (txqactive(sc->sc_ah, sc->sc_cabq->axq_qnum)) ath_tx_processq(sc, sc->sc_cabq); From owner-svn-src-user@FreeBSD.ORG Fri Sep 9 09:39:27 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4BEAC106566B; Fri, 9 Sep 2011 09:39:27 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 389C28FC16; Fri, 9 Sep 2011 09:39:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p899dRc0030816; Fri, 9 Sep 2011 09:39:27 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p899dQrP030779; Fri, 9 Sep 2011 09:39:26 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201109090939.p899dQrP030779@svn.freebsd.org> From: Attilio Rao Date: Fri, 9 Sep 2011 09:39:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225459 - in user/attilio/vmcontention: contrib/top crypto/openssl/ssl etc sbin/geom/class/part share/mk sys/conf sys/dev/ath sys/dev/ath/ath_hal sys/dev/ath/ath_hal/ar5210 sys/dev/ath/... X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Sep 2011 09:39:27 -0000 Author: attilio Date: Fri Sep 9 09:39:26 2011 New Revision: 225459 URL: http://svn.freebsd.org/changeset/base/225459 Log: MFC Modified: user/attilio/vmcontention/crypto/openssl/ssl/s3_lib.c user/attilio/vmcontention/crypto/openssl/ssl/s3_srvr.c user/attilio/vmcontention/etc/pf.os user/attilio/vmcontention/sbin/geom/class/part/geom_part.c user/attilio/vmcontention/sys/conf/NOTES user/attilio/vmcontention/sys/conf/options user/attilio/vmcontention/sys/dev/ath/ath_hal/ah.c user/attilio/vmcontention/sys/dev/ath/ath_hal/ah.h user/attilio/vmcontention/sys/dev/ath/ath_hal/ah_internal.h user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5210/ar5210.h user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5210/ar5210_beacon.c user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5211/ar5211.h user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5211/ar5211_beacon.c user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5212/ar5212.h user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5212/ar5212_beacon.c user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5416/ar5416.h user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5416/ar5416_beacon.c user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5416/ar5416reg.h user/attilio/vmcontention/sys/dev/ath/if_ath.c user/attilio/vmcontention/sys/dev/ath/if_athvar.h user/attilio/vmcontention/sys/dev/mfi/mfi.c user/attilio/vmcontention/sys/dev/vge/if_vge.c user/attilio/vmcontention/sys/dev/vge/if_vgereg.h user/attilio/vmcontention/sys/kern/kern_rctl.c user/attilio/vmcontention/sys/kern/kern_shutdown.c user/attilio/vmcontention/sys/kern/vfs_bio.c user/attilio/vmcontention/sys/sys/buf.h user/attilio/vmcontention/usr.sbin/bsdinstall/scripts/netconfig user/attilio/vmcontention/usr.sbin/bsdinstall/scripts/netconfig_ipv4 user/attilio/vmcontention/usr.sbin/bsdinstall/scripts/netconfig_ipv6 Directory Properties: user/attilio/vmcontention/ (props changed) user/attilio/vmcontention/cddl/contrib/opensolaris/ (props changed) user/attilio/vmcontention/contrib/bind9/ (props changed) user/attilio/vmcontention/contrib/binutils/ (props changed) user/attilio/vmcontention/contrib/bzip2/ (props changed) user/attilio/vmcontention/contrib/compiler-rt/ (props changed) user/attilio/vmcontention/contrib/dialog/ (props changed) user/attilio/vmcontention/contrib/ee/ (props changed) user/attilio/vmcontention/contrib/expat/ (props changed) user/attilio/vmcontention/contrib/file/ (props changed) user/attilio/vmcontention/contrib/gcc/ (props changed) user/attilio/vmcontention/contrib/gdb/ (props changed) user/attilio/vmcontention/contrib/gdtoa/ (props changed) user/attilio/vmcontention/contrib/gnu-sort/ (props changed) user/attilio/vmcontention/contrib/groff/ (props changed) user/attilio/vmcontention/contrib/less/ (props changed) user/attilio/vmcontention/contrib/libpcap/ (props changed) user/attilio/vmcontention/contrib/libstdc++/ (props changed) user/attilio/vmcontention/contrib/llvm/ (props changed) user/attilio/vmcontention/contrib/llvm/tools/clang/ (props changed) user/attilio/vmcontention/contrib/ncurses/ (props changed) user/attilio/vmcontention/contrib/netcat/ (props changed) user/attilio/vmcontention/contrib/ntp/ (props changed) user/attilio/vmcontention/contrib/one-true-awk/ (props changed) user/attilio/vmcontention/contrib/openbsm/ (props changed) user/attilio/vmcontention/contrib/openpam/ (props changed) user/attilio/vmcontention/contrib/pf/ (props changed) user/attilio/vmcontention/contrib/sendmail/ (props changed) user/attilio/vmcontention/contrib/tcpdump/ (props changed) user/attilio/vmcontention/contrib/tcsh/ (props changed) user/attilio/vmcontention/contrib/tnftp/ (props changed) user/attilio/vmcontention/contrib/top/ (props changed) user/attilio/vmcontention/contrib/top/install-sh (props changed) user/attilio/vmcontention/contrib/tzcode/stdtime/ (props changed) user/attilio/vmcontention/contrib/tzcode/zic/ (props changed) user/attilio/vmcontention/contrib/tzdata/ (props changed) user/attilio/vmcontention/contrib/wpa/ (props changed) user/attilio/vmcontention/contrib/xz/ (props changed) user/attilio/vmcontention/crypto/openssh/ (props changed) user/attilio/vmcontention/crypto/openssl/ (props changed) user/attilio/vmcontention/gnu/lib/ (props changed) user/attilio/vmcontention/gnu/usr.bin/binutils/ (props changed) user/attilio/vmcontention/gnu/usr.bin/cc/cc_tools/ (props changed) user/attilio/vmcontention/gnu/usr.bin/gdb/ (props changed) user/attilio/vmcontention/lib/libc/ (props changed) user/attilio/vmcontention/lib/libc/stdtime/ (props changed) user/attilio/vmcontention/lib/libutil/ (props changed) user/attilio/vmcontention/lib/libz/ (props changed) user/attilio/vmcontention/sbin/ (props changed) user/attilio/vmcontention/sbin/ipfw/ (props changed) user/attilio/vmcontention/share/mk/bsd.arch.inc.mk (props changed) user/attilio/vmcontention/share/zoneinfo/ (props changed) user/attilio/vmcontention/sys/ (props changed) user/attilio/vmcontention/sys/amd64/include/xen/ (props changed) user/attilio/vmcontention/sys/boot/ (props changed) user/attilio/vmcontention/sys/boot/i386/efi/ (props changed) user/attilio/vmcontention/sys/boot/ia64/efi/ (props changed) user/attilio/vmcontention/sys/boot/ia64/ski/ (props changed) user/attilio/vmcontention/sys/boot/powerpc/boot1.chrp/ (props changed) user/attilio/vmcontention/sys/boot/powerpc/ofw/ (props changed) user/attilio/vmcontention/sys/cddl/contrib/opensolaris/ (props changed) user/attilio/vmcontention/sys/conf/ (props changed) user/attilio/vmcontention/sys/contrib/dev/acpica/ (props changed) user/attilio/vmcontention/sys/contrib/octeon-sdk/ (props changed) user/attilio/vmcontention/sys/contrib/pf/ (props changed) user/attilio/vmcontention/sys/contrib/x86emu/ (props changed) user/attilio/vmcontention/usr.bin/calendar/ (props changed) user/attilio/vmcontention/usr.bin/csup/ (props changed) user/attilio/vmcontention/usr.bin/procstat/ (props changed) user/attilio/vmcontention/usr.sbin/ndiscvt/ (props changed) user/attilio/vmcontention/usr.sbin/rtadvctl/ (props changed) user/attilio/vmcontention/usr.sbin/rtadvd/ (props changed) user/attilio/vmcontention/usr.sbin/zic/ (props changed) Modified: user/attilio/vmcontention/crypto/openssl/ssl/s3_lib.c ============================================================================== --- user/attilio/vmcontention/crypto/openssl/ssl/s3_lib.c Fri Sep 9 07:44:14 2011 (r225458) +++ user/attilio/vmcontention/crypto/openssl/ssl/s3_lib.c Fri Sep 9 09:39:26 2011 (r225459) @@ -1722,11 +1722,17 @@ void ssl3_clear(SSL *s) } #ifndef OPENSSL_NO_DH if (s->s3->tmp.dh != NULL) + { DH_free(s->s3->tmp.dh); + s->s3->tmp.dh = NULL; + } #endif #ifndef OPENSSL_NO_ECDH if (s->s3->tmp.ecdh != NULL) + { EC_KEY_free(s->s3->tmp.ecdh); + s->s3->tmp.ecdh = NULL; + } #endif rp = s->s3->rbuf.buf; Modified: user/attilio/vmcontention/crypto/openssl/ssl/s3_srvr.c ============================================================================== --- user/attilio/vmcontention/crypto/openssl/ssl/s3_srvr.c Fri Sep 9 07:44:14 2011 (r225458) +++ user/attilio/vmcontention/crypto/openssl/ssl/s3_srvr.c Fri Sep 9 09:39:26 2011 (r225459) @@ -710,9 +710,7 @@ int ssl3_check_client_hello(SSL *s) if (s->s3->tmp.message_type == SSL3_MT_CLIENT_HELLO) { /* Throw away what we have done so far in the current handshake, - * which will now be aborted. (A full SSL_clear would be too much.) - * I hope that tmp.dh is the only thing that may need to be cleared - * when a handshake is not completed ... */ + * which will now be aborted. (A full SSL_clear would be too much.) */ #ifndef OPENSSL_NO_DH if (s->s3->tmp.dh != NULL) { @@ -720,6 +718,13 @@ int ssl3_check_client_hello(SSL *s) s->s3->tmp.dh = NULL; } #endif +#ifndef OPENSSL_NO_ECDH + if (s->s3->tmp.ecdh != NULL) + { + EC_KEY_free(s->s3->tmp.ecdh); + s->s3->tmp.ecdh = NULL; + } +#endif return 2; } return 1; @@ -1329,7 +1334,6 @@ int ssl3_send_server_key_exchange(SSL *s if (s->s3->tmp.dh != NULL) { - DH_free(dh); SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE, ERR_R_INTERNAL_ERROR); goto err; } @@ -1390,7 +1394,6 @@ int ssl3_send_server_key_exchange(SSL *s if (s->s3->tmp.ecdh != NULL) { - EC_KEY_free(s->s3->tmp.ecdh); SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE, ERR_R_INTERNAL_ERROR); goto err; } @@ -1401,12 +1404,11 @@ int ssl3_send_server_key_exchange(SSL *s SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,ERR_R_ECDH_LIB); goto err; } - if (!EC_KEY_up_ref(ecdhp)) + if ((ecdh = EC_KEY_dup(ecdhp)) == NULL) { SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,ERR_R_ECDH_LIB); goto err; } - ecdh = ecdhp; s->s3->tmp.ecdh=ecdh; if ((EC_KEY_get0_public_key(ecdh) == NULL) || @@ -2262,6 +2264,12 @@ int ssl3_get_client_key_exchange(SSL *s) /* Get encoded point length */ i = *p; p += 1; + if (n != 1 + i) + { + SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, + ERR_R_EC_LIB); + goto err; + } if (EC_POINT_oct2point(group, clnt_ecpoint, p, i, bn_ctx) == 0) { Modified: user/attilio/vmcontention/etc/pf.os ============================================================================== --- user/attilio/vmcontention/etc/pf.os Fri Sep 9 07:44:14 2011 (r225458) +++ user/attilio/vmcontention/etc/pf.os Fri Sep 9 09:39:26 2011 (r225459) @@ -1,5 +1,5 @@ # $FreeBSD$ -# $OpenBSD: pf.os,v 1.21 2006/07/28 21:51:12 david Exp $ +# $OpenBSD: pf.os,v 1.25 2010/10/18 15:55:27 deraadt Exp $ # passive OS fingerprinting # ------------------------- # @@ -299,13 +299,16 @@ S22:64:1:52:M*,N,N,S,N,W0: Linux:2.2:ts: # ----------------- OpenBSD ----------------- 16384:64:0:60:M*,N,W0,N,N,T: OpenBSD:2.6::NetBSD 1.3 (or OpenBSD 2.6) -16384:64:1:64:M*,N,N,S,N,W0,N,N,T: OpenBSD:3.0-4.0::OpenBSD 3.0-4.0 -16384:64:0:64:M*,N,N,S,N,W0,N,N,T: OpenBSD:3.0-4.0:no-df:OpenBSD 3.0-4.0 (scrub no-df) +16384:64:1:64:M*,N,N,S,N,W0,N,N,T: OpenBSD:3.0-4.8::OpenBSD 3.0-4.8 +16384:64:0:64:M*,N,N,S,N,W0,N,N,T: OpenBSD:3.0-4.8:no-df:OpenBSD 3.0-4.8 (scrub no-df) 57344:64:1:64:M*,N,N,S,N,W0,N,N,T: OpenBSD:3.3-4.0::OpenBSD 3.3-4.0 57344:64:0:64:M*,N,N,S,N,W0,N,N,T: OpenBSD:3.3-4.0:no-df:OpenBSD 3.3-4.0 (scrub no-df) 65535:64:1:64:M*,N,N,S,N,W0,N,N,T: OpenBSD:3.0-4.0:opera:OpenBSD 3.0-4.0 (Opera) +16384:64:1:64:M*,N,N,S,N,W3,N,N,T: OpenBSD:4.9::OpenBSD 4.9 +16384:64:0:64:M*,N,N,S,N,W3,N,N,T: OpenBSD:4.9:no-df:OpenBSD 4.9 (scrub no-df) + # ----------------- Solaris ----------------- S17:64:1:64:N,W3,N,N,T0,N,N,S,M*: Solaris:8:RFC1323:Solaris 8 RFC1323 @@ -362,7 +365,7 @@ S34:64:1:52:M*,N,W0,N,N,S: Solaris:10:b # ----------------- Windows ----------------- # Windows TCP/IP stack is a mess. For most recent XP, 2000 and -# even 98, the pathlevel, not the actual OS version, is more +# even 98, the patchlevel, not the actual OS version, is more # relevant to the signature. They share the same code, so it would # seem. Luckily for us, almost all Windows 9x boxes have an # awkward MSS of 536, which I use to tell one from another Modified: user/attilio/vmcontention/sbin/geom/class/part/geom_part.c ============================================================================== --- user/attilio/vmcontention/sbin/geom/class/part/geom_part.c Fri Sep 9 07:44:14 2011 (r225458) +++ user/attilio/vmcontention/sbin/geom/class/part/geom_part.c Fri Sep 9 09:39:26 2011 (r225459) @@ -308,7 +308,7 @@ gpart_autofill_resize(struct gctl_req *r off_t last, size, start, new_size; off_t lba, new_lba, alignment, offset; const char *s; - int error, idx; + int error, idx, has_alignment; idx = (int)gctl_get_intmax(req, GPART_PARAM_INDEX); if (idx < 1) @@ -334,8 +334,9 @@ gpart_autofill_resize(struct gctl_req *r errx(EXIT_FAILURE, "Provider for geom %s not found.", s); s = gctl_get_ascii(req, "alignment"); + has_alignment = (*s == '*') ? 0 : 1; alignment = 1; - if (*s != '*') { + if (has_alignment) { error = g_parse_lba(s, pp->lg_sectorsize, &alignment); if (error) errc(EXIT_FAILURE, error, "Invalid alignment param"); @@ -358,7 +359,7 @@ gpart_autofill_resize(struct gctl_req *r if (error) errc(EXIT_FAILURE, error, "Invalid size param"); /* no autofill necessary. */ - if (alignment == 1) + if (has_alignment == 0) goto done; } @@ -380,7 +381,8 @@ gpart_autofill_resize(struct gctl_req *r lba = (off_t)strtoimax(s, NULL, 0); size = lba - start + 1; - if (new_size > 0 && new_size <= size) { + pp = find_provider(gp, lba + 1); + if (new_size > 0 && (new_size <= size || pp == NULL)) { /* The start offset may be not aligned, so we align the end * offset and then calculate the size. */ @@ -388,8 +390,6 @@ gpart_autofill_resize(struct gctl_req *r alignment) - start - offset; goto done; } - - pp = find_provider(gp, lba + 1); if (pp == NULL) { new_size = ALIGNDOWN(last + offset + 1, alignment) - start - offset; Modified: user/attilio/vmcontention/sys/conf/NOTES ============================================================================== --- user/attilio/vmcontention/sys/conf/NOTES Fri Sep 9 07:44:14 2011 (r225458) +++ user/attilio/vmcontention/sys/conf/NOTES Fri Sep 9 09:39:26 2011 (r225459) @@ -2929,7 +2929,6 @@ options SCSI_NCR_MYADDR=7 options SC_DEBUG_LEVEL=5 # Syscons debug level options SC_RENDER_DEBUG # syscons rendering debugging -options SHOW_BUSYBUFS # List buffers that prevent root unmount options VFS_BIO_DEBUG # VFS buffer I/O debugging options KSTACK_MAX_PAGES=32 # Maximum pages to give the kernel stack Modified: user/attilio/vmcontention/sys/conf/options ============================================================================== --- user/attilio/vmcontention/sys/conf/options Fri Sep 9 07:44:14 2011 (r225458) +++ user/attilio/vmcontention/sys/conf/options Fri Sep 9 09:39:26 2011 (r225459) @@ -156,7 +156,6 @@ QUOTA SCHED_4BSD opt_sched.h SCHED_STATS opt_sched.h SCHED_ULE opt_sched.h -SHOW_BUSYBUFS SLEEPQUEUE_PROFILING SLHCI_DEBUG opt_slhci.h SPX_HACK Modified: user/attilio/vmcontention/sys/dev/ath/ath_hal/ah.c ============================================================================== --- user/attilio/vmcontention/sys/dev/ath/ath_hal/ah.c Fri Sep 9 07:44:14 2011 (r225458) +++ user/attilio/vmcontention/sys/dev/ath/ath_hal/ah.c Fri Sep 9 09:39:26 2011 (r225459) @@ -657,6 +657,8 @@ ath_hal_getcapability(struct ath_hal *ah } case HAL_CAP_RXDESC_SELFLINK: /* hardware supports self-linked final RX descriptors correctly */ return pCap->halHasRxSelfLinkedTail ? HAL_OK : HAL_ENOTSUPP; + case HAL_CAP_LONG_RXDESC_TSF: /* 32 bit TSF in RX descriptor? */ + return pCap->halHasLongRxDescTsf ? HAL_OK : HAL_ENOTSUPP; default: return HAL_EINVAL; } @@ -1222,3 +1224,37 @@ ath_ee_interpolate(uint16_t target, uint } return rv; } + +/* + * Adjust the TSF. + */ +void +ath_hal_adjusttsf(struct ath_hal *ah, int32_t tsfdelta) +{ + /* XXX handle wrap/overflow */ + OS_REG_WRITE(ah, AR_TSF_L32, OS_REG_READ(ah, AR_TSF_L32) + tsfdelta); +} + +/* + * Enable or disable CCA. + */ +void +ath_hal_setcca(struct ath_hal *ah, int ena) +{ + /* + * NB: fill me in; this is not provided by default because disabling + * CCA in most locales violates regulatory. + */ +} + +/* + * Get CCA setting. + */ +int +ath_hal_getcca(struct ath_hal *ah) +{ + u_int32_t diag; + if (ath_hal_getcapability(ah, HAL_CAP_DIAG, 0, &diag) != HAL_OK) + return 1; + return ((diag & 0x500000) == 0); +} Modified: user/attilio/vmcontention/sys/dev/ath/ath_hal/ah.h ============================================================================== --- user/attilio/vmcontention/sys/dev/ath/ath_hal/ah.h Fri Sep 9 07:44:14 2011 (r225458) +++ user/attilio/vmcontention/sys/dev/ath/ath_hal/ah.h Fri Sep 9 09:39:26 2011 (r225459) @@ -148,6 +148,7 @@ typedef enum { HAL_CAP_BSSIDMATCH = 238, /* hardware has disable bssid match */ HAL_CAP_STREAMS = 239, /* how many 802.11n spatial streams are available */ HAL_CAP_RXDESC_SELFLINK = 242, /* support a self-linked tail RX descriptor */ + HAL_CAP_LONG_RXDESC_TSF = 243, /* hardware supports 32bit TSF in RX descriptor */ } HAL_CAPABILITY_TYPE; /* @@ -996,6 +997,7 @@ struct ath_hal { void __ahdecl(*ah_setStationBeaconTimers)(struct ath_hal*, const HAL_BEACON_STATE *); void __ahdecl(*ah_resetStationBeaconTimers)(struct ath_hal*); + uint64_t __ahdecl(*ah_getNextTBTT)(struct ath_hal *); /* 802.11n Functions */ HAL_BOOL __ahdecl(*ah_chainTxDesc)(struct ath_hal *, @@ -1138,4 +1140,20 @@ extern uint32_t __ahdecl ath_computedur_ extern uint16_t __ahdecl ath_hal_computetxtime(struct ath_hal *, const HAL_RATE_TABLE *rates, uint32_t frameLen, uint16_t rateix, HAL_BOOL shortPreamble); + +/* + * Adjust the TSF. + */ +extern void __ahdecl ath_hal_adjusttsf(struct ath_hal *ah, int32_t tsfdelta); + +/* + * Enable or disable CCA. + */ +void __ahdecl ath_hal_setcca(struct ath_hal *ah, int ena); + +/* + * Get CCA setting. + */ +int __ahdecl ath_hal_getcca(struct ath_hal *ah); + #endif /* _ATH_AH_H_ */ Modified: user/attilio/vmcontention/sys/dev/ath/ath_hal/ah_internal.h ============================================================================== --- user/attilio/vmcontention/sys/dev/ath/ath_hal/ah_internal.h Fri Sep 9 07:44:14 2011 (r225458) +++ user/attilio/vmcontention/sys/dev/ath/ath_hal/ah_internal.h Fri Sep 9 09:39:26 2011 (r225459) @@ -208,7 +208,8 @@ typedef struct { halBssidMatchSupport : 1, hal4kbSplitTransSupport : 1, halHasRxSelfLinkedTail : 1, - halSupportsFastClock5GHz : 1; /* Hardware supports 5ghz fast clock; check eeprom/channel before using */ + halSupportsFastClock5GHz : 1, /* Hardware supports 5ghz fast clock; check eeprom/channel before using */ + halHasLongRxDescTsf : 1; uint32_t halWirelessModes; uint16_t halTotalQueues; uint16_t halKeyCacheSize; Modified: user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5210/ar5210.h ============================================================================== --- user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5210/ar5210.h Fri Sep 9 07:44:14 2011 (r225458) +++ user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5210/ar5210.h Fri Sep 9 09:39:26 2011 (r225459) @@ -268,6 +268,7 @@ extern void ar5210BeaconInit(struct ath_ extern void ar5210SetStaBeaconTimers(struct ath_hal *, const HAL_BEACON_STATE *); extern void ar5210ResetStaBeaconTimers(struct ath_hal *); +extern uint64_t ar5210GetNextTBTT(struct ath_hal *); extern HAL_BOOL ar5210IsInterruptPending(struct ath_hal *); extern HAL_BOOL ar5210GetPendingInterrupts(struct ath_hal *, HAL_INT *); Modified: user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c ============================================================================== --- user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c Fri Sep 9 07:44:14 2011 (r225458) +++ user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c Fri Sep 9 09:39:26 2011 (r225459) @@ -148,6 +148,7 @@ static const struct ath_hal_private ar52 .ah_beaconInit = ar5210BeaconInit, .ah_setStationBeaconTimers = ar5210SetStaBeaconTimers, .ah_resetStationBeaconTimers = ar5210ResetStaBeaconTimers, + .ah_getNextTBTT = ar5210GetNextTBTT, /* Interrupt Functions */ .ah_isInterruptPending = ar5210IsInterruptPending, Modified: user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5210/ar5210_beacon.c ============================================================================== --- user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5210/ar5210_beacon.c Fri Sep 9 07:44:14 2011 (r225458) +++ user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5210/ar5210_beacon.c Fri Sep 9 09:39:26 2011 (r225459) @@ -27,6 +27,17 @@ #include "ar5210/ar5210desc.h" /* + * Return the hardware NextTBTT in TSF + */ +uint64_t +ar5210GetNextTBTT(struct ath_hal *ah) +{ +#define TU_TO_TSF(_tu) (((uint64_t)(_tu)) << 10) + return TU_TO_TSF(OS_REG_READ(ah, AR_TIMER0)); +#undef TU_TO_TSF +} + +/* * Initialize all of the hardware registers used to send beacons. */ void Modified: user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5211/ar5211.h ============================================================================== --- user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5211/ar5211.h Fri Sep 9 07:44:14 2011 (r225458) +++ user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5211/ar5211.h Fri Sep 9 09:39:26 2011 (r225459) @@ -296,6 +296,7 @@ extern void ar5211BeaconInit(struct ath_ extern void ar5211SetStaBeaconTimers(struct ath_hal *, const HAL_BEACON_STATE *); extern void ar5211ResetStaBeaconTimers(struct ath_hal *); +extern uint64_t ar5211GetNextTBTT(struct ath_hal *); extern HAL_BOOL ar5211IsInterruptPending(struct ath_hal *); extern HAL_BOOL ar5211GetPendingInterrupts(struct ath_hal *, HAL_INT *); Modified: user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c ============================================================================== --- user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c Fri Sep 9 07:44:14 2011 (r225458) +++ user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c Fri Sep 9 09:39:26 2011 (r225459) @@ -148,6 +148,7 @@ static const struct ath_hal_private ar52 .ah_beaconInit = ar5211BeaconInit, .ah_setStationBeaconTimers = ar5211SetStaBeaconTimers, .ah_resetStationBeaconTimers = ar5211ResetStaBeaconTimers, + .ah_getNextTBTT = ar5211GetNextTBTT, /* Interrupt Functions */ .ah_isInterruptPending = ar5211IsInterruptPending, Modified: user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5211/ar5211_beacon.c ============================================================================== --- user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5211/ar5211_beacon.c Fri Sep 9 07:44:14 2011 (r225458) +++ user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5211/ar5211_beacon.c Fri Sep 9 09:39:26 2011 (r225459) @@ -30,6 +30,17 @@ */ /* + * Return the hardware NextTBTT in TSF + */ +uint64_t +ar5211GetNextTBTT(struct ath_hal *ah) +{ +#define TU_TO_TSF(_tu) (((uint64_t)(_tu)) << 10) + return TU_TO_TSF(OS_REG_READ(ah, AR_TIMER0)); +#undef TU_TO_TSF +} + +/* * Initialize all of the hardware registers used to send beacons. */ void Modified: user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5212/ar5212.h ============================================================================== --- user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5212/ar5212.h Fri Sep 9 07:44:14 2011 (r225458) +++ user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5212/ar5212.h Fri Sep 9 09:39:26 2011 (r225459) @@ -430,6 +430,7 @@ extern void ar5212BeaconInit(struct ath_ extern void ar5212ResetStaBeaconTimers(struct ath_hal *ah); extern void ar5212SetStaBeaconTimers(struct ath_hal *ah, const HAL_BEACON_STATE *); +extern uint64_t ar5212GetNextTBTT(struct ath_hal *); extern HAL_BOOL ar5212IsInterruptPending(struct ath_hal *ah); extern HAL_BOOL ar5212GetPendingInterrupts(struct ath_hal *ah, HAL_INT *); Modified: user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c ============================================================================== --- user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c Fri Sep 9 07:44:14 2011 (r225458) +++ user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c Fri Sep 9 09:39:26 2011 (r225459) @@ -151,6 +151,7 @@ static const struct ath_hal_private ar52 .ah_beaconInit = ar5212BeaconInit, .ah_setStationBeaconTimers = ar5212SetStaBeaconTimers, .ah_resetStationBeaconTimers = ar5212ResetStaBeaconTimers, + .ah_getNextTBTT = ar5212GetNextTBTT, /* Interrupt Functions */ .ah_isInterruptPending = ar5212IsInterruptPending, Modified: user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5212/ar5212_beacon.c ============================================================================== --- user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5212/ar5212_beacon.c Fri Sep 9 07:44:14 2011 (r225458) +++ user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5212/ar5212_beacon.c Fri Sep 9 09:39:26 2011 (r225459) @@ -26,6 +26,17 @@ #include "ar5212/ar5212desc.h" /* + * Return the hardware NextTBTT in TSF + */ +uint64_t +ar5212GetNextTBTT(struct ath_hal *ah) +{ +#define TU_TO_TSF(_tu) (((uint64_t)(_tu)) << 10) + return TU_TO_TSF(OS_REG_READ(ah, AR_TIMER0)); +#undef TU_TO_TSF +} + +/* * Initialize all of the hardware registers used to * send beacons. Note that for station operation the * driver calls ar5212SetStaBeaconTimers instead. Modified: user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5416/ar5416.h ============================================================================== --- user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5416/ar5416.h Fri Sep 9 07:44:14 2011 (r225458) +++ user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5416/ar5416.h Fri Sep 9 09:39:26 2011 (r225459) @@ -169,6 +169,7 @@ extern void ar5416BeaconInit(struct ath_ extern void ar5416ResetStaBeaconTimers(struct ath_hal *ah); extern void ar5416SetStaBeaconTimers(struct ath_hal *ah, const HAL_BEACON_STATE *); +extern uint64_t ar5416GetNextTBTT(struct ath_hal *); extern HAL_BOOL ar5416EepromRead(struct ath_hal *, u_int off, uint16_t *data); extern HAL_BOOL ar5416EepromWrite(struct ath_hal *, u_int off, uint16_t data); @@ -186,6 +187,8 @@ extern void ar5416GpioSetIntr(struct ath extern u_int ar5416GetWirelessModes(struct ath_hal *ah); extern void ar5416SetLedState(struct ath_hal *ah, HAL_LED_STATE state); +extern uint64_t ar5416GetTsf64(struct ath_hal *ah); +extern void ar5416SetTsf64(struct ath_hal *ah, uint64_t tsf64); extern void ar5416ResetTsf(struct ath_hal *ah); extern HAL_BOOL ar5416SetAntennaSwitch(struct ath_hal *, HAL_ANT_SETTING); extern HAL_BOOL ar5416SetDecompMask(struct ath_hal *, uint16_t, int); Modified: user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c ============================================================================== --- user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Fri Sep 9 07:44:14 2011 (r225458) +++ user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Fri Sep 9 09:39:26 2011 (r225459) @@ -136,6 +136,7 @@ ar5416InitState(struct ath_hal_5416 *ahp ah->ah_gpioGet = ar5416GpioGet; ah->ah_gpioSet = ar5416GpioSet; ah->ah_gpioSetIntr = ar5416GpioSetIntr; + ah->ah_getTsf64 = ar5416GetTsf64; ah->ah_resetTsf = ar5416ResetTsf; ah->ah_getRfGain = ar5416GetRfgain; ah->ah_setAntennaSwitch = ar5416SetAntennaSwitch; @@ -160,6 +161,7 @@ ar5416InitState(struct ath_hal_5416 *ahp ah->ah_beaconInit = ar5416BeaconInit; ah->ah_setStationBeaconTimers = ar5416SetStaBeaconTimers; ah->ah_resetStationBeaconTimers = ar5416ResetStaBeaconTimers; + ah->ah_getNextTBTT = ar5416GetNextTBTT; /* 802.11n Functions */ ah->ah_chainTxDesc = ar5416ChainTxDesc; @@ -888,6 +890,8 @@ ar5416FillCapabilityInfo(struct ath_hal pCap->halGTTSupport = AH_TRUE; pCap->halCSTSupport = AH_TRUE; pCap->halEnhancedDfsSupport = AH_FALSE; + /* Hardware supports 32 bit TSF values in the RX descriptor */ + pCap->halHasLongRxDescTsf = AH_TRUE; if (ath_hal_eepromGetFlag(ah, AR_EEP_RFKILL) && ath_hal_eepromGet(ah, AR_EEP_RFSILENT, &ahpriv->ah_rfsilent) == HAL_OK) { Modified: user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5416/ar5416_beacon.c ============================================================================== --- user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5416/ar5416_beacon.c Fri Sep 9 07:44:14 2011 (r225458) +++ user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5416/ar5416_beacon.c Fri Sep 9 09:39:26 2011 (r225459) @@ -29,6 +29,15 @@ #define ONE_EIGHTH_TU_TO_USEC(_tu8) ((_tu8) << 7) /* + * Return the hardware NextTBTT in TSF + */ +uint64_t +ar5416GetNextTBTT(struct ath_hal *ah) +{ + return OS_REG_READ(ah, AR_NEXT_TBTT); +} + +/* * Initialize all of the hardware registers used to * send beacons. Note that for station operation the * driver calls ar5416SetStaBeaconTimers instead. Modified: user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c ============================================================================== --- user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Fri Sep 9 07:44:14 2011 (r225458) +++ user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Fri Sep 9 09:39:26 2011 (r225459) @@ -93,6 +93,41 @@ ar5416SetLedState(struct ath_hal *ah, HA } /* + * Get the current hardware tsf for stamlme + */ +uint64_t +ar5416GetTsf64(struct ath_hal *ah) +{ + uint32_t low1, low2, u32; + + /* sync multi-word read */ + low1 = OS_REG_READ(ah, AR_TSF_L32); + u32 = OS_REG_READ(ah, AR_TSF_U32); + low2 = OS_REG_READ(ah, AR_TSF_L32); + if (low2 < low1) { /* roll over */ + /* + * If we are not preempted this will work. If we are + * then we re-reading AR_TSF_U32 does no good as the + * low bits will be meaningless. Likewise reading + * L32, U32, U32, then comparing the last two reads + * to check for rollover doesn't help if preempted--so + * we take this approach as it costs one less PCI read + * which can be noticeable when doing things like + * timestamping packets in monitor mode. + */ + u32++; + } + return (((uint64_t) u32) << 32) | ((uint64_t) low2); +} + +void +ar5416SetTsf64(struct ath_hal *ah, uint64_t tsf64) +{ + OS_REG_WRITE(ah, AR_TSF_L32, tsf64 & 0xffffffff); + OS_REG_WRITE(ah, AR_TSF_U32, (tsf64 >> 32) & 0xffffffff); +} + +/* * Reset the current hardware tsf for stamlme. */ void Modified: user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c ============================================================================== --- user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Fri Sep 9 07:44:14 2011 (r225458) +++ user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Fri Sep 9 09:39:26 2011 (r225459) @@ -147,7 +147,7 @@ ar5416Reset(struct ath_hal *ah, HAL_OPMO /* For chips on which the RTC reset is done, save TSF before it gets cleared */ if (AR_SREV_HOWL(ah) || (AR_SREV_MERLIN(ah) && ath_hal_eepromGetFlag(ah, AR_EEP_OL_PWRCTRL))) - tsf = ar5212GetTsf64(ah); + tsf = ar5416GetTsf64(ah); /* Mark PHY as inactive; marked active in ar5416InitBB() */ ar5416MarkPhyInactive(ah); @@ -159,7 +159,7 @@ ar5416Reset(struct ath_hal *ah, HAL_OPMO /* Restore TSF */ if (tsf) - ar5212SetTsf64(ah, tsf); + ar5416SetTsf64(ah, tsf); OS_MARK(ah, AH_MARK_RESET_LINE, __LINE__); if (AR_SREV_MERLIN_10_OR_LATER(ah)) @@ -192,9 +192,9 @@ ar5416Reset(struct ath_hal *ah, HAL_OPMO * value after the initvals have been applied, with an offset * based on measured time difference */ - if (AR_SREV_HOWL(ah) && (ar5212GetTsf64(ah) < tsf)) { + if (AR_SREV_HOWL(ah) && (ar5416GetTsf64(ah) < tsf)) { tsf += 1500; - ar5212SetTsf64(ah, tsf); + ar5416SetTsf64(ah, tsf); } HALDEBUG(ah, HAL_DEBUG_RESET, ">>>2 %s: AR_PHY_DAG_CTRLCCK=0x%x\n", @@ -364,8 +364,7 @@ ar5416Reset(struct ath_hal *ah, HAL_OPMO OS_REG_RMW_FIELD(ah, AR_RIMT, AR_RIMT_FIRST, 2000); OS_REG_RMW_FIELD(ah, AR_TIMT, AR_TIMT_LAST, 300); OS_REG_RMW_FIELD(ah, AR_TIMT, AR_TIMT_FIRST, 750); -#endif - +#endif ar5416InitBB(ah, chan); /* Setup compression registers */ @@ -503,7 +502,7 @@ ar5416ChannelChange(struct ath_hal *ah, chan->ic_state &= ~IEEE80211_CHANSTATE_CWINT; ichan->channel_time = 0; - ichan->tsf_last = ar5212GetTsf64(ah); + ichan->tsf_last = ar5416GetTsf64(ah); ar5212TxEnable(ah, AH_TRUE); return AH_TRUE; } Modified: user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5416/ar5416reg.h ============================================================================== --- user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Fri Sep 9 07:44:14 2011 (r225458) +++ user/attilio/vmcontention/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Fri Sep 9 09:39:26 2011 (r225459) @@ -40,6 +40,7 @@ #define AR_INTR_ASYNC_MASK 0x4030 /* asynchronous interrupt mask */ #define AR_INTR_SYNC_MASK 0x4034 /* synchronous interrupt mask */ #define AR_INTR_ASYNC_CAUSE 0x4038 /* check pending interrupts */ +#define AR_INTR_ASYNC_CAUSE_CLR 0x4038 /* clear pending interrupts */ #define AR_INTR_ASYNC_ENABLE 0x403c /* enable interrupts */ #define AR5416_PCIE_SERDES 0x4040 #define AR5416_PCIE_SERDES2 0x4044 Modified: user/attilio/vmcontention/sys/dev/ath/if_ath.c ============================================================================== --- user/attilio/vmcontention/sys/dev/ath/if_ath.c Fri Sep 9 07:44:14 2011 (r225458) +++ user/attilio/vmcontention/sys/dev/ath/if_ath.c Fri Sep 9 09:39:26 2011 (r225459) @@ -214,24 +214,6 @@ static void ath_tdma_update(struct ieee8 static void ath_tdma_beacon_send(struct ath_softc *sc, struct ieee80211vap *vap); -static __inline void -ath_hal_setcca(struct ath_hal *ah, int ena) -{ - /* - * NB: fill me in; this is not provided by default because disabling - * CCA in most locales violates regulatory. - */ -} - -static __inline int -ath_hal_getcca(struct ath_hal *ah) -{ - u_int32_t diag; - if (ath_hal_getcapability(ah, HAL_CAP_DIAG, 0, &diag) != HAL_OK) - return 1; - return ((diag & 0x500000) == 0); -} - #define TDMA_EP_MULTIPLIER (1<<10) /* pow2 to optimize out * and / */ #define TDMA_LPF_LEN 6 #define TDMA_DUMMY_MARKER 0x127 @@ -613,6 +595,7 @@ ath_attach(u_int16_t devid, struct ath_s sc->sc_hasbmatch = ath_hal_hasbssidmatch(ah); sc->sc_hastsfadd = ath_hal_hastsfadjust(ah); sc->sc_rxslink = ath_hal_self_linked_final_rxdesc(ah); + sc->sc_rxtsf32 = ath_hal_has_long_rxdesc_tsf(ah); if (ath_hal_hasfastframes(ah)) ic->ic_caps |= IEEE80211_C_FF; wmodes = ath_hal_getwirelessmodes(ah); @@ -3294,14 +3277,49 @@ ath_rxbuf_init(struct ath_softc *sc, str * a full 64-bit TSF using the specified TSF. */ static __inline u_int64_t -ath_extend_tsf(u_int32_t rstamp, u_int64_t tsf) +ath_extend_tsf15(u_int32_t rstamp, u_int64_t tsf) { if ((tsf & 0x7fff) < rstamp) tsf -= 0x8000; + return ((tsf &~ 0x7fff) | rstamp); } /* + * Extend 32-bit time stamp from rx descriptor to + * a full 64-bit TSF using the specified TSF. + */ +static __inline u_int64_t +ath_extend_tsf32(u_int32_t rstamp, u_int64_t tsf) +{ + u_int32_t tsf_low = tsf & 0xffffffff; + u_int64_t tsf64 = (tsf & ~0xffffffffULL) | rstamp; + + if (rstamp > tsf_low && (rstamp - tsf_low > 0x10000000)) + tsf64 -= 0x100000000ULL; + + if (rstamp < tsf_low && (tsf_low - rstamp > 0x10000000)) + tsf64 += 0x100000000ULL; + + return tsf64; +} + +/* + * Extend the TSF from the RX descriptor to a full 64 bit TSF. + * Earlier hardware versions only wrote the low 15 bits of the + * TSF into the RX descriptor; later versions (AR5416 and up) + * include the 32 bit TSF value. + */ +static __inline u_int64_t +ath_extend_tsf(struct ath_softc *sc, u_int32_t rstamp, u_int64_t tsf) +{ + if (sc->sc_rxtsf32) + return ath_extend_tsf32(rstamp, tsf); + else + return ath_extend_tsf15(rstamp, tsf); +} + +/* * Intercept management frames to collect beacon rssi data * and to do ibss merges. */ @@ -3334,7 +3352,7 @@ ath_recv_mgmt(struct ieee80211_node *ni, if (vap->iv_opmode == IEEE80211_M_IBSS && vap->iv_state == IEEE80211_S_RUN) { uint32_t rstamp = sc->sc_lastrs->rs_tstamp; - uint64_t tsf = ath_extend_tsf(rstamp, + uint64_t tsf = ath_extend_tsf(sc, rstamp, ath_hal_gettsf64(sc->sc_ah)); /* * Handle ibss merge as needed; check the tsf on the @@ -3406,7 +3424,7 @@ ath_rx_tap(struct ifnet *ifp, struct mbu sc->sc_rx_th.wr_flags |= IEEE80211_RADIOTAP_F_SHORTGI; } #endif - sc->sc_rx_th.wr_tsf = htole64(ath_extend_tsf(rs->rs_tstamp, tsf)); + sc->sc_rx_th.wr_tsf = htole64(ath_extend_tsf(sc, rs->rs_tstamp, tsf)); if (rs->rs_status & HAL_RXERR_CRC) sc->sc_rx_th.wr_flags |= IEEE80211_RADIOTAP_F_BADFCS; /* XXX propagate other error flags from descriptor */ @@ -5460,20 +5478,6 @@ ath_announce(struct ath_softc *sc) } #ifdef IEEE80211_SUPPORT_TDMA -static __inline uint32_t -ath_hal_getnexttbtt(struct ath_hal *ah) -{ -#define AR_TIMER0 0x8028 - return OS_REG_READ(ah, AR_TIMER0); -} - -static __inline void -ath_hal_adjusttsf(struct ath_hal *ah, int32_t tsfdelta) -{ - /* XXX handle wrap/overflow */ - OS_REG_WRITE(ah, AR_TSF_L32, OS_REG_READ(ah, AR_TSF_L32) + tsfdelta); -} - static void ath_tdma_settimers(struct ath_softc *sc, u_int32_t nexttbtt, u_int32_t bintval) { @@ -5629,8 +5633,8 @@ ath_tdma_update(struct ieee80211_node *n struct ath_softc *sc = ic->ic_ifp->if_softc; struct ath_hal *ah = sc->sc_ah; const HAL_RATE_TABLE *rt = sc->sc_currates; - u_int64_t tsf, rstamp, nextslot; - u_int32_t txtime, nextslottu, timer0; + u_int64_t tsf, rstamp, nextslot, nexttbtt; + u_int32_t txtime, nextslottu; int32_t tudelta, tsfdelta; const struct ath_rx_status *rs; int rix; @@ -5661,7 +5665,7 @@ ath_tdma_update(struct ieee80211_node *n /* extend rx timestamp to 64 bits */ rs = sc->sc_lastrs; tsf = ath_hal_gettsf64(ah); - rstamp = ath_extend_tsf(rs->rs_tstamp, tsf); + rstamp = ath_extend_tsf(sc, rs->rs_tstamp, tsf); /* * The rx timestamp is set by the hardware on completing * reception (at the point where the rx descriptor is DMA'd @@ -5677,15 +5681,15 @@ ath_tdma_update(struct ieee80211_node *n nextslottu = TSF_TO_TU(nextslot>>32, nextslot) & HAL_BEACON_PERIOD; /* - * TIMER0 is the h/w's idea of NextTBTT (in TU's). Convert - * to usecs and calculate the difference between what the + * Retrieve the hardware NextTBTT in usecs + * and calculate the difference between what the * other station thinks and what we have programmed. This * lets us figure how to adjust our timers to match. The * adjustments are done by pulling the TSF forward and possibly * rewriting the beacon timers. */ - timer0 = ath_hal_getnexttbtt(ah); - tsfdelta = (int32_t)((nextslot % TU_TO_TSF(HAL_BEACON_PERIOD+1)) - TU_TO_TSF(timer0)); + nexttbtt = ath_hal_getnexttbtt(ah); + tsfdelta = (int32_t)((nextslot % TU_TO_TSF(HAL_BEACON_PERIOD + 1)) - nexttbtt); DPRINTF(sc, ATH_DEBUG_TDMA_TIMER, "tsfdelta %d avg +%d/-%d\n", tsfdelta, @@ -5705,7 +5709,7 @@ ath_tdma_update(struct ieee80211_node *n TDMA_SAMPLE(sc->sc_avgtsfdeltap, 0); TDMA_SAMPLE(sc->sc_avgtsfdeltam, 0); } - tudelta = nextslottu - timer0; + tudelta = nextslottu - TSF_TO_TU(nexttbtt >> 32, nexttbtt); /* * Copy sender's timetstamp into tdma ie so they can @@ -5724,10 +5728,9 @@ ath_tdma_update(struct ieee80211_node *n &ni->ni_tstamp.data, 8); #if 0 DPRINTF(sc, ATH_DEBUG_TDMA_TIMER, - "tsf %llu nextslot %llu (%d, %d) nextslottu %u timer0 %u (%d)\n", + "tsf %llu nextslot %llu (%d, %d) nextslottu %u nexttbtt %llu (%d)\n", (unsigned long long) tsf, (unsigned long long) nextslot, - (int)(nextslot - tsf), tsfdelta, - nextslottu, timer0, tudelta); + (int)(nextslot - tsf), tsfdelta, nextslottu, nexttbtt, tudelta); #endif /* * Adjust the beacon timers only when pulling them forward Modified: user/attilio/vmcontention/sys/dev/ath/if_athvar.h ============================================================================== --- user/attilio/vmcontention/sys/dev/ath/if_athvar.h Fri Sep 9 07:44:14 2011 (r225458) +++ user/attilio/vmcontention/sys/dev/ath/if_athvar.h Fri Sep 9 09:39:26 2011 (r225459) @@ -255,7 +255,8 @@ struct ath_softc { sc_setcca : 1,/* set/clr CCA with TDMA */ sc_resetcal : 1,/* reset cal state next trip */ sc_rxslink : 1,/* do self-linked final descriptor */ - sc_kickpcu : 1;/* kick PCU RX on next RX proc */ + sc_kickpcu : 1,/* kick PCU RX on next RX proc */ + sc_rxtsf32 : 1;/* RX dec TSF is 32 bits */ uint32_t sc_eerd; /* regdomain from EEPROM */ uint32_t sc_eecc; /* country code from EEPROM */ /* rate tables */ @@ -482,6 +483,8 @@ void ath_intr(void *); ((*(_ah)->ah_setBeaconTimers)((_ah), (_bt))) #define ath_hal_beacontimers(_ah, _bs) \ ((*(_ah)->ah_setStationBeaconTimers)((_ah), (_bs))) +#define ath_hal_getnexttbtt(_ah) \ + ((*(_ah)->ah_getNextTBTT)((_ah))) #define ath_hal_setassocid(_ah, _bss, _associd) \ ((*(_ah)->ah_writeAssocid)((_ah), (_bss), (_associd))) #define ath_hal_phydisable(_ah) \ @@ -657,6 +660,8 @@ void ath_intr(void *); (ath_hal_getcapability(_ah, HAL_CAP_RXDESC_SELFLINK, 0, NULL) == HAL_OK) #define ath_hal_gtxto_supported(_ah) \ (ath_hal_getcapability(_ah, HAL_CAP_GTXTO, 0, NULL) == HAL_OK) +#define ath_hal_has_long_rxdesc_tsf(_ah) \ + (ath_hal_getcapability(_ah, HAL_CAP_LONG_RXDESC_TSF, 0, NULL) == HAL_OK) #define ath_hal_setuprxdesc(_ah, _ds, _size, _intreq) \ ((*(_ah)->ah_setupRxDesc)((_ah), (_ds), (_size), (_intreq))) Modified: user/attilio/vmcontention/sys/dev/mfi/mfi.c ============================================================================== --- user/attilio/vmcontention/sys/dev/mfi/mfi.c Fri Sep 9 07:44:14 2011 (r225458) +++ user/attilio/vmcontention/sys/dev/mfi/mfi.c Fri Sep 9 09:39:26 2011 (r225459) @@ -2132,8 +2132,7 @@ mfi_ioctl(struct cdev *dev, u_long cmd, if (ioc->mfi_sense_len) { /* get user-space sense ptr then copy out sense */ - bcopy(&((struct mfi_ioc_packet*)arg) - ->mfi_frame.raw[ioc->mfi_sense_off], + bcopy(&ioc->mfi_frame.raw[ioc->mfi_sense_off], &sense_ptr.sense_ptr_data[0], sizeof(sense_ptr.sense_ptr_data)); #ifdef __amd64__ Modified: user/attilio/vmcontention/sys/dev/vge/if_vge.c ============================================================================== --- user/attilio/vmcontention/sys/dev/vge/if_vge.c Fri Sep 9 07:44:14 2011 (r225458) +++ user/attilio/vmcontention/sys/dev/vge/if_vge.c Fri Sep 9 09:39:26 2011 (r225459) @@ -1752,6 +1752,10 @@ vge_intr(void *arg) #ifdef DEVICE_POLLING if (ifp->if_capenable & IFCAP_POLLING) { + status = CSR_READ_4(sc, VGE_ISR); + CSR_WRITE_4(sc, VGE_ISR, status); + if (status != 0xFFFFFFFF && (status & VGE_ISR_LINKSTS) != 0) + vge_link_statchg(sc); VGE_UNLOCK(sc); return; } @@ -2109,11 +2113,10 @@ vge_init_locked(struct vge_softc *sc) #ifdef DEVICE_POLLING /* - * Disable interrupts if we are polling. + * Disable interrupts except link state change if we are polling. */ if (ifp->if_capenable & IFCAP_POLLING) { - CSR_WRITE_4(sc, VGE_IMR, 0); - CSR_WRITE_1(sc, VGE_CRC3, VGE_CR3_INT_GMSK); + CSR_WRITE_4(sc, VGE_IMR, VGE_INTRS_POLLING); } else /* otherwise ... */ #endif { @@ -2121,9 +2124,9 @@ vge_init_locked(struct vge_softc *sc) * Enable interrupts. */ CSR_WRITE_4(sc, VGE_IMR, VGE_INTRS); - CSR_WRITE_4(sc, VGE_ISR, 0xFFFFFFFF); - CSR_WRITE_1(sc, VGE_CRS3, VGE_CR3_INT_GMSK); } + CSR_WRITE_4(sc, VGE_ISR, 0xFFFFFFFF); + CSR_WRITE_1(sc, VGE_CRS3, VGE_CR3_INT_GMSK); sc->vge_flags &= ~VGE_FLAG_LINK; mii_mediachg(mii); @@ -2280,8 +2283,9 @@ vge_ioctl(struct ifnet *ifp, u_long comm return (error); VGE_LOCK(sc); /* Disable interrupts */ - CSR_WRITE_4(sc, VGE_IMR, 0); - CSR_WRITE_1(sc, VGE_CRC3, VGE_CR3_INT_GMSK); + CSR_WRITE_4(sc, VGE_IMR, VGE_INTRS_POLLING); + CSR_WRITE_4(sc, VGE_ISR, 0xFFFFFFFF); + CSR_WRITE_1(sc, VGE_CRS3, VGE_CR3_INT_GMSK); ifp->if_capenable |= IFCAP_POLLING; VGE_UNLOCK(sc); } else { Modified: user/attilio/vmcontention/sys/dev/vge/if_vgereg.h ============================================================================== --- user/attilio/vmcontention/sys/dev/vge/if_vgereg.h Fri Sep 9 07:44:14 2011 (r225458) +++ user/attilio/vmcontention/sys/dev/vge/if_vgereg.h Fri Sep 9 09:39:26 2011 (r225459) @@ -302,6 +302,8 @@ VGE_ISR_LINKSTS|VGE_ISR_RXNODESC| \ VGE_ISR_RXDMA_STALL|VGE_ISR_TXDMA_STALL) +#define VGE_INTRS_POLLING (VGE_ISR_PHYINT|VGE_ISR_LINKSTS) + /* Interrupt mask register */ #define VGE_IMR_RXOK_HIPRIO 0x00000001 /* hi prio RX int */ Modified: user/attilio/vmcontention/sys/kern/kern_rctl.c ============================================================================== --- user/attilio/vmcontention/sys/kern/kern_rctl.c Fri Sep 9 07:44:14 2011 (r225458) +++ user/attilio/vmcontention/sys/kern/kern_rctl.c Fri Sep 9 09:39:26 2011 (r225459) @@ -363,6 +363,17 @@ rctl_enforce(struct proc *p, int resourc rule->rr_action)); /* + * We're supposed to send a signal, but the process + * is not fully initialized yet, probably because we + * got called from fork1(). For now just deny the + * allocation instead. + */ + if (p->p_state != PRS_NORMAL) { + should_deny = 1; + continue; + } + + /* * We're using the fact that RCTL_ACTION_SIG* values * are equal to their counterparts from sys/signal.h. */ Modified: user/attilio/vmcontention/sys/kern/kern_shutdown.c ============================================================================== --- user/attilio/vmcontention/sys/kern/kern_shutdown.c Fri Sep 9 07:44:14 2011 (r225458) +++ user/attilio/vmcontention/sys/kern/kern_shutdown.c Fri Sep 9 09:39:26 2011 (r225459) @@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$"); #include "opt_ddb.h" #include "opt_kdb.h" #include "opt_panic.h" -#include "opt_show_busybufs.h" #include "opt_sched.h" #include "opt_watchdog.h" @@ -66,6 +65,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #ifdef SW_WATCHDOG #include #endif @@ -123,6 +123,14 @@ TUNABLE_INT("kern.sync_on_panic", &sync_ SYSCTL_NODE(_kern, OID_AUTO, shutdown, CTLFLAG_RW, 0, "Shutdown environment"); +#ifndef DIAGNOSTIC +static int show_busybufs; +#else +static int show_busybufs = 1; +#endif +SYSCTL_INT(_kern_shutdown, OID_AUTO, show_busybufs, CTLFLAG_RW, + &show_busybufs, 0, ""); + /* * Variable panicstr contains argument to first call to panic; used as flag * to indicate that the kernel has already called panic. @@ -389,13 +397,17 @@ kern_reboot(int howto) } #endif nbusy++; -#if defined(SHOW_BUSYBUFS) || defined(DIAGNOSTIC) - printf( - "%d: bufobj:%p, flags:%0x, blkno:%ld, lblkno:%ld\n", - nbusy, bp->b_bufobj, - bp->b_flags, (long)bp->b_blkno, - (long)bp->b_lblkno); -#endif + if (show_busybufs > 0) { + printf( + "%d: buf:%p, vnode:%p, flags:%0x, blkno:%jd, lblkno:%jd, buflock:", + nbusy, bp, bp->b_vp, bp->b_flags, + (intmax_t)bp->b_blkno, + (intmax_t)bp->b_lblkno); + BUF_LOCKPRINTINFO(bp); + if (show_busybufs > 1) + vn_printf(bp->b_vp, + "vnode content: "); + } } } if (nbusy) { Modified: user/attilio/vmcontention/sys/kern/vfs_bio.c ============================================================================== --- user/attilio/vmcontention/sys/kern/vfs_bio.c Fri Sep 9 07:44:14 2011 (r225458) +++ user/attilio/vmcontention/sys/kern/vfs_bio.c Fri Sep 9 09:39:26 2011 (r225459) @@ -4020,7 +4020,7 @@ DB_SHOW_COMMAND(buffer, db_show_buffer) db_printf("\n"); } db_printf(" "); - lockmgr_printinfo(&bp->b_lock); + BUF_LOCKPRINTINFO(bp); } DB_SHOW_COMMAND(lockedbufs, lockedbufs) Modified: user/attilio/vmcontention/sys/sys/buf.h ============================================================================== --- user/attilio/vmcontention/sys/sys/buf.h Fri Sep 9 07:44:14 2011 (r225458) +++ user/attilio/vmcontention/sys/sys/buf.h Fri Sep 9 09:39:26 2011 (r225459) @@ -311,6 +311,12 @@ extern const char *buf_wmesg; /* Defaul lockdestroy(&(bp)->b_lock) /* + * Print informations on a buffer lock. + */ +#define BUF_LOCKPRINTINFO(bp) \ + lockmgr_printinfo(&(bp)->b_lock) + +/* * Buffer lock assertions. */ #if defined(INVARIANTS) && defined(INVARIANT_SUPPORT) Modified: user/attilio/vmcontention/usr.sbin/bsdinstall/scripts/netconfig ============================================================================== --- user/attilio/vmcontention/usr.sbin/bsdinstall/scripts/netconfig Fri Sep 9 07:44:14 2011 (r225458) +++ user/attilio/vmcontention/usr.sbin/bsdinstall/scripts/netconfig Fri Sep 9 09:39:26 2011 (r225459) @@ -165,7 +165,7 @@ fi exec 3>&1 RESOLV=$(echo "${RESOLV}" | xargs dialog --backtitle 'FreeBSD Installer' \ --title 'Network Configuration' \ - --mixedform 'Resovler Configuration' 0 0 0 \ + --mixedform 'Resolver Configuration' 0 0 0 \ 2>&1 1>&3) if [ $? -eq $DIALOG_CANCEL ]; then exec $0; fi exec 3>&- Modified: user/attilio/vmcontention/usr.sbin/bsdinstall/scripts/netconfig_ipv4 ============================================================================== --- user/attilio/vmcontention/usr.sbin/bsdinstall/scripts/netconfig_ipv4 Fri Sep 9 07:44:14 2011 (r225458) +++ user/attilio/vmcontention/usr.sbin/bsdinstall/scripts/netconfig_ipv4 Fri Sep 9 09:39:26 2011 (r225459) @@ -79,7 +79,9 @@ echo $INTERFACE $IF_CONFIG | if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; then . $BSDINSTALL_TMPETC/._rc.conf.net ifconfig $INTERFACE `eval echo \\\$ifconfig_$INTERFACE` - route delete -inet default - route add -inet default $defaultrouter *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Fri Sep 9 11:24:05 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E360106564A; Fri, 9 Sep 2011 11:24:05 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 151EA8FC14; Fri, 9 Sep 2011 11:24:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p89BO4a7036317; Fri, 9 Sep 2011 11:24:04 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p89BO43K036315; Fri, 9 Sep 2011 11:24:04 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201109091124.p89BO43K036315@svn.freebsd.org> From: Adrian Chadd Date: Fri, 9 Sep 2011 11:24:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225460 - user/adrian/if_ath_tx/sys/dev/ath X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Sep 2011 11:24:05 -0000 Author: adrian Date: Fri Sep 9 11:24:04 2011 New Revision: 225460 URL: http://svn.freebsd.org/changeset/base/225460 Log: Begin adding some further debugging to chase down the TX hangs that I've seen under TCP TX load. It looks like the underlying problem is that some packets that are -before- the BAW are making it onto the software TX queue. These frames are outside the BAW (but before it, not after it) and thus the TX scheduling stops. The source of those grossly out of order (and likely already successfully TXed, but that's currently unknown) is currently unknown. Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c Fri Sep 9 09:39:26 2011 (r225459) +++ user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c Fri Sep 9 11:24:04 2011 (r225460) @@ -1821,6 +1821,13 @@ ath_tx_addto_baw(struct ath_softc *sc, s if (bf->bf_state.bfs_isretried) return; + if (bf->bf_state.bfs_addedbaw) + DPRINTF(sc, ATH_DEBUG_SW_TX_BAW, + "%s: re-added? tid=%d, seqno %d; window %d:%d; baw head=%d tail=%d\n", + __func__, tid->tid, SEQNO(bf->bf_state.bfs_seqno), + tap->txa_start, tap->txa_wnd, tid->baw_head, tid->baw_tail); + + tap = ath_tx_get_tx_tid(an, tid->tid); /* * ni->ni_txseqs[] is the currently allocated seqno. @@ -2087,6 +2094,7 @@ ath_tx_swq(struct ath_softc *sc, struct } else if (ath_tx_ampdu_pending(sc, an, tid)) { /* AMPDU pending; queue */ ATH_TXQ_INSERT_TAIL(atid, bf, bf_list); + /* XXX sched? */ } else if (ath_tx_ampdu_running(sc, an, tid)) { /* AMPDU running, attempt direct dispatch if possible */ if (txq->axq_depth < sc->sc_hwq_limit) @@ -2221,6 +2229,8 @@ ath_tx_tid_drain(struct ath_softc *sc, s struct ath_buf *bf; struct ieee80211_tx_ampdu *tap; struct ieee80211_node *ni = &an->an_node; + int t = 0; + struct ath_txq *txq = sc->sc_ac2q[tid->ac]; tap = ath_tx_get_tx_tid(an, tid->tid); @@ -2233,6 +2243,21 @@ ath_tx_tid_drain(struct ath_softc *sc, s break; } + if (t == 0) { + device_printf(sc->sc_dev, + "%s: node %p: tid %d: txq_depth=%d, " + "txq_aggr_depth=%d, sched=%d, paused=%d, " + "hwq_depth=%d, incomp=%d, baw_head=%d, baw_tail=%d " + "txa_start=%d, ni_txseqs=%d\n", + __func__, ni, tid->tid, txq->axq_depth, + txq->axq_aggr_depth, tid->sched, tid->paused, + tid->hwq_depth, tid->incomp, tid->baw_head, + tid->baw_tail, tap->txa_start, + ni->ni_txseqs[tid->tid]); + t = 1; + } + + /* * If the current TID is running AMPDU, update * the BAW. From owner-svn-src-user@FreeBSD.ORG Fri Sep 9 11:59:59 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E50F10656D4; Fri, 9 Sep 2011 11:59:59 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8EBB48FC1F; Fri, 9 Sep 2011 11:59:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p89Bxx2a037388; Fri, 9 Sep 2011 11:59:59 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p89Bxx5N037386; Fri, 9 Sep 2011 11:59:59 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201109091159.p89Bxx5N037386@svn.freebsd.org> From: Adrian Chadd Date: Fri, 9 Sep 2011 11:59:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225461 - user/adrian/if_ath_tx/sys/dev/ath X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Sep 2011 11:59:59 -0000 Author: adrian Date: Fri Sep 9 11:59:59 2011 New Revision: 225461 URL: http://svn.freebsd.org/changeset/base/225461 Log: Fix a previous commit. Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c Fri Sep 9 11:24:04 2011 (r225460) +++ user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c Fri Sep 9 11:59:59 2011 (r225461) @@ -1821,14 +1821,14 @@ ath_tx_addto_baw(struct ath_softc *sc, s if (bf->bf_state.bfs_isretried) return; + tap = ath_tx_get_tx_tid(an, tid->tid); + if (bf->bf_state.bfs_addedbaw) - DPRINTF(sc, ATH_DEBUG_SW_TX_BAW, + device_printf(sc->sc_dev, "%s: re-added? tid=%d, seqno %d; window %d:%d; baw head=%d tail=%d\n", __func__, tid->tid, SEQNO(bf->bf_state.bfs_seqno), tap->txa_start, tap->txa_wnd, tid->baw_head, tid->baw_tail); - - tap = ath_tx_get_tx_tid(an, tid->tid); /* * ni->ni_txseqs[] is the currently allocated seqno. * the txa state contains the current baw start. From owner-svn-src-user@FreeBSD.ORG Fri Sep 9 15:03:53 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 658F610657C1; Fri, 9 Sep 2011 15:03:53 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4ABA28FC18; Fri, 9 Sep 2011 15:03:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p89F3rKe042859; Fri, 9 Sep 2011 15:03:53 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p89F3rlE042857; Fri, 9 Sep 2011 15:03:53 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201109091503.p89F3rlE042857@svn.freebsd.org> From: Adrian Chadd Date: Fri, 9 Sep 2011 15:03:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225463 - user/adrian/if_ath_tx/tools/tools/ath/athstats X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Sep 2011 15:03:53 -0000 Author: adrian Date: Fri Sep 9 15:03:52 2011 New Revision: 225463 URL: http://svn.freebsd.org/changeset/base/225463 Log: Correct formatting. Modified: user/adrian/if_ath_tx/tools/tools/ath/athstats/athstats.c Modified: user/adrian/if_ath_tx/tools/tools/ath/athstats/athstats.c ============================================================================== --- user/adrian/if_ath_tx/tools/tools/ath/athstats/athstats.c Fri Sep 9 13:52:37 2011 (r225462) +++ user/adrian/if_ath_tx/tools/tools/ath/athstats/athstats.c Fri Sep 9 15:03:52 2011 (r225463) @@ -255,37 +255,37 @@ static const struct fmt athstats[] = { #define S_RX_2040 AFTER(S_RX_HALFGI) { 6, "rx2040", "rx2040", "40MHz frames received" }, #define S_RX_PRE_CRC_ERR AFTER(S_RX_2040) - { 5, "rxprecrcerr", "rxprecrcerr", "CRC errors for non-last A-MPDU subframes" }, + { 11, "rxprecrcerr", "rxprecrcerr", "CRC errors for non-last A-MPDU subframes" }, #define S_RX_POST_CRC_ERR AFTER(S_RX_PRE_CRC_ERR) - { 5, "rxpostcrcerr", "rxpostcrcerr", "CRC errors for last subframe in an A-MPDU" }, + { 12, "rxpostcrcerr", "rxpostcrcerr", "CRC errors for last subframe in an A-MPDU" }, #define S_RX_DECRYPT_BUSY_ERR AFTER(S_RX_POST_CRC_ERR) - { 4, "rxdescbusy", "rxdescbusy", "Decryption engine busy" }, + { 10, "rxdescbusy", "rxdescbusy", "Decryption engine busy" }, #define S_RX_HI_CHAIN AFTER(S_RX_DECRYPT_BUSY_ERR) { 4, "rxhi", "rxhi", "Frames received with RX chain in high power mode" }, #define S_TX_HTPROTECT AFTER(S_RX_HI_CHAIN) - { 4, "txhtprot", "txhtprot", "Frames transmitted with HT Protection" }, + { 7, "txhtprot", "txhtprot", "Frames transmitted with HT Protection" }, #define S_RX_QEND AFTER(S_TX_HTPROTECT) - { 4, "rxquend", "rxquend", "Hit end of RX descriptor queue" }, + { 7, "rxquend", "rxquend", "Hit end of RX descriptor queue" }, #define S_TX_TIMEOUT AFTER(S_RX_QEND) - { 4, "txtimeout", "txtimeout", "TX Timeout" }, + { 4, "txtimeout", "TXTX", "TX Timeout" }, #define S_TX_CSTIMEOUT AFTER(S_TX_TIMEOUT) - { 4, "csttimeout", "csttimeout", "Carrier Sense Timeout" }, + { 4, "csttimeout", "CSTX", "Carrier Sense Timeout" }, #define S_TX_XTXOP_ERR AFTER(S_TX_CSTIMEOUT) - { 4, "xtxoperr", "xtxoperr", "TXOP exceed" }, + { 5, "xtxoperr", "TXOPX", "TXOP exceed" }, #define S_TX_TIMEREXPIRED_ERR AFTER(S_TX_XTXOP_ERR) - { 4, "texperr", "texperr", "TX Timer expired" }, + { 7, "texperr", "texperr", "TX Timer expired" }, #define S_TX_DESCCFG_ERR AFTER(S_TX_TIMEREXPIRED_ERR) - { 4, "desccfgerr", "desccfgerr", "TX descriptor error" }, + { 10, "desccfgerr", "desccfgerr", "TX descriptor error" }, #define S_TX_SWRETRIES AFTER(S_TX_DESCCFG_ERR) - { 4, "txswretry", "txswretry", "Number of frames retransmitted in software" }, + { 9, "txswretry", "txswretry", "Number of frames retransmitted in software" }, #define S_TX_SWRETRIES_MAX AFTER(S_TX_SWRETRIES) - { 4, "txswmax", "txswmax", "Number of frames exceeding software retry" }, + { 7, "txswmax", "txswmax", "Number of frames exceeding software retry" }, #define S_TX_DATA_UNDERRUN AFTER(S_TX_SWRETRIES_MAX) - { 4, "txdataunderrun", "txdataunderrun", "A-MPDU TX FIFO data underrun" }, + { 5, "txdataunderrun", "TXDAU", "A-MPDU TX FIFO data underrun" }, #define S_TX_DELIM_UNDERRUN AFTER(S_TX_DATA_UNDERRUN) - { 4, "txdelimunderrun", "txdelimunderrun", "A-MPDU TX Delimiter underrun" }, + { 5, "txdelimunderrun", "TXDEU", "A-MPDU TX Delimiter underrun" }, #define S_TX_AGGR_FAIL AFTER(S_TX_DELIM_UNDERRUN) - { 4, "txaggrfail", "txaggrfail", "A-MPDU TX attempt failed" }, + { 10, "txaggrfail", "txaggrfail", "A-MPDU TX attempt failed" }, #ifndef __linux__ #define S_CABQ_XMIT AFTER(S_TX_AGGR_FAIL) { 5, "cabxmit", "cabxmit", "cabq frames transmitted" }, From owner-svn-src-user@FreeBSD.ORG Sat Sep 10 07:16:53 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7DB95106564A; Sat, 10 Sep 2011 07:16:53 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6EA4D8FC15; Sat, 10 Sep 2011 07:16:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p8A7GrGZ073823; Sat, 10 Sep 2011 07:16:53 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p8A7Grx4073821; Sat, 10 Sep 2011 07:16:53 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201109100716.p8A7Grx4073821@svn.freebsd.org> From: Doug Barton Date: Sat, 10 Sep 2011 07:16:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225465 - user/dougb/portmaster X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Sep 2011 07:16:53 -0000 Author: dougb Date: Sat Sep 10 07:16:53 2011 New Revision: 225465 URL: http://svn.freebsd.org/changeset/base/225465 Log: In find_and_delete_distfiles() (run after a successful install) change the default pattern to be foo-[0-9]* instead of foo* [1] This matches 19,305 out of 25,106 unique distfiles, and dramatically reduces false positives for files like foo-1.23 vs. foo-bar-2.34. Of the ones that this pattern misses, 4,713 don't match the traditional distfile format anyway, so it's a huge net win; and should make running without -D much less annoying. When the new pattern doesn't match any existing distfiles, fall back to the old one. Do this by calling with the pattern, not the file name. This simplifies processing in the function a bit. Also in find_and_delete_distfiles(), cache matches to $DI_FILES so that we don't have to re-test that same file again. Change the method used to print the prompt in get_answer_g() to echo -e so that I can be more flexible in formatting prompt messages. Suggested by: Lapo Luchini [1] Modified: user/dougb/portmaster/portmaster Modified: user/dougb/portmaster/portmaster ============================================================================== --- user/dougb/portmaster/portmaster Fri Sep 9 19:39:54 2011 (r225464) +++ user/dougb/portmaster/portmaster Sat Sep 10 07:16:53 2011 (r225465) @@ -937,7 +937,7 @@ get_answer_g () { default=$1 ; option=$2 ; shift 2 while : ; do - echo -n "${*} [${default}] " + echo -e "${*} [${default}] \c" read answer echo '' @@ -1015,7 +1015,7 @@ IFS=' echo " ===>>> but there is no installed version" echo '' if [ -n "$CHECK_DEPENDS" ]; then - get_answer_yn n " ===>>> Delete this dependency data" + get_answer_yn n "\t===>>> Delete this dependency data" case "$?" in 0) unset prev_line line ; continue ;; esac else echo " ===>>> Try ${0##*/} --check-depends" @@ -1298,7 +1298,7 @@ if [ -n "$CLEAN_DISTFILES" ]; then for df in `find $DISTDIR -type f | sort`; do f=${df#$DISTDIR} if ! grep -ql $f $DI_FILES; then - get_answer_yn n " ===>>> Delete stale file: ${f}" + get_answer_yn n "\t===>>> Delete stale file: ${f}" case "$?" in 0) echo " Deleting $f" ; echo '' /bin/unlink $df ;; @@ -1341,7 +1341,7 @@ if [ -n "$CLEAN_PACKAGES" ]; then if [ ! -d "${pdb}/${pkg_dir}" ]; then echo " ===>>> $pkg_dir is not installed" echo " ===>>> Path: ${package}" - get_answer_yn y " ===>>> Delete stale package: ${package##*/}" + get_answer_yn y "\n\t===>>> Delete stale package: ${package##*/}" case "$?" in 0) echo " ===>>> Deleting $package" pm_unlink_s $package ;; @@ -1365,7 +1365,7 @@ if [ -n "$CLEAN_PACKAGES" ]; then echo " ===>>> Path: ${package}" - get_answer_yn n " ===>>> Delete stale package: ${package##*/}" + get_answer_yn n "\n\t===>>> Delete stale package: ${package##*/}" case "$?" in 0) echo " ===>>> Deleting $package" pm_unlink_s $package ;; @@ -1478,7 +1478,7 @@ if [ -n "$CHECK_PORT_DBDIR" ]; then *:${dbdir}:*) pm_v "Ok" ;; *) pm_v echo " ===>>> $dbdir does not seem to be installed" - get_answer_yn n " ===>>> Delete ${dir}" + get_answer_yn n "\n\t===>>> Delete ${dir}" case "$?" in 0) pm_rm_s -rf $dir ;; esac echo '' ;; esac @@ -1715,8 +1715,7 @@ pm_pkg_create () { echo "===>>> Ignore this error [i]" echo "===>>> Abort [a]" - echo '' - get_answer_g i a "===>>> How would you like to proceed?" + get_answer_g i a "\n===>>> How would you like to proceed?" case "$?" in 1) fail "Package creation failed for $2" ;; esac fi } @@ -1771,17 +1770,16 @@ delete_dist_list () { find_and_delete_distfiles () { # Global: port_subdir DISTDIR distfiles distfiles_checked delete_all - local ps pattern file answer + local ps file answer ps=${port_subdir#$DISTDIR} - pattern=${1%[_-]*} - for file in ${pattern}*; do + for file in ${1}*; do # This generally means the pattern did not match case "$file" in - *\*) [ "$pattern" = "${pattern%[_-]*}" ] && return 0 + *\*) [ "$1" = "${1%[_-]*}" ] && return 0 # This will happen for files like foo-bar_baz-1.23 - find_and_delete_distfiles $pattern ;; + find_and_delete_distfiles ${1%[_-]*} ;; esac case "$distfiles_checked" in *:${file}:*) continue ;; esac @@ -1793,7 +1791,11 @@ find_and_delete_distfiles () { pm_v "===>>> Keeping current distfile: $file" continue ;; # Do not delete current version *) if [ -s "$DI_FILES" ]; then - grep -ql ${ps}$file $DI_FILES && continue + if grep -ql ${ps}$file $DI_FILES; then + distfiles_checked="${distfiles_checked}${file}:" + pm_v "===>>> Keeping current distfile: $file" + continue # Do not delete current version + fi fi if [ -n "$ALWAYS_SCRUB_DISTFILES" -o -n "$delete_all" ]; then @@ -1802,7 +1804,7 @@ find_and_delete_distfiles () { continue fi - get_answer_g n y "===>>> Delete $file? y/n" + get_answer_g n y "\n===>>> Delete $file? y/n" case "$?" in 1) pm_unlink $file ;; 0) distfiles_checked="${distfiles_checked}${file}:" ;; @@ -1877,7 +1879,7 @@ delete_stale_distfiles () { continue fi - get_answer_g n y "===>>> Delete $file? y/n" + get_answer_g n y "\n===>>> Delete $file? y/n" case "$?" in 1) pm_unlink $file ;; 0) distfiles_checked="${distfiles_checked}${file}:" ;; @@ -1889,7 +1891,7 @@ delete_stale_distfiles () { # flag, but until the DISTFILE stuff is well populated in PORT_DBDIR, # keep doing it both ways. for file in $distfiles $dist_list_files; do - find_and_delete_distfiles $file + find_and_delete_distfiles ${file%[-]*}-[0-9] done pm_v "===>>> Distfile cleaning complete" ; pm_v @@ -2026,8 +2028,7 @@ if [ -n "$EXPUNGE" ]; then for dep in $deplist; do dep=${dep%/+CON*} ; echo " ${dep##*/}" done - echo '' - get_answer_yn n " ===>>> Delete this dependency data" + get_answer_yn n "\n\t===>>> Delete this dependency data" case "$?" in 0) for f in $deplist; do update_contents delete $f $origin @@ -2071,7 +2072,7 @@ if [ -n "$CLEAN_STALE" ]; then pkg_info $iport - get_answer_yn n " ===>>> ${iport} is no longer depended on, delete" + get_answer_yn n "\t===>>> ${iport} is no longer depended on, delete" case "$?" in 0) [ -n "$BACKUP" ] && { init_packages ; pm_pkg_create $pbu $iport; } [ -z "$DONT_SCRUB_DISTFILES" ] && { delete_all_distfiles $origin; delete_dist_list; } @@ -2080,7 +2081,7 @@ if [ -n "$CLEAN_STALE" ]; then pm_pkg_delete_s -f $iport || fail 'pkg_delete failed' exec $0 -s $ARGS ;; - *) get_answer_yn n " ===>>> Delete this dependency data" + *) get_answer_yn n "\t===>>> Delete this dependency data" case "$?" in 0) pm_unlink_s $file ;; *) no_del_list="${no_del_list}${iport}:" ;; @@ -2127,8 +2128,8 @@ check_interactive () { if [ -e "$pdb/$1/+IGNOREME" ]; then echo '' echo "===>>> +IGNOREME file is present for $1" + echo '' fi - echo '' get_answer_g y n "===>>> Update ${1}${update_to}? y/n" case "$?" in 0) INTERACTIVE_YES="${INTERACTIVE_YES}${1}:" ;; @@ -3086,8 +3087,7 @@ if [ -e "$pdb/$upg_port/+IGNOREME" ]; th *) if [ -z "$FETCH_ONLY" ]; then echo '' echo "===>>> $upg_port has an +IGNOREME file" - echo '' - get_answer_g n y "===>>> Update anyway? y/n" + get_answer_g n y "\t===>>> Update anyway? y/n" case "$?" in 1) ;; # Let it build 0) CUR_DEPS="${CUR_DEPS}${upg_port}:${portdir}:" From owner-svn-src-user@FreeBSD.ORG Sat Sep 10 08:00:27 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44A7E106566C; Sat, 10 Sep 2011 08:00:27 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 35E0C8FC13; Sat, 10 Sep 2011 08:00:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p8A80RLD075179; Sat, 10 Sep 2011 08:00:27 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p8A80RZ0075177; Sat, 10 Sep 2011 08:00:27 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201109100800.p8A80RZ0075177@svn.freebsd.org> From: Doug Barton Date: Sat, 10 Sep 2011 08:00:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225466 - user/dougb/portmaster X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Sep 2011 08:00:27 -0000 Author: dougb Date: Sat Sep 10 08:00:26 2011 New Revision: 225466 URL: http://svn.freebsd.org/changeset/base/225466 Log: Add a more-or-less painless test to deal with the issue of the current working directory no longer existing. This problem usually manifests as a "The value of DISTDIR cannot be empty" error because 'make -f' does not handle this condition gracefully. Modified: user/dougb/portmaster/portmaster Modified: user/dougb/portmaster/portmaster ============================================================================== --- user/dougb/portmaster/portmaster Sat Sep 10 07:16:53 2011 (r225465) +++ user/dougb/portmaster/portmaster Sat Sep 10 08:00:26 2011 (r225466) @@ -850,9 +850,16 @@ if [ "$$" -eq "$PM_PARENT_PID" ]; then fi fi - [ -z "$DISTDIR" -a "$PM_PACKAGES" != only -a -z "$CHECK_DEPENDS" -a \ - -z "$CHECK_PORT_DBDIR" -a -z "$LIST_ORIGINS" ] && - DISTDIR=`pm_make_b -f/usr/share/mk/bsd.port.mk -V DISTDIR 2>/dev/null` + if [ -z "$DISTDIR" -a "$PM_PACKAGES" != only -a -z "$CHECK_DEPENDS" -a \ + -z "$CHECK_PORT_DBDIR" -a -z "$LIST_ORIGINS" ]; then + if ! DISTDIR=`pm_make_b -f/usr/share/mk/bsd.port.mk -V DISTDIR 2>/dev/null`; then + if [ ! -d "$PWD" ]; then + echo '' + echo "===>>> Your current working directory no longer seems to exist" + fail 'Try: cd' + fi + fi + fi [ -n "$DISTDIR" ] && { DISTDIR="${DISTDIR%/}/"; export DISTDIR; } From owner-svn-src-user@FreeBSD.ORG Sat Sep 10 12:36:11 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8C54106564A; Sat, 10 Sep 2011 12:36:11 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C7B048FC12; Sat, 10 Sep 2011 12:36:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p8ACaBDr088493; Sat, 10 Sep 2011 12:36:11 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p8ACaBXp088489; Sat, 10 Sep 2011 12:36:11 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201109101236.p8ACaBXp088489@svn.freebsd.org> From: Attilio Rao Date: Sat, 10 Sep 2011 12:36:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225468 - in user/attilio/vmcontention: contrib/top share/mk sys/netinet usr.sbin/bsdinstall/scripts usr.sbin/pc-sysinstall/backend X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Sep 2011 12:36:11 -0000 Author: attilio Date: Sat Sep 10 12:36:11 2011 New Revision: 225468 URL: http://svn.freebsd.org/changeset/base/225468 Log: MFC Modified: user/attilio/vmcontention/sys/netinet/sctp_output.c user/attilio/vmcontention/usr.sbin/bsdinstall/scripts/mirrorselect user/attilio/vmcontention/usr.sbin/pc-sysinstall/backend/functions-ftp.sh Directory Properties: user/attilio/vmcontention/ (props changed) user/attilio/vmcontention/cddl/contrib/opensolaris/ (props changed) user/attilio/vmcontention/contrib/bind9/ (props changed) user/attilio/vmcontention/contrib/binutils/ (props changed) user/attilio/vmcontention/contrib/bzip2/ (props changed) user/attilio/vmcontention/contrib/compiler-rt/ (props changed) user/attilio/vmcontention/contrib/dialog/ (props changed) user/attilio/vmcontention/contrib/ee/ (props changed) user/attilio/vmcontention/contrib/expat/ (props changed) user/attilio/vmcontention/contrib/file/ (props changed) user/attilio/vmcontention/contrib/gcc/ (props changed) user/attilio/vmcontention/contrib/gdb/ (props changed) user/attilio/vmcontention/contrib/gdtoa/ (props changed) user/attilio/vmcontention/contrib/gnu-sort/ (props changed) user/attilio/vmcontention/contrib/groff/ (props changed) user/attilio/vmcontention/contrib/less/ (props changed) user/attilio/vmcontention/contrib/libpcap/ (props changed) user/attilio/vmcontention/contrib/libstdc++/ (props changed) user/attilio/vmcontention/contrib/llvm/ (props changed) user/attilio/vmcontention/contrib/llvm/tools/clang/ (props changed) user/attilio/vmcontention/contrib/ncurses/ (props changed) user/attilio/vmcontention/contrib/netcat/ (props changed) user/attilio/vmcontention/contrib/ntp/ (props changed) user/attilio/vmcontention/contrib/one-true-awk/ (props changed) user/attilio/vmcontention/contrib/openbsm/ (props changed) user/attilio/vmcontention/contrib/openpam/ (props changed) user/attilio/vmcontention/contrib/pf/ (props changed) user/attilio/vmcontention/contrib/sendmail/ (props changed) user/attilio/vmcontention/contrib/tcpdump/ (props changed) user/attilio/vmcontention/contrib/tcsh/ (props changed) user/attilio/vmcontention/contrib/tnftp/ (props changed) user/attilio/vmcontention/contrib/top/ (props changed) user/attilio/vmcontention/contrib/top/install-sh (props changed) user/attilio/vmcontention/contrib/tzcode/stdtime/ (props changed) user/attilio/vmcontention/contrib/tzcode/zic/ (props changed) user/attilio/vmcontention/contrib/tzdata/ (props changed) user/attilio/vmcontention/contrib/wpa/ (props changed) user/attilio/vmcontention/contrib/xz/ (props changed) user/attilio/vmcontention/crypto/openssh/ (props changed) user/attilio/vmcontention/crypto/openssl/ (props changed) user/attilio/vmcontention/gnu/lib/ (props changed) user/attilio/vmcontention/gnu/usr.bin/binutils/ (props changed) user/attilio/vmcontention/gnu/usr.bin/cc/cc_tools/ (props changed) user/attilio/vmcontention/gnu/usr.bin/gdb/ (props changed) user/attilio/vmcontention/lib/libc/ (props changed) user/attilio/vmcontention/lib/libc/stdtime/ (props changed) user/attilio/vmcontention/lib/libutil/ (props changed) user/attilio/vmcontention/lib/libz/ (props changed) user/attilio/vmcontention/sbin/ (props changed) user/attilio/vmcontention/sbin/ipfw/ (props changed) user/attilio/vmcontention/share/mk/bsd.arch.inc.mk (props changed) user/attilio/vmcontention/share/zoneinfo/ (props changed) user/attilio/vmcontention/sys/ (props changed) user/attilio/vmcontention/sys/amd64/include/xen/ (props changed) user/attilio/vmcontention/sys/boot/ (props changed) user/attilio/vmcontention/sys/boot/i386/efi/ (props changed) user/attilio/vmcontention/sys/boot/ia64/efi/ (props changed) user/attilio/vmcontention/sys/boot/ia64/ski/ (props changed) user/attilio/vmcontention/sys/boot/powerpc/boot1.chrp/ (props changed) user/attilio/vmcontention/sys/boot/powerpc/ofw/ (props changed) user/attilio/vmcontention/sys/cddl/contrib/opensolaris/ (props changed) user/attilio/vmcontention/sys/conf/ (props changed) user/attilio/vmcontention/sys/contrib/dev/acpica/ (props changed) user/attilio/vmcontention/sys/contrib/octeon-sdk/ (props changed) user/attilio/vmcontention/sys/contrib/pf/ (props changed) user/attilio/vmcontention/sys/contrib/x86emu/ (props changed) user/attilio/vmcontention/usr.bin/calendar/ (props changed) user/attilio/vmcontention/usr.bin/csup/ (props changed) user/attilio/vmcontention/usr.bin/procstat/ (props changed) user/attilio/vmcontention/usr.sbin/ndiscvt/ (props changed) user/attilio/vmcontention/usr.sbin/rtadvctl/ (props changed) user/attilio/vmcontention/usr.sbin/rtadvd/ (props changed) user/attilio/vmcontention/usr.sbin/zic/ (props changed) Modified: user/attilio/vmcontention/sys/netinet/sctp_output.c ============================================================================== --- user/attilio/vmcontention/sys/netinet/sctp_output.c Sat Sep 10 09:40:00 2011 (r225467) +++ user/attilio/vmcontention/sys/netinet/sctp_output.c Sat Sep 10 12:36:11 2011 (r225468) @@ -9821,19 +9821,22 @@ sctp_chunk_output(struct sctp_inpcb *inp unsigned int burst_cnt = 0; struct timeval now; int now_filled = 0; - int nagle_on = 0; + int nagle_on; int frag_point = sctp_get_frag_point(stcb, &stcb->asoc); int un_sent = 0; int fr_done; unsigned int tot_frs = 0; asoc = &stcb->asoc; + /* The Nagle algorithm is only applied when handling a send call. */ if (from_where == SCTP_OUTPUT_FROM_USR_SEND) { if (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_NODELAY)) { nagle_on = 0; } else { nagle_on = 1; } + } else { + nagle_on = 0; } SCTP_TCB_LOCK_ASSERT(stcb); @@ -10007,15 +10010,18 @@ sctp_chunk_output(struct sctp_inpcb *inp } } if (nagle_on) { - /*- - * When nagle is on, we look at how much is un_sent, then - * if its smaller than an MTU and we have data in - * flight we stop. + /* + * When the Nagle algorithm is used, look at how + * much is unsent, then if its smaller than an MTU + * and we have data in flight we stop, except if we + * are handling a fragmented user message. */ un_sent = ((stcb->asoc.total_output_queue_size - stcb->asoc.total_flight) + (stcb->asoc.stream_queue_cnt * sizeof(struct sctp_data_chunk))); if ((un_sent < (int)(stcb->asoc.smallest_mtu - SCTP_MIN_OVERHEAD)) && - (stcb->asoc.total_flight > 0)) { + (stcb->asoc.total_flight > 0) && + ((stcb->asoc.locked_on_sending == NULL) || + sctp_is_feature_on(inp, SCTP_PCB_FLAGS_EXPLICIT_EOR))) { break; } } Modified: user/attilio/vmcontention/usr.sbin/bsdinstall/scripts/mirrorselect ============================================================================== --- user/attilio/vmcontention/usr.sbin/bsdinstall/scripts/mirrorselect Sat Sep 10 09:40:00 2011 (r225467) +++ user/attilio/vmcontention/usr.sbin/bsdinstall/scripts/mirrorselect Sat Sep 10 12:36:11 2011 (r225468) @@ -45,6 +45,7 @@ MIRROR=`dialog --backtitle "FreeBSD Inst ftp://ftp3.ie.freebsd.org "IPv6 Ireland"\ ftp://ftp.il.freebsd.org "IPv6 Israel"\ ftp://ftp2.jp.freebsd.org "IPv6 Japan"\ + ftp://ftp4.se.freebsd.org "IPv6 Sweden"\ ftp://ftp4.us.freebsd.org "IPv6 USA"\ ftp://ftp2.tr.freebsd.org "IPv6 Turkey"\ ftp://ftp1.freebsd.org "Primary"\ Modified: user/attilio/vmcontention/usr.sbin/pc-sysinstall/backend/functions-ftp.sh ============================================================================== --- user/attilio/vmcontention/usr.sbin/pc-sysinstall/backend/functions-ftp.sh Sat Sep 10 09:40:00 2011 (r225467) +++ user/attilio/vmcontention/usr.sbin/pc-sysinstall/backend/functions-ftp.sh Sat Sep 10 12:36:11 2011 (r225468) @@ -40,6 +40,7 @@ IPv6 Main Site: ftp.freebsd.org|\ IPv6 Ireland: ftp3.ie.freebsd.org|\ IPv6 Israel: ftp.il.freebsd.org|\ IPv6 Japan: ftp2.jp.freebsd.org|\ +IPv6 Sweden: ftp4.se.freebsd.org|\ IPv6 USA: ftp4.us.freebsd.org|\ IPv6 Turkey: ftp2.tr.freebsd.org" @@ -212,6 +213,7 @@ SWEDEN_FTP_SERVERS="\ Sweden: ftp.se.freebsd.org|\ Sweden #2: ftp2.se.freebsd.org|\ Sweden #3: ftp3.se.freebsd.org|\ +Sweden #4: ftp4.se.freebsd.org|\ Sweden #5: ftp5.se.freebsd.org" SWITZERLAND_FTP_SERVERS="\