Skip to content

RFC: A layered approach to netdev #7736

@miri64

Description

@miri64

@haukepetersen and I today talked a little bit about the problems with netdev_t and how to dynamically add features independent from a specific device. Examples for this are

This is what we came up with:

layered_netdev

In addition to actual device drivers there are additional netdev_driver_ts available who also have another netdev_driver_t associated to themselves (I called this construction netdev_layered_t here but I'm not stuck on the name). This allows a network stack to use those features as though they were a normal network device and the whole thing would be very transparent to the network stack (so I wouldn't count this as a major API change ;-)). The benefit of this should be clear:

  • no code duplication for link-layer specific operations (like packet counting, link-layer address filtering, option setting/getting)
  • simplification of the netdev_ieee802154_set()/netdev_ieee802154_get() situation that seem to confuse people

The questions that are still open are:

  • Where to store netdev_layered_t instances?
  • How initialize such a "netdev_layered_t" stack while also having it configurable?

Metadata

Metadata

Labels

Area: driversArea: Device driversArea: networkArea: NetworkingDiscussion: RFCThe issue/PR is used as a discussion starting point about the item of the issue/PRState: don't staleState: Tell state-bot to ignore this issueType: 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