Lucid: a language for control in the data plane
John Sonchack, Devon Loehr, Jennifer Rexford, David Walker
Abstract
Programmable switch hardware makes it possible to move fine-grained control logic inside the network data plane, improving performance for a wide range of applications. However, applications with integrated control are inherently hard to write in existing data-plane programming languages such as P4. This paper presents Lucid, a language that raises the level of abstraction for putting control functionality in the data plane. Lucid introduces abstractions that make it easy to write sophisticated data-plane applications with interleaved packet-handling and control logic, specialized type and syntax systems that prevent programmer bugs related to data-plane state, and an open-sourced compiler that translates Lucid programs into P4 optimized for the Intel Tofino. These features make Lucid general and easy to use, as we demonstrate by writing a suite of ten different data-plane applications in Lucid. Working prototypes take well under an hour to write, even for a programmer without prior Tofino experience, have around 10x fewer lines of code compared to P4, and compile efficiently to real hardware. In a stateful firewall written in Lucid, we find that moving control from a switch's CPU to its data-plane processor using Lucid reduces the latency of performance-sensitive operations by over 300X.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext fd5eefe0-d730-40d2-937f-11650888ac88Cited by top-tier papers20
- Syrup: User-Defined Scheduling Across the StackKostis Kaffes, Jack Tigar Humphries, David Mazières, Christos KozyrakisSOSP 2021 · 35 citations
- Unleashing SmartNIC Packet Processing Performance in P4Jiarong Xing, Yiming Qiu, Kuo-Feng Hsu, Songyuan Sui et al.SIGCOMM 2023 · 29 citations
- Homunculus: Auto-Generating Efficient Data-Plane ML Pipelines for Datacenter NetworksTushar Swamy, Annus Zulfiqar, Luigi Nardi, Muhammad Shahbaz et al.ASPLOS 2023 · 26 citations
- Cebinae: scalable in-network fairness augmentationLiangcheng Yu, John Sonchack, Vincent LiuSIGCOMM 2022 · 22 citations
- Cetus: Releasing P4 Programmers from the Chore of Trial and Error CompilingYifan Li, Jiaqi Gao, Ennan Zhai, Mengqi Liu et al.NSDI 2022 · 22 citations
Builds on6
- Jaqen: A High-Performance Switch-Native Approach for Detecting and Mitigating Volumetric DDoS Attacks with Programmable SwitchesZaoxing Liu, Hun Namkung, Georgios Nikolaidis, Jeongkeun Lee et al.USENIX Security 2021 · 221 citations
- Contra: A Programmable System for Performance-aware RoutingKuo-Feng Hsu, Ryan Beckett, Ang Chen, Jennifer Rexford et al.NSDI 2020 · 104 citations
- Taurus: a data plane architecture for per-packet MLTushar Swamy, Alexander Rucker, Muhammad Shahbaz, Ishan Gaur et al.ASPLOS 2022 · 94 citations
- Lyra: A Cross-Platform Language and Compiler for Data Plane Programming on Heterogeneous ASICsJiaqi Gao, Ennan Zhai, Hongqiang Harry Liu, Rui Miao et al.SIGCOMM 2020 · 82 citations
- Switch Code Generation Using Program SynthesisXiangyu Gao, Taegyun Kim, Michael D. Wong, Divya Raghunathan et al.SIGCOMM 2020 · 51 citations
Related papers
- Safe, modular packet pipeline programmingDevon Loehr, David WalkerPOPL 2022 · 6 citations
- P4runpro: Enabling Runtime Programmability for RMT Programmable SwitchesYifan Yang, Lin He, Jiasheng Zhou, Xiaoyi Shi et al.SIGCOMM 2024 · 12 citations
- When P4 Meets Run-to-completion ArchitectureHao Zheng, Xin Yan, Wenbo Li, Jiaqi Zheng et al.NSDI 2025 · 5 citations
- Composing Dataplane Programs with μP4Hardik Soni, Myriana Rifai, Praveen Kumar, Ryan Doenges et al.SIGCOMM 2020 · 54 citations
- NetCL: A Unified Programming Framework for In-Network ComputingGeorge Karlos, Henri E. Bal, Lin WangSC 2024 · 3 citations
