Re: vxcan RX/TX/echo semantics
From: Oliver Hartkopp <socketcan@hartkopp.net>
Date: 2021-06-01 08:50:53
Hello Marc, On 27.05.21 17:07, Marc Kleine-Budde wrote:
I was wondering what the RX, TX and echo semantics on vxcan interfaces should be. I have started a "cangen" in one namespace and a "candump" in other. The "candump" in the receiving namespace shows the CAN frames as "TX" and in the sending namespace the CAN frames don't show up in a "candump" at all. Is this intentional? If so what's the idea behind this and is this documented? I'm adding "cangw" to the mix and see what happens....
Yes. That is needed ... If you take a look at slide 19 here: https://wiki.automotivelinux.org/_media/agl-distro/agl2018-socketcan.pdf The difference to vcan's (which are providing a local echo functionality) the vxcan's are more like veth's: Providing a link between two namespaces but nothing more. The question is if it would make sense to provide an additional local echo in vxcan_xmit() when sending to a vxcan? When deriving vxcan from veth I probably had a some weird thoughts why that local echo could add problems. But while looking at it now, creating a second skb for a local echo on the side where the CAN frame is put into the vxcan seems applicable. What do you think? Best, Oliver