Page MenuHomeFreeBSD

Make iflib a loadable module.
ClosedPublic

Authored by kib on Jan 30 2019, 11:53 PM.

Details

Summary

iflib is already a module, but it is unconditionally compiled into the kernel. There are drivers which do not need iflib(4), and there are situations where somebody might not want iflib in kernel because of using the corresponding driver as module.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

kib created this revision.Jan 30 2019, 11:53 PM
erj added a subscriber: erj.Jan 31 2019, 12:09 AM

Would it be a good idea to group the iflib drivers together in the config files, so it's obvious there?

share/man/man4/ixgbe.4
42 ↗(On Diff #53448)

lines

share/man/man4/vmx.4
28 ↗(On Diff #53448)

lines

kib updated this revision to Diff 53450.Jan 31 2019, 12:40 AM

Group drivers using iflib together for amd64, arm64, and i386 configs. line->liines.

marius requested changes to this revision.Jan 31 2019, 10:19 AM

sys/dev/ixgbe/if_ixv.c appears to be missing a "MODULE_DEPEND(ixv, iflib, 1, 1, 1);" but while you are at it, you could remove its netmap dependency (now already provided by iflib.c) instead

sys/arm64/conf/GENERIC
148 ↗(On Diff #53450)
  • "PCEe" is probably a typo and was meant to read "PCIe" instead. However, at least em(4) also supports PCI-X and plain old PCI gear.
  • The iflib grouping should probably include the vmx where already present.

Likewise for other GENERIC kernel config files.

This revision now requires changes to proceed.Jan 31 2019, 10:19 AM
kib updated this revision to Diff 53484.Jan 31 2019, 5:50 PM
kib marked an inline comment as done.

Handle Marius' comments.

marius accepted this revision.Jan 31 2019, 6:03 PM

Well, I would just have went with "PCI" but if you prefer to state all variants :)

This revision is now accepted and ready to land.Jan 31 2019, 6:03 PM
erj accepted this revision as: erj.Jan 31 2019, 7:03 PM

Well, I would just have went with "PCI" but if you prefer to state all variants :)

You could also just drop "PCI", because iflib supposedly would support non-PCI ethernet devices. The devices that use it just happen to all present themselves on the PCI bus...

This revision was automatically updated to reflect the committed changes.

Well, as-is iflib(4) in fact is PCI-specific.