<html 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=us-ascii">
<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;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle18
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
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 lang="EN-NZ" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Regarding patch 0002, I’m curious why the callbacks are being disabled for the RTDM case. (master/ioctl.c) (And note that EC_EOE is enabled by default, so this will affect most RTDM users.)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">As I understand it (although I might be wrong), the callbacks are expressly intended for use with RTAI/Xenomai apps, so that you can make it use an RTAI/Xenomai lock instead of a Linux lock (or defer sending/receiving entirely to another
cycle, if you’re busy and don’t want to lock). It does require either a kernel-space app or at least a stub that implements a suitable locking model -- user-space applications will always have NULL callbacks and would thus behave the same as if this part
of your patch had never been applied.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Since the ec_ioctl_* locks are automatically disabled for RTDM, the change you’re suggesting in this patch completely disables any possibility of locking/deferral at all for RTDM apps, which seems a bit odd, since AFAIK that’s the only
reason that the callbacks exist in the first place.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<P
style="FONT-SIZE: 100%; FONT-FAMILY: Calibri, Candara, Segoe, Optima, Arial, sans-serif; COLOR: rgb(89,89,89)"><STRONG>Gavin Lambert<BR></STRONG>Senior Software Developer<BR></P>
<P style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">
<TABLE>
<TBODY
style="FONT-SIZE: 75%; FONT-FAMILY: Calibri, Candara, Segoe, Optima, Arial, sans-serif; COLOR: rgb(89,89,89)"> </TBODY></TABLE></P>
<P style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><IMG border=0
src="cid:logo_compac_5dcf97ef-52f5-498c-8b9b-728410ddffaf.png"><BR><A
href="http://www.compacsort.com"><IMG border=0 alt=TOMRA
src="cid:compacicon_82e8a8c7-154a-4a32-9720-a5badb6258e0.png" width=33
height=37></A> <A href="https://www.facebook.com/Compacsort"><IMG border=0
alt=Facebook src="cid:facebook_fa85b924-53b9-45cc-8162-0564f64ec3a3.png" width=35
height=37></A> <A
href="https://www.linkedin.com/company/compac-sorting-equipment/"><IMG border=0
alt=Linkedin src="cid:linkedin_4ec016ad-84fa-443c-85a3-b9615a4ccef8.png" width=35
height=37></A> <A href="https://vimeo.com/compacsort"><IMG border=0 alt=Youtube
src="cid:youtube_32142163-fc27-4aed-b14d-e8a377f98a6d.png" width=37 height=37></A>
<A href="https://twitter.com/compacsort"><IMG border=0 alt=twitter
src="cid:twitter_d89338d8-98c8-4b65-9a9e-7b1333160b0d.png" width=33 height=37></A>
</P>
<P
style="FONT-SIZE: 75%; FONT-FAMILY: Calibri, Candara, Segoe, Optima, Arial, sans-serif; COLOR: rgb(89,89,89)"><B>COMPAC
SORTING EQUIPMENT LTD</B> | 4 Henderson Pl | Onehunga | Auckland 1061 | New
Zealand<BR>Switchboard: +64 96 34 00 88 | <A
href="http://www.tomra.com">tomra.com</A> </P>
<TABLE
style="BORDER-TOP-STYLE: none; BORDER-LEFT-STYLE: none; BORDER-COLLAPSE: collapse; BORDER-BOTTOM-STYLE: none; BORDER-RIGHT-STYLE: none"
cellSpacing=0 cellPadding=0 border=1>
<TBODY>
<TR>
<TD
style="BORDER-LEFT-STYLE: none; BORDER-TOP: #595959 1pt solid; BORDER-BOTTOM: #595959 1pt solid; BORDER-RIGHT-STYLE: none"
vAlign=top>
<P
style="FONT-SIZE: 75%; FONT-FAMILY: Calibri, Candara, Segoe, Optima, Arial, sans-serif; COLOR: rgb(89,89,89)">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.
</P></TD></TR></TBODY></TABLE>
<P
style="FONT-SIZE: 75%; FONT-FAMILY: Calibri, Candara, Segoe, Optima, Arial, sans-serif; COLOR: rgb(89,89,89)"></P><div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="mso-fareast-language:EN-NZ">From:</span></b><span lang="EN-US" style="mso-fareast-language:EN-NZ"> Graeme Foot<br>
<b>Sent:</b> Thursday, 7 February 2019 10:35<br>
<b>To:</b> etherlab-dev@etherlab.org<br>
<b>Subject:</b> [etherlab-dev] EoE IP command patch<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">FYI, I've updated my EoE patches and added a new one.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b>0001-eoe-addif-delif-tools.patch<o:p></o:p></b></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">This has been updated so that if the "eoe_autocreate" flag is 1 (true) then static "eoe_interfaces" can still be used, resulting in a combination of static and dynamic EoE ifaces. I'm doing this so I can have static iface ports for my
switch devices (EL6601, EL6614 modules) and dynamic iface ports for my Yaskawa sigma 7 amps which support configuration via EoE.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b>0002-eoe-via-rtdm.patch<o:p></o:p></b></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Line number changes due to the above patch.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b>0003-eoe-ip.patch<o:p></o:p></b></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">This is a new patch to fix some EoE bugs to do with the "ethercat ip" command. The ip command allows you to set the MAC, IP address, subnet mask, gateway, DNS server and name on an EoE device. This command was returning errors saying
it had timed out. This was due to the EoE frame thread receiving and dropping the reply from the ip command. I'm not sure if this became a problem due to the mailbox patches or whether it would have been a problem anyway. Note: the ip command would also
drop mailbox replies that were meant to go to the EoE frame thread handler.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">To resolve this I have created two EoE mailbox reply caches. One for the EoE frame thread and one for the ip command.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Secondly the EtherCAT master was packing the ip command data, so if an item was not being set subsequent items would not leave a space for it and dynamically sizing the data structure. The ETG.1000.6 standard shows the ip command (EoE
Init Request) data structure requires the data to have fixed positions and to leave space for unused items. It is also a fixed size. I have confirmed this with Beckhoff.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Regards,<o:p></o:p></p>
<p class="MsoNormal">Graeme Foot.<o:p></o:p></p>
</div>
</body>
</html>