OpenAMP / open-amp

The main OpenAMP library implementing RPMSG, Virtio, and Remoteproc for RTOS etc
https://www.openampproject.org/
Other
678 stars 278 forks source link

rpmsg: set ept address to incease num when alloc from the bitmap #514

Closed GUIDINGLI closed 8 months ago

GUIDINGLI commented 8 months ago

rpmsg: set ept address to incease num when alloc from the bitmap

CPU0                                CPU1
create_ept1:addr1                   create_ept1
OK                       <======    msg1
OK                       <======    msg2
OK                       <======    msg3
                           msg4
                         <======    msg4 on the virtioqueue
close_ept1                          close_ept1

create_ept2:addr1                   create_ept1
(same addr with ept1)
                           msg4
ept2 recv ept1 msg ERROR <======

The msg4 which belong to ep1, error received by ept2.

For the issue, I give a resolve method, for the rpmsg_get_address(), always return a new increased num.

This should compile with https://github.com/OpenAMP/libmetal/pull/263

GUIDINGLI commented 8 months ago

The issue is well described in the commit message. Could you also explain in the commit message the solution implemented?

@arnopo Commit message updated, please review