[etherlab-users] Random Datagram Unmatched

Viola Roberto roberto.viola at systemceramics.com
Mon May 20 16:39:09 CEST 2019

Hi everybody,
  i’m playing with this great library and it’s just works!
I’m running it on a Intel Atom E3930 Dual Core 1.3GHz with 4.14.109 preemptive + xenomai 3.1.

So i started compiling the xenomai example over the ec_generic module. It works, but sometimes (randomly) i saw a classic “datagram UNMATCHED”

[ 4187.708617] EtherCAT WARNING 0: 1 datagram UNMATCHED!
[ 4187.844433] EtherCAT WARNING: Datagram ffff89b4783bc798 (domain0-0-main) was SKIPPED 1 time.
[ 4188.392447] EtherCAT 0: Domain 0: Working counter changed to 3/3

The error is not deterministic but it occurs often if i increase the load of the system.
Reading the ML i understood that at 1KHz everything should run fine even with the ec_generic (i have 2 igb port BTW), isn’t it?
I’ve tried 1KHz, 500Hz, 100Hz but the issue is always there (stepping down the frequency of the main loop causing the issue be less visible).

I’ve also tried to playing with the ethernet IRQ throttling but they make no differences.

ifconfig $ifname up
ethtool -L $ifname combined 1
ethtool -C $ifname rx-usecs 0 # default 3
ethtool -C $ifname tx-usecs 0 # default 3

I’ve tried to change the thread RT priority with 50-82-… but the issue is always there.

When it happens, looking the stats from “ifconfig”, there aren’t any drop of packages (rx and tx go together correctly).

I have no other idea except compiling with –enable-rtdm: i’ve tried but the compiling/linking process fails.
Here are my steps:

CFLAGS=`/usr/xenomai/bin/xeno-config --alchemy --rtdm --compat --cflags`
LDFLAGS=`/usr/xenomai/bin/xeno-config --alchemy --rtdm --compat --ldflags`
./configure --enable-kernel --enable-generic --enable-ccat --disable-8139too --disable-e100 --disable-e1000 --disable-e1000e --disable-r8169 --enable-sii-assign --enable-hrtimer --enable-igb --with-linux-dir=/usr/src/linux-headers-4.14.109/ --prefix=/usr --enable-rtdm --with-xenomai-dir=/usr/xenomai/
make all modules

/usr/xenomai/lib/xenomai/bootstrap.o: In function `xenomai_main':
bootstrap.c:(.text+0x0): multiple definition of `xenomai_main'
/usr/xenomai/lib/xenomai/bootstrap.o:bootstrap.c:(.text+0x0): first defined here
/usr/xenomai/lib/xenomai/bootstrap.o:(.rodata+0x0): multiple definition of `xenomai_auto_bootstrap'
/usr/xenomai/lib/xenomai/bootstrap.o:(.rodata+0x0): first defined here
/root/ethercat/lib/.libs/libethercat_rtdm.so: undefined reference to `rt_printk'
/root/ethercat/lib/.libs/libethercat_rtdm.so: undefined reference to `rt_dev_ioctl'
/root/ethercat/lib/.libs/libethercat_rtdm.so: undefined reference to `rt_dev_open'
/root/ethercat/lib/.libs/libethercat_rtdm.so: undefined reference to `rt_dev_close'
collect2: error: ld returned 1 exit status
Makefile:421: recipe for target 'ec_xenomai_example' failed
make[4]: *** [ec_xenomai_example] Error 1
make[4]: Leaving directory '/root/ethercat/examples/xenomai'
Makefile:454: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/root/ethercat/examples'
Makefile:406: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/root/ethercat/examples'
Makefile:515: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/root/ethercat'
Makefile:441: recipe for target 'all' failed
make: *** [all] Error 2
make: *** Waiting for unfinished jobs....
  CC [M]  /root/ethercat/master/rtdm.o
In file included from include/xenomai/cobalt/kernel/thread.h:27:0,
                 from include/xenomai/cobalt/kernel/sched.h:24,
                 from include/xenomai/rtdm/driver.h:37,
                 from /root/ethercat/master/rtdm.c:37:
include/xenomai/cobalt/kernel/timer.h:28:34: fatal error: asm/xenomai/wrappers.h: No such file or directory
#include <asm/xenomai/wrappers.h>
compilation terminated.
scripts/Makefile.build:326: recipe for target '/root/ethercat/master/rtdm.o' failed
make[3]: *** [/root/ethercat/master/rtdm.o] Error 1
scripts/Makefile.build:585: recipe for target '/root/ethercat/master' failed
make[2]: *** [/root/ethercat/master] Error 2
Makefile:1535: recipe for target '_module_/root/ethercat' failed
make[1]: *** [_module_/root/ethercat] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.14.109'
Makefile:936: recipe for target 'modules' failed
make: *** [modules] Error 2

Thanks in advance

Roberto Viola
Technical Dept
+39 0536836680

[cid:image32b037.JPG at 08d5cfcd.4fad3234]

Via Ghiarola Vecchia, 73
41042 Fiorano (Mo) ITALY
+39 0536 836111
info at system-electronics.it<mailto:info at system-electronics.it>

[cid:image701eef.JPG at c419ba63.4d81916f]


Le informazioni contenute in questa email, inclusi i suoi allegati, sono riservate e ad uso esclusivo del destinatario. Qualora le fosse pervenuta per errore, lei non è autorizzato a copiare, inoltrare e/o rendere nota questa email e i suoi allegati, totalmente o parzialmente, e pertanto la preghiamo di cancellarla immediatamente senza visionarne il contenuto e gli allegati.

Avvertenza: la presente casella e-mail ed i messaggi da essa derivanti, sono di esclusivo utilizzo aziendale /lavorativo e mai personale.

Risposte al presente messaggio: si avvisa il destinatario che eventuali sue risposte, potranno essere lette dall’intera azienda /ufficio /reparto di appartenenza del mittente.

The information contained in this e-mail, including attachments, is confidential and exclusively for the use of the intended recipient. If you received this communication by mistake you are not authorized to copy, send and/or publish this message and its attachments, in whole or in part and therefore please delete this message.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20190520/24d9082c/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image32b037.JPG
Type: image/jpeg
Size: 15896 bytes
Desc: image32b037.JPG
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20190520/24d9082c/attachment-0002.jpe>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image701eef.JPG
Type: image/jpeg
Size: 7366 bytes
Desc: image701eef.JPG
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20190520/24d9082c/attachment-0003.jpe>

More information about the etherlab-users mailing list