From owner-p4-projects@FreeBSD.ORG Thu Sep 18 23:51:50 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2518B1065683; Thu, 18 Sep 2008 23:51:50 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD6B8106567E for ; Thu, 18 Sep 2008 23:51:49 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C9D4C8FC14 for ; Thu, 18 Sep 2008 23:51:49 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id m8INpnhp032113 for ; Thu, 18 Sep 2008 23:51:49 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id m8INpnPm032106 for perforce@freebsd.org; Thu, 18 Sep 2008 23:51:49 GMT (envelope-from imp@freebsd.org) Date: Thu, 18 Sep 2008 23:51:49 GMT Message-Id: <200809182351.m8INpnPm032106@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 150059 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, 18 Sep 2008 23:51:50 -0000 http://perforce.freebsd.org/chv.cgi?CH=150059 Change 150059 by imp@imp_paco-paco on 2008/09/18 23:51:04 IFC @150058 Affected files ... .. //depot/projects/mips2/src/cddl/contrib/opensolaris/lib/libdtrace/common/dt_printf.c#3 integrate .. //depot/projects/mips2/src/sys/net/if_lagg.c#12 integrate .. //depot/projects/mips2/src/sys/sys/sysent.h#4 integrate Differences ... ==== //depot/projects/mips2/src/cddl/contrib/opensolaris/lib/libdtrace/common/dt_printf.c#3 (text+ko) ==== ==== //depot/projects/mips2/src/sys/net/if_lagg.c#12 (text+ko) ==== @@ -1116,6 +1116,13 @@ int error = 0; LAGG_RLOCK(sc); + /* We need a Tx algorithm and at least one port */ + if (sc->sc_proto == LAGG_PROTO_NONE || sc->sc_count == 0) { + IF_DRAIN(&ifp->if_snd); + LAGG_RUNLOCK(sc); + return; + } + for (;; error = 0) { IFQ_DEQUEUE(&ifp->if_snd, m); if (m == NULL) @@ -1123,20 +1130,13 @@ ETHER_BPF_MTAP(ifp, m); - /* We need a Tx algorithm and at least one port */ - if (sc->sc_proto != LAGG_PROTO_NONE && sc->sc_count) - error = (*sc->sc_start)(sc, m); - else - m_freem(m); - + error = (*sc->sc_start)(sc, m); if (error == 0) ifp->if_opackets++; else ifp->if_oerrors++; } LAGG_RUNLOCK(sc); - - return; } static struct mbuf * ==== //depot/projects/mips2/src/sys/sys/sysent.h#4 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/sys/sysent.h,v 1.55 2007/07/12 18:01:31 jhb Exp $ + * $FreeBSD: src/sys/sys/sysent.h,v 1.56 2008/09/18 20:26:06 jhb Exp $ */ #ifndef _SYS_SYSENT_H_ @@ -52,14 +52,14 @@ extern systrace_probe_func_t systrace_probe_func; -struct sysent { /* system call table */ +struct sysent { /* system call table */ int sy_narg; /* number of arguments */ sy_call_t *sy_call; /* implementing function */ au_event_t sy_auevent; /* audit event associated with syscall */ systrace_args_func_t sy_systrace_args_func; /* optional argument conversion function. */ - u_int32_t sy_entry; /* DTrace entry ID for systrace. */ - u_int32_t sy_return; /* DTrace return ID for systrace. */ + u_int32_t sy_entry; /* DTrace entry ID for systrace. */ + u_int32_t sy_return; /* DTrace return ID for systrace. */ }; struct image_params; @@ -108,55 +108,53 @@ extern struct sysentvec null_sysvec; extern struct sysent sysent[]; -#define NO_SYSCALL (-1) +#define NO_SYSCALL (-1) struct module; struct syscall_module_data { - int (*chainevh)(struct module *, int, void *); /* next handler */ - void *chainarg; /* arg for next event handler */ - int *offset; /* offset into sysent */ - struct sysent *new_sysent; /* new sysent */ - struct sysent old_sysent; /* old sysent */ + int (*chainevh)(struct module *, int, void *); /* next handler */ + void *chainarg; /* arg for next event handler */ + int *offset; /* offset into sysent */ + struct sysent *new_sysent; /* new sysent */ + struct sysent old_sysent; /* old sysent */ }; -#define MAKE_SYSENT(syscallname) \ -static struct sysent syscallname##_sysent = { \ - (sizeof(struct syscallname ## _args ) \ - / sizeof(register_t)), \ - (sy_call_t *)& syscallname, \ - SYS_AUE_##syscallname \ +#define MAKE_SYSENT(syscallname) \ +static struct sysent syscallname##_sysent = { \ + (sizeof(struct syscallname ## _args ) \ + / sizeof(register_t)), \ + (sy_call_t *)& syscallname, \ + SYS_AUE_##syscallname \ } - -#define SYSCALL_MODULE(name, offset, new_sysent, evh, arg) \ -static struct syscall_module_data name##_syscall_mod = { \ - evh, arg, offset, new_sysent, { 0, NULL, AUE_NULL } \ -}; \ - \ -static moduledata_t name##_mod = { \ - #name, \ - syscall_module_handler, \ - &name##_syscall_mod \ -}; \ + +#define SYSCALL_MODULE(name, offset, new_sysent, evh, arg) \ +static struct syscall_module_data name##_syscall_mod = { \ + evh, arg, offset, new_sysent, { 0, NULL, AUE_NULL } \ +}; \ + \ +static moduledata_t name##_mod = { \ + #name, \ + syscall_module_handler, \ + &name##_syscall_mod \ +}; \ DECLARE_MODULE(name, name##_mod, SI_SUB_SYSCALLS, SI_ORDER_MIDDLE) -#define SYSCALL_MODULE_HELPER(syscallname) \ -static int syscallname##_syscall = SYS_##syscallname; \ -MAKE_SYSENT(syscallname); \ -SYSCALL_MODULE(syscallname, \ - & syscallname##_syscall, & syscallname##_sysent, \ - NULL, NULL); +#define SYSCALL_MODULE_HELPER(syscallname) \ +static int syscallname##_syscall = SYS_##syscallname; \ +MAKE_SYSENT(syscallname); \ +SYSCALL_MODULE(syscallname, \ + & syscallname##_syscall, & syscallname##_sysent, \ + NULL, NULL) -#define SYSCALL_MODULE_PRESENT(syscallname) \ - (sysent[SYS_##syscallname].sy_call != \ - (sy_call_t *)lkmnosys && \ - sysent[SYS_##syscallname].sy_call != \ - (sy_call_t *)lkmressys) +#define SYSCALL_MODULE_PRESENT(syscallname) \ + (sysent[SYS_##syscallname].sy_call != (sy_call_t *)lkmnosys && \ + sysent[SYS_##syscallname].sy_call != (sy_call_t *)lkmressys) -int syscall_register(int *offset, struct sysent *new_sysent, +int syscall_register(int *offset, struct sysent *new_sysent, struct sysent *old_sysent); -int syscall_deregister(int *offset, struct sysent *old_sysent); -int syscall_module_handler(struct module *mod, int what, void *arg); +int syscall_deregister(int *offset, struct sysent *old_sysent); +int syscall_module_handler(struct module *mod, int what, void *arg); #endif /* _KERNEL */