From owner-svn-src-stable-8@FreeBSD.ORG Sun May 22 15:01:03 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2311E106564A; Sun, 22 May 2011 15:01:03 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 12ADD8FC0A; Sun, 22 May 2011 15:01: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 p4MF12Nc079092; Sun, 22 May 2011 15:01:02 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4MF12uH079088; Sun, 22 May 2011 15:01:02 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201105221501.p4MF12uH079088@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 22 May 2011 15:01:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222180 - in stable/8/sys: dev/bm powerpc/powermac X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 15:01:03 -0000 Author: nwhitehorn Date: Sun May 22 15:01:02 2011 New Revision: 222180 URL: http://svn.freebsd.org/changeset/base/222180 Log: MFC r221519,221813: Do not use Open Firmware to open the device and instead program its start on our own. This prevents hangs at boot when using a bm(4) NIC where the cable is not plugged in at boot time. Obtained from: NetBSD Modified: stable/8/sys/dev/bm/if_bm.c stable/8/sys/powerpc/powermac/macio.c stable/8/sys/powerpc/powermac/maciovar.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/bm/if_bm.c ============================================================================== --- stable/8/sys/dev/bm/if_bm.c Sun May 22 14:23:48 2011 (r222179) +++ stable/8/sys/dev/bm/if_bm.c Sun May 22 15:01:02 2011 (r222180) @@ -558,6 +558,7 @@ bm_attach(device_t dev) } /* alloc interrupt */ + bm_disable_interrupts(sc); sc->sc_txdmairqid = BM_TXDMA_INTERRUPT; sc->sc_txdmairq = bus_alloc_resource_any(dev, SYS_RES_IRQ, @@ -591,9 +592,6 @@ bm_attach(device_t dev) eaddr = sc->sc_enaddr; OF_getprop(node, "local-mac-address", eaddr, ETHER_ADDR_LEN); - /* reset the adapter */ - bm_chip_setup(sc); - /* * Setup MII * On Apple BMAC controllers, we end up in a weird state of @@ -608,6 +606,9 @@ bm_attach(device_t dev) return (error); } + /* reset the adapter */ + bm_chip_setup(sc); + sc->sc_mii = device_get_softc(sc->sc_miibus); if_initname(ifp, device_get_name(sc->sc_dev), @@ -1129,31 +1130,16 @@ bm_chip_setup(struct bm_softc *sc) { uint16_t reg; uint16_t *eaddr_sect; - char path[128]; - ihandle_t bmac_ih; eaddr_sect = (uint16_t *)(sc->sc_enaddr); - - /* - * Enable BMAC cell by opening and closing its OF node. This enables - * the cell in macio as a side effect. We should probably directly - * twiddle the FCR bits, but we lack a good interface for this at the - * present time. - */ - - OF_package_to_path(ofw_bus_get_node(sc->sc_dev), path, sizeof(path)); - bmac_ih = OF_open(path); - if (bmac_ih == -1) { - device_printf(sc->sc_dev, - "Enabling BMAC cell failed! Hoping it's already active.\n"); - } else { - OF_close(bmac_ih); - } + dbdma_stop(sc->sc_txdma); + dbdma_stop(sc->sc_rxdma); /* Reset chip */ CSR_WRITE_2(sc, BM_RX_RESET, 0x0000); CSR_WRITE_2(sc, BM_TX_RESET, 0x0001); do { + DELAY(10); reg = CSR_READ_2(sc, BM_TX_RESET); } while (reg & 0x0001); Modified: stable/8/sys/powerpc/powermac/macio.c ============================================================================== --- stable/8/sys/powerpc/powermac/macio.c Sun May 22 14:23:48 2011 (r222179) +++ stable/8/sys/powerpc/powermac/macio.c Sun May 22 15:01:02 2011 (r222180) @@ -64,6 +64,10 @@ struct macio_softc { vm_offset_t sc_base; vm_offset_t sc_size; struct rman sc_mem_rman; + + /* FCR registers */ + int sc_memrid; + struct resource *sc_memr; }; static MALLOC_DEFINE(M_MACIO, "macio", "macio device information"); @@ -288,6 +292,10 @@ macio_attach(device_t dev) sc->sc_base = reg[2]; sc->sc_size = MACIO_REG_SIZE; + sc->sc_memrid = PCIR_BAR(0); + sc->sc_memr = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + &sc->sc_memrid, RF_ACTIVE); + sc->sc_mem_rman.rm_type = RMAN_ARRAY; sc->sc_mem_rman.rm_descr = "MacIO Device Memory"; error = rman_init(&sc->sc_mem_rman); @@ -339,6 +347,29 @@ macio_attach(device_t dev) continue; } device_set_ivars(cdev, dinfo); + + /* Set FCRs to enable some devices */ + if (sc->sc_memr == NULL) + continue; + + if (strcmp(ofw_bus_get_name(cdev), "bmac") == 0 || + strcmp(ofw_bus_get_compat(cdev), "bmac+") == 0) { + uint32_t fcr; + + fcr = bus_read_4(sc->sc_memr, HEATHROW_FCR); + + fcr |= FCR_ENET_ENABLE & ~FCR_ENET_RESET; + bus_write_4(sc->sc_memr, HEATHROW_FCR, fcr); + DELAY(50000); + fcr |= FCR_ENET_RESET; + bus_write_4(sc->sc_memr, HEATHROW_FCR, fcr); + DELAY(50000); + fcr &= ~FCR_ENET_RESET; + bus_write_4(sc->sc_memr, HEATHROW_FCR, fcr); + DELAY(50000); + + bus_write_4(sc->sc_memr, HEATHROW_FCR, fcr); + } } return (bus_generic_attach(dev)); Modified: stable/8/sys/powerpc/powermac/maciovar.h ============================================================================== --- stable/8/sys/powerpc/powermac/maciovar.h Sun May 22 14:23:48 2011 (r222179) +++ stable/8/sys/powerpc/powermac/maciovar.h Sun May 22 15:01:02 2011 (r222180) @@ -38,6 +38,16 @@ #define MACIO_REG_SIZE 0x7ffff /* + * Feature Control Registers (FCR) + */ +#define HEATHROW_FCR 0x38 +#define KEYLARGO_FCR0 0x38 +#define KEYLARGO_FCR1 0x3c + +#define FCR_ENET_ENABLE 0x60000000 +#define FCR_ENET_RESET 0x80000000 + +/* * Format of a macio reg property entry. */ struct macio_reg { From owner-svn-src-stable-8@FreeBSD.ORG Sun May 22 15:14:21 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD9E8106564A; Sun, 22 May 2011 15:14:21 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AE5118FC0C; Sun, 22 May 2011 15:14:21 +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 p4MFELUq079526; Sun, 22 May 2011 15:14:21 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4MFELme079524; Sun, 22 May 2011 15:14:21 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201105221514.p4MFELme079524@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 22 May 2011 15:14:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222181 - stable/8/sys/powerpc/conf X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 15:14:21 -0000 Author: nwhitehorn Date: Sun May 22 15:14:21 2011 New Revision: 222181 URL: http://svn.freebsd.org/changeset/base/222181 Log: MFC r221550: SMP has worked perfectly for a very long time on 32-bit PowerPC on both UP and SMP hardware. Enable it in GENERIC. Modified: stable/8/sys/powerpc/conf/GENERIC Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/powerpc/conf/GENERIC ============================================================================== --- stable/8/sys/powerpc/conf/GENERIC Sun May 22 15:01:02 2011 (r222180) +++ stable/8/sys/powerpc/conf/GENERIC Sun May 22 15:14:21 2011 (r222181) @@ -72,7 +72,7 @@ options KDB # Kernel debugger related options KDB_TRACE # Print a stack trace for a panic # To make an SMP kernel, the next line is needed -#options SMP # Symmetric MultiProcessor Kernel +options SMP # Symmetric MultiProcessor Kernel # CPU frequency control device cpufreq From owner-svn-src-stable-8@FreeBSD.ORG Sun May 22 22:28:08 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 003B5106564A; Sun, 22 May 2011 22:28:07 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CA3AA8FC12; Sun, 22 May 2011 22:28:07 +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 p4MMS7VR093516; Sun, 22 May 2011 22:28:07 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4MMS7LK093514; Sun, 22 May 2011 22:28:07 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201105222228.p4MMS7LK093514@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 22 May 2011 22:28:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222208 - stable/8/bin/sh X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 22:28:08 -0000 Author: jilles Date: Sun May 22 22:28:07 2011 New Revision: 222208 URL: http://svn.freebsd.org/changeset/base/222208 Log: MFC r208489,r216208: sh: Reap any zombies before forking for a background command. This prevents accumulating huge amounts of zombies if a script executes many background commands but no external commands or subshells. Note that zombies will not be reaped during long calculations (within the shell process) or read builtins, but those actions do not create more zombies. The terminated background commands will also still be remembered by the shell. r216208 fixes a bug in r208489 that could cause a multi-command pipeline to be marked as done before all processes had been created. PR: bin/55346 Modified: stable/8/bin/sh/jobs.c Directory Properties: stable/8/bin/sh/ (props changed) Modified: stable/8/bin/sh/jobs.c ============================================================================== --- stable/8/bin/sh/jobs.c Sun May 22 22:17:06 2011 (r222207) +++ stable/8/bin/sh/jobs.c Sun May 22 22:28:07 2011 (r222208) @@ -91,6 +91,7 @@ static void freejob(struct job *); static struct job *getjob(char *); static pid_t dowait(int, struct job *); static pid_t waitproc(int, int *); +static void checkzombies(void); static void cmdtxt(union node *); static void cmdputs(const char *); #if JOBS @@ -400,7 +401,7 @@ showjobs(int change, int mode) struct job *jp; TRACE(("showjobs(%d) called\n", change)); - while (dowait(0, (struct job *)NULL) > 0); + checkzombies(); for (jobno = 1, jp = jobtab ; jobno <= njobs ; jobno++, jp++) { if (! jp->used) continue; @@ -742,6 +743,8 @@ forkshell(struct job *jp, union node *n, TRACE(("forkshell(%%%td, %p, %d) called\n", jp - jobtab, (void *)n, mode)); INTOFF; + if (mode == FORK_BG && (jp == NULL || jp->nprocs == 0)) + checkzombies(); flushall(); pid = fork(); if (pid == -1) { @@ -948,7 +951,7 @@ dowait(int block, struct job *job) INTOFF; thisjob = NULL; for (jp = jobtab ; jp < jobtab + njobs ; jp++) { - if (jp->used) { + if (jp->used && jp->nprocs > 0) { done = 1; stopped = 1; for (sp = jp->ps ; sp < jp->ps + jp->nprocs ; sp++) { @@ -1062,6 +1065,15 @@ stoppedjobs(void) return (0); } + +static void +checkzombies(void) +{ + while (njobs > 0 && dowait(0, NULL) > 0) + ; +} + + /* * Return a string identifying a command (to be printed by the * jobs command. From owner-svn-src-stable-8@FreeBSD.ORG Mon May 23 13:02:04 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E7FE1065670; Mon, 23 May 2011 13:02:04 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7ECDF8FC18; Mon, 23 May 2011 13:02:04 +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 p4ND24NK022957; Mon, 23 May 2011 13:02:04 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4ND24am022955; Mon, 23 May 2011 13:02:04 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201105231302.p4ND24am022955@svn.freebsd.org> From: Sergey Kandaurov Date: Mon, 23 May 2011 13:02:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222212 - stable/8/usr.sbin/ifmcstat X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 13:02:04 -0000 Author: pluknet Date: Mon May 23 13:02:04 2011 New Revision: 222212 URL: http://svn.freebsd.org/changeset/base/222212 Log: MFC r222025: Fix manual section number for netstat(1). Modified: stable/8/usr.sbin/ifmcstat/ifmcstat.8 Directory Properties: stable/8/usr.sbin/ifmcstat/ (props changed) Modified: stable/8/usr.sbin/ifmcstat/ifmcstat.8 ============================================================================== --- stable/8/usr.sbin/ifmcstat/ifmcstat.8 Mon May 23 09:40:21 2011 (r222211) +++ stable/8/usr.sbin/ifmcstat/ifmcstat.8 Mon May 23 13:02:04 2011 (r222212) @@ -125,7 +125,7 @@ This support is recommended for debuggin It requires super-user privilege if used to inspect a running kernel. .Pp .Sh SEE ALSO +.Xr netstat 1 , .Xr getifaddrs 3 , .Xr getifmaddrs 3 , -.Xr kvm 3 , -.Xr netstat 8 +.Xr kvm 3 From owner-svn-src-stable-8@FreeBSD.ORG Mon May 23 14:16:45 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94CED106564A; Mon, 23 May 2011 14:16:45 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 84CDB8FC16; Mon, 23 May 2011 14:16:45 +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 p4NEGjeX025236; Mon, 23 May 2011 14:16:45 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4NEGj0t025234; Mon, 23 May 2011 14:16:45 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201105231416.p4NEGj0t025234@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 23 May 2011 14:16:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222214 - stable/8/sys/powerpc/aim X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2011 14:16:45 -0000 Author: nwhitehorn Date: Mon May 23 14:16:45 2011 New Revision: 222214 URL: http://svn.freebsd.org/changeset/base/222214 Log: MFC r221981: Remove a useless check that could break early boot if the page zero routines are called too early in the boot process. Modified: stable/8/sys/powerpc/aim/mmu_oea64.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- stable/8/sys/powerpc/aim/mmu_oea64.c Mon May 23 13:51:57 2011 (r222213) +++ stable/8/sys/powerpc/aim/mmu_oea64.c Mon May 23 14:16:45 2011 (r222214) @@ -1144,8 +1144,6 @@ moea64_zero_page_area(mmu_t mmu, vm_page { vm_offset_t pa = VM_PAGE_TO_PHYS(m); - if (!moea64_initialized) - panic("moea64_zero_page: can't zero pa %#x", pa); if (size + off > PAGE_SIZE) panic("moea64_zero_page: size + off > PAGE_SIZE"); @@ -1165,9 +1163,6 @@ moea64_zero_page(mmu_t mmu, vm_page_t m) vm_offset_t pa = VM_PAGE_TO_PHYS(m); vm_offset_t off; - if (!moea64_initialized) - panic("moea64_zero_page: can't zero pa %#x", pa); - mtx_lock(&moea64_scratchpage_mtx); moea64_set_scratchpage_pa(0,pa); From owner-svn-src-stable-8@FreeBSD.ORG Tue May 24 16:04:36 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B343106566B; Tue, 24 May 2011 16:04:36 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3A0FC8FC0A; Tue, 24 May 2011 16:04: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 p4OG4aqK076447; Tue, 24 May 2011 16:04:36 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4OG4aCB076443; Tue, 24 May 2011 16:04:36 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201105241604.p4OG4aCB076443@svn.freebsd.org> From: Matthew D Fleming Date: Tue, 24 May 2011 16:04:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222261 - in stable/8: share/man/man3 sys/sys X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 May 2011 16:04:36 -0000 Author: mdf Date: Tue May 24 16:04:35 2011 New Revision: 222261 URL: http://svn.freebsd.org/changeset/base/222261 Log: MFC r221843: Note that the _SWAP operation is supported for all list/queue types. Also place STAILQ_REMOVE_HEAD in alphabetical order. Lastly, document the _SWAP macros. PR: kern/143033 Modified: stable/8/share/man/man3/Makefile stable/8/share/man/man3/queue.3 stable/8/sys/sys/queue.h Directory Properties: stable/8/share/man/man3/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/share/man/man3/Makefile ============================================================================== --- stable/8/share/man/man3/Makefile Tue May 24 15:47:40 2011 (r222260) +++ stable/8/share/man/man3/Makefile Tue May 24 16:04:35 2011 (r222261) @@ -53,6 +53,7 @@ MLINKS+= queue.3 LIST_EMPTY.3 \ queue.3 LIST_INSERT_HEAD.3 \ queue.3 LIST_NEXT.3 \ queue.3 LIST_REMOVE.3 \ + queue.3 LIST_SWAP.3 \ queue.3 SLIST_EMPTY.3 \ queue.3 SLIST_ENTRY.3 \ queue.3 SLIST_FIRST.3 \ @@ -67,6 +68,7 @@ MLINKS+= queue.3 LIST_EMPTY.3 \ queue.3 SLIST_REMOVE.3 \ queue.3 SLIST_REMOVE_AFTER.3 \ queue.3 SLIST_REMOVE_HEAD.3 \ + queue.3 SLIST_SWAP.3 \ queue.3 STAILQ_CONCAT.3 \ queue.3 STAILQ_EMPTY.3 \ queue.3 STAILQ_ENTRY.3 \ @@ -84,6 +86,7 @@ MLINKS+= queue.3 LIST_EMPTY.3 \ queue.3 STAILQ_REMOVE.3 \ queue.3 STAILQ_REMOVE_AFTER.3 \ queue.3 STAILQ_REMOVE_HEAD.3 \ + queue.3 STAILQ_SWAP.3 \ queue.3 TAILQ_CONCAT.3 \ queue.3 TAILQ_EMPTY.3 \ queue.3 TAILQ_ENTRY.3 \ @@ -102,7 +105,8 @@ MLINKS+= queue.3 LIST_EMPTY.3 \ queue.3 TAILQ_LAST.3 \ queue.3 TAILQ_NEXT.3 \ queue.3 TAILQ_PREV.3 \ - queue.3 TAILQ_REMOVE.3 + queue.3 TAILQ_REMOVE.3 \ + queue.3 TAILQ_SWAP.3 MLINKS+= stdarg.3 va_arg.3 \ stdarg.3 va_copy.3 \ stdarg.3 va_end.3 \ Modified: stable/8/share/man/man3/queue.3 ============================================================================== --- stable/8/share/man/man3/queue.3 Tue May 24 15:47:40 2011 (r222260) +++ stable/8/share/man/man3/queue.3 Tue May 24 16:04:35 2011 (r222261) @@ -32,7 +32,7 @@ .\" @(#)queue.3 8.2 (Berkeley) 1/24/94 .\" $FreeBSD$ .\" -.Dd March 24, 2006 +.Dd May 13, 2011 .Dt QUEUE 3 .Os .Sh NAME @@ -50,6 +50,7 @@ .Nm SLIST_REMOVE_AFTER , .Nm SLIST_REMOVE_HEAD , .Nm SLIST_REMOVE , +.Nm SLIST_SWAP , .Nm STAILQ_CONCAT , .Nm STAILQ_EMPTY , .Nm STAILQ_ENTRY , @@ -67,6 +68,7 @@ .Nm STAILQ_REMOVE_AFTER , .Nm STAILQ_REMOVE_HEAD , .Nm STAILQ_REMOVE , +.Nm STAILQ_SWAP , .Nm LIST_EMPTY , .Nm LIST_ENTRY , .Nm LIST_FIRST , @@ -80,6 +82,7 @@ .Nm LIST_INSERT_HEAD , .Nm LIST_NEXT , .Nm LIST_REMOVE , +.Nm LIST_SWAP , .Nm TAILQ_CONCAT , .Nm TAILQ_EMPTY , .Nm TAILQ_ENTRY , @@ -98,7 +101,8 @@ .Nm TAILQ_LAST , .Nm TAILQ_NEXT , .Nm TAILQ_PREV , -.Nm TAILQ_REMOVE +.Nm TAILQ_REMOVE , +.Nm TAILQ_SWAP .Nd implementations of singly-linked lists, singly-linked tail queues, lists and tail queues .Sh SYNOPSIS @@ -118,6 +122,7 @@ lists and tail queues .Fn SLIST_REMOVE_AFTER "TYPE *elm" "SLIST_ENTRY NAME" .Fn SLIST_REMOVE_HEAD "SLIST_HEAD *head" "SLIST_ENTRY NAME" .Fn SLIST_REMOVE "SLIST_HEAD *head" "TYPE *elm" "TYPE" "SLIST_ENTRY NAME" +.Fn SLIST_SWAP "SLIST_HEAD *head1" "SLIST_HEAD *head2" "SLIST_ENTRY NAME" .\" .Fn STAILQ_CONCAT "STAILQ_HEAD *head1" "STAILQ_HEAD *head2" .Fn STAILQ_EMPTY "STAILQ_HEAD *head" @@ -136,6 +141,7 @@ lists and tail queues .Fn STAILQ_REMOVE_AFTER "STAILQ_HEAD *head" "TYPE *elm" "STAILQ_ENTRY NAME" .Fn STAILQ_REMOVE_HEAD "STAILQ_HEAD *head" "STAILQ_ENTRY NAME" .Fn STAILQ_REMOVE "STAILQ_HEAD *head" "TYPE *elm" "TYPE" "STAILQ_ENTRY NAME" +.Fn STAILQ_SWAP "STAILQ_HEAD *head1" "STAILQ_HEAD *head2" "STAILQ_ENTRY NAME" .\" .Fn LIST_EMPTY "LIST_HEAD *head" .Fn LIST_ENTRY "TYPE" @@ -150,6 +156,7 @@ lists and tail queues .Fn LIST_INSERT_HEAD "LIST_HEAD *head" "TYPE *elm" "LIST_ENTRY NAME" .Fn LIST_NEXT "TYPE *elm" "LIST_ENTRY NAME" .Fn LIST_REMOVE "TYPE *elm" "LIST_ENTRY NAME" +.Fn LIST_SWAP "LIST_HEAD *head1" "LIST_HEAD *head2" "TYPE" "LIST_ENTRY NAME" .\" .Fn TAILQ_CONCAT "TAILQ_HEAD *head1" "TAILQ_HEAD *head2" "TAILQ_ENTRY NAME" .Fn TAILQ_EMPTY "TAILQ_HEAD *head" @@ -170,6 +177,7 @@ lists and tail queues .Fn TAILQ_NEXT "TYPE *elm" "TAILQ_ENTRY NAME" .Fn TAILQ_PREV "TYPE *elm" "HEADNAME" "TAILQ_ENTRY NAME" .Fn TAILQ_REMOVE "TAILQ_HEAD *head" "TYPE *elm" "TAILQ_ENTRY NAME" +.Fn TAILQ_SWAP "TAILQ_HEAD *head1" "TAILQ_HEAD *head2" "TYPE" "TAILQ_ENTRY NAME" .\" .Sh DESCRIPTION These macros define and operate on four types of data structures: @@ -184,6 +192,8 @@ Insertion of a new entry after any eleme O(1) removal of an entry from the head of the list. .It Forward traversal through the list. +.It +Swawpping the contents of two lists. .El .Pp Singly-linked lists are the simplest of the four data structures @@ -402,6 +412,13 @@ The macro removes the element .Fa elm from the list. +.Pp +The macro +.Nm SLIST_SWAP +swaps the contents of +.Fa head1 +and +.Fa head2 . .Sh SINGLY-LINKED LIST EXAMPLE .Bd -literal SLIST_HEAD(slisthead, entry) head = @@ -584,6 +601,13 @@ The macro removes the element .Fa elm from the tail queue. +.Pp +The macro +.Nm STAILQ_SWAP +swaps the contents of +.Fa head1 +and +.Fa head2 . .Sh SINGLY-LINKED TAIL QUEUE EXAMPLE .Bd -literal STAILQ_HEAD(stailhead, entry) head = @@ -743,6 +767,13 @@ The macro removes the element .Fa elm from the list. +.Pp +The macro +.Nm LIST_SWAP +swaps the contents of +.Fa head1 +and +.Fa head2 . .Sh LIST EXAMPLE .Bd -literal LIST_HEAD(listhead, entry) head = @@ -942,6 +973,13 @@ The macro removes the element .Fa elm from the tail queue. +.Pp +The macro +.Nm TAILQ_SWAP +swaps the contents of +.Fa head1 +and +.Fa head2 . .Sh TAIL QUEUE EXAMPLE .Bd -literal TAILQ_HEAD(tailhead, entry) head = Modified: stable/8/sys/sys/queue.h ============================================================================== --- stable/8/sys/sys/queue.h Tue May 24 15:47:40 2011 (r222260) +++ stable/8/sys/sys/queue.h Tue May 24 16:04:35 2011 (r222261) @@ -99,6 +99,7 @@ * _REMOVE_AFTER + - + - * _REMOVE_HEAD + - + - * _REMOVE + + + + + * _SWAP + + + + * */ #ifdef QUEUE_MACRO_DEBUG @@ -307,18 +308,18 @@ struct { \ TRASHIT(*oldnext); \ } while (0) -#define STAILQ_REMOVE_HEAD(head, field) do { \ - if ((STAILQ_FIRST((head)) = \ - STAILQ_NEXT(STAILQ_FIRST((head)), field)) == NULL) \ - (head)->stqh_last = &STAILQ_FIRST((head)); \ -} while (0) - #define STAILQ_REMOVE_AFTER(head, elm, field) do { \ if ((STAILQ_NEXT(elm, field) = \ STAILQ_NEXT(STAILQ_NEXT(elm, field), field)) == NULL) \ (head)->stqh_last = &STAILQ_NEXT((elm), field); \ } while (0) +#define STAILQ_REMOVE_HEAD(head, field) do { \ + if ((STAILQ_FIRST((head)) = \ + STAILQ_NEXT(STAILQ_FIRST((head)), field)) == NULL) \ + (head)->stqh_last = &STAILQ_FIRST((head)); \ +} while (0) + #define STAILQ_SWAP(head1, head2, type) do { \ struct type *swap_first = STAILQ_FIRST(head1); \ struct type **swap_last = (head1)->stqh_last; \ From owner-svn-src-stable-8@FreeBSD.ORG Tue May 24 21:12:52 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E04B61065740; Tue, 24 May 2011 21:12:52 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CF7858FC0C; Tue, 24 May 2011 21:12:52 +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 p4OLCqKT085858; Tue, 24 May 2011 21:12:52 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4OLCq2w085856; Tue, 24 May 2011 21:12:52 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201105242112.p4OLCq2w085856@svn.freebsd.org> From: Jilles Tjoelker Date: Tue, 24 May 2011 21:12:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222270 - stable/8/lib/libc/sys X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 May 2011 21:12:53 -0000 Author: jilles Date: Tue May 24 21:12:52 2011 New Revision: 222270 URL: http://svn.freebsd.org/changeset/base/222270 Log: MFC r222037: mq_setattr(2): Add missing const to man page. The declaration in the header file is correct. Modified: stable/8/lib/libc/sys/mq_setattr.2 Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/sys/mq_setattr.2 ============================================================================== --- stable/8/lib/libc/sys/mq_setattr.2 Tue May 24 20:39:07 2011 (r222269) +++ stable/8/lib/libc/sys/mq_setattr.2 Tue May 24 21:12:52 2011 (r222270) @@ -37,7 +37,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 29, 2005 +.Dd May 17, 2011 .Dt MQ_SETATTR 2 .Os .Sh NAME @@ -50,7 +50,7 @@ .Ft int .Fo mq_setattr .Fa "mqd_t mqdes" -.Fa "struct mq_attr *restrict mqstat" +.Fa "const struct mq_attr *restrict mqstat" .Fa "struct mq_attr *restrict omqstat" .Fc .Sh DESCRIPTION From owner-svn-src-stable-8@FreeBSD.ORG Wed May 25 03:25:14 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E29EB106564A; Wed, 25 May 2011 03:25:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D25FE8FC0C; Wed, 25 May 2011 03:25:14 +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 p4P3PEM8097172; Wed, 25 May 2011 03:25:14 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4P3PEvI097170; Wed, 25 May 2011 03:25:14 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201105250325.p4P3PEvI097170@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 25 May 2011 03:25:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222274 - stable/8/sys/kern X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2011 03:25:15 -0000 Author: kib Date: Wed May 25 03:25:14 2011 New Revision: 222274 URL: http://svn.freebsd.org/changeset/base/222274 Log: MFC r222086: The protection against the race with dev_rel(), introduced in r163328, should be extended to cover destroy_devl() calls for the children of the destroyed dev. Modified: stable/8/sys/kern/kern_conf.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/kern/kern_conf.c ============================================================================== --- stable/8/sys/kern/kern_conf.c Wed May 25 01:04:12 2011 (r222273) +++ stable/8/sys/kern/kern_conf.c Wed May 25 03:25:14 2011 (r222274) @@ -885,6 +885,8 @@ destroy_devl(struct cdev *dev) /* Remove name marking */ dev->si_flags &= ~SI_NAMED; + dev->si_refcount++; /* Avoid race with dev_rel() */ + /* If we are a child, remove us from the parents list */ if (dev->si_flags & SI_CHILD) { LIST_REMOVE(dev, si_siblings); @@ -901,7 +903,6 @@ destroy_devl(struct cdev *dev) dev->si_flags &= ~SI_CLONELIST; } - dev->si_refcount++; /* Avoid race with dev_rel() */ csw = dev->si_devsw; dev->si_devsw = NULL; /* already NULL for SI_ALIAS */ while (csw != NULL && csw->d_purge != NULL && dev->si_threadcount) { From owner-svn-src-stable-8@FreeBSD.ORG Wed May 25 10:38:50 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49B1C106566C; Wed, 25 May 2011 10:38:50 +0000 (UTC) (envelope-from oliver.pntr@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 374308FC17; Wed, 25 May 2011 10:38:49 +0000 (UTC) Received: by wyf23 with SMTP id 23so7680504wyf.13 for ; Wed, 25 May 2011 03:38:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=RmS310fRcmJKW1rSdT39D0bC0ZSJaQ9cQSTue8aUE5E=; b=a7dNc9WXXVhk0eqZlF1Rm7EdpTfFoaCdBtGVGYgw8YESZG1t5K4hzSq6wQdg0sWMKt GAlep4UohkBO9OQ5EOgtjFfYpFpy2Z53Su3+3w5seOGiRUzQPCAxjHjUOrx7Ft3c6w38 y6S45dCdLmdfOC7e2Z/6Nk+dyBsDPCpmIi6KU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=MvvkMosCI3iVk7A1yooOTSwk1efkSSUFa2s55YE7mQQwKVdA0+jpbWUhipmjvCJzcQ HoMeYy4CHVab49JbI4ZcCFn5UCf07/aIOJZ7b19+KSkvPcivlp3AtgYiyjxkF+9r5Wlv XcUl9ryVc5/sETYI7s5pcFTXJgaMUcrNcLyQY= MIME-Version: 1.0 Received: by 10.227.58.82 with SMTP id f18mr4471335wbh.45.1306318289256; Wed, 25 May 2011 03:11:29 -0700 (PDT) Received: by 10.227.209.209 with HTTP; Wed, 25 May 2011 03:11:29 -0700 (PDT) In-Reply-To: <201105250325.p4P3PEvI097170@svn.freebsd.org> References: <201105250325.p4P3PEvI097170@svn.freebsd.org> Date: Wed, 25 May 2011 12:11:29 +0200 Message-ID: From: Oliver Pinter To: Konstantin Belousov Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r222274 - stable/8/sys/kern X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2011 10:38:50 -0000 MFC to 7-STABLE? On 5/25/11, Konstantin Belousov wrote: > Author: kib > Date: Wed May 25 03:25:14 2011 > New Revision: 222274 > URL: http://svn.freebsd.org/changeset/base/222274 > > Log: > MFC r222086: > The protection against the race with dev_rel(), introduced in r163328, > should be extended to cover destroy_devl() calls for the children of the > destroyed dev. > > Modified: > stable/8/sys/kern/kern_conf.c > Directory Properties: > stable/8/sys/ (props changed) > stable/8/sys/amd64/include/xen/ (props changed) > stable/8/sys/cddl/contrib/opensolaris/ (props changed) > stable/8/sys/contrib/dev/acpica/ (props changed) > stable/8/sys/contrib/pf/ (props changed) > > Modified: stable/8/sys/kern/kern_conf.c > ============================================================================== > --- stable/8/sys/kern/kern_conf.c Wed May 25 01:04:12 2011 (r222273) > +++ stable/8/sys/kern/kern_conf.c Wed May 25 03:25:14 2011 (r222274) > @@ -885,6 +885,8 @@ destroy_devl(struct cdev *dev) > /* Remove name marking */ > dev->si_flags &= ~SI_NAMED; > > + dev->si_refcount++; /* Avoid race with dev_rel() */ > + > /* If we are a child, remove us from the parents list */ > if (dev->si_flags & SI_CHILD) { > LIST_REMOVE(dev, si_siblings); > @@ -901,7 +903,6 @@ destroy_devl(struct cdev *dev) > dev->si_flags &= ~SI_CLONELIST; > } > > - dev->si_refcount++; /* Avoid race with dev_rel() */ > csw = dev->si_devsw; > dev->si_devsw = NULL; /* already NULL for SI_ALIAS */ > while (csw != NULL && csw->d_purge != NULL && dev->si_threadcount) { > _______________________________________________ > svn-src-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-stable > To unsubscribe, send any mail to "svn-src-stable-unsubscribe@freebsd.org" > From owner-svn-src-stable-8@FreeBSD.ORG Wed May 25 11:47:59 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CEF0D10656D3; Wed, 25 May 2011 11:47:59 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 30F9D8FC20; Wed, 25 May 2011 11:47:57 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p4PBlrTY092935 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 25 May 2011 14:47:53 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id p4PBlrLP012432; Wed, 25 May 2011 14:47:53 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id p4PBlrGW012431; Wed, 25 May 2011 14:47:53 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 25 May 2011 14:47:53 +0300 From: Kostik Belousov To: Oliver Pinter Message-ID: <20110525114753.GY48734@deviant.kiev.zoral.com.ua> References: <201105250325.p4P3PEvI097170@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="CJhilzLIyAgaRUK6" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r222274 - stable/8/sys/kern X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2011 11:48:00 -0000 --CJhilzLIyAgaRUK6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 25, 2011 at 12:11:29PM +0200, Oliver Pinter wrote: > MFC to 7-STABLE? Somebody need to test it for 7 (I do not expect any failures, but I also prefer to not commit untested changes). The testing should include destroying some devfs nodes, e.g. by loading and unloading a driver that creates and destroys them. >=20 > On 5/25/11, Konstantin Belousov wrote: > > Author: kib > > Date: Wed May 25 03:25:14 2011 > > New Revision: 222274 > > URL: http://svn.freebsd.org/changeset/base/222274 > > > > Log: > > MFC r222086: > > The protection against the race with dev_rel(), introduced in r163328, > > should be extended to cover destroy_devl() calls for the children of = the > > destroyed dev. > > > > Modified: > > stable/8/sys/kern/kern_conf.c > > Directory Properties: > > stable/8/sys/ (props changed) > > stable/8/sys/amd64/include/xen/ (props changed) > > stable/8/sys/cddl/contrib/opensolaris/ (props changed) > > stable/8/sys/contrib/dev/acpica/ (props changed) > > stable/8/sys/contrib/pf/ (props changed) > > > > Modified: stable/8/sys/kern/kern_conf.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- stable/8/sys/kern/kern_conf.c Wed May 25 01:04:12 2011 (r222273) > > +++ stable/8/sys/kern/kern_conf.c Wed May 25 03:25:14 2011 (r222274) > > @@ -885,6 +885,8 @@ destroy_devl(struct cdev *dev) > > /* Remove name marking */ > > dev->si_flags &=3D ~SI_NAMED; > > > > + dev->si_refcount++; /* Avoid race with dev_rel() */ > > + > > /* If we are a child, remove us from the parents list */ > > if (dev->si_flags & SI_CHILD) { > > LIST_REMOVE(dev, si_siblings); > > @@ -901,7 +903,6 @@ destroy_devl(struct cdev *dev) > > dev->si_flags &=3D ~SI_CLONELIST; > > } > > > > - dev->si_refcount++; /* Avoid race with dev_rel() */ > > csw =3D dev->si_devsw; > > dev->si_devsw =3D NULL; /* already NULL for SI_ALIAS */ > > while (csw !=3D NULL && csw->d_purge !=3D NULL && dev->si_threadcount= ) { > > _______________________________________________ > > svn-src-stable@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/svn-src-stable > > To unsubscribe, send any mail to "svn-src-stable-unsubscribe@freebsd.or= g" > > --CJhilzLIyAgaRUK6 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk3c7GkACgkQC3+MBN1Mb4gDxwCeK/R6qSfnG9tedZr+Iw+jKY+N sn4AoLPok6OmOzCMZokuUCg3wp9cHv5t =qMp9 -----END PGP SIGNATURE----- --CJhilzLIyAgaRUK6-- From owner-svn-src-stable-8@FreeBSD.ORG Wed May 25 12:07:12 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86416106566C; Wed, 25 May 2011 12:07:12 +0000 (UTC) (envelope-from oliver.pntr@gmail.com) Received: from mail-wy0-f196.google.com (mail-wy0-f196.google.com [74.125.82.196]) by mx1.freebsd.org (Postfix) with ESMTP id 8741B8FC0C; Wed, 25 May 2011 12:07:11 +0000 (UTC) Received: by wyf28 with SMTP id 28so1054914wyf.7 for ; Wed, 25 May 2011 05:07:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=+dTqmNB/jENYiQytT9/zkozhKGZwwuXVmUulM/lpPb8=; b=i8PTtSv6PYUBupjCcJbM8NWQV3H3GG1fz/RCGGHpcXN6WBPx2b6YFmSKcxwjddwkhs AjFWBWJWubb9yQGLPXKotxkVM5gze2yYh/8dRFEbTW0og453bN5s4LAscGkLdZegKqs3 HmdQsciyXMbBqCUT/2q7RF3J68n7LVAw9O4oc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=l7eLQ5jxRVie3Df5hXqVyiuPl8KDxGUHsgME88S+Wi/Z9xXkLlHFVctCMUKd/rfPTa XlG6Zo7OTO/UVMId3F2IrrK/qDtdYVOVYuY2DIFxN/dtd/xKPeNIuT3ymqguOIJ826fl gg67sqMu+RZvKYfGRL3q2PZAjY8uoGdCtu5D4= MIME-Version: 1.0 Received: by 10.227.100.219 with SMTP id z27mr4642328wbn.45.1306325230240; Wed, 25 May 2011 05:07:10 -0700 (PDT) Received: by 10.227.209.209 with HTTP; Wed, 25 May 2011 05:07:10 -0700 (PDT) In-Reply-To: <20110525114753.GY48734@deviant.kiev.zoral.com.ua> References: <201105250325.p4P3PEvI097170@svn.freebsd.org> <20110525114753.GY48734@deviant.kiev.zoral.com.ua> Date: Wed, 25 May 2011 14:07:10 +0200 Message-ID: From: Oliver Pinter To: Kostik Belousov Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r222274 - stable/8/sys/kern X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2011 12:07:12 -0000 this or likely this script is enough for test? ---8<--- #!/bin/csh @ a = 100 while ( $a ) foreach i ( "umass" "cdce" "foo" "bar" ) kldload $i& end foreach i ( "umass" "cdce" "foo" "bar" ) kldunload $i& end @ a-- end ---8<--- On 5/25/11, Kostik Belousov wrote: > On Wed, May 25, 2011 at 12:11:29PM +0200, Oliver Pinter wrote: >> MFC to 7-STABLE? > Somebody need to test it for 7 (I do not expect any failures, but I also > prefer to not commit untested changes). > > The testing should include destroying some devfs nodes, e.g. by loading > and unloading a driver that creates and destroys them. >> >> On 5/25/11, Konstantin Belousov wrote: >> > Author: kib >> > Date: Wed May 25 03:25:14 2011 >> > New Revision: 222274 >> > URL: http://svn.freebsd.org/changeset/base/222274 >> > >> > Log: >> > MFC r222086: >> > The protection against the race with dev_rel(), introduced in r163328, >> > should be extended to cover destroy_devl() calls for the children of >> > the >> > destroyed dev. >> > >> > Modified: >> > stable/8/sys/kern/kern_conf.c >> > Directory Properties: >> > stable/8/sys/ (props changed) >> > stable/8/sys/amd64/include/xen/ (props changed) >> > stable/8/sys/cddl/contrib/opensolaris/ (props changed) >> > stable/8/sys/contrib/dev/acpica/ (props changed) >> > stable/8/sys/contrib/pf/ (props changed) >> > >> > Modified: stable/8/sys/kern/kern_conf.c >> > ============================================================================== >> > --- stable/8/sys/kern/kern_conf.c Wed May 25 01:04:12 2011 (r222273) >> > +++ stable/8/sys/kern/kern_conf.c Wed May 25 03:25:14 2011 (r222274) >> > @@ -885,6 +885,8 @@ destroy_devl(struct cdev *dev) >> > /* Remove name marking */ >> > dev->si_flags &= ~SI_NAMED; >> > >> > + dev->si_refcount++; /* Avoid race with dev_rel() */ >> > + >> > /* If we are a child, remove us from the parents list */ >> > if (dev->si_flags & SI_CHILD) { >> > LIST_REMOVE(dev, si_siblings); >> > @@ -901,7 +903,6 @@ destroy_devl(struct cdev *dev) >> > dev->si_flags &= ~SI_CLONELIST; >> > } >> > >> > - dev->si_refcount++; /* Avoid race with dev_rel() */ >> > csw = dev->si_devsw; >> > dev->si_devsw = NULL; /* already NULL for SI_ALIAS */ >> > while (csw != NULL && csw->d_purge != NULL && dev->si_threadcount) { >> > _______________________________________________ >> > svn-src-stable@freebsd.org mailing list >> > http://lists.freebsd.org/mailman/listinfo/svn-src-stable >> > To unsubscribe, send any mail to >> > "svn-src-stable-unsubscribe@freebsd.org" >> > > From owner-svn-src-stable-8@FreeBSD.ORG Wed May 25 12:35:56 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5B891065673; Wed, 25 May 2011 12:35:56 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 2BA428FC0A; Wed, 25 May 2011 12:35:55 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p4PCZqii097166 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 25 May 2011 15:35:52 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id p4PCZqsA012636; Wed, 25 May 2011 15:35:52 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id p4PCZquI012635; Wed, 25 May 2011 15:35:52 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 25 May 2011 15:35:52 +0300 From: Kostik Belousov To: Oliver Pinter Message-ID: <20110525123552.GZ48734@deviant.kiev.zoral.com.ua> References: <201105250325.p4P3PEvI097170@svn.freebsd.org> <20110525114753.GY48734@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lIACWvcN4zbvddwE" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r222274 - stable/8/sys/kern X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2011 12:35:56 -0000 --lIACWvcN4zbvddwE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 25, 2011 at 02:07:10PM +0200, Oliver Pinter wrote: > this or likely this script is enough for test? >=20 > ---8<--- > #!/bin/csh >=20 > @ a =3D 100 >=20 > while ( $a ) > foreach i ( "umass" "cdce" "foo" "bar" ) > kldload $i& > end >=20 > foreach i ( "umass" "cdce" "foo" "bar" ) > kldunload $i& > end > @ a-- > end > ---8<--- Only if the unload of any of the listed modules caused destruction of some devfs node. May be, the easiest for 7 is to create some md(4) device and then destroy it. >=20 > On 5/25/11, Kostik Belousov wrote: > > On Wed, May 25, 2011 at 12:11:29PM +0200, Oliver Pinter wrote: > >> MFC to 7-STABLE? > > Somebody need to test it for 7 (I do not expect any failures, but I also > > prefer to not commit untested changes). > > > > The testing should include destroying some devfs nodes, e.g. by loading > > and unloading a driver that creates and destroys them. --lIACWvcN4zbvddwE Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk3c96gACgkQC3+MBN1Mb4jN+gCfYweZ+nNPL40kPBn7gLohHlW+ vZkAoOZHf1vc5slUTcqOOggKer7gsqXK =XPgj -----END PGP SIGNATURE----- --lIACWvcN4zbvddwE-- From owner-svn-src-stable-8@FreeBSD.ORG Wed May 25 12:44:06 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFF49106564A; Wed, 25 May 2011 12:44:06 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe08.c2i.net [212.247.154.226]) by mx1.freebsd.org (Postfix) with ESMTP id 193008FC19; Wed, 25 May 2011 12:44:05 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=PvOwS0pD1JWuCk2fMyCiv7x8TRi/oBifOus6FmFACNc= c=1 sm=1 a=SvYTsOw2Z4kA:10 a=znY1EK7YxjgA:10 a=WQU8e4WWZSUA:10 a=N659UExz7-8A:10 a=CL8lFSKtTFcA:10 a=i9M/sDlu2rpZ9XS819oYzg==:17 a=Q3djBhys-B7GKNhH8A8A:9 a=ES_TbjBnMMOoGF6-hywA:7 a=pILNOxqGKmIA:10 a=i9M/sDlu2rpZ9XS819oYzg==:117 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe08.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 131519804; Wed, 25 May 2011 14:34:01 +0200 From: Hans Petter Selasky To: Oliver Pinter Date: Wed, 25 May 2011 14:32:48 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.2-STABLE; KDE/4.4.5; amd64; ; ) References: <20110525114753.GY48734@deviant.kiev.zoral.com.ua> In-Reply-To: X-Face: *nPdTl_}RuAI6^PVpA02T?$%Xa^>@hE0uyUIoiha$pC:9TVgl.Oq,NwSZ4V" =?windows-1252?q?=7CLR=2E+tj=7Dg5=0A=09=25V?=,x^qOs~mnU3]Gn; cQLv&.N>TrxmSFf+p6(30a/{)KUU!s}w\IhQBj}[g}bj0I3^glmC( =?windows-1252?q?=0A=09=3AAuzV9=3A=2EhESm-x4h240C=609=3Dw?= MIME-Version: 1.0 Content-Type: Text/Plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Message-Id: <201105251432.48118.hselasky@c2i.net> Cc: Kostik Belousov , "svn-src-stable@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , "svn-src-stable-8@freebsd.org" Subject: Re: svn commit: r222274 - stable/8/sys/kern X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2011 12:44:06 -0000 On Wednesday 25 May 2011 14:07:10 Oliver Pinter wrote: > this or likely this script is enough for test? > > ---8<--- > #!/bin/csh > > @ a = 100 > > while ( $a ) > foreach i ( "umass" "cdce" "foo" "bar" ) > kldload $i& > end > > foreach i ( "umass" "cdce" "foo" "bar" ) > kldunload $i& > end > @ a-- > end > ---8<--- Hi, Have you thought about: /usr/ports/multimedia/cuse4bsd ? Create some threads and: struct cuse_dev * cuse_dev_create(const struct cuse_methods *mtod, void *priv0, void *priv1, uid_t, gid_t, int permission, const char *fmt, ...) This function creates a new character device according to the given parameters. This function returns a valid cuse_dev structure pointer on success or NULL on failure. The device name can only contain a-z, A-Z, 0-9, dot, / and underscore characters. and void cuse_dev_destroy(struct cuse_dev *) This functions destroys a previ- ously created character device. Should also work under FreeBSD 7.x from what I know. --HPS From owner-svn-src-stable-8@FreeBSD.ORG Wed May 25 22:02:30 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2EB46106564A; Wed, 25 May 2011 22:02:30 +0000 (UTC) (envelope-from oliver.pntr@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 2E51A8FC17; Wed, 25 May 2011 22:02:28 +0000 (UTC) Received: by wyf23 with SMTP id 23so100531wyf.13 for ; Wed, 25 May 2011 15:02:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=nVLq7PG+p1JfW5LNEsAyrin4T+b8hEulD/M9ZXSWVpw=; b=SZ2vH9jAdfA1QfWaBeeocyAfs5XFP2ogAQ/iWfKR3iIi7mf0vWrMxkSoo8JPZk75tu 1p1VE04b24sN0qvpy5bYbYLoU82QxLg4zUT+/VwrjO50J3QhvqXhuINEsFdfcdKHUv2X 7HhGGjTizNnAom2WC2APeJYm2weP5EYfzLgww= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=LRIC6TLSh6lBfdwVnTBbYsQESMcfJ1kLPpharmiRPDHl0es+WaNvsGgzcUth8bIf1M cFm1fPmwdk4JQ27aNAEzx031Gby/UzOH+8MmJfnWqeBlRgKC+q3NEHDeRABnY3bG+NLG S16JIM6HsFglTag4NQcrt20HadvIyI8BX3pX8= MIME-Version: 1.0 Received: by 10.227.201.16 with SMTP id ey16mr93560wbb.30.1306360948080; Wed, 25 May 2011 15:02:28 -0700 (PDT) Received: by 10.227.209.209 with HTTP; Wed, 25 May 2011 15:02:27 -0700 (PDT) In-Reply-To: <20110525123552.GZ48734@deviant.kiev.zoral.com.ua> References: <201105250325.p4P3PEvI097170@svn.freebsd.org> <20110525114753.GY48734@deviant.kiev.zoral.com.ua> <20110525123552.GZ48734@deviant.kiev.zoral.com.ua> Date: Thu, 26 May 2011 00:02:27 +0200 Message-ID: From: Oliver Pinter To: Kostik Belousov Content-Type: multipart/mixed; boundary=00151758b0ac42423a04a420dc00 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r222274 - stable/8/sys/kern X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2011 22:02:30 -0000 --00151758b0ac42423a04a420dc00 Content-Type: text/plain; charset=ISO-8859-1 On 5/25/11, Kostik Belousov wrote: > On Wed, May 25, 2011 at 02:07:10PM +0200, Oliver Pinter wrote: >> this or likely this script is enough for test? >> >> ---8<--- >> #!/bin/csh >> >> @ a = 100 >> >> while ( $a ) >> foreach i ( "umass" "cdce" "foo" "bar" ) >> kldload $i& >> end >> >> foreach i ( "umass" "cdce" "foo" "bar" ) >> kldunload $i& >> end >> @ a-- >> end >> ---8<--- > Only if the unload of any of the listed modules caused destruction > of some devfs node. > > May be, the easiest for 7 is to create some md(4) device and then > destroy it. > >> >> On 5/25/11, Kostik Belousov wrote: >> > On Wed, May 25, 2011 at 12:11:29PM +0200, Oliver Pinter wrote: >> >> MFC to 7-STABLE? >> > Somebody need to test it for 7 (I do not expect any failures, but I also >> > prefer to not commit untested changes). >> > >> > The testing should include destroying some devfs nodes, e.g. by loading >> > and unloading a driver that creates and destroys them. Runned 3 times the attached test script. The system remained stable. FreeBSD pandora-d 7.4-STABLE FreeBSD 7.4-STABLE #83 r222274=49d86ad: Wed May 25 17:49:38 CEST 2011 root@pandora-d:/usr/obj/usr/src/sys/stable amd64 > --00151758b0ac42423a04a420dc00 Content-Type: text/x-diff; charset=US-ASCII; name="dev_rel.diff" Content-Disposition: attachment; filename="dev_rel.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: file0 Y29tbWl0IDQ5ZDg2YWQ4NGQ2MzQ3MDA2ZWYzNTlmZmEwZmEwZTU3NWQ3MDAyNDYKQXV0aG9yOiBr aWIgPGtpYkBjY2Y5Zjg3Mi1hYTJlLWRkMTEtOWZjOC0wMDFjMjNkMGJjMWY+CkRhdGU6ICAgV2Vk IE1heSAyNSAwMzoyNToxNCAyMDExICswMDAwCgogICAgTUZDIHIyMjIwODY6IFRoZSBwcm90ZWN0 aW9uIGFnYWluc3QgdGhlIHJhY2Ugd2l0aCBkZXZfcmVsKCksIGludHJvZHVjZWQgaW4gcjE2MzMy OCwgc2hvdWxkIGJlIGV4dGVuZGVkIHRvIGNvdmVyIGRlc3Ryb3lfZGV2bCgpIGNhbGxzIGZvciB0 aGUgY2hpbGRyZW4gb2YgdGhlIGRlc3Ryb3llZCBkZXYuCiAgICAKICAgIGdpdC1zdm4taWQ6IHN2 bjovL3N2bi5mcmVlYnNkLm9yZy9iYXNlL3N0YWJsZS84QDIyMjI3NCBjY2Y5Zjg3Mi1hYTJlLWRk MTEtOWZjOC0wMDFjMjNkMGJjMWYKCmRpZmYgLS1naXQgYS9zeXMva2Vybi9rZXJuX2NvbmYuYyBi L3N5cy9rZXJuL2tlcm5fY29uZi5jCmluZGV4IDA5ODU5YWEuLjMyMDc0MzggMTAwNjQ0Ci0tLSBh L3N5cy9rZXJuL2tlcm5fY29uZi5jCisrKyBiL3N5cy9rZXJuL2tlcm5fY29uZi5jCkBAIC04NzQs NiArODc0LDggQEAgZGVzdHJveV9kZXZsKHN0cnVjdCBjZGV2ICpkZXYpCiAJLyogUmVtb3ZlIG5h bWUgbWFya2luZyAqLwogCWRldi0+c2lfZmxhZ3MgJj0gflNJX05BTUVEOwogCisJZGV2LT5zaV9y ZWZjb3VudCsrOwkvKiBBdm9pZCByYWNlIHdpdGggZGV2X3JlbCgpICovCisKIAkvKiBJZiB3ZSBh cmUgYSBjaGlsZCwgcmVtb3ZlIHVzIGZyb20gdGhlIHBhcmVudHMgbGlzdCAqLwogCWlmIChkZXYt PnNpX2ZsYWdzICYgU0lfQ0hJTEQpIHsKIAkJTElTVF9SRU1PVkUoZGV2LCBzaV9zaWJsaW5ncyk7 CkBAIC04OTAsNyArODkyLDYgQEAgZGVzdHJveV9kZXZsKHN0cnVjdCBjZGV2ICpkZXYpCiAJCWRl di0+c2lfZmxhZ3MgJj0gflNJX0NMT05FTElTVDsKIAl9CiAKLQlkZXYtPnNpX3JlZmNvdW50Kys7 CS8qIEF2b2lkIHJhY2Ugd2l0aCBkZXZfcmVsKCkgKi8KIAljc3cgPSBkZXYtPnNpX2RldnN3Owog CWRldi0+c2lfZGV2c3cgPSBOVUxMOwkvKiBhbHJlYWR5IE5VTEwgZm9yIFNJX0FMSUFTICovCiAJ d2hpbGUgKGNzdyAhPSBOVUxMICYmIGNzdy0+ZF9wdXJnZSAhPSBOVUxMICYmIGRldi0+c2lfdGhy ZWFkY291bnQpIHsK --00151758b0ac42423a04a420dc00 Content-Type: application/octet-stream; name="devfs_test.log.xz" Content-Disposition: attachment; filename="devfs_test.log.xz" Content-Transfer-Encoding: base64 X-Attachment-Id: file3 /Td6WFoAAATm1rRGAgAhARYAAAB0L+Wj5Rt5AZ5dADIZSdwuRKH8mgxR6WlFLHCdblKeskrqjFGC 7s9qlPVwe9bsYEMGNfODwBzr7YKCkvU0hiXOFPo8wmO8hhuL0k8wGqeRMFFGBFyq0YkfKnM0DYwx b4YjUEWCZJWAt/F2NyQqyxo4RlaqLg0AnUa2FOcVEJG2DKL/zGlQuiyWqfAZHXe57ZFsVvXTACy1 3LfJ3QQ/EpJBkx7witD9/LosYAs+nJEezhOGIpUMVFz4t8uC6+D/r85u8vaKp6CJqnhk1e7aAgzT NKYYtaGcWzzeeM78R89bE4z5kPPUCjXTASGCJndkWDbXIMqconG9dIWT9wamRObH8l1OfZKWaGmZ RSLiBy02MZtLKtFdn9jNCH9I+ccupO1nckBSWL7pdqxZ5OVbBQj5xkmOUdKhqlakjvP2ZDCuEBcE 1vAQcouXlUC0JPdPeQ0F9NqdJlYspBniQY/S8SLXHu2O7zd5AbnXmm/wOyWW7W2UW76xCBWXdizw h9mx4iAXaV4x1Ok8BwKpjqsM4T42KTz8uZCjQKtyFbCUGa35r1nIKuLFMED2AAAAAOzY177BYLJu AAG6A/q2FAAqPQI5scRn+wIAAAAABFla --00151758b0ac42423a04a420dc00-- From owner-svn-src-stable-8@FreeBSD.ORG Thu May 26 00:37:44 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9F0F1065674; Thu, 26 May 2011 00:37:44 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B7BB18FC1A; Thu, 26 May 2011 00:37: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 p4Q0biEY036920; Thu, 26 May 2011 00:37:44 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4Q0bim7036918; Thu, 26 May 2011 00:37:44 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201105260037.p4Q0bim7036918@svn.freebsd.org> From: Alexander Motin Date: Thu, 26 May 2011 00:37:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222297 - stable/8/sys/dev/ata X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2011 00:37:46 -0000 Author: mav Date: Thu May 26 00:37:44 2011 New Revision: 222297 URL: http://svn.freebsd.org/changeset/base/222297 Log: MFC r220911: Make PATA-like soft-reset in ata(4) more strict in checking disk signature. It allows to avoid false positive device detection under Xen, that caused long probe delays due to subsequent IDENTIFY command timeouts. Modified: stable/8/sys/dev/ata/ata-lowlevel.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/ata/ata-lowlevel.c ============================================================================== --- stable/8/sys/dev/ata/ata-lowlevel.c Thu May 26 00:09:56 2011 (r222296) +++ stable/8/sys/dev/ata/ata-lowlevel.c Thu May 26 00:37:44 2011 (r222297) @@ -535,7 +535,7 @@ ata_generic_reset(device_t dev) if (lsb == ATAPI_MAGIC_LSB && msb == ATAPI_MAGIC_MSB) { ch->devices |= ATA_ATAPI_MASTER; } - else if (stat0 & ATA_S_READY) { + else if (lsb == 0 && msb == 0 && (stat0 & ATA_S_READY)) { ch->devices |= ATA_ATA_MASTER; } } @@ -568,7 +568,7 @@ ata_generic_reset(device_t dev) if (lsb == ATAPI_MAGIC_LSB && msb == ATAPI_MAGIC_MSB) { ch->devices |= ATA_ATAPI_SLAVE; } - else if (stat1 & ATA_S_READY) { + else if (lsb == 0 && msb == 0 && (stat1 & ATA_S_READY)) { ch->devices |= ATA_ATA_SLAVE; } } From owner-svn-src-stable-8@FreeBSD.ORG Fri May 27 00:23:44 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A896E1065678; Fri, 27 May 2011 00:23:44 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7C8B48FC1A; Fri, 27 May 2011 00:23: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 p4R0NiNf087232; Fri, 27 May 2011 00:23:44 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4R0NiOa087230; Fri, 27 May 2011 00:23:44 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201105270023.p4R0NiOa087230@svn.freebsd.org> From: Xin LI Date: Fri, 27 May 2011 00:23:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222335 - stable/8/usr.bin/rpcinfo X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2011 00:23:44 -0000 Author: delphij Date: Fri May 27 00:23:44 2011 New Revision: 222335 URL: http://svn.freebsd.org/changeset/base/222335 Log: MFC r221860: Constify a few string variables. While I'm there, also convert usage() to use a prototype. Modified: stable/8/usr.bin/rpcinfo/rpcinfo.c Directory Properties: stable/8/usr.bin/rpcinfo/ (props changed) Modified: stable/8/usr.bin/rpcinfo/rpcinfo.c ============================================================================== --- stable/8/usr.bin/rpcinfo/rpcinfo.c Thu May 26 23:56:58 2011 (r222334) +++ stable/8/usr.bin/rpcinfo/rpcinfo.c Fri May 27 00:23:44 2011 (r222335) @@ -128,9 +128,9 @@ struct rpcbdump_short { #ifdef PORTMAP -static void ip_ping(u_short, char *, int, char **); +static void ip_ping(u_short, const char *, int, char **); static CLIENT *clnt_com_create(struct sockaddr_in *, u_long, u_long, int *, - char *); + const char *); static void pmapdump(int, char **); static void get_inet_address(struct sockaddr_in *, char *); #endif @@ -336,7 +336,7 @@ local_rpcb(u_long prog, u_long vers) #ifdef PORTMAP static CLIENT * clnt_com_create(struct sockaddr_in *addr, u_long prog, u_long vers, - int *fdp, char *trans) + int *fdp, const char *trans) { CLIENT *clnt; @@ -369,7 +369,7 @@ clnt_com_create(struct sockaddr_in *addr * version 0 calls succeeds, it tries for MAXVERS call and repeats the same. */ static void -ip_ping(u_short portnum, char *trans, int argc, char **argv) +ip_ping(u_short portnum, const char *trans, int argc, char **argv) { CLIENT *client; int fd = RPC_ANYFD; @@ -594,7 +594,7 @@ reply_proc(void *res, struct netbuf *who { char *uaddr; char hostbuf[NI_MAXHOST]; - char *hostname; + const char *hostname; struct sockaddr *sa = (struct sockaddr *)who->buf; if (getnameinfo(sa, sa->sa_len, hostbuf, NI_MAXHOST, NULL, 0, 0)) { @@ -987,15 +987,15 @@ rpcbgetstat(int argc, char **argv) #define MAXLINE 256 char linebuf[MAXLINE]; char *cp, *lp; - char *pmaphdr[] = { + const char *pmaphdr[] = { "NULL", "SET", "UNSET", "GETPORT", "DUMP", "CALLIT" }; - char *rpcb3hdr[] = { + const char *rpcb3hdr[] = { "NULL", "SET", "UNSET", "GETADDR", "DUMP", "CALLIT", "TIME", "U2T", "T2U" }; - char *rpcb4hdr[] = { + const char *rpcb4hdr[] = { "NULL", "SET", "UNSET", "GETADDR", "DUMP", "CALLIT", "TIME", "U2T", "T2U", "VERADDR", "INDRECT", "GETLIST", "GETSTAT" }; @@ -1455,7 +1455,7 @@ progping(char *netid, int argc, char **a } static void -usage() +usage(void) { fprintf(stderr, "usage: rpcinfo [-m | -s] [host]\n"); #ifdef PORTMAP @@ -1536,7 +1536,7 @@ pstatus(register CLIENT *client, u_long static CLIENT * clnt_rpcbind_create(char *host, int rpcbversnum, struct netbuf **targaddr) { - static char *tlist[3] = { + static const char *tlist[3] = { "circuit_n", "circuit_v", "datagram_v" }; int i; From owner-svn-src-stable-8@FreeBSD.ORG Fri May 27 07:38:59 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A5F61065670; Fri, 27 May 2011 07:38:59 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 499088FC16; Fri, 27 May 2011 07:38: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 p4R7cxOw002809; Fri, 27 May 2011 07:38:59 GMT (envelope-from bcr@svn.freebsd.org) Received: (from bcr@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4R7cxCu002805; Fri, 27 May 2011 07:38:59 GMT (envelope-from bcr@svn.freebsd.org) Message-Id: <201105270738.p4R7cxCu002805@svn.freebsd.org> From: Benedict Reuschling Date: Fri, 27 May 2011 07:38:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222342 - stable/8/usr.bin/ar X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2011 07:38:59 -0000 Author: bcr (doc committer) Date: Fri May 27 07:38:58 2011 New Revision: 222342 URL: http://svn.freebsd.org/changeset/base/222342 Log: MFC r222122: Correct typos in comments, no functional changes. Found by: codespell Reviewed by: kaiw Modified: stable/8/usr.bin/ar/acpyacc.y stable/8/usr.bin/ar/ar.c stable/8/usr.bin/ar/write.c Directory Properties: stable/8/usr.bin/ar/ (props changed) Modified: stable/8/usr.bin/ar/acpyacc.y ============================================================================== --- stable/8/usr.bin/ar/acpyacc.y Fri May 27 06:37:42 2011 (r222341) +++ stable/8/usr.bin/ar/acpyacc.y Fri May 27 07:38:58 2011 (r222342) @@ -358,7 +358,7 @@ arscp_copy(int ifd, int ofd) /* * Add all modules of archive to current archive, if list != NULL, - * only those modules speicifed in 'list' will be added. + * only those modules specified in 'list' will be added. */ static void arscp_addlib(char *archive, struct list *list) @@ -545,7 +545,7 @@ arscp_end(int eval) } /* - * Check if target spcified, i.e, whether OPEN or CREATE has been + * Check if target specified, i.e, whether OPEN or CREATE has been * issued by user. */ static int Modified: stable/8/usr.bin/ar/ar.c ============================================================================== --- stable/8/usr.bin/ar/ar.c Fri May 27 06:37:42 2011 (r222341) +++ stable/8/usr.bin/ar/ar.c Fri May 27 07:38:58 2011 (r222342) @@ -109,7 +109,7 @@ main(int argc, char **argv) bsdar->progname = "ar"; /* Act like ranlib if our name ends in "ranlib"; this - * accomodates arm-freebsd7.1-ranlib, bsdranlib, etc. */ + * accommodates arm-freebsd7.1-ranlib, bsdranlib, etc. */ len = strlen(bsdar->progname); if (len >= strlen("ranlib") && strcmp(bsdar->progname + len - strlen("ranlib"), "ranlib") == 0) { Modified: stable/8/usr.bin/ar/write.c ============================================================================== --- stable/8/usr.bin/ar/write.c Fri May 27 06:37:42 2011 (r222341) +++ stable/8/usr.bin/ar/write.c Fri May 27 07:38:58 2011 (r222342) @@ -113,7 +113,7 @@ ar_mode_A(struct bsdar *bsdar) /* * Create object from file, return created obj upon success, or NULL * when an error occurs or the member is not newer than existing - * one while -u is specifed. + * one while -u is specified. */ static struct ar_obj * create_obj_from_file(struct bsdar *bsdar, const char *name, time_t mtime) @@ -220,7 +220,7 @@ insert_obj(struct bsdar *bsdar, struct a if (pos == NULL || obj == pos) /* - * If the object to move happens to be the posistion obj, + * If the object to move happens to be the position obj, * or if there is not a pos obj, move it to tail. */ goto tail; @@ -418,7 +418,7 @@ write_archive(struct bsdar *bsdar, char if (mode == 'A') { /* * Read objects from the target archive of ADDLIB command. - * If there are members spcified in argv, read those members + * If there are members specified in argv, read those members * only, otherwise the entire archive will be read. */ read_objs(bsdar, bsdar->addlib, 1); @@ -438,7 +438,7 @@ write_archive(struct bsdar *bsdar, char /* * If can't find `pos' specified by user, - * sliently insert objects at tail. + * silently insert objects at tail. */ if (pos == NULL) bsdar->options &= ~(AR_A | AR_B); @@ -699,7 +699,7 @@ create_symtab_entry(struct bsdar *bsdar, return; } if (elf_kind(e) != ELF_K_ELF) { - /* Sliently ignore non-elf member. */ + /* Silently ignore non-elf member. */ elf_end(e); return; } From owner-svn-src-stable-8@FreeBSD.ORG Fri May 27 08:40:26 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CDD37106566C; Fri, 27 May 2011 08:40:26 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BCB628FC19; Fri, 27 May 2011 08:40: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 p4R8eQq9008554; Fri, 27 May 2011 08:40:26 GMT (envelope-from zec@svn.freebsd.org) Received: (from zec@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4R8eQBY008552; Fri, 27 May 2011 08:40:26 GMT (envelope-from zec@svn.freebsd.org) Message-Id: <201105270840.p4R8eQBY008552@svn.freebsd.org> From: Marko Zec Date: Fri, 27 May 2011 08:40:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222344 - stable/8/sys/net X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2011 08:40:27 -0000 Author: zec Date: Fri May 27 08:40:26 2011 New Revision: 222344 URL: http://svn.freebsd.org/changeset/base/222344 Log: MFC r222246: Let epair(4) virtual interfaces report fake link / media status, by borrowing the skeleton of if_media manipulation and reporting code from if_lagg(4). The main motivation behind this change is to allow for epair(4) interfaces to participate in STP if_bridge(4) configurations. Reviewed by: bz Modified: stable/8/sys/net/if_epair.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/net/if_epair.c ============================================================================== --- stable/8/sys/net/if_epair.c Fri May 27 08:34:31 2011 (r222343) +++ stable/8/sys/net/if_epair.c Fri May 27 08:40:26 2011 (r222344) @@ -66,6 +66,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -92,6 +93,8 @@ static struct mbuf *epair_nh_m2cpuid(str static void epair_nh_drainedcpu(u_int); static void epair_start_locked(struct ifnet *); +static int epair_media_change(struct ifnet *); +static void epair_media_status(struct ifnet *, struct ifmediareq *); static int epair_clone_match(struct if_clone *, const char *); static int epair_clone_create(struct if_clone *, char *, size_t, caddr_t); @@ -127,6 +130,7 @@ SYSCTL_PROC(_net_link_epair, OID_AUTO, n struct epair_softc { struct ifnet *ifp; /* This ifp. */ struct ifnet *oifp; /* other ifp of pair. */ + struct ifmedia media; /* Media config (fake). */ u_int refcount; /* # of mbufs in flight. */ u_int cpuid; /* CPU ID assigned upon creation. */ void (*if_qflush)(struct ifnet *); @@ -611,8 +615,25 @@ epair_qflush(struct ifnet *ifp) } static int +epair_media_change(struct ifnet *ifp __unused) +{ + + /* Do nothing. */ + return (0); +} + +static void +epair_media_status(struct ifnet *ifp __unused, struct ifmediareq *imr) +{ + + imr->ifm_status = IFM_AVALID | IFM_ACTIVE; + imr->ifm_active = IFM_ETHER | IFM_10G_T | IFM_FDX; +} + +static int epair_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { + struct epair_softc *sc; struct ifreq *ifr; int error; @@ -624,6 +645,12 @@ epair_ioctl(struct ifnet *ifp, u_long cm error = 0; break; + case SIOCSIFMEDIA: + case SIOCGIFMEDIA: + sc = ifp->if_softc; + error = ifmedia_ioctl(ifp, ifr, &sc->media, cmd); + break; + case SIOCSIFMTU: /* We basically allow all kinds of MTUs. */ ifp->if_mtu = ifr->ifr_mtu; @@ -829,6 +856,14 @@ epair_clone_create(struct if_clone *ifc, strlcpy(name, sca->ifp->if_xname, len); DPRINTF("name='%s/%db' created sca=%p scb=%p\n", name, unit, sca, scb); + /* Initialise pseudo media types. */ + ifmedia_init(&sca->media, 0, epair_media_change, epair_media_status); + ifmedia_add(&sca->media, IFM_ETHER | IFM_10G_T, 0, NULL); + ifmedia_set(&sca->media, IFM_ETHER | IFM_10G_T); + ifmedia_init(&scb->media, 0, epair_media_change, epair_media_status); + ifmedia_add(&scb->media, IFM_ETHER | IFM_10G_T, 0, NULL); + ifmedia_set(&scb->media, IFM_ETHER | IFM_10G_T); + /* Tell the world, that we are ready to rock. */ sca->ifp->if_drv_flags |= IFF_DRV_RUNNING; scb->ifp->if_drv_flags |= IFF_DRV_RUNNING; @@ -895,6 +930,8 @@ epair_clone_destroy(struct if_clone *ifc if_free(oifp); CURVNET_RESTORE(); if_free(ifp); + ifmedia_removeall(&sca->media); + ifmedia_removeall(&scb->media); free(scb, M_EPAIR); free(sca, M_EPAIR); ifc_free_unit(ifc, unit); From owner-svn-src-stable-8@FreeBSD.ORG Fri May 27 08:41:57 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E0531065676; Fri, 27 May 2011 08:41:57 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5DFDB8FC0A; Fri, 27 May 2011 08:41: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 p4R8fvhG008743; Fri, 27 May 2011 08:41:57 GMT (envelope-from zec@svn.freebsd.org) Received: (from zec@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4R8fvG5008741; Fri, 27 May 2011 08:41:57 GMT (envelope-from zec@svn.freebsd.org) Message-Id: <201105270841.p4R8fvG5008741@svn.freebsd.org> From: Marko Zec Date: Fri, 27 May 2011 08:41:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222345 - stable/8/sys/net X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2011 08:41:57 -0000 Author: zec Date: Fri May 27 08:41:57 2011 New Revision: 222345 URL: http://svn.freebsd.org/changeset/base/222345 Log: MFC r222247: Allow for vlan(4) interfaces with MTU of 1500 bytes to be configured on top of epair(4) virtual interfaces, since there's no physical hardware associated with epair interfaces which would imply any constraints on MTU sizes. Modified: stable/8/sys/net/if_epair.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/net/if_epair.c ============================================================================== --- stable/8/sys/net/if_epair.c Fri May 27 08:40:26 2011 (r222344) +++ stable/8/sys/net/if_epair.c Fri May 27 08:41:57 2011 (r222345) @@ -810,6 +810,8 @@ epair_clone_create(struct if_clone *ifc, ifp->if_dname = ifc->ifc_name; ifp->if_dunit = unit; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; + ifp->if_capabilities = IFCAP_VLAN_MTU; + ifp->if_capenable = IFCAP_VLAN_MTU; ifp->if_start = epair_start; ifp->if_ioctl = epair_ioctl; ifp->if_init = epair_init; @@ -834,6 +836,8 @@ epair_clone_create(struct if_clone *ifc, ifp->if_dname = ifc->ifc_name; ifp->if_dunit = unit; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; + ifp->if_capabilities = IFCAP_VLAN_MTU; + ifp->if_capenable = IFCAP_VLAN_MTU; ifp->if_start = epair_start; ifp->if_ioctl = epair_ioctl; ifp->if_init = epair_init; From owner-svn-src-stable-8@FreeBSD.ORG Fri May 27 08:43:03 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70F91106564A; Fri, 27 May 2011 08:43:03 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 604138FC0C; Fri, 27 May 2011 08:43: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 p4R8h3ah008892; Fri, 27 May 2011 08:43:03 GMT (envelope-from zec@svn.freebsd.org) Received: (from zec@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4R8h3aY008890; Fri, 27 May 2011 08:43:03 GMT (envelope-from zec@svn.freebsd.org) Message-Id: <201105270843.p4R8h3aY008890@svn.freebsd.org> From: Marko Zec Date: Fri, 27 May 2011 08:43:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222346 - stable/8/sys/netgraph X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2011 08:43:03 -0000 Author: zec Date: Fri May 27 08:43:03 2011 New Revision: 222346 URL: http://svn.freebsd.org/changeset/base/222346 Log: MFC r222255: Provide fake link status information in an attempt to let ng_eiface(4) virtual ifnets more realistically mimic physical ethernet interfaces. The main motivation behind this change is to allow for ng_eiface(4) interfaces to participate in STP if_bridge(4) configurations. When announcing link status changes, switch to the vnet to which the ifnet belongs, since it is possible for ng_eiface ifnets to be assigned to a vnet different from the one in which its netgraph node resides. Modified: stable/8/sys/netgraph/ng_eiface.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/netgraph/ng_eiface.c ============================================================================== --- stable/8/sys/netgraph/ng_eiface.c Fri May 27 08:41:57 2011 (r222345) +++ stable/8/sys/netgraph/ng_eiface.c Fri May 27 08:43:03 2011 (r222346) @@ -41,6 +41,7 @@ #include #include +#include #include #include #include @@ -76,6 +77,8 @@ static const struct ng_cmdlist ng_eiface /* Node private data */ struct ng_eiface_private { struct ifnet *ifp; /* per-interface network data */ + struct ifmedia media; /* (fake) media information */ + int link_status; /* fake */ int unit; /* Interface unit number */ node_p node; /* Our netgraph node */ hook_p ether; /* Hook for ethernet stream */ @@ -127,6 +130,7 @@ static VNET_DEFINE(struct unrhdr *, ng_e static int ng_eiface_ioctl(struct ifnet *ifp, u_long command, caddr_t data) { + const priv_p priv = (priv_p)ifp->if_softc; struct ifreq *const ifr = (struct ifreq *)data; int s, error = 0; @@ -170,6 +174,12 @@ ng_eiface_ioctl(struct ifnet *ifp, u_lon ifp->if_mtu = ifr->ifr_mtu; break; + /* (Fake) media type manipulation */ + case SIOCSIFMEDIA: + case SIOCGIFMEDIA: + error = ifmedia_ioctl(ifp, ifr, &priv->media, command); + break; + /* Stuff that's not supported */ case SIOCADDMULTI: case SIOCDELMULTI: @@ -280,7 +290,6 @@ ng_eiface_start2(node_p node, hook_p hoo static void ng_eiface_start(struct ifnet *ifp) { - const priv_p priv = (priv_p)ifp->if_softc; /* Don't do anything if output is active */ @@ -328,6 +337,41 @@ ng_eiface_print_ioctl(struct ifnet *ifp, } #endif /* DEBUG */ +/* + * ifmedia stuff + */ +static int +ng_eiface_mediachange(struct ifnet *ifp) +{ + const priv_p priv = (priv_p)ifp->if_softc; + struct ifmedia *ifm = &priv->media; + + if (IFM_TYPE(ifm->ifm_media) != IFM_ETHER) + return (EINVAL); + if (IFM_SUBTYPE(ifm->ifm_media) == IFM_AUTO) + ifp->if_baudrate = ifmedia_baudrate(IFM_ETHER | IFM_1000_T); + else + ifp->if_baudrate = ifmedia_baudrate(ifm->ifm_media); + + return (0); +} + +static void +ng_eiface_mediastatus(struct ifnet *ifp, struct ifmediareq *ifmr) +{ + const priv_p priv = (priv_p)ifp->if_softc; + struct ifmedia *ifm = &priv->media; + + if (ifm->ifm_cur->ifm_media == (IFM_ETHER | IFM_AUTO) && + (priv->link_status & IFM_ACTIVE)) + ifmr->ifm_active = IFM_ETHER | IFM_1000_T | IFM_FDX; + else + ifmr->ifm_active = ifm->ifm_cur->ifm_media; + ifmr->ifm_status = priv->link_status; + + return; +} + /************************************************************************ NETGRAPH NODE STUFF ************************************************************************/ @@ -373,6 +417,18 @@ ng_eiface_constructor(node_p node) ifp->if_flags = (IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST); ifp->if_capabilities = IFCAP_VLAN_MTU | IFCAP_JUMBO_MTU; ifp->if_capenable = IFCAP_VLAN_MTU | IFCAP_JUMBO_MTU; + ifmedia_init(&priv->media, 0, ng_eiface_mediachange, + ng_eiface_mediastatus); + ifmedia_add(&priv->media, IFM_ETHER | IFM_10_T, 0, NULL); + ifmedia_add(&priv->media, IFM_ETHER | IFM_10_T | IFM_FDX, 0, NULL); + ifmedia_add(&priv->media, IFM_ETHER | IFM_100_TX, 0, NULL); + ifmedia_add(&priv->media, IFM_ETHER | IFM_100_TX | IFM_FDX, 0, NULL); + ifmedia_add(&priv->media, IFM_ETHER | IFM_1000_T, 0, NULL); + ifmedia_add(&priv->media, IFM_ETHER | IFM_1000_T | IFM_FDX, 0, NULL); + ifmedia_add(&priv->media, IFM_ETHER | IFM_10G_T | IFM_FDX, 0, NULL); + ifmedia_add(&priv->media, IFM_ETHER | IFM_AUTO, 0, NULL); + ifmedia_set(&priv->media, IFM_ETHER | IFM_AUTO); + priv->link_status = IFM_AVALID; /* Give this node the same name as the interface (if possible) */ if (ng_name_node(node, ifp->if_xname) != 0) @@ -381,6 +437,7 @@ ng_eiface_constructor(node_p node) /* Attach the interface */ ether_ifattach(ifp, eaddr); + ifp->if_baudrate = ifmedia_baudrate(IFM_ETHER | IFM_1000_T); /* Done */ return (0); @@ -403,7 +460,10 @@ ng_eiface_newhook(node_p node, hook_p ho NG_HOOK_SET_PRIVATE(hook, &priv->ether); NG_HOOK_SET_TO_INBOUND(hook); + priv->link_status |= IFM_ACTIVE; + CURVNET_SET_QUIET(ifp->if_vnet); if_link_state_change(ifp, LINK_STATE_UP); + CURVNET_RESTORE(); return (0); } @@ -488,16 +548,20 @@ ng_eiface_rcvmsg(node_p node, item_p ite } /* end of inner switch() */ break; case NGM_FLOW_COOKIE: + CURVNET_SET_QUIET(ifp->if_vnet); switch (msg->header.cmd) { case NGM_LINK_IS_UP: + priv->link_status |= IFM_ACTIVE; if_link_state_change(ifp, LINK_STATE_UP); break; case NGM_LINK_IS_DOWN: + priv->link_status &= ~IFM_ACTIVE; if_link_state_change(ifp, LINK_STATE_DOWN); break; default: break; } + CURVNET_RESTORE(); break; default: error = EINVAL; @@ -559,6 +623,7 @@ ng_eiface_rmnode(node_p node) * hence we have to change the current vnet context here. */ CURVNET_SET_QUIET(ifp->if_vnet); + ifmedia_removeall(&priv->media); ether_ifdetach(ifp); if_free(ifp); CURVNET_RESTORE(); @@ -578,6 +643,10 @@ ng_eiface_disconnect(hook_p hook) const priv_p priv = NG_NODE_PRIVATE(NG_HOOK_NODE(hook)); priv->ether = NULL; + priv->link_status &= ~IFM_ACTIVE; + CURVNET_SET_QUIET(priv->ifp->if_vnet); + if_link_state_change(priv->ifp, LINK_STATE_DOWN); + CURVNET_RESTORE(); return (0); } From owner-svn-src-stable-8@FreeBSD.ORG Fri May 27 08:43:59 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4A56106566B; Fri, 27 May 2011 08:43:59 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9AF9D8FC15; Fri, 27 May 2011 08:43: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 p4R8hxJv009023; Fri, 27 May 2011 08:43:59 GMT (envelope-from zec@svn.freebsd.org) Received: (from zec@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4R8hxUY009021; Fri, 27 May 2011 08:43:59 GMT (envelope-from zec@svn.freebsd.org) Message-Id: <201105270843.p4R8hxUY009021@svn.freebsd.org> From: Marko Zec Date: Fri, 27 May 2011 08:43:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222347 - stable/8/sys/netgraph X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2011 08:43:59 -0000 Author: zec Date: Fri May 27 08:43:59 2011 New Revision: 222347 URL: http://svn.freebsd.org/changeset/base/222347 Log: MFC r222257: Assume the link to be dead if bit error rate (BER) parameter is set to 1. When a transition from link alive to link dead configuration or vice versa occurs, notify any upstream and / or downstream peers using NGM_FLOW messagges. Link state notification using NGM_FLOW messages is modelled around around already existing code in ng_ether.c. Modified: stable/8/sys/netgraph/ng_pipe.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/netgraph/ng_pipe.c ============================================================================== --- stable/8/sys/netgraph/ng_pipe.c Fri May 27 08:43:03 2011 (r222346) +++ stable/8/sys/netgraph/ng_pipe.c Fri May 27 08:43:59 2011 (r222347) @@ -300,11 +300,12 @@ ngp_rcvmsg(node_p node, item_p item, hoo { const priv_p priv = NG_NODE_PRIVATE(node); struct ng_mesg *resp = NULL; - struct ng_mesg *msg; + struct ng_mesg *msg, *flow_msg; struct ng_pipe_stats *stats; struct ng_pipe_run *run; struct ng_pipe_cfg *cfg; int error = 0; + int prev_down, now_down, cmd; NGI_GET_MSG(item, msg); switch (msg->header.typecookie) { @@ -405,10 +406,38 @@ ngp_rcvmsg(node_p node, item_p item, hoo cfg->header_offset < 64) priv->header_offset = cfg->header_offset; + prev_down = priv->upper.cfg.ber == 1 || + priv->lower.cfg.ber == 1; parse_cfg(&priv->upper.cfg, &cfg->downstream, &priv->upper, priv); parse_cfg(&priv->lower.cfg, &cfg->upstream, &priv->lower, priv); + now_down = priv->upper.cfg.ber == 1 || + priv->lower.cfg.ber == 1; + + if (prev_down != now_down) { + if (now_down) + cmd = NGM_LINK_IS_DOWN; + else + cmd = NGM_LINK_IS_UP; + + if (priv->lower.hook != NULL) { + NG_MKMESSAGE(flow_msg, NGM_FLOW_COOKIE, + cmd, 0, M_NOWAIT); + if (flow_msg != NULL) + NG_SEND_MSG_HOOK(error, node, + flow_msg, priv->lower.hook, + 0); + } + if (priv->upper.hook != NULL) { + NG_MKMESSAGE(flow_msg, NGM_FLOW_COOKIE, + cmd, 0, M_NOWAIT); + if (flow_msg != NULL) + NG_SEND_MSG_HOOK(error, node, + flow_msg, priv->upper.hook, + 0); + } + } break; default: error = EINVAL; From owner-svn-src-stable-8@FreeBSD.ORG Fri May 27 09:15:56 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D841D106566C; Fri, 27 May 2011 09:15:56 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C772C8FC14; Fri, 27 May 2011 09:15:56 +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 p4R9FuYV012034; Fri, 27 May 2011 09:15:56 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4R9FuEC012032; Fri, 27 May 2011 09:15:56 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201105270915.p4R9FuEC012032@svn.freebsd.org> From: Sergey Kandaurov Date: Fri, 27 May 2011 09:15:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222348 - stable/8/bin/ps X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2011 09:15:57 -0000 Author: pluknet Date: Fri May 27 09:15:56 2011 New Revision: 222348 URL: http://svn.freebsd.org/changeset/base/222348 Log: MFC r222127,r222130: - Fix the description of the "paddr" keyword. - Spelling in P_HADTHREADS. Modified: stable/8/bin/ps/ps.1 Directory Properties: stable/8/bin/ps/ (props changed) Modified: stable/8/bin/ps/ps.1 ============================================================================== --- stable/8/bin/ps/ps.1 Fri May 27 08:43:59 2011 (r222347) +++ stable/8/bin/ps/ps.1 Fri May 27 09:15:56 2011 (r222348) @@ -292,7 +292,7 @@ the include file .It Dv "P_PPWAIT" Ta No "0x00010 Parent is waiting for child to exec/exit" .It Dv "P_PROFIL" Ta No "0x00020 Has started profiling" .It Dv "P_STOPPROF" Ta No "0x00040 Has thread in requesting to stop prof" -.It Dv "P_HASTHREADS" Ta No "0x00080 Has had threads (no cleanup shortcuts)" +.It Dv "P_HADTHREADS" Ta No "0x00080 Has had threads (no cleanup shortcuts)" .It Dv "P_SUGID" Ta No "0x00100 Had set id privileges since last exec" .It Dv "P_SYSTEM" Ta No "0x00200 System proc: no sigs, stats or swapping" .It Dv "P_SINGLE_EXIT" Ta No "0x00400 Threads suspending should exit, not wait" @@ -533,7 +533,7 @@ wait channel (as an address) total blocks written (alias .Cm oublock ) .It Cm paddr -swap address +process pointer .It Cm pagein pageins (same as majflt) .It Cm pgid From owner-svn-src-stable-8@FreeBSD.ORG Fri May 27 09:50:30 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3FAEE106566B; Fri, 27 May 2011 09:50:30 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2F32C8FC18; Fri, 27 May 2011 09:50:30 +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 p4R9oUtK015228; Fri, 27 May 2011 09:50:30 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4R9oUpS015226; Fri, 27 May 2011 09:50:30 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201105270950.p4R9oUpS015226@svn.freebsd.org> From: Ruslan Ermilov Date: Fri, 27 May 2011 09:50:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222349 - stable/8/usr.bin/showmount X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2011 09:50:30 -0000 Author: ru Date: Fri May 27 09:50:29 2011 New Revision: 222349 URL: http://svn.freebsd.org/changeset/base/222349 Log: MFC: r222245: Ensure there is a whitespace after a mount point. PR: 157286 Modified: stable/8/usr.bin/showmount/showmount.c Directory Properties: stable/8/usr.bin/showmount/ (props changed) Modified: stable/8/usr.bin/showmount/showmount.c ============================================================================== --- stable/8/usr.bin/showmount/showmount.c Fri May 27 09:15:56 2011 (r222348) +++ stable/8/usr.bin/showmount/showmount.c Fri May 27 09:50:29 2011 (r222349) @@ -191,7 +191,7 @@ main(argc, argv) printf("Exports list on %s:\n", host); exp = exportslist; while (exp) { - printf("%-35s", exp->ex_dirp); + printf("%-34s ", exp->ex_dirp); grp = exp->ex_groups; if (grp == NULL) { printf("Everyone\n"); From owner-svn-src-stable-8@FreeBSD.ORG Fri May 27 09:55:18 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5DB4106566B; Fri, 27 May 2011 09:55:18 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A18F18FC0C; Fri, 27 May 2011 09:55: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 p4R9tIF6015725; Fri, 27 May 2011 09:55:18 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4R9tI8i015723; Fri, 27 May 2011 09:55:18 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201105270955.p4R9tI8i015723@svn.freebsd.org> From: Sergey Kandaurov Date: Fri, 27 May 2011 09:55:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222350 - stable/8/usr.bin/top X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2011 09:55:18 -0000 Author: pluknet Date: Fri May 27 09:55:18 2011 New Revision: 222350 URL: http://svn.freebsd.org/changeset/base/222350 Log: MFC r222136: Add missing header file. Modified: stable/8/usr.bin/top/machine.c Directory Properties: stable/8/usr.bin/top/ (props changed) Modified: stable/8/usr.bin/top/machine.c ============================================================================== --- stable/8/usr.bin/top/machine.c Fri May 27 09:50:29 2011 (r222349) +++ stable/8/usr.bin/top/machine.c Fri May 27 09:55:18 2011 (r222350) @@ -35,6 +35,7 @@ #include #include +#include #include #include #include From owner-svn-src-stable-8@FreeBSD.ORG Fri May 27 18:39:19 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6CE471065673; Fri, 27 May 2011 18:39:19 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 427D28FC13; Fri, 27 May 2011 18:39:19 +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 p4RIdJrN047255; Fri, 27 May 2011 18:39:19 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4RIdJCn047253; Fri, 27 May 2011 18:39:19 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201105271839.p4RIdJCn047253@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 27 May 2011 18:39:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222367 - stable/8/sys/dev/vge X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2011 18:39:19 -0000 Author: yongari Date: Fri May 27 18:39:18 2011 New Revision: 222367 URL: http://svn.freebsd.org/changeset/base/222367 Log: MFC r222142: Datasheet says vge(4) controllers support DAC but it seems that's not true on old PCI based controllers. DAC configuration is read from EEPROM in device reset phase and driver can override DAC configuration. However I guess there is an undocumented reason why EEPROM configuration does not enable DAC so do not blindly override DAC configuration. Recent PCIe based controllers are supposed to support 64bit DMA so allow 64bit DMA only on PCIe based controllers. PR: kern/157184 Modified: stable/8/sys/dev/vge/if_vge.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/vge/if_vge.c ============================================================================== --- stable/8/sys/dev/vge/if_vge.c Fri May 27 17:47:19 2011 (r222366) +++ stable/8/sys/dev/vge/if_vge.c Fri May 27 18:39:18 2011 (r222367) @@ -685,7 +685,18 @@ vge_dma_alloc(struct vge_softc *sc) bus_addr_t lowaddr, tx_ring_end, rx_ring_end; int error, i; - lowaddr = BUS_SPACE_MAXADDR; + /* + * It seems old PCI controllers do not support DAC. DAC + * configuration can be enabled by accessing VGE_CHIPCFG3 + * register but honor EEPROM configuration instead of + * blindly overriding DAC configuration. PCIe based + * controllers are supposed to support 64bit DMA so enable + * 64bit DMA on these controllers. + */ + if ((sc->vge_flags & VGE_FLAG_PCIE) != 0) + lowaddr = BUS_SPACE_MAXADDR; + else + lowaddr = BUS_SPACE_MAXADDR_32BIT; again: /* Create parent ring tag. */ @@ -802,10 +813,14 @@ again: goto again; } + if ((sc->vge_flags & VGE_FLAG_PCIE) != 0) + lowaddr = VGE_BUF_DMA_MAXADDR; + else + lowaddr = BUS_SPACE_MAXADDR_32BIT; /* Create parent buffer tag. */ error = bus_dma_tag_create(bus_get_dma_tag(sc->vge_dev),/* parent */ 1, 0, /* algnmnt, boundary */ - VGE_BUF_DMA_MAXADDR, /* lowaddr */ + lowaddr, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ BUS_SPACE_MAXSIZE_32BIT, /* maxsize */ From owner-svn-src-stable-8@FreeBSD.ORG Fri May 27 18:46:24 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC8B6106566B; Fri, 27 May 2011 18:46:24 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BB0DF8FC14; Fri, 27 May 2011 18:46:24 +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 p4RIkOLV047632; Fri, 27 May 2011 18:46:24 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4RIkOLm047630; Fri, 27 May 2011 18:46:24 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201105271846.p4RIkOLm047630@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 27 May 2011 18:46:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222369 - stable/8/sys/dev/bge X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2011 18:46:24 -0000 Author: yongari Date: Fri May 27 18:46:24 2011 New Revision: 222369 URL: http://svn.freebsd.org/changeset/base/222369 Log: MFC r221712: Since r117657, bge(4) does not enable buffer manager for BCM5705 or newer controllers. However, all data sheet I have access has no indication that buffer manager should not be touched on these controllers. It seems the buffer manager always runs on BCM5705 or newer controllers. Some controller(e.g. BCM5719) needs other buffer manager configuration so driver should enable buffer manager for all controllers. Both Linux and OpenBSD/NetBSD use the same approach. This change polls enable bit of block to know whether specified block was really stopped as well as enabling buffer manager for all controllers in driver initialization. Obtained from: NetBSD Modified: stable/8/sys/dev/bge/if_bge.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/bge/if_bge.c ============================================================================== --- stable/8/sys/dev/bge/if_bge.c Fri May 27 18:40:31 2011 (r222368) +++ stable/8/sys/dev/bge/if_bge.c Fri May 27 18:46:24 2011 (r222369) @@ -403,6 +403,7 @@ static void bge_start(struct ifnet *); static int bge_ioctl(struct ifnet *, u_long, caddr_t); static void bge_init_locked(struct bge_softc *); static void bge_init(void *); +static void bge_stop_block(struct bge_softc *, bus_size_t, uint32_t); static void bge_stop(struct bge_softc *); static void bge_watchdog(struct bge_softc *); static int bge_shutdown(device_t); @@ -1593,22 +1594,19 @@ bge_blockinit(struct bge_softc *sc) CSR_WRITE_4(sc, BGE_BMAN_DMA_DESCPOOL_HIWAT, 10); /* Enable buffer manager */ - if (!(BGE_IS_5705_PLUS(sc))) { - CSR_WRITE_4(sc, BGE_BMAN_MODE, - BGE_BMANMODE_ENABLE | BGE_BMANMODE_LOMBUF_ATTN); + CSR_WRITE_4(sc, BGE_BMAN_MODE, + BGE_BMANMODE_ENABLE | BGE_BMANMODE_LOMBUF_ATTN); - /* Poll for buffer manager start indication */ - for (i = 0; i < BGE_TIMEOUT; i++) { - DELAY(10); - if (CSR_READ_4(sc, BGE_BMAN_MODE) & BGE_BMANMODE_ENABLE) - break; - } + /* Poll for buffer manager start indication */ + for (i = 0; i < BGE_TIMEOUT; i++) { + DELAY(10); + if (CSR_READ_4(sc, BGE_BMAN_MODE) & BGE_BMANMODE_ENABLE) + break; + } - if (i == BGE_TIMEOUT) { - device_printf(sc->bge_dev, - "buffer manager failed to start\n"); - return (ENXIO); - } + if (i == BGE_TIMEOUT) { + device_printf(sc->bge_dev, "buffer manager failed to start\n"); + return (ENXIO); } /* Enable flow-through queues */ @@ -5137,6 +5135,20 @@ bge_watchdog(struct bge_softc *sc) ifp->if_oerrors++; } +static void +bge_stop_block(struct bge_softc *sc, bus_size_t reg, uint32_t bit) +{ + int i; + + BGE_CLRBIT(sc, reg, bit); + + for (i = 0; i < BGE_TIMEOUT; i++) { + if ((CSR_READ_4(sc, reg) & bit) == 0) + return; + DELAY(100); + } +} + /* * Stop the adapter and free any mbufs allocated to the * RX and TX lists. @@ -5165,35 +5177,36 @@ bge_stop(struct bge_softc *sc) /* * Disable all of the receiver blocks. */ - BGE_CLRBIT(sc, BGE_RX_MODE, BGE_RXMODE_ENABLE); - BGE_CLRBIT(sc, BGE_RBDI_MODE, BGE_RBDIMODE_ENABLE); - BGE_CLRBIT(sc, BGE_RXLP_MODE, BGE_RXLPMODE_ENABLE); - if (!(BGE_IS_5705_PLUS(sc))) - BGE_CLRBIT(sc, BGE_RXLS_MODE, BGE_RXLSMODE_ENABLE); - BGE_CLRBIT(sc, BGE_RDBDI_MODE, BGE_RBDIMODE_ENABLE); - BGE_CLRBIT(sc, BGE_RDC_MODE, BGE_RDCMODE_ENABLE); - BGE_CLRBIT(sc, BGE_RBDC_MODE, BGE_RBDCMODE_ENABLE); + bge_stop_block(sc, BGE_RX_MODE, BGE_RXMODE_ENABLE); + bge_stop_block(sc, BGE_RBDI_MODE, BGE_RBDIMODE_ENABLE); + bge_stop_block(sc, BGE_RXLP_MODE, BGE_RXLPMODE_ENABLE); + if (BGE_IS_5700_FAMILY(sc)) + bge_stop_block(sc, BGE_RXLS_MODE, BGE_RXLSMODE_ENABLE); + bge_stop_block(sc, BGE_RDBDI_MODE, BGE_RBDIMODE_ENABLE); + bge_stop_block(sc, BGE_RDC_MODE, BGE_RDCMODE_ENABLE); + bge_stop_block(sc, BGE_RBDC_MODE, BGE_RBDCMODE_ENABLE); /* * Disable all of the transmit blocks. */ - BGE_CLRBIT(sc, BGE_SRS_MODE, BGE_SRSMODE_ENABLE); - BGE_CLRBIT(sc, BGE_SBDI_MODE, BGE_SBDIMODE_ENABLE); - BGE_CLRBIT(sc, BGE_SDI_MODE, BGE_SDIMODE_ENABLE); - BGE_CLRBIT(sc, BGE_RDMA_MODE, BGE_RDMAMODE_ENABLE); - BGE_CLRBIT(sc, BGE_SDC_MODE, BGE_SDCMODE_ENABLE); - if (!(BGE_IS_5705_PLUS(sc))) - BGE_CLRBIT(sc, BGE_DMAC_MODE, BGE_DMACMODE_ENABLE); - BGE_CLRBIT(sc, BGE_SBDC_MODE, BGE_SBDCMODE_ENABLE); + bge_stop_block(sc, BGE_SRS_MODE, BGE_SRSMODE_ENABLE); + bge_stop_block(sc, BGE_SBDI_MODE, BGE_SBDIMODE_ENABLE); + bge_stop_block(sc, BGE_SDI_MODE, BGE_SDIMODE_ENABLE); + bge_stop_block(sc, BGE_RDMA_MODE, BGE_RDMAMODE_ENABLE); + bge_stop_block(sc, BGE_SDC_MODE, BGE_SDCMODE_ENABLE); + if (BGE_IS_5700_FAMILY(sc)) + bge_stop_block(sc, BGE_DMAC_MODE, BGE_DMACMODE_ENABLE); + bge_stop_block(sc, BGE_SBDC_MODE, BGE_SBDCMODE_ENABLE); /* * Shut down all of the memory managers and related * state machines. */ - BGE_CLRBIT(sc, BGE_HCC_MODE, BGE_HCCMODE_ENABLE); - BGE_CLRBIT(sc, BGE_WDMA_MODE, BGE_WDMAMODE_ENABLE); - if (!(BGE_IS_5705_PLUS(sc))) - BGE_CLRBIT(sc, BGE_MBCF_MODE, BGE_MBCFMODE_ENABLE); + bge_stop_block(sc, BGE_HCC_MODE, BGE_HCCMODE_ENABLE); + bge_stop_block(sc, BGE_WDMA_MODE, BGE_WDMAMODE_ENABLE); + if (BGE_IS_5700_FAMILY(sc)) + bge_stop_block(sc, BGE_MBCF_MODE, BGE_MBCFMODE_ENABLE); + CSR_WRITE_4(sc, BGE_FTQ_RESET, 0xFFFFFFFF); CSR_WRITE_4(sc, BGE_FTQ_RESET, 0); if (!(BGE_IS_5705_PLUS(sc))) { From owner-svn-src-stable-8@FreeBSD.ORG Fri May 27 18:58:09 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53C96106566B; Fri, 27 May 2011 18:58:09 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 296E18FC0C; Fri, 27 May 2011 18:58:09 +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 p4RIw95v048072; Fri, 27 May 2011 18:58:09 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4RIw90k048070; Fri, 27 May 2011 18:58:09 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201105271858.p4RIw90k048070@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 27 May 2011 18:58:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222371 - stable/8/sys/dev/gem X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2011 18:58:09 -0000 Author: yongari Date: Fri May 27 18:58:08 2011 New Revision: 222371 URL: http://svn.freebsd.org/changeset/base/222371 Log: MFC r222135: Remove unnecessary controller reinitialization by checking IFF_DRV_RUNNING flag. Previously running dhclient or adding alias addresses reinitialized controller and it resulted in unnecessary link flips. Modified: stable/8/sys/dev/gem/if_gem.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/gem/if_gem.c ============================================================================== --- stable/8/sys/dev/gem/if_gem.c Fri May 27 18:47:48 2011 (r222370) +++ stable/8/sys/dev/gem/if_gem.c Fri May 27 18:58:08 2011 (r222371) @@ -739,8 +739,10 @@ gem_reset_rxdma(struct gem_softc *sc) { int i; - if (gem_reset_rx(sc) != 0) + if (gem_reset_rx(sc) != 0) { + sc->sc_ifp->if_drv_flags &= ~IFF_DRV_RUNNING; return (gem_init_locked(sc)); + } for (i = 0; i < GEM_NRXDESC; i++) if (sc->sc_rxsoft[i].rxs_mbuf != NULL) GEM_UPDATE_RXDESC(sc, i); @@ -924,6 +926,9 @@ gem_init_locked(struct gem_softc *sc) GEM_LOCK_ASSERT(sc, MA_OWNED); + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) + return; + #ifdef GEM_DEBUG CTR2(KTR_GEM, "%s: %s: calling stop", device_get_name(sc->sc_dev), __func__); @@ -1762,6 +1767,7 @@ gem_intr(void *v) if ((status2 & (GEM_MAC_TX_UNDERRUN | GEM_MAC_TX_PKT_TOO_LONG)) != 0) { sc->sc_ifp->if_oerrors++; + sc->sc_ifp->if_drv_flags &= ~IFF_DRV_RUNNING; gem_init_locked(sc); } } @@ -1814,6 +1820,7 @@ gem_watchdog(struct gem_softc *sc) ++ifp->if_oerrors; /* Try to get more packets going. */ + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; gem_init_locked(sc); gem_start_locked(ifp); return (EJUSTRETURN); From owner-svn-src-stable-8@FreeBSD.ORG Fri May 27 19:03:43 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4CD7C106566B; Fri, 27 May 2011 19:03:43 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2266F8FC0A; Fri, 27 May 2011 19:03:43 +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 p4RJ3hhw048441; Fri, 27 May 2011 19:03:43 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4RJ3hwQ048438; Fri, 27 May 2011 19:03:43 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201105271903.p4RJ3hwQ048438@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 27 May 2011 19:03:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222374 - in stable/8/sys/dev: alc ale X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2011 19:03:43 -0000 Author: yongari Date: Fri May 27 19:03:42 2011 New Revision: 222374 URL: http://svn.freebsd.org/changeset/base/222374 Log: MFC r222107: Fix typo. Submitted by: brad at OpenBSD Modified: stable/8/sys/dev/alc/if_alcreg.h stable/8/sys/dev/ale/if_alereg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/alc/if_alcreg.h ============================================================================== --- stable/8/sys/dev/alc/if_alcreg.h Fri May 27 19:02:37 2011 (r222373) +++ stable/8/sys/dev/alc/if_alcreg.h Fri May 27 19:03:42 2011 (r222374) @@ -17,12 +17,12 @@ * 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 - * DAMATES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * 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 DAMATE. + * SUCH DAMAGE. * * $FreeBSD$ */ Modified: stable/8/sys/dev/ale/if_alereg.h ============================================================================== --- stable/8/sys/dev/ale/if_alereg.h Fri May 27 19:02:37 2011 (r222373) +++ stable/8/sys/dev/ale/if_alereg.h Fri May 27 19:03:42 2011 (r222374) @@ -17,12 +17,12 @@ * 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 - * DAMATES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * 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 DAMATE. + * SUCH DAMAGE. * * $FreeBSD$ */ From owner-svn-src-stable-8@FreeBSD.ORG Fri May 27 19:26:12 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C34B11065697; Fri, 27 May 2011 19:26:12 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A861F8FC08; Fri, 27 May 2011 19:26: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 p4RJQC3t049319; Fri, 27 May 2011 19:26:12 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4RJQCtA049317; Fri, 27 May 2011 19:26:12 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201105271926.p4RJQCtA049317@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 27 May 2011 19:26:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222377 - stable/8/sys/dev/xl X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2011 19:26:13 -0000 Author: yongari Date: Fri May 27 19:26:12 2011 New Revision: 222377 URL: http://svn.freebsd.org/changeset/base/222377 Log: MFC r221555: Rewrite RX filter logic and provide controller specific filter handler for 3C90x and 3C90xB/C respectively. This simplifies ioctl handler as well as enhancing readability. While I'm here don't reprogram multicast filter when driver is not running. Modified: stable/8/sys/dev/xl/if_xl.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/xl/if_xl.c ============================================================================== --- stable/8/sys/dev/xl/if_xl.c Fri May 27 19:06:03 2011 (r222376) +++ stable/8/sys/dev/xl/if_xl.c Fri May 27 19:26:12 2011 (r222377) @@ -263,10 +263,11 @@ static void xl_mii_send(struct xl_softc static int xl_mii_readreg(struct xl_softc *, struct xl_mii_frame *); static int xl_mii_writereg(struct xl_softc *, struct xl_mii_frame *); +static void xl_rxfilter(struct xl_softc *); +static void xl_rxfilter_90x(struct xl_softc *); +static void xl_rxfilter_90xB(struct xl_softc *); static void xl_setcfg(struct xl_softc *); static void xl_setmode(struct xl_softc *, int); -static void xl_setmulti(struct xl_softc *); -static void xl_setmulti_hash(struct xl_softc *); static void xl_reset(struct xl_softc *); static int xl_list_rx_init(struct xl_softc *); static int xl_list_tx_init(struct xl_softc *); @@ -701,101 +702,133 @@ xl_read_eeprom(struct xl_softc *sc, cadd return (err ? 1 : 0); } +static void +xl_rxfilter(struct xl_softc *sc) +{ + + if (sc->xl_type == XL_TYPE_905B) + xl_rxfilter_90xB(sc); + else + xl_rxfilter_90x(sc); +} + /* * NICs older than the 3c905B have only one multicast option, which * is to enable reception of all multicast frames. */ static void -xl_setmulti(struct xl_softc *sc) +xl_rxfilter_90x(struct xl_softc *sc) { - struct ifnet *ifp = sc->xl_ifp; + struct ifnet *ifp; struct ifmultiaddr *ifma; u_int8_t rxfilt; - int mcnt = 0; XL_LOCK_ASSERT(sc); + ifp = sc->xl_ifp; + XL_SEL_WIN(5); rxfilt = CSR_READ_1(sc, XL_W5_RX_FILTER); + rxfilt &= ~(XL_RXFILTER_ALLFRAMES | XL_RXFILTER_ALLMULTI | + XL_RXFILTER_BROADCAST | XL_RXFILTER_INDIVIDUAL); - if (ifp->if_flags & IFF_ALLMULTI) { - rxfilt |= XL_RXFILTER_ALLMULTI; - CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_RX_SET_FILT|rxfilt); - return; - } - - if_maddr_rlock(ifp); - TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) - mcnt++; - if_maddr_runlock(ifp); + /* Set the individual bit to receive frames for this host only. */ + rxfilt |= XL_RXFILTER_INDIVIDUAL; + /* Set capture broadcast bit to capture broadcast frames. */ + if (ifp->if_flags & IFF_BROADCAST) + rxfilt |= XL_RXFILTER_BROADCAST; - if (mcnt) - rxfilt |= XL_RXFILTER_ALLMULTI; - else - rxfilt &= ~XL_RXFILTER_ALLMULTI; + /* If we want promiscuous mode, set the allframes bit. */ + if (ifp->if_flags & (IFF_PROMISC | IFF_ALLMULTI)) { + if (ifp->if_flags & IFF_PROMISC) + rxfilt |= XL_RXFILTER_ALLFRAMES; + if (ifp->if_flags & IFF_ALLMULTI) + rxfilt |= XL_RXFILTER_ALLMULTI; + } else { + if_maddr_rlock(ifp); + TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { + if (ifma->ifma_addr->sa_family != AF_LINK) + continue; + rxfilt |= XL_RXFILTER_ALLMULTI; + break; + } + if_maddr_runlock(ifp); + } - CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_RX_SET_FILT|rxfilt); + CSR_WRITE_2(sc, XL_COMMAND, rxfilt | XL_CMD_RX_SET_FILT); + XL_SEL_WIN(7); } /* * 3c905B adapters have a hash filter that we can program. */ static void -xl_setmulti_hash(struct xl_softc *sc) +xl_rxfilter_90xB(struct xl_softc *sc) { - struct ifnet *ifp = sc->xl_ifp; - int h = 0, i; + struct ifnet *ifp; struct ifmultiaddr *ifma; + int i, mcnt; + u_int16_t h; u_int8_t rxfilt; - int mcnt = 0; XL_LOCK_ASSERT(sc); + ifp = sc->xl_ifp; + XL_SEL_WIN(5); rxfilt = CSR_READ_1(sc, XL_W5_RX_FILTER); + rxfilt &= ~(XL_RXFILTER_ALLFRAMES | XL_RXFILTER_ALLMULTI | + XL_RXFILTER_BROADCAST | XL_RXFILTER_INDIVIDUAL | + XL_RXFILTER_MULTIHASH); - if (ifp->if_flags & IFF_ALLMULTI) { - rxfilt |= XL_RXFILTER_ALLMULTI; - CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_RX_SET_FILT|rxfilt); - return; - } else - rxfilt &= ~XL_RXFILTER_ALLMULTI; + /* Set the individual bit to receive frames for this host only. */ + rxfilt |= XL_RXFILTER_INDIVIDUAL; + /* Set capture broadcast bit to capture broadcast frames. */ + if (ifp->if_flags & IFF_BROADCAST) + rxfilt |= XL_RXFILTER_BROADCAST; - /* first, zot all the existing hash bits */ - for (i = 0; i < XL_HASHFILT_SIZE; i++) - CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_RX_SET_HASH|i); - - /* now program new ones */ - if_maddr_rlock(ifp); - TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { - if (ifma->ifma_addr->sa_family != AF_LINK) - continue; - /* - * Note: the 3c905B currently only supports a 64-bit hash - * table, which means we really only need 6 bits, but the - * manual indicates that future chip revisions will have a - * 256-bit hash table, hence the routine is set up to - * calculate 8 bits of position info in case we need it some - * day. - * Note II, The Sequel: _CURRENT_ versions of the 3c905B have - * a 256 bit hash table. This means we have to use all 8 bits - * regardless. On older cards, the upper 2 bits will be - * ignored. Grrrr.... - */ - h = ether_crc32_be(LLADDR((struct sockaddr_dl *) - ifma->ifma_addr), ETHER_ADDR_LEN) & 0xFF; - CSR_WRITE_2(sc, XL_COMMAND, - h | XL_CMD_RX_SET_HASH | XL_HASH_SET); - mcnt++; + /* If we want promiscuous mode, set the allframes bit. */ + if (ifp->if_flags & (IFF_PROMISC | IFF_ALLMULTI)) { + if (ifp->if_flags & IFF_PROMISC) + rxfilt |= XL_RXFILTER_ALLFRAMES; + if (ifp->if_flags & IFF_ALLMULTI) + rxfilt |= XL_RXFILTER_ALLMULTI; + } else { + /* First, zot all the existing hash bits. */ + for (i = 0; i < XL_HASHFILT_SIZE; i++) + CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_RX_SET_HASH | i); + + /* Now program new ones. */ + mcnt = 0; + if_maddr_rlock(ifp); + TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { + if (ifma->ifma_addr->sa_family != AF_LINK) + continue; + /* + * Note: the 3c905B currently only supports a 64-bit + * hash table, which means we really only need 6 bits, + * but the manual indicates that future chip revisions + * will have a 256-bit hash table, hence the routine + * is set up to calculate 8 bits of position info in + * case we need it some day. + * Note II, The Sequel: _CURRENT_ versions of the + * 3c905B have a 256 bit hash table. This means we have + * to use all 8 bits regardless. On older cards, the + * upper 2 bits will be ignored. Grrrr.... + */ + h = ether_crc32_be(LLADDR((struct sockaddr_dl *) + ifma->ifma_addr), ETHER_ADDR_LEN) & 0xFF; + CSR_WRITE_2(sc, XL_COMMAND, + h | XL_CMD_RX_SET_HASH | XL_HASH_SET); + mcnt++; + } + if_maddr_runlock(ifp); + if (mcnt > 0) + rxfilt |= XL_RXFILTER_MULTIHASH; } - if_maddr_runlock(ifp); - - if (mcnt) - rxfilt |= XL_RXFILTER_MULTIHASH; - else - rxfilt &= ~XL_RXFILTER_MULTIHASH; CSR_WRITE_2(sc, XL_COMMAND, rxfilt | XL_CMD_RX_SET_FILT); + XL_SEL_WIN(7); } static void @@ -2763,7 +2796,6 @@ xl_init_locked(struct xl_softc *sc) { struct ifnet *ifp = sc->xl_ifp; int error, i; - u_int16_t rxfilt = 0; struct mii_data *mii = NULL; XL_LOCK_ASSERT(sc); @@ -2862,39 +2894,7 @@ xl_init_locked(struct xl_softc *sc) } /* Set RX filter bits. */ - XL_SEL_WIN(5); - rxfilt = CSR_READ_1(sc, XL_W5_RX_FILTER); - - /* Set the individual bit to receive frames for this host only. */ - rxfilt |= XL_RXFILTER_INDIVIDUAL; - - /* If we want promiscuous mode, set the allframes bit. */ - if (ifp->if_flags & IFF_PROMISC) { - rxfilt |= XL_RXFILTER_ALLFRAMES; - CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_RX_SET_FILT|rxfilt); - } else { - rxfilt &= ~XL_RXFILTER_ALLFRAMES; - CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_RX_SET_FILT|rxfilt); - } - - /* - * Set capture broadcast bit to capture broadcast frames. - */ - if (ifp->if_flags & IFF_BROADCAST) { - rxfilt |= XL_RXFILTER_BROADCAST; - CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_RX_SET_FILT|rxfilt); - } else { - rxfilt &= ~XL_RXFILTER_BROADCAST; - CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_RX_SET_FILT|rxfilt); - } - - /* - * Program the multicast filter, if necessary. - */ - if (sc->xl_type == XL_TYPE_905B) - xl_setmulti_hash(sc); - else - xl_setmulti(sc); + xl_rxfilter(sc); /* * Load the address of the RX list. We have to @@ -3123,30 +3123,16 @@ xl_ioctl(struct ifnet *ifp, u_long comma struct ifreq *ifr = (struct ifreq *) data; int error = 0, mask; struct mii_data *mii = NULL; - u_int8_t rxfilt; switch (command) { case SIOCSIFFLAGS: XL_LOCK(sc); - - XL_SEL_WIN(5); - rxfilt = CSR_READ_1(sc, XL_W5_RX_FILTER); if (ifp->if_flags & IFF_UP) { if (ifp->if_drv_flags & IFF_DRV_RUNNING && - ifp->if_flags & IFF_PROMISC && - !(sc->xl_if_flags & IFF_PROMISC)) { - rxfilt |= XL_RXFILTER_ALLFRAMES; - CSR_WRITE_2(sc, XL_COMMAND, - XL_CMD_RX_SET_FILT|rxfilt); - XL_SEL_WIN(7); - } else if (ifp->if_drv_flags & IFF_DRV_RUNNING && - !(ifp->if_flags & IFF_PROMISC) && - sc->xl_if_flags & IFF_PROMISC) { - rxfilt &= ~XL_RXFILTER_ALLFRAMES; - CSR_WRITE_2(sc, XL_COMMAND, - XL_CMD_RX_SET_FILT|rxfilt); - XL_SEL_WIN(7); - } else + (ifp->if_flags ^ sc->xl_if_flags) & + (IFF_PROMISC | IFF_ALLMULTI)) + xl_rxfilter(sc); + else xl_init_locked(sc); } else { if (ifp->if_drv_flags & IFF_DRV_RUNNING) @@ -3154,18 +3140,14 @@ xl_ioctl(struct ifnet *ifp, u_long comma } sc->xl_if_flags = ifp->if_flags; XL_UNLOCK(sc); - error = 0; break; case SIOCADDMULTI: case SIOCDELMULTI: /* XXX Downcall from if_addmulti() possibly with locks held. */ XL_LOCK(sc); - if (sc->xl_type == XL_TYPE_905B) - xl_setmulti_hash(sc); - else - xl_setmulti(sc); + if (ifp->if_drv_flags & IFF_DRV_RUNNING) + xl_rxfilter(sc); XL_UNLOCK(sc); - error = 0; break; case SIOCGIFMEDIA: case SIOCSIFMEDIA: From owner-svn-src-stable-8@FreeBSD.ORG Fri May 27 20:21:13 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C695106566C; Fri, 27 May 2011 20:21:13 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0B87D8FC08; Fri, 27 May 2011 20:21:13 +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 p4RKLC4A051294; Fri, 27 May 2011 20:21:12 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4RKLCRM051291; Fri, 27 May 2011 20:21:12 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201105272021.p4RKLCRM051291@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 27 May 2011 20:21:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222382 - stable/8/sys/dev/xl X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2011 20:21:13 -0000 Author: yongari Date: Fri May 27 20:21:12 2011 New Revision: 222382 URL: http://svn.freebsd.org/changeset/base/222382 Log: MFC r221557-221558,221560-221561,221571: r221557: Remove unnecessary htole32/le32toh dance. r221571: Remove unneeded use of variable status. r221558: Set status word once instead of twice. For 3C90xB/3C90xC, frame length of status word is ignored. While here move bus_dmamap_sync() up where DMA map is loaded. r221560: Call bus_dmamap_sync() only after TX DPD update. r221561: Updating status word should be the last operation of UPD structure renewal. Disable instruction reordering by adding volatile to xl_list_onefrag structure. Modified: stable/8/sys/dev/xl/if_xl.c stable/8/sys/dev/xl/if_xlreg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/xl/if_xl.c ============================================================================== --- stable/8/sys/dev/xl/if_xl.c Fri May 27 20:01:46 2011 (r222381) +++ stable/8/sys/dev/xl/if_xl.c Fri May 27 20:21:12 2011 (r222382) @@ -1904,8 +1904,8 @@ xl_newbuf(struct xl_softc *sc, struct xl sc->xl_tmpmap = map; c->xl_mbuf = m_new; c->xl_ptr->xl_frag.xl_len = htole32(m_new->m_len | XL_LAST_FRAG); - c->xl_ptr->xl_status = 0; c->xl_ptr->xl_frag.xl_addr = htole32(segs->ds_addr); + c->xl_ptr->xl_status = 0; bus_dmamap_sync(sc->xl_mtag, c->xl_map, BUS_DMASYNC_PREREAD); return (0); } @@ -2507,6 +2507,7 @@ xl_encap(struct xl_softc *sc, struct xl_ *m_head = NULL; return (EIO); } + bus_dmamap_sync(sc->xl_mtag, c->xl_map, BUS_DMASYNC_PREWRITE); total_len = 0; for (i = 0; i < nseg; i++) { @@ -2518,10 +2519,7 @@ xl_encap(struct xl_softc *sc, struct xl_ htole32(sc->xl_cdata.xl_tx_segs[i].ds_len); total_len += sc->xl_cdata.xl_tx_segs[i].ds_len; } - c->xl_ptr->xl_frag[nseg - 1].xl_len = - htole32(sc->xl_cdata.xl_tx_segs[nseg - 1].ds_len | XL_LAST_FRAG); - c->xl_ptr->xl_status = htole32(total_len); - c->xl_ptr->xl_next = 0; + c->xl_ptr->xl_frag[nseg - 1].xl_len |= htole32(XL_LAST_FRAG); if (sc->xl_type == XL_TYPE_905B) { status = XL_TXSTAT_RND_DEFEAT; @@ -2536,11 +2534,12 @@ xl_encap(struct xl_softc *sc, struct xl_ status |= XL_TXSTAT_UDPCKSUM; } #endif - c->xl_ptr->xl_status = htole32(status); - } + } else + status = total_len; + c->xl_ptr->xl_status = htole32(status); + c->xl_ptr->xl_next = 0; c->xl_mbuf = *m_head; - bus_dmamap_sync(sc->xl_mtag, c->xl_map, BUS_DMASYNC_PREWRITE); return (0); } @@ -2572,7 +2571,6 @@ xl_start_locked(struct ifnet *ifp) struct xl_softc *sc = ifp->if_softc; struct mbuf *m_head = NULL; struct xl_chain *prev = NULL, *cur_tx = NULL, *start_tx; - u_int32_t status; int error; XL_LOCK_ASSERT(sc); @@ -2644,10 +2642,7 @@ xl_start_locked(struct ifnet *ifp) * get an interrupt once for the whole chain rather than * once for each packet. */ - cur_tx->xl_ptr->xl_status = htole32(le32toh(cur_tx->xl_ptr->xl_status) | - XL_TXSTAT_DL_INTR); - bus_dmamap_sync(sc->xl_ldata.xl_tx_tag, sc->xl_ldata.xl_tx_dmamap, - BUS_DMASYNC_PREWRITE); + cur_tx->xl_ptr->xl_status |= htole32(XL_TXSTAT_DL_INTR); /* * Queue the packets. If the TX channel is clear, update @@ -2660,14 +2655,15 @@ xl_start_locked(struct ifnet *ifp) sc->xl_cdata.xl_tx_tail->xl_next = start_tx; sc->xl_cdata.xl_tx_tail->xl_ptr->xl_next = htole32(start_tx->xl_phys); - status = sc->xl_cdata.xl_tx_tail->xl_ptr->xl_status; - sc->xl_cdata.xl_tx_tail->xl_ptr->xl_status = - htole32(le32toh(status) & ~XL_TXSTAT_DL_INTR); + sc->xl_cdata.xl_tx_tail->xl_ptr->xl_status &= + htole32(~XL_TXSTAT_DL_INTR); sc->xl_cdata.xl_tx_tail = cur_tx; } else { sc->xl_cdata.xl_tx_head = start_tx; sc->xl_cdata.xl_tx_tail = cur_tx; } + bus_dmamap_sync(sc->xl_ldata.xl_tx_tag, sc->xl_ldata.xl_tx_dmamap, + BUS_DMASYNC_PREWRITE); if (!CSR_READ_4(sc, XL_DOWNLIST_PTR)) CSR_WRITE_4(sc, XL_DOWNLIST_PTR, start_tx->xl_phys); @@ -2766,14 +2762,13 @@ xl_start_90xB_locked(struct ifnet *ifp) * get an interrupt once for the whole chain rather than * once for each packet. */ - cur_tx->xl_ptr->xl_status = htole32(le32toh(cur_tx->xl_ptr->xl_status) | - XL_TXSTAT_DL_INTR); - bus_dmamap_sync(sc->xl_ldata.xl_tx_tag, sc->xl_ldata.xl_tx_dmamap, - BUS_DMASYNC_PREWRITE); + cur_tx->xl_ptr->xl_status |= htole32(XL_TXSTAT_DL_INTR); /* Start transmission */ sc->xl_cdata.xl_tx_prod = idx; start_tx->xl_prev->xl_ptr->xl_next = htole32(start_tx->xl_phys); + bus_dmamap_sync(sc->xl_ldata.xl_tx_tag, sc->xl_ldata.xl_tx_dmamap, + BUS_DMASYNC_PREWRITE); /* * Set a timeout in case the chip goes out to lunch. Modified: stable/8/sys/dev/xl/if_xlreg.h ============================================================================== --- stable/8/sys/dev/xl/if_xlreg.h Fri May 27 20:01:46 2011 (r222381) +++ stable/8/sys/dev/xl/if_xlreg.h Fri May 27 20:21:12 2011 (r222382) @@ -468,8 +468,8 @@ struct xl_list { struct xl_list_onefrag { u_int32_t xl_next; /* final entry has 0 nextptr */ - u_int32_t xl_status; - struct xl_frag xl_frag; + volatile u_int32_t xl_status; + volatile struct xl_frag xl_frag; }; struct xl_list_data { From owner-svn-src-stable-8@FreeBSD.ORG Fri May 27 20:33:27 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01515106564A; Fri, 27 May 2011 20:33:27 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DC2428FC14; Fri, 27 May 2011 20:33: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 p4RKXQMC051854; Fri, 27 May 2011 20:33:26 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4RKXQJE051852; Fri, 27 May 2011 20:33:26 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201105272033.p4RKXQJE051852@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 27 May 2011 20:33:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222384 - stable/8/sys/dev/xl X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2011 20:33:27 -0000 Author: yongari Date: Fri May 27 20:33:26 2011 New Revision: 222384 URL: http://svn.freebsd.org/changeset/base/222384 Log: MFC r221563-221564: r221563: Terminate interrupt handler if driver detect it's not running. Also add check for driver running state before trying to send frames. While I'm here, use for loop. r221564: Change xl_rxeof() a bit to return the number of processed frames in RX descriptor ring. Previously it returned the number of frames that were successfully passed to upper stack which in turn means it ignored frames that were discarded due to errors. The number of processed frames in RX descriptor ring is used to detect whether driver is out of sync with controller's current descriptor pointer. Returning number of processed frames reduces unnecessary (probably wrong) re-synchronization. While here, remove unnecessary local variable initialization. Modified: stable/8/sys/dev/xl/if_xl.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/xl/if_xl.c ============================================================================== --- stable/8/sys/dev/xl/if_xl.c Fri May 27 20:22:19 2011 (r222383) +++ stable/8/sys/dev/xl/if_xl.c Fri May 27 20:33:26 2011 (r222384) @@ -1944,7 +1944,7 @@ xl_rxeof(struct xl_softc *sc) struct mbuf *m; struct ifnet *ifp = sc->xl_ifp; struct xl_chain_onefrag *cur_rx; - int total_len = 0; + int total_len; int rx_npkts = 0; u_int32_t rxstat; @@ -1963,6 +1963,7 @@ again: cur_rx = sc->xl_cdata.xl_rx_head; sc->xl_cdata.xl_rx_head = cur_rx->xl_next; total_len = rxstat & XL_RXSTAT_LENMASK; + rx_npkts++; /* * Since we have told the chip to allow large frames, @@ -2047,7 +2048,6 @@ again: XL_UNLOCK(sc); (*ifp->if_input)(ifp, m); XL_LOCK(sc); - rx_npkts++; /* * If we are running from the taskqueue, the interface @@ -2273,17 +2273,17 @@ xl_intr(void *arg) } #endif - while ((status = CSR_READ_2(sc, XL_STATUS)) & XL_INTRS && - status != 0xFFFF) { + for (;;) { + status = CSR_READ_2(sc, XL_STATUS); + if ((status & XL_INTRS) == 0 || status == 0xFFFF) + break; CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_INTR_ACK|(status & XL_INTRS)); + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + break; if (status & XL_STAT_UP_COMPLETE) { - int curpkts; - - curpkts = ifp->if_ipackets; - xl_rxeof(sc); - if (curpkts == ifp->if_ipackets) { + if (xl_rxeof(sc) == 0) { while (xl_rx_resync(sc)) xl_rxeof(sc); } @@ -2304,6 +2304,7 @@ xl_intr(void *arg) if (status & XL_STAT_ADFAIL) { ifp->if_drv_flags &= ~IFF_DRV_RUNNING; xl_init_locked(sc); + break; } if (status & XL_STAT_STATSOFLOW) { @@ -2313,7 +2314,8 @@ xl_intr(void *arg) } } - if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd) && + ifp->if_drv_flags & IFF_DRV_RUNNING) { if (sc->xl_type == XL_TYPE_905B) xl_start_90xB_locked(ifp); else From owner-svn-src-stable-8@FreeBSD.ORG Fri May 27 21:43:35 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 762DA106566C; Fri, 27 May 2011 21:43:35 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 657D88FC16; Fri, 27 May 2011 21:43: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 p4RLhZ5p054179; Fri, 27 May 2011 21:43:35 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4RLhZ5A054176; Fri, 27 May 2011 21:43:35 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201105272143.p4RLhZ5A054176@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 27 May 2011 21:43:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222387 - stable/8/sys/dev/xl X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 May 2011 21:43:35 -0000 Author: yongari Date: Fri May 27 21:43:35 2011 New Revision: 222387 URL: http://svn.freebsd.org/changeset/base/222387 Log: MFC r221565-221568,221579: r221565: Reuse the TX descriptor(DPD) if xl_encap() failed instead of just picking the next available one. This may explain why xl(4) sees TX underrun error with no queued frame. I hope this addresses a long standing xl(4) watchdog timeout issue as well. Obtained from: OpenBSD r221566,221579: Rename xl_stats_update() callout handler to xl_tick() and move MII tick driving logic to xl_tick(). Now xl_tick() handles MII tick as well as periodic updating of statistics. This change removes a hack used in interrupt handler where it wanted to update statistics without driving MII tick. r221567: Rearm watchdog timer if driver kick controller to recover from TX underrun error. While here, prepend 0x to status code to show TX status is hex number. r221568: XL_DMACTL is 32bit register, use 32bit write macro. While I'm here add more bits for the register. Modified: stable/8/sys/dev/xl/if_xl.c stable/8/sys/dev/xl/if_xlreg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/xl/if_xl.c ============================================================================== --- stable/8/sys/dev/xl/if_xl.c Fri May 27 20:53:07 2011 (r222386) +++ stable/8/sys/dev/xl/if_xl.c Fri May 27 21:43:35 2011 (r222387) @@ -225,8 +225,8 @@ static int xl_attach(device_t); static int xl_detach(device_t); static int xl_newbuf(struct xl_softc *, struct xl_chain_onefrag *); -static void xl_stats_update(void *); -static void xl_stats_update_locked(struct xl_softc *); +static void xl_tick(void *); +static void xl_stats_update(struct xl_softc *); static int xl_encap(struct xl_softc *, struct xl_chain *, struct mbuf **); static int xl_rxeof(struct xl_softc *); static void xl_rxeof_task(void *, int); @@ -1330,7 +1330,7 @@ xl_attach(device_t dev) goto fail; } - callout_init_mtx(&sc->xl_stat_callout, &sc->xl_mtx, 0); + callout_init_mtx(&sc->xl_tick_callout, &sc->xl_mtx, 0); TASK_INIT(&sc->xl_task, 0, xl_rxeof_task, sc); /* @@ -1695,7 +1695,7 @@ xl_detach(device_t dev) xl_stop(sc); XL_UNLOCK(sc); taskqueue_drain(taskqueue_swi, &sc->xl_task); - callout_drain(&sc->xl_stat_callout); + callout_drain(&sc->xl_tick_callout); ether_ifdetach(ifp); } if (sc->xl_miibus) @@ -2207,7 +2207,7 @@ xl_txeoc(struct xl_softc *sc) txstat & XL_TXSTATUS_JABBER || txstat & XL_TXSTATUS_RECLAIM) { device_printf(sc->xl_dev, - "transmission error: %x\n", txstat); + "transmission error: 0x%02x\n", txstat); CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_TX_RESET); xl_wait(sc); if (sc->xl_type == XL_TYPE_905B) { @@ -2220,11 +2220,14 @@ xl_txeoc(struct xl_softc *sc) CSR_WRITE_4(sc, XL_DOWNLIST_PTR, c->xl_phys); CSR_WRITE_1(sc, XL_DOWN_POLL, 64); + sc->xl_wdog_timer = 5; } } else { - if (sc->xl_cdata.xl_tx_head != NULL) + if (sc->xl_cdata.xl_tx_head != NULL) { CSR_WRITE_4(sc, XL_DOWNLIST_PTR, sc->xl_cdata.xl_tx_head->xl_phys); + sc->xl_wdog_timer = 5; + } } /* * Remember to set this for the @@ -2307,11 +2310,8 @@ xl_intr(void *arg) break; } - if (status & XL_STAT_STATSOFLOW) { - sc->xl_stats_no_timeout = 1; - xl_stats_update_locked(sc); - sc->xl_stats_no_timeout = 0; - } + if (status & XL_STAT_STATSOFLOW) + xl_stats_update(sc); } if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd) && @@ -2379,49 +2379,46 @@ xl_poll_locked(struct ifnet *ifp, enum p xl_init_locked(sc); } - if (status & XL_STAT_STATSOFLOW) { - sc->xl_stats_no_timeout = 1; - xl_stats_update_locked(sc); - sc->xl_stats_no_timeout = 0; - } + if (status & XL_STAT_STATSOFLOW) + xl_stats_update(sc); } } return (rx_npkts); } #endif /* DEVICE_POLLING */ -/* - * XXX: This is an entry point for callout which needs to take the lock. - */ static void -xl_stats_update(void *xsc) +xl_tick(void *xsc) { struct xl_softc *sc = xsc; + struct mii_data *mii; XL_LOCK_ASSERT(sc); + if (sc->xl_miibus != NULL) { + mii = device_get_softc(sc->xl_miibus); + mii_tick(mii); + } + + xl_stats_update(sc); if (xl_watchdog(sc) == EJUSTRETURN) return; - xl_stats_update_locked(sc); + callout_reset(&sc->xl_tick_callout, hz, xl_tick, sc); } static void -xl_stats_update_locked(struct xl_softc *sc) +xl_stats_update(struct xl_softc *sc) { struct ifnet *ifp = sc->xl_ifp; struct xl_stats xl_stats; u_int8_t *p; int i; - struct mii_data *mii = NULL; XL_LOCK_ASSERT(sc); bzero((char *)&xl_stats, sizeof(struct xl_stats)); - if (sc->xl_miibus != NULL) - mii = device_get_softc(sc->xl_miibus); - p = (u_int8_t *)&xl_stats; /* Read all the stats registers. */ @@ -2443,14 +2440,7 @@ xl_stats_update_locked(struct xl_softc * */ XL_SEL_WIN(4); CSR_READ_1(sc, XL_W4_BADSSD); - - if ((mii != NULL) && (!sc->xl_stats_no_timeout)) - mii_tick(mii); - XL_SEL_WIN(7); - - if (!sc->xl_stats_no_timeout) - callout_reset(&sc->xl_stat_callout, hz, xl_stats_update, sc); } /* @@ -2571,8 +2561,9 @@ static void xl_start_locked(struct ifnet *ifp) { struct xl_softc *sc = ifp->if_softc; - struct mbuf *m_head = NULL; + struct mbuf *m_head; struct xl_chain *prev = NULL, *cur_tx = NULL, *start_tx; + struct xl_chain *prev_tx; int error; XL_LOCK_ASSERT(sc); @@ -2602,11 +2593,13 @@ xl_start_locked(struct ifnet *ifp) break; /* Pick a descriptor off the free list. */ + prev_tx = cur_tx; cur_tx = sc->xl_cdata.xl_tx_free; /* Pack the data into the descriptor. */ error = xl_encap(sc, cur_tx, &m_head); if (error) { + cur_tx = prev_tx; if (m_head == NULL) break; ifp->if_drv_flags |= IFF_DRV_OACTIVE; @@ -2700,8 +2693,9 @@ static void xl_start_90xB_locked(struct ifnet *ifp) { struct xl_softc *sc = ifp->if_softc; - struct mbuf *m_head = NULL; + struct mbuf *m_head; struct xl_chain *prev = NULL, *cur_tx = NULL, *start_tx; + struct xl_chain *prev_tx; int error, idx; XL_LOCK_ASSERT(sc); @@ -2724,11 +2718,13 @@ xl_start_90xB_locked(struct ifnet *ifp) if (m_head == NULL) break; + prev_tx = cur_tx; cur_tx = &sc->xl_cdata.xl_tx_chain[idx]; /* Pack the data into the descriptor. */ error = xl_encap(sc, cur_tx, &m_head); if (error) { + cur_tx = prev_tx; if (m_head == NULL) break; ifp->if_drv_flags |= IFF_DRV_OACTIVE; @@ -2949,9 +2945,7 @@ xl_init_locked(struct xl_softc *sc) /* Clear out the stats counters. */ CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_STATS_DISABLE); - sc->xl_stats_no_timeout = 1; - xl_stats_update_locked(sc); - sc->xl_stats_no_timeout = 0; + xl_stats_update(sc); XL_SEL_WIN(4); CSR_WRITE_2(sc, XL_W4_NET_DIAG, XL_NETDIAG_UPPER_BYTES_ENABLE); CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_STATS_ENABLE); @@ -2973,7 +2967,7 @@ xl_init_locked(struct xl_softc *sc) /* Set the RX early threshold */ CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_RX_SET_THRESH|(XL_PACKET_SIZE >>2)); - CSR_WRITE_2(sc, XL_DMACTL, XL_DMACTL_UP_RX_EARLY); + CSR_WRITE_4(sc, XL_DMACTL, XL_DMACTL_UP_RX_EARLY); /* Enable receiver and transmitter. */ CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_TX_ENABLE); @@ -2992,7 +2986,7 @@ xl_init_locked(struct xl_softc *sc) ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; sc->xl_wdog_timer = 0; - callout_reset(&sc->xl_stat_callout, hz, xl_stats_update, sc); + callout_reset(&sc->xl_tick_callout, hz, xl_tick, sc); } /* @@ -3301,7 +3295,7 @@ xl_stop(struct xl_softc *sc) bus_space_write_4(sc->xl_ftag, sc->xl_fhandle, 4, 0x8000); /* Stop the stats updater. */ - callout_stop(&sc->xl_stat_callout); + callout_stop(&sc->xl_tick_callout); /* * Free data in the RX lists. Modified: stable/8/sys/dev/xl/if_xlreg.h ============================================================================== --- stable/8/sys/dev/xl/if_xlreg.h Fri May 27 20:53:07 2011 (r222386) +++ stable/8/sys/dev/xl/if_xlreg.h Fri May 27 21:43:35 2011 (r222387) @@ -124,6 +124,11 @@ #define XL_DMACTL_DOWN_INPROG 0x00000080 #define XL_DMACTL_COUNTER_SPEED 0x00000100 #define XL_DMACTL_DOWNDOWN_MODE 0x00000200 +#define XL_DMACTL_UP_ALTSEQ_DIS 0x00010000 /* 3c90xB/3c90xC */ +#define XL_DMACTL_DOWN_ALTSEQ_DIS 0x00020000 /* 3c90xC only */ +#define XL_DMACTL_DEFEAT_MWI 0x00100000 /* 3c90xB/3c90xC */ +#define XL_DMACTL_DEFEAT_MRL 0x00100000 /* 3c90xB/3c90xC */ +#define XL_DMACTL_UP_OVERRUN_DISC_DIS 0x00200000 /* 3c90xB/3c90xC */ #define XL_DMACTL_TARGET_ABORT 0x40000000 #define XL_DMACTL_MASTER_ABORT 0x80000000 @@ -614,13 +619,12 @@ struct xl_softc { u_int32_t xl_xcvr; u_int16_t xl_media; u_int16_t xl_caps; - u_int8_t xl_stats_no_timeout; u_int16_t xl_tx_thresh; int xl_pmcap; int xl_if_flags; struct xl_list_data xl_ldata; struct xl_chain_data xl_cdata; - struct callout xl_stat_callout; + struct callout xl_tick_callout; int xl_wdog_timer; int xl_flags; struct resource *xl_fres; From owner-svn-src-stable-8@FreeBSD.ORG Sat May 28 00:33:08 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53023106566C; Sat, 28 May 2011 00:33:08 +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 3CDAA8FC12; Sat, 28 May 2011 00:33:08 +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 p4S0X8Ed059754; Sat, 28 May 2011 00:33:08 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4S0X7dY059686; Sat, 28 May 2011 00:33:07 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201105280033.p4S0X7dY059686@svn.freebsd.org> From: Doug Barton Date: Sat, 28 May 2011 00:33:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222396 - in stable/8/contrib/bind9: . bin bin/check bin/dig bin/dig/include/dig bin/dnssec bin/named bin/named/include/named bin/named/unix bin/named/unix/include/named bin/nsupdate bi... X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 May 2011 00:33:08 -0000 Author: dougb Date: Sat May 28 00:33:06 2011 New Revision: 222396 URL: http://svn.freebsd.org/changeset/base/222396 Log: Upgrade to 9.6-ESV-R4-P1, which address the following issues: 1. Very large RRSIG RRsets included in a negative cache can trigger an assertion failure that will crash named (BIND 9 DNS) due to an off-by-one error in a buffer size check. This bug affects all resolving name servers, whether DNSSEC validation is enabled or not, on all BIND versions prior to today. There is a possibility of malicious exploitation of this bug by remote users. 2. Named could fail to validate zones listed in a DLV that validated insecure without using DLV and had DS records in the parent zone. Add a patch provided by ru@ and confirmed by ISC to fix a crash at shutdown time when a SIG(0) key is being used. Deleted: stable/8/contrib/bind9/RELEASE-NOTES-BIND-9.6.3.html stable/8/contrib/bind9/RELEASE-NOTES-BIND-9.6.3.pdf stable/8/contrib/bind9/RELEASE-NOTES-BIND-9.6.3.txt Modified: stable/8/contrib/bind9/CHANGES stable/8/contrib/bind9/FAQ.xml stable/8/contrib/bind9/Makefile.in stable/8/contrib/bind9/README.idnkit stable/8/contrib/bind9/acconfig.h stable/8/contrib/bind9/bin/Makefile.in stable/8/contrib/bind9/bin/check/Makefile.in stable/8/contrib/bind9/bin/check/named-checkconf.8 stable/8/contrib/bind9/bin/check/named-checkconf.docbook stable/8/contrib/bind9/bin/check/named-checkconf.html stable/8/contrib/bind9/bin/check/named-checkzone.8 stable/8/contrib/bind9/bin/check/named-checkzone.docbook stable/8/contrib/bind9/bin/check/named-checkzone.html stable/8/contrib/bind9/bin/dig/Makefile.in stable/8/contrib/bind9/bin/dig/dig.1 stable/8/contrib/bind9/bin/dig/dig.docbook stable/8/contrib/bind9/bin/dig/dig.html stable/8/contrib/bind9/bin/dig/host.1 stable/8/contrib/bind9/bin/dig/host.docbook stable/8/contrib/bind9/bin/dig/host.html stable/8/contrib/bind9/bin/dig/include/dig/dig.h stable/8/contrib/bind9/bin/dig/nslookup.c stable/8/contrib/bind9/bin/dnssec/Makefile.in stable/8/contrib/bind9/bin/dnssec/dnssec-dsfromkey.c stable/8/contrib/bind9/bin/dnssec/dnssec-dsfromkey.docbook stable/8/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.8 stable/8/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.c stable/8/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.docbook stable/8/contrib/bind9/bin/dnssec/dnssec-keygen.8 stable/8/contrib/bind9/bin/dnssec/dnssec-keygen.c stable/8/contrib/bind9/bin/dnssec/dnssec-keygen.docbook stable/8/contrib/bind9/bin/dnssec/dnssec-signzone.8 stable/8/contrib/bind9/bin/dnssec/dnssec-signzone.docbook stable/8/contrib/bind9/bin/dnssec/dnssectool.c stable/8/contrib/bind9/bin/dnssec/dnssectool.h stable/8/contrib/bind9/bin/named/Makefile.in stable/8/contrib/bind9/bin/named/bind9.xsl stable/8/contrib/bind9/bin/named/config.c stable/8/contrib/bind9/bin/named/controlconf.c stable/8/contrib/bind9/bin/named/convertxsl.pl stable/8/contrib/bind9/bin/named/include/named/builtin.h stable/8/contrib/bind9/bin/named/include/named/client.h stable/8/contrib/bind9/bin/named/include/named/config.h stable/8/contrib/bind9/bin/named/include/named/control.h stable/8/contrib/bind9/bin/named/include/named/interfacemgr.h stable/8/contrib/bind9/bin/named/include/named/listenlist.h stable/8/contrib/bind9/bin/named/include/named/log.h stable/8/contrib/bind9/bin/named/include/named/logconf.h stable/8/contrib/bind9/bin/named/include/named/lwaddr.h stable/8/contrib/bind9/bin/named/include/named/lwdclient.h stable/8/contrib/bind9/bin/named/include/named/lwresd.h stable/8/contrib/bind9/bin/named/include/named/lwsearch.h stable/8/contrib/bind9/bin/named/include/named/main.h stable/8/contrib/bind9/bin/named/include/named/notify.h stable/8/contrib/bind9/bin/named/include/named/ns_smf_globals.h stable/8/contrib/bind9/bin/named/include/named/server.h stable/8/contrib/bind9/bin/named/include/named/sortlist.h stable/8/contrib/bind9/bin/named/include/named/statschannel.h stable/8/contrib/bind9/bin/named/include/named/tkeyconf.h stable/8/contrib/bind9/bin/named/include/named/tsigconf.h stable/8/contrib/bind9/bin/named/include/named/types.h stable/8/contrib/bind9/bin/named/include/named/update.h stable/8/contrib/bind9/bin/named/include/named/xfrout.h stable/8/contrib/bind9/bin/named/include/named/zoneconf.h stable/8/contrib/bind9/bin/named/interfacemgr.c stable/8/contrib/bind9/bin/named/listenlist.c stable/8/contrib/bind9/bin/named/log.c stable/8/contrib/bind9/bin/named/logconf.c stable/8/contrib/bind9/bin/named/lwaddr.c stable/8/contrib/bind9/bin/named/lwdclient.c stable/8/contrib/bind9/bin/named/lwderror.c stable/8/contrib/bind9/bin/named/lwdgabn.c stable/8/contrib/bind9/bin/named/lwdgnba.c stable/8/contrib/bind9/bin/named/lwdgrbn.c stable/8/contrib/bind9/bin/named/lwdnoop.c stable/8/contrib/bind9/bin/named/lwresd.8 stable/8/contrib/bind9/bin/named/lwresd.c stable/8/contrib/bind9/bin/named/lwresd.docbook stable/8/contrib/bind9/bin/named/lwresd.html stable/8/contrib/bind9/bin/named/lwsearch.c stable/8/contrib/bind9/bin/named/named.8 stable/8/contrib/bind9/bin/named/named.conf.5 stable/8/contrib/bind9/bin/named/named.conf.docbook stable/8/contrib/bind9/bin/named/named.conf.html stable/8/contrib/bind9/bin/named/named.docbook stable/8/contrib/bind9/bin/named/named.html stable/8/contrib/bind9/bin/named/notify.c stable/8/contrib/bind9/bin/named/sortlist.c stable/8/contrib/bind9/bin/named/statschannel.c stable/8/contrib/bind9/bin/named/tkeyconf.c stable/8/contrib/bind9/bin/named/tsigconf.c stable/8/contrib/bind9/bin/named/unix/Makefile.in stable/8/contrib/bind9/bin/named/unix/include/named/os.h stable/8/contrib/bind9/bin/named/unix/os.c stable/8/contrib/bind9/bin/named/zoneconf.c stable/8/contrib/bind9/bin/nsupdate/Makefile.in stable/8/contrib/bind9/bin/nsupdate/nsupdate.c stable/8/contrib/bind9/bin/rndc/Makefile.in stable/8/contrib/bind9/bin/rndc/include/rndc/os.h stable/8/contrib/bind9/bin/rndc/rndc-confgen.8 stable/8/contrib/bind9/bin/rndc/rndc-confgen.c stable/8/contrib/bind9/bin/rndc/rndc-confgen.docbook stable/8/contrib/bind9/bin/rndc/rndc-confgen.html stable/8/contrib/bind9/bin/rndc/rndc.8 stable/8/contrib/bind9/bin/rndc/rndc.c stable/8/contrib/bind9/bin/rndc/rndc.conf stable/8/contrib/bind9/bin/rndc/rndc.conf.5 stable/8/contrib/bind9/bin/rndc/rndc.conf.docbook stable/8/contrib/bind9/bin/rndc/rndc.conf.html stable/8/contrib/bind9/bin/rndc/rndc.docbook stable/8/contrib/bind9/bin/rndc/rndc.html stable/8/contrib/bind9/bin/rndc/unix/Makefile.in stable/8/contrib/bind9/bin/rndc/unix/os.c stable/8/contrib/bind9/bin/rndc/util.c stable/8/contrib/bind9/bin/rndc/util.h stable/8/contrib/bind9/doc/Makefile.in stable/8/contrib/bind9/doc/arm/Bv9ARM.ch01.html stable/8/contrib/bind9/doc/arm/Bv9ARM.ch02.html stable/8/contrib/bind9/doc/arm/Bv9ARM.ch03.html stable/8/contrib/bind9/doc/arm/Bv9ARM.ch04.html stable/8/contrib/bind9/doc/arm/Bv9ARM.ch05.html stable/8/contrib/bind9/doc/arm/Bv9ARM.ch10.html stable/8/contrib/bind9/doc/arm/Makefile.in stable/8/contrib/bind9/doc/arm/README-SGML stable/8/contrib/bind9/doc/misc/Makefile.in stable/8/contrib/bind9/doc/misc/dnssec stable/8/contrib/bind9/doc/misc/format-options.pl stable/8/contrib/bind9/doc/misc/ipv6 stable/8/contrib/bind9/doc/misc/migration stable/8/contrib/bind9/doc/misc/migration-4to9 stable/8/contrib/bind9/doc/misc/rfc-compliance stable/8/contrib/bind9/doc/misc/roadmap stable/8/contrib/bind9/doc/misc/sdb stable/8/contrib/bind9/doc/misc/sort-options.pl stable/8/contrib/bind9/isc-config.sh.in stable/8/contrib/bind9/lib/Makefile.in stable/8/contrib/bind9/lib/bind9/Makefile.in stable/8/contrib/bind9/lib/bind9/getaddresses.c stable/8/contrib/bind9/lib/bind9/include/Makefile.in stable/8/contrib/bind9/lib/bind9/include/bind9/Makefile.in stable/8/contrib/bind9/lib/bind9/include/bind9/check.h stable/8/contrib/bind9/lib/bind9/include/bind9/getaddresses.h stable/8/contrib/bind9/lib/bind9/include/bind9/version.h stable/8/contrib/bind9/lib/bind9/version.c stable/8/contrib/bind9/lib/dns/acache.c stable/8/contrib/bind9/lib/dns/acl.c stable/8/contrib/bind9/lib/dns/api stable/8/contrib/bind9/lib/dns/byaddr.c stable/8/contrib/bind9/lib/dns/cache.c stable/8/contrib/bind9/lib/dns/callbacks.c stable/8/contrib/bind9/lib/dns/compress.c stable/8/contrib/bind9/lib/dns/db.c stable/8/contrib/bind9/lib/dns/dbiterator.c stable/8/contrib/bind9/lib/dns/dbtable.c stable/8/contrib/bind9/lib/dns/diff.c stable/8/contrib/bind9/lib/dns/dispatch.c stable/8/contrib/bind9/lib/dns/dlz.c stable/8/contrib/bind9/lib/dns/dnssec.c stable/8/contrib/bind9/lib/dns/ds.c stable/8/contrib/bind9/lib/dns/dst_lib.c stable/8/contrib/bind9/lib/dns/dst_openssl.h stable/8/contrib/bind9/lib/dns/dst_parse.c stable/8/contrib/bind9/lib/dns/dst_parse.h stable/8/contrib/bind9/lib/dns/dst_result.c stable/8/contrib/bind9/lib/dns/forward.c stable/8/contrib/bind9/lib/dns/gen-unix.h stable/8/contrib/bind9/lib/dns/gen.c stable/8/contrib/bind9/lib/dns/gssapi_link.c stable/8/contrib/bind9/lib/dns/hmac_link.c stable/8/contrib/bind9/lib/dns/include/Makefile.in stable/8/contrib/bind9/lib/dns/include/dns/Makefile.in stable/8/contrib/bind9/lib/dns/include/dns/acache.h stable/8/contrib/bind9/lib/dns/include/dns/acl.h stable/8/contrib/bind9/lib/dns/include/dns/adb.h stable/8/contrib/bind9/lib/dns/include/dns/bit.h stable/8/contrib/bind9/lib/dns/include/dns/byaddr.h stable/8/contrib/bind9/lib/dns/include/dns/cache.h stable/8/contrib/bind9/lib/dns/include/dns/callbacks.h stable/8/contrib/bind9/lib/dns/include/dns/cert.h stable/8/contrib/bind9/lib/dns/include/dns/compress.h stable/8/contrib/bind9/lib/dns/include/dns/db.h stable/8/contrib/bind9/lib/dns/include/dns/dbiterator.h stable/8/contrib/bind9/lib/dns/include/dns/dbtable.h stable/8/contrib/bind9/lib/dns/include/dns/dispatch.h stable/8/contrib/bind9/lib/dns/include/dns/dlz.h stable/8/contrib/bind9/lib/dns/include/dns/dnssec.h stable/8/contrib/bind9/lib/dns/include/dns/ds.h stable/8/contrib/bind9/lib/dns/include/dns/fixedname.h stable/8/contrib/bind9/lib/dns/include/dns/forward.h stable/8/contrib/bind9/lib/dns/include/dns/iptable.h stable/8/contrib/bind9/lib/dns/include/dns/journal.h stable/8/contrib/bind9/lib/dns/include/dns/keyflags.h stable/8/contrib/bind9/lib/dns/include/dns/keytable.h stable/8/contrib/bind9/lib/dns/include/dns/keyvalues.h stable/8/contrib/bind9/lib/dns/include/dns/lib.h stable/8/contrib/bind9/lib/dns/include/dns/log.h stable/8/contrib/bind9/lib/dns/include/dns/lookup.h stable/8/contrib/bind9/lib/dns/include/dns/master.h stable/8/contrib/bind9/lib/dns/include/dns/masterdump.h stable/8/contrib/bind9/lib/dns/include/dns/message.h stable/8/contrib/bind9/lib/dns/include/dns/nsec.h stable/8/contrib/bind9/lib/dns/include/dns/nsec3.h stable/8/contrib/bind9/lib/dns/include/dns/opcode.h stable/8/contrib/bind9/lib/dns/include/dns/order.h stable/8/contrib/bind9/lib/dns/include/dns/peer.h stable/8/contrib/bind9/lib/dns/include/dns/portlist.h stable/8/contrib/bind9/lib/dns/include/dns/rbt.h stable/8/contrib/bind9/lib/dns/include/dns/rcode.h stable/8/contrib/bind9/lib/dns/include/dns/rdata.h stable/8/contrib/bind9/lib/dns/include/dns/rdataclass.h stable/8/contrib/bind9/lib/dns/include/dns/rdatalist.h stable/8/contrib/bind9/lib/dns/include/dns/rdataset.h stable/8/contrib/bind9/lib/dns/include/dns/rdatasetiter.h stable/8/contrib/bind9/lib/dns/include/dns/rdataslab.h stable/8/contrib/bind9/lib/dns/include/dns/rdatatype.h stable/8/contrib/bind9/lib/dns/include/dns/request.h stable/8/contrib/bind9/lib/dns/include/dns/rootns.h stable/8/contrib/bind9/lib/dns/include/dns/sdb.h stable/8/contrib/bind9/lib/dns/include/dns/sdlz.h stable/8/contrib/bind9/lib/dns/include/dns/secalg.h stable/8/contrib/bind9/lib/dns/include/dns/secproto.h stable/8/contrib/bind9/lib/dns/include/dns/soa.h stable/8/contrib/bind9/lib/dns/include/dns/ssu.h stable/8/contrib/bind9/lib/dns/include/dns/stats.h stable/8/contrib/bind9/lib/dns/include/dns/tcpmsg.h stable/8/contrib/bind9/lib/dns/include/dns/time.h stable/8/contrib/bind9/lib/dns/include/dns/timer.h stable/8/contrib/bind9/lib/dns/include/dns/tkey.h stable/8/contrib/bind9/lib/dns/include/dns/ttl.h stable/8/contrib/bind9/lib/dns/include/dns/version.h stable/8/contrib/bind9/lib/dns/include/dns/xfrin.h stable/8/contrib/bind9/lib/dns/include/dns/zonekey.h stable/8/contrib/bind9/lib/dns/include/dns/zt.h stable/8/contrib/bind9/lib/dns/include/dst/Makefile.in stable/8/contrib/bind9/lib/dns/include/dst/gssapi.h stable/8/contrib/bind9/lib/dns/include/dst/lib.h stable/8/contrib/bind9/lib/dns/include/dst/result.h stable/8/contrib/bind9/lib/dns/iptable.c stable/8/contrib/bind9/lib/dns/key.c stable/8/contrib/bind9/lib/dns/keytable.c stable/8/contrib/bind9/lib/dns/lib.c stable/8/contrib/bind9/lib/dns/log.c stable/8/contrib/bind9/lib/dns/lookup.c stable/8/contrib/bind9/lib/dns/master.c stable/8/contrib/bind9/lib/dns/masterdump.c stable/8/contrib/bind9/lib/dns/ncache.c stable/8/contrib/bind9/lib/dns/nsec.c stable/8/contrib/bind9/lib/dns/nsec3.c stable/8/contrib/bind9/lib/dns/openssldh_link.c stable/8/contrib/bind9/lib/dns/openssldsa_link.c stable/8/contrib/bind9/lib/dns/opensslrsa_link.c stable/8/contrib/bind9/lib/dns/order.c stable/8/contrib/bind9/lib/dns/peer.c stable/8/contrib/bind9/lib/dns/portlist.c stable/8/contrib/bind9/lib/dns/rbt.c stable/8/contrib/bind9/lib/dns/rbtdb.h stable/8/contrib/bind9/lib/dns/rbtdb64.c stable/8/contrib/bind9/lib/dns/rbtdb64.h stable/8/contrib/bind9/lib/dns/rcode.c stable/8/contrib/bind9/lib/dns/rdata/any_255/tsig_250.c stable/8/contrib/bind9/lib/dns/rdata/any_255/tsig_250.h stable/8/contrib/bind9/lib/dns/rdata/ch_3/a_1.c stable/8/contrib/bind9/lib/dns/rdata/ch_3/a_1.h stable/8/contrib/bind9/lib/dns/rdata/generic/afsdb_18.c stable/8/contrib/bind9/lib/dns/rdata/generic/afsdb_18.h stable/8/contrib/bind9/lib/dns/rdata/generic/cert_37.c stable/8/contrib/bind9/lib/dns/rdata/generic/cert_37.h stable/8/contrib/bind9/lib/dns/rdata/generic/cname_5.c stable/8/contrib/bind9/lib/dns/rdata/generic/cname_5.h stable/8/contrib/bind9/lib/dns/rdata/generic/dlv_32769.c stable/8/contrib/bind9/lib/dns/rdata/generic/dlv_32769.h stable/8/contrib/bind9/lib/dns/rdata/generic/dname_39.c stable/8/contrib/bind9/lib/dns/rdata/generic/dname_39.h stable/8/contrib/bind9/lib/dns/rdata/generic/dnskey_48.c stable/8/contrib/bind9/lib/dns/rdata/generic/dnskey_48.h stable/8/contrib/bind9/lib/dns/rdata/generic/ds_43.c stable/8/contrib/bind9/lib/dns/rdata/generic/ds_43.h stable/8/contrib/bind9/lib/dns/rdata/generic/gpos_27.c stable/8/contrib/bind9/lib/dns/rdata/generic/gpos_27.h stable/8/contrib/bind9/lib/dns/rdata/generic/hinfo_13.c stable/8/contrib/bind9/lib/dns/rdata/generic/hinfo_13.h stable/8/contrib/bind9/lib/dns/rdata/generic/ipseckey_45.h stable/8/contrib/bind9/lib/dns/rdata/generic/isdn_20.c stable/8/contrib/bind9/lib/dns/rdata/generic/isdn_20.h stable/8/contrib/bind9/lib/dns/rdata/generic/key_25.c stable/8/contrib/bind9/lib/dns/rdata/generic/key_25.h stable/8/contrib/bind9/lib/dns/rdata/generic/loc_29.c stable/8/contrib/bind9/lib/dns/rdata/generic/loc_29.h stable/8/contrib/bind9/lib/dns/rdata/generic/mb_7.c stable/8/contrib/bind9/lib/dns/rdata/generic/mb_7.h stable/8/contrib/bind9/lib/dns/rdata/generic/md_3.c stable/8/contrib/bind9/lib/dns/rdata/generic/md_3.h stable/8/contrib/bind9/lib/dns/rdata/generic/mf_4.c stable/8/contrib/bind9/lib/dns/rdata/generic/mf_4.h stable/8/contrib/bind9/lib/dns/rdata/generic/mg_8.c stable/8/contrib/bind9/lib/dns/rdata/generic/mg_8.h stable/8/contrib/bind9/lib/dns/rdata/generic/minfo_14.c stable/8/contrib/bind9/lib/dns/rdata/generic/minfo_14.h stable/8/contrib/bind9/lib/dns/rdata/generic/mr_9.c stable/8/contrib/bind9/lib/dns/rdata/generic/mr_9.h stable/8/contrib/bind9/lib/dns/rdata/generic/mx_15.c stable/8/contrib/bind9/lib/dns/rdata/generic/mx_15.h stable/8/contrib/bind9/lib/dns/rdata/generic/ns_2.c stable/8/contrib/bind9/lib/dns/rdata/generic/ns_2.h stable/8/contrib/bind9/lib/dns/rdata/generic/nsec3_50.c stable/8/contrib/bind9/lib/dns/rdata/generic/nsec3_50.h stable/8/contrib/bind9/lib/dns/rdata/generic/nsec3param_51.c stable/8/contrib/bind9/lib/dns/rdata/generic/nsec3param_51.h stable/8/contrib/bind9/lib/dns/rdata/generic/nsec_47.h stable/8/contrib/bind9/lib/dns/rdata/generic/null_10.c stable/8/contrib/bind9/lib/dns/rdata/generic/null_10.h stable/8/contrib/bind9/lib/dns/rdata/generic/nxt_30.c stable/8/contrib/bind9/lib/dns/rdata/generic/nxt_30.h stable/8/contrib/bind9/lib/dns/rdata/generic/opt_41.c stable/8/contrib/bind9/lib/dns/rdata/generic/opt_41.h stable/8/contrib/bind9/lib/dns/rdata/generic/proforma.c stable/8/contrib/bind9/lib/dns/rdata/generic/proforma.h stable/8/contrib/bind9/lib/dns/rdata/generic/ptr_12.c stable/8/contrib/bind9/lib/dns/rdata/generic/ptr_12.h stable/8/contrib/bind9/lib/dns/rdata/generic/rp_17.c stable/8/contrib/bind9/lib/dns/rdata/generic/rp_17.h stable/8/contrib/bind9/lib/dns/rdata/generic/rrsig_46.h stable/8/contrib/bind9/lib/dns/rdata/generic/rt_21.c stable/8/contrib/bind9/lib/dns/rdata/generic/rt_21.h stable/8/contrib/bind9/lib/dns/rdata/generic/sig_24.c stable/8/contrib/bind9/lib/dns/rdata/generic/sig_24.h stable/8/contrib/bind9/lib/dns/rdata/generic/soa_6.c stable/8/contrib/bind9/lib/dns/rdata/generic/soa_6.h stable/8/contrib/bind9/lib/dns/rdata/generic/spf_99.c stable/8/contrib/bind9/lib/dns/rdata/generic/spf_99.h stable/8/contrib/bind9/lib/dns/rdata/generic/sshfp_44.c stable/8/contrib/bind9/lib/dns/rdata/generic/sshfp_44.h stable/8/contrib/bind9/lib/dns/rdata/generic/tkey_249.c stable/8/contrib/bind9/lib/dns/rdata/generic/tkey_249.h stable/8/contrib/bind9/lib/dns/rdata/generic/txt_16.c stable/8/contrib/bind9/lib/dns/rdata/generic/txt_16.h stable/8/contrib/bind9/lib/dns/rdata/generic/unspec_103.c stable/8/contrib/bind9/lib/dns/rdata/generic/unspec_103.h stable/8/contrib/bind9/lib/dns/rdata/generic/x25_19.c stable/8/contrib/bind9/lib/dns/rdata/generic/x25_19.h stable/8/contrib/bind9/lib/dns/rdata/hs_4/a_1.c stable/8/contrib/bind9/lib/dns/rdata/hs_4/a_1.h stable/8/contrib/bind9/lib/dns/rdata/in_1/a6_38.c stable/8/contrib/bind9/lib/dns/rdata/in_1/a6_38.h stable/8/contrib/bind9/lib/dns/rdata/in_1/a_1.c stable/8/contrib/bind9/lib/dns/rdata/in_1/a_1.h stable/8/contrib/bind9/lib/dns/rdata/in_1/aaaa_28.c stable/8/contrib/bind9/lib/dns/rdata/in_1/aaaa_28.h stable/8/contrib/bind9/lib/dns/rdata/in_1/apl_42.c stable/8/contrib/bind9/lib/dns/rdata/in_1/apl_42.h stable/8/contrib/bind9/lib/dns/rdata/in_1/dhcid_49.c stable/8/contrib/bind9/lib/dns/rdata/in_1/dhcid_49.h stable/8/contrib/bind9/lib/dns/rdata/in_1/kx_36.c stable/8/contrib/bind9/lib/dns/rdata/in_1/kx_36.h stable/8/contrib/bind9/lib/dns/rdata/in_1/naptr_35.c stable/8/contrib/bind9/lib/dns/rdata/in_1/naptr_35.h stable/8/contrib/bind9/lib/dns/rdata/in_1/nsap-ptr_23.c stable/8/contrib/bind9/lib/dns/rdata/in_1/nsap-ptr_23.h stable/8/contrib/bind9/lib/dns/rdata/in_1/nsap_22.c stable/8/contrib/bind9/lib/dns/rdata/in_1/nsap_22.h stable/8/contrib/bind9/lib/dns/rdata/in_1/px_26.c stable/8/contrib/bind9/lib/dns/rdata/in_1/px_26.h stable/8/contrib/bind9/lib/dns/rdata/in_1/srv_33.c stable/8/contrib/bind9/lib/dns/rdata/in_1/srv_33.h stable/8/contrib/bind9/lib/dns/rdata/in_1/wks_11.c stable/8/contrib/bind9/lib/dns/rdata/in_1/wks_11.h stable/8/contrib/bind9/lib/dns/rdata/rdatastructpre.h stable/8/contrib/bind9/lib/dns/rdata/rdatastructsuf.h stable/8/contrib/bind9/lib/dns/rdatalist_p.h stable/8/contrib/bind9/lib/dns/rdataset.c stable/8/contrib/bind9/lib/dns/rdatasetiter.c stable/8/contrib/bind9/lib/dns/request.c stable/8/contrib/bind9/lib/dns/soa.c stable/8/contrib/bind9/lib/dns/spnego.asn1 stable/8/contrib/bind9/lib/dns/spnego.c stable/8/contrib/bind9/lib/dns/spnego.h stable/8/contrib/bind9/lib/dns/spnego_asn1.c stable/8/contrib/bind9/lib/dns/spnego_asn1.pl stable/8/contrib/bind9/lib/dns/ssu.c stable/8/contrib/bind9/lib/dns/stats.c stable/8/contrib/bind9/lib/dns/tcpmsg.c stable/8/contrib/bind9/lib/dns/timer.c stable/8/contrib/bind9/lib/dns/ttl.c stable/8/contrib/bind9/lib/dns/validator.c stable/8/contrib/bind9/lib/dns/version.c stable/8/contrib/bind9/lib/dns/xfrin.c stable/8/contrib/bind9/lib/dns/zonekey.c stable/8/contrib/bind9/lib/dns/zt.c stable/8/contrib/bind9/lib/isc/alpha/Makefile.in stable/8/contrib/bind9/lib/isc/alpha/include/Makefile.in stable/8/contrib/bind9/lib/isc/alpha/include/isc/Makefile.in stable/8/contrib/bind9/lib/isc/alpha/include/isc/atomic.h stable/8/contrib/bind9/lib/isc/assertions.c stable/8/contrib/bind9/lib/isc/base32.c stable/8/contrib/bind9/lib/isc/base64.c stable/8/contrib/bind9/lib/isc/bitstring.c stable/8/contrib/bind9/lib/isc/buffer.c stable/8/contrib/bind9/lib/isc/bufferlist.c stable/8/contrib/bind9/lib/isc/commandline.c stable/8/contrib/bind9/lib/isc/error.c stable/8/contrib/bind9/lib/isc/event.c stable/8/contrib/bind9/lib/isc/fsaccess.c stable/8/contrib/bind9/lib/isc/hash.c stable/8/contrib/bind9/lib/isc/heap.c stable/8/contrib/bind9/lib/isc/hex.c stable/8/contrib/bind9/lib/isc/hmacmd5.c stable/8/contrib/bind9/lib/isc/hmacsha.c stable/8/contrib/bind9/lib/isc/httpd.c stable/8/contrib/bind9/lib/isc/ia64/Makefile.in stable/8/contrib/bind9/lib/isc/ia64/include/Makefile.in stable/8/contrib/bind9/lib/isc/ia64/include/isc/Makefile.in stable/8/contrib/bind9/lib/isc/ia64/include/isc/atomic.h stable/8/contrib/bind9/lib/isc/include/Makefile.in stable/8/contrib/bind9/lib/isc/include/isc/Makefile.in stable/8/contrib/bind9/lib/isc/include/isc/app.h stable/8/contrib/bind9/lib/isc/include/isc/assertions.h stable/8/contrib/bind9/lib/isc/include/isc/base32.h stable/8/contrib/bind9/lib/isc/include/isc/base64.h stable/8/contrib/bind9/lib/isc/include/isc/bitstring.h stable/8/contrib/bind9/lib/isc/include/isc/boolean.h stable/8/contrib/bind9/lib/isc/include/isc/buffer.h stable/8/contrib/bind9/lib/isc/include/isc/bufferlist.h stable/8/contrib/bind9/lib/isc/include/isc/commandline.h stable/8/contrib/bind9/lib/isc/include/isc/entropy.h stable/8/contrib/bind9/lib/isc/include/isc/error.h stable/8/contrib/bind9/lib/isc/include/isc/event.h stable/8/contrib/bind9/lib/isc/include/isc/eventclass.h stable/8/contrib/bind9/lib/isc/include/isc/file.h stable/8/contrib/bind9/lib/isc/include/isc/formatcheck.h stable/8/contrib/bind9/lib/isc/include/isc/fsaccess.h stable/8/contrib/bind9/lib/isc/include/isc/hash.h stable/8/contrib/bind9/lib/isc/include/isc/heap.h stable/8/contrib/bind9/lib/isc/include/isc/hex.h stable/8/contrib/bind9/lib/isc/include/isc/hmacmd5.h stable/8/contrib/bind9/lib/isc/include/isc/hmacsha.h stable/8/contrib/bind9/lib/isc/include/isc/httpd.h stable/8/contrib/bind9/lib/isc/include/isc/interfaceiter.h stable/8/contrib/bind9/lib/isc/include/isc/ipv6.h stable/8/contrib/bind9/lib/isc/include/isc/iterated_hash.h stable/8/contrib/bind9/lib/isc/include/isc/lang.h stable/8/contrib/bind9/lib/isc/include/isc/lex.h stable/8/contrib/bind9/lib/isc/include/isc/lfsr.h stable/8/contrib/bind9/lib/isc/include/isc/lib.h stable/8/contrib/bind9/lib/isc/include/isc/list.h stable/8/contrib/bind9/lib/isc/include/isc/log.h stable/8/contrib/bind9/lib/isc/include/isc/magic.h stable/8/contrib/bind9/lib/isc/include/isc/md5.h stable/8/contrib/bind9/lib/isc/include/isc/msgcat.h stable/8/contrib/bind9/lib/isc/include/isc/msgs.h stable/8/contrib/bind9/lib/isc/include/isc/mutexblock.h stable/8/contrib/bind9/lib/isc/include/isc/netaddr.h stable/8/contrib/bind9/lib/isc/include/isc/netscope.h stable/8/contrib/bind9/lib/isc/include/isc/ondestroy.h stable/8/contrib/bind9/lib/isc/include/isc/os.h stable/8/contrib/bind9/lib/isc/include/isc/parseint.h stable/8/contrib/bind9/lib/isc/include/isc/portset.h stable/8/contrib/bind9/lib/isc/include/isc/print.h stable/8/contrib/bind9/lib/isc/include/isc/quota.h stable/8/contrib/bind9/lib/isc/include/isc/radix.h stable/8/contrib/bind9/lib/isc/include/isc/random.h stable/8/contrib/bind9/lib/isc/include/isc/ratelimiter.h stable/8/contrib/bind9/lib/isc/include/isc/refcount.h stable/8/contrib/bind9/lib/isc/include/isc/region.h stable/8/contrib/bind9/lib/isc/include/isc/resource.h stable/8/contrib/bind9/lib/isc/include/isc/result.h stable/8/contrib/bind9/lib/isc/include/isc/resultclass.h stable/8/contrib/bind9/lib/isc/include/isc/rwlock.h stable/8/contrib/bind9/lib/isc/include/isc/serial.h stable/8/contrib/bind9/lib/isc/include/isc/sha1.h stable/8/contrib/bind9/lib/isc/include/isc/sha2.h stable/8/contrib/bind9/lib/isc/include/isc/sockaddr.h stable/8/contrib/bind9/lib/isc/include/isc/socket.h stable/8/contrib/bind9/lib/isc/include/isc/stats.h stable/8/contrib/bind9/lib/isc/include/isc/stdio.h stable/8/contrib/bind9/lib/isc/include/isc/stdlib.h stable/8/contrib/bind9/lib/isc/include/isc/string.h stable/8/contrib/bind9/lib/isc/include/isc/symtab.h stable/8/contrib/bind9/lib/isc/include/isc/taskpool.h stable/8/contrib/bind9/lib/isc/include/isc/timer.h stable/8/contrib/bind9/lib/isc/include/isc/types.h stable/8/contrib/bind9/lib/isc/include/isc/util.h stable/8/contrib/bind9/lib/isc/include/isc/version.h stable/8/contrib/bind9/lib/isc/include/isc/xml.h stable/8/contrib/bind9/lib/isc/inet_aton.c stable/8/contrib/bind9/lib/isc/inet_ntop.c stable/8/contrib/bind9/lib/isc/inet_pton.c stable/8/contrib/bind9/lib/isc/iterated_hash.c stable/8/contrib/bind9/lib/isc/lex.c stable/8/contrib/bind9/lib/isc/lfsr.c stable/8/contrib/bind9/lib/isc/lib.c stable/8/contrib/bind9/lib/isc/log.c stable/8/contrib/bind9/lib/isc/md5.c stable/8/contrib/bind9/lib/isc/mips/Makefile.in stable/8/contrib/bind9/lib/isc/mips/include/Makefile.in stable/8/contrib/bind9/lib/isc/mips/include/isc/Makefile.in stable/8/contrib/bind9/lib/isc/mips/include/isc/atomic.h stable/8/contrib/bind9/lib/isc/mutexblock.c stable/8/contrib/bind9/lib/isc/netaddr.c stable/8/contrib/bind9/lib/isc/netscope.c stable/8/contrib/bind9/lib/isc/nls/Makefile.in stable/8/contrib/bind9/lib/isc/nls/msgcat.c stable/8/contrib/bind9/lib/isc/noatomic/Makefile.in stable/8/contrib/bind9/lib/isc/noatomic/include/Makefile.in stable/8/contrib/bind9/lib/isc/noatomic/include/isc/Makefile.in stable/8/contrib/bind9/lib/isc/noatomic/include/isc/atomic.h stable/8/contrib/bind9/lib/isc/nothreads/condition.c stable/8/contrib/bind9/lib/isc/nothreads/include/Makefile.in stable/8/contrib/bind9/lib/isc/nothreads/include/isc/Makefile.in stable/8/contrib/bind9/lib/isc/nothreads/include/isc/condition.h stable/8/contrib/bind9/lib/isc/nothreads/include/isc/mutex.h stable/8/contrib/bind9/lib/isc/nothreads/include/isc/once.h stable/8/contrib/bind9/lib/isc/nothreads/include/isc/thread.h stable/8/contrib/bind9/lib/isc/nothreads/mutex.c stable/8/contrib/bind9/lib/isc/nothreads/thread.c stable/8/contrib/bind9/lib/isc/ondestroy.c stable/8/contrib/bind9/lib/isc/parseint.c stable/8/contrib/bind9/lib/isc/portset.c stable/8/contrib/bind9/lib/isc/powerpc/Makefile.in stable/8/contrib/bind9/lib/isc/powerpc/include/Makefile.in stable/8/contrib/bind9/lib/isc/powerpc/include/isc/Makefile.in stable/8/contrib/bind9/lib/isc/powerpc/include/isc/atomic.h stable/8/contrib/bind9/lib/isc/pthreads/Makefile.in stable/8/contrib/bind9/lib/isc/pthreads/condition.c stable/8/contrib/bind9/lib/isc/pthreads/include/Makefile.in stable/8/contrib/bind9/lib/isc/pthreads/include/isc/Makefile.in stable/8/contrib/bind9/lib/isc/pthreads/include/isc/condition.h stable/8/contrib/bind9/lib/isc/pthreads/include/isc/mutex.h stable/8/contrib/bind9/lib/isc/pthreads/include/isc/once.h stable/8/contrib/bind9/lib/isc/pthreads/include/isc/thread.h stable/8/contrib/bind9/lib/isc/pthreads/thread.c stable/8/contrib/bind9/lib/isc/quota.c stable/8/contrib/bind9/lib/isc/radix.c stable/8/contrib/bind9/lib/isc/random.c stable/8/contrib/bind9/lib/isc/ratelimiter.c stable/8/contrib/bind9/lib/isc/refcount.c stable/8/contrib/bind9/lib/isc/region.c stable/8/contrib/bind9/lib/isc/result.c stable/8/contrib/bind9/lib/isc/rwlock.c stable/8/contrib/bind9/lib/isc/serial.c stable/8/contrib/bind9/lib/isc/sha1.c stable/8/contrib/bind9/lib/isc/sha2.c stable/8/contrib/bind9/lib/isc/sockaddr.c stable/8/contrib/bind9/lib/isc/sparc64/Makefile.in stable/8/contrib/bind9/lib/isc/sparc64/include/Makefile.in stable/8/contrib/bind9/lib/isc/sparc64/include/isc/Makefile.in stable/8/contrib/bind9/lib/isc/sparc64/include/isc/atomic.h stable/8/contrib/bind9/lib/isc/stats.c stable/8/contrib/bind9/lib/isc/string.c stable/8/contrib/bind9/lib/isc/strtoul.c stable/8/contrib/bind9/lib/isc/symtab.c stable/8/contrib/bind9/lib/isc/task_p.h stable/8/contrib/bind9/lib/isc/taskpool.c stable/8/contrib/bind9/lib/isc/timer.c stable/8/contrib/bind9/lib/isc/timer_p.h stable/8/contrib/bind9/lib/isc/unix/Makefile.in stable/8/contrib/bind9/lib/isc/unix/app.c stable/8/contrib/bind9/lib/isc/unix/dir.c stable/8/contrib/bind9/lib/isc/unix/entropy.c stable/8/contrib/bind9/lib/isc/unix/errno2result.c stable/8/contrib/bind9/lib/isc/unix/errno2result.h stable/8/contrib/bind9/lib/isc/unix/file.c stable/8/contrib/bind9/lib/isc/unix/fsaccess.c stable/8/contrib/bind9/lib/isc/unix/ifiter_getifaddrs.c stable/8/contrib/bind9/lib/isc/unix/ifiter_ioctl.c stable/8/contrib/bind9/lib/isc/unix/ifiter_sysctl.c stable/8/contrib/bind9/lib/isc/unix/include/Makefile.in stable/8/contrib/bind9/lib/isc/unix/include/isc/Makefile.in stable/8/contrib/bind9/lib/isc/unix/include/isc/dir.h stable/8/contrib/bind9/lib/isc/unix/include/isc/int.h stable/8/contrib/bind9/lib/isc/unix/include/isc/keyboard.h stable/8/contrib/bind9/lib/isc/unix/include/isc/net.h stable/8/contrib/bind9/lib/isc/unix/include/isc/netdb.h stable/8/contrib/bind9/lib/isc/unix/include/isc/offset.h stable/8/contrib/bind9/lib/isc/unix/include/isc/stat.h stable/8/contrib/bind9/lib/isc/unix/include/isc/stdtime.h stable/8/contrib/bind9/lib/isc/unix/include/isc/strerror.h stable/8/contrib/bind9/lib/isc/unix/include/isc/syslog.h stable/8/contrib/bind9/lib/isc/unix/include/isc/time.h stable/8/contrib/bind9/lib/isc/unix/interfaceiter.c stable/8/contrib/bind9/lib/isc/unix/ipv6.c stable/8/contrib/bind9/lib/isc/unix/keyboard.c stable/8/contrib/bind9/lib/isc/unix/net.c stable/8/contrib/bind9/lib/isc/unix/os.c stable/8/contrib/bind9/lib/isc/unix/resource.c stable/8/contrib/bind9/lib/isc/unix/socket_p.h stable/8/contrib/bind9/lib/isc/unix/stdio.c stable/8/contrib/bind9/lib/isc/unix/stdtime.c stable/8/contrib/bind9/lib/isc/unix/strerror.c stable/8/contrib/bind9/lib/isc/unix/syslog.c stable/8/contrib/bind9/lib/isc/unix/time.c stable/8/contrib/bind9/lib/isc/version.c stable/8/contrib/bind9/lib/isc/x86_32/Makefile.in stable/8/contrib/bind9/lib/isc/x86_32/include/Makefile.in stable/8/contrib/bind9/lib/isc/x86_32/include/isc/Makefile.in stable/8/contrib/bind9/lib/isc/x86_32/include/isc/atomic.h stable/8/contrib/bind9/lib/isc/x86_64/Makefile.in stable/8/contrib/bind9/lib/isc/x86_64/include/Makefile.in stable/8/contrib/bind9/lib/isc/x86_64/include/isc/Makefile.in stable/8/contrib/bind9/lib/isc/x86_64/include/isc/atomic.h stable/8/contrib/bind9/lib/isccc/Makefile.in stable/8/contrib/bind9/lib/isccc/alist.c stable/8/contrib/bind9/lib/isccc/base64.c stable/8/contrib/bind9/lib/isccc/cc.c stable/8/contrib/bind9/lib/isccc/ccmsg.c stable/8/contrib/bind9/lib/isccc/include/Makefile.in stable/8/contrib/bind9/lib/isccc/include/isccc/Makefile.in stable/8/contrib/bind9/lib/isccc/include/isccc/alist.h stable/8/contrib/bind9/lib/isccc/include/isccc/base64.h stable/8/contrib/bind9/lib/isccc/include/isccc/cc.h stable/8/contrib/bind9/lib/isccc/include/isccc/ccmsg.h stable/8/contrib/bind9/lib/isccc/include/isccc/events.h stable/8/contrib/bind9/lib/isccc/include/isccc/lib.h stable/8/contrib/bind9/lib/isccc/include/isccc/result.h stable/8/contrib/bind9/lib/isccc/include/isccc/sexpr.h stable/8/contrib/bind9/lib/isccc/include/isccc/symtab.h stable/8/contrib/bind9/lib/isccc/include/isccc/symtype.h stable/8/contrib/bind9/lib/isccc/include/isccc/types.h stable/8/contrib/bind9/lib/isccc/include/isccc/util.h stable/8/contrib/bind9/lib/isccc/include/isccc/version.h stable/8/contrib/bind9/lib/isccc/lib.c stable/8/contrib/bind9/lib/isccc/result.c stable/8/contrib/bind9/lib/isccc/sexpr.c stable/8/contrib/bind9/lib/isccc/symtab.c stable/8/contrib/bind9/lib/isccc/version.c stable/8/contrib/bind9/lib/isccfg/Makefile.in stable/8/contrib/bind9/lib/isccfg/aclconf.c stable/8/contrib/bind9/lib/isccfg/include/Makefile.in stable/8/contrib/bind9/lib/isccfg/include/isccfg/Makefile.in stable/8/contrib/bind9/lib/isccfg/include/isccfg/aclconf.h stable/8/contrib/bind9/lib/isccfg/include/isccfg/cfg.h stable/8/contrib/bind9/lib/isccfg/include/isccfg/grammar.h stable/8/contrib/bind9/lib/isccfg/include/isccfg/log.h stable/8/contrib/bind9/lib/isccfg/include/isccfg/namedconf.h stable/8/contrib/bind9/lib/isccfg/include/isccfg/version.h stable/8/contrib/bind9/lib/isccfg/log.c stable/8/contrib/bind9/lib/isccfg/parser.c stable/8/contrib/bind9/lib/isccfg/version.c stable/8/contrib/bind9/lib/lwres/Makefile.in stable/8/contrib/bind9/lib/lwres/assert_p.h stable/8/contrib/bind9/lib/lwres/context.c stable/8/contrib/bind9/lib/lwres/context_p.h stable/8/contrib/bind9/lib/lwres/gai_strerror.c stable/8/contrib/bind9/lib/lwres/getaddrinfo.c stable/8/contrib/bind9/lib/lwres/gethost.c stable/8/contrib/bind9/lib/lwres/getipnode.c stable/8/contrib/bind9/lib/lwres/getnameinfo.c stable/8/contrib/bind9/lib/lwres/getrrset.c stable/8/contrib/bind9/lib/lwres/herror.c stable/8/contrib/bind9/lib/lwres/include/Makefile.in stable/8/contrib/bind9/lib/lwres/include/lwres/Makefile.in stable/8/contrib/bind9/lib/lwres/include/lwres/context.h stable/8/contrib/bind9/lib/lwres/include/lwres/int.h stable/8/contrib/bind9/lib/lwres/include/lwres/ipv6.h stable/8/contrib/bind9/lib/lwres/include/lwres/lang.h stable/8/contrib/bind9/lib/lwres/include/lwres/list.h stable/8/contrib/bind9/lib/lwres/include/lwres/lwbuffer.h stable/8/contrib/bind9/lib/lwres/include/lwres/lwpacket.h stable/8/contrib/bind9/lib/lwres/include/lwres/lwres.h stable/8/contrib/bind9/lib/lwres/include/lwres/netdb.h.in stable/8/contrib/bind9/lib/lwres/include/lwres/platform.h.in stable/8/contrib/bind9/lib/lwres/include/lwres/result.h stable/8/contrib/bind9/lib/lwres/include/lwres/stdlib.h stable/8/contrib/bind9/lib/lwres/include/lwres/version.h stable/8/contrib/bind9/lib/lwres/lwbuffer.c stable/8/contrib/bind9/lib/lwres/lwconfig.c stable/8/contrib/bind9/lib/lwres/lwinetaton.c stable/8/contrib/bind9/lib/lwres/lwinetntop.c stable/8/contrib/bind9/lib/lwres/lwinetpton.c stable/8/contrib/bind9/lib/lwres/lwpacket.c stable/8/contrib/bind9/lib/lwres/lwres_gabn.c stable/8/contrib/bind9/lib/lwres/lwres_gnba.c stable/8/contrib/bind9/lib/lwres/lwres_grbn.c stable/8/contrib/bind9/lib/lwres/lwres_noop.c stable/8/contrib/bind9/lib/lwres/lwresutil.c stable/8/contrib/bind9/lib/lwres/man/Makefile.in stable/8/contrib/bind9/lib/lwres/man/lwres.3 stable/8/contrib/bind9/lib/lwres/man/lwres.docbook stable/8/contrib/bind9/lib/lwres/man/lwres_buffer.3 stable/8/contrib/bind9/lib/lwres/man/lwres_buffer.docbook stable/8/contrib/bind9/lib/lwres/man/lwres_config.3 stable/8/contrib/bind9/lib/lwres/man/lwres_config.docbook stable/8/contrib/bind9/lib/lwres/man/lwres_context.3 stable/8/contrib/bind9/lib/lwres/man/lwres_context.docbook stable/8/contrib/bind9/lib/lwres/man/lwres_gabn.3 stable/8/contrib/bind9/lib/lwres/man/lwres_gabn.docbook stable/8/contrib/bind9/lib/lwres/man/lwres_gai_strerror.3 stable/8/contrib/bind9/lib/lwres/man/lwres_gai_strerror.docbook stable/8/contrib/bind9/lib/lwres/man/lwres_getaddrinfo.3 stable/8/contrib/bind9/lib/lwres/man/lwres_getaddrinfo.docbook stable/8/contrib/bind9/lib/lwres/man/lwres_gethostent.3 stable/8/contrib/bind9/lib/lwres/man/lwres_gethostent.docbook stable/8/contrib/bind9/lib/lwres/man/lwres_getipnode.3 stable/8/contrib/bind9/lib/lwres/man/lwres_getipnode.docbook stable/8/contrib/bind9/lib/lwres/man/lwres_getnameinfo.3 stable/8/contrib/bind9/lib/lwres/man/lwres_getnameinfo.docbook stable/8/contrib/bind9/lib/lwres/man/lwres_getrrsetbyname.3 stable/8/contrib/bind9/lib/lwres/man/lwres_getrrsetbyname.docbook stable/8/contrib/bind9/lib/lwres/man/lwres_gnba.3 stable/8/contrib/bind9/lib/lwres/man/lwres_gnba.docbook stable/8/contrib/bind9/lib/lwres/man/lwres_hstrerror.3 stable/8/contrib/bind9/lib/lwres/man/lwres_hstrerror.docbook stable/8/contrib/bind9/lib/lwres/man/lwres_inetntop.3 stable/8/contrib/bind9/lib/lwres/man/lwres_inetntop.docbook stable/8/contrib/bind9/lib/lwres/man/lwres_noop.3 stable/8/contrib/bind9/lib/lwres/man/lwres_noop.docbook stable/8/contrib/bind9/lib/lwres/man/lwres_packet.3 stable/8/contrib/bind9/lib/lwres/man/lwres_packet.docbook stable/8/contrib/bind9/lib/lwres/man/lwres_resutil.3 stable/8/contrib/bind9/lib/lwres/man/lwres_resutil.docbook stable/8/contrib/bind9/lib/lwres/print.c stable/8/contrib/bind9/lib/lwres/strtoul.c stable/8/contrib/bind9/lib/lwres/unix/Makefile.in stable/8/contrib/bind9/lib/lwres/unix/include/Makefile.in stable/8/contrib/bind9/lib/lwres/unix/include/lwres/Makefile.in stable/8/contrib/bind9/lib/lwres/unix/include/lwres/net.h stable/8/contrib/bind9/lib/lwres/version.c stable/8/contrib/bind9/make/Makefile.in stable/8/contrib/bind9/make/includes.in stable/8/contrib/bind9/make/rules.in stable/8/contrib/bind9/mkinstalldirs stable/8/contrib/bind9/version Directory Properties: stable/8/contrib/bind9/ (props changed) Modified: stable/8/contrib/bind9/CHANGES ============================================================================== --- stable/8/contrib/bind9/CHANGES Sat May 28 00:21:28 2011 (r222395) +++ stable/8/contrib/bind9/CHANGES Sat May 28 00:33:06 2011 (r222396) @@ -1,3 +1,16 @@ + --- 9.6-ESV-R4-P1 released --- + +3121. [security] An authoritative name server sending a negative + response containing a very large RRset could + trigger an off-by-one error in the ncache code + and crash named. [RT #24650] + +3120. [bug] Named could fail to validate zones listed in a DLV + that validated insecure without using DLV and had + DS records in the parent zone. [RT #24631] + + --- 9.6-ESV-R4 released --- + --- 9.6.3 released --- 3009. [bug] clients-per-query code didn't work as expected with @@ -50,51 +63,9 @@ wrong lock which could lead to server deadlock. [RT #22614] -2972. [bug] win32: address windows socket errors. [RT #21906] - -2971. [bug] Fixed a bug that caused journal files not to be - compacted on Windows systems as a result of - non-POSIX-compliant rename() semantics. [RT #22434] - -2970. [security] Adding a NO DATA negative cache entry failed to clear - any matching RRSIG records. A subsequent lookup of - of NO DATA cache entry could trigger a INSIST when the - unexpected RRSIG was also returned with the NO DATA - cache entry. - - CVE-2010-3613, VU#706148. [RT #22288] - -2969. [security] Fix acl type processing so that allow-query works - in options and view statements. Also add a new - set of tests to verify proper functioning. - - CVE-2010-3615, VU#510208. [RT #22418] - -2968. [security] Named could fail to prove a data set was insecure - before marking it as insecure. One set of conditions - that can trigger this occurs naturally when rolling - DNSKEY algorithms. - - CVE-2010-3614, VU#837744. [RT #22309] - -2967. [bug] 'host -D' now turns on debugging messages earlier. - [RT #22361] - -2966. [bug] isc_print_vsnprintf() failed to check if there was - space available in the buffer when adding a left - justified character with a non zero width, - (e.g. "%-1c"). [RT #22270] - 2965. [func] Test HMAC functions using test data from RFC 2104 and RFC 4634. [RT #21702] -2964. [bug] view->queryacl was being overloaded. Seperate the - usage into view->queryacl, view->cacheacl and - view->queryonacl. [RT #22114] - -2962. [port] win32: add more dependencies to BINDBuild.dsw. - [RT #22062] - 2960. [func] Check that named accepts non-authoritative answers. [RT #21594] @@ -114,13 +85,6 @@ exact match" message when returning a wildcard no data response. [RT #21744] -2952. [port] win32: named-checkzone and named-checkconf failed - to initialise winsock. [RT #21932] - -2951. [bug] named failed to generate a correct signed response - in a optout, delegation only zone with no secure - delegations. [RT #22007] - 2950. [bug] named failed to perform a SOA up to date check when falling back to TCP on UDP timeouts when ixfr-from-differences was set. [RT #21595] @@ -139,27 +103,6 @@ 2941. [bug] sdb and sdlz (dlz's zone database) failed to support DNAME at the zone apex. [RT #21610] -2939. [func] Check that named successfully skips NSEC3 records - that fail to match the NSEC3PARAM record currently - in use. [RT# 21868] - -2937. [bug] Worked around an apparent race condition in over - memory conditions. Without this fix a DNS cache DB or - ADB could incorrectly stay in an over memory state, - effectively refusing further caching, which - subsequently made a BIND 9 caching server unworkable. - This fix prevents this problem from happening by - polling the state of the memory context, rather than - making a copy of the state, which appeared to cause - a race. This is a "workaround" in that it doesn't - solve the possible race per se, but several experiments - proved this change solves the symptom. Also, the - polling overhead hasn't been reported to be an issue. - This bug should only affect a caching server that - specifies a finite max-cache-size. It's also quite - likely that the bug happens only when enabling threads, - but it's not confirmed yet. [RT #21818] - 2935. [bug] nsupdate: improve 'file not found' error message. [RT #21871] @@ -189,17 +132,11 @@ smaller) [RT #19737] -2925. [bug] Named failed to accept uncachable negative responses - from insecure zones. [RT# 21555] - 2923. [bug] 'dig +trace' could drop core after "connection timeout". [RT #21514] 2922. [contrib] Update zkt to version 1.0. -2921. [bug] The resolver could attempt to destroy a fetch context - too soon. [RT #19878] - 2918. [maint] Add AAAA address for I.ROOT-SERVERS.NET. 2916. [func] Add framework to use IPv6 in tests. @@ -229,10 +166,6 @@ 2901. [port] Use AC_C_FLEXIBLE_ARRAY_MEMBER. [RT #21316] -2900. [bug] The placeholder negative caching element was not - properly constructed triggering a INSIST in - dns_ncache_towire(). [RT #21346] - 2899. [port] win32: Support linking against OpenSSL 1.0.0. 2898. [bug] nslookup leaked memory when -domain=value was @@ -243,9 +176,6 @@ 2891. [maint] Update empty-zones list to match draft-ietf-dnsop-default-local-zones-13. [RT# 21099] -2890. [bug] Handle the introduction of new trusted-keys and - DS, DLV RRsets better. [RT #21097] - 2889. [bug] Elements of the grammar where not properly reported. [RT #21046] @@ -272,9 +202,6 @@ 2877. [bug] The validator failed to skip obviously mismatching RRSIGs. [RT #21138] -2876. [bug] Named could return SERVFAIL for negative responses - from unsigned zones. [RT #21131] - 2875. [bug] dns_time64_fromtext() could accept non digits. [RT #21033] @@ -284,9 +211,6 @@ 2870. [maint] Add AAAA address for L.ROOT-SERVERS.NET. -2869. [bug] Fix arguments to dns_keytable_findnextkeynode() call. - [RT #20877] - 2868. [cleanup] Run "make clean" at the end of configure to ensure any changes made by configure are integrated. Use --with-make-clean=no to disable. [RT #20994] @@ -322,11 +246,108 @@ 2853. [bug] add_sigs() could run out of scratch space. [RT #21015] -2852. [bug] Handle broken DNSSEC trust chains better. [RT #15619] - 2851. [doc] nslookup.1, removed from the docbook source as it produced bad nroff. [RT #21007] + --- 9.6-ESV-R3 released --- + +2972. [bug] win32: address windows socket errors. [RT #21906] + +2971. [bug] Fixed a bug that caused journal files not to be + compacted on Windows systems as a result of + non-POSIX-compliant rename() semantics. [RT #22434] + +2970. [security] Adding a NO DATA negative cache entry failed to clear + any matching RRSIG records. A subsequent lookup of + of NO DATA cache entry could trigger a INSIST when the + unexpected RRSIG was also returned with the NO DATA + cache entry. + + CVE-2010-3613, VU#706148. [RT #22288] + +2969. [security] Fix acl type processing so that allow-query works + in options and view statements. Also add a new + set of tests to verify proper functioning. + + CVE-2010-3615, VU#510208. [RT #22418] + +2968. [security] Named could fail to prove a data set was insecure + before marking it as insecure. One set of conditions + that can trigger this occurs naturally when rolling + DNSKEY algorithms. + + CVE-2010-3614, VU#837744. [RT #22309] + +2967. [bug] 'host -D' now turns on debugging messages earlier. + [RT #22361] + +2966. [bug] isc_print_vsnprintf() failed to check if there was + space available in the buffer when adding a left + justified character with a non zero width, + (e.g. "%-1c"). [RT #22270] + +2964. [bug] view->queryacl was being overloaded. Seperate the + usage into view->queryacl, view->cacheacl and + view->queryonacl. [RT #22114] + +2962. [port] win32: add more dependencies to BINDBuild.dsw. + [RT #22062] + +2952. [port] win32: named-checkzone and named-checkconf failed + to initialise winsock. [RT #21932] + +2951. [bug] named failed to generate a correct signed response + in a optout, delegation only zone with no secure + delegations. [RT #22007] + + --- 9.6-ESV-R2 released --- + +2939. [func] Check that named successfully skips NSEC3 records + that fail to match the NSEC3PARAM record currently + in use. [RT# 21868] + +2937. [bug] Worked around an apparent race condition in over + memory conditions. Without this fix a DNS cache DB or + ADB could incorrectly stay in an over memory state, + effectively refusing further caching, which + subsequently made a BIND 9 caching server unworkable. + This fix prevents this problem from happening by + polling the state of the memory context, rather than + making a copy of the state, which appeared to cause + a race. This is a "workaround" in that it doesn't + solve the possible race per se, but several experiments + proved this change solves the symptom. Also, the + polling overhead hasn't been reported to be an issue. + This bug should only affect a caching server that + specifies a finite max-cache-size. It's also quite + likely that the bug happens only when enabling threads, + but it's not confirmed yet. [RT #21818] + +2925. [bug] Named failed to accept uncachable negative responses + from insecure zones. [RT# 21555] + +2921. [bug] The resolver could attempt to destroy a fetch context + too soon. [RT #19878] + +2900. [bug] The placeholder negative caching element was not + properly constructed triggering a INSIST in + dns_ncache_towire(). [RT #21346] + +2890. [bug] Handle the introduction of new trusted-keys and + DS, DLV RRsets better. [RT #21097] + +2869. [bug] Fix arguments to dns_keytable_findnextkeynode() call. + [RT #20877] + + --- 9.6-ESV-R1 released --- + +2876. [bug] Named could return SERVFAIL for negative responses + from unsigned zones. [RT #21131] + + --- 9.6-ESV released --- + +2852. [bug] Handle broken DNSSEC trust chains better. [RT #15619] + --- 9.6.2 released --- 2850. [bug] If isc_heap_insert() failed due to memory shortage Modified: stable/8/contrib/bind9/FAQ.xml ============================================================================== --- stable/8/contrib/bind9/FAQ.xml Sat May 28 00:21:28 2011 (r222395) +++ stable/8/contrib/bind9/FAQ.xml Sat May 28 00:33:06 2011 (r222396) @@ -17,7 +17,7 @@ - PERFORMANCE OF THIS SOFTWARE. --> - +
Frequently Asked Questions about BIND 9 Modified: stable/8/contrib/bind9/Makefile.in ============================================================================== --- stable/8/contrib/bind9/Makefile.in Sat May 28 00:21:28 2011 (r222395) +++ stable/8/contrib/bind9/Makefile.in Sat May 28 00:33:06 2011 (r222396) @@ -13,7 +13,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: Makefile.in,v 1.52.48.2 2009/02/20 23:47:23 tbox Exp $ +# $Id: Makefile.in,v 1.52.48.2 2009-02-20 23:47:23 tbox Exp $ srcdir = @srcdir@ VPATH = @srcdir@ Modified: stable/8/contrib/bind9/README.idnkit ============================================================================== --- stable/8/contrib/bind9/README.idnkit Sat May 28 00:21:28 2011 (r222395) +++ stable/8/contrib/bind9/README.idnkit Sat May 28 00:33:06 2011 (r222396) @@ -109,4 +109,4 @@ about idnkit and this patch. Bug reports and comments on this kit should be sent to mdnkit-bugs@nic.ad.jp and idn-cmt@nic.ad.jp, respectively. -; $Id: README.idnkit,v 1.2.762.1 2009/01/18 23:25:14 marka Exp $ +; $Id: README.idnkit,v 1.2.762.1 2009-01-18 23:25:14 marka Exp $ Modified: stable/8/contrib/bind9/acconfig.h ============================================================================== --- stable/8/contrib/bind9/acconfig.h Sat May 28 00:21:28 2011 (r222395) +++ stable/8/contrib/bind9/acconfig.h Sat May 28 00:33:06 2011 (r222396) @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: acconfig.h,v 1.51.334.2 2009/02/16 23:47:15 tbox Exp $ */ +/* $Id: acconfig.h,v 1.51.334.2 2009-02-16 23:47:15 tbox Exp $ */ /*! \file */ Modified: stable/8/contrib/bind9/bin/Makefile.in ============================================================================== --- stable/8/contrib/bind9/bin/Makefile.in Sat May 28 00:21:28 2011 (r222395) +++ stable/8/contrib/bind9/bin/Makefile.in Sat May 28 00:33:06 2011 (r222396) @@ -13,7 +13,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: Makefile.in,v 1.25 2007/06/19 23:46:59 tbox Exp $ +# $Id: Makefile.in,v 1.25 2007-06-19 23:46:59 tbox Exp $ srcdir = @srcdir@ VPATH = @srcdir@ Modified: stable/8/contrib/bind9/bin/check/Makefile.in ============================================================================== --- stable/8/contrib/bind9/bin/check/Makefile.in Sat May 28 00:21:28 2011 (r222395) +++ stable/8/contrib/bind9/bin/check/Makefile.in Sat May 28 00:33:06 2011 (r222396) @@ -13,7 +13,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: Makefile.in,v 1.32 2007/06/19 23:46:59 tbox Exp $ +# $Id: Makefile.in,v 1.32 2007-06-19 23:46:59 tbox Exp $ srcdir = @srcdir@ VPATH = @srcdir@ Modified: stable/8/contrib/bind9/bin/check/named-checkconf.8 ============================================================================== --- stable/8/contrib/bind9/bin/check/named-checkconf.8 Sat May 28 00:21:28 2011 (r222395) +++ stable/8/contrib/bind9/bin/check/named-checkconf.8 Sat May 28 00:33:06 2011 (r222396) @@ -13,7 +13,7 @@ .\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR .\" PERFORMANCE OF THIS SOFTWARE. .\" -.\" $Id: named-checkconf.8,v 1.30.334.1 2009/07/11 01:55:20 tbox Exp $ +.\" $Id: named-checkconf.8,v 1.30.334.1 2009-07-11 01:55:20 tbox Exp $ .\" .hy 0 .ad l Modified: stable/8/contrib/bind9/bin/check/named-checkconf.docbook ============================================================================== --- stable/8/contrib/bind9/bin/check/named-checkconf.docbook Sat May 28 00:21:28 2011 (r222395) +++ stable/8/contrib/bind9/bin/check/named-checkconf.docbook Sat May 28 00:33:06 2011 (r222396) @@ -18,7 +18,7 @@ - PERFORMANCE OF THIS SOFTWARE. --> - + June 14, 2000 Modified: stable/8/contrib/bind9/bin/check/named-checkconf.html ============================================================================== --- stable/8/contrib/bind9/bin/check/named-checkconf.html Sat May 28 00:21:28 2011 (r222395) +++ stable/8/contrib/bind9/bin/check/named-checkconf.html Sat May 28 00:33:06 2011 (r222396) @@ -14,7 +14,7 @@ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. --> - + Modified: stable/8/contrib/bind9/bin/check/named-checkzone.8 ============================================================================== --- stable/8/contrib/bind9/bin/check/named-checkzone.8 Sat May 28 00:21:28 2011 (r222395) +++ stable/8/contrib/bind9/bin/check/named-checkzone.8 Sat May 28 00:33:06 2011 (r222396) @@ -13,7 +13,7 @@ .\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR .\" PERFORMANCE OF THIS SOFTWARE. .\" -.\" $Id: named-checkzone.8,v 1.42.334.3 2009/11/11 01:56:22 tbox Exp $ +.\" $Id: named-checkzone.8,v 1.42.334.3 2009-11-11 01:56:22 tbox Exp $ .\" .hy 0 .ad l Modified: stable/8/contrib/bind9/bin/check/named-checkzone.docbook ============================================================================== --- stable/8/contrib/bind9/bin/check/named-checkzone.docbook Sat May 28 00:21:28 2011 (r222395) +++ stable/8/contrib/bind9/bin/check/named-checkzone.docbook Sat May 28 00:33:06 2011 (r222396) @@ -18,7 +18,7 @@ - PERFORMANCE OF THIS SOFTWARE. --> - + June 13, 2000 Modified: stable/8/contrib/bind9/bin/check/named-checkzone.html ============================================================================== --- stable/8/contrib/bind9/bin/check/named-checkzone.html Sat May 28 00:21:28 2011 (r222395) +++ stable/8/contrib/bind9/bin/check/named-checkzone.html Sat May 28 00:33:06 2011 (r222396) @@ -14,7 +14,7 @@ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. --> - + Modified: stable/8/contrib/bind9/bin/dig/Makefile.in ============================================================================== --- stable/8/contrib/bind9/bin/dig/Makefile.in Sat May 28 00:21:28 2011 (r222395) +++ stable/8/contrib/bind9/bin/dig/Makefile.in Sat May 28 00:33:06 2011 (r222396) @@ -13,7 +13,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: Makefile.in,v 1.41 2007/06/19 23:46:59 tbox Exp $ +# $Id: Makefile.in,v 1.41 2007-06-19 23:46:59 tbox Exp $ srcdir = @srcdir@ VPATH = @srcdir@ Modified: stable/8/contrib/bind9/bin/dig/dig.1 ============================================================================== --- stable/8/contrib/bind9/bin/dig/dig.1 Sat May 28 00:21:28 2011 (r222395) +++ stable/8/contrib/bind9/bin/dig/dig.1 Sat May 28 00:33:06 2011 (r222396) @@ -13,7 +13,7 @@ .\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR .\" PERFORMANCE OF THIS SOFTWARE. .\" -.\" $Id: dig.1,v 1.50.44.3 2009/07/11 01:55:20 tbox Exp $ +.\" $Id: dig.1,v 1.50.44.3 2009-07-11 01:55:20 tbox Exp $ .\" .hy 0 .ad l Modified: stable/8/contrib/bind9/bin/dig/dig.docbook ============================================================================== --- stable/8/contrib/bind9/bin/dig/dig.docbook Sat May 28 00:21:28 2011 (r222395) +++ stable/8/contrib/bind9/bin/dig/dig.docbook Sat May 28 00:33:06 2011 (r222396) @@ -18,7 +18,7 @@ - PERFORMANCE OF THIS SOFTWARE. --> - + Modified: stable/8/contrib/bind9/bin/dig/dig.html ============================================================================== --- stable/8/contrib/bind9/bin/dig/dig.html Sat May 28 00:21:28 2011 (r222395) +++ stable/8/contrib/bind9/bin/dig/dig.html Sat May 28 00:33:06 2011 (r222396) @@ -14,7 +14,7 @@ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. --> - + Modified: stable/8/contrib/bind9/bin/dig/host.1 ============================================================================== --- stable/8/contrib/bind9/bin/dig/host.1 Sat May 28 00:21:28 2011 (r222395) +++ stable/8/contrib/bind9/bin/dig/host.1 Sat May 28 00:33:06 2011 (r222396) @@ -13,7 +13,7 @@ .\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR .\" PERFORMANCE OF THIS SOFTWARE. .\" -.\" $Id: host.1,v 1.29.114.2 2009/07/11 01:55:20 tbox Exp $ +.\" $Id: host.1,v 1.29.114.2 2009-07-11 01:55:20 tbox Exp $ .\" .hy 0 .ad l Modified: stable/8/contrib/bind9/bin/dig/host.docbook ============================================================================== --- stable/8/contrib/bind9/bin/dig/host.docbook Sat May 28 00:21:28 2011 (r222395) +++ stable/8/contrib/bind9/bin/dig/host.docbook Sat May 28 00:33:06 2011 (r222396) @@ -18,7 +18,7 @@ - PERFORMANCE OF THIS SOFTWARE. --> - + Modified: stable/8/contrib/bind9/bin/dig/host.html ============================================================================== --- stable/8/contrib/bind9/bin/dig/host.html Sat May 28 00:21:28 2011 (r222395) +++ stable/8/contrib/bind9/bin/dig/host.html Sat May 28 00:33:06 2011 (r222396) @@ -14,7 +14,7 @@ - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. --> - + Modified: stable/8/contrib/bind9/bin/dig/include/dig/dig.h ============================================================================== --- stable/8/contrib/bind9/bin/dig/include/dig/dig.h Sat May 28 00:21:28 2011 (r222395) +++ stable/8/contrib/bind9/bin/dig/include/dig/dig.h Sat May 28 00:33:06 2011 (r222396) @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dig.h,v 1.107.120.2 2009/01/06 23:47:26 tbox Exp $ */ +/* $Id: dig.h,v 1.107.120.2 2009-01-06 23:47:26 tbox Exp $ */ #ifndef DIG_H #define DIG_H Modified: stable/8/contrib/bind9/bin/dig/nslookup.c ============================================================================== --- stable/8/contrib/bind9/bin/dig/nslookup.c Sat May 28 00:21:28 2011 (r222395) +++ stable/8/contrib/bind9/bin/dig/nslookup.c Sat May 28 00:33:06 2011 (r222396) @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: nslookup.c,v 1.117.334.5 2009/10/20 01:11:22 marka Exp $ */ +/* $Id: nslookup.c,v 1.117.334.5 2009-10-20 01:11:22 marka Exp $ */ #include Modified: stable/8/contrib/bind9/bin/dnssec/Makefile.in ============================================================================== --- stable/8/contrib/bind9/bin/dnssec/Makefile.in Sat May 28 00:21:28 2011 (r222395) +++ stable/8/contrib/bind9/bin/dnssec/Makefile.in Sat May 28 00:33:06 2011 (r222396) @@ -13,7 +13,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: Makefile.in,v 1.35 2008/11/07 02:28:49 marka Exp $ +# $Id: Makefile.in,v 1.35 2008-11-07 02:28:49 marka Exp $ srcdir = @srcdir@ VPATH = @srcdir@ Modified: stable/8/contrib/bind9/bin/dnssec/dnssec-dsfromkey.c ============================================================================== --- stable/8/contrib/bind9/bin/dnssec/dnssec-dsfromkey.c Sat May 28 00:21:28 2011 (r222395) +++ stable/8/contrib/bind9/bin/dnssec/dnssec-dsfromkey.c Sat May 28 00:33:06 2011 (r222396) @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dnssec-dsfromkey.c,v 1.2.14.6 2010/01/11 23:47:22 tbox Exp $ */ +/* $Id: dnssec-dsfromkey.c,v 1.2.14.6 2010-01-11 23:47:22 tbox Exp $ */ /*! \file */ Modified: stable/8/contrib/bind9/bin/dnssec/dnssec-dsfromkey.docbook ============================================================================== --- stable/8/contrib/bind9/bin/dnssec/dnssec-dsfromkey.docbook Sat May 28 00:21:28 2011 (r222395) +++ stable/8/contrib/bind9/bin/dnssec/dnssec-dsfromkey.docbook Sat May 28 00:33:06 2011 (r222396) @@ -17,7 +17,7 @@ - PERFORMANCE OF THIS SOFTWARE. --> - + November 29, 2008 Modified: stable/8/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.8 ============================================================================== --- stable/8/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.8 Sat May 28 00:21:28 2011 (r222395) +++ stable/8/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.8 Sat May 28 00:33:06 2011 (r222396) @@ -12,7 +12,7 @@ .\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR .\" PERFORMANCE OF THIS SOFTWARE. .\" -.\" $Id: dnssec-keyfromlabel.8,v 1.6.14.3 2010/01/16 01:55:32 tbox Exp $ +.\" $Id: dnssec-keyfromlabel.8,v 1.6.14.3 2010-01-16 01:55:32 tbox Exp $ .\" .hy 0 .ad l Modified: stable/8/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.c ============================================================================== --- stable/8/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.c Sat May 28 00:21:28 2011 (r222395) +++ stable/8/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.c Sat May 28 00:33:06 2011 (r222396) @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dnssec-keyfromlabel.c,v 1.4.50.2 2010/01/15 23:47:31 tbox Exp $ */ +/* $Id: dnssec-keyfromlabel.c,v 1.4.50.2 2010-01-15 23:47:31 tbox Exp $ */ /*! \file */ Modified: stable/8/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.docbook ============================================================================== --- stable/8/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.docbook Sat May 28 00:21:28 2011 (r222395) +++ stable/8/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.docbook Sat May 28 00:33:06 2011 (r222396) @@ -17,7 +17,7 @@ - PERFORMANCE OF THIS SOFTWARE. --> - + February 8, 2008 Modified: stable/8/contrib/bind9/bin/dnssec/dnssec-keygen.8 ============================================================================== --- stable/8/contrib/bind9/bin/dnssec/dnssec-keygen.8 Sat May 28 00:21:28 2011 (r222395) +++ stable/8/contrib/bind9/bin/dnssec/dnssec-keygen.8 Sat May 28 00:33:06 2011 (r222396) @@ -13,7 +13,7 @@ .\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR .\" PERFORMANCE OF THIS SOFTWARE. .\" -.\" $Id: dnssec-keygen.8,v 1.40.44.4 2010/01/16 01:55:32 tbox Exp $ +.\" $Id: dnssec-keygen.8,v 1.40.44.4 2010-01-16 01:55:32 tbox Exp $ .\" .hy 0 .ad l Modified: stable/8/contrib/bind9/bin/dnssec/dnssec-keygen.c ============================================================================== --- stable/8/contrib/bind9/bin/dnssec/dnssec-keygen.c Sat May 28 00:21:28 2011 (r222395) +++ stable/8/contrib/bind9/bin/dnssec/dnssec-keygen.c Sat May 28 00:33:06 2011 (r222396) @@ -29,7 +29,7 @@ * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dnssec-keygen.c,v 1.81.48.2 2010/01/15 23:47:31 tbox Exp $ */ +/* $Id: dnssec-keygen.c,v 1.81.48.2 2010-01-15 23:47:31 tbox Exp $ */ /*! \file */ Modified: stable/8/contrib/bind9/bin/dnssec/dnssec-keygen.docbook ============================================================================== --- stable/8/contrib/bind9/bin/dnssec/dnssec-keygen.docbook Sat May 28 00:21:28 2011 (r222395) +++ stable/8/contrib/bind9/bin/dnssec/dnssec-keygen.docbook Sat May 28 00:33:06 2011 (r222396) @@ -18,7 +18,7 @@ - PERFORMANCE OF THIS SOFTWARE. --> - + June 30, 2000 Modified: stable/8/contrib/bind9/bin/dnssec/dnssec-signzone.8 ============================================================================== --- stable/8/contrib/bind9/bin/dnssec/dnssec-signzone.8 Sat May 28 00:21:28 2011 (r222395) +++ stable/8/contrib/bind9/bin/dnssec/dnssec-signzone.8 Sat May 28 00:33:06 2011 (r222396) @@ -13,7 +13,7 @@ .\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR .\" PERFORMANCE OF THIS SOFTWARE. .\" -.\" $Id: dnssec-signzone.8,v 1.47.44.8 2009/11/07 01:56:11 tbox Exp $ +.\" $Id: dnssec-signzone.8,v 1.47.44.8 2009-11-07 01:56:11 tbox Exp $ .\" .hy 0 .ad l Modified: stable/8/contrib/bind9/bin/dnssec/dnssec-signzone.docbook ============================================================================== --- stable/8/contrib/bind9/bin/dnssec/dnssec-signzone.docbook Sat May 28 00:21:28 2011 (r222395) +++ stable/8/contrib/bind9/bin/dnssec/dnssec-signzone.docbook Sat May 28 00:33:06 2011 (r222396) @@ -18,7 +18,7 @@ - PERFORMANCE OF THIS SOFTWARE. --> - + June 08, 2009 Modified: stable/8/contrib/bind9/bin/dnssec/dnssectool.c ============================================================================== --- stable/8/contrib/bind9/bin/dnssec/dnssectool.c Sat May 28 00:21:28 2011 (r222395) +++ stable/8/contrib/bind9/bin/dnssec/dnssectool.c Sat May 28 00:33:06 2011 (r222396) @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dnssectool.c,v 1.45.334.5 2009/06/22 05:05:00 marka Exp $ */ +/* $Id: dnssectool.c,v 1.45.334.5 2009-06-22 05:05:00 marka Exp $ */ /*! \file */ Modified: stable/8/contrib/bind9/bin/dnssec/dnssectool.h ============================================================================== --- stable/8/contrib/bind9/bin/dnssec/dnssectool.h Sat May 28 00:21:28 2011 (r222395) +++ stable/8/contrib/bind9/bin/dnssec/dnssectool.h Sat May 28 00:33:06 2011 (r222396) @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dnssectool.h,v 1.22.48.2 2009/09/04 23:46:58 tbox Exp $ */ +/* $Id: dnssectool.h,v 1.22.48.2 2009-09-04 23:46:58 tbox Exp $ */ #ifndef DNSSECTOOL_H #define DNSSECTOOL_H 1 Modified: stable/8/contrib/bind9/bin/named/Makefile.in ============================================================================== --- stable/8/contrib/bind9/bin/named/Makefile.in Sat May 28 00:21:28 2011 (r222395) +++ stable/8/contrib/bind9/bin/named/Makefile.in Sat May 28 00:33:06 2011 (r222396) @@ -13,7 +13,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: Makefile.in,v 1.101 2008/09/23 17:25:47 jinmei Exp $ +# $Id: Makefile.in,v 1.101 2008-09-23 17:25:47 jinmei Exp $ srcdir = @srcdir@ VPATH = @srcdir@ Modified: stable/8/contrib/bind9/bin/named/bind9.xsl ============================================================================== --- stable/8/contrib/bind9/bin/named/bind9.xsl Sat May 28 00:21:28 2011 (r222395) +++ stable/8/contrib/bind9/bin/named/bind9.xsl Sat May 28 00:33:06 2011 (r222396) @@ -15,7 +15,7 @@ - PERFORMANCE OF THIS SOFTWARE. --> - + Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09839106564A; Sat, 28 May 2011 04:40:36 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EA1488FC0A; Sat, 28 May 2011 04:40: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 p4S4eZ7k068138; Sat, 28 May 2011 04:40:35 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4S4eZX6068131; Sat, 28 May 2011 04:40:35 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201105280440.p4S4eZX6068131@svn.freebsd.org> From: Lawrence Stewart Date: Sat, 28 May 2011 04:40:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222401 - in stable/8/sys: conf netinet netinet/cc sys X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 May 2011 04:40:36 -0000 Author: lstewart Date: Sat May 28 04:40:35 2011 New Revision: 222401 URL: http://svn.freebsd.org/changeset/base/222401 Log: MFC r215166,215377,215391,215392,215393,215395,216101,216103,216105,216107, 216749,216760,217748,218167: - Add a KPI and supporting infrastructure to allow modular congestion control algorithms to be used in the net stack. Algorithms can maintain per-connection state if required, and connections maintain their own algorithm pointer, which allows different connections to concurrently use different algorithms. The TCP_CONGESTION socket option can be used with getsockopt()/setsockopt() to programmatically query or change the congestion control algorithm respectively from within an application at runtime. - Integrate the framework with the TCP stack in as least intrusive a manner as possible. Care was also taken to develop the framework in a way that should allow integration with other congestion aware transport protocols (e.g. SCTP) in the future. The hope is that we will one day be able to share a single set of congestion control algorithm modules between all congestion aware transport protocols. - Introduce a new congestion recovery (TF_CONGRECOVERY) state into the TCP stack and use it to decouple the meaning of recovery from a congestion event and recovery from packet loss (TF_FASTRECOVERY) a la RFC2581. ECN and delay based congestion control protocols don't generally need to recover from packet loss and need a different way to note a congestion recovery episode within the stack. - Remove the net.inet.tcp.newreno sysctl, which simplifies some portions of code and ensures the stack always uses the appropriate mechanisms for recovering from packet loss during a congestion recovery episode. - Extract the NewReno congestion control algorithm from the TCP stack and massage it into module form. NewReno is always built into the kernel and will remain the default algorithm for the forseeable future. Implementations of additional different algorithms will become available in the near future. - Tweak the MFCed code to preserve the ABI of the 8-STABLE branch with respect to "struct tcpcb" by consuming some of the padding within the struct. - Bump __FreeBSD_version to 802504. In collaboration with: David Hayes and Grenville Armitage Sponsored by: Cisco URP, FreeBSD Foundation Reviewed by: rpaulo (r215166), bz (r215391,215395,216749,217748) Tested by: David Hayes (r215166), trociny (r215377,215391,215392,215395) Added: stable/8/sys/netinet/cc/ - copied from r215166, head/sys/netinet/cc/ stable/8/sys/netinet/cc.h - copied, changed from r215166, head/sys/netinet/cc.h Modified: stable/8/sys/conf/files stable/8/sys/netinet/cc/cc.c stable/8/sys/netinet/cc/cc_newreno.c stable/8/sys/netinet/tcp_input.c stable/8/sys/netinet/tcp_output.c stable/8/sys/netinet/tcp_sack.c stable/8/sys/netinet/tcp_subr.c stable/8/sys/netinet/tcp_timer.c stable/8/sys/netinet/tcp_usrreq.c stable/8/sys/netinet/tcp_var.h stable/8/sys/sys/param.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/conf/files ============================================================================== --- stable/8/sys/conf/files Sat May 28 04:10:44 2011 (r222400) +++ stable/8/sys/conf/files Sat May 28 04:40:35 2011 (r222401) @@ -2568,6 +2568,8 @@ netinet/ip_mroute.c optional mrouting i netinet/ip_options.c optional inet netinet/ip_output.c optional inet netinet/raw_ip.c optional inet +netinet/cc/cc.c optional inet +netinet/cc/cc_newreno.c optional inet netinet/sctp_asconf.c optional inet sctp netinet/sctp_auth.c optional inet sctp netinet/sctp_bsd_addr.c optional inet sctp Copied and modified: stable/8/sys/netinet/cc.h (from r215166, head/sys/netinet/cc.h) ============================================================================== --- head/sys/netinet/cc.h Fri Nov 12 06:41:55 2010 (r215166, copy source) +++ stable/8/sys/netinet/cc.h Sat May 28 04:40:35 2011 (r222401) @@ -58,11 +58,14 @@ extern STAILQ_HEAD(cc_head, cc_algo) cc_ extern const int tcprexmtthresh; extern struct cc_algo newreno_cc_algo; +/* Per-netstack bits. */ +VNET_DECLARE(struct cc_algo *, default_cc_ptr); +#define V_default_cc_ptr VNET(default_cc_ptr) + /* Define the new net.inet.tcp.cc sysctl tree. */ SYSCTL_DECL(_net_inet_tcp_cc); /* CC housekeeping functions. */ -void cc_init(void); int cc_register_algo(struct cc_algo *add_cc); int cc_deregister_algo(struct cc_algo *remove_cc); @@ -98,10 +101,12 @@ struct cc_var { * bits (0x01000000 - 0x80000000) are reserved for CC algos to declare their own * congestion signal types. */ -#define CC_ECN 0x000001/* ECN marked packet received. */ -#define CC_RTO 0x000002/* RTO fired. */ -#define CC_RTO_ERR 0x000004/* RTO fired in error. */ -#define CC_NDUPACK 0x000008/* Threshold of dupack's reached. */ +#define CC_ECN 0x00000001 /* ECN marked packet received. */ +#define CC_RTO 0x00000002 /* RTO fired. */ +#define CC_RTO_ERR 0x00000004 /* RTO fired in error. */ +#define CC_NDUPACK 0x00000008 /* Threshold of dupack's reached. */ + +#define CC_SIGPRIVMASK 0xFF000000 /* Mask to check if sig is private. */ /* * Structure to hold data and function pointers that together represent a @@ -147,7 +152,7 @@ struct cc_algo { #define CC_DATA(tp) ((tp)->ccv->cc_data) /* Macro to obtain the system default CC algo's struct ptr. */ -#define CC_DEFAULT() STAILQ_FIRST(&cc_list) +#define CC_DEFAULT() V_default_cc_ptr extern struct rwlock cc_list_lock; #define CC_LIST_LOCK_INIT() rw_init(&cc_list_lock, "cc_list") @@ -156,6 +161,6 @@ extern struct rwlock cc_list_lock; #define CC_LIST_RUNLOCK() rw_runlock(&cc_list_lock) #define CC_LIST_WLOCK() rw_wlock(&cc_list_lock) #define CC_LIST_WUNLOCK() rw_wunlock(&cc_list_lock) -#define CC_LIST_WLOCK_ASSERT() rw_assert(&cc_list_lock, RA_WLOCKED) +#define CC_LIST_LOCK_ASSERT() rw_assert(&cc_list_lock, RA_LOCKED) #endif /* _NETINET_CC_H_ */ Modified: stable/8/sys/netinet/cc/cc.c ============================================================================== --- head/sys/netinet/cc/cc.c Fri Nov 12 06:41:55 2010 (r215166) +++ stable/8/sys/netinet/cc/cc.c Sat May 28 04:40:35 2011 (r222401) @@ -81,24 +81,7 @@ struct cc_head cc_list = STAILQ_HEAD_INI /* Protects the cc_list TAILQ. */ struct rwlock cc_list_lock; -/* - * Set the default CC algorithm to new_default. The default is identified - * by being the first element in the cc_list TAILQ. - */ -static void -cc_set_default(struct cc_algo *new_default) -{ - CC_LIST_WLOCK_ASSERT(); - - /* - * Make the requested system default CC algorithm the first element in - * the list if it isn't already. - */ - if (new_default != CC_DEFAULT()) { - STAILQ_REMOVE(&cc_list, new_default, cc_algo, entries); - STAILQ_INSERT_HEAD(&cc_list, new_default, entries); - } -} +VNET_DEFINE(struct cc_algo *, default_cc_ptr) = &newreno_cc_algo; /* * Sysctl handler to show and change the default CC algorithm. @@ -106,14 +89,13 @@ cc_set_default(struct cc_algo *new_defau static int cc_default_algo(SYSCTL_HANDLER_ARGS) { + char default_cc[TCP_CA_NAME_MAX]; struct cc_algo *funcs; int err, found; err = found = 0; if (req->newptr == NULL) { - char default_cc[TCP_CA_NAME_MAX]; - /* Just print the current default. */ CC_LIST_RLOCK(); strlcpy(default_cc, CC_DEFAULT()->name, TCP_CA_NAME_MAX); @@ -121,15 +103,15 @@ cc_default_algo(SYSCTL_HANDLER_ARGS) err = sysctl_handle_string(oidp, default_cc, 1, req); } else { /* Find algo with specified name and set it to default. */ - CC_LIST_WLOCK(); + CC_LIST_RLOCK(); STAILQ_FOREACH(funcs, &cc_list, entries) { if (strncmp((char *)req->newptr, funcs->name, TCP_CA_NAME_MAX) == 0) { found = 1; - cc_set_default(funcs); + V_default_cc_ptr = funcs; } } - CC_LIST_WUNLOCK(); + CC_LIST_RUNLOCK(); if (!found) err = ESRCH; @@ -146,20 +128,37 @@ cc_list_available(SYSCTL_HANDLER_ARGS) { struct cc_algo *algo; struct sbuf *s; - int err, first; + int err, first, nalgos; - err = 0; + err = nalgos = 0; first = 1; - s = sbuf_new(NULL, NULL, TCP_CA_NAME_MAX, SBUF_AUTOEXTEND); + + CC_LIST_RLOCK(); + STAILQ_FOREACH(algo, &cc_list, entries) { + nalgos++; + } + CC_LIST_RUNLOCK(); + + s = sbuf_new(NULL, NULL, nalgos * TCP_CA_NAME_MAX, SBUF_FIXEDLEN); if (s == NULL) return (ENOMEM); + /* + * It is theoretically possible for the CC list to have grown in size + * since the call to sbuf_new() and therefore for the sbuf to be too + * small. If this were to happen (incredibly unlikely), the sbuf will + * reach an overflow condition, sbuf_printf() will return an error and + * the sysctl will fail gracefully. + */ CC_LIST_RLOCK(); STAILQ_FOREACH(algo, &cc_list, entries) { err = sbuf_printf(s, first ? "%s" : ", %s", algo->name); - if (err) + if (err) { + /* Sbuf overflow condition. */ + err = EOVERFLOW; break; + } first = 0; } CC_LIST_RUNLOCK(); @@ -174,10 +173,32 @@ cc_list_available(SYSCTL_HANDLER_ARGS) } /* + * Reset the default CC algo to NewReno for any netstack which is using the algo + * that is about to go away as its default. + */ +static void +cc_checkreset_default(struct cc_algo *remove_cc) +{ + VNET_ITERATOR_DECL(vnet_iter); + + CC_LIST_LOCK_ASSERT(); + + VNET_LIST_RLOCK_NOSLEEP(); + VNET_FOREACH(vnet_iter) { + CURVNET_SET(vnet_iter); + if (strncmp(CC_DEFAULT()->name, remove_cc->name, + TCP_CA_NAME_MAX) == 0) + V_default_cc_ptr = &newreno_cc_algo; + CURVNET_RESTORE(); + } + VNET_LIST_RUNLOCK_NOSLEEP(); +} + +/* * Initialise CC subsystem on system boot. */ -void -cc_init() +static void +cc_init(void) { CC_LIST_LOCK_INIT(); STAILQ_INIT(&cc_list); @@ -190,8 +211,6 @@ int cc_deregister_algo(struct cc_algo *remove_cc) { struct cc_algo *funcs, *tmpfuncs; - struct tcpcb *tp; - struct inpcb *inp; int err; err = ENOENT; @@ -204,58 +223,22 @@ cc_deregister_algo(struct cc_algo *remov CC_LIST_WLOCK(); STAILQ_FOREACH_SAFE(funcs, &cc_list, entries, tmpfuncs) { if (funcs == remove_cc) { - /* - * If we're removing the current system default, - * reset the default to newreno. - */ - if (strncmp(CC_DEFAULT()->name, remove_cc->name, - TCP_CA_NAME_MAX) == 0) - cc_set_default(&newreno_cc_algo); - + cc_checkreset_default(remove_cc); STAILQ_REMOVE(&cc_list, funcs, cc_algo, entries); err = 0; break; } } CC_LIST_WUNLOCK(); - - if (!err) { + + if (!err) /* - * Check all active control blocks and change any that are - * using this algorithm back to newreno. If the algorithm that - * was in use requires cleanup code to be run, call it. - * - * New connections already part way through being initialised - * with the CC algo we're removing will not race with this code - * because the INP_INFO_WLOCK is held during initialisation. - * We therefore don't enter the loop below until the connection - * list has stabilised. + * XXXLAS: + * - We may need to handle non-zero return values in future. + * - If we add CC framework support for protocols other than + * TCP, we may want a more generic way to handle this step. */ - INP_INFO_RLOCK(&V_tcbinfo); - LIST_FOREACH(inp, &V_tcb, inp_list) { - INP_WLOCK(inp); - /* Important to skip tcptw structs. */ - if (!(inp->inp_flags & INP_TIMEWAIT) && - (tp = intotcpcb(inp)) != NULL) { - /* - * By holding INP_WLOCK here, we are - * assured that the connection is not - * currently executing inside the CC - * module's functions i.e. it is safe to - * make the switch back to newreno. - */ - if (CC_ALGO(tp) == remove_cc) { - tmpfuncs = CC_ALGO(tp); - /* Newreno does not require any init. */ - CC_ALGO(tp) = &newreno_cc_algo; - if (tmpfuncs->cb_destroy != NULL) - tmpfuncs->cb_destroy(tp->ccv); - } - } - INP_WUNLOCK(inp); - } - INP_INFO_RUNLOCK(&V_tcbinfo); - } + tcp_ccalgounload(remove_cc); return (err); } @@ -328,11 +311,13 @@ cc_modevent(module_t mod, int event_type return (err); } +SYSINIT(cc, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_FIRST, cc_init, NULL); + /* Declare sysctl tree and populate it. */ SYSCTL_NODE(_net_inet_tcp, OID_AUTO, cc, CTLFLAG_RW, NULL, "congestion control related settings"); -SYSCTL_PROC(_net_inet_tcp_cc, OID_AUTO, algorithm, CTLTYPE_STRING|CTLFLAG_RW, +SYSCTL_VNET_PROC(_net_inet_tcp_cc, OID_AUTO, algorithm, CTLTYPE_STRING|CTLFLAG_RW, NULL, 0, cc_default_algo, "A", "default congestion control algorithm"); SYSCTL_PROC(_net_inet_tcp_cc, OID_AUTO, available, CTLTYPE_STRING|CTLFLAG_RD, Modified: stable/8/sys/netinet/cc/cc_newreno.c ============================================================================== --- head/sys/netinet/cc/cc_newreno.c Fri Nov 12 06:41:55 2010 (r215166) +++ stable/8/sys/netinet/cc/cc_newreno.c Sat May 28 04:40:35 2011 (r222401) @@ -52,41 +52,35 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include #include +#include -#include -#include +#include #include -#include -#include #include #include #include -void newreno_ack_received(struct cc_var *ccv, uint16_t type); -void newreno_cong_signal(struct cc_var *ccv, uint32_t type); -void newreno_post_recovery(struct cc_var *ccv); -void newreno_after_idle(struct cc_var *ccv); +static void newreno_ack_received(struct cc_var *ccv, uint16_t type); +static void newreno_after_idle(struct cc_var *ccv); +static void newreno_cong_signal(struct cc_var *ccv, uint32_t type); +static void newreno_post_recovery(struct cc_var *ccv); struct cc_algo newreno_cc_algo = { .name = "newreno", .ack_received = newreno_ack_received, + .after_idle = newreno_after_idle, .cong_signal = newreno_cong_signal, .post_recovery = newreno_post_recovery, - .after_idle = newreno_after_idle }; -/* - * Increase cwnd on receipt of a successful ACK: - * if cwnd <= ssthresh, increases by 1 MSS per ACK - * if cwnd > ssthresh, increase by ~1 MSS per RTT - */ -void +static void newreno_ack_received(struct cc_var *ccv, uint16_t type) { if (type == CC_ACK && !IN_RECOVERY(CCV(ccv, t_flags)) && @@ -153,14 +147,45 @@ newreno_ack_received(struct cc_var *ccv, } } +static void +newreno_after_idle(struct cc_var *ccv) +{ + int rw; + + /* + * If we've been idle for more than one retransmit timeout the old + * congestion window is no longer current and we have to reduce it to + * the restart window before we can transmit again. + * + * The restart window is the initial window or the last CWND, whichever + * is smaller. + * + * This is done to prevent us from flooding the path with a full CWND at + * wirespeed, overloading router and switch buffers along the way. + * + * See RFC5681 Section 4.1. "Restarting Idle Connections". + */ + if (V_tcp_do_rfc3390) + rw = min(4 * CCV(ccv, t_maxseg), + max(2 * CCV(ccv, t_maxseg), 4380)); + else + rw = CCV(ccv, t_maxseg) * 2; + + CCV(ccv, snd_cwnd) = min(rw, CCV(ccv, snd_cwnd)); +} + /* - * manage congestion signals + * Perform any necessary tasks before we enter congestion recovery. */ -void +static void newreno_cong_signal(struct cc_var *ccv, uint32_t type) { u_int win; + /* Catch algos which mistakenly leak private signal types. */ + KASSERT((type & CC_SIGPRIVMASK) == 0, + ("%s: congestion signal type 0x%08x is private\n", __func__, type)); + win = max(CCV(ccv, snd_cwnd) / 2 / CCV(ccv, t_maxseg), 2) * CCV(ccv, t_maxseg); @@ -183,11 +208,9 @@ newreno_cong_signal(struct cc_var *ccv, } /* - * decrease the cwnd in response to packet loss or a transmit timeout. - * th can be null, in which case cwnd will be set according to reno instead - * of new reno. + * Perform any necessary tasks before we exit congestion recovery. */ -void +static void newreno_post_recovery(struct cc_var *ccv) { if (IN_FASTRECOVERY(CCV(ccv, t_flags))) { @@ -209,23 +232,5 @@ newreno_post_recovery(struct cc_var *ccv } } -/* - * if a connection has been idle for a while and more data is ready to be sent, - * reset cwnd - */ -void -newreno_after_idle(struct cc_var *ccv) -{ - /* - * We have been idle for "a while" and no acks are expected to clock out - * any data we send -- slow start to get ack "clock" running again. - */ - if (V_tcp_do_rfc3390) - CCV(ccv, snd_cwnd) = min(4 * CCV(ccv, t_maxseg), - max(2 * CCV(ccv, t_maxseg), 4380)); - else - CCV(ccv, snd_cwnd) = CCV(ccv, t_maxseg) * 2; -} - DECLARE_CC_MODULE(newreno, &newreno_cc_algo); Modified: stable/8/sys/netinet/tcp_input.c ============================================================================== --- stable/8/sys/netinet/tcp_input.c Sat May 28 04:10:44 2011 (r222400) +++ stable/8/sys/netinet/tcp_input.c Sat May 28 04:40:35 2011 (r222401) @@ -1,6 +1,20 @@ /*- * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1994, 1995 * The Regents of the University of California. All rights reserved. + * Copyright (c) 2007-2008,2010 + * Swinburne University of Technology, Melbourne, Australia. + * Copyright (c) 2009-2010 Lawrence Stewart + * Copyright (c) 2010 The FreeBSD Foundation + * All rights reserved. + * + * Portions of this software were developed at the Centre for Advanced Internet + * Architectures, Swinburne University, by Lawrence Stewart, James Healy and + * David Hayes, made possible in part by a grant from the Cisco University + * Research Program Fund at Community Foundation Silicon Valley. + * + * Portions of this software were developed at the Centre for Advanced + * Internet Architectures, Swinburne University of Technology, Melbourne, + * Australia by David Hayes under sponsorship from the FreeBSD Foundation. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -61,6 +75,7 @@ __FBSDID("$FreeBSD$"); #define TCPSTATES /* for logging */ +#include #include #include #include @@ -75,7 +90,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -96,7 +110,7 @@ __FBSDID("$FreeBSD$"); #include -static const int tcprexmtthresh = 3; +const int tcprexmtthresh = 3; VNET_DEFINE(struct tcpstat, tcpstat); SYSCTL_VNET_STRUCT(_net_inet_tcp, TCPCTL_STATS, stats, CTLFLAG_RW, @@ -132,19 +146,16 @@ SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, "Enable RFC 3042 (Limited Transmit)"); VNET_DEFINE(int, tcp_do_rfc3390) = 1; -#define V_tcp_do_rfc3390 VNET(tcp_do_rfc3390) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, rfc3390, CTLFLAG_RW, &VNET_NAME(tcp_do_rfc3390), 0, "Enable RFC 3390 (Increasing TCP's Initial Congestion Window)"); VNET_DEFINE(int, tcp_do_rfc3465) = 1; -#define V_tcp_do_rfc3465 VNET(tcp_do_rfc3465) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, rfc3465, CTLFLAG_RW, &VNET_NAME(tcp_do_rfc3465), 0, "Enable RFC 3465 (Appropriate Byte Counting)"); VNET_DEFINE(int, tcp_abc_l_var) = 2; -#define V_tcp_abc_l_var VNET(tcp_abc_l_var) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, abc_l_var, CTLFLAG_RW, &VNET_NAME(tcp_abc_l_var), 2, "Cap the max cwnd increment during slow-start to this number of segments"); @@ -203,8 +214,10 @@ static void tcp_pulloutofband(struct so struct tcphdr *, struct mbuf *, int); static void tcp_xmit_timer(struct tcpcb *, int); static void tcp_newreno_partial_ack(struct tcpcb *, struct tcphdr *); -static void inline - tcp_congestion_exp(struct tcpcb *); +static void inline cc_ack_received(struct tcpcb *tp, struct tcphdr *th, + uint16_t type); +static void inline cc_conn_init(struct tcpcb *tp); +static void inline cc_post_recovery(struct tcpcb *tp, struct tcphdr *th); static void inline tcp_fields_to_host(struct tcphdr *); #ifdef TCP_SIGNATURE static void inline tcp_fields_to_net(struct tcphdr *); @@ -226,20 +239,190 @@ kmod_tcpstat_inc(int statnum) (*((u_long *)&V_tcpstat + statnum))++; } +/* + * CC wrapper hook functions + */ static void inline -tcp_congestion_exp(struct tcpcb *tp) +cc_ack_received(struct tcpcb *tp, struct tcphdr *th, uint16_t type) { - u_int win; - - win = min(tp->snd_wnd, tp->snd_cwnd) / - 2 / tp->t_maxseg; - if (win < 2) - win = 2; - tp->snd_ssthresh = win * tp->t_maxseg; - ENTER_FASTRECOVERY(tp); - tp->snd_recover = tp->snd_max; - if (tp->t_flags & TF_ECN_PERMIT) - tp->t_flags |= TF_ECN_SND_CWR; + INP_WLOCK_ASSERT(tp->t_inpcb); + + tp->ccv->bytes_this_ack = BYTES_THIS_ACK(tp, th); + if (tp->snd_cwnd == min(tp->snd_cwnd, tp->snd_wnd)) + tp->ccv->flags |= CCF_CWND_LIMITED; + else + tp->ccv->flags &= ~CCF_CWND_LIMITED; + + if (type == CC_ACK) { + if (tp->snd_cwnd > tp->snd_ssthresh) { + tp->t_bytes_acked += min(tp->ccv->bytes_this_ack, + V_tcp_abc_l_var * tp->t_maxseg); + if (tp->t_bytes_acked >= tp->snd_cwnd) { + tp->t_bytes_acked -= tp->snd_cwnd; + tp->ccv->flags |= CCF_ABC_SENTAWND; + } + } else { + tp->ccv->flags &= ~CCF_ABC_SENTAWND; + tp->t_bytes_acked = 0; + } + } + + if (CC_ALGO(tp)->ack_received != NULL) { + /* XXXLAS: Find a way to live without this */ + tp->ccv->curack = th->th_ack; + CC_ALGO(tp)->ack_received(tp->ccv, type); + } +} + +static void inline +cc_conn_init(struct tcpcb *tp) +{ + struct hc_metrics_lite metrics; + struct inpcb *inp = tp->t_inpcb; + int rtt; +#ifdef INET6 + int isipv6 = ((inp->inp_vflag & INP_IPV6) != 0) ? 1 : 0; +#endif + + INP_WLOCK_ASSERT(tp->t_inpcb); + + tcp_hc_get(&inp->inp_inc, &metrics); + + if (tp->t_srtt == 0 && (rtt = metrics.rmx_rtt)) { + tp->t_srtt = rtt; + tp->t_rttbest = tp->t_srtt + TCP_RTT_SCALE; + TCPSTAT_INC(tcps_usedrtt); + if (metrics.rmx_rttvar) { + tp->t_rttvar = metrics.rmx_rttvar; + TCPSTAT_INC(tcps_usedrttvar); + } else { + /* default variation is +- 1 rtt */ + tp->t_rttvar = + tp->t_srtt * TCP_RTTVAR_SCALE / TCP_RTT_SCALE; + } + TCPT_RANGESET(tp->t_rxtcur, + ((tp->t_srtt >> 2) + tp->t_rttvar) >> 1, + tp->t_rttmin, TCPTV_REXMTMAX); + } + if (metrics.rmx_ssthresh) { + /* + * There's some sort of gateway or interface + * buffer limit on the path. Use this to set + * the slow start threshhold, but set the + * threshold to no less than 2*mss. + */ + tp->snd_ssthresh = max(2 * tp->t_maxseg, metrics.rmx_ssthresh); + TCPSTAT_INC(tcps_usedssthresh); + } + + /* + * Set the slow-start flight size depending on whether this + * is a local network or not. + * + * Extend this so we cache the cwnd too and retrieve it here. + * Make cwnd even bigger than RFC3390 suggests but only if we + * have previous experience with the remote host. Be careful + * not make cwnd bigger than remote receive window or our own + * send socket buffer. Maybe put some additional upper bound + * on the retrieved cwnd. Should do incremental updates to + * hostcache when cwnd collapses so next connection doesn't + * overloads the path again. + * + * XXXAO: Initializing the CWND from the hostcache is broken + * and in its current form not RFC conformant. It is disabled + * until fixed or removed entirely. + * + * RFC3390 says only do this if SYN or SYN/ACK didn't got lost. + * We currently check only in syncache_socket for that. + */ +/* #define TCP_METRICS_CWND */ +#ifdef TCP_METRICS_CWND + if (metrics.rmx_cwnd) + tp->snd_cwnd = max(tp->t_maxseg, min(metrics.rmx_cwnd / 2, + min(tp->snd_wnd, so->so_snd.sb_hiwat))); + else +#endif + if (V_tcp_do_rfc3390) + tp->snd_cwnd = min(4 * tp->t_maxseg, + max(2 * tp->t_maxseg, 4380)); +#ifdef INET6 + else if ((isipv6 && in6_localaddr(&inp->in6p_faddr)) || + (!isipv6 && in_localaddr(inp->inp_faddr))) +#else + else if (in_localaddr(inp->inp_faddr)) +#endif + tp->snd_cwnd = tp->t_maxseg * V_ss_fltsz_local; + else + tp->snd_cwnd = tp->t_maxseg * V_ss_fltsz; + + if (CC_ALGO(tp)->conn_init != NULL) + CC_ALGO(tp)->conn_init(tp->ccv); +} + +void inline +cc_cong_signal(struct tcpcb *tp, struct tcphdr *th, uint32_t type) +{ + INP_WLOCK_ASSERT(tp->t_inpcb); + + switch(type) { + case CC_NDUPACK: + if (!IN_FASTRECOVERY(tp->t_flags)) { + tp->snd_recover = tp->snd_max; + if (tp->t_flags & TF_ECN_PERMIT) + tp->t_flags |= TF_ECN_SND_CWR; + } + break; + case CC_ECN: + if (!IN_CONGRECOVERY(tp->t_flags)) { + TCPSTAT_INC(tcps_ecn_rcwnd); + tp->snd_recover = tp->snd_max; + if (tp->t_flags & TF_ECN_PERMIT) + tp->t_flags |= TF_ECN_SND_CWR; + } + break; + case CC_RTO: + tp->t_dupacks = 0; + tp->t_bytes_acked = 0; + EXIT_RECOVERY(tp->t_flags); + tp->snd_ssthresh = max(2, min(tp->snd_wnd, tp->snd_cwnd) / 2 / + tp->t_maxseg) * tp->t_maxseg; + tp->snd_cwnd = tp->t_maxseg; + break; + case CC_RTO_ERR: + TCPSTAT_INC(tcps_sndrexmitbad); + /* RTO was unnecessary, so reset everything. */ + tp->snd_cwnd = tp->snd_cwnd_prev; + tp->snd_ssthresh = tp->snd_ssthresh_prev; + tp->snd_recover = tp->snd_recover_prev; + if (tp->t_flags & TF_WASFRECOVERY) + ENTER_FASTRECOVERY(tp->t_flags); + if (tp->t_flags & TF_WASCRECOVERY) + ENTER_CONGRECOVERY(tp->t_flags); + tp->snd_nxt = tp->snd_max; + tp->t_badrxtwin = 0; + break; + } + + if (CC_ALGO(tp)->cong_signal != NULL) { + if (th != NULL) + tp->ccv->curack = th->th_ack; + CC_ALGO(tp)->cong_signal(tp->ccv, type); + } +} + +static void inline +cc_post_recovery(struct tcpcb *tp, struct tcphdr *th) +{ + INP_WLOCK_ASSERT(tp->t_inpcb); + + /* XXXLAS: KASSERT that we're in recovery? */ + + if (CC_ALGO(tp)->post_recovery != NULL) { + tp->ccv->curack = th->th_ack; + CC_ALGO(tp)->post_recovery(tp->ccv); + } + /* XXXLAS: EXIT_RECOVERY ? */ + tp->t_bytes_acked = 0; } static inline void @@ -1252,14 +1435,9 @@ tcp_do_segment(struct mbuf *m, struct tc TCPSTAT_INC(tcps_ecn_ect1); break; } - /* - * Congestion experienced. - * Ignore if we are already trying to recover. - */ - if ((thflags & TH_ECE) && - SEQ_LEQ(th->th_ack, tp->snd_recover)) { - TCPSTAT_INC(tcps_ecn_rcwnd); - tcp_congestion_exp(tp); + /* Congestion experienced. */ + if (thflags & TH_ECE) { + cc_cong_signal(tp, th, CC_ECN); } } @@ -1354,15 +1532,9 @@ tcp_do_segment(struct mbuf *m, struct tc if (tlen == 0) { if (SEQ_GT(th->th_ack, tp->snd_una) && SEQ_LEQ(th->th_ack, tp->snd_max) && - tp->snd_cwnd >= tp->snd_wnd && - ((!V_tcp_do_newreno && - !(tp->t_flags & TF_SACK_PERMIT) && - tp->t_dupacks < tcprexmtthresh) || - ((V_tcp_do_newreno || - (tp->t_flags & TF_SACK_PERMIT)) && - !IN_FASTRECOVERY(tp) && - (to.to_flags & TOF_SACK) == 0 && - TAILQ_EMPTY(&tp->snd_holes)))) { + !IN_RECOVERY(tp->t_flags) && + (to.to_flags & TOF_SACK) == 0 && + TAILQ_EMPTY(&tp->snd_holes)) { /* * This is a pure ack for outstanding data. */ @@ -1382,15 +1554,7 @@ tcp_do_segment(struct mbuf *m, struct tc */ if (tp->t_rxtshift == 1 && (int)(ticks - tp->t_badrxtwin) < 0) { - TCPSTAT_INC(tcps_sndrexmitbad); - tp->snd_cwnd = tp->snd_cwnd_prev; - tp->snd_ssthresh = - tp->snd_ssthresh_prev; - tp->snd_recover = tp->snd_recover_prev; - if (tp->t_flags & TF_WASFRECOVERY) - ENTER_FASTRECOVERY(tp); - tp->snd_nxt = tp->snd_max; - tp->t_badrxtwin = 0; + cc_cong_signal(tp, th, CC_RTO_ERR); } /* @@ -1417,13 +1581,22 @@ tcp_do_segment(struct mbuf *m, struct tc ticks - tp->t_rtttime); } tcp_xmit_bandwidth_limit(tp, th->th_ack); - acked = th->th_ack - tp->snd_una; + acked = BYTES_THIS_ACK(tp, th); TCPSTAT_INC(tcps_rcvackpack); TCPSTAT_ADD(tcps_rcvackbyte, acked); sbdrop(&so->so_snd, acked); if (SEQ_GT(tp->snd_una, tp->snd_recover) && SEQ_LEQ(th->th_ack, tp->snd_recover)) tp->snd_recover = th->th_ack - 1; + + /* + * Let the congestion control algorithm update + * congestion control related information. This + * typically means increasing the congestion + * window. + */ + cc_ack_received(tp, th, CC_ACK); + tp->snd_una = th->th_ack; /* * Pull snd_wl2 up to prevent seq wrap relative @@ -1684,6 +1857,7 @@ tcp_do_segment(struct mbuf *m, struct tc thflags &= ~TH_SYN; } else { tp->t_state = TCPS_ESTABLISHED; + cc_conn_init(tp); tcp_timer_activate(tp, TT_KEEP, tcp_keepidle); } } else { @@ -2087,6 +2261,7 @@ tcp_do_segment(struct mbuf *m, struct tc tp->t_flags &= ~TF_NEEDFIN; } else { tp->t_state = TCPS_ESTABLISHED; + cc_conn_init(tp); tcp_timer_activate(tp, TT_KEEP, tcp_keepidle); } /* @@ -2155,11 +2330,10 @@ tcp_do_segment(struct mbuf *m, struct tc th->th_ack != tp->snd_una) tp->t_dupacks = 0; else if (++tp->t_dupacks > tcprexmtthresh || - ((V_tcp_do_newreno || - (tp->t_flags & TF_SACK_PERMIT)) && - IN_FASTRECOVERY(tp))) { + IN_FASTRECOVERY(tp->t_flags)) { + cc_ack_received(tp, th, CC_DUPACK); if ((tp->t_flags & TF_SACK_PERMIT) && - IN_FASTRECOVERY(tp)) { + IN_FASTRECOVERY(tp->t_flags)) { int awnd; /* @@ -2190,19 +2364,20 @@ tcp_do_segment(struct mbuf *m, struct tc * recovery. */ if (tp->t_flags & TF_SACK_PERMIT) { - if (IN_FASTRECOVERY(tp)) { + if (IN_FASTRECOVERY(tp->t_flags)) { tp->t_dupacks = 0; break; } - } else if (V_tcp_do_newreno || - V_tcp_do_ecn) { + } else { if (SEQ_LEQ(th->th_ack, tp->snd_recover)) { tp->t_dupacks = 0; break; } } - tcp_congestion_exp(tp); + /* Congestion signal before ack. */ + cc_cong_signal(tp, th, CC_NDUPACK); + cc_ack_received(tp, th, CC_DUPACK); tcp_timer_activate(tp, TT_REXMT, 0); tp->t_rtttime = 0; if (tp->t_flags & TF_SACK_PERMIT) { @@ -2226,6 +2401,7 @@ tcp_do_segment(struct mbuf *m, struct tc tp->snd_nxt = onxt; goto drop; } else if (V_tcp_do_rfc3042) { + cc_ack_received(tp, th, CC_DUPACK); u_long oldcwnd = tp->snd_cwnd; tcp_seq oldsndmax = tp->snd_max; u_int sent; @@ -2267,37 +2443,14 @@ tcp_do_segment(struct mbuf *m, struct tc * If the congestion window was inflated to account * for the other side's cached packets, retract it. */ - if (V_tcp_do_newreno || (tp->t_flags & TF_SACK_PERMIT)) { - if (IN_FASTRECOVERY(tp)) { - if (SEQ_LT(th->th_ack, tp->snd_recover)) { - if (tp->t_flags & TF_SACK_PERMIT) - tcp_sack_partialack(tp, th); - else - tcp_newreno_partial_ack(tp, th); - } else { - /* - * Out of fast recovery. - * Window inflation should have left us - * with approximately snd_ssthresh - * outstanding data. - * But in case we would be inclined to - * send a burst, better to do it via - * the slow start mechanism. - */ - if (SEQ_GT(th->th_ack + - tp->snd_ssthresh, - tp->snd_max)) - tp->snd_cwnd = tp->snd_max - - th->th_ack + - tp->t_maxseg; - else - tp->snd_cwnd = tp->snd_ssthresh; - } - } - } else { - if (tp->t_dupacks >= tcprexmtthresh && - tp->snd_cwnd > tp->snd_ssthresh) - tp->snd_cwnd = tp->snd_ssthresh; + if (IN_FASTRECOVERY(tp->t_flags)) { + if (SEQ_LT(th->th_ack, tp->snd_recover)) { + if (tp->t_flags & TF_SACK_PERMIT) + tcp_sack_partialack(tp, th); + else + tcp_newreno_partial_ack(tp, th); + } else + cc_post_recovery(tp, th); } tp->t_dupacks = 0; /* @@ -2328,7 +2481,7 @@ process_ACK: ("tcp_input: process_ACK ti_locked %d", ti_locked)); INP_WLOCK_ASSERT(tp->t_inpcb); - acked = th->th_ack - tp->snd_una; + acked = BYTES_THIS_ACK(tp, th); TCPSTAT_INC(tcps_rcvackpack); TCPSTAT_ADD(tcps_rcvackbyte, acked); @@ -2339,16 +2492,8 @@ process_ACK: * original cwnd and ssthresh, and proceed to transmit where * we left off. */ - if (tp->t_rxtshift == 1 && (int)(ticks - tp->t_badrxtwin) < 0) { - TCPSTAT_INC(tcps_sndrexmitbad); - tp->snd_cwnd = tp->snd_cwnd_prev; - tp->snd_ssthresh = tp->snd_ssthresh_prev; - tp->snd_recover = tp->snd_recover_prev; - if (tp->t_flags & TF_WASFRECOVERY) - ENTER_FASTRECOVERY(tp); - tp->snd_nxt = tp->snd_max; - tp->t_badrxtwin = 0; /* XXX probably not required */ - } + if (tp->t_rxtshift == 1 && (int)(ticks - tp->t_badrxtwin) < 0) + cc_cong_signal(tp, th, CC_RTO_ERR); /* * If we have a timestamp reply, update smoothed @@ -2396,61 +2541,12 @@ process_ACK: goto step6; /* - * When new data is acked, open the congestion window. - * Method depends on which congestion control state we're - * in (slow start or cong avoid) and if ABC (RFC 3465) is - * enabled. - * - * slow start: cwnd <= ssthresh - * cong avoid: cwnd > ssthresh - * - * slow start and ABC (RFC 3465): - * Grow cwnd exponentially by the amount of data - * ACKed capping the max increment per ACK to - * (abc_l_var * maxseg) bytes. - * - * slow start without ABC (RFC 2581): - * Grow cwnd exponentially by maxseg per ACK. - * - * cong avoid and ABC (RFC 3465): - * Grow cwnd linearly by maxseg per RTT for each - * cwnd worth of ACKed data. - * - * cong avoid without ABC (RFC 2581): - * Grow cwnd linearly by approximately maxseg per RTT using - * maxseg^2 / cwnd per ACK as the increment. - * If cwnd > maxseg^2, fix the cwnd increment at 1 byte to - * avoid capping cwnd. - */ - if ((!V_tcp_do_newreno && !(tp->t_flags & TF_SACK_PERMIT)) || - !IN_FASTRECOVERY(tp)) { - u_int cw = tp->snd_cwnd; - u_int incr = tp->t_maxseg; - /* In congestion avoidance? */ - if (cw > tp->snd_ssthresh) { - if (V_tcp_do_rfc3465) { - tp->t_bytes_acked += acked; - if (tp->t_bytes_acked >= tp->snd_cwnd) - tp->t_bytes_acked -= cw; - else - incr = 0; - } - else - incr = max((incr * incr / cw), 1); - /* - * In slow-start with ABC enabled and no RTO in sight? - * (Must not use abc_l_var > 1 if slow starting after an - * RTO. On RTO, snd_nxt = snd_una, so the snd_nxt == - * snd_max check is sufficient to handle this). - */ - } else if (V_tcp_do_rfc3465 && - tp->snd_nxt == tp->snd_max) - incr = min(acked, - V_tcp_abc_l_var * tp->t_maxseg); - /* ABC is on by default, so (incr == 0) frequently. */ - if (incr > 0) - tp->snd_cwnd = min(cw+incr, TCP_MAXWIN<snd_scale); - } + * Let the congestion control algorithm update congestion + * control related information. This typically means increasing + * the congestion window. + */ + cc_ack_received(tp, th, CC_ACK); + SOCKBUF_LOCK(&so->so_snd); if (acked > so->so_snd.sb_cc) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-8@FreeBSD.ORG Sat May 28 05:04:53 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4CE3106566C; Sat, 28 May 2011 05:04:53 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B32E88FC0A; Sat, 28 May 2011 05:04: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 p4S54rrl068885; Sat, 28 May 2011 05:04:53 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4S54rTG068883; Sat, 28 May 2011 05:04:53 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201105280504.p4S54rTG068883@svn.freebsd.org> From: Lawrence Stewart Date: Sat, 28 May 2011 05:04:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222402 - in stable/8/sys/modules: . cc X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 May 2011 05:04:53 -0000 Author: lstewart Date: Sat May 28 05:04:53 2011 New Revision: 222402 URL: http://svn.freebsd.org/changeset/base/222402 Log: MFC r216109: Add build infrastructure for the forthcoming CC algorithm modules. Sponsored by: FreeBSD Foundation Submitted by: David Hayes Added: stable/8/sys/modules/cc/ - copied from r216109, head/sys/modules/cc/ Modified: stable/8/sys/modules/Makefile Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/modules/Makefile ============================================================================== --- stable/8/sys/modules/Makefile Sat May 28 04:40:35 2011 (r222401) +++ stable/8/sys/modules/Makefile Sat May 28 05:04:53 2011 (r222402) @@ -51,6 +51,7 @@ SUBDIR= ${_3dfx} \ ${_cardbus} \ cas \ ${_cbb} \ + cc \ cd9660 \ cd9660_iconv \ ${_ce} \ From owner-svn-src-stable-8@FreeBSD.ORG Sat May 28 05:17:52 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ACFBB106564A; Sat, 28 May 2011 05:17:52 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 61D608FC13; Sat, 28 May 2011 05:17:52 +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 p4S5Hqqk069324; Sat, 28 May 2011 05:17:52 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4S5HqqF069320; Sat, 28 May 2011 05:17:52 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201105280517.p4S5HqqF069320@svn.freebsd.org> From: Lawrence Stewart Date: Sat, 28 May 2011 05:17:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222403 - in stable/8/sys: modules/cc modules/cc/cc_cubic netinet/cc X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 May 2011 05:17:52 -0000 Author: lstewart Date: Sat May 28 05:17:52 2011 New Revision: 222403 URL: http://svn.freebsd.org/changeset/base/222403 Log: MFC r216114,217683: Import a clean-room implementation of the experimental CUBIC congestion control algorithm based on the Internet-Draft "draft-rhee-tcpm-cubic-02.txt". It is implemented as a kernel module compatible with the recently committed modular congestion control framework. CUBIC was designed for provide increased throughput in fast and long-distance networks. It attempts to maintain fairness when competing with legacy NewReno TCP in lower speed scenarios where NewReno is able to operate adequately. The paper "CUBIC: A New TCP-Friendly High-Speed TCP Variant" provides additional detail. In collaboration with: David Hayes and Grenville Armitage Sponsored by: FreeBSD Foundation Reviewed by: rpaulo Added: stable/8/sys/modules/cc/cc_cubic/ - copied from r216114, head/sys/modules/cc/cc_cubic/ stable/8/sys/netinet/cc/cc_cubic.c - copied, changed from r216114, head/sys/netinet/cc/cc_cubic.c stable/8/sys/netinet/cc/cc_cubic.h - copied unchanged from r216114, head/sys/netinet/cc/cc_cubic.h Modified: stable/8/sys/modules/cc/Makefile Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/modules/cc/Makefile ============================================================================== --- stable/8/sys/modules/cc/Makefile Sat May 28 05:04:53 2011 (r222402) +++ stable/8/sys/modules/cc/Makefile Sat May 28 05:17:52 2011 (r222403) @@ -1,5 +1,5 @@ # $FreeBSD$ -SUBDIR= +SUBDIR= cc_cubic .include Copied and modified: stable/8/sys/netinet/cc/cc_cubic.c (from r216114, head/sys/netinet/cc/cc_cubic.c) ============================================================================== --- head/sys/netinet/cc/cc_cubic.c Thu Dec 2 06:05:44 2010 (r216114, copy source) +++ stable/8/sys/netinet/cc/cc_cubic.c Sat May 28 05:17:52 2011 (r222403) @@ -212,7 +212,7 @@ cubic_cb_init(struct cc_var *ccv) /* Init some key variables with sensible defaults. */ cubic_data->t_last_cong = ticks; cubic_data->min_rtt_ticks = TCPTV_SRTTBASE; - cubic_data->mean_rtt_ticks = TCPTV_SRTTBASE; + cubic_data->mean_rtt_ticks = 1; ccv->cc_data = cubic_data; @@ -328,12 +328,11 @@ cubic_post_recovery(struct cc_var *ccv) cubic_data->t_last_cong = ticks; /* Calculate the average RTT between congestion epochs. */ - if (cubic_data->epoch_ack_count > 0 && cubic_data->sum_rtt_ticks > 0) + if (cubic_data->epoch_ack_count > 0 && + cubic_data->sum_rtt_ticks >= cubic_data->epoch_ack_count) { cubic_data->mean_rtt_ticks = (int)(cubic_data->sum_rtt_ticks / cubic_data->epoch_ack_count); - else - /* For safety. */ - cubic_data->mean_rtt_ticks = cubic_data->min_rtt_ticks; + } cubic_data->epoch_ack_count = 0; cubic_data->sum_rtt_ticks = 0; @@ -362,9 +361,21 @@ cubic_record_rtt(struct cc_var *ccv) * XXXLAS: Should there be some hysteresis for minrtt? */ if ((t_srtt_ticks < cubic_data->min_rtt_ticks || - cubic_data->min_rtt_ticks == TCPTV_SRTTBASE)) + cubic_data->min_rtt_ticks == TCPTV_SRTTBASE)) { cubic_data->min_rtt_ticks = max(1, t_srtt_ticks); + /* + * If the connection is within its first congestion + * epoch, ensure we prime mean_rtt_ticks with a + * reasonable value until the epoch average RTT is + * calculated in cubic_post_recovery(). + */ + if (cubic_data->min_rtt_ticks > + cubic_data->mean_rtt_ticks) + cubic_data->mean_rtt_ticks = + cubic_data->min_rtt_ticks; + } + /* Sum samples for epoch average RTT calculation. */ cubic_data->sum_rtt_ticks += t_srtt_ticks; cubic_data->epoch_ack_count++; Copied: stable/8/sys/netinet/cc/cc_cubic.h (from r216114, head/sys/netinet/cc/cc_cubic.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/netinet/cc/cc_cubic.h Sat May 28 05:17:52 2011 (r222403, copy of r216114, head/sys/netinet/cc/cc_cubic.h) @@ -0,0 +1,229 @@ +/*- + * Copyright (c) 2008-2010 Lawrence Stewart + * Copyright (c) 2010 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Lawrence Stewart while studying at the Centre + * for Advanced Internet Architectures, Swinburne University, made possible in + * part by a grant from the Cisco University Research Program Fund at Community + * Foundation Silicon Valley. + * + * Portions of this software were developed at the Centre for Advanced + * Internet Architectures, Swinburne University of Technology, Melbourne, + * Australia by David Hayes under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _NETINET_CC_CUBIC_H_ +#define _NETINET_CC_CUBIC_H_ + +/* Number of bits of precision for fixed point math calcs. */ +#define CUBIC_SHIFT 8 + +#define CUBIC_SHIFT_4 32 + +/* 0.5 << CUBIC_SHIFT. */ +#define RENO_BETA 128 + +/* ~0.8 << CUBIC_SHIFT. */ +#define CUBIC_BETA 204 + +/* ~0.2 << CUBIC_SHIFT. */ +#define ONE_SUB_CUBIC_BETA 51 + +/* 3 * ONE_SUB_CUBIC_BETA. */ +#define THREE_X_PT2 153 + +/* (2 << CUBIC_SHIFT) - ONE_SUB_CUBIC_BETA. */ +#define TWO_SUB_PT2 461 + +/* ~0.4 << CUBIC_SHIFT. */ +#define CUBIC_C_FACTOR 102 + +/* CUBIC fast convergence factor: ~0.9 << CUBIC_SHIFT. */ +#define CUBIC_FC_FACTOR 230 + +/* Don't trust s_rtt until this many rtt samples have been taken. */ +#define CUBIC_MIN_RTT_SAMPLES 8 + +/* Userland only bits. */ +#ifndef _KERNEL + +extern int hz; + +/* + * Implementation based on the formulae found in the CUBIC Internet Draft + * "draft-rhee-tcpm-cubic-02". + * + * Note BETA used in cc_cubic is equal to (1-beta) in the I-D + */ + +static __inline float +theoretical_cubic_k(double wmax_pkts) +{ + double C; + + C = 0.4; + + return (pow((wmax_pkts * 0.2) / C, (1.0 / 3.0)) * pow(2, CUBIC_SHIFT)); +} + +static __inline unsigned long +theoretical_cubic_cwnd(int ticks_since_cong, unsigned long wmax, uint32_t smss) +{ + double C, wmax_pkts; + + C = 0.4; + wmax_pkts = wmax / (double)smss; + + return (smss * (wmax_pkts + + (C * pow(ticks_since_cong / (double)hz - + theoretical_cubic_k(wmax_pkts) / pow(2, CUBIC_SHIFT), 3.0)))); +} + +static __inline unsigned long +theoretical_reno_cwnd(int ticks_since_cong, int rtt_ticks, unsigned long wmax, + uint32_t smss) +{ + + return ((wmax * 0.5) + ((ticks_since_cong / (float)rtt_ticks) * smss)); +} + +static __inline unsigned long +theoretical_tf_cwnd(int ticks_since_cong, int rtt_ticks, unsigned long wmax, + uint32_t smss) +{ + + return ((wmax * 0.8) + ((3 * 0.2) / (2 - 0.2) * + (ticks_since_cong / (float)rtt_ticks) * smss)); +} + +#endif /* !_KERNEL */ + +/* + * Compute the CUBIC K value used in the cwnd calculation, using an + * implementation of eqn 2 in the I-D. The method used + * here is adapted from Apple Computer Technical Report #KT-32. + */ +static __inline int64_t +cubic_k(unsigned long wmax_pkts) +{ + int64_t s, K; + uint16_t p; + + K = s = 0; + p = 0; + + /* (wmax * beta)/C with CUBIC_SHIFT worth of precision. */ + s = ((wmax_pkts * ONE_SUB_CUBIC_BETA) << CUBIC_SHIFT) / CUBIC_C_FACTOR; + + /* Rebase s to be between 1 and 1/8 with a shift of CUBIC_SHIFT. */ + while (s >= 256) { + s >>= 3; + p++; + } + + /* + * Some magic constants taken from the Apple TR with appropriate + * shifts: 275 == 1.072302 << CUBIC_SHIFT, 98 == 0.3812513 << + * CUBIC_SHIFT, 120 == 0.46946116 << CUBIC_SHIFT. + */ + K = (((s * 275) >> CUBIC_SHIFT) + 98) - + (((s * s * 120) >> CUBIC_SHIFT) >> CUBIC_SHIFT); + + /* Multiply by 2^p to undo the rebasing of s from above. */ + return (K <<= p); +} + +/* + * Compute the new cwnd value using an implementation of eqn 1 from the I-D. + * Thanks to Kip Macy for help debugging this function. + * + * XXXLAS: Characterise bounds for overflow. + */ +static __inline unsigned long +cubic_cwnd(int ticks_since_cong, unsigned long wmax, uint32_t smss, int64_t K) +{ + int64_t cwnd; + + /* K is in fixed point form with CUBIC_SHIFT worth of precision. */ + + /* t - K, with CUBIC_SHIFT worth of precision. */ + cwnd = ((int64_t)(ticks_since_cong << CUBIC_SHIFT) - (K * hz)) / hz; + + /* (t - K)^3, with CUBIC_SHIFT^3 worth of precision. */ + cwnd *= (cwnd * cwnd); + + /* + * C(t - K)^3 + wmax + * The down shift by CUBIC_SHIFT_4 is because cwnd has 4 lots of + * CUBIC_SHIFT included in the value. 3 from the cubing of cwnd above, + * and an extra from multiplying through by CUBIC_C_FACTOR. + */ + cwnd = ((cwnd * CUBIC_C_FACTOR * smss) >> CUBIC_SHIFT_4) + wmax; + + return ((unsigned long)cwnd); +} + +/* + * Compute an approximation of the NewReno cwnd some number of ticks after a + * congestion event. RTT should be the average RTT estimate for the path + * measured over the previous congestion epoch and wmax is the value of cwnd at + * the last congestion event. The "TCP friendly" concept in the CUBIC I-D is + * rather tricky to understand and it turns out this function is not required. + * It is left here for reference. + */ +static __inline unsigned long +reno_cwnd(int ticks_since_cong, int rtt_ticks, unsigned long wmax, + uint32_t smss) +{ + + /* + * For NewReno, beta = 0.5, therefore: W_tcp(t) = wmax*0.5 + t/RTT + * W_tcp(t) deals with cwnd/wmax in pkts, so because our cwnd is in + * bytes, we have to multiply by smss. + */ + return (((wmax * RENO_BETA) + (((ticks_since_cong * smss) + << CUBIC_SHIFT) / rtt_ticks)) >> CUBIC_SHIFT); +} + +/* + * Compute an approximation of the "TCP friendly" cwnd some number of ticks + * after a congestion event that is designed to yield the same average cwnd as + * NewReno while using CUBIC's beta of 0.8. RTT should be the average RTT + * estimate for the path measured over the previous congestion epoch and wmax is + * the value of cwnd at the last congestion event. + */ +static __inline unsigned long +tf_cwnd(int ticks_since_cong, int rtt_ticks, unsigned long wmax, + uint32_t smss) +{ + + /* Equation 4 of I-D. */ + return (((wmax * CUBIC_BETA) + (((THREE_X_PT2 * ticks_since_cong * + smss) << CUBIC_SHIFT) / TWO_SUB_PT2 / rtt_ticks)) >> CUBIC_SHIFT); +} + +#endif /* _NETINET_CC_CUBIC_H_ */ From owner-svn-src-stable-8@FreeBSD.ORG Sat May 28 05:28:00 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54AAC106564A; Sat, 28 May 2011 05:28:00 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 414198FC12; Sat, 28 May 2011 05:28:00 +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 p4S5S0Db069664; Sat, 28 May 2011 05:28:00 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4S5S0a8069661; Sat, 28 May 2011 05:28:00 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201105280528.p4S5S0a8069661@svn.freebsd.org> From: Lawrence Stewart Date: Sat, 28 May 2011 05:28:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222404 - in stable/8/sys: modules/cc modules/cc/cc_htcp netinet/cc X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 May 2011 05:28:00 -0000 Author: lstewart Date: Sat May 28 05:28:00 2011 New Revision: 222404 URL: http://svn.freebsd.org/changeset/base/222404 Log: MFC r216115: Import a clean-room implementation of the experimental H-TCP congestion control algorithm based on the Internet-Draft "draft-leith-tcp-htcp-06.txt". It is implemented as a kernel module compatible with the recently committed modular congestion control framework. H-TCP was designed to provide increased throughput in fast and long-distance networks. It attempts to maintain fairness when competing with legacy NewReno TCP in lower speed scenarios where NewReno is able to operate adequately. The paper "H-TCP: A framework for congestion control in high-speed and long-distance networks" provides additional detail. In collaboration with: David Hayes and Grenville Armitage Sponsored by: FreeBSD Foundation Reviewed by: rpaulo Added: stable/8/sys/modules/cc/cc_htcp/ - copied from r216115, head/sys/modules/cc/cc_htcp/ stable/8/sys/netinet/cc/cc_htcp.c - copied unchanged from r216115, head/sys/netinet/cc/cc_htcp.c Modified: stable/8/sys/modules/cc/Makefile Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/modules/cc/Makefile ============================================================================== --- stable/8/sys/modules/cc/Makefile Sat May 28 05:17:52 2011 (r222403) +++ stable/8/sys/modules/cc/Makefile Sat May 28 05:28:00 2011 (r222404) @@ -1,5 +1,6 @@ # $FreeBSD$ -SUBDIR= cc_cubic +SUBDIR= cc_cubic \ + cc_htcp .include Copied: stable/8/sys/netinet/cc/cc_htcp.c (from r216115, head/sys/netinet/cc/cc_htcp.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/netinet/cc/cc_htcp.c Sat May 28 05:28:00 2011 (r222404, copy of r216115, head/sys/netinet/cc/cc_htcp.c) @@ -0,0 +1,521 @@ +/*- + * Copyright (c) 2007-2008 + * Swinburne University of Technology, Melbourne, Australia + * Copyright (c) 2009-2010 Lawrence Stewart + * Copyright (c) 2010 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed at the Centre for Advanced Internet + * Architectures, Swinburne University, by Lawrence Stewart and James Healy, + * made possible in part by a grant from the Cisco University Research Program + * Fund at Community Foundation Silicon Valley. + * + * Portions of this software were developed at the Centre for Advanced + * Internet Architectures, Swinburne University of Technology, Melbourne, + * Australia by David Hayes under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * An implementation of the H-TCP congestion control algorithm for FreeBSD, + * based on the Internet Draft "draft-leith-tcp-htcp-06.txt" by Leith and + * Shorten. Originally released as part of the NewTCP research project at + * Swinburne University's Centre for Advanced Internet Architectures, Melbourne, + * Australia, which was made possible in part by a grant from the Cisco + * University Research Program Fund at Community Foundation Silicon Valley. More + * details are available at: + * http://caia.swin.edu.au/urp/newtcp/ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +#include + +/* Fixed point math shifts. */ +#define HTCP_SHIFT 8 +#define HTCP_ALPHA_INC_SHIFT 4 + +#define HTCP_INIT_ALPHA 1 +#define HTCP_DELTA_L hz /* 1 sec in ticks. */ +#define HTCP_MINBETA 128 /* 0.5 << HTCP_SHIFT. */ +#define HTCP_MAXBETA 204 /* ~0.8 << HTCP_SHIFT. */ +#define HTCP_MINROWE 26 /* ~0.1 << HTCP_SHIFT. */ +#define HTCP_MAXROWE 512 /* 2 << HTCP_SHIFT. */ + +/* RTT_ref (ms) used in the calculation of alpha if RTT scaling is enabled. */ +#define HTCP_RTT_REF 100 + +/* Don't trust SRTT until this many samples have been taken. */ +#define HTCP_MIN_RTT_SAMPLES 8 + +/* + * HTCP_CALC_ALPHA performs a fixed point math calculation to determine the + * value of alpha, based on the function defined in the HTCP spec. + * + * i.e. 1 + 10(delta - delta_l) + ((delta - delta_l) / 2) ^ 2 + * + * "diff" is passed in to the macro as "delta - delta_l" and is expected to be + * in units of ticks. + * + * The joyousnous of fixed point maths means our function implementation looks a + * little funky... + * + * In order to maintain some precision in the calculations, a fixed point shift + * HTCP_ALPHA_INC_SHIFT is used to ensure the integer divisions don't + * truncate the results too badly. + * + * The "16" value is the "1" term in the alpha function shifted up by + * HTCP_ALPHA_INC_SHIFT + * + * The "160" value is the "10" multiplier in the alpha function multiplied by + * 2^HTCP_ALPHA_INC_SHIFT + * + * Specifying these as constants reduces the computations required. After + * up-shifting all the terms in the function and performing the required + * calculations, we down-shift the final result by HTCP_ALPHA_INC_SHIFT to + * ensure it is back in the correct range. + * + * The "hz" terms are required as kernels can be configured to run with + * different tick timers, which we have to adjust for in the alpha calculation + * (which originally was defined in terms of seconds). + * + * We also have to be careful to constrain the value of diff such that it won't + * overflow whilst performing the calculation. The middle term i.e. (160 * diff) + * / hz is the limiting factor in the calculation. We must constrain diff to be + * less than the max size of an int divided by the constant 160 figure + * i.e. diff < INT_MAX / 160 + * + * NB: Changing HTCP_ALPHA_INC_SHIFT will require you to MANUALLY update the + * constants used in this function! + */ +#define HTCP_CALC_ALPHA(diff) \ +((\ + (16) + \ + ((160 * (diff)) / hz) + \ + (((diff) / hz) * (((diff) << HTCP_ALPHA_INC_SHIFT) / (4 * hz))) \ +) >> HTCP_ALPHA_INC_SHIFT) + +static void htcp_ack_received(struct cc_var *ccv, uint16_t type); +static void htcp_cb_destroy(struct cc_var *ccv); +static int htcp_cb_init(struct cc_var *ccv); +static void htcp_cong_signal(struct cc_var *ccv, uint32_t type); +static int htcp_mod_init(void); +static void htcp_post_recovery(struct cc_var *ccv); +static void htcp_recalc_alpha(struct cc_var *ccv); +static void htcp_recalc_beta(struct cc_var *ccv); +static void htcp_record_rtt(struct cc_var *ccv); +static void htcp_ssthresh_update(struct cc_var *ccv); + +struct htcp { + /* cwnd before entering cong recovery. */ + unsigned long prev_cwnd; + /* cwnd additive increase parameter. */ + int alpha; + /* cwnd multiplicative decrease parameter. */ + int beta; + /* Largest rtt seen for the flow. */ + int maxrtt; + /* Shortest rtt seen for the flow. */ + int minrtt; + /* Time of last congestion event in ticks. */ + int t_last_cong; +}; + +static int htcp_rtt_ref; +/* + * The maximum number of ticks the value of diff can reach in + * htcp_recalc_alpha() before alpha will stop increasing due to overflow. + * See comment above HTCP_CALC_ALPHA for more info. + */ +static int htcp_max_diff = INT_MAX / ((1 << HTCP_ALPHA_INC_SHIFT) * 10); + +/* Per-netstack vars. */ +static VNET_DEFINE(uint8_t, htcp_adaptive_backoff) = 0; +static VNET_DEFINE(uint8_t, htcp_rtt_scaling) = 0; +#define V_htcp_adaptive_backoff VNET(htcp_adaptive_backoff) +#define V_htcp_rtt_scaling VNET(htcp_rtt_scaling) + +MALLOC_DECLARE(M_HTCP); +MALLOC_DEFINE(M_HTCP, "htcp data", + "Per connection data required for the HTCP congestion control algorithm"); + +struct cc_algo htcp_cc_algo = { + .name = "htcp", + .ack_received = htcp_ack_received, + .cb_destroy = htcp_cb_destroy, + .cb_init = htcp_cb_init, + .cong_signal = htcp_cong_signal, + .mod_init = htcp_mod_init, + .post_recovery = htcp_post_recovery, +}; + +static void +htcp_ack_received(struct cc_var *ccv, uint16_t type) +{ + struct htcp *htcp_data; + + htcp_data = ccv->cc_data; + htcp_record_rtt(ccv); + + /* + * Regular ACK and we're not in cong/fast recovery and we're cwnd + * limited and we're either not doing ABC or are slow starting or are + * doing ABC and we've sent a cwnd's worth of bytes. + */ + if (type == CC_ACK && !IN_RECOVERY(CCV(ccv, t_flags)) && + (ccv->flags & CCF_CWND_LIMITED) && (!V_tcp_do_rfc3465 || + CCV(ccv, snd_cwnd) <= CCV(ccv, snd_ssthresh) || + (V_tcp_do_rfc3465 && ccv->flags & CCF_ABC_SENTAWND))) { + htcp_recalc_beta(ccv); + htcp_recalc_alpha(ccv); + /* + * Use the logic in NewReno ack_received() for slow start and + * for the first HTCP_DELTA_L ticks after either the flow starts + * or a congestion event (when alpha equals 1). + */ + if (htcp_data->alpha == 1 || + CCV(ccv, snd_cwnd) <= CCV(ccv, snd_ssthresh)) + newreno_cc_algo.ack_received(ccv, type); + else { + if (V_tcp_do_rfc3465) { + /* Increment cwnd by alpha segments. */ + CCV(ccv, snd_cwnd) += htcp_data->alpha * + CCV(ccv, t_maxseg); + ccv->flags &= ~CCF_ABC_SENTAWND; + } else + /* + * Increment cwnd by alpha/cwnd segments to + * approximate an increase of alpha segments + * per RTT. + */ + CCV(ccv, snd_cwnd) += (((htcp_data->alpha << + HTCP_SHIFT) / (CCV(ccv, snd_cwnd) / + CCV(ccv, t_maxseg))) * CCV(ccv, t_maxseg)) + >> HTCP_SHIFT; + } + } +} + +static void +htcp_cb_destroy(struct cc_var *ccv) +{ + + if (ccv->cc_data != NULL) + free(ccv->cc_data, M_HTCP); +} + +static int +htcp_cb_init(struct cc_var *ccv) +{ + struct htcp *htcp_data; + + htcp_data = malloc(sizeof(struct htcp), M_HTCP, M_NOWAIT); + + if (htcp_data == NULL) + return (ENOMEM); + + /* Init some key variables with sensible defaults. */ + htcp_data->alpha = HTCP_INIT_ALPHA; + htcp_data->beta = HTCP_MINBETA; + htcp_data->maxrtt = TCPTV_SRTTBASE; + htcp_data->minrtt = TCPTV_SRTTBASE; + htcp_data->prev_cwnd = 0; + htcp_data->t_last_cong = ticks; + + ccv->cc_data = htcp_data; + + return (0); +} + +/* + * Perform any necessary tasks before we enter congestion recovery. + */ +static void +htcp_cong_signal(struct cc_var *ccv, uint32_t type) +{ + struct htcp *htcp_data; + + htcp_data = ccv->cc_data; + + switch (type) { + case CC_NDUPACK: + if (!IN_FASTRECOVERY(CCV(ccv, t_flags))) { + if (!IN_CONGRECOVERY(CCV(ccv, t_flags))) { + /* + * Apply hysteresis to maxrtt to ensure + * reductions in the RTT are reflected in our + * measurements. + */ + htcp_data->maxrtt = (htcp_data->minrtt + + (htcp_data->maxrtt - htcp_data->minrtt) * + 95) / 100; + htcp_ssthresh_update(ccv); + htcp_data->t_last_cong = ticks; + htcp_data->prev_cwnd = CCV(ccv, snd_cwnd); + } + ENTER_RECOVERY(CCV(ccv, t_flags)); + } + break; + + case CC_ECN: + if (!IN_CONGRECOVERY(CCV(ccv, t_flags))) { + /* + * Apply hysteresis to maxrtt to ensure reductions in + * the RTT are reflected in our measurements. + */ + htcp_data->maxrtt = (htcp_data->minrtt + (htcp_data->maxrtt - + htcp_data->minrtt) * 95) / 100; + htcp_ssthresh_update(ccv); + CCV(ccv, snd_cwnd) = CCV(ccv, snd_ssthresh); + htcp_data->t_last_cong = ticks; + htcp_data->prev_cwnd = CCV(ccv, snd_cwnd); + ENTER_CONGRECOVERY(CCV(ccv, t_flags)); + } + break; + + case CC_RTO: + /* + * Grab the current time and record it so we know when the + * most recent congestion event was. Only record it when the + * timeout has fired more than once, as there is a reasonable + * chance the first one is a false alarm and may not indicate + * congestion. + */ + if (CCV(ccv, t_rxtshift) >= 2) + htcp_data->t_last_cong = ticks; + break; + } +} + +static int +htcp_mod_init(void) +{ + + htcp_cc_algo.after_idle = newreno_cc_algo.after_idle; + + /* + * HTCP_RTT_REF is defined in ms, and t_srtt in the tcpcb is stored in + * units of TCP_RTT_SCALE*hz. Scale HTCP_RTT_REF to be in the same units + * as t_srtt. + */ + htcp_rtt_ref = (HTCP_RTT_REF * TCP_RTT_SCALE * hz) / 1000; + + return (0); +} + +/* + * Perform any necessary tasks before we exit congestion recovery. + */ +static void +htcp_post_recovery(struct cc_var *ccv) +{ + struct htcp *htcp_data; + + htcp_data = ccv->cc_data; + + if (IN_FASTRECOVERY(CCV(ccv, t_flags))) { + /* + * If inflight data is less than ssthresh, set cwnd + * conservatively to avoid a burst of data, as suggested in the + * NewReno RFC. Otherwise, use the HTCP method. + * + * XXXLAS: Find a way to do this without needing curack + */ + if (SEQ_GT(ccv->curack + CCV(ccv, snd_ssthresh), + CCV(ccv, snd_max))) + CCV(ccv, snd_cwnd) = CCV(ccv, snd_max) - ccv->curack + + CCV(ccv, t_maxseg); + else + CCV(ccv, snd_cwnd) = max(1, ((htcp_data->beta * + htcp_data->prev_cwnd / CCV(ccv, t_maxseg)) + >> HTCP_SHIFT)) * CCV(ccv, t_maxseg); + } +} + +static void +htcp_recalc_alpha(struct cc_var *ccv) +{ + struct htcp *htcp_data; + int alpha, diff, now; + + htcp_data = ccv->cc_data; + now = ticks; + + /* + * If ticks has wrapped around (will happen approximately once every 49 + * days on a machine with the default kern.hz=1000) and a flow straddles + * the wrap point, our alpha calcs will be completely wrong. We cut our + * losses and restart alpha from scratch by setting t_last_cong = now - + * HTCP_DELTA_L. + * + * This does not deflate our cwnd at all. It simply slows the rate cwnd + * is growing by until alpha regains the value it held prior to taking + * this drastic measure. + */ + if (now < htcp_data->t_last_cong) + htcp_data->t_last_cong = now - HTCP_DELTA_L; + + diff = now - htcp_data->t_last_cong - HTCP_DELTA_L; + + /* Cap alpha if the value of diff would overflow HTCP_CALC_ALPHA(). */ + if (diff < htcp_max_diff) { + /* + * If it has been more than HTCP_DELTA_L ticks since congestion, + * increase alpha according to the function defined in the spec. + */ + if (diff > 0) { + alpha = HTCP_CALC_ALPHA(diff); + + /* + * Adaptive backoff fairness adjustment: + * 2 * (1 - beta) * alpha_raw + */ + if (V_htcp_adaptive_backoff) + alpha = max(1, (2 * ((1 << HTCP_SHIFT) - + htcp_data->beta) * alpha) >> HTCP_SHIFT); + + /* + * RTT scaling: (RTT / RTT_ref) * alpha + * alpha will be the raw value from HTCP_CALC_ALPHA() if + * adaptive backoff is off, or the adjusted value if + * adaptive backoff is on. + */ + if (V_htcp_rtt_scaling) + alpha = max(1, (min(max(HTCP_MINROWE, + (CCV(ccv, t_srtt) << HTCP_SHIFT) / + htcp_rtt_ref), HTCP_MAXROWE) * alpha) + >> HTCP_SHIFT); + + } else + alpha = 1; + + htcp_data->alpha = alpha; + } +} + +static void +htcp_recalc_beta(struct cc_var *ccv) +{ + struct htcp *htcp_data; + + htcp_data = ccv->cc_data; + + /* + * TCPTV_SRTTBASE is the initialised value of each connection's SRTT, so + * we only calc beta if the connection's SRTT has been changed from its + * inital value. beta is bounded to ensure it is always between + * HTCP_MINBETA and HTCP_MAXBETA. + */ + if (V_htcp_adaptive_backoff && htcp_data->minrtt != TCPTV_SRTTBASE && + htcp_data->maxrtt != TCPTV_SRTTBASE) + htcp_data->beta = min(max(HTCP_MINBETA, + (htcp_data->minrtt << HTCP_SHIFT) / htcp_data->maxrtt), + HTCP_MAXBETA); + else + htcp_data->beta = HTCP_MINBETA; +} + +/* + * Record the minimum and maximum RTT seen for the connection. These are used in + * the calculation of beta if adaptive backoff is enabled. + */ +static void +htcp_record_rtt(struct cc_var *ccv) +{ + struct htcp *htcp_data; + + htcp_data = ccv->cc_data; + + /* XXXLAS: Should there be some hysteresis for minrtt? */ + + /* + * Record the current SRTT as our minrtt if it's the smallest we've seen + * or minrtt is currently equal to its initialised value. Ignore SRTT + * until a min number of samples have been taken. + */ + if ((CCV(ccv, t_srtt) < htcp_data->minrtt || + htcp_data->minrtt == TCPTV_SRTTBASE) && + (CCV(ccv, t_rttupdated) >= HTCP_MIN_RTT_SAMPLES)) + htcp_data->minrtt = CCV(ccv, t_srtt); + + /* + * Record the current SRTT as our maxrtt if it's the largest we've + * seen. Ignore SRTT until a min number of samples have been taken. + */ + if (CCV(ccv, t_srtt) > htcp_data->maxrtt + && CCV(ccv, t_rttupdated) >= HTCP_MIN_RTT_SAMPLES) + htcp_data->maxrtt = CCV(ccv, t_srtt); +} + +/* + * Update the ssthresh in the event of congestion. + */ +static void +htcp_ssthresh_update(struct cc_var *ccv) +{ + struct htcp *htcp_data; + + htcp_data = ccv->cc_data; + + /* + * On the first congestion event, set ssthresh to cwnd * 0.5, on + * subsequent congestion events, set it to cwnd * beta. + */ + if (CCV(ccv, snd_ssthresh) == TCP_MAXWIN << TCP_MAX_WINSHIFT) + CCV(ccv, snd_ssthresh) = (CCV(ccv, snd_cwnd) * HTCP_MINBETA) + >> HTCP_SHIFT; + else { + htcp_recalc_beta(ccv); + CCV(ccv, snd_ssthresh) = (CCV(ccv, snd_cwnd) * htcp_data->beta) + >> HTCP_SHIFT; + } +} + + +SYSCTL_DECL(_net_inet_tcp_cc_htcp); +SYSCTL_NODE(_net_inet_tcp_cc, OID_AUTO, htcp, CTLFLAG_RW, + NULL, "H-TCP related settings"); +SYSCTL_VNET_UINT(_net_inet_tcp_cc_htcp, OID_AUTO, adaptive_backoff, CTLFLAG_RW, + &VNET_NAME(htcp_adaptive_backoff), 0, "enable H-TCP adaptive backoff"); +SYSCTL_VNET_UINT(_net_inet_tcp_cc_htcp, OID_AUTO, rtt_scaling, CTLFLAG_RW, + &VNET_NAME(htcp_rtt_scaling), 0, "enable H-TCP RTT scaling"); + +DECLARE_CC_MODULE(htcp, &htcp_cc_algo); From owner-svn-src-stable-8@FreeBSD.ORG Sat May 28 06:56:10 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F3B1106564A; Sat, 28 May 2011 06:56:10 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4CBE48FC12; Sat, 28 May 2011 06:56:10 +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 p4S6uAgt072338; Sat, 28 May 2011 06:56:10 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4S6uAv3072329; Sat, 28 May 2011 06:56:10 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201105280656.p4S6uAv3072329@svn.freebsd.org> From: Lawrence Stewart Date: Sat, 28 May 2011 06:56:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222406 - in stable/8/sys: conf kern sys X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 May 2011 06:56:10 -0000 Author: lstewart Date: Sat May 28 06:56:09 2011 New Revision: 222406 URL: http://svn.freebsd.org/changeset/base/222406 Log: MFC r216615,217248,217250: - Introduce the Hhook (Helper Hook) KPI. The KPI is closely modelled on pfil(9), and in many respects can be thought of as a more generic superset of pfil. Hhook provides a way for kernel subsystems to export hook points that Khelp modules can hook to provide enhanced or new functionality to the kernel. The KPI has been designed to ensure hook points pose no noticeable overhead when no hook functions are registered. - Introduce the Khelp (Kernel Helpers) KPI. Khelp provides a framework for managing Khelp modules, which indirectly use the Hhook KPI to register their hook functions with hook points of interest within the kernel. Khelp modules aim to provide a structured way to dynamically extend the kernel at runtime in an ABI preserving manner. Depending on the subsystem providing hook points, a Khelp module may be able to associate per-object data for maintaining relevant state between hook calls. - pjd's Object Specific Data (OSD) KPI is used to manage the per-object data allocated to Khelp modules. Create a new "OSD_KHELP" OSD type for use by the Khelp framework. - Bump __FreeBSD_version to 802505 to mark the introduction of the new KPIs. In collaboration with: David Hayes and Grenville Armitage Sponsored by: FreeBSD Foundation Reviewed by: bz, others along the way Added: stable/8/sys/kern/kern_hhook.c - copied, changed from r216615, head/sys/kern/kern_hhook.c stable/8/sys/kern/kern_khelp.c - copied unchanged from r216615, head/sys/kern/kern_khelp.c stable/8/sys/sys/hhook.h - copied unchanged from r216615, head/sys/sys/hhook.h stable/8/sys/sys/khelp.h - copied unchanged from r216615, head/sys/sys/khelp.h stable/8/sys/sys/module_khelp.h - copied unchanged from r216615, head/sys/sys/module_khelp.h Modified: stable/8/sys/conf/files stable/8/sys/sys/osd.h stable/8/sys/sys/param.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/conf/files ============================================================================== --- stable/8/sys/conf/files Sat May 28 05:40:19 2011 (r222405) +++ stable/8/sys/conf/files Sat May 28 06:56:09 2011 (r222406) @@ -2101,9 +2101,11 @@ kern/kern_exec.c standard kern/kern_exit.c standard kern/kern_fail.c standard kern/kern_fork.c standard +kern/kern_hhook.c standard kern/kern_idle.c standard kern/kern_intr.c standard kern/kern_jail.c standard +kern/kern_khelp.c standard kern/kern_kthread.c standard kern/kern_ktr.c optional ktr kern/kern_ktrace.c standard Copied and modified: stable/8/sys/kern/kern_hhook.c (from r216615, head/sys/kern/kern_hhook.c) ============================================================================== --- head/sys/kern/kern_hhook.c Tue Dec 21 13:45:29 2010 (r216615, copy source) +++ stable/8/sys/kern/kern_hhook.c Sat May 28 06:56:09 2011 (r222406) @@ -156,8 +156,7 @@ hhook_add_hook(struct hhook_head *hhh, s if (!error) { STAILQ_INSERT_TAIL(&hhh->hhh_hooks, hhk, hhk_next); hhh->hhh_nhooks++; - } - else + } else free(hhk, M_HHOOK); HHH_WUNLOCK(hhh); @@ -332,7 +331,6 @@ hhook_head_deregister_lookup(int32_t hho struct hhook_head *hhh; int error; - error = 0; hhh = hhook_head_get(hhook_type, hhook_id); error = hhook_head_deregister(hhh); @@ -356,13 +354,12 @@ hhook_head_get(int32_t hhook_type, int32 LIST_FOREACH(hhh, &V_hhook_head_list, hhh_next) { if (hhh->hhh_type == hhook_type && hhh->hhh_id == hhook_id) { refcount_acquire(&hhh->hhh_refcount); - HHHLIST_UNLOCK(); - return (hhh); + break; } } HHHLIST_UNLOCK(); - return (NULL); + return (hhh); } void @@ -383,11 +380,12 @@ hhook_head_is_virtualised(struct hhook_h { uint32_t ret; - if (hhh == NULL) - return (0); + ret = 0; - if (hhh->hhh_flags & HHH_ISINVNET) - ret = HHOOK_HEADISINVNET; + if (hhh != NULL) { + if (hhh->hhh_flags & HHH_ISINVNET) + ret = HHOOK_HEADISINVNET; + } return (ret); } Copied: stable/8/sys/kern/kern_khelp.c (from r216615, head/sys/kern/kern_khelp.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/kern/kern_khelp.c Sat May 28 06:56:09 2011 (r222406, copy of r216615, head/sys/kern/kern_khelp.c) @@ -0,0 +1,471 @@ +/*- + * Copyright (c) 2010 Lawrence Stewart + * Copyright (c) 2010 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Lawrence Stewart while studying at the Centre + * for Advanced Internet Architectures, Swinburne University, made possible in + * part by grants from the FreeBSD Foundation and Cisco University Research + * Program Fund at Community Foundation Silicon Valley. + * + * Portions of this software were developed at the Centre for Advanced + * Internet Architectures, Swinburne University of Technology, Melbourne, + * Australia by Lawrence Stewart under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +static struct rwlock khelp_list_lock; +RW_SYSINIT(khelplistlock, &khelp_list_lock, "helper list lock"); + +static TAILQ_HEAD(helper_head, helper) helpers = TAILQ_HEAD_INITIALIZER(helpers); + +/* Private function prototypes. */ +static inline void khelp_remove_osd(struct helper *h, struct osd *hosd); + +#define KHELP_LIST_WLOCK() rw_wlock(&khelp_list_lock) +#define KHELP_LIST_WUNLOCK() rw_wunlock(&khelp_list_lock) +#define KHELP_LIST_RLOCK() rw_rlock(&khelp_list_lock) +#define KHELP_LIST_RUNLOCK() rw_runlock(&khelp_list_lock) +#define KHELP_LIST_LOCK_ASSERT() rw_assert(&khelp_list_lock, RA_LOCKED) + +int +khelp_register_helper(struct helper *h) +{ + struct helper *tmph; + int error, i, inserted; + + error = 0; + inserted = 0; + refcount_init(&h->h_refcount, 0); + h->h_id = osd_register(OSD_KHELP, NULL, NULL); + + /* It's only safe to add the hooks after osd_register(). */ + if (h->h_nhooks > 0) { + for (i = 0; i < h->h_nhooks && !error; i++) { + /* We don't require the module to assign hook_helper. */ + h->h_hooks[i].hook_helper = h; + error = khelp_add_hhook(&h->h_hooks[i], HHOOK_NOWAIT); + } + + if (error) { + for (i--; i >= 0; i--) + khelp_remove_hhook(&h->h_hooks[i]); + + osd_deregister(OSD_KHELP, h->h_id); + } + } + + if (!error) { + KHELP_LIST_WLOCK(); + /* + * Keep list of helpers sorted in descending h_id order. Due to + * the way osd_set() works, a sorted list ensures + * init_helper_osd() will operate with improved efficiency. + */ + TAILQ_FOREACH(tmph, &helpers, h_next) { + if (tmph->h_id < h->h_id) { + TAILQ_INSERT_BEFORE(tmph, h, h_next); + inserted = 1; + break; + } + } + + if (!inserted) + TAILQ_INSERT_TAIL(&helpers, h, h_next); + KHELP_LIST_WUNLOCK(); + } + + return (error); +} + +int +khelp_deregister_helper(struct helper *h) +{ + struct helper *tmph; + int error, i; + + error = 0; + + KHELP_LIST_WLOCK(); + if (h->h_refcount > 0) + error = EBUSY; + else { + error = ENOENT; + TAILQ_FOREACH(tmph, &helpers, h_next) { + if (tmph == h) { + TAILQ_REMOVE(&helpers, h, h_next); + error = 0; + break; + } + } + } + KHELP_LIST_WUNLOCK(); + + if (!error) { + if (h->h_nhooks > 0) { + for (i = 0; i < h->h_nhooks; i++) + khelp_remove_hhook(&h->h_hooks[i]); + } + osd_deregister(OSD_KHELP, h->h_id); + } + + return (error); +} + +int +khelp_init_osd(uint32_t classes, struct osd *hosd) +{ + struct helper *h; + void *hdata; + int error; + + KASSERT(hosd != NULL, ("struct osd not initialised!")); + + error = 0; + + KHELP_LIST_RLOCK(); + TAILQ_FOREACH(h, &helpers, h_next) { + /* If helper is correct class and needs to store OSD... */ + if (h->h_classes & classes && h->h_flags & HELPER_NEEDS_OSD) { + hdata = uma_zalloc(h->h_zone, M_NOWAIT); + if (hdata == NULL) { + error = ENOMEM; + break; + } + osd_set(OSD_KHELP, hosd, h->h_id, hdata); + refcount_acquire(&h->h_refcount); + } + } + + if (error) { + /* Delete OSD that was assigned prior to the error. */ + TAILQ_FOREACH(h, &helpers, h_next) { + if (h->h_classes & classes) + khelp_remove_osd(h, hosd); + } + } + KHELP_LIST_RUNLOCK(); + + return (error); +} + +int +khelp_destroy_osd(struct osd *hosd) +{ + struct helper *h; + int error; + + KASSERT(hosd != NULL, ("struct osd not initialised!")); + + error = 0; + + KHELP_LIST_RLOCK(); + /* + * Clean up all khelp related OSD. + * + * XXXLAS: Would be nice to use something like osd_exit() here but it + * doesn't have the right semantics for this purpose. + */ + TAILQ_FOREACH(h, &helpers, h_next) + khelp_remove_osd(h, hosd); + KHELP_LIST_RUNLOCK(); + + return (error); +} + +static inline void +khelp_remove_osd(struct helper *h, struct osd *hosd) +{ + void *hdata; + + if (h->h_flags & HELPER_NEEDS_OSD) { + /* + * If the current helper uses OSD and calling osd_get() + * on the helper's h_id returns non-NULL, the helper has + * OSD attached to 'hosd' which needs to be cleaned up. + */ + hdata = osd_get(OSD_KHELP, hosd, h->h_id); + if (hdata != NULL) { + uma_zfree(h->h_zone, hdata); + osd_del(OSD_KHELP, hosd, h->h_id); + refcount_release(&h->h_refcount); + } + } +} + +void * +khelp_get_osd(struct osd *hosd, int32_t id) +{ + + return (osd_get(OSD_KHELP, hosd, id)); +} + +int32_t +khelp_get_id(char *hname) +{ + struct helper *h; + int32_t id; + + id = -1; + + KHELP_LIST_RLOCK(); + TAILQ_FOREACH(h, &helpers, h_next) { + if (strncmp(h->h_name, hname, HELPER_NAME_MAXLEN) == 0) { + id = h->h_id; + break; + } + } + KHELP_LIST_RUNLOCK(); + + return (id); +} + +int +khelp_add_hhook(struct hookinfo *hki, uint32_t flags) +{ + VNET_ITERATOR_DECL(vnet_iter); + int error; + + error = 0; + + /* + * XXXLAS: If a helper is dynamically adding a helper hook function at + * runtime using this function, we should update the helper's h_hooks + * struct member to include the additional hookinfo struct. + */ + + VNET_LIST_RLOCK_NOSLEEP(); + VNET_FOREACH(vnet_iter) { + CURVNET_SET(vnet_iter); + error = hhook_add_hook_lookup(hki, flags); + CURVNET_RESTORE(); +#ifdef VIMAGE + if (error) + break; +#endif + } + VNET_LIST_RUNLOCK_NOSLEEP(); + + return (error); +} + +int +khelp_remove_hhook(struct hookinfo *hki) +{ + VNET_ITERATOR_DECL(vnet_iter); + int error; + + error = 0; + + /* + * XXXLAS: If a helper is dynamically removing a helper hook function at + * runtime using this function, we should update the helper's h_hooks + * struct member to remove the defunct hookinfo struct. + */ + + VNET_LIST_RLOCK_NOSLEEP(); + VNET_FOREACH(vnet_iter) { + CURVNET_SET(vnet_iter); + error = hhook_remove_hook_lookup(hki); + CURVNET_RESTORE(); +#ifdef VIMAGE + if (error) + break; +#endif + } + VNET_LIST_RUNLOCK_NOSLEEP(); + + return (error); +} + +int +khelp_modevent(module_t mod, int event_type, void *data) +{ + struct khelp_modevent_data *kmd; + int error; + + kmd = (struct khelp_modevent_data *)data; + error = 0; + + switch(event_type) { + case MOD_LOAD: + if (kmd->helper->h_flags & HELPER_NEEDS_OSD) { + if (kmd->uma_zsize <= 0) { + printf("Use KHELP_DECLARE_MOD_UMA() instead!\n"); + error = EDOOFUS; + break; + } + kmd->helper->h_zone = uma_zcreate(kmd->name, + kmd->uma_zsize, kmd->umactor, kmd->umadtor, NULL, + NULL, 0, 0); + if (kmd->helper->h_zone == NULL) { + error = ENOMEM; + break; + } + } + strlcpy(kmd->helper->h_name, kmd->name, HELPER_NAME_MAXLEN); + kmd->helper->h_hooks = kmd->hooks; + kmd->helper->h_nhooks = kmd->nhooks; + if (kmd->helper->mod_init != NULL) + error = kmd->helper->mod_init(); + if (!error) + error = khelp_register_helper(kmd->helper); + break; + + case MOD_QUIESCE: + case MOD_SHUTDOWN: + case MOD_UNLOAD: + error = khelp_deregister_helper(kmd->helper); + if (!error) { + if (kmd->helper->h_flags & HELPER_NEEDS_OSD) + uma_zdestroy(kmd->helper->h_zone); + if (kmd->helper->mod_destroy != NULL) + kmd->helper->mod_destroy(); + } else if (error == ENOENT) + /* Do nothing and allow unload if helper not in list. */ + error = 0; + else if (error == EBUSY) + printf("Khelp module \"%s\" can't unload until its " + "refcount drops from %d to 0.\n", kmd->name, + kmd->helper->h_refcount); + break; + + default: + error = EINVAL; + break; + } + + return (error); +} + +/* + * This function is called in two separate situations: + * + * - When the kernel is booting, it is called directly by the SYSINIT framework + * to allow Khelp modules which were compiled into the kernel or loaded by the + * boot loader to insert their non-virtualised hook functions into the kernel. + * + * - When the kernel is booting or a vnet is created, this function is also + * called indirectly through khelp_vnet_init() by the vnet initialisation code. + * In this situation, Khelp modules are able to insert their virtualised hook + * functions into the virtualised hook points in the vnet which is being + * initialised. In the case where the kernel is not compiled with "options + * VIMAGE", this step is still run once at boot, but the hook functions get + * transparently inserted into the standard unvirtualised network stack. + */ +static void +khelp_init(const void *vnet) +{ + struct helper *h; + int error, i, vinit; + int32_t htype, hid; + + error = 0; + vinit = vnet != NULL; + + KHELP_LIST_RLOCK(); + TAILQ_FOREACH(h, &helpers, h_next) { + for (i = 0; i < h->h_nhooks && !error; i++) { + htype = h->h_hooks[i].hook_type; + hid = h->h_hooks[i].hook_id; + + /* + * If we're doing a virtualised init (vinit != 0) and + * the hook point is virtualised, or we're doing a plain + * sysinit at boot and the hook point is not + * virtualised, insert the hook. + */ + if ((hhook_head_is_virtualised_lookup(htype, hid) == + HHOOK_HEADISINVNET && vinit) || + (!hhook_head_is_virtualised_lookup(htype, hid) && + !vinit)) { + error = hhook_add_hook_lookup(&h->h_hooks[i], + HHOOK_NOWAIT); + } + } + + if (error) { + /* Remove any helper's hooks we successfully added. */ + for (i--; i >= 0; i--) + hhook_remove_hook_lookup(&h->h_hooks[i]); + + printf("%s: Failed to add hooks for helper \"%s\" (%p)", + __func__, h->h_name, h); + if (vinit) + printf(" to vnet %p.\n", vnet); + else + printf(".\n"); + + error = 0; + } + } + KHELP_LIST_RUNLOCK(); +} + +/* + * Vnet created and being initialised. + */ +static void +khelp_vnet_init(const void *unused __unused) +{ + + khelp_init(TD_TO_VNET(curthread)); +} + + +/* + * As the kernel boots, allow Khelp modules which were compiled into the kernel + * or loaded by the boot loader to insert their non-virtualised hook functions + * into the kernel. + */ +SYSINIT(khelp_init, SI_SUB_PROTO_END, SI_ORDER_FIRST, khelp_init, NULL); + +/* + * When a vnet is created and being initialised, we need to insert the helper + * hook functions for all currently registered Khelp modules into the vnet's + * helper hook points. The hhook KPI provides a mechanism for subsystems which + * export helper hook points to clean up on vnet shutdown, so we don't need a + * VNET_SYSUNINIT for Khelp. + */ +VNET_SYSINIT(khelp_vnet_init, SI_SUB_PROTO_END, SI_ORDER_FIRST, + khelp_vnet_init, NULL); Copied: stable/8/sys/sys/hhook.h (from r216615, head/sys/sys/hhook.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/sys/hhook.h Sat May 28 06:56:09 2011 (r222406, copy of r216615, head/sys/sys/hhook.h) @@ -0,0 +1,156 @@ +/*- + * Copyright (c) 2010 Lawrence Stewart + * Copyright (c) 2010 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Lawrence Stewart while studying at the Centre + * for Advanced Internet Architectures, Swinburne University, made possible in + * part by grants from the FreeBSD Foundation and Cisco University Research + * Program Fund at Community Foundation Silicon Valley. + * + * Portions of this software were developed at the Centre for Advanced + * Internet Architectures, Swinburne University of Technology, Melbourne, + * Australia by Lawrence Stewart under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * 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. + * + * $FreeBSD$ + */ + +/* + * A KPI modelled on the pfil framework for instantiating helper hook points + * within the kernel for use by Khelp modules. Originally released as part of + * the NewTCP research project at Swinburne University's Centre for Advanced + * Internet Architectures, Melbourne, Australia, which was made possible in part + * by a grant from the Cisco University Research Program Fund at Community + * Foundation Silicon Valley. More details are available at: + * http://caia.swin.edu.au/urp/newtcp/ + */ + +#ifndef _SYS_HHOOK_H_ +#define _SYS_HHOOK_H_ + +/* XXXLAS: Is there a way around this? */ +#include +#include + +/* hhook_head flags. */ +#define HHH_ISINVNET 0x00000001 /* Is the hook point in a vnet? */ + +/* Flags common to all register functions. */ +#define HHOOK_WAITOK 0x00000001 /* Sleeping allowed. */ +#define HHOOK_NOWAIT 0x00000002 /* Sleeping disallowed. */ +/* Flags only relevant to hhook_head_register() and hhook_head_is_virtual(). */ +#define HHOOK_HEADISINVNET 0x00000100 /* Public proxy for HHH_ISINVNET. */ + +/* Helper hook types. */ +#define HHOOK_TYPE_TCP 1 + +struct helper; +struct osd; + +/* Signature for helper hook functions. */ +typedef int (*hhook_func_t)(int32_t hhook_type, int32_t hhook_id, void *udata, + void *ctx_data, void *hdata, struct osd *hosd); + +/* + * Information required to add/remove a helper hook function to/from a helper + * hook point. + */ +struct hookinfo { + hhook_func_t hook_func; + struct helper *hook_helper; + void *hook_udata; + int32_t hook_id; + int32_t hook_type; +}; + +/* + * Ideally this would be private but we need access to the hhh_nhooks member + * variable in order to make the HHOOKS_RUN_IF() macro low impact. + */ +struct hhook_head { + STAILQ_HEAD(hhook_list, hhook) hhh_hooks; + struct rmlock hhh_lock; + int32_t hhh_id; + int32_t hhh_nhooks; + int32_t hhh_type; + uint32_t hhh_flags; + volatile uint32_t hhh_refcount; + LIST_ENTRY(hhook_head) hhh_next; +}; + +/* Public KPI functions. */ +void hhook_run_hooks(struct hhook_head *hhh, void *ctx_data, struct osd *hosd); + +int hhook_add_hook(struct hhook_head *hhh, struct hookinfo *hki, + uint32_t flags); + +int hhook_add_hook_lookup(struct hookinfo *hki, uint32_t flags); + +int hhook_remove_hook(struct hhook_head *hhh, struct hookinfo *hki); + +int hhook_remove_hook_lookup(struct hookinfo *hki); + +int hhook_head_register(int32_t hhook_type, int32_t hhook_id, + struct hhook_head **hhh, uint32_t flags); + +int hhook_head_deregister(struct hhook_head *hhh); + +int hhook_head_deregister_lookup(int32_t hhook_type, int32_t hhook_id); + +struct hhook_head * hhook_head_get(int32_t hhook_type, int32_t hhook_id); + +void hhook_head_release(struct hhook_head *hhh); + +uint32_t hhook_head_is_virtualised(struct hhook_head *hhh); + +uint32_t hhook_head_is_virtualised_lookup(int32_t hook_type, int32_t hook_id); + +/* + * A wrapper around hhook_run_hooks() that only calls the function if at least + * one helper hook function is registered for the specified helper hook point. + */ +#define HHOOKS_RUN_IF(hhh, ctx_data, hosd) do { \ + if (hhh != NULL && hhh->hhh_nhooks > 0) \ + hhook_run_hooks(hhh, ctx_data, hosd); \ +} while (0) + +/* + * WARNING: This macro should only be used in code paths that execute + * infrequently, otherwise the refcounting overhead would be excessive. + * + * A similar wrapper to HHOOKS_RUN_IF() for situations where the caller prefers + * not to lookup and store the appropriate hhook_head pointer themselves. + */ +#define HHOOKS_RUN_LOOKUP_IF(hhook_type, hhook_id, ctx_data, hosd) do { \ + struct hhook_head *_hhh; \ + \ + _hhh = hhook_head_get(hhook_type, hhook_id); \ + if (_hhh != NULL) { \ + if (_hhh->hhh_nhooks > 0) \ + hhook_run_hooks(_hhh, ctx_data, hosd); \ + hhook_head_release(_hhh); \ + } \ +} while (0) + +#endif /* _SYS_HHOOK_H_ */ Copied: stable/8/sys/sys/khelp.h (from r216615, head/sys/sys/khelp.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/sys/khelp.h Sat May 28 06:56:09 2011 (r222406, copy of r216615, head/sys/sys/khelp.h) @@ -0,0 +1,76 @@ +/*- + * Copyright (c) 2010 Lawrence Stewart + * Copyright (c) 2010 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Lawrence Stewart while studying at the Centre + * for Advanced Internet Architectures, Swinburne University, made possible in + * part by grants from the FreeBSD Foundation and Cisco University Research + * Program Fund at Community Foundation Silicon Valley. + * + * Portions of this software were developed at the Centre for Advanced + * Internet Architectures, Swinburne University of Technology, Melbourne, + * Australia by Lawrence Stewart under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * 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. + * + * $FreeBSD$ + */ + +/* + * A KPI for managing kernel helper modules which perform useful functionality + * within the kernel. Originally released as part of the NewTCP research + * project at Swinburne University's Centre for Advanced Internet Architectures, + * Melbourne, Australia, which was made possible in part by a grant from the + * Cisco University Research Program Fund at Community Foundation Silicon + * Valley. More details are available at: + * http://caia.swin.edu.au/urp/newtcp/ + */ + +#ifndef _SYS_KHELP_H_ +#define _SYS_KHELP_H_ + +struct helper; +struct hookinfo; +struct osd; + +/* Helper classes. */ +#define HELPER_CLASS_TCP 0x00000001 + +/* Public KPI functions. */ +int khelp_register_helper(struct helper *h); + +int khelp_deregister_helper(struct helper *h); + +int khelp_init_osd(uint32_t classes, struct osd *hosd); + +int khelp_destroy_osd(struct osd *hosd); + +void * khelp_get_osd(struct osd *hosd, int32_t id); + +int32_t khelp_get_id(char *hname); + +int khelp_add_hhook(struct hookinfo *hki, uint32_t flags); + +int khelp_remove_hhook(struct hookinfo *hki); + +#endif /* _SYS_KHELP_H_ */ Copied: stable/8/sys/sys/module_khelp.h (from r216615, head/sys/sys/module_khelp.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/sys/module_khelp.h Sat May 28 06:56:09 2011 (r222406, copy of r216615, head/sys/sys/module_khelp.h) @@ -0,0 +1,110 @@ +/*- + * Copyright (c) 2010 Lawrence Stewart + * Copyright (c) 2010 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Lawrence Stewart while studying at the Centre + * for Advanced Internet Architectures, Swinburne University, made possible in + * part by grants from the FreeBSD Foundation and Cisco University Research + * Program Fund at Community Foundation Silicon Valley. + * + * Portions of this software were developed at the Centre for Advanced + * Internet Architectures, Swinburne University of Technology, Melbourne, + * Australia by Lawrence Stewart under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * 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. + * + * $FreeBSD$ + */ + +#ifndef _SYS_MODULE_KHELP_H_ +#define _SYS_MODULE_KHELP_H_ + +/* XXXLAS: Needed for uma related typedefs. */ +#include + +/* Helper flags. */ +#define HELPER_NEEDS_OSD 0x0001 + +struct helper { + int (*mod_init) (void); + int (*mod_destroy) (void); +#define HELPER_NAME_MAXLEN 16 + char h_name[HELPER_NAME_MAXLEN]; + uma_zone_t h_zone; + struct hookinfo *h_hooks; + uint32_t h_nhooks; + uint32_t h_classes; + int32_t h_id; + volatile uint32_t h_refcount; + uint16_t h_flags; + TAILQ_ENTRY(helper) h_next; +}; + +struct khelp_modevent_data { + char name[HELPER_NAME_MAXLEN]; + struct helper *helper; + struct hookinfo *hooks; + int nhooks; + int uma_zsize; + uma_ctor umactor; + uma_dtor umadtor; +}; + +#define KHELP_DECLARE_MOD(hname, hdata, hhooks, version) \ + static struct khelp_modevent_data kmd_##hname = { \ + .name = #hname, \ + .helper = hdata \ + .hooks = hhooks, \ + .nhooks = sizeof(hhooks) / sizeof(hhooks[0]), \ + }; \ + static moduledata_t h_##hname = { \ + .name = #hname, \ + .evhand = khelp_modevent, \ + .priv = &kmd_##hname \ + }; \ + DECLARE_MODULE(hname, h_##hname, SI_SUB_PROTO_IFATTACHDOMAIN, \ + SI_ORDER_ANY); \ + MODULE_VERSION(hname, version) + +#define KHELP_DECLARE_MOD_UMA(hname, hdata, hhooks, version, size, ctor, dtor) \ + static struct khelp_modevent_data kmd_##hname = { \ + .name = #hname, \ + .helper = hdata, \ + .hooks = hhooks, \ + .nhooks = sizeof(hhooks) / sizeof(hhooks[0]), \ + .uma_zsize = size, \ + .umactor = ctor, \ + .umadtor = dtor \ + }; \ + static moduledata_t h_##hname = { \ + .name = #hname, \ + .evhand = khelp_modevent, \ + .priv = &kmd_##hname \ + }; \ + DECLARE_MODULE(hname, h_##hname, SI_SUB_PROTO_IFATTACHDOMAIN, \ + SI_ORDER_ANY); \ + MODULE_VERSION(hname, version) + +int khelp_modevent(module_t mod, int type, void *data); + +#endif /* _SYS_MODULE_KHELP_H_ */ Modified: stable/8/sys/sys/osd.h ============================================================================== --- stable/8/sys/sys/osd.h Sat May 28 05:40:19 2011 (r222405) +++ stable/8/sys/sys/osd.h Sat May 28 06:56:09 2011 (r222406) @@ -46,9 +46,10 @@ struct osd { #define OSD_THREAD 0 #define OSD_JAIL 1 +#define OSD_KHELP 2 #define OSD_FIRST OSD_THREAD -#define OSD_LAST OSD_JAIL +#define OSD_LAST OSD_KHELP typedef void (*osd_destructor_t)(void *value); typedef int (*osd_method_t)(void *obj, void *data); Modified: stable/8/sys/sys/param.h ============================================================================== --- stable/8/sys/sys/param.h Sat May 28 05:40:19 2011 (r222405) +++ stable/8/sys/sys/param.h Sat May 28 06:56:09 2011 (r222406) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 802504 /* Master, propagated to newvers */ +#define __FreeBSD_version 802505 /* Master, propagated to newvers */ #ifdef _KERNEL #define P_OSREL_SIGSEGV 700004 From owner-svn-src-stable-8@FreeBSD.ORG Sat May 28 07:23:27 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0344D106564A; Sat, 28 May 2011 07:23:27 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CD80A8FC0C; Sat, 28 May 2011 07:23: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 p4S7NQEl073199; Sat, 28 May 2011 07:23:26 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4S7NQg4073195; Sat, 28 May 2011 07:23:26 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201105280723.p4S7NQg4073195@svn.freebsd.org> From: Lawrence Stewart Date: Sat, 28 May 2011 07:23:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222407 - stable/8/sys/netinet X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 May 2011 07:23:27 -0000 Author: lstewart Date: Sat May 28 07:23:26 2011 New Revision: 222407 URL: http://svn.freebsd.org/changeset/base/222407 Log: MFC r216753,217221: Add a new sack hint to track the most recent and highest sacked sequence number. This will be used by the incoming Enhanced RTT Khelp module. Sponsored by: FreeBSD Foundation Submitted by: David Hayes Reviewed by: bz and others (as part of a larger patch) Modified: stable/8/sys/netinet/tcp_input.c stable/8/sys/netinet/tcp_sack.c stable/8/sys/netinet/tcp_var.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/netinet/tcp_input.c ============================================================================== --- stable/8/sys/netinet/tcp_input.c Sat May 28 06:56:09 2011 (r222406) +++ stable/8/sys/netinet/tcp_input.c Sat May 28 07:23:26 2011 (r222407) @@ -1365,6 +1365,7 @@ tcp_do_segment(struct mbuf *m, struct tc short ostate = 0; #endif thflags = th->th_flags; + tp->sackhint.last_sack_ack = 0; /* * If this is either a state-changing packet or current state isn't Modified: stable/8/sys/netinet/tcp_sack.c ============================================================================== --- stable/8/sys/netinet/tcp_sack.c Sat May 28 06:56:09 2011 (r222406) +++ stable/8/sys/netinet/tcp_sack.c Sat May 28 07:23:26 2011 (r222407) @@ -425,6 +425,7 @@ tcp_sack_doack(struct tcpcb *tp, struct * are received. */ sblkp = &sack_blocks[num_sack_blks - 1]; /* Last SACK block */ + tp->sackhint.last_sack_ack = sblkp->end; if (SEQ_LT(tp->snd_fack, sblkp->start)) { /* * The highest SACK block is beyond fack. Append new SACK Modified: stable/8/sys/netinet/tcp_var.h ============================================================================== --- stable/8/sys/netinet/tcp_var.h Sat May 28 06:56:09 2011 (r222406) +++ stable/8/sys/netinet/tcp_var.h Sat May 28 07:23:26 2011 (r222407) @@ -70,8 +70,8 @@ struct sackhole { struct sackhint { struct sackhole *nexthole; int sack_bytes_rexmit; + tcp_seq last_sack_ack; /* Most recent/largest sacked ack */ - int ispare; /* explicit pad for 64bit alignment */ uint64_t _pad[2]; /* 1 sacked_bytes, 1 TBD */ }; From owner-svn-src-stable-8@FreeBSD.ORG Sat May 28 07:52:57 2011 Return-Path: Delivered-To: svn-src-stable-8@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9FD46106564A; Sat, 28 May 2011 07:52:57 +0000 (UTC) (envelope-from lstewart@freebsd.org) Received: from lauren.room52.net (lauren.room52.net [210.50.193.198]) by mx1.freebsd.org (Postfix) with ESMTP id 5FA888FC0A; Sat, 28 May 2011 07:52:57 +0000 (UTC) Received: from lstewart-laptop.caia.swin.edu.au (124-171-49-27.dyn.iinet.net.au [124.171.49.27]) by lauren.room52.net (Postfix) with ESMTPSA id B20197E824; Sat, 28 May 2011 17:34:28 +1000 (EST) Message-ID: <4DE0A583.2030300@freebsd.org> Date: Sat, 28 May 2011 17:34:27 +1000 From: Lawrence Stewart User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.17) Gecko/20110504 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 To: Lawrence Stewart References: <201105280723.p4S7NQg4073195@svn.freebsd.org> In-Reply-To: <201105280723.p4S7NQg4073195@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on lauren.room52.net Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-8@FreeBSD.org Subject: Re: svn commit: r222407 - stable/8/sys/netinet X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 May 2011 07:52:57 -0000 On 05/28/11 17:23, Lawrence Stewart wrote: > Author: lstewart > Date: Sat May 28 07:23:26 2011 > New Revision: 222407 > URL: http://svn.freebsd.org/changeset/base/222407 > > Log: > MFC r216753,217221: > > Add a new sack hint to track the most recent and highest sacked sequence number. > This will be used by the incoming Enhanced RTT Khelp module. I should have added: The MFCed code was tweaked to preserve the ABI of the 8-STABLE branch with respect to "struct tcpcb" by consuming some of the padding within the sackhint struct. Cheers, Lawrence From owner-svn-src-stable-8@FreeBSD.ORG Sat May 28 08:13:39 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BDD18106566C; Sat, 28 May 2011 08:13:39 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AC4168FC0C; Sat, 28 May 2011 08:13:39 +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 p4S8DdmS074850; Sat, 28 May 2011 08:13:39 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4S8DdjB074844; Sat, 28 May 2011 08:13:39 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201105280813.p4S8DdjB074844@svn.freebsd.org> From: Lawrence Stewart Date: Sat, 28 May 2011 08:13:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222408 - in stable/8/sys: netinet sys X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 May 2011 08:13:39 -0000 Author: lstewart Date: Sat May 28 08:13:39 2011 New Revision: 222408 URL: http://svn.freebsd.org/changeset/base/222408 Log: MFC r216758,217252: - Add some helper hook points to the TCP stack. The hooks allow Khelp modules to access inbound/outbound events and associated data for established TCP connections. The hooks only run if at least one hook function is registered for the hook point, ensuring the impact on the stack is effectively nil when no TCP Khelp modules are loaded. struct tcp_hhook_data is passed as contextual data to any registered Khelp module hook functions. - Add an OSD (Object Specific Data) pointer to struct tcpcb to allow Khelp modules to associate per-connection data with the TCP control block. - Tweak the MFCed code to preserve the ABI of the 8-STABLE branch with respect to "struct tcpcb" by consuming some of the padding within the struct. - Bump __FreeBSD_version to 802506. In collaboration with: David Hayes and Grenville Armitage Sponsored by: FreeBSD Foundation Reviewed by: bz, others along the way Modified: stable/8/sys/netinet/tcp_input.c stable/8/sys/netinet/tcp_output.c stable/8/sys/netinet/tcp_subr.c stable/8/sys/netinet/tcp_var.h stable/8/sys/sys/param.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/netinet/tcp_input.c ============================================================================== --- stable/8/sys/netinet/tcp_input.c Sat May 28 07:23:26 2011 (r222407) +++ stable/8/sys/netinet/tcp_input.c Sat May 28 08:13:39 2011 (r222408) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include /* for proc0 declaration */ @@ -219,6 +220,8 @@ static void inline cc_ack_received(struc static void inline cc_conn_init(struct tcpcb *tp); static void inline cc_post_recovery(struct tcpcb *tp, struct tcphdr *th); static void inline tcp_fields_to_host(struct tcphdr *); +static void inline hhook_run_tcp_est_in(struct tcpcb *tp, + struct tcphdr *th, struct tcpopt *to); #ifdef TCP_SIGNATURE static void inline tcp_fields_to_net(struct tcphdr *); static int inline tcp_signature_verify_input(struct mbuf *, int, int, @@ -240,6 +243,24 @@ kmod_tcpstat_inc(int statnum) } /* + * Wrapper for the TCP established input helper hook. + */ +static void inline +hhook_run_tcp_est_in(struct tcpcb *tp, struct tcphdr *th, struct tcpopt *to) +{ + struct tcp_hhook_data hhook_data; + + if (V_tcp_hhh[HHOOK_TCP_EST_IN]->hhh_nhooks > 0) { + hhook_data.tp = tp; + hhook_data.th = th; + hhook_data.to = to; + + hhook_run_hooks(V_tcp_hhh[HHOOK_TCP_EST_IN], &hhook_data, + tp->osd); + } +} + +/* * CC wrapper hook functions */ static void inline @@ -1583,6 +1604,10 @@ tcp_do_segment(struct mbuf *m, struct tc } tcp_xmit_bandwidth_limit(tp, th->th_ack); acked = BYTES_THIS_ACK(tp, th); + + /* Run HHOOK_TCP_ESTABLISHED_IN helper hooks. */ + hhook_run_tcp_est_in(tp, th, &to); + TCPSTAT_INC(tcps_rcvackpack); TCPSTAT_ADD(tcps_rcvackbyte, acked); sbdrop(&so->so_snd, acked); @@ -2297,6 +2322,10 @@ tcp_do_segment(struct mbuf *m, struct tc ((to.to_flags & TOF_SACK) || !TAILQ_EMPTY(&tp->snd_holes))) tcp_sack_doack(tp, &to, th->th_ack); + + /* Run HHOOK_TCP_ESTABLISHED_IN helper hooks. */ + hhook_run_tcp_est_in(tp, th, &to); + if (SEQ_LEQ(th->th_ack, tp->snd_una)) { if (tlen == 0 && tiwin == tp->snd_wnd) { TCPSTAT_INC(tcps_rcvdupack); Modified: stable/8/sys/netinet/tcp_output.c ============================================================================== --- stable/8/sys/netinet/tcp_output.c Sat May 28 07:23:26 2011 (r222407) +++ stable/8/sys/netinet/tcp_output.c Sat May 28 08:13:39 2011 (r222408) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -126,9 +127,33 @@ SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, &VNET_NAME(tcp_autosndbuf_max), 0, "Max size of automatic send buffer"); +static void inline hhook_run_tcp_est_out(struct tcpcb *tp, + struct tcphdr *th, struct tcpopt *to, + long len, int tso); static void inline cc_after_idle(struct tcpcb *tp); /* + * Wrapper for the TCP established ouput helper hook. + */ +static void inline +hhook_run_tcp_est_out(struct tcpcb *tp, struct tcphdr *th, + struct tcpopt *to, long len, int tso) +{ + struct tcp_hhook_data hhook_data; + + if (V_tcp_hhh[HHOOK_TCP_EST_OUT]->hhh_nhooks > 0) { + hhook_data.tp = tp; + hhook_data.th = th; + hhook_data.to = to; + hhook_data.len = len; + hhook_data.tso = tso; + + hhook_run_hooks(V_tcp_hhh[HHOOK_TCP_EST_OUT], &hhook_data, + tp->osd); + } +} + +/* * CC wrapper hook functions */ static void inline @@ -1119,6 +1144,9 @@ timer: tp->snd_max = tp->snd_nxt + len; } + /* Run HHOOK_TCP_ESTABLISHED_OUT helper hooks. */ + hhook_run_tcp_est_out(tp, th, &to, len, tso); + #ifdef TCPDEBUG /* * Trace. Modified: stable/8/sys/netinet/tcp_subr.c ============================================================================== --- stable/8/sys/netinet/tcp_subr.c Sat May 28 07:23:26 2011 (r222407) +++ stable/8/sys/netinet/tcp_subr.c Sat May 28 08:13:39 2011 (r222408) @@ -41,7 +41,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #include #include @@ -266,6 +268,8 @@ SYSCTL_INT(_net_inet_tcp, OID_AUTO, sign VNET_DEFINE(uma_zone_t, sack_hole_zone); #define V_sack_hole_zone VNET(sack_hole_zone) +VNET_DEFINE(struct hhook_head *, tcp_hhh[HHOOK_TCP_LAST+1]); + static struct inpcb *tcp_notify(struct inpcb *, int); static void tcp_isn_tick(void *); static char * tcp_log_addr(struct in_conninfo *inc, struct tcphdr *th, @@ -291,6 +295,7 @@ struct tcpcb_mem { struct tcpcb tcb; struct tcp_timer tt; struct cc_var ccv; + struct osd osd; }; static VNET_DEFINE(uma_zone_t, tcpcb_zone); @@ -336,6 +341,14 @@ tcp_init(void) V_tcbinfo.ipi_vnet = curvnet; #endif V_tcbinfo.ipi_listhead = &V_tcb; + + if (hhook_head_register(HHOOK_TYPE_TCP, HHOOK_TCP_EST_IN, + &V_tcp_hhh[HHOOK_TCP_EST_IN], HHOOK_NOWAIT|HHOOK_HEADISINVNET) != 0) + printf("%s: WARNING: unable to register helper hook\n", __func__); + if (hhook_head_register(HHOOK_TYPE_TCP, HHOOK_TCP_EST_OUT, + &V_tcp_hhh[HHOOK_TCP_EST_OUT], HHOOK_NOWAIT|HHOOK_HEADISINVNET) != 0) + printf("%s: WARNING: unable to register helper hook\n", __func__); + hashsize = TCBHASHSIZE; TUNABLE_INT_FETCH("net.inet.tcp.tcbhashsize", &hashsize); if (!powerof2(hashsize)) { @@ -726,6 +739,12 @@ tcp_newtcpcb(struct inpcb *inp) return (NULL); } + tp->osd = &tm->osd; + if (khelp_init_osd(HELPER_CLASS_TCP, tp->osd)) { + uma_zfree(V_tcpcb_zone, tm); + return (NULL); + } + #ifdef VIMAGE tp->t_vnet = inp->inp_vnet; #endif @@ -952,6 +971,8 @@ tcp_discardcb(struct tcpcb *tp) if (CC_ALGO(tp)->cb_destroy != NULL) CC_ALGO(tp)->cb_destroy(tp->ccv); + khelp_destroy_osd(tp->osd); + CC_ALGO(tp) = NULL; inp->inp_ppcb = NULL; tp->t_inpcb = NULL; Modified: stable/8/sys/netinet/tcp_var.h ============================================================================== --- stable/8/sys/netinet/tcp_var.h Sat May 28 07:23:26 2011 (r222407) +++ stable/8/sys/netinet/tcp_var.h Sat May 28 08:13:39 2011 (r222408) @@ -200,8 +200,9 @@ struct tcpcb { struct cc_algo *cc_algo; /* congestion control algorithm */ struct cc_var *ccv; /* congestion control specific vars */ + struct osd *osd; /* storage for Khelp module data */ - void *t_pspare2[4]; /* 4 TBD */ + void *t_pspare2[3]; /* 3 TBD */ uint64_t _pad[10]; /* 7 UTO, 3 TBD (1-2 CC/RTT?) */ uint64_t t_sndrexmitpack;/* retransmit packets sent */ @@ -509,6 +510,22 @@ struct tcpstat { void kmod_tcpstat_inc(int statnum); #define KMOD_TCPSTAT_INC(name) \ kmod_tcpstat_inc(offsetof(struct tcpstat, name) / sizeof(u_long)) + +/* + * TCP specific helper hook point identifiers. + */ +#define HHOOK_TCP_EST_IN 0 +#define HHOOK_TCP_EST_OUT 1 +#define HHOOK_TCP_LAST HHOOK_TCP_EST_OUT + +struct tcp_hhook_data { + struct tcpcb *tp; + struct tcphdr *th; + struct tcpopt *to; + long len; + int tso; + tcp_seq curack; +}; #endif /* @@ -607,6 +624,9 @@ VNET_DECLARE(int, tcp_ecn_maxretries); #define V_tcp_do_ecn VNET(tcp_do_ecn) #define V_tcp_ecn_maxretries VNET(tcp_ecn_maxretries) +VNET_DECLARE(struct hhook_head *, tcp_hhh[HHOOK_TCP_LAST + 1]); +#define V_tcp_hhh VNET(tcp_hhh) + int tcp_addoptions(struct tcpopt *, u_char *); int tcp_ccalgounload(struct cc_algo *unload_algo); struct tcpcb * Modified: stable/8/sys/sys/param.h ============================================================================== --- stable/8/sys/sys/param.h Sat May 28 07:23:26 2011 (r222407) +++ stable/8/sys/sys/param.h Sat May 28 08:13:39 2011 (r222408) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 802505 /* Master, propagated to newvers */ +#define __FreeBSD_version 802506 /* Master, propagated to newvers */ #ifdef _KERNEL #define P_OSREL_SIGSEGV 700004 From owner-svn-src-stable-8@FreeBSD.ORG Sat May 28 08:20:25 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A57C41065675; Sat, 28 May 2011 08:20:25 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9541E8FC14; Sat, 28 May 2011 08:20:25 +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 p4S8KP62075088; Sat, 28 May 2011 08:20:25 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4S8KPJX075086; Sat, 28 May 2011 08:20:25 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201105280820.p4S8KPJX075086@svn.freebsd.org> From: Lawrence Stewart Date: Sat, 28 May 2011 08:20:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222409 - in stable/8/sys/modules: . khelp X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 May 2011 08:20:25 -0000 Author: lstewart Date: Sat May 28 08:20:25 2011 New Revision: 222409 URL: http://svn.freebsd.org/changeset/base/222409 Log: MFC r217773: Add build infrastructure for Khelp modules. Sponsored by: FreeBSD Foundation Reviewed by: bz Added: stable/8/sys/modules/khelp/ - copied from r217773, head/sys/modules/khelp/ Modified: stable/8/sys/modules/Makefile Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/modules/Makefile ============================================================================== --- stable/8/sys/modules/Makefile Sat May 28 08:13:39 2011 (r222408) +++ stable/8/sys/modules/Makefile Sat May 28 08:20:25 2011 (r222409) @@ -152,6 +152,7 @@ SUBDIR= ${_3dfx} \ jme \ joy \ kbdmux \ + khelp \ krpc \ ksyms \ le \ From owner-svn-src-stable-8@FreeBSD.ORG Sat May 28 08:24:22 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E21FE106564A; Sat, 28 May 2011 08:24:22 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D15C28FC15; Sat, 28 May 2011 08:24:22 +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 p4S8OM4n075255; Sat, 28 May 2011 08:24:22 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4S8OM2H075253; Sat, 28 May 2011 08:24:22 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201105280824.p4S8OM2H075253@svn.freebsd.org> From: Lawrence Stewart Date: Sat, 28 May 2011 08:24:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222410 - in stable/8/sys: modules/khelp modules/khelp/h_ertt netinet/khelp X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 May 2011 08:24:23 -0000 Author: lstewart Date: Sat May 28 08:24:22 2011 New Revision: 222410 URL: http://svn.freebsd.org/changeset/base/222410 Log: MFC 217806: Import the ERTT (Enhanced Round Trip Time) Khelp module. ERTT uses the Khelp/Hhook KPIs to hook into the TCP stack and maintain a per-connection, low noise estimate of the instantaneous RTT. ERTT's implementation is robust even in the face of delayed acknowledgements and/or TSO being in use for a connection. A high quality, low noise RTT estimate is a requirement for applications such as delay-based congestion control, for which we will be importing some algorithm implementations shortly. In collaboration with: David Hayes and Grenville Armitage Sponsored by: FreeBSD Foundation Reviewed by: bz and others along the way Added: stable/8/sys/modules/khelp/h_ertt/ - copied from r217806, head/sys/modules/khelp/h_ertt/ stable/8/sys/netinet/khelp/ - copied from r217806, head/sys/netinet/khelp/ Modified: stable/8/sys/modules/khelp/Makefile Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/modules/khelp/Makefile ============================================================================== --- stable/8/sys/modules/khelp/Makefile Sat May 28 08:20:25 2011 (r222409) +++ stable/8/sys/modules/khelp/Makefile Sat May 28 08:24:22 2011 (r222410) @@ -1,5 +1,5 @@ # $FreeBSD$ -SUBDIR= +SUBDIR= h_ertt .include From owner-svn-src-stable-8@FreeBSD.ORG Sat May 28 08:28:37 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9233F106564A; Sat, 28 May 2011 08:28:37 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 67A6D8FC0A; Sat, 28 May 2011 08:28: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 p4S8Sb44075429; Sat, 28 May 2011 08:28:37 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4S8SbcR075426; Sat, 28 May 2011 08:28:37 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201105280828.p4S8SbcR075426@svn.freebsd.org> From: Lawrence Stewart Date: Sat, 28 May 2011 08:28:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222411 - in stable/8/sys: modules/cc modules/cc/cc_vegas netinet/cc X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 May 2011 08:28:37 -0000 Author: lstewart Date: Sat May 28 08:28:37 2011 New Revision: 222411 URL: http://svn.freebsd.org/changeset/base/222411 Log: MFC r218152,218156: Import a clean-room implementation of the VEGAS congestion control algorithm based on the paper "TCP Vegas: end to end congestion avoidance on a global internet" by Brakmo and Peterson. It is implemented as a kernel module compatible with the recently committed modular congestion control framework. VEGAS uses network delay as a congestion indicator and unlike regular loss-based algorithms, attempts to keep the network operating with stable queuing delays and no congestion losses. By keeping network buffers used along the path within a set range, queuing delays are kept low while maintaining high throughput. In collaboration with: David Hayes and Grenville Armitage Sponsored by: FreeBSD Foundation Reviewed by: bz and others along the way Added: stable/8/sys/modules/cc/cc_vegas/ - copied from r218152, head/sys/modules/cc/cc_vegas/ stable/8/sys/netinet/cc/cc_vegas.c - copied, changed from r218152, head/sys/netinet/cc/cc_vegas.c Modified: stable/8/sys/modules/cc/Makefile Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/modules/cc/Makefile ============================================================================== --- stable/8/sys/modules/cc/Makefile Sat May 28 08:24:22 2011 (r222410) +++ stable/8/sys/modules/cc/Makefile Sat May 28 08:28:37 2011 (r222411) @@ -1,6 +1,7 @@ # $FreeBSD$ SUBDIR= cc_cubic \ - cc_htcp + cc_htcp \ + cc_vegas .include Copied and modified: stable/8/sys/netinet/cc/cc_vegas.c (from r218152, head/sys/netinet/cc/cc_vegas.c) ============================================================================== --- head/sys/netinet/cc/cc_vegas.c Tue Feb 1 06:17:00 2011 (r218152, copy source) +++ stable/8/sys/netinet/cc/cc_vegas.c Sat May 28 08:28:37 2011 (r222411) @@ -41,7 +41,7 @@ * based on L. S. Brakmo and L. L. Peterson, "TCP Vegas: end to end congestion * avoidance on a global internet", IEEE J. Sel. Areas Commun., vol. 13, no. 8, * pp. 1465-1480, Oct. 1995. The original Vegas duplicate ack policy has not - * been implemented, since clock ticks are not as course as they were (i.e. + * been implemented, since clock ticks are not as coarse as they were (i.e. * 500ms) when Vegas was designed. Also, packets are timed once per RTT as in * the original paper. * From owner-svn-src-stable-8@FreeBSD.ORG Sat May 28 08:32:17 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9613F106564A; Sat, 28 May 2011 08:32:17 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7C8A08FC0A; Sat, 28 May 2011 08:32: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 p4S8WHSE075586; Sat, 28 May 2011 08:32:17 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4S8WHGc075583; Sat, 28 May 2011 08:32:17 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201105280832.p4S8WHGc075583@svn.freebsd.org> From: Lawrence Stewart Date: Sat, 28 May 2011 08:32:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222412 - in stable/8/sys: modules/cc modules/cc/cc_hd netinet/cc X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 May 2011 08:32:17 -0000 Author: lstewart Date: Sat May 28 08:32:17 2011 New Revision: 222412 URL: http://svn.freebsd.org/changeset/base/222412 Log: MFC 218153: Import a clean-room implementation of the Hamilton-Delay (HD) congestion control algorithm based on the paper "A strategy for fair coexistence of loss and delay-based congestion control algorithms" by Budzisz, Stanojevic, Shorten and Baker. It is implemented as a kernel module compatible with the recently committed modular congestion control framework. HD uses a probabilistic approach to reacting to delay-based congestion. The probability of reducing cwnd is zero when the queuing delay is very small, increasing to a maximum at a set threshold, then back down to zero again when the queuing delay is high. Normal operation keeps the queuing delay below the set threshold. However, since loss-based congestion control algorithms push the queuing delay high when probing for bandwidth, having the probability of reducing cwnd drop back to zero for high delays allows HD to compete with loss-based algorithms. In collaboration with: David Hayes and Grenville Armitage Sponsored by: FreeBSD Foundation Reviewed by: bz and others along the way Added: stable/8/sys/modules/cc/cc_hd/ - copied from r218153, head/sys/modules/cc/cc_hd/ stable/8/sys/netinet/cc/cc_hd.c - copied unchanged from r218153, head/sys/netinet/cc/cc_hd.c Modified: stable/8/sys/modules/cc/Makefile Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/modules/cc/Makefile ============================================================================== --- stable/8/sys/modules/cc/Makefile Sat May 28 08:28:37 2011 (r222411) +++ stable/8/sys/modules/cc/Makefile Sat May 28 08:32:17 2011 (r222412) @@ -1,6 +1,7 @@ # $FreeBSD$ SUBDIR= cc_cubic \ + cc_hd \ cc_htcp \ cc_vegas Copied: stable/8/sys/netinet/cc/cc_hd.c (from r218153, head/sys/netinet/cc/cc_hd.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/netinet/cc/cc_hd.c Sat May 28 08:32:17 2011 (r222412, copy of r218153, head/sys/netinet/cc/cc_hd.c) @@ -0,0 +1,254 @@ +/*- + * Copyright (c) 2009-2010 + * Swinburne University of Technology, Melbourne, Australia + * Copyright (c) 2010 Lawrence Stewart + * Copyright (c) 2010-2011 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed at the Centre for Advanced Internet + * Architectures, Swinburne University, by David Hayes and Lawrence Stewart, + * made possible in part by a grant from the Cisco University Research Program + * Fund at Community Foundation Silicon Valley. + * + * Portions of this software were developed at the Centre for Advanced Internet + * Architectures, Swinburne University of Technology, Melbourne, Australia by + * David Hayes under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * An implementation of the Hamilton Institute's delay-based congestion control + * algorithm for FreeBSD, based on "A strategy for fair coexistence of loss and + * delay-based congestion control algorithms," by L. Budzisz, R. Stanojevic, R. + * Shorten, and F. Baker, IEEE Commun. Lett., vol. 13, no. 7, pp. 555--557, Jul. + * 2009. + * + * Originally released as part of the NewTCP research project at Swinburne + * University's Centre for Advanced Internet Architectures, Melbourne, + * Australia, which was made possible in part by a grant from the Cisco + * University Research Program Fund at Community Foundation Silicon Valley. More + * details are available at: + * http://caia.swin.edu.au/urp/newtcp/ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +#include + +#include + +#define CAST_PTR_INT(X) (*((int*)(X))) + +/* Largest possible number returned by random(). */ +#define RANDOM_MAX INT_MAX + +static void hd_ack_received(struct cc_var *ccv, uint16_t ack_type); +static int hd_mod_init(void); + +static int ertt_id; + +static VNET_DEFINE(uint32_t, hd_qthresh) = 20; +static VNET_DEFINE(uint32_t, hd_qmin) = 5; +static VNET_DEFINE(uint32_t, hd_pmax) = 5; +#define V_hd_qthresh VNET(hd_qthresh) +#define V_hd_qmin VNET(hd_qmin) +#define V_hd_pmax VNET(hd_pmax) + +struct cc_algo hd_cc_algo = { + .name = "hd", + .ack_received = hd_ack_received, + .mod_init = hd_mod_init +}; + +/* + * Hamilton backoff function. Returns 1 if we should backoff or 0 otherwise. + */ +static __inline int +should_backoff(int qdly, int maxqdly) +{ + unsigned long p; + + if (qdly < V_hd_qthresh) { + p = (((RANDOM_MAX / 100) * V_hd_pmax) / + (V_hd_qthresh - V_hd_qmin)) * (qdly - V_hd_qmin); + } else { + if (qdly > V_hd_qthresh) + p = (((RANDOM_MAX / 100) * V_hd_pmax) / + (maxqdly - V_hd_qthresh)) * (maxqdly - qdly); + else + p = (RANDOM_MAX / 100) * V_hd_pmax; + } + + return (random() < p); +} + +/* + * If the ack type is CC_ACK, and the inferred queueing delay is greater than + * the Qmin threshold, cwnd is reduced probabilistically. When backing off due + * to delay, HD behaves like NewReno when an ECN signal is received. HD behaves + * as NewReno in all other circumstances. + */ +static void +hd_ack_received(struct cc_var *ccv, uint16_t ack_type) +{ + struct ertt *e_t; + int qdly; + + if (ack_type == CC_ACK) { + e_t = khelp_get_osd(CCV(ccv, osd), ertt_id); + + if (e_t->rtt && e_t->minrtt && V_hd_qthresh > 0) { + qdly = e_t->rtt - e_t->minrtt; + + if (qdly > V_hd_qmin && + !IN_RECOVERY(CCV(ccv, t_flags))) { + /* Probabilistic backoff of cwnd. */ + if (should_backoff(qdly, + e_t->maxrtt - e_t->minrtt)) { + /* + * Update cwnd and ssthresh update to + * half cwnd and behave like an ECN (ie + * not a packet loss). + */ + newreno_cc_algo.cong_signal(ccv, + CC_ECN); + return; + } + } + } + } + newreno_cc_algo.ack_received(ccv, ack_type); /* As for NewReno. */ +} + +static int +hd_mod_init(void) +{ + + ertt_id = khelp_get_id("ertt"); + if (ertt_id <= 0) { + printf("%s: h_ertt module not found\n", __func__); + return (ENOENT); + } + + hd_cc_algo.after_idle = newreno_cc_algo.after_idle; + hd_cc_algo.cong_signal = newreno_cc_algo.cong_signal; + hd_cc_algo.post_recovery = newreno_cc_algo.post_recovery; + + return (0); +} + +static int +hd_pmax_handler(SYSCTL_HANDLER_ARGS) +{ + int error; + uint32_t new; + + new = V_hd_pmax; + error = sysctl_handle_int(oidp, &new, 0, req); + if (error == 0 && req->newptr != NULL) { + if (CAST_PTR_INT(req->newptr) == 0 || + CAST_PTR_INT(req->newptr) > 100) + error = EINVAL; + else + V_hd_pmax = new; + } + + return (error); +} + +static int +hd_qmin_handler(SYSCTL_HANDLER_ARGS) +{ + int error; + uint32_t new; + + new = V_hd_qmin; + error = sysctl_handle_int(oidp, &new, 0, req); + if (error == 0 && req->newptr != NULL) { + if (CAST_PTR_INT(req->newptr) > V_hd_qthresh) + error = EINVAL; + else + V_hd_qmin = new; + } + + return (error); +} + +static int +hd_qthresh_handler(SYSCTL_HANDLER_ARGS) +{ + int error; + uint32_t new; + + new = V_hd_qthresh; + error = sysctl_handle_int(oidp, &new, 0, req); + if (error == 0 && req->newptr != NULL) { + if (CAST_PTR_INT(req->newptr) < 1 || + CAST_PTR_INT(req->newptr) < V_hd_qmin) + error = EINVAL; + else + V_hd_qthresh = new; + } + + return (error); +} + +SYSCTL_DECL(_net_inet_tcp_cc_hd); +SYSCTL_NODE(_net_inet_tcp_cc, OID_AUTO, hd, CTLFLAG_RW, NULL, + "Hamilton delay-based congestion control related settings"); + +SYSCTL_VNET_PROC(_net_inet_tcp_cc_hd, OID_AUTO, queue_threshold, + CTLTYPE_UINT|CTLFLAG_RW, &VNET_NAME(hd_qthresh), 20, &hd_qthresh_handler, + "IU", "queueing congestion threshold (qth) in ticks"); + +SYSCTL_VNET_PROC(_net_inet_tcp_cc_hd, OID_AUTO, pmax, + CTLTYPE_UINT|CTLFLAG_RW, &VNET_NAME(hd_pmax), 5, &hd_pmax_handler, + "IU", "per packet maximum backoff probability as a percentage"); + +SYSCTL_VNET_PROC(_net_inet_tcp_cc_hd, OID_AUTO, queue_min, + CTLTYPE_UINT|CTLFLAG_RW, &VNET_NAME(hd_qmin), 5, &hd_qmin_handler, + "IU", "minimum queueing delay threshold (qmin) in ticks"); + +DECLARE_CC_MODULE(hd, &hd_cc_algo); +MODULE_DEPEND(hd, ertt, 1, 1, 1); From owner-svn-src-stable-8@FreeBSD.ORG Sat May 28 08:34:31 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F2BC106564A; Sat, 28 May 2011 08:34:31 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1D3788FC08; Sat, 28 May 2011 08:34:31 +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 p4S8YVnk075725; Sat, 28 May 2011 08:34:31 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4S8YV3b075722; Sat, 28 May 2011 08:34:31 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201105280834.p4S8YV3b075722@svn.freebsd.org> From: Lawrence Stewart Date: Sat, 28 May 2011 08:34:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222413 - in stable/8/sys: modules/cc modules/cc/cc_chd netinet/cc X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 May 2011 08:34:31 -0000 Author: lstewart Date: Sat May 28 08:34:30 2011 New Revision: 222413 URL: http://svn.freebsd.org/changeset/base/222413 Log: MFC 218155: Import an implementation of the CAIA-Hamilton-Delay (CHD) congestion control algorithm described in the paper "Improved coexistence and loss tolerance for delay based TCP congestion control" by Hayes and Armitage. It is implemented as a kernel module compatible with the recently committed modular congestion control framework. CHD enhances the approach taken by the Hamilton-Delay (HD) algorithm to provide tolerance to non-congestion related packet loss and improvements to coexistence with loss-based congestion control algorithms. A key idea in improving coexistence with loss-based congestion control algorithms is the use of a shadow window, which attempts to track how NewReno's congestion window (cwnd) would evolve. At the next packet loss congestion event, CHD uses the shadow window to correct cwnd in a way that reduces the amount of unfairness CHD experiences when competing with loss-based algorithms. In collaboration with: David Hayes and Grenville Armitage Sponsored by: FreeBSD Foundation Reviewed by: bz and others along the way Added: stable/8/sys/modules/cc/cc_chd/ - copied from r218155, head/sys/modules/cc/cc_chd/ stable/8/sys/netinet/cc/cc_chd.c - copied unchanged from r218155, head/sys/netinet/cc/cc_chd.c Modified: stable/8/sys/modules/cc/Makefile Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/modules/cc/Makefile ============================================================================== --- stable/8/sys/modules/cc/Makefile Sat May 28 08:32:17 2011 (r222412) +++ stable/8/sys/modules/cc/Makefile Sat May 28 08:34:30 2011 (r222413) @@ -1,6 +1,7 @@ # $FreeBSD$ -SUBDIR= cc_cubic \ +SUBDIR= cc_chd \ + cc_cubic \ cc_hd \ cc_htcp \ cc_vegas Copied: stable/8/sys/netinet/cc/cc_chd.c (from r218155, head/sys/netinet/cc/cc_chd.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/netinet/cc/cc_chd.c Sat May 28 08:34:30 2011 (r222413, copy of r218155, head/sys/netinet/cc/cc_chd.c) @@ -0,0 +1,497 @@ +/*- + * Copyright (c) 2009-2010 + * Swinburne University of Technology, Melbourne, Australia + * Copyright (c) 2010-2011 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed at the Centre for Advanced Internet + * Architectures, Swinburne University, by David Hayes and Lawrence Stewart, + * made possible in part by a grant from the Cisco University Research Program + * Fund at Community Foundation Silicon Valley. + * + * Portions of this software were developed at the Centre for Advanced Internet + * Architectures, Swinburne University of Technology, Melbourne, Australia by + * David Hayes under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * An implementation of the CAIA-Hamilton delay based congestion control + * algorithm, based on "Improved coexistence and loss tolerance for delay based + * TCP congestion control" by D. A. Hayes and G. Armitage., in 35th Annual IEEE + * Conference on Local Computer Networks (LCN 2010), Denver, Colorado, USA, + * 11-14 October 2010. + * + * Originally released as part of the NewTCP research project at Swinburne + * University's Centre for Advanced Internet Architectures, Melbourne, + * Australia, which was made possible in part by a grant from the Cisco + * University Research Program Fund at Community Foundation Silicon Valley. More + * details are available at: + * http://caia.swin.edu.au/urp/newtcp/ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +#include + +#include + +#define CAST_PTR_INT(X) (*((int*)(X))) + +/* + * Private signal type for rate based congestion signal. + * See for appropriate bit-range to use for private signals. + */ +#define CC_CHD_DELAY 0x02000000 + +/* Largest possible number returned by random(). */ +#define RANDOM_MAX INT_MAX + +static void chd_ack_received(struct cc_var *ccv, uint16_t ack_type); +static void chd_cb_destroy(struct cc_var *ccv); +static int chd_cb_init(struct cc_var *ccv); +static void chd_cong_signal(struct cc_var *ccv, uint32_t signal_type); +static void chd_conn_init(struct cc_var *ccv); +static int chd_mod_init(void); + +struct chd { + /* + * Shadow window - keeps track of what the NewReno congestion window + * would have been if delay-based cwnd backoffs had not been made. This + * functionality aids coexistence with loss-based TCP flows which may be + * sharing links along the path. + */ + unsigned long shadow_w; + /* + * Loss-based TCP compatibility flag - When set, it turns on the shadow + * window functionality. + */ + int loss_compete; + /* The maximum round trip time seen within a measured rtt period. */ + int maxrtt_in_rtt; + /* The previous qdly that caused cwnd to backoff. */ + int prev_backoff_qdly; +}; + +static int ertt_id; + +static VNET_DEFINE(uint32_t, chd_qmin) = 5; +static VNET_DEFINE(uint32_t, chd_pmax) = 50; +static VNET_DEFINE(uint32_t, chd_loss_fair) = 1; +static VNET_DEFINE(uint32_t, chd_use_max) = 1; +static VNET_DEFINE(uint32_t, chd_qthresh) = 20; +#define V_chd_qthresh VNET(chd_qthresh) +#define V_chd_qmin VNET(chd_qmin) +#define V_chd_pmax VNET(chd_pmax) +#define V_chd_loss_fair VNET(chd_loss_fair) +#define V_chd_use_max VNET(chd_use_max) + +MALLOC_DECLARE(M_CHD); +MALLOC_DEFINE(M_CHD, "chd data", + "Per connection data required for the CHD congestion control algorithm"); + +struct cc_algo chd_cc_algo = { + .name = "chd", + .ack_received = chd_ack_received, + .cb_destroy = chd_cb_destroy, + .cb_init = chd_cb_init, + .cong_signal = chd_cong_signal, + .conn_init = chd_conn_init, + .mod_init = chd_mod_init +}; + +static __inline void +chd_window_decrease(struct cc_var *ccv) +{ + unsigned long win; + + win = min(CCV(ccv, snd_wnd), CCV(ccv, snd_cwnd)) / CCV(ccv, t_maxseg); + win -= max((win / 2), 1); + CCV(ccv, snd_ssthresh) = max(win, 2) * CCV(ccv, t_maxseg); +} + +/* + * Probabilistic backoff function. Returns 1 if we should backoff or 0 + * otherwise. The calculation of p is similar to the calculation of p in cc_hd. + */ +static __inline int +should_backoff(int qdly, int maxqdly, struct chd *chd_data) +{ + unsigned long p, rand; + + rand = random(); + + if (qdly < V_chd_qthresh) { + chd_data->loss_compete = 0; + p = (((RANDOM_MAX / 100) * V_chd_pmax) / + (V_chd_qthresh - V_chd_qmin)) * + (qdly - V_chd_qmin); + } else { + if (qdly > V_chd_qthresh) { + p = (((RANDOM_MAX / 100) * V_chd_pmax) / + (maxqdly - V_chd_qthresh)) * + (maxqdly - qdly); + if (V_chd_loss_fair && rand < p) + chd_data->loss_compete = 1; + } else { + p = (RANDOM_MAX / 100) * V_chd_pmax; + chd_data->loss_compete = 0; + } + } + + return (rand < p); +} + +static __inline void +chd_window_increase(struct cc_var *ccv, int new_measurement) +{ + struct chd *chd_data; + int incr; + + chd_data = ccv->cc_data; + incr = 0; + + if (CCV(ccv, snd_cwnd) <= CCV(ccv, snd_ssthresh)) { + /* Adapted from NewReno slow start. */ + if (V_tcp_do_rfc3465) { + /* In slow-start with ABC enabled. */ + if (CCV(ccv, snd_nxt) == CCV(ccv, snd_max)) { + /* Not due to RTO. */ + incr = min(ccv->bytes_this_ack, + V_tcp_abc_l_var * CCV(ccv, t_maxseg)); + } else { + /* Due to RTO. */ + incr = min(ccv->bytes_this_ack, + CCV(ccv, t_maxseg)); + } + } else + incr = CCV(ccv, t_maxseg); + + } else { /* Congestion avoidance. */ + if (V_tcp_do_rfc3465) { + if (ccv->flags & CCF_ABC_SENTAWND) { + ccv->flags &= ~CCF_ABC_SENTAWND; + incr = CCV(ccv, t_maxseg); + } + } else if (new_measurement) + incr = CCV(ccv, t_maxseg); + } + + if (chd_data->shadow_w > 0) { + /* Track NewReno window. */ + chd_data->shadow_w = min(chd_data->shadow_w + incr, + TCP_MAXWIN << CCV(ccv, snd_scale)); + } + + CCV(ccv,snd_cwnd) = min(CCV(ccv, snd_cwnd) + incr, + TCP_MAXWIN << CCV(ccv, snd_scale)); +} + +/* + * All ACK signals are used for timing measurements to determine delay-based + * congestion. However, window increases are only performed when + * ack_type == CC_ACK. + */ +static void +chd_ack_received(struct cc_var *ccv, uint16_t ack_type) +{ + struct chd *chd_data; + struct ertt *e_t; + int backoff, new_measurement, qdly, rtt; + + e_t = khelp_get_osd(CCV(ccv, osd), ertt_id); + chd_data = ccv->cc_data; + new_measurement = e_t->flags & ERTT_NEW_MEASUREMENT; + backoff = qdly = 0; + + chd_data->maxrtt_in_rtt = imax(e_t->rtt, chd_data->maxrtt_in_rtt); + + if (new_measurement) { + /* + * There is a new per RTT measurement, so check to see if there + * is delay based congestion. + */ + rtt = V_chd_use_max ? chd_data->maxrtt_in_rtt : e_t->rtt; + chd_data->maxrtt_in_rtt = 0; + + if (rtt && e_t->minrtt && !IN_RECOVERY(CCV(ccv, t_flags))) { + qdly = rtt - e_t->minrtt; + if (qdly > V_chd_qmin) { + /* + * Probabilistic delay based congestion + * indication. + */ + backoff = should_backoff(qdly, + e_t->maxrtt - e_t->minrtt, chd_data); + } else + chd_data->loss_compete = 0; + } + /* Reset per RTT measurement flag to start a new measurement. */ + e_t->flags &= ~ERTT_NEW_MEASUREMENT; + } + + if (backoff) { + /* + * Update shadow_w before delay based backoff. + */ + if (chd_data->loss_compete || + qdly > chd_data->prev_backoff_qdly) { + /* + * Delay is higher than when we backed off previously, + * so it is possible that this flow is competing with + * loss based flows. + */ + chd_data->shadow_w = max(CCV(ccv, snd_cwnd), + chd_data->shadow_w); + } else { + /* + * Reset shadow_w, as it is probable that this flow is + * not competing with loss based flows at the moment. + */ + chd_data->shadow_w = 0; + } + + chd_data->prev_backoff_qdly = qdly; + /* + * Send delay-based congestion signal to the congestion signal + * handler. + */ + chd_cong_signal(ccv, CC_CHD_DELAY); + + } else if (ack_type == CC_ACK) + chd_window_increase(ccv, new_measurement); +} + +static void +chd_cb_destroy(struct cc_var *ccv) +{ + + if (ccv->cc_data != NULL) + free(ccv->cc_data, M_CHD); +} + +static int +chd_cb_init(struct cc_var *ccv) +{ + struct chd *chd_data; + + chd_data = malloc(sizeof(struct chd), M_CHD, M_NOWAIT); + if (chd_data == NULL) + return (ENOMEM); + + chd_data->shadow_w = 0; + ccv->cc_data = chd_data; + + return (0); +} + +static void +chd_cong_signal(struct cc_var *ccv, uint32_t signal_type) +{ + struct ertt *e_t; + struct chd *chd_data; + int qdly; + + e_t = khelp_get_osd(CCV(ccv, osd), ertt_id); + chd_data = ccv->cc_data; + qdly = imax(e_t->rtt, chd_data->maxrtt_in_rtt) - e_t->minrtt; + + switch(signal_type) { + case CC_CHD_DELAY: + chd_window_decrease(ccv); /* Set new ssthresh. */ + CCV(ccv, snd_cwnd) = CCV(ccv, snd_ssthresh); + CCV(ccv, snd_recover) = CCV(ccv, snd_max); + ENTER_CONGRECOVERY(CCV(ccv, t_flags)); + break; + + case CC_NDUPACK: /* Packet loss. */ + /* + * Only react to loss as a congestion signal if qdly > + * V_chd_qthresh. If qdly is less than qthresh, presume that + * this is a non congestion related loss. If qdly is greater + * than qthresh, assume that we are competing with loss based + * tcp flows and restore window from any unnecessary backoffs, + * before the decrease. + */ + if (!IN_RECOVERY(CCV(ccv, t_flags)) && qdly > V_chd_qthresh) { + if (chd_data->loss_compete) { + CCV(ccv, snd_cwnd) = max(CCV(ccv, snd_cwnd), + chd_data->shadow_w); + } + chd_window_decrease(ccv); + } else { + /* + * This loss isn't congestion related, or already + * recovering from congestion. + */ + CCV(ccv, snd_ssthresh) = CCV(ccv, snd_cwnd); + CCV(ccv, snd_recover) = CCV(ccv, snd_max); + } + + if (chd_data->shadow_w > 0) { + chd_data->shadow_w = max(chd_data->shadow_w / + CCV(ccv, t_maxseg) / 2, 2) * CCV(ccv, t_maxseg); + } + ENTER_FASTRECOVERY(CCV(ccv, t_flags)); + break; + + default: + newreno_cc_algo.cong_signal(ccv, signal_type); + } +} + +static void +chd_conn_init(struct cc_var *ccv) +{ + struct chd *chd_data; + + chd_data = ccv->cc_data; + chd_data->prev_backoff_qdly = 0; + chd_data->maxrtt_in_rtt = 0; + chd_data->loss_compete = 0; + /* + * Initialise the shadow_cwnd to be equal to snd_cwnd in case we are + * competing with loss based flows from the start. + */ + chd_data->shadow_w = CCV(ccv, snd_cwnd); +} + +static int +chd_mod_init(void) +{ + + ertt_id = khelp_get_id("ertt"); + if (ertt_id <= 0) { + printf("%s: h_ertt module not found\n", __func__); + return (ENOENT); + } + + chd_cc_algo.after_idle = newreno_cc_algo.after_idle; + chd_cc_algo.post_recovery = newreno_cc_algo.post_recovery; + + return (0); +} + +static int +chd_loss_fair_handler(SYSCTL_HANDLER_ARGS) +{ + int error; + uint32_t new; + + new = V_chd_loss_fair; + error = sysctl_handle_int(oidp, &new, 0, req); + if (error == 0 && req->newptr != NULL) { + if (CAST_PTR_INT(req->newptr) > 1) + error = EINVAL; + else + V_chd_loss_fair = new; + } + + return (error); +} + +static int +chd_pmax_handler(SYSCTL_HANDLER_ARGS) +{ + int error; + uint32_t new; + + new = V_chd_pmax; + error = sysctl_handle_int(oidp, &new, 0, req); + if (error == 0 && req->newptr != NULL) { + if (CAST_PTR_INT(req->newptr) == 0 || + CAST_PTR_INT(req->newptr) > 100) + error = EINVAL; + else + V_chd_pmax = new; + } + + return (error); +} + +static int +chd_qthresh_handler(SYSCTL_HANDLER_ARGS) +{ + int error; + uint32_t new; + + new = V_chd_qthresh; + error = sysctl_handle_int(oidp, &new, 0, req); + if (error == 0 && req->newptr != NULL) { + if (CAST_PTR_INT(req->newptr) <= V_chd_qmin) + error = EINVAL; + else + V_chd_qthresh = new; + } + + return (error); +} + +SYSCTL_DECL(_net_inet_tcp_cc_chd); +SYSCTL_NODE(_net_inet_tcp_cc, OID_AUTO, chd, CTLFLAG_RW, NULL, + "CAIA Hamilton delay-based congestion control related settings"); + +SYSCTL_VNET_PROC(_net_inet_tcp_cc_chd, OID_AUTO, loss_fair, + CTLTYPE_UINT|CTLFLAG_RW, &VNET_NAME(chd_loss_fair), 1, &chd_loss_fair_handler, + "IU", "Flag to enable shadow window functionality."); + +SYSCTL_VNET_PROC(_net_inet_tcp_cc_chd, OID_AUTO, pmax, + CTLTYPE_UINT|CTLFLAG_RW, &VNET_NAME(chd_pmax), 5, &chd_pmax_handler, + "IU", "Per RTT maximum backoff probability as a percentage"); + +SYSCTL_VNET_PROC(_net_inet_tcp_cc_chd, OID_AUTO, queue_threshold, + CTLTYPE_UINT|CTLFLAG_RW, &VNET_NAME(chd_qthresh), 20, &chd_qthresh_handler, + "IU", "Queueing congestion threshold in ticks"); + +SYSCTL_VNET_UINT(_net_inet_tcp_cc_chd, OID_AUTO, queue_min, + CTLTYPE_UINT|CTLFLAG_RW, &VNET_NAME(chd_qmin), 5, + "Minimum queueing delay threshold in ticks"); + +SYSCTL_VNET_UINT(_net_inet_tcp_cc_chd, OID_AUTO, use_max, + CTLTYPE_UINT|CTLFLAG_RW, &VNET_NAME(chd_use_max), 1, + "Use the maximum RTT seen within the measurement period (RTT) " + "as the basic delay measurement for the algorithm."); + +DECLARE_CC_MODULE(chd, &chd_cc_algo); +MODULE_DEPEND(chd, ertt, 1, 1, 1); From owner-svn-src-stable-8@FreeBSD.ORG Sat May 28 08:43:25 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E66B1065670; Sat, 28 May 2011 08:43:25 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D85688FC08; Sat, 28 May 2011 08:43:24 +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 p4S8hOY5076094; Sat, 28 May 2011 08:43:24 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4S8hOTS076090; Sat, 28 May 2011 08:43:24 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201105280843.p4S8hOTS076090@svn.freebsd.org> From: Lawrence Stewart Date: Sat, 28 May 2011 08:43:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222415 - in stable/8: etc/mtree share/examples share/examples/kld share/examples/kld/khelp X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 May 2011 08:43:25 -0000 Author: lstewart Date: Sat May 28 08:43:24 2011 New Revision: 222415 URL: http://svn.freebsd.org/changeset/base/222415 Log: MFC r218545,218914: Add an example Khelp module, which will be referenced in the forthcoming Khelp documentation. Sponsored by: FreeBSD Foundation Discussed with: David Hayes Added: stable/8/share/examples/kld/khelp/ - copied from r218545, head/share/examples/kld/khelp/ Modified: stable/8/etc/mtree/BSD.usr.dist stable/8/share/examples/Makefile stable/8/share/examples/kld/Makefile Directory Properties: stable/8/etc/ (props changed) stable/8/share/examples/ (props changed) stable/8/share/examples/cvsup/ (props changed) Modified: stable/8/etc/mtree/BSD.usr.dist ============================================================================== --- stable/8/etc/mtree/BSD.usr.dist Sat May 28 08:37:03 2011 (r222414) +++ stable/8/etc/mtree/BSD.usr.dist Sat May 28 08:43:24 2011 (r222415) @@ -240,6 +240,8 @@ fwimage .. .. + khelp + .. syscall module .. Modified: stable/8/share/examples/Makefile ============================================================================== --- stable/8/share/examples/Makefile Sat May 28 08:37:03 2011 (r222414) +++ stable/8/share/examples/Makefile Sat May 28 08:43:24 2011 (r222415) @@ -98,6 +98,9 @@ XFILES= BSD_daemon/FreeBSD.pfa \ kld/firmware/fwconsumer/fw_consumer.c \ kld/firmware/fwimage/Makefile \ kld/firmware/fwimage/firmware.img \ + kld/khelp/Makefile \ + kld/khelp/README \ + kld/khelp/h_example.c \ kld/syscall/Makefile \ kld/syscall/module/Makefile \ kld/syscall/module/syscall.c \ Modified: stable/8/share/examples/kld/Makefile ============================================================================== --- stable/8/share/examples/kld/Makefile Sat May 28 08:37:03 2011 (r222414) +++ stable/8/share/examples/kld/Makefile Sat May 28 08:43:24 2011 (r222415) @@ -67,6 +67,6 @@ # $FreeBSD$ # -SUBDIR= cdev dyn_sysctl firmware syscall +SUBDIR= cdev dyn_sysctl firmware khelp syscall .include From owner-svn-src-stable-8@FreeBSD.ORG Sat May 28 13:48:51 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9783B1065672; Sat, 28 May 2011 13:48:51 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 846298FC12; Sat, 28 May 2011 13:48: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 p4SDmot8086659; Sat, 28 May 2011 13:48:50 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4SDmoYd086645; Sat, 28 May 2011 13:48:50 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201105281348.p4SDmoYd086645@svn.freebsd.org> From: Lawrence Stewart Date: Sat, 28 May 2011 13:48:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222419 - in stable/8/share/man: man4 man9 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 May 2011 13:48:51 -0000 Author: lstewart Date: Sat May 28 13:48:49 2011 New Revision: 222419 URL: http://svn.freebsd.org/changeset/base/222419 Log: MFC r218912,218945,220237: - Add new man pages for the modular congestion control, Khelp and Hhook frameworks (cc.4, cc.9, khelp.9 and hhook.9). - Add new man pages for each available congestion control algorithm (cc_chd.4, cc_cubic.4, cc_hd.4, cc_htcp.4, cc_newreno.4 and cc_vegas.4). - Add a new man page for the Enhanced Round Trip Time (ERTT) Khelp module (h_ertt.4). - Update the TCP (tcp.4) man page to mention the TCP_CONGESTION socket option, cross reference to cc.4 and remove references to the retired "net.inet.tcp.newreno" sysctl MIB variable. In collaboration with: David Hayes and Grenville Armitage Sponsored by: FreeBSD Foundation Added: stable/8/share/man/man4/cc.4 - copied, changed from r218912, head/share/man/man4/cc.4 stable/8/share/man/man4/cc_chd.4 - copied, changed from r218912, head/share/man/man4/cc_chd.4 stable/8/share/man/man4/cc_cubic.4 - copied unchanged from r218912, head/share/man/man4/cc_cubic.4 stable/8/share/man/man4/cc_hd.4 - copied unchanged from r218912, head/share/man/man4/cc_hd.4 stable/8/share/man/man4/cc_htcp.4 - copied unchanged from r218912, head/share/man/man4/cc_htcp.4 stable/8/share/man/man4/cc_newreno.4 - copied unchanged from r218912, head/share/man/man4/cc_newreno.4 stable/8/share/man/man4/cc_vegas.4 - copied unchanged from r218912, head/share/man/man4/cc_vegas.4 stable/8/share/man/man4/h_ertt.4 - copied unchanged from r218912, head/share/man/man4/h_ertt.4 stable/8/share/man/man9/cc.9 - copied unchanged from r218912, head/share/man/man9/cc.9 stable/8/share/man/man9/hhook.9 - copied unchanged from r218912, head/share/man/man9/hhook.9 stable/8/share/man/man9/khelp.9 - copied unchanged from r218912, head/share/man/man9/khelp.9 Modified: stable/8/share/man/man4/Makefile stable/8/share/man/man4/tcp.4 stable/8/share/man/man9/Makefile Directory Properties: stable/8/share/man/ (props changed) stable/8/share/man/man1/ (props changed) stable/8/share/man/man3/ (props changed) stable/8/share/man/man4/ (props changed) stable/8/share/man/man5/ (props changed) stable/8/share/man/man7/ (props changed) stable/8/share/man/man8/ (props changed) stable/8/share/man/man9/ (props changed) Modified: stable/8/share/man/man4/Makefile ============================================================================== --- stable/8/share/man/man4/Makefile Sat May 28 11:37:47 2011 (r222418) +++ stable/8/share/man/man4/Makefile Sat May 28 13:48:49 2011 (r222419) @@ -67,6 +67,13 @@ MAN= aac.4 \ cardbus.4 \ carp.4 \ cas.4 \ + cc.4 \ + cc_chd.4 \ + cc_cubic.4 \ + cc_hd.4 \ + cc_htcp.4 \ + cc_newreno.4 \ + cc_vegas.4 \ ccd.4 \ cd.4 \ cdce.4 \ @@ -127,6 +134,7 @@ MAN= aac.4 \ gif.4 \ gpib.4 \ gre.4 \ + h_ertt.4 \ harp.4 \ hatm.4 \ hfa.4 \ Copied and modified: stable/8/share/man/man4/cc.4 (from r218912, head/share/man/man4/cc.4) ============================================================================== --- head/share/man/man4/cc.4 Mon Feb 21 11:56:11 2011 (r218912, copy source) +++ stable/8/share/man/man4/cc.4 Sat May 28 13:48:49 2011 (r222419) @@ -65,8 +65,6 @@ MIB: .Bl -tag -width ".Va available" .It Va available Read-only list of currently available congestion control algorithms by name. -.El -.Bl -tag -width ".Va algorithm" .It Va algorithm Returns the current default congestion control algorithm when read, and changes the default when set. Copied and modified: stable/8/share/man/man4/cc_chd.4 (from r218912, head/share/man/man4/cc_chd.4) ============================================================================== --- head/share/man/man4/cc_chd.4 Mon Feb 21 11:56:11 2011 (r218912, copy source) +++ stable/8/share/man/man4/cc_chd.4 Sat May 28 13:48:49 2011 (r222419) @@ -58,6 +58,7 @@ do not cause cwnd to be reduced. .It CHD uses a shadow window to help regain lost transmission opportunities when competing with loss-based TCP flows. +.El .Sh MIB Variables The algorithm exposes the following tunable variables in the .Va net.inet.tcp.cc.chd Copied: stable/8/share/man/man4/cc_cubic.4 (from r218912, head/share/man/man4/cc_cubic.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/share/man/man4/cc_cubic.4 Sat May 28 13:48:49 2011 (r222419, copy of r218912, head/share/man/man4/cc_cubic.4) @@ -0,0 +1,114 @@ +.\" +.\" Copyright (c) 2009 Lawrence Stewart +.\" Copyright (c) 2010-2011 The FreeBSD Foundation +.\" All rights reserved. +.\" +.\" Portions of this documentation were written at the Centre for Advanced +.\" Internet Architectures, Swinburne University, Melbourne, Australia by +.\" David Hayes under sponsorship from the FreeBSD Foundation. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR +.\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd February 15, 2011 +.Dt CC_CUBIC 4 +.Os +.Sh NAME +.Nm cc_cubic +.Nd CUBIC Congestion Control Algorithm +.Sh DESCRIPTION +The CUBIC congestion control algorithm was designed to provide increased +throughput in fast and long-distance networks. +It attempts to maintain fairness when competing with legacy NewReno TCP in lower +speed scenarios where NewReno is able to operate adequately. +.Pp +The congestion window is increased as a function of the time elapsed since the +last congestion event. +During regular operation, the window increase function follows a cubic function, +with the inflection point set to be the congestion window value reached at the +last congestion event. +CUBIC also calculates an estimate of the congestion window that NewReno would +have achieved at a given time after a congestion event. +When updating the congestion window, the algorithm will choose the larger of the +calculated CUBIC and estimated NewReno windows. +.Pp +CUBIC also backs off less on congestion by changing the multiplicative decrease +factor from 1/2 (used by standard NewReno TCP) to 4/5. +.Pp +The implementation was done in a clean-room fashion, and is based on the +Internet Draft and paper referenced in the +.Sx SEE ALSO +section below. +.Sh MIB Variables +There are currently no tunable MIB variables. +.Sh SEE ALSO +.Xr cc 4 , +.Xr cc_chd 4 , +.Xr cc_hd 4 , +.Xr cc_htcp 4 , +.Xr cc_newreno 4 , +.Xr cc_vegas 4 , +.Xr tcp 4 , +.Xr cc 9 +.Rs +.%A "Sangtae Ha" +.%A "Injong Rhee" +.%A "Lisong Xu" +.%T "CUBIC for Fast Long-Distance Networks" +.%U "http://tools.ietf.org/id/draft-rhee-tcpm-cubic-02.txt" +.Re +.Rs +.%A "Sangtae Ha" +.%A "Injong Rhee" +.%A "Lisong Xu" +.%T "CUBIC: a new TCP-friendly high-speed TCP variant" +.%J "SIGOPS Oper. Syst. Rev." +.%V "42" +.%N "5" +.%D "July 2008" +.%P "64-74" +.Re +.Sh ACKNOWLEDGEMENTS +Development and testing of this software were made possible in part by grants +from the FreeBSD Foundation and Cisco University Research Program Fund at +Community Foundation Silicon Valley. +.Sh HISTORY +The +.Nm +congestion control module first appeared in +.Fx 9.0 . +.Pp +The module was first released in 2009 by Lawrence Stewart whilst studying at +Swinburne University's Centre for Advanced Internet Architectures, Melbourne, +Australia. +More details are available at: +.Pp +http://caia.swin.edu.au/urp/newtcp/ +.Sh AUTHORS +.An -nosplit +The +.Nm +congestion control module and this manual page were written by +.An Lawrence Stewart Aq lstewart@FreeBSD.org +and +.An David Hayes Aq david.hayes@ieee.org . Copied: stable/8/share/man/man4/cc_hd.4 (from r218912, head/share/man/man4/cc_hd.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/share/man/man4/cc_hd.4 Sat May 28 13:48:49 2011 (r222419, copy of r218912, head/share/man/man4/cc_hd.4) @@ -0,0 +1,120 @@ +.\" +.\" Copyright (c) 2010-2011 The FreeBSD Foundation +.\" All rights reserved. +.\" +.\" This documentation was written at the Centre for Advanced Internet +.\" Architectures, Swinburne University, Melbourne, Australia by David Hayes +.\" under sponsorship from the FreeBSD Foundation. +.\" +.\" 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. +.\" +.\" $FreeBSD$ +.\" +.Dd February 15, 2011 +.Dt CC_HD 4 +.Os +.Sh NAME +.Nm cc_hd +.Nd HD Congestion Control Algorithm +.Sh DESCRIPTION +The HD congestion control algorithm is an implementation of the Hamilton +Institute's delay-based congestion control which aims to keep network queuing +delays below a particular threshold (queue_threshold). +.Pp +HD probabilistically reduces the congestion window (cwnd) based on its estimate +of the network queuing delay. +The probability of reducing cwnd is zero at hd_qmin or less, rising to a maximum +at queue_threshold, and then back to zero at the maximum queuing delay. +.Pp +Loss-based congestion control algorithms such as NewReno probe for network +capacity by filling queues until there is a packet loss. +HD competes with loss-based congestion control algorithms by allowing its +probability of reducing cwnd to drop from a maximum at queue_threshold to be +zero at the maximum queuing delay. +This has been shown to work well when the bottleneck link is highly multiplexed. +.Sh MIB Variables +The algorithm exposes the following tunable variables in the +.Va net.inet.tcp.cc.hd +branch of the +.Xr sysctl 3 +MIB: +.Bl -tag -width ".Va queue_threshold" +.It Va queue_threshold +Queueing congestion threshold (qth) in ticks. +Default is 20. +.It Va pmax +Per packet maximum backoff probability as a percentage. +Default is 5. +.It Va qmin +Minimum queuing delay threshold (qmin) in ticks. +Default is 5. +.El +.Sh SEE ALSO +.Xr cc 4 , +.Xr cc_chd 4 , +.Xr cc_cubic 4 , +.Xr cc_htcp 4 , +.Xr cc_newreno 4 , +.Xr cc_vegas 4 , +.Xr h_ertt 4 , +.Xr tcp 4 , +.Xr cc 9 , +.Xr khelp 9 +.Rs +.%A "L. Budzisz" +.%A "R. Stanojevic" +.%A "R. Shorten" +.%A "F. Baker" +.%T "A strategy for fair coexistence of loss and delay-based congestion control algorithms" +.%J "IEEE Commun. Lett." +.%D "Jul 2009" +.%V "13" +.%N "7" +.%P "555-557" +.Re +.Sh ACKNOWLEDGEMENTS +Development and testing of this software were made possible in part by grants +from the FreeBSD Foundation and Cisco University Research Program Fund at +Community Foundation Silicon Valley. +.Sh FUTURE WORK +The Hamilton Institute have recently made some improvements to the algorithm +implemented by this module and have called it Coexistent-TCP (C-TCP). +The improvments should be evaluated and potentially incorporated into this +module. +.Sh HISTORY +The +.Nm +congestion control module first appeared in +.Fx 9.0 . +.Pp +The module was first released in 2010 by David Hayes whilst working on the +NewTCP research project at Swinburne University's Centre for Advanced Internet +Architectures, Melbourne, Australia. +More details are available at: +.Pp +http://caia.swin.edu.au/urp/newtcp/ +.Sh AUTHORS +.An -nosplit +The +.Nm +congestion control module and this manual page were written by +.An David Hayes Aq david.hayes@ieee.org . Copied: stable/8/share/man/man4/cc_htcp.4 (from r218912, head/share/man/man4/cc_htcp.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/share/man/man4/cc_htcp.4 Sat May 28 13:48:49 2011 (r222419, copy of r218912, head/share/man/man4/cc_htcp.4) @@ -0,0 +1,136 @@ +.\" +.\" Copyright (c) 2008 Lawrence Stewart +.\" Copyright (c) 2010-2011 The FreeBSD Foundation +.\" All rights reserved. +.\" +.\" Portions of this documentation were written at the Centre for Advanced +.\" Internet Architectures, Swinburne University, Melbourne, Australia by +.\" David Hayes under sponsorship from the FreeBSD Foundation. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR +.\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd February 15, 2011 +.Dt CC_HTCP 4 +.Os +.Sh NAME +.Nm cc_htcp +.Nd H-TCP Congestion Control Algorithm +.Sh DESCRIPTION +The H-TCP congestion control algorithm was designed to provide increased +throughput in fast and long-distance networks. +It attempts to maintain fairness when competing with legacy NewReno TCP in lower +speed scenarios where NewReno is able to operate adequately. +.Pp +The congestion window is increased as a function of the time elapsed since the +last congestion event. +The window increase algorithm operates like NewReno for the first second after a +congestion event, and then switches to a high-speed mode based on a quadratic +increase function. +.Pp +The implementation was done in a clean-room fashion, and is based on the +Internet Draft and other documents referenced in the +.Sx SEE ALSO +section below. +.Sh MIB Variables +The algorithm exposes the following tunable variables in the +.Va net.inet.tcp.cc.htcp +branch of the +.Xr sysctl 3 +MIB: +.Bl -tag -width ".Va adaptive_backoff" +.It Va adaptive_backoff +Controls use of the adaptive backoff algorithm, which is designed to keep +network queues non-empty during congestion recovery episodes. +Default is 0 (disabled). +.It Va rtt_scaling +Controls use of the RTT scaling algorithm, which is designed to make congestion +window increase during congestion avoidance mode invariant with respect to RTT. +Default is 0 (disabled). +.El +.Sh SEE ALSO +.Xr cc 4 , +.Xr cc_chd 4 , +.Xr cc_cubic 4 , +.Xr cc_hd 4 , +.Xr cc_newreno 4 , +.Xr cc_vegas 4 , +.Xr tcp 4 , +.Xr cc 9 +.Rs +.%A "D. Leith" +.%A "R. Shorten" +.%T "H-TCP: TCP Congestion Control for High Bandwidth-Delay Product Paths" +.%U "http://tools.ietf.org/id/draft-leith-tcp-htcp-06.txt" +.Re +.Rs +.%A "D. Leith" +.%A "R. Shorten" +.%A "T. Yee" +.%T "H-TCP: A framework for congestion control in high-speed and long-distance networks" +.%B "Proc. PFLDnet" +.%D "2005" +.Re +.Rs +.%A "G. Armitage" +.%A "L. Stewart" +.%A "M. Welzl" +.%A "J. Healy" +.%T "An independent H-TCP implementation under FreeBSD 7.0: description and observed behaviour" +.%J "SIGCOMM Comput. Commun. Rev." +.%V "38" +.%N "3" +.%D "July 2008" +.%P "27-38" +.Re +.Sh ACKNOWLEDGEMENTS +Development and testing of this software were made possible in part by grants +from the FreeBSD Foundation and Cisco University Research Program Fund at +Community Foundation Silicon Valley. +.Sh HISTORY +The +.Nm +congestion control module first appeared in +.Fx 9.0 . +.Pp +The module was first released in 2007 by James Healy and Lawrence Stewart whilst +working on the NewTCP research project at Swinburne University's Centre for +Advanced Internet Architectures, Melbourne, Australia, which was made possible +in part by a grant from the Cisco University Research Program Fund at Community +Foundation Silicon Valley. +More details are available at: +.Pp +http://caia.swin.edu.au/urp/newtcp/ +.Sh AUTHORS +.An -nosplit +The +.Nm +congestion control module was written by +.An James Healy Aq jimmy@deefa.com +and +.An Lawrence Stewart Aq lstewart@FreeBSD.org . +.Pp +This manual page was written by +.An Lawrence Stewart Aq lstewart@FreeBSD.org +and +.An David Hayes Aq david.hayes@ieee.org . Copied: stable/8/share/man/man4/cc_newreno.4 (from r218912, head/share/man/man4/cc_newreno.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/share/man/man4/cc_newreno.4 Sat May 28 13:48:49 2011 (r222419, copy of r218912, head/share/man/man4/cc_newreno.4) @@ -0,0 +1,82 @@ +.\" +.\" Copyright (c) 2009 Lawrence Stewart +.\" Copyright (c) 2011 The FreeBSD Foundation +.\" All rights reserved. +.\" +.\" Portions of this documentation were written at the Centre for Advanced +.\" Internet Architectures, Swinburne University, Melbourne, Australia by +.\" Lawrence Stewart under sponsorship from the FreeBSD Foundation. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" 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. +.\" +.\" $FreeBSD$ +.\" +.Dd February 15, 2011 +.Dt CC_NEWRENO 4 +.Os +.Sh NAME +.Nm cc_newreno +.Nd NewReno Congestion Control Algorithm +.Sh DESCRIPTION +The NewReno congestion control algorithm is the default for TCP. +Details about the algorithm can be found in RFC5681. +.Sh MIB Variables +There are currently no tunable MIB variables. +.Sh SEE ALSO +.Xr cc 4 , +.Xr cc_chd 4 , +.Xr cc_cubic 4 , +.Xr cc_hd 4 , +.Xr cc_htcp 4 , +.Xr cc_vegas 4 , +.Xr tcp 4 , +.Xr cc 9 +.Sh ACKNOWLEDGEMENTS +Development and testing of this software were made possible in part by grants +from the FreeBSD Foundation and Cisco University Research Program Fund at +Community Foundation Silicon Valley. +.Sh HISTORY +The +.Nm +congestion control algorithm first appeared in its modular form in +.Fx 9.0 . +.Pp +The module was first released in 2007 by James Healy and Lawrence Stewart whilst +working on the NewTCP research project at Swinburne University's Centre for +Advanced Internet Architectures, Melbourne, Australia, which was made possible +in part by a grant from the Cisco University Research Program Fund at Community +Foundation Silicon Valley. +More details are available at: +.Pp +http://caia.swin.edu.au/urp/newtcp/ +.Sh AUTHORS +.An -nosplit +The +.Nm +congestion control module was written by +.An James Healy Aq jimmy@deefa.com , +.An Lawrence Stewart Aq lstewart@FreeBSD.org +and +.An David Hayes Aq david.hayes@ieee.org . +.Pp +This manual page was written by +.An Lawrence Stewart Aq lstewart@FreeBSD.org . Copied: stable/8/share/man/man4/cc_vegas.4 (from r218912, head/share/man/man4/cc_vegas.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/share/man/man4/cc_vegas.4 Sat May 28 13:48:49 2011 (r222419, copy of r218912, head/share/man/man4/cc_vegas.4) @@ -0,0 +1,138 @@ +.\" +.\" Copyright (c) 2010-2011 The FreeBSD Foundation +.\" All rights reserved. +.\" +.\" This documentation was written at the Centre for Advanced Internet +.\" Architectures, Swinburne University, Melbourne, Australia by David Hayes +.\" under sponsorship from the FreeBSD Foundation. +.\" +.\" 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. +.\" +.\" $FreeBSD$ +.\" +.Dd February 15, 2011 +.Dt CC_VEGAS 4 +.Os +.Sh NAME +.Nm cc_vegas +.Nd Vegas Congestion Control Algorithm +.Sh DESCRIPTION +The Vegas congestion control algorithm uses what the authors term the actual and +expected transmission rates to determine whether there is congestion along the +network path i.e. +.Pp +.Bl -item -offset indent +.It +actual rate = (total data sent in a RTT) / RTT +.It +expected rate = cwnd / RTTmin +.It +diff = expected - actual +.El +.Pp +where RTT is the measured instantaneous round trip time and RTTmin is the +smallest round trip time observed during the connection. +.Pp +The algorithm aims to keep diff between two parameters alpha and beta, such +that: +.Pp +.Bl -item -offset indent +.It +alpha < diff < beta +.El +.Pp +If diff > beta, congestion is inferred and cwnd is decremented by one packet (or +the maximum TCP segment size). +If diff < alpha, then cwnd is incremented by one packet. +Alpha and beta govern the amount of buffering along the path. +.Pp +The implementation was done in a clean-room fashion, and is based on the +paper referenced in the +.Sx SEE ALSO +section below. +.Sh IMPLEMENTATION NOTES +The time from the transmission of a marked packet until the receipt of an +acknowledgement for that packet is measured once per RTT. +This implementation does not implement Brakmo's and Peterson's original +duplicate ACK policy since clock ticks in today's machines are not as coarse as +they were (i.e. 500ms) when Vegas was originally designed. +Note that modern TCP recovery processes such as fast retransmit and SACK are +enabled by default in the TCP stack. +.Sh MIB Variables +The algorithm exposes the following tunable variables in the +.Va net.inet.tcp.cc.vegas +branch of the +.Xr sysctl 3 +MIB: +.Bl -tag -width ".Va alpha" +.It Va alpha +Query or set the Vegas alpha parameter as a number of buffers on the path. +When setting alpha, the value must satisfy: 0 < alpha < beta. +Default is 1. +.It Va beta +Query or set the Vegas beta parameter as a number of buffers on the path. +When setting beta, the value must satisfy: 0 < alpha < beta. +Default is 3. +.El +.Sh SEE ALSO +.Xr cc 4 , +.Xr cc_chd 4 , +.Xr cc_cubic 4 , +.Xr cc_hd 4 , +.Xr cc_htcp 4 , +.Xr cc_newreno 4 , +.Xr h_ertt 4 , +.Xr tcp 4 , +.Xr cc 9 , +.Xr khelp 9 +.Rs +.%A "L. S. Brakmo" +.%A "L. L. Peterson" +.%T "TCP Vegas: end to end congestion avoidance on a global internet" +.%J "IEEE J. Sel. Areas Commun." +.%D "October 1995" +.%V "13" +.%N "8" +.%P "1465-1480" +.Re +.Sh ACKNOWLEDGEMENTS +Development and testing of this software were made possible in part by grants +from the FreeBSD Foundation and Cisco University Research Program Fund at +Community Foundation Silicon Valley. +.Sh HISTORY +The +.Nm +congestion control module first appeared in +.Fx 9.0 . +.Pp +The module was first released in 2010 by David Hayes whilst working on the +NewTCP research project at Swinburne University's Centre for Advanced Internet +Architectures, Melbourne, Australia. +More details are available at: +.Pp +http://caia.swin.edu.au/urp/newtcp/ +.Sh AUTHORS +.An -nosplit +The +.Nm +congestion control module and this manual page were written by +.An David Hayes Aq david.hayes@ieee.org . Copied: stable/8/share/man/man4/h_ertt.4 (from r218912, head/share/man/man4/h_ertt.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/share/man/man4/h_ertt.4 Sat May 28 13:48:49 2011 (r222419, copy of r218912, head/share/man/man4/h_ertt.4) @@ -0,0 +1,143 @@ +.\" +.\" Copyright (c) 2010-2011 The FreeBSD Foundation +.\" All rights reserved. +.\" +.\" This documentation was written at the Centre for Advanced Internet +.\" Architectures, Swinburne University, Melbourne, Australia by David Hayes +.\" under sponsorship from the FreeBSD Foundation. +.\" +.\" 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. +.\" +.\" $FreeBSD$ +.\" +.Dd February 15, 2011 +.Dt h_ertt 9 +.Os +.Sh NAME +.Nm h_ertt +.Nd Enhanced Round Trip Time Khelp module +.Sh SYNOPSIS +.In netinet/khelp/h_ertt.h +.Sh DESCRIPTION +The +.Nm +Khelp module works within the +.Xr khelp 9 +framework to provide TCP with a per-connection, low noise estimate of the +instantaneous RTT. +The implementation attempts to be robust in the face of delayed +acknowledgements, TCP Segmentation Offload (TSO), receivers who manipulate TCP +timestamps and lack of the TCP timestamp option altogether. +.Pp +TCP receivers using delayed acknowledgements either acknowledge every second packet +(reflecting the time stamp of the first) or use a timeout to trigger the +acknowledgement if no second packet arrives. +If the heuristic used by +.Nm +determines that the receiver is using delayed acknowledgements, it measures the +RTT using the second packet (the one that triggers the acknowledgement). +It does not measure the RTT if the acknowledgement is for the +first packet, since it cannot be accurately determined. +.Pp +When TSO is in use, +.Nm +will momentarily disable TSO whilst marking a packet to use for a new +measurement. +The process has negligible impact on the connection. +.Pp +.Nm +associates the following struct with each connection's TCP control block: +.Bd -literal +struct ertt { + TAILQ_HEAD(txseginfo_head, txseginfo) txsegi_q; /* Private. */ + long bytes_tx_in_rtt; /* Private. */ + long bytes_tx_in_marked_rtt; + unsigned long marked_snd_cwnd; + int rtt; + int maxrtt; + int minrtt; + int dlyack_rx; /* Private. */ + int timestamp_errors; /* Private. */ + int markedpkt_rtt; /* Private. */ + uint32_t flags; +}; +.Ed +.Pp +The fields marked as private should not be manipulated by any code outside of +the +.Nm +implementation. +The non-private fields provide the following data: +.Bl -tag -width ".Va bytes_tx_in_marked_rtt" -offset indent +.It Va bytes_tx_in_marked_rtt +The number of bytes transmitted in the +.Va markedpkt_rtt . +.It Va marked_snd_cwnd +The value of cwnd for the marked rtt measurement. +.It Va rtt +The most recent RTT measurement. +.It Va maxrtt +The longest RTT measurement that has been taken. +.It Va minrtt +The shortest RTT measurement that has been taken. +.It Va flags +The ERTT_NEW_MEASUREMENT flag will be set by the implementation when a new +measurement is available. +It is the responsibility of +.Nm +consumers to unset the flag if they wish to use it as a notification method for +new measurements. +.El +.Sh SEE ALSO +.Xr cc 4 , +.Xr cc_chd 4 , +.Xr cc_hd 4 , +.Xr cc_vegas 4 , +.Xr hhook 9 , +.Xr khelp 9 +.Sh ACKNOWLEDGEMENTS +Development and testing of this software were made possible in part by grants +from the FreeBSD Foundation and Cisco University Research Program Fund at +Community Foundation Silicon Valley. +.Sh HISTORY +The +.Nm +module first appeared in +.Fx 9.0 . +.Pp +The module was first released in 2010 by David Hayes whilst working on the +NewTCP research project at Swinburne University's Centre for Advanced Internet +Architectures, Melbourne, Australia. +More details are available at: +.Pp +http://caia.swin.edu.au/urp/newtcp/ +.Sh AUTHORS +.An -nosplit +The +.Nm +Khelp module and this manual page were written by +.An David Hayes Aq david.hayes@ieee.org . +.Sh BUGS +The module maintains enhanced RTT estimates for all new TCP connections created +after the time at which the module was loaded. +It might be beneficial to see if it is possible to have the module only affect +connections which actually care about ERTT estimates. Modified: stable/8/share/man/man4/tcp.4 ============================================================================== --- stable/8/share/man/man4/tcp.4 Sat May 28 11:37:47 2011 (r222418) +++ stable/8/share/man/man4/tcp.4 Sat May 28 13:48:49 2011 (r222419) @@ -1,5 +1,11 @@ .\" Copyright (c) 1983, 1991, 1993 -.\" The Regents of the University of California. All rights reserved. +.\" The Regents of the University of California. +.\" Copyright (c) 2010-2011 The FreeBSD Foundation +.\" All rights reserved. +.\" +.\" Portions of this documentation were written at the Centre for Advanced +.\" Internet Architectures, Swinburne University of Technology, Melbourne, +.\" Australia by David Hayes under sponsorship from the FreeBSD Foundation. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -32,7 +38,7 @@ .\" From: @(#)tcp.4 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd January 8, 2011 +.Dd February 15, 2011 .Dt TCP 4 .Os .Sh NAME @@ -116,7 +122,7 @@ supports a number of socket options whic .Xr setsockopt 2 and tested with .Xr getsockopt 2 : -.Bl -tag -width ".Dv TCP_NODELAY" +.Bl -tag -width ".Dv TCP_CONGESTION" .It Dv TCP_INFO Information about a socket's underlying TCP session may be retrieved by passing the read-only option @@ -134,6 +140,12 @@ send window size, receive window size, and bandwidth-controlled window space. +.It Dv TCP_CONGESTION +Select or query the congestion control algorithm that TCP will use for the +connection. +See +.Xr cc 4 +for details. .It Dv TCP_NODELAY Under most circumstances, .Tn TCP @@ -231,6 +243,14 @@ see .Xr ip 4 . Incoming connection requests that are source-routed are noted, and the reverse source route is used in responding. +.Pp +The default congestion control algorithm for +.Tn TCP +is +.Xr cc_newreno 4 . +Other congestion control algorithms can be made available using the +.Xr cc 4 +framework. .Ss MIB Variables The .Tn TCP @@ -322,11 +342,6 @@ See Delay ACK to try and piggyback it onto a data packet. .It Va delacktime Maximum amount of time, in milliseconds, before a delayed ACK is sent. -.It Va newreno -Enable -.Tn TCP -NewReno Fast Recovery algorithm, -as described in RFC 2582. .It Va path_mtu_discovery Enable Path MTU Discovery. .It Va tcbhashsize @@ -561,6 +576,7 @@ address. .Xr socket 2 , .Xr sysctl 3 , .Xr blackhole 4 , +.Xr cc 4 , .Xr inet 4 , .Xr intro 4 , .Xr ip 4 , Modified: stable/8/share/man/man9/Makefile ============================================================================== --- stable/8/share/man/man9/Makefile Sat May 28 11:37:47 2011 (r222418) +++ stable/8/share/man/man9/Makefile Sat May 28 13:48:49 2011 (r222419) @@ -43,6 +43,7 @@ MAN= accept_filter.9 \ BUS_SETUP_INTR.9 \ bus_space.9 \ byteorder.9 \ + cc.9 \ cd.9 \ condvar.9 \ config_intrhook.9 \ @@ -122,6 +123,7 @@ MAN= accept_filter.9 \ hash.9 \ hashinit.9 \ hexdump.9 \ + hhook.9 \ ieee80211.9 \ ieee80211_amrr.9 \ ieee80211_beacon.9 \ @@ -144,6 +146,7 @@ MAN= accept_filter.9 \ KASSERT.9 \ kernacc.9 \ kernel_mount.9 \ + khelp.9 \ kobj.9 \ kproc.9 \ kqueue.9 \ Copied: stable/8/share/man/man9/cc.9 (from r218912, head/share/man/man9/cc.9) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/share/man/man9/cc.9 Sat May 28 13:48:49 2011 (r222419, copy of r218912, head/share/man/man9/cc.9) @@ -0,0 +1,333 @@ +.\" +.\" Copyright (c) 2008-2009 Lawrence Stewart +.\" Copyright (c) 2010-2011 The FreeBSD Foundation +.\" All rights reserved. +.\" +.\" Portions of this documentation were written at the Centre for Advanced +.\" Internet Architectures, Swinburne University, Melbourne, Australia by +.\" David Hayes and Lawrence Stewart under sponsorship from the +.\" FreeBSD Foundation. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" 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. +.\" +.\" $FreeBSD$ +.\" +.Dd February 15, 2011 +.Dt CC 9 +.Os +.Sh NAME +.Nm cc , +.Nm DECLARE_CC_MODULE , +.Nm CC_VAR +.Nd Modular Congestion Control +.Sh SYNOPSIS +.In netinet/cc.h +.In netinet/cc/cc_module.h +.Fn DECLARE_CC_MODULE "ccname" "ccalgo" +.Fn CC_VAR "ccv" "what" +.Sh DESCRIPTION +The +.Nm +framework allows congestion control algorithms to be implemented as dynamically +loadable kernel modules via the +.Xr kld 4 +facility. +Transport protocols can select from the list of available algorithms on a +connection-by-connection basis, or use the system default (see +.Xr cc 4 +for more details). +.Pp +.Nm +modules are identified by an +.Xr ascii 7 +name and set of hook functions encapsulated in a +.Vt "struct cc_algo" , +which has the following members: +.Bd -literal -offset indent +struct cc_algo { + char name[TCP_CA_NAME_MAX]; + int (*mod_init) (void); + int (*mod_destroy) (void); + int (*cb_init) (struct cc_var *ccv); + void (*cb_destroy) (struct cc_var *ccv); + void (*conn_init) (struct cc_var *ccv); + void (*ack_received) (struct cc_var *ccv, uint16_t type); + void (*cong_signal) (struct cc_var *ccv, uint32_t type); + void (*post_recovery) (struct cc_var *ccv); + void (*after_idle) (struct cc_var *ccv); +}; +.Ed +.Pp +The +.Va name +field identifies the unique name of the algorithm, and should be no longer than +TCP_CA_NAME_MAX-1 characters in length (the TCP_CA_NAME_MAX define lives in +.In netinet/tcp.h +for compatibility reasons). +.Pp +The +.Va mod_init +function is called when a new module is loaded into the system but before the +registration process is complete. +It should be implemented if a module needs to set up some global state prior to +being available for use by new connections. +Returning a non-zero value from +.Va mod_init *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-8@FreeBSD.ORG Sat May 28 13:54:20 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0239106564A; Sat, 28 May 2011 13:54:20 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AC0A38FC12; Sat, 28 May 2011 13:54: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 p4SDsKue086909; Sat, 28 May 2011 13:54:20 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4SDsKOm086876; Sat, 28 May 2011 13:54:20 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201105281354.p4SDsKOm086876@svn.freebsd.org> From: Lawrence Stewart Date: Sat, 28 May 2011 13:54:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222420 - in stable/8: share/man/man4 share/man/man9 sys/kern sys/netinet sys/netinet/cc sys/netinet/khelp sys/sys X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 May 2011 13:54:20 -0000 Author: lstewart Date: Sat May 28 13:54:19 2011 New Revision: 222420 URL: http://svn.freebsd.org/changeset/base/222420 Log: MFC r220560: Use the full and proper company name for Swinburne University of Technology throughout the source tree. Requested by: Grenville Armitage, Director of CAIA at Swinburne University of Technology Modified: stable/8/share/man/man4/cc.4 stable/8/share/man/man4/cc_chd.4 stable/8/share/man/man4/cc_cubic.4 stable/8/share/man/man4/cc_hd.4 stable/8/share/man/man4/cc_htcp.4 stable/8/share/man/man4/cc_newreno.4 stable/8/share/man/man4/cc_vegas.4 stable/8/share/man/man4/h_ertt.4 stable/8/share/man/man4/siftr.4 stable/8/share/man/man9/cc.9 stable/8/share/man/man9/hhook.9 stable/8/share/man/man9/khelp.9 stable/8/sys/kern/kern_hhook.c stable/8/sys/kern/kern_khelp.c stable/8/sys/netinet/cc.h stable/8/sys/netinet/cc/cc.c stable/8/sys/netinet/cc/cc_chd.c stable/8/sys/netinet/cc/cc_cubic.c stable/8/sys/netinet/cc/cc_cubic.h stable/8/sys/netinet/cc/cc_hd.c stable/8/sys/netinet/cc/cc_htcp.c stable/8/sys/netinet/cc/cc_module.h stable/8/sys/netinet/cc/cc_newreno.c stable/8/sys/netinet/cc/cc_vegas.c stable/8/sys/netinet/khelp/h_ertt.c stable/8/sys/netinet/khelp/h_ertt.h stable/8/sys/netinet/siftr.c stable/8/sys/netinet/tcp_input.c stable/8/sys/sys/hhook.h stable/8/sys/sys/khelp.h stable/8/sys/sys/module_khelp.h Directory Properties: stable/8/share/man/ (props changed) stable/8/share/man/man1/ (props changed) stable/8/share/man/man3/ (props changed) stable/8/share/man/man4/ (props changed) stable/8/share/man/man5/ (props changed) stable/8/share/man/man7/ (props changed) stable/8/share/man/man8/ (props changed) stable/8/share/man/man9/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/share/man/man4/cc.4 ============================================================================== --- stable/8/share/man/man4/cc.4 Sat May 28 13:48:49 2011 (r222419) +++ stable/8/share/man/man4/cc.4 Sat May 28 13:54:19 2011 (r222420) @@ -3,8 +3,9 @@ .\" All rights reserved. .\" .\" This documentation was written at the Centre for Advanced Internet -.\" Architectures, Swinburne University, Melbourne, Australia by David Hayes and -.\" Lawrence Stewart under sponsorship from the FreeBSD Foundation. +.\" Architectures, Swinburne University of Technology, Melbourne, Australia by +.\" David Hayes and Lawrence Stewart under sponsorship from the FreeBSD +.\" Foundation. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -93,10 +94,10 @@ modular congestion control framework fir .Fx 9.0 . .Pp The framework was first released in 2007 by James Healy and Lawrence Stewart -whilst working on the NewTCP research project at Swinburne University's Centre -for Advanced Internet Architectures, Melbourne, Australia, which was made -possible in part by a grant from the Cisco University Research Program Fund at -Community Foundation Silicon Valley. +whilst working on the NewTCP research project at Swinburne University of +Technology's Centre for Advanced Internet Architectures, Melbourne, Australia, +which was made possible in part by a grant from the Cisco University Research +Program Fund at Community Foundation Silicon Valley. More details are available at: .Pp http://caia.swin.edu.au/urp/newtcp/ Modified: stable/8/share/man/man4/cc_chd.4 ============================================================================== --- stable/8/share/man/man4/cc_chd.4 Sat May 28 13:48:49 2011 (r222419) +++ stable/8/share/man/man4/cc_chd.4 Sat May 28 13:54:19 2011 (r222420) @@ -3,8 +3,8 @@ .\" All rights reserved. .\" .\" This documentation was written at the Centre for Advanced Internet -.\" Architectures, Swinburne University, Melbourne, Australia by David Hayes -.\" under sponsorship from the FreeBSD Foundation. +.\" Architectures, Swinburne University of Technology, Melbourne, Australia by +.\" David Hayes under sponsorship from the FreeBSD Foundation. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -115,8 +115,8 @@ congestion control module first appeared .Fx 9.0 . .Pp The module was first released in 2010 by David Hayes whilst working on the -NewTCP research project at Swinburne University's Centre for Advanced Internet -Architectures, Melbourne, Australia. +NewTCP research project at Swinburne University of Technology's Centre for +Advanced Internet Architectures, Melbourne, Australia. More details are available at: .Pp http://caia.swin.edu.au/urp/newtcp/ Modified: stable/8/share/man/man4/cc_cubic.4 ============================================================================== --- stable/8/share/man/man4/cc_cubic.4 Sat May 28 13:48:49 2011 (r222419) +++ stable/8/share/man/man4/cc_cubic.4 Sat May 28 13:54:19 2011 (r222420) @@ -4,8 +4,8 @@ .\" All rights reserved. .\" .\" Portions of this documentation were written at the Centre for Advanced -.\" Internet Architectures, Swinburne University, Melbourne, Australia by -.\" David Hayes under sponsorship from the FreeBSD Foundation. +.\" Internet Architectures, Swinburne University of Technology, Melbourne, +.\" Australia by David Hayes under sponsorship from the FreeBSD Foundation. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -99,8 +99,8 @@ congestion control module first appeared .Fx 9.0 . .Pp The module was first released in 2009 by Lawrence Stewart whilst studying at -Swinburne University's Centre for Advanced Internet Architectures, Melbourne, -Australia. +Swinburne University of Technology's Centre for Advanced Internet Architectures, +Melbourne, Australia. More details are available at: .Pp http://caia.swin.edu.au/urp/newtcp/ Modified: stable/8/share/man/man4/cc_hd.4 ============================================================================== --- stable/8/share/man/man4/cc_hd.4 Sat May 28 13:48:49 2011 (r222419) +++ stable/8/share/man/man4/cc_hd.4 Sat May 28 13:54:19 2011 (r222420) @@ -3,8 +3,8 @@ .\" All rights reserved. .\" .\" This documentation was written at the Centre for Advanced Internet -.\" Architectures, Swinburne University, Melbourne, Australia by David Hayes -.\" under sponsorship from the FreeBSD Foundation. +.\" Architectures, Swinburne University of Technology, Melbourne, Australia by +.\" David Hayes under sponsorship from the FreeBSD Foundation. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -107,8 +107,8 @@ congestion control module first appeared .Fx 9.0 . .Pp The module was first released in 2010 by David Hayes whilst working on the -NewTCP research project at Swinburne University's Centre for Advanced Internet -Architectures, Melbourne, Australia. +NewTCP research project at Swinburne University of Technology's Centre for +Advanced Internet Architectures, Melbourne, Australia. More details are available at: .Pp http://caia.swin.edu.au/urp/newtcp/ Modified: stable/8/share/man/man4/cc_htcp.4 ============================================================================== --- stable/8/share/man/man4/cc_htcp.4 Sat May 28 13:48:49 2011 (r222419) +++ stable/8/share/man/man4/cc_htcp.4 Sat May 28 13:54:19 2011 (r222420) @@ -4,8 +4,8 @@ .\" All rights reserved. .\" .\" Portions of this documentation were written at the Centre for Advanced -.\" Internet Architectures, Swinburne University, Melbourne, Australia by -.\" David Hayes under sponsorship from the FreeBSD Foundation. +.\" Internet Architectures, Swinburne University of Technology, Melbourne, +.\" Australia by David Hayes under sponsorship from the FreeBSD Foundation. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -114,10 +114,10 @@ congestion control module first appeared .Fx 9.0 . .Pp The module was first released in 2007 by James Healy and Lawrence Stewart whilst -working on the NewTCP research project at Swinburne University's Centre for -Advanced Internet Architectures, Melbourne, Australia, which was made possible -in part by a grant from the Cisco University Research Program Fund at Community -Foundation Silicon Valley. +working on the NewTCP research project at Swinburne University of Technology's +Centre for Advanced Internet Architectures, Melbourne, Australia, which was made +possible in part by a grant from the Cisco University Research Program Fund at +Community Foundation Silicon Valley. More details are available at: .Pp http://caia.swin.edu.au/urp/newtcp/ Modified: stable/8/share/man/man4/cc_newreno.4 ============================================================================== --- stable/8/share/man/man4/cc_newreno.4 Sat May 28 13:48:49 2011 (r222419) +++ stable/8/share/man/man4/cc_newreno.4 Sat May 28 13:54:19 2011 (r222420) @@ -4,8 +4,8 @@ .\" All rights reserved. .\" .\" Portions of this documentation were written at the Centre for Advanced -.\" Internet Architectures, Swinburne University, Melbourne, Australia by -.\" Lawrence Stewart under sponsorship from the FreeBSD Foundation. +.\" Internet Architectures, Swinburne University of Technology, Melbourne, +.\" Australia by Lawrence Stewart under sponsorship from the FreeBSD Foundation. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -61,10 +61,10 @@ congestion control algorithm first appea .Fx 9.0 . .Pp The module was first released in 2007 by James Healy and Lawrence Stewart whilst -working on the NewTCP research project at Swinburne University's Centre for -Advanced Internet Architectures, Melbourne, Australia, which was made possible -in part by a grant from the Cisco University Research Program Fund at Community -Foundation Silicon Valley. +working on the NewTCP research project at Swinburne University of Technology's +Centre for Advanced Internet Architectures, Melbourne, Australia, which was made +possible in part by a grant from the Cisco University Research Program Fund at +Community Foundation Silicon Valley. More details are available at: .Pp http://caia.swin.edu.au/urp/newtcp/ Modified: stable/8/share/man/man4/cc_vegas.4 ============================================================================== --- stable/8/share/man/man4/cc_vegas.4 Sat May 28 13:48:49 2011 (r222419) +++ stable/8/share/man/man4/cc_vegas.4 Sat May 28 13:54:19 2011 (r222420) @@ -3,8 +3,8 @@ .\" All rights reserved. .\" .\" This documentation was written at the Centre for Advanced Internet -.\" Architectures, Swinburne University, Melbourne, Australia by David Hayes -.\" under sponsorship from the FreeBSD Foundation. +.\" Architectures, Swinburne University of Technology, Melbourne, Australia by +.\" David Hayes under sponsorship from the FreeBSD Foundation. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -125,8 +125,8 @@ congestion control module first appeared .Fx 9.0 . .Pp The module was first released in 2010 by David Hayes whilst working on the -NewTCP research project at Swinburne University's Centre for Advanced Internet -Architectures, Melbourne, Australia. +NewTCP research project at Swinburne University of Technology's Centre for +Advanced Internet Architectures, Melbourne, Australia. More details are available at: .Pp http://caia.swin.edu.au/urp/newtcp/ Modified: stable/8/share/man/man4/h_ertt.4 ============================================================================== --- stable/8/share/man/man4/h_ertt.4 Sat May 28 13:48:49 2011 (r222419) +++ stable/8/share/man/man4/h_ertt.4 Sat May 28 13:54:19 2011 (r222420) @@ -3,8 +3,8 @@ .\" All rights reserved. .\" .\" This documentation was written at the Centre for Advanced Internet -.\" Architectures, Swinburne University, Melbourne, Australia by David Hayes -.\" under sponsorship from the FreeBSD Foundation. +.\" Architectures, Swinburne University of Technology, Melbourne, Australia by +.\" David Hayes under sponsorship from the FreeBSD Foundation. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -125,8 +125,8 @@ module first appeared in .Fx 9.0 . .Pp The module was first released in 2010 by David Hayes whilst working on the -NewTCP research project at Swinburne University's Centre for Advanced Internet -Architectures, Melbourne, Australia. +NewTCP research project at Swinburne University of Technology's Centre for +Advanced Internet Architectures, Melbourne, Australia. More details are available at: .Pp http://caia.swin.edu.au/urp/newtcp/ Modified: stable/8/share/man/man4/siftr.4 ============================================================================== --- stable/8/share/man/man4/siftr.4 Sat May 28 13:48:49 2011 (r222419) +++ stable/8/share/man/man4/siftr.4 Sat May 28 13:54:19 2011 (r222420) @@ -616,10 +616,10 @@ and .Pp .Nm was first released in 2007 by Lawrence Stewart and James Healy whilst working on -the NewTCP research project at Swinburne University's Centre for Advanced -Internet Architectures, Melbourne, Australia, which was made possible in part by -a grant from the Cisco University Research Program Fund at Community Foundation -Silicon Valley. +the NewTCP research project at Swinburne University of Technology's Centre for +Advanced Internet Architectures, Melbourne, Australia, which was made possible +in part by a grant from the Cisco University Research Program Fund at Community +Foundation Silicon Valley. More details are available at: .Pp http://caia.swin.edu.au/urp/newtcp/ Modified: stable/8/share/man/man9/cc.9 ============================================================================== --- stable/8/share/man/man9/cc.9 Sat May 28 13:48:49 2011 (r222419) +++ stable/8/share/man/man9/cc.9 Sat May 28 13:54:19 2011 (r222420) @@ -4,8 +4,8 @@ .\" All rights reserved. .\" .\" Portions of this documentation were written at the Centre for Advanced -.\" Internet Architectures, Swinburne University, Melbourne, Australia by -.\" David Hayes and Lawrence Stewart under sponsorship from the +.\" Internet Architectures, Swinburne University of Technology, Melbourne, +.\" Australia by David Hayes and Lawrence Stewart under sponsorship from the .\" FreeBSD Foundation. .\" .\" Redistribution and use in source and binary forms, with or without @@ -310,10 +310,10 @@ The modular Congestion Control (CC) fram .Fx 9.0 . .Pp The framework was first released in 2007 by James Healy and Lawrence Stewart -whilst working on the NewTCP research project at Swinburne University's Centre -for Advanced Internet Architectures, Melbourne, Australia, which was made -possible in part by a grant from the Cisco University Research Program Fund at -Community Foundation Silicon Valley. +whilst working on the NewTCP research project at Swinburne University of +Technology's Centre for Advanced Internet Architectures, Melbourne, Australia, +which was made possible in part by a grant from the Cisco University Research +Program Fund at Community Foundation Silicon Valley. More details are available at: .Pp http://caia.swin.edu.au/urp/newtcp/ Modified: stable/8/share/man/man9/hhook.9 ============================================================================== --- stable/8/share/man/man9/hhook.9 Sat May 28 13:48:49 2011 (r222419) +++ stable/8/share/man/man9/hhook.9 Sat May 28 13:54:19 2011 (r222420) @@ -3,8 +3,9 @@ .\" All rights reserved. .\" .\" This documentation was written at the Centre for Advanced Internet -.\" Architectures, Swinburne University, Melbourne, Australia by David Hayes and -.\" Lawrence Stewart under sponsorship from the FreeBSD Foundation. +.\" Architectures, Swinburne University of Technology, Melbourne, Australia by +.\" David Hayes and Lawrence Stewart under sponsorship from the FreeBSD +.\" Foundation. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -363,8 +364,8 @@ framework first appeared in The .Nm framework was first released in 2010 by Lawrence Stewart whilst studying at -Swinburne University's Centre for Advanced Internet Architectures, Melbourne, -Australia. +Swinburne University of Technology's Centre for Advanced Internet Architectures, +Melbourne, Australia. More details are available at: .Pp http://caia.swin.edu.au/urp/newtcp/ Modified: stable/8/share/man/man9/khelp.9 ============================================================================== --- stable/8/share/man/man9/khelp.9 Sat May 28 13:48:49 2011 (r222419) +++ stable/8/share/man/man9/khelp.9 Sat May 28 13:54:19 2011 (r222420) @@ -3,8 +3,9 @@ .\" All rights reserved. .\" .\" This documentation was written at the Centre for Advanced Internet -.\" Architectures, Swinburne University, Melbourne, Australia by David Hayes and -.\" Lawrence Stewart under sponsorship from the FreeBSD Foundation. +.\" Architectures, Swinburne University of Technology, Melbourne, Australia by +.\" David Hayes and Lawrence Stewart under sponsorship from the FreeBSD +.\" Foundation. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -419,8 +420,8 @@ kernel helper framework first appeared i The .Nm framework was first released in 2010 by Lawrence Stewart whilst studying at -Swinburne University's Centre for Advanced Internet Architectures, Melbourne, -Australia. +Swinburne University of Technology's Centre for Advanced Internet Architectures, +Melbourne, Australia. More details are available at: .Pp http://caia.swin.edu.au/urp/newtcp/ Modified: stable/8/sys/kern/kern_hhook.c ============================================================================== --- stable/8/sys/kern/kern_hhook.c Sat May 28 13:48:49 2011 (r222419) +++ stable/8/sys/kern/kern_hhook.c Sat May 28 13:54:19 2011 (r222420) @@ -4,9 +4,9 @@ * All rights reserved. * * This software was developed by Lawrence Stewart while studying at the Centre - * for Advanced Internet Architectures, Swinburne University, made possible in - * part by grants from the FreeBSD Foundation and Cisco University Research - * Program Fund at Community Foundation Silicon Valley. + * for Advanced Internet Architectures, Swinburne University of Technology, + * made possible in part by grants from the FreeBSD Foundation and Cisco + * University Research Program Fund at Community Foundation Silicon Valley. * * Portions of this software were developed at the Centre for Advanced * Internet Architectures, Swinburne University of Technology, Melbourne, Modified: stable/8/sys/kern/kern_khelp.c ============================================================================== --- stable/8/sys/kern/kern_khelp.c Sat May 28 13:48:49 2011 (r222419) +++ stable/8/sys/kern/kern_khelp.c Sat May 28 13:54:19 2011 (r222420) @@ -4,9 +4,9 @@ * All rights reserved. * * This software was developed by Lawrence Stewart while studying at the Centre - * for Advanced Internet Architectures, Swinburne University, made possible in - * part by grants from the FreeBSD Foundation and Cisco University Research - * Program Fund at Community Foundation Silicon Valley. + * for Advanced Internet Architectures, Swinburne University of Technology, + * made possible in part by grants from the FreeBSD Foundation and Cisco + * University Research Program Fund at Community Foundation Silicon Valley. * * Portions of this software were developed at the Centre for Advanced * Internet Architectures, Swinburne University of Technology, Melbourne, Modified: stable/8/sys/netinet/cc.h ============================================================================== --- stable/8/sys/netinet/cc.h Sat May 28 13:48:49 2011 (r222419) +++ stable/8/sys/netinet/cc.h Sat May 28 13:54:19 2011 (r222420) @@ -6,9 +6,9 @@ * All rights reserved. * * This software was developed at the Centre for Advanced Internet - * Architectures, Swinburne University, by Lawrence Stewart and James Healy, - * made possible in part by a grant from the Cisco University Research Program - * Fund at Community Foundation Silicon Valley. + * Architectures, Swinburne University of Technology, by Lawrence Stewart and + * James Healy, made possible in part by a grant from the Cisco University + * Research Program Fund at Community Foundation Silicon Valley. * * Portions of this software were developed at the Centre for Advanced * Internet Architectures, Swinburne University of Technology, Melbourne, @@ -40,10 +40,11 @@ /* * This software was first released in 2007 by James Healy and Lawrence Stewart - * whilst working on the NewTCP research project at Swinburne University's - * Centre for Advanced Internet Architectures, Melbourne, Australia, which was - * made possible in part by a grant from the Cisco University Research Program - * Fund at Community Foundation Silicon Valley. More details are available at: + * whilst working on the NewTCP research project at Swinburne University of + * Technology's Centre for Advanced Internet Architectures, Melbourne, + * Australia, which was made possible in part by a grant from the Cisco + * University Research Program Fund at Community Foundation Silicon Valley. + * More details are available at: * http://caia.swin.edu.au/urp/newtcp/ */ Modified: stable/8/sys/netinet/cc/cc.c ============================================================================== --- stable/8/sys/netinet/cc/cc.c Sat May 28 13:48:49 2011 (r222419) +++ stable/8/sys/netinet/cc/cc.c Sat May 28 13:54:19 2011 (r222420) @@ -6,9 +6,9 @@ * All rights reserved. * * This software was developed at the Centre for Advanced Internet - * Architectures, Swinburne University, by Lawrence Stewart and James Healy, - * made possible in part by a grant from the Cisco University Research Program - * Fund at Community Foundation Silicon Valley. + * Architectures, Swinburne University of Technology, by Lawrence Stewart and + * James Healy, made possible in part by a grant from the Cisco University + * Research Program Fund at Community Foundation Silicon Valley. * * Portions of this software were developed at the Centre for Advanced * Internet Architectures, Swinburne University of Technology, Melbourne, @@ -38,10 +38,11 @@ /* * This software was first released in 2007 by James Healy and Lawrence Stewart - * whilst working on the NewTCP research project at Swinburne University's - * Centre for Advanced Internet Architectures, Melbourne, Australia, which was - * made possible in part by a grant from the Cisco University Research Program - * Fund at Community Foundation Silicon Valley. More details are available at: + * whilst working on the NewTCP research project at Swinburne University of + * Technology's Centre for Advanced Internet Architectures, Melbourne, + * Australia, which was made possible in part by a grant from the Cisco + * University Research Program Fund at Community Foundation Silicon Valley. + * More details are available at: * http://caia.swin.edu.au/urp/newtcp/ */ Modified: stable/8/sys/netinet/cc/cc_chd.c ============================================================================== --- stable/8/sys/netinet/cc/cc_chd.c Sat May 28 13:48:49 2011 (r222419) +++ stable/8/sys/netinet/cc/cc_chd.c Sat May 28 13:54:19 2011 (r222420) @@ -5,9 +5,9 @@ * All rights reserved. * * This software was developed at the Centre for Advanced Internet - * Architectures, Swinburne University, by David Hayes and Lawrence Stewart, - * made possible in part by a grant from the Cisco University Research Program - * Fund at Community Foundation Silicon Valley. + * Architectures, Swinburne University of Technology, by David Hayes and + * Lawrence Stewart, made possible in part by a grant from the Cisco University + * Research Program Fund at Community Foundation Silicon Valley. * * Portions of this software were developed at the Centre for Advanced Internet * Architectures, Swinburne University of Technology, Melbourne, Australia by @@ -43,10 +43,10 @@ * 11-14 October 2010. * * Originally released as part of the NewTCP research project at Swinburne - * University's Centre for Advanced Internet Architectures, Melbourne, - * Australia, which was made possible in part by a grant from the Cisco - * University Research Program Fund at Community Foundation Silicon Valley. More - * details are available at: + * University of Technology's Centre for Advanced Internet Architectures, + * Melbourne, Australia, which was made possible in part by a grant from the + * Cisco University Research Program Fund at Community Foundation Silicon + * Valley. More details are available at: * http://caia.swin.edu.au/urp/newtcp/ */ Modified: stable/8/sys/netinet/cc/cc_cubic.c ============================================================================== --- stable/8/sys/netinet/cc/cc_cubic.c Sat May 28 13:48:49 2011 (r222419) +++ stable/8/sys/netinet/cc/cc_cubic.c Sat May 28 13:54:19 2011 (r222420) @@ -4,9 +4,9 @@ * All rights reserved. * * This software was developed by Lawrence Stewart while studying at the Centre - * for Advanced Internet Architectures, Swinburne University, made possible in - * part by a grant from the Cisco University Research Program Fund at Community - * Foundation Silicon Valley. + * for Advanced Internet Architectures, Swinburne University of Technology, made + * possible in part by a grant from the Cisco University Research Program Fund + * at Community Foundation Silicon Valley. * * Portions of this software were developed at the Centre for Advanced * Internet Architectures, Swinburne University of Technology, Melbourne, @@ -38,10 +38,10 @@ * An implementation of the CUBIC congestion control algorithm for FreeBSD, * based on the Internet Draft "draft-rhee-tcpm-cubic-02" by Rhee, Xu and Ha. * Originally released as part of the NewTCP research project at Swinburne - * University's Centre for Advanced Internet Architectures, Melbourne, - * Australia, which was made possible in part by a grant from the Cisco - * University Research Program Fund at Community Foundation Silicon Valley. More - * details are available at: + * University of Technology's Centre for Advanced Internet Architectures, + * Melbourne, Australia, which was made possible in part by a grant from the + * Cisco University Research Program Fund at Community Foundation Silicon + * Valley. More details are available at: * http://caia.swin.edu.au/urp/newtcp/ */ Modified: stable/8/sys/netinet/cc/cc_cubic.h ============================================================================== --- stable/8/sys/netinet/cc/cc_cubic.h Sat May 28 13:48:49 2011 (r222419) +++ stable/8/sys/netinet/cc/cc_cubic.h Sat May 28 13:54:19 2011 (r222420) @@ -4,9 +4,9 @@ * All rights reserved. * * This software was developed by Lawrence Stewart while studying at the Centre - * for Advanced Internet Architectures, Swinburne University, made possible in - * part by a grant from the Cisco University Research Program Fund at Community - * Foundation Silicon Valley. + * for Advanced Internet Architectures, Swinburne University of Technology, made + * possible in part by a grant from the Cisco University Research Program Fund + * at Community Foundation Silicon Valley. * * Portions of this software were developed at the Centre for Advanced * Internet Architectures, Swinburne University of Technology, Melbourne, Modified: stable/8/sys/netinet/cc/cc_hd.c ============================================================================== --- stable/8/sys/netinet/cc/cc_hd.c Sat May 28 13:48:49 2011 (r222419) +++ stable/8/sys/netinet/cc/cc_hd.c Sat May 28 13:54:19 2011 (r222420) @@ -6,9 +6,9 @@ * All rights reserved. * * This software was developed at the Centre for Advanced Internet - * Architectures, Swinburne University, by David Hayes and Lawrence Stewart, - * made possible in part by a grant from the Cisco University Research Program - * Fund at Community Foundation Silicon Valley. + * Architectures, Swinburne University of Technology, by David Hayes and + * Lawrence Stewart, made possible in part by a grant from the Cisco University + * Research Program Fund at Community Foundation Silicon Valley. * * Portions of this software were developed at the Centre for Advanced Internet * Architectures, Swinburne University of Technology, Melbourne, Australia by @@ -44,10 +44,10 @@ * 2009. * * Originally released as part of the NewTCP research project at Swinburne - * University's Centre for Advanced Internet Architectures, Melbourne, - * Australia, which was made possible in part by a grant from the Cisco - * University Research Program Fund at Community Foundation Silicon Valley. More - * details are available at: + * University of Technology's Centre for Advanced Internet Architectures, + * Melbourne, Australia, which was made possible in part by a grant from the + * Cisco University Research Program Fund at Community Foundation Silicon + * Valley. More details are available at: * http://caia.swin.edu.au/urp/newtcp/ */ Modified: stable/8/sys/netinet/cc/cc_htcp.c ============================================================================== --- stable/8/sys/netinet/cc/cc_htcp.c Sat May 28 13:48:49 2011 (r222419) +++ stable/8/sys/netinet/cc/cc_htcp.c Sat May 28 13:54:19 2011 (r222420) @@ -6,9 +6,9 @@ * All rights reserved. * * This software was developed at the Centre for Advanced Internet - * Architectures, Swinburne University, by Lawrence Stewart and James Healy, - * made possible in part by a grant from the Cisco University Research Program - * Fund at Community Foundation Silicon Valley. + * Architectures, Swinburne University of Technology, by Lawrence Stewart and + * James Healy, made possible in part by a grant from the Cisco University + * Research Program Fund at Community Foundation Silicon Valley. * * Portions of this software were developed at the Centre for Advanced * Internet Architectures, Swinburne University of Technology, Melbourne, @@ -40,10 +40,10 @@ * An implementation of the H-TCP congestion control algorithm for FreeBSD, * based on the Internet Draft "draft-leith-tcp-htcp-06.txt" by Leith and * Shorten. Originally released as part of the NewTCP research project at - * Swinburne University's Centre for Advanced Internet Architectures, Melbourne, - * Australia, which was made possible in part by a grant from the Cisco - * University Research Program Fund at Community Foundation Silicon Valley. More - * details are available at: + * Swinburne University of Technology's Centre for Advanced Internet + * Architectures, Melbourne, Australia, which was made possible in part by a + * grant from the Cisco University Research Program Fund at Community Foundation + * Silicon Valley. More details are available at: * http://caia.swin.edu.au/urp/newtcp/ */ Modified: stable/8/sys/netinet/cc/cc_module.h ============================================================================== --- stable/8/sys/netinet/cc/cc_module.h Sat May 28 13:48:49 2011 (r222419) +++ stable/8/sys/netinet/cc/cc_module.h Sat May 28 13:54:19 2011 (r222420) @@ -3,9 +3,9 @@ * All rights reserved. * * This software was developed by Lawrence Stewart while studying at the Centre - * for Advanced Internet Architectures, Swinburne University, made possible in - * part by a grant from the Cisco University Research Program Fund at Community - * Foundation Silicon Valley. + * for Advanced Internet Architectures, Swinburne University of Technology, made + * possible in part by a grant from the Cisco University Research Program Fund + * at Community Foundation Silicon Valley. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -33,10 +33,10 @@ /* * This software was first released in 2009 by Lawrence Stewart as part of the - * NewTCP research project at Swinburne University's Centre for Advanced - * Internet Architectures, Melbourne, Australia, which was made possible in part - * by a grant from the Cisco University Research Program Fund at Community - * Foundation Silicon Valley. More details are available at: + * NewTCP research project at Swinburne University of Technology's Centre for + * Advanced Internet Architectures, Melbourne, Australia, which was made + * possible in part by a grant from the Cisco University Research Program Fund + * at Community Foundation Silicon Valley. More details are available at: * http://caia.swin.edu.au/urp/newtcp/ */ Modified: stable/8/sys/netinet/cc/cc_newreno.c ============================================================================== --- stable/8/sys/netinet/cc/cc_newreno.c Sat May 28 13:48:49 2011 (r222419) +++ stable/8/sys/netinet/cc/cc_newreno.c Sat May 28 13:54:19 2011 (r222420) @@ -8,9 +8,9 @@ * All rights reserved. * * This software was developed at the Centre for Advanced Internet - * Architectures, Swinburne University, by Lawrence Stewart, James Healy and - * David Hayes, made possible in part by a grant from the Cisco University - * Research Program Fund at Community Foundation Silicon Valley. + * Architectures, Swinburne University of Technology, by Lawrence Stewart, James + * Healy and David Hayes, made possible in part by a grant from the Cisco + * University Research Program Fund at Community Foundation Silicon Valley. * * Portions of this software were developed at the Centre for Advanced * Internet Architectures, Swinburne University of Technology, Melbourne, @@ -40,10 +40,11 @@ /* * This software was first released in 2007 by James Healy and Lawrence Stewart - * whilst working on the NewTCP research project at Swinburne University's - * Centre for Advanced Internet Architectures, Melbourne, Australia, which was - * made possible in part by a grant from the Cisco University Research Program - * Fund at Community Foundation Silicon Valley. More details are available at: + * whilst working on the NewTCP research project at Swinburne University of + * Technology's Centre for Advanced Internet Architectures, Melbourne, + * Australia, which was made possible in part by a grant from the Cisco + * University Research Program Fund at Community Foundation Silicon Valley. + * More details are available at: * http://caia.swin.edu.au/urp/newtcp/ */ Modified: stable/8/sys/netinet/cc/cc_vegas.c ============================================================================== --- stable/8/sys/netinet/cc/cc_vegas.c Sat May 28 13:48:49 2011 (r222419) +++ stable/8/sys/netinet/cc/cc_vegas.c Sat May 28 13:54:19 2011 (r222420) @@ -6,9 +6,9 @@ * All rights reserved. * * This software was developed at the Centre for Advanced Internet - * Architectures, Swinburne University, by David Hayes and Lawrence Stewart, - * made possible in part by a grant from the Cisco University Research Program - * Fund at Community Foundation Silicon Valley. + * Architectures, Swinburne University of Technology, by David Hayes and + * Lawrence Stewart, made possible in part by a grant from the Cisco University + * Research Program Fund at Community Foundation Silicon Valley. * * Portions of this software were developed at the Centre for Advanced Internet * Architectures, Swinburne University of Technology, Melbourne, Australia by @@ -46,10 +46,10 @@ * the original paper. * * Originally released as part of the NewTCP research project at Swinburne - * University's Centre for Advanced Internet Architectures, Melbourne, - * Australia, which was made possible in part by a grant from the Cisco - * University Research Program Fund at Community Foundation Silicon Valley. More - * details are available at: + * University of Technology's Centre for Advanced Internet Architectures, + * Melbourne, Australia, which was made possible in part by a grant from the + * Cisco University Research Program Fund at Community Foundation Silicon + * Valley. More details are available at: * http://caia.swin.edu.au/urp/newtcp/ */ Modified: stable/8/sys/netinet/khelp/h_ertt.c ============================================================================== --- stable/8/sys/netinet/khelp/h_ertt.c Sat May 28 13:48:49 2011 (r222419) +++ stable/8/sys/netinet/khelp/h_ertt.c Sat May 28 13:54:19 2011 (r222420) @@ -6,9 +6,9 @@ * All rights reserved. * * This software was developed at the Centre for Advanced Internet - * Architectures, Swinburne University, by David Hayes, made possible in part by - * a grant from the Cisco University Research Program Fund at Community - * Foundation Silicon Valley. + * Architectures, Swinburne University of Technology, by David Hayes, made + * possible in part by a grant from the Cisco University Research Program Fund + * at Community Foundation Silicon Valley. * * Portions of this software were developed at the Centre for Advanced * Internet Architectures, Swinburne University of Technology, Melbourne, Modified: stable/8/sys/netinet/khelp/h_ertt.h ============================================================================== --- stable/8/sys/netinet/khelp/h_ertt.h Sat May 28 13:48:49 2011 (r222419) +++ stable/8/sys/netinet/khelp/h_ertt.h Sat May 28 13:54:19 2011 (r222420) @@ -5,9 +5,9 @@ * All rights reserved. * * This software was developed at the Centre for Advanced Internet - * Architectures, Swinburne University, by David Hayes, made possible in part by - * a grant from the Cisco University Research Program Fund at Community - * Foundation Silicon Valley. + * Architectures, Swinburne University of Technology, by David Hayes, made + * possible in part by a grant from the Cisco University Research Program Fund + * at Community Foundation Silicon Valley. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -41,12 +41,12 @@ * "struct ertt". * * This software was first released in 2010 by David Hayes and Lawrence Stewart - * whilst working on the NewTCP research project at Swinburne University's - * Centre for Advanced Internet Architectures, Melbourne, Australia, which was - * made possible in part by a grant from the Cisco University Research Program - * Fund at Community Foundation Silicon Valley. Testing and development was - * further assisted by a grant from the FreeBSD Foundation. More details are - * available at: + * whilst working on the NewTCP research project at Swinburne University of + * Technology's Centre for Advanced Internet Architectures, Melbourne, + * Australia, which was made possible in part by a grant from the Cisco + * University Research Program Fund at Community Foundation Silicon Valley. + * Testing and development was further assisted by a grant from the FreeBSD + * Foundation. More details are available at: * http://caia.swin.edu.au/urp/newtcp/ */ Modified: stable/8/sys/netinet/siftr.c ============================================================================== --- stable/8/sys/netinet/siftr.c Sat May 28 13:48:49 2011 (r222419) +++ stable/8/sys/netinet/siftr.c Sat May 28 13:54:19 2011 (r222420) @@ -38,10 +38,11 @@ * for experimental, debugging and performance analysis purposes. * * SIFTR was first released in 2007 by James Healy and Lawrence Stewart whilst - * working on the NewTCP research project at Swinburne University's Centre for - * Advanced Internet Architectures, Melbourne, Australia, which was made - * possible in part by a grant from the Cisco University Research Program Fund - * at Community Foundation Silicon Valley. More details are available at: + * working on the NewTCP research project at Swinburne University of + * Technology's Centre for Advanced Internet Architectures, Melbourne, + * Australia, which was made possible in part by a grant from the Cisco + * University Research Program Fund at Community Foundation Silicon Valley. + * More details are available at: * http://caia.swin.edu.au/urp/newtcp/ * * Work on SIFTR v1.2.x was sponsored by the FreeBSD Foundation as part of Modified: stable/8/sys/netinet/tcp_input.c ============================================================================== --- stable/8/sys/netinet/tcp_input.c Sat May 28 13:48:49 2011 (r222419) +++ stable/8/sys/netinet/tcp_input.c Sat May 28 13:54:19 2011 (r222420) @@ -8,9 +8,9 @@ * All rights reserved. * * Portions of this software were developed at the Centre for Advanced Internet - * Architectures, Swinburne University, by Lawrence Stewart, James Healy and - * David Hayes, made possible in part by a grant from the Cisco University - * Research Program Fund at Community Foundation Silicon Valley. + * Architectures, Swinburne University of Technology, by Lawrence Stewart, + * James Healy and David Hayes, made possible in part by a grant from the Cisco + * University Research Program Fund at Community Foundation Silicon Valley. * * Portions of this software were developed at the Centre for Advanced * Internet Architectures, Swinburne University of Technology, Melbourne, Modified: stable/8/sys/sys/hhook.h ============================================================================== --- stable/8/sys/sys/hhook.h Sat May 28 13:48:49 2011 (r222419) +++ stable/8/sys/sys/hhook.h Sat May 28 13:54:19 2011 (r222420) @@ -4,9 +4,9 @@ * All rights reserved. * * This software was developed by Lawrence Stewart while studying at the Centre - * for Advanced Internet Architectures, Swinburne University, made possible in - * part by grants from the FreeBSD Foundation and Cisco University Research - * Program Fund at Community Foundation Silicon Valley. + * for Advanced Internet Architectures, Swinburne University of Technology, made + * possible in part by grants from the FreeBSD Foundation and Cisco University + * Research Program Fund at Community Foundation Silicon Valley. * * Portions of this software were developed at the Centre for Advanced * Internet Architectures, Swinburne University of Technology, Melbourne, @@ -39,10 +39,10 @@ /* * A KPI modelled on the pfil framework for instantiating helper hook points * within the kernel for use by Khelp modules. Originally released as part of - * the NewTCP research project at Swinburne University's Centre for Advanced - * Internet Architectures, Melbourne, Australia, which was made possible in part - * by a grant from the Cisco University Research Program Fund at Community - * Foundation Silicon Valley. More details are available at: + * the NewTCP research project at Swinburne University of Technology's Centre + * for Advanced Internet Architectures, Melbourne, Australia, which was made + * possible in part by a grant from the Cisco University Research Program Fund + * at Community Foundation Silicon Valley. More details are available at: * http://caia.swin.edu.au/urp/newtcp/ */ Modified: stable/8/sys/sys/khelp.h ============================================================================== --- stable/8/sys/sys/khelp.h Sat May 28 13:48:49 2011 (r222419) +++ stable/8/sys/sys/khelp.h Sat May 28 13:54:19 2011 (r222420) @@ -4,9 +4,9 @@ * All rights reserved. * * This software was developed by Lawrence Stewart while studying at the Centre - * for Advanced Internet Architectures, Swinburne University, made possible in - * part by grants from the FreeBSD Foundation and Cisco University Research - * Program Fund at Community Foundation Silicon Valley. + * for Advanced Internet Architectures, Swinburne University of Technology, made + * possible in part by grants from the FreeBSD Foundation and Cisco University + * Research Program Fund at Community Foundation Silicon Valley. * * Portions of this software were developed at the Centre for Advanced * Internet Architectures, Swinburne University of Technology, Melbourne, @@ -38,11 +38,11 @@ /* * A KPI for managing kernel helper modules which perform useful functionality - * within the kernel. Originally released as part of the NewTCP research - * project at Swinburne University's Centre for Advanced Internet Architectures, - * Melbourne, Australia, which was made possible in part by a grant from the - * Cisco University Research Program Fund at Community Foundation Silicon - * Valley. More details are available at: + * within the kernel. Originally released as part of the NewTCP research project + * at Swinburne University of Technology's Centre for Advanced Internet + * Architectures, Melbourne, Australia, which was made possible in part by a + * grant from the Cisco University Research Program Fund at Community Foundation + * Silicon Valley. More details are available at: * http://caia.swin.edu.au/urp/newtcp/ */ Modified: stable/8/sys/sys/module_khelp.h ============================================================================== --- stable/8/sys/sys/module_khelp.h Sat May 28 13:48:49 2011 (r222419) +++ stable/8/sys/sys/module_khelp.h Sat May 28 13:54:19 2011 (r222420) @@ -4,9 +4,9 @@ * All rights reserved. * * This software was developed by Lawrence Stewart while studying at the Centre - * for Advanced Internet Architectures, Swinburne University, made possible in - * part by grants from the FreeBSD Foundation and Cisco University Research - * Program Fund at Community Foundation Silicon Valley. + * for Advanced Internet Architectures, Swinburne University of Technology, made + * possible in part by grants from the FreeBSD Foundation and Cisco University + * Research Program Fund at Community Foundation Silicon Valley. * * Portions of this software were developed at the Centre for Advanced * Internet Architectures, Swinburne University of Technology, Melbourne,