All of lore.kernel.org
 help / color / mirror / Atom feed
* RTnet vnic0 non-rt traffic bug
@ 2019-10-03 13:34 Laurentiu-Cristian Duca
  2019-10-04  7:34 ` Jan Kiszka
  0 siblings, 1 reply; 4+ messages in thread
From: Laurentiu-Cristian Duca @ 2019-10-03 13:34 UTC (permalink / raw)
  To: xenomai

Hello rtnet dev,

  I think I found a bug in RTnet:
ping and non-rt applications (e.g. dropbear) send non-rt traffic via vnic0,
but the ethernet type is 0x9021 (real-time media access control type):
xenomai-3.0.9/kernel/drivers/net/stack/rtmac/rtmac_vnic.c:156:    res
= rtmac_add_header(rtdev, ethernet->h_dest, rtskb,
xenomai-3.0.9/kernel/drivers/net/stack/include/rtmac/rtmac_proto.h:32:#define
ETH_RTMAC               0x9021
xenomai-3.0.9/kernel/drivers/net/stack/include/rtmac/rtmac_proto.h:59:
       (rtdev->hard_header(skb, rtdev, ETH_RTMAC, daddr,
I have caught the traffic through wireshark which confirmed this info.

  I succesfully can ping and ssh between qemu rtnet virtual machines on vnic0
but I can not ping a non-rtnet machine from a rtnet machine via vnic0
and I can not connect using ssh from a non-rtnet machine to a rtnet machine.

  In order to reproduce the bug I have posted a qemu rtnet virtual
machine and instructions to this link:
https://github.com/laurentiuduca/rtnet-geek

  I mention that rtping works ok.

Kind regards,
L-C. Duca


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

* Re: RTnet vnic0 non-rt traffic bug
  2019-10-03 13:34 RTnet vnic0 non-rt traffic bug Laurentiu-Cristian Duca
@ 2019-10-04  7:34 ` Jan Kiszka
  2019-10-04 10:41   ` Laurentiu-Cristian Duca
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Kiszka @ 2019-10-04  7:34 UTC (permalink / raw)
  To: Laurentiu-Cristian Duca, xenomai

On 03.10.19 15:34, Laurentiu-Cristian Duca via Xenomai wrote:
> Hello rtnet dev,
> 
>    I think I found a bug in RTnet:
> ping and non-rt applications (e.g. dropbear) send non-rt traffic via vnic0,
> but the ethernet type is 0x9021 (real-time media access control type):
> xenomai-3.0.9/kernel/drivers/net/stack/rtmac/rtmac_vnic.c:156:    res
> = rtmac_add_header(rtdev, ethernet->h_dest, rtskb,
> xenomai-3.0.9/kernel/drivers/net/stack/include/rtmac/rtmac_proto.h:32:#define
> ETH_RTMAC               0x9021
> xenomai-3.0.9/kernel/drivers/net/stack/include/rtmac/rtmac_proto.h:59:
>         (rtdev->hard_header(skb, rtdev, ETH_RTMAC, daddr,
> I have caught the traffic through wireshark which confirmed this info.
> 
>    I succesfully can ping and ssh between qemu rtnet virtual machines on vnic0
> but I can not ping a non-rtnet machine from a rtnet machine via vnic0
> and I can not connect using ssh from a non-rtnet machine to a rtnet machine.

This is by design: RTmac implies all participants in the network play according 
to its rule. The vnic is a non-rt tunnel between them, so the remote side has to 
use that protocol as well.

Jan

> 
>    In order to reproduce the bug I have posted a qemu rtnet virtual
> machine and instructions to this link:
> https://github.com/laurentiuduca/rtnet-geek
> 
>    I mention that rtping works ok.
> 
> Kind regards,
> L-C. Duca
> 

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux


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

* Re: RTnet vnic0 non-rt traffic bug
  2019-10-04  7:34 ` Jan Kiszka
@ 2019-10-04 10:41   ` Laurentiu-Cristian Duca
  2019-10-04 10:51     ` Jan Kiszka
  0 siblings, 1 reply; 4+ messages in thread
From: Laurentiu-Cristian Duca @ 2019-10-04 10:41 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: xenomai

I have tested the nomac discipline:
- on rteth0 ethernet traffic has ethernet type = IPv4 = 0x0800
(tested rtping and rtt-sender <-> rtt-responder)
- on vnic0 ethernet traffic has ethernet type 0x9021
(tested using ping and ssh between two rtnet machines)
I captured the traffic with wireshark.

It is easy to see this behavior by consulting the link from my previous email.

On 10/4/19, Jan Kiszka <jan.kiszka@siemens.com> wrote:
> On 03.10.19 15:34, Laurentiu-Cristian Duca via Xenomai wrote:
>> Hello rtnet dev,
>>
>>    I think I found a bug in RTnet:
>> ping and non-rt applications (e.g. dropbear) send non-rt traffic via
>> vnic0,
>> but the ethernet type is 0x9021 (real-time media access control type):
>> xenomai-3.0.9/kernel/drivers/net/stack/rtmac/rtmac_vnic.c:156:    res
>> = rtmac_add_header(rtdev, ethernet->h_dest, rtskb,
>> xenomai-3.0.9/kernel/drivers/net/stack/include/rtmac/rtmac_proto.h:32:#define
>> ETH_RTMAC               0x9021
>> xenomai-3.0.9/kernel/drivers/net/stack/include/rtmac/rtmac_proto.h:59:
>>         (rtdev->hard_header(skb, rtdev, ETH_RTMAC, daddr,
>> I have caught the traffic through wireshark which confirmed this info.
>>
>>    I succesfully can ping and ssh between qemu rtnet virtual machines on
>> vnic0
>> but I can not ping a non-rtnet machine from a rtnet machine via vnic0
>> and I can not connect using ssh from a non-rtnet machine to a rtnet
>> machine.
>
> This is by design: RTmac implies all participants in the network play
> according
> to its rule. The vnic is a non-rt tunnel between them, so the remote side
> has to
> use that protocol as well.
>
> Jan
>
>>
>>    In order to reproduce the bug I have posted a qemu rtnet virtual
>> machine and instructions to this link:
>> https://github.com/laurentiuduca/rtnet-geek
>>
>>    I mention that rtping works ok.
>>
>> Kind regards,
>> L-C. Duca
>>
>
> --
> Siemens AG, Corporate Technology, CT RDA IOT SES-DE
> Corporate Competence Center Embedded Linux
>


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

* Re: RTnet vnic0 non-rt traffic bug
  2019-10-04 10:41   ` Laurentiu-Cristian Duca
@ 2019-10-04 10:51     ` Jan Kiszka
  0 siblings, 0 replies; 4+ messages in thread
From: Jan Kiszka @ 2019-10-04 10:51 UTC (permalink / raw)
  To: Laurentiu-Cristian Duca; +Cc: xenomai

On 04.10.19 12:41, Laurentiu-Cristian Duca wrote:
> I have tested the nomac discipline:
> - on rteth0 ethernet traffic has ethernet type = IPv4 = 0x0800
> (tested rtping and rtt-sender <-> rtt-responder)
> - on vnic0 ethernet traffic has ethernet type 0x9021
> (tested using ping and ssh between two rtnet machines)
> I captured the traffic with wireshark.

Yes, it's tunneled traffic, that's why it has an own Ethernet type. The receiver 
has to implement this protocol as well in order to unpack the non-rt traffic and 
forward or process it. All as designed and IIRC also specified.

Jan

> 
> It is easy to see this behavior by consulting the link from my previous email.
> 
> On 10/4/19, Jan Kiszka <jan.kiszka@siemens.com> wrote:
>> On 03.10.19 15:34, Laurentiu-Cristian Duca via Xenomai wrote:
>>> Hello rtnet dev,
>>>
>>>     I think I found a bug in RTnet:
>>> ping and non-rt applications (e.g. dropbear) send non-rt traffic via
>>> vnic0,
>>> but the ethernet type is 0x9021 (real-time media access control type):
>>> xenomai-3.0.9/kernel/drivers/net/stack/rtmac/rtmac_vnic.c:156:    res
>>> = rtmac_add_header(rtdev, ethernet->h_dest, rtskb,
>>> xenomai-3.0.9/kernel/drivers/net/stack/include/rtmac/rtmac_proto.h:32:#define
>>> ETH_RTMAC               0x9021
>>> xenomai-3.0.9/kernel/drivers/net/stack/include/rtmac/rtmac_proto.h:59:
>>>          (rtdev->hard_header(skb, rtdev, ETH_RTMAC, daddr,
>>> I have caught the traffic through wireshark which confirmed this info.
>>>
>>>     I succesfully can ping and ssh between qemu rtnet virtual machines on
>>> vnic0
>>> but I can not ping a non-rtnet machine from a rtnet machine via vnic0
>>> and I can not connect using ssh from a non-rtnet machine to a rtnet
>>> machine.
>>
>> This is by design: RTmac implies all participants in the network play
>> according
>> to its rule. The vnic is a non-rt tunnel between them, so the remote side
>> has to
>> use that protocol as well.
>>
>> Jan
>>
>>>
>>>     In order to reproduce the bug I have posted a qemu rtnet virtual
>>> machine and instructions to this link:
>>> https://github.com/laurentiuduca/rtnet-geek
>>>
>>>     I mention that rtping works ok.
>>>
>>> Kind regards,
>>> L-C. Duca
>>>
>>
>> --
>> Siemens AG, Corporate Technology, CT RDA IOT SES-DE
>> Corporate Competence Center Embedded Linux
>>

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux


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

end of thread, other threads:[~2019-10-04 10:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-03 13:34 RTnet vnic0 non-rt traffic bug Laurentiu-Cristian Duca
2019-10-04  7:34 ` Jan Kiszka
2019-10-04 10:41   ` Laurentiu-Cristian Duca
2019-10-04 10:51     ` Jan Kiszka

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.