Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Dec 2003 12:04:28 -0800 (PST)
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 44464 for review
Message-ID:  <200312282004.hBSK4SNe034072@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=44464

Change 44464 by sam@sam_ebb on 2003/12/28 12:03:56

	purge debug_mpsafenet

Affected files ...

.. //depot/projects/netperf+sockets/sys/kern/subr_bus.c#4 edit
.. //depot/projects/netperf+sockets/sys/net/netisr.c#3 edit
.. //depot/projects/netperf+sockets/sys/netinet/ip_dummynet.c#6 edit
.. //depot/projects/netperf+sockets/sys/netinet/ip_fw2.c#6 edit
.. //depot/projects/netperf+sockets/sys/netinet/tcp_syncache.c#4 edit
.. //depot/projects/netperf+sockets/sys/sys/mutex.h#3 edit

Differences ...

==== //depot/projects/netperf+sockets/sys/kern/subr_bus.c#4 (text+ko) ====

@@ -2140,9 +2140,6 @@
 	int error;
 
 	if (dev->parent != 0) {
-		if ((flags &~ INTR_ENTROPY) == (INTR_TYPE_NET | INTR_MPSAFE) &&
-		    !debug_mpsafenet)
-			flags &= ~INTR_MPSAFE;
 		error = BUS_SETUP_INTR(dev->parent, dev, r, flags,
 		    handler, arg, cookiep);
 		if (error == 0) {

==== //depot/projects/netperf+sockets/sys/net/netisr.c#3 (text+ko) ====

@@ -53,16 +53,6 @@
 #include <net/if_var.h>
 #include <net/netisr.h>
 
-/*
- * XXX this is a temporary measure to allow folks to
- * XXX disable Giant locking in the network code without
- * XXX recompiling--in case of problems.
- */
-int	debug_mpsafenet = 1;
-TUNABLE_INT("debug.mpsafenet", &debug_mpsafenet);
-SYSCTL_INT(_debug, OID_AUTO, mpsafenet, CTLFLAG_RD, &debug_mpsafenet, 0,
-    "Enable/disable MPSAFE network support");
-
 volatile unsigned int	netisr;	/* scheduling bits for network */
 
 struct netisr {
@@ -87,8 +77,6 @@
 	    ("bad isr %d", num));
 	netisrs[num].ni_handler = handler;
 	netisrs[num].ni_queue = inq;
-	if ((flags & NETISR_MPSAFE) && !debug_mpsafenet)
-		flags &= ~NETISR_MPSAFE;
 	netisrs[num].ni_flags = flags;
 }
 

==== //depot/projects/netperf+sockets/sys/netinet/ip_dummynet.c#6 (text+ko) ====

@@ -2029,7 +2029,7 @@
     ip_dn_io_ptr = dummynet_io;
     ip_dn_ruledel_ptr = dn_rule_delete;
 
-    callout_init(&dn_timeout, debug_mpsafenet ? CALLOUT_MPSAFE : 0);
+    callout_init(&dn_timeout, CALLOUT_MPSAFE);
     callout_reset(&dn_timeout, 1, dummynet, NULL);
 }
 

==== //depot/projects/netperf+sockets/sys/netinet/ip_fw2.c#6 (text+ko) ====

@@ -2947,7 +2947,7 @@
 	layer3_chain.rules = NULL;
 	IPFW_LOCK_INIT(&layer3_chain);
 	IPFW_DYN_LOCK_INIT();
-	callout_init(&ipfw_timeout, debug_mpsafenet ? CALLOUT_MPSAFE : 0);
+	callout_init(&ipfw_timeout, CALLOUT_MPSAFE);
 
 	bzero(&default_rule, sizeof default_rule);
 

==== //depot/projects/netperf+sockets/sys/netinet/tcp_syncache.c#4 (text+ko) ====

@@ -248,8 +248,7 @@
 	/* Initialize the timer queues. */
 	for (i = 0; i <= SYNCACHE_MAXREXMTS; i++) {
 		TAILQ_INIT(&tcp_syncache.timerq[i]);
-		callout_init(&tcp_syncache.tt_timerq[i],
-			debug_mpsafenet ? CALLOUT_MPSAFE : 0);
+		callout_init(&tcp_syncache.tt_timerq[i], CALLOUT_MPSAFE);
 	}
 
 	/*

==== //depot/projects/netperf+sockets/sys/sys/mutex.h#3 (text+ko) ====

@@ -339,27 +339,6 @@
 		WITNESS_RESTORE(&Giant.mtx_object, Giant)
 #endif
 
-/*
- * Network MPSAFE temporary workarounds.  When debug_mpsafenet
- * is 1 the network is assumed to operate without Giant on the
- * input path and protocols that require Giant must collect it
- * on entry.  When 0 Giant is grabbed in the network interface
- * ISR's and in the netisr path and there is no need to grab
- * the Giant lock.
- *
- * This mechanism is intended as temporary until everything of
- * importance is properly locked.
- */
-extern	int debug_mpsafenet;		/* defined in net/netisr.c */
-#define	NET_PICKUP_GIANT() do {						\
-	if (debug_mpsafenet)						\
-		mtx_lock(&Giant);					\
-} while (0)
-#define	NET_DROP_GIANT() do {						\
-	if (debug_mpsafenet)						\
-		mtx_unlock(&Giant);					\
-} while (0)
-
 #define	UGAR(rval) do {							\
 	int _val = (rval);						\
 	mtx_unlock(&Giant);						\



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200312282004.hBSK4SNe034072>