svn commit: r192049 - head/sys/net

Robert Watson rwatson at FreeBSD.org
Wed May 13 17:22:34 UTC 2009


Author: rwatson
Date: Wed May 13 17:22:33 2009
New Revision: 192049
URL: http://svn.freebsd.org/changeset/base/192049

Log:
  Garbage collect now-unused NETISR_FORCEQUEUE, which overrode the global
  direct dispatch policy for specific protocols (NETISR_USB).  We leave
  the additional 'flags' argument to netisr_register() for the time being,
  even though it is no longer required.

Modified:
  head/sys/net/netisr.c
  head/sys/net/netisr.h

Modified: head/sys/net/netisr.c
==============================================================================
--- head/sys/net/netisr.c	Wed May 13 17:17:05 2009	(r192048)
+++ head/sys/net/netisr.c	Wed May 13 17:22:33 2009	(r192049)
@@ -78,8 +78,7 @@ netisr_register(int num, netisr_t *handl
 	
 	KASSERT(!(num < 0 || num >= (sizeof(netisrs)/sizeof(*netisrs))),
 	    ("bad isr %d", num));
-	KASSERT(flags == 0 || flags == NETISR_FORCEQUEUE,
-	    ("netisr_register: bad flags 0x%x\n", flags));
+	KASSERT(flags == 0, ("netisr_register: bad flags 0x%x\n", flags));
 	netisrs[num].ni_handler = handler;
 	netisrs[num].ni_queue = inq;
 	netisrs[num].ni_flags = flags;
@@ -169,15 +168,11 @@ netisr_dispatch(int num, struct mbuf *m)
 	}
 
 	/*
-	 * Unless NETISR_FORCEQUEUE is set on the netisr (generally
-	 * indicating that the handler still requires Giant, which cannot be
-	 * acquired in arbitrary order with respect to a caller), directly
-	 * dispatch handling of this packet.  Source ordering is maintained
-	 * by virtue of callers consistently calling one of queued or direct
-	 * dispatch, and the forcequeue flag being immutable after
-	 * registration.
+	 * Directly dispatch handling of this packet, if permitted by global
+	 * policy.  Source ordering is maintained by virtue of callers
+	 * consistently calling one of queued or direct dispatch.
 	 */
-	if (netisr_direct && !(ni->ni_flags & NETISR_FORCEQUEUE)) {
+	if (netisr_direct) {
 		isrstat.isrs_directed++;
 		ni->ni_handler(m);
 	} else {

Modified: head/sys/net/netisr.h
==============================================================================
--- head/sys/net/netisr.h	Wed May 13 17:17:05 2009	(r192048)
+++ head/sys/net/netisr.h	Wed May 13 17:22:33 2009	(r192049)
@@ -83,7 +83,6 @@ typedef void netisr_t (struct mbuf *);
   
 void	netisr_dispatch(int, struct mbuf *);
 int	netisr_queue(int, struct mbuf *);
-#define	NETISR_FORCEQUEUE	0x0002		/* Force queued dispatch. */
 void	netisr_register(int, netisr_t *, struct ifqueue *, int);
 void	netisr_unregister(int);
 


More information about the svn-src-all mailing list