When I first released dhcpcd-3, it had support for FreeBSD. This was done using a BPF device which has the benefit of getting the kernel to filter packets before they hit the program. This meant the dhcpcd only saw DHCP and ARP packets on BSD, whereas on Linux is saw all the packets coming in. Normally, this isn't an issue as the interface isn't configured at this point so traffic is minimal.
However, during a DHCP RENEW, there is quite a bit of traffic going around and it was all hitting dhcpcd. So I added some code to counter to ensure that we still work correctly during packet floods. However, dhcpcd does burn a lot of CPU during these times. I then saw a post to the busybox mailing list that had a BPF filter - but for Linux! First I knew about this, but apparently Linux has been able to use BPF for a long time. So dhcpcd now uses the same filter for Linux which means that dhcpcd won't chew CPU time even in packet floods. Or, at least, less CPU.
Get this new feature in dhcpcd-3.2.1 - today! :)
I'm not afraid to show off my bootcharts :)29 seconds is pretty fast I think, especially as it's my default configuration. The only "out of the box" tweak was to enable parallel startup. It also shows that it's the daemons like hal that are now taking up all the time which I can't really do that much about.See the shiny new OpenRC project page for the gritty.
For some reason is vt100 or console and vt220 for the others. This causes the home/end/pgup/pgdown keys not to work correctly.Setting a term of wsvt25 in /etc/ttys fixes this! Thankfully :)I have no idea why that isn't the default as it drove me potty :(
So, after finally going into a NetBSD irc channel with the express purpose of removing all compiler warnings from dhcpcd and making it add routes correctly on that platform, I got convinced into giving NetBSD a spin. So I wanged it on my amd64 and as promised, the default cd worked fine with my trusty RT2500 pci wireless card, and the installed default kernel did too. This was an improvement from NetBSD 3.x which I tried a long while ago as the installed kernel didn't work with my wireless much is a must have for me these days. To be fair, I started off on the bad foot with NetBSD back then as it was my first BSD experience and it wasn't good. Thankfully, my experience with FreeBSD means I now know a lot more, so with NetBSD-4.0 I was very quickly up and running.After getting the network fully working, I pull down the OpenRC repo and tried a compile. Surprise, surprise, loads of warnings and errors. Now, the gcc that NetBSD ships with has a lot of warnings you just don't see with the one in Gentoo, or FreeBSD. Luckily, most of the warnings were trivial to fix - and should help matters on archs where the default char is unsigned. The errors were purely on the getmntinfo function and structure being different in NetBSD. Then there is the matter of the init scripts - whilst most work, some won't or need a slight tweak. The important thing is though that OpenRC now boots NetBSD :)I'm also working on making the misc init scripts work by default through a make install on your arch as well, so moving an existing BSD rc.d system to OpenRC shouldn't be hard at all.But is NetBSD any better or worse than FreeBSD? Too early to say really }:)