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)
Mon, Apr 29, 11:58 PM
Unknown Object (File)
Thu, Apr 11, 3:11 PM
Unknown Object (File)
Mar 31 2024, 6:12 AM
Unknown Object (File)
Dec 20 2023, 5:49 AM
Unknown Object (File)
Dec 13 2023, 11:51 AM
Unknown Object (File)
Dec 12 2023, 1:14 PM
Unknown Object (File)
Nov 18 2023, 7:30 AM
Unknown Object (File)
Nov 17 2023, 8:43 PM
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.