mirror of
https://github.com/rust-vmm/vhost-device.git
synced 2025-12-26 14:41:23 +00:00
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 <sgarzare@redhat.com>
This commit is contained in:
parent
7ae77a1b3c
commit
4c81ce71f9
@ -149,14 +149,14 @@ Run the vhost-device-vsock device with vsock backend:
|
||||
```
|
||||
vhost-device-vsock --guest-cid=<CID assigned to the guest> \
|
||||
--socket=<path to the Unix socket to be created to communicate with the VMM via the vhost-user protocol> \
|
||||
--forward-cid=<the vsock CID to which the connections from guest should be forwarded> \
|
||||
--forward-cid=<the vsock CID to which the connections from the guest should be forwarded> \
|
||||
[--forward-listen=<port numbers separated by '+' for forwarding connections from host to guest> \
|
||||
[--tx-buffer-size=<size of the buffer used for the TX virtqueue (guest->host packets)>] \
|
||||
[--queue-size=<size of the vring queue>] \
|
||||
```
|
||||
or
|
||||
```
|
||||
vhost-device-vsock --vm guest_cid=<CID assigned to the guest>,socket=<path to the Unix socket to be created to communicate with the VMM via the vhost-user protocol>,forward-cid=<the vsock CID to which the connections from guest should be forwarded>[,forward-listen=<port numbers separated by '+' for forwarding connections from host to guest>][,tx-buffer-size=<size of the buffer used for the TX virtqueue (guest->host packets)>][,queue-size=<size of the vring queue>][,groups=<list of group names to which the device belongs concatenated with '+' delimiter>]
|
||||
vhost-device-vsock --vm guest_cid=<CID assigned to the guest>,socket=<path to the Unix socket to be created to communicate with the VMM via the vhost-user protocol>,forward-cid=<the vsock CID to which the connections from the guest should be forwarded>[,forward-listen=<port numbers separated by '+' for forwarding connections from host to guest>][,tx-buffer-size=<size of the buffer used for the TX virtqueue (guest->host packets)>][,queue-size=<size of the vring queue>][,groups=<list of group names to which the device belongs concatenated with '+' delimiter>]
|
||||
```
|
||||
|
||||
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:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user