Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openamp: add new ops wait_notified() to avoid looping in tx buffer get #518

Merged
merged 1 commit into from
Dec 5, 2023

Conversation

CV-Bowen
Copy link
Contributor

@CV-Bowen CV-Bowen commented Oct 16, 2023

Give users a chance to handle the no tx buffer situation when get tx buffer, with this patch, user can call rproc_virtio_set_wait_notified() to set the wait_notified() callback and this callback function will be called to handle the wait when no tx buffer in tx virtqueue.

@CV-Bowen
Copy link
Contributor Author

@arnopo
Copy link
Collaborator

arnopo commented Oct 16, 2023

I suppose that this one is related to #347, right?

@CV-Bowen
Copy link
Contributor Author

@arnopo Yes, but I can't push #347, so I create this PR.

Copy link
Collaborator

@arnopo arnopo left a comment

Choose a reason for hiding this comment

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

Some comments, hoping that I remember well the previous discussions on this subject.

lib/include/openamp/remoteproc_virtio.h Outdated Show resolved Hide resolved
lib/include/openamp/remoteproc_virtio.h Show resolved Hide resolved
lib/include/openamp/remoteproc_virtio.h Show resolved Hide resolved
lib/include/openamp/rpmsg_virtio.h Outdated Show resolved Hide resolved
lib/rpmsg/rpmsg_virtio.c Outdated Show resolved Hide resolved
lib/remoteproc/remoteproc_virtio.c Show resolved Hide resolved
lib/remoteproc/remoteproc_virtio.c Outdated Show resolved Hide resolved
lib/include/openamp/rpmsg_virtio.h Outdated Show resolved Hide resolved
lib/include/openamp/virtio.h Show resolved Hide resolved
lib/include/openamp/remoteproc_virtio.h Outdated Show resolved Hide resolved
@CV-Bowen CV-Bowen force-pushed the rpmsg_wait_notify branch 3 times, most recently from 91e639a to 5fc0979 Compare October 19, 2023 14:09
lib/include/openamp/rpmsg_virtio.h Outdated Show resolved Hide resolved
lib/remoteproc/remoteproc.c Outdated Show resolved Hide resolved
Copy link
Collaborator

@arnopo arnopo left a comment

Choose a reason for hiding this comment

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

few additional minor comments

lib/include/openamp/remoteproc_virtio.h Outdated Show resolved Hide resolved
lib/include/openamp/remoteproc_virtio.h Outdated Show resolved Hide resolved
lib/include/openamp/virtio.h Outdated Show resolved Hide resolved
lib/remoteproc/remoteproc.c Outdated Show resolved Hide resolved
Copy link
Collaborator

@arnopo arnopo left a comment

Choose a reason for hiding this comment

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

LGTM with a last comment

lib/remoteproc/remoteproc.c Outdated Show resolved Hide resolved
@arnopo
Copy link
Collaborator

arnopo commented Nov 20, 2023

@edmooring, @tnmysh ,

Please, could your review this PR?

lib/remoteproc/remoteproc.c Outdated Show resolved Hide resolved
lib/include/openamp/rpmsg.h Outdated Show resolved Hide resolved
Give users a chance to handle the no tx buffer situation when get tx
buffer, with this patch, user can call rproc_virtio_set_wait_notified()
to set the wait_notified() callback and this callback function will be
called to handle the wait when no tx buffer in tx virtqueue.

Signed-off-by: Guiding Li <[email protected]>
Signed-off-by: Bowen Wang <[email protected]>
Copy link
Collaborator

@tnmysh tnmysh left a comment

Choose a reason for hiding this comment

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

LGTM.

Copy link
Contributor

@edmooring edmooring left a comment

Choose a reason for hiding this comment

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

Looks good to go.

@arnopo arnopo merged commit 95802c1 into OpenAMP:main Dec 5, 2023
3 checks passed
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.

6 participants