Page MenuHomeFreeBSD

iflib: Support basic virtualization of "pseudo" interfaces
AbandonedPublic

Authored by markj on Mar 11 2021, 4:28 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Sep 8, 6:56 PM
Unknown Object (File)
Jul 25 2024, 1:46 PM
Unknown Object (File)
Jul 16 2024, 2:02 PM
Unknown Object (File)
Jun 18 2024, 5:13 PM
Unknown Object (File)
Jun 8 2024, 8:09 AM
Unknown Object (File)
Apr 29 2024, 11:58 PM
Unknown Object (File)
Apr 11 2024, 3:11 PM
Unknown Object (File)
Mar 31 2024, 6:12 AM
Subscribers

Details

Reviewers
shurd
kevans
grehan
mmacy
Group Reviewers
iflib
Summary

Currently the only consumer of this bit of functionality is if_wg.

Right now each driver defines a single cloner. However, during vnet
teardown we need to destroy all interfaces created in that vnet, and
if_cloner expects consumers to create a cloner per vnet.

Virtualize the iflib_pseudos list and require consumers to register a
pseudo interface type in each vnet. Consumers must also call into iflib
to deregister pseudo interface types for now.

iflib also creates a device for each pseudo interface, since a lot of
iflib's internal interfaces depend on having a device_t available. For
now at least, iflib also expects the ifnet and device unit numbers to
match, so iflib needs to handle unit number allocation (previously done
by if_cloner).

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 37772
Build 34661: arc lint + arc unit

Event Timeline

markj requested review of this revision.Mar 11 2021, 4:28 PM

74ae3f3e33b8 accomplishes my goal by decoupling if_wg and iflib, and virtualizing the if_wg cloner. There aren't any other iflib_pseudo consumers in the tree so I won't pursue this diff, which is really a hack anyway.