WIP cpu/native: allow for multiple netdev2_tap devices#5614
WIP cpu/native: allow for multiple netdev2_tap devices#5614toonst wants to merge 4 commits intoRIOT-OS:masterfrom
Conversation
this makes it possible to pass some generic pointer that's given back as an argument when the callback is called.
With arg added to async_read callback in 7020b7c, we don't need to keep track of netdev2_tap locally. As a result we can use multiple netdev2_tap instances.
no specific cleanup functions for uart and netdev_tap are needed anymore, so reboot.c doesn't need a pointer to the netdev2_tap.
|
It definitely makes sense! I wanted to do this month ago, but never found the time. Please go ahead! |
|
I would like to encourage you to take a look at #5582 as it most likely has conflicts / opportunities for positive synergy effects ;-) |
|
@LudwigKnuepfer Good idea, seems really similar to the netdev2_tap implementation indeed. I'm wondering where this netdev2_tap should be defined. It should probably either be in the |
|
Fixes #2195 btw. |
|
Sorry, I don't have time to review this properly at the moment - removed my assignment. |
|
I get if I try to compile. Or is that what you mean by
|
|
Sorry for not getting back earlier on this. I'm currently travelling without developer pc and will be for the next 10 months, so I won't be able to finish this timely. @miri64 Yes, exactly. Before, |
I'm currently working on another networking device for native and came up with a solution I think, that would also make netdev2_tap more similar to the other devices: do not use the device itself in Given that you said you won't be able to work on this the next year (or less ;-)): do you mind if I take over this one? |
|
Hey @miri64, of course not, go ahead! Seems a clean solution to me. |
|
Adapted in #6311 |
While implementing some changes in #5613, I saw that the netdev2_tap driver could make use of this change to allow multiple tap devices.
TODO: find some way to have a pointer to the right netdev2_tap device in startup.c
I'm not sure if this makes sense to go through with this, so comments very welcome.