From owner-freebsd-net@FreeBSD.ORG Fri Mar 16 13:17:50 2007 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0625B16A404 for ; Fri, 16 Mar 2007 13:17:50 +0000 (UTC) (envelope-from bohra@cs.rutgers.edu) Received: from mail.nec-labs.com (mail.nec-labs.com [138.15.200.209]) by mx1.freebsd.org (Postfix) with ESMTP id C129913C489 for ; Fri, 16 Mar 2007 13:17:49 +0000 (UTC) (envelope-from bohra@cs.rutgers.edu) Received: from mail.nec-labs.com (localhost.localdomain [127.0.0.1]) by mail.nec-labs.com (8.13.6/8.13.6) with ESMTP id l2GDHkqV027017 for ; Fri, 16 Mar 2007 09:17:46 -0400 Received: from mailer.nec-labs.com (mailer.nec-labs.com [138.15.108.3]) by mail.nec-labs.com (8.13.6/8.13.6) with ESMTP id l2GDHkhp027011 for ; Fri, 16 Mar 2007 09:17:46 -0400 Received: from [138.15.109.80] ([138.15.109.80] unverified) by mailer.nec-labs.com with Microsoft SMTPSVC(5.0.2195.6713); Fri, 16 Mar 2007 09:17:46 -0400 Message-ID: <45FA98DD.3080205@cs.rutgers.edu> Date: Fri, 16 Mar 2007 09:17:17 -0400 From: Aniruddha Bohra User-Agent: Thunderbird 1.5.0.9 (X11/20070217) MIME-Version: 1.0 To: freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 16 Mar 2007 13:17:46.0383 (UTC) FILETIME=[7CD7E9F0:01C767CD] Subject: ether_input question 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, 16 Mar 2007 13:17:50 -0000 Hi, In two drivers, fxp and em, the assumptions about entering the ether_input routine are different. From em_rxeof: #ifdef DEVICE_POLLING EM_UNLOCK() (*ifp->if_input)() EM_UNLOCK() #else (*ifp->if_input)() #endif While in fxp: FXP_UNLOCK() (*ifp->if_input)() FXP_LOCK() My question is : Does ether_input() assume it is the only thread executing the code? If it is the case, what is the reason for dropping the lock in the DEVICE_POLLING case? Thanks Aniruddha