From: Jakub Kicinski <kuba@kernel.org>
To: "illusion.wang" <illusion.wang@nebula-matrix.com>
Cc: dimon.zhao@nebula-matrix.com, alvin.wang@nebula-matrix.com,
sam.chen@nebula-matrix.com, netdev@vger.kernel.org,
andrew+netdev@lunn.ch, corbet@lwn.net, horms@kernel.org,
linux-doc@vger.kernel.org, pabeni@redhat.com,
vadim.fedorenko@linux.dev, lukas.bulwahn@redhat.com,
edumazet@google.com, enelsonmoore@gmail.com,
skhan@linuxfoundation.org, hkallweit1@gmail.com,
linux-kernel@vger.kernel.org (open list)
Subject: Re: [PATCH v23 net-next 05/12] net/nebula-matrix: add common resource implementation
Date: Wed, 5 Aug 2026 18:41:44 -0700 [thread overview]
Message-ID: <20260805184144.08c5b4c2@kernel.org> (raw)
In-Reply-To: <20260731094242.2655-6-illusion.wang@nebula-matrix.com>
On Fri, 31 Jul 2026 17:42:28 +0800 illusion.wang wrote:
> From: illusion wang <illusion.wang@nebula-matrix.com>
>
> The Resource layer processes the entries/data of various modules within
> the processing chip to accomplish specific entry management operations,
> this describes the module business capabilities of the chip and the data
> it manages.
> The resource layer comprises the following sub-modules: common,
> interrupt, and vsi(txrx,queue not contained this time)
>
> This patch provides the common part, including the conversion
> relationships among vsi_id, func_id, eth_id, and pf_id. These
> relationships may be utilized in the upper layer or the resource layer.
>
> Key Assumptions:
> - nbl_res_start() initializes VSI/Eth/PF data structures **only for
> control devices** (`common->has_ctrl == true`).
> - APIs like nbl_res_func_id_to_vsi_id() **are guaranteed to be called
> only on control devices** by the framework's dispatch layer.
>
> Signed-off-by: illusion wang <illusion.wang@nebula-matrix.com>
This generates a possibly transient warning when built with W=1
drivers/net/ethernet/nebula-matrix/nbl/nbl_hw/nbl_hw_leonis/nbl_resource_leonis.c:68:2: warning: variable 'eth_bitmap' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
68 | NBL_OPS_CALL(hw_ops->get_fw_eth_map,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69 | (res_mgt->hw_ops_tbl->priv, ð_bitmap));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../drivers/net/ethernet/nebula-matrix/nbl/nbl_hw/nbl_hw_leonis/../../nbl_include/nbl_include.h:39:6: note: expanded from macro 'NBL_OPS_CALL'
39 | if (_func) \
| ^~~~~
../drivers/net/ethernet/nebula-matrix/nbl/nbl_hw/nbl_hw_leonis/nbl_resource_leonis.c:70:6: note: uninitialized use occurs here
70 | if (eth_bitmap & ~((1 << NBL_MAX_ETHERNET) - 1)) {
| ^~~~~~~~~~
../drivers/net/ethernet/nebula-matrix/nbl/nbl_hw/nbl_hw_leonis/nbl_resource_leonis.c:68:2: note: remove the 'if' if its condition is always true
68 | NBL_OPS_CALL(hw_ops->get_fw_eth_map,
| ^
../drivers/net/ethernet/nebula-matrix/nbl/nbl_hw/nbl_hw_leonis/../../nbl_include/nbl_include.h:39:2: note: expanded from macro 'NBL_OPS_CALL'
39 | if (_func) \
| ^
../drivers/net/ethernet/nebula-matrix/nbl/nbl_hw/nbl_hw_leonis/nbl_resource_leonis.c:56:16: note: initialize the variable 'eth_bitmap' to silence this warning
56 | u32 eth_bitmap, eth_id;
| ^
| = 0
next prev parent reply other threads:[~2026-08-06 1:41 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-31 9:42 [PATCH v23 net-next 00/12] nbl driver for Nebulamatrix NICs illusion.wang
2026-07-31 9:42 ` [PATCH v23 net-next 01/12] net/nebula-matrix: add minimum nbl build framework illusion.wang
2026-07-31 9:42 ` [PATCH v23 net-next 02/12] net/nebula-matrix: add core driver architecture and HW layer initialization illusion.wang
2026-08-05 2:26 ` 回复:[PATCH " Illusion Wang
2026-07-31 9:42 ` [PATCH v23 net-next 03/12] net/nebula-matrix: add channel wire opcode enum definitions illusion.wang
2026-07-31 9:42 ` [PATCH v23 net-next 04/12] net/nebula-matrix: add channel layer illusion.wang
2026-08-06 1:43 ` Jakub Kicinski
2026-07-31 9:42 ` [PATCH v23 net-next 05/12] net/nebula-matrix: add common resource implementation illusion.wang
2026-08-06 1:41 ` Jakub Kicinski [this message]
2026-07-31 9:42 ` [PATCH v23 net-next 06/12] net/nebula-matrix: add intr " illusion.wang
2026-07-31 9:42 ` [PATCH v23 net-next 07/12] net/nebula-matrix: add chip-wide hardware init/deinit implementation illusion.wang
2026-07-31 9:42 ` [PATCH v23 net-next 08/12] net/nebula-matrix: dispatch: add control-level routing core infrastructure illusion.wang
2026-07-31 9:42 ` [PATCH v23 net-next 09/12] net/nebula-matrix: dispatch: add cross-version channel message framework illusion.wang
2026-07-31 9:42 ` [PATCH v23 net-next 10/12] net/nebula-matrix: dispatch: add mutual exclusion lock for shared hardware resource ops illusion.wang
2026-07-31 9:42 ` [PATCH v23 net-next 11/12] net/nebula-matrix: add common/ctrl dev init/remove operation illusion.wang
2026-07-31 9:42 ` [PATCH v23 net-next 12/12] net/nebula-matrix: add common dev start/stop operation illusion.wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260805184144.08c5b4c2@kernel.org \
--to=kuba@kernel.org \
--cc=alvin.wang@nebula-matrix.com \
--cc=andrew+netdev@lunn.ch \
--cc=corbet@lwn.net \
--cc=dimon.zhao@nebula-matrix.com \
--cc=edumazet@google.com \
--cc=enelsonmoore@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=horms@kernel.org \
--cc=illusion.wang@nebula-matrix.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas.bulwahn@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sam.chen@nebula-matrix.com \
--cc=skhan@linuxfoundation.org \
--cc=vadim.fedorenko@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox