linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Harald Mommer <hmo@opensynergy.com>, linux-can@vger.kernel.org
Subject: Re: MSG_CONFIRM RX messages with SocketCAN known as unreliable under heavy load?
Date: Thu, 24 Jun 2021 20:45:33 +0200	[thread overview]
Message-ID: <4b02188f-b3bd-4e80-5d1c-9ace05f54c1d@hartkopp.net> (raw)
In-Reply-To: <8c76c15d-6252-8af5-01d1-71752cd0cb7b@opensynergy.com>

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

  reply	other threads:[~2021-06-24 18:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-17 12:22 MSG_CONFIRM RX messages with SocketCAN known as unreliable under heavy load? Harald Mommer
2021-06-18  9:16 ` Marc Kleine-Budde
2021-06-18 18:23   ` Oliver Hartkopp
2021-06-19 21:42     ` Marc Kleine-Budde
2021-06-24 15:21   ` Harald Mommer
2021-06-24 18:45     ` Oliver Hartkopp [this message]
2021-06-28 13:47       ` Harald Mommer
2021-06-25  9:19     ` review of virtio-can (was: Re: MSG_CONFIRM RX messages with SocketCAN known as unreliable under heavy load?) Marc Kleine-Budde
2021-06-29 17:14       ` Harald Mommer
2021-07-14  7:15       ` [virtio-dev] " Michael S. Tsirkin
2021-07-15 16:04         ` Harald Mommer
2021-06-25  9:39     ` MSG_CONFIRM RX messages with SocketCAN known as unreliable under heavy load? Marc Kleine-Budde
2021-06-29 19:39 Harald Mommer
2021-06-30  7:27 ` Oliver Hartkopp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4b02188f-b3bd-4e80-5d1c-9ace05f54c1d@hartkopp.net \
    --to=socketcan@hartkopp.net \
    --cc=hmo@opensynergy.com \
    --cc=linux-can@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).