Skip to content

transport: Release the Out-of-band Buffer once Read is done to reuse it.

Harsh Patel requested to merge hp/transport_buffer_fix into main

Currently Transport uses 'struct mod_transport_buffer' to manages shared payload buffer between sender and receiver. The buffer's 'status' field synchronizes the access to ensure that only one agent uses the buffer at a time.

Previously, the buffer was not properly unlocked after message was read by the receiver, preventing reuse for subsequent transactions.

This change updates 'transport_release_channel_lock()' to mark shared buffer as free(by setting the status bit) once the receiver has finished processing the message. This allows both sender and receiver to safely reuse the shared buffer for future data exchange.

Flow:

  • Sender checks if the buffer is free (status[0] set).
  • If free, sender writes data and locks the buffer (clears status[0]).
  • Receiver reads and processes the message.
  • After processing, receiver calls transport_release_channel_lock() to set status[0], marking the buffer as free again.

This logic applies only to out-of-band channels that uses the shared buffer.

Signed-off-by: Harsh Patel harsh.patel@arm.com

Merge request reports

Loading