rpmsg: virito: limit the buffer allocate from shared memory pool#241
Conversation
rpmsg_virtio_get_tx_buffer shouldn't allocate the number of buffer bigger than the virtio ring length of sending Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
|
This issue seems quite old and related to the first introduction of the zero copy that introduce index (b16ca55)... Here I would be agree with @kr-satish #162 (comment): I think in a first step we have to figure out if adding new buffer in TX for master, if no more buffer is available, is a good strategy... @wjliang @MarekNovakNXP and @eanjum: I would like to require your memory for this topic...
|
|
No, Linux use the similar strategy: |
arnopo
left a comment
There was a problem hiding this comment.
I re-parsed the code to better understood the impact of not limiting the allocation. I think you are right, allocating more buffer than the number of entry of the vrings is a bug.
And i don't see any code that try to extend the TX vrings...
So LGTM
Thanks,
edmooring
left a comment
There was a problem hiding this comment.
This looks good. We really shouldn't be trying to allocate more buffers than there are entries in the ring.
rpmsg_virtio_get_tx_buffer shouldn't allocate the number of
buffer bigger than the virtio ring length of sending
report here: #162 (comment)