From owner-svn-src-stable-8@FreeBSD.ORG Mon Sep 28 11:31:22 2009 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 75DC7106566C; Mon, 28 Sep 2009 11:31:22 +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 47F7B8FC12; Mon, 28 Sep 2009 11:31:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8SBVMIb053068; Mon, 28 Sep 2009 11:31:22 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8SBVMv9053065; Mon, 28 Sep 2009 11:31:22 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200909281131.n8SBVMv9053065@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 28 Sep 2009 11:31: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: r197576 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci 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: Mon, 28 Sep 2009 11:31:22 -0000 Author: kib Date: Mon Sep 28 11:31:21 2009 New Revision: 197576 URL: http://svn.freebsd.org/changeset/base/197576 Log: MFC r197390: Remove forward_roundrobin(). Approved by: re (kensmith) Modified: 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) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/kern/subr_smp.c stable/8/sys/sys/smp.h Modified: stable/8/sys/kern/subr_smp.c ============================================================================== --- stable/8/sys/kern/subr_smp.c Mon Sep 28 10:22:46 2009 (r197575) +++ stable/8/sys/kern/subr_smp.c Mon Sep 28 11:31:21 2009 (r197576) @@ -104,12 +104,6 @@ SYSCTL_INT(_kern_smp, OID_AUTO, forward_ &forward_signal_enabled, 0, "Forwarding of a signal to a process on a different CPU"); -/* Enable forwarding of roundrobin to all other cpus */ -static int forward_roundrobin_enabled = 1; -SYSCTL_INT(_kern_smp, OID_AUTO, forward_roundrobin_enabled, CTLFLAG_RW, - &forward_roundrobin_enabled, 0, - "Forwarding of roundrobin to all other CPUs"); - /* Variables needed for SMP rendezvous. */ static volatile int smp_rv_ncpus; static void (*volatile smp_rv_setup_func)(void *arg); @@ -189,33 +183,6 @@ forward_signal(struct thread *td) ipi_selected(1 << id, IPI_AST); } -void -forward_roundrobin(void) -{ - struct pcpu *pc; - struct thread *td; - cpumask_t id, map, me; - - CTR0(KTR_SMP, "forward_roundrobin()"); - - if (!smp_started || cold || panicstr) - return; - if (!forward_roundrobin_enabled) - return; - map = 0; - me = PCPU_GET(cpumask); - SLIST_FOREACH(pc, &cpuhead, pc_allcpu) { - td = pc->pc_curthread; - id = pc->pc_cpumask; - if (id != me && (id & stopped_cpus) == 0 && - !TD_IS_IDLETHREAD(td)) { - td->td_flags |= TDF_NEEDRESCHED; - map |= id; - } - } - ipi_selected(map, IPI_AST); -} - /* * When called the executing CPU will send an IPI to all other CPUs * requesting that they halt execution. Modified: stable/8/sys/sys/smp.h ============================================================================== --- stable/8/sys/sys/smp.h Mon Sep 28 10:22:46 2009 (r197575) +++ stable/8/sys/sys/smp.h Mon Sep 28 11:31:21 2009 (r197576) @@ -120,7 +120,6 @@ void cpu_mp_setmaxid(void); void cpu_mp_start(void); void forward_signal(struct thread *); -void forward_roundrobin(void); int restart_cpus(cpumask_t); int stop_cpus(cpumask_t); int stop_cpus_hard(cpumask_t); From owner-svn-src-stable-8@FreeBSD.ORG Mon Sep 28 18:32:28 2009 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 E2D06106566C; Mon, 28 Sep 2009 18:32:28 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B679B8FC22; Mon, 28 Sep 2009 18:32:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8SIWSwi062382; Mon, 28 Sep 2009 18:32:28 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8SIWSSP062380; Mon, 28 Sep 2009 18:32:28 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <200909281832.n8SIWSSP062380@svn.freebsd.org> From: Michael Tuexen Date: Mon, 28 Sep 2009 18:32:28 +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: r197582 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci 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: Mon, 28 Sep 2009 18:32:29 -0000 Author: tuexen Date: Mon Sep 28 18:32:28 2009 New Revision: 197582 URL: http://svn.freebsd.org/changeset/base/197582 Log: MFC r197341. Fix errnos. Approved by: re (bz), rrs (mentor) Modified: 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) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet/sctp_output.c Modified: stable/8/sys/netinet/sctp_output.c ============================================================================== --- stable/8/sys/netinet/sctp_output.c Mon Sep 28 18:07:16 2009 (r197581) +++ stable/8/sys/netinet/sctp_output.c Mon Sep 28 18:32:28 2009 (r197582) @@ -12384,8 +12384,8 @@ sctp_lower_sosend(struct socket *so, t_inp = inp = (struct sctp_inpcb *)so->so_pcb; if (inp == NULL) { - SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_OUTPUT, EFAULT); - error = EFAULT; + SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_OUTPUT, EINVAL); + error = EINVAL; if (i_pak) { SCTP_RELEASE_PKT(i_pak); } @@ -12432,8 +12432,8 @@ sctp_lower_sosend(struct socket *so, if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) && (inp->sctp_socket->so_qlimit)) { /* The listener can NOT send */ - SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_OUTPUT, EFAULT); - error = EFAULT; + SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_OUTPUT, ENOTCONN); + error = ENOTCONN; goto out_unlocked; } if ((use_rcvinfo) && srcv) { @@ -12566,8 +12566,8 @@ sctp_lower_sosend(struct socket *so, if ((inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) || (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_ALLGONE)) { /* Should I really unlock ? */ - SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_OUTPUT, EFAULT); - error = EFAULT; + SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_OUTPUT, EINVAL); + error = EINVAL; goto out_unlocked; } @@ -12596,6 +12596,12 @@ sctp_lower_sosend(struct socket *so, } } if (stcb == NULL) { + if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || + (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) { + SCTP_LTRACE_ERR_RET(inp, stcb, net, SCTP_FROM_SCTP_OUTPUT, ENOTCONN); + error = ENOTCONN; + goto out_unlocked; + } if (addr == NULL) { SCTP_LTRACE_ERR_RET(inp, stcb, net, SCTP_FROM_SCTP_OUTPUT, ENOENT); error = ENOENT; From owner-svn-src-stable-8@FreeBSD.ORG Mon Sep 28 23:48:16 2009 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 AF9D4106566C; Mon, 28 Sep 2009 23:48:16 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9C6018FC1E; Mon, 28 Sep 2009 23:48:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8SNmGD8069860; Mon, 28 Sep 2009 23:48:16 GMT (envelope-from gallatin@svn.freebsd.org) Received: (from gallatin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8SNmGd7069858; Mon, 28 Sep 2009 23:48:16 GMT (envelope-from gallatin@svn.freebsd.org) Message-Id: <200909282348.n8SNmGd7069858@svn.freebsd.org> From: Andrew Gallatin Date: Mon, 28 Sep 2009 23:48:16 +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: r197607 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/mxge dev/xen/xenpci 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, 28 Sep 2009 23:48:16 -0000 Author: gallatin Date: Mon Sep 28 23:48:16 2009 New Revision: 197607 URL: http://svn.freebsd.org/changeset/base/197607 Log: MFC 197395: Improve mxge watchdog routine's ability to reliably reset a failed NIC Approved by: re (kib) Modified: 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) stable/8/sys/dev/mxge/if_mxge.c stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/mxge/if_mxge.c ============================================================================== --- stable/8/sys/dev/mxge/if_mxge.c Mon Sep 28 22:41:28 2009 (r197606) +++ stable/8/sys/dev/mxge/if_mxge.c Mon Sep 28 23:48:16 2009 (r197607) @@ -143,7 +143,7 @@ MODULE_DEPEND(mxge, zlib, 1, 1, 1); static int mxge_load_firmware(mxge_softc_t *sc, int adopt); static int mxge_send_cmd(mxge_softc_t *sc, uint32_t cmd, mxge_cmd_t *data); -static int mxge_close(mxge_softc_t *sc); +static int mxge_close(mxge_softc_t *sc, int down); static int mxge_open(mxge_softc_t *sc); static void mxge_tick(void *arg); @@ -1305,8 +1305,7 @@ mxge_reset(mxge_softc_t *sc, int interru ss->lro_queued = 0; ss->lro_flushed = 0; if (ss->fw_stats != NULL) { - ss->fw_stats->valid = 0; - ss->fw_stats->send_done_count = 0; + bzero(ss->fw_stats, sizeof *ss->fw_stats); } } sc->rdma_tags_available = 15; @@ -1379,7 +1378,7 @@ mxge_change_lro_locked(mxge_softc_t *sc, ifp->if_capenable |= IFCAP_LRO; sc->lro_cnt = lro_cnt; if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - mxge_close(sc); + mxge_close(sc, 0); err = mxge_open(sc); } return err; @@ -1495,6 +1494,10 @@ mxge_add_sysctls(mxge_softc_t *sc) "read_write_dma_MBs", CTLFLAG_RD, &sc->read_write_dma, 0, "DMA concurrent Read/Write speed in MB/s"); + SYSCTL_ADD_INT(ctx, children, OID_AUTO, + "watchdog_resets", + CTLFLAG_RD, &sc->watchdog_resets, + 0, "Number of times NIC was reset"); /* performance related tunables */ @@ -3600,7 +3603,7 @@ abort: } static int -mxge_close(mxge_softc_t *sc) +mxge_close(mxge_softc_t *sc, int down) { mxge_cmd_t cmd; int err, old_down_cnt; @@ -3617,21 +3620,23 @@ mxge_close(mxge_softc_t *sc) } #endif sc->ifp->if_drv_flags &= ~IFF_DRV_RUNNING; - old_down_cnt = sc->down_cnt; - wmb(); - err = mxge_send_cmd(sc, MXGEFW_CMD_ETHERNET_DOWN, &cmd); - if (err) { - device_printf(sc->dev, "Couldn't bring down link\n"); - } - if (old_down_cnt == sc->down_cnt) { - /* wait for down irq */ - DELAY(10 * sc->intr_coal_delay); - } - wmb(); - if (old_down_cnt == sc->down_cnt) { - device_printf(sc->dev, "never got down irq\n"); + if (!down) { + old_down_cnt = sc->down_cnt; + wmb(); + err = mxge_send_cmd(sc, MXGEFW_CMD_ETHERNET_DOWN, &cmd); + if (err) { + device_printf(sc->dev, + "Couldn't bring down link\n"); + } + if (old_down_cnt == sc->down_cnt) { + /* wait for down irq */ + DELAY(10 * sc->intr_coal_delay); + } + wmb(); + if (old_down_cnt == sc->down_cnt) { + device_printf(sc->dev, "never got down irq\n"); + } } - mxge_free_mbufs(sc); return 0; @@ -3684,8 +3689,9 @@ static int mxge_watchdog_reset(mxge_softc_t *sc, int slice) { struct pci_devinfo *dinfo; + struct mxge_slice_state *ss; mxge_tx_ring_t *tx; - int err; + int err, running, s, num_tx_slices = 1; uint32_t reboot; uint16_t cmd; @@ -3719,6 +3725,30 @@ mxge_watchdog_reset(mxge_softc_t *sc, in reboot = mxge_read_reboot(sc); device_printf(sc->dev, "NIC rebooted, status = 0x%x\n", reboot); + running = sc->ifp->if_drv_flags & IFF_DRV_RUNNING; + if (running) { + + /* + * quiesce NIC so that TX routines will not try to + * xmit after restoration of BAR + */ + + /* Mark the link as down */ + if (sc->link_state) { + sc->link_state = 0; + if_link_state_change(sc->ifp, + LINK_STATE_DOWN); + } +#ifdef IFNET_BUF_RING + num_tx_slices = sc->num_slices; +#endif + /* grab all TX locks to ensure no tx */ + for (s = 0; s < num_tx_slices; s++) { + ss = &sc->ss[s]; + mtx_lock(&ss->tx.mtx); + } + mxge_close(sc, 1); + } /* restore PCI configuration space */ dinfo = device_get_ivars(sc->dev); pci_cfg_restore(sc->dev, dinfo); @@ -3726,10 +3756,22 @@ mxge_watchdog_reset(mxge_softc_t *sc, in /* and redo any changes we made to our config space */ mxge_setup_cfg_space(sc); - if (sc->ifp->if_drv_flags & IFF_DRV_RUNNING) { - mxge_close(sc); - err = mxge_open(sc); + /* reload f/w */ + err = mxge_load_firmware(sc, 0); + if (err) { + device_printf(sc->dev, + "Unable to re-load f/w\n"); } + if (running) { + if (!err) + err = mxge_open(sc); + /* release all TX locks */ + for (s = 0; s < num_tx_slices; s++) { + ss = &sc->ss[s]; + mtx_unlock(&ss->tx.mtx); + } + } + sc->watchdog_resets++; } else { tx = &sc->ss[slice].tx; device_printf(sc->dev, @@ -3745,6 +3787,9 @@ mxge_watchdog_reset(mxge_softc_t *sc, in be32toh(sc->ss->fw_stats->send_done_count)); device_printf(sc->dev, "not resetting\n"); } + if (err) + device_printf(sc->dev, "watchdog reset failed\n"); + return (err); } @@ -3860,11 +3905,11 @@ mxge_change_mtu(mxge_softc_t *sc, int mt old_mtu = ifp->if_mtu; ifp->if_mtu = mtu; if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - mxge_close(sc); + mxge_close(sc, 0); err = mxge_open(sc); if (err != 0) { ifp->if_mtu = old_mtu; - mxge_close(sc); + mxge_close(sc, 0); (void) mxge_open(sc); } } @@ -3922,7 +3967,7 @@ mxge_ioctl(struct ifnet *ifp, u_long com } } else { if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - mxge_close(sc); + mxge_close(sc, 0); } } mtx_unlock(&sc->driver_mtx); @@ -4645,7 +4690,7 @@ mxge_detach(device_t dev) mtx_lock(&sc->driver_mtx); sc->dying = 1; if (sc->ifp->if_drv_flags & IFF_DRV_RUNNING) - mxge_close(sc); + mxge_close(sc, 0); mtx_unlock(&sc->driver_mtx); ether_ifdetach(sc->ifp); callout_drain(&sc->co_hdl); From owner-svn-src-stable-8@FreeBSD.ORG Tue Sep 29 10:53:06 2009 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 A9628106566B; Tue, 29 Sep 2009 10:53:06 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 94D2F8FC17; Tue, 29 Sep 2009 10:53:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8TAr6X8083218; Tue, 29 Sep 2009 10:53:06 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8TAr6A5083207; Tue, 29 Sep 2009 10:53:06 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <200909291053.n8TAr6A5083207@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 29 Sep 2009 10:53:06 +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: r197613 - in stable/8: cddl/contrib/opensolaris cddl/contrib/opensolaris/cmd/zfs sys sys/amd64/include/xen sys/cddl/contrib/opensolaris sys/cddl/contrib/opensolaris/uts/common/fs sys/cd... 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, 29 Sep 2009 10:53:06 -0000 Author: pjd Date: Tue Sep 29 10:53:06 2009 New Revision: 197613 URL: http://svn.freebsd.org/changeset/base/197613 Log: MFC r197287, r197289, r197351, r197426, r197458, r197459, r197497, r197498, r197512, r197513, r197514, r197515, r197525: r197287: Purge namecache for the file system being rolled back, so it doesn't point at invalid vnodes after the rollback resulting in EIO errors when trying to access files which are in the namecache. Reported by: des r197289: Purge file system namecache when receiving incremental stream and rolling back to it. r197351: Purge namecache in the same place OpenSolaris does. r197426: Restore BSD behaviour - when creating new directory entry use parent directory gid to set group ownership and not process gid. This was overlooked during v6 -> v13 switch. PR: kern/139076 Reported by: Sean Winn r197458: Close race in zfs_zget(). We have to increase usecount first and then check for VI_DOOMED flag. Before this change vnode could be reclaimed between checking for the flag and increasing usecount. r197459: Before calling vflush(FORCECLOSE) mark file system as unmounted so the following vnops will fail. This is very important, because without this change vnode could be reclaimed at any point, even if we increased usecount. The only way to ensure that vnode won't be reclaimed was to lock it, which would be very hard to do in ZFS without changing a lot of code. With this change simply increasing usecount is enough to be sure vnode won't be reclaimed from under us. To be precise it can still be reclaimed but we won't be able to see it, because every try to enter ZFS through VFS will result in EIO. The only function that cannot return EIO, because it is needed for vflush() is zfs_root(). Introduce ZFS_ENTER_NOERROR() macro that only locks z_teardown_lock and never returns EIO. r197497: Switch to fletcher4 as the default checksum algorithm. Fletcher2 was proven to be a bit weak and OpenSolaris also switched to fletcher4. r197498: head/cddl/contrib/opensolaris Fletcher4 is not the default checksum algorithm. r197512: - Don't depend on value returned by gfs_*_inactive(), it doesn't work well with forced unmounts when GFS vnodes are referenced. - Make other preparations to GFS for forced unmounts. PR: kern/139062 Reported by: trasz r197513: Use traverse() function to find and return mount point's vnode instead of covered vnode when snapshot is already mounted. r197514: On lookup error VFS expects *vpp to be set to NULL, be sure to do that. r197515: Handle cases where virtual (GFS) vnodes are referenced when doing forced unmount. In that case we cannot depend on the proper order of invalidating vnodes, so we have to free resources when we have a chance. PR: kern/139062 Reported by: trasz r197525: Ensure that tv_sec is between INT32_MIN and INT32_MAX, so ZFS won't object. This completes the fix from r185586. PR: kern/139059 Reported by: Daniel Braniss Submitted by: Jaakko Heinonen Tested by: Daniel Braniss Approved by: re (kib) Modified: stable/8/cddl/contrib/opensolaris/ (props changed) stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs.8 stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/fletcher.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/nfsserver/nfs_serv.c Modified: stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Tue Sep 29 10:50:02 2009 (r197612) +++ stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Tue Sep 29 10:53:06 2009 (r197613) @@ -535,7 +535,7 @@ This property is not inherited. .ad .sp .6 .RS 4n -Controls the checksum used to verify data integrity. The default value is "on", which automatically selects an appropriate algorithm (currently, \fIfletcher2\fR, but this may change in future releases). The value "off" disables integrity +Controls the checksum used to verify data integrity. The default value is "on", which automatically selects an appropriate algorithm (currently, \fIfletcher4\fR, but this may change in future releases). The value "off" disables integrity checking on user data. Disabling checksums is NOT a recommended practice. .RE Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c Tue Sep 29 10:50:02 2009 (r197612) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c Tue Sep 29 10:53:06 2009 (r197613) @@ -595,7 +595,6 @@ found: if (vp->v_flag & V_XATTRDIR) VI_LOCK(fp->gfs_parent); VI_LOCK(vp); - ASSERT(vp->v_count < 2); /* * Really remove this vnode */ @@ -607,12 +606,7 @@ found: */ ge->gfse_vnode = NULL; } - if (vp->v_count == 1) { - vp->v_usecount--; - vdropl(vp); - } else { - VI_UNLOCK(vp); - } + VI_UNLOCK(vp); /* * Free vnode and release parent @@ -1084,18 +1078,16 @@ gfs_vop_inactive(ap) { vnode_t *vp = ap->a_vp; gfs_file_t *fp = vp->v_data; - void *data; if (fp->gfs_type == GFS_DIR) - data = gfs_dir_inactive(vp); + gfs_dir_inactive(vp); else - data = gfs_file_inactive(vp); - - if (data != NULL) - kmem_free(data, fp->gfs_size); + gfs_file_inactive(vp); VI_LOCK(vp); vp->v_data = NULL; VI_UNLOCK(vp); + kmem_free(fp, fp->gfs_size); + return (0); } Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/fletcher.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/fletcher.c Tue Sep 29 10:50:02 2009 (r197612) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/fletcher.c Tue Sep 29 10:53:06 2009 (r197613) @@ -19,11 +19,111 @@ * CDDL HEADER END */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" +/* + * Fletcher Checksums + * ------------------ + * + * ZFS's 2nd and 4th order Fletcher checksums are defined by the following + * recurrence relations: + * + * a = a + f + * i i-1 i-1 + * + * b = b + a + * i i-1 i + * + * c = c + b (fletcher-4 only) + * i i-1 i + * + * d = d + c (fletcher-4 only) + * i i-1 i + * + * Where + * a_0 = b_0 = c_0 = d_0 = 0 + * and + * f_0 .. f_(n-1) are the input data. + * + * Using standard techniques, these translate into the following series: + * + * __n_ __n_ + * \ | \ | + * a = > f b = > i * f + * n /___| n - i n /___| n - i + * i = 1 i = 1 + * + * + * __n_ __n_ + * \ | i*(i+1) \ | i*(i+1)*(i+2) + * c = > ------- f d = > ------------- f + * n /___| 2 n - i n /___| 6 n - i + * i = 1 i = 1 + * + * For fletcher-2, the f_is are 64-bit, and [ab]_i are 64-bit accumulators. + * Since the additions are done mod (2^64), errors in the high bits may not + * be noticed. For this reason, fletcher-2 is deprecated. + * + * For fletcher-4, the f_is are 32-bit, and [abcd]_i are 64-bit accumulators. + * A conservative estimate of how big the buffer can get before we overflow + * can be estimated using f_i = 0xffffffff for all i: + * + * % bc + * f=2^32-1;d=0; for (i = 1; d<2^64; i++) { d += f*i*(i+1)*(i+2)/6 }; (i-1)*4 + * 2264 + * quit + * % + * + * So blocks of up to 2k will not overflow. Our largest block size is + * 128k, which has 32k 4-byte words, so we can compute the largest possible + * accumulators, then divide by 2^64 to figure the max amount of overflow: + * + * % bc + * a=b=c=d=0; f=2^32-1; for (i=1; i<=32*1024; i++) { a+=f; b+=a; c+=b; d+=c } + * a/2^64;b/2^64;c/2^64;d/2^64 + * 0 + * 0 + * 1365 + * 11186858 + * quit + * % + * + * So a and b cannot overflow. To make sure each bit of input has some + * effect on the contents of c and d, we can look at what the factors of + * the coefficients in the equations for c_n and d_n are. The number of 2s + * in the factors determines the lowest set bit in the multiplier. Running + * through the cases for n*(n+1)/2 reveals that the highest power of 2 is + * 2^14, and for n*(n+1)*(n+2)/6 it is 2^15. So while some data may overflow + * the 64-bit accumulators, every bit of every f_i effects every accumulator, + * even for 128k blocks. + * + * If we wanted to make a stronger version of fletcher4 (fletcher4c?), + * we could do our calculations mod (2^32 - 1) by adding in the carries + * periodically, and store the number of carries in the top 32-bits. + * + * -------------------- + * Checksum Performance + * -------------------- + * + * There are two interesting components to checksum performance: cached and + * uncached performance. With cached data, fletcher-2 is about four times + * faster than fletcher-4. With uncached data, the performance difference is + * negligible, since the cost of a cache fill dominates the processing time. + * Even though fletcher-4 is slower than fletcher-2, it is still a pretty + * efficient pass over the data. + * + * In normal operation, the data which is being checksummed is in a buffer + * which has been filled either by: + * + * 1. a compression step, which will be mostly cached, or + * 2. a bcopy() or copyin(), which will be uncached (because the + * copy is cache-bypassing). + * + * For both cached and uncached data, both fletcher checksums are much faster + * than sha-256, and slower than 'off', which doesn't touch the data at all. + */ #include #include Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h Tue Sep 29 10:50:02 2009 (r197612) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h Tue Sep 29 10:53:06 2009 (r197613) @@ -255,6 +255,7 @@ VTOZ(vnode_t *vp) /* * ZFS_ENTER() is called on entry to each ZFS vnode and vfs operation. + * ZFS_ENTER_NOERROR() is called when we can't return EIO. * ZFS_EXIT() must be called before exitting the vop. * ZFS_VERIFY_ZP() verifies the znode is valid. */ @@ -267,6 +268,9 @@ VTOZ(vnode_t *vp) } \ } +#define ZFS_ENTER_NOERROR(zfsvfs) \ + rrw_enter(&(zfsvfs)->z_teardown_lock, RW_READER, FTAG) + #define ZFS_EXIT(zfsvfs) rrw_exit(&(zfsvfs)->z_teardown_lock, FTAG) #define ZFS_VERIFY_ZP(zp) \ Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Tue Sep 29 10:50:02 2009 (r197612) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Tue Sep 29 10:53:06 2009 (r197613) @@ -76,7 +76,7 @@ enum zio_checksum { ZIO_CHECKSUM_FUNCTIONS }; -#define ZIO_CHECKSUM_ON_VALUE ZIO_CHECKSUM_FLETCHER_2 +#define ZIO_CHECKSUM_ON_VALUE ZIO_CHECKSUM_FLETCHER_4 #define ZIO_CHECKSUM_DEFAULT ZIO_CHECKSUM_ON enum zio_compress { Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c Tue Sep 29 10:50:02 2009 (r197612) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c Tue Sep 29 10:53:06 2009 (r197613) @@ -1841,7 +1841,7 @@ zfs_perm_init(znode_t *zp, znode_t *pare fgid = zfs_fuid_create_cred(zfsvfs, ZFS_GROUP, tx, cr, fuidp); #ifdef __FreeBSD__ - gid = parent->z_phys->zp_gid; + gid = fgid = parent->z_phys->zp_gid; #else gid = crgetgid(cr); #endif Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Tue Sep 29 10:50:02 2009 (r197612) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Tue Sep 29 10:53:06 2009 (r197613) @@ -818,7 +818,11 @@ zfsctl_snapdir_lookup(ap) if ((sep = avl_find(&sdp->sd_snaps, &search, &where)) != NULL) { *vpp = sep->se_root; VN_HOLD(*vpp); - if ((*vpp)->v_mountedhere == NULL) { + err = traverse(vpp, LK_EXCLUSIVE | LK_RETRY); + if (err) { + VN_RELE(*vpp); + *vpp = NULL; + } else if (*vpp == sep->se_root) { /* * The snapshot was unmounted behind our backs, * try to remount it. @@ -832,10 +836,9 @@ zfsctl_snapdir_lookup(ap) */ (*vpp)->v_flag &= ~VROOT; } - vn_lock(*vpp, LK_EXCLUSIVE | LK_RETRY); mutex_exit(&sdp->sd_lock); ZFS_EXIT(zfsvfs); - return (0); + return (err); } /* @@ -895,6 +898,8 @@ domount: } mutex_exit(&sdp->sd_lock); ZFS_EXIT(zfsvfs); + if (err != 0) + *vpp = NULL; return (err); } @@ -1002,15 +1007,24 @@ zfsctl_snapdir_inactive(ap) { vnode_t *vp = ap->a_vp; zfsctl_snapdir_t *sdp = vp->v_data; - void *private; + zfs_snapentry_t *sep; - private = gfs_dir_inactive(vp); - if (private != NULL) { - ASSERT(avl_numnodes(&sdp->sd_snaps) == 0); - mutex_destroy(&sdp->sd_lock); - avl_destroy(&sdp->sd_snaps); - kmem_free(private, sizeof (zfsctl_snapdir_t)); + /* + * On forced unmount we have to free snapshots from here. + */ + mutex_enter(&sdp->sd_lock); + while ((sep = avl_first(&sdp->sd_snaps)) != NULL) { + avl_remove(&sdp->sd_snaps, sep); + kmem_free(sep->se_name, strlen(sep->se_name) + 1); + kmem_free(sep, sizeof (zfs_snapentry_t)); } + mutex_exit(&sdp->sd_lock); + gfs_dir_inactive(vp); + ASSERT(avl_numnodes(&sdp->sd_snaps) == 0); + mutex_destroy(&sdp->sd_lock); + avl_destroy(&sdp->sd_snaps); + kmem_free(sdp, sizeof (zfsctl_snapdir_t)); + return (0); } @@ -1068,6 +1082,9 @@ zfsctl_snapshot_inactive(ap) int locked; vnode_t *dvp; + if (vp->v_count > 0) + goto end; + VERIFY(gfs_dir_lookup(vp, "..", &dvp, cr, 0, NULL, NULL) == 0); sdp = dvp->v_data; VOP_UNLOCK(dvp, 0); @@ -1075,11 +1092,6 @@ zfsctl_snapshot_inactive(ap) if (!(locked = MUTEX_HELD(&sdp->sd_lock))) mutex_enter(&sdp->sd_lock); - if (vp->v_count > 1) { - if (!locked) - mutex_exit(&sdp->sd_lock); - return (0); - } ASSERT(!vn_ismntpt(vp)); sep = avl_first(&sdp->sd_snaps); @@ -1099,6 +1111,7 @@ zfsctl_snapshot_inactive(ap) if (!locked) mutex_exit(&sdp->sd_lock); VN_RELE(dvp); +end: VFS_RELE(vp->v_vfsp); /* Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Tue Sep 29 10:50:02 2009 (r197612) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Tue Sep 29 10:53:06 2009 (r197613) @@ -864,7 +864,7 @@ zfs_root(vfs_t *vfsp, int flags, vnode_t znode_t *rootzp; int error; - ZFS_ENTER(zfsvfs); + ZFS_ENTER_NOERROR(zfsvfs); error = zfs_zget(zfsvfs, zfsvfs->z_root, &rootzp); if (error == 0) { @@ -898,6 +898,9 @@ zfsvfs_teardown(zfsvfs_t *zfsvfs, boolea * 'z_parent' is self referential for non-snapshots. */ (void) dnlc_purge_vfsp(zfsvfs->z_parent->z_vfs, 0); +#ifdef FREEBSD_NAMECACHE + cache_purgevfs(zfsvfs->z_parent->z_vfs); +#endif } /* @@ -1027,6 +1030,17 @@ zfs_umount(vfs_t *vfsp, int fflag) ASSERT(zfsvfs->z_ctldir == NULL); } + if (fflag & MS_FORCE) { + /* + * Mark file system as unmounted before calling + * vflush(FORCECLOSE). This way we ensure no future vnops + * will be called and risk operating on DOOMED vnodes. + */ + rrw_enter(&zfsvfs->z_teardown_lock, RW_WRITER, FTAG); + zfsvfs->z_unmounted = B_TRUE; + rrw_exit(&zfsvfs->z_teardown_lock, FTAG); + } + /* * Flush all the files. */ @@ -1093,8 +1107,7 @@ zfs_umount(vfs_t *vfsp, int fflag) if (zfsvfs->z_issnap) { vnode_t *svp = vfsp->mnt_vnodecovered; - ASSERT(svp->v_count == 2 || svp->v_count == 1); - if (svp->v_count == 2) + if (svp->v_count >= 2) VN_RELE(svp); } zfs_freevfs(vfsp); Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Tue Sep 29 10:50:02 2009 (r197612) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Tue Sep 29 10:53:06 2009 (r197613) @@ -890,17 +890,25 @@ again: if (zp->z_unlinked) { err = ENOENT; } else { - if ((vp = ZTOV(zp)) != NULL) { - VI_LOCK(vp); + int dying = 0; + + vp = ZTOV(zp); + if (vp == NULL) + dying = 1; + else { + VN_HOLD(vp); if ((vp->v_iflag & VI_DOOMED) != 0) { - VI_UNLOCK(vp); - vp = NULL; - } else - VI_UNLOCK(vp); + dying = 1; + /* + * Don't VN_RELE() vnode here, because + * it can call vn_lock() which creates + * LOR between vnode lock and znode + * lock. We will VN_RELE() the vnode + * after droping znode lock. + */ + } } - if (vp != NULL) - VN_HOLD(vp); - else { + if (dying) { if (first) { ZFS_LOG(1, "dying znode detected (zp=%p)", zp); first = 0; @@ -912,6 +920,8 @@ again: dmu_buf_rele(db, NULL); mutex_exit(&zp->z_lock); ZFS_OBJ_HOLD_EXIT(zfsvfs, obj_num); + if (vp != NULL) + VN_RELE(vp); tsleep(zp, 0, "zcollide", 1); goto again; } Modified: stable/8/sys/nfsserver/nfs_serv.c ============================================================================== --- stable/8/sys/nfsserver/nfs_serv.c Tue Sep 29 10:50:02 2009 (r197612) +++ stable/8/sys/nfsserver/nfs_serv.c Tue Sep 29 10:53:06 2009 (r197613) @@ -1332,7 +1332,7 @@ nfsrv_create(struct nfsrv_descript *nfsd tl = nfsm_dissect_nonblock(u_int32_t *, NFSX_V3CREATEVERF); /* Unique bytes, endianness is not important. */ - cverf.tv_sec = tl[0]; + cverf.tv_sec = (int32_t)tl[0]; cverf.tv_nsec = tl[1]; exclusive_flag = 1; break; From owner-svn-src-stable-8@FreeBSD.ORG Tue Sep 29 12:18:24 2009 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 53C101065670; Tue, 29 Sep 2009 12:18:24 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 40EC88FC08; Tue, 29 Sep 2009 12:18:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8TCIN0u085043; Tue, 29 Sep 2009 12:18:23 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8TCINmv085038; Tue, 29 Sep 2009 12:18:23 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <200909291218.n8TCINmv085038@svn.freebsd.org> From: Rui Paulo Date: Tue, 29 Sep 2009 12:18:23 +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: r197614 - stable/8/sys/net80211 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, 29 Sep 2009 12:18:24 -0000 Author: rpaulo Date: Tue Sep 29 12:18:23 2009 New Revision: 197614 URL: http://svn.freebsd.org/changeset/base/197614 Log: Update 802.11s mesh support to draft 3.03. This includes a revised frame format for peering and changes to the PERR frames. Note that this is incompatible with the previous code. Reviewed by: sam Approved by: re (kib) Modified: stable/8/sys/net80211/ieee80211.h stable/8/sys/net80211/ieee80211_hwmp.c stable/8/sys/net80211/ieee80211_mesh.c stable/8/sys/net80211/ieee80211_mesh.h Modified: stable/8/sys/net80211/ieee80211.h ============================================================================== --- stable/8/sys/net80211/ieee80211.h Tue Sep 29 10:53:06 2009 (r197613) +++ stable/8/sys/net80211/ieee80211.h Tue Sep 29 12:18:23 2009 (r197614) @@ -708,7 +708,7 @@ enum { IEEE80211_ELEMID_VENDOR = 221, /* vendor private */ /* - * 802.11s IEs based on D3.0 spec and were not assigned by + * 802.11s IEs based on D3.03 spec and were not assigned by * ANA. Beware changing them because some of them are being * kept compatible with Linux. */ @@ -726,10 +726,9 @@ enum { IEEE80211_ELEMID_MESHPREQ = 68, IEEE80211_ELEMID_MESHPREP = 69, IEEE80211_ELEMID_MESHPERR = 70, - IEEE80211_ELEMID_MESHPU = 53, - IEEE80211_ELEMID_MESHPUC = 54, + IEEE80211_ELEMID_MESHPXU = 53, + IEEE80211_ELEMID_MESHPXUC = 54, IEEE80211_ELEMID_MESHAH = 60, /* Abbreviated Handshake */ - IEEE80211_ELEMID_MESHPEERVER = 80, /* Peering Protocol Version */ }; struct ieee80211_tim_ie { @@ -925,6 +924,9 @@ enum { IEEE80211_REASON_MESH_INVALID_GTK = 8, /* 11s */ IEEE80211_REASON_MESH_INCONS_PARAMS = 9, /* 11s */ IEEE80211_REASON_MESH_INVALID_SECURITY = 10, /* 11s */ + IEEE80211_REASON_MESH_PERR_UNSPEC = 11, /* 11s */ + IEEE80211_REASON_MESH_PERR_NO_FI = 12, /* 11s */ + IEEE80211_REASON_MESH_PERR_DEST_UNREACH = 13, /* 11s */ IEEE80211_STATUS_SUCCESS = 0, IEEE80211_STATUS_UNSPECIFIED = 1, Modified: stable/8/sys/net80211/ieee80211_hwmp.c ============================================================================== --- stable/8/sys/net80211/ieee80211_hwmp.c Tue Sep 29 10:53:06 2009 (r197613) +++ stable/8/sys/net80211/ieee80211_hwmp.c Tue Sep 29 12:18:23 2009 (r197614) @@ -188,10 +188,7 @@ SYSCTL_PROC(_net_wlan_hwmp, OID_AUTO, ra #define IEEE80211_HWMP_DEFAULT_MAXHOPS 31 -static ieee80211_recv_action_func hwmp_recv_action_meshpath_preq; -static ieee80211_recv_action_func hwmp_recv_action_meshpath_prep; -static ieee80211_recv_action_func hwmp_recv_action_meshpath_perr; -static ieee80211_recv_action_func hwmp_recv_action_meshpath_rann; +static ieee80211_recv_action_func hwmp_recv_action_meshpath; static struct ieee80211_mesh_proto_path mesh_proto_hwmp = { .mpp_descr = "HWMP", @@ -217,16 +214,10 @@ ieee80211_hwmp_init(void) ieee80211_hwmp_rannint = msecs_to_ticks(1*1000); /* - * Register action frame handlers. + * Register action frame handler. */ ieee80211_recv_action_register(IEEE80211_ACTION_CAT_MESHPATH, - IEEE80211_ACTION_MESHPATH_REQ, hwmp_recv_action_meshpath_preq); - ieee80211_recv_action_register(IEEE80211_ACTION_CAT_MESHPATH, - IEEE80211_ACTION_MESHPATH_REP, hwmp_recv_action_meshpath_prep); - ieee80211_recv_action_register(IEEE80211_ACTION_CAT_MESHPATH, - IEEE80211_ACTION_MESHPATH_ERR, hwmp_recv_action_meshpath_perr); - ieee80211_recv_action_register(IEEE80211_ACTION_CAT_MESHPATH, - IEEE80211_ACTION_MESHPATH_RANN, hwmp_recv_action_meshpath_rann); + IEEE80211_ACTION_MESHPATH_SEL, hwmp_recv_action_meshpath); /* NB: default is 5 secs per spec */ mesh_proto_hwmp.mpp_inact = msecs_to_ticks(5*1000); @@ -285,17 +276,23 @@ hwmp_newstate(struct ieee80211vap *vap, } static int -hwmp_recv_action_meshpath_preq(struct ieee80211_node *ni, +hwmp_recv_action_meshpath(struct ieee80211_node *ni, const struct ieee80211_frame *wh, const uint8_t *frm, const uint8_t *efrm) { struct ieee80211vap *vap = ni->ni_vap; struct ieee80211_meshpreq_ie preq; + struct ieee80211_meshprep_ie prep; + struct ieee80211_meshperr_ie perr; + struct ieee80211_meshrann_ie rann; const uint8_t *iefrm = frm + 2; /* action + code */ + int found = 0; while (efrm - iefrm > 1) { IEEE80211_VERIFY_LENGTH(efrm - iefrm, iefrm[1] + 2, return 0); - if (*iefrm == IEEE80211_ELEMID_MESHPREQ) { + switch (*iefrm) { + case IEEE80211_ELEMID_MESHPREQ: + { const struct ieee80211_meshpreq_ie *mpreq = (const struct ieee80211_meshpreq_ie *) iefrm; /* XXX > 1 target */ @@ -305,7 +302,7 @@ hwmp_recv_action_meshpath_preq(struct ie IEEE80211_MSG_ACTION | IEEE80211_MSG_HWMP, wh, NULL, "%s", "PREQ with wrong len"); vap->iv_stats.is_rx_mgtdiscard++; - return 1; + break; } memcpy(&preq, mpreq, sizeof(preq)); preq.preq_id = LE_READ_4(&mpreq->preq_id); @@ -315,28 +312,11 @@ hwmp_recv_action_meshpath_preq(struct ie preq.preq_targets[0].target_seq = LE_READ_4(&mpreq->preq_targets[0].target_seq); hwmp_recv_preq(vap, ni, wh, &preq); - return 0; + found++; + break; } - iefrm += iefrm[1] + 2; - } - IEEE80211_DISCARD(vap, IEEE80211_MSG_ACTION | IEEE80211_MSG_HWMP, - wh, NULL, "%s", "PREQ without IE"); - vap->iv_stats.is_rx_mgtdiscard++; - return 0; -} - -static int -hwmp_recv_action_meshpath_prep(struct ieee80211_node *ni, - const struct ieee80211_frame *wh, - const uint8_t *frm, const uint8_t *efrm) -{ - struct ieee80211vap *vap = ni->ni_vap; - struct ieee80211_meshprep_ie prep; - const uint8_t *iefrm = frm + 2; /* action + code */ - - while (efrm - iefrm > 1) { - IEEE80211_VERIFY_LENGTH(efrm - iefrm, iefrm[1] + 2, return 0); - if (*iefrm == IEEE80211_ELEMID_MESHPREP) { + case IEEE80211_ELEMID_MESHPREP: + { const struct ieee80211_meshprep_ie *mprep = (const struct ieee80211_meshprep_ie *) iefrm; if (mprep->prep_len != @@ -345,7 +325,7 @@ hwmp_recv_action_meshpath_prep(struct ie IEEE80211_MSG_ACTION | IEEE80211_MSG_HWMP, wh, NULL, "%s", "PREP with wrong len"); vap->iv_stats.is_rx_mgtdiscard++; - return 1; + break; } memcpy(&prep, mprep, sizeof(prep)); prep.prep_targetseq = LE_READ_4(&mprep->prep_targetseq); @@ -353,28 +333,11 @@ hwmp_recv_action_meshpath_prep(struct ie prep.prep_metric = LE_READ_4(&mprep->prep_metric); prep.prep_origseq = LE_READ_4(&mprep->prep_origseq); hwmp_recv_prep(vap, ni, wh, &prep); - return 0; + found++; + break; } - iefrm += iefrm[1] + 2; - } - IEEE80211_DISCARD(vap, IEEE80211_MSG_ACTION | IEEE80211_MSG_HWMP, - wh, NULL, "%s", "PREP without IE"); - vap->iv_stats.is_rx_mgtdiscard++; - return 0; -} - -static int -hwmp_recv_action_meshpath_perr(struct ieee80211_node *ni, - const struct ieee80211_frame *wh, - const uint8_t *frm, const uint8_t *efrm) -{ - struct ieee80211_meshperr_ie perr; - struct ieee80211vap *vap = ni->ni_vap; - const uint8_t *iefrm = frm + 2; /* action + code */ - - while (efrm - iefrm > 1) { - IEEE80211_VERIFY_LENGTH(efrm - iefrm, iefrm[1] + 2, return 0); - if (*iefrm == IEEE80211_ELEMID_MESHPERR) { + case IEEE80211_ELEMID_MESHPERR: + { const struct ieee80211_meshperr_ie *mperr = (const struct ieee80211_meshperr_ie *) iefrm; /* XXX > 1 target */ @@ -384,34 +347,17 @@ hwmp_recv_action_meshpath_perr(struct ie IEEE80211_MSG_ACTION | IEEE80211_MSG_HWMP, wh, NULL, "%s", "PERR with wrong len"); vap->iv_stats.is_rx_mgtdiscard++; - return 1; + break; } memcpy(&perr, mperr, sizeof(perr)); perr.perr_dests[0].dest_seq = LE_READ_4(&mperr->perr_dests[0].dest_seq); hwmp_recv_perr(vap, ni, wh, &perr); - return 0; + found++; + break; } - iefrm += iefrm[1] + 2; - } - IEEE80211_DISCARD(vap, IEEE80211_MSG_ACTION | IEEE80211_MSG_HWMP, - wh, NULL, "%s", "PERR without IE"); - vap->iv_stats.is_rx_mgtdiscard++; - return 0; -} - -static int -hwmp_recv_action_meshpath_rann(struct ieee80211_node *ni, - const struct ieee80211_frame *wh, - const uint8_t *frm, const uint8_t *efrm) -{ - struct ieee80211vap *vap = ni->ni_vap; - struct ieee80211_meshrann_ie rann; - const uint8_t *iefrm = frm + 2; /* action + code */ - - while (efrm - iefrm > 1) { - IEEE80211_VERIFY_LENGTH(efrm - iefrm, iefrm[1] + 2, return 0); - if (*iefrm == IEEE80211_ELEMID_MESHRANN) { + case IEEE80211_ELEMID_MESHRANN: + { const struct ieee80211_meshrann_ie *mrann = (const struct ieee80211_meshrann_ie *) iefrm; if (mrann->rann_len != @@ -426,13 +372,18 @@ hwmp_recv_action_meshpath_rann(struct ie rann.rann_seq = LE_READ_4(&mrann->rann_seq); rann.rann_metric = LE_READ_4(&mrann->rann_metric); hwmp_recv_rann(vap, ni, wh, &rann); - return 0; + found++; + break; + } } iefrm += iefrm[1] + 2; } - IEEE80211_DISCARD(vap, IEEE80211_MSG_ACTION | IEEE80211_MSG_HWMP, - wh, NULL, "%s", "RANN without IE"); - vap->iv_stats.is_rx_mgtdiscard++; + if (!found) { + IEEE80211_DISCARD(vap, + IEEE80211_MSG_ACTION | IEEE80211_MSG_HWMP, + wh, NULL, "%s", "PATH SEL action without IE"); + vap->iv_stats.is_rx_mgtdiscard++; + } return 0; } @@ -480,24 +431,21 @@ hwmp_send_action(struct ieee80211_node * return ENOMEM; } *frm++ = IEEE80211_ACTION_CAT_MESHPATH; + *frm++ = IEEE80211_ACTION_MESHPATH_SEL; switch (*ie) { case IEEE80211_ELEMID_MESHPREQ: - *frm++ = IEEE80211_ACTION_MESHPATH_REQ; frm = hwmp_add_meshpreq(frm, (struct ieee80211_meshpreq_ie *)ie); break; case IEEE80211_ELEMID_MESHPREP: - *frm++ = IEEE80211_ACTION_MESHPATH_REP; frm = hwmp_add_meshprep(frm, (struct ieee80211_meshprep_ie *)ie); break; case IEEE80211_ELEMID_MESHPERR: - *frm++ = IEEE80211_ACTION_MESHPATH_ERR; frm = hwmp_add_meshperr(frm, (struct ieee80211_meshperr_ie *)ie); break; case IEEE80211_ELEMID_MESHRANN: - *frm++ = IEEE80211_ACTION_MESHPATH_RANN; frm = hwmp_add_meshrann(frm, (struct ieee80211_meshrann_ie *)ie); break; @@ -528,6 +476,11 @@ hwmp_send_action(struct ieee80211_node * return ic->ic_raw_xmit(ni, m, ¶ms); } +#define ADDSHORT(frm, v) do { \ + frm[0] = (v) & 0xff; \ + frm[1] = (v) >> 8; \ + frm += 2; \ +} while (0) #define ADDWORD(frm, v) do { \ LE_WRITE_4(frm, v); \ frm += 4; \ @@ -592,12 +545,14 @@ hwmp_add_meshperr(uint8_t *frm, const st *frm++ = IEEE80211_ELEMID_MESHPERR; *frm++ = sizeof(struct ieee80211_meshperr_ie) - 2 + (perr->perr_ndests - 1) * sizeof(*perr->perr_dests); - *frm++ = perr->perr_mode; + *frm++ = perr->perr_ttl; *frm++ = perr->perr_ndests; for (i = 0; i < perr->perr_ndests; i++) { + *frm += perr->perr_dests[i].dest_flags; IEEE80211_ADDR_COPY(frm, perr->perr_dests[i].dest_addr); frm += 6; ADDWORD(frm, perr->perr_dests[i].dest_seq); + ADDSHORT(frm, perr->perr_dests[i].dest_rcode); } return frm; } @@ -1138,12 +1093,15 @@ hwmp_send_prep(struct ieee80211_node *ni sizeof(struct ieee80211_meshprep_ie)); } +#define PERR_DFLAGS(n) perr.perr_dests[n].dest_flags #define PERR_DADDR(n) perr.perr_dests[n].dest_addr #define PERR_DSEQ(n) perr.perr_dests[n].dest_seq +#define PERR_DRCODE(n) perr.perr_dests[n].dest_rcode static void hwmp_peerdown(struct ieee80211_node *ni) { struct ieee80211vap *vap = ni->ni_vap; + struct ieee80211_mesh_state *ms = vap->iv_mesh; struct ieee80211_meshperr_ie perr; struct ieee80211_mesh_route *rt; struct ieee80211_hwmp_route *hr; @@ -1154,19 +1112,27 @@ hwmp_peerdown(struct ieee80211_node *ni) hr = IEEE80211_MESH_ROUTE_PRIV(rt, struct ieee80211_hwmp_route); IEEE80211_NOTE(vap, IEEE80211_MSG_HWMP, ni, "%s", "delete route entry"); - perr.perr_mode = 0; + perr.perr_ttl = ms->ms_ttl; perr.perr_ndests = 1; + if (hr->hr_seq == 0) + PERR_DFLAGS(0) |= IEEE80211_MESHPERR_DFLAGS_USN; + PERR_DFLAGS(0) |= IEEE80211_MESHPERR_DFLAGS_RC; IEEE80211_ADDR_COPY(PERR_DADDR(0), rt->rt_dest); PERR_DSEQ(0) = hr->hr_seq; + PERR_DRCODE(0) = IEEE80211_REASON_MESH_PERR_DEST_UNREACH; /* NB: flush everything passing through peer */ ieee80211_mesh_rt_flush_peer(vap, ni->ni_macaddr); hwmp_send_perr(vap->iv_bss, vap->iv_myaddr, broadcastaddr, &perr); } +#undef PERR_DFLAGS #undef PERR_DADDR #undef PERR_DSEQ +#undef PERR_DRCODE +#define PERR_DFLAGS(n) perr->perr_dests[n].dest_flags #define PERR_DADDR(n) perr->perr_dests[n].dest_addr #define PERR_DSEQ(n) perr->perr_dests[n].dest_seq +#define PERR_DRCODE(n) perr->perr_dests[n].dest_rcode static void hwmp_recv_perr(struct ieee80211vap *vap, struct ieee80211_node *ni, const struct ieee80211_frame *wh, const struct ieee80211_meshperr_ie *perr) @@ -1192,9 +1158,9 @@ hwmp_recv_perr(struct ieee80211vap *vap, rt = ieee80211_mesh_rt_find(vap, PERR_DADDR(i)); if (rt == NULL) continue; - hr = IEEE80211_MESH_ROUTE_PRIV(rt, - struct ieee80211_hwmp_route); - if (HWMP_SEQ_GEQ(PERR_DSEQ(i), hr->hr_seq)) { + hr = IEEE80211_MESH_ROUTE_PRIV(rt, struct ieee80211_hwmp_route); + if (!(PERR_DFLAGS(0) & IEEE80211_MESHPERR_DFLAGS_USN) && + HWMP_SEQ_GEQ(PERR_DSEQ(i), hr->hr_seq)) { ieee80211_mesh_rt_del(vap, rt->rt_dest); ieee80211_mesh_rt_flush_peer(vap, rt->rt_dest); rt = NULL; @@ -1205,10 +1171,11 @@ hwmp_recv_perr(struct ieee80211vap *vap, * Propagate the PERR if we previously found it on our routing table. * XXX handle ndest > 1 */ - if (forward) { + if (forward && perr->perr_ttl > 1) { IEEE80211_NOTE(vap, IEEE80211_MSG_HWMP, ni, "propagate PERR from %s", ether_sprintf(wh->i_addr2)); memcpy(&pperr, perr, sizeof(*perr)); + pperr.perr_ttl--; hwmp_send_perr(vap->iv_bss, vap->iv_myaddr, broadcastaddr, &pperr); } Modified: stable/8/sys/net80211/ieee80211_mesh.c ============================================================================== --- stable/8/sys/net80211/ieee80211_mesh.c Tue Sep 29 10:53:06 2009 (r197613) +++ stable/8/sys/net80211/ieee80211_mesh.c Tue Sep 29 12:18:23 2009 (r197614) @@ -87,10 +87,10 @@ static void mesh_peer_timeout_backoff(st static void mesh_peer_timeout_cb(void *); static __inline void mesh_peer_timeout_stop(struct ieee80211_node *); -static int mesh_verify_meshpeerver(struct ieee80211vap *, const uint8_t *); static int mesh_verify_meshid(struct ieee80211vap *, const uint8_t *); static int mesh_verify_meshconf(struct ieee80211vap *, const uint8_t *); -static int mesh_verify_meshpeer(struct ieee80211vap *, const uint8_t *); +static int mesh_verify_meshpeer(struct ieee80211vap *, uint8_t, + const uint8_t *); uint32_t mesh_airtime_calc(struct ieee80211_node *); /* @@ -1544,19 +1544,16 @@ static const struct ieee80211_meshpeer_i mesh_parse_meshpeering_action(struct ieee80211_node *ni, const struct ieee80211_frame *wh, /* XXX for VERIFY_LENGTH */ const uint8_t *frm, const uint8_t *efrm, - struct ieee80211_meshpeer_ie *mp) + struct ieee80211_meshpeer_ie *mp, uint8_t subtype) { struct ieee80211vap *vap = ni->ni_vap; const struct ieee80211_meshpeer_ie *mpie; - const uint8_t *meshid, *meshconf, *meshpeerver, *meshpeer; + const uint8_t *meshid, *meshconf, *meshpeer; - meshid = meshconf = meshpeerver = meshpeer = NULL; + meshid = meshconf = meshpeer = NULL; while (efrm - frm > 1) { IEEE80211_VERIFY_LENGTH(efrm - frm, frm[1] + 2, return NULL); switch (*frm) { - case IEEE80211_ELEMID_MESHPEERVER: - meshpeerver = frm; - break; case IEEE80211_ELEMID_MESHID: meshid = frm; break; @@ -1567,12 +1564,10 @@ mesh_parse_meshpeering_action(struct iee meshpeer = frm; mpie = (const struct ieee80211_meshpeer_ie *) frm; memset(mp, 0, sizeof(*mp)); - mp->peer_subtype = mpie->peer_subtype; mp->peer_llinkid = LE_READ_2(&mpie->peer_llinkid); /* NB: peer link ID is optional on these frames */ - if (mpie->peer_subtype == - IEEE80211_MESH_PEER_LINK_CLOSE && - mpie->peer_len == 5) { + if (subtype == IEEE80211_MESH_PEER_LINK_CLOSE && + mpie->peer_len == 8) { mp->peer_linkid = 0; mp->peer_rcode = LE_READ_2(&mpie->peer_linkid); } else { @@ -1589,12 +1584,12 @@ mesh_parse_meshpeering_action(struct iee * close subtype don't have a Mesh Configuration IE. * If if fails validation, close the peer link. */ - KASSERT(meshpeer != NULL && mp->peer_subtype != - IEEE80211_ACTION_MESHPEERING_CLOSE, ("parsing close action")); + KASSERT(meshpeer != NULL && + subtype != IEEE80211_ACTION_MESHPEERING_CLOSE, + ("parsing close action")); - if (mesh_verify_meshpeerver(vap, meshpeerver) || - mesh_verify_meshid(vap, meshid) || - mesh_verify_meshpeer(vap, meshpeer) || + if (mesh_verify_meshid(vap, meshid) || + mesh_verify_meshpeer(vap, subtype, meshpeer) || mesh_verify_meshconf(vap, meshconf)) { uint16_t args[3]; @@ -1638,7 +1633,8 @@ mesh_recv_action_meshpeering_open(struct uint16_t args[3]; /* +2+2 for action + code + capabilites */ - meshpeer = mesh_parse_meshpeering_action(ni, wh, frm+2+2, efrm, &ie); + meshpeer = mesh_parse_meshpeering_action(ni, wh, frm+2+2, efrm, &ie, + IEEE80211_ACTION_MESHPEERING_OPEN); if (meshpeer == NULL) { return 0; } @@ -1770,7 +1766,8 @@ mesh_recv_action_meshpeering_confirm(str uint16_t args[3]; /* +2+2+2+2 for action + code + capabilites + status code + AID */ - meshpeer = mesh_parse_meshpeering_action(ni, wh, frm+2+2+2+2, efrm, &ie); + meshpeer = mesh_parse_meshpeering_action(ni, wh, frm+2+2+2+2, efrm, &ie, + IEEE80211_ACTION_MESHPEERING_CONFIRM); if (meshpeer == NULL) { return 0; } @@ -1933,7 +1930,6 @@ mesh_send_action_meshpeering_open(struct ic->ic_headroom + sizeof(struct ieee80211_frame), sizeof(uint16_t) /* action+category */ + sizeof(uint16_t) /* capabilites */ - + sizeof(struct ieee80211_meshpeerver_ie) + 2 + IEEE80211_RATE_SIZE + 2 + (IEEE80211_RATE_MAXSIZE - IEEE80211_RATE_SIZE) + 2 + IEEE80211_MESHID_LEN @@ -1946,7 +1942,6 @@ mesh_send_action_meshpeering_open(struct * [1] category * [1] action * [2] capabilities - * [tlv] mesh peer protocol version * [tlv] rates * [tlv] xrates * [tlv] mesh id @@ -1956,7 +1951,6 @@ mesh_send_action_meshpeering_open(struct *frm++ = category; *frm++ = action; ADDSHORT(frm, ieee80211_getcapinfo(vap, ni->ni_chan)); - frm = ieee80211_add_meshpeerver(frm, vap); rs = ieee80211_get_suprates(ic, ic->ic_curchan); frm = ieee80211_add_rates(frm, rs); frm = ieee80211_add_xrates(frm, rs); @@ -1999,7 +1993,6 @@ mesh_send_action_meshpeering_confirm(str + sizeof(uint16_t) /* capabilites */ + sizeof(uint16_t) /* status code */ + sizeof(uint16_t) /* AID */ - + sizeof(struct ieee80211_meshpeerver_ie) + 2 + IEEE80211_RATE_SIZE + 2 + (IEEE80211_RATE_MAXSIZE - IEEE80211_RATE_SIZE) + 2 + IEEE80211_MESHID_LEN @@ -2014,7 +2007,6 @@ mesh_send_action_meshpeering_confirm(str * [2] capabilities * [2] status code * [2] association id (peer ID) - * [tlv] mesh peer protocol version * [tlv] rates * [tlv] xrates * [tlv] mesh id @@ -2026,7 +2018,6 @@ mesh_send_action_meshpeering_confirm(str ADDSHORT(frm, ieee80211_getcapinfo(vap, ni->ni_chan)); ADDSHORT(frm, 0); /* status code */ ADDSHORT(frm, args[1]); /* AID */ - frm = ieee80211_add_meshpeerver(frm, vap); rs = ieee80211_get_suprates(ic, ic->ic_curchan); frm = ieee80211_add_rates(frm, rs); frm = ieee80211_add_xrates(frm, rs); @@ -2067,7 +2058,6 @@ mesh_send_action_meshpeering_close(struc ic->ic_headroom + sizeof(struct ieee80211_frame), sizeof(uint16_t) /* action+category */ + sizeof(uint16_t) /* reason code */ - + sizeof(struct ieee80211_meshpeerver_ie) + 2 + IEEE80211_MESHID_LEN + sizeof(struct ieee80211_meshpeer_ie) ); @@ -2077,14 +2067,12 @@ mesh_send_action_meshpeering_close(struc * [1] category * [1] action * [2] reason code - * [tlv] mesh peer protocol version * [tlv] mesh id * [tlv] mesh peer link mgmt */ *frm++ = category; *frm++ = action; ADDSHORT(frm, args[2]); /* reason code */ - frm = ieee80211_add_meshpeerver(frm, vap); frm = ieee80211_add_meshid(frm, vap); frm = ieee80211_add_meshpeer(frm, IEEE80211_MESH_PEER_LINK_CLOSE, @@ -2279,19 +2267,6 @@ mesh_peer_timeout_cb(void *arg) } static int -mesh_verify_meshpeerver(struct ieee80211vap *vap, const uint8_t *ie) -{ - static const uint8_t peer[4] = IEEE80211_MESHPEERVER_PEER; - const struct ieee80211_meshpeerver_ie *meshpeerver = - (const struct ieee80211_meshpeerver_ie *) ie; - - if (meshpeerver->peerver_len != - sizeof(struct ieee80211_meshpeerver_ie) - 2) - return 1; - return memcmp(meshpeerver->peerver_proto, peer, 4); -} - -static int mesh_verify_meshid(struct ieee80211vap *vap, const uint8_t *ie) { struct ieee80211_mesh_state *ms = vap->iv_mesh; @@ -2364,26 +2339,28 @@ mesh_verify_meshconf(struct ieee80211vap } static int -mesh_verify_meshpeer(struct ieee80211vap *vap, const uint8_t *ie) +mesh_verify_meshpeer(struct ieee80211vap *vap, uint8_t subtype, + const uint8_t *ie) { const struct ieee80211_meshpeer_ie *meshpeer = (const struct ieee80211_meshpeer_ie *) ie; - if (meshpeer == NULL) + if (meshpeer == NULL || meshpeer->peer_len < 6 || + meshpeer->peer_len > 10) return 1; - switch (meshpeer->peer_subtype) { + switch (subtype) { case IEEE80211_MESH_PEER_LINK_OPEN: - if (meshpeer->peer_len != 3) + if (meshpeer->peer_len != 6) return 1; break; case IEEE80211_MESH_PEER_LINK_CONFIRM: - if (meshpeer->peer_len != 5) + if (meshpeer->peer_len != 8) return 1; break; case IEEE80211_MESH_PEER_LINK_CLOSE: - if (meshpeer->peer_len < 5) + if (meshpeer->peer_len < 8) return 1; - if (meshpeer->peer_len == 5 && meshpeer->peer_linkid != 0) + if (meshpeer->peer_len == 8 && meshpeer->peer_linkid != 0) return 1; if (meshpeer->peer_rcode == 0) return 1; @@ -2449,53 +2426,40 @@ ieee80211_add_meshconf(uint8_t *frm, str } /* - * Add a Mesh Peer Protocol IE to a frame. - * XXX: needs to grow support for Abbreviated Handshake - */ -uint8_t * -ieee80211_add_meshpeerver(uint8_t *frm, struct ieee80211vap *vap) -{ - static struct ieee80211_meshpeerver_ie ie = { - .peerver_ie = IEEE80211_ELEMID_MESHPEERVER, - .peerver_len = 4, - .peerver_proto = IEEE80211_MESHPEERVER_PEER, - }; - - KASSERT(vap->iv_opmode == IEEE80211_M_MBSS, ("not a MBSS vap")); - - memcpy(frm, &ie, sizeof(ie)); - return frm + sizeof(ie); -} - -/* * Add a Mesh Peer Management IE to a frame. */ uint8_t * ieee80211_add_meshpeer(uint8_t *frm, uint8_t subtype, uint16_t localid, uint16_t peerid, uint16_t reason) { + /* XXX change for AH */ + static const uint8_t meshpeerproto[4] = IEEE80211_MESH_PEER_PROTO; + KASSERT(localid != 0, ("localid == 0")); *frm++ = IEEE80211_ELEMID_MESHPEER; switch (subtype) { case IEEE80211_MESH_PEER_LINK_OPEN: - *frm++ = 3; /* length */ - *frm++ = subtype; + *frm++ = 6; /* length */ + memcpy(frm, meshpeerproto, 4); + frm += 4; ADDSHORT(frm, localid); /* local ID */ break; case IEEE80211_MESH_PEER_LINK_CONFIRM: KASSERT(peerid != 0, ("sending peer confirm without peer id")); - *frm++ = 5; /* length */ - *frm++ = subtype; + *frm++ = 8; /* length */ + memcpy(frm, meshpeerproto, 4); + frm += 4; ADDSHORT(frm, localid); /* local ID */ ADDSHORT(frm, peerid); /* peer ID */ break; case IEEE80211_MESH_PEER_LINK_CLOSE: if (peerid) - *frm++ = 7; /* length */ + *frm++ = 10; /* length */ else - *frm++ = 5; /* length */ - *frm++ = subtype; + *frm++ = 8; /* length */ + memcpy(frm, meshpeerproto, 4); + frm += 4; ADDSHORT(frm, localid); /* local ID */ if (peerid) ADDSHORT(frm, peerid); /* peer ID */ Modified: stable/8/sys/net80211/ieee80211_mesh.h ============================================================================== --- stable/8/sys/net80211/ieee80211_mesh.h Tue Sep 29 10:53:06 2009 (r197613) +++ stable/8/sys/net80211/ieee80211_mesh.h Tue Sep 29 12:18:23 2009 (r197614) @@ -34,7 +34,7 @@ #define IEEE80211_MESH_DEFAULT_TTL 31 /* - * NB: all structures are__packed so sizeof works on arm, et. al. + * NB: all structures are __packed so sizeof works on arm, et. al. */ /* * 802.11s Information Elements. @@ -116,28 +116,11 @@ struct ieee80211_meshcngst_ie { AC_BE, AC_VI, AC_VO */ } __packed; -/* Peer Version */ -struct ieee80211_meshpeerver_ie { - uint8_t peerver_ie; /* IEEE80211_ELEMID_MESHPEERVER */ - uint8_t peerver_len; - uint8_t peerver_proto[4]; -} __packed; -/* Mesh Peering Management Protocol */ -#define IEEE80211_MESHPEERVER_PEER_OUI 0x00, 0x0f, 0xac -#define IEEE80211_MESHPEERVER_PEER_VALUE 0x2a -#define IEEE80211_MESHPEERVER_PEER { IEEE80211_MESHPEERVER_PEER_OUI, \ - IEEE80211_MESHPEERVER_PEER_VALUE } -/* Abbreviated Handshake Protocol */ -#define IEEE80211_MESHPEERVER_AH_OUI 0x00, 0x0f, 0xac -#define IEEE80211_MESHPEERVER_AH_VALUE 0x2b -#define IEEE80211_MESHPEERVER_AH { IEEE80211_MESHPEERVER_AH_OUI, \ - IEEE80211_MESHPEERVER_AH_VALUE } - /* Peer Link Management */ struct ieee80211_meshpeer_ie { uint8_t peer_ie; /* IEEE80211_ELEMID_MESHPEER */ uint8_t peer_len; - uint8_t peer_subtype; + uint8_t peer_proto[4]; /* Peer Management Protocol */ uint16_t peer_llinkid; /* Local Link ID */ uint16_t peer_linkid; /* Peer Link ID */ uint16_t peer_rcode; @@ -150,6 +133,16 @@ enum { /* values 3-255 are reserved */ }; +/* Mesh Peering Management Protocol */ +#define IEEE80211_MESH_PEER_PROTO_OUI 0x00, 0x0f, 0xac +#define IEEE80211_MESH_PEER_PROTO_VALUE 0x2a +#define IEEE80211_MESH_PEER_PROTO { IEEE80211_MESH_PEER_PROTO_OUI, \ + IEEE80211_MESH_PEER_PROTO_VALUE } +/* Abbreviated Handshake Protocol */ +#define IEEE80211_MESH_PEER_PROTO_AH_OUI 0x00, 0x0f, 0xac +#define IEEE80211_MESH_PEER_PROTO_AH_VALUE 0x2b +#define IEEE80211_MESH_PEER_PROTO_AH { IEEE80211_MESH_PEER_PROTO_AH_OUI, \ + IEEE80211_MESH_PEER_PROTO_AH_VALUE } #ifdef notyet /* Mesh Channel Switch Annoucement */ struct ieee80211_meshcsa_ie { @@ -256,11 +249,15 @@ struct ieee80211_meshprep_ie { struct ieee80211_meshperr_ie { uint8_t perr_ie; /* IEEE80211_ELEMID_MESHPERR */ uint8_t perr_len; - uint8_t perr_mode; /* NB: reserved */ + uint8_t perr_ttl; uint8_t perr_ndests; /* Number of Destinations */ struct { + uint8_t dest_flags; +#define IEEE80211_MESHPERR_DFLAGS_USN 0x01 +#define IEEE80211_MESHPERR_DFLAGS_RC 0x02 uint8_t dest_addr[IEEE80211_ADDR_LEN]; uint32_t dest_seq; /* HWMP Sequence Number */ + uint16_t dest_rcode; } __packed perr_dests[1]; /* NB: variable size */ } __packed; @@ -310,14 +307,11 @@ enum { }; /* - * Mesh Path Selection Action codes. + * Mesh Path Selection Action code. */ enum { - IEEE80211_ACTION_MESHPATH_REQ = 0, - IEEE80211_ACTION_MESHPATH_REP = 1, - IEEE80211_ACTION_MESHPATH_ERR = 2, - IEEE80211_ACTION_MESHPATH_RANN = 3, - /* 4-255 reserved */ + IEEE80211_ACTION_MESHPATH_SEL = 0, + /* 1-255 reserved */ }; /* @@ -479,7 +473,6 @@ int ieee80211_mesh_register_proto_path( int ieee80211_mesh_register_proto_metric(const struct ieee80211_mesh_proto_metric *); -uint8_t * ieee80211_add_meshpeerver(uint8_t *, struct ieee80211vap *); uint8_t * ieee80211_add_meshid(uint8_t *, struct ieee80211vap *); uint8_t * ieee80211_add_meshconf(uint8_t *, struct ieee80211vap *); uint8_t * ieee80211_add_meshpeer(uint8_t *, uint8_t, uint16_t, uint16_t, From owner-svn-src-stable-8@FreeBSD.ORG Tue Sep 29 12:20:11 2009 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 19371106566C; Tue, 29 Sep 2009 12:20:11 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0823F8FC12; Tue, 29 Sep 2009 12:20:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8TCKA2A085185; Tue, 29 Sep 2009 12:20:10 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8TCKA7C085183; Tue, 29 Sep 2009 12:20:10 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <200909291220.n8TCKA7C085183@svn.freebsd.org> From: Rui Paulo Date: Tue, 29 Sep 2009 12:20: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: r197615 - stable/8 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, 29 Sep 2009 12:20:11 -0000 Author: rpaulo Date: Tue Sep 29 12:20:10 2009 New Revision: 197615 URL: http://svn.freebsd.org/changeset/base/197615 Log: Mention 802.11s D3.03 support. Approved by: re (implicit) Modified: stable/8/UPDATING Modified: stable/8/UPDATING ============================================================================== --- stable/8/UPDATING Tue Sep 29 12:18:23 2009 (r197614) +++ stable/8/UPDATING Tue Sep 29 12:20:10 2009 (r197615) @@ -22,6 +22,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20090929: + 802.11s D3.03 support was committed. This is incompatible with + the previous code, which was based on D3.0. + 20090915: ZFS snapshots are now mounted with MNT_IGNORE flag. Use -v option for mount(8) and -a option for df(1) to see them. From owner-svn-src-stable-8@FreeBSD.ORG Tue Sep 29 12:46:37 2009 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 85B4E106566B; Tue, 29 Sep 2009 12:46:37 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from mail-ew0-f209.google.com (mail-ew0-f209.google.com [209.85.219.209]) by mx1.freebsd.org (Postfix) with ESMTP id DB69F8FC0A; Tue, 29 Sep 2009 12:46:36 +0000 (UTC) Received: by ewy5 with SMTP id 5so3985832ewy.36 for ; Tue, 29 Sep 2009 05:46:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:references:in-reply-to :mime-version:content-type:message-id:content-transfer-encoding:from :subject:date:to:x-mailer; bh=umsVUkBqc9wZQqpeIceDTFaO1ipCJ1cXa8JPctf4nck=; b=KVavDy2dn01WVQ4RVXun6vwjcHXVh3gCMz7cyxBkcQW81JIHWMcxB2mPap667CNrAp pjeoVAm4T3QWggha2JwUHtsqhWXdHwK/e1H4/w3TlqwcGu6d525v+zY8502NZlGUMeJI XTHBvH5c5NLsTkV7JZu462aq8kCadhA+l8Blg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:references:in-reply-to:mime-version:content-type:message-id :content-transfer-encoding:from:subject:date:to:x-mailer; b=oSYGSZ2Pvthr21Hh3JRzLuaVeli49TUQuqjtRp0Uxeqw+cY+N3oxG4GnT7q3JuvEv7 OtXDcb7AHVsT2QNEzZlb9maMVoFcpek7uxRj5NkmjJCeEu7fPyhOTeMnXG27asNDfWcy 96WfH6OBpj2UFSXMTBoY5ppmNn+gwl4nuj03I= Received: by 10.216.53.205 with SMTP id g55mr1054404wec.160.1254226912397; Tue, 29 Sep 2009 05:21:52 -0700 (PDT) Received: from rui-macbook.lan (bl11-195-254.dsl.telepac.pt [85.244.195.254]) by mx.google.com with ESMTPS id 10sm551126eyd.4.2009.09.29.05.21.51 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 29 Sep 2009 05:21:51 -0700 (PDT) Sender: Rui Paulo References: <200909291218.n8TCINmv085038@svn.freebsd.org> In-Reply-To: <200909291218.n8TCINmv085038@svn.freebsd.org> Mime-Version: 1.0 (Apple Message framework v1076) Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Message-Id: Content-Transfer-Encoding: 7bit From: Rui Paulo Date: Tue, 29 Sep 2009 13:21:49 +0100 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-Mailer: Apple Mail (2.1076) Cc: Subject: Re: svn commit: r197614 - stable/8/sys/net80211 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, 29 Sep 2009 12:46:37 -0000 On 29 Sep 2009, at 13:18, Rui Paulo wrote: > Author: rpaulo > Date: Tue Sep 29 12:18:23 2009 > New Revision: 197614 > URL: http://svn.freebsd.org/changeset/base/197614 > > Log: > Update 802.11s mesh support to draft 3.03. This includes a revised > frame > format for peering and changes to the PERR frames. > Note that this is incompatible with the previous code. Argh, MFC revision number is missing. This is an MFC for 197413. Sorry, -- Rui Paulo From owner-svn-src-stable-8@FreeBSD.ORG Tue Sep 29 12:56:14 2009 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 35ED2106568F; Tue, 29 Sep 2009 12:56:14 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-ew0-f209.google.com (mail-ew0-f209.google.com [209.85.219.209]) by mx1.freebsd.org (Postfix) with ESMTP id 4699D8FC23; Tue, 29 Sep 2009 12:56:12 +0000 (UTC) Received: by ewy5 with SMTP id 5so3994928ewy.36 for ; Tue, 29 Sep 2009 05:56:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type:content-transfer-encoding; bh=Vj17cIEkkjAEvyNnYcfxXoSjt16GbPIkGBwYNwniZDY=; b=wFBE7UiIGndA1ZfR1TbMsQxoXtLEB1exuRzyzhpQnd5E7Xr8zuPMiRJG9InQ83Xngm KKSlJwRBg89VszQOp0a3uzQh9xbJ99Xef2bB9J6Ns6oaGkgH9UtBAWhkXyEv1L1eVfUa X/+xWmNzRfuMf4W8yWeufyf+AgtaySNNuSfnY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=MhhsJu6o0EL5ZiubMcylt7gXhlLHvEjJ7tvBSQZdrFcsgR2ael4VyaBSBdWOBqMHU2 kau3dyIe0N0wt+uwkhn/utvMo58y7M/U/lNiNAqCSCzP5sekeZRvz/Y0tQTAGwNzzL7E gJX8bNFXPCK0kQSQTQoR0eBrPAKSSoTMBXFWI= MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.216.86.206 with SMTP id w56mr246416wee.1.1254228972144; Tue, 29 Sep 2009 05:56:12 -0700 (PDT) In-Reply-To: <200909291220.n8TCKA7C085183@svn.freebsd.org> References: <200909291220.n8TCKA7C085183@svn.freebsd.org> From: Ivan Voras Date: Tue, 29 Sep 2009 14:55:52 +0200 X-Google-Sender-Auth: 8850a75d1aa5d4fe Message-ID: <9bbcef730909290555i6ba85783x36d4a9708323f436@mail.gmail.com> To: src-committers@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r197615 - stable/8 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, 29 Sep 2009 12:56:14 -0000 2009/9/29 Rui Paulo : > --- stable/8/UPDATING =C2=A0 Tue Sep 29 12:18:23 2009 =C2=A0 =C2=A0 =C2= =A0 =C2=A0(r197614) > +++ stable/8/UPDATING =C2=A0 Tue Sep 29 12:20:10 2009 =C2=A0 =C2=A0 =C2= =A0 =C2=A0(r197615) > @@ -22,6 +22,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. > =C2=A0 =C2=A0 =C2=A0 =C2=A0to maximize performance. =C2=A0(To disable mal= loc debugging, run > =C2=A0 =C2=A0 =C2=A0 =C2=A0ln -s aj /etc/malloc.conf.) So the "NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.x IS SLOW" message is still here? From owner-svn-src-stable-8@FreeBSD.ORG Tue Sep 29 13:03:10 2009 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 AD5581065672; Tue, 29 Sep 2009 13:03:10 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from mail-ew0-f209.google.com (mail-ew0-f209.google.com [209.85.219.209]) by mx1.freebsd.org (Postfix) with ESMTP id 929708FC19; Tue, 29 Sep 2009 13:03:09 +0000 (UTC) Received: by ewy5 with SMTP id 5so4001919ewy.36 for ; Tue, 29 Sep 2009 06:03:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=FJQB9pQI7BhL0WUw6/Esnk3tXVqQojdg7j7Nav+wOnU=; b=fRTy71XuzZi7/fEjLVyaJOXZWa0xGBKEgzWT9WPZ81W2Ie7qZ/3d7QXrZn44Fwwx5A 5ioGqUojEccX3iNMi40Tk/w8AbNTuGaxB5eQ+dZk4r49b5w7dETZCobJgi8B0t30Q82z 1BAwUFXLHUw/qn1WVJXdKWw3EEUyW+HSN/mh0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=dZ+LYLh3wVFYhYcDyeAM6jQit/AHrT3Xc6gwqwb+PsL0j2/lAsrXR4I2xEnQc61vPl 5uilFB8QdbIQGoXKvQ26PKlktT0lppqsjdxR46Z9BRBZBgNSZnb7oP0r0XOhfU5xLm/K c986O7j5fmDWzYPIB3yK7WOyMTUW41MIaxbjE= Received: by 10.210.3.18 with SMTP id 18mr4359312ebc.80.1254229388660; Tue, 29 Sep 2009 06:03:08 -0700 (PDT) Received: from mac-mini.lan (bl11-195-254.dsl.telepac.pt [85.244.195.254]) by mx.google.com with ESMTPS id 7sm1116867eyg.41.2009.09.29.06.03.07 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 29 Sep 2009 06:03:07 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v1076) Content-Type: text/plain; charset=us-ascii; format=flowed From: Rui Paulo In-Reply-To: <9bbcef730909290555i6ba85783x36d4a9708323f436@mail.gmail.com> Date: Tue, 29 Sep 2009 14:03:05 +0100 Content-Transfer-Encoding: 7bit Message-Id: References: <200909291220.n8TCKA7C085183@svn.freebsd.org> <9bbcef730909290555i6ba85783x36d4a9708323f436@mail.gmail.com> To: Ivan Voras X-Mailer: Apple Mail (2.1076) 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: r197615 - stable/8 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, 29 Sep 2009 13:03:10 -0000 On 29 Sep 2009, at 13:55, Ivan Voras wrote: > 2009/9/29 Rui Paulo : > >> --- stable/8/UPDATING Tue Sep 29 12:18:23 2009 (r197614) >> +++ stable/8/UPDATING Tue Sep 29 12:20:10 2009 (r197615) >> @@ -22,6 +22,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. >> to maximize performance. (To disable malloc debugging, run >> ln -s aj /etc/malloc.conf.) > > So the "NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.x IS SLOW" message is > still here? Send a patch to re@ asking for removal :-) -- Rui Paulo From owner-svn-src-stable-8@FreeBSD.ORG Tue Sep 29 13:26:10 2009 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 471CD106566B; Tue, 29 Sep 2009 13:26:10 +0000 (UTC) (envelope-from serenity@exscape.org) Received: from ch-smtp01.sth.basefarm.net (ch-smtp01.sth.basefarm.net [80.76.149.212]) by mx1.freebsd.org (Postfix) with ESMTP id EFDFD8FC15; Tue, 29 Sep 2009 13:26:09 +0000 (UTC) Received: from c83-253-248-99.bredband.comhem.se ([83.253.248.99]:60893 helo=mx.exscape.org) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1MscS0-0001ob-4Y; Tue, 29 Sep 2009 15:09:06 +0200 Received: from [192.168.1.5] (macbookpro [192.168.1.5]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mx.exscape.org (Postfix) with ESMTPSA id 0D09C1CF593; Tue, 29 Sep 2009 15:08:58 +0200 (CEST) Mime-Version: 1.0 (Apple Message framework v1076) Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes From: Thomas Backman In-Reply-To: Date: Tue, 29 Sep 2009 15:08:55 +0200 Content-Transfer-Encoding: 7bit Message-Id: <1BB83399-AEAC-430C-973A-F850ED90E69E@exscape.org> References: <200909291220.n8TCKA7C085183@svn.freebsd.org> <9bbcef730909290555i6ba85783x36d4a9708323f436@mail.gmail.com> To: Rui Paulo X-Mailer: Apple Mail (2.1076) X-Originating-IP: 83.253.248.99 X-Scan-Result: No virus found in message 1MscS0-0001ob-4Y. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1MscS0-0001ob-4Y 63becf37275f51a4c86d6bf0ea9d0154 Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org, Ivan Voras Subject: Re: svn commit: r197615 - stable/8 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, 29 Sep 2009 13:26:10 -0000 On Sep 29, 2009, at 3:03 PM, Rui Paulo wrote: > On 29 Sep 2009, at 13:55, Ivan Voras wrote: > >> 2009/9/29 Rui Paulo : >> >>> --- stable/8/UPDATING Tue Sep 29 12:18:23 2009 (r197614) >>> +++ stable/8/UPDATING Tue Sep 29 12:20:10 2009 (r197615) >>> @@ -22,6 +22,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. >>> to maximize performance. (To disable malloc debugging, run >>> ln -s aj /etc/malloc.conf.) >> >> So the "NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.x IS SLOW" message is >> still here? > > Send a patch to re@ asking for removal :-) It should probably be noted that INVARIANTS* are left on ia64 and (as far as I understand) everything is left on sun4v. Regards, Thomas From owner-svn-src-stable-8@FreeBSD.ORG Tue Sep 29 18:44:35 2009 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 339C5106568B; Tue, 29 Sep 2009 18:44:35 +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 08A2F8FC20; Tue, 29 Sep 2009 18:44:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8TIiYuk092938; Tue, 29 Sep 2009 18:44:34 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8TIiYDJ092934; Tue, 29 Sep 2009 18:44:34 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200909291844.n8TIiYDJ092934@svn.freebsd.org> From: Doug Barton Date: Tue, 29 Sep 2009 18:44:34 +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: r197620 - in stable/8: etc etc/defaults share/man/man5 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, 29 Sep 2009 18:44:35 -0000 Author: dougb Date: Tue Sep 29 18:44:34 2009 New Revision: 197620 URL: http://svn.freebsd.org/changeset/base/197620 Log: MFC r197297 Add a knob to show 'Starting foo:' messages when faststart is used, such as at boot time. MFC 197619 By popular acclaim, enable "Starting foo:" messages by default Approved by: re (bz) Modified: stable/8/etc/ (props changed) stable/8/etc/defaults/rc.conf stable/8/etc/rc.subr stable/8/share/man/man5/ (props changed) stable/8/share/man/man5/rc.conf.5 Modified: stable/8/etc/defaults/rc.conf ============================================================================== --- stable/8/etc/defaults/rc.conf Tue Sep 29 16:49:10 2009 (r197619) +++ stable/8/etc/defaults/rc.conf Tue Sep 29 18:44:34 2009 (r197620) @@ -23,6 +23,7 @@ rc_debug="NO" # Set to YES to enable debugging output from rc.d rc_info="NO" # Enables display of informational messages at boot. +rc_startmsgs="YES" # Show "Starting foo:" messages at boot rcshutdown_timeout="30" # Seconds to wait before terminating rc.shutdown early_late_divider="FILESYSTEMS" # Script that separates early/late # stages of the boot process. Make sure you know Modified: stable/8/etc/rc.subr ============================================================================== --- stable/8/etc/rc.subr Tue Sep 29 16:49:10 2009 (r197619) +++ stable/8/etc/rc.subr Tue Sep 29 18:44:34 2009 (r197620) @@ -680,7 +680,13 @@ run_rc_command() # setup the full command to run # - [ -z "${rc_quiet}" ] && echo "Starting ${name}." + _show_startmsgs=1 + if [ -n "${rc_quiet}" ]; then + if ! checkyesno rc_startmsgs; then + unset _show_startmsgs + fi + fi + [ -n "$_show_startmsgs" ] && echo "Starting ${name}." if [ -n "$_chroot" ]; then _doit="\ ${_nice:+nice -n $_nice }\ Modified: stable/8/share/man/man5/rc.conf.5 ============================================================================== --- stable/8/share/man/man5/rc.conf.5 Tue Sep 29 16:49:10 2009 (r197619) +++ stable/8/share/man/man5/rc.conf.5 Tue Sep 29 18:44:34 2009 (r197620) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 10, 2009 +.Dd September 17, 2009 .Dt RC.CONF 5 .Os .Sh NAME @@ -95,6 +95,13 @@ disable informational messages from the Informational messages are displayed when a condition that is not serious enough to warrant a warning or an error occurs. +.It Va rc_startmsgs +.Pq Vt bool +If set to +.Dq Li YES , +show +.Dq Starting foo: +when faststart is used (e.g., at boot time). .It Va early_late_divider .Pq Vt str The name of the script that should be used as the From owner-svn-src-stable-8@FreeBSD.ORG Tue Sep 29 19:57:08 2009 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 20AEC106566C; Tue, 29 Sep 2009 19:57:08 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0FC508FC1A; Tue, 29 Sep 2009 19:57:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8TJv7jP094475; Tue, 29 Sep 2009 19:57:07 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8TJv7bS094474; Tue, 29 Sep 2009 19:57:07 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <200909291957.n8TJv7bS094474@svn.freebsd.org> From: Ken Smith Date: Tue, 29 Sep 2009 19:57:06 +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: r197623 - stable/8 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, 29 Sep 2009 19:57:08 -0000 Author: kensmith Date: Tue Sep 29 19:57:06 2009 New Revision: 197623 URL: http://svn.freebsd.org/changeset/base/197623 Log: Update description of debugging support. Submitted by: ivoras (but heavily modified) Pointy hat: me Approved by: re (implicit) Modified: stable/8/UPDATING Modified: stable/8/UPDATING ============================================================================== --- stable/8/UPDATING Tue Sep 29 19:50:50 2009 (r197622) +++ stable/8/UPDATING Tue Sep 29 19:57:06 2009 (r197623) @@ -8,19 +8,12 @@ Items affecting the ports and packages s /usr/ports/UPDATING. Please read that file before running portupgrade. -NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.x IS SLOW: - FreeBSD 8.x has many debugging features turned on, in - both the kernel and userland. These features attempt to detect - incorrect use of system primitives, and encourage loud failure - through extra sanity checking and fail stop semantics. They - also substantially impact system performance. If you want to - do performance measurement, benchmarking, and optimization, - you'll want to turn them off. This includes various WITNESS- - related kernel options, INVARIANTS, malloc debugging flags - in userland, and various verbose features in the kernel. Many - developers choose to disable these features on build machines - to maximize performance. (To disable malloc debugging, run - ln -s aj /etc/malloc.conf.) +NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.x IS SLOW ON IA64 OR SUN4V: + For ia64 the INVARIANTS and INVARIANTS_SUPPORT kernel options + were left in the GENERIC kernel because the kernel does not + work properly without them. For sun4v all of the normal kernel + debugging tools present in HEAD were left in place because + sun4v support still needs work to become production ready. 20090929: 802.11s D3.03 support was committed. This is incompatible with From owner-svn-src-stable-8@FreeBSD.ORG Tue Sep 29 20:13:59 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 1EACB10656BA; Tue, 29 Sep 2009 20:13:59 +0000 (UTC) Date: Tue, 29 Sep 2009 20:13:59 +0000 From: Alexey Dokuchaev To: Ken Smith Message-ID: <20090929201358.GA9988@FreeBSD.org> References: <200909291957.n8TJv7bS094474@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <200909291957.n8TJv7bS094474@svn.freebsd.org> User-Agent: Mutt/1.4.2.1i 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: r197623 - stable/8 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, 29 Sep 2009 20:13:59 -0000 On Tue, Sep 29, 2009 at 07:57:06PM +0000, Ken Smith wrote: > +NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.x IS SLOW ON IA64 OR SUN4V: > + For ia64 the INVARIANTS and INVARIANTS_SUPPORT kernel options ^ Shouldn't it be INVARIANT_SUPPORT instead (note the superfluous `S')? ./danfe From owner-svn-src-stable-8@FreeBSD.ORG Tue Sep 29 23:00:44 2009 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 06658106568B; Tue, 29 Sep 2009 23:00:44 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from mail-ew0-f209.google.com (mail-ew0-f209.google.com [209.85.219.209]) by mx1.freebsd.org (Postfix) with ESMTP id 0C4478FC14; Tue, 29 Sep 2009 23:00:42 +0000 (UTC) Received: by ewy5 with SMTP id 5so4646898ewy.36 for ; Tue, 29 Sep 2009 16:00:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:content-type :mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=N5y6FMje4A1+aRCiUCNzF5cGMYWpOPMsOIxHLcxxolU=; b=PD+onHMTQfvxXI39nX03f3ueKtGunONUMaLnokYtJhh8jBfAa5Jszg/zI0Jksw6iqm HEmZNCG26LbWDoa66qgn1vIdQ6hYdefQ0MNsICHrF38aGlqnbBamm1wb/lfjrzZwFEB5 INfkopMLAybhmMa2W90tdvJG2ytZDeM5Fs3Sc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; b=KV9li50QxUfx2XOJAqLzGAyB7bQcmL4cuvf/pTDeMot8Y9wy2oNIqglFVGTYedD9At qtdLJmSjZ78Lzneysmn3d28g49QwYM7PwLApUozlGtZMpBc1q351qsKa5blCSZKi1C6u E1Bo7frOVFhzn4C0d5ou/JTWzlXT9D1i6T0bg= Received: by 10.211.131.40 with SMTP id i40mr1920900ebn.99.1254265241979; Tue, 29 Sep 2009 16:00:41 -0700 (PDT) Received: from mac-mini.lan (bl11-195-254.dsl.telepac.pt [85.244.195.254]) by mx.google.com with ESMTPS id 7sm416198eyb.20.2009.09.29.16.00.40 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 29 Sep 2009 16:00:41 -0700 (PDT) Sender: Rui Paulo Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Mime-Version: 1.0 (Apple Message framework v1076) From: Rui Paulo In-Reply-To: <200909291218.n8TCINmv085038@svn.freebsd.org> Date: Wed, 30 Sep 2009 00:00:39 +0100 Content-Transfer-Encoding: 7bit Message-Id: <558A76C2-0F8C-472F-A235-16BDAD15C634@freebsd.org> References: <200909291218.n8TCINmv085038@svn.freebsd.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-Mailer: Apple Mail (2.1076) Cc: Subject: Re: svn commit: r197614 - stable/8/sys/net80211 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, 29 Sep 2009 23:00:44 -0000 On 29 Sep 2009, at 13:18, Rui Paulo wrote: > Author: rpaulo > Date: Tue Sep 29 12:18:23 2009 > New Revision: 197614 > URL: http://svn.freebsd.org/changeset/base/197614 > > Log: > Update 802.11s mesh support to draft 3.03. This includes a revised > frame > format for peering and changes to the PERR frames. > Note that this is incompatible with the previous code. > > Reviewed by: sam > Approved by: re (kib) Please note that, while these changes are being made very late in the release process, they are necessary to keep in sync with the new draft. There should be no impact on ports, mesh support is brand new to 8.0. -- Rui Paulo From owner-svn-src-stable-8@FreeBSD.ORG Wed Sep 30 12:53:22 2009 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 167DA1065670; Wed, 30 Sep 2009 12:53:22 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 043708FC17; Wed, 30 Sep 2009 12:53:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8UCrL5M015730; Wed, 30 Sep 2009 12:53:21 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8UCrLwZ015728; Wed, 30 Sep 2009 12:53:21 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <200909301253.n8UCrLwZ015728@svn.freebsd.org> From: Ken Smith Date: Wed, 30 Sep 2009 12:53: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: r197642 - stable/8 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, 30 Sep 2009 12:53:22 -0000 Author: kensmith Date: Wed Sep 30 12:53:21 2009 New Revision: 197642 URL: http://svn.freebsd.org/changeset/base/197642 Log: Remove an extra 'S' that snuck in. Submitted by: danfe Approved by: re (implicit) Modified: stable/8/UPDATING Modified: stable/8/UPDATING ============================================================================== --- stable/8/UPDATING Wed Sep 30 11:14:13 2009 (r197641) +++ stable/8/UPDATING Wed Sep 30 12:53:21 2009 (r197642) @@ -9,7 +9,7 @@ Items affecting the ports and packages s portupgrade. NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.x IS SLOW ON IA64 OR SUN4V: - For ia64 the INVARIANTS and INVARIANTS_SUPPORT kernel options + For ia64 the INVARIANTS and INVARIANT_SUPPORT kernel options were left in the GENERIC kernel because the kernel does not work properly without them. For sun4v all of the normal kernel debugging tools present in HEAD were left in place because From owner-svn-src-stable-8@FreeBSD.ORG Wed Sep 30 19:23:27 2009 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 39D431065694 for ; Wed, 30 Sep 2009 19:23:27 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id C03638FC19 for ; Wed, 30 Sep 2009 19:23:26 +0000 (UTC) Received: (qmail 4323 invoked by uid 399); 30 Sep 2009 19:23:24 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 30 Sep 2009 19:23:24 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4AC3B02B.90703@FreeBSD.org> Date: Wed, 30 Sep 2009 12:23:23 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.23 (X11/20090822) MIME-Version: 1.0 To: Rui Paulo References: <200909291218.n8TCINmv085038@svn.freebsd.org> <558A76C2-0F8C-472F-A235-16BDAD15C634@freebsd.org> In-Reply-To: <558A76C2-0F8C-472F-A235-16BDAD15C634@freebsd.org> X-Enigmail-Version: 0.96.0 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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: r197614 - stable/8/sys/net80211 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, 30 Sep 2009 19:23:27 -0000 Rui Paulo wrote: > On 29 Sep 2009, at 13:18, Rui Paulo wrote: > >> Author: rpaulo >> Date: Tue Sep 29 12:18:23 2009 >> New Revision: 197614 >> URL: http://svn.freebsd.org/changeset/base/197614 >> >> Log: >> Update 802.11s mesh support to draft 3.03. This includes a revised >> frame >> format for peering and changes to the PERR frames. >> Note that this is incompatible with the previous code. >> >> Reviewed by: sam >> Approved by: re (kib) > > > Please note that, while these changes are being made very late in the > release process, they are necessary to keep in sync with the new draft. > There should be no impact on ports, mesh support is brand new to 8.0. Is it my imagination, or does GENERIC still refer to D3.0? Perhaps other places as well? Doug -- This .signature sanitized for your protection From owner-svn-src-stable-8@FreeBSD.ORG Thu Oct 1 02:06:07 2009 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 7DD781065670; Thu, 1 Oct 2009 02:06:07 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from mail-ew0-f209.google.com (mail-ew0-f209.google.com [209.85.219.209]) by mx1.freebsd.org (Postfix) with ESMTP id 650AB8FC08; Thu, 1 Oct 2009 02:06:06 +0000 (UTC) Received: by ewy5 with SMTP id 5so1221623ewy.36 for ; Wed, 30 Sep 2009 19:06:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=1AsJSJbd7un45z59OujtTRprc9bz1RsWCxu1gu14i1c=; b=vWkQM9PVdx0RqYdeOt9bJT4oxVJ9mv7NoB60GTOCbsojzNMi+C7zjgU0G89Uchqmb5 hJLLEbH+bEeZPfGr2+35ifK0EbhJtgu1LusNTuCB/ROz6dvEAnyLyMGrUiuKAuw2So7i L+cKAG3YwLIPmxdct5vvk0MExfcXy8HQVheVM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=ITtFpCj7kZ/n/OKN6E+iYKedBc9nmNuufFKP8gtX0y04YIceTMxHMBrWozHIOVWcx0 dbbk0cz0d+fudWW3R9Rj431gh1dUCesiib2TEcEKVj6GU669TML6pYhsoW8BVWkWeW83 siXFcGgWyWyBKTuOqQov92AU9FoTTi9XTqKU0= Received: by 10.211.138.11 with SMTP id q11mr695015ebn.1.1254362765483; Wed, 30 Sep 2009 19:06:05 -0700 (PDT) Received: from mac-mini.lan (bl6-144-180.dsl.telepac.pt [82.155.144.180]) by mx.google.com with ESMTPS id 28sm671056eyg.35.2009.09.30.19.06.03 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 30 Sep 2009 19:06:03 -0700 (PDT) Sender: Rui Paulo Mime-Version: 1.0 (Apple Message framework v1076) Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes From: Rui Paulo In-Reply-To: <4AC3B02B.90703@FreeBSD.org> Date: Thu, 1 Oct 2009 03:06:01 +0100 Content-Transfer-Encoding: 7bit Message-Id: References: <200909291218.n8TCINmv085038@svn.freebsd.org> <558A76C2-0F8C-472F-A235-16BDAD15C634@freebsd.org> <4AC3B02B.90703@FreeBSD.org> To: Doug Barton X-Mailer: Apple Mail (2.1076) 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: r197614 - stable/8/sys/net80211 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, 01 Oct 2009 02:06:07 -0000 On 30 Sep 2009, at 20:23, Doug Barton wrote: > Rui Paulo wrote: >> On 29 Sep 2009, at 13:18, Rui Paulo wrote: >> >>> Author: rpaulo >>> Date: Tue Sep 29 12:18:23 2009 >>> New Revision: 197614 >>> URL: http://svn.freebsd.org/changeset/base/197614 >>> >>> Log: >>> Update 802.11s mesh support to draft 3.03. This includes a revised >>> frame >>> format for peering and changes to the PERR frames. >>> Note that this is incompatible with the previous code. >>> >>> Reviewed by: sam >>> Approved by: re (kib) >> >> >> Please note that, while these changes are being made very late in the >> release process, they are necessary to keep in sync with the new >> draft. >> There should be no impact on ports, mesh support is brand new to 8.0. > > Is it my imagination, or does GENERIC still refer to D3.0? Perhaps > other places as well? I'll fix it. Thanks. -- Rui Paulo From owner-svn-src-stable-8@FreeBSD.ORG Thu Oct 1 10:06:10 2009 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 A94D3106566B; Thu, 1 Oct 2009 10:06:10 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7B9678FC08; Thu, 1 Oct 2009 10:06:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n91A6AjC047452; Thu, 1 Oct 2009 10:06:10 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n91A6AFT047448; Thu, 1 Oct 2009 10:06:10 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <200910011006.n91A6AFT047448@svn.freebsd.org> From: Rui Paulo Date: Thu, 1 Oct 2009 10:06: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: r197656 - in stable/8/sys: . amd64/conf amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci i386/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: Thu, 01 Oct 2009 10:06:10 -0000 Author: rpaulo Date: Thu Oct 1 10:06:09 2009 New Revision: 197656 URL: http://svn.freebsd.org/changeset/base/197656 Log: MFC r197653: Improve 802.11s comment. Approved by: re (kib) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/conf/GENERIC 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) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/i386/conf/GENERIC Modified: stable/8/sys/amd64/conf/GENERIC ============================================================================== --- stable/8/sys/amd64/conf/GENERIC Thu Oct 1 08:16:46 2009 (r197655) +++ stable/8/sys/amd64/conf/GENERIC Thu Oct 1 10:06:09 2009 (r197656) @@ -248,7 +248,7 @@ device xe # Xircom pccard Ethernet device wlan # 802.11 support options IEEE80211_DEBUG # enable debug msgs options IEEE80211_AMPDU_AGE # age frames in AMPDU reorder q's -options IEEE80211_SUPPORT_MESH # enable 802.11s D3.0 support +options IEEE80211_SUPPORT_MESH # enable 802.11s draft support device wlan_wep # 802.11 WEP support device wlan_ccmp # 802.11 CCMP support device wlan_tkip # 802.11 TKIP support Modified: stable/8/sys/i386/conf/GENERIC ============================================================================== --- stable/8/sys/i386/conf/GENERIC Thu Oct 1 08:16:46 2009 (r197655) +++ stable/8/sys/i386/conf/GENERIC Thu Oct 1 10:06:09 2009 (r197656) @@ -260,7 +260,7 @@ device xe # Xircom pccard Ethernet device wlan # 802.11 support options IEEE80211_DEBUG # enable debug msgs options IEEE80211_AMPDU_AGE # age frames in AMPDU reorder q's -options IEEE80211_SUPPORT_MESH # enable 802.11s D3.0 support +options IEEE80211_SUPPORT_MESH # enable 802.11s draft support device wlan_wep # 802.11 WEP support device wlan_ccmp # 802.11 CCMP support device wlan_tkip # 802.11 TKIP support From owner-svn-src-stable-8@FreeBSD.ORG Thu Oct 1 13:11:46 2009 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 CCEE2106568B; Thu, 1 Oct 2009 13:11:46 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A148A8FC17; Thu, 1 Oct 2009 13:11:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n91DBkBd052253; Thu, 1 Oct 2009 13:11:46 GMT (envelope-from jamie@svn.freebsd.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n91DBkOf052250; Thu, 1 Oct 2009 13:11:46 GMT (envelope-from jamie@svn.freebsd.org) Message-Id: <200910011311.n91DBkOf052250@svn.freebsd.org> From: Jamie Gritton Date: Thu, 1 Oct 2009 13:11:46 +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: r197667 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci kern rpc/rpcsec_gss 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, 01 Oct 2009 13:11:46 -0000 Author: jamie Date: Thu Oct 1 13:11:45 2009 New Revision: 197667 URL: http://svn.freebsd.org/changeset/base/197667 Log: MFC r197581, r197583, r197584: Set the prison in NFS anon and GSS SVC creds. Reviewed by: marcel Approved by: re (kib) Modified: 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) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/kern/vfs_export.c stable/8/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Modified: stable/8/sys/kern/vfs_export.c ============================================================================== --- stable/8/sys/kern/vfs_export.c Thu Oct 1 13:03:17 2009 (r197666) +++ stable/8/sys/kern/vfs_export.c Thu Oct 1 13:11:45 2009 (r197667) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -122,6 +123,8 @@ vfs_hang_addrlist(struct mount *mp, stru np->netc_anon->cr_uid = argp->ex_anon.cr_uid; crsetgroups(np->netc_anon, argp->ex_anon.cr_ngroups, argp->ex_anon.cr_groups); + np->netc_anon->cr_prison = &prison0; + prison_hold(np->netc_anon->cr_prison); np->netc_numsecflavors = argp->ex_numsecflavors; bcopy(argp->ex_secflavors, np->netc_secflavors, sizeof(np->netc_secflavors)); @@ -206,6 +209,8 @@ vfs_hang_addrlist(struct mount *mp, stru np->netc_anon->cr_uid = argp->ex_anon.cr_uid; crsetgroups(np->netc_anon, argp->ex_anon.cr_ngroups, np->netc_anon->cr_groups); + np->netc_anon->cr_prison = &prison0; + prison_hold(np->netc_anon->cr_prison); np->netc_numsecflavors = argp->ex_numsecflavors; bcopy(argp->ex_secflavors, np->netc_secflavors, sizeof(np->netc_secflavors)); Modified: stable/8/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c ============================================================================== --- stable/8/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Thu Oct 1 13:03:17 2009 (r197666) +++ stable/8/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Thu Oct 1 13:11:45 2009 (r197667) @@ -449,6 +449,8 @@ rpc_gss_svc_getcred(struct svc_req *req, cr->cr_uid = cr->cr_ruid = cr->cr_svuid = uc->uid; cr->cr_rgid = cr->cr_svgid = uc->gid; crsetgroups(cr, uc->gidlen, uc->gidlist); + cr->cr_prison = &prison0; + prison_hold(cr->cr_prison); *crp = crhold(cr); return (TRUE); From owner-svn-src-stable-8@FreeBSD.ORG Thu Oct 1 14:42:55 2009 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 BC7BB1065694; Thu, 1 Oct 2009 14:42:55 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AA6F88FC0A; Thu, 1 Oct 2009 14:42:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n91Egtfv054379; Thu, 1 Oct 2009 14:42:55 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n91Egt6A054377; Thu, 1 Oct 2009 14:42:55 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <200910011442.n91Egt6A054377@svn.freebsd.org> From: Takahashi Yoshihiro Date: Thu, 1 Oct 2009 14:42:55 +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: r197669 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci modules/nfslockd 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, 01 Oct 2009 14:42:55 -0000 Author: nyan Date: Thu Oct 1 14:42:55 2009 New Revision: 197669 URL: http://svn.freebsd.org/changeset/base/197669 Log: MFC: revision 197535 Add '#define NFSCLIENT' into opt_nfs.h if the NFSCLIENT variable is 1 (the default is 1). This makes the nfslockd module works for NFS client. Reviewed by: dfr Approved by: re (kib) Modified: 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) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/nfslockd/Makefile Modified: stable/8/sys/modules/nfslockd/Makefile ============================================================================== --- stable/8/sys/modules/nfslockd/Makefile Thu Oct 1 13:16:24 2009 (r197668) +++ stable/8/sys/modules/nfslockd/Makefile Thu Oct 1 14:42:55 2009 (r197669) @@ -14,11 +14,18 @@ SRCS+= opt_inet6.h opt_nfs.h .if !defined(KERNBUILDDIR) NFS_INET6?= 1 # 0/1 - requires INET6 to be configured in kernel +NFSCLIENT?= 1 # 0/1 - requires NFSCLIENT to be configured in kernel .if ${NFS_INET6} > 0 opt_inet6.h: echo "#define INET6 1" > ${.TARGET} .endif + +.if ${NFSCLIENT} > 0 +opt_nfs.h: + echo "#define NFSCLIENT 1" > ${.TARGET} +.endif + .endif .include From owner-svn-src-stable-8@FreeBSD.ORG Fri Oct 2 05:11:46 2009 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 CA9111065676; Fri, 2 Oct 2009 05:11:46 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B6DB28FC18; Fri, 2 Oct 2009 05:11:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n925Bkkn090099; Fri, 2 Oct 2009 05:11:46 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n925BkKY090097; Fri, 2 Oct 2009 05:11:46 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200910020511.n925BkKY090097@svn.freebsd.org> From: Alan Cox Date: Fri, 2 Oct 2009 05:11:46 +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: r197700 - in stable/8/sys: . amd64/amd64 amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci 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, 02 Oct 2009 05:11:46 -0000 Author: alc Date: Fri Oct 2 05:11:46 2009 New Revision: 197700 URL: http://svn.freebsd.org/changeset/base/197700 Log: MFC r197580 Temporarily disable the use of 1GB page mappings by the direct map. Approved by: re (kib) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/amd64/pmap.c 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) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/amd64/amd64/pmap.c ============================================================================== --- stable/8/sys/amd64/amd64/pmap.c Fri Oct 2 02:28:59 2009 (r197699) +++ stable/8/sys/amd64/amd64/pmap.c Fri Oct 2 05:11:46 2009 (r197700) @@ -440,7 +440,7 @@ create_pagetables(vm_paddr_t *firstaddr) if (ndmpdp < 4) /* Minimum 4GB of dirmap */ ndmpdp = 4; DMPDPphys = allocpages(firstaddr, NDMPML4E); - if ((amd_feature & AMDID_PAGE1GB) == 0) + if (TRUE || (amd_feature & AMDID_PAGE1GB) == 0) DMPDphys = allocpages(firstaddr, ndmpdp); dmaplimit = (vm_paddr_t)ndmpdp << PDPSHIFT; @@ -474,7 +474,7 @@ create_pagetables(vm_paddr_t *firstaddr) /* Now set up the direct map space using either 2MB or 1GB pages */ /* Preset PG_M and PG_A because demotion expects it */ - if ((amd_feature & AMDID_PAGE1GB) == 0) { + if (TRUE || (amd_feature & AMDID_PAGE1GB) == 0) { for (i = 0; i < NPDEPG * ndmpdp; i++) { ((pd_entry_t *)DMPDphys)[i] = (vm_paddr_t)i << PDRSHIFT; ((pd_entry_t *)DMPDphys)[i] |= PG_RW | PG_V | PG_PS | From owner-svn-src-stable-8@FreeBSD.ORG Fri Oct 2 17:58:49 2009 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 1DFF31065672; Fri, 2 Oct 2009 17:58:49 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0A7668FC14; Fri, 2 Oct 2009 17:58:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n92HwmHm008817; Fri, 2 Oct 2009 17:58:48 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n92HwmjA008816; Fri, 2 Oct 2009 17:58:48 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <200910021758.n92HwmjA008816@svn.freebsd.org> From: "Simon L. Nielsen" Date: Fri, 2 Oct 2009 17:58:48 +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: r197714 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci 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: Fri, 02 Oct 2009 17:58:49 -0000 Author: simon Date: Fri Oct 2 17:58:47 2009 New Revision: 197714 URL: http://svn.freebsd.org/changeset/base/197714 Log: MFC r197711: Add no zero mapping feature. NOTE: Unlike in the other branches where this change will be "merged" to, the 'no zero mapping' is enabled by default in stable/8. Errata: FreeBSD-EN-09:05.null Approved by: re (kib) Modified: 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) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/kern/init_main.c stable/8/sys/kern/kern_exec.c Modified: stable/8/sys/kern/init_main.c ============================================================================== --- stable/8/sys/kern/init_main.c Fri Oct 2 17:53:48 2009 (r197713) +++ stable/8/sys/kern/init_main.c Fri Oct 2 17:58:47 2009 (r197714) @@ -492,6 +492,11 @@ proc0_init(void *dummy __unused) pmap_pinit0(vmspace_pmap(&vmspace0)); p->p_vmspace = &vmspace0; vmspace0.vm_refcnt = 1; + + /* + * proc0 is not expected to enter usermode, so there is no special + * handling for sv_minuser here, like is done for exec_new_vmspace(). + */ vm_map_init(&vmspace0.vm_map, p->p_sysent->sv_minuser, p->p_sysent->sv_maxuser); vmspace0.vm_map.pmap = vmspace_pmap(&vmspace0); Modified: stable/8/sys/kern/kern_exec.c ============================================================================== --- stable/8/sys/kern/kern_exec.c Fri Oct 2 17:53:48 2009 (r197713) +++ stable/8/sys/kern/kern_exec.c Fri Oct 2 17:58:47 2009 (r197714) @@ -122,6 +122,11 @@ u_long ps_arg_cache_limit = PAGE_SIZE / SYSCTL_ULONG(_kern, OID_AUTO, ps_arg_cache_limit, CTLFLAG_RW, &ps_arg_cache_limit, 0, ""); +static int map_at_zero = 0; +TUNABLE_INT("security.bsd.map_at_zero", &map_at_zero); +SYSCTL_INT(_security_bsd, OID_AUTO, map_at_zero, CTLFLAG_RW, &map_at_zero, 0, + "Permit processes to map an object at virtual address 0."); + static int sysctl_kern_ps_strings(SYSCTL_HANDLER_ARGS) { @@ -999,7 +1004,7 @@ exec_new_vmspace(imgp, sv) int error; struct proc *p = imgp->proc; struct vmspace *vmspace = p->p_vmspace; - vm_offset_t stack_addr; + vm_offset_t sv_minuser, stack_addr; vm_map_t map; u_long ssiz; @@ -1015,13 +1020,17 @@ exec_new_vmspace(imgp, sv) * not disrupted */ map = &vmspace->vm_map; - if (vmspace->vm_refcnt == 1 && vm_map_min(map) == sv->sv_minuser && + if (map_at_zero) + sv_minuser = sv->sv_minuser; + else + sv_minuser = MAX(sv->sv_minuser, PAGE_SIZE); + if (vmspace->vm_refcnt == 1 && vm_map_min(map) == sv_minuser && vm_map_max(map) == sv->sv_maxuser) { shmexit(vmspace); pmap_remove_pages(vmspace_pmap(vmspace)); vm_map_remove(map, vm_map_min(map), vm_map_max(map)); } else { - error = vmspace_exec(p, sv->sv_minuser, sv->sv_maxuser); + error = vmspace_exec(p, sv_minuser, sv->sv_maxuser); if (error) return (error); vmspace = p->p_vmspace; From owner-svn-src-stable-8@FreeBSD.ORG Fri Oct 2 18:33:41 2009 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 55DEC106566B; Fri, 2 Oct 2009 18:33:41 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 42B1C8FC1E; Fri, 2 Oct 2009 18:33:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n92IXfC5009683; Fri, 2 Oct 2009 18:33:41 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n92IXfAb009681; Fri, 2 Oct 2009 18:33:41 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <200910021833.n92IXfAb009681@svn.freebsd.org> From: Marius Strobl Date: Fri, 2 Oct 2009 18:33:41 +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: r197716 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci sparc64/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: Fri, 02 Oct 2009 18:33:41 -0000 Author: marius Date: Fri Oct 2 18:33:40 2009 New Revision: 197716 URL: http://svn.freebsd.org/changeset/base/197716 Log: MFC: r197490 Merge r194204 from amd64/i386: Enable PRINTF_BUFR_SIZE by default. PR: 139134 Approved by: re (kib) Modified: 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) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/sparc64/conf/GENERIC Modified: stable/8/sys/sparc64/conf/GENERIC ============================================================================== --- stable/8/sys/sparc64/conf/GENERIC Fri Oct 2 18:09:56 2009 (r197715) +++ stable/8/sys/sparc64/conf/GENERIC Fri Oct 2 18:33:40 2009 (r197716) @@ -68,6 +68,7 @@ options SYSVMSG # SYSV-style message options SYSVSEM # SYSV-style semaphores options P1003_1B_SEMAPHORES # POSIX-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions +options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) options AUDIT # Security event auditing options MAC # TrustedBSD MAC Framework From owner-svn-src-stable-8@FreeBSD.ORG Sat Oct 3 14:38:22 2009 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 A5C401065670; Sat, 3 Oct 2009 14:38:22 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 921218FC18; Sat, 3 Oct 2009 14:38:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n93EcMCu043462; Sat, 3 Oct 2009 14:38:22 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n93EcMFE043460; Sat, 3 Oct 2009 14:38:22 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <200910031438.n93EcMFE043460@svn.freebsd.org> From: Takahashi Yoshihiro Date: Sat, 3 Oct 2009 14:38: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: r197734 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci pc98/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: Sat, 03 Oct 2009 14:38:22 -0000 Author: nyan Date: Sat Oct 3 14:38:22 2009 New Revision: 197734 URL: http://svn.freebsd.org/changeset/base/197734 Log: MFC: revision 197657 MFi386: revision 197653 Improve 802.11s comment. Approved by: re (bz) Modified: 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) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/pc98/conf/GENERIC Modified: stable/8/sys/pc98/conf/GENERIC ============================================================================== --- stable/8/sys/pc98/conf/GENERIC Sat Oct 3 13:59:15 2009 (r197733) +++ stable/8/sys/pc98/conf/GENERIC Sat Oct 3 14:38:22 2009 (r197734) @@ -214,7 +214,7 @@ device xe # Xircom pccard Ethernet #device wlan # 802.11 support #options IEEE80211_DEBUG # enable debug msgs #options IEEE80211_AMPDU_AGE # age frames in AMPDU reorder q's -#options IEEE80211_SUPPORT_MESH # enable 802.11s D3.0 support +#options IEEE80211_SUPPORT_MESH # enable 802.11s draft support #device wlan_wep # 802.11 WEP support #device wlan_ccmp # 802.11 CCMP support #device wlan_tkip # 802.11 TKIP support