From owner-svn-src-head@freebsd.org Wed Dec 16 17:43:09 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06D0AA48B72; Wed, 16 Dec 2015 17:43:09 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x232.google.com (mail-ig0-x232.google.com [IPv6:2607:f8b0:4001:c05::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D42121BAE; Wed, 16 Dec 2015 17:43:08 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-ig0-x232.google.com with SMTP id mv3so143414049igc.0; Wed, 16 Dec 2015 09:43:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=9Bc5OS24IwyO7wF5NI6y/DoNGHL3nOZqHkjfU5sNECQ=; b=DSrTWiA2Qi2+F/Ed5yMOqLYnahu42iGPzVF83cSohKJU41a0yhO+p5Bx7KoVHqJOLl 714QL+ooC3HgSh32hh+5EBlkogGqYWNH0vTQbm71Co1xSbIHLwWwVtJ1058OzjENznQI tdbFnj6N8n6zgwYzzPF+KpleH9t4B3p4rJiVQhlfxiF2/BvdK9Qh5V1jE9Dz6fVoRxsa ytoiCk5K8EjooSZfLJjb+TMK5Fcbp1yPDsJvBH1Z8uJOR2HtiRXLExGAgr5t3B8WBi8r dMeYyAuKLOx+TFoxcyhNX/lh+4hjPYBW1Oq1CP1XD/ZTFIs/C7AsADZkSn3sJ713dO5j arDQ== MIME-Version: 1.0 X-Received: by 10.107.10.199 with SMTP id 68mr41097738iok.75.1450287787165; Wed, 16 Dec 2015 09:43:07 -0800 (PST) Received: by 10.36.121.202 with HTTP; Wed, 16 Dec 2015 09:43:06 -0800 (PST) In-Reply-To: <56715486.1000901@freebsd.org> References: <201512151602.tBFG2BTX089543@repo.freebsd.org> <8CEE530E-C08D-4BD1-B908-8EBBCEEAD1CD@FreeBSD.org> <1016D8B2-F850-44B9-B773-632BD9ABC95D@FreeBSD.org> <56715486.1000901@freebsd.org> Date: Wed, 16 Dec 2015 09:43:06 -0800 Message-ID: Subject: Re: svn commit: r292275 - in head/sys: net netinet netinet6 From: Adrian Chadd To: Steven Hartland Cc: Kristof Provost , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Dec 2015 17:43:09 -0000 hi, yeah, switchports at the moment are pure L2 interfaces, they don't have addressing. This may eventually change if etherswitch grows slave switch port support. But I didn't think it was creating ifnet interfaces, only miibusses and mii's for link status. -a On 16 December 2015 at 04:09, Steven Hartland wrot= e: > On 15/12/2015 22:58, Kristof Provost wrote: >>> >>> On 15 Dec 2015, at 23:15, Kristof Provost wrote: >>> Based on the arp_announce() in the backtrace this commit looks like a >>> possible cause. >> >> I see this in arp_announce(): >> KP: arp_announce() ifp->if_addr =3D 0 >> >> So that explains why we panic in 'lladdr =3D IF_LLADDR(ifp);=E2=80=99. >> >> I=E2=80=99ve done a very quick hack: >> diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c >> index 2214542..9b25356 100644 >> --- a/sys/netinet/if_ether.c >> +++ b/sys/netinet/if_ether.c >> @@ -1246,9 +1246,15 @@ arp_announce(struct ifnet *ifp) >> } >> IF_ADDR_RUNLOCK(ifp); >> >> - lladdr =3D IF_LLADDR(ifp); >> - for (i =3D 0; i < cnt; i++) { >> - arp_announce_addr(ifp, head + i, lladdr); >> + printf("KP: %s() ifp =3D %p\n", __FUNCTION__, ifp); >> + printf("KP: %s() ifp->if_addr =3D %p\n", __FUNCTION__, >> ifp->if_addr); >> + >> + if (ifp->if_addr) { >> + printf("KP: %s() ifp->if_addr->ifa_addr =3D %p\n", >> __FUNCTION__, ifp->if_addr->ifa_addr); >> + lladdr =3D IF_LLADDR(ifp); >> + for (i =3D 0; i < cnt; i++) { >> + arp_announce_addr(ifp, head + i, lladdr); >> + } >> } >> free(head, M_TEMP); >> } >> >> With this patch the device boots. I haven=E2=80=99t been able to verify = if >> everything works because of a different issue ("Shared object >> "lib80211.so.1" not found, required by =E2=80=9Cifconfig=E2=80=9D=E2=80= =9D, no doubt just a small >> problem with the freebsd-wifi-build scripts). >> >> Regards, >> Kristof > > Thanks for all the info Kristof appreciated. > > It seems really odd that you're getting a link up event for an interface > that doesn't have a LLA, so I'm wondering if this is the result of an iss= ue > elsewhere which this change brings to light, its as though if_attach hasn= 't > been called. > > Looking at your trace the device seems to be an arswitch. If it never > allocates a LLA to each port then maybe the more correct fix would be to > ensure it IFF_NOARP in if_flags? > > I've attached a patch which should fix if you could test that would be > great, but I'd still like to understand if there is something wrong > elsewhere before I do. > > Regards > Steve > >