From owner-freebsd-stable@FreeBSD.ORG Fri Apr 23 15:54:32 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C3C7106566C for ; Fri, 23 Apr 2010 15:54:32 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from qmta02.emeryville.ca.mail.comcast.net (qmta02.emeryville.ca.mail.comcast.net [76.96.30.24]) by mx1.freebsd.org (Postfix) with ESMTP id 6F30B8FC14 for ; Fri, 23 Apr 2010 15:54:32 +0000 (UTC) Received: from omta03.emeryville.ca.mail.comcast.net ([76.96.30.27]) by qmta02.emeryville.ca.mail.comcast.net with comcast id 90aP1e0080b6N64A23uYcJ; Fri, 23 Apr 2010 15:54:32 +0000 Received: from koitsu.dyndns.org ([98.248.46.159]) by omta03.emeryville.ca.mail.comcast.net with comcast id 93uX1e00E3S48mS8P3uXKN; Fri, 23 Apr 2010 15:54:32 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id 021DE9B425; Fri, 23 Apr 2010 08:54:30 -0700 (PDT) Date: Fri, 23 Apr 2010 08:54:29 -0700 From: Jeremy Chadwick To: Guido Falsi Message-ID: <20100423155429.GA47524@icarus.home.lan> References: <20100422143542.GA2208@icarus.home.lan> <4BD0C9BA.2000405@icyb.net.ua> <20100423084606.GV2422@deviant.kiev.zoral.com.ua> <20100423085401.GA28720@icarus.home.lan> <20100423113319.GA4925@megatron.madpilot.net> <20100423122000.GA41857@icarus.home.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100423122000.GA41857@icarus.home.lan> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Kostik Belousov , freebsd-stable@freebsd.org, Andriy Gapon , jfvogel@gmail.com Subject: Re: RELENG_8 -- shutdown -p no longer powers off boxes X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Apr 2010 15:54:32 -0000 On Fri, Apr 23, 2010 at 05:20:00AM -0700, Jeremy Chadwick wrote: > I'll spend some time later today messing around with combinations of > ifconfig em0 -wol_ucast and -wol_mcast to see if I can narrow down the > condition. I'll report back with those findings. Here are those results. First, minor details of the setup: box1 = 192.168.1.51, Supermicro X7SBA, connected to switch via em0 box2 = 192.168.1.52, Supermicro X7SBL-LN2, connected to switch via em0 Netmask is 255.255.255.0; absolutely nothing fancy about the setup. My ifconfig "tests", which show some strange behaviour: box2# ifconfig em0 | head -2 em0: flags=8843 metric 0 mtu 1500 options=399b box2# ifconfig em0 -wol_ucast box2# ifconfig em0 | head -2 em0: flags=8843 metric 0 mtu 1500 options=399b box2# ifconfig em0 -wol_mcast box2# ifconfig em0 | head -2 em0: flags=8843 metric 0 mtu 1500 options=299b box2# ifconfig em0 wol box2# ifconfig em0 | head -2 em0: flags=8843 metric 0 mtu 1500 options=399b box2# ifconfig em0 -wol_magic em0: flags=8843 metric 0 mtu 1500 options=199b box2# ifconfig em0 -wol box2# ifconfig em0 | head -2 em0: flags=8843 metric 0 mtu 1500 options=99b box2# ifconfig em0 -wol_ucast box2# ifconfig em0 | head -2 em0: flags=8843 metric 0 mtu 1500 options=99b box2# ifconfig em0 wol_mcast -wol_ucast box2# ifconfig em0 | head -2 em0: flags=8843 metric 0 mtu 1500 options=199b box2# ifconfig em0 wol box2# ifconfig em0 -wol_mcast box2# ifconfig em0 | head -2 em0: flags=8843 metric 0 mtu 1500 options=299b At this point on box2, I executed the following: box2# shutdown -p now Then I did the following tests from box1. To rule out any chance of ARP expiring, I added a static ARP entry for box2's MAC --> 192.168.1.52. 1. ping 192.168.1.255 -- box2 did not power on 2. ping 192.168.1.52 -- box2 did not power on 3. ping 255.255.255.255 -- box2 did not power on 4. sent magic packet to 255.255.255.255 UDP port 40000 -- box2 did not power on 5. sent magic packet to 192.168.1.255 UDP port 40000 -- box2 powered on 6. sent magic packet to 192.168.1.52 UDP port 40000 -- box2 powered on Between test #5 and #6, I executed "ifconfig em0 -wol_mcast" on box2 prior to doing the shutdown. Based on all this, we can more or less reliably tell that: 1) ifconfig's behaviour is unintuitive in this case; this could be a driver (7.0.5) bug, or it could be some odd capabilities bug. I don't know. If this is intentional behaviour, it's unintuitive, and there's no mention of it (or WOL!) in the em(4) man page. Likewise, ifconfig(8)'s descriptions of what the WOL_xxx flags do is also a bit unintuitive. 2) When WOL_MCAST capability disabled on the interface, the system behaviour is identical to that of the older (pre-7.0.5) driver. 3) WOL_MCAST may be buggy in some way, or not implemented correctly inside of the em (7.0.5) driver. -- | Jeremy Chadwick jdc@parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |