Re: [PATCH v6 1/2] mctp pcc: Check before sending MCTP PCC response ACK

From: Adam Young
Date: Mon Nov 04 2024 - 13:45:17 EST



On 11/3/24 22:17, lihuisong (C) wrote:

I could make a further  change and allow the driver to request the remapped memory segment from the pcc layer, and couple  to the memory-remap to the client/channel.  It seems like that code, too, should be in the common layer.  However most drivers would not know to use  this function yet, so the mechanism would have to be optional, and only clean up if called this way.
I agree this method.
Don't remap twice for one shared memory.
This remaping is reasonable in PCC layer. We can let PCC client to decide if PCC layer does remap and then they use it directly.
For new driver like the driver you are uploading, driver can give PCC one flag to tell PCC layer remap when request channel.
For old PCC client driver, do not send this flag, PPC layer do not remap. So no any impact on them.


I think we are actually in agreement here.  No double mapping, but the driver MAY request the mapping happen in the PCC layer. No impact on existing drivers.