Contributed by tbert on from the first rule of bridge(4) club dept.
...you do not talk about bridge(4)!Martin Pieuchot (mpi@) writes in to tell us about his adventures in the network stack at the ever popular l2k15 hackathon.
I must say that I was a bit afraid before coming to Varaždin. I was afraid that I'd have to discuss a lot about "how" to turn the network stack MP or what needs to change instead of hacking it. But this didn't happen and I had a very productive week. This has been a really important hackathon for me because it was the first time I could sit in a room with all the developers working on MP-safeness in the network stack. Since l2k15 has been planned as a LibreSSL hackathon, we left the good guys upstairs and went to the basement to continue rewriting the network stack.
So, I shared a table with Stefan (stsp@), Sasha (sashan@), Mike (mikeb@), Claudio (claudio@) and David (dlg@). I spent almost all my time working on reference counting issues in order to guarantee that the objects a CPU is manipulating won't be freed by another CPU. The work we did was not really hard but the engineering effort needed to put it in without introducing too many bugs was not trivial. And so far I'm happily surprised by the result. I took part in the interface counting madness, spreading if_put() all over the stack and obviously continued my ongoing work on the route entries introducing rtref(9) and spreading some more rtfree(9). One of the visible changes I did during this hackathon has been to give back local route entries (RTF_LOCAL) to their interface. Previously local route entries were attached to lo0:mpi@goiaba $ netstat -rnf inet|egrep "(Dest|UHLl)" Destination Gateway Flags Refs Use Mtu Prio Iface 192.168.0.42 f2:ce:a1:8d:18:69 UHLl 0 0 - 1 lo0This has been like that since the early 90s and this hack generated a lot of extra code checks. Now local routes entries (l) are attached to the interface where the address is configured:
mpi@goiaba $ netstat -rnf inet|egrep "(Dest|UHLl)" Destination Gateway Flags Refs Use Mtu Prio Iface 192.168.0.42 f2:ce:a1:8d:18:69 UHLl 0 0 - 1 em1As a result of this hackathon we now have all the pieces to guarantee that an interface will remain alive while a CPU is processing one of its packets. This also includes pseudo-interfaces. Not all the bits have been committed and you're more than welcome to test. I'll try to discuss some of the technical issues we are facing and which solution we picked in a later post but for the moment the routing table needs some love! Thanks a lot to Tonimir, his friends Igor & Igor, Theo and to the OpenBSD Foundation for organizing such a great hackathon.
(Comments are closed)
By dark (178.9.226.75) on