From 482bfeab4715003445dbf838bbdcce673740ff7d Mon Sep 17 00:00:00 2001 From: rwatson Date: Fri, 4 Jul 2008 00:21:38 +0000 Subject: Remove NETISR_MPSAFE, which allows specific netisr handlers to be directly dispatched without Giant, and add NETISR_FORCEQUEUE, which allows specific netisr handlers to always be dispatched via a queue (deferred). Mark the usb and if_ppp netisr handlers as NETISR_FORCEQUEUE, and explicitly acquire Giant in those handlers. Previously, any netisr handler not marked NETISR_MPSAFE would necessarily run deferred and with Giant acquired. This change removes Giant scaffolding from the netisr infrastructure, but NETISR_FORCEQUEUE allows non-MPSAFE handlers to continue to force deferred dispatch so as to avoid lock order reversals between their acqusition of Giant and any calling context. It is likely we will be able to remove NETISR_FORCEQUEUE once IFF_NEEDSGIANT is removed, as non-MPSAFE usb and if_ppp drivers will no longer be supported. Reviewed by: bz MFC after: 1 month X-MFC note: We can't remove NETISR_MPSAFE from stable/7 for KPI reasons, but the rest can go back. --- sys/netnatm/natm_proto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/netnatm') diff --git a/sys/netnatm/natm_proto.c b/sys/netnatm/natm_proto.c index 976f4b4..145fb58 100644 --- a/sys/netnatm/natm_proto.c +++ b/sys/netnatm/natm_proto.c @@ -105,7 +105,7 @@ natm_init(void) natmintrq.ifq_maxlen = natmqmaxlen; NATM_LOCK_INIT(); mtx_init(&natmintrq.ifq_mtx, "natm_inq", NULL, MTX_DEF); - netisr_register(NETISR_NATM, natmintr, &natmintrq, NETISR_MPSAFE); + netisr_register(NETISR_NATM, natmintr, &natmintrq, 0); } DOMAIN_SET(natm); -- cgit v1.1