[etherlab-users] R: Random Datagram Unmatched
Viola Roberto
roberto.viola at systemceramics.com
Tue May 21 14:48:30 CEST 2019
Hi Gavin,
first of all, thanks for the answer.
I’ve already tried ec_igb (with your patch for kernel 4.14 BTW) and it gives me the same issue with about the same frequency: i guess it’s not a matter for ec_generic itself.
I’m working on my desk so no motor cables or power in the neighborhoods (for the moment ☺ )
I’ve checked the “ethercat crc” (i have no ethercat diag option, is it ok?) and the counters are always set to 0 even when i have the issue (just to be sure i let it run for 1 hour, and CRC counters are always 0 but i see several Unmatched datagrams)
|Port 0 |Port 1 |Port 2 |Port 3 |
|CRC PHY FWD NXT|CRC PHY FWD NXT|CRC PHY FWD NXT|CRC PHY FWD NXT|
0| 0 0 0 | | | |
This crc thing plus the packet’s counter thing by ifconfig push me to think that sometimes the ec module ignores a packet even if ethernet card receives it. Is is possible?
What happen when EC gives me this warning? I mean, i will lost the informations inside the unmatched packet for sure, but if this issue happens when i write a SDO instead of a PDO the EC will retry automatically to send another SDO packet?
So, it’s just a performance loss or it’s a real issue that could create logic issue to the upper software levels?
Thanks
Roberto
Da: Gavin Lambert [mailto:gavin.lambert at tomra.com]
Inviato: martedì 21 maggio 2019 01:34
A: Viola Roberto <roberto.viola at systemceramics.com>; etherlab-users at etherlab.org
Oggetto: RE: Random Datagram Unmatched
ec_generic can be a mixed bag at 1kHz, depending on your hardware and other processing load. It usually works, but not always.
If you haven’t already, you can try using ec_igb with a PREEMPT_RT kernel; that’s usually more stable than ec_generic. (Xenomai would be even more stable, but is usually not required at 1kHz.)
Another possibility to consider is that it might be your cables; they could be getting a noise spike from somewhere and corrupting the packet. Check the error counters in the slaves (“ethercat crc” and/or “ethercat diag”) and try using STP cable if you can rather than UTP, and avoid running it alongside power or motor cables.
Gavin Lambert
Senior Software Developer
[cid:image003.png at 01D50FE4.037AFE90]
[TOMRA]<http://www.compacsort.com>[Facebook]<https://www.facebook.com/Compacsort>[Linkedin]<https://www.linkedin.com/company/compac-sorting-equipment/>[Youtube]<https://vimeo.com/compacsort>[twitter]<https://twitter.com/compacsort>
COMPAC SORTING EQUIPMENT LTD | 4 Henderson Pl | Onehunga | Auckland 1061 | New Zealand
Switchboard: +64 96 34 00 88 | tomra.com<http://www.tomra.com>
The information contained in this communication and any attachment is confidential and may be legally privileged. It should only be read by the person(s) to whom it is addressed. If you have received this communication in error, please notify the sender and delete the communication.
From: Viola Roberto
Sent: Tuesday, 21 May 2019 02:39
To: etherlab-users at etherlab.org<mailto:etherlab-users at etherlab.org>
Subject: [etherlab-users] Random Datagram Unmatched
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.
ifname="enp2s0"
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:
./bootstrap
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
R.
Roberto Viola
Technical Dept
+39 0536836680
[cid:image009.jpg at 01D50FE4.037AFE90]
SYSTEM CERAMICS S.p.A.
Via Ghiarola Vecchia, 73
41042 Fiorano (Mo) ITALY
+39 0536 836111
info at system-electronics.it<mailto:info at system-electronics.it>
www.system-electronics.it<https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.system-electronics.it&data=02%7C01%7Cgavin.lambert%40tomra.com%7C33b29781c25643a4092008d6dd30f446%7C4308d118edd143008a37cfeba8ad5898%7C0%7C1%7C636939599670767372&sdata=CqCy8kez7Q%2FLsTeStW1bbai%2B1lbGRAYFg6XJZAmqcfc%3D&reserved=0>
[cid:image010.jpg at 01D50FE4.037AFE90]
________________________________
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.
Roberto Viola
Technical Dept
+39 0536836680
[cid:imagecf837a.JPG at 324ad50c.479168d2]
SYSTEM CERAMICS S.p.A.
Via Ghiarola Vecchia, 73
41042 Fiorano (Mo) ITALY
+39 0536 836111
info at system-electronics.it<mailto:info at system-electronics.it>
www.system-electronics.it<http://www.system-electronics.it>
[cid:image6c04b3.JPG at 2c56307d.429ab8b3]
________________________________
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/20190521/cab612d5/attachment-0003.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 11438 bytes
Desc: image003.png
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20190521/cab612d5/attachment-0024.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.png
Type: image/png
Size: 1629 bytes
Desc: image004.png
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20190521/cab612d5/attachment-0025.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image005.png
Type: image/png
Size: 1750 bytes
Desc: image005.png
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20190521/cab612d5/attachment-0026.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image006.png
Type: image/png
Size: 1855 bytes
Desc: image006.png
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20190521/cab612d5/attachment-0027.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image007.png
Type: image/png
Size: 1970 bytes
Desc: image007.png
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20190521/cab612d5/attachment-0028.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image008.png
Type: image/png
Size: 20278 bytes
Desc: image008.png
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20190521/cab612d5/attachment-0029.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image009.jpg
Type: image/jpeg
Size: 15896 bytes
Desc: image009.jpg
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20190521/cab612d5/attachment-0008.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image010.jpg
Type: image/jpeg
Size: 7366 bytes
Desc: image010.jpg
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20190521/cab612d5/attachment-0009.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: imagecf837a.JPG
Type: image/jpeg
Size: 15896 bytes
Desc: imagecf837a.JPG
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20190521/cab612d5/attachment-0008.jpe>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image6c04b3.JPG
Type: image/jpeg
Size: 7366 bytes
Desc: image6c04b3.JPG
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20190521/cab612d5/attachment-0009.jpe>
More information about the Etherlab-users
mailing list