OpenBSD Journal

g2k14: Martin Pieuchot on routing and USB

Contributed by phessler on from the while my hardware gently weeps dept.

This time around, we get to hear a g2k14 developer report from the one and only Martin Pieuchot (mpi@)

Since I never managed to do what I had planned during a hackathon, I came to g2k14 with a small guitar and an easy plan: play music and drink wine. As expected I didn't respect my plan at all, instead of wine I had beer and instead of playing music I hacked the kernel 8)

I started by fixing one of the two issues from our USB stack that prevent us from enabling xhci(4) in GENERIC (bug apart). This was mostly a plumbing task in order to handle the way xHCI assign device addresses.

Then I looked at the radix tree corruption reported by guenther@ that was caused by the addition of a local route for every configured IPv4 address. It turns out that there is a problem with nodes with a destination of, used by the default routes. claudio@ is still hunting in this area, and for the moment I committed a version of the diff ignoring such addresses.

In the meantime I did more plumbing and replaced the last offending shutdown hook, used by softraid(4), by a function called before tearing down the devices. This was a bit more complicated than expected because softraid has its own subtree of devices that do not see the DVACT_POWERDOWN event sent by mainbus at shutdown.

As a result of this work I could unify a bit more of the shutdown sequence with the hibernate one and fix a uhci(4) panic by preventing the thread doing the shutdown to sleep.

The next issues on my list were two HC transfer descriptors allocation problems reported by various users. With the help of kettenis@ I addressed the first one by making sure bus_dmamem_map(9) honors the BUS_DMA_NOWAIT flag, then the second one was fixed by performing a famous spl dance.

I also did some more plumbing in the autoconf(9) framework in order to kill the DVACT_DEACTIVATE event. Then I removed some old network types from our kernel.

Finally I spent my last days trying to find the simplest way to change some tty(4) line disciplines to not be re-entrant in order to make the com(4) interrupt handler MP safe. After various attempts, I found something :)

When I was not strictly hacking I had a lot of interesting chats with various other developers. Among these, I was really happy to discuss with yuo@, pirofti@ and stsp@ about USB because that's an area were I mostly work alone. But the most important discussion of this hackathon was the brain storming we had with claudio@, bluhm@, henning@ and others about the network stack: don't worry, we have a plan.

Thanks a lot to Mitja for this great hackathon!

(Comments are closed)

  1. By Antoine Jacoutot (ajacoutot) on

    > I came to g2k14 with a small guitar

    Common Marilyn, it was a ukulele! ;-)

    1. By Marc Espie (espie) on

      > > I came to g2k14 with a small guitar
      > Common Marilyn, it was a ukulele! ;-)

      It's a Guitarlele made by yamaha, Mr. Cousteau.

  2. By Anonymous Coward ( on

    What is the other bug preventing XHCI from being enabled?


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 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.]