<html xmlns:eXclaimer="http://www.exclaimer.co.uk" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta content="text/html; charset=UTF-16" body:head?="">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.StileMessaggioDiPostaElettronica17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 2.0cm 2.0cm 2.0cm;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body rightMargin="15" lang="IT" link="#0563C1" vlink="#954F72">
<eXclaimer:ORIGINAL_BODY_BEFORE Field="body:before">
<p></p>
<div class="WordSection1">
<p class="MsoNormal">Hi everybody,<o:p></o:p></p>
<p class="MsoNormal"> i’m playing with this great library and it’s just works!<o:p></o:p></p>
<p class="MsoNormal">I’m running it on a Intel Atom E3930 Dual Core 1.3GHz with 4.14.109 preemptive + xenomai 3.1.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">So i started compiling the xenomai example over the ec_generic module. It works, but sometimes (randomly) i saw a classic “datagram UNMATCHED”
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">[ 4187.708617] EtherCAT WARNING 0: 1 datagram UNMATCHED!<o:p></o:p></p>
<p class="MsoNormal">[ 4187.844433] EtherCAT WARNING: Datagram ffff89b4783bc798 (domain0-0-main) was SKIPPED 1 time.<o:p></o:p></p>
<p class="MsoNormal">[ 4188.392447] EtherCAT 0: Domain 0: Working counter changed to 3/3<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The error is not deterministic but it occurs often if i increase the load of the system.<o:p></o:p></p>
<p class="MsoNormal">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?<o:p></o:p></p>
<p class="MsoNormal">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).<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’ve also tried to playing with the ethernet IRQ throttling but they make no differences.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">ifname="enp2s0"<o:p></o:p></p>
<p class="MsoNormal">ifconfig $ifname up<o:p></o:p></p>
<p class="MsoNormal">ethtool -L $ifname combined 1<o:p></o:p></p>
<p class="MsoNormal">ethtool -C $ifname rx-usecs 0 # default 3<o:p></o:p></p>
<p class="MsoNormal">ethtool -C $ifname tx-usecs 0 # default 3<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’ve tried to change the thread RT priority with 50-82-… but the issue is always there.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">When it happens, looking the stats from “ifconfig”, there aren’t any drop of packages (rx and tx go together correctly).<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I have no other idea except compiling with –enable-rtdm: i’ve tried but the compiling/linking process fails.<o:p></o:p></p>
<p class="MsoNormal">Here are my steps:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">./bootstrap<o:p></o:p></p>
<p class="MsoNormal">CFLAGS=`/usr/xenomai/bin/xeno-config --alchemy --rtdm --compat --cflags`<o:p></o:p></p>
<p class="MsoNormal">LDFLAGS=`/usr/xenomai/bin/xeno-config --alchemy --rtdm --compat --ldflags`<o:p></o:p></p>
<p class="MsoNormal">./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/<o:p></o:p></p>
<p class="MsoNormal">make all modules<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">/usr/xenomai/lib/xenomai/bootstrap.o: In function `xenomai_main':<o:p></o:p></p>
<p class="MsoNormal">bootstrap.c:(.text+0x0): multiple definition of `xenomai_main'<o:p></o:p></p>
<p class="MsoNormal">/usr/xenomai/lib/xenomai/bootstrap.o:bootstrap.c:(.text+0x0): first defined here<o:p></o:p></p>
<p class="MsoNormal">/usr/xenomai/lib/xenomai/bootstrap.o:(.rodata+0x0): multiple definition of `xenomai_auto_bootstrap'<o:p></o:p></p>
<p class="MsoNormal">/usr/xenomai/lib/xenomai/bootstrap.o:(.rodata+0x0): first defined here<o:p></o:p></p>
<p class="MsoNormal">/root/ethercat/lib/.libs/libethercat_rtdm.so: undefined reference to `rt_printk'<o:p></o:p></p>
<p class="MsoNormal">/root/ethercat/lib/.libs/libethercat_rtdm.so: undefined reference to `rt_dev_ioctl'<o:p></o:p></p>
<p class="MsoNormal">/root/ethercat/lib/.libs/libethercat_rtdm.so: undefined reference to `rt_dev_open'<o:p></o:p></p>
<p class="MsoNormal">/root/ethercat/lib/.libs/libethercat_rtdm.so: undefined reference to `rt_dev_close'<o:p></o:p></p>
<p class="MsoNormal">collect2: error: ld returned 1 exit status<o:p></o:p></p>
<p class="MsoNormal">Makefile:421: recipe for target 'ec_xenomai_example' failed<o:p></o:p></p>
<p class="MsoNormal">make[4]: *** [ec_xenomai_example] Error 1<o:p></o:p></p>
<p class="MsoNormal">make[4]: Leaving directory '/root/ethercat/examples/xenomai'<o:p></o:p></p>
<p class="MsoNormal">Makefile:454: recipe for target 'all-recursive' failed<o:p></o:p></p>
<p class="MsoNormal">make[3]: *** [all-recursive] Error 1<o:p></o:p></p>
<p class="MsoNormal">make[3]: Leaving directory '/root/ethercat/examples'<o:p></o:p></p>
<p class="MsoNormal">Makefile:406: recipe for target 'all' failed<o:p></o:p></p>
<p class="MsoNormal">make[2]: *** [all] Error 2<o:p></o:p></p>
<p class="MsoNormal">make[2]: Leaving directory '/root/ethercat/examples'<o:p></o:p></p>
<p class="MsoNormal">Makefile:515: recipe for target 'all-recursive' failed<o:p></o:p></p>
<p class="MsoNormal">make[1]: *** [all-recursive] Error 1<o:p></o:p></p>
<p class="MsoNormal">make[1]: Leaving directory '/root/ethercat'<o:p></o:p></p>
<p class="MsoNormal">Makefile:441: recipe for target 'all' failed<o:p></o:p></p>
<p class="MsoNormal">make: *** [all] Error 2<o:p></o:p></p>
<p class="MsoNormal">make: *** Waiting for unfinished jobs....<o:p></o:p></p>
<p class="MsoNormal"> CC [M] /root/ethercat/master/rtdm.o<o:p></o:p></p>
<p class="MsoNormal">In file included from include/xenomai/cobalt/kernel/thread.h:27:0,<o:p></o:p></p>
<p class="MsoNormal"> from include/xenomai/cobalt/kernel/sched.h:24,<o:p></o:p></p>
<p class="MsoNormal"> from include/xenomai/rtdm/driver.h:37,<o:p></o:p></p>
<p class="MsoNormal"> from /root/ethercat/master/rtdm.c:37:<o:p></o:p></p>
<p class="MsoNormal">include/xenomai/cobalt/kernel/timer.h:28:34: fatal error: asm/xenomai/wrappers.h: No such file or directory<o:p></o:p></p>
<p class="MsoNormal">#include <asm/xenomai/wrappers.h><o:p></o:p></p>
<p class="MsoNormal"> ^<o:p></o:p></p>
<p class="MsoNormal">compilation terminated.<o:p></o:p></p>
<p class="MsoNormal">scripts/Makefile.build:326: recipe for target '/root/ethercat/master/rtdm.o' failed<o:p></o:p></p>
<p class="MsoNormal">make[3]: *** [/root/ethercat/master/rtdm.o] Error 1<o:p></o:p></p>
<p class="MsoNormal">scripts/Makefile.build:585: recipe for target '/root/ethercat/master' failed<o:p></o:p></p>
<p class="MsoNormal">make[2]: *** [/root/ethercat/master] Error 2<o:p></o:p></p>
<p class="MsoNormal">Makefile:1535: recipe for target '_module_/root/ethercat' failed<o:p></o:p></p>
<p class="MsoNormal">make[1]: *** [_module_/root/ethercat] Error 2<o:p></o:p></p>
<p class="MsoNormal">make[1]: Leaving directory '/usr/src/linux-headers-4.14.109'<o:p></o:p></p>
<p class="MsoNormal">Makefile:936: recipe for target 'modules' failed<o:p></o:p></p>
<p class="MsoNormal">make: *** [modules] Error 2<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks in advance<o:p></o:p></p>
<p class="MsoNormal">R.<o:p></o:p></p>
</div>
<p></p>
<p>
<table style="FONT-FAMILY: Arial FONT-SIZE: 11px; FONT-WEIGHT: bold">
<tbody>
<tr>
<td style="COLOR: #0093d3">Roberto Viola</td>
</tr>
<tr>
<td>Technical Dept</td>
</tr>
<tr>
<td style="FONT-SIZE: 10px">+39 0536836680 </td>
</tr>
<tr>
<td style="FONT-SIZE: 10px"></td>
</tr>
<tr>
<td style="PADDING-TOP: 10px"><img style="border: 0px Solid ; " src="cid:image32b037.JPG@08d5cfcd.4fad3234"></td>
</tr>
</tbody>
</table>
</p>
<p>
<table cellspacing="0" cols="1" cellpadding="0" border="0">
<tbody>
<tr>
<td><strong>SYSTEM CERAMICS S.p.A.</strong></td>
</tr>
<tr>
<td><font size="2" face="Arial">Via Ghiarola Vecchia, 73</font></td>
</tr>
<tr>
<td><font size="2" face="Arial">41042 Fiorano (Mo) ITALY</font></td>
</tr>
<tr>
<td><font size="2" face="Arial">+39 0536 836111</font></td>
</tr>
<tr>
<td><font size="2" face="Arial"><span style="font-family:Arial;font-size:10pt;"><a href="mailto:info@system-electronics.it" title="" target="" style="font-family:Arial;font-size:10pt;"><span style="font-family:Arial; font-size:10pt;">info@system-electronics.it</span></a></span></font></td>
</tr>
<tr>
<td><span style="font-family:Arial;font-size:10pt;"><a href="http://www.system-electronics.it" title="" target="" style="font-family:Arial;font-size:10pt;"><span style="font-family:Arial; font-size:10pt;">www.system-electronics.it</span></a></span></td>
</tr>
</tbody>
</table>
</p>
<p><img style="border: 0px Solid ; " src="cid:image701eef.JPG@c419ba63.4d81916f"></p>
</eXclaimer:ORIGINAL_BODY_BEFORE>
<div>
<table cellspacing="0" cellpadding="0" border="0">
<!-- Letter Heading -->
<tbody>
<tr>
<td></td>
</tr>
<!-- Letter Body -->
<tr>
<td colspan="3">
<center style="MARGIN-LEFT: 18pt; MARGIN-RIGHT: 18pt"></center>
<center style="MARGIN-LEFT: 18pt; MARGIN-RIGHT: 18pt">
<hr>
</center>
<center style="MARGIN-LEFT: 18pt; MARGIN-RIGHT: 18pt"></center>
</td>
</tr>
<!-- Disclaimer -->
<tr>
<td colspan="3"><span style="FONT-SIZE: 7pt; FONT-FAMILY: verdana; COLOR: gray">
<p style="MARGIN: 0cm 0cm 0pt"><font size="3"><font face="Times New Roman"></font></font></p>
<p style="TEXT-ALIGN: justify"><span style="FONT-SIZE: 7pt; FONT-FAMILY: 'Verdana','sans-serif'; COLOR: gray"></p>
<p>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.</p>
<p>Avvertenza: la presente casella e-mail ed i messaggi da essa derivanti, sono di esclusivo utilizzo aziendale /lavorativo e mai personale.</p>
<p>Risposte al presente messaggio: si avvisa il destinatario che eventuali sue risposte, potranno essere lette dall’intera azienda /ufficio /reparto di appartenenza del mittente.</p>
<p>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. </p>
</span>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
</span></td>
</tr>
</tbody>
</table>
<div></div>
<p></p>
</div>
</body>
</html>