Source-Changes-HG archive

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

[src/trunk]: src/sys Replace some splnet with splsoftnet



details:   https://anonhg.NetBSD.org/src/rev/15de19bada6c
branches:  trunk
changeset: 821076:15de19bada6c
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Mon Jan 23 10:19:03 2017 +0000

description:
Replace some splnet with splsoftnet

diffstat:

 sys/net/if.c        |  20 ++++++++++----------
 sys/net/if_bridge.c |  16 ++++++++--------
 sys/netinet/in.c    |   6 +++---
 sys/netinet6/in6.c  |  16 ++++++++--------
 4 files changed, 29 insertions(+), 29 deletions(-)

diffs (258 lines):

diff -r daa26cd00cb2 -r 15de19bada6c sys/net/if.c
--- a/sys/net/if.c      Mon Jan 23 10:17:36 2017 +0000
+++ b/sys/net/if.c      Mon Jan 23 10:19:03 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if.c,v 1.372 2017/01/20 08:35:33 ozaki-r Exp $ */
+/*     $NetBSD: if.c,v 1.373 2017/01/23 10:19:03 ozaki-r Exp $ */
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.372 2017/01/20 08:35:33 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.373 2017/01/23 10:19:03 ozaki-r Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -526,7 +526,7 @@
        struct ifaddr *ifa;
        int bound = curlwp_bind();
 
-       s = splnet();
+       s = splsoftnet();
 
        if_deactivate_sadl(ifp);
 
@@ -567,7 +567,7 @@
 
        KASSERT(ifp->if_sadl != NULL);
 
-       s = splnet();
+       s = splsoftnet();
        rtinit(ifa, RTM_DELETE, 0);
        ifa_remove(ifp, ifa);
        if_deactivate_sadl(ifp);
@@ -1126,7 +1126,7 @@
        struct domain *dp;
        int s;
 
-       s = splnet();
+       s = splsoftnet();
 
        /* address family dependent data region */
        memset(ifp->if_afdata, 0, sizeof(ifp->if_afdata));
@@ -1148,7 +1148,7 @@
 {
        int s;
 
-       s = splnet();
+       s = splsoftnet();
 
        ifp->if_output   = if_nulloutput;
        ifp->_if_input   = if_nullinput;
@@ -2450,7 +2450,7 @@
        if (__predict_false(slowtimo == NULL))
                return;
 
-       s = splnet();
+       s = splsoftnet();
        if (ifp->if_timer != 0 && --ifp->if_timer == 0)
                (*slowtimo)(ifp);
 
@@ -2720,12 +2720,12 @@
        case SIOCSIFFLAGS:
                ifr = data;
                if (ifp->if_flags & IFF_UP && (ifr->ifr_flags & IFF_UP) == 0) {
-                       s = splnet();
+                       s = splsoftnet();
                        if_down(ifp);
                        splx(s);
                }
                if (ifr->ifr_flags & IFF_UP && (ifp->if_flags & IFF_UP) == 0) {
-                       s = splnet();
+                       s = splsoftnet();
                        if_up(ifp);
                        splx(s);
                }
@@ -3026,7 +3026,7 @@
 
        if (((oif_flags ^ ifp->if_flags) & IFF_UP) != 0) {
                if ((ifp->if_flags & IFF_UP) != 0) {
-                       int s = splnet();
+                       int s = splsoftnet();
                        if_up(ifp);
                        splx(s);
                }
diff -r daa26cd00cb2 -r 15de19bada6c sys/net/if_bridge.c
--- a/sys/net/if_bridge.c       Mon Jan 23 10:17:36 2017 +0000
+++ b/sys/net/if_bridge.c       Mon Jan 23 10:19:03 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_bridge.c,v 1.131 2016/09/15 14:40:43 christos Exp $ */
+/*     $NetBSD: if_bridge.c,v 1.132 2017/01/23 10:19:03 ozaki-r Exp $  */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -80,7 +80,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.131 2016/09/15 14:40:43 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.132 2017/01/23 10:19:03 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_bridge_ipf.h"
@@ -205,7 +205,7 @@
 #define ACQUIRE_GLOBAL_LOCKS() do {                                    \
                                        KERNEL_LOCK(1, NULL);           \
                                        mutex_enter(softnet_lock);      \
-                                       __s = splnet();                 \
+                                       __s = splsoftnet();             \
                                } while (0)
 #define RELEASE_GLOBAL_LOCKS() do {                                    \
                                        splx(__s);                      \
@@ -456,7 +456,7 @@
        struct bridge_iflist *bif;
        int s;
 
-       s = splnet();
+       s = splsoftnet();
 
        bridge_stop(ifp, 1);
 
@@ -509,7 +509,7 @@
        const struct bridge_control *bc = NULL; /* XXXGCC */
        int s, error = 0;
 
-       /* Authorize command before calling splnet(). */
+       /* Authorize command before calling splsoftnet(). */
        switch (cmd) {
        case SIOCGDRVSPEC:
        case SIOCSDRVSPEC:
@@ -535,7 +535,7 @@
                break;
        }
 
-       s = splnet();
+       s = splsoftnet();
 
        switch (cmd) {
        case SIOCGDRVSPEC:
@@ -552,7 +552,7 @@
                        break;
                }
 
-               /* BC_F_SUSER is checked above, before splnet(). */
+               /* BC_F_SUSER is checked above, before splsoftnet(). */
 
                if ((bc->bc_flags & (BC_F_XLATEIN|BC_F_XLATEOUT)) == 0
                    && (ifd->ifd_len != bc->bc_argsize
@@ -1548,7 +1548,7 @@
                                mc->m_flags &= ~M_PROMISC;
 
 #ifndef NET_MPSAFE
-                               s = splnet();
+                               s = splsoftnet();
 #endif
                                ether_input(dst_if, mc);
 #ifndef NET_MPSAFE
diff -r daa26cd00cb2 -r 15de19bada6c sys/netinet/in.c
--- a/sys/netinet/in.c  Mon Jan 23 10:17:36 2017 +0000
+++ b/sys/netinet/in.c  Mon Jan 23 10:19:03 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: in.c,v 1.196 2017/01/16 07:33:36 ryo Exp $     */
+/*     $NetBSD: in.c,v 1.197 2017/01/23 10:19:03 ozaki-r Exp $ */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -91,7 +91,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.196 2017/01/16 07:33:36 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.197 2017/01/23 10:19:03 ozaki-r Exp $");
 
 #include "arp.h"
 
@@ -1132,7 +1132,7 @@
         * if this is its first address,
         * and to validate the address if necessary.
         */
-       s = splnet();
+       s = splsoftnet();
        error = if_addr_init(ifp, &ia->ia_ifa, true);
        splx(s);
        /* Now clear the try tentative flag, it's job is done. */
diff -r daa26cd00cb2 -r 15de19bada6c sys/netinet6/in6.c
--- a/sys/netinet6/in6.c        Mon Jan 23 10:17:36 2017 +0000
+++ b/sys/netinet6/in6.c        Mon Jan 23 10:19:03 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: in6.c,v 1.236 2017/01/16 15:44:47 christos Exp $       */
+/*     $NetBSD: in6.c,v 1.237 2017/01/23 10:19:03 ozaki-r Exp $        */
 /*     $KAME: in6.c,v 1.198 2001/07/18 09:12:38 itojun Exp $   */
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.236 2017/01/16 15:44:47 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.237 2017/01/23 10:19:03 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -705,7 +705,7 @@
                 * make (ia == NULL) or update (ia != NULL) the interface
                 * address structure, and link it to the list.
                 */
-               int s = splnet();
+               int s = splsoftnet();
                error = in6_update_ifa1(ifp, ifra, &ia, &psref, 0);
                splx(s);
                if (error)
@@ -766,7 +766,7 @@
                break;
        }
 
-       s = splnet();
+       s = splsoftnet();
 #ifndef NET_MPSAFE
        mutex_enter(softnet_lock);
 #endif
@@ -782,7 +782,7 @@
  * Update parameters of an IPv6 interface address.
  * If necessary, a new entry is created and linked into address chains.
  * This function is separated from in6_control().
- * XXX: should this be performed under splnet()?
+ * XXX: should this be performed under splsoftnet()?
  */
 static int
 in6_update_ifa1(struct ifnet *ifp, struct in6_aliasreq *ifra,
@@ -1322,7 +1322,7 @@
 {
        int rc, s;
 
-       s = splnet();
+       s = splsoftnet();
        rc = in6_update_ifa1(ifp, ifra, NULL, NULL, flags);
        splx(s);
        return rc;
@@ -1362,7 +1362,7 @@
 static void
 in6_unlink_ifa(struct in6_ifaddr *ia, struct ifnet *ifp)
 {
-       int     s = splnet();
+       int     s = splsoftnet();
 
        mutex_enter(&in6_ifaddr_lock);
        IN6_ADDRLIST_WRITER_REMOVE(ia);
@@ -1707,7 +1707,7 @@
        const struct sockaddr_in6 *sin6, int newhost)
 {
        int     error = 0, ifacount = 0;
-       int     s = splnet();
+       int     s = splsoftnet();
        struct ifaddr *ifa;
 
        /*



Home | Main Index | Thread Index | Old Index