From owner-cvs-src@FreeBSD.ORG Tue Jul 27 23:20:46 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 08F6916A4CE; Tue, 27 Jul 2004 23:20:46 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id F084743D3F; Tue, 27 Jul 2004 23:20:45 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i6RNKj6v064329; Tue, 27 Jul 2004 23:20:45 GMT (envelope-from rwatson@repoman.freebsd.org) Received: (from rwatson@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i6RNKj11064328; Tue, 27 Jul 2004 23:20:45 GMT (envelope-from rwatson) Message-Id: <200407272320.i6RNKj11064328@repoman.freebsd.org> From: Robert Watson Date: Tue, 27 Jul 2004 23:20:45 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/net if.c if.h if_ethersubr.c if_var.h src/sys/net80211 ieee80211_output.c ieee80211_proto.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2004 23:20:46 -0000 rwatson 2004-07-27 23:20:45 UTC FreeBSD src repository Modified files: sys/net if.c if.h if_ethersubr.c if_var.h sys/net80211 ieee80211_output.c ieee80211_proto.c Log: Add a new network interface flag, IFF_NEEDSGIANT, which will allow device drivers to declare that the ifp->if_start() method implemented by the driver requires Giant in order to operate correctly. Add a 'struct task' to 'struct ifnet' that can be used to execute a deferred ifp->if_start() in the event that if_start needs to be called in a Giant-free environment. To do this, introduce if_start(), a wrapper function for ifp->if_start(). If the interface can run MPSAFE, it directly dispatches into the interface start routine. If it can't run MPSAFE, we're running with debug.mpsafenet != 0, and Giant isn't currently held, the task is queued to execute in a swi holding Giant via if_start_deferred(). Modify if_handoff() to use if_start() instead of direct dispatch. Modify 802.11 to use if_start() instead of direct dispatch. This is intended to provide increased compatibility for non-MPSAFE network device drivers in the presence of Giant-free operation via asynchronous dispatch. However, this commit does not mark any network interfaces as IFF_NEEDSGIANT. Revision Changes Path 1.197 +49 -0 src/sys/net/if.c 1.88 +1 -0 src/sys/net/if.h 1.177 +2 -0 src/sys/net/if_ethersubr.c 1.82 +6 -2 src/sys/net/if_var.h 1.11 +1 -1 src/sys/net80211/ieee80211_output.c 1.9 +1 -1 src/sys/net80211/ieee80211_proto.c