From owner-freebsd-stable@FreeBSD.ORG Fri May 31 05:47:22 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id AE4D9F1D; Fri, 31 May 2013 05:47:22 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-pd0-f170.google.com (mail-pd0-f170.google.com [209.85.192.170]) by mx1.freebsd.org (Postfix) with ESMTP id 85770243; Fri, 31 May 2013 05:47:22 +0000 (UTC) Received: by mail-pd0-f170.google.com with SMTP id x10so1626170pdj.15 for ; Thu, 30 May 2013 22:47:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=iwYVUiLEJ0SXsSM92c/G964+7MNw4TquCbetruuX/Zw=; b=dR5MpckIjs5IGG6htKLAW3j4M19ByT0vT/QnvkrFERjkVNaQooOjbxKu+bqu/2/hoX r3yOTGh1MLwEYHvW0Sl4xJWXYaXmTHjIzG3ZKQ/ilVbNWDcRO688TSj7DUWtjORYsYVG 2RvYXucrHk/5xuS84gB9MsVPbv2RfyyqNz1AzlSjV1FgTUH5ArI0aruGRATvWRuBkphL 2qf0XV971GGBTHEheaeQb5lLOrwZ9UZARDtXiY5BbMbWEGASvIwQL4rN0ssY54r6rfq5 vLn6CYoUWWXVjxMSa1mg5I97pSrK918b/kZ3m6ebi/Kr0W3ty6dJQJJuZOHd+wIjktSq ps7A== X-Received: by 10.68.32.161 with SMTP id k1mr11284892pbi.221.1369979241846; Thu, 30 May 2013 22:47:21 -0700 (PDT) Received: from pyunyh@gmail.com (lpe4.p59-icn.cdngp.net. [114.111.62.249]) by mx.google.com with ESMTPSA id pb5sm44722099pbc.29.2013.05.30.22.47.18 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 30 May 2013 22:47:20 -0700 (PDT) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Fri, 31 May 2013 14:47:13 +0900 From: YongHyeon PYUN Date: Fri, 31 May 2013 14:47:13 +0900 To: Daniel Braniss Subject: Re: SunFire X2200 ilo's bge1 DOWN/UP Message-ID: <20130531054713.GB1478@michelle.cdnetworks.com> References: <20130529085544.GC3042@michelle.cdnetworks.com> <201305300859.20928.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: freebsd-stable@freebsd.org, John Baldwin X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 May 2013 05:47:22 -0000 On Fri, May 31, 2013 at 08:24:47AM +0300, Daniel Braniss wrote: > > On Thursday, May 30, 2013 2:44:35 am Daniel Braniss wrote: > > > > --/04w6evG8XlLl3ft > > > > Content-Type: text/x-diff; charset=us-ascii > > > > Content-Disposition: attachment; filename="bge.media_sts.diff" > > > > > > > > Index: sys/dev/bge/if_bge.c > > > > =================================================================== > > > > --- sys/dev/bge/if_bge.c (revision 251021) > > > > +++ sys/dev/bge/if_bge.c (working copy) > > > > @@ -5583,6 +5583,10 @@ bge_ifmedia_sts(struct ifnet *ifp, struct ifmediar > > > > > > > > BGE_LOCK(sc); > > > > > > > > + if ((ifp->if_flags & IFF_UP) == 0) { > > > > + BGE_UNLOCK(sc); > > > > + return; > > > > + } > > > > if (sc->bge_flags & BGE_FLAG_TBI) { > > > > ifmr->ifm_status = IFM_AVALID; > > > > ifmr->ifm_active = IFM_ETHER; > > > > > > > > --/04w6evG8XlLl3ft-- > > > after 18hs, the logs are empty! > > > it seems the patch fixes the problem. > > > > > > now maybe it's time to hunt for who is randomly calling for bge_ifmedia_sts > > > ... > > > > It could be any number of daemons that query interface state such as an > > SNMP server, ladvd, etc. > > > > If you wanted help you could modify the patch so that it does something like > > this: > > > #include > > if (/* test for IFF_UP */) { > > BGE_UNLOCK(sc); > > if_printf(ifp, "state queried on down interface by pid %d (%s)", > ------------------------------------------------------------------------------| > add a \n > > curthread->td_proc->p_pid, curthread->td_proc->p_comm); > > return; > > } > > > > -- > > John Baldwin > snmpd call this several times a second, (difficult to measeure since sysolog > just says > last message repeated 22 times > in any case, the DOWN/UP appears once every few hours, oh well. > I have now stopped the snmpd daemon, maybe there is someone else ... I have no idea why snmpd wants to know media status for interfaces that are put into down state. The media status resolved after bringing up the interface may be different one that was seen before. The patch also makes dhclient think driver got a valid link regardless of link establishment. I guess that wouldn't be issue though. I'll commit the patch after some more testing. Thanks for reporting and testing! > > thanks, > danny > >