From: Stefano Brivio <sbrivio@redhat.com>
To: Laurent Vivier <lvivier@redhat.com>
Cc: passt-dev@passt.top
Subject: Re: [PATCH v7 0/8] Add vhost-user support to passt. (part 3)
Date: Wed, 9 Oct 2024 15:07:36 +0200 [thread overview]
Message-ID: <20241009150736.27ccfb56@elisabeth> (raw)
In-Reply-To: <20241009090716.691361-1-lvivier@redhat.com>
On Wed, 9 Oct 2024 11:07:07 +0200
Laurent Vivier <lvivier@redhat.com> wrote:
> This series of patches adds vhost-user support to passt
> and then allows passt to connect to QEMU network backend using
> virtqueue rather than a socket.
>
> With QEMU, rather than using to connect:
>
> -netdev stream,id=s,server=off,addr.type=unix,addr.path=/tmp/passt_1.socket
>
> we will use:
>
> -chardev socket,id=chr0,path=/tmp/passt_1.socket
> -netdev vhost-user,id=netdev0,chardev=chr0
> -device virtio-net,netdev=netdev0
> -object memory-backend-memfd,id=memfd0,share=on,size=$RAMSIZE
> -numa node,memdev=memfd0
>
> The memory backend is needed to share data between passt and QEMU.
I just got the tests from 8/8 hanging like this (display with >= 212
columns):
guest$ socat -u TCP6-LISTEN:10001 OPEN:test_big.bin,create,trunc │Starting test: TCP/IPv6: host to ns: small transfer
guest$ cmp test_big.bin /root/big.bin │? cmp /tmp/passt-tests-KLvyGO/passt_vu_in_ns/tcp/test_ns_small.bin /home/sbrivio/passt/test/small.bin
guest$ socat -u TCP6-LISTEN:10001 OPEN:test_big.bin,create,trunc │...passed.
guest$ cmp test_big.bin /root/big.bin │
guest$ socat -u TCP6-LISTEN:10001 OPEN:test_small.bin,create,trunc │Starting test: TCP/IPv6: guest to host: small transfer
guest$ cmp test_small.bin /root/small.bin │? cmp /tmp/passt-tests-KLvyGO/passt_vu_in_ns/tcp/test_small.bin /home/sbrivio/passt/test/small.bin
guest$ socat -u OPEN:/root/small.bin TCP6:[2001:db8:9a55::1]:10003 │...passed.
guest$ socat -u OPEN:/root/small.bin TCP6:[2001:db8:9a55::2]:10002 │
guest$ socat -u TCP6-LISTEN:10001 OPEN:test_small.bin,create,trunc │Starting test: TCP/IPv6: guest to ns: small transfer
guest$ cmp test_small.bin /root/small.bin │? cmp /tmp/passt-tests-KLvyGO/passt_vu_in_ns/tcp/test_ns_small.bin /home/sbrivio/passt/test/small.bin
guest$ socat -u TCP6-LISTEN:10001 OPEN:test_small.bin,create,trunc │...passed.
guest$ cmp test_small.bin /root/small.bin │
guest$ which socat ip jq >/dev/null │Starting test: TCP/IPv6: ns to host (spliced): small transfer
guest$ socat -u UDP4-LISTEN:10001,null-eof OPEN:test.bin,create,trunc │? cmp /tmp/passt-tests-KLvyGO/passt_vu_in_ns/tcp/test_small.bin /home/sbrivio/passt/test/small.bin
│...passed.
──guest──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
ns$ socat -u OPEN:/home/sbrivio/passt/test/big.bin TCP6:[2001:db8:9a55::1]:10003 │Starting test: TCP/IPv6: ns to host (via tap): small transfer
ns$ socat -u OPEN:/home/sbrivio/passt/test/big.bin TCP6:[::1]:10001 │? cmp /tmp/passt-tests-KLvyGO/passt_vu_in_ns/tcp/test_small.bin /home/sbrivio/passt/test/small.bin
ns$ ip -j link show | jq -rM '.[] | select(.link_type == "ether").ifname' │...passed.
enp9s0 │
ns$ ip -j -6 addr show|jq -rM '.[] | select(.ifname == "enp9s0").addr_info[0].local' │Starting test: TCP/IPv6: ns to guest (using loopback address): small transfer
2a01:4f8:222:904::2 │...passed.
ns$ socat -u OPEN:/home/sbrivio/passt/test/big.bin TCP6:[2a01:4f8:222:904::2]:10001 │
ns$ socat -u TCP6-LISTEN:10002 OPEN:/tmp/passt-tests-KLvyGO/passt_vu_in_ns/tcp/test_ns_small.bin,create,trunc │Starting test: TCP/IPv6: ns to guest (using namespace address): small transfer
ns$ socat -u TCP6-LISTEN:10002 OPEN:/tmp/passt-tests-KLvyGO/passt_vu_in_ns/tcp/test_ns_small.bin │...passed.
ns$ socat -u OPEN:/home/sbrivio/passt/test/small.bin TCP6:[::1]:10003 │
ns$ socat -u OPEN:/home/sbrivio/passt/test/small.bin TCP6:[2001:db8:9a55::1]:10003 │==================================================================================================================
ns$ socat -u OPEN:/home/sbrivio/passt/test/small.bin TCP6:[::1]:10001 │Starting tests in file: passt_vu_in_ns/udp
ns$ socat -u OPEN:/home/sbrivio/passt/test/small.bin TCP6:[2a01:4f8:222:904::2]:10001 │
ns$ which socat ip jq >/dev/null │Starting test: UDP/IPv4: host to guest
ns$ │
──namespace─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬────────────────────┴──passt_vu_in_ns/udp [1/16] - UDP/IPv4: host to guest─────────────────────────────────────────────────────────────
host$ socat -u OPEN:/home/sbrivio/passt/test/big.bin TCP4:127.0.0.1:10001 │NDP/DHCPv6:
host$ socat -u OPEN:/home/sbrivio/passt/test/big.bin TCP4:127.0.0.1:10002 │ assign: 2a01:4f8:222:904::2
host$ socat -u TCP4-LISTEN:10003 OPEN:/tmp/passt-tests-KLvyGO/passt_vu_in_ns/tcp/test_big.bin,create,trunc │ router: fe80::1
host$ socat -u TCP4-LISTEN:10003 OPEN:/tmp/passt-tests-KLvyGO/passt_vu_in_ns/tcp/test_big.bin,create,trunc │ our link-local: fe80::1
host$ socat -u TCP4-LISTEN:10003 OPEN:/tmp/passt-tests-KLvyGO/passt_vu_in_ns/tcp/test_big.bin,create,trunc │DNS:
host$ socat -u OPEN:/home/sbrivio/passt/test/small.bin TCP4:127.0.0.1:10001 │ 2a01:4ff:ff00::add:2
host$ socat -u OPEN:/home/sbrivio/passt/test/small.bin TCP4:127.0.0.1:10002 │ 2a01:4ff:ff00::add:1
host$ socat -u TCP4-LISTEN:10003 OPEN:/tmp/passt-tests-KLvyGO/passt_vu_in_ns/tcp/test_small.bin,create,trunc │You can start qemu with:
host$ socat -u TCP4-LISTEN:10003 OPEN:/tmp/passt-tests-KLvyGO/passt_vu_in_ns/tcp/test_small.bin,create,trunc │ kvm ... -chardev socket,id=chr0,path=/tmp/passt-tests-KLvyGO/passt_in_ns/passt.socket -netdev vhost-user,id=netdev0,chardev=chr0 -d
host$ socat -u TCP4-LISTEN:10003 OPEN:/tmp/passt-tests-KLvyGO/passt_vu_in_ns/tcp/test_small.bin,create,trunc │evice virtio-net,netdev=netdev0 -object memory-backend-memfd,id=memfd0,share=on,size=$RAMSIZE -numa node,memdev=memfd0
host$ socat -u OPEN:/home/sbrivio/passt/test/big.bin TCP6:[::1]:10001 │
host$ socat -u OPEN:/home/sbrivio/passt/test/big.bin TCP6:[::1]:10002 │accepted connection from PID 4848
host$ socat -u TCP6-LISTEN:10003 OPEN:/tmp/passt-tests-KLvyGO/passt_vu_in_ns/tcp/test_big.bin,create,trunc │==4846== Warning: set address range perms: large range [0x59c8f000, 0x119c8f000) (defined)
host$ socat -u TCP6-LISTEN:10003 OPEN:/tmp/passt-tests-KLvyGO/passt_vu_in_ns/tcp/test_big.bin,create,trunc │==4846== Warning: set address range perms: large range [0x119c8f000, 0x519c8f000) (defined)
host$ socat -u TCP6-LISTEN:10003 OPEN:/tmp/passt-tests-KLvyGO/passt_vu_in_ns/tcp/test_big.bin,create,trunc │NDP: received RS, sending RA
host$ socat -u OPEN:/home/sbrivio/passt/test/small.bin TCP6:[::1]:10001 │DHCP: offer to discover
host$ socat -u OPEN:/home/sbrivio/passt/test/small.bin TCP6:[::1]:10002 │ from 52:54:00:12:34:56
host$ socat -u TCP6-LISTEN:10003 OPEN:/tmp/passt-tests-KLvyGO/passt_vu_in_ns/tcp/test_small.bin,create,trunc │DHCP: ack to request
host$ socat -u TCP6-LISTEN:10003 OPEN:/tmp/passt-tests-KLvyGO/passt_vu_in_ns/tcp/test_small.bin,create,trunc │ from 52:54:00:12:34:56
host$ socat -u TCP6-LISTEN:10003 OPEN:/tmp/passt-tests-KLvyGO/passt_vu_in_ns/tcp/test_small.bin,create,trunc │DHCPv6: received SOLICIT, sending ADVERTISE
host$ which socat ip jq >/dev/null │DHCPv6: received REQUEST/RENEW/CONFIRM, sending REPLY
host$ socat -u OPEN:/home/sbrivio/passt/test/medium.bin UDP4:127.0.0.1:10001,shut-null │NDP: received NS, sending NA
host$ │
──host──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴──passt in pasta (namespace)───────────────────────────────────────────────────────────────────────────────────────────────────────────
Testing commit: 529d9fd test: Add tests for passt in vhost-user mode PASS: 192 | FAIL: 0 | 2024-10-09T12:39:37+00:00
...that is, in passt_vu_in_ns/udp, on the basic "UDP/IPv4: host to guest"
test, the client is already done, but the server gets nothing. It doesn't
look like a race condition in the test itself, because if I re-run the
client manually the server is still stuck, but I didn't really investigate,
yet.
The server is just waiting for data:
$ ssh -F /tmp/passt-tests-KLvyGO/passt_in_ns/context_guest.ssh guest sh
cd /proc
cat 562/cmdline
socat-uUDP6-LISTEN:10001,null-eofOPEN:test.bin,create,trunc
strace -p 562
strace: Process 562 attached
pselect6(6, [5], [], [], NULL, NULL
--
Stefano
next prev parent reply other threads:[~2024-10-09 13:07 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-09 9:07 [PATCH v7 0/8] Add vhost-user support to passt. (part 3) Laurent Vivier
2024-10-09 9:07 ` [PATCH v7 1/8] packet: replace struct desc by struct iovec Laurent Vivier
2024-10-09 9:07 ` [PATCH v7 2/8] vhost-user: introduce virtio API Laurent Vivier
2024-10-09 9:07 ` [PATCH v7 3/8] vhost-user: introduce vhost-user API Laurent Vivier
2024-10-09 9:07 ` [PATCH v7 4/8] udp: Prepare udp.c to be shared with vhost-user Laurent Vivier
2024-10-09 9:07 ` [PATCH v7 5/8] tcp: Export headers functions Laurent Vivier
2024-10-09 9:07 ` [PATCH v7 6/8] passt: rename tap_sock_init() to tap_backend_init() Laurent Vivier
2024-10-09 9:07 ` [PATCH v7 7/8] vhost-user: add vhost-user Laurent Vivier
2024-10-09 9:07 ` [PATCH v7 8/8] test: Add tests for passt in vhost-user mode Laurent Vivier
2024-10-09 13:07 ` Stefano Brivio [this message]
2024-10-09 14:50 ` [PATCH v7 0/8] Add vhost-user support to passt. (part 3) Laurent Vivier
2024-10-09 17:37 ` Stefano Brivio
2024-10-10 7:08 ` Stefano Brivio
2024-10-10 7:43 ` Laurent Vivier
2024-10-10 7:45 ` Laurent Vivier
2024-10-10 7:52 ` Stefano Brivio
2024-10-11 18:07 ` Stefano Brivio
2024-10-17 0:10 ` Stefano Brivio
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241009150736.27ccfb56@elisabeth \
--to=sbrivio@redhat.com \
--cc=lvivier@redhat.com \
--cc=passt-dev@passt.top \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
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 IMAP folder(s).