Source-Changes-HG archive

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

[src/trunk]: src/sys/net Set IFEF_START_MPSAFE by default



details:   https://anonhg.NetBSD.org/src/rev/7c7e00a550fe
branches:  trunk
changeset: 827075:7c7e00a550fe
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Thu Oct 12 02:40:59 2017 +0000

description:
Set IFEF_START_MPSAFE by default

Because vlan_start is already MP-safe, there is no reason to not do so.

Acked by s-yamaguchi@IIJ

diffstat:

 sys/net/if_vlan.c |  15 ++-------------
 1 files changed, 2 insertions(+), 13 deletions(-)

diffs (54 lines):

diff -r e8da77dc81c9 -r 7c7e00a550fe sys/net/if_vlan.c
--- a/sys/net/if_vlan.c Thu Oct 12 02:40:34 2017 +0000
+++ b/sys/net/if_vlan.c Thu Oct 12 02:40:59 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_vlan.c,v 1.102 2017/10/11 08:29:17 msaitoh Exp $    */
+/*     $NetBSD: if_vlan.c,v 1.103 2017/10/12 02:40:59 ozaki-r Exp $    */
 
 /*-
  * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -78,11 +78,10 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_vlan.c,v 1.102 2017/10/11 08:29:17 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vlan.c,v 1.103 2017/10/12 02:40:59 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
-#include "opt_net_mpsafe.h"
 #endif
 
 #include <sys/param.h>
@@ -123,10 +122,6 @@
 
 #include "ioconf.h"
 
-#ifdef NET_MPSAFE
-#define VLAN_MPSAFE            1
-#endif
-
 struct vlan_mc_entry {
        LIST_ENTRY(vlan_mc_entry)       mc_entries;
        /*
@@ -342,9 +337,7 @@
        if_initname(ifp, ifc->ifc_name, unit);
        ifp->if_softc = ifv;
        ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
-#ifdef VLAN_MPSAFE
        ifp->if_extflags = IFEF_START_MPSAFE;
-#endif
        ifp->if_start = vlan_start;
        ifp->if_transmit = vlan_transmit;
        ifp->if_ioctl = vlan_ioctl;
@@ -1193,10 +1186,6 @@
        struct psref psref;
        int error;
 
-#ifndef NET_MPSAFE
-       KASSERT(KERNEL_LOCKED_P());
-#endif
-
        mib = vlan_getref_linkmib(ifv, &psref);
        if (mib == NULL)
                return;



Home | Main Index | Thread Index | Old Index