drivers/rpmsg/ping: skip rpmsg ping send if endpoint is not ready#17395
drivers/rpmsg/ping: skip rpmsg ping send if endpoint is not ready#17395anchao wants to merge 1 commit intoapache:masterfrom
Conversation
drivers/rpmsg/rpmsg_ping.c
Outdated
| nxsem_init(&sem, 0, 0); | ||
|
|
||
| ret = rpmsg_send_nocopy(ept, msg, msg->len); | ||
| ret = rpmsg_sendto_nocopy(ept, msg, msg->len); |
There was a problem hiding this comment.
send will busy loop in 15s, so we replace to sendto
There was a problem hiding this comment.
but you already add the check
There was a problem hiding this comment.
Because endpoint checks can involve race conditions, to avoid holding critical sections, the endpoint state is checked in 2 phases.
There was a problem hiding this comment.
but rpmsg_send_nocopy call is_rpmsg_ept_ready too.
There was a problem hiding this comment.
rpmsg_send/rpmsg_send_nocopy sufer the same issue, why do you change the code?
There was a problem hiding this comment.
Emm... my code is rpmsg_sendto_nocopy, sendto !!!!! not rpmsg_send
There was a problem hiding this comment.
@xiaoxiang781216
Is this ID handled by a different person, or is it using AI review? It feels like you didn’t even look at the code at all
There was a problem hiding this comment.
the code already check is_rpmsg_ept_ready, I would prefer to continue use rpmsg_send_nocopy since rpmsg_sendto_nocopy is used to no name channel.
rpmsg ping send blocks for 15 seconds until the ept is ready, which is not ideal for applications that need to monitor ping status. In this PR, we will check if the ept is ready to avoid prolonged blocking in the underlying driver. Signed-off-by: chao an <anchao.archer@bytedance.com>
|
Can you include the logs from your tests? |
Thanks for reminding. I've been quite busy lately, so please hold this PR do not merge. I'll submit the log if feel free. |
|
ping @anchao |

Summary
drivers/rpmsg/ping: skip rpmsg ping send if endpoint is not ready
rpmsg ping send blocks for 15 seconds until the ept is ready, which
is not ideal for applications that need to monitor ping status.
In this PR, we will check if the ept is ready to avoid prolonged
blocking in the underlying driver.
Signed-off-by: chao an anchao.archer@bytedance.com
Impact
rpmsg ping ioctl
Testing
sim/rpproxy with rpmsg ping, qemu-armv8a(ivshmem) with rpmsg ping