Skip to contentSkip to conversation

rtnet no eth0

Xenomai Шевченко Тарас Григорьевич 2 participants 8 messages Mar 6, 2018 – Apr 23, 2018

lore
Share & tools
lore
#0 lore raw

Good day!
I need help to run rtnet on my nic

i remove r8169 module and follow this https://xenomai.org/rtnet-installation/

looback test are working

some outputs below (could it be a problem by default there is not eth0 interface it s name enp2s0 ?)

what should i do ?

sudo ./rtnet -v start
[sudo] password for yeti:
Turning on verbose mode
sh: echo: I/O error
/usr/xenomai/sbin/rtifconfig rtlo up 127.0.0.1 /usr/xenomai/sbin/rtcfg rteth0 server
ioctl: No such device
/usr/xenomai/sbin/rtifconfig rteth0 up 192.168.161.45 netmask 255.255.255.0
ioctl: No such device
/usr/xenomai/sbin/tdmacfg rteth0 master 5000
ioctl: No such device
/usr/xenomai/sbin/tdmacfg rteth0 slot 0 0
ioctl: No such device
/usr/xenomai/sbin/rtcfg rteth0 add 192.168.161.22 -stage1 - ioctl (add): No such device
vnic0: ERROR while getting interface flags: No such device
SIOCSIFADDR: No such device
vnic0: ERROR while getting interface flags: No such device
SIOCSIFNETMASK: No such device
Waiting for all slaves.../usr/xenomai/sbin/rtcfg rteth0 wait
ioctl: No such device
/usr/xenomai/sbin/rtcfg rteth0 ready
ioctl: No such device

//-------------------------------------------------

@yeti-UDOO-x86:/usr/xenomai/sbin$ sudo ./rtifconfig 
rtlo Medium: Local Loopback 
IP address: 127.0.0.1 
UP LOOPBACK RUNNING MTU: 1500 
//------------------------------------------------- 
Some string from conf file 

RT_DRIVER="rt_r8169"
RT_DRIVER_OPTIONS="" REBIND_RT_NICS="0000:02:00.0" IPADDR="192.168.161.45" NETMASK="255.255.255.0" TDMA_SLAVES="192.168.161.22" //-------------------------------------------------

yeti@yeti-UDOO-x86:~$ lspci 
..... 
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c) 

//-------------------------------------------------

yeti@yeti-UDOO-x86:~$ lsmod 
Module Size Used by 
tdma 28672 0 
rtmac 20480 1 tdma 
rtcfg 45056 0 
rt_loopback 16384 1 
rtpacket 16384 0 
rtudp 24576 0 
rt_r8169 24576 0 
rtipv4 32768 2 rtudp,rtcfg 
rtnet 57344 8 rtipv4,rt_loopback,rtmac,rt_r8169,rtpacket,rtudp,rtcfg,tdma 

//-------------------------------------------------

С уважением и надеждой на сотрудничество,
Шевченко Т.Г.

#1 lore raw

Re: [Xenomai] rtnet no eth 0

is there a way to debug my installation ?

i do
1)add rtnet in menuconfig and add driver 8169
2)remove r8169

yeti@yeti-UDOO-x86:/usr/xenomai/sbin$ sudo ./rtnet  start
sh: echo: I/O error
ioctl: No such device
./rtnet: 193: ./rtnet: cannot open : No such file
vnic0: ERROR while getting interface flags: No such device
SIOCSIFADDR: No such device
vnic0: ERROR while getting interface flags: No such device
SIOCSIFNETMASK: No such device
Waiting for all slaves...ioctl: No such device
ioctl: No such device
yeti@yeti-UDOO-x86:/usr/xenomai/sbin$ lsmod|grep rt
rtmac                  20480  1 tdma
rtcfg                  45056  0
rtpacket               20480  0
rtudp                  24576  0
rt_r8169               24576  0
rtipv4                 32768  2 rtudp,rtcfg
rtnet                  65536  7 rtipv4,rtmac,rt_r8169,rtpacket,rtudp,rtcfg,tdma
yeti@yeti-UDOO-x86:/usr/xenomai/sbin$ lspci -knn |grep Ethernet

02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 0c)
Subsystem: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:0123] Kernel modules: r8169

yeti@yeti-UDOO-x86:/usr/xenomai/sbin$ sudo rmmod r8169
rmmod: ERROR: Module r8169 is not currently loaded
yeti@yeti-UDOO-x86:/usr/xenomai/sbin$ ./version 
Xenomai/cobalt v3.0.6 -- #0246d22 (2018-03-10 10:52:53 +0100)

rtnet conf

RT_DRIVER="rt_r8169"
RT_DRIVER_OPTIONS=""
REBIND_RT_NICS="0000:02:00.0"

IPADDR="192.168.161.45"
NETMASK="255.255.255.128"
RT_LOOPBACK="no"
RT_PROTOCOLS="udp packet"
RTCAP="no"

----- Original Message -----
From: "Шевченко Тарас Григорьевич" <[email protected]>
To: "Jan Kiszka" <[email protected]>
Cc: "xenomai" <[email protected]>
Sent: Tuesday, March 6, 2018 3:22:57 PM
Subject: [Xenomai] rtnet no eth0

Good day!
I need help to run rtnet on my nic

i remove r8169 module and follow this https://xenomai.org/rtnet-installation/

looback test are working

some outputs below (could it be a problem by default there is not eth0 interface it s name enp2s0 ?)

what should i do ?

sudo ./rtnet -v start
[sudo] password for yeti:
Turning on verbose mode
sh: echo: I/O error
/usr/xenomai/sbin/rtifconfig rtlo up 127.0.0.1 /usr/xenomai/sbin/rtcfg rteth0 server
ioctl: No such device
/usr/xenomai/sbin/rtifconfig rteth0 up 192.168.161.45 netmask 255.255.255.0
ioctl: No such device
/usr/xenomai/sbin/tdmacfg rteth0 master 5000
ioctl: No such device
/usr/xenomai/sbin/tdmacfg rteth0 slot 0 0
ioctl: No such device
/usr/xenomai/sbin/rtcfg rteth0 add 192.168.161.22 -stage1 - ioctl (add): No such device
vnic0: ERROR while getting interface flags: No such device
SIOCSIFADDR: No such device
vnic0: ERROR while getting interface flags: No such device
SIOCSIFNETMASK: No such device
Waiting for all slaves.../usr/xenomai/sbin/rtcfg rteth0 wait
ioctl: No such device
/usr/xenomai/sbin/rtcfg rteth0 ready
ioctl: No such device

//-------------------------------------------------

@yeti-UDOO-x86:/usr/xenomai/sbin$ sudo ./rtifconfig 
rtlo Medium: Local Loopback 
IP address: 127.0.0.1 
UP LOOPBACK RUNNING MTU: 1500 
//------------------------------------------------- 
Some string from conf file 

RT_DRIVER="rt_r8169"
RT_DRIVER_OPTIONS="" REBIND_RT_NICS="0000:02:00.0" IPADDR="192.168.161.45" NETMASK="255.255.255.0" TDMA_SLAVES="192.168.161.22" //-------------------------------------------------

yeti@yeti-UDOO-x86:~$ lspci 
..... 
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c) 

//-------------------------------------------------

yeti@yeti-UDOO-x86:~$ lsmod 
Module Size Used by 
tdma 28672 0 
rtmac 20480 1 tdma 
rtcfg 45056 0 
rt_loopback 16384 1 
rtpacket 16384 0 
rtudp 24576 0 
rt_r8169 24576 0 
rtipv4 32768 2 rtudp,rtcfg 
rtnet 57344 8 rtipv4,rt_loopback,rtmac,rt_r8169,rtpacket,rtudp,rtcfg,tdma 

//-------------------------------------------------

С уважением и надеждой на сотрудничество,
Шевченко Т.Г.
_______________________________________________
Xenomai mailing list
[email protected]
https://xenomai.org/mailman/listinfo/xenomai

#2 lore raw

Re: [Xenomai] rtnet no eth 0

Quoted 27 lines · Шевченко Тарас Григорьевич

is there a way to debug my installation ?

i do
1)add rtnet in menuconfig and add driver 8169 2)remove r8169

yeti@yeti-UDOO-x86:/usr/xenomai/sbin$ sudo ./rtnet  start
sh: echo: I/O error
ioctl: No such device
./rtnet: 193: ./rtnet: cannot open : No such file
vnic0: ERROR while getting interface flags: No such device
SIOCSIFADDR: No such device
vnic0: ERROR while getting interface flags: No such device
SIOCSIFNETMASK: No such device
Waiting for all slaves...ioctl: No such device
ioctl: No such device
yeti@yeti-UDOO-x86:/usr/xenomai/sbin$ lsmod|grep rt
rtmac                  20480  1 tdma
rtcfg                  45056  0
rtpacket               20480  0
rtudp                  24576  0
rt_r8169               24576  0
rtipv4                 32768  2 rtudp,rtcfg
rtnet                  65536  7 rtipv4,rtmac,rt_r8169,rtpacket,rtudp,rtcfg,tdma
Quoted 7 lines
yeti@yeti-UDOO-x86:/usr/xenomai/sbin$ lspci -knn |grep Ethernet

02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 0c)
Subsystem: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:0123] Kernel modules: r8169

yeti@yeti-UDOO-x86:/usr/xenomai/sbin$ sudo rmmod r8169
rmmod: ERROR: Module r8169 is not currently loaded

Still, rt_r8169 didn't bind. Maybe our driver doesn't list this card ID (i.e. is too old)... and that is the case here (no 8168). You can try integrating the state of the current upstream driver /wrt to this new device ID into the RTnet variant, but that's not a simple task

Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
#3 lore raw

Re: [Xenomai] rtnet no eth 0

Ok,
could you describe in few words - how to do that ?

С уважением и надеждой на сотрудничество,
Шевченко Т.Г.

----- Original Message -----
From: "Jan Kiszka" <[email protected]>
To: "Шевченко Тарас Григорьевич" <[email protected]>
Cc: "xenomai" <[email protected]>
Sent: Monday, March 12, 2018 4:24:08 PM
Subject: Re: [Xenomai] rtnet no eth 0

Quoted 27 lines · Шевченко Тарас Григорьевич

is there a way to debug my installation ?

i do
1)add rtnet in menuconfig and add driver 8169 2)remove r8169

yeti@yeti-UDOO-x86:/usr/xenomai/sbin$ sudo ./rtnet  start
sh: echo: I/O error
ioctl: No such device
./rtnet: 193: ./rtnet: cannot open : No such file
vnic0: ERROR while getting interface flags: No such device
SIOCSIFADDR: No such device
vnic0: ERROR while getting interface flags: No such device
SIOCSIFNETMASK: No such device
Waiting for all slaves...ioctl: No such device
ioctl: No such device
yeti@yeti-UDOO-x86:/usr/xenomai/sbin$ lsmod|grep rt
rtmac                  20480  1 tdma
rtcfg                  45056  0
rtpacket               20480  0
rtudp                  24576  0
rt_r8169               24576  0
rtipv4                 32768  2 rtudp,rtcfg
rtnet                  65536  7 rtipv4,rtmac,rt_r8169,rtpacket,rtudp,rtcfg,tdma
Quoted 7 lines
yeti@yeti-UDOO-x86:/usr/xenomai/sbin$ lspci -knn |grep Ethernet

02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 0c)
Subsystem: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:0123] Kernel modules: r8169

yeti@yeti-UDOO-x86:/usr/xenomai/sbin$ sudo rmmod r8169
rmmod: ERROR: Module r8169 is not currently loaded

Still, rt_r8169 didn't bind. Maybe our driver doesn't list this card ID (i.e. is too old)... and that is the case here (no 8168). You can try integrating the state of the current upstream driver /wrt to this new device ID into the RTnet variant, but that's not a simple task

Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
#4 lore raw

Re: [Xenomai] rtnet no eth 0

Quoted 2 lines · Шевченко Тарас Григорьевич

Ok,
could you describe in few words - how to do that ?

Diff the RTnet driver against the corresponding upstream driver, look for deviating patterns that are not RTnet related.

Also, check in the upstream history how support for the device type 8168 came in, via which commits. Maybe porting them over is enough, maybe it's just the ID that is missing.

Jan

Quoted 54 lines

С уважением и надеждой на сотрудничество,
Шевченко Т.Г.

----- Original Message -----
From: "Jan Kiszka" <[email protected]>
To: "Шевченко Тарас Григорьевич" <[email protected]>
Cc: "xenomai" <[email protected]>
Sent: Monday, March 12, 2018 4:24:08 PM
Subject: Re: [Xenomai] rtnet no eth 0

Quoted 27 lines · Шевченко Тарас Григорьевич

is there a way to debug my installation ?

i do
1)add rtnet in menuconfig and add driver 8169 2)remove r8169

yeti@yeti-UDOO-x86:/usr/xenomai/sbin$ sudo ./rtnet  start
sh: echo: I/O error
ioctl: No such device
./rtnet: 193: ./rtnet: cannot open : No such file
vnic0: ERROR while getting interface flags: No such device
SIOCSIFADDR: No such device
vnic0: ERROR while getting interface flags: No such device
SIOCSIFNETMASK: No such device
Waiting for all slaves...ioctl: No such device
ioctl: No such device
yeti@yeti-UDOO-x86:/usr/xenomai/sbin$ lsmod|grep rt
rtmac                  20480  1 tdma
rtcfg                  45056  0
rtpacket               20480  0
rtudp                  24576  0
rt_r8169               24576  0
rtipv4                 32768  2 rtudp,rtcfg
rtnet                  65536  7 rtipv4,rtmac,rt_r8169,rtpacket,rtudp,rtcfg,tdma
Quoted 7 lines
yeti@yeti-UDOO-x86:/usr/xenomai/sbin$ lspci -knn |grep Ethernet

02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 0c)
Subsystem: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:0123] Kernel modules: r8169

yeti@yeti-UDOO-x86:/usr/xenomai/sbin$ sudo rmmod r8169
rmmod: ERROR: Module r8169 is not currently loaded

Still, rt_r8169 didn't bind. Maybe our driver doesn't list this card ID (i.e. is too old)... and that is the case here (no 8168). You can try integrating the state of the current upstream driver /wrt to this new device ID into the RTnet variant, but that's not a simple task

Jan

#5 lore raw

Re: [Xenomai] rtnet no eth 0

part of https://github.com/G-Ray/xenomai-boneblack-rtnet-drivers/blob/master/r8169.c

static struct pci_device_id rtl8169_pci_tbl[] = {
	{ PCI_DEVICE(PCI_VENDOR_ID_REALTEK,	0x8136), 0, 0, 2 },
	{ PCI_DEVICE(PCI_VENDOR_ID_REALTEK,	0x8167), 0, 0, 1 },
	{ PCI_DEVICE(PCI_VENDOR_ID_REALTEK,	0x8169), 0, 0, 1 },
	{ PCI_DEVICE(PCI_VENDOR_ID_DLINK,	0x4300), 0, 0, 1 },	/* <kk> D-Link DGE-528T */
	{0,},
};

I think first changes should be there to support product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controll

----- Original Message -----
From: "Jan Kiszka" <[email protected]>
To: "Шевченко Тарас Григорьевич" <[email protected]>
Cc: "xenomai" <[email protected]>
Sent: Monday, March 12, 2018 4:49:29 PM
Subject: Re: [Xenomai] rtnet no eth 0

Quoted 2 lines · Шевченко Тарас Григорьевич

Ok,
could you describe in few words - how to do that ?

Diff the RTnet driver against the corresponding upstream driver, look for deviating patterns that are not RTnet related.

Also, check in the upstream history how support for the device type 8168 came in, via which commits. Maybe porting them over is enough, maybe it's just the ID that is missing.

Jan

Quoted 54 lines

С уважением и надеждой на сотрудничество,
Шевченко Т.Г.

----- Original Message -----
From: "Jan Kiszka" <[email protected]>
To: "Шевченко Тарас Григорьевич" <[email protected]>
Cc: "xenomai" <[email protected]>
Sent: Monday, March 12, 2018 4:24:08 PM
Subject: Re: [Xenomai] rtnet no eth 0

Quoted 27 lines · Шевченко Тарас Григорьевич

is there a way to debug my installation ?

i do
1)add rtnet in menuconfig and add driver 8169 2)remove r8169

yeti@yeti-UDOO-x86:/usr/xenomai/sbin$ sudo ./rtnet  start
sh: echo: I/O error
ioctl: No such device
./rtnet: 193: ./rtnet: cannot open : No such file
vnic0: ERROR while getting interface flags: No such device
SIOCSIFADDR: No such device
vnic0: ERROR while getting interface flags: No such device
SIOCSIFNETMASK: No such device
Waiting for all slaves...ioctl: No such device
ioctl: No such device
yeti@yeti-UDOO-x86:/usr/xenomai/sbin$ lsmod|grep rt
rtmac                  20480  1 tdma
rtcfg                  45056  0
rtpacket               20480  0
rtudp                  24576  0
rt_r8169               24576  0
rtipv4                 32768  2 rtudp,rtcfg
rtnet                  65536  7 rtipv4,rtmac,rt_r8169,rtpacket,rtudp,rtcfg,tdma
Quoted 7 lines
yeti@yeti-UDOO-x86:/usr/xenomai/sbin$ lspci -knn |grep Ethernet

02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 0c)
Subsystem: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:0123] Kernel modules: r8169

yeti@yeti-UDOO-x86:/usr/xenomai/sbin$ sudo rmmod r8169
rmmod: ERROR: Module r8169 is not currently loaded

Still, rt_r8169 didn't bind. Maybe our driver doesn't list this card ID (i.e. is too old)... and that is the case here (no 8168). You can try integrating the state of the current upstream driver /wrt to this new device ID into the RTnet variant, but that's not a simple task

Jan

#6 lore raw

Re: [Xenomai] rtnet no eth 0

Good day!

once more
I make some changes to rtnet r8169 driver based on https://xenomai.org/pipermail/xenomai/2015-June/034450.html
Now I can succsesfully compile it

but after .rtnet start to a system i get

yeti@yeti-UDOO-x86:/usr/xenomai/sbin$ sudo ./rtnet -v start
Turning on verbose mode
sh: echo: I/O error
/usr/xenomai/sbin/rtifconfig rtlo up 127.0.0.1
/usr/xenomai/sbin/rtcfg rteth0 server
ioctl: No such device
/usr/xenomai/sbin/rtifconfig rteth0 up 192.168.161.45 netmask 255.255.255.128
ioctl: No such device
/usr/xenomai/sbin/tdmacfg rteth0 master 5000
ioctl: No such device
/usr/xenomai/sbin/tdmacfg rteth0 slot 0 0
ioctl: No such device
/usr/xenomai/sbin/rtcfg rteth0 add 192.168.161.22 -stage1 -
ioctl (add): No such device
vnic0: ERROR while getting interface flags: No such device
SIOCSIFADDR: No such device
vnic0: ERROR while getting interface flags: No such device
SIOCSIFNETMASK: No such device
Waiting for all slaves.../usr/xenomai/sbin/rtcfg rteth0 wait
ioctl: No such device
/usr/xenomai/sbin/rtcfg rteth0 ready
ioctl: No such device
yeti@yeti-UDOO-x86:/usr/xenomai/sbin$ lsmod
Module                  Size  Used by
tdma                   18473  0
rtmac                   9847  1 tdma
rtcfg                  38110  0
rt_loopback             1467  1
rtpacket                8552  0
rtudp                  12886  0
rt_r8169               14344  0
rtipv4                 25411  2 rtudp,rtcfg
rtnet                  56300  8 rtipv4,rt_loopback,rtmac,rt_r8169,rtpacket,rtudp,rtcfg,tdma

logs

              *** RTnet for Xenomai v3.0.6 ***
[ 4842.022029] RTnet: initialising real-time networking
[ 5308.564289] Initializing rt_r8169 driver
[ 5308.615741] initializing loopback...
[ 5308.615765] RTnet: registered rtlo
[ 5308.681555] RTcfg: init real-time configuration distribution protocol
[ 5308.727633] RTmac: init realtime media access control
[ 5308.767365] RTmac/TDMA: init time division multiple access control mechanism

if I insmod manually my module

[ 5505.043230] rt_r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[ 5505.044057] rt_r8169 0000:02:00.0: can't disable ASPM; OS doesn't have ASPM control
[ 5505.044433] RTnet: registered enp2s0
[ 5505.044444] RTL8168g/8111g at 0xffffb3c78153d000, 00:c0:08:92:44:62, XID 0c000880 IRQ 18
[ 5505.044446] jumbo features [frames: 9200 bytes, tx checksumming: ko]

it seems to me that need to change work with rteth0 -> enp2s0 in all rtnet files How I can do that ?

----- Original Message -----
From: "Шевченко Тарас Григорьевич" <[email protected]>
To: "Jan Kiszka" <[email protected]>
Cc: "xenomai" <[email protected]>
Sent: Вторник, 13 Март 2018 г 17:22:56
Subject: Re: [Xenomai] rtnet no eth 0

part of https://github.com/G-Ray/xenomai-boneblack-rtnet-drivers/blob/master/r8169.c

static struct pci_device_id rtl8169_pci_tbl[] = {
	{ PCI_DEVICE(PCI_VENDOR_ID_REALTEK,	0x8136), 0, 0, 2 },
	{ PCI_DEVICE(PCI_VENDOR_ID_REALTEK,	0x8167), 0, 0, 1 },
	{ PCI_DEVICE(PCI_VENDOR_ID_REALTEK,	0x8169), 0, 0, 1 },
	{ PCI_DEVICE(PCI_VENDOR_ID_DLINK,	0x4300), 0, 0, 1 },	/* <kk> D-Link DGE-528T */
	{0,},
};

I think first changes should be there to support product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controll

----- Original Message -----
From: "Jan Kiszka" <[email protected]>
To: "Шевченко Тарас Григорьевич" <[email protected]>
Cc: "xenomai" <[email protected]>
Sent: Monday, March 12, 2018 4:49:29 PM
Subject: Re: [Xenomai] rtnet no eth 0

Quoted 2 lines · Шевченко Тарас Григорьевич

Ok,
could you describe in few words - how to do that ?

Diff the RTnet driver against the corresponding upstream driver, look for deviating patterns that are not RTnet related.

Also, check in the upstream history how support for the device type 8168 came in, via which commits. Maybe porting them over is enough, maybe it's just the ID that is missing.

Jan

Quoted 47 lines

С уважением и надеждой на сотрудничество,
Шевченко Т.Г.

----- Original Message -----
From: "Jan Kiszka" <[email protected]>
To: "Шевченко Тарас Григорьевич" <[email protected]>
Cc: "xenomai" <[email protected]>
Sent: Monday, March 12, 2018 4:24:08 PM
Subject: Re: [Xenomai] rtnet no eth 0

Quoted 27 lines · Шевченко Тарас Григорьевич

is there a way to debug my installation ?

i do
1)add rtnet in menuconfig and add driver 8169 2)remove r8169

yeti@yeti-UDOO-x86:/usr/xenomai/sbin$ sudo ./rtnet  start
sh: echo: I/O error
ioctl: No such device
./rtnet: 193: ./rtnet: cannot open : No such file
vnic0: ERROR while getting interface flags: No such device
SIOCSIFADDR: No such device
vnic0: ERROR while getting interface flags: No such device
SIOCSIFNETMASK: No such device
Waiting for all slaves...ioctl: No such device
ioctl: No such device
yeti@yeti-UDOO-x86:/usr/xenomai/sbin$ lsmod|grep rt
rtmac                  20480  1 tdma
rtcfg                  45056  0
rtpacket               20480  0
rtudp                  24576  0
rt_r8169               24576  0
rtipv4                 32768  2 rtudp,rtcfg
rtnet                  65536  7 rtipv4,rtmac,rt_r8169,rtpacket,rtudp,rtcfg,tdma
Quoted 7 lines
yeti@yeti-UDOO-x86:/usr/xenomai/sbin$ lspci -knn |grep Ethernet

02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 0c)
Subsystem: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:0123] Kernel modules: r8169

yeti@yeti-UDOO-x86:/usr/xenomai/sbin$ sudo rmmod r8169
rmmod: ERROR: Module r8169 is not currently loaded
Quoted 7 lines

Still, rt_r8169 didn't bind. Maybe our driver doesn't list this card ID (i.e. is too old)... and that is the case here (no 8168). You can try integrating the state of the current upstream driver /wrt to this new device ID into the RTnet variant, but that's not a simple task

Jan

_______________________________________________
Xenomai mailing list
[email protected]
https://xenomai.org/mailman/listinfo/xenomai

#7 lore raw

Re: [Xenomai] rtnet no eth 0

UPD
After all I replace rt-r8169.ko in /usr/lib/modules .... with my module and now it

yeti@yeti-UDOO-x86:/usr/xenomai/sbin$ sudo ./rtnet -v start
Turning on verbose mode
/usr/xenomai/sbin/rtifconfig rtlo up 127.0.0.1
/usr/xenomai/sbin/rtcfg rteth0 server
/usr/xenomai/sbin/rtifconfig rteth0 up 192.168.161.45 netmask 255.255.255.128
/usr/xenomai/sbin/tdmacfg rteth0 master 5000
/usr/xenomai/sbin/tdmacfg rteth0 slot 0 0
/usr/xenomai/sbin/rtcfg rteth0 add 192.168.161.22 -stage1 -
Waiting for all slaves.../usr/xenomai/sbin/rtcfg rteth0 wait
/usr/xenomai/sbin/rtcfg rteth0 ready
yeti@yeti-UDOO-x86:/usr/xenomai/sbin$ sudo ./rtifconfig 
[sudo] password for yeti: 
rteth0    Medium: Ethernet  Hardware address: 00:C0:08:92:44:62
          IP address: 192.168.161.45  Broadcast address: 192.168.161.127
          UP BROADCAST RUNNING  MTU: 1500
          RX packets:90 errors:0 dropped:0 overruns:0 frame:0
          TX packets:56696 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 
          RX bytes:8961 (8.7 Kb)  TX bytes:2395984 (2.2 Mb)

rtlo Medium: Local Loopback
IP address: 127.0.0.1
UP LOOPBACK RUNNING MTU: 1500

is it all correct ?
there is errors in logs, chipset version not writing yet I can share code with any who are interested in Lets comlete it together !! ))

[11123.726792] RTL8168g/8111g at 0xffffb3c7814fd000, 00:c0:08:92:44:62, XID 0c000880 IRQ 18
[11123.726795] jumbo features [frames: 9200 bytes, tx checksumming: ko]
[11123.776142] initializing loopback...
[11123.776167] RTnet: registered rtlo
[11123.841079] RTcfg: init real-time configuration distribution protocol
[11123.887878] RTmac: init realtime media access control
[11123.928428] RTmac/TDMA: init time division multiple access control mechanism
[11123.948347] rt_r8169: rteth0: unknown chipset (mac_version = 39).
[11123.948390] link down
[11123.948393] link down
[11123.999195] ModemManager[517]: segfault at 0 ip 0000000000431ab3 sp 00007ffcc63525a0 error 4 in ModemManager[400000+103000]
[11126.462763] link up

----- Original Message -----
From: "Шевченко Тарас Григорьевич" <[email protected]>
To: "Jan Kiszka" <[email protected]>, "Greg Gallagher" <[email protected]>
Cc: "Olej" <[email protected]>, "xenomai" <[email protected]>
Sent: Понедельник, 23 Апрель 2018 г 17:15:53
Subject: Re: [Xenomai] rtnet no eth 0

Good day!

once more
I make some changes to rtnet r8169 driver based on https://xenomai.org/pipermail/xenomai/2015-June/034450.html
Now I can succsesfully compile it

but after .rtnet start to a system i get

yeti@yeti-UDOO-x86:/usr/xenomai/sbin$ sudo ./rtnet -v start
Turning on verbose mode
sh: echo: I/O error
/usr/xenomai/sbin/rtifconfig rtlo up 127.0.0.1
/usr/xenomai/sbin/rtcfg rteth0 server
ioctl: No such device
/usr/xenomai/sbin/rtifconfig rteth0 up 192.168.161.45 netmask 255.255.255.128
ioctl: No such device
/usr/xenomai/sbin/tdmacfg rteth0 master 5000
ioctl: No such device
/usr/xenomai/sbin/tdmacfg rteth0 slot 0 0
ioctl: No such device
/usr/xenomai/sbin/rtcfg rteth0 add 192.168.161.22 -stage1 -
ioctl (add): No such device
vnic0: ERROR while getting interface flags: No such device
SIOCSIFADDR: No such device
vnic0: ERROR while getting interface flags: No such device
SIOCSIFNETMASK: No such device
Waiting for all slaves.../usr/xenomai/sbin/rtcfg rteth0 wait
ioctl: No such device
/usr/xenomai/sbin/rtcfg rteth0 ready
ioctl: No such device
yeti@yeti-UDOO-x86:/usr/xenomai/sbin$ lsmod
Module                  Size  Used by
tdma                   18473  0
rtmac                   9847  1 tdma
rtcfg                  38110  0
rt_loopback             1467  1
rtpacket                8552  0
rtudp                  12886  0
rt_r8169               14344  0
rtipv4                 25411  2 rtudp,rtcfg
rtnet                  56300  8 rtipv4,rt_loopback,rtmac,rt_r8169,rtpacket,rtudp,rtcfg,tdma

logs

              *** RTnet for Xenomai v3.0.6 ***
[ 4842.022029] RTnet: initialising real-time networking
[ 5308.564289] Initializing rt_r8169 driver
[ 5308.615741] initializing loopback...
[ 5308.615765] RTnet: registered rtlo
[ 5308.681555] RTcfg: init real-time configuration distribution protocol
[ 5308.727633] RTmac: init realtime media access control
[ 5308.767365] RTmac/TDMA: init time division multiple access control mechanism

if I insmod manually my module

[ 5505.043230] rt_r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[ 5505.044057] rt_r8169 0000:02:00.0: can't disable ASPM; OS doesn't have ASPM control
[ 5505.044433] RTnet: registered enp2s0
[ 5505.044444] RTL8168g/8111g at 0xffffb3c78153d000, 00:c0:08:92:44:62, XID 0c000880 IRQ 18
[ 5505.044446] jumbo features [frames: 9200 bytes, tx checksumming: ko]

it seems to me that need to change work with rteth0 -> enp2s0 in all rtnet files How I can do that ?

----- Original Message -----
From: "Шевченко Тарас Григорьевич" <[email protected]>
To: "Jan Kiszka" <[email protected]>
Cc: "xenomai" <[email protected]>
Sent: Вторник, 13 Март 2018 г 17:22:56
Subject: Re: [Xenomai] rtnet no eth 0

part of https://github.com/G-Ray/xenomai-boneblack-rtnet-drivers/blob/master/r8169.c

static struct pci_device_id rtl8169_pci_tbl[] = {
	{ PCI_DEVICE(PCI_VENDOR_ID_REALTEK,	0x8136), 0, 0, 2 },
	{ PCI_DEVICE(PCI_VENDOR_ID_REALTEK,	0x8167), 0, 0, 1 },
	{ PCI_DEVICE(PCI_VENDOR_ID_REALTEK,	0x8169), 0, 0, 1 },
	{ PCI_DEVICE(PCI_VENDOR_ID_DLINK,	0x4300), 0, 0, 1 },	/* <kk> D-Link DGE-528T */
	{0,},
};

I think first changes should be there to support product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controll

----- Original Message -----
From: "Jan Kiszka" <[email protected]>
To: "Шевченко Тарас Григорьевич" <[email protected]>
Cc: "xenomai" <[email protected]>
Sent: Monday, March 12, 2018 4:49:29 PM
Subject: Re: [Xenomai] rtnet no eth 0

Quoted 2 lines · Шевченко Тарас Григорьевич

Ok,
could you describe in few words - how to do that ?

Diff the RTnet driver against the corresponding upstream driver, look for deviating patterns that are not RTnet related.

Also, check in the upstream history how support for the device type 8168 came in, via which commits. Maybe porting them over is enough, maybe it's just the ID that is missing.

Jan

Quoted 47 lines

С уважением и надеждой на сотрудничество,
Шевченко Т.Г.

----- Original Message -----
From: "Jan Kiszka" <[email protected]>
To: "Шевченко Тарас Григорьевич" <[email protected]>
Cc: "xenomai" <[email protected]>
Sent: Monday, March 12, 2018 4:24:08 PM
Subject: Re: [Xenomai] rtnet no eth 0

Quoted 27 lines · Шевченко Тарас Григорьевич

is there a way to debug my installation ?

i do
1)add rtnet in menuconfig and add driver 8169 2)remove r8169

yeti@yeti-UDOO-x86:/usr/xenomai/sbin$ sudo ./rtnet  start
sh: echo: I/O error
ioctl: No such device
./rtnet: 193: ./rtnet: cannot open : No such file
vnic0: ERROR while getting interface flags: No such device
SIOCSIFADDR: No such device
vnic0: ERROR while getting interface flags: No such device
SIOCSIFNETMASK: No such device
Waiting for all slaves...ioctl: No such device
ioctl: No such device
yeti@yeti-UDOO-x86:/usr/xenomai/sbin$ lsmod|grep rt
rtmac                  20480  1 tdma
rtcfg                  45056  0
rtpacket               20480  0
rtudp                  24576  0
rt_r8169               24576  0
rtipv4                 32768  2 rtudp,rtcfg
rtnet                  65536  7 rtipv4,rtmac,rt_r8169,rtpacket,rtudp,rtcfg,tdma
Quoted 7 lines
yeti@yeti-UDOO-x86:/usr/xenomai/sbin$ lspci -knn |grep Ethernet

02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 0c)
Subsystem: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:0123] Kernel modules: r8169

yeti@yeti-UDOO-x86:/usr/xenomai/sbin$ sudo rmmod r8169
rmmod: ERROR: Module r8169 is not currently loaded
Quoted 7 lines

Still, rt_r8169 didn't bind. Maybe our driver doesn't list this card ID (i.e. is too old)... and that is the case here (no 8168). You can try integrating the state of the current upstream driver /wrt to this new device ID into the RTnet variant, but that's not a simple task

Jan

_______________________________________________
Xenomai mailing list
[email protected]
https://xenomai.org/mailman/listinfo/xenomai

_______________________________________________
Xenomai mailing list
[email protected]
https://xenomai.org/mailman/listinfo/xenomai