Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-8]: src/sys/net Pull up following revision(s) (requested by ozaki...



details:   https://anonhg.NetBSD.org/src/rev/0c9742dba8f6
branches:  netbsd-8
changeset: 434423:0c9742dba8f6
user:      snj <snj%NetBSD.org@localhost>
date:      Thu Nov 23 02:13:31 2017 +0000

description:
Pull up following revision(s) (requested by ozaki-r in ticket #382):
        sys/net/if_bridge.c: revision 1.139
        sys/net/if_loop.c: revision 1.97
Don't take KERNEL_LOCK in looutput if NET_MPSAFE
We can perhaps get rid of KERNEL_LOCK from looutput, but for now
keep it for safe.
--
Mark callouts of bridge CALLOUT_MPSAFE

diffstat:

 sys/net/if_bridge.c |  8 ++++----
 sys/net/if_loop.c   |  8 ++++++--
 2 files changed, 10 insertions(+), 6 deletions(-)

diffs (67 lines):

diff -r ea75d2f29b16 -r 0c9742dba8f6 sys/net/if_bridge.c
--- a/sys/net/if_bridge.c       Wed Nov 22 16:47:21 2017 +0000
+++ b/sys/net/if_bridge.c       Thu Nov 23 02:13:31 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_bridge.c,v 1.134.6.1 2017/10/02 13:33:41 martin Exp $       */
+/*     $NetBSD: if_bridge.c,v 1.134.6.2 2017/11/23 02:13:31 snj Exp $  */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -80,7 +80,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.134.6.1 2017/10/02 13:33:41 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.134.6.2 2017/11/23 02:13:31 snj Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_bridge_ipf.h"
@@ -415,8 +415,8 @@
        if (error)
                panic("%s: workqueue_create %d\n", __func__, error);
 
-       callout_init(&sc->sc_brcallout, 0);
-       callout_init(&sc->sc_bstpcallout, 0);
+       callout_init(&sc->sc_brcallout, CALLOUT_MPSAFE);
+       callout_init(&sc->sc_bstpcallout, CALLOUT_MPSAFE);
 
        mutex_init(&sc->sc_iflist_psref.bip_lock, MUTEX_DEFAULT, IPL_NONE);
        PSLIST_INIT(&sc->sc_iflist_psref.bip_iflist);
diff -r ea75d2f29b16 -r 0c9742dba8f6 sys/net/if_loop.c
--- a/sys/net/if_loop.c Wed Nov 22 16:47:21 2017 +0000
+++ b/sys/net/if_loop.c Thu Nov 23 02:13:31 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_loop.c,v 1.94.6.1 2017/10/24 08:50:44 snj Exp $     */
+/*     $NetBSD: if_loop.c,v 1.94.6.2 2017/11/23 02:13:31 snj Exp $     */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -65,7 +65,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_loop.c,v 1.94.6.1 2017/10/24 08:50:44 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_loop.c,v 1.94.6.2 2017/11/23 02:13:31 snj Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -242,7 +242,9 @@
 
        MCLAIM(m, ifp->if_mowner);
 
+#ifndef NET_MPSAFE
        KERNEL_LOCK(1, NULL);
+#endif
 
        if ((m->m_flags & M_PKTHDR) == 0)
                panic("looutput: no header mbuf");
@@ -368,7 +370,9 @@
        schednetisr(isr);
        splx(s);
 out:
+#ifndef NET_MPSAFE
        KERNEL_UNLOCK_ONE(NULL);
+#endif
        return error;
 }
 



Home | Main Index | Thread Index | Old Index