I am looking to generate raw Ethernet frames with payload that is preloaded into memory. The Ethernet frames (10-60 full frames) should be generated at 1 ms intervals with no exception.

What would be my option to do this? My concern is in regards to the real-time requirements of such an application. Interrupts should be minimized and the process should perhaps have a core dedicated to its execution? If Linux/software is not an option the alternative is FPGA.

Looking forward to hear potential solutions.


1ms is plenty to generate a few Ethernet frames, but on a typical Linux system, you can't count on not having the occasional pause. Even if you make your process high-priority, I don't think you can expect to always make a 1ms deadline.

RTLinux combines a real-time operating system with Linux. Linux runs as a non-real-time-priority task in the real-time scheduler.

I lack experience with RTLinux, so I can't offer concrete advice, but it does include Ethernet drivers, so it looks suitable for your use case.

|improve this answer|||||
  • thank you for your input! That sounds exactly like what I am looking for. However, after a brief search I am unable to locate any recent sources/wikis/HowTo's for deployment of RTLinux and their main website seems to be down as well. I found an alternative which seems to do the same thing with "considering Linux as a background task": rtai.org/?Homepage – Rami Feb 3 '16 at 18:41
  • Or a perhaps RealTime. I am honestly confused with the myriad of possibilities. I will throw a couple of tries on a Desktop and see what sticks. – Rami Feb 3 '16 at 18:54

Unless you are using a very esoteric distribution, Linux, or any common derivative of a UNIX system, is not real time. If you are looking into time slices like 1 milisecond without any exceptions, you need to look elsewhere, for a real time OS. Whatever anyone can tell you to do on Linux is on best effort basis and if there is a contention on CPU, I/O or any other resource, the process will keep executing, but may skip a beat or two, or go faster than expected 1 ms intervals. And this is not an anomaly. It is by design.

|improve this answer|||||
  • There is no way I could for example reserve one core to the ethernet-frame generating thread and minimize interrupts and thread scheduling to other cores through cpusets, set affinity, etc.? – Rami Feb 2 '16 at 19:55
  • you can, but again, Linux kernel is designed to run processes in parallel whenever possible. You need to "teach" the OS not to do this. I don't believe there is an app for that. Whereas a RTOS (real time OS) executes commands from a queue, first in first out manner, where you can control the timing, unless of course you are expecting absurd speeds, far beyond machine's capability. Unfortunately RTOS concept is very old and is not being developed in the wild. There are very specific applications for it, mostly military (smart weapon systems). Good luck finding one. – MelBurslan Feb 2 '16 at 20:13
  • Alright, thanks I will continue to investigate possibilities. The data rate is anywhere between 300-800 Mbps, nothing too excessive. – Rami Feb 2 '16 at 20:26
  • 1
    @Rami RTLinux might work for you. – Gilles 'SO- stop being evil' Feb 2 '16 at 23:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.