[Etherlab-users] Enable normal Ethernet devices with native e1000e driver
Per Oberg
pero at wolfram.com
Tue May 4 07:40:43 CEST 2021
Speaking strictly as a Xenomai/Linux user with little experience from actual Etherlab use I just wanted to share a little trick I use.
In my case I sometimes need to re-configure one of the igb-compatible devices after startup. This can easily be done through the /sys/bus/pci/drivers interface without interfering with the other devices. Here is a little script I used for this:
DEVICENAME=$(lspci -mm -d 8086:1533 | grep "I210-T1" | awk '{print $1}')
echo "0000:$DEVICENAME" > /sys/bus/pci/drivers/rt_igb/unbind
echo "0000:$DEVICENAME" > /sys/bus/pci/drivers/igb/bind
If you don't know the devicename you may do
> ls /sys/bus/pci/drivers/rt_igb
or similar to check what devices are bound to that specific driver.
Best regards
Per Öberg
----- Den 4 maj 2021, på kl 0:11, Gavin Lambert gavin.lambert at tomra.com skrev:
> Activating or deactivating the ec_e1000e (or other device-specific) network
> modules will disconnect and remove all devices with the same chipset/family,
> and then add them all back again (both regular Ethernet and EtherCAT).
> The end result is that all ports should be available for use again, but it is
> possible that they may come back with a different name (especially if you're
> using the old ethN names rather than the new hardware-based names) and/or not
> be configured the same way as previously (e.g. they will lose the IP assignment
> and might come back with no address or a different address, although that is
> unlikely if you're using standard DHCP). It will also disrupt any existing
> connections using those ports, although they should normally be able to
> re-establish afterwards provided that the IP is recovered.
> It can be useful to use hardware that has different chipsets for your "main"
> Ethernet port and your EtherCAT ports, to avoid temporary disruption as the
> services are restarted, especially if you're connecting to the machine over a
> remote network connection. But this is not absolutely required.
> It's recommended to use a modern kernel that does not use the legacy ethN names.
> Gavin Lambert
> Senior Software Developer
> COMPAC SORTING EQUIPMENT LTD | 4 Henderson Pl | Onehunga | Auckland 1061 | New
> Zealand
> Switchboard: +49 2630 96520 | https://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: Douglas Lopez
> Sent: Thursday, 22 April 2021 2:51 pm
> To: etherlab-users at etherlab.org
> Subject: [Etherlab-users] Enable normal Ethernet devices with native e1000e
> driver
> Hello IgH Etherlab,
> First off, I would like to thank you for your hard work with etherlab. I found
> the manual very useful and was able to implement IgH ethercat master to run my
> slaves without too many issues, and I am new to plc development in general. I
> apologize in advance if this is the incorrect place to contact, if so, could
> you please redirect me?
> My issue is that while the ec master service is running, the ec_e1000e driver
> disables all other ethernet devices on my machine that are not configured for
> an ethercat master in the etc/sysconfig/ethercat file. While the etherCAT
> master service is running, ifconfig lists only the network device configured
> for the master.
> After rereading the v1.5.2 manual Section 4: Dedicated Hardware, I am unsure if
> the native e1000e driver will be able to use one device (ex: eth2) for etherCAT
> master while using others (ex: eth0, eth1) as "normal" ethernet devices.
> However, Section 4.2: Ethernet and EtherCAT Devices indicates that the native
> driver is "one networking driver for EtherCAT and non-EtherCAT devices" which
> seems contrary to the point made in Dedicated Hardware. Section 4.2 does not
> indicate that the non-EtherCAT devices will be available while the service is
> running, so maybe the fault is in my understanding.
> Is it possible to start the master service for one ethernet device (eth2) and
> then use the other ethernet devices to ssh, with the native e1000e driver? Or
> does activating the master service remove all devices from the network stack so
> that only the master device is operational?
> If this is not possible due to "dedicated hardware" for the native driver, after
> reading section 4.3: Device Activation, the generic driver should be able to
> handle this feature? If I recall correctly, the generic driver will not work
> for RT applications, so I will have to lose Xenomai.
> System Specs:
> Linux version: 3.2.21
> Xenomai: 2.6.21
> Distribution: AntiX 16 (Debian 8.5 Jessie)
> Master version: 1.5.2
> Ethernet Driver: e1000e
> Thank you very much for your time,
> Doug
> --
> Etherlab-users mailing list
> Etherlab-users at etherlab.org
> https://lists.etherlab.org/mailman/listinfo/etherlab-users
More information about the Etherlab-users
mailing list