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.
This commit is contained in:
rwatson 2009-05-13 17:22:33 +00:00
parent e0965aca60
commit deae02e77d
2 changed files with 5 additions and 11 deletions

View File

@ -78,8 +78,7 @@ netisr_register(int num, netisr_t *handler, struct ifqueue *inq, int flags)
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 {

View File

@ -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);