skip to main content
10.1145/3373360.3380843acmconferencesArticle/Chapter ViewAbstractPublication PagescommConference Proceedingsconference-collections
research-article

Tracking P4 Program Execution in the Data Plane

Published: 04 March 2020 Publication History

Abstract

While programmable switches provide operators with much-needed control over the network, they also increase the potential sources of packet-processing errors. Bugs can happen anywhere: in the P4 program, the controller installing rules into tables, or the compiler that maps the P4 program into the resource-constrained switch pipelines. Most of these bugs manifest themselves after certain sequences of packets with certain combinations of rules in the tables. Tracking each packet's execution path through the P4 program, i.e., the sequence of tables hit and the actions applied, directly in the data plane is useful in localizing such bugs as they occur in real time. The fact that programmable data planes require P4 programs to be loop-free and can perform simple integer arithmetic operations makes them amenable to Ball-Larus encoding, a well-known technique in profiling execution paths in software programs that can efficiently encode all N paths in a single [log(N)]-bit variable. However, for real-world P4 programs, the path variable can get quite large, making it inefficient for integer arithmetic at line rate. Moreover, the encoding could require a subset of tables, that would otherwise have no data dependency, to update the same variable. By carefully breaking up the P4 program into disjoint partitions and tracking each partition's execution path separately, we show how to minimally augment P4 programs to track the execution path of each packet.

References

[1]
P4 Tutorials. https://github.com/p4lang/tutorials/. Accessed: November 2019.
[2]
T. Ball and J. R. Larus. Efficient Path Profiling. In International Symposium on Microarchitecture, 1996.
[3]
M. Canini, D. Venzano, P. Perešíni, D. Kostić, and J. Rexford. A NICE Way to Test OpenFlow Applications. In NSDI, 2012.
[4]
Cisco Catalyst 9300 Programmable Switches. https://www.cisco.com/c/en/us/products/switches/catalyst-9300-series-switches/index.html. Accessed: May November.
[5]
L. Freire, M. Neves, L. Leal, K. Levchenko, A. Schaeffer-Filho, and M. Barcellos. Uncovering Bugs in P4 Programs with Assertion-Based Verification. In SOSR, 2018.
[6]
N. Handigol, B. Heller, V. Jeyakumar,D. Mazières, and N. McKeown. I Know What Your Packet Did Last Hop: Using Packet Histories to Troubleshoot Networks. In NSDI, 2014.
[7]
EX9200 Programmable Switches. https://www.juniper.net/us/en/products-services/switching/ex-series/ex9200/. Accessed: November 2019.
[8]
J. Liu, W. Hallahan, C. Schlesinger, M. Sharif, J. Lee, R. Soulé, H. Wang, C. Caşcaval, N. McKeown, and N. Foster. P4V: Practical Verification for Programmable Data Planes. In SIGCOMM, 2018.
[9]
N. Lopes, N. Bjørner, N. McKeown, A. Rybalchenko, D. Talayco, and G. Varghese. Automatically Verifying Reachability and Well-Formedness in P4 Networks. MSR Technical Report, MSR-TR-2016-65, 2016.
[10]
A. Nötzli, J. Khan, A. Fingerhut, C. Barrett, and P. Athanas. P4pktgen: Automated Test Case Generation for P4 Programs. In SOSR, 2018.
[11]
Advanced Programmable Switch. https://www.stordis.com/products/. Accessed: November 2019.
[12]
P4 Language Consortium. https://p4.org/. Accessed: November 2019.
[13]
P4_16 Reference Compiler. https://github.com/p4lang/p4c. Accessed: November 2019.
[14]
R. Stoenescu, D. Dumitrescu, M. Popovici, L. Negreanu, and C. Raiciu. Debugging P4 Programs with Vera. In SIGCOMM, 2018.
[15]
P4_16 Reference Compiler: switch.p4. https://github.com/p4lang/switch/tree/master/p4src. Accessed: November 2019.
[16]
Tofino, World's Fastest P4-Programmable Ethernet Switch ASICs. https://www.barefootnetworks.com/products/brief-tofino/. Accessed: November 2019.
[17]
H. Zeng, P. Kazemian, G. Varghese, and N. McKeown. Automatic Test Packet Generation. In CONext, 2012.
[18]
Y. Zhou, J. Bi, T. Yang, K. Gao, C. Zhang, J. Cao, and Y. Wang. KeySight: Troubleshooting Programmable Switches via Scalable High-Coverage Behavior Tracking. In International Conference on Network Protocols (ICNP), 2018.

Cited By

View all
  • (2024)OptimusPrime: Unleash Dataplane Programmability through a Transformable ArchitectureProceedings of the ACM SIGCOMM 2024 Conference10.1145/3651890.3672214(904-920)Online publication date: 4-Aug-2024
  • (2024)Defeating Data Plane Attacks With Program ObfuscationIEEE Transactions on Dependable and Secure Computing10.1109/TDSC.2023.327793921:3(1317-1330)Online publication date: May-2024
  • (2024)HPTCollector: high-performance telemetry collectorCluster Computing10.1007/s10586-024-04650-w27:10(14729-14744)Online publication date: 30-Jul-2024
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
SOSR '20: Proceedings of the Symposium on SDN Research
March 2020
151 pages
ISBN:9781450371018
DOI:10.1145/3373360
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 04 March 2020

Permissions

Request permissions for this article.

Check for updates

Qualifiers

  • Research-article
  • Research
  • Refereed limited

Conference

SOSR '20
Sponsor:
SOSR '20: Symposium on SDN Research
March 3, 2020
CA, San Jose, USA

Acceptance Rates

Overall Acceptance Rate 7 of 43 submissions, 16%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)43
  • Downloads (Last 6 weeks)2
Reflects downloads up to 07 Mar 2025

Other Metrics

Citations

Cited By

View all
  • (2024)OptimusPrime: Unleash Dataplane Programmability through a Transformable ArchitectureProceedings of the ACM SIGCOMM 2024 Conference10.1145/3651890.3672214(904-920)Online publication date: 4-Aug-2024
  • (2024)Defeating Data Plane Attacks With Program ObfuscationIEEE Transactions on Dependable and Secure Computing10.1109/TDSC.2023.327793921:3(1317-1330)Online publication date: May-2024
  • (2024)HPTCollector: high-performance telemetry collectorCluster Computing10.1007/s10586-024-04650-w27:10(14729-14744)Online publication date: 30-Jul-2024
  • (2023)DINC: Toward Distributed In-Network ComputingProceedings of the ACM on Networking10.1145/36291361:CoNEXT3(1-25)Online publication date: 28-Nov-2023
  • (2023)P4Chain: A Multichain Approach for Real-Time Anomaly Traffic Detection in P4 Network2023 IEEE 14th Annual Ubiquitous Computing, Electronics & Mobile Communication Conference (UEMCON)10.1109/UEMCON59035.2023.10316086(0163-0170)Online publication date: 12-Oct-2023
  • (2023)Runtime Verification for Programmable SwitchesIEEE/ACM Transactions on Networking10.1109/TNET.2023.323493131:4(1822-1837)Online publication date: Aug-2023
  • (2023)Stalker Attacks: Imperceptibly Dropping Sketch Measurement Accuracy on Programmable SwitchesIEEE Transactions on Information Forensics and Security10.1109/TIFS.2023.331512818(5832-5847)Online publication date: 2023
  • (2023)Vulnerabilities and Attacks of Inter-device Coordination in Programmable Networks2023 IEEE/ACM 31st International Symposium on Quality of Service (IWQoS)10.1109/IWQoS57198.2023.10188714(01-10)Online publication date: 19-Jun-2023
  • (2023)Empowering Network Security With Programmable Switches: A Comprehensive SurveyIEEE Communications Surveys & Tutorials10.1109/COMST.2023.326598425:3(1653-1704)Online publication date: Nov-2024
  • (2022)Symbolic Analysis for Data Plane Programs SpecializationACM Transactions on Architecture and Code Optimization10.1145/355772720:1(1-21)Online publication date: 17-Nov-2022
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media