lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b5c1c892-540b-495a-a138-781f12c3ddd7@lunn.ch>
Date: Tue, 23 Dec 2025 11:02:59 +0100
From: Andrew Lunn <andrew@...n.ch>
To: "illusion.wang" <illusion.wang@...ula-matrix.com>
Cc: dimon.zhao@...ula-matrix.com, alvin.wang@...ula-matrix.com,
	sam.chen@...ula-matrix.com, netdev@...r.kernel.org,
	open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v1 net-next 01/15] net/nebula-matrix: add minimum nbl
 build framework

> @@ -27628,6 +27628,16 @@ F:	Documentation/networking/device_drivers/ethernet/wangxun/*
>  F:	drivers/net/ethernet/wangxun/
>  F:	drivers/net/pcs/pcs-xpcs-wx.c
>  
> +NEBULA-MATRIX ETHERNET DRIVER (nebula-matrix)
> +M:	Illusion.Wang <illusion.wang@...ula-matrix.com>
> +M:	Dimon.Zhao <dimon.zhao@...ula-matrix.com>
> +M:	Alvin.Wang <alvin.wang@...ula-matrix.com>
> +M:	Sam Chen <sam.chen@...ula-matrix.com>
> +L:	netdev@...r.kernel.org
> +S:	Maintained
> +F:	Documentation/networking/device_drivers/ethernet/nebula-matrix/*
> +F:	drivers/net/ethernet/nebula-matrix/

This file is sorted, so please insert in the correct location.

> +
>  WATCHDOG DEVICE DRIVERS
>  M:	Wim Van Sebroeck <wim@...ux-watchdog.org>
>  M:	Guenter Roeck <linux@...ck-us.net>
> diff --git a/drivers/net/ethernet/Kconfig b/drivers/net/ethernet/Kconfig
> index 4a1b368ca7e6..3995f75f1016 100644
> --- a/drivers/net/ethernet/Kconfig
> +++ b/drivers/net/ethernet/Kconfig
> @@ -204,5 +204,6 @@ source "drivers/net/ethernet/wangxun/Kconfig"
>  source "drivers/net/ethernet/wiznet/Kconfig"
>  source "drivers/net/ethernet/xilinx/Kconfig"
>  source "drivers/net/ethernet/xircom/Kconfig"
> +source "drivers/net/ethernet/nebula-matrix/Kconfig"

Also sorted.

>  
>  endif # ETHERNET
> diff --git a/drivers/net/ethernet/Makefile b/drivers/net/ethernet/Makefile
> index 2e18df8ca8ec..632dac9c4b75 100644
> --- a/drivers/net/ethernet/Makefile
> +++ b/drivers/net/ethernet/Makefile
> @@ -108,4 +108,5 @@ obj-$(CONFIG_NET_VENDOR_XILINX) += xilinx/
>  obj-$(CONFIG_NET_VENDOR_XIRCOM) += xircom/
>  obj-$(CONFIG_NET_VENDOR_SYNOPSYS) += synopsys/
>  obj-$(CONFIG_NET_VENDOR_PENSANDO) += pensando/
> +obj-$(CONFIG_NET_VENDOR_NEBULA_MATRIX) += nebula-matrix/

This is not strictly sorted, but mostly sorted. Please insert in the
correct location.

Sorting avoids merge conflicts when everybody adds to the end of the
file.

> +if NET_VENDOR_NEBULA_MATRIX
> +
> +config NBL_CORE

Why core? Is it shared by multiple other drivers?

> +#define NBL_CAP_SET_BIT(loc)			(1 << (loc))

Please don't re-implement existing functionality. Why are you not using BIT()?

> +++ b/drivers/net/ethernet/nebula-matrix/nbl/nbl_include/nbl_include.h

Please include the needed headers in the .c file. A large proportion
of compile time is spent processing headers. So including headers you
don't actually need into every C file just slows down the build for
everybody.

> +#define NBL_DRIVER_VERSION				"25.11-1.16"

Driver versions are generally pointless, since they never change, but
the kernel around it is changing all the time.

> +
> +#define NBL_FLOW_INDEX_BYTE_LEN				8
> +
> +#define NBL_RATE_MBPS_100G				(100000)
> +#define NBL_RATE_MBPS_25G				(25000)
> +#define NBL_RATE_MBPS_10G				(10000)

Pointless ()

> +#define NBL_NEXT_ID(id, max)	({ typeof(id) _id = (id); ((_id) == (max) ? 0 : (_id) + 1); })
> +#define NBL_IPV6_U32LEN					4
> +
> +#define NBL_MAX_FUNC					(520)
> +#define NBL_MAX_MTU					15

You can only send 15 byte packets? Very odd hardware.

> +static int nbl_probe(struct pci_dev *pdev, const struct pci_device_id __always_unused *id)
> +{
> +	struct device *dev = &pdev->dev;
> +
> +	dev_info(dev, "nbl probe finished\n");

Please don't spam the log in the 'happy case'. dev_dbg(), or nothing
at all.


> +static int __maybe_unused nbl_suspend(struct device *dev)
> +{
> +	return 0;
> +}
> +
> +static int __maybe_unused nbl_resume(struct device *dev)
> +{
> +	return 0;
> +}

You should be able to add these when you add suspend/resume support.

> +static int __init nbl_module_init(void)
> +{
> +	int status;
> +
> +	status = pci_register_driver(&nbl_driver);

There are helpers for PCI drivers which should mean you don't need
this or nbl_module_exit().

    Andrew

---
pw-bot: cr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ