Hello Harald,
On 24.06.21 17:21, Harald Mommer wrote:
The device application is closed source, runs under the COQOS hypervisor
which is also closed source.
What is this 'device application' in the sketch below?
Can you sketch a quick block diagram showing guest, host, Virtio device,
Virtio driver, etc...
I hope this arrives on the list as is been sent and not garbled:
Guest 2 | Guest3
---------------- | ----------------
! cangen, ! | ! cangen, !
! candump, ! | ! candump, !
! cansend ! | ! cansend !
! using vcan0 ! | ! using can0 !
---------------- | ----------------
^ | ^
! --------------------- | !
! ! Service process ! | !
! ! in user space ! | !
! ! virtio-can device ! | !
! ! forwarding vcan0 ! | !
! --------------------- | !
Hopefully not this "Service process in user space" ???
If so, this is a very questionable approach!
To route/forward/manipulate CAN frames between CAN network interfaces
there is a CAN gateway module 'can-gw' which can be controlled over
PF_NETLINK.
The can-gw runs super efficient and fast inside kernel space in the
SOFTIRQ context.
E.g. 22.000 CAN frames/s with 6% sys load on a 2 core i7 from 2012,
here: https://youtu.be/O3eOjfTl1yk?t=89
Just type cangw from the can-utils to get an impression of the powerful
options.
You can even calculate E2E CRCs and XOR checksums after doing content
mods on the fly.
! ^ ^ | !
! ! ! | !
--------------------------------------------------
! ! Device side ! kernel | Driver side ! kernel
v v v | v
---------------- -------------- | ----------------
! Device Linux ! ! HV support ! | ! Driver Linux !
! VCan ! ! module ! | ! Virtio CAN !
! vcan0 ! ! on device ! | ! can0 !
! ! ! side ! | ! !
---------------- -------------- | ----------------
^ ^ | ^
! ! | !
--------------------------------------------------
! ! ! Hypervisor
v v v
--------------------------------------------------
! COQOS-HV !
--------------------------------------------------
(..)
can be handled. Need the command line switch anyway now to do experiments.
Now with cangw ?!? ;-)
Regards,
Oliver