Towards a Real-Time IoT: Approaches for Incoming Packet Processing in Cyber-Physical Systems

Ilja Behnke,Christoph Blumschein,Robert Danicki,Philipp Wiesner,Lauritz Thamsen,Odej Kao
DOI: https://doi.org/10.1016/j.sysarc.2023.102891
2023-05-03
Abstract:Embedded real-time devices for monitoring, controlling, and collaboration purposes in cyber-physical systems are now commonly equipped with IP networking capabilities. However, the reception and processing of IP packets generates workloads in unpredictable frequencies as networks are outside of a developer's control and difficult to anticipate, especially when networks are connected to the internet. As of now, embedded network controllers and IP stacks are not designed for real-time capabilities, even when used in real-time environments and operating systems. Our work focuses on real-time aware packet reception from open network connections, without a real-time networking infrastructure. This article presents two experimentally evaluated modifications to the IP processing subsystem and embedded network interface controllers of constrained IoT devices. The first, our software approach, introduces early packet classification and priority-aware processing in the network driver. In our experiments this allowed the network subsystem to remain active at a seven-fold increase in network traffic load before disabling the receive interrupts as a last resort. The second, our hardware approach, makes changes to the network interface controller, applying interrupt moderation based on real-time priorities to minimize the number of network-generated interrupts. Furthermore, this article provides an outlook on how the software and hardware approaches can be combined in a co-designed packet receive architecture.
Networking and Internet Architecture
What problem does this paper attempt to address?
The paper aims to address the issues encountered by Internet of Things (IoT) devices when handling real-time network packets. Specifically, the research focuses on the challenges faced by embedded real-time devices in receiving and processing packets when network connections are open. Since existing embedded network controllers and IP stacks are not designed for real-time performance, connecting these devices to an unpredictable internet environment results in uncontrollable workloads. This leads to the following major issues: 1. **Unpredictable Workload**: Due to the difficulty in predicting the frequency of network traffic, especially when devices are connected to the internet, receiving and processing IP packets generate an unpredictable workload. 2. **Limited Real-Time Performance**: Current embedded network controllers and IP stacks are not designed for real-time capabilities. Even when used in environments requiring real-time features, they fail to meet the demands of real-time systems. 3. **Interrupt Management Challenges**: When network packets arrive, they trigger interrupt requests (IRQs), which preempt the running real-time processes regardless of their priority. This disrupts the system's predictability. To address these issues, the authors propose two methods to improve the network subsystem in constrained IoT devices: one is a software approach that reduces the impact of best-effort packet processing on real-time behavior through early packet classification and priority-based processing; the other is a hardware approach that modifies the network interface controller to apply interrupt moderation based on real-time priorities, reducing the number of interrupts generated by the network while ensuring high-priority packets are processed immediately. Both methods are optimized for embedded real-time devices in traditional IP network environments lacking real-time specific protocols or hardware.