OpenBSD Journal

e2k19 Hackathon Report: Stefan Sperling on GoT and wireless

Contributed by Paul 'WEiRD' de Weerd on from the games of snowy trees dept.

Next up from the snowy Elk Lakes area with his Hackathon Report is Stefan Sperling (stsp@):

My hike to the Elk Lakes hut was more pleasent this time compared to last time (s2k17). Partly because the weather was better overall this time around. And I knew what to expect and had planned ahead better. I had left my thick and heavy jacket at home which had turned out to be a nuisance, being too warm and too heavy for hiking. I packed a light and thin rain jacket instead to protect against wind and rain, but we didn't get either so the jacket stayed in the bag. My backpack still felt a bit heavy on the hike in, but that was due to lunch snacks which were all eaten up by the time we hiked back out.

View from Elk Lakes

Once I had arrived at the hut I released Game of Trees 0.21. Most importantly this release contains the LRU delta cache for improved performance, which I worked on during the previous p2k19 hackathon.

I then finished my patch to convert the representation of tree entries in Game of Trees from a SIMPLEQ to an array. As explained in my p2k19 hackathon report, the goal was to reduce the number of free(3) calls in a code path that is traversed very often. We now allocate and free a tree together with all of its entries, rather than calling free(3) for each tree entry individually.

Ori Bernstein surprised me with a work-in-progress patch to add 'clone' support for Game of Trees. This code was ported from Ori's own Git implementation for plan9. By the end of the hackathon, Ori submitted a working patch to the Game of Trees mailing list. I plan to integrate the results of this work soon. The patch adds support for cloning over the Git protocol, including transport over SSH. Cloning over HTTP is not supported by this patch.

To support Ori's work I implemented missing bits in our gitconfig file parser to figure out the URLs of remote repositories as configured by Git. This should allow a future 'got fetch' command to operate on regular Git repositories out of the box. Game of Trees will eventually need a custom configuration file for similar purposes, hopefully with the familiar parse.y style syntax.

My plans for Game of Tree's networking support were still a bit fuzzy, and discussion with Ori cleared up a lot of my questions about the protocol. Our goal is now to stay compatible with regular Git servers and clients, and eventually develop needed Git protocol extensions for Game of Tree's server once this server gets implemented. See https://gameoftrees.org/notes-pull-push for details about those planned server-side features. Any such extensions will be implemented in a way that would allow regular Git clients to support them, too.

Klemens Nanni contributed some fixes to Game of Trees as well, and added a search feature for the 'got log' command. We also discovered a missing workflow step which the 'got rebase' command did not yet handle as intended and fixed this.

By the end of the hackathon the Game of Trees 0.22 release was published. I was glad to see growing support for this project among the developer base.

I also spent a huge chunk of time on wireless drivers.

Based on a report from Mike Larkin I fixed RSSI values reported by iwm(4) 9260/9560 devices.

I again reworked a patch for iwm(4) to add support for Rx DMA buffers containing multiple frames rather than just one frame. This change had already been committed twice over and backed out each time. This time around the known problem cases had finally been fully addressed, and I could commit the change and haven't yet heard any related problem reports.

While testing this patch, a divide by zero bug in tcpbench(1) was discovered and fixed by benno and myself.

The above change allows us to add support for monitor mode to iwm(4), which is a great wifi debugging aid because it allows the device to receive frames sent by any wifi network on a given channel. To use this, put the interface in monitor mode, set the desired channel to monitor, and then use tcpdump to record captured frames:

  ifconfig iwm0 mediaopt monitor
  ifconfig iwm0 chan 1
  ifconfig iwm0 up
  tcpdump -n -i iwm0 -y IEEE802_11_RADIO -s 4096 -w /tmp/iwm.pcap

The resulting pcap file can be read with tcpdump -r, or viewed in wireshark which will also compute useful statistics (select Wireless -> WLAN Traffic from the menu to see them). Monitor mode support still seems to have some bugs. At present switching back out of monitor mode doesn't always work right. This still needs to be investigated. But the feature is already quite useful. Claudio and I used monitor mode at the Calgary airport to discover that a single Windows box which was apparently downloading updates from Microsoft servers and used RTS protection for every frame it sent was responsible for ruining the wifi experience for everyone else (heavy use of RTS frames pretty much kills the performance of wireless networks).

I also started working on a new driver to support Intel's AX200 wireless devices. This driver is derived from iwm(4). Firmware loading and transmitting frames works differently in this device generation, so it makes sense to split this code off into a separate driver instead of complicating the iwm(4) driver even further.

Many thanks to everyone at the hut for being super chill and comfy throughout the entire week. To Bob and Howie for keeping the hut warm in spite of freezing temperatures outside (-27 deg C)! Also to Theo for being the best travel agent ever, and the OpenBSD Foundation for covering our overnight stay in Calgary. Also to xplorenet for transmitting our packets, and to the artist who wrote and performed the official xplorenet song (absolutely lovely!)

Many thanks to Stefan for his report and the work he's doing!

(Comments are closed)


Latest Articles

Credits

Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original deadly.org with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]