-
8000
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
gnrc_static: add static network configuration #18477
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_static: add static network configuration #18477
Conversation
9cf2cec
to
9818b2f
Compare
9818b2f
to
4abf093
Compare
sys/net/gnrc/network_layer/ipv6/static_addr/gnrc_ipv6_static_addr.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.
There is still a Makefile for the module missing:
$ QUIETER=1 PREFIX_CONF=static make -C examples/gnrc_border_router flash -j --no-print-directory
/home/mlenders/Repositories/RIOT-OS/RIOT/makefiles/kconfig.mk:118: Warning! SHOULD_RUN_KCONFIG is not set but a previous configuration file was detected (did you run `make menuconfig`?). Kconfig will run regardless.
/home/mlenders/Repositories/RIOT-OS/RIOT/makefiles/kconfig.mk:118: Warning! SHOULD_RUN_KCONFIG is not set but a previous configuration file was detected (did you run `make menuconfig`?). Kconfig will run regardless.
Building application "gnrc_border_router" for "native" with MCU "native".
make[4]: *** No targets specified and no makefile found. Stop.
make[3]: *** [/home/mlenders/Repositories/RIOT-OS/RIOT/Makefile.base:31: ALL--/home/mlenders/Repositories/RIOT-OS/RIOT/sys/net/gnrc/network_layer/ipv6/static_addr] Error 2
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [/home/mlenders/Repositories/RIOT-OS/RIOT/Makefile.base:31: ALL--/home/mlenders/Repositories/RIOT-OS/RIOT/sys/net/gnrc] Error 2
make[1]: *** [/home/mlenders/Repositories/RIOT-OS/RIOT/Makefile.base:31: ALL--/home/mlenders/Repositories/RIOT-OS/RIOT/sys] Error 2
make: *** [/home/mlenders/Repositories/RIOT-OS/RIOT/examples/gnrc_border_router/../../Makefile.include:738: application_gnrc_border_router.module] Error 2
You need to include the module, for them to be visible, but for that you need to define the rules to build the module first ;-). |
I think KConfig can't be tested because there is nothing that selects the |
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.
Argghs sorry, I provided the solution to your problem days ago, but did not submit my review. There are two Kconfig paths at the moment: You tried the dependency resolution via Kconfig, which, yes, as you rightly pointed out, does not work with GNRC yet. But if you run with TEST_KCONFIG=0 (which is what you get when you just type make menuconfig
on an app and the current default), you will only run the configuration via Kconfig, no dependency resolution. Then it works.
May I squash? |
d4709b3
to
34e9d66
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.
Some questions about the chosen defaults.
|
||
config GNRC_IPV6_STATIC_PREFIX | ||
string "Static IPv6 prefix for the downstream network" | ||
default "2001:db8:8000::/48" |
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.
2001:db8::100
is not part of 2001:db8:8000::/48
is this intentional?
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.
Yes, the upstream network and the downstream network are two separate networks.
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.
Arghs sorry, missed the upstream
part.
|
||
config GNRC_IPV6_STATIC_DEFAULT_ROUTER | ||
string "Static IPv6 address of the default router" | ||
default "2001:db8::1" |
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 this actually work? Normally, the default router is a link-local address.
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.
Yes, for the setup at FrOSCon we had IPV6_GATEWAY=2001:638:408:2019::1
and it worked.
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.
bors merge
Bors will already do a full build, but it might now fail the merge as Murdock status is now missing. |
18477: gnrc_static: add static network configuration r=miri64 a=benpicco 19155: Revert "sys/pm_layered: pm_(un)block add attribute optimize(3)" r=benpicco a=Teufelchen1 Revert "sys/pm_layered: pm_(un)block add attribute optimize(3) -shortens hotpath" This reverts commit 5447203. ### Contribution description Compiling `examples/gnrc_networking_mac` using `TOOLCHAIN=llvm` yields the following error: ``` RIOT/sys/pm_layered/pm.c:77:16: error: unknown attribute 'optimize' ignored [-Werror,-Wunknown-attributes] __attribute__((optimize(3))) ``` As indicated, this is because the attribute `optimize` is GCC only and not present in LLVM. Compare the manpages of [GCC](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html) and [LLVM](https://clang.llvm.org/docs/AttributeReference.html). ### Testing procedure Since this should only affect performance and not behavior, no special testing is needed. I am not aware of any tests in RIOT which could verify that assumption. ### Issues/PRs references Introduced in #18846 There is another instance of this attribute being used in[ shell_lock.c](https://github.com/RIOT-OS/RIOT/blob/6fb340d654ac8da07759cb9199c6aaa478589aa7/sys/shell_lock/shell_lock.c#L80). Since the usage is security related, I omit it from this PR. Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com> Co-authored-by: Teufelchen1 <bennet.blischke@haw-hamburg.de>
This PR was included in a batch that was canceled, it will be automatically retried |
18477: gnrc_static: add static network configuration r=miri64 a=benpicco 19155: Revert "sys/pm_layered: pm_(un)block add attribute optimize(3)" r=maribu a=Teufelchen1 Revert "sys/pm_layered: pm_(un)block add attribute optimize(3) -shortens hotpath" This reverts commit 5447203. ### Contribution description Compiling `examples/gnrc_networking_mac` using `TOOLCHAIN=llvm` yields the following error: ``` RIOT/sys/pm_layered/pm.c:77:16: error: unknown attribute 'optimize' ignored [-Werror,-Wunknown-attributes] __attribute__((optimize(3))) ``` As indicated, this is because the attribute `optimize` is GCC only and not present in LLVM. Compare the manpages of [GCC](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html) and [LLVM](https://clang.llvm.org/docs/AttributeReference.html). ### Testing procedure Since this should only affect performance and not behavior, no special testing is needed. I am not aware of any tests in RIOT which could verify that assumption. ### Issues/PRs references Introduced in #18846 There is another instance of this attribute being used in[ shell_lock.c](https://github.com/RIOT-OS/RIOT/blob/6fb340d654ac8da07759cb9199c6aaa478589aa7/sys/shell_lock/shell_lock.c#L80). Since the usage is security related, I omit it from this PR. Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com> Co-authored-by: Teufelchen1 <bennet.blischke@haw-hamburg.de>
This PR was included in a batch that was canceled, it will be automatically retried |
bors merge |
Already running a review |
Since the build was already pretty stale, I wanted to trigger another quick build just to make sure the merge train won't fail. |
But the merge train would have run before the quick build. |
Not from how the Murdock queue looked like... |
Build succeeded: |
Contribution description
At FrOSCon we
will beare provided with a static address and prefix, there is no auto-configuration.This adds a
gnrc_static
module that allows to run a border router with compile-time constant config.Testing procedure
At FrOSCon, run the GNRC border router example with
edit the border router is working fine with this setting at FrOSCon, there is also a CoAP server running on it that is available on the Internet.
Issues/PRs references