Message ID | 20230118-support-vsock-sockmap-connectible-v1-2-d47e6294827b@bytedance.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2548503wrn; Wed, 18 Jan 2023 12:32:26 -0800 (PST) X-Google-Smtp-Source: AMrXdXsV0GYPBv4lYjJcITyNC/+oN/D9kuAn6zPisbQKcxhjnVjQUIZeFILlxKwbwLKzw1zTI/eY X-Received: by 2002:a17:90a:c7c3:b0:229:74a9:cb89 with SMTP id gf3-20020a17090ac7c300b0022974a9cb89mr14064767pjb.9.1674073946568; Wed, 18 Jan 2023 12:32:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674073946; cv=none; d=google.com; s=arc-20160816; b=AMFMLUcBmOcBxa4l8rG/eQGhyQjQz9NYZmZShzD6nYHzwwRyCQNzvu4Vtfi7xxz5AG S/VdTtSvGNaHypwH9892hY2HXG5TqR6wIAqAylfFFBFmj2BlpuzLK9Lm05ttvW3zGsBx n8UuPjpMy+2CH/36XqOk5sbVaKg9kiBZBuVdd+0PnzSf/8wJwP5GCpImhQR2P7N7Tzvz 38htRIeD+/HS1QGKSM5Ua0RcX0ij4m4YLfMyRREIabRlAYwot/r3uoVA26rprCoPilFM YHFB3OTPil9JrESrAxdzfaCF2AXGfS1101U9PcZIJOgJACaH2nUfXA2EDw8RofKTIqQe HdUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=Y8SspAPfkyjpo8sc8kHtR2b6FK9e6JUk9ZrRa3juDFE=; b=Aj9y6FJqJckrWZ3p2ZiNfOxBkENa03mv1bbp82/335mEfov2YfltBVA/unt54lXD2U hwNLxACAjeDx/wiOIzobTljtiIYoigdevwjCiYZz7lYW7Xd+zHvzfAAuX0vsCN9uskVJ vH9lDf6cEJJnmmM/1c+b92RYdwEGYt4w8vKZt+H6clzsL2EtJjTdlJF8m3NHZvK1Sa7h ts7HcPG+L5mX7HXfr7o8bEbTkM9c1vZGH34uyeu2SRRzCGZZ9kuBIQpRkt1za2D6nPjp D5H/TRIaSWbIFqzksNzn8IvwxiV5CPPnxjVTSF0Kpcr9x+Diur7w3Nn9ptOTQe2Lf/zk Bj7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=f8rHo6PO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mh12-20020a17090b4acc00b00229542314basi3418190pjb.31.2023.01.18.12.32.13; Wed, 18 Jan 2023 12:32:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=f8rHo6PO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230106AbjARUaJ (ORCPT <rfc822;pfffrao@gmail.com> + 99 others); Wed, 18 Jan 2023 15:30:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230118AbjARU3x (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 18 Jan 2023 15:29:53 -0500 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B568539BA for <linux-kernel@vger.kernel.org>; Wed, 18 Jan 2023 12:29:26 -0800 (PST) Received: by mail-pj1-x102c.google.com with SMTP id a14-20020a17090a70ce00b00229a2f73c56so3650862pjm.3 for <linux-kernel@vger.kernel.org>; Wed, 18 Jan 2023 12:29:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Y8SspAPfkyjpo8sc8kHtR2b6FK9e6JUk9ZrRa3juDFE=; b=f8rHo6PO4YO5TdnLBaE4J6q8/eQpi+BGKzSxfubcJh9QNGVWzsHzRWPXSgxj5N4Kf3 GX2EQVjBJjHaSu9WVwhJ3vT9nD2AfDKI/DmbCUsyAq3T3EYUtZaeCWiJAlqYRNkechJa Tygs5lx2A69GxGBDZDA/W9G7NDGE8I5JLs6jXJYt7o5uNXrUeotsOy7aIjQlMnniw/h7 A/SS+mzACZG656qV6nSDglIaJ8aHNVGQqNgbCDOQN6yRDtohqgODdJy6mKVe7v5YK2cz JJmcsSEc0iA5+obrcFQWa31ko9Y+WHOeQt50EuaF0WBdu9U6z132iMQfrCG+5W2lZBh7 4fsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Y8SspAPfkyjpo8sc8kHtR2b6FK9e6JUk9ZrRa3juDFE=; b=IqnFfILyOFp+ixxRntbii0NoxqWGjg+9Fq2bzuh+0niz86L9RO1GHPtxJ/LFdnn4IC ecz839JD8cKQAmfJOQZBoX0XX5tJCVeCRWpdljPwPJ5wOI9gX5ls8xJJ7ooAWxqm7Upm iRtgPa6tcEP0XQ2erB+y9F85Wa4Xf5oGtzzGKdNaxWZR86Y3S/oSO3QC5Fdfz+lJVScD EWAYvkTLoDPD4I8U+zQDwxhAiO/AMZ5pG5+Gk8JXkrl3wOefAZsVSuNDkhypfq3+DovC 4GKZIzDGQuNW8Sd4dLj9QHEGyo/jlfVpj6jSSTEHGL2WbdwB3hEgZ5m9PQ4JUSNEEGPn xyIA== X-Gm-Message-State: AFqh2koJy9rI5xe8GUa3v97sS9EEdPOp8/JXzyaeqHjMibZldpAGU3m9 5cebMT3lRJlDmV0f44lSi1FgF6EtEhUh7si7vPY= X-Received: by 2002:a17:90a:468d:b0:229:983:f3f9 with SMTP id z13-20020a17090a468d00b002290983f3f9mr25342454pjf.40.1674073765683; Wed, 18 Jan 2023 12:29:25 -0800 (PST) Received: from [127.0.1.1] (c-73-164-155-12.hsd1.wa.comcast.net. [73.164.155.12]) by smtp.gmail.com with ESMTPSA id t13-20020a17090a3b4d00b002132f3e71c6sm1724948pjf.52.2023.01.18.12.29.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Jan 2023 12:29:25 -0800 (PST) From: Bobby Eshleman <bobby.eshleman@bytedance.com> Date: Wed, 18 Jan 2023 12:27:40 -0800 Subject: [PATCH RFC 2/3] selftests/bpf: add vsock to vmtest.sh MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230118-support-vsock-sockmap-connectible-v1-2-d47e6294827b@bytedance.com> References: <20230118-support-vsock-sockmap-connectible-v1-0-d47e6294827b@bytedance.com> In-Reply-To: <20230118-support-vsock-sockmap-connectible-v1-0-d47e6294827b@bytedance.com> To: Stefan Hajnoczi <stefanha@redhat.com>, Stefano Garzarella <sgarzare@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Jason Wang <jasowang@redhat.com>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Andrii Nakryiko <andrii@kernel.org>, Mykola Lysenko <mykolal@fb.com>, Alexei Starovoitov <ast@kernel.org>, Daniel Borkmann <daniel@iogearbox.net>, Martin KaFai Lau <martin.lau@linux.dev>, Song Liu <song@kernel.org>, Yonghong Song <yhs@fb.com>, John Fastabend <john.fastabend@gmail.com>, KP Singh <kpsingh@kernel.org>, Stanislav Fomichev <sdf@google.com>, Hao Luo <haoluo@google.com>, Jiri Olsa <jolsa@kernel.org>, Shuah Khan <shuah@kernel.org> Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, Bobby Eshleman <bobby.eshleman@bytedance.com>, Cong Wang <cong.wang@bytedance.com> X-Mailer: b4 0.11.2 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755393762506584861?= X-GMAIL-MSGID: =?utf-8?q?1755393762506584861?= |
Series |
vsock: add support for sockmap
|
|
Commit Message
Bobby Eshleman
Jan. 18, 2023, 8:27 p.m. UTC
Add the ability to use vsock in the vmtest.sh script and
the test kernel config.
Signed-off-by: Bobby Eshleman <bobby.eshleman@bytedance.com>
---
tools/testing/selftests/bpf/config.x86_64 | 4 ++++
tools/testing/selftests/bpf/vmtest.sh | 1 +
2 files changed, 5 insertions(+)
Comments
On Wed, Jan 18, 2023 at 12:27:40PM -0800, Bobby Eshleman wrote: >Add the ability to use vsock in the vmtest.sh script and >the test kernel config. > >Signed-off-by: Bobby Eshleman <bobby.eshleman@bytedance.com> >--- > tools/testing/selftests/bpf/config.x86_64 | 4 ++++ > tools/testing/selftests/bpf/vmtest.sh | 1 + > 2 files changed, 5 insertions(+) > >diff --git a/tools/testing/selftests/bpf/config.x86_64 b/tools/testing/selftests/bpf/config.x86_64 >index dd97d61d325ca..db5e6b9a91711 100644 >--- a/tools/testing/selftests/bpf/config.x86_64 >+++ b/tools/testing/selftests/bpf/config.x86_64 >@@ -234,7 +234,11 @@ CONFIG_VIRTIO_BLK=y > CONFIG_VIRTIO_CONSOLE=y > CONFIG_VIRTIO_NET=y > CONFIG_VIRTIO_PCI=y >+CONFIG_VIRTIO_VSOCKETS=y >+CONFIG_VIRTIO_VSOCKETS_COMMON=y > CONFIG_VLAN_8021Q=y >+CONFIG_VSOCKETS=y >+CONFIG_VSOCKETS_LOOPBACK=y > CONFIG_X86_ACPI_CPUFREQ=y > CONFIG_X86_CPUID=y > CONFIG_X86_MSR=y >diff --git a/tools/testing/selftests/bpf/vmtest.sh b/tools/testing/selftests/bpf/vmtest.sh >index 316a56d680f25..aad27ffd4ec68 100755 >--- a/tools/testing/selftests/bpf/vmtest.sh >+++ b/tools/testing/selftests/bpf/vmtest.sh >@@ -250,6 +250,7 @@ EOF > -enable-kvm \ > -m 4G \ > -drive file="${rootfs_img}",format=raw,index=1,media=disk,if=virtio,cache=none \ >+ -device vhost-vsock-pci,guest-cid=1234 \ I'm not sure if this will work with qemu-system-s390x and qemu-system-aarch64. Maybe the "virt" machine of qemu-system-aarch64 supports PCI, but IIRC s390x doesn't support it and we should use the vhost-vsock-ccw device. In addition, we are changing only config.x86_64, so maybe we should add the vhost-vsock-pci device only for x86_64 (maybe in the QEMU_FLAGS or a new VSOCK_DEV variable), and run the tests only for that architecture. Thanks, Stefano > -kernel "${kernel_bzimage}" \ > -append "root=/dev/vda rw console=${QEMU_CONSOLE}" > } > >-- >2.30.2 >
diff --git a/tools/testing/selftests/bpf/config.x86_64 b/tools/testing/selftests/bpf/config.x86_64 index dd97d61d325ca..db5e6b9a91711 100644 --- a/tools/testing/selftests/bpf/config.x86_64 +++ b/tools/testing/selftests/bpf/config.x86_64 @@ -234,7 +234,11 @@ CONFIG_VIRTIO_BLK=y CONFIG_VIRTIO_CONSOLE=y CONFIG_VIRTIO_NET=y CONFIG_VIRTIO_PCI=y +CONFIG_VIRTIO_VSOCKETS=y +CONFIG_VIRTIO_VSOCKETS_COMMON=y CONFIG_VLAN_8021Q=y +CONFIG_VSOCKETS=y +CONFIG_VSOCKETS_LOOPBACK=y CONFIG_X86_ACPI_CPUFREQ=y CONFIG_X86_CPUID=y CONFIG_X86_MSR=y diff --git a/tools/testing/selftests/bpf/vmtest.sh b/tools/testing/selftests/bpf/vmtest.sh index 316a56d680f25..aad27ffd4ec68 100755 --- a/tools/testing/selftests/bpf/vmtest.sh +++ b/tools/testing/selftests/bpf/vmtest.sh @@ -250,6 +250,7 @@ EOF -enable-kvm \ -m 4G \ -drive file="${rootfs_img}",format=raw,index=1,media=disk,if=virtio,cache=none \ + -device vhost-vsock-pci,guest-cid=1234 \ -kernel "${kernel_bzimage}" \ -append "root=/dev/vda rw console=${QEMU_CONSOLE}" }