All of lore.kernel.org
 help / color / mirror / Atom feed
* about RTnet* smokey test skipped issue on Qemu
@ 2021-08-03  4:31 Chen, Hongzhan
  2021-08-03  4:58 ` Jan Kiszka
  0 siblings, 1 reply; 6+ messages in thread
From: Chen, Hongzhan @ 2021-08-03  4:31 UTC (permalink / raw)
  To: xenomai

Firstly, I found that all smokey tests including RTnet* pass on bare metal x86 platform
but three RTnet* related test items  are skipped on Qemu.  After further debug, actually there is
no supported rtnet device found on Qemu with current network setting when xenomai image
is running over even we already enable all supported rtnet devices on xenomai so that
the test is skipped on qemu.

After I replace virtio-net-pci with e1000 device like [1] patch , rt_e1000 and rtnet modules
would be automatically loaded by udevd so that rtnet* test item can go on without test skipped issue.
But system report error like  [2] because there is late packet.  It seems that bad rtnet performance
with virtual network on Qemu may block our RTnet smokey test?  Any Suggestions?


[1]:
--- a/start-qemu.sh
+++ b/start-qemu.sh
@@ -30,7 +30,7 @@ case "$1" in
                        -cpu host -smp 4 \
                        -enable-kvm -machine q35 \
                        -device ide-hd,drive=disk \
-                       -device virtio-net-pci,netdev=net"
+                       -device e1000,netdev=net"

[2]:
===  running net_udp ===

Configuring interface rtlo (driver rt_loopback) for RTnet UDP test
rt_loopback module not there: modprobing
rtipv4 module not there: modprobing
rtudp module not there: modprobing
Waiting for interface rtlo to be running
Running RTnet UDP test on interface rtlo

PPS, LOST, LATE: packet count
MIN, MAX, BEST, AVG, WORST: microseconds

   PPS      LOST    LATE     MIN     MAX    BEST     AVG     WORST
------------------------------------------------------------------
  999.91       0       0     9.35     119     9.35     53     119
  999.93       0       0     24.8     104     9.35     54.5     119
  999.99       0       0     29.9     102     9.35     54.7     119
  999.98       0       0     19.9     180     9.35     54.8     180
1000.00       0       1     26.8     92.4     9.35     54.9     180
1000.00       0       1     31.7     190     9.35     54.8     190
1000.11       0       1     27.7     101     9.35     54.5     190
  999.91       0       1     21.2     89.9     9.35     54.4     190
  999.99       0       2     22.5     101     9.35     53.9     190
1000.07       0       2     27.8     97.3     9.35     53.9     190
unloading rtudp module
unloading rt_loopback module
unloading rtipv4 module
rtnet module was there on entry, keeping it
/usr/lib/xenomai/testsuite/smokey: test net_udp failed: Protocol error


Regards

Hongzhan Chen


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

* Re: about RTnet* smokey test skipped issue on Qemu
  2021-08-03  4:31 about RTnet* smokey test skipped issue on Qemu Chen, Hongzhan
@ 2021-08-03  4:58 ` Jan Kiszka
  2021-08-03  6:46   ` Chen, Hongzhan
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Kiszka @ 2021-08-03  4:58 UTC (permalink / raw)
  To: Chen, Hongzhan, xenomai

On 03.08.21 06:31, Chen, Hongzhan wrote:
> Firstly, I found that all smokey tests including RTnet* pass on bare
> metal x86 platform
> but three RTnet* related test items  are skipped on Qemu.  After further
> debug, actually there is
> no supported rtnet device found on Qemu with current network setting
> when xenomai image
> is running over even we already enable all supported rtnet devices on
> xenomai so that
> the test is skipped on qemu.
> 
> After I replace virtio-net-pci with e1000 device like [1] patch ,
> rt_e1000 and rtnet modules
> would be automatically loaded by udevd so that rtnet* test item can go
> on without test skipped issue.

By default, we are only doing loopback tests in smokey, nothing that
requires a real NIC driver to be loaded. These are the modules loaded
during a test with udp:

Module                  Size  Used by
rtudp                  24576  0
rtipv4                 49152  1 rtudp
rt_loopback            16384  1
rtnet                  81920  3 rtipv4,rtudp,rt_loopback

You can set the rtnet_driver and rtnet_interface parameters to switch to
real NICs, but that is not happening during a default xeno-test run.

> But system report error like  [2] because there is late packet.  It
> seems that bad rtnet performance
> with virtual network on Qemu may block our RTnet smokey test?  Any
> Suggestions?
> 

There is open issue
https://gitlab.com/Xenomai/xenomai-hacker-space/-/issues/13 on that.

Jan

-- 
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux


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

* RE: about RTnet* smokey test skipped issue on Qemu
  2021-08-03  4:58 ` Jan Kiszka
@ 2021-08-03  6:46   ` Chen, Hongzhan
  2021-08-03  7:40     ` Jan Kiszka
  0 siblings, 1 reply; 6+ messages in thread
From: Chen, Hongzhan @ 2021-08-03  6:46 UTC (permalink / raw)
  To: Jan Kiszka, xenomai



>-----Original Message-----
>From: Jan Kiszka <jan.kiszka@siemens.com> 
>Sent: Tuesday, August 3, 2021 12:59 PM
>To: Chen, Hongzhan <hongzhan.chen@intel.com>; xenomai@xenomai.org
>Subject: Re: about RTnet* smokey test skipped issue on Qemu
>
>On 03.08.21 06:31, Chen, Hongzhan wrote:
>> Firstly, I found that all smokey tests including RTnet* pass on bare
>> metal x86 platform
>> but three RTnet* related test items  are skipped on Qemu.  After further
>> debug, actually there is
>> no supported rtnet device found on Qemu with current network setting
>> when xenomai image
>> is running over even we already enable all supported rtnet devices on
>> xenomai so that
>> the test is skipped on qemu.
>> 
>> After I replace virtio-net-pci with e1000 device like [1] patch ,
>> rt_e1000 and rtnet modules
>> would be automatically loaded by udevd so that rtnet* test item can go
>> on without test skipped issue.
>
>By default, we are only doing loopback tests in smokey, nothing that
>requires a real NIC driver to be loaded. These are the modules loaded
>during a test with udp:
>
>Module                  Size  Used by
>rtudp                  24576  0
>rtipv4                 49152  1 rtudp
>rt_loopback            16384  1
>rtnet                  81920  3 rtipv4,rtudp,rt_loopback
>
>You can set the rtnet_driver and rtnet_interface parameters to switch to
>real NICs, but that is not happening during a default xeno-test run.

The problem is that rtnet module is not loaded individually by current system but because
RT NIC device driver module depend on it and then rtnet module will be loaded when specific
RT NIC device driver module is modprobed after triggered by udev service. That means
We have to add and modify something to explicitly load rtnet module by default when system bootup 
if we do not want to depends on real NIC in our case. For example we may add corresponding *.conf  
like [3] to make  rtnet load automatically when system bootup in our case?


[3]:
/etc/modules-load.d/*.conf

/run/modules-load.d/*.conf

/usr/lib/modules-load.d/*.conf

>
>> But system report error like  [2] because there is late packet.  It
>> seems that bad rtnet performance
>> with virtual network on Qemu may block our RTnet smokey test?  Any
>> Suggestions?
>> 
>
>There is open issue
>https://gitlab.com/Xenomai/xenomai-hacker-space/-/issues/13 on that.

So we need to skip performance check like late packet check in our case when we pass --vm to smokey test?

Regards

Hongzhan Chen
>
>Jan
>
>-- 
>Siemens AG, T RDA IOT
>Corporate Competence Center Embedded Linux


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

* Re: about RTnet* smokey test skipped issue on Qemu
  2021-08-03  6:46   ` Chen, Hongzhan
@ 2021-08-03  7:40     ` Jan Kiszka
  2021-08-03  7:53       ` Chen, Hongzhan
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Kiszka @ 2021-08-03  7:40 UTC (permalink / raw)
  To: Chen, Hongzhan, xenomai

On 03.08.21 08:46, Chen, Hongzhan wrote:
> 
> 
>> -----Original Message-----
>> From: Jan Kiszka <jan.kiszka@siemens.com> 
>> Sent: Tuesday, August 3, 2021 12:59 PM
>> To: Chen, Hongzhan <hongzhan.chen@intel.com>; xenomai@xenomai.org
>> Subject: Re: about RTnet* smokey test skipped issue on Qemu
>>
>> On 03.08.21 06:31, Chen, Hongzhan wrote:
>>> Firstly, I found that all smokey tests including RTnet* pass on bare
>>> metal x86 platform
>>> but three RTnet* related test items  are skipped on Qemu.  After further
>>> debug, actually there is
>>> no supported rtnet device found on Qemu with current network setting
>>> when xenomai image
>>> is running over even we already enable all supported rtnet devices on
>>> xenomai so that
>>> the test is skipped on qemu.
>>>
>>> After I replace virtio-net-pci with e1000 device like [1] patch ,
>>> rt_e1000 and rtnet modules
>>> would be automatically loaded by udevd so that rtnet* test item can go
>>> on without test skipped issue.
>>
>> By default, we are only doing loopback tests in smokey, nothing that
>> requires a real NIC driver to be loaded. These are the modules loaded
>> during a test with udp:
>>
>> Module                  Size  Used by
>> rtudp                  24576  0
>> rtipv4                 49152  1 rtudp
>> rt_loopback            16384  1
>> rtnet                  81920  3 rtipv4,rtudp,rt_loopback
>>
>> You can set the rtnet_driver and rtnet_interface parameters to switch to
>> real NICs, but that is not happening during a default xeno-test run.
> 
> The problem is that rtnet module is not loaded individually by current system but because
> RT NIC device driver module depend on it and then rtnet module will be loaded when specific
> RT NIC device driver module is modprobed after triggered by udev service. That means
> We have to add and modify something to explicitly load rtnet module by default when system bootup 
> if we do not want to depends on real NIC in our case. For example we may add corresponding *.conf  
> like [3] to make  rtnet load automatically when system bootup in our case?
> 

RTnet and udp/rtpacket/loopback etc. modules are loaded by the test
cases. See testsuite/smokey/net_common/setup.c.

Jan

-- 
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux


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

* RE: about RTnet* smokey test skipped issue on Qemu
  2021-08-03  7:40     ` Jan Kiszka
@ 2021-08-03  7:53       ` Chen, Hongzhan
  2021-08-03  8:00         ` Jan Kiszka
  0 siblings, 1 reply; 6+ messages in thread
From: Chen, Hongzhan @ 2021-08-03  7:53 UTC (permalink / raw)
  To: Jan Kiszka, xenomai



>-----Original Message-----
>From: Jan Kiszka <jan.kiszka@siemens.com> 
>Sent: Tuesday, August 3, 2021 3:40 PM
>To: Chen, Hongzhan <hongzhan.chen@intel.com>; xenomai@xenomai.org
>Subject: Re: about RTnet* smokey test skipped issue on Qemu
>
>On 03.08.21 08:46, Chen, Hongzhan wrote:
>> 
>> 
>>> -----Original Message-----
>>> From: Jan Kiszka <jan.kiszka@siemens.com> 
>>> Sent: Tuesday, August 3, 2021 12:59 PM
>>> To: Chen, Hongzhan <hongzhan.chen@intel.com>; xenomai@xenomai.org
>>> Subject: Re: about RTnet* smokey test skipped issue on Qemu
>>>
>>> On 03.08.21 06:31, Chen, Hongzhan wrote:
>>>> Firstly, I found that all smokey tests including RTnet* pass on bare
>>>> metal x86 platform
>>>> but three RTnet* related test items  are skipped on Qemu.  After further
>>>> debug, actually there is
>>>> no supported rtnet device found on Qemu with current network setting
>>>> when xenomai image
>>>> is running over even we already enable all supported rtnet devices on
>>>> xenomai so that
>>>> the test is skipped on qemu.
>>>>
>>>> After I replace virtio-net-pci with e1000 device like [1] patch ,
>>>> rt_e1000 and rtnet modules
>>>> would be automatically loaded by udevd so that rtnet* test item can go
>>>> on without test skipped issue.
>>>
>>> By default, we are only doing loopback tests in smokey, nothing that
>>> requires a real NIC driver to be loaded. These are the modules loaded
>>> during a test with udp:
>>>
>>> Module                  Size  Used by
>>> rtudp                  24576  0
>>> rtipv4                 49152  1 rtudp
>>> rt_loopback            16384  1
>>> rtnet                  81920  3 rtipv4,rtudp,rt_loopback
>>>
>>> You can set the rtnet_driver and rtnet_interface parameters to switch to
>>> real NICs, but that is not happening during a default xeno-test run.
>> 
 > The problem is that rtnet module is not loaded individually by current system but because
> RT NIC device driver module depend on it and then rtnet module will be loaded when specific
> RT NIC device driver module is modprobed after triggered by udev service. That means
> We have to add and modify something to explicitly load rtnet module by default when system bootup 
> if we do not want to depends on real NIC in our case. For example we may add corresponding *.conf  
> like [3] to make  rtnet load automatically when system bootup in our case?
> 
>
>RTnet and udp/rtpacket/loopback etc. modules are loaded by the test
>cases. See testsuite/smokey/net_common/setup.c.

Actually ,rtnet should be loaded before smokey_net_setup run or else  err = cobalt_corectl(_CC_COBALT_GET_NET_CONFIG,
                        &net_config, sizeof(net_config)); would return -EINVAL directly in smokey_net_setup and there is no chance to go ahead because no cobalt_add_config_chain was called at that time if rtnet module was not loaded but it is only called by rtnet_corectl_register per my understanding.

Regards

Hongzhan Chen
>
>Jan
>
>-- 
>Siemens AG, T RDA IOT
>Corporate Competence Center Embedded Linux



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

* Re: about RTnet* smokey test skipped issue on Qemu
  2021-08-03  7:53       ` Chen, Hongzhan
@ 2021-08-03  8:00         ` Jan Kiszka
  0 siblings, 0 replies; 6+ messages in thread
From: Jan Kiszka @ 2021-08-03  8:00 UTC (permalink / raw)
  To: Chen, Hongzhan, xenomai

On 03.08.21 09:53, Chen, Hongzhan wrote:
> 
> 
>> -----Original Message-----
>> From: Jan Kiszka <jan.kiszka@siemens.com> 
>> Sent: Tuesday, August 3, 2021 3:40 PM
>> To: Chen, Hongzhan <hongzhan.chen@intel.com>; xenomai@xenomai.org
>> Subject: Re: about RTnet* smokey test skipped issue on Qemu
>>
>> On 03.08.21 08:46, Chen, Hongzhan wrote:
>>>
>>>
>>>> -----Original Message-----
>>>> From: Jan Kiszka <jan.kiszka@siemens.com> 
>>>> Sent: Tuesday, August 3, 2021 12:59 PM
>>>> To: Chen, Hongzhan <hongzhan.chen@intel.com>; xenomai@xenomai.org
>>>> Subject: Re: about RTnet* smokey test skipped issue on Qemu
>>>>
>>>> On 03.08.21 06:31, Chen, Hongzhan wrote:
>>>>> Firstly, I found that all smokey tests including RTnet* pass on bare
>>>>> metal x86 platform
>>>>> but three RTnet* related test items  are skipped on Qemu.  After further
>>>>> debug, actually there is
>>>>> no supported rtnet device found on Qemu with current network setting
>>>>> when xenomai image
>>>>> is running over even we already enable all supported rtnet devices on
>>>>> xenomai so that
>>>>> the test is skipped on qemu.
>>>>>
>>>>> After I replace virtio-net-pci with e1000 device like [1] patch ,
>>>>> rt_e1000 and rtnet modules
>>>>> would be automatically loaded by udevd so that rtnet* test item can go
>>>>> on without test skipped issue.
>>>>
>>>> By default, we are only doing loopback tests in smokey, nothing that
>>>> requires a real NIC driver to be loaded. These are the modules loaded
>>>> during a test with udp:
>>>>
>>>> Module                  Size  Used by
>>>> rtudp                  24576  0
>>>> rtipv4                 49152  1 rtudp
>>>> rt_loopback            16384  1
>>>> rtnet                  81920  3 rtipv4,rtudp,rt_loopback
>>>>
>>>> You can set the rtnet_driver and rtnet_interface parameters to switch to
>>>> real NICs, but that is not happening during a default xeno-test run.
>>>
>  > The problem is that rtnet module is not loaded individually by current system but because
>> RT NIC device driver module depend on it and then rtnet module will be loaded when specific
>> RT NIC device driver module is modprobed after triggered by udev service. That means
>> We have to add and modify something to explicitly load rtnet module by default when system bootup 
>> if we do not want to depends on real NIC in our case. For example we may add corresponding *.conf  
>> like [3] to make  rtnet load automatically when system bootup in our case?
>>
>>
>> RTnet and udp/rtpacket/loopback etc. modules are loaded by the test
>> cases. See testsuite/smokey/net_common/setup.c.
> 
> Actually ,rtnet should be loaded before smokey_net_setup run or else  err = cobalt_corectl(_CC_COBALT_GET_NET_CONFIG,
>                         &net_config, sizeof(net_config)); would return -EINVAL directly in smokey_net_setup and there is no chance to go ahead because no cobalt_add_config_chain was called at that time if rtnet module was not loaded but it is only called by rtnet_corectl_register per my understanding.

OK, now I understand (and was able reproduce).

Two options to solve that:

 - add loading of the rtnet module to setup.c
 - make the rtnet core a built-in

I'm leaning towards the first option.

Jan

-- 
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux


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

end of thread, other threads:[~2021-08-03  8:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-03  4:31 about RTnet* smokey test skipped issue on Qemu Chen, Hongzhan
2021-08-03  4:58 ` Jan Kiszka
2021-08-03  6:46   ` Chen, Hongzhan
2021-08-03  7:40     ` Jan Kiszka
2021-08-03  7:53       ` Chen, Hongzhan
2021-08-03  8:00         ` 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.