回复:[PATCH v3 net-next 01/15] net/nebula-matrix: add minimum nbl build framework
From: Illusion Wang
Date: Sun Jan 25 2026 - 22:23:55 EST
>_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:
Reusability: The module provides foundational code used by multiple sub-drivers
(main NIC + auxiliary RDMA).
Modularity: Future extensions (e.g., additional auxiliary devices) can reuse the
same core infrastructure.
So it serves a similar purpose to mlx5_core (Mellanox), where a central module
handles hardware-specific operations for multiple sub-drivers.
illusion.wang
------------------------------------------------------------------
发件人:Andrew Lunn <andrew@xxxxxxx>
发送时间:2026年1月23日(周五) 11:27
收件人:Illusion Wang<illusion.wang@xxxxxxxxxxxxxxxxx>; y<y@xxxxxxx>
抄 送:Dimon<dimon.zhao@xxxxxxxxxxxxxxxxx>; Alvin<alvin.wang@xxxxxxxxxxxxxxxxx>; Sam<sam.chen@xxxxxxxxxxxxxxxxx>; netdev<netdev@xxxxxxxxxxxxxxx>; "andrew+netdev"<andrew+netdev@xxxxxxx>; corbet<corbet@xxxxxxx>; kuba<kuba@xxxxxxxxxx>; "linux-doc"<linux-doc@xxxxxxxxxxxxxxx>; lorenzo<lorenzo@xxxxxxxxxx>; pabeni<pabeni@xxxxxxxxxx>; horms<horms@xxxxxxxxxx>; "vadim.fedorenko"<vadim.fedorenko@xxxxxxxxx>; "lukas.bulwahn"<lukas.bulwahn@xxxxxxxxxx>; hawk<hawk@xxxxxxxxxx>; ast<ast@xxxxxxxxxx>; bpf<bpf@xxxxxxxxxxxxxxx>; sdf<sdf@xxxxxxxxxxx>; daniel<daniel@xxxxxxxxxxxxx>; "john.fastabend"<john.fastabend@xxxxxxxxx>; edumazet<edumazet@xxxxxxxxxx>; open list<linux-kernel@xxxxxxxxxxxxxxx>
主 题:Re: [PATCH v3 net-next 01/15] net/nebula-matrix: add minimum nbl build framework
> +config NBL_CORE
> + tristate "Nebula-matrix Ethernet Controller m18100 Family support"
> + depends on 64BIT && PCI
> + default m
> + select PAGE_POOL
> + help
> + This driver supports Nebula-matrix Ethernet Controller m18100 Family of
> + devices. For more information about this product, go to the product
> + description with smart NIC:
_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.
> +static int nbl_probe(struct pci_dev *pdev,
> + const struct pci_device_id __always_unused *id)
> +{
> + struct device *dev = &pdev->dev;
> +
> + dev_dbg(dev, "nbl probe ok!\n");
Please don't have pointless debug messages. If your driver does not
even probe, you should not be submitting it.
> + return 0;
> +}
> +
> +static void nbl_remove(struct pci_dev *pdev)
> +{
> + dev_dbg(&pdev->dev, "nbl remove OK!\n");
> +}
> +
> +#define NBL_VENDOR_ID (0x1F0F)
Andrew
---
pw-bot: cr