Netdev List
 help / color / mirror / Atom feed
From: "Rao, Nikhil" <nikhirao@amd.com>
To: Simon Horman <horms@kernel.org>
Cc: netdev@vger.kernel.org, brett.creeley@amd.com,
	andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, eric.joyner@amd.com,
	nikhil.rao@amd.com
Subject: Re: [PATCH v4 4/6] pds_core: add PLDM component info display
Date: Mon, 15 Jun 2026 12:58:37 -0700	[thread overview]
Message-ID: <44448066-0b2e-4b10-880a-96f6b8c5ecfa@amd.com> (raw)
In-Reply-To: <20260615160842.776643-4-horms@kernel.org>


On 6/15/2026 9:08 AM, Simon Horman wrote:
> This is an AI-generated review of your patch. The human sending this
> email has considered the AI review valid, or at least plausible.
> Full review at: https://netdev-ai.bots.linux.dev/sashiko/
> 
> Simon says: This review seems to be a bit of a mixed bag.
>              I've annotated the issues it raises that I'd appreciate
>              you looking over, and the rest, which I don't feel fall
>              in that category.
> ---
> pds_core: add PLDM component info display
> 
> This patch reports per-component firmware versions through devlink info on
> v2+ devices, replacing the single fw running version with names derived
> from the firmware-supplied component list and slot/flag fields.
> 
> Simon says: I'm not particularly concerned about the issue raised below -
>              I'm forwarding this review because of others raised further down.

Thanks for the review. Responding to the issues you flagged as 
warranting investigation below. I'm also addressing patch reordering and 
v2-error-handling in v5.

> Simon says: However, the issue flagged below seems to warrant
>              investigation in the context of this patch-set.
> 
> Second, pdsc->fw_components is only invalidated at the end of
> pdsc_firmware_update() ("pdsc->fw_components.num_components = 0;").
> If firmware versions change through any other path (FW recovery via
> health_work, PCI reset via pci_reset_work, side-channel upgrade) the
> cached list stays around and devlink dev info reports stale versions.
> Should those reset paths also clear pdsc->fw_components?

Valid concern. Will add a pdsc_fw_components_invalidate() helper in v5 
and call it from recovery and reset paths.


> Simon says: Likewise, the one below seems to warrant investigation too.
> 
> [Medium]
> num_components has already been bounded against
> PDS_CORE_FW_COMPONENT_LIST_LEN inside pdsc_get_component_info().
> max_fw_slots looks like a slot count (gold/main-a/main-b), but the
> component list also contains cpld/bootloader/uboot/etc.  If firmware
> reports six components on a three-slot device, this min_t() silently
> truncates legitimate component entries from the devlink output.
> 
> Is this cap intentional, and if so should truncation be logged?  If
> not, can the cap simply be dropped?

The field name max_fw_slots is misleading - firmware populates it with 
the component count, not a slot count. Will clean up the comment in v5. 
The min_t() is correct - it bounds against the number of components 
firmware reports.

> 
> Simon says: Again, the one below seems to warrant investigation.
> 
> [Medium]
> Pre-patch, devlink_info_version_stored_put() failures inside the fw
> list loop returned to the devlink layer immediately.  After this
> refactor, pdsc_dl_fw_list_info_get() returns the error but
> pdsc_dl_info_get_v1() converts it to dev_warn_once() and continues to
> append the running fw version and the ASIC fields.
> 
> Does this mean a mid-loop failure (for example -EMSGSIZE from netlink
> attribute append) is now masked, leaving a partially populated devlink
> info reply that gets reported as success?

Valid bug. The refactor unintentionally changed v1 error handling. 
Pre-patch, devlink_*() errors returned immediately. Will restore 
original v1 behavior in v5 - propagate errors from 
pdsc_dl_fw_list_info_get().

> Simon says: but this one seems to be more a question of style that substance.
> 
> [Medium]
> On v2+ devices, errors from pdsc_dl_component_info_get() are swallowed
> into dev_warn_once() and the function falls through to the ASIC
> fields.  Pre-patch behavior always reported pdsc->dev_info.fw_version
> via DEVLINK_INFO_VERSION_GENERIC_FW.
> 
> After this change, transient failures inside pdsc_get_component_info()
> (DMA mapping failure, -ENOMEM, the -ETIMEDOUT/-EAGAIN deferred-DMA
> path, the v0-firmware return-0-without-populating branch, the
> num_components > LIST_LEN -ENOMEM branch), or even firmware enumerating
> components without setting PDS_CORE_FW_COMPONENT_INFO_F_RUNNING on the
> MAIN component, cause devlink dev info to show only asic.id, asic.rev
> and the serial number with no firmware version reported at all.
> 
> Could the v2 path either retain the unconditional running fw fallback
> from dev_info.fw_version, or fall through to pdsc_dl_info_get_v1() on
> failure, so devlink info never silently loses the fw running version?
> 
> Also, since dev_warn_once() suppresses the warning across the lifetime
> of the device, callers cannot tell that the netlink reply is partial:
> a partially populated message gets the ASIC fields appended and is
> reported as success.
> 

For the v2 error handling: will propagate devlink errors (so partial 
replies are discarded) and add a fallback to dev_info.fw_version if 
component info fails.

Thanks,
Nikhil

  reply	other threads:[~2026-06-15 19:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-14  5:00 [PATCH net-next v4 0/6] pds_core: Add PLDM firmware update and host backed memory support Nikhil P. Rao
2026-06-14  5:00 ` [PATCH v4 1/6] pds_core: add support for quiet devcmd failures Nikhil P. Rao
2026-06-15 15:34   ` Simon Horman
2026-06-15 15:37     ` Simon Horman
2026-06-15 18:53     ` Rao, Nikhil
2026-06-14  5:00 ` [PATCH v4 2/6] pds_core: add support for identity version 2 Nikhil P. Rao
2026-06-14  5:00 ` [PATCH v4 3/6] pds_core: add PLDM firmware update support via devlink flash Nikhil P. Rao
2026-06-15 15:36   ` Simon Horman
2026-06-15 19:04     ` Rao, Nikhil
2026-06-14  5:00 ` [PATCH v4 4/6] pds_core: add PLDM component info display Nikhil P. Rao
2026-06-15 16:08   ` Simon Horman
2026-06-15 19:58     ` Rao, Nikhil [this message]
2026-06-14  5:00 ` [PATCH v4 5/6] pds_core: add host backed memory support for firmware Nikhil P. Rao
2026-06-15 16:19   ` Simon Horman
2026-06-15 20:07     ` Rao, Nikhil
2026-06-14  5:00 ` [PATCH v4 6/6] pds_core: add debugfs support for host backed memory Nikhil P. Rao

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=44448066-0b2e-4b10-880a-96f6b8c5ecfa@amd.com \
    --to=nikhirao@amd.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=brett.creeley@amd.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eric.joyner@amd.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nikhil.rao@amd.com \
    --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