[etherlab-dev] EoE patchs and questions

Graeme Foot Graeme.Foot at touchcut.com
Thu Mar 1 00:00:41 CET 2018


> -----Original Message-----
> From: Esben Haabendal [mailto:esbenhaabendal at gmail.com] On Behalf Of Esben Haabendal
> Sent: Thursday, 1 March 2018 2:02 AM
> To: Graeme Foot <Graeme.Foot at touchcut.com>
> Cc: etherlab-dev at etherlab.org
> Subject: Re: [etherlab-dev] EoE patchs and questions
> 
> Hi Graeme
> 
> Graeme Foot <Graeme.Foot at touchcut.com> writes:
> > So the first patch does a few things:
> >
> > 1) adds explicit eoe_addif and eoe_delif tool functions so that you
> >    can manually add/remove an eoe iface without the slave existing
> > 2) no longer deletes and eoe iface if the slave disappears
> 
> This is a behavioral change compared to how eoe interface work now.  And it will break our current system, which relies on the interfaces being created and deleted together with the slaves.

The changes have added a couple of settings to the ethercat config file (EOE_INTERFACES and EOE_AUTOCREATE).  The default for EOE_AUTOCREATE is true, so eoe interfaces will be autocreated as EOE slaves are connected.  The only "breaking" behavioral change here is that they will no longer be deleted when the slave is removed.  The only issue I have with this is that if you connect a slave that does not yet have an alias set, it will auto-create using position naming (e.g. eoe0s4).  Once the alias is set it will auto-create using the alias naming (e.g. eoe0a16000) but keep the position named eoe port.  As this is usually at setup and configuration time then you are likely to reboot and it will be gone.  (Or you can explicitly call the eoe_delif function.)

> 
> With EtherCAT being a dynamic structure, I don't see this new way is supposed to work in general use-case, where the bus configuration is not guaranteed to be fixed.

When the EOE slave is removed the port transitions to a disconnected state (like pulling the plug out of a normal network card).  My (unfounded) feeling is that this would be preferable to other software using the port rather than deleting the interface all together.  It also means that if you have added the port to a bridge (my use case) then it will remain in the bridge and resume once it is plugged back in again.  If it is deleted then it is removed from the bridge and the next time it is plugged in again it will need to be manually re-added it to the bridge.

I would think that even in a dynamic structure if an EOE module has been plugged in once it is likely to be plugged in again at some stage.

> 
> Would it be possible to make this new behavior optional, so that the default behavior is as it is now?

Sure.  Two options:
1) Have another ethercat config file option: EOE_AUTODELETE (default true)
2) Have EOE_AUTOCREATE also mean that it will auto-delete.

I prefer option 2 for ease of implementation, though option 1 would be better if my assumptions above are correct.  Try the attached completely untested (and manually edited) patch file for option 2.

> 
> /Esben
>

I'm interested to know what your application is to have such a dynamic structure.


Regards,
Graeme.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001b-eoe-addif-delif-tools.patch
Type: application/octet-stream
Size: 76450 bytes
Desc: 0001b-eoe-addif-delif-tools.patch
URL: <http://lists.etherlab.org/pipermail/etherlab-dev/attachments/20180228/ed8befb2/attachment-0003.obj>


More information about the Etherlab-dev mailing list