From 4c81ce71f93722efe3021aba03112e8304afcd41 Mon Sep 17 00:00:00 2001 From: Stefano Garzarella Date: Thu, 16 Oct 2025 17:08:01 +0200 Subject: [PATCH] vsock/README: fix typos and improve clarity Fix various grammar issues, simplify some sentences, and improve consistency throughout the document. Signed-off-by: Stefano Garzarella --- vhost-device-vsock/README.md | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/vhost-device-vsock/README.md b/vhost-device-vsock/README.md index df4024c..1dc35cf 100644 --- a/vhost-device-vsock/README.md +++ b/vhost-device-vsock/README.md @@ -149,14 +149,14 @@ Run the vhost-device-vsock device with vsock backend: ``` vhost-device-vsock --guest-cid= \ --socket= \ - --forward-cid= \ + --forward-cid= \ [--forward-listen= \ [--tx-buffer-size=host packets)>] \ [--queue-size=] \ ``` or ``` -vhost-device-vsock --vm guest_cid=,socket=,forward-cid=[,forward-listen=][,tx-buffer-size=host packets)>][,queue-size=][,groups=] +vhost-device-vsock --vm guest_cid=,socket=,forward-cid=[,forward-listen=][,tx-buffer-size=host packets)>][,queue-size=][,groups=] ``` Specify the `--vm` argument multiple times to specify multiple devices like this: @@ -211,7 +211,7 @@ qemu-system-x86_64 \ ```sh shell1$ vhost-device-vsock --vm guest-cid=4,uds-path=/tmp/vm4.vsock,socket=/tmp/vhost4.socket ``` -or if you want to configure the TX buffer size and vring queue size +Or, if you want to configure the TX buffer size and vring queue size: ```sh shell1$ vhost-device-vsock --vm guest-cid=4,uds-path=/tmp/vm4.vsock,socket=/tmp/vhost4.socket,tx-buffer-size=65536,queue-size=1024 ``` @@ -265,10 +265,9 @@ guest$ nc --vsock 2 1234 ### Sibling VM communication If you add multiple VMs with their devices configured with at least one common group name, they can communicate with -each other. If you don't explicitly specify a group name, a default group will be assigned to the device with name -`default`, and all such devices will be able to communicate with each other. Or you can choose a different list of -group names for each device, and only devices with the at least one group in common will be able to communicate with -each other. +each other. If you don't explicitly specify a group name, a default group named `default` will be assigned to the device, +and all such devices will be able to communicate with each other. You can choose a different list of group names for each +device, and only devices with at least one group in common will be able to communicate with each other. For example, if you have two VMs with CID 3 and 4, you can run the following commands to make them communicate: @@ -303,10 +302,10 @@ guest_cid4$ nc-vsock 3 1234 The vsock backend is available under the `backend_vsock` feature (enabled by default). If you want to test a guest VM that has built-in applications which communicate with another VM over AF_VSOCK, you can forward the connections from the guest -to the host machine instead of running a separate VM for easier testing using the forward-cid option. In such a case, you -would run the corresponding applications that listen for or connect with applications in the guest VM using AF_VSOCK in the -host instead of running the separate VM. For forwarding AF_VSOCK connections from the host, you can use the forward-listen -option. +to the host machine instead of running a separate VM. This makes testing easier by using the `--forward-cid` option. + +In this scenario, you run the corresponding applications on the host using AF_VSOCK instead of running a separate VM. +For forwarding AF_VSOCK connections from the host to the guest, you can use the `--forward-listen` option. For example, if the guest VM that you want to test has an application that connects to the host on port 9000 upon boot and applications that listen on port 9001 and 9002 for connections, first run vhost-device-vsock: