Re: 回复:[PATCH v3 net-next 01/15] net/nebula-matrix: add minimum nbl build framework
From: Andrew Lunn <andrew@lunn.ch>
Date: 2026-01-29 13:19:03
Also in:
bpf, linux-doc, lkml
On Mon, Jan 26, 2026 at 10:18:52AM +0800, Illusion Wang wrote:
quoted
_CORE is a bit unusual for a driver. CORE is generally a library which is shared by a number of drivers. It does not have a tristate string, it is just selected by the drivers which need it.Thank you for your feedback on the NBL_CORE configuration option. We appreciate your guidance on adhering to Linux kernel naming conventions. Why NBL_CORE? The driver is designed to support two distinct functionalities for the Nebula-matrix m18100 Ethernet controller: 1.Standard Ethernet/NIC functionality (via the main driver module). 2.Auxiliary device (auxiliary driver) for RDMA (exposed through auxiliary_device). 4.MDEV-based SR-IOV/VF emulation (for native device splitting). Since shared logic (e.g., PCIe resource management, MMIO access, interrupt handling, and common hardware abstractions) is required across both the main driver and auxiliary/RDMA driver, we opted for a _CORE suffix to indicate:
You can split this two ways: A true core, which does not provide any devices, just core functions to access the hardware. Then layered on top if this you have kernel modules with provide Ethernet, RDMA, MDEV etc. Such kernel modules would then depend on the core, using Kconfig primitives. And the core itself would not have a tri-state string, since on its own it is useless. Or If the core always provides Ethernet, call it an Ethernet driver, not core. The other kernel modules would then depends on having the Ethernet driver, using Kconfig primitives. This all about naming, not architecture. Splitting it up into multiple kernel modules is good, but your naming and descriptions of what these modules do matters. Andrew