RIOT icon indicating copy to clipboard operation
RIOT copied to clipboard

gnrc/ipv6/nib: make ABR run-time configurable

Open benpicco opened this issue 1 year ago • 10 comments

Contribution description

Currently all nodes compiled with gnrc_sixlowpan_border_router_default will act as an authoritative border router by default.

We have a setup with many wireless nodes that are all potential (authoritative) border routers (see #21080), but only one of them will be selected (at run-time) to do so.

This adds a NETOPT_6LO_ABR that can be used to enable / disable the authoritative border router functionality on an interface as well as a CONFIG_GNRC_IPV6_NIB_ABR to control the start-up default.

Testing procedure

Issues/PRs references

benpicco avatar Dec 13 '24 14:12 benpicco

(also please don't hesitate to remind me each time there is a Hack'n'ACK around the corner ;-))

miri64 avatar Dec 13 '24 20:12 miri64

So, the default behavior stays the same for a 6lbr but we can configure it to be non-authorative with this patch, right?

OlegHahm avatar Dec 21 '24 00:12 OlegHahm

Yes that's the idea.

benpicco avatar Dec 21 '24 10:12 benpicco

Ok, testing was successful. Do you mind to add some documentation somewhere?

OlegHahm avatar Jan 02 '25 09:01 OlegHahm

I want to have a deeper look into this as the designated GNRC / NIB expert but that may take a while. For now soft-blocking. If I don't come to it until end of February, please dismiss my change request.

Now it's a hard block until https://github.com/RIOT-OS/RIOT/pull/21081#pullrequestreview-2543777622 is resolved ;-)

miri64 avatar Jan 28 '25 16:01 miri64

So just move _start_search_rtr()/_stop_search_rtr() to a public header?

benpicco avatar Jan 28 '25 16:01 benpicco

So just move _start_search_rtr()/_stop_search_rtr() to a public header?

I'd move the definition to them to a public header, but keep the declaration in nib.c, but yes.

miri64 avatar Jan 28 '25 16:01 miri64

Could you apply the following to fix the unit tests?

diff --git a/sys/net/crosslayer/netopt/netopt.c b/sys/net/crosslayer/netopt/netopt.c
index bfadebe8b6..a8cae13ff7 100644
--- a/sys/net/crosslayer/netopt/netopt.c
+++ b/sys/net/crosslayer/netopt/netopt.c
@@ -91,6 +91,7 @@ static const char *_netopt_strmap[] = {
     [NETOPT_TX_RETRIES_NEEDED]     = "NETOPT_TX_RETRIES_NEEDED",
     [NETOPT_6LO]                   = "NETOPT_6LO",
     [NETOPT_6LO_IPHC]              = "NETOPT_6LO_IPHC",
+    [NETOPT_6LO_ABR]               = "NETOPT_6LO_ABR",
     [NETOPT_BLE_CTX]               = "NETOPT_BLE_CTX",
     [NETOPT_CHECKSUM]              = "NETOPT_CHECKSUM",
     [NETOPT_PHY_BUSY]              = "NETOPT_PHY_BUSY",

maribu avatar Apr 24 '25 18:04 maribu

@miri64 your comments have been addressed.

benpicco avatar May 06 '25 11:05 benpicco

Murdock results

:heavy_check_mark: PASSED

e58d3f709caf5be2dbd765df421c6d624d56c170 gnrc_ipv6_nib: add gnrc_ipv6_nib_{start,stop}_search_rtr()

Success Failures Total Runtime
10916 0 10916 13m:50s

Artifacts

riot-ci avatar May 06 '25 11:05 riot-ci