hzc04 opened a new issue, #11555:
URL: https://github.com/apache/nuttx/issues/11555

   Hello, I've been reading the code related to rptun recently, and I have a 
question about the implementation of rpmsg_register_callback().
   
   I think after creating the rpmsg_device, I need to register a rpmsg service 
using rpmsg_register_callback(). This service will be added to g_rptun_cb.
   Until the remote send a ns msg to create rpmsg channel, the host will scan 
the g_rptun_cb and call ns_bind() to bind a rpmsg_endpoint. This endpoint will 
be added to priv->bind. After that, we can communicate normally, and see what 
endpoints have been bound based on priv->bind.
   
   That's my current understanding. I'm not sure I've got it right.
   
   I don't understand why, in the process of rpmsg_register_callback(), if it 
finds that this cb(or endpoint?) is already bound, it removes the cb from 
priv->bind and triggers ns_bind()..? 
(https://github.com/apache/nuttx/blob/master/drivers/rptun/rptun.c#L1111) Don't 
need to trigger ns_bind() via ns msg?
   
   Can you please correct my understanding? Thank you.
   
   Would you please explain this to me? Thanks a lot!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to