AP-SDN: Action Program enabled Software-Defined Networking Architecture

Zheng Zhao, Xiaoya Fan, Xin Xie, Qian Mao, Qi ZhaoKSII 2023

TL;DR

AP-SDN introduces a novel architecture that transforms the Software-Defined Networking (SDN) data plane from a rigid "match-action" engine into a fully programmable environment. By allowing switches to execute dynamic, binary "Action Programs" at runtime, the system enables complex packet processing—like transparent encryption—without the latency of middleboxes or the downtime required by P4-based reprogramming.

What Problem Does This Paper Address?

In traditional SDN, the "brain" (control plane) is flexible, but the "muscle" (data plane) is relatively stiff. Switches generally follow a "Match-Action" paradigm: if a packet matches certain criteria (like a destination IP), the switch performs a predefined action (like forwarding or dropping).

The problem is that this action set is usually hardcoded. If a network operator wants to implement a complex new function—such as real-time traffic encryption or deep packet inspection—they typically have two suboptimal choices:

  1. Middleboxes: Route traffic through a separate server (adding significant latency and "detours").
  2. P4 Switches: Use programmable hardware, which often requires suspending the switch to update logic and has limited "expression power" for complex arithmetic or loops.

The authors tackle this "programmability gap" by creating a system where the data plane can learn and execute entirely new, complex behaviors on the fly.

Methods

The authors developed AP-SDN, which consists of three major modifications to the standard SDN stack:

  • AP-OVS (The Switch): They modified Open vSwitch (OVS) to support a new action type called program. When a packet hits this action, it isn't just forwarded; it is passed to a separate "Action Program" process.
  • High-Performance IPC: To prevent the switch from slowing to a crawl, they used shared memory (shm) and circular queues. This allows the main switch process (vswitchd) and the Action Program to pass packets back and forth with minimal overhead.
  • Extended Controller & Protocol: They modified the RYU controller to handle the compilation and distribution of these programs. They also extended the OpenFlow protocol so the controller can tell a switch: "Here is a new binary; run it whenever you see traffic from Host A."

As a proof of concept, they implemented a Traffic Encryption action program that transparently encrypts/decrypts traffic as it moves between switches, making the security measures invisible to the end terminals.

Datasets

As is common in networking research, the authors did not use a static "dataset" in the machine-learning sense. Instead, they evaluated their system using:

  • Experimental Topologies: Four distinct network setups (Traditional SDN, SDN + Middleboxes, Hybrid SDN, and AP-SDN) built using physical servers and NICs.
  • Traffic Generation Tools: They used standard benchmarking tools like Ping (for latency/RTT) and Iperf3 (for throughput) to simulate real-world network loads ranging from 100M to 900M background traffic.

Key Insights and Ideas

  • "Action as a Process": The core "aha" moment is treating a switch action as a standalone executable. This bypasses the limitations of fixed-function ASICs and allows for loops, complex math, and stateful processing that P4 struggles with.
  • Eliminating the "Middlebox Detour": By running the logic inside the switch, the paper shows you can avoid the "hairpinning" effect where traffic has to leave the network fabric to be processed by a firewall or encryptor, then come back in.
  • Incremental Deployment: Because AP-SDN is built on the widely-used Open vSwitch, it can be rolled out incrementally into existing SDN environments without a "forklift upgrade" of the entire infrastructure.

Key Results

The researchers compared AP-SDN against traditional setups with impressive results:

  • Latency: When performing encryption, AP-SDN showed significantly lower delay than the "SDN + Middlebox" approach because it eliminated the routing detour.
  • Throughput: While executing complex action programs does incur a performance hit (about a 26.1% drop on average), the throughput becomes comparable to traditional SDN as packet sizes increase to 1024 bytes.
  • Efficiency: AP-SDN required only half the number of flow table rules (2 vs 4) compared to middlebox-based encryption, reducing the memory pressure on the switches.
  • Installation Speed: Deploying a new action program and its associated flow rules takes only about 1.2ms more than a standard rule update, proving that "runtime extensibility" is viable.

Limitations and Future Work

The authors are transparent about the hurdles remaining for production-grade deployment:

  • The Controller Bottleneck: As networks scale, asking a single controller to compile and distribute binaries to hundreds of switches could create a massive CPU load.
  • Security Risks: Running arbitrary binaries on a switch is a security nightmare if not managed correctly. A malicious action program could act as a rootkit for the entire network. The authors suggest future work using containerization or virtualization to isolate these programs.
  • Optimization: The current prototype uses single-threaded encryption. The authors note that moving to multi-threaded processing would significantly close the throughput gap.
  • P4 Integration: A promising future direction mentioned is combining AP-SDN with P4 to create a "protocol-oblivious, action-free" data plane that gets the best of both worlds: hardware speed and software flexibility.

Summary updated

BibTeX
@inproceedings{zhao2023ap,
  author = {Zheng Zhao and Xiaoya Fan and Xin Xie and Qian Mao and Qi Zhao},
  title = {{AP-SDN: Action Program enabled Software-Defined Networking Architecture}},
  booktitle = {KSII},
  year = {2023},
  doi = {10.3837/tiis.2023.07.009},
}
Figure