Bug 204415 - vnic/bgx driver does not build as a module
Summary: vnic/bgx driver does not build as a module
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: arm64 Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
Keywords: ThunderX
Depends on:
Blocks: 231027
  Show dependency treegraph
Reported: 2015-11-10 01:30 UTC by Ed Maste
Modified: 2019-05-01 22:28 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Ed Maste freebsd_committer 2015-11-10 01:30:46 UTC
The vnic/bgx driver is currently only available by adding #device vnic to the kernel configuration. It needs to be made available as a module as well.

dev/vnic/nic_main.c             optional        vnic pci
dev/vnic/nicvf_main.c           optional        vnic pci pci_iov
dev/vnic/nicvf_queues.c         optional        vnic pci pci_iov
dev/vnic/thunder_bgx_fdt.c      optional        vnic fdt
dev/vnic/thunder_bgx.c          optional        vnic pci
dev/vnic/thunder_mdio_fdt.c     optional        vnic fdt
dev/vnic/thunder_mdio.c         optional        vnic
dev/vnic/lmac_if.m              optional        vnic
Comment 1 Ed Maste freebsd_committer 2015-11-11 17:28:04 UTC
I tried creating a naive/straightforward module Makefile and found errors in the module dependencies -- for example, thunder_bgx depends on octeon_mdio which seems like it is probably a copy-and-paste leftover.

Do we expect this to be split in four separate modules (vf, pf, bgx, mdio)?

130:DRIVER_MODULE(nicvf, pci, nicvf_driver, nicvf_devclass, 0, 0);
131:MODULE_DEPEND(nicvf, pci, 1, 1, 1);
132:MODULE_DEPEND(nicvf, ether, 1, 1, 1);
133:MODULE_DEPEND(nicvf, vnic_pf, 1, 1, 1);

61:EARLY_DRIVER_MODULE(thunder_mdio, ofwbus, thunder_mdio_fdt_driver,

111:DRIVER_MODULE(thunder_bgx, pci, thunder_bgx_driver, thunder_bgx_devclass, 0, 0);
112:MODULE_DEPEND(thunder_bgx, pci, 1, 1, 1);
113:MODULE_DEPEND(thunder_bgx, ether, 1, 1, 1);
114:MODULE_DEPEND(thunder_bgx, octeon_mdio, 1, 1, 1);

148:DRIVER_MODULE(nicpf, pci, nicpf_driver, nicpf_devclass, 0, 0);
149:MODULE_DEPEND(nicpf, pci, 1, 1, 1);
150:MODULE_DEPEND(nicpf, ether, 1, 1, 1);
151:MODULE_DEPEND(nicpf, thunder_bgx, 1, 1, 1);

124:DRIVER_MODULE(miibus, thunder_mdio, miibus_driver, miibus_devclass, 0, 0);
125:MODULE_DEPEND(thunder_mdio, ether, 1, 1, 1);
126:MODULE_DEPEND(thunder_mdio, miibus, 1, 1, 1);
Comment 2 Ed Maste freebsd_committer 2018-08-30 16:47:53 UTC
Move to 13.x tracking PR - if we're able to take on work for the Cavium Octeon TX family (i.e., basically embedded ThunderX) this issue will be investigated as part of that work.