On Fri, Jul 02, 2021 at 05:54:42PM +0800, Yunsheng Lin wrote:
On 2021/7/2 17:04, Jason Wang wrote:
[...]
I understand that you guys like to see a working testcase of virtio. I would love to do that if I have the time and knowledge of virtio, But I do not think I have the time and I am familiar enough with virtio to fix that now.
So ringtest is used for bench-marking the ring performance for different format. Virtio is only one of the supported ring format, ptr ring is another. Wrappers were used to reuse the same test logic.
Though you may see host/guest in the test, it's in fact done via two processes.
We need figure out:
- why the current ringtest.c does not fit for your requirement (it has SPSC test)
There is MPSC case used by pfifo_fast, it make more sense to use a separate selftest for ptr_ring as ptr_ring has been used by various subsystems.
- why can't we tweak the ptr_ring.c to be used by both ring_test and your benchmark
Actually that is what I do in this patch, move the specific part related to ptr_ring to ptr_ring_test.h. When the virtio testing is refactored to work, it can reuse the abstract layer in ptr_ring_test.h too.
Sounds good. But that refactoring will be up to you as a contributor.
If neither of the above work, we can invent new ptr_ring infrastructure under tests/
Thanks
.