Bumps the vhost-device group with 17 updates in the /staging directory: | Package | From | To | | --- | --- | --- | | [clap](https://github.com/clap-rs/clap) | `4.5.16` | `4.5.19` | | [libc](https://github.com/rust-lang/libc) | `0.2.158` | `0.2.159` | | [thiserror](https://github.com/dtolnay/thiserror) | `1.0.63` | `1.0.64` | | [futures-executor](https://github.com/rust-lang/futures-rs) | `0.3.30` | `0.3.31` | | [vhost](https://github.com/rust-vmm/vhost) | `0.11.0` | `0.12.0` | | [vhost-user-backend](https://github.com/rust-vmm/vhost) | `0.15.0` | `0.16.0` | | [virtio-queue](https://github.com/rust-vmm/vm-virtio) | `0.12.0` | `0.13.0` | | [vm-memory](https://github.com/rust-vmm/vm-memory) | `0.14.1` | `0.15.0` | | [rstest](https://github.com/la10736/rstest) | `0.22.0` | `0.23.0` | | [tempfile](https://github.com/Stebalien/tempfile) | `3.12.0` | `3.13.0` | | [anyhow](https://github.com/dtolnay/anyhow) | `1.0.86` | `1.0.89` | | [autocfg](https://github.com/cuviper/autocfg) | `1.3.0` | `1.4.0` | | [futures](https://github.com/rust-lang/futures-rs) | `0.3.30` | `0.3.31` | | [indexmap](https://github.com/indexmap-rs/indexmap) | `2.4.0` | `2.6.0` | | [once_cell](https://github.com/matklad/once_cell) | `1.19.0` | `1.20.2` | | [regex](https://github.com/rust-lang/regex) | `1.10.6` | `1.11.0` | | [serde](https://github.com/serde-rs/serde) | `1.0.209` | `1.0.210` | Updates `clap` from 4.5.16 to 4.5.19 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.16...clap_complete-v4.5.19) Updates `env_logger` from 0.11.5 to 0.10.2 - [Release notes](https://github.com/rust-cli/env_logger/releases) - [Changelog](https://github.com/rust-cli/env_logger/blob/main/CHANGELOG.md) - [Commits](https://github.com/rust-cli/env_logger/compare/v0.11.5...v0.10.2) Updates `libc` from 0.2.158 to 0.2.159 - [Release notes](https://github.com/rust-lang/libc/releases) - [Changelog](https://github.com/rust-lang/libc/blob/0.2.159/CHANGELOG.md) - [Commits](https://github.com/rust-lang/libc/compare/0.2.158...0.2.159) Updates `thiserror` from 1.0.63 to 1.0.64 - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](https://github.com/dtolnay/thiserror/compare/1.0.63...1.0.64) Updates `futures-executor` from 0.3.30 to 0.3.31 - [Release notes](https://github.com/rust-lang/futures-rs/releases) - [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.30...0.3.31) Updates `vhost` from 0.11.0 to 0.12.0 - [Release notes](https://github.com/rust-vmm/vhost/releases) - [Commits](https://github.com/rust-vmm/vhost/compare/vhost-v0.11.0...vhost-v0.12.0) Updates `vhost-user-backend` from 0.15.0 to 0.16.0 - [Release notes](https://github.com/rust-vmm/vhost/releases) - [Commits](https://github.com/rust-vmm/vhost/compare/vhost-user-backend-v0.15.0...vhost-user-backend-v0.16.0) Updates `virtio-bindings` from 0.2.2 to 0.2.3 - [Release notes](https://github.com/rust-vmm/vm-virtio/releases) - [Commits](https://github.com/rust-vmm/vm-virtio/compare/virtio-bindings-v0.2.2...virtio-bindings-v0.2.3) Updates `virtio-queue` from 0.12.0 to 0.13.0 - [Release notes](https://github.com/rust-vmm/vm-virtio/releases) - [Commits](https://github.com/rust-vmm/vm-virtio/compare/virtio-queue-v0.12.0...virtio-queue-v0.13.0) Updates `vm-memory` from 0.14.1 to 0.15.0 - [Release notes](https://github.com/rust-vmm/vm-memory/releases) - [Changelog](https://github.com/rust-vmm/vm-memory/blob/main/CHANGELOG.md) - [Commits](https://github.com/rust-vmm/vm-memory/compare/v0.14.1...v0.15.0) Updates `rstest` from 0.22.0 to 0.23.0 - [Release notes](https://github.com/la10736/rstest/releases) - [Changelog](https://github.com/la10736/rstest/blob/master/CHANGELOG.md) - [Commits](https://github.com/la10736/rstest/compare/v0.22.0...v0.23.0) Updates `tempfile` from 3.12.0 to 3.13.0 - [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md) - [Commits](https://github.com/Stebalien/tempfile/compare/v3.12.0...v3.13.0) Updates `anyhow` from 1.0.86 to 1.0.89 - [Release notes](https://github.com/dtolnay/anyhow/releases) - [Commits](https://github.com/dtolnay/anyhow/compare/1.0.86...1.0.89) Updates `autocfg` from 1.3.0 to 1.4.0 - [Commits](https://github.com/cuviper/autocfg/compare/1.3.0...1.4.0) Updates `clap_builder` from 4.5.15 to 4.5.19 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v4.5.15...v4.5.19) Updates `clap_derive` from 4.5.13 to 4.5.18 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v4.5.13...v4.5.18) Updates `futures` from 0.3.30 to 0.3.31 - [Release notes](https://github.com/rust-lang/futures-rs/releases) - [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.30...0.3.31) Updates `futures-channel` from 0.3.30 to 0.3.31 - [Release notes](https://github.com/rust-lang/futures-rs/releases) - [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.30...0.3.31) Updates `futures-core` from 0.3.30 to 0.3.31 - [Release notes](https://github.com/rust-lang/futures-rs/releases) - [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.30...0.3.31) Updates `futures-io` from 0.3.30 to 0.3.31 - [Release notes](https://github.com/rust-lang/futures-rs/releases) - [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.30...0.3.31) Updates `futures-macro` from 0.3.30 to 0.3.31 - [Release notes](https://github.com/rust-lang/futures-rs/releases) - [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.30...0.3.31) Updates `futures-sink` from 0.3.30 to 0.3.31 - [Release notes](https://github.com/rust-lang/futures-rs/releases) - [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.30...0.3.31) Updates `futures-task` from 0.3.30 to 0.3.31 - [Release notes](https://github.com/rust-lang/futures-rs/releases) - [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.30...0.3.31) Updates `futures-util` from 0.3.30 to 0.3.31 - [Release notes](https://github.com/rust-lang/futures-rs/releases) - [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.30...0.3.31) Updates `indexmap` from 2.4.0 to 2.6.0 - [Changelog](https://github.com/indexmap-rs/indexmap/blob/master/RELEASES.md) - [Commits](https://github.com/indexmap-rs/indexmap/compare/2.4.0...2.6.0) Updates `once_cell` from 1.19.0 to 1.20.2 - [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md) - [Commits](https://github.com/matklad/once_cell/compare/v1.19.0...v1.20.2) Updates `proc-macro-crate` from 3.1.0 to 3.2.0 - [Release notes](https://github.com/bkchr/proc-macro-crate/releases) - [Commits](https://github.com/bkchr/proc-macro-crate/commits/v3.2.0) Updates `regex` from 1.10.6 to 1.11.0 - [Release notes](https://github.com/rust-lang/regex/releases) - [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/regex/compare/1.10.6...1.11.0) Updates `regex-automata` from 0.4.7 to 0.4.8 - [Release notes](https://github.com/rust-lang/regex/releases) - [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/regex/commits) Updates `regex-syntax` from 0.8.4 to 0.8.5 - [Release notes](https://github.com/rust-lang/regex/releases) - [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/regex/commits) Updates `rstest_macros` from 0.22.0 to 0.23.0 - [Release notes](https://github.com/la10736/rstest/releases) - [Changelog](https://github.com/la10736/rstest/blob/master/CHANGELOG.md) - [Commits](https://github.com/la10736/rstest/compare/v0.22.0...v0.23.0) Updates `rustc_version` from 0.4.0 to 0.4.1 - [Release notes](https://github.com/djc/rustc-version-rs/releases) - [Commits](https://github.com/djc/rustc-version-rs/compare/v0.4.0...v0.4.1) Updates `rustix` from 0.38.34 to 0.38.37 - [Release notes](https://github.com/bytecodealliance/rustix/releases) - [Changelog](https://github.com/bytecodealliance/rustix/blob/main/CHANGELOG.md) - [Commits](https://github.com/bytecodealliance/rustix/compare/v0.38.34...v0.38.37) Updates `serde` from 1.0.209 to 1.0.210 - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.209...v1.0.210) Updates `serde_derive` from 1.0.209 to 1.0.210 - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.209...v1.0.210) Updates `thiserror-impl` from 1.0.63 to 1.0.64 - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](https://github.com/dtolnay/thiserror/compare/1.0.63...1.0.64) Updates `toml_edit` from 0.21.1 to 0.22.22 - [Commits](https://github.com/toml-rs/toml/compare/v0.21.1...v0.22.22) Updates `unicode-ident` from 1.0.12 to 1.0.13 - [Release notes](https://github.com/dtolnay/unicode-ident/releases) - [Commits](https://github.com/dtolnay/unicode-ident/compare/1.0.12...1.0.13) Updates `windows-sys` from 0.52.0 to 0.48.0 - [Release notes](https://github.com/microsoft/windows-rs/releases) - [Commits](https://github.com/microsoft/windows-rs/compare/0.52.0...0.48.0) Updates `windows-targets` from 0.52.6 to 0.48.5 - [Release notes](https://github.com/microsoft/windows-rs/releases) - [Commits](https://github.com/microsoft/windows-rs/commits/0.48.5) Updates `windows_aarch64_gnullvm` from 0.52.6 to 0.48.5 - [Release notes](https://github.com/microsoft/windows-rs/releases) - [Commits](https://github.com/microsoft/windows-rs/commits/0.48.5) Updates `windows_aarch64_msvc` from 0.52.6 to 0.48.5 - [Release notes](https://github.com/microsoft/windows-rs/releases) - [Commits](https://github.com/microsoft/windows-rs/commits/0.48.5) Updates `windows_i686_gnu` from 0.52.6 to 0.48.5 - [Release notes](https://github.com/microsoft/windows-rs/releases) - [Commits](https://github.com/microsoft/windows-rs/commits/0.48.5) Updates `windows_i686_msvc` from 0.52.6 to 0.48.5 - [Release notes](https://github.com/microsoft/windows-rs/releases) - [Commits](https://github.com/microsoft/windows-rs/commits/0.48.5) Updates `windows_x86_64_gnu` from 0.52.6 to 0.48.5 - [Release notes](https://github.com/microsoft/windows-rs/releases) - [Commits](https://github.com/microsoft/windows-rs/commits/0.48.5) Updates `windows_x86_64_gnullvm` from 0.52.6 to 0.48.5 - [Release notes](https://github.com/microsoft/windows-rs/releases) - [Commits](https://github.com/microsoft/windows-rs/commits/0.48.5) Updates `windows_x86_64_msvc` from 0.52.6 to 0.48.5 - [Release notes](https://github.com/microsoft/windows-rs/releases) - [Commits](https://github.com/microsoft/windows-rs/commits/0.48.5) Updates `winnow` from 0.5.40 to 0.6.20 - [Changelog](https://github.com/winnow-rs/winnow/blob/main/CHANGELOG.md) - [Commits](https://github.com/winnow-rs/winnow/compare/v0.5.40...v0.6.20) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch dependency-group: vhost-device - dependency-name: env_logger dependency-type: direct:production update-type: version-update:semver-minor dependency-group: vhost-device - dependency-name: libc dependency-type: direct:production update-type: version-update:semver-patch dependency-group: vhost-device - dependency-name: thiserror dependency-type: direct:production update-type: version-update:semver-patch dependency-group: vhost-device - dependency-name: futures-executor dependency-type: direct:production update-type: version-update:semver-patch dependency-group: vhost-device - dependency-name: vhost dependency-type: direct:production update-type: version-update:semver-minor dependency-group: vhost-device - dependency-name: vhost-user-backend dependency-type: direct:production update-type: version-update:semver-minor dependency-group: vhost-device - dependency-name: virtio-bindings dependency-type: direct:production update-type: version-update:semver-patch dependency-group: vhost-device - dependency-name: virtio-queue dependency-type: direct:production update-type: version-update:semver-minor dependency-group: vhost-device - dependency-name: vm-memory dependency-type: direct:production update-type: version-update:semver-minor dependency-group: vhost-device - dependency-name: rstest dependency-type: direct:production update-type: version-update:semver-minor dependency-group: vhost-device - dependency-name: tempfile dependency-type: direct:production update-type: version-update:semver-minor dependency-group: vhost-device - dependency-name: anyhow dependency-type: indirect update-type: version-update:semver-patch dependency-group: vhost-device - dependency-name: autocfg dependency-type: indirect update-type: version-update:semver-minor dependency-group: vhost-device - dependency-name: clap_builder dependency-type: indirect update-type: version-update:semver-patch dependency-group: vhost-device - dependency-name: clap_derive dependency-type: indirect update-type: version-update:semver-patch dependency-group: vhost-device - dependency-name: futures dependency-type: indirect update-type: version-update:semver-patch dependency-group: vhost-device - dependency-name: futures-channel dependency-type: indirect update-type: version-update:semver-patch dependency-group: vhost-device - dependency-name: futures-core dependency-type: indirect update-type: version-update:semver-patch dependency-group: vhost-device - dependency-name: futures-io dependency-type: indirect update-type: version-update:semver-patch dependency-group: vhost-device - dependency-name: futures-macro dependency-type: indirect update-type: version-update:semver-patch dependency-group: vhost-device - dependency-name: futures-sink dependency-type: indirect update-type: version-update:semver-patch dependency-group: vhost-device - dependency-name: futures-task dependency-type: indirect update-type: version-update:semver-patch dependency-group: vhost-device - dependency-name: futures-util dependency-type: indirect update-type: version-update:semver-patch dependency-group: vhost-device - dependency-name: indexmap dependency-type: indirect update-type: version-update:semver-minor dependency-group: vhost-device - dependency-name: once_cell dependency-type: indirect update-type: version-update:semver-minor dependency-group: vhost-device - dependency-name: proc-macro-crate dependency-type: indirect update-type: version-update:semver-minor dependency-group: vhost-device - dependency-name: regex dependency-type: indirect update-type: version-update:semver-minor dependency-group: vhost-device - dependency-name: regex-automata dependency-type: indirect update-type: version-update:semver-patch dependency-group: vhost-device - dependency-name: regex-syntax dependency-type: indirect update-type: version-update:semver-patch dependency-group: vhost-device - dependency-name: rstest_macros dependency-type: indirect update-type: version-update:semver-minor dependency-group: vhost-device - dependency-name: rustc_version dependency-type: indirect update-type: version-update:semver-patch dependency-group: vhost-device - dependency-name: rustix dependency-type: indirect update-type: version-update:semver-patch dependency-group: vhost-device - dependency-name: serde dependency-type: indirect update-type: version-update:semver-patch dependency-group: vhost-device - dependency-name: serde_derive dependency-type: indirect update-type: version-update:semver-patch dependency-group: vhost-device - dependency-name: thiserror-impl dependency-type: indirect update-type: version-update:semver-patch dependency-group: vhost-device - dependency-name: toml_edit dependency-type: indirect update-type: version-update:semver-minor dependency-group: vhost-device - dependency-name: unicode-ident dependency-type: indirect update-type: version-update:semver-patch dependency-group: vhost-device - dependency-name: windows-sys dependency-type: indirect update-type: version-update:semver-minor dependency-group: vhost-device - dependency-name: windows-targets dependency-type: indirect update-type: version-update:semver-minor dependency-group: vhost-device - dependency-name: windows_aarch64_gnullvm dependency-type: indirect update-type: version-update:semver-minor dependency-group: vhost-device - dependency-name: windows_aarch64_msvc dependency-type: indirect update-type: version-update:semver-minor dependency-group: vhost-device - dependency-name: windows_i686_gnu dependency-type: indirect update-type: version-update:semver-minor dependency-group: vhost-device - dependency-name: windows_i686_msvc dependency-type: indirect update-type: version-update:semver-minor dependency-group: vhost-device - dependency-name: windows_x86_64_gnu dependency-type: indirect update-type: version-update:semver-minor dependency-group: vhost-device - dependency-name: windows_x86_64_gnullvm dependency-type: indirect update-type: version-update:semver-minor dependency-group: vhost-device - dependency-name: windows_x86_64_msvc dependency-type: indirect update-type: version-update:semver-minor dependency-group: vhost-device - dependency-name: winnow dependency-type: indirect update-type: version-update:semver-minor dependency-group: vhost-device ... Signed-off-by: dependabot[bot] <support@github.com> |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||
| CHANGELOG.md | ||
| LICENSE-APACHE | ||
| LICENSE-BSD-3-Clause | ||
| README.md | ||
vhost-device-can - CAN emulation backend daemon
Description
This program is a vhost-user backend that emulates a VirtIO CAN device. The device's binary takes two (2) parameters: a socket, a 'can-devices' list. The socket is commonly used across all vhost-devices to communicate with the vhost-user frontend device. The 'can-devices' represents a list of CAN/FD devices appears in the host system which vhost-device-can will forward messages to and from the frontend side.
This program is tested with QEMU's vhost-user-device-pci device.
Examples' section below.
Synopsis
**vhost-device-can** [*OPTIONS*]
Options
.. program:: vhost-device-can
.. option:: -h, --help
Print help.
.. option:: -s, --socket-path=PATH
Location of vhost-user Unix domain sockets, this path will be suffixed with 0,1,2..socket_count-1.
.. option:: -c, --socket-count=INT
Number of guests (sockets) to attach to, default set to 1.
.. option:: -d, --can-devices='CAN/FD interfaces'
CAN/FD device list at the host OS in the format: <can-_X_0> [<can_in_X_1>] ... [<can_in_X_N-1>]
Note 1: Where N (the number of CAN/FD interfaces) is equal with the number provided via socket_count parameter.
Example: --can-devices "can0 can1 can2"
Features
This device is still work-in-progress (WIP) and on virtio-spec v1.4 is based on virtio-can Linux's driver and QEMU's device presented in the following RFC:
Vhost-device-can have be been tested in scenarios with multiple QEMU's VMs using host's CAN/FD devices.
Limitations
- The transmission of a CAN/FD frame to a host interface always is done synchronously. This means that regardless the negotiation or not of the feature VIRTIO_CAN_F_LATE_TX_ACK, the backend will always wait for the transmission of the frame and after will mark the transmission request as used.
- Does not check for undefined flags in CAN/FD frame when send and receive a CAN/FD frame from the frontend (QEMU device).
- The host's CAN/FD devices should be already in UP state before staring
the vhost-device-can (by using
ip link set can0 [up,down]).- The control messages does not actually change host's device state
- Current version of the device has been tested only with vcan device.
Examples
Dependencies
For testing the device the required dependencies are:
- Linux:
- Integrate virtio-can driver implemented by OpenSynergy:
- Set
CONFIG_VIRTIO_CAN=y
- QEMU
- Integrate virtio-can device implemented by OpenSynergy:
- Clone vhost-user-can QEMU device (optional):
- A new vhost-user-can device has been implemented in the following repo:
Test the device
The daemon should be started first:
host# vhost-device-can --socket-path=can.sock --can-devices="vcan0"
The QEMU invocation needs to create a chardev socket the device can use to communicate as well as share the guests memory over a memfd.
There are two option for running QEMU with vhost-device-can:
- Using
vhost-user-device-pciavailable upstream since QEMUv8.2.0:
host# qemu-system \
-m 4096 \
-numa node,memdev=mem \
-object memory-backend-memfd,id=mem,size=4G,share=on \
-chardev socket,id=can0,path=/tmp/can.sock \
-device vhost-user-device-pci,chardev=can0,virtio-id=36,num_vqs=3,config_size=16 \
...
- Using
vhost-user-can-pci:
host# qemu-system \
-m 4096 \
-numa node,memdev=mem \
-object memory-backend-memfd,id=mem,size=4G,share=on \
-chardev socket,path=/tmp/can.sock,id=can0 \
-device vhost-user-can-pci,chardev=can0,id=can \
...
Note: For testing this scenario the reader needs to clone the QEMU version from the following repo which implements
vhost-user-candevice:
Multi-Guest case
Run vhost-device-can as:
./vhost-device-can --socket-path /tmp/can.sock --socket-count 2 --can-devices "vcan0 vcan1"
This command will start the device and create two new sockets: /tmp/can.sock0 and /tmp/can.sock1.
From the other side we run two QEMU instances (VMs) with vhost-user-can:
host# qemu-system \
-m 4096 \
-numa node,memdev=mem \
-object memory-backend-memfd,id=mem,size=4G,share=on \
-chardev socket,path=<SOCKET_PATH>,id=can0 \
-device vhost-user-can-pci,chardev=can0,id=can \
...
In the first instance of QEMU SOCKET_PATH would be: /tmp/can.sock0, and will use can0 (host interface) as sender and receiver. The second QEMU VM would have: SOCKET_PATH = /tmp/can.sock1, and will use can1 as receiver and can2 as sender.
License
This project is licensed under either of
- Apache License, Version 2.0
- BSD-3-Clause License