In order to reduce the amount of copies in the rpmsg framework, it is necessary for clients to take brief ownership of the receive buffer. Add the capability for clients to notify the rpmsg framework and the underlying transports when it is going to hold onto a buffer and also notify when the client is done with the buffer. In the .rx_cb of the rpmsg drivers, if they wish to use the received buffer at a later point, they should return RPMSG_DEFER. Otherwise returning RPMSG_HANDLED (0) will signal the framework that the client is done with the resources and can continue with cleanup. The clients should check if their rpmsg endpoint supports the rx_done operation with the new state variable in the rpmsg_endpoint since not all endpoints will have the ability to support this operation. Bug: 235577039 Link: https://lore.kernel.org/lkml/1654651005-15475-2-git-send-email-quic_clew@quicinc.com/ Change-Id: I008ae73d54f9d8319e9dbcafd7d9c7007fa4f234 Signed-off-by: Chris Lew <quic_clew@quicinc.com>
9.9 KiB
9.9 KiB