Skip to content

rpmsg buf size config via vdev config space. - #106

Open
tnmysh wants to merge 3 commits into
OpenAMP:mainfrom
tnmysh:upstream_rpmsg_buf_size_config
Open

rpmsg buf size config via vdev config space.#106
tnmysh wants to merge 3 commits into
OpenAMP:mainfrom
tnmysh:upstream_rpmsg_buf_size_config

Conversation

@tnmysh

@tnmysh tnmysh commented Apr 29, 2026

Copy link
Copy Markdown
Collaborator

Corresponding Linux kernel patch series; https://lore.kernel.org/all/20251114184640.3020427-1-tanmay.shah@amd.com/

open-amp library PR: OpenAMP/open-amp#684

@tnmysh tnmysh changed the title Upstream rpmsg buf size config rpmsg buf size config via vdev config space. Apr 29, 2026
@tnmysh
tnmysh requested review from arnopo and edmooring April 29, 2026 03:50
@arnopo
arnopo requested a review from wmamills May 5, 2026 12:00
@tnmysh
tnmysh marked this pull request as ready for review May 20, 2026 15:24
@tnmysh
tnmysh marked this pull request as draft May 20, 2026 16:03
@tnmysh
tnmysh force-pushed the upstream_rpmsg_buf_size_config branch from d975033 to 85ce487 Compare May 29, 2026 20:06
@tnmysh
tnmysh marked this pull request as ready for review May 29, 2026 20:14
tnmysh added 3 commits June 16, 2026 07:31
vdev config space can be used for various rpmsg virtio configurations
such as rpmsg tx and rx single buf size.

Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
Current rpmsg device is not initialized with the config space.
Initialze the rpmsg device with the vdev config parameters from the
resource table. This configures tx and rx buffer size. Host can read
this configuration and configure tx and rx buffer size accordingly.

Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
Convert debug logs to info logs that prints tx and rx buffer size of the
rpmsg buffer.

Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
@tnmysh
tnmysh force-pushed the upstream_rpmsg_buf_size_config branch from 85ce487 to 433c534 Compare June 16, 2026 14:33
RSC_VDEV, VIRTIO_ID_RPMSG_, 31, RPMSG_VDEV_DFEATURES, 0, 0, 0,
RSC_VDEV, VIRTIO_ID_RPMSG_, 31, RPMSG_VDEV_DFEATURES, 0,
/* vdev config space len */
sizeof(struct rpmsg_virtio_config), 0,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

config_len here is sizeof(struct rpmsg_virtio_config) = 17 (with the current library struct), while .size in vdev_config below is set to 16, and the Linux v5 driver expects its own sizeof = 13. Three values for one length? Am I missing somehting?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @iuliana-prodan Thank you for the feedback.

This PR only reflects what was in v4. I haven't modified this PR as per v5. We are still discussing on the linux side, how this structure should look like, and once that is finalized, I will update this PR. IIRC, in v5 we decided that version should be u8, and remove all the reserved fields and make the structure __packed. That is why you see the difference. Please feel free to let me know if you have any other questions.

Thank you.

@nathalie-ckc

Copy link
Copy Markdown
Collaborator

2026-07-15 System Reference call:
Tanmay will address comments in this PR once we decide what goes in Linux kernel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants