From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 11 00:53:37 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C46FF37B401 for ; Fri, 11 Apr 2003 00:53:37 -0700 (PDT) Received: from mailhub.fokus.fraunhofer.de (mailhub.fokus.fraunhofer.de [193.174.154.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 837E643F85 for ; Fri, 11 Apr 2003 00:53:36 -0700 (PDT) (envelope-from brandt@fokus.fraunhofer.de) Received: from beagle (beagle [193.175.132.100])h3B7rWE07842; Fri, 11 Apr 2003 09:53:33 +0200 (MEST) Date: Fri, 11 Apr 2003 09:53:32 +0200 (CEST) From: Harti Brandt To: Mike Silbersack In-Reply-To: <20030410164758.B695@odysseus.silby.com> Message-ID: <20030411094125.P774@beagle.fokus.fraunhofer.de> References: <20030409114957.GN83126@cicely9.cicely.de> <20030410181322.W774@beagle.fokus.fraunhofer.de> <20030410164758.B695@odysseus.silby.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: hackers@freebsd.org cc: John Polstra Subject: Re: realtime problem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: harti@freebsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Apr 2003 07:53:38 -0000 On Thu, 10 Apr 2003, Mike Silbersack wrote: MS>Yes, it should take the early return I added, which is what I think it did MS>for my 3Com cards, back when I tested it. You might want to add some MS>debug code and poke at it more, because the benefits were huge when I MS>tried it. Somehow the patch has botched the logic. After patching it looks like: mii->mii_media_status = IFM_AVALID; mii->mii_media_active = IFM_ETHER; bmsr = PHY_READ(phy, MII_BMSR); /* Link status is latched, so if we read a 1, nothing has changed. */ if ((bmsr & BMSR_LINK) && (bmsr & BMSR_ACOMP) && (mii->mii_media_status & IFM_ACTIVE)) return; So, of course, it never takes the early return. When I remove the first assignment it seems to work. In this case I get a mean time for xl_status_update of 205usec which is ok I suppose. To be correct shouldn't the if() test for (mii->mii_media_status & IFM_AVALID) && (mii->mii_media_status & IFM_ACTIVE)) harti -- harti brandt, http://www.fokus.fraunhofer.de/research/cc/cats/employees/hartmut.brandt/private brandt@fokus.fraunhofer.de, harti@freebsd.org