linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH v2 0/6] vsock: update tools and error handling
@ 2022-11-25 17:00 Arseniy Krasnov
  2022-11-25 17:03 ` [RFC PATCH v2 1/6] vsock: return errors other than -ENOMEM to socket Arseniy Krasnov
                   ` (5 more replies)
  0 siblings, 6 replies; 20+ messages in thread
From: Arseniy Krasnov @ 2022-11-25 17:00 UTC (permalink / raw)
  To: Stefano Garzarella, David S. Miller, edumazet, Jakub Kicinski,
	Paolo Abeni, kys, haiyangz, wei.liu, Dexuan Cui, Bryan Tan,
	Vishnu Dasa, Bobby Eshleman, Arseniy Krasnov, Krasnov Arseniy,
	Bobby Eshleman
  Cc: linux-kernel, virtualization, netdev, linux-hyperv, kernel

Patchset consists of two parts:

1) Kernel patches
Three patches from Bobby Eshleman. I took single patch from Bobby:
https://lore.kernel.org/lkml/d81818b868216c774613dd03641fcfe63cc55a45
.1660362668.git.bobby.eshleman@bytedance.com/ and split it to three
patches according different parts of vsock subsystem.

I used it, because for SOCK_SEQPACKET big messages handling was broken -
ENOMEM was returned instead of EMSGSIZE. And anyway, current logic which
always replaces any error code returned by transport to ENOMEM looks
strange for me also(for example in EMSGSIZE case it was changed to
ENOMEM). So, one of three patches updates af_vsock.c, keeping error
code from transport untouched, while another 2 patches save original
behaviour for Hyper-V and VMCI.

Please, Hyper-V and VMCI guys, could You take a look? Is previous
behaviour really needed?

2) Tool patches
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 v4 patch from Bobby Eshleman:
https://lore.kernel.org/netdev/20221124060750.48223-1-bobby.eshleman@bytedance.com/

Changelog:
 v1 -> v2:
 - Three new patches from Bobby Eshleman to kernel part
 - Message bounds test: some refactoring and add comment to describe
   hashing purpose
 - Big message test: check 'errno' for EMSGSIZE and  move new test to
   the end of tests array
 - vsock_perf:
   - update README file
   - add simple usage example to commit message
   - update '-h' (help) output
   - use 'stdout' for output instead of 'stderr'
   - use 'strtol' instead of 'atoi'

Bobby Eshleman(3):
 vsock: return errors other than -ENOMEM to socket
 hv_sock: always return ENOMEM in case of error
 vsock/vmci: always return ENOMEM in case of error

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

 net/vmw_vsock/af_vsock.c         |   3 +-
 net/vmw_vsock/hyperv_transport.c |   2 +-
 net/vmw_vsock/vmci_transport.c   |   9 +-
 tools/testing/vsock/Makefile     |   1 +
 tools/testing/vsock/README       |  34 ++++
 tools/testing/vsock/control.c    |  28 +++
 tools/testing/vsock/control.h    |   2 +
 tools/testing/vsock/util.c       |  13 ++
 tools/testing/vsock/util.h       |   1 +
 tools/testing/vsock/vsock_perf.c | 400 +++++++++++++++++++++++++++++++++++++++
 tools/testing/vsock/vsock_test.c | 193 +++++++++++++++++--
 11 files changed, 670 insertions(+), 16 deletions(-)

-- 
2.25.1

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2022-12-05  9:39 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-25 17:00 [RFC PATCH v2 0/6] vsock: update tools and error handling Arseniy Krasnov
2022-11-25 17:03 ` [RFC PATCH v2 1/6] vsock: return errors other than -ENOMEM to socket Arseniy Krasnov
2022-12-01  9:17   ` Stefano Garzarella
2022-11-25 17:05 ` [RFC PATCH v2 2/6] hv_sock: always return ENOMEM in case of error Arseniy Krasnov
2022-12-01  9:23   ` Stefano Garzarella
2022-12-01 21:43     ` Dexuan Cui
2022-11-25 17:08 ` [RFC PATCH v2 3/6] vsock/vmci: " Arseniy Krasnov
     [not found]   ` <20221201093048.q2pradrgn5limcfb@sgarzare-redhat>
2022-12-01 11:36     ` Arseniy Krasnov
2022-12-01 15:14     ` Vishnu Dasa
2022-12-01 15:16       ` Arseniy Krasnov
2022-11-25 17:10 ` [RFC PATCH v2 4/6] test/vsock: rework message bounds test Arseniy Krasnov
2022-12-01  9:41   ` Stefano Garzarella
2022-12-01 11:40     ` Arseniy Krasnov
2022-11-25 17:13 ` [RFC PATCH v2 5/6] test/vsock: add big message test Arseniy Krasnov
2022-12-01  9:45   ` Stefano Garzarella
2022-12-01 11:44     ` Arseniy Krasnov
2022-12-05  9:38       ` Stefano Garzarella
2022-11-25 17:15 ` [RFC PATCH v2 6/6] test/vsock: vsock_perf utility Arseniy Krasnov
2022-12-01 10:21   ` Stefano Garzarella
2022-12-01 11:46     ` Arseniy Krasnov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).