On 02/12/14 04:28, Ryota Ozaki wrote:
On Tue, Dec 2, 2014 at 12:39 PM, Antti Kantee <pooka%iki.fi@localhost> wrote:On 02/12/14 03:30, Ryota Ozaki wrote:The problem is that the real if_drain_all() will never be called in environments with the weak alias problem even if the non-stub implementation is present and it should be called.I'm getting the problem, but I have still one question; why ifnet_list works while if_drain_all doesn't?If you are asking about the linker, ifnet_list is a common symbol, not a weak alias. If you are asking about traversing ifnet_list, semi-accidentally -- the tailq macros happen to work for zero-filled heads unless you try to tailq_insert_tail.I meant the former. Anyway I got it. rumpnet doesn't add any items to ifnet_list, so it works without rumpnet_net.
Right, because interfaces don't exist in net, only in net_net (it makes sense if you think about sys vs. sys/net).
Actually, looking more closely, it is currently a problem for _all_ platforms since you stubbed it to a panic instead of a nop.Oh, right. I just followed bridge ones...If you look at the history of that file, you will notice that I have been removing __weak_alias() instances. bridge/agr not working on platforms without weak alias support is acceptable (because it never has worked). I hope bridge/agr can be fixed some day, but perhaps they will fix themselves with a more modular networking stack ;)We can get rid of __weak_alias(bridge_input) already :) The other two are...I don't know when it's done :-/
Oh, nice! Can you remove the now-unnecessary weak aliases?