mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Adam Young <admiyo@amperemail.onmicrosoft.com>
To: Sudeep Holla <sudeep.holla@arm.com>
Cc: admiyo@os.amperecomputing.com,
	Jassi Brar <jassisinghbrar@gmail.com>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Len Brown <lenb@kernel.org>,
	Robert Moore <robert.moore@intel.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Jeremy Kerr <jk@codeconstruct.com.au>,
	Matt Johnston <matt@codeconstruct.com.au>,
	"David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	Huisong Li <lihuisong@huawei.com>
Subject: Re: [PATCH v23 1/2] mailbox/pcc: support mailbox management of the shared buffer
Date: Mon, 8 Sep 2025 12:44:28 -0400	[thread overview]
Message-ID: <bbe0a7fa-7c7e-4d59-839c-23e8fa55a750@amperemail.onmicrosoft.com> (raw)
In-Reply-To: <aL70PVhM-UVi5UrS@bogus>


On 9/8/25 11:20, Sudeep Holla wrote:
> If you are really interesting to consolidating, then move all the buffer
> management into the core. Just don't introduce things that just work on
> your platform and for your use case. You need move all the drivers to this
> new model of accessing the buffers. Otherwise I see no point as it is just
> another churn but in core mailbox PCC driver instead of a client driver
> using PCC. So, I am not OK with the change as is and needs to be reworked
> or reverted. I need sometime to understand your email and requirements.

This is kindof a large request.  I can start working on getting the 
other drivers to use the common mechanisms, but I do not have a way to 
test most of them, and there are numerous drivers.  I don't like making 
changes that I cannot test myself, but if we can get the other driver 
maintainers to test and review, I am happy to participate.

I know we use the CPPC driver, and I can show how that one would be 
consolidated.

Here is a potential path forward:

1. Revert the current patch, specifically to remove the callback function.

2.  I will post a minimal patch for the change to the mailbox api

3.  I will post patches that modify the other drivers to pass NULL in to 
the send_message path.  These will need to be reviewed and tested by the 
other driver maintainers

4. I will post a revised patch that only performs the buffer management 
for the send path.  This is essential for the MCTP over PCC driver, and 
for anything that wants to follow the PCC spec correctly.  This will 
remove pcc_mchan->manage_writes = false; This path will be triggered by 
passing a non-NULL pointer into the send data path. This is roughly half 
to the current patch.

5.  I will post a revised patch that makes use of the mailbox API 
callback defined in step 2 to allocate the memory used for the read stage.

6.I will repost my MCTP over PCC driver  that makes  use  of the updated 
patches.

Any point after step 3, we can start migrating the drivers to use the 
send mechanism.  After step 5 we can migrate the drivers to use the 
receive mechanism.


A shorter path forward would be:

1.   I will post a minimal patch for the change to the mailbox api

2. I will post a revised PCC Mailbox patch that makes use of the 
callback function, as well as an updated MCTP-PCC driver that makes use 
of that callback.  We deprecate the existing rx_alloc callback in the 
PCC Mailbox driver and ignore it in the PCC Mailbox.

3. Convert the other drivers to use the managed send/receive mechanism.

4.  Remove the flag pcc_mchan->manage_writes

I will stay engaged through the entire process, to include providing 
patches for the updated drivers, testing whatever I have access to, and 
reviewing all code that comes along these paths. I obviously prefer the 
shorter path, as it will allow me to get the MCTP-PCC driver merged. My 
team is going to be writing another, similar Mailbox implementation to 
the PCC mailbox. The more common behavior between the two 
implementations, the less code we will have to vary between drivers that 
make use of the mailboxes.





  reply	other threads:[~2025-09-08 16:44 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-15  0:10 [PATCH v23 0/2] MCTP Over PCC Transport admiyo
2025-07-15  0:10 ` [PATCH v23 1/2] mailbox/pcc: support mailbox management of the shared buffer admiyo
2025-07-15 14:08   ` Simon Horman
2025-07-22 17:10   ` Adam Young
2025-07-31 19:35     ` Adam Young
     [not found]       ` <CABb+yY3VUpfM4PKQbvcv5eHnsEbDOY0aRjcXPTf0bsr322WGng@mail.gmail.com>
2025-08-06 15:28         ` Adam Young
2025-09-04 11:00   ` Sudeep Holla
2025-09-04 17:06     ` Adam Young
2025-09-05 14:37       ` Sudeep Holla
2025-09-05 16:57         ` Adam Young
2025-09-05 20:35           ` Adam Young
2025-09-08 14:58     ` Adam Young
2025-09-08 15:20       ` Sudeep Holla
2025-09-08 16:44         ` Adam Young [this message]
2025-09-12 15:54           ` Adam Young
2025-07-15  0:10 ` [PATCH v23 2/2] mctp pcc: Implement MCTP over PCC Transport admiyo
2025-07-15 14:08   ` Simon Horman

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=bbe0a7fa-7c7e-4d59-839c-23e8fa55a750@amperemail.onmicrosoft.com \
    --to=admiyo@amperemail.onmicrosoft.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=admiyo@os.amperecomputing.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jassisinghbrar@gmail.com \
    --cc=jk@codeconstruct.com.au \
    --cc=kuba@kernel.org \
    --cc=lenb@kernel.org \
    --cc=lihuisong@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt@codeconstruct.com.au \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rafael@kernel.org \
    --cc=robert.moore@intel.com \
    --cc=sudeep.holla@arm.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

all inboxes | Powered by JetHome®