John,<br><br>I believe what is discussion here is the choice between waking on multicast (and then keep MDNS working) or don't wake on multicast (and then saving more power). Or if there is a way out of this compromise.<br>
<br>Are you cutting to the chase or just changing the movie? (Forgive me for the joke it is just to calm things down, as you suggested). Could you please point out what application or use case the issues you raised will disrupt or hurt? Are these issues related to the current discussion or do they deserve a new thread?<br>
<br><div class="gmail_quote">On Feb 20, 2008 7:42 AM, John Gilmore <<a href="mailto:gnu@toad.com">gnu@toad.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
OK, children of the world, please calm down.  There are a few too many<br>bugs and egos flaring up to come to a reasonable resolution.  This is<br>an interdisciplinary problem that crosses too many architectural<br>boundaries for any of us to be comfortable seeing the whole picture.<br>
<br>I filed a bug report about the network failing to wake us on multicast<br>four months ago (#4616).  A key response by dmwm2 a month ago provides<br>a path forward:  <a href="http://dev.laptop.org/ticket/4616#comment:20" target="_blank">http://dev.laptop.org/ticket/4616#comment:20</a> .<br>
<br>Let me cut to the chase.<br><br>Many things are likely to work, if update.1 turns on "wake on<br>multicast" using the command "ethtool -s eth0 wol um", AND THE MESH IS<br>NOT IN USE:<br><br>  *  The laptop will suspend much of the time.<br>
  *  If someone sends it a multicast, that it is listening for, it will<br>     wake up and respond to the traffic (possibly dropping one packet).<br>  *  Random multicast traffic that the laptop isn't listening for will<br>
     NOT wake it up.<br><br>I hope that the people responsible for Presence and Sharing can<br>test this, and make sure their protocols work with this "wol" setting.<br>I don't know that stuff at all.  I'm not even sure what protocols<br>
are running in my laptops.  They have no school server.<br><br>There are three bugs in update.1-691 around this:<br><br>  *  The packet that awakens us doesn't get responded to; it was probably<br>     dropped, rather than passed to the kernel.  Assuming the protocols<br>
     retry within 60 seconds, we'll see and respond to the second one.<br><br>  *  When the laptop is manually suspended (physically closed), it<br>     should not awaken for any reason except being reopened.  Instead,<br>
     it awakens for each received multicast packet that it is<br>     listening for, and then goes immediately back to sleep.  This is<br>     a power consumption bug.  I'd say ship the release and live with<br>     it.<br>
<br>  *  Receiving these multicasts while closed did also trigger<br>     the laptop to refuse to stay resumed when I reopened it.  I had<br>     to hit the power button to get it to stay on.  If cjb can<br>     reproduce this reliably, he can fix it.  It happened twice<br>
     for me.  Merely closing and opening didn't fail, but closing,<br>     sending a wakeup ping, then opening, did fail.<br><br>All of the above works WHEN USING AN ACCESS POINT.<br><br>There are several bugs in the mesh that prevent this from working<br>
over the mesh.  I recommend moving existing school deployments to<br>access points, until we get the bugs out of the mesh.<br><br>Details follow.<br><br>There appear to be more than one bug in the mesh around multicast.  No<br>
wonder people are confused.  Using the same setup as in #4616, but<br>*without* suspending, in update.1-691 I can't get multicast packets<br>through reliably.  Setup:<br><br>  * Two XO's, MP G1G1s.  One is using build 656, the other update.1-691.<br>
<br>  * In NetworkManager screen, put both on "Mesh Network 1".  Wait a<br>    few minutes for things to settle down.  Go to donut screen, make<br>    sure both of them say "Mesh Network 1, Connected to a Simple<br>
    Mesh".<br><br>  * Start a terminal on each laptop.  Become root.<br><br>  * "ping6 -I msh0 ff02::1" on each laptop.<br><br>  * This will ping the all-nodes multicast address.  The laptop that<br>    sends this should get back a unicast IPv6 ping response from each<br>
    node on the network.  Keep moving the mouse on the update.1-691<br>    laptop to avoid suspending.<br><br>  * On each laptop, it can see itself (btw, ping6 prints its own<br>    address on its first line of output).  It prints a very low<br>
    latency response (e.g. 0.154 ms) packet from its own kernel.  It<br>    seldom or never sees a ping response from the other laptop.<br><br>  * Bizarrely, every once in a while, the Build 656 laptop will see<br>    ping responses from the update.1-691 laptop.  For about 10 seconds.<br>
    Then they will go away again.  They say "(DUP!)" because it's the<br>    second response packet from a single outgoing ping packet.  Perhaps<br>    these happen after it suspends and I resume it with mouse motion.<br>
<br>If I stop the pings, go back into NetworkManager, and associate both<br>XO's with a local access point (TrendNET TEW432-BRP), and replace<br>"msh0" with "eth0", the test works.  The access point is doing NAT, so<br>
the only nodes on the network are wireless.  Oddly, for some reason,<br>each machine sees TWO packets come back from the other machine (sample<br>times: 5.51 ms and 6.37ms).  This is not a violation of the IP protocols --<br>
datagrams are free to get replicated -- but it looks like a bug in<br>either the Libertas or our kernel.  So I've found two bugs so far,<br>and it's only by running simple commands and knowing what to expect.<br><br>
Now back to what I really wanted to test:  whether the driver support<br>for wake-on-multicast works, and whether it only wakes up when the<br>multicast packets match the filter.  See the month-old comment in #4616,<br><a href="http://dev.laptop.org/ticket/4616#comment:20" target="_blank">http://dev.laptop.org/ticket/4616#comment:20</a> .  So, using the access<br>
point setup as above, I run:<br><br>  *  "ethtool -s eth0 wol um" on the update.1-691 laptop.<br><br>  *  I sit and wait for it to suspend.  Detected by power LED off and<br>     occasionally blinking.<br><br>  *  Now on the Build 656 machine, I run "ping6 -I eth0 ff02::2".  Note<br>
     the final "2", not a "1".  This pings the "all-routers" address<br>     on the link local network.  I'm expecting no answering packets,<br>     because there are no IPv6 routers on the local wireless LAN.<br>
     Indeed, not only do I get no answers, but the update.1-691 laptop<br>     remains blissfully suspended.<br><br>  *  I interrupt that and run "ping6 -I eth0 ff02::1", pinging the<br>     "all-nodes" link local address.  This immediately wakes the<br>
     update.1-691 laptop out of suspend, and I get pings back from<br>     both laptops.  The first packet is dropped by the suspended<br>     machine, but I get three response packets, from the second ping onward:<br>     one from the local machine, and two from the formerly suspended<br>
     laptop.<br><br>  *  OK, perhaps the Libertas is braindead enough to know the all-nodes<br>     address hard-wired, but this wouldn't work for a configured<br>     multicast address.  So I did "ip maddr" to see which addresses<br>
     the kernel has instructed each interface to listen on.  I waited<br>     for the update.1-691 laptop to suspend.  I pinged<br>     "ff02::1:ff10:a958", which is the address that the suspended<br>     laptop was listening on, PLUS ONE!  The laptop did not wake up.  I<br>
     then pinged the right address, "ff02::1:ff10:a957".  It awakened<br>     immediately, and responded to the second ping (not the first, as<br>     above).  Working! with a minor bug.<br><br>It sounds like there are several bugs in the mesh, mentioned above,<br>
that will prevent this from working over the mesh.  I'll file bug<br>reports for them.<br><br>Wad wailed:<br><div class="Ih2E3d">> The partitioning we made between the network processor and the<br>> main processor was pretty clean.  Unfortunately, it doesn't support<br>
> low power operation.   I suggest rethinking the partition for Gen2.<br><br></div>I'm happy to rethink this for Gen2.  But I'd like to see more detailed<br>support for "the partitioning doesn't support low power operation".<br>
Are you talking about the Libertas chip taking too much power by<br>itself, or about the host CPU having to wake too often?  I think it's<br>still too early to tell whether the partitioning is correct.  We've<br>barely shipped working code, we don't have a working software release<br>
process, and have had no time to optimize for either power or clean<br>lines.<br><font color="#888888"><br>        John<br></font></blockquote></div><br>