summaryrefslogtreecommitdiffstats
path: root/meta-egvirt/recipes-extended/vhost-device-can/vhost-device-can-0.1.0/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'meta-egvirt/recipes-extended/vhost-device-can/vhost-device-can-0.1.0/README.md')
-rw-r--r--meta-egvirt/recipes-extended/vhost-device-can/vhost-device-can-0.1.0/README.md66
1 files changed, 66 insertions, 0 deletions
diff --git a/meta-egvirt/recipes-extended/vhost-device-can/vhost-device-can-0.1.0/README.md b/meta-egvirt/recipes-extended/vhost-device-can/vhost-device-can-0.1.0/README.md
new file mode 100644
index 00000000..fd50c274
--- /dev/null
+++ b/meta-egvirt/recipes-extended/vhost-device-can/vhost-device-can-0.1.0/README.md
@@ -0,0 +1,66 @@
+# 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 three (3) parameters: a socket, a 'can-out' and a
+'can-in' device name. The socket is commonly used across all vhost-devices to
+communicate with the vhost-user frontend device.
+
+The 'can-out' represents
+the actual CAN/FD device appears in the host system which vhost-device-can will
+forward the messages from the frontend side. Finaly, the 'can-in' is again a
+CAN/FD device connected on the host systems and vhost-device-can reads CAN/FD
+frames and sends them to the frontend. The 'can-in' and 'can-out' can be find
+by "ip link show" command. Also, the vhost-device-can may have the same CAN/FD
+device name for both 'can-in' and 'can-out', if the user desires to setup a
+loopback configuration.
+
+
+This program is tested with Virtio-loopback's `-device vhost-user-can`.
+Examples section below.
+
+## Synopsis
+
+**vhost-device-can** [*OPTIONS*]
+
+## Options
+
+.. program:: vhost-device-gpio
+
+.. option:: -h, --help
+
+ Print help.
+
+.. option:: -s, --socket-path=PATH
+
+.. option:: -i, --can-int='CAN/FD interface name'
+
+ The name of the input CAN interface to retrive CAN frames by
+
+.. option:: -o, --can-out='CAN/FD interface name'
+
+ The name of the ouput CAN interface to send the CAN frames
+
+## Examples
+
+The daemon should be started first:
+
+::
+
+ host# vhost-device-can --socket-path=can.sock --can-in="can0" --can-out="can1"
+
+The virtio-looback invocation needs to insert the [virtio-loopback-transport](https://git.virtualopensystems.com/virtio-loopback/loopback_driver/-/tree/epsilon-release) driver
+and then start the [virito-loopback-adapter](https://git.virtualopensystems.com/virtio-loopback/adapter_app/-/tree/epsilon-release) which is the intermediate between
+vhost-device and virtio-loopback-transport driver.
+
+::
+
+ host# sudo insmod loopback_driver.ko
+ host# sudo ./adapter -s /path/to/can.sock0 -d vhucan
+
+## License
+
+This project is licensed under either of
+
+- [Apache License](http://www.apache.org/licenses/LICENSE-2.0), Version 2.0
+- [BSD-3-Clause License](https://opensource.org/licenses/BSD-3-Clause)