-
Notifications
You must be signed in to change notification settings - Fork 294
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 error log when ept->cb return error #519
base: main
Are you sure you want to change the base?
Conversation
6e00a17
to
a59efd6
Compare
@arnopo Hi, why the docs/readthedocs is always failed. Did I miss some things to do? |
you should rebase your work on main branch, seems that your 6 commits behind |
a59efd6
to
59ee97c
Compare
@arnopo Thanks, now CI passed. |
lib/rpmsg/rpmsg_virtio.c
Outdated
"unexpected callback status\r\n"); | ||
if (status < 0) { | ||
metal_log(METAL_LOG_ERROR, | ||
"ept %s, cb %p, return status %d\r\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to print ept->cb function pointer address ? only printing ept->name should be enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, you could use "ml_err" macro in place of "metal_log(METAL_LOG_ERROR",
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After some thinking, only print ept->name
is enough. Thanks.
59ee97c
to
9b3d918
Compare
add helpful log when rpmsg endpoint callback return error Signed-off-by: Guiding Li <[email protected]> Signed-off-by: Bowen Wang <[email protected]>
9b3d918
to
4fccbc1
Compare
@arnopo how about this patch? |
we have a duplication with the assert and the error message. The question is what is the expected behavior: Crash on error, just display an error message or both? Another question is why this error message is not displayed in the callback itself? Seems to me that this would be more efficient for the debug. And the user can decide to print an error and return a status 0 to not crash the system. an alternative could be to update the RPMSG_ASSERT macro to have variadic arguments, something like this ( not tested)
but sound to me better to display the message in the endpoint callback |
@arnopo OK, maybe add error log to the endpoint callback is better although it needs more works. |
This pull request has been marked as a stale pull request because it has been open (more than) 45 days with no activity. |
@CV-Bowen let's update the patch as @arnopo suggestion or close this patch. |
This pull request has been marked as a stale pull request because it has been open (more than) 45 days with no activity. |
Add helpful log when rpmsg endpoint callback return error.