Netdev List
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: alexander.duyck@gmail.com
Cc: netdev@vger.kernel.org, andrew+netdev@lunn.ch,
	davem@davemloft.net, edumazet@google.com, horms@kernel.org,
	kernel-team@meta.com, kuba@kernel.org, pabeni@redhat.com
Subject: Re: [net PATCH 2/3] fbnic: Do not report a FW coredump info error as a parse failure
Date: Fri, 27 Nov 2026 09:44:58 +0000	[thread overview]
Message-ID: <179577269832.3135.7443187068447815834@kernel.org> (raw)
In-Reply-To: <179555667294.7867.14016739586914876839.stgit@ahduyck-xeon-server.home.arpa>

Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.

Critical: 0 · High: 0 · Medium: 1 · Low: 0

If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).

- [Medium] The fix is incomplete.

--

fbnic: Do not report a FW coredump info error as a parse failure

This patch makes fbnic_fw_parse_coredump_info_resp() return 0 once the
completion has been filled in. A firmware-reported error, or -ENOENT when
no coredump is available, then no longer reaches the mailbox Rx path,
which would log it as an unprocessable message with a hex dump.

> diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_fw.c b/drivers/net/ethernet/meta/fbnic/fbnic_fw.c
> index e00d626f64384..9a3df37674424 100644
> --- a/drivers/net/ethernet/meta/fbnic/fbnic_fw.c
> +++ b/drivers/net/ethernet/meta/fbnic/fbnic_fw.c
> @@ -960,7 +960,7 @@ fbnic_fw_parse_coredump_info_resp(void *opaque, struct fbnic_tlv_msg **results)
>  	complete(&cmpl_data->done);
>  	fbnic_fw_put_cmpl(cmpl_data);
>  
> -	return err;
> +	return 0;
>  }

[Severity: Medium]

This fixes the coredump info handler. Is the same problem still present in
fbnic_fw_parse_coredump_resp()? That handler came in with the same Fixes:
commit and runs in the same devlink health dump flow,
fbnic_fw_reporter_dump():

fbnic_fw_parse_coredump_resp() {
    ...
	err = fta_get_sint(results, FBNIC_FW_COREDUMP_READ_ERROR);
	if (err)
		goto msg_err;
    ...
msg_err:
	cmpl_data->result = err;
	complete(&cmpl_data->done);
	fbnic_fw_put_cmpl(cmpl_data);

	return err;
}

fbnic_fw_parse_qsfp_read_resp() does the same thing with
FBNIC_FW_QSFP_ERROR. It stores the error in cmpl_data->result, completes
the request, and then returns err.

fbnic_tlv_msg_parse() returns the handler's value unchanged, and
fbnic_mbx_process_rx_msgs() then does this:

		err = fbnic_tlv_msg_parse(fbd, msg, fbnic_fw_tlv_parser);
		if (err) {
			dev_warn(fbd->dev, "Unable to process message: %d\n",
				 err);
			print_hex_dump(KERN_WARNING, "fbnic:",
				       DUMP_PREFIX_OFFSET, 16, 2,
				       msg, length, true);
		}

So when the firmware reports an error on a coredump read chunk or a QSFP
EEPROM read, the driver still logs the parse-failure warning and hex dump.
The callers already get the error through the completion. The later
patches in the series do not touch fbnic_fw.c, so both handlers are
unchanged at the end of the series.

Both handlers also have real malformed-message paths: -EINVAL for an
offset, length, bank or page mismatch, and -ENODATA for missing data. A
blanket return 0 would hide useful warnings in those cases.

Could these handlers follow the fbnic_fw_parse_tsene_read_resp() pattern
the commit message mentions? That handler keeps the firmware error in a
separate err_resp that only goes into the completion, and still returns
local validation errors:

	err_resp = fta_get_sint(results, FBNIC_FW_TSENE_ERROR);
	if (err_resp)
		goto msg_err;
    ...
msg_err:
	cmpl_data->result = err_resp ? : err;
	complete(&cmpl_data->done);
	fbnic_fw_put_cmpl(cmpl_data);

	return err;

>  
>  /**

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/179555657536.7867.497419917946087787.stgit%40ahduyck-xeon-server.home.arpa

  reply	other threads:[~2026-11-27  9:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24 21:44 [net PATCH 0/3] fbnic: FW coredump fixes Alexander Duyck
2026-11-24 21:44 ` [net PATCH 1/3] fbnic: Limit TLV_MAX_DATA to the firmware's 4K page Alexander Duyck
2026-11-24 21:44 ` [net PATCH 2/3] fbnic: Do not report a FW coredump info error as a parse failure Alexander Duyck
2026-11-27  9:44   ` netdev-bot+sashiko [this message]
2026-11-24 21:44 ` [net PATCH 3/3] fbnic: Only create a FW coredump when the user asks for one Alexander Duyck

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=179577269832.3135.7443187068447815834@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=alexander.duyck@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kernel-team@meta.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /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