Date: Thu, 27 Jul 2006 21:41:54 GMT From: John Baldwin <jhb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 102609 for review Message-ID: <200607272141.k6RLfsLl030733@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <sys/cdefs.h> -__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 <sys/cdefs.h> -__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 <sys/param.h> #include <sys/systm.h> ==== //depot/projects/smpng/sys/ia64/ia64/trap.c#83 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__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 <sys/cdefs.h> -__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 <net/if_types.h> #include <net/bpf.h> #include <net/ethernet.h> -#include <net/bridgestp.h> #include <net/if_bridgevar.h> #include <net/if_vlan_var.h> ==== //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 <netinet/ip_encap.h> #include <net/ethernet.h> -#include <net/bridgestp.h> #include <net/if_bridgevar.h> #include <net/if_gif.h> ==== //depot/projects/smpng/sys/netgraph/ng_ether.c#32 (text+ko) ==== @@ -39,7 +39,7 @@ * Authors: Archie Cobbs <archie@freebsd.org> * Julian Elischer <julian@freebsd.org> * - * $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 <net/if_arp.h> #include <net/if_var.h> #include <net/ethernet.h> -#include <net/bridgestp.h> #include <net/if_bridgevar.h> #include <netgraph/ng_message.h>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607272141.k6RLfsLl030733>