[RFC,v1,0/3] test/vsock: update two tests and add new tool

Message ID ba294dff-812a-bfc2-a43c-286f99aee0b8@sberdevices.ru
Headers
Series test/vsock: update two tests and add new tool |

Message

Arseniy Krasnov Nov. 15, 2022, 8:48 p.m. UTC
  Since there is work on several significant updates for vsock(virtio/
vsock especially): skbuff, DGRAM, zerocopy rx/tx, so I think that this
patchset will be useful.

This patchset updates vsock tests and tools a little bit. First of all
it updates test suite: two new tests are added. One test is reworked
message bound test. Now it is more complex. Instead of sending 1 byte
messages with one MSG_EOR bit, it sends messages of random length(one
half of messages are smaller than page size, second half are bigger)
with random number of MSG_EOR bits set. Receiver also don't know total
number of messages. Message bounds control is maintained by hash sum
of messages length calculation. Second test is for SOCK_SEQPACKET - it
tries to send message with length more than allowed. I think both tests
will be useful for DGRAM support also.

Third thing that this patchset adds is small utility to test vsock
performance for both rx and tx. I think this util could be useful as
'iperf', because:
1) It is small comparing to 'iperf()', so it very easy to add new
   mode or feature to it(especially vsock specific).
2) It is located in kernel source tree, so it could be updated by the
   same patchset which changes related kernel functionality in vsock.

I used this util very often to check performance of my rx zerocopy
support(this tool has rx zerocopy support, but not in this patchset).

Patchset was rebased and tested on skbuff patch from Bobby Eshleman:
https://lore.kernel.org/lkml/20221110171723.24263-1-bobby.eshleman@bytedance.com/

All 3 patches are from my previous big patchset for virtio/vsock rx
zerocopy - they are not related to zerocopy, so Stefano suggested to
exclude them from patchset.

Arseniy Krasnov(3):
 test/vsock: rework message bound test
 test/vsock: add big message test
 test/vsock: vsock_perf utility

 tools/testing/vsock/Makefile     |   1 +
 tools/testing/vsock/vsock_perf.c | 386 +++++++++++++++++++++++++++++++++++++++
 tools/testing/vsock/vsock_test.c |  62 +++++++
 3 files changed, 449 insertions(+)

-- 
2.25.1