From owner-freebsd-net@FreeBSD.ORG Fri Oct 6 09:37:36 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0B90816A47C for ; Fri, 6 Oct 2006 09:37:36 +0000 (UTC) (envelope-from sivakumar.subramani@wipro.com) Received: from wip-ectls-mx1.wipro.com (wip-ectls-mx1.wipro.com [203.91.193.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id CFEF543D53 for ; Fri, 6 Oct 2006 09:37:34 +0000 (GMT) (envelope-from sivakumar.subramani@wipro.com) Received: from wip-ectls-mx1.wipro.com (localhost.localdomain [127.0.0.1]) by localhost (Postfix) with ESMTP id A8DCD220495 for ; Fri, 6 Oct 2006 15:07:41 +0530 (IST) Received: from blr-ec-bh01.wipro.com (blr-ec-bh01.wipro.com [10.201.50.91]) by wip-ectls-mx1.wipro.com (Postfix) with ESMTP id 9CC4D220483 for ; Fri, 6 Oct 2006 15:07:41 +0530 (IST) Received: from blr-m3-msg.wipro.com ([10.114.50.99]) by blr-ec-bh01.wipro.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 6 Oct 2006 15:07:32 +0530 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Date: Fri, 6 Oct 2006 15:07:41 +0530 Message-ID: <956E7FA2615F3B4595FC5F22870A7221141AF6@blr-m3-msg.wipro.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Query on SPIN Mutex in FreeBSD. Thread-Index: AcbpKxGVR8Cdoq3+RsWrlcbLDKtCJg== From: To: X-OriginalArrivalTime: 06 Oct 2006 09:37:32.0344 (UTC) FILETIME=[0C27D380:01C6E92B] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Query on SPIN Mutex in FreeBSD. X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Oct 2006 09:37:36 -0000 Hi, =0D I have a query regarding the mutex lock in network driver, =0D When I was browsing all network drivers in FreeBSD, I found none of the drivers are using MTX_SPIN, instead all of them are using MTX_DEF. When I read the man page of the mutex, it is mentioned that we need to use MTX_SPIN in primary interrupt code. Is that mean that I need to hold the MTX_SPIN lock in ISR routine? I am facing a conflicting issue regarding the DTR usage (freeing in Stop and Use it ISR) between Stop and ISR routine. I want to know whether I can use a MTX_SPIN lock between these functions. I mean I will hold the SPIN_LOCK in ISR and in stop entry point function such that the freeing and the usage of DTR between STOP and ISR is synchronized. Is that correct approach? =0D =0D Any suggestion please? =0D Thanks, ~Siva The information contained in this electronic message and any attachments to= this message are intended for the exclusive use of the addressee(s) and= may contain proprietary, confidential or privileged information. If you= are not the intended recipient, you should not disseminate, distribute or= copy this e-mail. Please notify the sender immediately and destroy all= copies of this message and any attachments.=0D WARNING: Computer viruses can be transmitted via email. The recipient= should check this email and any attachments for the presence of viruses.= The company accepts no liability for any damage caused by any virus= transmitted by this email. =0D www.wipro.com