From owner-p4-projects@FreeBSD.ORG Thu Jul 27 21:42:14 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1502616A4E9; Thu, 27 Jul 2006 21:42:14 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C6AD616A4E6 for ; Thu, 27 Jul 2006 21:42:13 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 114C643D8B for ; Thu, 27 Jul 2006 21:41:55 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k6RLfseo030736 for ; Thu, 27 Jul 2006 21:41:54 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k6RLfsLl030733 for perforce@freebsd.org; Thu, 27 Jul 2006 21:41:54 GMT (envelope-from jhb@freebsd.org) Date: Thu, 27 Jul 2006 21:41:54 GMT Message-Id: <200607272141.k6RLfsLl030733@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Cc: Subject: PERFORCE change 102609 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Jul 2006 21:42:14 -0000 http://perforce.freebsd.org/chv.cgi?CH=102609 Change 102609 by jhb@jhb_mutex on 2006/07/27 21:41:18 IFC @102606. Affected files ... .. //depot/projects/smpng/sys/amd64/ia32/ia32_syscall.c#16 integrate .. //depot/projects/smpng/sys/dev/kbdmux/kbdmux.c#4 integrate .. //depot/projects/smpng/sys/ia64/ia32/ia32_trap.c#12 integrate .. //depot/projects/smpng/sys/ia64/ia64/trap.c#83 integrate .. //depot/projects/smpng/sys/net/if_bridge.c#34 integrate .. //depot/projects/smpng/sys/net/if_bridgevar.h#11 integrate .. //depot/projects/smpng/sys/net/if_ethersubr.c#74 integrate .. //depot/projects/smpng/sys/net/if_gif.c#37 integrate .. //depot/projects/smpng/sys/netgraph/ng_ether.c#32 integrate Differences ... ==== //depot/projects/smpng/sys/amd64/ia32/ia32_syscall.c#16 (text+ko) ==== @@ -36,7 +36,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/ia32/ia32_syscall.c,v 1.12 2006/07/27 19:50:16 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/ia32/ia32_syscall.c,v 1.13 2006/07/27 21:25:49 jhb Exp $"); /* * 386 Trap and System call handling ==== //depot/projects/smpng/sys/dev/kbdmux/kbdmux.c#4 (text+ko) ==== @@ -28,7 +28,7 @@ * SUCH DAMAGE. * * $Id: kbdmux.c,v 1.4 2005/07/14 17:38:35 max Exp $ - * $FreeBSD: src/sys/dev/kbdmux/kbdmux.c,v 1.8 2006/03/03 00:46:28 emax Exp $ + * $FreeBSD: src/sys/dev/kbdmux/kbdmux.c,v 1.9 2006/07/27 20:33:48 emax Exp $ */ #include "opt_kbd.h" @@ -657,6 +657,27 @@ /* see if there is something in the keyboard queue */ scancode = getc(&state->ks_inq); if (scancode == -1) { + if (state->ks_flags & POLLING) { + kbdmux_kbd_t *k; + + SLIST_FOREACH(k, &state->ks_kbds, next) { + while (KBDMUX_CHECK_CHAR(k->kbd)) { + scancode = KBDMUX_READ_CHAR(k->kbd, 0); + if (scancode == NOKEY) + break; + if (scancode == ERRKEY) + continue; + if (!KBD_IS_BUSY(k->kbd)) + continue; + + putc(scancode, &state->ks_inq); + } + } + + if (state->ks_inq.c_cc > 0) + goto next_code; + } + KBDMUX_UNLOCK(state); return (NOKEY); } ==== //depot/projects/smpng/sys/ia64/ia32/ia32_trap.c#12 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/ia64/ia32/ia32_trap.c,v 1.8 2006/07/27 19:50:16 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/ia64/ia32/ia32_trap.c,v 1.9 2006/07/27 21:25:49 jhb Exp $"); #include #include ==== //depot/projects/smpng/sys/ia64/ia64/trap.c#83 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/ia64/ia64/trap.c,v 1.119 2006/06/29 19:59:17 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/ia64/ia64/trap.c,v 1.120 2006/07/27 21:25:50 jhb Exp $"); #include "opt_ddb.h" #include "opt_ktrace.h" ==== //depot/projects/smpng/sys/net/if_bridge.c#34 (text+ko) ==== @@ -80,7 +80,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/net/if_bridge.c,v 1.71 2006/07/26 22:15:15 thompsa Exp $"); +__FBSDID("$FreeBSD: src/sys/net/if_bridge.c,v 1.72 2006/07/27 21:01:47 thompsa Exp $"); #include "opt_inet.h" #include "opt_inet6.h" @@ -169,6 +169,51 @@ */ #define BRIDGE_IFCAPS_MASK IFCAP_TXCSUM +/* + * Bridge interface list entry. + */ +struct bridge_iflist { + LIST_ENTRY(bridge_iflist) bif_next; + struct ifnet *bif_ifp; /* member if */ + struct bstp_port bif_stp; /* STP state */ + uint32_t bif_flags; /* member if flags */ + int bif_mutecap; /* member muted caps */ +}; + +/* + * Bridge route node. + */ +struct bridge_rtnode { + LIST_ENTRY(bridge_rtnode) brt_hash; /* hash table linkage */ + LIST_ENTRY(bridge_rtnode) brt_list; /* list linkage */ + struct ifnet *brt_ifp; /* destination if */ + unsigned long brt_expire; /* expiration time */ + uint8_t brt_flags; /* address flags */ + uint8_t brt_addr[ETHER_ADDR_LEN]; +}; + +/* + * Software state for each bridge. + */ +struct bridge_softc { + struct ifnet *sc_ifp; /* make this an interface */ + LIST_ENTRY(bridge_softc) sc_list; + struct mtx sc_mtx; + struct cv sc_cv; + uint32_t sc_brtmax; /* max # of addresses */ + uint32_t sc_brtcnt; /* cur. # of addresses */ + uint32_t sc_brttimeout; /* rt timeout in seconds */ + struct callout sc_brcallout; /* bridge callout */ + uint32_t sc_iflist_ref; /* refcount for sc_iflist */ + uint32_t sc_iflist_xcnt; /* refcount for sc_iflist */ + LIST_HEAD(, bridge_iflist) sc_iflist; /* member interface list */ + LIST_HEAD(, bridge_rtnode) *sc_rthash; /* our forwarding table */ + LIST_HEAD(, bridge_rtnode) sc_rtlist; /* list version of above */ + uint32_t sc_rthash_key; /* key for hash */ + LIST_HEAD(, bridge_iflist) sc_spanlist; /* span ports list */ + struct bstp_state sc_stp; /* STP state */ +}; + static struct mtx bridge_list_mtx; eventhandler_tag bridge_detach_cookie = NULL; @@ -189,6 +234,9 @@ static struct mbuf *bridge_input(struct ifnet *, struct mbuf *); static int bridge_output(struct ifnet *, struct mbuf *, struct sockaddr *, struct rtentry *); +static void bridge_enqueue(struct bridge_softc *, struct ifnet *, + struct mbuf *); +static void bridge_rtdelete(struct bridge_softc *, struct ifnet *ifp, int); static void bridge_forward(struct bridge_softc *, struct mbuf *m); @@ -1469,7 +1517,7 @@ * Enqueue a packet on a bridge member interface. * */ -__inline void +static void bridge_enqueue(struct bridge_softc *sc, struct ifnet *dst_ifp, struct mbuf *m) { int len, err = 0; @@ -2366,7 +2414,7 @@ * * Delete routes to a speicifc member interface. */ -void +static void bridge_rtdelete(struct bridge_softc *sc, struct ifnet *ifp, int full) { struct bridge_rtnode *brt, *nbrt; ==== //depot/projects/smpng/sys/net/if_bridgevar.h#11 (text+ko) ==== @@ -67,7 +67,7 @@ * * OpenBSD: if_bridge.h,v 1.14 2001/03/22 03:48:29 jason Exp * - * $FreeBSD: src/sys/net/if_bridgevar.h,v 1.13 2006/07/26 10:45:38 thompsa Exp $ + * $FreeBSD: src/sys/net/if_bridgevar.h,v 1.14 2006/07/27 21:01:47 thompsa Exp $ */ /* @@ -194,51 +194,6 @@ #ifdef _KERNEL -/* - * Bridge interface list entry. - */ -struct bridge_iflist { - LIST_ENTRY(bridge_iflist) bif_next; - struct ifnet *bif_ifp; /* member if */ - struct bstp_port bif_stp; /* STP state */ - uint32_t bif_flags; /* member if flags */ - int bif_mutecap; /* member muted caps */ -}; - -/* - * Bridge route node. - */ -struct bridge_rtnode { - LIST_ENTRY(bridge_rtnode) brt_hash; /* hash table linkage */ - LIST_ENTRY(bridge_rtnode) brt_list; /* list linkage */ - struct ifnet *brt_ifp; /* destination if */ - unsigned long brt_expire; /* expiration time */ - uint8_t brt_flags; /* address flags */ - uint8_t brt_addr[ETHER_ADDR_LEN]; -}; - -/* - * Software state for each bridge. - */ -struct bridge_softc { - struct ifnet *sc_ifp; /* make this an interface */ - LIST_ENTRY(bridge_softc) sc_list; - struct mtx sc_mtx; - struct cv sc_cv; - uint32_t sc_brtmax; /* max # of addresses */ - uint32_t sc_brtcnt; /* cur. # of addresses */ - uint32_t sc_brttimeout; /* rt timeout in seconds */ - struct callout sc_brcallout; /* bridge callout */ - uint32_t sc_iflist_ref; /* refcount for sc_iflist */ - uint32_t sc_iflist_xcnt; /* refcount for sc_iflist */ - LIST_HEAD(, bridge_iflist) sc_iflist; /* member interface list */ - LIST_HEAD(, bridge_rtnode) *sc_rthash; /* our forwarding table */ - LIST_HEAD(, bridge_rtnode) sc_rtlist; /* list version of above */ - uint32_t sc_rthash_key; /* key for hash */ - LIST_HEAD(, bridge_iflist) sc_spanlist; /* span ports list */ - struct bstp_state sc_stp; /* STP state */ -}; - #define BRIDGE_LOCK_INIT(_sc) do { \ mtx_init(&(_sc)->sc_mtx, "if_bridge", NULL, MTX_DEF); \ cv_init(&(_sc)->sc_cv, "if_bridge_cv"); \ @@ -291,9 +246,6 @@ _err = (*bridge_output_p)(_ifp, _m, NULL, NULL); \ } while (0) -void bridge_enqueue(struct bridge_softc *, struct ifnet *, struct mbuf *); -void bridge_rtdelete(struct bridge_softc *, struct ifnet *ifp, int); - extern struct mbuf *(*bridge_input_p)(struct ifnet *, struct mbuf *); extern int (*bridge_output_p)(struct ifnet *, struct mbuf *, struct sockaddr *, struct rtentry *); ==== //depot/projects/smpng/sys/net/if_ethersubr.c#74 (text+ko) ==== @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * @(#)if_ethersubr.c 8.1 (Berkeley) 6/10/93 - * $FreeBSD: src/sys/net/if_ethersubr.c,v 1.216 2006/07/27 03:50:38 avatar Exp $ + * $FreeBSD: src/sys/net/if_ethersubr.c,v 1.217 2006/07/27 21:01:47 thompsa Exp $ */ #include "opt_atalk.h" @@ -59,7 +59,6 @@ #include #include #include -#include #include #include ==== //depot/projects/smpng/sys/net/if_gif.c#37 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/net/if_gif.c,v 1.63 2006/07/27 03:50:38 avatar Exp $ */ +/* $FreeBSD: src/sys/net/if_gif.c,v 1.64 2006/07/27 21:01:47 thompsa Exp $ */ /* $KAME: if_gif.c,v 1.87 2001/10/19 08:50:27 itojun Exp $ */ /*- @@ -81,7 +81,6 @@ #include #include -#include #include #include ==== //depot/projects/smpng/sys/netgraph/ng_ether.c#32 (text+ko) ==== @@ -39,7 +39,7 @@ * Authors: Archie Cobbs * Julian Elischer * - * $FreeBSD: src/sys/netgraph/ng_ether.c,v 1.59 2006/07/27 06:15:37 avatar Exp $ + * $FreeBSD: src/sys/netgraph/ng_ether.c,v 1.60 2006/07/27 21:01:48 thompsa Exp $ */ /* @@ -61,7 +61,6 @@ #include #include #include -#include #include #include