From patchwork Tue Nov 15 20:48:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arseniy Krasnov X-Patchwork-Id: 13044164 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3FBEDC433FE for ; Tue, 15 Nov 2022 20:48:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231533AbiKOUsN (ORCPT ); Tue, 15 Nov 2022 15:48:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229633AbiKOUsM (ORCPT ); Tue, 15 Nov 2022 15:48:12 -0500 Received: from mx.sberdevices.ru (mx.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FDE826489; Tue, 15 Nov 2022 12:48:09 -0800 (PST) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id 3E6FB5FD07; Tue, 15 Nov 2022 23:48:07 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1668545287; bh=JPGfohbosaUAmtObAbhNd5nTyTEewTH4tnrJ4R/k/CE=; h=From:To:Subject:Date:Message-ID:Content-Type:MIME-Version; b=fYvCNb4yFSo9DbBpdE4sS+9hMchiqxV+TSqt7DoH1pNqnBoHHQGPUxO4B/yiWcFh8 SILVsDThKjYG5hoJu2Qql6Wd8RdaHzg4CgPlOQwgAu7pstu6598iMHR9lx5dNN7g+2 dXyf3B9TUm1N1TAXmVdJesuil0wrzKKqwZOo09ndg5zoRCyEaYSjJicyijplNyxqQ8 Xqd2wbKV3gY4GN2vZIxZFS8mXtWXGQXqNegvWb5+AuDnCJ5OYijm+WsWyT38q9YGlt qmxqs+2h3Nm1zRL5FqAYwMOaQLAYlI8fkvcFF1CQ0fI5kRjsl6n1o/DWyndiR5Fl0y 9ry2QilmgLTug== Received: from S-MS-EXCH01.sberdevices.ru (S-MS-EXCH01.sberdevices.ru [172.16.1.4]) by mx.sberdevices.ru (Postfix) with ESMTP; Tue, 15 Nov 2022 23:48:05 +0300 (MSK) From: Arseniy Krasnov To: Stefano Garzarella CC: "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" , "virtualization@lists.linux-foundation.org" , Bobby Eshleman , kernel , Krasnov Arseniy Subject: [RFC PATCH v1 0/3] test/vsock: update two tests and add new tool Thread-Topic: [RFC PATCH v1 0/3] test/vsock: update two tests and add new tool Thread-Index: AQHY+TOPXsnrO4Inj0K6247YFI64dQ== Date: Tue, 15 Nov 2022 20:48:05 +0000 Message-ID: Accept-Language: en-US, ru-RU Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.16.1.12] Content-ID: MIME-Version: 1.0 X-KSMG-Rule-ID: 4 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiPhishing: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 1.1.2.30, bases: 2022/11/15 16:23:00 #20571948 X-KSMG-AntiVirus-Status: Clean, skipped Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-State: RFC 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(+)