All of lore.kernel.org
 help / color / mirror / Atom feed
* vxcan RX/TX/echo semantics
@ 2021-05-27 15:07 Marc Kleine-Budde
  2021-06-01  8:50 ` Oliver Hartkopp
  0 siblings, 1 reply; 3+ messages in thread
From: Marc Kleine-Budde @ 2021-05-27 15:07 UTC (permalink / raw)
  To: linux-can, Oliver Hartkopp

[-- Attachment #1: Type: text/plain, Size: 756 bytes --]

Hello Oliver,

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....

regards,
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: vxcan RX/TX/echo semantics
  2021-05-27 15:07 vxcan RX/TX/echo semantics Marc Kleine-Budde
@ 2021-06-01  8:50 ` Oliver Hartkopp
  2021-06-19 11:23   ` Oliver Hartkopp
  0 siblings, 1 reply; 3+ messages in thread
From: Oliver Hartkopp @ 2021-06-01  8:50 UTC (permalink / raw)
  To: Marc Kleine-Budde, linux-can

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: vxcan RX/TX/echo semantics
  2021-06-01  8:50 ` Oliver Hartkopp
@ 2021-06-19 11:23   ` Oliver Hartkopp
  0 siblings, 0 replies; 3+ messages in thread
From: Oliver Hartkopp @ 2021-06-19 11:23 UTC (permalink / raw)
  To: Marc Kleine-Budde, linux-can

Hello Marc,

I sent a RFC patch which enables the local echo on vxcan interfaces by 
simply removing the IFF_ECHO flag which is set by default.

With this solution we make use of the echo functionality in can_send() 
which is used by slcan and vcan by default.

This approach sends the echo'ed frame instantly without checking whether 
the frame has been delivered to the peer interface in the other namespace.

I don't know whether it's worth the effort to handle the local echo in 
vxcan_xmit() for that 'successful delivery' feature?!?

At least vxcan feels more natural with this patch.

Best regards,
Oliver

On 01.06.21 10:50, Oliver Hartkopp wrote:
> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-19 11:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-27 15:07 vxcan RX/TX/echo semantics Marc Kleine-Budde
2021-06-01  8:50 ` Oliver Hartkopp
2021-06-19 11:23   ` Oliver Hartkopp

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.