Article View: linux.kernel.netdev
Article #17221Re: [PATCH v34 net-next 5/8] net/nebula-matrix: dispatch: add control-level routing core infrastructure
From: netdev-bot+sashiko
Date: Mon, 16 Nov 2026 13:54
Date: Mon, 16 Nov 2026 13:54
100 lines
11567 bytes
11567 bytes
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] The -EOPNOTSUPP fallback in nbl_disp_init_module() can never run,
and the kernel-doc describes it as if it could.
--
net/nebula-matrix: dispatch: add control-level routing core infrastructure
This patch adds the dispatch layer. It allocates the dispatch management
state and the ops table, and it wires the init_module and deinit_module
wrappers to the resource ops. It also adds a ctrl_lvl bitmap, with only
the MGT level defined, which is set only on the control PF.
> diff --git a/drivers/net/ethernet/nebula-matrix/nbl/nbl_core/nbl_dispatch.c b/drivers/net/ethernet/nebula-matrix/nbl/nbl_core/nbl_dispatch.c
> new file mode 100644
> index 0000000000000..966fee2dec8b0
> --- /dev/null
> +++ b/drivers/net/ethernet/nebula-matrix/nbl/nbl_core/nbl_dispatch.c
> @@ -0,0 +1,117 @@
[ ... ]
> +static void nbl_disp_deinit_module(struct nbl_dispatch_mgt *disp_mgt)
> +{
> + struct nbl_resource_ops *res_ops = disp_mgt->res_ops_tbl->ops;
> + struct nbl_resource_mgt *p = disp_mgt->res_ops_tbl->priv;
> +
> + if (res_ops->deinit_module)
> + res_ops->deinit_module(p);
> +}
> +
> +static int nbl_disp_init_module(struct nbl_dispatch_mgt *disp_mgt)
> +{
> + struct nbl_resource_ops *res_ops = disp_mgt->res_ops_tbl->ops;
> + struct nbl_resource_mgt *p = disp_mgt->res_ops_tbl->priv;
> +
> + if (res_ops->init_module)
> + return res_ops->init_module(p);
> + return -EOPNOTSUPP;
> +}
[Severity: Low]
This isn't a bug, but can the -EOPNOTSUPP fallback in
nbl_disp_init_module() ever run? The same question applies to the NULL
check in nbl_disp_deinit_module().
nbl_res_setup_ops() in nbl_resource_leonis.c will not publish the
resource ops table if either op is missing:
nbl_res_setup_ops() {
...
if (!res_ops.get_vsi_id || !res_ops.get_eth_id ||
!res_ops.cfg_msix_map || !res_ops.destroy_msix_map ||
!res_ops.set_mailbox_irq || !res_ops.init_module ||
!res_ops.deinit_module)
return ERR_PTR(-EINVAL);
...
}
nbl_core_init() calls nbl_res_init_leonis() before nbl_disp_init(), so a
missing op fails probe before the dispatch wrappers are installed. The
static res_ops table also always sets nbl_res_chip_init_module and
nbl_res_chip_deinit_module.
Could these NULL branches be dropped? The kernel-doc below would then
need updating too.
[ ... ]
> diff --git a/drivers/net/ethernet/nebula-matrix/nbl/nbl_include/nbl_def_dispatch.h b/drivers/net/ethernet/nebula-matrix/nbl/nbl_include/nbl_def_dispatch.h
> new file mode 100644
> index 0000000000000..f52d8bd57cd2b
> --- /dev/null
> +++ b/drivers/net/ethernet/nebula-matrix/nbl/nbl_include/nbl_def_dispatch.h
> @@ -0,0 +1,54 @@
[ ... ]
> +/**
> + * struct nbl_dispatch_ops - dispatch control plane operation callbacks
> + * @init_module: chip-wide datapath init, forwarded to the resource layer
> + * (res_ops->init_module() and then hw_ops->init_module());
> + * on leonis it programs the chip-wide datapath registers and
> + * sets driver_status=true. Returns -EOPNOTSUPP if the
> + * resource layer installs no init_module op. Control-PF
This sentence documents an error return that no caller can get. It also
suggests the resource op is optional, while nbl_res_setup_ops() requires
it. This text is still unchanged at the end of the series.
[ ... ]
--
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261112094925.6098-1-illusion.wang%40nebula-matrix.com
Technical Details
Message-ID:
<179483728519.3136.7292669814858371820@kernel.org>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-364384-linux-kernel-netdev=dewy.ruReferences:
<20261112094925.6098-6-illusion.wang@nebula-matrix.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-364384-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH v34 net-next 5/8] net/nebula-matrix: dispatch: add control-level routing core infrastructure Date: Mon, 16 Nov 2026 13:54:45 +0000 Organization: Usenet Network Message-ID: <179483728519.3136.7292669814858371820@kernel.org> References: <20261112094925.6098-6-illusion.wang@nebula-matrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2079123"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:XecZZ9i16DKmEbkh3pu/3TbBxFU= sha256:rs20PtwtltdVURbVuT0V1DX8vbtQacNjdt4z55/Fnxg= sha1:hetYXha4sYaUkQhkW2BzyXRMmZI= sha256:GwAhWsm1UW9wZa8aGMN88YRG8S0kbAu3JrwZnE7l+Qs= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id E5A3F114C54; Mon, 16 Nov 2026 16:56:36 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.401 X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ke_v_Xoz5VhR; Mon, 16 Nov 2026 16:56:33 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-364384-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id F4164114C53; Mon, 16 Nov 2026 16:56:24 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 7C52E3A0E4; Mon, 16 Nov 2026 13:55:34 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1794837292; b=lk36eZyk5olHawuQm2B3mrOSZFl6dI4t+ZtoygbTfNYvZ3QVXhzhx8ywiZs7vJhNEBjP ce+iNonE3h9sinR9xSkSzOkLrwJgSjj4OCrQICfpFFw6+aVr1s4sfn3LoK1dUKn0xPmb0 q3LjSrzQSCLHTUMEC5UWsSPaMTJ0JGUgzQwXBL1Emcj6K3sKankJ+DkeHg30j/dkBydKG Tm+VpMQdvMolzzavKAScyHsXn9gXpy8gEyIqcuPOsTvxi4cJ7ysZdOlWYcjKokKm1dJ/0 +kqmv/PBJ4uegRn3MWGHUowGR7WF5kL1+Y3kq15N/9BvvdWSGWVnbgAI4OggP9+NLSQ== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794837292; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=0ymcIH4/zeaoSFfHc+RTS5YHw90qatTHdiwsb0U8zEM=; b=43Ey3fbWIl5eJ/gvHJsAmXIziNHevFXuAyAj9SUiT9+tr+Y3SDNV0MDsO9muxk16fKCC LujKMJ/9e/oeBSUqLiv+l3VcBIDbOMiezs1rkosTzl2tbk35GMs3znEtPsGfnbT9u3bL1 lOJzbYej4TseWKVOoUTW1OwDUcmiABYV+ZFRPWt5KPKjqAaJ7CHO7vSukjXg8X3OIo9kl FXRYySLNsmiFYM7WDicmnkUl7gUIS7aUsy5hLgnl0yEmIv++2gozpDYlNmYnPQYBy+fER Yu2mjbUTRW7kZVsEMuzdg/uOs6RsuxfJRXTt0AAzF06TMJu1sSmD0JUfyJEVJbANFWQ== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=QHUG3ZvB; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4F8A9606AE5D; Mon, 16 Nov 2026 13:54:52 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=QHUG3ZvB X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794837286; b=fjWYqgqFQsJhI+vzOJWI1O/S7J5eqjns2/x0LFJF0KEv8V74SE5VZoBHGdmpZwtfqbNZ tSKI0fj3YXfWp5v6/eTp2oBsvvbaiYxPgePzHKaHh/CBWnACU9DUz0JMZz3t+Z6ay9BAZ 9Zz6XbsnKhWuo/0xWUYtwykFXQw22f+mHQeNIeYn+nBzEzA2Vp5qkKM2J8O1UZD8WqM3i Lc+kS8iqvxAwth9yjoUXKRp/OD8IS5ka2PQGgWFEPN6SlPgMxWvIL6bqxXfFcOKVTpIIe ZSTxgq3mDeWs4mrnH97Oibk3I553qvGb7QCxWqODd0D23t4m7R3xP9A7wbdYmgaJo9Q== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794837286; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=0ymcIH4/zeaoSFfHc+RTS5YHw90qatTHdiwsb0U8zEM=; b=kLSezkbA0PqfNqhUm8cY709GruhZAYRqBHPI5uROWG5ciBoZBayCwqYHoFscFmYqMYJ6 mbt0x8EKQXnPG9Nh6wvbjIfOdxL1b4Vs6XY2jxvo9F8SYefjrLVPdp7sDd/Kwkt6X8MFy bGbRgKr/Jq5TanHPVR82zYgEobZayDeBARfW7j/jwrERhkgpPsaY2mw+GMPjiQ1oHIkxY +pSRRVZAha1vUvUaMIHAyO+DtiKnE7H084Qw/ju6qJvRqqisC29fwzbmT0nlxuQEqcix/ +GGPXVZufWCwXoOtYJQ4PiFgiqSF/XK0wJ9C8PIlgLOos9D3QH+Gmd03QtUZnVaQzvg== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=QHUG3ZvB; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6FD1C606A335; Mon, 16 Nov 2026 13:54:46 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id A414F1F000C7; Mon, 16 Nov 2026 13:54:45 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1794837286; bh=0ymcIH4/zeaoSFfHc+RTS5YHw90qatTHdiwsb0U8zEM=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=QHUG3ZvBIrERejZfaQGJXaoty2jY0Ifn8nvHPJVzHsG/6RqqsQfNWImz/YuwD0mRy 0vuDOTFGTkHfA3dwJhQSvcj27XJVGwEi09oXONYu12WgkhZAUf7tPrABa8relrXgvn T6iqpAj5klZjW889QN7bK/wbAm/nY/x44vjHhUp11r492t9/U1lQbI/NWDVJ+OARsm bpRkiyqVTZChrtP8bICJqEuPDk5YfsLENE1mN7gsfT2hA4gZjn/+NQo1w7wv5rpX94 m2VuFu8FeP9n6fzFzkyW9LK66R+WGct5J+dsrV6v2zV/wGokrczNNGSEMzaArgjqiu jSW81ha783W0Q== X-Cc: dimon.zhao@nebula-matrix.com, alvin.wang@nebula-matrix.com, sam.chen@nebula-matrix.com, netdev@vger.kernel.org, kuba@kernel.org, andrew+netdev@lunn.ch, pabeni@redhat.com, edumazet@google.com, horms@kernel.org, linux-kernel@vger.kernel.org X-In-Reply-To: <20261112094925.6098-6-illusion.wang@nebula-matrix.com> X-sashiko-severity: Low X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list