New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gnrc/ipv6_auto_subnets: relax topology requirements #16750
Conversation
ae2c4a3
to
034f06c
Compare
034f06c
to
fd31e91
Compare
c18ecd3
to
d672e8d
Compare
sys/net/gnrc/routing/ipv6_auto_subnets/gnrc_ipv6_auto_subnets.c
Outdated
Show resolved
Hide resolved
participant "2e:a3:9e:a9:68:**23**" as A | ||
participant "2e:a3:9e:a9:68:**f6**" as B | ||
participant "2e:a3:9e:a9:68:**42**" as C |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the least significant byte of the address being bold have any meaning? If so, this meaning should be apparent within the graphic somehow (a graphic should be able to stand on its own). Otherwise, it should be removed, as I think it confuses more than it helps understanding the algorithm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought it's a nice visual aid to see what is the difference between the l2 addresses.
I turned it down to italics
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem to me was more that they are highlighted in general. Now that I know what this is about, my perspective shifted, so I'm not sure if making them italic makes any difference. I think that L2 addresses are different can be assumed for a working network, so highlighting the difference seems somewhat redundant to me, however, still. Do they have to be literal addresses? Can't they just be Node A, B, C?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea was to visualize that the order in which the prefixes are chosen / where each router starts counting it's prefixes depends on the order of the l2 addresses.
I hoped changing only the last byte and highlighting that would make it easier to understand the concept.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea was to visualize that the order in which the prefixes are chosen / where each router starts counting it's prefixes depends on the order of the l2 addresses.
I hoped changing only the last byte and highlighting that would make it easier to understand the concept.
Mh, I think by abstracting this more to numeric or alphanumeric abstract L2 addresses would help to highlight this concept more. How about something like "L2 addr. 1", "L2 addr. 2", ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the order of their significance now would also be reflected in the order they are shown (so C in the second column, B in the third), I'd be happy :-).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(of course feel free to adjust the labels then as well).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the order of their significance now would also be reflected in the order they are shown
I thought mixing them up made it clearer that it's not the order of appearance that matters but the order of addresses - but alright, I can shuffle them around.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the order of their significance now would also be reflected in the order they are shown
I thought mixing them up made it clearer that it's not the order of appearance that matters but the order of addresses - but alright, I can shuffle them around.
No, mixing things up to make them clearer, rarely works ;-)
@miri64 do you think we can still get this into the release? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@miri64 do you think we can still get this into the release?
Ok, let's try this.
Some function names are IMHO confusing. Yes you documented the functions, but if you just scroll through the code, see a function _insert
or _compare_addr
it is not immediately clear what is happening.
sys/net/gnrc/routing/ipv6_auto_subnets/gnrc_ipv6_auto_subnets.c
Outdated
Show resolved
Hide resolved
sys/net/gnrc/routing/ipv6_auto_subnets/gnrc_ipv6_auto_subnets.c
Outdated
Show resolved
Hide resolved
sys/net/gnrc/routing/ipv6_auto_subnets/gnrc_ipv6_auto_subnets.c
Outdated
Show resolved
Hide resolved
sys/net/gnrc/routing/ipv6_auto_subnets/gnrc_ipv6_auto_subnets.c
Outdated
Show resolved
Hide resolved
016a6a2
to
7f31e9c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another round of more in-depth review.
sys/net/gnrc/routing/ipv6_auto_subnets/gnrc_ipv6_auto_subnets.c
Outdated
Show resolved
Hide resolved
sys/net/gnrc/routing/ipv6_auto_subnets/gnrc_ipv6_auto_subnets.c
Outdated
Show resolved
Hide resolved
sys/net/gnrc/routing/ipv6_auto_subnets/gnrc_ipv6_auto_subnets.c
Outdated
Show resolved
Hide resolved
sys/net/gnrc/routing/ipv6_auto_subnets/gnrc_ipv6_auto_subnets.c
Outdated
Show resolved
Hide resolved
sys/net/gnrc/routing/ipv6_auto_subnets/gnrc_ipv6_auto_subnets.c
Outdated
Show resolved
Hide resolved
sys/net/gnrc/routing/ipv6_auto_subnets/gnrc_ipv6_auto_subnets.c
Outdated
Show resolved
Hide resolved
sys/net/gnrc/routing/ipv6_auto_subnets/gnrc_ipv6_auto_subnets.c
Outdated
Show resolved
Hide resolved
sys/net/gnrc/routing/ipv6_auto_subnets/gnrc_ipv6_auto_subnets.c
Outdated
Show resolved
Hide resolved
178fd6e
to
43fc9c6
Compare
sys/net/gnrc/routing/ipv6_auto_subnets/gnrc_ipv6_auto_subnets.c
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with the code now and I trust your testing. Feel free to squash.
sys/net/gnrc/routing/ipv6_auto_subnets/gnrc_ipv6_auto_subnets.c
Outdated
Show resolved
Hide resolved
96dfe9c
to
c1a50b0
Compare
Thank you for the review! |
Contribution description
#16536 provides a solution for networks that follow a 'skinny tree' topology, that is on each level only a single node can have children.
On such a simple topology we can automatically create subnets without coordination between routers given a sufficiently large prefix.
As it turns out we also have to deal with network topologies where this assumption does not hold and there are multiple routing nodes on a level.
Now coordination between the routers is required: Each router must announce how many subnets it wants to create to determine the total number of subnets and thereby the required prefix length to make for unique subnets.
As I could not find any standard mechanism for this functionality, I turned to simply broadcasting a UDP packet with this information. (which makes this a RIOT specific functionality which only works in homogeneous networks. I therefore kept the protocol as simple as possible and only transfer a single byte of payload).
Testing procedure
Create the topology as usual with the
setup_taps.sh
script inexamples/gnrc_networking-subnets
.This time however we will connect two routing nodes on the same network level:
All nodes should have a global address and be able to route to each other.
Issues/PRs references
extends #16536
depends on and includes #16729, #16734