[etherlab-users] Running on non-8139 NIC's
fp at igh-essen.com
Mon Mar 19 17:12:13 CET 2007
Anders Blomdell wrote:
> Is there any simple way to run etehrlab with a non 8139 NIC? Trying the
> following hack with a spare e1000 NIC fails (not surprisingly) on a
> segfault in e1000_xmit_frame, called from ec_device_send+0x50. Question,
> is there any simple way to compile a (non-realtime) master that binds to
> an arbitrary net_device (ethX)?
unfortunately no. The EtherCAT master uses a pre-allocated socket buffer
for transmitting frames. Default network drivers free the socket
buffers, that were passed from the network stack, EtherCAT-capable ones
shall not do this.
Having a persistent socket buffer is necessary, because the send routine
could be called in realtime context, where (in general) no memory can be
allocated. If you are sure that you are always in a context, where
memory allocation is possible, you could try to allocate the socket
buffer dynamically before calling the ec_master_send_frames() routine.
Another issue might be, that the kernel network stack might poll the
device and take over a received frame. You'll have to avoid this. Also
interrupts are not necessary for the Ethernet driver... There are a few
reasons that made me decide to modify the standard drivers...
More information about the Etherlab-users