Skip to content

Rethinking network interface auto-initialization #4672

@miri64

Description

@miri64

Working on non-GNRC I realized that even most netdev2 devices are auto-initialized very GNRC-dependent so I think it makes sense to make the auto-initialization of network devices more granular.

There are a two things to consider:

  • netdev(2) auto-initialization
  • netdev(2) => interface mapping for every stack

The first one should be doable pretty straight forward with our current approach (just leave out the GNRC stuff). The second needs to have a default setting for every stack (e.g. gnrc_nomac interface for at86rf2xx or default gnrc_netdev2 for cc11xx), but should also be easily overridable by an application (if e.g. another mac layer is to be used). One way to do this could be to e.g. could be that every stack needs to define a function. For GNRC this might be:

void gnrc_init_netif(netdev2_t *dev, void *netif_params);

where netif_params is a stack-related (or even interface-type related) data type that gives the parameters for the actual stack-internal interface initialization function(s). The mapping can then be done to provide a struct type to the auto-initialization.

Metadata

Metadata

Assignees

Labels

Area: networkArea: NetworkingDiscussion: RFCThe issue/PR is used as a discussion starting point about the item of the issue/PRState: staleState: The issue / PR has no activity for >185 daysType: enhancementThe issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions