Conversation
sys/include/net/ng_netreg.h
Outdated
There was a problem hiding this comment.
we put this in netapi and netdev to uint16_t...
There was a problem hiding this comment.
Question is: is this enough?
|
I am not quite convinced of this implementation, I think the lookup is still too expensive! (Compare to #2310) |
|
What*s the relation to #2310? |
|
@haukepetersen I was thinking about doing a lookup on a two-dimensional array (1 axis: type, other axis |
|
@haukepetersen I just looked at your implementation again: How does your implementation caters to demultiplexing contexts? |
|
Utilizes utlist instead of clist now |
it doesn't. The context stuff was introduced after I did the PR... |
It was not (it was already in the introductory PR of netapi), but this is not the point: With the demultiplexing context we either have to decide for a slower, but more memory efficient list implementation or a more memory-wasting, but faster, hash table implementation. A simple array-lookup is just not possible. |
|
A tree-based data structure would also be possible, but would need at least one extra pointer + the ROM size would be increasing since it would have a more complex code. |
9c216e1 to
9602e72
Compare
|
Changed semantic, added tests and fixes following from them |
|
Concerning the underlying data-structure: I think we could just provide more then one implementation in the future, one optimized for run-time and one for memory... Otherwise this PR looks good to me: ACK |
e3c092a to
3e3885c
Compare
There was a problem hiding this comment.
If I understood it correctly, the demultiplexing context here works similar to the one from the netapi– why does the demultiplexing context in netapi gets its own typedef'ed type (netapi_reg_demux_ctx_t) and here it's a uint16_t?
There was a problem hiding this comment.
This type does not exist in the most current version of netapi, since we moved all of the registration to this module. netapi_reg_demux_ctx_t is quite a mouthful compared to a simple uint16_t, so I left it out ;)
|
(I've had a bit of a hard time understanding |
|
Addressed comments and moved from (only available during testing) reset- to init-based setting of the values, just in case someone decides KERNEL_PID_UNDEF can't be 0 anymore ;-) |
|
👍 I'll run the tests on a SAMR21 after lunch and if that goes through and Travis is happy, I'd ACK, too. |
|
please squash. |
|
I'll wait till #2440 is merged. |
|
sorry, overlooked that dependency... |
|
now now now :-) |
599e61f to
cd711ea
Compare
|
Rebased and squashed. @Lotterleben asked if she can merge ;-) |
|
let's just give Travis another chance to complain... @Lotterleben merge at will when Travis is happy! |
|
Travis is happy, the tests on the SAMR21are happy... Imma merge this now ✨ |
|
yeah! |
Depends on
#2397(merged)#2440(merged). Tests will follow when review is somewhat positive ;-)