Skip to content
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_networking: run as host per default #21119

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

OlegHahm
Copy link
Member

@OlegHahm OlegHahm commented Jan 2, 2025

Contribution description

The assumption: typically a user wants to deploy the gnrc_networking applications on terminal nodes.

Configuring the node as a router makes the application more complex and requires more memory. Problems may arise, for instance, because the node will start to send out RAs. For RPL we have separate example applications.

Hence, this PR changes the IPv6 role of the gnrc_networking application from a router to a host and disables RPL.

As a bonus this saves about 16k ROM and 2k RAM - which may be used to enable DNS resolution instead.

Testing procedure

Run gnrc_networking on native or real hardware like you have always done and check if everything works as usual.

@github-actions github-actions bot added the Area: examples Area: Example Applications label Jan 2, 2025
@benpicco benpicco requested a review from miri64 January 2, 2025 13:56
Comment on lines -19 to -20
USEMODULE += gnrc_rpl
USEMODULE += auto_init_gnrc_rpl
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It still might be worth to have hosts in there as RPL leafs.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have any particular use case in mind?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well if you have a gnrc_networking router you might want it to also see the hosts (so they need to be a RPL leaf, i.e, keep the gnrc_rpl modules in regardless ;-))

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also: IIRC this is currently our only real RPL example, so why remove it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, locally I have examples/gnrc_networking_rpl but that's not upstream (anymore?).

Anyhow, I made it optional now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was never upstream, it was part of #14623

But yea a dedicated RPL example would be better IMHO

Comment on lines 16 to 24
# Specify the mandatory networking module for a IPv6 routing node
USEMODULE += gnrc_ipv6_router_default
# Add a routing protocol
USEMODULE += gnrc_rpl
USEMODULE += auto_init_gnrc_rpl
# Specify the mandatory networking module for a IPv6 host node
USEMODULE += gnrc_ipv6_default
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove the router “feature” altogether? I would prefer a

ROUTER ?= 0

switch

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds like a good idea. 👍

Introduce a Makefile variable for enabling RPL and/or routing
functionality.
@OlegHahm OlegHahm force-pushed the pr/gnrc_networking_host_only branch from af004ee to fb2c5c3 Compare January 3, 2025 11:08

# Optionally include the RPL routing protocol (particular useful if not all
# nodes are within radio transmission range to the border router)
USE_RPL ?= 0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
USE_RPL ?= 0
USE_RPL ?= 1

I see no reason (except that the border router is not automatically initialized as RPL root) to make this opt-in.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, how often have you (or anyone else) used RPL with this example?

The biggest arguments for disabling RPL here for meare reduced complexity and reduced code size.
gnrc_coap and gnrc_networking_mac (for some reason) do include RPL.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, how often have you (or anyone else) used RPL with this example?

That's exactly my point. Everyone who uses this example currently uses RPL to a degree. Without it, the user base would shrink significantly, which would increase bit rot.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure to which degree RPL is used in these scenarios (apart from trickle timers and the like). But I sense that we need a more general discussion with a broader range of the community about the purpose of this (and the other example applications) first. Currently, I would prefer this application as a simple host application and rather introduce a dedicated RPL example application.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: examples Area: Example Applications
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants