Skip to content

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

Merged
arnopo merged 1 commit into
OpenAMP:mainfrom
CV-Bowen:rpmsg_wait_notify
Dec 5, 2023
Merged

openamp: add new ops wait_notified() to avoid looping in tx buffer get#518
arnopo merged 1 commit into
OpenAMP:mainfrom
CV-Bowen:rpmsg_wait_notify

Conversation

@CV-Bowen

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

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor Author

@arnopo

arnopo commented Oct 16, 2023

Copy link
Copy Markdown
Collaborator

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

@CV-Bowen

Copy link
Copy Markdown
Contributor Author

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

Comment thread lib/remoteproc/remoteproc_virtio.c Outdated

@arnopo arnopo left a comment

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.

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

Comment thread lib/include/openamp/remoteproc_virtio.h Outdated
Comment thread lib/include/openamp/remoteproc_virtio.h
Comment thread lib/include/openamp/remoteproc_virtio.h
Comment thread lib/include/openamp/rpmsg_virtio.h
Comment thread lib/rpmsg/rpmsg_virtio.c Outdated
Comment thread lib/remoteproc/remoteproc_virtio.c
Comment thread lib/remoteproc/remoteproc_virtio.c Outdated
Comment thread lib/include/openamp/rpmsg_virtio.h Outdated
Comment thread lib/include/openamp/virtio.h
Comment thread lib/include/openamp/remoteproc_virtio.h Outdated
@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
Comment thread lib/include/openamp/rpmsg_virtio.h Outdated
Comment thread lib/remoteproc/remoteproc.c Outdated

@arnopo arnopo left a comment

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.

few additional minor comments

Comment thread lib/include/openamp/remoteproc_virtio.h Outdated
Comment thread lib/include/openamp/remoteproc_virtio.h Outdated
Comment thread lib/include/openamp/virtio.h Outdated
Comment thread lib/remoteproc/remoteproc.c Outdated

@arnopo arnopo left a comment

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.

LGTM with a last comment

Comment thread lib/remoteproc/remoteproc.c Outdated
@arnopo arnopo requested review from edmooring and tnmysh November 2, 2023 13:29
@arnopo

arnopo commented Nov 20, 2023

Copy link
Copy Markdown
Collaborator

@edmooring, @tnmysh ,

Please, could your review this PR?

Comment thread lib/remoteproc/remoteproc.c Outdated
Comment thread lib/include/openamp/rpmsg.h Outdated
Comment thread lib/rpmsg/rpmsg_virtio.c
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 <liguiding1@xiaomi.com>
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>

@tnmysh tnmysh left a comment

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.

LGTM.

@edmooring edmooring left a comment

Copy link
Copy Markdown
Contributor

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
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