When you use isolcpus to isolate a cpu for the realtime task, as well
as assiging all relevant interrupts to this cpu, it makes sense to
also bind the EtherCAT-OP / EtherCAT-IDLE task to this cpu to reduce
the cache misses and avoid data migration between cores. Therefore
a parameter 'run_on_cpu' is added, that takes the cpu number (same as
in isolcpus, not a smp_affinity mask). If unset, will bind to any cpu
and will be migratable.
The reason to put this into the kernel module is, that the thread is
created during runtime, i.e. when the userspace program is starting
the ethercat master. It would be rather hacky, to find the pid of the
EtherCAT-xx thread and migrate it at this point.
Signed-off-by: Matthias Schoepfer <m.schoepfer@rethinkrobotics.com>
In the /etc/ethercat.conf file, the MASTERX_DEVICE string is given as a
mac address or a wildcard. When we want to deploy the (same) software (image)
to a bunch of different hardware, and these computers do have more than one
interface that matches the driver, we need a way to define the device by
network interface name. This allows to also define the network device by name
(e.g. eth0, eno1, ...)
Signed-off-by: Matthias Schoepfer <m.schoepfer@rethinkrobotics.com>
Commit 82399a9239 assumes you can override `make clean` on the fact
that prerequisites of the same target are merged. This is true but
unfortunately defining a `clean` target prevents automake from
generating its own one, hence the default clean actions are not
performed. This can be easily seen by inspecting the generated
`Makefile`.
Solve this issue by manually chaining up the default action.
Try to reuse the configured paths as much as possible. Unfortunately, to
be able to fully expand some variable (e.g. `bindir`), these files must
be expanded by make, not by configure. This adds some complexity:
https://www.gnu.org/software/automake/manual/html_node/Scripts.html
Mostly fixed omitted double quotes, some conversion of $(eval ..) to $(()).
Left the echo -n untouched, shellcheck complains about not being standard in
/bin/sh. Also, seems like some code is dublicated in ethercatctl.in and
init.d/ethercat.in.
Signed-off-by: Matthias Schoepfer <m.schoepfer@rethinkrobotics.com>
Implement fix for kernel error when opening TTY device file on kernel 3.7.0 or greater
Fix for issue described in #8
See merge request etherlab.org/ethercat!22