From: "Rao, Nikhil" <nikhirao@amd.com>
To: Paolo Abeni <pabeni@redhat.com>, netdev@vger.kernel.org
Cc: Brett Creeley <brett.creeley@amd.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
linux-kernel@vger.kernel.org, Eric Joyner <eric.joyner@amd.com>,
Vamsi Atluri <Vamsi.Atluri@amd.com>
Subject: Re: [PATCH v3 5/6] pds_core: add host backed memory support for firmware
Date: Sat, 13 Jun 2026 16:26:12 -0700 [thread overview]
Message-ID: <a26f2446-71b9-4066-b533-3d2ed565e3b4@amd.com> (raw)
In-Reply-To: <9166857f-880d-4324-9300-9cb1da600aed@redhat.com>
>> +void pdsc_host_mem_add(struct pdsc *pdsc)
>> +{
[..]
>> +
>> + for (i = 0; i < count; i++) {
>> + err = pdsc_host_mem_add_one(pdsc, i);
>> + if (err)
>> + break;
>
> When pdsc_host_mem_add_one() returns an error, pdsc->host_mem_reqs[i].pg
> will be zero.
In pdsc_host_mem_add_one(), If the MEM_ADD devcmd fails, pg is still
valid (allocated and DMA-mapped). The counter (pdsc->num_host_mem_reqs)
is incremented after both alloc_pages() and dma_map_page() succeed, with
a comment explaining why:
/* Track this allocation so pdsc_host_mem_free() can clean it up */
pdsc->num_host_mem_reqs++;
> Errors are not propagate to the caller...
Partial allocation is acceptable; firmware works with whatever memory it
gets. The initialized entries are tracked by num_host_mem_reqs and
cleaned up correctly on shutdown.
Will address - remove redundant memset, change to dev_warn.
Thanks for the review,
Nikhil
next prev parent reply other threads:[~2026-06-13 23:26 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-08 22:32 [PATCH net-next v3 0/6] pds_core: Add PLDM firmware update and host backed memory support Nikhil P. Rao
2026-06-08 22:32 ` [PATCH v3 1/6] pds_core: add support for quiet devcmd failures Nikhil P. Rao
2026-06-08 22:32 ` [PATCH v3 2/6] pds_core: add support for identity version 2 Nikhil P. Rao
2026-06-08 22:32 ` [PATCH v3 3/6] pds_core: add PLDM firmware update support via devlink flash Nikhil P. Rao
2026-06-08 22:53 ` Jacob Keller
2026-06-08 22:32 ` [PATCH v3 4/6] pds_core: add PLDM component info display Nikhil P. Rao
2026-06-08 22:32 ` [PATCH v3 5/6] pds_core: add host backed memory support for firmware Nikhil P. Rao
2026-06-13 8:17 ` Paolo Abeni
2026-06-13 23:26 ` Rao, Nikhil [this message]
2026-06-08 22:32 ` [PATCH v3 6/6] pds_core: add debugfs support for host backed memory Nikhil P. Rao
2026-06-11 1:14 ` [PATCH net-next v3 0/6] pds_core: Add PLDM firmware update and host backed memory support Rao, Nikhil
2026-06-11 15:56 ` Jacob Keller
2026-06-11 17:15 ` Rao, Nikhil
2026-06-11 18:53 ` Jacob Keller
2026-06-13 20:58 ` Jakub Kicinski
2026-06-14 0:15 ` Rao, Nikhil
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=a26f2446-71b9-4066-b533-3d2ed565e3b4@amd.com \
--to=nikhirao@amd.com \
--cc=Vamsi.Atluri@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=kuba@kernel.org \
--cc=linux-kernel@vger.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